Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: If you were to learn to code again...
7 points by sujayk_33 9 months ago | hide | past | favorite | 18 comments
If you were to learn to code again, first, would you?

If yes, How would you go about it and why?

If you are not a programmer, then you can tell about the profession you're in and would you love to repeat the same if you were to?




Sure I'd learn to code again. It's literally opened so many doors in my life it's ridiculous, and gave me a far better job than I'd have gotten otherwise.

As for how I'd go about it... probably more through experience than through tutorials to be honest. My experience is that I learn far better when I've got an actual goal to achieve and learn what's needed to reach that goal, not when I try to follow a pre prescribed set of instructions to build some useless toy.

I'd also tell myself that a complex/ambitious project is usually the result of many pieces of simpler, piecemeal work over time rather than something that's all planned and done in one go, and that I should learn the basics and get them working in a simpler form first rather than get discouraged I can't make my dream project right away.

I suspect if I'd known that as a kid/teen, I would have coded in more than just HTML and CSS.


If you were to learn to code again, first, would you?

Of course. I can’t imagine being unable to program things in a world of routine. Non-CS programming isn’t even a profession to me, it’s a skill like PC/Excel user. Everyone should learn it to keep up.

If yes, How would you go about it and why?

Assuming the present time, I’d find someone like myself, who would tell me to learn a couple of my current stacks and also explained (1) what to never touch or do and (2) how all other tech works, from top to bottom, because it’s important to clear misconceptions and as an overview. Otherwise I would be clueless and used the same BFS method to navigate this vast space. As this person be unlikely to spend so much time on me, I’d ask you know who.

In contrast to other posts itt, I’d also avoid spending time in “the industry” and worked my way to clients directly. It would reduce (or never induce) my coding standards anxiety. Also good from the income/freedom pov.


Yes, but I would start with C lang and avoid JavaScript entirely until I no longer needed it for employment. In the world of corporate JavaScript employment the least competent and most insecure people dictate candidate selection, how to write code, and quality of output. If this only just resulted in wasted time it would just be slightly annoying.

I still wouldn't invest time in Java. That would greatly increase my employment mobility, but I have seen too many bad practices and failed business applications come out of corporate Java. If I really wanted this kind of self-punishment I still think I would prefer Java or JavaScript because even though I like the JavaScript language so much better the Java ecosystem more than makes up for it with more mature coworkers.


C was my first language as a teenager. It is my native (formal) language, if you prefer.

Considering OP's question:

After C, I'd suggest looking into the Lisp family of languages like Scheme or Racket. I discovered them not long ago and wish I had found them sooner.

The reason is simplicity, ubiquity (Clojure), maturity (way older than C, see Lindy effect).

Then after Lisp, Python. Done.

There is nothing really to be learned thereafter. Programming languages come and go, but they have certain elements in common:

  - I/O
  - repetition (recursion)
  - conditional execution
  - arithmetic
