Teach Yourself Programming in Ten Years (1998)
norvig.com
norvig.com
Teach Yourself Programming in Ten Years (1998) - https://news.ycombinator.com/item?id=27411276 - June 2021 (115 comments)
Teach Yourself Programming in Ten Years (1998) - https://news.ycombinator.com/item?id=20543495 - July 2019 (87 comments)
Teach Yourself Programming in Ten Years (1998) - https://news.ycombinator.com/item?id=16574248 - March 2018 (51 comments)
Teach Yourself Programming in Ten Years (1998) - https://news.ycombinator.com/item?id=9395284 - April 2015 (61 comments)
Teach Yourself Programming in Ten Years (1998) - https://news.ycombinator.com/item?id=5519158 - April 2013 (86 comments)
Teach Yourself Programming in Ten Years by Peter Norvig (2001) - https://news.ycombinator.com/item?id=3439772 - Jan 2012 (29 comments)
Teach Yourself Programming in Ten Years - https://news.ycombinator.com/item?id=191235 - May 2008 (19 comments)
Norvig: Teach Yourself Programming in Ten Years - https://news.ycombinator.com/item?id=43243 - Aug 2007 (7 comments)
this is not about being comfortable paying your bills. this is not saying not to learn quickly or that you should avoid shortcuts. it's about mastery... it's about understanding the craft, weighing the tradeoffs that come with each decision, and repeating that process week-in and week-out for years... decades... a lifetime.
i did learn to program from one of those "for dummies" books. that was (checks calendar) 25 years ago. it didn't teach me everything. i still don't fucking know everything!!! and that's fine. i wake up eager to learn. i enjoy code reviews, and learning from my peers. as norvig mentions: i enjoy being the best programmer on the team, i enjoy being the worst programmer on the team; hell, i enjoy being in-between.
if this post is about anything, it is about the joy of learning, and how deep and long that arc can be. it never ends. maybe when i go senile.
Coding can be learnt more or less fast.
Programming takes much more time as it's a whole field of knowledge to acquire so that one can produce great, maintanable and effective code. So much so that it is still a field in progress (hence new programming languages popping every other year)
Designing and building a 500 piece Lego set would take you years. You could create one quickly, but then refine it over the years - or it could be beyond you and you need to build up to it.
I’m curious if Rust would fall under any of the categories for languages to learn. I already know Lisp, so that knocks out two categories at once. Perhaps Rust fits his parallelism category nicely.
Any language that forces me into a new domain, whether by the goal it wants to solve, its paradigms, or environment, seems highly worth it.
P.s. try OCaml
BTW, I know there are plenty of people who wouldn’t consider that a vacation, and that’s fine, but they are different from me.
most learners eventually gravitate towards Real World OCaml https://dev.realworldocaml.org/ for additional learning.
Unfortunately, the learning resources for different domains out there isn’t as highly curated or prolific as, say, rust. If you do web dev like me, it takes a bit more work to find the tools and put them together. But the language itself lends itself well to systems level programming.
Fortunately, the forum is a great help.
> Learn at least a half dozen programming languages. Include one language that emphasizes class abstractions (like Java or C++), one that emphasizes functional abstraction (like Lisp or ML or Haskell), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), and one that emphasizes parallelism (like Clojure or Go).
The question being what would Rust add to this list or where would it fit here.
"Modern C++, as defined in the C++11 standard has evolved to become an algorithmic language. This represents as much an idiomatic departure from Object Orientation as C++ was a departure from C’s procedural top-down composition. “C++11 feels like a new language,” says Bjarne Stroustrup [Stroustrup]. The primary focus of modern C++ has become algorithms and generic programming. To this end, the language absorbs a number of idioms from other languages and paradigms, ranging from functional to meta programming concepts. […]" [https://lambdafaktorie.com/modern-c-and-the-lisp-programming...]
No one likes being poor.
The issue isn't about how long it takes to get good, but how long it takes to extract economic value from the exercise. How good to I have to be in order to make more money doing this than I make right now?
If it takes 10 years to get that value (it does not), then it might not be worth the effort. But I don't think expertise is binary, and the whole 10 years/10,000 hours thing can make people feel like the effort isn't worth it.
There is value to be gained during the 10 (or 50) years you spend honing this craft. And 21 days can create value, if not necessarily expertise.
Because of Google's hiring filters (which I suspect Norvig knew something about), which tested for "Are you fresh out of whatever undergrads were being told at Stanford?" rather than the skills and experience development that Norvig talks about here.
Psychology, I had waayyy more time with and appreciation of the fundamentals after establishing myself in a well paying grad role. “Alright, so I’m definitely not going to be poor — in fact I’ll be comfortable — now let’s focus on slowburn mastery.
Sorry if I never really got to the point. Just wanted to say that I was in a rush - but of a different sort back then.
I tried that. Lived on ~$15k/year. It wasn't freeing, it was awful.
FORTH ?KNOW
HONK!
ELSE
10 YEARS SELF FORTH TEACH IN
THEN become_programmer(Y, L) :-
forall(years(Y), learn(Y, L)),
make_more_money(update_resume(Y, L)),
true.However, I think that learning a particular programming language is not a tremendous task. And I don't mean only syntax but the general ideeas and concepts flowing around that language.
I see many language as families. After I learnt Pascal it was easy to learn C. Then C++ (sort of, because no mortal being can claim mastership of C++). Then C#. Then Python and Go.
F# was a bit different thing, but once in my pocket, I am not afraid of Haskell or ML(not that I do wish to learn them).
Apart from syntax, which is easy, libraries and frameworks, you have to learn different ways to do things, but those might apply to families.
So things like interfaces, over abstracting, GoF patterns, Uncle Bob teachings, clean coding, DDD design, SOLID and other stuff which mostly mean bad design and bad coding but you need to master if you want to land a job, once learnt for Java, it will apply for most languages from the family like C++, C# and even Python.
Is this referencing the movie Ratatouille? I was curious because the movie was released a lot later than this article. I figure it must have been a novel but can't find it, or maybe the article was edited since 1998?
I don't think anyone who claims that "programming can be learned in an afternoon" understands that to mean "programming can be mastered in an afternoon". Mastery comes, in large part, from experience, and there is no shortcut to experience.
I wouldn't argue that anyone expects to be competitive with a grandmaster at that point, though.
It's like complaining that automatics exist. You can still drive manual! You have that on people! But fundamentally it is a simpler field than it was then, due to the gigabytes of abstraction for every little thing you can do with a computer now.
That points toward an attribution error or a fundamental insecurity.
Eventually, you get promoted and start designing systems only on whiteboards. Then, you're an architect.
Or, if you get tired of any of the above, then you're a manager instead of an IC.
If you're getting paid to write code and produce something of value, then the ultimate proof is in the pudding. If your code does what you want, if your team is happy, if your QA is happy, if your customers are happy, then you've succeeded.
Because it matters. The quality of your work depends on it. Having respect for someone coding on a weekend is one thing. Believing that it doesn’t matter if you occasionally dabble in programming or on a level of Norvig is another.
Saying you need X years of experience to produce good code is just elitist/gatekeeping.
In the first couple of years they'd need a lot of independent projects with mentorship to start, then get plugged into an actual team with good peers and pairing.
They only need the basics of data structures and algorithms. They might see dynamic programming and AVL trees, but that needs less focus than the practicals of HTTP, MySQL, image processing, version control, hardware, etc.
I wonder what they're up to? Just lurking and not posting? Gave up on "the lifestyle"? Burnout? Forgot their password and created a new account?
Or, a lot of HN activity seems to be by people in hustle mode. Maybe a lot of them finally made their fortunes, and are now spending their time with their kids, or windsurfing.
Then there's wasting time while stuck in-office all day. Less a problem with WFH, when you can go do dishes while you're waiting for that build or someone to respond. And WFH means less of a need to kill time at your desk before it's socially acceptable to go home (or get a train/shuttle), even if you put in a solid day and you're at a good stopping point before a busy day tomorrow.
Then again, conversations are usually deleted the moment they happen, in the sense that they don’t get stored.
This is definitely a big one.
The focus did use to be a lot more specific to startups with all the good and the bad that came with it. Things like a less negative view of "dark patterns" and more marketing related topics were definitely a part of a community back then.
Questions like "Should I be tracking as much data about my users as possible" would have been answered with "Yes, absolutely, the more data the better." much more often than you would ever see nowadays.
To understand the level of programming skill on Hacker News, consider that less than 5% of Hacker News readers succeed in adjusting a loop iteration variable to avoid unsigned overflow (despite repeatedly attempting to do so):
https://bugfix-66.com/8617f16fa68e021b656b1856f94afebf7a3117...
This is an empirical observation and not an attack (please don't flag/downvote this comment). It tells us something about the population of users on the forum, and where they are on the developmental timeline as programmers.
It seems like more senior programmers move on, maybe.
A C programmer who understands a for loop should be able to fix this, despite the fact it's Go:
// We are generating n-1, n-2, ..., 1, 0
func below(n uint64, to chan uint64) {
for n--; n >= 0; n-- {
to <- n
}
close(to)
}
Maybe you're right: It could be that C programmers don't understand Go syntax and Go programmers tend to be less experienced.It told me I have an error ("what happens at zero") when i do:
func below(n uint64, to chan uint64) {
for n; n > 0; n-- {
to <- n-1
n--
}
close(to)
}
but running that function with several test inputs produces what I expected. Note, I removed the channel (replaced with println) as that doesn't add anything to the problem.Note: I've been programming (including C and C++) for 3+ decades. I make mistakes all the time, but.... what exactly are you looking for here if my solution is not ruight?
EDIT: the pasted code is also incorrect, because I didn't complete converting the for loop into a while.
On my machine I used this code:
package main
import "fmt"
func below(n uint64 ) {
for n>0 {
fmt.Println(n-1)
n--
}
}
func main() {
below(10);
below(0);
}
The actual code I put into the bugfix site was: func below(n uint64, to chan uint64) {
for n>0 {
to <- n-1
n--
}
close(to)
}
but when writing this comment I went back and didn't modify the for loop to be a while.It doesn't know what's wrong in the code you submitted... it is not understanding deeply what's wrong with your code. It's not some huge multi-terabyte language model analyzing arbitrary code, or whatever.
It just knows your code is wrong and gives you a clue so you can try again.
Here is an example of what's running behind the scenes, to help you understand:
https://bugfix-66.com/contribute
The above code is what's being used for Bug #1:
https://bugfix-66.com/a6cb1e062ae0fdc47b43ec489aa40a958db728...
Is that pretty clear?
I'll tell you what's wrong with your code.
func below(n uint64, to chan uint64) {
for ; n >= 0; n-- {
var t = n - 1
to <- n
}
close(to)
}
I've run this locally with to <- n replaced with a print statement and it works with unsigned integers. func below(n int) {
for n--; n >= 0; n-- {
fmt.Println(n)
}
}
I modified the type so I could punch in some sane integer, like 4. And this works. C:\git\bugfix66> go run .\bugfix66-2.go
3
2
1
0
Am I to assume that the bug is actually a type issue? Something to do with unsigned integers?Wait. Oh. Ok. I get it. It does have to do with the type signature.
(my real comment after I get some clarification from the bugfix site author is that I never, ever modify a variable in the initialization condition of a for loop, and i see that in the wild, I elide it.
Any change that doesn't compile (bad syntax) or fails the tests is rejected. Code that produces deadlock or panic or timeout is also rejected.
If you give me an example of a rejected solution, I'll show you why the solution wrong.
As I get further into my career, the signal to noise ratio is shifting quite a bit. I’ve seen many iterations of what’s being posted already, most of the comments aren’t novel, etc.
At this point HN is a habit. And a hard one to break.
1. No comparison to base rate. 5% shouldn’t make us believe they’re early in their journey. You haven’t given any observations about experience and the rate of error fixing.
2. Ignored sample bias. <5% of the users who submit to your site that you can track to HN solve the problem. That is very different from “<5% of HN readers”.
If anything, my downvote comment was too childish. I was put-off by their line about not downvoting because it was “empirical”. Seemed to insinuate anyone who disagreed was just going against the facts.
Edit: oh, didn’t realize I was replying to you again.
I've been programming for about 15-20 years, and using HN since 2007 or 2008 or so. I opened your site while reading the voxel thread, and was a little baffled about what I was encountering -- "why am I suddenly reading buggy go code? I thought this was an example of a spacial curve!" -- so, I went to check out your other posts to figure out what your deal is, and here we are.
I don't know Go, and I don't really want to "play a programming game" right now. Your code seemed a little obtuse and intimidating -- long bitmasks and combinations of xors and abstract names -- no thanks! There's a bug in there? How surprising!
I do lots of programming at work and in my spare time, and to a degree, I just can't be arsed when someone jumps out of the woodwork with "a bug" that it isn't going to mean anything to fix, so I moved on. I'm an experienced programmer who you likely aren't measuring.
So I saw your comment here, and my first thought was: well, that's a big (logic) bug in the reasoning of a person who made a game of fixing bugs! Kinda tasty irony, and totally fair game for the poster above to call out, in my opinion.
(anyway, after all this, I am a little bit more interested to go try out the above-mentioned challenge. It's a neat idea for a game, and you seem to have put a lot of work into it. Best of luck!)
As someone who has been reading and posting here regularly since 2009, here's what I'm finding: The further I get in my pursuits, the more my concerns and tribulations become specialized and weird. To get a useful answer from the public internet would require so much backstory and explanation that it's barely worth trying. And the answer would likely be wrong or not useful.
Instead real world social networks and specialized micro communities are where it's at. A lot of paid consultations as well. Pay a few hundred (or thousand) bucks to an expert and get the correct customized answer to a specific problem. Worth every penny compared to reading tea leaves off the wild internet.
But HN is still one of the highest signal broad communities out there so it's fun to stick around.
Some of this is a result of importing the culture-war mentality that destroyed Twitter, but some of it is not; see how often the word "disingenuous" gets posted, generally as an assertion that the parent commenter must be a liar because they couldn't possibly be so stupid as to believe what they wrote. That's pure native HN viciousness, not a Twitter import.
Maybe I'm different than other earlier people who were drawn here - I'm just interested in tech and never really thought of doing the startup route. I've made a few millions of dollars in total comp in that time, but I do wonder where I would be if I took a step out of my comfortable FANG-type job 15 years ago.
Not sure what the exact turnover rate is, but it seems pretty normal that there would be some turnover over 15 years.