Live data from Hacker News

Ask HN: Confused semi-newbie programmer needs some advice.

news.ycombinator.com

21–30 of 57 posts

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#21

This is probably different from the other (great) advice on this page, but here goes. If you have 10 months before you got back to university, I suggest, you work with one language and build something substantial in that time. It doesn't matter which language you select (and this is where my advice differs from those of people who recommend lisp/Haskell and so on, you could choose C or C++ or Java, it doesn't matter)…

Building something and learning from your mistakes is indeed the best way to learn, but doing something ambitious in a language you don't really know means that you're going spend a lot of time on doing and re-doing the structure of it, and that requires a lot of patience since you'll get so little feedback.

I'm a very impatient person, all the side-projects I've made have had very tight feedback loops, where you quickly get results and can change them and see your project grow. My first language on the side was PERL, which is a very unstructured get-stuff-done-fast kind of language which suited me perfectly at that time and was fun to learn, for me.

Horses for courses, etc.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#22

This is probably different from the other (great) advice on this page, but here goes. If you have 10 months before you got back to university, I suggest, you work with one language and build something substantial in that time. It doesn't matter which language you select (and this is where my advice differs from those of people who recommend lisp/Haskell and so on, you could choose C or C++ or Java, it doesn't matter)…

Building something and learning from your mistakes is indeed the best way to learn, but doing something ambitious in a language you don't really know means that you're going spend a lot of time on doing and re-doing the structure of it, and that requires a lot of patience since you'll get so little feedback. I'm a very impatient person, all the side-projects I've made have had very tight feedback loops, where you qui…

" but doing something ambitious in a language you don't really know "

I never really implied "language you don't know". My advice was "use a language you know and build something ambitious" (vs trying to find the ultimate "cool" language). I'll edit.

"Building something and learning from your mistakes is indeed the best way to learn,"

This is what I was trying to say, (with "something" != tiny programs). I know many people who "know" many languages(and try to know more) but haven't built anything substantial with any of them.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#23
Learning languages in different families teaches you to abstract away the abstract algorithmic concepts from the language family specific concepts. If I were designing a CS program, I'd probably include:

  - C (imperative)
  - Python (object oriented)
  - Scheme (functional)
Interesting with that selection is that none of those are my weapons of choice in their niches for actual projects (I prefer C++, Ruby and Scala), but those above are a bit cleaner since they cling more purely to their respective models.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#24

IMHO as a learning language nothing beats LISP. It's a little tricky in the beginning, but the pay-off is great simply in the way it changes your perception of programming. This is a great place to start: http://gigamonkeys.com/book/

I agree with you, but it is spelled "Lisp" these days :)

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#25

This is probably different from the other (great) advice on this page, but here goes. If you have 10 months before you got back to university, I suggest, you work with one language and build something substantial in that time. It doesn't matter which language you select (and this is where my advice differs from those of people who recommend lisp/Haskell and so on, you could choose C or C++ or Java, it doesn't matter)…

I have not read any of the other advice yet, but I think that's too ambitious for somebody who has just completed two fundamental, but introductory courses. I totally agree upon building stuff for teaching the ropes--but this is probably a bit too early in for doing something meaningful (the raytracer example is probably too tough, since it requires at least some amount of linear algebra, analysis, etc. which probably lacks, too.)

So good advice in principle, but probably too early IMHO. I have recently completed SICP (after having 15y of experience and knowing multiple PLs) and it is still one of the best introductory textbooks I can think of, if only for the breadth they cover using their examples. In addition to learning functional programming concepts, how an interpreter works and last but not least building a compiler is more than anybody can expect to learn in 10 months time, too.

PS: One does not need to be a beginner to appreciate SICP. Actually, having a lot of programming experience enables you to work through SICP in a breeze...

EDIT: After reading through the comments, probably it would be a good idea to skim through "Simply Scheme" by Brian Harvey and Matthew Wright. Many people think its the "predecessor" of SICP and probably would be a good complement for you:

http://www.eecs.berkeley.edu/~bh/ss-toc2.html

If you are choosing SICP, be sure to check the video lectures from MIT!

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#26
I would recommend learning JavaScript. Java, VB, PHP, etc. are pretty much all the same in comparison to JavaScript. I’m not talking about syntax or patterns but about general purpose. In my opinion, JavaScript is the most important complementary technology to the - what I call them - backend languages.

Today, web-enabling almost always is a requirement. People usually want access to their applications with their iphone and in the worst case (the battery just exploded, notebook lost, etc.) from a cybercafé.

Sure, you can web-enable most (business) applications with pure HTML/CSS. But if you take advantage of the power of AJAX (XMLHttpRequest), you can build GUIs with such high performance that it feels (almost) like a regular desktop application and therefore people often don’t even care about installing the available client-application on their office computers. People love it if they don’t have to install anything at all.

I would start with something like that: Imagine you’re abroad and your notebook just fell down the stairs - it’s broken. What would you like to have access to in that situation from a cybercafé. Maybe an address book? Now imagine, that the cybercafé you are into has an awfully slow connection and they charge you a fortune for every single byte that travels their connection. So, your address book should be fast as lightning, means: nothing similar should go over the wire more than once (search box, headers of your address list, pagination elements, etc.). There's nothing that can beat JavaScript in solving this problem.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#27
Learn Unix on a real OS; like BSD or Slackware.

