?

Log in

No account? Create an account
 

how to be a programmer? - silver Harloe

About how to be a programmer?

Previous Entry how to be a programmer? Aug. 15th, 2006 @ 01:46 am Next Entry
In a forum I'm on, someone asked what to study to be a programmer. Here's what I replied in a sort of off-the-cuff manner, but I should like some feedback into forming a better reply for future use.



From a practical "I want a job in programming" sense:

briefly cover assembly language, and then learn C. not because you'll get a job programming in it, but because the best programmers of other languages understand the Heart of the machine.

then learn Java and/or C#, because those are where the jobs lie. if you like, you can read some chapters on how C++ is related to Java and C#, but that's an afterthought, unless you want to develop in C++ (which means almost exclusively game programming these days) - but you won't understand C++ without knowing C thoroughly and knowing the OO principles learned in studying one of the other two languages.

then go back and learn Lisp, because there's so much theory of programming to be learned from understandng The Lisp Way.

next, study some SQL. It's not really a "programming" language (unless you write a lot of stored procedures), but knowing how databases work is important to real development. Similarly, at least in today's environment, some knowledge of XML parsing is handy to pick up, even though it isn't real programming.

in today's job market, you must also know HTML and CSS backwards and forwards. it helps to learn a lot about javascript (though that is a tangled mess of "which browser supports which function?"). this isn't real programming (except for complicated javascript), but it's really important in 90% of jobs.

learn to use well the *n*x command-line utilities "find" and "grep" (and several others those imply such as xargs and cut). Even if you're going to be a Windows programmer, learning about how operating and file systems are practically used by users will leverage well for many tasks.

Finally, if you have time, study a little Prolog. Just to break your brain. But it will also help you read Makefiles better.

If you've got a basic understanding of assembly language; a thorough understanding of C, plus one of Java or C# or C++; an acquaintance with
SQL, XML, and HTML/CSS/javascript; and a passing knowledge of Lisp and Prolog and *n*x shell usage, then there's no programming job you need fear take, even if you haven't even heard of the language used.

I have interviewed many people who knew Java Very Well, but had no f-ing clue how anything else worked, and frankly, such people were useless to me. I work daily with both low and high levels of the system. While I'm never called upon to use any assembly language knowledge, all the rest comes up at least once a week. And the assembly language knowledge still informs some decisions here and there.

(And I mostly program in Perl. but Perl is just a mishmash of C, C++, shell, and Lisp (Lisp may seem counter intuitive to list here, but the best use of Perl's dynamic arrays and the "map" and "grep" operators comes from a good Lisp background)).

you may not like this answer, but based on practical field experience, it takes years to even be a vaguely useful programmer. and time spent on visual basic doesn't count towards those years.
Leave a comment
(Deleted comment)
[User Picture Icon]
From:jonabbey
Date:August 15th, 2006 03:47 pm (UTC)
(Link)
I'd say that time spent on visual basic certainly should count towards those years. I started coding in BASIC in 4th grade (26 years ago), and I mark that as the start of my training.

Overall, I think you've got a pretty fair list here, but I'd kick in a soupcon of Python and/or Ruby, to smoothe things out. Perl is great, but I'd hate to have to try to learn closures-with-object type stuff and the Perl syntax nightmare simultaneously.

Kudos++ for leaving out the Modula-2, though. Remember that? Brrrrr.
[User Picture Icon]
From:cratermoon
Date:August 15th, 2006 05:03 pm (UTC)

Data Structures

(Link)
You were close to them when you mentioned Perl's dynamic arrays, but they are almost so basic we forget they were learned, too. No one ever writes their own data structures after school, but knowing how to use them and which one to pick for which problem is important. Fixed-length arrays, vectors (resizable arrays), b-trees, linked lists, hashtables, and less often graphs. You can't swing a dead cat without hitting a hash in Perl, which may be why idiomatic use of them makes us forget we're using a data structure.

Functional programming generally is useful, and while Lisp is certainly the king of the domain, it's not the only game in town. Any language, including say Ruby and Javascript, in which you can create anonymous functions and use them as first-class entities is good practice. In some respects a function used this way is just an object without a class, no instance vars, and only one method. Anyway, run, don't walk, to get Peter Seibel's Practical Common Lisp if you want to go this direction.

Recursion. Know it forwards and backwards. (Get it? Ha ha).

Beyond the core technical knowledge, a lot could be said about the practice of developing software. Things like source code control (the stories I could tell), build tools (make and Ant) and practices, and useful expertise with a programmer's editor.

I must mention my personal crusade: Code Reading. Even among decent programmers this skill is generally far below what they should be. We wouldn't expect a good novel out of a writer who didn't have the skills to analyze Moby Dick (for example), why do we expect quality applications from developers who can't be bothered to learn to understand a body of well-written code? Acknowledge that a) most of our time is spent working with an existing body of code, adding features or fixing bugs, and b) most software documentation is an inadequate substitute for the source. Find an open-source project that interests you and understand it well enough to have patches accepted by the maintainers. Probably the best resource on this is Diomidis Spinellis'
Code Reading. Someday I hope that programming courses incorporate a section where you are given a piece of software and are asked to write a short document on what the important data structures, algorithms, coding methods and style, patterns, etc.

You might like to read The Five Essential Phone Screen Questions and Peter Norvig's Teach Yourself Programming in Ten Years.
(Leave a comment)
Top of Page Powered by LiveJournal.com