A path for quickly becoming productive with Node.js

If you’re an experienced web developer, and you want to learn Node.js and be somewhat productive with your time, here’s an easy path to begin with.

I’ll assume you know raw JavaScript and a little raw Node. Enough JavaScript to be familiar with the DOM, anonymous functions, and callbacks. You dont have to know React or anything of the sort.

First up, Learn enough to recognise the new syntaxes in ES2016, along with promises, arrow functions, generators and async await. You don’t have to be good at them; just be able to know how to read them.

Now learn enough Node and NPM to start a vanilla Express server and realise how much work it would be to write a whole fully featured web application in it.

Now quit jQuery, cold turkey.

If you come from using a Rails-like framework such as Rails, Django or Laravel, the though of scouring NPM for all the packages you’ll need, you’ll be wanting someone to make opinionated decisions about the right packages for the job for you. May I suggest Adonis.js. It comes with all the MVC, Authentication and ActiveRecord stuff you’re used to, along with loads of other good stuff too. You’ll have a good reason to learn about Generators, Promises and async await here.

Resist the urge to jQuery.

If you want to write your front end as a single page application (SPA), to run in front of your API, you could use what you’re familiar with, or you can start afresh with Vue.js because it has the gentlest learning curve of any of the mainline frameworks, all the best stuff from the other frameworks, and you don’t even have to learn a bundled/compiler if you don’t need it.

Vue is easy to learn, easy to adopt, and you’re never forced into complicating things too early. Go at your own pace, and eventually you’ll learn about components, which will change everything. Get started with Vue’s single file components and never look back.

With Vue, you don’t need a router out of the box, until you know you do. You also don’t need state storage until you know you do.

You want to write a universal app, or use Material design you can do that when you want. Heck, you can even bring in JSX if you’re feeling that. And you dont have to add any of these packages to your project, until you need it, and in any order.

tl;dr: Learn enough JS and Node to spot new JS language constructs, starting with Adonis will give you a reason to learn the new stuff while giving you an easier path to success.

Disagree? Got a easier, faster path to productivity and learning all this crazy JS? Chime in below, or hit me up: @Glutnix on Twitter.

Staying on-task

How do you stay focused on a task or activity?

Honesty time. I suck at staying focused. In my life I’m never far away from an internet-capable device, so distraction is a big time sink for me. Twitter, IM, RSS feeds, iPhone games, Facebook, YouTube, Wikipedia, so much will drain away my time.

When I am on task, it’s usually because I’ve set myself crystal-clear goals for the next few hours. If I can see the desired result and I know exactly how I can get to it, that’d be a good clear goal.

I try to rock the Getting Things Done methodology, using Cultured Code’s Things, with good results: I know exactly what it is I should be working towards. Where I currently let myself down is not doing my regular/weekly reviews, and sometimes slacking on writing good next actions.

Maybe I should mix in the Pomodoro technique to build focus. Anyone out there tried this, or something similar?

What’s 2011 got in store for me?

I’m taking what might look like some big risks this year. I’m giving up my well-paid full-time work for an internship at my church in Wellington and a part-time job at a Wellington PHP and ActionScript house.

Part of the internship at Arise will be doing a Local Church Certificate qualification. It’s not much, or probably even all that difficult at NZQA Level 4, but means I’m a student again. Probably a financially-challenged student. The rest of the time I’ll be helping out where my skills and time lead me. Most likely helping with the website and creative side of things, and with anything else that I can help out with.

Slicing my work-time in half when I’m (almost) 30 isn’t something I intend to take lightly. I probably wouldn’t have applied for the internship if my buddy Dan didn’t offer me part-time work at Instinct working on ActionScript and PHP projects.

I’m pretty excited though. I’m gonna be put through this tough time to come out at the other end a different person. Beyond what I’ve said above, I’ve got very little more idea of what will go on. But I say to all of it:

Urkle: Come at me Bro

Come at me, Bro!

😉

The truth about iPhone Emoji

There has been a few posts going around the internet talking about the enabling of Japanese emoji on the iPhone. I was curious, and after enabling and experimenting, here’s the truth about emoji on iPhones.

Once enabled, you get access to a staggering amount of icons! To be exact, 469 symbols, ranging from smiley faces to weather icons, flags, animal faces, (clean) hand gestures, and much more. Here’s what they all look like, screen-grabbed right on my iPhone after I put them all in an email. FYI, scaling has occurred, these are not perfect.

Diagram listing all Emoji for iPhone and iPod Touch v2.2.1

Diagram listing all Emoji for iPhone v2.2.1

The trick here is that while these icons look fantastic on the iPhone, when sent in SMS text messages and emails, the beautiful pictures you see above are sent as Unicode characters, as they came through to me via my Gmail:

