Next programming book

DiscussiePurely Programmers

Sluit je aan bij LibraryThing om te posten.

Next programming book

Dit onderwerp is gemarkeerd als "slapend"—het laatste bericht is van meer dan 90 dagen geleden. Je kan het activeren door een een bericht toe te voegen.

1JDHomrighausen
Bewerkt: jul 27, 2007, 12:55am

Hey all,

I'm a 17-year-old, and I've never done programming before. I just finished a CS 0 book I picked up called Computer Science Illuminated and while it gave a good intro to the subject, it didn't go in-depth on anything.
My next prospective book choice is Structure and Interpretation of Computer programs, since it's free (along with video lectures and problem sets) and it's supposed to be a classic. But I'm not sure if I can handle it - on amazon and on the blogosphere, I found reviews saying it was a great introduction and I found other reviews saying that you shouldn't read it until you've been programming for years. And no, I'm not as smart as a CS major at MIT (at least I don't think so).

What are your thoughts on the book? should I start with something simpler like Perl or Python? I'm taking an intro C++ class this fall anyway, but SICP looks like it goes more in-depth. EDIT: I think what I really want to ask is "What are your thoughts on my reading the book? Can I handle it?"

2andyl
jul 26, 2007, 2:36pm

I think with SICP you are learning far more about programming language theory, structure and design than most other books. It is certainly not a book that just concentrates on teaching a language.

The alternative to SICP is How To Design Programs which is available here.

Both use Scheme as a programming language and other books such as The Little Schemer (and followups) are also good at helping you understand Scheme.

Whilst you are unlikely to end up using Scheme learning it as one of your first languages should give you an advantage when you learn your next language.

3bluetyson
jul 26, 2007, 9:48pm

I definitely wouldn't recommend Perl as a first programming language.

4JDHomrighausen
jul 27, 2007, 2:03am

andyl, thanks for the recommendation! But I already knew about HTDP - it looks promising but how is it different from SICP? I never found anything comparing the two.

Yeah, I'd rather have the programming theory stuff since I'll be learning the C++ and its OOP-related stuff this fall anyway. I want to learn a language in a way that my class won't teach me - the class is most likely going to be one of those "just learning the language" classes since it's a community college class.

I also found this: http://www.scheme.com/tspl3/

5andyl
jul 27, 2007, 4:20am

I've never read HTDP - it isn't really aimed at me (over 20 years of experience using dozens of languages).

There are plenty of people comparing the two, and there seems to be two camps, just google "HTDP SICP". SICP tends to be quicker paced (too quick for some) if that makes a difference to you. It also requires the lecturer to supply some bits of knowledge - namely bits on large scale program design.

6JDHomrighausen
jul 29, 2007, 1:39am

"SICP is for training computer scientists, while HTDP is for training good programmers.

So if you just want to implmenet new versions of the software we already have, in a new lanaguage HTDP will help you produce better, easier to maintain code. If you want to change the world, and create something new, you need SICP. "

http://www.thedesignexperience.org/weblog/one-entry?entry%5fid=90535

I can see why SICP is more for you! Okay, thank you for the advice.

7wyrdchao
aug 21, 2007, 10:45am

Learning Perl now would probably just teach bad habits (heheheh)...

I was MOST impressed with Dan Gookin's C for Dummies, believe it or not. Gookin is a hilarious writer and a great teacher. There are two print volumes of the book, and Gookin put the third on his web site for free.

C is good for developing good practices for modularization and data structures, and there are literally billions of algorithms out there for it. Straight C isn't used much, but C++ still is.

8bvs
Bewerkt: aug 21, 2007, 6:12pm

> "What are your thoughts on my reading the book? Can I handle it?"

I am sure you can handle a lot of it. Though I'd recommend you buy a hardcopy if possible. Even if you do only a fraction of the exercises, you will become a superior programmer -- but perhaps one with a lot less patience for languages like C++!

SICP is really about programming & problem solving. Its authors use Scheme as a medium to express their ideas and they cover a wide range of problems. What I like is that they show how easy it is to go from programming something simple to something that would stretch your brain.

Don't go believing labels like "only for computer scientists". Decide for yourself whether it is right for you by trying it out! If you get stuck you can ask for help on comp.lang.scheme

9Molave
sep 9, 2007, 1:18am

For what it's worth, I found this free ebook helpful when I was just starting:

How to Think Like a Computer Scientist: Learning with Python by Allen Downey

It's also available online at

http://www.greenteapress.com/

10caseydurfee
sep 9, 2007, 5:09am

I second Molave's suggestion. I learned Python from that book. I think Python is by far the best language to take you from being a beginner to being an expert. It's probably the easiest language to get started with, and at the same time, one of the most abstract and powerful.

11felius
sep 9, 2007, 8:52pm

Re: #7, I keep hearing that straight C isn't used much these days.. perhaps that's true, but you should also consider the places where it *is* in use. For example: Linux, Apache, PHP, Python and Perl are all written in C. Knowledge of C is still very useful, even if new projects are likely to be implemented in something else.

I'd have a bash at SICP if I were you - it's been on *my* "must read" list for a while now. Worst case is that you struggle ab it, and have to learn more in order to keep up with it - and surely that can't be a bad thing!

I predict that the fact that you're even looking into this on your own means that you'll be miles ahead of the class when you start your Intro to C++ course.

12JDHomrighausen
sep 9, 2007, 11:51pm

Bwahaha, except I haven't started the book yet. Been too busy reading ancient scifi stuff. And my must read list is SOOOOO long; I seem to have an internet addiction so book-reading time is diminishing. Some days I spend less time reading than I do talking about reading on LT. :-)
Thank you.

13wyrdchao
sep 12, 2007, 1:52am

11>

Well, I guess I should have qualified my statement (about the use of C) a little... C and Perl are my primary languages, for pure love as much of anything; I do a lot of CGI programming, and to teach myself the basics of CGI I wrote my own (very rudimentary) HTML libarary. CGI.pm (the old Perl module) is my what I use for most stuff now, mostly because it doesn't take long to build stuff in it, and there is so much existing code.

But if I ever ran into an application where performance was an issue, I'd probably turn back to C.

14WorldMaker
sep 12, 2007, 3:58pm

I think Python is a great language and quite possibly a good place to start out. If you want to learn it I've found Dive Into Python a nice read (also available online at diveintopython.org). It assumes some knowledge of programming, but I don't think in the case of Python that should be much of a hurdle. Also, PyGame has a ton of very friendly tutorials out there. It's a very simple game programming library for Python so there are some cool things to do with it.

Before you learn Perl I would suggest learning Ruby (or for those that know Perl I've heard there are a lot of good reasons to switch). I personally don't have a taste for either language (Ruby reads like Japanese and Perl reads like Garbage to me), but anyone that wants to play with Ruby you can't go wrong with Why's Poignant Guide to Ruby (online only book). Why the Lucky Stiff also has put some interesting work into Hackety Hack, which is a combination text-book and experimentation environment targeted to people of all ages.

15felius
sep 14, 2007, 8:13am

Listen to #14 - Dive into Python is excellent, and Why's Poignant Guide is, quite simply, a work of art.

16wyrdchao
sep 14, 2007, 9:42am

12>
Another question to answer is, what do you plan on doing with whatever language you learn? Python certainly looks like a great first language ( I went ahead and browsed the first half of How to Think Like a Computer Scientist ), but if you really get hooked you will probably end up learning several languages of the course of your 'career', depending on what kind of projects you do.

I seem to be in a minority here, preferring C and Perl; I admit that the learning curve on C/C++ is steep, and that Perl CAN certainly look like 'garbage' (although good style can fix some of that). But both languages are great for combining low- and high-level elements: you're less likely to have to change languages if you move from, for instance, systems programming to CGI.

Once again, Python looks great for beginners, but..
What do you the rest of you guys use Python for?

17andyl
sep 14, 2007, 11:10am

Firstly, good programmers should know more than one or two languages anyway. So people shouldn't worry about learning more than one language. As someone who has been developing for quite a while I have used plenty of languages.

By picking languages that use different paradigms it helps you think about problems in a new way.

Secondly, python is a very good language both for beginners and for more experienced developers. I know of a number of real world projects that use it extensively for example The International Plant Names Index at Kew. I would have no hesitation in considering it for most of the same kind of tasks as perl and ruby. All three are pretty similar (although ruby is better at a few things which I won't mention around beginners) in approach and ability.

18WorldMaker
sep 15, 2007, 3:57pm

I vehemently agree that in my esteem the best sort of programmer is one who can work in whatever language is at hand and can, for the most part, pick up a new language over breakfast. Languages are transient tokens of thought patterns and paradigms more than the fortresses of seclusion and walls of interest some take them to be. Know the essence of an algorithm and let the language come from the practical application and the current physical need.

16: »Once again, Python looks great for beginners, but..
What do you the rest of you guys use Python for?«

I've been using Python as my sole web programming language for over a year now having abandoned PHP as an awful sordid hodge-podge of a language. I'm quite taken with the Django Framework, personally, but I realize there is a wealth of goodness in other Python frameworks and Rails doesn't suit me but I recognize it's power. I think, IMNSHO, that anyone still writing web applications in PHP or Perl is seriously behind the "power curve" in terms of coding bang for man-hour buck. (...and then there are the special circles of the Inferno reserved for most of "enterprise Java" or (shudder) ColdFusion...)

I've also been using Python as a very handy inference tool, glue language, and ad hoc testing language within the scope of my "real" work in C# (IronPython is a tool that I think just about anyone working in .NET should have handy, and if not IronPython then at least Boo or IronRuby).

For completeness, I've also been using a lot of Lisp lately for University assignments as something of a personal challenge, but that hasn't been much of a challenge due to the simple syntax and amount of influence Lisp has had in "modern" languages like Python and C#.

19WorldMaker
sep 15, 2007, 3:58pm

18: Hmm... Lay off the books on magic for a bit, why don't you? Hmm...

20wyrdchao
sep 15, 2007, 11:49pm

>18 WorldMaker: By 'writing web applications', do you mean CGI or scripts? I'm a server-side guy, so I steer away from embedded scripts; most of my customers have pretty simple needs and I like the page source to be nice and clean.

Is there really a lot of difference between Python and Perl from a CGI standpoint?

LISP/Scheme has always fascinated me. Never seem to get time to really dive into it tho...

21andyl
sep 16, 2007, 4:21am

20>

Not that I want to talk for WorldMaker but I see web apps as being quite a bit more complex than most CGI written stuff.

For example one of the apps I have written (in Java - which isn't that bad if you use the write tools and frameworks) allows the customers to create an electronic record of contracts, with prices etc. In short it is something that traditionally would have been a thick-client - database input, reporting and export to other systems. I have also written web-based apps that periodically run a job (just like cron) in order to scan and import files. The data input screens are far more complex than what could automatically be generated from a schema.

Both scripts and CGI is not applicable for this kind of stuff - it would be too messy and take too long - you need the power of a full featured MVC framework whatever your language.

22JDHomrighausen
sep 16, 2007, 12:20pm

>12 JDHomrighausen: wyrdchao

Another question to answer is, what do you plan on doing with whatever language you learn?
I just want to give my brain a good workout. I don't have any applications in mind.

23WorldMaker
sep 16, 2007, 4:12pm

20: »Is there really a lot of difference between Python and Perl from a CGI standpoint?«

From what I've seen there is a great world of difference. andyl in 21 basically gets to it. A good web framework nowadays gives you a full MVC (or similar abstraction) stack of all the things you need to not just handle a web page or two but an entire web site as an entity composed of applications with clear separations between business logic and display logic and presentation. Most modern frameworks give you a handy object-relational mapper, a useful template language, a simple way to map between page URLs and applications/events/objects, etc... It becomes extremely easy to work with big database-heavy applications with very little code that ultimately more resembles how you would build a "traditional" application than pure CGI programming.

If you haven't, take the time to read through the Django Framework's Tutorial or watch a few of the Ruby on Rails screen casts, then compare that to your current Perl development routines.

24wyrdchao
sep 17, 2007, 12:29am

23> Sorry for the confusion, your explanation cleared me up...

Personally my needs are a lot simpler; and I have a peeve against plugging in huge blocks of code that are basically a 'black box'. On a more practical level, I have definite hardware/bandwidth limitations.

If my customers DO get more ambitious (which could happen), I will definitely be looking into Ruby, as long as I can be sure about stability/security.

25wyrdchao
sep 17, 2007, 12:34am

22> Listening to us wrangle will certainly give your brain a good workout (hee).

Just start programming in whatever you know now, would be my advice. Put Linux on some old junk box and use that (if you are comfortable with command line), or install a good distro of Python or Perl on a win32 box. Any good open-source distro will come with good documentation; I certainly recommend the Python book mentioned several times earlier here.

How do you pick a project? Anybody?

26WorldMaker
sep 17, 2007, 3:54pm

25: »How do you pick a project?«

That's certainly a philosophical problem. If you mean "How do I prioritize amongst my projects?" I don't think I can help all that well with that one. If you are looking to find a project, I think that the problem is often that a programmer has too many project ideas... If you run out you can usually find a colleague with a good idea or two that you could help with or help take over/productize.

On that subject, I think that every day it becomes easier for a new programmer to find an interesting "apprenticeship" to grow their skills. There are so many interesting, mature open source efforts that someone looking to learn can easily join and get some real, good experience, and finding one is just a matter of searching your computer for the open source programs that you use or searching SourceForge or Google Code or Freshmeat for some project you are passionate for. Even if you didn't think your code is up to the quality bar of a project it never hurts to examine the bug/issue tracker and offer what patches that you can. Often even if your patches don't get accepted you can get valuable feedback in the code review as well as helping lead the project's primary developers to any sort of a solution at all on an issue. (Sometimes it helps you to see how someone else would approach a problem to get an idea of how you yourself would solve it.)

But there are ways to contribute to any code project that aren't coding that can immensely help your own skills with coding:

1) Read all the code that you can. It's a Python mantra that "Code is read much more than it is written", and I have found that to be true. So often people tell you to practice writing code, but you can get good results from just focusing on reading it. Pull down the source to some large, mature open source project and browse through it. Get to know it well and to wrap your head around it. Go through the issue tracker and the listserv and provide what comments you can on the patches attached, and maybe the issues themselves. Even if you can't write good code, get to know deeply what bad code looks, tastes and smells like. Triage, reproduce bugs, and test whatever you can. You should probably add the RSS feed for WorseThanFailure.com to your reader, if you haven't already.

2) Write documentation. Just about every coding project on the face of the planet is under-documented somewhere. If you can read code well and get the general gist of what the code is meant to do, how it works, where it's implementation faults lie (as in the obvious trade offs: is it fast but not very "smart"? Can it handle anything but the phases of the moon but takes forever?) and write those down. If you have any skill in English just about every project on the face of the planet will be extremely grateful for any decent documentation additions, cleans, clarifications. Even just going through existing code and add clarifying documentation comments and submitting those patches can sometimes be a big help, particularly in those dusty corners of source code that haven't been looked at/revised in a long time.

27wyrdchao
sep 18, 2007, 9:11am

>26 WorldMaker: Good points, and something that certainly is not taught in class! Reading code (quite a trial in assembler, C or Perl, but.. part of the challenge) will definitely teach things you didn't know before... like how crappy a lot of existing code is! Also good for training yourself for those 50 hour debugging sessions...

Lastly, reading code FORCES you to see the value of documentation. Steve Gibson (in the last Security Now! podcast, #109, link below), an assembly programmer, talked about how heavily he documents his code; anyone who's done assembler can tell you that even the most bone-headed routines look like gibberish.

Gibson began this habit simply so he could go back later and understood what he did; as with all of us, he has (well, had) exaggerated ideas of his genius and had to learn the hard way that even HE wouldn't be able to read his code after a lapse of a few years.

http://www.twit.tv/sn

28dbell154
Bewerkt: sep 21, 2007, 11:28pm

One important thing now is not just being able to code in different languages, but to use multiple languages in the same application.

For a website, you have to know html, css, some scripting language like php or asp, maybe some javascript, and sql; and maybe throw in a few perl scripts.

If you're building a database, you may have to know VBA and its nuances based on what libraries of functions you use, as well as sql again.

It not just about knowing a set of languages, but you also have to be able to learn new languages as you go along. A good start would be C/C++, Basic, SQL (database) and html/xml (markup). I think you'll find that most other languages are based on, or related to these language styles. The best way to learn is to get in there and do it.

29modalursine
Bewerkt: jan 18, 2008, 10:41pm

The way to learn programming is to program.

Pick a programming language which is free and freely available so you can set up your own development environment and start programming.

It almost doesnt matter which language you start with. If you're serious about programming you will want to know quite a few languages before you're done.

You'll hear a lot of talk from true believers about how this or that language will ruin you forever, or how some other language is the one true way. Its all balderdash.

You can know I'm not BSing you by considering the following:

The fellas that invented the true language A, or those who say that language X will ruin your brain forever.....what languages did they start with? Not A or they couldnt have invented it any more than Lincoln could have been born in a log cabin which he built himself. And yes Virginia, they probably know X. If they dont, how can they say it ruins your brain?

Dont fall for that malarky.

That said, there are some practical considerations. By now, certain languages are oldies (if not goldies) so I'ld probably stay away from COBOL or even ADA.

By now even PASCAL may be too long in the tooth to think about, though I suppose it still has its boosters.

There are some languages that are strictly "niche" things... I'm thinking APL would probably not be your first choice. much less forth.

There's a whole lot of good reasons to start with a modern object oriented language such as Java , Python or Ruby. They are used LOTS so not only are you learning how to program, you then have bragging rights to an actual commercially used language.

On the third hand, you probably will want to learn perl some day, so why not now? The camel and llama books are great ways to get into the language and start writing real acutal programs on day 1.

Nothing wrong with Eiffel, Smalltalk or Scheme, but they are less used commercially so maybe the time spent learning them wont lead to good jobs at high pay real soon? (well, in the long run, maybe, but not as a newby).

Oh. You might want to look at programmer oriented magzines (Dead tree editions) such as Dr Dobbs and so on. Back issues too.