Software Engineer | Proud Canadian

A God Among Developers
Jul 16, 2015
To look like a god among other developers, all you need to know is Vim. Seriously. Your code is more amazing if said code was written in Vim. People watching you type won’t even know where to begin. A couple edits here, a few motions there, and now your module is complete. Slow thinkers code slowly, but you code at the speed of light. Trouble with the terminal? You OWN the terminal.
Flexbox, Grids, Why is positioning so hard?
Jul 14, 2015
It is 2015 yet I am still amazed at how difficult it is to achieve seemingly trivial things. How is it possible that with so much momentum put into advancing web standards, positioning UI elements on a page is still one of if not the most challenging task in web development? Today a coworker showed me design he got from the designer; it involved tiling hexagons on a page… One might immediately jump to the conclusion: “oh I know, creating the hexagon is the difficult part!” No young padawan, a hexagon is really just a rectangle and two triangles… but let’s leave that for another post.
Your Own Github Pages
Jul 11, 2015
Github pages is awesome and Jekyll is amazing. Allowing someone to focus solely on the content then have it automatically published when they’re done (git push) is magical. Github pages is almost perfect… except for one thing. Due to security concerns, Github pages do not allow you to use custom plugins. This means no archive page, no tags cloud, no personalizations which == no fun. I wanted the automated publishing, but I also wanted the ability to customize.
Downsides to Front-end
Jul 07, 2015
Front-end is kind of an oddball in software engineering. On one hand, it is a discipline that requires the same kind attention as back-end engineering to build user interfaces properly. On the other, it is consumer facing craft, which means that sometimes we lose total control and have to deal with “the customer is always right” mindset. When is it appropriate to step up when you know something is “bad”? Sometimes the engineering side of me screams at me for building something my gut tells me is suboptimal.
Popsicles and Ducktape
Jul 06, 2015
While working on some legacy code today, I thought to myself: “Damn. This code is terrible. It’s amazing how such fragile code manages to run”. This then led me to be reminded me of a piece of wisdom from one of my coworker. Sometimes code gets messy. You have no idea how many enterprise software are held together by popsicles and ducktape. for vim
Jul 05, 2015
Story: A coworker of mine tried to convince me to switch over to a more modern text editor. He was bashing Vim’s lack of up-to-date plugins. One plugin he bragged about was his “gitignore” plugin. When you are starting a new project, apparently it’s an ordeal to add commonly ignored entries manually. This plugin helped him generate a gitignore with commonly ignored entries prefilled based on the dependencies he needs. Eg: for frontend, you might use bower and npm; your gitignore might/should probably ignore the node_modules and bower_components folders.
Containerize all the things!
Jul 04, 2015
Back in highschool, I remember obsessing over how many apps I could make portable. was one of my favorite pastime, and I definitely spent way too many hours of my free time making obscure apps portable. A good portable app had to bootstrap the app along with any of it’s necessary dependencies, maintaining state while running, and remove it’s footprints when it is done. This often involved writing a wrapper around the executable that: Backup the system configs (fun times with registry keys on windows anyone?) Load in the necessary configs the app depends on (again, loading registry keys, inis, any necesesary dlls…) Monitor the changes the app makes On close, it should remove all files / state that the app had created / modified then reinstate the system state from the backup.
Javascript: ~IndexOf
Jun 06, 2015
Migration of an old post (originally dated: July 4th, 2014). A couple of days ago I came across a post that talked about “writing code for humans”. To be honest, I skimmed the post, but I do remember seeing an interesting example: {% highlight javascript linenos %} // Assume this is an array of strings from somewhere var myArray = [“hello”, “something”, “awesome”]; if (~myArray.indexOf(“hello”)) { // Under what circumstances does this get called?