Kapil Dutta

Kapil Dutta

Coding is actually hard


Context for HN

It's 2 am here right now. I wrote this post very quickly in about 30 mins on the recommendation of a friend to just take my mind off things before going to sleep. I was not expecting it to get any real attention, and so did not attempt to provide much context in the post.

Genuinely appreciate your comments, especially those with encouraging, emphatic words and guidance. Also great to read your own personal journeys as well.

Although I started learning to code 10 years ago, I have not actually been actively coding for all these years. I have worked as a full time dev professionally for maybe just 3 months, and quickly moved into management roles from there.

My primary expertise today is more towards product management, sales, marketing, etc than coding. I currently work in a Enterprise Sales role, and my goal is still being an entrepreneur and building companies.

Zooming out and looking at my entire history, I have spent very little actual time coding. This is the primary reason behind the struggle I express in this post. I feel frustrated with how much little time I have put into it over the years, and how little progress I have made.

Also, perhaps important to note, I have diagnosed ADHD, chronic anxiety disorder and some level of bipolar as well. I don't like to attach these as part of my personality, but it explains a lot of my impulsivity, grandiose thinking and mood swings, which contribute to my frustration significantly as well. Also the reason why I could never learn well in classroom or with tutors. Self-learning has always worked better for me.

The post is intentionally very generic and vague, and doesn't give any specific examples of what I was struggling with and why, simply because it was more of an emotional post to express my frustration from the past week. I also have not written anything in a long time, so this was a good excuse for me to quickly write and publish something.

I recently started working on a new side project, and I have a team of people working with me, but we have been falling short of hands, and so I decided to get more involved in the development, and things were going great until last week when I started trying to refactor our codebase. I hit many walls with things I did not fully deeply understand, and struggling to keep track of a lot of different changes as I was making them - thus ending up breaking things and compounding my frustration even more.

I am currently strongly motivated to get better at coding. That is what prompted me to talk to my friend, who is the best engineer I know, and who encouraged me to write down my thoughts and publish them.

I am certain that with persistence and consistency, I would get through and not struggle as much as I have in the past week.

___

Coding is actually hard

I was 15 years old, inspired by Zuckerberg and Jobs, brimming with ideas for companies I wanted to build when I grew older. My strategy was simple, find great engineers and work with them to build great companies. I was supposed to be Steve Jobs, just waiting to meet his Steve Wozniak.

I was the "ideas guy", unironically, but one day, when sharing this brilliant strategy of mine casually with a friend, he asked me

Friend : "why not do it yourself?"

Me - "what do you mean?"

Friend : "why not write the code and build the ideas yourself?"

I didn't have any good reason why, and it made me suddenly feel very embarrassed and dumb. It made me pause and rethink about my life -

"why not build it myself? Why not learn to code? Why can I not learn this thing that so many other people have learnt? I am smart enough, right? I should be able to teach myself how to code. All the information is already available online, for free. I can do it. This would be easy for me!"

And so my journey began to learn to code, all by myself, through the internet.

At first, I started with a few simple resources like W3Schools, learing the basics of HTML. I built basic websites and blogs on Google Sites, Weebly, WordPress, Blogger etc. But that was not sufficient.

At 17, after finishing highschool, I took a gap year and started with Codecademy. I went through all the tracks, from basic HTML (again) to JavaScript and even Ruby amd Python. And I was super proud of myself for doing just that. I then started this 2-day python crash course published by a Google Engineer, then stumbled through many more resources, blogs, just watching their courses and learning within their sandbox environments without actually building anything on my system. I then discovered freeCodeCamp by Quincy Larson, and jumped right into it. I also started CS50 at the same time and had challenged myself to finish the 12 week course within 4 weeks.

I wanted to learn everything. I wanted to master everything. I wanted to prove to myself that I was smart, that all the adults in my life who told me I was "dumb and stupid" because I couldn't excell at school were wrong. I was not dumb, I was not an idiot, I could do it.

And that was when reality slapped me really hard for the first time on my face.

I was done with all the hand-holding exercises, I was done with all the reading material, docs, course videos. I understood a lot, I felt like I was a master already, and then I had to actually sit down and write code, on my system. I had to open the blank editor and write stuff in it and make it run and work. I had to actually solve the weekly pset challenges from CS50, and I just couldn't. Forget about finishing the entire course in 4 weeks, I was stuck on just one single problem for more than 2 weeks.