Then there is stuff on top of that: OOP (which means data and code belong together. You can do that in C too:

https://www.state-machine.com/doc/AN_Simple_OOP_in_C.pdf

After C, Lisp (e.g., Racket) and Python, I would focus on common data structures and algorithm topics:

  Data Structures
  - Linked Lists
  - Trees, Tries & Graphs
  - Stacks & Queues
  - Heaps
  - Dynamic Arrays
  - Hash Tables
  Algorithms
  - Breadth-First Search
  - Depth-First Search
  - Binary Search
  - Merge Sort
  - Quick Sort
If you want to go to the extremes:

Lambda calculus and the formal language around Turing machines. Turing machines only need to read/write memory, move around memory, execute a finite program, have (near) unlimited memory.

Excel seems Turing complete, so maybe start programming with Excel. Don't!

Then there are what I call "industry languages", programming languages that you cannot keep in your head easily and probably need IDE assistance with:

C++, Java, Scala, Rust, etc., are production environment languages. Learn them later in life.


> If you were to learn to code again, first, would you?

Yes

> If yes, How would you go about it and why?

Join Series C+ startup or a big tech where communication overhead is high and learn to deal with it. Main premise of software engineer is delivering value. Value can be delivered by writing less code or no code at all. Real world is messy, don't expect textbook "best practices" from real world software, learn to deal with it


I still consider myself a novice, but if I were to start over I'd focus a lot less on the code and more on the computational thinking. I spent my entire teen years trying too hard to learn languages, and never really learned anything except the names of things. I'd like to go back and give my 12-year old self a copy of SICP or something like that.


I studied computer science. I never thought my career options would be mostly limited to programming. But that seems to be the case. In contrast people who went to law or business school or political science grads seem to have more career mobility. Looking back I think going into a tech career mostly makes sense if you want to start a company. Otherwise I am not convinced it’s that great a path to follow.


1. Yes.

2. Yes, mostly the same way I did it the first time - by learning Python first and then building weird things with it a lot. (I would ask GPT a lot of questions.)


I’d learn the basics of a programming language enough and then go converse with a quality LLM about how to do $x in that language, and then Google what it tells me to check its soundness.

It can be hit or miss, but it’s usually hit (80-90%), and it’s a huge force multiplier.

This is basically what I do now even though I’ve been programming for >4 decades (albeit I’m an unremarkable programmer).


1. Yes I would

2. I learned C first, which made most easier to learn, because if you squint: C#, Javascript, PHP, C++, all kinda look like C.


yes I love coding and would totally do it again - but I would maybe pay more attentions to design patterns than I did the first time around.

I would also sigh and focus on javascript over other languages. It's such a bad 'main' language but it's everywhere, and it's good to have a handle on the idosyncracies.


Yes and I would join a company/startup/whatever far earlier instead of passing so much time in university (not that I think the degree was not worth it, I would just start working asap and taking the courses as part-time student).


agreed, getting the industry exposure >>


I am, and I'm currently working on my final project for cs50x!

not necessarily for a job, just cuz it's interesting...


yes

I would not go to college and spend all that time and money on actually working on projects and getting real world working experience. I actually had a job offer out of high school but my parents convinced me to go to college.


I'm not sure. I think I might be happier in journalism, or doing industrial controls.

Most likely I would learn to code, but I think I would do it a lot differently.

I'm not sure if I would necessarily do it better, because I learned a lot doing tons of crappy useless stuff, but... I don't think I'd have much passion for some of those projects if I knew ahead of time how I'd wind up tossing them entirely.

I think, if someone were to ask me to teach them to code today, I would start with Git. I might even say "If you don't like git you probably won't like real industry work much".

Not advanced level git, I'd probably just show them git-cola and do everything in the GUI like I mostly do, but I wouldn't want to be writing 200 line programs without VCS, like I was when I first started.

I would not mess with odd tools like VB.net(I used that a lot as a kid), livecode, etc.

I would have a really strong focus on using modern tools. I would learn Python on VS code, with the debugger, all the type hints, virtual environments for everything, etc.

I'd want to learn earlier how all the parts fit together, how to do things in such a way that there's a linter watching out and VSCode autocomplete saving me time.

I'd want to learn about Not Reinventing the Wheel, and researching. I'd want to get in a mindset of "Oh, I need to do this, lets stop and look for what's out there" not "I'm just gonna keep click clacking away and parse this with a regex rather than stop coding and learn about some parser library"

I'd probably do more intentionally useless projects. If I knew the stuff I was working on was going to be useless, might as well do something fun!

And more highly likely to be useful projects. Get started with FOSS contributions early, spend more time fixing other people's crap code instead of doing my own crap code.

Then I'd probably show them Arduino on ESP32, since presumably they want to learn basic embedded, if they're asking me this stuff.

But I would not accumulate a big parts bin of junk. Eventually, you'll want to make a PCB and do a design with a bare MCU, if you want to really learn... but it's so much more tedious and frustrating and there's so much than just using a module.

Which is usually what I do for anything but high volume work (Not something I usually do).

I like to say "The parts bin can be the enemy", it costs money, it's unneeded clutter, if you are a fan of the "Digital mindset" you don't need piles of op amps and banana jacks and logic gates and a bench supply and signal generator, until you're doing pretty advanced stuff.

You need a nice tidy work area and an ESP32, some female 0.1 jumpers, and some Amazon modules.


Absolutely not. I would either go into a more vain profession like sales or pursue the arts, particularly acting. Not only would I likely do better financially, doing something more aligned with my aptitudes, but I'd be doing something I actually enjoy.

I've had brief epiphanies over the years that coding was the wrong path for me, between how difficult it was for me, my disdain for the craft & its culture, and the comments I would get about my looks.

"You don't look like a programmer", "You look like a model", "You look like the star of an action movie", "You look like a Disney prince".

I would rarely acknowledge these comments as serious, and even when I did, I'd try to downplay them and humble myself, and lament the unfairness of the world, that I should be treated special just because of some dice roll at birth.

It all recently started to hit me after reading some articles that set off light bulbs [1] [2] that I made a mistake by immersing myself in nerd world. It's strange that the older I've gotten, the more vain I've become, or maybe we're all just as vain and don't really get less so or moreso, but just notice it more over the years.

I likely could have profited significantly from a profession that's more beauty-contest oriented. Programming is not one of those professions. Instead, I wasted away, hidden away in nerd world. I still struggle to get a programming job. And my family and I continue to suffer for it, financially. Such a waste.

I know I sound narcissistic, and that's partly because of the particular bias I've discussed, but it's not just about that - it's about failing to notice and capitalize on innate strengths and qualities, like I was fighting nature, and nature always wins.

And I think there's morals to this story: ride the crest of the wave with your strengths instead of trying to heave a weakness out of the trough, open your eyes and exploit every single advantage available to you and don't apologize or be humble or politically correct about it. Every advantage you fail to capitalize on is one that your competitors will.

[1] https://hbswk.hbs.edu/item/when-glasses-land-the-gig-employe...

[2] https://www.psypost.org/2023/11/attractiveness-has-a-bigger-...


On one hand, I really wish I listened to my heart more and did something more environmental and outdoorsy. Going back to school for that soon (nearly 40, hard time for a career change, but perfect for a midlife crisis!)

On the other hand, I really enjoyed the creativity of what they now call frontend engineering. To me it's still just a glorified version of the "web design" I learned from the Geocities days, but I find it so satisfying to work at the intersection of light coding, graphic design, UX, (and in my case, an interesting vertical like solar power).

I learned programming first in Logo and Basic, back in the 90s, then Perl and PHP and finally Javascript. I never particularly cared for it, TBH. As a gamer, I always appreciated what coders could make, but I hated math and algorithms, and memory stacks and garbage collection and such bored the crap out of me. Same with network models and scaling SQL and Java anything. Implementation details that I was happy to keep hidden away in some smarter person's black box.

Frontpage (shhh) and Dreamweaver made it more tolerable (these were the pre-Bootstrap, pre-Squarespace days). Not so much for the WYSIWYG aspect but for the focus on visual design over coding. These days that niche is mostly done by Figma. I'm that rare developer-designer who's equally comfortable in JS, Figma, and Illustrator. Just not Java or C++ or anything I'd consider a "real" programming language.

My job got a LOT more enjoyable after React, Next.js, and especially MUI (the component framework that provides React components styled after Material Design). I can finally code efficiently with a focus on UX, instead of wasting time fighting the quirks of JS and CSS. It's a dreamy stack to work in for UI work, and so much nicer than vanilla (hot take, I know, but that's not the point here).

Coding has been good to me in terms of providing a livelihood (I'm not rich, earned between $40k and $100k a year, but that's still more than most of my classmates in the environmental sector). It provided a lot of autonomy and creativity, and the freedom to move between places and companies. If I didn't like a place or a boss, I could (at least before 2023) easily find work elsewhere. It was cushy and mentally stimulating.

But if I had to do it all over again, I think I would find the opposite balance. Instead of making coding my profession and the environment my industry / side passion, I'd find a more mainline environmental job that has coding only as a part of the work. Maybe something like (civil) engineering or GIS or such.

But then I think of websites like recreation.gov, one of the few actually competent government services the feds provide (via an outside consultancy, Booz Allen Hamilton), and realize, well, maybe there's a place for that sort of work, and a value that tech can still provide to the public if done well. Between that and apps like Alltrails, there's a lot of impact there.

Grass is always greener, I guess.

I really wish there was a nonprofit dedicated to technology and nature, where devs could earn a livable wage (not faang, not tech, just like $60k a year) but could serve public agencies and other nonprofits and such without a profit-seeking middleman. Maybe it's not so much tech I hate, but tech under American-style capitalism. Shrug. Maybe I'll start one someday...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: