Ask HN: What was your biggest regret about learning programming?

19 points by acidfreaks ↗ HN
What could you have done better? Or you wish you'd known certain things before?

39 comments

[ 3.4 ms ] story [ 95.3 ms ] thread
Probably wasting so much time trying to make languages work that weren't really necessary. I spent so much time messing with C++ and performance and it was pointless because CPU's went from 4.77 Mhz to 3 Ghz. Also I probably would have just headed straight for a top CS school instead of wasting time teaching myself out in the sticks or learning 20-30 year old tech at whatever local university is nearby. Literally a lot of schools are still in the cold war era when it comes to teaching.
Have your tired the online CS courses?
Yes! One thing they don't tell you about autodidactism is just how slow the process is, without a mentor to help you out.
Strongly agree on the point of "... wasting time on getting languages to work ...".

That time could have been spent on growing ideas and design rather than now let's find out where this segmentation fault is coming from...

Postponing to learn SQL.

This should be done sooner rather than later.

Old dog here. I have the opposite problem: I should have begun sooner with CSS and HTML & JavaScript. NodeJS next.

Also, I should have started with Modafinil sooner to fix my ADD that prevents me from learning new stuff.

I wish I had learned about testing earlier.

The idea of testing code was never covered in any of the introductory books I read. I learned the basics of C, Fortran, and Pascal while doing a physics undergrad in the 90's, then I learned Java and Python in the 00's on my own from books and websites. None of the introductory books I read introduced the concept of testing. It wasn't until I started reading programming blogs on a regular basis that I started writing tests for my code. Once I did, the quality of my code immediately improved and I felt much more confident in the code I wrote.

When I wrote an introductory Python text recently I included a chapter on the most basic aspects of testing. Beginners don't need to write tests for everything they write, but they should definitely be aware of the concept.

I'm interested in your Python book. What is the title?
Wow, I feel like I'm meeting a celebrity. I absolutely love your book! I'm about a third of the way through and love the flow and logical process you take when going through the lessons and what to teach in what order and you use great examples. Thank you so much for writing this Eric!
Thanks for the kind words! I'd love to hear your feedback as you work your way through the rest of the book, so feel free to get in touch if you'd like.
My biggest regret about learning programming is that I tend to approach things in the real world from an engineering perspective, which isn't always best for a given situation.

I try to avoid it and over time I've done a better job of approaching things dynamically.

Can you please elaborate on this? For example, are you talking about social situations or business situations? Applying FIFO to social invitations?
Still my regret because I keep doing it: losing focus and switching context too much (languages, frameworks, etc). Getting better at it though.
Being cocky because "I knew how to code", rather than having any idea about how much I didn't yet know.
Getting excited and wanting to build something with my new found knowledge. Doing this after learning a few new things really slowed down my learning. I wish I waited to learn a lot more before starting a project, it would have been more efficient, I'd know how to work smarter, and I'd have been able to make coolet projects.
True. On the other hand, though, having a project means that you now have a reason to care about learning. Whatever problem you run into, you now really want to learn how to solve that in the language you're learning.

Between working smarter and working (and learning) with more motivation, working smarter may not be the clear winner...

Doing too much of it and developing chronic RSI. Take breaks!
Wish I had taken better care of my eyes.
How?
Probably having the screen too close to his eyes. I know one problem for me is that my screens are just past the point where I can see without glasses, but it's probably not a good idea to use glasses when the screen is only a foot and a half away so I can relate to the parent. My room/desk setup also doesn't allow for me to rearrange this to make my screens closer to not need glasses. Guess I'll see how much this affects me in a few years lol
I've been on computers for lots of time since I was 12 years old. My rule of thumb has always been, keep the screen at least an arm length away from my face. I have 20/20 vision. (Knock on wood... I've definitely increased screen time the past year.)
How long have you been at it?
I could have found a mentor. Hell I'd still like one, even now.
C is my primary language of coding. I work in networking industry. So, my suggestions could be specific to this field.

I should have learnt more of following (a) memory management, (b) process memory layout, (c) good coding practices (d) read up code from other projects. There are really brilliant programmers out there churning out awesome code and that itself is a great teacher. (e) Teaching whatever I learn. Teaching (especially writing it down on paper/webpage) brought clarity to me.

Not doing all of the above early in my career is a regret I have now.

Failing to RTFM in it's entirety, immediately after becoming familiar with the basics of any particular language. You might think you're saving some time by skipping over the tedium, but it ends up costing you.
No regrets, though I'm thinking maybe in a year or two I'll retire completely from programming and work on physical fitness instead. Perhaps find a job that doesn't involve programming. I will probably program as a hobby.

