Live data from Hacker News

Teach Yourself Programming in Ten Years (1998)

norvig.com

71–80 of 117 posts

Re: Teach Yourself Programming in Ten Years (1998)

#71

Earlier quoted context omitted.

Even more important than different languages is to learn about different execution models. For instance, the difference between Java and C++ is relatively minor from that perspective, compared to (e.g.) understanding how Prolog works. That will open entirely new horizons if your previous experience was based on C(++)/Java(Script)/Python (just to mention a few of the usual suspects). Just look at how the addition of F…

Yeah i agree, I was a bit clumsy about it but this is really what i was digging at in my examples. I see a lot of conversation on here dedicated to whether you’d like your data with your functions (objects) or your functions with your data (closures). Rarely see array, logic or constraint programming paradigms mentioned. FP has been rediscovered again and it’s the hotness right now but it’ll die out again like it did…

> a re-visit of structured programming.

God I hope so, probably the worst time I have teaching junior developers is helping those who have only used for-each write a loop with a useful invariant and not a garbage fire of breaks/continues.

Re: Teach Yourself Programming in Ten Years (1998)

#72
People learn at different speeds, and intelligence + natural talent is a huge factor when it comes to learning this stuff. The two most talented programmers I know have quite different backgrounds: One is your archetypical hacker - started coding as a young child, demo-scene by the time he was 13, and got headhunted before he could enroll college.

The other guy didn't write a line of code until he was 21, after switching majors from econ to engineering - three years later, he was getting offers from FAANG companies and quant/hedge funds.

But, I do think that if people consistently work and study programming for 10 years, then most will have a solid grasp afterwards. That means doing actual constructive work almost every day, for 10 years - doing work that either challenges you, or teaches you how to use the tools.

Being an expert (or highly competent) programmer is not only about knowing CS-theory at heart, and being able to translate that into working code - it's also being fluid with the tools. And, luckily, becoming good with tools doesn't take much more than time and effort.

You could be the worst programmer in the world, but given enough time, you could learn every nook and cranny of some language and its ecosystem.

Re: Teach Yourself Programming in Ten Years (1998)

#73
post #48

