From a Home to Hosting an Art Exhibit

Sunset OverdriveSunset Overdrive

Conception

A small idea can be infectious and grow far beyond its original intent. This happened to me shortly after I moved into a loft on the upper east side. I had this vision of standing on the roof, dragging a paintbrush across canvas while looking out across the city. The house is only a few blocks from the Guggenheim museum and inspiration hangs thick in the summer air.

The small idea was to host a paint-party, where my artistically inclined friends and I could gather and learn from each other. I wanted to mix hobbyists, professionals, students and novices.

I had no idea that my roommates would take this idea with them to the Frieze Art Festival on governors island. That they would meet a curator and infect her with the idea too. That it would grow from a single day of painting to a month long art exhibit, featuring some of the coolest contemporary artwork I’ve ever seen, AND a live painting by Vernon O’Meally.

IMG_20150723_092344423_HDR

Continue reading From a Home to Hosting an Art Exhibit

Announcing Office Hours

This Tuesday I will be hosting my first office hours!

This is an opportunity for anyone in the world to have 15 minutes of time to chat about javascript, web development, or computer science in general.

I will gladly give you my ear, my time, and my best effort to help you figure it out.

There will be four Skype slots, on August 4th.

August 4th, 7:00 – 7:15pm EST — Booked
August 4th, 7:15 – 7:30pm EST — Booked
August 4th, 7:30 – 7:45pm EST
August 4th, 7:45 – 8:00pm EST

For more info, read my post here.

Optimizing Webpack build size

Optimizing File Size

I decided to tackle file size as a fun side project at the office. After our big refactor for JW7 we finally had a modular, clean(er) codebase – so now the fun begins. Let’s squeeze it down as small as possible!

With this kind of task it’s always best to set some goals, pluck the low-hanging fruit and then re-evaluate. Our current player size was 232 kb minified, and as a team we established a goal of reaching 200kb.

To identify targets for refactor, I enabled verbose reporting on WebPack. This causes the compiler to output the size of each module independently. I piped that into a file and deleted everything above and below the modules list.

$ cat modules.txt | tr -s ‘ ‘ | cut -d’ ‘ -f3-5 | grep -v “bytes” | sort -g -r -k2,2

 

This command takes the modules output from WebPack, trims out the extra spaces, takes the substring between the 3rd and 5th space, removes all rows which are measured in bytes instead of kB and then sorts.

The results

../jwplayer/src/js/providers/html5.js 25.6 kB
../jwplayer/src/js/utils/helpers.js 24.7 kB
../jwplayer/src/js/controller/controller.js 23.7 kB

Continue reading Optimizing Webpack build size

Tempo

Without rhythm there is nothing
and life has just found its pace,
its cadence of pleasures and twists.
Men nod their head and smile.

We move to the music
as God conducts the world around us.
Moments opportunities and pleasures abound,
plentiful as grain in the field,
patient,
waiting to be harvested.

Unexpected trials on the road to Colemak

 

I want to take a moment to jot down a list of trials I didn’t see coming. They accumulated to the point that after 4 months, I wanted to quit. However it was too late, and I am -for better or worse- too impatient to use QWERTY.

Unexpected difficulties with Colemak

  1. When computer boots, I need to type my password in QWERTY mode until app loads (true for mac and windows, not true for ubuntu)
  2. I need to install software inside my virtual machines, as well as on the computer
  3. How frequently I type on other peoples computers, especially when training new hires
  4. After learning the keys, my muscle memory for timings would be slightly off
  5. Key-bindings in video games (StarCraft 2) are demolished
  6. Colemak isn’t necessarily the best, there are new trendy ones showing up daily

 

With these being noted, I still think it’s worth giving up QWERTY. For a new adopter I’d suggest viewing a few other alternatives as well, including the Workman, Norman and maybe others too.

One idea for the future that would make life a lot easier would be an app which detects your keyboard layout as you type and swaps them automatically. When my friend types “google.com” into my laptop, and the computer sees “tlltuk.c;m” it will figure it out and just swap back to QWERTY.

 

Why I decided to try Colemak

 

Like most engineers, I am a huge fan of lifehacks. Why not improve HOW we work? Well the latest experiment I tried was switching from the dated QWERTY keyboard layout to Colemak.

Context

When I switched to the Code Keyboard, I was very inclined to love it. I wanted to adore it, it was designed for me; it was beautiful, nerdy and well designed. Unfortunately over the first week the joints in my fingers began to ache- I believe due to the resistance of the cherry MX Clears. I wasn’t ready to give up on the keyboard so I did some research into reducing the strain of typing. It turns out QWERTY is known for being inefficient; lo and behold, there was a readymade solution in the form of overhauling the keyboard layout.

So I declared to the world that I was making the switch.

Why?

  1. Hopefully eradicate finger pain
  2. Improve my typing performance (speed, accuracy)
  3. Be an early adopter of what I believe to be an important movement

I do expect to be making some sacrifices, such as

  1. Decreased productivity during learning curve
  2. Need to install software on my machines

 

Writing prompt: Friends

Thank you to /r/writingprompts for the inspiration:

Prompt :  A person who has used his ability to read minds to glide through life, finds the one person whose mind he can’t read

