Cloud Based Brownie Points System for the kids

It sparked from a conversation with Emma about how she and Ethan ought to receive a decent present from Santa this Christmas. I’ve had plenty of ideas in the past on how to track merits and demerits ranging from a whiteboard stuck to the fridge or bomb shelter door to a Google Assistant enabled method of populating a shared Google Sheet with awards and deductions. The Google Assistant method was close but there were limitations so I never got to complete that. Emma suggested the whiteboard method but I wasn’t keen to have an exposed whiteboard that is prone to “hacking” (modification) of scores when I’m out so I told her that I’d build something by the next day. I spent the entire night and the wife was very annoyed with me being still up at 5am while the kids rolled around restlessly without my presence in bed.

So let’s start with the requirements

  • Must be able to track points for 2 kids (Emma and Ethan)
  • Must be cloud-based so that multiple parents/guardians can have access to award/deduct points anytime, anywhere, with everything synchronised perfectly
  • Must be able to award / deduct points easily without fuss
  • Must have a real-time “dashboard” for the kids to check their scores at anytime from their iPads

After some considerations, I’ve chosen to build the web app in PHP, mySQL and javascript. Yes, yes, that’s a rather ancient stack but I’m not a fulltime developer and that was what I used to tinker with. I even had to deal with mysql_connect() being deprecated since PHP version > 5 – that shows how long it has been since I last touched this. Killed brain cells reading up on the newer PDO_MySQL extension and using jquery/ajax to make the experience more seamless.

For the admin portal (for parents to award/deduct points), I had to make sure that:

  • On document load, fetch Emma and Ethan’s current scores and populate them in the input form fields as shown in the screenshot
  • On any change to the fields, either via the -/+ buttons or editing the score directly in the input, the score in the input field will be sent to a separate PHP script along with the new score and for whom the score is meant for.
  • Check that mySQL returns an affected row count of >0 (technically it must be “1” for success modification of 1 record)
  • Every 3 seconds, Javascript will query the DB for the latest scores and update the input field element values (in case the other parent updated the score from another device). This is to reduce race condition though this implementation is really not full proof.
Howard's Cloud based brownie / star point merit system for kids
The admin portal. I’m obviously not a designer. Sorry!

For the kids’ dashboard,

  • Visually pleasing, fancy way of displaying the 2 scores
  • Javascript updates score every 2 seconds by calling the DB for the latest scores (Yes, yes, going to get judged for doing such polling but hey, it’s a private project and polling only happens if the dashboard is running).
Howard's Cloud Based Brownie / Stars merit points system for kids
Creating the background of the dashboard
Howard's Cloud Based Brownie / Stars merit points system for kids
What the kids will see

I also took pictures of the kids in order to use them for the dashboard. What a tiring day!

Sorry that I won’t be releasing the source codes as I deem myself as a sloppy, amateur coder. I, however, hope to inspire you guys out there to find creative ways to engage your kids!

Feel free to share your comments or feedback!

SH.SG – Singapore based full featured URL Shortener

SH.SG - Full Featured URL Shortener made in Singapore

When one thinks of URL shortener, BITLY comes to mind. While BITLY has been a reliable, mostly free service, there are limitations.

But wait. Why do you need a URL shortener?

  • Long URLs doesn’t look good.

This is a no brainer. Would you like a link like http://sg.iherb.com/now-foods-essential-oils-lemon-eucalyptus-1-fl-oz-30-ml/3329?rcode=rfc074 OR https://sh.sg/iherb ?

  • Stop referencing “link in bio” on Instagram

Many instagrammers make reference to “link in bio” because they can’t post a link on the post level. However, this means that the latest post will always hog the link in the bio, rendering referencing in previous posts useless. With a shortened URL, simply put the link in the post. Viewers don’t mind typing out the link in the browser if it is short enough.

  • You want to hide the destination URL

Not that you have malicious intent but maybe you just want to keep the destination link a mystery until it gets clicked.

  • You want to redirect users based on their country

