Sent on Jul 20, 2017

My Aha-moment

Yesterday, I told you I had to become good with JavaScript, or die trying. In that moment, I made the best and worst decision of my life simultaneously.

I remember walking into the tiny office that morning, only to be stopped by my project manager. Let’s call him H.

H wanted me to build a custom carousel for the client. It looked like this:

I’ve extensively researched carousel plugins a week ago. I knew, from the sight of this component, that I had to code it up. There wasn’t any plugin that could make a two-row carousel. To make matters worse, I had to support single-row carousels as well. I also had to make the component responsive too.

I didn’t want to make the component. I couldn’t do it. I didn’t know enough JavaScript. I only knew basic jQuery – some DOM traversals and class manipulation. That’s all I could do.

I protested. I came up with the best excuse I could. “This component takes a lot of work. Plus, we’re already behind schedule. If we try to make this, we’re never going to launch on time”.

H gave me the ultimate question: “How long?”.

I had to give an estimate. I feared if I don’t, I’ll be labeled as a shitty developer. I’ll never get any work again.

“Four days”. I said.

“Do it”.

Fuck me. I nearly fainted.

My fate is sealed. My reputation goes to shit if I fail this. I have to deliver a prototype in four days. There’s no way out of this mess now.

To make the custom carousel, I had to make a jQuery plugin (jQuery was required to write any decent cross-browser JavaScript then). I can’t do that yet, not with my current skills.

I did the only thing I could think of – I took the closest plugin I could find. Ripped it apart. Studied it. Then, try to build my component from the ground up.

Long story short, I got struck with countless new concepts, banged my head on a solid brick wall and felt incredibly stupid for a few (three, to be precise) nights

Somehow, I managed to make a prototype of the plugin by the fourth day. It was still shit. I only made the double-row carousel part. No single-row carousels, no responsive, no swiping functionality. None of the frills that would make the component work as it ideally should.

I delivered the prototype nevertheless. The client was happy that their “vision” worked. I saved my ass for now.

From the outside, this was just another moment where a developer showed a prototype.

What I told myself on the inside, however, was a completely different story.

I used to think it was impossible for me to learn JavaScript. I didn’t have a CS degree or any programming background. This moment changed everything.

I built a component.

I started believing can learn JavaScript. I can get better. Looking back, this was the moment that changed everything.

From this moment onwards, I told myself I to build all components from scratch. It was redefining. I learned a ton with each component. My JavaScripts became better over time.

Now, JavaScript doesn’t faze me. I’m confident I can find a solution for any potential problems I face, even if no solutions are present on Google.

That’s the story of how I learned JavaScript. The story of my aha-moment.

What’s your story with JavaScript? Did you manage to get good enough? Or are you still stuck? I’d love to hear your story. Write back and let me know!

Stay awesome,
Zell

PS: They say the best way to learn is to make a public comment to deliver. It’s true. But there’s too much risk involved. There’s a less risky way to get awesome with JavaScript without the stress and overwhelm. Tell you about it tomorrow.