>> Learn at least a half dozen programming languages I'm always surprised by how many people disagree with this; they're on the search for that one language they can use for every task. Or even worse, they think they've found it and their search is over, that's a tragic situation given how spoiled we are for great languages today. Clojure (STM / refs, vars, atoms & agents), kdb/q (non-loopy array code), Rust (ownersh…

I was one of those who disagreed with that, but then I was forced to learn several new languages for work. Now I agree with it wholeheartedly. my favs: -clojure for processing deeply nested data -rust for general stuff -java for concurrency support and general stuff -c for easy pointer manipulation and "tricks" -sql -bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using pytho…

The biggest advantage of bash over scripts is parallelism. It's not bad at job control, and if you write your scripts so they communicate well with streams, you can scale them up with a little bit of bash, xargs -P, parallel, etc.

Re: Teach Yourself Programming in Ten Years (1998)

#74
post #48

>> Learn at least a half dozen programming languages I'm always surprised by how many people disagree with this; they're on the search for that one language they can use for every task. Or even worse, they think they've found it and their search is over, that's a tragic situation given how spoiled we are for great languages today. Clojure (STM / refs, vars, atoms & agents), kdb/q (non-loopy array code), Rust (ownersh…

I was one of those who disagreed with that, but then I was forced to learn several new languages for work. Now I agree with it wholeheartedly. my favs: -clojure for processing deeply nested data -rust for general stuff -java for concurrency support and general stuff -c for easy pointer manipulation and "tricks" -sql -bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using pytho…

> I still need to find something good for arrays/ matrices

R?

Re: Teach Yourself Programming in Ten Years (1998)

#75
post #48

>> Learn at least a half dozen programming languages I'm always surprised by how many people disagree with this; they're on the search for that one language they can use for every task. Or even worse, they think they've found it and their search is over, that's a tragic situation given how spoiled we are for great languages today. Clojure (STM / refs, vars, atoms & agents), kdb/q (non-loopy array code), Rust (ownersh…

I was one of those who disagreed with that, but then I was forced to learn several new languages for work. Now I agree with it wholeheartedly. my favs: -clojure for processing deeply nested data -rust for general stuff -java for concurrency support and general stuff -c for easy pointer manipulation and "tricks" -sql -bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using pytho…

For arrays/matrices I'm falling back to Fortran. It has builtin support to matrix/vector multiplication (and other operations of course). There's no need to install other libraries, or to deal with virtualenvs, or package managers. Fortran is not that sold creepy thing from the 70s anymore, Fortran90 (and later) is pretty elegant IMO.

Re: Teach Yourself Programming in Ten Years (1998)

#76
post #44
post #39

Earlier quoted context omitted.

not all code is life threatening in worst case scenario. Better comparison would be "would you like to be served by first time waiter or rather expert one?". In most cases it doesn't matter, and when it does, the price point of the service is significantly higher.

This is mostly just a rant not directed at you but on the state of software... The Colonial Pipeline ransomware wasn't life threatening. These things happen because of bad* developers and zero accountability from developers over publishers to software owners. As it is now pretty much all commercial software is "first time waiter" quality. Granted it isn't all on the actual developers but on the whole pipeline(!). Mos…

Bad code is happening for non-malicious reasons. I’ll suggest these two being the main factors, and I’ll concede that it is conjecture, but I’m drawn to these two since I assume good-faith amongst all actors:

1)

Everyone needs to pump out all of their bad code before they get to their decent code. Imagine your lifetime array of code, it will look like this [bad, bad, ...(lots of bad), bad, good, bad, good, good, ...(lots of good), good]. As you can see, you’ll have to pop (poop) all the bad out before you get to good. Some people have a smaller length array due to other factors (talent), but even so, there is bad in front of the array.

What are the implications of this? That should be obvious. This industry hires people straight out of college or people in their mid 20s to be project leads. You do the math.

2)

Lack of suffering. Many people haven’t had to toil in someone else’s codebase. Many people are given green-field projects that are scrapped quickly, at which point the business (or another business) gives a brand new project. Constantly building shit from scratch by yourself means you don’t understand pain. Go work in someone else’s garbage app to feel pain. Then you will rethink what good code is. Good code is not painful, and the definition of ‘not painful’ will be obvious to the survivors of pain.

Solution:

Continue to crap out your bad code in non impactful areas of the codebase and avoid crapping in critical parts. You have to crap somewhere, and that is understandable. Lastly, don’t turn down the experience of working in someone else’s labyrinth. The experience is valuable.

Re: Teach Yourself Programming in Ten Years (1998)

#77
post #70

Earlier quoted context omitted.

I’m surprised you don’t mention Perl in this list. It’s the de facto Unix scripting language and frankly more suitable to the task than others. Perl on the command line is beautifully concise; it’s easily embedded into CI/CD pipelines because the q, qq, etc escaped quotes; it has best-in-class regex support; calling external utilities equally concise with qx or back-ticks; etc etc. Personally I tend to favor C/C++ fo…

Ruby is a better Perl; it's closer to Perl than e.g. Python, it has fewer footguns but is also very expressive. It also has alternative quotes, backtick, shellescape etc. for ad hoc shell integration though you're better off learning IO.popen and others to take the shell out of the equation.

Subjectivity aside: the fact stands that Perl is the most ubiquitous scripting language on Unix and the de facto standard. You’ll find it by default on many container environments as well—but hell if you’ll find Ruby. ;)

Re: Teach Yourself Programming in Ten Years (1998)

#78
post #74
post #48

Earlier quoted context omitted.

I was one of those who disagreed with that, but then I was forced to learn several new languages for work. Now I agree with it wholeheartedly. my favs: -clojure for processing deeply nested data -rust for general stuff -java for concurrency support and general stuff -c for easy pointer manipulation and "tricks" -sql -bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using pytho…

> I still need to find something good for arrays/ matrices R?

MATLAB, if you can get a license would likely be better. Name literally means "matrix lab". Has excellent matrix manipulation features.

Re: Teach Yourself Programming in Ten Years (1998)

#79

Earlier quoted context omitted.

JS isn‘t a general purpose language, even though is has been shoehorned to be one.

I would say it is. It didn't start as one but over the decades it sure has become a general purpose language. I can't find a domain where JS wouldn't fit the description. While it may be a bad fit for certain problems, it can still be done.

Safety-critical controller for manned or unmanned aircraft, ground vehicles, etc. High frequency trading. Tiny embedded devices. System libraries.

I’m sure I could come up with more. JavaScript is a tool, just like c, go, rust, python, lisps, etc. I’m going to give you the benefit of the doubt and hope you just didn’t consider all of these other domains when you made this comment.

Cheers!

Re: Teach Yourself Programming in Ten Years (1998)

#80

The title is a bit misleading to me. 10 years is not to "teach yourself programming," it's to "become an expert in programming." Most people do not want to learn programming to become experts, most people want to learn programming to get a job. After getting a job, some will plateau right away, others will plateau after some time, and others still will keep learning even after years and years. The problem is "how lon…

> 10 years is not to "teach yourself programming," it's to "become an expert in programming."

I've been programming for a lot more than 10 years, and would barely call myself an expert on anything. 10 years is a decent amount of time to learn to be a decent programmer. As a rule of thumb at least.

Post reply on HN