These characters are part of the Private Use Area of Unicode. Which is why, if you’re viewing this page on a browser not running on an iDevice, you will see a whole slew of question marks or boxes with little letters in them, followed by the copyright, registered trademark and trademark symbols.

Doing some more research, it turns out a bug has been filed on OpenRadar outlining how Apple’s implementation isn’t even that compatible with NTT DoCoMo’s de-facto standard on ‘Pictographs’, even though it would seem they’ve implemented every single icon in that standard.

I’m not expert, but it seems that pre-Unicode, Japan standardised on Shift-JIS, a modification to ASCII that would allow the storage and display of the Japanese Hiragana and Katakana characters that make up Japanese written language. This was pressed forward into the design and manufacture of the Japanese handsets, and even into the operator’s networks, and for the time being, this means both NTT DoCoMo, the biggest telco in Japan, and Softbank, the telco serving iPhones in Japan.

NTT DoCoMo created the defacto standard on emoji on Japanese mobile phones, and have outlined the character encodings for both Shift-JIS and Unicode. Every handset in Japan supports this standard.

When the iPhone was first released, it apparently was criticised in Japan for not supporting the sending and receiving of emoji glyphs. Eventually Apple got around to it, but according to rdar://6402446, iPhone Firmware 2.2 currently implements the encoding of emoji using Unicode characters in the private use area, but not the same private use characters as the NTT DoCoMo Pictographs standard.

So it would seem that, to cut a long story short, Apple’s emoji are directly incompatible with every other handset in the world.

According to Apple, Softbank doesn’t even do translation for iPhone SMS to other Japanese handsets. It will however, translate emoji in emails, but only if you have a Softbank email address and SIM.

And because the rest of the world doesn’t have handsets that work with emoji, that’s why Apple only enables the emoji keyboard for phones with Softbank SIMs.

Still, it wouldn’t be too difficult to write a script to support emoji characters in your web app, supporting both NTT DoCoMo Unicode and Apple Emoji Unicode. Apple have done a nice job with their icons. Interesting times.

Sources:

Save Icon Confusion is reverting?

What shall we do with the drunken save button?

So floppy disks are totally redundant. Very few new computers are coming with floppy drives. Ask a five-year-old kid what each of these things is:

floppy diskcompact diskSD Card

In my totally unscientific research, I asked a mother of a six-year-old if her little boy would know what these three things were:

CDs: Yes.
Memory Card: Yes.
Floppy Disk: Probably not.

So what did software developers do? Look for a new replacement.

The past

Microsoft Office X for Mac (2001) has used a ZIP disk:
Excel save icon

NeoOffice 2.x for Mac took me a while to figure out… Something akin to the Windows and OSX icon for Removable Drive?

NeoOffice save icon

Why did they have to confuse me?

The Steam Train Comparison

My reaction to this confusion was ‘why change it?’

In New Zealand, and as it turns out, Italy and Sweden, our road signs that say ‘railway level crossing’ look like this:

Railway Crossing sign for New Zealand

(courtesy ltsa.govt.nz)

But hold on, that’s a STEAM train! These trains are not around any more except for in museums and… children’s books. Of course, we all know that this sign is a train. Digging further, it turns out here in New Zealand we have a sign for ‘light rail level crossing’:

Light Rail level crossing

(courtesy ltsa.govt.nz)

What the hang is that… I guess it kinda looks like a train, but it’s electric, but it could be a tram.. huh… *SMACK!* Your car just got hit by an oncoming TRAIN. Talk about confusing and potentially fatal. Luckily, I’ve only got my learner driver’s licence, and I haven’t ever seen this sign in use.

My point is why change something that works?  Luckily, developers have caught on that the floppy disk is an international symbol:

The Present

OpenOffice 3.0 Beta has a floppy disk:

OpenOffice 3.0 Save Icon

And thankfully, Microsoft Office 2008 for Mac has switched back to a floppy disk:

Excel 2008 save icon

Here’s the cincher: Google Docs, a web application that doesn’t even have access to your local computer still uses the floppy disk for its save button:

Google Docs save icon

Curious and Curiouser

Looking for further examples, I dug around. It turns out many applications don’t even have save buttons any more. Apple’s iWork doesn’t have a save button in any of their applications tool bars; you can’t even customise the tool bar to put one there either! I guess these applications are expecting you to memorise the more universal shortcut of Command+S or Ctrl+S

Conclusion

I think that we should stick with the floppy disk. It’s recognisable by all us old timers, but I think that young ones who haven’t seen a floppy disk will still know that it means ‘Save’.

But then again, isn’t just using the keyboard a lot quicker?