Tick, tick, tick, Jason smiled and nodded as the interviewer kept talking and babbling. He didn’t even recall the man’s name who sat across the shiny table from him. Their body language told the whole story, this job was in the bag. One man leaned forward, inquisitive, probing, absorbed; the other leaned back, quiet, a serious expression on his face but a smile in his eyes. One thing Jason learned young was when to be silent. How to control the flow of conversation by shifting his attention, and how to move the center of the room to his feet. He used that now to begin planting ideas into the mind of his interviewer.

The best part was approaching, the moment when all his clues and subliminal messages would unfold into an organic idea. The build up was slow and he was patient. He felt his heart rising, an inadvertent smile that didn’t help, but couldn’t be helped. His opponent had crumbled, and was ready to make an offer,

“Why haven’t we made a move in Cambodia yet?”

Continue reading Writing prompt: Friends

The Mowgli’s at Brooklyn Bowl Nov 2013

It was a cold night for venturing into Brooklyn but after falling in love with the Mowgli’s a few weeks prior, I had no choice. My friends and I arrived at Brooklyn Bowl just in time to grab a beer before the second band played.

The bands tour is called Random Acts of Kindness, and honestly their fans take it to heart. A cute girl ordered an extra beer and offered it to us within minutes of arriving. A minute later we were talking to new friends from Louisiana who had come to support the second band Savage Teeth. I cannot over emphasize how positive, friendly and delightful the people around us were.

The first thing to know about The Savage Teeth is that they are very proud of where they came from. It suddenly made sense why their fans roadtripped out to NY after hearing songs dedicated to Lousiana slang (like Ma Hala) which I’ve never heard of. Their warmth invited us to be part of it even when we didn’t understand what it meant – it still pulled on us.

The lead male singer burst out light like an active volcano, smashing his personal drum and rebounding off into the air. Minutes later hopping off stage mid-song for a photo shoot with his fans. The female singer was a little more reserved – she was enigmatic, beautiful and had a great voice. When the band quieted down, her voice would rise above and we all agreed that we wanted to hear more of her. The drummer may have been what made the band for me. His enthusiasm and bubbling energy bordered on satirical, I even think he was seated less often than he was standing. His goofy oversized shirt and hat matched his oversized personality.

Continue reading The Mowgli’s at Brooklyn Bowl Nov 2013

On Dying

There’s that moment when the world stops.
First your heart
then everything else slows until you’re just looking at your hands
and every sense becomes a drone in the background.

You blink and everyone has disappeared.

For a while it stays like that.
the cup on the table moves slowly,
a little to the left a little to the right.
Sometimes its filled with ice,
each day is a Dali clock,
a finger dragged through melting plastic.

Each blink is another moment
and I realize I have only so many blinks left.
They drug me so I won’t cry out at night,
but pain or sleep I would rather be awake.

I second guess everything.
Everything is accelerating

Backbone Relational vs Backbone Associations

The challenge

We were recently looking for a way within Backbone to elegantly handle event delegation from sub-models. For example a house has many rooms, and each room has one or more desks. In this case each stage is a model which owns and should be able to monitor changes to its children. For example, a house may want to monitor if there is a change to the ‘occupied’ attribute of any desks inside it. I was tasked with comparing two plugins which solve this problem: Backbone Relational andBackbone Associations.

1. The documentation – in my humble opinion the documentation should be responsible for three things. Describing the problem, describing the solution and explaining how it wants to be used. That’s it. Skim over it, try to see which assumptions they are making but come to your own conclusions. It’s tempting to look at all the nice features but that doesn’t mean you should jump on board.

2. Source Code – Read every line, and then don’t use a plugin that you couldn’t write yourself. If it doesn’t read smoothly and you find yourself questioning their decisions than you need to back away.

3. Favor the simpler solution – Brevity is elegance. Extra features are added complexity, and you want the bare minimum that works for you. Complexity will come over time as you start adding domain logic, which is why you want your building blocks to be as concise as possible.

4. Be wary of dependency chains – This hasn’t been a problem for most plugins I’ve viewed, however it isn’t uncommon in real applications.

5. Check out the community – is this something that’s up & coming (like angularJS today) or something on the decline (mootools). How often are non-primary developers contributing and how active is the owner? The facts are easily available on Github and give you a real sense of how the plugin will stand the test of time. You don’t want to be the last person on the bus, nor do you want to be the first. *BONUS*– Send a message to the developers and see if they respond.

Okay, but what about these backbone plugins?

1. The Relational documentation follows the format of underscoreJs.
2. Equal
3. Associations was much shorter / more elegant
4. Equal
5. At this point I already made up my mind, but I did shoot a message to dhurvey on Twitter and he responded within a day. Reliable guy!

The primary selling point for me was that it was a fourth of the size of Relational. It was significantly easier to read and was more specialized (it didn’t solve problems I don’t have like many-to-one relationships). Admittedly Relational had a larger user-base and it’s community was a bit stronger, I messaged it’s owner on twitter and got a response within a day. The rest was about the same. I knew I could re-write it if I needed to whereas I didn’t think I would want to re-write relational. Finally they had the same API which makes the transition between them easy if we change our minds later.

After realizing that I had a strong preference for Associations I prepared my argument. I stated the maintenance benefits of choosing a smaller solution, and I bragged about its code legibility, but what got everyone’s attention was when I mentioned its performance benefits. Backbone Associations was nearly twice as fast for very large objects as compared to Relational.