I know if I continue programming as my employment until I'm an old man without trying other pursuits, I will definitely regret it.

I'm 26, and I wrote my first line of code when I was 13 or 14 years old, and perhaps the only sub-fields of programming where I didn't dabble in substantially are assembly and prolog. These days I feel like, with programming, I've seen it all before. C, C++, Python, Objective-C, node.js, Lua, Lisp, Haskell, GPU computation, Django, REST API, React, Angular, Django, graphics programming, mobile apps, iOS, Android.

I've spent time with each of them, most of them in a hobby and commercial capacity and these days everything seems a bit too familiar. I know there's a lot of people who have way more expertise than I do, however, I think it would do me good to get some space. My body is giving me hints I can't continue in the same way I have for the past ten years - I feel my legs getting weaker by the day, random points of tingly pain in my finger tips that comes and goes. I find I really like looking at trees and feeling the wind in my face. I would love to do a lot less sitting and a lot more moving, as in quitting programming as employment completely, starting within 9 to 12 months.

I'm 25 and am definitely feeling its effects on my body too, as well as longing for the outdoors. It's worse because I know the damage I do from sitting around means that I need to spend more time actively counteracting it later through stretching, etc., instead of it being built in to the day, like it would be at a more active job.

It just takes a little effort to do it sustainably. For a couple years I never drove my car, instead pedaling around the city enjoying the breeze every morning and afternoon, because work was a 25-minute bike ride away. But now that I'm working from home, I have to make the effort to get outside or work some kind of movement into my day, and it's still entirely up to me to do.

Realizing how much better your body feels after running or biking or whatever physical exertion you enjoy can really help. Having a dog helps. Having friends around who like to constantly get outside helps too. You just have to remain vigilant about it, and grab any spare moment of the day to do something with your body other than transcribe code. There will always be improvements you can make to software, but just a little extra activity for your heart and muscles fixes a surprising number of physical "bugs."

I have no car - I even used to ride a bicycle everyday for 15 minutes to the train station. I've started becoming weaker after I moved to another suburb where it was inconvenient and difficult to ride my bicycle daily. These days while I'm sitting in front of Terminal.app, I often imagine I'm spending the whole day in this giant park riding a bicycle around it's 3km circumference, over and over again. Just as it was right for me to go home, forget my home work and program after thinking about code the whole day while I was sitting in class in high school, I think it would be right for me to plan an exit from employment and spend a year or so to do what I like to imagine myself doing.
This probably isn't what you are looking for but I wish I never learned, or at least never decided it should be my career. A career writing software has a shelf life. Age discrimination is real, software engineer experience isn't valued like other professions. And yes, there are plenty of firms that will hire engineers over 40, the fact remains that there are vast numbers of employers that won't and once you hit the senior/principal engineer in 5-10 years, you plateau. The pay is ok, for now, but the downward pressure on salaries is palpable. Also, it's difficult to be told how well we are paid when a vast vast majority in the software mecca (SF) can't actually afford a single family home with a sane commute. Some people can afford those homes, but it's not the software engineers. The industry is filled with work that just isn't interesting and of the interesting work that exists it tends to go to those that are the most political. We like to think this profession is a meritocracy but it isn't. We are a managed people without a seat at the big boy table and this means we will never truly have the control over our "destiny" we think we have.

If I could do it over again, after graduating with a CS degree I would explore either going to Wall St to grind and retire after 5-10 years, go to a top 10 law school grind for 10 years and retire, go to medical school. Hell, I'd even just do a DO school in the carribean. Sure you get crapped on for your residency, but after that it only gets better and you don't have shelf life.

I enjoy software development. I'd hate to waste even a few years grinding at some hateful task like that.

And yes I have control over my destiny. As long as you're willing to get up, put your coat on and walk, then you're in control. But as long as you calculate everything in dollars, you're at the mercy of the 'big boys'.

Don't get me wrong, I love purely writing software but as a career it's seen as low status work.

Given the choice between 10 years of work that isn't all that interesting followed by the rest of my life doing whatever I want and 40 years of low status work I do find interesting and then the rest of my life doing whatever I want I know which option I'd choose, and I can see why some others would choose differently.

I've had this exact same thought process, esp with regards to going to medical school if I were to do it over. Also, while what we know about the body changes and grows at least the technology developed is new rather than having to learn a new framework that does the same stuff as an older one just because that's what the cool kids are doing these days. That and I've never heard anyone complaining about there being too many doctors/lawyers coming to the city and "ruining" the culture.
This is going to sound more mean spirited than I mean it to be because I enjoy programming.

