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."

17 of 200 comments (clear)

  1. 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: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.

  3. 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 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.

    2. 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.
  4. 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.

  5. 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 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.

  6. 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.

  7. 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.

  8. 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

  9. 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.
  10. 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...

  11. 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.

  12. 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

  13. 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.