15 ms·
Coding Is Hard
- axilmar 3y agoCoding is hard because most APIs suck. Most APIs a) contain many leaky abstractions. b) are unnecessarily complex in order to adhere to a specific ideology. c) have various gotchas, either documented or undocumented. d) the basic concepts behind them make sense only to the authors. e) do not contain any abstractions at all, exposing all raw technical details to the user. f) many details about their parameters are not documented at all. g) have undisclosed side effects. h) not implemented in the same way in different platforms. etc. With all these and many more, a newcomer to coding can feel lost for many years.
- duttakapil 3y agoHave been feeling very frustrated this past week working on something. Started wondering if I am dumb or is this actually hard. Decided to write a simple quick blog post on it -
- chrisbrandow 3y agoI am certain you are not dumb, but personally I find that there are many things that I learn much faster when taught by other people.
- dieselgate 3y agoYo OP cool you commented here! At the very least I think your website is pretty good - and I like the prism logo. Being able to write up a post and have it get international eyes (via HN) is more than many people ever try to accomplish. I often think of coding like making music: you don't need to be an expert at an instrument to make nice music - so much to the point where "making music" and "playing an instrument" can be considered very different things.
- mpol 3y agoFrustration is something I can feel as well when I am stuck. It is not a productive emotional state. It means to feel stuck, and maybe I was even stuck before I began. Sometimes I just need to take a step back and look at it the next day. Sometimes it helps, sometimes not. Sometimes taking a walk helps, or cycling, or taking a shower. But when I feel frustrated, I know it's an uphill battle that will be mostly unproductive, mostly productive in getting a look at it, some reconnaisance.
- zmmmmm 3y agoThanks for writing something like this. I've come to feel that while I love reading HN, it's quite toxic as well. It's like the instagram of coding - every person is so smart, so authoritative, such breadth and depth of knowledge they are all making $300k/yr+ and profess how easy it is to find such a job. It can be really demoralising and even depressing for people who are struggling to be exposed to such potent concentration of things like that. So it's great to hear someone being vulnerable and owning up to struggles. I would say, my approach when I hit the types of feelings you express is always to drop down a layer to fundamentals. If X is hard, why is that? It probably means your knowledge isn't sound at some layer below the one you are working at. It sounds like a huge amount of your learning approach has been based on online learning and the issue with these is that they are usually very shallow. They teach you a direct skill but nothing underneath it. So drop down a level and just take time, to properly fill in those gaps. Steadily unravel what is going on one level down. Don't keep battering at the level above constantly getting frustrated. Build your knowledge at the level below. Learn the joy of patiently establishing a sound basis and a complete knowledge of the underlying principles on which something works.
- sanitycheck 3y agoIt's hard. The hardest part is the big gap between "I can write a function that does X" and "I can write non-trivial software that does Y". That's where you're hitting walls - because there are a ton of them, and it is demoralising to try something that "should" be simple but end up spending numerous days and weeks fighting problems you didn't even realise existed. Even experienced programmers have this issue. It's why a lot of us seem to think estimation is basically impossible. IMO it certainly is possible to estimate fairly accurately, but it requires a very good understanding of the problem, the technology, and the people involved. First try to limit your problem space, only one or two new things to learn at a time. Use only mainstream ("boring") technology. Then spend a few hours every day banging your head against those problems. (Every day, not every weekend. A few hours, not 12 hours.) If you can, set goals you can achieve every week or two to keep morale up - small projects, proofs-of-concept, etc. (I've been doing this for 20+ years, and if I'm working on stuff I'm comfortable with I'm pretty good. If I compare myself to people like John Carmack or Fabrice Bellard I discover am comparatively very very dumb indeed.)
- xet7 3y agoThanks for writing this. I have added and removed about 4 million lines of code: https://github.com/wekan/wekan/graphs/contributors https://github.com/wekan/wekan/graphs/contributors to WeKan Open Source kanban: https://wekan.github.io https://wekan.github.io You are not dumb. It is normal to feel frustrated, when figuring out, step by step, how something works, and what to do. It is like labyrinth. Having enough breaks, taking a walk when needed, having enough coping skills or adding more of them, having patience to keep notes of what is current position in that labyrinth. If some way does not work, try some other way. Getting something working is victory feeling. It is always about the basics. Many programming languages change syntax often. Some dependencies change. For example, when writing some for database export: 1) There was no working code examples at documentation 2) Google etc searches had old info, did not work 3) I did not find from source code how it did work 4) ChatGPT, Bing AI etc examples did not work 5) So I tried with trial and error, what is correct syntax, character by character For some error messages, sometimes Google search shows somebody having same problem, or even a fix. But if not, it's about reading source code of the software. But this works only when code is available, like in Open Source. If something is binary executeable, then there is need to decompile, read assembler, deobfuscate, etc. That means even more time required, I have not gone there yet. That is why I use and develop FOSS, when it is possible to more easily fix something, when it is broken.
- chiefalchemist 3y ago> It's just refactoring the codebase a bit, reorganizing it, making it cleaner and more structured, and it's supposed to be easy. Why is that supposed to be easy? When things start to sprawl, and more and more tech debt gets left behind (i.e., in the codebase) then complexity increases, as do the risk of balloon grabs (i.e., grab in one place and something pops out somewhere else). Of course you're tired and demoralized, every change has to be second or third guessed.
- morningsam 3y ago>It's just refactoring the codebase a bit, reorganizing it, making it cleaner and more structured Famous last words.
- mpol 3y agoOnce I took over a project that needed some SQL updates. Oh, and there was one issue in the issue tracker that needed looking at. How naive I was. If I knew beforehand what it all would entail, I would never have taken over that project. Therefore I do feel lucky that I was so naive, it brought me many good things. Nowadays I easily see the scope of taking over a project and I hesitate a lot more doing that.
- hyperhello 3y agoI believe that stuck feeling, the helpless head banging feeling, is your brain forming new connections and breaking old ones. In other words, learning. That’s where the experience points are. Accept the feeling of being dumb and the reality of being smart, mixed together, and you’re advancing for real.
- x86x87 3y agoThe way I think about it is that the struggle is essential if you want to push yourself to learn new things. Learning is a messy process and it's rarely a linjar affair.
- dehrmann 3y ago> 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. > 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... > It's been 10 years since I first started learning how to code. And I still struggle with it, a lot. > I go back to the basics, again and again and again. There shouldn't be this much struggle after 10 years. I wonder if your issue is you were never intentional in your learning and practice and just bounced from topic to topic. You say you're the "idea guy." There's a saying that it's better to finish something than to start something.
- kirso 3y agoYep. Resonates a lot. I've tinkered with code on the side and realised its very hard to do it "part-time". Learned HTML/CSS in 2012. Built an app in Rails in 2014. Learned basic Javascript in 2018. Delved into React in 2020. Shifted to no-code. Back to Fundamentals in 2023. I think its hard to really be good at it, but depends on the goal. Most people want to be software engineers for the wrong reasons these days. To me it was always a hobby and if I can build some small useful things for people with just front-end and a database its a win. Its not easy though. It never was. It requires commitment and patience as well as regularity beyond tinkering with it 1 time a month.
- Kamq 3y agoI'll agree with this as a self taught person. I'll admit to being a little shaky on the types of programming needed in enterprise projects at the beginning (less of a focus on maintainable code, but probably more of a focus on what the machine is actually doing), as I only knew exactly what I needed to hack together whatever my hobby project was, but after 5 years of a career and working in 9 different languages it's been pretty easy. I mean, occasionally there's something that takes a bit to work into my brain's L1 cache, like the precise semantics of prototypical inheritance in javascript, or call by name in scala, but for the most part, everything's been extremely transferable. A hashmap is still a hashmap in any language.
- 3y ago
- malux85 3y agoBecoming a good coder is like mastering anything, it takes deliberate practice, discipline and time. “I tried to do a 12 week course in 4 weeks” … and failed, fell into a flurry chaos of self doubt and gave up. You are not going to shortcut it, you’re running in circles because you cut too many corners. Take a big breath, focus yourself, divide your tasks into smaller chunks until you can actually solve them, and keep going. There IS NO QUICK FIX.
- gardenhedge 3y agoIn a 6 year period, the blog post author has only worked as a software engineer as part of a team for _one year_. That likely explains why he still finds it hard.
- Gnarly9Regard 3y agoAnd never really seemed to learn how to code. I spent a bit of time in this phase of bouncing between tutorials and different learning approaches. Eventually, I found the one that worked for me. Coding is now the easy part. Designing this is the hard part.
- famahar 3y agoI have a lot of respect for self learners. Don't think I would have learned to code if I didn't feel the financial and academic pressure from learning it in University. I still remember my intro course being so mind numbingly difficult coming from an arts background. Simple if else code block assignment that I could complete in 1 minute now took me a whole weekend to initially do 10 years ago.
- jdefr89 3y agoWhen it comes to programming we are all self learners because no one teaches you how to write the software you might want to write… Getting taught merely means getting exposed to. The real teaching of something happens when you do it on your own… Taught my self to code in 6th grade and was able to drop out of college to work.. Started and sold my own company. I have to say the CS/CE curriculum is severely lacking and in all honesty not many benefit from it. Someone coming out of school with a bachelors doesn’t seem to be able to translate their “learned” skills into real working knowledge. That can only happen when you actually do what you want to do. Grab a bunch of CS and grads and ask them to write a simple FizzBuzz and you will be astonished at how many barely know where to start. It’s quite sad. Ironically I am now a researcher at MIT… I am in academia and didn’t even finish my degree…
- hprotagonist 3y agohttps://imgur.com/gallery/dzbQCj4 https://imgur.com/gallery/dzbQCj4 The only thing that changes with experience is the growing faith that whatever state you’re in now, you’ll be in the other shortly.
- Manfred 3y agoOne of my students in a summer school class about programming just couldn't get their head around what a variable was. These concepts are very hard to teach when you are very familiar with them and they come natural to you.
- zabzonk 3y agoteach them about memory first
- david-gpu 3y agoA variable is a box where you can store a certain type of an object. For example, you can have a box with the right size and shape to store toy cars. At one point the variable (box) may contain a red toy car, and at another point it may contain a blue toy car. If you try to put a banana in there it won't fit because it has the wrong shape for that. We say that the type of the variable (the box) doesn't match the object. The analogy can be extended to talk about null values (empty boxes), arrays (boxes with slots for multiple objects), etc.
- theLiminator 3y agoThat analogy is heavily stretched with dynamically typed languages, you could say that it's a box that can hold anything, but then the value of the analogy falls apart.
- david-gpu 3y agoAs you point out, all it takes to describe dynamically typed languages is describing a variable as a box that can contain an object. It can contain a fish now and a truck later. What is the problem? Assignments, l-values and such work just fine as far as I can tell. The analogy works because it's not far removed from what is actually happening in memory. And while laypeople don't know what computer memory is, they have a good intuition about boxes.
- kmoser 3y agoThe concept of a variable is just the tip of the iceberg: the syntax for dealing with variables (e.g. assignment vs. testing equality) is difficult for newbies to grasp. Next level of difficulty for newbies is arrays: understanding expressions to set and get values in an array; variables that hold indexes; non-numeric indexes; each of these is a potential huge stumbling block for newbies. And remember, these are just basic programming skills. Things get much harder from there. The concepts of data manipulation, let alone the mechanics, are difficult for many newbies. Some never get past that point.
- davedx 3y agoNow try learning to code in C with a single book and no Internet, like I did. Kids these days :P
- dkjaudyeqooe 3y agoLuxury! I didn't have the benefit of a computer when I learned to program.
- narinxas 3y agoone man's luxury... how did you learn to program computers without computers around?
- dkjaudyeqooe 3y agoI kept on re-reading the RSTS/E BASIC PLUS language manual until it made sense. I remember DIM statements being the hardest thing to figure out.
- antod 3y agoI didn't either as a kid. I had one of those British Usborne Publishing computer books - one of their intros involved paper only with a long roll of instructions you wrote out and pulled through a cardboard "window" for the current instruction while you kept track of variables on a sheet of paper. I soon figured out you didn't really need the roll and cardboard window, and could just do the while thing on normal sheets of paper. Got to try it out for real on a borrowed TRS80 not too long after that though.
- dkjaudyeqooe 3y agoYeah the "Trash80" was the first computer I actually used, the display model at the local Tandy Electronics store. It was so very barebones with less than 2K free memory if I recall correctly. Later I found another local electronics store with a C64 which was bliss.
- 3y ago
- yura 3y agoIn my experience it’s not supposed to be that hard, unless you’re working at the cutting edge or on really hard problems. But from what you’ve written it seems like you’re struggling with basic stuff. Maybe you’re still lacking fundamentals? Seems like your strategy so far has been to grind tutorials and crash courses. They will make you feel like you’re learning a lot in a short time but in the end you’ll still not know what you’re doing, and you’ll keep struggling when facing new problems that are outside of the scope of the tutorial. Maybe you’re learning from low-quality resources? Yes, the internet is full of free resources but most of them are useless and actually harmful, and some curation is needed. Instead of studying the basics over and over from endless free online tutorial/courses, just learn them once, the right way, from a high-quality resource instead. See: teachyourselfcs.com
- jdefr89 3y agoThe author says he struggled with concepts that are “easy” or supposed to be. In my experience of coding since 6th grade and having been in the industry for quite some time, it’s difficult to say something is supposed to be “easy” or “hard”. The author doesn’t give many concrete examples so it’s possible he is just assuming certain things should be super easy… A lot of programmers I meet love to claim they don’t struggle with basics, then I ask them to write be a simple bubble sort or binary search from scratch and 90% cannot do it. They could only do it when they could reference or look it up. Everything thing seems “easy” after you learn it. There’s this romanticized super genius idea everyone thinks they need to live up to but that portrayal is simply fake. No one’s grasps things instantly.. I am a researcher at MIT. I work with arguably some of “smartest” people on the planet, and even they struggle with basic concepts from time to time, as does everyone. There is simply too much information for any single human to know it all, and learn new things instantly. It doesn’t happen…. Most things that should be “simple” or “easy” always end up requiring significant effort because we don’t truly know how to do something until it’s actually down. Forgive my spelling and grammar errors. I am typing on a phone and my hands are just too big to do it quickly.
- rustybolt 3y ago> I work with arguably some of “smartest” people on the planet, and even they struggle with basic concepts from time to time, as does everyone. There is simply too much information for any single human to know it all, and learn new things instantly. This. Many programmers, for some reason, act like skill is a complete order; you are either more skilled or less skilled than someone else. In practice you are just familiar with different things, so if somebody doesn't know something that feels trivial to you, it just means he didn't encounter it in the same way.
- deleted 3y ago[deleted]
- nuancebydefault 3y agoI find the story relating, though in a somewhat less dramatic sense. Even after 20+ years of coding, there are very little moments of feeling on top and fully in control. The other end -- feelings of "damn I don't get it, why won't it work" and the feeling of being overwhelmed by a big mess -- is quite more frequent. The weird thing is that thinking "I'm no good at this" is an easy trap to fall into. Sometimes I feel software engineering must be one of the hardest jobs in terms of mental flexibility, constantly trying to figure things out and adapting to new frameworks and ever evolving ways of working. But most probably there are plenty of other jobs with the same kind of complexities.
- convolvatron 3y agoi feel very sad that this is a thing. in programming you should always have a feeling of absolute agency. there is no pile of crap deep enough you cant peek under. no bug you shouldn't be able to find, given enough time. the problem should be that maybe it doesn't make sense to so do in a given context, not that you couldn't choose to do that.
- dmoy 3y ago> there is no pile of crap deep enough you cant peek under. no bug you shouldn't be able to find, I mean, yea, technically? But when the codebase gets very big, it can become intractable to chase every issue down. > given enough time. Okay sure. One often isn't given enough time though, if it's for a job.
- x86x87 3y agoThat's the trick. You should not chase every issue down. You should prioritize, but give one issue you should be able to chase it down and get to the bottom of it. So it's not about actually taking om the task of solving every issue, it's about the capability of solving any issue you deem worth solving.
- dmoy 3y ago
- AussieWog93 3y agoIf you're still bad at coding after 10 years, give up. There are dozens of other things you might be great at, and every minute you're spent flogging the dead horse of becoming a coding genius, you're missing out on the opportunity to practice something you're really talented at.
- jdefr89 3y agoHe probably isn’t that bad. He just has imposter syndrome most likely… He is assuming people sit down and write things like web browsers in a single, linear sitting. You don’t write any nontrivial software easily if you’re doing something new. The decisions you need to make when developing real software or systems are numerous. Having been in the industry for a very long time and having worked with arguably some of the smartest people in the world, no one lives up the the romanticized “super cider genius” that solves all problems effortlessly in their first go. I am currently a researcher at MIT. I work with some of the most brilliant people out there and you’d be surprised what “simple” things or concepts they struggle with… Everything is simple when you know the answer, but try devising the answer to a truly original problem that hasn’t been breached yet and see how far you get. Even simple sorting algorithms, and basic data structures, were the product of research that took a long time. People didn’t just sit down one night and invent the quick sort in one go….
- yakshaving_jgt 3y ago> He is assuming people sit down and write things like web browsers in a single, linear sitting I can't imagine how someone with 10 years of programming experience would make this assumption.
- morningsam 3y agoThat's making three assumptions: 1) That everyone has something they're really talented at, 2) that they'd want to do that thing if they found out what is is, and 3) that the time, money and effort to do so would pay off compared to having remained an average developer. Personally, I'm not a great developer, but I was even worse at all of the other things I put a lot of time and effort into. And at the end of the day I do enjoy programming. So remaining an average developer it is.
- astura 3y ago[flagged]
- Garvi 3y agoThe method that worked for me was working on actual projects. Build something useful for yourself. And just search the web and ask chatbots and keep hammering on it until it's done, one problem at a time. Maybe forgetting the bigger picture and focusing on small bite sized problems would work for you too. And when you're done, start working on your next project and you will notice you can reuse some of the knowledge you already have. Make sure every new project challenges you.
- djaouen 3y agoI don’t mean to be insulting, but have you considered the possibility that you are too stupid to learn programming? For example, I could never be a doctor because I myself am too stupid at chemistry. Sometimes it’s better to take the path of least resistance. :)
- _istanbul_ 3y agoLearn the fundamentals and keep them surfaced, either through explicit spaced repetition or something that approximates it, such as writing, reading or trying to (re)implement them. Then build up on that. Just don't do more than what you can handle at a time. The goal is to reference at least 80% of the necessary from memory.
- swatcoder 3y agoCoding is hard exactly the way painting is hard or sculpting is hard or playing guitar is hard or writing is hard. It is but it's not. You need to put real effort in to learn, some less if you're naturally inclined to it, and many reach a point where they crest ahill and it really isn't that hard at all anymore. If you're chasing after it as a career and coding feels persistently hard and unnatural, you might be aiming for a career not really suited to you. On the other hand, if you think making software is cool and you're just quite finding it easy all the time, keep grinding and you may get there. At least in this latter case, you'll be grinding on something you care about as you try to get there. If it's just about money (be honest with yourself), that can be found in a lot of places and some of them might come a lot more easily to you.
- lytefm 3y agoI have the impression that some people can be software developers for 10 years or longer but they still don't "get it" while some junior devs are really great right from the start. These Seniors might be good at duct taping, overengineering or have a "my way or the highway" mindset but aren't capable of finding and implementing a good solution given the constraints. It probably boils down to factors like intelligence, creative problem solving, ability to focus, reading skills, knowledge retention and a healthy dose of humility. I guess everyone can (and probably should) learn basic coding skills, but it doesn't mean everyone can become a great software engineer.
- swatcoder 3y agoAbsolutely. Some people just find learning itself hard too. It's a whole other skill that's orthogonal and similarly trainable. To keep making progress at making more things feel easy, you need to remain curious and ambitious. Many don't internalize that and just plateau when pressure lets up enough.
- ted_bunny 3y agoI object to bringing intelligence into the equation. It never explains anything that other factors couldn't. And it trains people to think they have innate limitations, which is a poor mindset for learning.
- pedrosorio 3y ago> 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. These two consecutive paragraphs seem contradictory.
- duttakapil 3y agoContext 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.
- akaike 3y agoI think the author is being a little too harsh on himself. It’s totally okay to struggle or feel like you can’t solve something right away. There’s no need to be so hard on yourself. The most important thing is that you have fun with what you do :) You don’t need to be the best for everyone, just be the best for yourself and enjoy it!
- scottLobster 3y agoI've been coding since I was 15, am now an industry professional with 7 years software development experience. I just spent close to 15 hours debugging a really simple HTML/CSS issue. Why? Because I've never touched HTML/CSS before beyond some CS 101 labs. I'm sure an experienced web dev could have fixed it in 10 minutes. In my experience programming is less having it all in your head and more where and how to look things up. Because pretty much no one has it all in their head, and the ones that do are hyper-specialized workaholics and would be just as slow as anyone outside of that specialty.
- _lvbh 3y ago> In my experience programming is less having it all in your head and more where and how to look things up. This! I was helping teach web dev to a first year student in uni: I realized that for some beginners, knowing what to search is just as important as being able to code. Having been programming for 5 years (not much but I do dedicate pretty much all my time to it), I feel like the secret sauce is being able to type in the magic words and be able to get the result you’re looking for immediately as the top results. That and being able to read the source code of libraries & lower level code to understand behavior.
- aydoubleyou 3y agoI feel like I could've wrote this myself. I've been dabbling with programming for about 20 years. Much of that time though I was managing other programmers and doing very little programming myself. I was also working on unchallenging (but profitable) projects for far too long. Only in the last few years have I felt like I've had breakthroughs and actually begun to feel confident. I attribute this to the fact that I've decided to do the work myself and take on more challenging work. However, most importantly, I've removed distractions from my life. The initial and intermediate learning curves of programming are certainly hard and I don't think it's possible to have any breakthroughs if you are not in a good place in your life. For me, it was the people I had chosen to surround myself with whom I realized were not supportive of me or my goals. Once I fixed that, I had more time and energy to focus on becoming good at programming. I still don't think I am "good" at it but I am certainly improving now. Don't give up, OP. I certainly never will.
- wavemode 3y agoGet a 1-on-1 mentor/tutor. It's possible the things you're trying to do are just too difficult, but you are incorrectly assuming that they are easy and that everyone can do them. (This is especially common in game development - someone wants to create a 3D open-world MMO, not realizing that such projects typically take years to develop, even for teams of dozens or hundreds of engineers and artists.) It's possible there's some fundamentals of programming that you never properly mastered. People sometimes go through multiple programming courses, but still have a shaky understanding of how basic control flow works, then wonder why they are struggling in their higher level courses. It's possible you have some other weakness without realizing it, like (for example) trying to code from memory rather than regularly referencing the documentation (some people have this weird notion that you're supposed to memorize what every function does, when that actually couldn't be further from the truth). Without working with you directly, it's hard for me to say what the exact problem is. You should have someone sit down with you and help you identify what's causing you to struggle.
- justin_oaks 3y agoAbsolutely. There are very few 100% self-taught experts in ANY field. Teachers and mentors are critical in helping you focus your efforts and prevent you from spinning your wheels.
- dimal 3y ago> I was expecting it to be very easy, smooth sailing for me. On the high level, it's all very simnple stuff. It's just refactoring the codebase a bit, reorganizing it, making it cleaner and more structured, and it's supposed to be easy. Sigh. Refactoring is hard. Finding the "right" structure (whatever that means) is hard. Changing the existing code from one structure to another is hard. There is a huge amount of uncertainty and so many ways for it to go wrong. There are an infinite number of ways to change things and you don't really know which change is "best" until you try a lot of them and then look at what you made. Now that I'm 25 years into this, I have a sense of where the dead ends are and how to avoid them, but after 10 years a lot of people don't. And I still go down dead ends sometimes. The key is realizing when you're on a dead end as quickly as possible, then stopping and doubling back. Cut that sunk cost loose. If you go into something with the expectation that it will be easy, you won't have the right mindset to deal with difficulties. When you hit difficulties, you'll strain against them instead of calmly taking a step back and reassessing the situation. The problem isn't being dumb. It's the act of straining itself, which makes you dumb. Most difficulties are caused by not fully understanding the problem being solved, and the "easy" solution turns out to have overlooked some of the essential complexity that needed to be solved, which leads to kludges piled on kludges. Understand first. Then solve. It's important to have a problem solving process. Look at times that you did find a solution. How did you approach it? What was helpful? What wasn't? Refine your process over time, keeping what works and discarding what doesn't. Then trust your process and relax. It's just a website.
- coldblues 3y agoI definitely relate with the author a lot. I have ADHD and getting in the flow of programming feels like a monumental task that makes me feel extremely dumb. I think the issue is that there are too many low-quality programming resources, and the author should have asked for help. You won't have a personal mentor for free, but there are dozens of people in support channels to help you learn, all you have to do is ask. So many people have helped me understand hard to grasp things, and I've been very fortunate to have people around with expertise that can teach me as well. Doing programming these days is brutal. Layers and layers of abstractions and you have no idea what's going on behind the scenes. My ADHD brain requires me to know why I need to do something, and how it happens. The more programming feels like math, where you just have to blindly follow steps, the worse I feel doing it. Thankfully, I've looked into many resources understanding how the hardware works, how memory works, how the CPU works, how the OS works. It's been a necessary foundation to make sense of anything. The bottom up approach was the only thing that kept me sane. People like Casey Muratori teach you how to program the right way.
- MattPalmer1086 3y agoIt's interesting you say that math is blindly following steps. I have the opposite experience, that math is an exploration of concepts and how they relate to each other - much like programming! Blindly following steps, whether in math, programming or anything else, does indeed sound unrewarding.
- _istanbul_ 3y agoThat's exactly my thought. "Blindly" following steps in Math or programming is rewarding only when used to solve bigger problems, to sort of free up working memory.
- dasil003 3y agoIt's hard to make any kind of objective assessment based on a single article this sparse on concrete details as this, but I get strong vibes of a day-dreamer personality. This oscillation between excitement about an idea, and the hard reality and challenge of actually making progress. I have these tendencies at times myself, and my first piece of advice is to bring some structure and accountability to other people into your approach. In my case two things were game changers: studying CS with an actual teacher and classmates, as well as going and getting a professional job. I had done a lot of self-taught stuff as a teenager, but honestly the essence of programming eluded me until 12-18 months into my CS undergrad. A lot of it was just the reps, but the structure of having a dedicated professor and assignments gave me a focus that really helped. I also think it was good to work primarily with backend languages like C, C++, Java and Scheme without the distraction of web and GUI elements that have a world of complexity (often incidental) that distracts from understanding the basics of data structures and algorithms. The next big leap was working on a team in a professional setting. In my case it wasn't even with other programmers, I worked primarily with non-technical stakeholders as the sole web designer and programmer on a design team that primarily did print design (yeah this was a while ago). Even though I didn't have technical mentors in that first job, just the accountability of having to deliver on some projects that multiple people were contributing to taught me a ton about how to do what was necessary to consistently ship. This is the number one thing to improving: you've got to ship and keep shipping. If you get stuck, cut scope and ship something simpler. Just never stop shipping. Finally, a word on motivation. I'm not here to judge anyone's motivations: do whatever works for you. That said, I feel the best motivation for getting good at programming is curiosity about how things work. If you're not innately curious about technical things, the steady stream of compiler errors and bugs will eventually grind you down. Perhaps this is what the title is referring to. Personally I don't think of programming as hard, but that's because the high I get from debugging a thorny issue outweighs the pain of understanding the root cause. Multiple times the author discloses an expectation that something should be easy, and then getting frustrated when it's not. Whatever your motivation, you've got to have some tenacity and grit to put in the work to power through—that's how it will become easier over time, not due to innate intelligence or time spent on tutorials/videos/reading materials.
- josephg 3y agoThere’s a book I can’t recommend highly enough from the 80s(?) written by a tennis coach about teaching tennis. It’s called The Inner Game of Tennis. In it Tim Gallaway, the author says there’s really two games of tennis: the outer game, involving an opponent, a ball, a racquet, scoring, all the rest. And an inner game where the player brings themself to the court and give it their all. The inner game deals with setbacks and losses. He gives a really simple “formula”: Performance = potential - how much you get in your own way. Gallaway says everyone focuses on the outer game. And ignores the inner game. And that inner game is what stops most people from learning tennis. I’ve been reading The inner game of music lately, which was inspired by the inner game of tennis. There was an exercise in the first chapter - which I did and it made me cry. He said to just sit down at my instrument and play anything, while saying out loud all the inner thoughts. I must have talked for about 20 minutes straight - “I’m worried I’ll look like an idiot. That note didn’t sound good. I’m worried my GF will think I’m bad at piano and unlovable. I’m worried that I’m not very good and I won’t get better than I am now.”. It went on and on. I don’t have a problem with the outer game of learning piano. I’m held back by the inner game. When I play I swear half my brain is devoted to generating, and quashing those thoughts. There can’t be many brain cells are left over for actually playing and listening to the piano! > 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’ve been programming for 30 years, and by any external measure I’m really good at it. I’ve been doing it since I was 8 or 9 years old. For some reason I don’t doubt myself in programming like I do in music. Do I have setbacks? Every. Single. Day. Finally my point: We might be no different in our actual programming skill. Yesterday I refactored a simple 10 line for() loop. The new code should have been equivalent but it somehow wasn’t, and it took me 2 hours - even knowing where the bug was - to figure out why. How many of your brain cells are actually devoted to programming, vs generating and quashing all your negative self talk? It’s possible you just need practice, and to go back and watch a Python course for the Nth time. But I suspect your trouble is you’re struggling with the inner game of programming, not the outer game. And you’re only programming with half your brain. Someone once said that the average error rate for a professional programmer is about 1 bug per 10 shipped lines of code. For every 10 lines of code written by professionals, we maybe write 3 bugs and only find 2 of them. If every one of those bugs is evidence that you’re an idiot, programming will crush you. But the thing to learn isn’t how to make programming “smooth”. If you do it right, it will never be smooth. You aren’t making 1 million pizzas. Every program is new and different (else you should just reuse your old code). The thing to learn is how to stop abusing yourself like this when you struggle. As you said, Programming is hard. But you’re doing fine. And read the inner game if you have a chance. If I’m right, that’s where the work is. Not in some Python fundamentals course you’ve already seen 8 other times.
- shmde 3y agoPeople are being too harsh. Deliberate practice and coming out of comfort zone is the key. https://www.joshwcomeau.com/blog/how-to-learn-stuff-quickly/ https://www.joshwcomeau.com/blog/how-to-learn-stuff-quickly/
- chris_wot 3y agoI have a trick for understanding code. What I do is I look at the function, and when there is an if statement or loop, I extract this (and possible some of the surrounding code, depending on what the code does) into a named function. Slowly, the function starts to make sense. Another thing that works for me, is I write a unit test for a function. Personally, I’m beginning to loathe encapsulation in classes, because what would be better would to write a unit test for the extracted function, but if it is a private function - we’ll, that means you can’t easily write a unit test. On that last bit - the only way I know of unit testing private functions is to ensure that a unit test for the public function is writtten. I then place a temporary assert into the private function code path I am exercising and run the unit test. If the test fails because of the assert, then I know I’ve tested that code path. A dreadful way to test, at least that’s how I feel. I am increasingly looking at Haskell which is a revelation! I now know why some people aren’t happy with OOP…
- Gnarly9Regard 3y agoSounds like the author didn't ever really progress beyond the learning stage. When I was starting out, I also tried things like Codecademy and CS50, but wasn't really learning anything from those. University courses provided enough structure and incentive for me to get through all the topics. At first, I agree, it is challenging. My first language was C++ and then we switched to C. It's tough to understand what you're doing wrong at first. Then, over time, you start to get the hang of things and can read the docs and debug your own problems decently enough. Once you start working professionally, coding becomes the easy part. Your days will be filled with design discussions -- trying to figure out how to fit new features into your existing system that was already designed and built without those features in mind. That's the hard part. After you've figured out your new designs, coding is the easy part.
- thowaway91234 3y agoCoding was hard when I was coding for the sake of coding. Turns out after you spend a decade solving problems and creating/maintaining products that “coding” is probably the least difficult part. These days I’m relieved when a task involves just some rote coding rather than racking my brain stuck in a debugging breakpoint for 3 hours to change 5 lines of code to get it to work correctly.
- g42gregory 3y agoWhat personally helped me a lot was going through CMU's Introduction to Computer Systems class [1]. It gave me a series of frameworks on how to reason about bugs in the code and well as bugs in various package installations, etc... It's a mandatory class at CMU for anyone who gets near computers. They have like 2 or 3 versions of it, designed for different departments (with minor differences, in my view). The CMU undergraduate students were benefitting from this class since 1998. Now, usually abridged, versions are being taught at all major CS Departments. There are several free versions of the class available online. Here is a Fall 2017 version, with video lectures [2] [1] https://www.cs.cmu.edu/~213/ https://www.cs.cmu.edu/~213/ [2] http://www.cs.cmu.edu/afs/cs/academic/class/15213-f17/www/schedule.html http://www.cs.cmu.edu/afs/cs/academic/class/15213-f17/www/sc...
- ted_bunny 3y agoThis kind of sounds like my history. Wanted to learn, but had false starts for a decade. Then I found a project I actually wanted to complete, and that got me through the frustration.
- Aaronmacaron 3y agoWhenever I see someone like this on HN – someone whose motivation is to build a large company and make a lot of money, someone who is an "idea guy," someone for whom programming is merely a means to an end – I'm glad I'm not like this. I'm grateful that programming itself is genuinely fun to me, that I don't mind whether what I'm coding is useful or ends up generating money. I'm glad I program because I enjoy it, not because I convinced myself to do it, hoping it would advance my career. At the same time, it saddens me that the thing I love so much becomes a source of frustration for many others.
- david-gpu 3y ago> I don't mind whether what I'm coding is useful or ends up generating money This is a problem most commonly seen in junior developers. It leads to them making poor decisions that are not aligned with business goals. > I'm glad I program because I enjoy it Spend enough time working in the industry and that will go away. For your mental health's sake, I hope you find a hobby that is unrelated to your job. What you are describing is a very common path to burnout. Been there, seen many classmates go through it as well.
- idontknoworcare 3y ago[dead]
- loloquwowndueo 3y agoDunno dude, I’ve been in the industry for almost 3 decades, programming for almost 40 years, and I still enjoy it a lot.
- PaulDavisThe1st 3y agoI've been programming for closing in on 40 years. I got lucky when I was 32 with a position that let me get out of the industry, stay home and raise my daughter while slowly building a libre software project that has been ongoing for almost 24 years, and making a living from that for the last 14 years. An important reason things have worked out as they have is because I continue to enjoy coding and I don't allow what I work on to be controlled by "business goals". While your somewhat cynical take may reflect the experience of an overwhelming majority of the people who write software today, it isn't a description of the only pathway along a life as a programmer.
- jongjong 3y agoI agree that coding is hard. This is coming from someone who's been coding for 15 years straight as my day job plus nights and weekends on open source. I've literally been working during 2/3 of my entire spare time excluding sleep (which is 6 to 7 hours per day).
- m463 3y agoI think coding can be easy and pleasurable. But... You have to start the project yourself. You have to start it with your tools, your language preference, and your ideas. It gets harder when you have to adapt to someone else's environment, practices, requirements. It is harder the further you stray from your ideal choices.
- 0anas0 3y agogot reminded of this video while reading through your blog: https://youtu.be/bkogwxzjwfI?si=9LmyTtB4zWXNLZQK https://youtu.be/bkogwxzjwfI?si=9LmyTtB4zWXNLZQK.
- justin_oaks 3y agoGreat video. The video suggests that people should be prepared to expect anything worthwhile to be seriously difficult, even painful. It's difficult to keep working on something when you thought it would be easy but is actually hard. The author of the original post seems like he thought coding would be easy and now is disillusioned because coding requires more than he expected. To work through programming problems, it really helps to be curious and want to learn why something failed. If you don't understand why, you're clearly just changing things until they work. Programming is seriously punishing to those who try do things without understanding why.
- idontknoworcare 3y ago[dead]
- maerF0x0 3y ago>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. This is a sign of technology with insufficient abstraction. Computation has largely been built on the shoulders of giants with a "You shouldn't need to know" mentality. Think of code in abstract "bits" of information (not necessarily in the data/ram/storage sense)... The more bits of information from seemingly unrelated sources that you must retain, the worse the codebase is. In the worst case editing 1 bit of source code flips 50% of the remaining bits, ie perfect obfuscation. In a perfect code base, changing a bit would flip no other bits (say in other packages), because all of the change would be perfectly contained. There is a pragmatic balance due to timelines, brevity, reaching perfect abstraction might itself be more complex than an "imperfect" implementation, and the sheer ingenuity of it might challenge or exceed some of our IQs (certainly mine).
- amadeuspagel 3y agoOne problem I see here is the desire to learn to code in some abstract sense, to prove something, even to understand CS, rather then starting from a simple project and asking yourself what you absolutely need to learn to do it.
- gmgmgmgmgm 3y agoI'm mostly just riffing off the title but, as a programmer of 45 years I do often find programming hard or programming related things hard Recent experience, trying to get any deep learning to run on my machine. Instructions all over the place about installing python, conda, making a virtual environment, installing certain libraries and when I finally get to the "run" command it doesn't work. Similarly using many new libraries/frameworks, getting stuck on some detail and having to spend 20, 40, 60, 120 minutes trying to find a solution. This happened a lot, and still does, getting up to speed with TypeScript, not knowing how to express the types needed for some complex thing and not knowing how to even ask the question to get an answer. Posting on S.O. will just get closed but I don't necessarily know how to search for the answer. Recently I even tried asking ChatGPT but it failed too. That said, I also understand, that there are many concepts I intuitively know that someone like the OP does not and that it's very hard to remember what it was like to not understand it. Pointers, pass by value, pass by reference, maps, stacks, race conditions, promises, file manipulation, memory, binary, hex, various math and solutions. Getting to the point that all of those things and more are 2nd nature is basically spending time coding for years just like becoming a good guitar player is spending time practicing for years
- pdimitar 3y agoTo OP: if pride is the only thing stopping you from dropping programming then that's a personal character development milestone for you. It does not come easy for many of us to admit that we cannot win all the battles. Been there, can relate, at the same time I'd advise you (over a beer) to shift your perspective towards the limited time you have on this Earth and to pick your battles and fight only those where you feel strong and on your own turf. Super long discussion though, one reserved for your closest circle of relatives and friends. But, if you do decide to keep at programming: 1. Pick a much stricter language, with a strong static typing system -- like Rust. It might be too difficult and frustrating though, and I'd understand if it's a bridge too far. It that's indeed the case then pick Golang, it's a good compromise between productivity and strictness. 2. Write more tests. And I mean much more tests. From your article, you seem to have the problem of rushing too much and never stopping and establishing a solid ground before proceeding. Writing tests guaranteeing that what you wrote before will keep working will keep you in check and help you stop and think harder on how to fix the current problem. I might be misreading your post, but you seem to be impatient. One more thing I completely relate to but it won't ever get you anywhere, sadly. Work hard on breaking down your tasks into smaller chunks and crossing them out as you progress -- works wonders for motivation. Good luck.
- cleandreams 3y agoThe last compiler I wrote needed to be translated to another implementation language. The translator found one bug in it. It was effectively bug free. I am a good coder. I recognize most of these feelings though. Struggling through them is part of my process. I also have lots of ways of working that help me -- I take copious notes for example. Sketch a lot. Talk to others. Staying isolated is a way of staying stuck. Good luck.
- rramadass 3y agoPosts like this are what is really wrong with this world :-) I am going to be contrarian and be harsh on the OP but for his own good. Empty "feel good" responses that i see here are actually toxic positivity at work. Grandiose opinions about oneself, making excuses for one's failures, being unclear about one's goals, not applying oneself seriously to actually studying something, not understanding the difference between true knowledge acquisition vs. posturing for the same, caring more about others opinions of oneself and allowing that to define oneself etc. are the original sins. The answer has always been the age old advice "Apply yourself systematically and work hard". Sit down, quiet yourself and ask "What are you trying to do and achieve?" Narrow it down ruthlessly to something small and specific and then do it.
- zubairq 3y agoYes coding is very hard. Glad to read this honest take on it!
- uwagar 3y agocoding is not hard. coming up with something worth coding is.
- drewcoo 3y agoIf coding is hard, then why is it constantly Devtember? Could we make coding a little harder, please?
- RyanOD 3y agoAs a fellow aspiring developer, let me share a perspective that may be helpful. I've solved a lot of algorithm challenges (LT and CW) over the years but I recently reflected on why they don't seem to be getting easier. What I realized is that while I know how to write code, my understanding of the supporting problem solving strategies is weak. I don't understand the why very well. It's possible you suffer from a similar situation. You jumped straight to the code and skipped over the theory. You know how to use the tools, but have limited training in how to design the house. Consider investing some of your time watching people like Abdul Bari (https://www.youtube.com/@abdul_bari https://www.youtube.com/@abdul_bari). It will help you start to build a better understanding of the "why" of writing code.
- usr1106 3y agoCoding, at least quality coding, is for slow people that are patient enough to study in depth and to get it right eventually. And getting it right can still be incredibly hard. ADHD is certainly not a good starting point. P.S There are certainly a few geniuses who code quickly and well. But they are true exceptions, not enough to run an industry.
- duttakapil 3y agoThis is a very insightful comment actually. I think you are right in many ways. My brain is wired to constantly try going fast. Everything I am able to do, is mostly from short bursts of dopamine rush. If that rush slows down or stops, such as when dealing with frustration of not being able to make something work immediately, my brain starts to shut down - and then it's like trying to swim across dry land. Curiosity and desire for problem solving helps sometimes, when I am in the right headspace, but other times it's simply absent. The work starts feeling dreadful. Need to figure out some ways around this.
- lytefm 3y agoHave you tried out working on multiple projects or tasks at the same time? When I hit a wall, it's often futile to continue working on that single problem. So I'll just leave it as is is for a day and work on something else. When I revisit task one the next day, I often have a fresh approach or I'm able to spot that bug I just couldn't find the previous day. Other devs seem to prefer working very "linearly", but I'm doing better if I juggle several tasks at once.
- duttakapil 3y agoI have been thinking to do exactly this lately. Just keep switching between projects when I hit the walls, keep the momentum going somehow
- karmasimida 3y ago[flagged]
- dorkwood 3y agoIf you're doing CS50 and struggling with the exercises, I think this points to a problem with your study habits. I had the same problem for the first few years of my programming career (and honestly still fall into the same trap from time to time). I'd work my way through entire Codecademy "courses", receive a congratulatory message at the end, and then realize I hadn't actually learnt anything at all. I'd just been following instructions. The key is to keep testing whether you can do the work cold, with no-handholding, at every step of the way. The steps to follow are the same ones they gave us in elementary school when we were learning how to spell: look, cover, write, check. First, look at the information until you feel you understand it, then cover it up and try to replicate it cold, and finally check your work against the original to see where you went wrong. If you can successfully close that loop over and over again, your brain will learn. It has no choice.
- musicale 3y agoIntroductory CS courses (and engineering courses in general) can take a lot of time, especially if you are learning the material for the first time (which many people in the class probably are not!) Many CS courses that I am familiar with (particularly systems courses and programming/project courses) can take something like 20 hours a week rather than the 5-10 that a regular undergraduate course might take. The best approach in my opinion is to not overload yourself when you are taking such a course - either pad your schedule with less time-intensive courses or take fewer units. I'm actually in favor of handholding - particularly getting help from course assistants, attending practice sessions, attending office hours, etc. Individualized instruction can help a lot, and at a university you're paying for it regardless of whether you take advantage of it. Some schools even employ a small army of course helpers and section leaders (often selected from the previous cohort) to provide individualized instruction, and I think it really helps more students to succeed and have fun. Self-study can be much harder than formal study because you may not have people like the course staff to help you out (though it's good if you can find someone!) Also you may not be able to cut back your workload outside of the course. On the up side, you can proceed at your own pace and don't have to worry about being left behind! > CS50 at the same time and had challenged myself to finish the 12 week course within 4 weeks. I'd recommend spending the full 12 weeks. This gives you more time to put in the effort and I think taking more time - and having more nights to sleep on the material - helps with retention.
- deterministic 3y agoCoding has always been easy and fun for me. I taught myself assembler programming when I was 11 on a ZX-Spectrum and have been coding ever since. Professionally (30+ years) and for fun. I know coding is super hard for most people but for some reason it just fits my brain. Perhaps you need the right brain structure to find coding easy? Not sure …
- JonChesterfield 3y agoSoftware is a mixture of engineering, art and mathematics. Everything we build is somewhat broken some of the time and layered on other things that are somewhat broken some of the time, all the way down to the interpreter baked into magic sand which is itself somewhat broken some of the time. So yeah, the field is intellectually demanding. The top level symptom can be "wrong answer" and the root cause "error in someone's verilog from before tapeout". Or "sometimes it's broken in prod" and the answer "solar flare".
- barrysteve 3y agoFeeling dumb is a good emotion. You are hitting your intellectual limits, when you feel dumb. If you didn't 'touch the walls' by feeling dumb, I would wonder how much you're learning.
- satisfice 3y agoI’ve been through this and out the other side. I suspect your real problem is just loneliness. Coding used to be harder for me when I was alone. I have found that doing sessions of coding with colleagues and students— even if they don’t know how to code— seems to make my intelligence come out to play. My mind seems to need an audience to please. I wrote about this in my book on self-education: Secrets of a Buccaneer-Scholar