I couldn't do it. My mind was blank, I had no idea where to begin, what to write, how to actually code. I felt dumb. I felt stupid. I wanted to give up. I felt that I couldn't do this, that I was a fraud, I couldn't actually learn this stuff. I was fooling myself into thinking I was capable of going through this and making it to the other side. I expected everything to be easy for me, I expected my mind to sail smoothly across, but it did not. It crashed, it hit walls and it broke down.

I decided to take some time for myself, reflected, questioned if I really want to continue doing this. I was ashamed. Embarrassed. I couldn't accept it, I had to get through somehow. I couldn't just give up. How can this be the end of my journey?

And so, I persisted, and persisted, and kept fighting through what seemed like an endless barrage of walls and problems that I kept hitting against, getting stuck, feeling lost, feeling stupid, feeling like I could never figure this shit out. And somehow I made it through to the other side, I finished my first ever website, my first project, I finished the pset, I made it through.

That's when I decided that I didn't need to go to college. I could just teach myself, for free, through all these online resources.

But it never stopped being difficult. I would keep progressing, I would keep learning and growing, but this entire experience of hitting walls and feeling lost, feeling dumb and stupid, feeling like it's too hard for me to even grasp and figure out, just kept coming back to me.

Even after going through that experience multiple times, I still continue to live inside this bubble - I expect it to be easy for me, I expect it to be smooth sailing, just rapidly coding and building things without hitting walls, and every single time, I hit those walls, and fall back down to feeling like shit.

Personally for me, over time, this has psychologically made me want to avoid coding as much as possible. I don't like feeling dumb. It really triggers the insecurities inside me, it makes me think all those adults from my childhood were right about me - that I am stupid. It makes me feel like an imposter, a fraud who pretends to be smart but is actually very dumb. And people are gonna see it, they will catch me, and this whole charade will collapse.

It's been 10 years since I first started learning how to code. And I still struggle with it, a lot. I am not consistent. Honestly, it makes me feel very anxious to even think about coding, just from the anticipation of "what if I can't figure it out? What if I can't make it work? What if everyone around me thinks that I am dumb and stupid?"

I am writing this blog post today because I have been struggling for the past week. I have been working on something, and I was expecting it to be very easy, smooth sailing for me. On the high level, it's all very simple stuff. It's just refactoring the codebase a bit, reorganizing it, making it cleaner and more structured, and it's supposed to be easy.

And yet, every single day, I have felt frustrated, annoyed with myself and the problem I am trying to solve, mentally exhausted, stupid, dumb, feeling as if my brain is just incapable of grasping these simple concepts, keeping these simple details in mind.

I forget how something was setup in some section of some file, and write code in another file and it just breaks the entire logic. I feel frustrated that I cannot upload and maintain the entire logical map of even this very small and simple codebase in my mind.

I think of a solution to a problem, go into it with the assumption that I know everything already on how to do it, and suddenly realize that I do not, in fact, know anything about it.

I go back to the basics, again and again and again.

I relearn simple concepts, again and again and again.

I feel dumb and stupid. I feel like giving up.

I make very little progress, make something work, but then discover another thing is not working anymore properly. I have broken what was already working. I feel annoyed and frustrated, and just leave the code as it is, and not even touch it for the entire day.

I come back to it the next day, and suddenly I see things a bit more clearly. I keep working, keep hacking at it, keep chipping away at the problems, the bugs, and I find myself again breaking things, the code not working, simple things that were functional breaking apart, and I get angry and frustrated at myself and give up again for the day.

Going though this every day, makes me wonder - am I really meant for this? Is my brain actually capable for this type of thing? should I just find other people to work on it, people who are much more smarter and patient and disciplined than me? should I give up?

I really want to give up. But then, I ask myself, is this it? Is this really the end of my journey? How can I leave something in the middle of working on it? How can I stop at things not working? I need to finish this, no matter how hard it appears.

And I keep chipping away, keep fighting against this endless barrage of walls and problems, with the childlike hope that I will somehow make it to the other side.

Maybe some day it will get easier, or maybe this is what it's always going to be like.

The only question I ask myself is, what is the alternative? If not this, then what? And honestly, I have no good answers. As frustrating as coding can be, I am still in love with it. I love to see my code work, I love it when people can use it, play with it. I love building things, solving problems. I love making progress through difficult challenges.

Coding is actually hard, but you can make it through. Just keep chipping away at the problem, one bug at a time.

You can do it.