There are times when you want to send visitors from different countries to a different link. For example, a Singapore visitor may be directed to your Singapore site and the rest will be sent to the international site. This can be done by some link shortener services.

  • You want to redirect users based on their device type

Want to link to your mobile app but there’s only space for one link? Redirect users to the Google Play Store or Apple App Store based on their device type. i.e. iPhone users get automatically redirected to your app on the Apple App Store. Amazing? Try this demo link: https://sh.sg/msa

  • You need a placeholder link for your email/website campaigns and have the freedom to redirect it to the final link when it is ready.

Your developer or web designer needs the actual URL for an upcoming campaign but you don’t have it ready. Give them the shortened URL with a dummy destination link and then update the destination link later! But beware, some shortener services doesn’t not allow you to amend the link unless you’re on a paid plan!

  • You want to set an expiry date for a link

Set an expiry date for your shortened link so that it no longer redirects when your campaign ends. Lots of use cases for this!

  • You want to add a simple password protection to the link

I wouldn’t recommend this to be the only protection for your destination link but it is useful to have this feature to avoid having people snooping on your shortened link to your home VPN / private links.

Need a recommendation? Introducing SH.SG, a Singapore based, full featured URL Shortener.

There is a free tier with limited features but the paid plans are really cheap too, starting from as low as S$1.33 / month!

Features:

Shortest domain name 🆓

With only 2 letters (excluding TLD), SH.SG is one of the shortest domain names you can get in Singapore.

.SG TLD 🆓

A Singapore based TLD provides more relevance when you are redirecting to a Singapore website.

Custom Aliases 💰

Instead of https://sh.sg/AeXd4, our paying users get to choose their own custom alias e.g. https://sh.sg/iherb

Link Expiration 🆓

You can set an expiration date to stop redirecting users. This is useful for time-sensitive pages such as promotions and other limited offers.

Password Protection 🆓

Want to allow redirection only for authorised user? Want an extra layer of security? Password protection feature is available for everyone!

Geotargeting 💰

This option allows you

Device Targeting 💰

Set conditions so that, for example, iPhone users get redirected to a specific link and Android users, another. You can use this to send iOS users to an Apple App Store link to your app and for Android users, to your Google Play Store app.

Targeting Pixels 💰

Allows you to use Facebook Pixels

Parameter Builder 💰

You can add custom parameters to the link above using this tool. Choose the parameter name and then assign a value. These will be added during redirection.

Try it now >> SH.SG – Singapore URL Shortener

Cloning a Banapassport Card

I recently spoke to a client who wanted me to try to help him clone his “Arcade Card”. I immediately rejected him as I wasn’t into illegal stuff like cloning stored value cards. Besides, I was highly doubtful that modern stored value cards are that easily duplicated. He went on to explain that the card has no stored value and was simply sort of an identification card for the Wangan Midnight series of racing games in the arcade. The card authenticates the user to his/her Banapassport account which stores the cars acquired through the game. 

After speaking to a few players, I found out that the common reasons why they would want to clone their original cards are:

  • Convenience. The Banapassport card can now exist also in the form of a key tag or even sticker. Hanging the key tags with your other keys seems like a great idea. 
  • Backup. While players with Banapassport cards that are properly linked to their email address can recover the data in the event of the loss of the original card, there is a cost involved as a new original card needs to be obtained. Also, if the player’s Banapassport card is not linked to an irrecoverable account, there is no way to recover the data. Having a physical clone will solve the problem. 
  • Security. Leaving the original card at home and only going to the arcade with the generic looking cloned tag makes it unlikely that anyone knows what the tag is for if it gets lost. 
  • Sharing. While one cannot log in to two machines simultaneously, two or more players who are not staying close to each other can each hold on to a card/tag to play at different times. 

After doing some research, I managed to crack the keys and successfully clone a Banapassport card into a generic RFID key tag:

 

Interested? Head over to Carousell : Banapassport Card Cloning