Learnings from 10 years of coding

I wrote my first line of code about 10 years ago when I was serving in the Singapore Army (it was in Python). Back then Computer Science was not a "sexy" undergraduate course, it was a "dumping ground" for students with poor grades.

I did relatively well for my 'A' levels, and won a scholarship to NTU. But whenever I told others that I decided to do Computer Science, I remember they would scoff at me asking why I didn't choose Law, Medicine or Business. (although I was a double degree in Computer Science and Business student in NTU, I always identified myself more as a techie.)

Shortly after that, Computer Science became the new sexy thing because of videos like this (released 10 years ago!) and lots more media coverage of how the Big Tech like Google gives employees free lunch etc. In fact this is one such video from Shopee, a Singapore E-commerce big tech firm.

Everyone went NUTS about Computer Science and suddenly it was the new elite status. This is again, one of those 90% of everything is crap things, everyone is influenced by branding and perception. Looking at 2022 - 2023, every tech company is laying off people and stopped giving free lunches.

Here's the 10% that isn't crap

I had a simple motivation of choosing Computer Science before it was sexy: To build stuffs. I wanted to learn how to build apps, build games, build things on computers that can have a positive influence on people and society.

However it was a 90% waste of time in undergradaute. The only 10% of classes that were applicable were classes like Object-Oriented programming, Algorithms and Machine Learning. In fact I learned the most from building my first startup.

I am far from being a good coder, but here's somethings I learned that worked for me:

Brainwash yourself that you can do it

Look, I know it is intimidating, especially for the first time looking at the gibberish code. The start is always the hardest, the first thing to do is to convince yourself that you are able to Just Do It . It is not going to be easy, in fact its going to be hard, but for every minute you spend grinding it out, it gets easier.

Zoom out and Zoom in

Start by understanding the big picture of what you are trying to build. In product management terms: What is your definition of done? Usually for web/mobile applications, this means having a User Interface design so that you can visualise how the final product look like. You do not need a hi-fi design, you can easily pickup figma for a low-fi design even if you are not a frontend designer and make the design better with design components from Bootstrap or Tailwindcss.

Then, narrow down into the details: How will the database tables look like? Which tech stack are you going to use? How long do you need to research and learn the things that you do not know?

As you are Zooming in on building, constantly Zoom out to see the big picture again. Are you spending time on the bottlenecks or are you merely updating some trivial UI? Always tackle the most difficult and uncertain tasks first. It feels good to do the easy tasks but those rarely move the progress needle forward.

But, do not spend too long stuck on a tough task. Timebox it such as spend 1-2 hours on it, if you are still stuck, move on to another task and come back again later with a fresh mind.

Build on top of your existing knowledge

Almost every app will have a few "must-haves", like a login+logout system, pagination, a CRUD form etc. Build it once, and you can re-use the code and the knowledge you have to build your next app. This concept is what I consider "momentum" in my post Age, Momentum and being an IC and also why I decided to double down on Ruby on Rails as my main webstack of choice in my Hello Superpowers post.

Build something that excites you

Time flies really fast when you are working on somethat that inspires you, usually this means an app/software that you can actually use by yourself. Coders want to work on something they are excited about, coders are artists by nature. We want to learn new tech, build useful things and be so excited so that we jump out of bed everyday to build. There's some similarities between Chefs and Coders. We dream up new stuff we want to create, identify the details, get excited working on it, and the first version is almost always gonna be s**t.

Granted, this is too ideal to be applicable to our everyday jobs. But if you can find that spark in what you are building, you will be 10x more productive.

Get to the minimum working code

Do not over-optimise your code from the beginning. Just get it to work! Write the dumbest code that works for the functionality you want. Focus on functionality, not on good code.

I am not saying good code isn't important, but if you cannot get your code to even run, why think about making it good? The more you code, the better it will get, but the first priority should always been getting it to work. You can, and should, refactor it after it works.

Ship it

The last 10% syndrome is real. The start of a new project is fun and exciting, but the last 10% of fixing the bugs and finishing the UI feels like an eternity. Because we don't like to be critisied! But done is better than perfect. So timebox yourself, ship the app out even if there is a bug somewhere, there is a good chance you won't have enough users to notice it in the first few months anyway.

Things I would do differently if I could restart

I believe I have been dealt with a bad hand in life as explained in this post. As a result, there's so many things I could improve on if I could redo this coding journey again.

Focus, Focus, Focus

Back to what I wrote in the Hello Superpowers post, you will only be remembered for the best skill you have. My undergraduate classes were so wide, I covered topics in Software Engineering, Data Analytics and Machine Learning. In my career, I did Web development, Mobile development and some AI. Even in those areas, I learned and used multiple tech stacks, for example I did Ionic/Flutter for Mobile dev, and ReactJS/VueJS for Web dev. I became a Jack of all trades, master of none. The joke is I got my MBA and decided to become a Product Manager because a PM is a generalist.

While its good to explore different skillsets when you are young, I believe the earlier you decide on what you want to specialise in, the better it is.

Find the right opportunities to develop yourself

Whether it is joining a company or starting your own, know what you want to get out of it. While it is cool and have many good reasons to join a FAANG, especially if you want to work on cutting-edge tech, you may find a more suitable opportunity in another company if what you are interested in is more niche for example. (Again this is covered in my Hello Superpowers post, notice how all my blog posts are interlinked?)

Do the boring work

Everyone started from the bottom. I understand sometimes it gets really frustrating to not be get something to work. But even the best coders run into problem everyday. Ever wonder why Python/Javascript/Ruby are called programming "languages"? It is just like learning a new language: You use it, make mistakes, people make fun of you, but as long as you keep doing the boring work, you will be good at it.

I believe as we get older, and as we get better in 1 area, its harder for us to learn something new, partly due to egolistic reasons and also the nagging voice inside our heads "why bother?". For example for myself, switching from NodeJS to Ruby on Rails has been challenging. I often question myself if I should stick to NodeJS, but thinking about the ever changing land of Javascript Monstrosity has solidified my decision.

Disclaimer, I think I will still write microservices with NodeJS to rapidly prototype some ideas because it is so widely used and also because I have some fluency in NodeJS already.

But most importantly, the attitude to keep learning new things, to start from the bottom, is a Superpower that I believe is important (everything is linking back to my first post on Superpowers!).