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.
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?"
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.
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/
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.
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. "
I can see why SICP is more for you! Okay, thank you for the advice.
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.
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
How to Think Like a Computer Scientist: Learning with Python by Allen Downey
It's also available online at
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.
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.
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.
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?
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.
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#.
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...
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.
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.
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.
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.
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?
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.
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.
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.
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.