[HN Gopher] Coding Is Hard
       ___________________________________________________________________
        
       Coding Is Hard
        
       Author : duttakapil
       Score  : 52 points
       Date   : 2023-11-18 18:15 UTC (4 hours ago)
        
 (HTM) web link (duttakapil.com)
 (TXT) w3m dump (duttakapil.com)
        
       | duttakapil wrote:
       | Have 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 wrote:
         | I 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 wrote:
         | Yo 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 wrote:
         | Frustration 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 wrote:
         | Thanks 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 wrote:
         | It'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.)
        
       | chiefalchemist wrote:
       | > 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.
        
       | hyperhello wrote:
       | I 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.
        
       | morningsam wrote:
       | >It's just refactoring the codebase a bit, reorganizing it,
       | making it cleaner and more structured
       | 
       | Famous last words.
        
         | mpol wrote:
         | Once 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.
        
       | dehrmann wrote:
       | > 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.
        
         | Kamq wrote:
         | I'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.
        
           | codebolt wrote:
           | I taught myself to code in high school and then did the 5
           | year CS degree at university. School taught me a lot of
           | interesting stuff that I probably would've never picked up on
           | my own, and gave me a much more grounded perspective on the
           | entire field. But very little that was directly relevant for
           | enteprise programming (which I've been doing professionally
           | for over a decade by now).
        
         | al_borland wrote:
         | As I was reading through it, it sounded like he didn't have an
         | actual idea of what to build. I'd expect an 'idea guy' would
         | learn just enough to get going and start building whatever the
         | idea was, and use the project as a means to guide him to
         | whatever he needed to learn next. I find this to be the most
         | effective way to learn, as all the learning gets applied right
         | away, outside of the context of a very controlled problem given
         | by the teacher.
         | 
         | The idea that he was jumping from course to course, across a
         | bunch of different languages made it seem like he valued having
         | the identity as someone who built something, but didn't know
         | what to build. The gap year suggests that as well. I've been in
         | the same boat and the only thing that moved me forward was
         | having a project to work on that I cared about. In my case, I
         | had a normal job with some down time, and learned to code to
         | make that job easier... no courses, just reading the docs and
         | trying to solve the problem right in front of me. I actually
         | had programming classes in college before this, and while I
         | passed without issue, I never felt I learned how to code or
         | built by own stuff, and years passed between that course and
         | when I felt I actually learned. Having a problem, breaking it
         | down, and building a solution, one small bit at a time, was
         | required to go from knowing some basic ideas of syntax to
         | knowing how to solve a problem with code.
        
         | yuktrn wrote:
         | I still struggle after 15 years into programming, and I never
         | published or finished anything because of "judgement anxiety".
         | I waste days, weeks, months writing and rewriting code and then
         | I decide to abandon it because "other developers are going to
         | see how shitty of a developer I am and it'll jeopardize my
         | reputation forever".
        
         | rainonmoon wrote:
         | Yeah, I don't think this guy's problem is that coding is hard,
         | I think he finds _learning_ hard. At this point I think a
         | better understanding of pedagogy would help advance his coding
         | more than anything.
        
           | kmoser wrote:
           | He makes it pretty clear that his frustration was due to the
           | overall brittle nature of code (change the wrong thing and
           | the whole system breaks), not simply the learning process.
           | 
           | Unfortunately brittleness is baked into virtually very
           | computer system and development process: it's all essentially
           | predicated on a series of finicky text files (source code,
           | config files, etc.), none of which have any inherent,
           | enforced relationship to each other except when seen through
           | the lens of an IDE, compiler or interpreter. The system as a
           | whole doesn't enforce meaningful constraints, and when it
           | does you often have nothing more to go on than a cryptic
           | error message.
           | 
           | Unfortunately that has been the nature of software
           | development for the past 70+ years. Some developers are
           | creative, willing, and talented enough to deal with this
           | realm. But it's not for everybody.
        
       | malux85 wrote:
       | Becoming 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 wrote:
       | In 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 wrote:
         | And 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.
        
       | hprotagonist wrote:
       | 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.
        
       | famahar wrote:
       | I 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 wrote:
         | When 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...
        
       | Manfred wrote:
       | One 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 wrote:
         | teach them about memory first
        
         | david-gpu wrote:
         | A 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 wrote:
           | That 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 wrote:
             | As 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.
        
         | dkjaudyeqooe wrote:
         | Did they not learn about variables in math class?
         | 
         | That's where I learned before I ever saw any code. When I did
         | see the code I was confused by "x = x + 1" since it makes no
         | sense mathematically, but assignment and state were obvious and
         | intuitive after that.
        
       | davedx wrote:
       | Now try learning to code in C with a single book and no Internet,
       | like I did.
       | 
       | Kids these days
       | 
       | :P
        
         | dkjaudyeqooe wrote:
         | Luxury! I didn't have the benefit of a computer when I learned
         | to program.
        
           | narinxas wrote:
           | one man's luxury...
           | 
           | how did you learn to program computers without computers
           | around?
        
             | dkjaudyeqooe wrote:
             | I 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.
        
         | amne wrote:
         | I was blessed with a bunch of CHM files. I knew by heart how to
         | browse that style of documentation. I still to this day prefer
         | reference style to tutorial or by example.
        
       | yura wrote:
       | In 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 wrote:
         | The 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.
        
           | airstrike wrote:
           | I don't think writing bubble sort from scratch without
           | mistakes is necessarily a good demonstration of someone's
           | ability to "handle the basics"
           | 
           | Realistically you will never need to write it yourself unless
           | you're coding in some very specific domains
           | 
           | It's at most a signal for whether or not they remember
           | algorithms 101 or some leetcode exercise, but knowing that
           | they do remember isn't really useful to me
        
             | strangesmells06 wrote:
             | it's not even the most efficient search. I don't think any
             | sort method in a language would use a bubble.
        
               | jdefr89 wrote:
               | I agree it isn't but the point I was trying to make is
               | that when you have to do something from scratch, on your
               | own, even if it's simple, it can be a challenge. My
               | example was poor because I am typing fast sitting in a
               | car parking lot and I hate typing my thoughts on phones..
               | Forgive me..
        
             | Jensson wrote:
             | > It's at most a signal for whether or not they remember
             | algorithms 101 or some leetcode exercise, but knowing that
             | they do remember isn't really useful to me
             | 
             | For bubble sort? Do you really think anyone should have to
             | remember an algorithm to write a quadratic time sort? All
             | you have to do is "compare and swap" and loop through until
             | you are done, this is way easier than Fizzbuzz.
             | 
             | This is only hard if you have a hard time grasping loops,
             | conditional comparisons or swaps. But if you understand all
             | of those the sort writes itself. And understanding loops,
             | comparisons and swaps is pretty fundamental to anything you
             | do as a software engineer, so I'm not sure how any
             | competent software engineer could struggle with it.
        
               | just_boost_it wrote:
               | Every technical thing you know is informed by your
               | practice in an area. There's a lot of roles where you
               | don't even have to think about which algorithm is
               | implemented behind your favorite sort method. If you work
               | in a role like that for 10 years, bubble sort becomes
               | "which one was that again"?
               | 
               | Engineering is about solving valuable problems. Solving
               | some of those problems requires obsessive control over
               | (and selection of) specific sorting algorithms, many do
               | not.
               | 
               | Edit: it's also worth bearing in mind that many of the
               | people who discovered these algorithms are famous in part
               | for having thought them up. If data structures and
               | algorithms were so obvious, nobody would know who many of
               | these people were.
        
               | kaashif wrote:
               | > All you have to do is "compare and swap" and loop
               | through until you are done, this is way easier than
               | Fizzbuzz.
               | 
               | I think you have this wrong, Fizzbuzz is actually
               | completely trivial to the point where the problem
               | statement is almost literally (modulo modulo) a
               | description of the algorithm.
               | 
               | Bubble sort is very easy but it's not literally trivial
               | to the same degree as Fizzbuzz!
        
           | patrick451 wrote:
           | This seems like an uninteresting test. Nobody (almost) is
           | implementing sorting algorithms in their day job. We use
           | libraries. It's like asking people who claim to not struggle
           | with driving basics to change their spark plugs and saying
           | "aha, I new you were an idiot".
        
             | jdefr89 wrote:
             | Yes but it is basic in the sense that it's one of the first
             | couple algorithms/data structs mostly everyone has been
             | exposed to. Many knowing what they are and the general
             | principle of how and why they work. That is exactly my
             | point though.. Like what do we consider "basic" exactly?
             | That line becomes blurry in any complex field...
        
             | josephg wrote:
             | It seems pretty indicative to me. Bubble sort is a simple
             | idea that I understand conceptually but haven't written the
             | code for yet. That summarises most of my job. And yet, 30
             | years in, I still make stupid mistakes all the time.
             | 
             | I think the difference between professional engineers and
             | person writing the blog isn't necessarily skill. I think
             | it's how we react when we make mistakes. Maybe the real
             | test of a programmer is watching how calmly they can write
             | their buggy bubble sort, then test it and fix the bugs.
             | Bugs happen. How we roll with the punches is what makes
             | some people great.
        
         | germandiago wrote:
         | I have been giving advice to a person, young also (16 years
         | old) and he thinks he can go very far very quickly.
         | 
         | I told him to be patient, to insist, to commit time learning
         | not only typical courses of how to code your website with a
         | database. In fact I gave him advice against doing that first.
         | 
         | I adviced him to learn binary/hex, algorithms, data structures
         | and structured programming as a minimum. Also how a machine
         | works (at least the abstract model): memory addresses, data,
         | pc.n, call stack... etc. Interpeters vs compilers, some OS
         | basics (though at first can skip most of this). My advice has
         | been to first learn with Python and later C.
         | 
         | Understand why or when to use functions, certain data
         | structures, etc. Do increasingly difficult _but basic_
         | exercises.
         | 
         | And specifically, develop a sense and taste, at the end, on how
         | to figure out how to code a solution to a problem he never saw.
         | Cost analysis also helps lots and must be learnt at some point.
         | 
         | This is what happens when you gothrough random courses,
         | exactly:
         | 
         | > 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.
         | 
         | That is SO true. You have to start from scratch. I mean it.
         | Because when you see something like s stacktrace that goes from
         | Python to your native library with memory addresses you will
         | understand NOTHING when the time comes.
         | 
         | Programming is a discipline where you need a lot of practice.
        
         | bstar77 wrote:
         | I've been thinking about this a bit lately and I think it's
         | actually less about fundamentals and more of an issue with
         | process. I'm not saying that fundamentals are not essential,
         | but we often don't have the time to learn all aspects of a
         | complex system.
         | 
         | There is definitely a lot of overlap here, but I have a finite
         | amount of time that I can put towards solving problems. I've
         | been thrown into AI over the past 6 months and know none of the
         | fundamentals of this space, but I can still be very productive.
         | 
         | My process now is to know how to pull up docs quickly (in my
         | editor), take advantage of the LSP, use my debugger and learn
         | the systems on the fly. I'm probably not going to take courses
         | in AI, Data Science and other aspects of this discipline as it
         | will only have a marginal affect on my daily activities.
         | 
         | My job is to understand the flow of data, so I need to focus on
         | that and make sure my process, tooling and access to
         | documentation are the best possible to accomplish that.
        
       | nuancebydefault wrote:
       | I 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 wrote:
         | i 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 wrote:
           | > 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.
        
       | AussieWog93 wrote:
       | If 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 wrote:
         | He 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 wrote:
           | > 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 wrote:
         | That'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.
        
       | Garvi wrote:
       | The 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 wrote:
       | I 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_ wrote:
       | Learn 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 wrote:
       | Coding 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 wrote:
         | I 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 wrote:
           | Absolutely. 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.
        
       | pedrosorio wrote:
       | > 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 wrote:
       | 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.
        
       | akaike wrote:
       | I 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 wrote:
       | I'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.
        
       | aydoubleyou wrote:
       | I 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 wrote:
       | Get 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.
        
       | coldblues wrote:
       | I 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 wrote:
         | It'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_ wrote:
           | That'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.
        
       | dimal wrote:
       | > 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.
        
       | dasil003 wrote:
       | It'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 wrote:
       | There'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 wrote:
       | People 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/
        
       | chris_wot wrote:
       | I 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 wrote:
       | Sounds 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.
        
       ___________________________________________________________________
       (page generated 2023-11-18 23:01 UTC)