Live data from Hacker News

The Benjamin Franklin method for learning more from programming books

pathsensitive.com

61–70 of 105 posts

Re: The Benjamin Franklin method for learning more from programming books

#61
> Read your programming book as normal. When you get to a code sample, read it over

> Then close the book.

> Then try to type it up.

According to a passage in "The Autobiography of Benjamin Franklin" (1791) regarding re-typing from "The Spectator"

https://en.wikipedia.org/wiki/The_Autobiography_of_Benjamin_...

EBook: http://www.gutenberg.org/ebooks/148

Re: The Benjamin Franklin method for learning more from programming books

#63
post #49

" This is also why a smart code-completion tool can guess a long sequence of code from the first couple lines. With a better mental representation, understanding code is simply less work. " => Is the author protesting against the use of auto-completion/Intellisense feature of most of the modern IDEs ?

No

Re: The Benjamin Franklin method for learning more from programming books

#64

He doesn't really mention that the reason chess players and musicians can take more with each glance at a position/page is that they see in chunks, not individual elements - that comes from learning the patterns, e.g. in chess "short-castled white king with pawn on h3", in music "C7 chord with melody on the 7th" etc. It's just like adding more layers to a neural network, each layer building things from the elements o…

Q. Who are the great programmers, with inimitable or at least unmistakable and unique styles? Is there such a thing, as happens with music improvisers, composers, artists, writers?

I would look to the great applications that you use everyday. Open source applications are a great resource here. One of the reasons I like GitHub is I can peruse great software and learn how they work. The great programmers quickly come to the top when you study their work.

Re: The Benjamin Franklin method for learning more from programming books

#65
I think this article is interesting but it's really only skirting around the edges of the topic of "learning programming" or patterns or a new language or whatever. A good programming book is written from a an understanding of what programming is: Puzzle solving.

A lot of people think programming is a creative work--and it is to some extent--but if you've ever looked at a block of code and thought to yourself, "this could be written better"--you should realize that, "coding better" is really an exploratory action. You won't know if it's better until you actually run it or someone else reads it and agrees that it is easier to read, makes more sense, etc.

Writing software is fundamentally an act of discovery. If anything has proven this it's the recent Spectre and Meltdown vulnerabilities. Yes, we're 99% sure how our code will perform while in operation but we can never be absolutely 100% certain. Because the CPU, the memory, the chipsets, and other hardware are really just exceptionally reliable laboratory equipment and our experiments (software) have been shown to work precisely as expected almost all the time.

A good programming book will provide plenty of code examples but when it comes time for the reader to practice what they've learned a truly great book will provide the reader with puzzles to solve.

Re: The Benjamin Franklin method for learning more from programming books

#66

This is a great technique to learning. I taught myself how to code after college and found doing my own version of this helpful. The only slight difference in the technique I used was I found it easier to learn when I had something I wanted to build in mind. This helped both in both direction, what to learn, as well as forcing me replicate code for my own use, like the Ben Franklin technique. Hope others find it usef…

> I found it easier to learn when I had something I wanted to build in mind

I don't understand how you can learn this stuff in any other way. I think it's a little bit like learning a musical instrument. One can read lots of stuff about guitars and music theory and how to play the guitar, but none of that matters until you pick up an actual guitar.

Re: The Benjamin Franklin method for learning more from programming books

#67
The books he is talking about were not originally about instruction in a language. They were great reference books in the days before Stack Overflow, or even before the web had so much info on it. Now, if you want to argue that they are outdated, I may buy that... but saying that the entire series is unhelpful just because it doesn't match their/a better learning style.... seems like a big misunderstanding.

Re: The Benjamin Franklin method for learning more from programming books

#68

Earlier quoted context omitted.

The analogy between music and programming holds at this stage. I can guarantee you all the musicians in this band [0] had their own distinctive style to some degree or another and would have even loved to have been paid to perform it but the fact is most professional musicians come in and have to be subservient to the style of the bandleader. And it's no different for coding. [0] https://www.youtube.com/watch?v=hNbsn…

Well, in jazz, you have your own individual style, people hire you because they like it. Sure, in different settings you adapt, but you still sound like yourself. It's the same with classical soloists. The ones that are famous, are famous because they don't sound like anyone else. Just a lot like themselves. Same with singers (rock, jazz, classical) - all well-known singers are very recognisable, and a lot of them ha…

Following the same style guide as your coworkers isn't the same as writing code exactly the same way your coworkers do. I suggest following the style of a bandleader works in the same way. Individuals still have a voice - think of all the great players who made a name in various Big Band orchestras - but the style is still unmistakably that of the band and not exclusively the individual. Unless you're Melkor or something.

Re: The Benjamin Franklin method for learning more from programming books

#69
I'm actually not entirely sure how I learned how to program (I'm self-taught); I doubt it was just "one magic thing", but I am a big believer in the "learning-by-doing" approach for this kind of stuff.

If I recall, I think the thing that made everything stick was me reading through one of those "Sams: Teach Yourself C in blah days", then downloading Code::Blocks and making a very simple OpenGL application involving bouncing boxes (which happened to coincide with the physics class I was taking). I remember using that book for reference for when my code wasn't compiling, but I found it difficult to derive "some example where I calculate a Fibonacci sequence" to "making cool stuff like a game" without just ditching the book and trying it.

tl;dr, I somewhat agree with this article. You have to figure this stuff out for yourself to really "understand" it and become a good programmer. It's a language, after all. You don't just learn French by reading one intro-to-french book.

Re: The Benjamin Franklin method for learning more from programming books

#70
post #51

I think a good learning trick that's an intermediate point between the two approaches he discusses (copying the sample code vs. closing the book and write the code yourself) is to write a different program based on what you can see in the sample code. That's how I learn tech myself--I already have some other project in mind, so I rarely sit down to build 'sample' apps with any sincerity. I try sample code to the exte…

One of my go-to projects for learning a new language is implementing Conway's Game of Life (while trying my best to follow the idioms of the language).

I feel that project is easy enough to not get terribly frustrating, but not entirely trivial, forcing you to think a bit about how you are going to structure it.

Post reply on HN