High level programming languages are froth; once you understand the basic concepts, it's best to work with C and system calls til you're absolutely sure what you are doing. Learn how to use a debugger, disassembler, packet sniffer and every utility you can find for creating mischief.

A few books on actual hacking, you know, the "blackhat" kind, might come handy. Hacking tutorials from the underground scene are masterpieces of juvenile bravado but they're written by people with heart. No one in academia or industry has the same passion for computing, or for that matter skill, as those "vandals".

Get a screw driver and take your machines apart (yes, get more than one machine.) Network them. Break them. Boot obscure OSes on them. Get as many computers with different architectures and instruction sets as you can get.

You don't deserve to be coding in a fancy functional distributed language with rad tools. You need to pay your dues first and get your hands dirty.

Your university probably sucks; your professor, your TA and the A-student in your classes are probably all lousy programmers. Your library there is under-stocked. Any industry representative who comes to give a speech about computing is probably a fraud. And once you graduate, or drop out, and make computing a profession; if you ever have to assemble a team of top-notch programmers to work with, the first names to standout will be strangers who you know by their nicknames from underground computing subculture. The guys you see doing interviews and recording lectures in polo shirts and khakis are laughably incompetent, big enterprise or "startup".

Join the demo scene, the amiga scene, the root-kit scene, the virus scene, the calculator hackers, etc. to see what good programmers look like. Real, honest to goodness hacking without blogging, self-promotion or careerist pan-handling. They do it for the love it, them honest thieves.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#28
post #27

Learn Unix on a real OS; like BSD or Slackware. High level programming languages are froth; once you understand the basic concepts, it's best to work with C and system calls til you're absolutely sure what you are doing. Learn how to use a debugger, disassembler, packet sniffer and every utility you can find for creating mischief. A few books on actual hacking, you know, the "blackhat" kind, might come handy. Hacking…

Best advice ever! Unplug from the 'Internets' for a year while you follow this advice or, if you must, only connect with a dial-up modem.

I went with OpenBSD and C++ and that has taught me more about bits and bytes than the college degrees ever did.

Ditch these self-pleasuring technology forums too. They are full of people masturbating their own egos, nothing more.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#29
post #10

Well your coming to that realization 15 years earlier than I did. I developed commercial apps in C/C++ and only recently have discovered lisp and other related languages, and just find them to be much more enjoyable to think and hack in. If you want an absolute mind blowing trip, grab a copy of scheme or a lisp variant such as Clojure [hip at the moment].. and work through SICP - 'Structure and Interpretation of Comp…

SICP changed the way I thought about programming.

Re: Ask HN: Confused semi-newbie programmer needs some advice.

#30

When I started a CS program 15 years ago now our first language was Scheme. This turned out to be an excellent choice, because it put everyone on the same level. The syntax is so simple that those with no experience could focus on the algorithms, and it is a functional language, so those with a lot of experience, typically from imperative languages like C or Pascal, had to effectively start over. So when we later got…

That sounds fascinating. I'll dig through the course catalog and see of there's anything comparable.

If there is, by all means take it. In case there isn't, though, here are some books I've found particularly helpful teaching myself the same material. (This is a lot of reading, and they'll take time to work through. Alternating between studying theoretical stuff and working on real projects will help keep you grounded.)

First off, absolutely get a copy of _Structure and Interpretation of Computer Programs_ (SICP: http://mitpress.mit.edu/sicp/) - this is one of the best books on programming I've ever seen, and while it uses a subset of Scheme, it's really more about major concepts in CS. It's excellent. Do the exercises. It will take a while, but do the exercises.

For C, get _The ANSI C Programming Language_ by Kernighan and Ritchie ("K&R"). Harbison's _C: A Reference Manual_ is a good reference.

If you do real work in C, you might find Lua helpful - it's a C library that provides a drop-in scripting language for C projects. It's a also nice language in its own right, simple but very expressive, and stylistically somewhere between Python and Javascript. (_Programming in Lua_ by Ierusalimschy is the only book you need, though having a printed copy of the reference manual wouldn't hurt.)

Prolog is a fun language. You'll probably need to stick with it a while before it switches from being weird and novel to actually useful, though, and be prepared to be a little disappointed upfront - some of the early AI hype oversold it. It's actually pretty lousy as a theorem prover, but it has a unique programming model that is very powerful for some problems. (It will also help if you want to learn Erlang later.)

For Prolog, I like _The Art of Prolog_ by Sterling and Shapiro. It's on logic & declarative programming as a paradigm, and how well Prolog lives up to it. It's deep, and uses Prolog to teach about programming in general, much like SICP does with Scheme. Highly recommended, whether or not you use Prolog in the long run. (The newest edition is kind of expensive, but you could get by with the first edition. They fleshed out the latter 'project' chapters a lot in the second, though.)

As a reference, _Programming in Prolog_ by Clocksin & Mellish is good. I also liked _Clause & Effect_ by Clocksin; it's sort of like _The Little Schemer_, but for Prolog. _The Craft of Prolog_ by O'Keefe is great, once you're comfortable with the ideas in _The Art of Prolog_.

The thing that made data structures really make sense to me was learning OCaml. (_Developing Applications with Objective Caml_ is free online: http://caml.inria.fr/pub/docs/oreilly-book/) Having a garbage collector helps, and the ML family has powerful tools built-in for working with types and data structures. Doing the exercises for the first three or four chapters of that book is enough, if you're only going to use it to study data structures. (It's a great language, too, though.)

Edit: Added Lua subsection to C.

Post reply on HN