Slashdot Mirror


Think Python

An anonymous reader writes "In a neverending effort to spread the word about free quality online programming books, here is a Python programming book. 'How to Think Like a Computer Scientist: Learning With Python', by Allen B. Downey, Chris Meyers, and Jeffrey Elkner is a copylefted work available in multiple formats at Green Tea Press: HTML , PDF, LaTeX. Compliments of the online books what's new page."

200 comments

  1. There are other books in this series by Tonetheman · · Score: 3, Informative

    This books has been translated to other programming languages (like C++ and Java)... so if Python is not for (it should be) you can read those too.

    1. Re:There are other books in this series by abdowney · · Score: 2, Interesting

      Hi. Thanks for mentioning the other versions of "How to think..."! Actually, the Java version was the original (I used it at Colby College) and then I wrote the C++ version to help students prepare for the AP exam. Jeff Elkner translated the Java version into Python, and Chris Meyers translated some of the later chapters and added some new material. So the Python version is truly the result of a Free Content collaboration (I have never met Jeff or Chris in person). I am in the process of editing and expanding the Java version, in preparation for the AP Exam's switch to Java. The web page for the Java version is: http://thinkapjava.com Cheers, Allen Downey

  2. "Think Python" by LatJoor · · Score: 2

    At first it looked like you were talking about a new IDE for writing Python programs ;) Anyone remember Think Pascal?

    1. Re:"Think Python" by cant_get_a_good_nick · · Score: 1

      I can't find my "learning to program the Macintosh with ThinkC!"

    2. Re:"Think Python" by quasi_steller · · Score: 1

      Ah, Think Pascal. The memories. I first learned to program with Think Pascal in High School. :)

      --
      ...interesting if true.
  3. How to think like a computer scientist by SpatchMonkey · · Score: 1

    Sounds like a good read for anyone who thinks that 'computer science' is 'installing Linux and setting up a web server'.

    The most pure computer science is essentially mathematical at heart. I don't think current CS curriculums put enough emphasis on that basic tenet.

    1. Re:How to think like a computer scientist by affenmann · · Score: 4, Interesting

      I think part of the problem is the name `Computer Science', which gives a wrong impression of what the core of the poodle really is. That's like calling Astronomy `Telescope Science'. I have met so many people who didn't want to study CS at all - they just wanted to learn `installing Linux and setting up a web server'. This has regrettably put universities under pressure to change their curriculum...

      Some universities (eg. Edinburgh) have started calling it `Informatics', which is much more appropriate. (In fact in Germany, and probably elsewhere, it was always called `Informatik'.)
      Maybe there should be CS *and* Informatics.

      Uhm, guess that was offtopic.

    2. Re:How to think like a computer scientist by unixmaster · · Score: 1

      Well as a CS student what I can say is CS always mess with optimization in the first hand
      And a basic programming language like C/C++
      Hardly ever the idea is to teach a language but how to optimize things

      --
      Never learn by your mistakes, if you do you may never dare to try again
    3. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      As someone who has a Computer Science(CS) degree and worked in the IT industry for 17 years, I am not sure what the relevance of a CS degree is to modern IT. Most companies do not use what is taught on a CS course and so from that perspective it is a waste of time. However it is useful if you want to move from country to country. Finally I could not install Linux and set up a web server.

      Steven the Anonymous Coward

    4. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      Yes, a CS degree from the 1980s probably is worthless in today's IT industry.

      As for today's CS degrees - well, it depends on the degree and what you will be doing in the industry. The best ones I've seen give you a bit of everything to broaden your knowledge.

    5. Re:How to think like a computer scientist by N473 · · Score: 1

      I am the Sr. programmer where I work. I only have an associates degree (well, and 3/4 a bachelors in IT, plan to get a masters in CIS eventually...). I have been programming since I was eleven or twelve, 15 years ago. I do quite well without the degree.

      I honestly have not learned very much in a classroom setting. Almost all of my programming skills are self taught. I am not saying a CS degree is useless or that I don't secretly wish I had gotten one before I got married and had bills to pay, just that you can get hired as a programmer and write some nifty apps without one.

      I personally hate math. But for some reason, when I am expressing equations in code, it is a natural thing I don't think about. If I had to take a math test, however, I would probably do horribly.

    6. Re:How to think like a computer scientist by vofka · · Score: 2, Insightful

      True 'Computer Science' covers a lot of areas, mostly fundemental, including Computer Theory, Electronics, Mathematics, Logic, Processor Theory and Design, to name but a few.

      The majority of today's CS Courses seem to fall into two broad categories, 'Software Development', and 'Systems Management'. Whilst these are both elements of computer science, they do not encompass computer science as a whole.

      Universities are more and more often cutting out the core Computer Science components of their courses, such as Electronics and Computer Thery, which is a shame - whilst the courses leave graduates with an understanding of 'How' to do certain tasks, they are left with no understanding of 'why' they are done that way, because they have no real understanding of how the Computer Systems they are carrying out tasks on actually perform their functions.

      NDFSM's are important, Karnaugh Maps are important, Understanding the CPU F/E Cycle is important too - bring back real CS to our Universities!

      --
      Disclaimer: I meant what I thought, not what I wrote! What? You can't read my Mind? Oh dear!
    7. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      WTF? Is English not your native language? That did not parse correctly!

    8. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      There's more to CS than programming. I expect that the programming job you do does not involve many challenging concepts, otherwise you would surely recognise the value of learning CS to a greater depth.

      (On a side note, I work with a guy who is an okay programmer but doesn't have a clue about mathematics. He had to write some SQL the other day that updated a table by calculating percentage discounts, and didn't even know what numbers to multiply.)

    9. Re:How to think like a computer scientist by Anonymous Coward · · Score: 1, Interesting

      The lower-level concepts you have described probably fit better into a degree of Electronics and Electrical Engineering than Computer Science. Indeed, the style of EE courses has shifted from electronic component based logic to programming in languages like C++.

      In many ways, CS and EE are extremely similar.

    10. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      Oh, I think they do--if the amount of Math courses I have to take is any measure.

    11. Re:How to think like a computer scientist by Anonymous Coward · · Score: 1, Interesting

      I wouldn't make a broad statement that CS is lacking in CS degrees... I know my CS degree contained:

      Computer theory, system design and architecture, analysis of algorithms, algorithm design, data structures, compiler design, AI, networking theory, files and databases, mathematics (up to multi-variable calculus, discrete structures/combinatorics, linear algebra, numerical analysis, statistics and probability), software engineering, languages (LISP, C, C++, Java, Prolog, Cobol, Assembly), computer graphics, to name a few things - there's more but it's been quite a few years and that's what comes to mind at the moment. I'd say that's pretty well-rounded for a CS program.

    12. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      I'v yet to find one of my "Computer Science" acquaintences (who deserves the title) who thinks much of Python.

      Perhaps if you took Python as "the way NOT to design a language" you could learn some Computer Science.

      Wanna learn CS language principles? Read Knuth, GoF, Wirth, Djikstra...

    13. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0
      WTF?
      Is English not your native language?
    14. Re:How to think like a computer scientist by NorthDude · · Score: 1

      Reminds me of those day when I was still going at shcool...

      I was in college, and we were there, learning about pointers, assembly, C/C++, java, Database systems and etc etc.
      I really enjoyed all that, but I had been left with the impression that something was missing.
      I started to work, everything was fine and I was even quite good at what I was doing. Then I began to read about algorithm and design patterns. I had learned more about what I was doing reading this king of book then I ever felt I had learned before.
      Being on a "learning rush", I reently decided to go deeper into mathematics, basic physics and some compiler/kernel and other things like that.
      There's nothing in all that which I had to use directly in my everyday job, I'm doing some java on AIX stuff for now, but I feel that I have better control over what I'm doing.
      I do better algorithms, sometimes I even rewrite some part of code based on what I have read in some maths book. Nothing really complicated, it is just better written in the end.

      All that to say that when I was still in high school, I was pretty good at maths/physics/chemistry, but I just hated it. It was just to abstract for the kind of person I am. I like when things can be applied to things I know concretly. What I would say now, to those young people who would like to become good programmer is to read about algorithms as soon as they know the basics of programming. Read that side by side with your maths books and you will see that a lot of maths concept are going hand in hand with computers and programing. And it is the hell a lot more fun that way! And in the end, you will only be better at making relations between an everyday problem and the theories you learned at that time, and you'll then write better algorithms yourself.

      Well, just my 0.02 CAN$ ;-)

      --


      I'd rather be sailing...
    15. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      Is English not _your_ native language? Are you dyslexic? You can't decode a simple acronym? Amazing the number of illiterate blundering idiots (or Americans, these are synonymous phrases) that read Slashdot!

    16. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      Listen up with your false information; I have been workng with C and assembly since I was roughly 8 years old (assembly started at 9, I apologize) and I will say a few things to correct this man. He seems quite informed and has a good base; and I would agree a powerful basis in math will take you far in this field [programming], but after reading the "Dragon Book" and such, I find I am able to produce optimized, good code with less mathematical knowledge. I am probably one of the few now 12 year olds that can honestly say they have written a working operating system by hand that runs a plethora of GNU utilities and compilers.

      No, I'm not releasing it open-source because of the implications. Sorry. Perhaps I will release a binary shortly. I'll post on this thread in the next week if I do.

      My $0.02 CND as well :P.

    17. Re:How to think like a computer scientist by NorthDude · · Score: 1

      I'm not impliying that you have to do a Ph.D in mathematics to be good. What I say is that a solid base in many science is helpfull. By the way, compiler optimisation involves a lot of maths, unless it has change lastly... All great algorithms ever produced are based on maths. Music and Image compression and more generaly, computers would not exist without maths. Yes, you can be gould with out it, but being good in maths WILL help for sure. Physics, even only basic knowledge in physics is essential if you want to do almost any good simulation games. I'm not doing this kind of software, but it sure help to open my horizons.


      And by the way, genius, if you started learning C and Assembly at 8/9 years old, read the Dragon book since and wrote your own OS, all that and you being only 12 years old, you should really release your work (even if it is closed sources) to the public. Unless it is just a plain lie, you have an amazing future in CS in front of you and I'm sure some people with more money then me would like to sponsor you.

      OTOH, if its just a plain lie, go sleep, it's almost 7h30PM and South Park is not the kind of things you should look at anyway. And don't forget to brush your teeths!

      --


      I'd rather be sailing...
    18. Re:How to think like a computer scientist by Micah · · Score: 2

      my local community college puts stuff like Introduction to Microsoft Word under Computer Science! gaaaaaaaaaaaa!!!

    19. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      Edinburgh doesn't teach computer science any more. It teaches Word Processing with How To Throw Together A Few Lines Of Code. That's brought the number of UK universities which actually teach proper computer science down from four to a rather paltry three. It's a great shame, really; without a pretty decent knowledge of computing as a science, any kind of software engineering is pretty tricky.

    20. Re:How to think like a computer scientist by JohnsonWax · · Score: 3, Interesting

      I think part of the problem is the name `Computer Science', which gives a wrong impression of what the core of the poodle really is.

      Well, yeah.

      I'd make the following analogies:

      • Computer Science ~= Physicist
      • Software Engineering ~= Electrical Engineer
      • Informatics and Coders ~= Electronics Technician

      CS is a science that deals with unravelling how information and logical systems function and developing frameworks to understand them. CS are most likely to determine the boundaries at which things can happen and to lay out how to practically approach that boundary.

      Software Engineering is an engineering discipline that deals with manipulating those systems to perform a needed task. They take the work of the CS and design systems to address specific problems. Quick and dirty is just fine, provided that all the needs are being met.

      Coders assemble the systems that the SEs design and informaticians maintain those systems.

      There's overlap among all of them to some degree, and plenty of people do them all, but from an education point of view, if you mix them together, you get a mess - and most schools mix them together. It was easier to mix them in the past because the field was narrow. But now, you just can't do it.

      CS has become very deep, and you can't get into any of the real work if you spend your time dealing with SE and coding practices. SE has become very deep as well and you don't want these folks getting bogged down with the NP completeness proofs and whatnot, or with learning the programming tools too much. There's enough to do in all three areas that they need to be treated as different but complementary disciplines...

    21. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      There's already a word for it, and it's IT, right? Isn't CS = software developement, etc, and IT = `installing Linux and setting up a web server', network adminstration, etc.

    22. Re:How to think like a computer scientist by sg_oneill · · Score: 2

      I'm gonna make a bold claim with the electronics bit, but it's kinda.... easy. I do think it should be taught, though. I'd never really played with electronics much until a recent embeded project at work and the EE's from the lab came in and started drilling me on , like , what sorta DAC's we'd be using and the like. Out came the books. The thing that struck me was how easy it was to schematify a little circuit up (ignoring ugly stuff like, oh say resistors and the like!) that I could give to the EE's to make into real toys. But that's because back in the day we actually learned how this stuff fits together. Really, if one can understand the finer points of stack tuning then figuring out that one needs to provide a latch to a parallel thinger is not too hard. real CS rocks, and amazingly once or twice in a career it actually gets used.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    23. Re:How to think like a computer scientist by sg_oneill · · Score: 2

      I think one of the amazing things about being an Adult is that at school, I remember hating math and the like. Nowdays I really find it interesting. Peg me a geek perhaps, but I actually find it interesting. In school , pot & females sorta distracted from it all, but yeah, being able to confound the boss with some whacked out equasion does have it's bonuses, and sure, knowing *how* to figure out whether to unroll that loop is a handy thing.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    24. Re:How to think like a computer scientist by Anonymous Coward · · Score: 0

      what should they put it under?

  4. Thanks to Online Books by Taco+Cowboy · · Score: 5, Interesting



    Thanks to Copylefted Online Books, I now can read the books before I buy.

    On my bookshelf, seven of the books were bought after I read their online version.

    I live in a third world country where there is no Towers bookstore, nor Borders, nor Barnes - there is NO WAY for you to know how good a book is without first buying the book - the bookstore here do NOT allow you to read the book !

    The idea of Copylefted books really help me, and many others who are in the situation of buying books not knowing if the books are good or not.

    Thanks again !

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Thanks to Online Books by Gaetano · · Score: 3, Interesting
      Another option for you may be to subscribe to a service like Safari from oreilly. I subscribed and use it daily. Basicly you can check out books from oreilley and several other publisher for 45 days at a time (when you can then check them back in if you want another book).

      Its not too expensive compared to how much technical books cost in some countries outside the US I have visited. The Safari service is about 10 dollars a month (US) for 5 books and 15 dollars for 10, and so on.

    2. Re:Thanks to Online Books by Anonymous Coward · · Score: 0

      Well, if you want to be pedantic, there are no third world contries, since we're all on the same planet. Or we're all third world countries, depending on your POV.

    3. Re:Thanks to Online Books by Anonymous Coward · · Score: 0

      Well, supposing s/he actually wants to move to another country, there's a lot of obstacles to that. Just to mention a couple, getting the money to leave (it's multiple times harder when you come from a third world economy to a first world one, as things are usually more expensive (in an absolute measurement, not when compared to the money you make IN the country) in the magnet country) and being actually accepted to the country. All of these could be extremely easy in some cases, extremely hard in others.

      Furthermore, as I hinted above, maybe s/he doesn't want to leave the country, and there could also be several reasons for that. I certainly wouldn't leave my home country ONLY because the bookstores don't let you read the books.

      Maybe the solution is to stay and improve the country. [note: MY choice was to leave (and I like to think I have the long-term goal of improving the world as a whole)]

  5. Question by citizenc · · Score: 3, Insightful

    Am I the only person who thought the title of the book was "How to Think Like a Computer Scientist: Learning With Monty Python"?

    Man, it's early.

    1. Re:Question by Anonymous Coward · · Score: 0

      Yes, you are. Go back to sleep.

    2. Re:Question by JonahC · · Score: 1

      You aren't totally crazy -- that's actually where the name "Python" came from. In fact, Guido van Rossum (the creator of Python) strongly encourages the interspersion of Monty Python references into the comments of Python programs :-)

    3. Re:Question by Anonymous Coward · · Score: 0

      *sigh*

      Which is why decent programming languages like Python will forever be the haunt of wierdo nerds. Monty Python, indeed.

    4. Re:Question by Anonymous Coward · · Score: 0

      Burma!

    5. Re:Question by Anonymous Coward · · Score: 0

      *POKE him with the soft cushion!*

      Which is why decent comedy series like Python will forever be the haunt of wierdo nerds. Programming languages , indeed.

  6. Dive Into Python by jonwiley · · Score: 4, Informative

    Another excellent free book for Python is Dive Into Python by Mark Pilgrim. It is available in HTML, PDF, Word 97, Windows Help, plain text, and XML formats.

    This book has plenty of examples and pointers to further reading on each subject. It features good layout, use of colors, and typography which makes for easy reading and comprehension.

    1. Re:Dive Into Python by blackcat++ · · Score: 1

      Yes it is, although it should be noted that the author uses Python under Windows, so additional help and tips are mainly relevant for that platform.

  7. Re:How about a "Think Perl?" by josu · · Score: 0, Troll

    I don't think that's possible.

  8. Perl? by jjsjeff · · Score: 1

    Are there any free Perl books out there like this one for Python?
    I haven't done any Perl or Python before and I wanted to look at both before I pick one and use it primarily.

    1. Re:Perl? by PythonOrRuby · · Score: 2

      Not really. Syntactically they are different, and Python certainly has some conveniences(named parameters come to mind as a big one), but the underlying ideas are not incompatible.

      Both actually have remarkably similar approaches and capabilities with regard to object-oriented programming(this in terms of Perl 5).

      Python's functional programming ideas can fairly easily be translated to Perl constructs such as map and grep.

      Not sure how easily generators would translate to Perl, as I've not had occasion to use them yet.

    2. Re:Perl? by Brian+Quinlan · · Score: 2, Interesting

      Actually, Python and Perl are very different:

      - Python is strongly dynamically typed, while Perl is weakly typed
      - Python has a small number of syntactic constructs, while Perl has many
      - In Python, everything is an object

      blah, blah, blah

    3. Re:Perl? by Anonymous Coward · · Score: 0

      if you'd like to have readable code, use python :)

    4. Re:Perl? by jethro_troll · · Score: 2, Funny

      - Python is strongly dynamically typed

      ...causing much wear and tear on the keyboard

    5. Re:Perl? by PythonOrRuby · · Score: 2

      Yes, but not everything behaves as one would expect an object too, leading objects of certain classes to behave as primitives. Unless there's been quite a bit of type/class unification progress made, I don't believe you can subclass some of the more basic(and useful!) objects either.

      In this respect Ruby has both languages(at least until Perl6) beat.

      I'm not saying they're exactly the same, but I do think they're more similar than most people like to think.

    6. Re:Perl? by some+guy+I+know · · Score: 1

      Unless there's been quite a bit of type/class unification progress made ...

      There's been quite a bit of type/class unification progress made.

      --
      Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
    7. Re:Perl? by axxackall · · Score: 1
      Syntactically they are different

      The are much closer to each other than they are very far from Lisp or Schema. Both Python and Perl are very far from being perfect. Jurst Python is quickly moving in the reight direction (as usually through thinking about language design and paradigms), while Perl is just dying (despite all those Perl-6 convulsions).

      --

      Less is more !
    8. Re:Perl? by axxackall · · Score: 1
      ... and, if you like to have understandable code, then use Lisp :)

      Moreover, if you like to have mathematically verifiable code, then use Prolog :)

      --

      Less is more !
    9. Re:Perl? by Anonymous Coward · · Score: 0
      Unless there's been quite a bit of type/class unification progress made, I don't believe you can subclass some of the more basic(and useful!) objects either.

      There was. $ python2.2
      >>> class A(int): pass
      >>> a = A()
      >> a + 6
      6
      >>> _

    10. Re:Perl? by PythonOrRuby · · Score: 2

      Nice!

      I've apparently been out of the loop a little too long.

    11. Re:Perl? by PythonOrRuby · · Score: 2

      Perl 6 is hardy convulsing. It's actually coming along quite nicely.

      It also has the advantage of being a fresh start(it behaves much like Perl 5 in everyday use, but for different, better, more consistent reasons). Python is a wonderful language, but that doesn't have to mean Perl can't be a great language too.

  9. Where are they ? by Taco+Cowboy · · Score: 2



    I only find two versions - Java and Python.

    Where can I find the C++ version ?

    Thanks in advance !

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Where are they ? by JonahC · · Score: 4, Informative
      You can go here to get a list of all the available versions in the "How to think like a computer scientist" series:

      http://www.ibiblio.org/obp/thinkCS.php

      I was actually quite surprised to find this article on slashdot. You see, I'm the author of the Perl script which converts the LaTeX source to HTML. I hope nobody finds any blatant problems with the online book websites...

    2. Re:Where are they ? by Anonymous Coward · · Score: 0
      why not just use latex2html?

      dickwad

    3. Re:Where are they ? by Bodhammer · · Score: 1

      The C++ PDF link is returning a blank file.

      --
      "I say we take off, nuke the site from orbit. It's the only way to be sure."
  10. Excellent by awx · · Score: 1

    I found this a great book for when you are learning Python as a second or third language

    I learnt python in two nights from it because as we all know, once you have the basics of CS in your head the language you use is just an implementation detail.

    --
    Feel that power? That's mah MOUSING FINGER
  11. Computer 'Science'? by nih · · Score: 2, Interesting

    Feynman once said during an interview that some 'sciences' were really pseudosciences, in that they have never made any laws, eg social science, is computer science a real science with laws, or a pseudoscience?, if its a science, does anyone know of any of these laws?

    --
    I'm a rabbit startled by the headlights of life :(
    1. Re:Computer 'Science'? by Anonymous Coward · · Score: 1, Insightful

      Feynman doesn't have a fucking clue about anything outside his own field. He's a prime example of one of these arrogant beings who believes nothing is more important than their field of choice.

      Of course Computer Science is a science - take any introductory CS course and you will come across many formal theorems and hypothesis-based discoveries.

      Examples:

      Halting problem - this is essentially derived logically from basic premises.

      Neural networks - these are constantly the subject of scientific study in much the same way as geneticists study rats.

    2. Re:Computer 'Science'? by hacksoncode · · Score: 2, Interesting
      It's a lot more like mathematics than science (because essentially we're talking about a generative and definitional activity rather than an analytical process of discovery), but yes, there are plenty of CS "laws": Church's theorem, Godel's theorem, Shannon's Law, NP-completeness (no cracks about quantum computing now), etc., etc. Oh, I suppose there's always quantum computing to make it a science.

      Lately, though, it's starting to become analytical, courtesy of Microsoft. First, you make a hypothesis about how the OS works, then you write a program to test this hypothesis, analyze the results, and modify your hypothesis to fit the facts :-).

      You might find it interesting that, science or not, Feynman spent the last few years of his life teaching a computer science class called "The Potentialities and Limitations of Computing Machinary". It was a very interesting class. He brought his unique wit and wisdom to a subject much in need of wit and wisdom than most.

    3. Re:Computer 'Science'? by mjackson14609 · · Score: 1
      Here's what Feynman actually had to say on the subject:
      Computer science also differs from physics in that it is not actually a science. It does not study natural objects. Neither is it, as you might think, mathematics; although it does use mathematical reasoning pretty extensively. Rather, computer science is like engineering - it is all about getting something to do something, rather than just dealing with abstractions and in pre-Smith geology.
      That's from the introduction to Feynman Lectures On Computation - which book suggests that RPF thought the subject to be important. Certainly not as important as physics - but if you don't think nothing is more important than your field of study, can we assume you're only in it for the paycheck?
      --
      I decided that behaving ethically was the most nihilistic thing I could do. - Paul Pavel
    4. Re:Computer 'Science'? by Lictor · · Score: 4, Insightful

      Hmm... to be honest... the "Feynman Lectures on Computation" are just about as absurd as the "Goedel Lectures on Biochemistry" (these don't really exist... I'm just being sarcastic). The original poster's comments on Feynman had some merit.

      The phrase that you quote here displays a mind-boggling ignorance about exactly what "Computer Science" is. Software Engineering is, indeed, "like Engineering" but there are many branches of Computer Science that deal *purely* with the abstract. I do Formal Language Theory and Automata Theory for a living and I just can't see how these fields are about "getting something to do something". Feynman, like most people, has missed the science for the telescope.

      The real joke is that things like the Church-Turing thesis could not possibly be MORE about "natural objects". In the abstract, I can define a machine that can solve the halting problem. Heck, I can define a machine that solves any problem I want! The Church-Turing thesis tells us about a PHYSICAL limitation on computing. In this universe, you can only build a machine that will compute *these* functions.... But what if I live in a universe where time has no meaning? All of a sudden, I get a *very* different Church-Turing thesis.

      There is no question that Feynman had some brilliant insights in physics, but I have to admit that when I read the Lectures on Computation, not only did I lose a small amount of respect for him... I found myself actually outraged. Many intelligent people will read these lectures and believe them... I mean, after all, they're written by Feynman, right?

      Computer Scientist's have enough trouble trying to explain to people that, no, we don't just sit around installing Windows network drivers all day without a respected and intelligent person like Feynman adding to the problem.

    5. Re:Computer 'Science'? by Anonymous Coward · · Score: 0

      "...what if I like in a universe where time has no meaning?"

      I think you already do.

      No wonder you didn't understand Feynman's observations.

    6. Re:Computer 'Science'? by hysterion · · Score: 4, Informative
      Those are hard things to tell an Caltech Alumnus :-)

      No doubt, Feynman was a very, very good physicist. But he was also a genius at self-promotion, and his cult has gone way overboard as a result. It's well-established by now that some of the ideas he's famous for were first published by others.

      (Not that he wasn't honest about it sometimes. I think he's on record, for instance, crediting Stueckelberg for the renormalizion of electrodynamics, and for the idea that positons are electrons travelling backwards in time. See e.g. this timeline, or the last chapter of this book.)

    7. Re:Computer 'Science'? by panurge · · Score: 3, Interesting
      Many years ago I went for interview to the CS department of the University of Leeds, England. Things were going well until I asked the full professor interviewing me if we were going to learn anything about the hardware side of computing. He looked down his nose at me, drew in his breath and said "My boy, we don't concern ourselves with the doings of technicians". (Leeds is not precisely in the forefront of advances in modern computing.)
      However, for the last hundred years or so it has really been increasingly difficult to separate science and engineering. More and more, scientific hypotheses can only be tested when sufficiently advanced engineering comes along. There have always been "whiteboard scientists" (i.e. theoreticians) who resent this.
      But most great scientists were skilled engineers as well. Galileo, Newton, Bunsen, Babbage, Turing...

      I think the terminology is the problem. We don't talk about "Physics science" or "Biology science", so why "computer science" or "rocket science"?
      Why not just computing and rocketry?

      While I'm having a rant, there's also a problem with degrading the word "engineer". MCSEs and such are basically technicians, not engineers. Perhaps if we admitted that the people who implement systems using standard components that just have to be set up correctly (although this may be a challenging role) are technicians, then we could accept that most "computer scientists" are actually trained as engineers, that this is a highly skilled and challenging professional role, and the number of real scientific researchers is not that great. Just like physics and chemistry nowadays, in fact.

      I would suggest that the test of a pseudoscience is that it doesn't create a heirarchy of engineers and technicians because, basically, it doesn't work and there would be nothing for them to do. You don't get sociological engineers designing ever better societies, and socio-technicians building them just as fast as people can throw money at them. (At least, the attempts, such as Marxist-Leninism, have been abject failures). But you get plenty of sociologists. On this basis, computing, with its deep organisational structures, is an extremely successful science-based system. Arguments about testing hypotheses are irrelevant: real scientists tend not to work like that anyway.
      Scientific proof has been conventionally about other people reproducing your results. But if the nature of your science/engineering is that you can rapidly produce millions of copies of your concept or invention, this becomes trivial. If I claim to have invented (say) a graphics chip architecture that can draw polygons twice as fast as the previous best for a given clock speed and die size, I prove this by marketing the product, not by publishing and waiting for other labs to build a copy and duplicate my result.

      --
      Panurge has posted for the last time. Thanks for the positive moderations.
    8. Re:Computer 'Science'? by Anonymous Coward · · Score: 0
      AC said: Of course Computer Science is a science - take any introductory CS course and you will come across many formal theorems and hypothesis-based discoveries.

      This was a response to: is computer science a real science with laws, or a pseudoscience?, if its a science, does anyone know of any of these laws?

      Of course, AC, you didn't answer his question, "What are the laws of computer science". Laws are very different than formal theorems and hypothesis based discoveries. It seems it is not Feynman who doesn't have a clue about anything outside his own field, but you who do not own a dictionary.

      I can't think of a hypothesis-based discovery in CS that would count as a law. As you say, Halting problem is derived, hence not a law (more of a theorem), and just because people study neural networks, and the name neural sounds vaguely familiar to a biological term, does not make studying computation and algorithms a science per se. In fact, if neural networks will teach teach us about basic laws, those will most likely be basic laws of biology.

    9. Re:Computer 'Science'? by Anonymous Coward · · Score: 0

      You never heard of the three fundamental laws of computer science?
      1. A computer may not injure a human being, or, through inaction, allow a human being to come to harm.

      2. A computer must obey orders given it by human beings, except where such orders would conflict with the First Law unless there is a buffer overrun.

      3. A computer must protect its own existence as long as such protection does not conflict with the First or Second Law or there is valuable information stored thereon.

    10. Re:Computer 'Science'? by Anonymous Coward · · Score: 0

      Feynman's contention was that Science does not deal *purely* with the abstract. His statement implies that science "studies natural objects", which of course would be branded as heresy to the grant beggars and marketing schills of today.

    11. Re:Computer 'Science'? by Anonymous Coward · · Score: 0

      I wouldn't call Babbage a skilled engineer. Ever seen a difference engine?

    12. Re:Computer 'Science'? by Anonymous Coward · · Score: 0

      People with MSCEs get jobs as technicians, not engineers. MSCE is the name of the test, not the type of person who takes it.

      Your test of pseudoscience is an excellent observation, although there is a definitely a very large group of "socio-technicians" and "socio-engineers" in America, but as in the Soviet Union, they are really just a part of the governing apparatus.

  12. Couple of online books i've come across by FuzzzyLogik · · Score: 2, Informative

    Practical PostgreSQL
    Using Samba
    Personally I thought both were very well written, the samba book has helped me greatly.

    1. Re:Couple of online books i've come across by FuzzzyLogik · · Score: 1

      Found another one in my bookmarks i forgot to mention, Art Of Assembly

    2. Re:Couple of online books i've come across by Anonymous Coward · · Score: 0

      A good book, but hardly relevant today. With the wealth of high-level languages available no-one needs to hack assembly language out any more.

      In fact, the illogical enthusiasm for assembly language among young Computer Scientists today -coupled with an the arrogant attitude reminiscient of the 'demo scene' that they can optimize anything just because it's written in assembler - does more harm to the IT industry as a whole than anything else.

    3. Re:Couple of online books i've come across by bcrowell · · Score: 1
      Could I tempt you to review these on The Assayer? They're already in the database:
  13. How about how to think like a Software Engineer? by hacksoncode · · Score: 5, Insightful
    I should probably quit whining and write my own copyleft book, but I skimmed through this book, and I'm not all that impressed.

    This book doesn't strike me as a book on how to think like a Computer Scientist, except insofar as Computer Scientists generally make lousy Software Engineers. There are no descriptions of the advantages of object oriented programming, discussions of theoretical topics, and in general very little encouragement to view programming as a science. Basically, this appears to be just a book on the Python language, written for someone who has never programmed before. That's a fine thing, don't get me wrong. My brief look even makes me think it could be an effective example of such a book. At the very least, I think it's hyped wrong.

    However, from a software engineering point of view, I find it damning that the book forgoes any explanation of the practice of, or motivation for, writing maintainable code. I consider that unforgivable in a beginning programming book. You absolutely have to impress on newbies early the importance of documentation, sensible structure, logical variable naming, good class hierarchy, etc.

    I consider this especially true for Python, which is an interpreted non-declarative language (making maintainabilty all that more important). Python is, conversely, also especially well designed as a platform where such concepts could be taught. It largely overcomes the occasional weaknesses of its design philosophy by consciously including language features such as built in support for docstrings, well crafted namespaces, modules as first-class citizens, etc.

    Yet, these language features are barely given a nod in this book.

    It's books for existing programmers that can afford to skimp on these areas.

  14. Re:How about how to think like a Software Engineer by Anonymous Coward · · Score: 1, Insightful

    That's because it's not about Software Engineering, you fool. It's about Computer Science.

    Software Engineering is essentially the application of CS to real world projects - and the current fashions in SE should be a separate course entirely. It's more about psychology and HR than it is about Computer Science.

  15. 'Informatics', I agree by ASeed · · Score: 1

    I agree that the term Informatics is more appropriate. In my country (Spain), it is called "Informática".

    --

    --
    ACid
    1. Re:'Informatics', I agree by Carlos+Laviola · · Score: 1

      Same spelling here (Brazil), but we do have CS courses too. People don't pay much attention to the name of the course when it comes to the curriculum though.

  16. C is a high-level language?? by jackb_guppy · · Score: 2, Insightful

    From the opening section of each book: 1.1 What is a programming language?

    Java is an example of a high-level language; other high-level languages you might have heard of are Pascal, C, C++ and FORTRAN.

    Python is an example of a high-level language; other high-level languages you might have heard of are C, C++, Perl, and Java

    Both C++ and Pascal are high-level languages; other high-level languages you might have heard of are Java, C and FORTRAN

    C, a language without file i/o, without bound checking, and with direct access to ports is high-level? If you say the libraries chucked into a C load makes it so... Then Assemebler is a high-level language, too.

    Last I heard was Binary Code=0, Assem=1, C=1.5, Fortran, Cobol, & Basic were about 3, ADA, C++=5.

    Perl was not even in the picture, because it was scripting language

    Also high-level languages does not equal easier code or does not make it faster code... It does makes more strict to code, more following the limited ways the authors of the langauge thought you should think (like the use of GOTOs :-). Low-level languages allow the coder the freedom to get the job done and not comprise the functions to limits of the authors, and it requies the coders to truely think like computer sceincist. Look at ADA for what is wrong with really high-level langauge. See how limiting the langauge can be made. And how much time is need to see up the coding effort.

    PS: maybe these are great books, but I stopped reading there, because how can it teach to "Think like Computer Sceincist" when it does not know about the basics of computer sceince?

    1. Re:C is a high-level language?? by nd · · Score: 1

      I think you're being too harsh.

      The fact is, how "high" level something is, is completely relative. There are no strict rules to my knowledge about what's included in each "level" (e.g., file i/o, bound checking like you mentioned). Maybe you're just annoyed because you've always heard C as medium or low-level and it goes against that?

      My first programming language I used was QBasic (I was very young, ok?). Eventually, I moved on to use Turbo Pascal. During the time I spent developing software in Pascal, I frequently heard people talk about C and how it was tighter and superior because it was a low-level language. And compared to Pascal, it is _slightly_ lower level.

      Last year I had a Machine Organization class where we used MIPS assembly. The professor always referred to C as a high level language.

      I think a justified complaint would not be that the author classified C as a high level language, but that he classified it in the same realm as Python and Java. Clearly, Python and Java are substantially more high level.

    2. Re:C is a high-level language?? by rainwater · · Score: 1

      Compared to something like assembly or machine language, I would consider C, a "high-level" language. Of course compared to a language like c++ or Java, it is not as "high-level".

    3. Re:C is a high-level language?? by jackb_guppy · · Score: 1

      Being to harsh.

      The bases for a sceince is terms. If they can not get the basic of terms right then there is no science.

      About background... I started with Basic on a HP2000F in 1973, I was 14 at the time.

      Which carries into high-level languages are portable hahaha Basic is a high-level language and it is not portable, it was not until about 1989 was the Basic Language generally uniform, Cobol today, even higher-level, in my option, than BASIC still has "flavours".

      This books was primer - when you can not get history/levels correct what does it say for the rest.

      MIPS assembly compared to C - C is higher, more human to read (if you do not compound expressions (example: x(i++) =+ y(--j); ). But C is much lower than Basic.

      Know the question: Did your teacher refer C as a HIGH-LEVEL LANGAUGE (wrong) or a HIGH-ER-LEVEL LANGUAGE (right)?

    4. Re:C is a high-level language?? by nd · · Score: 2, Insightful

      The bases for a sceince is terms. If they can not get the basic of terms right then there is no science.

      I don't think they got any "terms" wrong. I still assert that how "high-level" a language is is NOT an absolute scale.

      MIPS assembly compared to C - C is higher, more human to read (if you do not compound expressions (example: x(i++) =+ y(--j); ). But C is much lower than Basic.

      Good, so you are thinking in terms of "higher" and "lower".

      Know the question: Did your teacher refer C as a HIGH-LEVEL LANGAUGE (wrong) or a HIGH-ER-LEVEL LANGUAGE (right)?.

      High-level language. This is NOT wrong in the context of the course. Relative to the course material (assembly), C is a very high-level language. I have always thought of this scale in terms of context and relativity, not absolute.

      Why do I do this? Well, I suppose in theory someone could come up with an absolute scale and say "C is classified as a X-level language", but when the only terms we're using are "high", "low", and sometimes "medium", this will not hold up.

      You've been programming for a long time. Certainly you realize that C was considered more high level back then than it is now.

      Rewind back to the early 90's. Ignoring Basic, Pascal was the highest-level language I was familiar with and used. People undeniably (and fairly consistently) referred to Pascal as a high-level language. Along comes languages like Java, which is clearly higher level than Pascal, and we have to re-evaluate what we consider to be "high-level".

      The point is, we can't keep redefining this stuff everytime a new language comes out. You call Python high-level today, but 15 years from now when some other language comes out even more abstract, you can no longer call Python high level unless you keep attaching superlatives (like "very") to the new languages.

      Relative. Not absolute.

    5. Re:C is a high-level language?? by gaj · · Score: 1, Flamebait
      C, a language without file i/o, without bound checking, and with direct access to ports is high-level? If you say the libraries chucked into a C load makes it so... Then Assemebler is a high-level language, too.
      No. C is an HLL because the expression of concepts is above the machine level. Oh wait, that must be wrong, as you define for us exactly what makes a language HLL vs. LLL. Hmm ... so file i/o and bounds checking make for an HLL, but "direct access to ports" (by which I assume you mean "direct, arbitrary access to memory" ... please say what you mean) makes for an LLL? OK, lets then look at your supposed spectrum of languages:
      Last I heard was Binary Code=0, Assem=1, C=1.5, Fortran, Cobol, & Basic were about 3, ADA, C++=5.
      First of all, BASIC (not Basic; it is an acronym for Beginners All-purpose Symbolic Instruction Code ... I should have "stopped reading your post right there, because how can you teach me the levels of languages when you do not know bout the basics of computer sceince? [sic]"), Ada and C++ all have "direct access to ports", so they must be low level. And C++ has no file i/o withough libraries, so it must really be low level. WTF? Don't you "know about the basics of computer sceince [sic]"?
      Perl was not even in the picture, because it was scripting language
      Ok, so enlighten me: WTF is the definition of "scripting language" and how does it differ from a general purpose programming language and how is it that Perl fits into the former catagory rather than the latter? You are obviously god-like in your grasp of "computer sceince [sic]", so I really look forward to learning from you.

      Or something.

      I probably have just been trolled, but I meet so many people that sound just like you and really have given that little thought to the subject. I'm sure that my pathetic little mind, having the small grasp of "computer sceince [sic]", simply couldn't comprehend your post.

    6. Re:C is a high-level language?? by jackb_guppy · · Score: 1

      High-level language. This is NOT wrong in the context of the course. Relative to the course material (assembly), C is a very high-level language. I have always thought of this scale in terms of context and relativity, not absolute.

      Even in the terms of the course calling C a HIGH-LEVEL LANGUAGE is wrong. C is above above ASM because it made its easier to write in human terms. But then again a Macro ASM, say PDP-11 will allow most of the same functions and notied the same way. Where do you think C got some of the notations (XR1++) or (--XR2).

      When C came out it was thought of as a "better ASM" not a replacement BASIC, COBOL or PASCAL. The was even a #DEFINE for those who coded in PASCAL to sed that notation in the C. Just as there was MARCOs for ASM to compile BASIC Code. It was not until people started library after library some written in C, others in ASM. That C as structure/script - but not a language - was given the includes to be all things to all people.

      C++ may still have the older roots available becuase it was built on top of C. But C is still just a better ASM.

  17. Did the author get paid? by AmericanInKiev · · Score: 3, Interesting

    Does anyone know if the author of the book gets paid by Green Tea for donating or "copylefting" the book?

    I'm working on the theory of collecting tax deductions for copylefted art, and this contribution is a great example because it closely resembles historically donated items. If the author donates the artwork to the right organization - he could by my reading of the IRS be paid in tax deductions.

    Does anyone know of cases in Open Source / Copyleft where tax deduction are being used to help cover expenses?

    I'm sure that the competition - i.e. Microsoft uses every tax deduction in the book. Are Open Source contributers playing by the same rules - or are we handicapping ourselves by ignoring the tax benefits of donation?

    If anyone can provide examples of copylefted donations and how you documented it for tax purposes - I'm interested.

    I believe there are Billions of dollars in potential government funding just waiting to be collected by Open Source artists. Lets go get it!

    AIK

    1. Re:Did the author get paid? by Anonymous Coward · · Score: 0
      • Are Open Source contributers playing by the same rules - or are we handicapping ourselves
      I'm willing to bet a large amount of tax-deductible dollars that you haven't contributed anything.
    2. Re:Did the author get paid? by bcrowell · · Score: 1
      Does anyone know if the author of the book gets paid by Green Tea for donating or "copylefting" the book?
      The authors are the publishers.

      O'Reilly offers quite a few books for free on the web because they're out of print.

      For a book that's in print, I don't think it's appropriate to pay the authors extra for copylefting it, because making the book free in digital form is actually a wonderful sales tool. It's worked for me, and it's also worked for Baen books.

      For a book that's out of print, I also don't think it makes sense. The reason these O'Reilly books are out of print is that they weren't big sellers. If they're not making a profit on the book, there's no reason to pay the author extra. Of course I assume O'Reilly only makes the books free online with the author's consent.

    3. Re:Did the author get paid? by sheldon · · Score: 3, Interesting

      I believe what you are on is the road to jail for tax evasion.

      The IRS does not allow you to donate your time and deduct your perceived cost from your taxes. It's highly illegal because it is quite obviously prone to abuse.

      So in the case of your artwork example. If you go out and buy a painting for $20,000 and then donate that painting to a non-profit charity, you may deduct the $20,000 or whatever the current market value is of that painting.

      However if you go out and buy a canvas and some paints and then make your own painting to give to charity. The only thing you may deduct is the cost of the canvas and paints, i.e. the supplies. Now if you sold the painting at auction for $20,000 and then proceeded to give that $20,000 to charity, you may deduct the $20,000, but you're also showing the $20k as income so it's a net-zero-sum game.

      The same is going to be true of a book.

    4. Re:Did the author get paid? by Scaba · · Score: 1

      Hmmm...I'm intrigued by your ideas and I'd like to subscribe to your newsletter.

    5. Re:Did the author get paid? by chromatic · · Score: 1

      O'Reilly also allows authors to choose whether to make the book freely available. It's part of the contract negotiation process. The most recent example that comes to mind is Free as in Freedom, which is still in print.

    6. Re:Did the author get paid? by Trepidity · · Score: 2

      Does anyone know if the author of the book gets paid by Green Tea for donating or "copylefting" the book?

      It probably doesn't make any difference either way, since the author owns Green Tea.

  18. The Art of Unix Programming [was: How about how to by dspeyer · · Score: 1

    This isn't exactly what you're looking for, but have you checked out The Art of Unix Programming by ESR? Only the first four chapters are written (plus the preface and TOC), but it looks like it covers a lot of what you're thinking of.

  19. I can't. by FreeLinux · · Score: 1, Troll

    Every time I start to "Think Python", it's something huge like a Burmese. Then Steve Erwin jumps in and starts wrestling with it while shouting something about what a beauty she is. It's very distracting and I just can't code with all that going on.

  20. Re:The Art of Unix Programming [was: How about how by Anonymous Coward · · Score: 0

    The problem with that book is it is based on the (flawed) assumption that because it's Unix, it's automatically better than any other approach.

  21. Pointers required by magi · · Score: 3, Insightful

    While Python is my favourite language, I think it's rather silly to teach Computer Science and especially basic algorithmics with a language that doesn't have pointers.

    At low level, pointers are everything, and low level is what you want to teach when you're teaching basic data structures and algorithms. There's simply no point in demonstrating list implementation with an interpreted language that has very efficient native lists, dictionaries, etc. C/C++ or Pascal are much better for that; with them you can teach real implementations, not toy ones.

    On the other hand, Python might be ideal for teaching advanced algorithms such as sorting and string algorithms, as those are more "high-level" problems and low-level pointer-messing is no longer needed nor desired. Python has very beautiful string and list operations, which make such algorithm implementations cleaner.

    Also, Python might be ok for the very first Basics of Programming course with respect to pointers, as they don't really teach any algorithmics there. However, the weak typing (very late binding) would be a problem in this case. Beginners will have enough trouble understanding the language without the need to handle implicit types. I'd very much suggest a strongly typed object-oriented language such as C++, Java, or Eiffel, where the types are always explicit. For an algorithms course this isn't so much a problem.

    For some classes, such as AI, there's simply no winner for Prolog, and perhaps Lisp, but many Python features such as easy string manipulation and other middle-level data structures make it temptating for many subjects such as Automata and Formal Languages. It would be interesting to have a good Python interface to a Prolog interpreter; one that is well integrated with the syntactic philosophy of Python.

    1. Re:Pointers required by cheezedawg · · Score: 5, Insightful

      I think it's rather silly to teach Computer Science with a specific programming language at all. Computer Science is not about teaching people how to program.

      To me, Computer Science is a very cool blend of:
      - Discrete mathematics
      - Computation theory
      - Linguistics
      - Complexity theory
      - Logic
      - Probability

      None of these rely on programming at all, let alone a specific language or whether that language has pointers or not. Programming is only an application of Computer Science.

      You gave example of an AI class- to me, the core of AI is learning about first-order logic and predicate calculus, searching and graph traversal heuristics, reasoning, and natural language processing. I know this list isn't complete, but the point is that these concepts are for the most part independent of programming. Sure, you can start off by teaching somebody a specific implementation in Lisp or Prolog, but then they only know program AI in Lisp instead of how to apply AI concepts in any setting.

      --
      "The defense of freedom requires the advance of freedom" - George W Bush
    2. Re:Pointers required by magi · · Score: 1

      None of these rely on programming at all, let alone a specific language or whether that language has pointers or not. Programming is only an application of Computer Science.

      That's true, but not everyone is interested in pure theory without any possibility for applications. In the end, we usually want some.

      But even if we're learning just pure theory, learning difficult abstract concepts can be very hard. Programming makes it possible to have concrete examples that are easier to grasp, at least for most of us.

      My main point is that some programming languages are better suited for giving concise concrete examples for certain abstract ideas than others.

      With AI, you'd probably want a high-level language such as Python, Lisp, or Prolog. You don't want to have pointers or complex data structure manipulation (such as handling lists in C) that add distracting clutter in the code.

    3. Re:Pointers required by wormbin · · Score: 1

      I'm not sure what you're talking about. Every variable in python is a reference to an object (i.e. a pointer) so you can implement any complex data structure / algorithm you want.

      $ python
      >>> class A:
      ... pass
      ...
      >>> a = A()
      >>> b = a
      >>> a.foo = "assigned to a"
      >>> a.foo
      'assigned to a'
      >>> b.foo
      'assigned to a'
      >>>

      FYI. java, perl and ruby are the same way.

    4. Re:Pointers required by magi · · Score: 1

      That's true, but not everyone is interested in pure theory without any possibility for applications. In the end, we usually want some.

      So, without profitable applications, we geeks could never get some.

    5. Re:Pointers required by Anonymous Coward · · Score: 0

      Yeah right. To you, Computer Science is a very cool blend of:

      - pr0n
      - caffeine

    6. Re:Pointers required by magi · · Score: 1

      I'm not sure what you're talking about. Every variable in python is a reference to an object (i.e. a pointer) so you can implement any complex data structure / algorithm you want.

      Well yes, except the native types such as integer and float. There are also no pointers to pointers in Python, which are a highly useful technique in C.

      I just think it's more illustrative, for learning purposes, to make the pointer semantic explicit, as it is in C. It gives a much better picture about what's really happening at low (machine language) level.

      The problem is that if Java or other interpreted high-level languages are used for teaching basic data structures, the CS students won't learn proper low-level programming, which is still very important for implementing any high-level systems as well as integration.

      I've got oh-too-much experience with professionals who pass and return structs to and from C functions, not pointers to structs. They cause an infinite amount of memory leaks, buffer overflows, memory corruption, and other unimaginable problems.

    7. Re:Pointers required by JohnsonWax · · Score: 2

      While Python is my favourite language, I think it's rather silly to teach Computer Science and especially basic algorithmics with a language that doesn't have pointers...

      I'd very much suggest a strongly typed object-oriented language such as C++, Java, or Eiffel...

      Actually, while you're probably correct about Python not being ideal for what is about to come, the real problem facing many students learning computer science is that they've never programmed anything before. Many don't know how to break a problem down and build out a logical structure.

      It's a basic issue of not demoralizing the student in the first course by tossing a strongly typed, constructor based language at them like Java. Early on, students just need to see how you take a problem and build a solution. The easier and quicker it is, the more likely they are to engage and stay on. As you go, you can illustrate the various benefits of languages that trade off short-term gains for long-term gains. If the students are engaged they'll stay with you.

      Most CS students don't graduate from CM or MIT. There are tons of students that attend universities that might be great CS students, but they bail out after a quarter or two because the benefits of the program are lost. That first course in Java is like hell on earth. Hours and hours of writing code that might be the most reusable, modular code on earth but doesn't do a goddamn thing.

      Python is a wonderful intro course because you can solve problems quickly. Even in a first course you can teach students to turn their code into a CGI. Now they can actually do productive things. That goes a long way to just keeping students in the program.

    8. Re:Pointers required by elflord · · Score: 1
      However, the weak typing (very late binding) would be a problem in this case. Beginners will have enough trouble understanding the language without the need to handle implicit types. I'd very much suggest a strongly typed object-oriented language such as C++, Java, or Eiffel, where the types are always explicit.

      I disagree with this. Strong typing is not at all intuitive, and beginners expect to be able to do things like store different types of items in a list (you should see how often that question comes up on comp.lang.c++ !)

      Implicit types behave in a way that naive users expect. It is much easier to understand polymorphism in a dynamically typed language than it is to understand how polymorphism works in a statically typed language.

      I'd recommend Python as a beginners language, but of course everyone should move on and learn more languages.

    9. Re:Pointers required by wormbin · · Score: 1

      There are also no pointers to pointers in Python, which are a highly useful technique in C.

      Wrong. Python can do pointers to pointers

      $ python
      >>> class P:
      ... pass
      ...
      >>> p=P()
      >>> p.s="foo"
      >>> pp=P()
      >>> pp.p=p
      >>> pp.p.s
      'foo'

      I've got oh-too-much experience with professionals who pass and return structs to and from C functions, not pointers to structs. They cause an infinite amount of memory leaks, buffer overflows, memory corruption, and other unimaginable problems.

      Not understanding C and misusing malloc, free, pointers and return types is bad. Not understanding Python and misusing its feature set is also bad. Knowing C well, not knowing python very well, and attempting to compare C and Python is also bad.

      Languages are just tools and if you don't understand them you may choose the wrong tool for the job.

    10. Re:Pointers required by Anonymous+Brave+Guy · · Score: 2
      Programming is only an application of Computer Science.

      One might reasonably argue that programming is the application of Computer Science. Without programming to implement its ideas, CS is pretty much just a bunch of theory.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    11. Re:Pointers required by fferreres · · Score: 2

      High level vs. Low level is not related to the fact that a language has a compiler or not. A low language level is bound to some hardware architecture. A high level language should not in principle.

      (A) If you see CS more as a way to solve generic problems then you'll like to teach a high level language. (B) If you see it more like a hardware/software problem solving, then you'd like to teach a low level language.

      Which is best depends on what are doing. (A) is more akin to a real abstract science (you may not care how memory segments are referenced, or if a particular machine uses 64 bit or 32 bit registers) and (B) is would be a more practical aproach that would allow some more thing to be done with the actual hardware in use today.

      If I knew I'd live 400 years, I'd certainly learn a high level language first. But that depends, because you can abstract the hardware specifics in low level languages to some part of the program (but then again, why should you care? ).

      --
      unfinished: (adj.)
  22. Not convinced at all by Anonymous+Brave+Guy · · Score: 2, Insightful

    After having a quick look at bits I'm qualified to assess (I'm not a Python programmer, but do have plenty of background in CS, C++ and other related topics) I'm not convinced at all that I'd want to learn from this book.

    Much of the preface by Jeff Elkner basically compared C++ to Python and has a go at the deficiencies of C++. It would be more convincing if he knew the return type of main(), the name of the standard header <iostream> and what a statement was. Three fundamental mistakes just in discussing "Hello, world!" is not a good sign for the author's level of knowledge and understanding.

    Trying to put aside my bias, as I like C++ as a practical language, I examined the appendix on creating a UDT for fractions to form a second opinion. Here, they do the obvious simple things to create a rational number class, and nowhere do they make the basic sanity check that your denominator is not zero. Surely one of the basic tenets of OO theory is that you always maintain your class' invariant properly? Their class may be a fine demonstration of Python's OO features -- I don't know, I'm not familiar enough with them to judge -- but it's a lousy demonstration of either good CS or good OO.

    From these observations, I have to ask whether I'd actually want to learn Python from this book. If I do, how will I ever have any faith that what I've learned is correct and in good style?

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Not convinced at all by cant_get_a_good_nick · · Score: 2
      I got put off by just the second paragraph:
      or why teach programming with Python?" Answering these questions is no simple task - especially when popular opinion is on the side of more masochistic alternatives such as C++ and Java.
      It manages to make two derogatory statements. That programming in C++/Java is masochistic (thats a subject of opinion, so I can let it slide) and makes a subtle barb that they're used because they're popular and not because of merit. It just poked of programming religion to me. I'm very much a "use the right tool for the job" guy. I haven't used Python, so I'm a little cautious about talking about it, but I'm fairly confident saying they're are a lot more C and C++ libraries available to a C++ programmer than off the shelf Python packages.
    2. Re:Not convinced at all by Brian+Quinlan · · Score: 1

      I haven't read the Elkner article/paper/book so I can't comment on it as a whole.

      But think that your comment about main() might indicate a lack of understanding on your part, not on Elkners.

      I don't think that the ANSI C specification defines a return type for main() (I did a quick grep of the spec to check).

      Also, in practice, different implementations require different return types. UNIX mains return an int. Macs mains return void. For Windows GUI apps, main isn't even the entry point.

    3. Re:Not convinced at all by J.+J.+Ramsey · · Score: 2

      "I'm fairly confident saying they're are a lot more C and C++ libraries available to a C++ programmer than off the shelf Python packages."

      The libraries available to C and C++ are irrelevant for teaching an introductory programming course. The idea behind using Python to teach programming is to start with a readable language that can be used to illustrate basic concepts without mucking with lower-level machine related details. Once the basic concepts have been conveyed, more lower-level details such as strong typing and pointers can be introduced, using languages like C or C++. In short, get the students to walk before they try to run.

      Just because C++ is a good practical language doesn't mean it's a good teaching language.

    4. Re:Not convinced at all by elflord · · Score: 3, Insightful
      But think that your comment about main() might indicate a lack of understanding on your part, not on Elkners. I don't think that the ANSI C specification defines a return type for main() (I did a quick grep of the spec to check).

      The C++ spec certainly specifies that the return type of main() is int. It's covered in 3.6.1 of the C++ standard. (I'm pretty sure the same is true for C).

      Also, in practice, different implementations require different return types.

      They're not conforming implementations if they require that main() doesn't return int.

    5. Re:Not convinced at all by elflord · · Score: 2
      Much of the preface by Jeff Elkner basically compared C++ to Python and has a go at the deficiencies of C++.
      ...

      Python is a great language, but it is just plain ignorant to sell it as a C++ replacement. It makes substantially different design tradeoffs, which makes it suitable for very different programming problems. C++ has better compile time checking, and better performance, while python has more runtime flexibility.

      Actually, Python and C++ work very well together, I see them as collaborators more than competitors.

      For a good introduction to Python, I'd recommend Mark Lutz's Learning Python

    6. Re:Not convinced at all by elflord · · Score: 1
      haven't used Python, so I'm a little cautious about talking about it, but I'm fairly confident saying they're are a lot more C and C++ libraries available to a C++ programmer than off the shelf Python packages.

      First, the author is talking rubbish. Python is a good teaching language, but C++ and java are also great technologies, and I think it speaks ill of the author that he doesn't appear to understand the advantages of compiled languages. So I'd think twice about using his book.

      However, Python is a great teaching language, because it is simple, and it doesn't get in the way of the programmer. You can just type code and get feedback immediately. Or edit a module, reload it, and try it out.

      Compile time type checking, and high performance are useful for developing huge applications, but for the beginner who just wants to become familiar with simple programming concepts, the compile cycle is just a nuisance.

    7. Re:Not convinced at all by Brian+Quinlan · · Score: 1

      From 3.6.1:

      "It is implementation-defined whether a program in a freestanding environment is required to define a main function."

      I guess we would need to know the definition of "freestanding" in this context.

    8. Re:Not convinced at all by J.+J.+Ramsey · · Score: 2

      "Python is a great language, but it is just plain ignorant to sell it as a C++ replacement."

      The author of the book wasn't selling Python as a C++ replacement. He was pointing out the lower-level features of C++ that get in the way of using C++ as a first language for people learning to program.

    9. Re:Not convinced at all by Anonymous Coward · · Score: 0

      You are seriusly mistaken, it basicly says that teaching programming (to beginners) in C++/java are masochistic, not that programming in C++/Java is masochistic. This I agree 100% beginners in programming should learn the flow of programs and the way to construct algoritms, and not spend hrs. pondring over syntatic floss in C++/java like brackets etc.

      Libraries and such are just nonsens to a beginner, the eficcent and advanced you pick up later and you learn to pick the right language for the job at hand.

      I'm glad for beeing so old that I learnd programming with Pascal, but I belive Python is even better as first language.

    10. Re:Not convinced at all by elflord · · Score: 1
      I guess we would need to know the definition of "freestanding" in this context.

      My understanding is that most implementations are intended to be "hosted" (as opposed to "free standing"). See 17.4.1.3 and 1.4. A freestanding implementation does not have to ship STL. My understanding is that the main purpose of this is to allow smaller implementations that are suitable for embedded systems programming, or other environments that have special requirements.

    11. Re:Not convinced at all by Anonymous+Brave+Guy · · Score: 2
      But think that your comment about main() might indicate a lack of understanding on your part, not on Elkners.

      With all due respect, no, it doesn't.

      The relevant standards are crystal clear on this matter: main() is required to return int in both standard C and C++. In C90, it was permissible to omit the int in the spec, leaving it implicit (though it was never allowed to use void) and in C99 and C++, this is not allowed. In C++, you are allowed to omit the return statement itself, and if control reaches the end of main(), 0 is returned. In every case, though, the return type is always int. If you'd like more information on the subject, please consult the FAQs for the various relevant language newsgroups, where an idiot causes a flame war on this subject approximately once every five minutes.

      If your implementations do not have main() returning int, then you aren't programming standard C or C++, and it's really as simple as that.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    12. Re:Not convinced at all by Anonymous+Brave+Guy · · Score: 2

      If it's running on an OS, it's hosted. And even if not, the question is whether it has a main() function, not the return type of same if it does.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  23. a review by bcrowell · · Score: 4, Informative

    I've written a review of this book on The Assayer. The book is self-published (the authors run Green Tea Press), and one of the things people don't realize about self-publishing is how hard it is to attract reviews. (Actually, it's hard in ordinary publishing, and even harder in self-publishing.) Without reviews, you don't get much credibility. So if there's a free book in The Assayer's database that you've read, please write a review!

  24. Printed copy wanted by RichiP · · Score: 1

    I like electronic books, but when something's good and long, I prefer reading them in printed form. Probably due to my failing eyesight.

    At any rate, I went to Green Tea Publishing's homepage and that's got to take the cake for the most bare website i've seen. They make mention of printing copies for a reasonable price, but they don't say how one can make that request nor any contact info.

    Would someone tell me how I can get printed versions of the book?

    1. Re:Printed copy wanted by Milchbrot76 · · Score: 1

      Reread their page at http://greenteapress.com/thinkpython.html
      They link amazon and barnes and noble, where you can get a printed copy.

    2. Re:Printed copy wanted by bcrowell · · Score: 1

      I think you missed the following sentence from their web page:
      You can order the book from Barnes and Noble or Amazon.
      They give you links and everything. You should also realize that they're in the textbook publishing business, so nearly all their sales are probably going to be wholesale.

  25. Re:a review of your review by Anonymous Coward · · Score: 1, Interesting

    My first impression of your review was quite favorable. You started off well with an engaging style.

    Unfortunately, you spent far too much time writing about the merits of Lunix and Open Source than reviewing the book. Using the review text as a platform for your views on the GPL was inappropriate and didn't tell me what I wanted to know about - the book.

    The few paragraphs on the content of the books were sadly lacking and offered little insight into the use of the book for learning about CS or Python.

    I'd say your review scores 1 out of 5.

  26. "you haven't contributed anything" by AmericanInKiev · · Score: 1

    I would rather focus on the idea of getting Federal matching funds for Open Source than proving I'm a worthy soul. In on sense you're right. Its a close friend of mine, the author of OpenVPN who is the hard core Open Source contributor. (see SourceForge) but Since you ask, my personal contribution is a flight control system / collision avoidance based on the simplistic Ant Colony Algorithm. This is a system which would cost about $150 per plane which controls air traffic without infrastructure. It would have avoided many of the collisions in the last two years. Especially the recent tragedy involving a swiss air controller and a russian plane. AIK

    1. Re:"you haven't contributed anything" by alienmole · · Score: 2
      I would rather focus on the idea of getting Federal matching funds for Open Source than proving I'm a worthy soul.

      Good response. I just replied to one of your other posts about your tax deduction idea, but when I saw this I wanted to add: getting Federal matching funds for Open Source is not a bad idea, but I think you may be looking in the wrong direction when it comes to the IRS. However, the Federal government gives out grants for all sorts of things, and it would seem to make more sense to look in that direction for ways in which open source might fit into existing programs.

      But I doubt you'll find some existing loophole that allows you to simply receive cash for open source by just filling out a form. More likely, with a lot of political lobbying etc., it might be possible to get the government to be more receptive to funding open source projects that are in the public interest. However, you'll have to fight lobbies of commercial software makers who feel threatened, so it's not likely to be easy.

      If you want to be realistic instead of ideological (no value judgement there, just being pragmatic), you might have more luck finding a business which is interested in contributing towards the work in question.

  27. You've got internet access, so ... by Anonymous Coward · · Score: 0

    So you might want to look at reviews at Amazon and the like.

    Of course, Amazon is a business and the reviews are probably not accurate so they can sell more books, but they should put you in the right ballpark. You can also preview some pages there.

  28. Think like a computer scientist? by jameson · · Score: 1

    Try Haskell instead. Or, perhaps, SML/O'CAML.

    1. Re:Think like a computer scientist? by Anonymous Coward · · Score: 1, Informative

      Agreed. With SML/O'CAML, Scheme, Erlang and Mozart around, using Python to teach Computer Science is pretty sad. Python could be considerded a modern programming language if the calender read 1982. Concepts, Techniques, and Models of Computer Programming has a lot of good material for those interested in Oz/Mozart w/ CS.

  29. Re:I also don't think it makes sense. by AmericanInKiev · · Score: 1

    What if Green Leaf were a non-profit org. Then they could "receive" the copylefted manuscript as a donated "work of art" This way the artists at least gets a decent tax break instead of being played the fool by the tragedy of the commons.

    AIK

  30. Troll Feedin' Time by Lictor · · Score: 2, Informative

    Quite to the contrary, I believe it is you who does not understand my observations.

    Given a countably infinite amount of time, one can set a Turing machine running on an input, and then simply observe whether it halts or not. Heck, you can set it running on a countably infinite number of words, and see if it halts on each one. In other words, you can solve the halting problem.

    Likewise, you can get super-Turing power if you can compute with real numbers (not floating-point approximations, but the true continuum). But again, due to the physics of this world, we can't maintain analog values with an infinite degree of precision (due to thermal noise, etc.) This has even been published in the journal Science by Siegelman, et. al. a few years ago.

    In any case, you've made it clear in your post that you are unable to think these things through for yourself. You simply read Feynman, and accept it as gospel truth, because it came from the mouth of a great prophet.

  31. It's "C"PU because the code runs directly! by Anonymous Coward · · Score: 0

    What a moron.

  32. Re: Road to jail by AmericanInKiev · · Score: 1
    Looks like FUD to me.

    Do you work at Microsoft?

    According to the IRS You can deduct Objects of Art and Collection, including electronic media such as Records. While archaic - art certainly includes books about softwae, and even software itself.

    What you cannot deduct is The Value of Time and Services

    In other words you cannot list the value of your work in terms of the hours spent, but you can list the value as determined by an independant appraiser.

    AIK

  33. Misnamed book by Animats · · Score: 3

    "How to think like a computer scientist" is a bit much for this book. It's an introduction to Python programming, and at best, a mediocre one. It's aimed at the overpopulated "first book on programming" market. The book reads like a BASIC programming manual of 25 years ago.

  34. Re:How about a "Think Perl?" by Anonymous Coward · · Score: 0

    Good job! Thats the most clever goatse.cs link I've seen in ages.

  35. Crikey! by Anonymous Coward · · Score: 0

    That's a crock, or is it croc? If you're thinking Burmese, you are thinking Python.

    What's on the telly?
    There's a penguin on the telly!
    I don't mean what's on top of the television set, I mean what programs is on?
    Oh, well I'll switch it on them (dum de dum).
    What's a penguin doing on top of the television set?
    I don't know. If it laid an egg, it would roll off.
    We'll have to watch for that.
    BURMA!
    Why did you shout Burma?
    Sorry, I panicked.
    "This is the BBC. And now the penguin on top of your television will explode."
    (BOOM!)
    Oh, intercourse the Penguin (Tux would like that).

  36. Upgrade C? No! by wackybrit · · Score: 2, Interesting
    I definitely think this book has some shortcomings. Not in its practicality or even in its multitude of examples, but in the attitude it presents. Here's a quote:
    C is becoming irrelevant to computer scientists, as it fails to adapt to the changing environment of computer engineering. Unlike Python, C fails to embrace newer concepts such as automatic memory management and object orientation. We recommend the use of Python in place of C at any point in the development cycle to all modern day computer scientists.
    I thought the point of these books was to educate people rather than slate languages. C is over 30 years old, so should it really come up for a slating because it doesn't 'embrace newer concepts'?

    C is a system level language, and is still used widely, especially in OS and VM coding. The whole point is for C to remain stable. I certainly don't see Python being used in these applications, and it doesn't deserve to be used at the system level either.. Python is nothing but a glorified scripting language.
    1. Re:Upgrade C? No! by Anonymous Coward · · Score: 0

      The funny part is Python is written in C and not in Python! Now, I wonder why? Hmmmmm....

    2. Re:Upgrade C? No! by Anonymous Coward · · Score: 0
      That just goes to show you how stupid the author is. I here more and more about how C++ is following C's obseleteness. The people who say this are usually Java programmers, or really anyone who doesn't know the C and C++ languages just has "read" about them. Most likely they read books like this "Think Python" where the author tells them this absolute rubbish. Of fucking cource C (and C++) don't have garbage collection. Of cource they don't have string management. Of cource they don't have builtin data structures. What these clumpertons don't realize is that is the "greatness" of the languages. They don't have that extra cruft so you can implement these other languages like Python, Java, Perl, VB, C#, etc... What these people also don't realise is (with the exception of VB) that C and C++ produce NATIVE BINARIES not byte code that runs in a virtual machine. You want to write some drivers, well have fucking fun implementing Python without C existing.

      Not that these languages don't have their place. They are well suited for what scripting languages are meant to do.

    3. Re:Upgrade C? No! by abdowney · · Score: 2, Informative

      Hi All, I don't know where this quote is from, but it is not from my book, and does not reflect my attitude toward C. The preface of the book discusses some of the problems using C++ as a first language for new programmers, but after that we get down to the business of teaching programming. Anyway, there is a C++ version of the book, too! Cheers, Allen Downey

  37. how to make hideous PDFs like a Computer Scientist by khuber · · Score: 2
    They'd be much better if they used the standard PDF Type 1 fonts. (I use pdflatex.)

    -Kevin

  38. You miss the point(er) by pclminion · · Score: 4, Insightful
    While Python is my favourite language, I think it's rather silly to teach Computer Science and especially basic algorithmics with a language that doesn't have pointers.

    You have failed to understand the point of Computer Science (pun intended). Python is a terrific language for teaching CS because it has the basics of discrete structures: lists, maps (in Python, called dictionaries), tuples, and atomic data types such as strings, ints, and reals. That's all you need.

    There's really nothing you can't do once you have lists and maps. Don't object that you can't have O(1) access-time arrays -- you can do that with a map.

    I challenge you to describe any algorithm at all that can't be implemented without pointers. If you think you need pointers, you just aren't thinking like a computer scientist.

    For some classes, such as AI, there's simply no winner for Prolog, and perhaps Lisp

    In general, you are absolutely correct. Of course, this is opinionated and others may disagree. But remember, you can use any Turing-complete language to simulate any other Turing-complete language (that's the entire definition of Turing-complete). Which means I can write a C interpretter in Prolog if I want (and I'm feeling particularly masochistic), and therefore I can simulate pointers using Prolog.

    Oh, but you cry "That can't possibly be efficient!" Right again. But you've again missed the point of Computer Science. CS is about efficient algorithms, not efficient programs. That's something we leave to the software engineers and other "implementors." Us CS freaks think about what can be done, we don't actually do it ;-)

    1. Re:You miss the point(er) by magi · · Score: 2

      Python is a terrific language for teaching CS because it has the basics of discrete structures: lists, maps (in Python, called dictionaries), tuples, and atomic data types such as strings, ints, and reals. That's all you need.

      You're probably right with regards to basic and advanced programming courses, as I also mentioned, but I was talking especially about certain intermediate courses such as Data Structures and Algorithms, and System Programming. In those courses, low-level languages would be better in my opinion.

      I don't know how it's elsewhere, but at our CS dept, we also had mandatory courses such as Introduction to Computer Science, which quickly introduces logic gates and processor microcode programming; Computer Organization, which is about processor architecture at all levels; and Physics for Computer Science, which goes all the way down to electric fields in condensators and coils.

      Sure, you might want to call that Computer Engineering, but I think, and I believe many CS teachers think, that such low-level stuff is important for CS students too for "getting the whole picture".

      Thus, learning how those lists, maps, and other things have been done, is important for CS students too.

      But you've again missed the point of Computer Science. CS is about efficient algorithms, not efficient programs.

      That's of course the academic ideal, but I'd say most CS students will work as programmers after they graduate (or drop out of school). If they don't have the low-level knowledge, they will be next to useless. In all the companies I've worked in, I've never seen a CS student working as an "algorithm designer"; they all either code or do overall system design. Even at university, most algorithm researchers have to pay at least some attention to code efficiency, which usually means using C or C++.

  39. Thinking Perl by vsprintf · · Score: 2, Funny

    from the because-thinking-perl-hurts-too-much dept.

    Thinking (and writing) Perl doesn't hurt at all. It's reading Perl that hurts. Write Once Read Never.

    1. Re:Thinking Perl by namespan · · Score: 2

      What I want to know is when someone is going to write a book like "Python for Perl Programmers".

      (Or, for the flamebait oriented folks, "Python for Perl Refugees".)

      --
      Libertarianism is rich wolves and poor sheep playing gambler's ruin for dinner.
  40. alternatively... by spongebobsquarepants · · Score: 1

    A beginner should try the Python Tutorial at python.org or the O'Reilly book Learning Python by Lutz and Ascher. Both are better intro, and the Python Tutorial can get you programming in a day, especially if you have programming experience. Another online book available from the python site that is also very helpful is Dive Into Python by Pilgrim.

    Also, I wouldn't brand this book "how to think like a compuyer scientist" because it glosses over too many basic concepts. A course in C or C++ is IMO more in line with beginning to think like a computer scentist. Only after mastering the basic concepts presented in one of these languages (or their equivalent) can you even really begin to appreciate the elegance of a language like python.

  41. Re: Road to jail by sheldon · · Score: 2

    You had better go talk to a tax attorney before you land yourself in jail for evasion.

  42. Python is a GREAT language, but. . . by stevarooski · · Score: 4, Insightful
    Python is an excellent languange that I've been using for about 8 months now. Anyone who has ever programmed before can pick it up easily just by reading the [very thorough] documentation at python.org. It also has an rabid support base via newsgroup, who are excellent at answering questions.

    That said, I don't know if I would teach a begining computer science course in python. At my University, our general intro to CSE involves a two class series teaching generic basic theory wrapped around a programming language. We used to teach them with C and C++ but just recently moved to Java. I have been a TA for these classes before. Based on my experiences, I think there are both pluses and minuses to the idea of teaching these classes in python.

    Benefits:
    1. Python is extremely easy to learn, as mentioned before. Much easier than C, C++, or Java.
    2. Python works really well with Tk, which would make it easy to build out skeleton code (multiplatform skel code at that) for the students using windowing and graphics. Students are 100% happier if they can see what they're working on reflected graphically. Makes it more fun to show off. This is why our projects usually include basic games.
    3. BASIC Python is truly, completely, multiplatform, working identically on Mac, Win*, and *nix. Some specialized functions in modules don't support all platforms, but nothing that would be important to a begining student. Support issues would be MUCH simpler than C or C++. God, we had huge headaches trying to support MSVC, CodeWarrior, CodeWright, Borland, etc. . .
    4. There is a great installer script available that will build python modules into either standalone exe's or distributable directories. (Available here if you've never seen this before)
    But, there are also some downsides that would have to be weighed. These are:
    1. I have yet to find a solid dev environment that includes a great debugger. Yes, emacs can be set up to help a bit, and the default program included with the windows install is ok (albiet a bit flaky), but I would want a rock solid, easy to use complete dev studio for my students.
    2. I REALLY dislike any language that depends on white space. Miranda and Haskell are two other examples of this. Its a pain to move blocks around and anyone who doesn't use an editor with auto-indent is screwed. Also, unless tabs are set to spaces, computers with differnt tab stops will see your code differently, which can be a problem if code is emailed, etc.
    3. As has already been mentioning, not too much one can teach about memory management and pointers with python. . .
    4. Sounds kinda strange as a complaint, but too much is built in. I have this complaint about java too. As an example, I would much rather have an early homework be a sorting algorithm and then have them reuse this algorithm in other homeworks than let them just type "xxx.sort()". Not that this isn't a great feature for experienced programmers, its just that begining students should have to do sorting, reversing, duplicating, etc themselves at first.

    Looking away from basic intro classes, python is great to know. I did a lot of AI code sketches in python, and have used it to slap together simple programs at work. However, I would consider it a tool to be learned after the basics have been beat in. If I had learned python first, it would be a lot harder to force me to do everything in C later. :o)

    -s
    --

    - - - - - - - -
    Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
    1. Re:Python is a GREAT language, but. . . by elflord · · Score: 2
      1. I have yet to find a solid dev environment that includes a great debugger.

      I've found Ipython to be very useful. It's not a complete development environment, but it works quite well. It's not the same as a debugger-- it has some relative advantages and disadvantages. A point in its favor is that Python always issues backtraces automatically, which is the most essential function of a debugger.

      Its a pain to move blocks around and anyone who doesn't use an editor with auto-indent is screwed

      You're pretty screwed without auto-indent anyway (-; Re tabs set to spaces: tabs need to be set to spaces or tabs. As long as they're not set to a mixture of the two, there shouldn't be any problems.

      # As has already been mentioning, not too much one can teach about memory management and pointers with python. .

      The Python API will give you so much pointers and memory management that it hurts (-;

      As an example, I would much rather have an early homework be a sorting algorithm and then have them reuse this algorithm in other homeworks than let them just type "xxx.sort()".

      An alternative philosophy is that it's a good idea to learn to reuse a well designed library before rolling ones own poor quality imitation. Python opens up interesting possibilities by allowing one to pass in predicates: L.sort(lambda x,y: y-x), etc etc. It's a good thing to expose students to flexible and well design class libraries, rather than encouraging them to reinvent the wheel. Then they can implement their own custom containers.

    2. Re:Python is a GREAT language, but. . . by mkcmkc · · Score: 2
      I REALLY dislike any language that depends on white space. ... Its a pain to move blocks around and anyone who doesn't use an editor with auto-indent is screwed. Also, unless tabs are set to spaces, computers with differnt tab stops will see your code differently, which can be a problem if code is emailed, etc.

      You have to move blocks around in C, C++, Java and Perl, too. Yes, I know these languages' compilers/interpreters don't care about formatting, but programmers still must indent code to show structure. Otherwise you've got unmaintainable garbage.

      Once you accept this point, you realize that all of those braces are actually completely spurious. The indentation shows the blocks, the braces are just there for the interpreter/compiler. Python has taken a step forward by eliminating them.

      As for tab stops, yes, they are annoying, but the answer to this problem is known. Tab stops must be mod 8. If your terminal/editor/whatever does anything else, it's broken.

      --Mike

      --
      "Not an actor, but he plays one on TV."
    3. Re:Python is a GREAT language, but. . . by Anonymous Coward · · Score: 0

      Indenting each level by 8 spaces is so wasteful of horizontal whitespace. Anyone who would do this is either a moron, or has a VERY large screen, or maybe both.

    4. Re:Python is a GREAT language, but. . . by Anonymous Coward · · Score: 0

      Regarding:
      "I have yet to find a solid dev environment that includes a great debugger. Yes, emacs can be set up to help a bit, and the default program included with the windows install is ok (albiet a bit flaky), but I would want a rock solid, easy to use complete dev studio for my students."

      If you are using Windows you should try the Hap Debugger / Dev environment. It is good and getting better all the time.

      http://hapdebugger.sourceforge.net/

    5. Re:Python is a GREAT language, but. . . by Anonymous Coward · · Score: 0

      Agree, two spaces is usually enough, some people use four, which is still ok. Eight is awful.

    6. Re:Python is a GREAT language, but. . . by greydmiyu · · Score: 2, Interesting

      I REALLY dislike any language that depends on white space. Miranda and Haskell are two other examples of this. Its a pain to move blocks around and anyone who doesn't use an editor with auto-indent is screwed. Also, unless tabs are set to spaces, computers with differnt tab stops will see your code differently, which can be a problem if code is emailed, etc.

      It isn't a pain to move blocks around. At least not more so than any other language when one is coding properly. Nor does not having auto-indent cause any more problems here than any other language when coding properly. Operative words, coding properly. The nice thing about Python is you're assure that the programmer got his blocks mostly right.

      As for the space/tab problem that is simple, no tabs. Done. Tabs are bad. They are very bad. Just say no to Tabs.

      As has already been mentioning, not too much one can teach about memory management and pointers with python. . .

      Oddly enough it is with Python that I finally grasped the concept of pointers. The nice thing about Python is that one isn't constantly trying to do the dereference shuffle to do the right thing. This makes copying lists a little sticky but that is an acceptable trade off compared to scratching one's head over "Ok, this function requires a variable, a pointer-to-a-variable, another variable which I'm going to dereference from this pointer here...."

      Sounds kinda strange as a complaint, but too much is built in. I have this complaint about java too. As an example, I would much rather have an early homework be a sorting algorithm and then have them reuse this algorithm in other homeworks than let them just type "xxx.sort()". Not that this isn't a great feature for experienced programmers, its just that begining students should have to do sorting, reversing, duplicating, etc themselves at first.

      Not only is this an odd complaint it is also a non-issue. There is nothing that precludes you from requiring a home-brew sort to be used in your assignments. It begins something like this, "Yes, Python is nice in that it has a sort function. However, knowing how a sort function works really helps one understand computers and programming. So, today's class we're going to program our own sort function which we'll later use in a larger program." The nice thing is then you can say thisn, "Then we'll compare what we've written with the default sort function..." It is an unimaginative teache who cannot figure that one out. It has been pretty common practice in all of the programming classes I've taken over the years. High school, college and vocational all did it while I was learning BASIC, Turbo Pascal and C.

      --
      -- Grey d'Miyu, not just another pretty color.
    7. Re:Python is a GREAT language, but. . . by Ryan+Hemage · · Score: 1

      The offside rule in Haskell (i.e., the indenting) is optional. You can bung in braces and semi-colons if you want.

  43. ok book, but try this one by skinpup111 · · Score: 1

    www.DiveIntoPython.org: It is one of the best python books I have read. In fact I go back to it every now and then just for a refresher. J

  44. Re: land yourself in jail for evasion by AmericanInKiev · · Score: 1

    That's a very negative apporach. I doubt we can make very much progress if every new idea receives the hyper conservative "do that and you'll go to Jail" What is jail anyway? Bruce Perens was ready to go for the sake of the DMCA. Jail has been an important stepping block for many new ideas.

    That said - I'm not suggesting anyone go to jail. I'm merely asking if the author considered having his art appraised, and if he received a tax deduction as I believ he can according to the IRS.

    What after all is so bloody dangerous about the idea of people create great works of value, donating them to the public, and getting some "public compensation"?

    You know that Bill Gates takes every tax break in the book - why should Open Source programmers take any less?

    AIK

  45. Not about computer science; try SICP instead by alienmole · · Score: 3, Insightful
    That's because it's not about Software Engineering, you fool. It's about Computer Science.

    If you actually look at the book in question, you'll see that the original poster was correct: it's not about computer science at all. It's a Python programming book with a marketing angle relating it to computer science.

    If you really want a book which teaches "How to Think Like a Computer Scientist", try SICP. For a good summary of the book, see this comment from the recent "Best Computer Books" article.

    1. Re:Not about computer science; try SICP instead by fferreres · · Score: 2

      We want it for free :( ... though many of the critics are ineed covered in the book: naming of variables, abstracting and not hardcoding stuff, making it readable, making it generic, wrapping code, etc.

      "It's something like do as I do (though I am not saying it explicitly every 5 seconds)".

      --
      unfinished: (adj.)
    2. Re:Not about computer science; try SICP instead by alienmole · · Score: 3, Insightful
      We want it for free :(

      The link I gave to SICP includes the full text in HTML. How much more free do you need it to be? It's accessible by clicking the link on that page which reads "Full text! The complete text in HTML". Unintuitive, I know, but that's the kind of thing you'll learn to understand as a computer scientist...

      though many of the critics are ineed covered in the book: naming of variables, abstracting and not hardcoding stuff, making it readable, making it generic, wrapping code, etc.

      These things have very little to do with computer science, with the exception of abstraction (which has very little to do with "not hardcoding stuff"). What we have here is a situation where people who know absolutely nothing about the current practice of computer science are using the term to mean whatever they imagine it means.

      Variable naming, readability, wrapping code etc. all involve techniques which any good programmer should understand, academic or otherwise. But calling that computer science is like calling hammering a nail "civil engineering" or "materials science". The Python book, at best, could be described as an intro guide to software engineering, but even that's a stretch. It's really "how to program in Python", with a few technical terms introduced along the way.

    3. Re:Not about computer science; try SICP instead by fferreres · · Score: 2

      Oh thanks! (It sounded like a place to buy the book) I'll try and see if I can get along with it (I don't like math much though I adore logic), it seems more akin to what I need ... (ie: I know to how to program, but not how to make good programs. Every tome i need to add unexpected features or when I review my old stupid ugly code, I am reminded of that fact :-)

      --
      unfinished: (adj.)
    4. Re:Not about computer science; try SICP instead by alienmole · · Score: 3, Insightful
      I don't like math much though I adore logic)

      I also tend to prefer the logic side of things. A lot of computer science of the kind that SICP deals with has to do with mathematical logic, which I find more logic-like than math-like. For that reason, I love the lambda calculus, which is what almost all functional programming is based on.

      If you like logic, and you like programming, you *must* learn the lambda calculus - it'll give you new insight into the meaning of computer programming, and you'll probably enjoy it, too. It has applications to literally every programming language. If you're not already familiar with lambda calculus, the name sounds a lot more daunting than it really is. To start out with, you can think of it as a really simple and primitive programming language - almost the prototypical programming language.

      I'm not sure what the best intro source into lambda calculus is - the academic works are mostly heavier-duty than you really need. Some google searching definitely turns up some useful stuff, but offhand I don't know of a definitive intro site. However, SICP teaches a lot of the necessary fundamentals, since the Scheme language that it uses as a teaching tool is just about the closest language to the lambda calculus that there is. If you learn a bit of Scheme first, learning lambda calculus from the lay perspective is fairly straightforward. (I say "lay perspective" because it has some hairy mathematical underpinnings, which I mostly ignore, and that's OK for most purposes unless you're trying to prove mathematical theories.)

      (ie: I know to how to program, but not how to make good programs. Every tome i need to add unexpected features or when I review my old stupid ugly code, I am reminded of that fact :-)

      ...And then there's programming under a deadline, which is a whole 'nother story.

      I think that these academic topics can be excellent for improving one's design and thinking skills, at least I've found that to be the case. It's an indirect kind of thing, though, and experience is probably equally useful. Abstraction is key, though, whether you do it using object-orientation or modules in functional programs, keeping interfaces separate from implementations is probably one of the most important things, which people violate all the time. It doesn't help that many languages don't provide features to do this properly...

  46. YA : Thinking in Python by esinclai · · Score: 2, Informative

    While not CopyLefted, Bruce Eckel has online a 0.x version of Thinking in Python, which is more pattern oriented.

  47. Re: land yourself in jail for evasion by alienmole · · Score: 1
    What after all is so bloody dangerous about the idea of people create great works of value, donating them to the public, and getting some "public compensation"?

    When it comes to taxes, the definition of "bloody dangerous" is set by the tax department, and pretty much equates to "anything that reduces tax revenues".

    I'm not a tax person, but I think Sheldon may have gotten it right in his original answer to you. Imagine if, instead of donating one of your works, you sold it instead, and then turned around and donated that money. It's a net wash to you - you got income, but you donated it, so you don't pay tax on that income.

    In your scenario, you're conveniently leaving out the bit where you receive income for the work. When you donate it, you're taking a tax deduction based on income you never received. A fairly basic point about taxes is that deductions are almost always based on your income, they're not free gifts of cash from the government.

    So, it seems to me that any tax department in the world is likely to take a dim view of your idea, since it essentially involves the tax department paying you, rather than you paying them and them giving you deductions. Once again, the tax department is not in the business of giving out cash grants, whether for public works or otherwise.

    Your Bill Gates example doesn't really wash for this same reason: he takes deductions from the taxes that he's paying, based on his income. You want to take deductions based on no income. Allowing you to do that would be tantamount to allowing you to print your own dollar bills.

  48. Sorry, but you're confused by alienmole · · Score: 4, Insightful
    While Python is my favourite language, I think it's rather silly to teach Computer Science and especially basic algorithmics with a language that doesn't have pointers.

    At low level, pointers are everything, and low level is what you want to teach when you're teaching basic data structures and algorithms.

    Conceptually and from a computer science perspective, the object references present in languages like Python, Java etc. are equivalent to pointers in all the ways that matter for representation of data structures and algorithms. In the academic community and elsewhere, it's generally considered beneficial to teach such things without reference to the machine pointers which you're referring to, since machine pointers carry a lot of baggage that's unrelated to the abstractions involved in data structures and algorithms.

    There's simply no point in demonstrating list implementation with an interpreted language that has very efficient native lists, dictionaries, etc.

    To refute this, let me offer a tutorial: A Gentle Introduction to ML. If you work through this tutorial, you'll very soon begin implementing functions in the ML language for basic list operations and the like - functions that already exist in the language. And guess what: the implementations that the beginner typically comes up with in that tutorial are very close to the actual implementations that ML uses - the tutorial gives some examples of actual implementations for comparison.

    This high-level operation doesn't even cost much -languages in the ML family, including OCaml, regularly are top performers - see e.g. Doug Bagley's language shootout. They can perform on par with languages like C because their type systems allow sophisticated compile-time optimizations to be performed, and their high-level abstraction features are supported by optimizations such as tail recursion.

    C/C++ or Pascal are much better for that; with them you can teach real implementations, not toy ones.

    If you believe that C/C++ and Pascal are good languages for teaching computer science, you don't know much about modern computer science. All three of those languages have very weak type systems and lack basic features that allow the construction of high-level abstractions.

    Pascal is all but a dead language in the CS community nowadays. The primary use for C is as a decent portable assembler. Learning C has very little to do with computer science, and absolutely nothing to do with teaching computer science concepts.

  49. How to think like a computer scientist: by Hack+Shoeboy · · Score: 0

    class ComputerScientist : public Geek {
    //... stuff deleted
    public:
    void ComputerScientist::think() {
    if (this->getGender() == Gender::MALE) {
    setAbility(Socialization,Ability::BAD);
    setBias(Linux,Bias::GOOD);
    setPriority(Hygene,Priority::LOW);
    } else {
    exit(1);
    }
    }
    };

    --

    IN TEH FUCHAR, LITERSY WLIL EB OPSHANAL!!!!!111
  50. Re: leaving out the bit where you receive income by AmericanInKiev · · Score: 1

    Well no actually, This only works where you have a day job. But let's say the Author of the Python book in question teaches all day and writes this book in his spare. He donates the art to charity and gets a tax deduction from what he paid in income tax withholding.

    In this case the tax department isn't paying you anything - they are simply accepting - on behalf of the public - your contribution in liu of some of the taxes you would otherwise owe on your regular income.

    Give and you shall receive.

    AIK

  51. Federal matching funds for Open Source by AmericanInKiev · · Score: 1

    The problem as I see it with trying to "Create" new government funding for Open Source is that commercial software is one of the few viable industries in this country right now. It pays a ton of taxes and buys a gaggle of politicians.

    The advantage of "discovering" a source of funding is that it is already established, and will be decided by the Supreme Court which is far less susceptable to tax concerns and donations.

    If you were to ask the Supreme court is Software is art within the meaning of the IRS statutes regarding Donations - I think they would be hard pressed to say it is not - as it would have to "be" something else within the context of the archaic terms used at the time. It's probably not going to end up as boot rubber or aged cheese. It has to be "Something" and there aren't very many choices. The IRS forbids the donation of very few things really. And mostly requires the appraisal of an expert for valuation. Legally - I think its a slam dunk.

    AIK

  52. Computer Scientists don't use Perl by Anonymous Coward · · Score: 0
    Unlike Larry Wall, Computer Scientists understand language design well enough that they don't consider Perl worth wasting their time and energy on. Perl is the most horribly and ignorantly designed languages in common use today.

    By using Perl instead of better languages, you're demonstrating that you're not a computer scientist, and that you are so ignorant that you haven't learned any other languages that are much better, more efficient to use, and vastly easier to maintain. Perl advocates are close minded, short sighted, truly stupid for spreading shuch a debilitating disease, and are only interested in preserving their own jobs.

    Of course Perl programmers insist that they can do all kinds of wonderful things in Perl -- but that's not because they're using Perl, it's because they're programming a computer. You can do ALL of those wonderful things in any other languages, and many languages are much easier to use and maintain. There's nothing special about Perl. Perl is absolutely NOT more powerful than any other language. If you were a computer scientist, you would know that. Anyone evangelizing Perl or bragging how good they are, is just perceived as a loud mouthed fool by other people who understand computer science.

    So here is the Reader's Digest version of "Perl for Computer Scientists":

    "What the fuck were you thinking???!??! Stop using Perl and learn some other language, you idiot!"

    The evangellical Perl community is just as bad and unethical as the Cigarette Industry.

    Larry Wall needs to stop polluting the linguistic environment, and go back to school and take CS101.

  53. Don't waste your time with Perl by Anonymous Coward · · Score: 1, Interesting
    Once you learn Python, you will be extremely glad you didn't waste a minute with Perl, you will never have any reason to use Perl, you will laugh at people who don't know any better but to use Perl, and pity people who are forced to use it.

    If you already know Perl, then once you learn Pythin you will regret every minute you ever wasted on Perl, and never want to look at another line of that disgusting language again.

    Perl is such a badly designed language, that's tragically wasteful of your time and effort, and pointlessly complex for no good reason other than ensuring the job security of unskilled laborers who should be working at McDonalds anyway.

    1. Re:Don't waste your time with Perl by axxackall · · Score: 1
      Once you learn Lisp, you will be extremely glad you didn't waste a minute with neither Pyhton nor Perl. Nor Ruby.

      Anf if you have already tried FP on Python, then you don't need any argument - you already wants Lisp.

      The only problem with Lisp - too many of them :(

      --

      Less is more !
    2. Re:Don't waste your time with Perl by Anonymous Coward · · Score: 0
      Anf if you have already tried FP on Python, then you don't need any argument - you already wants Lisp.

      If you have tried OO on Lisp then you don't need any argument - you already want Python, Ruby or Smalltalk.

      (Hint: "self.position[self.piece[i].pos] = King").

  54. It's the glue .... by fferreres · · Score: 2

    of all sciences. Believe it or not, CS means nothing unless you know some other science (but it can also glue other things, like information management, which is not a science but actual data).

    --
    unfinished: (adj.)
  55. Interesting tidbit in the contributor list by Linuxathome · · Score: 1
    Jonah Cohen wrote the Perl scripts to convert the LaTeX source for this book into beautiful HTML.

    Hmmm. Why weren't these scripts written in Python?

  56. O'Reilly's Open Books by FuzzzyLogik · · Score: 1

    You can view certain books by O'Reilly on their Open Book page, located here at http://oreilly.com/openbook/

    Logik

  57. Re:Upgrade C? No! YES! by Anonymous Coward · · Score: 0

    Perhaps system level languages, "especially in OS and VM coding" are not relevant to Computer Scientists? Your point is certainly valid for learning while getting an advanced degree, but you might as well say that we should not abandon optics while studying astrophysics- true, but it misses the point. In fact "a Glorified Scripting Language" is exactly what is needed for Comp Sci, and any Pyhton enthusiast will glady accept the label, "scripting language!"

  58. Think Python! by Anonymous Coward · · Score: 0

    Think C I remember from Symantec, a programming platform for 68k macs. Boy am I getting old!
    How about someone coming up with Turbo Python!

  59. Re:Steal Alanis Morrissette's Look! by Anonymous Coward · · Score: 0
    Yuo aer billyant!@!P> I haev been tring to look liek Aliensi Morrsseettee for year! >/b>

    I wlil haev to get soem STLIA BERFFOT CONTSSEA SHADWO rite awaiy!!!!@!!@

  60. Re:How about how to think like a Software Engineer by abdowney · · Score: 2, Informative

    Ooo! I _knew_ I was gonna get flamed for
    choosing a pretentious title. Really, it's
    mostly meant to be silly (not a marketing
    angle).

    The book is (just) an introduction to computer
    science that focuses on the basics of programming.
    It covers the material I've been able to get
    college students to understand in one semester,
    which means yes to functional and data abstraction
    and no to modules as first class citizens.

    It's also aimed at people with no programming
    experience at all, so I tried to explain the
    basics slowly and LOUDLY.

    Thanks to all the slashdotters that have commented
    on the book!

    Cheers,
    Allen Downey

  61. I did the opposite (was: Re:Question) by sorbits · · Score: 1
    Funny, last week when the headline was something about some old sketches found from Python, I figured it was the author of the [Monthy] Python language who had some hand-written sketches of the initial design/grammar or similar...

    I don't know which is worse...

  62. PDF = Parsing Doesn't Function? by nalfeshnee · · Score: 1

    well i'm not sure about the HTML version, but have you any light to shed on the fact that the PDF books (at least the c++ and python books) are not legible? at least on windows? (i'm here at work -- using win 2k, adobe acrobat 5.0).

    with the c++ one i get a message saying the document's empty, with the python one i can't get past page 1.

    i thought acrobat was supposed to be a platform-independent format? ;)

    nalfy

    --

    -- Despair is an operating system that ANY human being can run, sort of a psychological JAVA --

  63. Thanks ! by Taco+Cowboy · · Score: 2



    Many thanks !

    --
    Muchas Gracias, Señor Edward Snowden !
  64. huh? by sorashim · · Score: 1

    I beg to differ. The two languages are syntactically very different in their approaches to class creation. Have you ever tried object-oriented programming in Perl? I have. It's cumbersome if you've ever programmed in any number of other languages. Of course OOP isn't always appropriate, like if you're trying to remove every fifth line from a log file. In those cases Perl will work just fine. But so will Python and Ruby. Regular expressions exist outside of the Perl world, contrary to popular belief. Perl and Python also handle built in data structures quite differently. Basically they work as you'd expect them to in Python, while in Perl you'll eventually run into some idiosyncracies. Try putting a list inside of a list in Perl and you'll see what I mean. It's easy to nest the structures, but extracting the elements is another matter. Sora

  65. Other Python Resources by hether · · Score: 1

    I know this is way too late, but this page has some great links to Python Resources.

    --

    Most people would die sooner than think; in fact, they do.