You should move away from San Francisco. In places like Austin, Tx or Atlanta, GA you could easily retire with a nice home after 5 or 10 years as a software engineer.

Your view is incredibly myopic

In tech and honestly in most other industries in America (I won't purport to speak for the rest of the world) you only end up "managed people without a seat at the big boy table" if you never have the gall to go out and try to strike it on your own. This is because you'll be managed by people who did.

And the shelf life of which you speak only happens if you refuse to learn new skills and improve.

Hi thanks for your comment.

I'd agree it is cynical, but not myopic. My whole post is about the long term career prospects of software engineers...

I don't live in SF, I was using it as an example to point out that even in our industries hottest, most competitive market engineers are still bottom of the totem pole. I don't live in Austin or Atlanta either but an area that is supposed to be more affordable but it's the same story.

I also did start my own software company and even went through an incubator (not YC), but that's beside the point, I was speaking about the profession as a whole. Doctors don't have to go out and strike it on their own, lawyers don't have to, management doesn't have to, investment bankers don't have to so why do we? Why isn't the skill of software development good enough for a successful career? Why must we switch to the new shiny every 6 months? To be honest that mentality is the exact thing that I lament about our profession. Why aren't we demanding better for our own? I'm not sure, but the independent attitude just isn't sustainable in the current political and economic climate, IMO.

I see what you are saying but I think you are falling for the grass is greener fallacy. I'll explain because I have visibility into those other industries personally.

I happen to have to have a close friend who was an investment banker and have met many through him. Their shelf life is 3 to 4 years max unless they perform well enough to make to make it to the next rung in the chain which their are few spots for. Most try as hard as they can to impress to make it into private equity, a hedge fund, or a VC. And if you dont make it you have to go into something else.

I have another close friend who is a lawyer. You are correct about that profession.... But only if you make it into a top 10 law school and a top tier law firm. If not you're lucky if you can find a job period.

http://mobile.nytimes.com/2015/08/25/opinion/too-many-law-st...

Doctors are a similar position to lawyers. More secure but you have to go to school much longer which I hope you can extrapolate means a lot more debt to pay off before you get a shot at making retirement money.

You are also drastically underestimating the amount of continuous education in other fields as well. Not quite as fast as in tech but not non existant either.

So I'm telling you we have it the best out of all the other professions you mentioned.

No school is required, a CS degreee helps immensely but it can be done without it. If you play your cards right you can make enough money to live in the top rung of people in every city except SF (you can even live really good in NYC if you land a good gig). I can think of few other professions like it.

P.S if it helps you feel any better Id be happy to ask my network to get more info.

Here's the fields I have friends or family in to go find more info to help dispell myths about.

Finance, Law, Healthcare, Oil and Gas, Dentistry, and probably others im not thinking of.

I'd be curious about Oil and Gas. I'm familiar with the other fields, but that one seems to require even less training for around the same amount of money. Or if you get into petroleum engineering - I remember in college that was known as the profession with the highest salary straight out of school.
I wish I hadn't had the attitude of, "I'm going to learn everything from scratch because I don't need help or dependencies." I was stubborn and thought that to be a "real" programmer I had to know how to implement libraries from scratch and build out every single feature myself and learn the ins and outs.

Upside: Now I know many of the "under the hood" implementation things

Downside: Took FOREVER to build anything useful, demoralizing to spend so much time on algorithms and learning every bit of C and JavaScript from the ground up and not be able to do anything useful quickly. Didn't know how to put what I knew to practical use in the modern web.

I got into a funk and one day started learning a framework and it changed my life. I could use what I learned to build on top of the framework and quickly get webapps running that people could actually use.

I regret that I was stubborn and wanted to "learn it the hard way." If I could do it over, I would go through a book on a particular programming language to learn the ins and outs, and then quickly apply that knowledge to a framework. Much better positive feedback loop being able to see the fruits of my learning come together into something practical and actually useful rather than little programs that lived on my local machine and didn't do too much.

It's much more fun and less tedious to built out my own apps on the structure of people who came before me. GOod recent example: Building an app and wanted people to be able to drag and drop to upload files into their browser. Old me would have spent a month learning how to implement this in JS from scratch, new me just uses the DropZone JS library to make this happen and then I can focus on what I really want the app to do.

Not sure if any of what I'm saying makes sense to anyone but me.

I should have explored outside of the ms / .net stack sooner. Its a comfortable world and a decent platform but limiting for the mind.