Jewelbots website

January 26, 2017 | By Brian | No Comments | Filed in: jewelbots.

In my quest to do whatever I can to help out the Jewelbots team I was poking around their various github repositories and bumped into a problem I knew I could solve. There was an issue with their gulp build pipeline where it would error running one of the gulp tasks. I forked the project, recreated the error and spotted the problem almost immediately. A simple matter of pointing to a file in the wrong directory was the culprit. A quick path change fixed it, and we were good to go.

I replied to the issue about how to solve it and offered to make a PR. Apparently it had been fixed locally but never pushed so a PR was requested, which I made, and it was merged in right away.

This is how you open source!

Array.vc

January 25, 2017 | By Brian | No Comments | Filed in: array.vc.

array vc logo

Last year I helped my friend Shruti put together a small site for her new venture capital fund calledArray Ventures. The most challenging part of this work was not having shell access to the server and only being able to use FTPS/SCP to upload files. Even though there is no database or any other kind of backend, and no front-end framework.. I felt a little crippled without shell access.

I wanted to keep it simple, so it’s “just jQuery”. It’s been a while since I did a site without Angular or NodeJS, so it was a fun challenge to remember how we used to do things. We’ve definitely made web development more complicated! It was fun to go back to the “jQuery way” of doing things. I wouldn’t recommend it for a large site worked on by many people, but for this site, it is perfect.

I had considered static site generator like Octopress or Jekyll but I didn’t want Shruti to have to learn another syntax since she was already pretty comfortable with HTML. Also I wanted to avoid the “build” step. Though now, I’m reconsidering that decision. I’ve never done more than a “Hello World” with those tools, so it might be worth a try. I’m sure whoever needs to edit it can handle a grunt/gulp/npm/ruby install… maybe.

What do you think? Any thoughts or suggestions?

Anyway, check it out – http://array.vc

A bad date with Little League

January 24, 2017 | By Brian | No Comments | Filed in: Uncategorized.

A date dropdown only a developer can appreciate….

Little League has some strange rules regarding what division a child can play in. You’d think it’s based on age, and you’d be mostly right, except for the asterisk.

A child’s league age is dependent on what month they were born in. It also depends it they were born before or after Sep 1, 2005, which I think was done to “grandfather” some players in such that they wouldn’t have to move down a level.

This is summed up nicely on our Middletown, NJ little league site:

For boys born on or after September 1, 2005, your player’s Little League age for the 2017 spring season is your player’s age on August 31, 2017. Therefore, a boy born on July 5, 2007, would have a Little League age of 10 for 2017. And, a boy born on September 5, 2007, would have a Little League age of 9 for 2016.

For boys born before September 1, 2005, your player’s Little League age for the 2017 spring season is your player’s age on April 30, 2017. Therefore, a boy born on April 8, 2005, would have a Little League age of 12 for the 2016 season. A boy born on May 5, 2005, would have a Little League age of 11 this season.

Sound confusing? It is. So much so that littleleague.org create a handy little calculator to help you determine your child’s league age. Functionally it delivers. What struck me as funny (and honestly slightly amateur, inept and embarrassing) was the order of the months in the drop down – see for yourself.

January, October?, November?, December?, … what?

For us (Javascript) developers, the problem is obvious. Javascript sorts alphabetically (not numerically) and since January is month 1, October is month 10, November 11 and December 12… these numbers actually come before 2 (February)! To make matters worse, Jan is actually 0 and Dec is 11. This is the kind of quirkiness developers put up with!

Here’s what sorting an array of strings that look like numbers looks like in Javascript

    a = ['8', '1', '10', '2', '11', '3', '12']
    a.sort();
    ["1", "10", "11", "12", "2", "3", "8"]

It’s a really silly mistake to make and easy to correct.

After some further digging, the page uses an iframe that points to this address – http://74.120.127.52/db_browse/leagueage/index.asp. Which is weird that it’s not under the littleleague.org domain. It’s also running ASP which is likely where the bad code is written.

I wonder what else we can find under /db_browse/ …

OK that’s enough for this rabbit hole!

iPhone free space

January 13, 2017 | By Brian | No Comments | Filed in: iPhone.

I am constantly running out of space on my iPhone. I used to have 50+ updates waiting to be installed because every time I tried to install them, I got the “insufficient space available” message. I did the obvious things like deleting photos and videos, removing them from the “Recently Deleted” album, and deleting any apps I don’t really use (most are really small though). I cleared cache within Safari (which I never purposely open, I use Chrome), I closed all tabs in both Safari and Chrome. I was really reaching. I even went as far as deleting the iTunes app (don’t do that, we need it later), the Apple Maps* and the Watch app. No mercy!

This didn’t get me very far. I did notice that Messages was taking up the most space, so I started going into group chats and removing the pictures and giphys that I didn’t need anymore. This had a fairly significant impact, at least the first time I did it. I don’t use iCloud so I like to keep some threads alive, but I definitely didn’t need all the stupid giphys that were in them.

This still wasn’t enough. At this point I even restarted my phone thinking that it would clear out some temporary files or something. No change.

After some Googling and visiting a few shady looking sites, I found the answer. And I didn’t believe it when I did it, and you are just going to have to trust me. Here are the steps –

  1. First, let’s check how much free space you have now -> Settings, General, & Storage iCloud Usage and look at “Available”
  2. Open the iTunes Store on your phone (I had to reinstall it after deleting it to try to conserve space!)
  3. Search for ‘war and peace’
  4. Open the War and Peace movie
  5. Tap on ‘$3.99 RENT’
  6. iTunes will try to rent it, then fail because there isn’t enough space. YOU WILL NOT BE CHARGED. This is where the trust comes in. Trust me, I have done this 20 times already.
  7. Now go back to Settings and check your Available space
  8. Bask in the glory of all your free space!

Why this works – First, the most important thing, to avoid the $3.99 charge, you must is to find something that has no chance in hell fitting on your phone. The HD version of War and Peace weighs in at 8.8GB. My phone is only 16GB so I’m safe here. If you have a 64GB phone this may actually fit, in which case you will get charged $3.99. You’ve been warned!

The internet seems to think that this method works because this forces iOS to clean out any temporary files and empty some caches that you, as a lowly user and owner of your phone, are not allowed to do.

So, you might be thinking “If thousands of people start using this trick, will there be an investigation as to why War and Peace is so popular?” Yep, that’s probably true. Their conversion rate of “clicks on rent button” to “charged $3.99” will absolutely suck and someone will be up in arms!

* One annoying thing about deleting the Apple Maps app is that you can no longer open an address from another app, like Calendar. This is annoying because I have both Waze and Google Maps. This is a vendor lock-in that will eventually get enough attention, but for now it’s not that big a deal to me.

A YouTube channel for my son

January 11, 2017 | By Brian | No Comments | Filed in: work.

My son decided that he wanted his own YouTube channel to publish his Minecraft sessions. I think he wants to become the next DanTDM (13M subscribers!). Two big hurdles with this one:

  1. Finding a good screen recorder for Windows 10
  2. Not using his full name as the name of the channel

Finding screen recorder software isn’t very hard, Google has a bunch of options. But each one seemed more scammy than the next. We finally settled on Wondershare Filmora, because that’s what his buddy in fifth grade uses. He’s still practicing so the huge watermark on the recordings isn’t bothering him yet. To remove it, requires a purchase which is $59 and I’m guessing that will happen soon.

Because he’s already got his own email with @olore.net hooked into Google (thanks to me for setting up the Google Apps for your domain like 100 years ago when it was free for everyone), creating a channel and uploading videos is a piece of cake. Almost too easy, especially for a 4th grader. While complete anonymity isn’t quite possible, I at least wanted to remove his full name from the top of his channel page. Easier said that done.

Eventually I found that if I created a Google+ page for/as him, he could add a nickname. Unfortunately, his nickname then appeared between his first and last name in quotes. Not what I was looking for, but close. Finally I landed on the solution – in the same screen where his First, Last and Nick name are in Google+ I removed his Last name, and Nick name, then changed his Minecraft handle as his First name. There was a warning about this change taking affect for all Google services, which probably means GMail too, which isn’t ideal, but for now his name is off his channel, and just his Minecraft name shows, which is perfect.

Without further adieu, I give you the joecraft2015 channel !