Slashdot Mirror


2nd Edition of Learn Python the Hard Way Released

theodp writes "Are you or your kid intrigued by Python, but not quite ready to purchase an in-depth O'Reilly book? Zed A. Shaw's 2nd edition of Learn Python The Hard Way may be a friendlier option. Shaw's path to Python programming is simple: 1. Go through each exercise, 2. Type in each sample exactly, 3. Make it run. If $60 for the hardcover is too much to ask, or $15.99 for paperback, you can spend a measly buck for the PDF/ePub download. Still too steep? OK, there's even a free online HTML edition. After completing the 52 exercises, Shaw's concluding Advice From An Old Programmer says, 'Which programming language you learn and use doesn't matter. Do not get sucked into the religion surrounding programming languages as that will only blind you to their true purpose of being your tool for doing interesting things.'"

167 comments

  1. Python the hard way? by Bowling+Moses · · Score: 0

    Is it as hard as donating your liver, or is only as hard as getting slapped with a fish?

  2. Copy typing by rogueippacket · · Score: 1, Redundant

    How is that the hard way? What ever happened to sharpening your teeth on man pages and samples written by people far better than you?

    1. Re:Copy typing by Nursie · · Score: 1

      Or even just using the big, free programmers handbook for any language you can think of - Google.

    2. Re:Copy typing by greg1104 · · Score: 1

      The hard way part is where you're given exercises that require extending upon the example given. Providing exercises that are just the right difficulty level for someone learning, easy enough to solve and internalize the learning but not frustrating, is a very difficult thing to do as a technical author. I haven't looked at the book enough to comment on how well it does it that everywhere, but the few examples I checked look well constructed so far.

      Also, to address your other comment, Python is one of those languages where looking at code produced by people much better than you can be overwhelming. If you're trying to learn how to do simple work iterating over a list for example, you probably want to just learn that directly--even though someone far better than you might approach the same problem by using a lambda function.

    3. Re:Copy typing by SomePgmr · · Score: 1

      To be fair, you could use his big, free, well-written one that's actually aimed at people who are new to programming.

      I mean, another option doesn't seem like a bad thing.

  3. With a title like that by Anonymous Coward · · Score: 1

    I expect the language laid out in monospaced ASN.1 tables from the get-go.

    1. Re:With a title like that by greg1104 · · Score: 1

      I was hoping they'd used some Python fork where the lexer was replaced by one using APL characters or something.

  4. Languages are different by gweihir · · Score: 3, Interesting

    They can be in your way, they can make you jump though hoops, they can require you to create so much noise that you need tools to write anything in it (java is a prime example). If you are a truly good programmer, you want a language that does not tell you how to do things and just lets you do what you think is right. Even if that language has less extensive libraries than others.

    Personally, I like Python, Lua and C at this time. Python does OO but does not force a specific, limited model on you as most other OO languages do. The one thing that comes close is Eiffel, but at the price of the compiler needing global scope. Lua is just plain elegant minimalistic and again supports OO, but as you see fit, not some restrictive inheritance model. And C just lets you do what you want, very fast if you know what you are doing, although OO, while feasible, has no language support at all. But often you can do without in C anyways. (Yes, even people that understand and like OO sometimes find that not using it is better.) In addition, all three languages are light-weight.

    As to C++, I think that abomination would have been better aborted before birth. You need to know far too much about its internal execution model to write efficient code. At the same time, it is not light-weight anymore.

    I also have observed that most of the Java crowd never manages to get to the level of being even mediocre programmers. To me these people look more like "library call sequencers" that could not ever do anything useful without these libraries and development tools that automatize a lot. Quite often this leads to slow, complex and insecure solutions, where the code is basically unreadable due to too much code, to many layers, too much abstractions and no insight on the part of the programmer. Sometimes Java code is 95% clutter and noise. This problem is less pronounced with other languages. One piece of advice I therefore give to anybody that wants to learn programming is to avoid Java like the plague. This is definitely only a language for quite advanced programmers, although the typical Java programmer is very far from that indeed.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Languages are different by JonySuede · · Score: 1

      This is definitely only a language for quite advanced programmers, although the typical Java programmer is very far from that indeed.

      as a Java programmer let me tell you that this proposition evaluate to true !

      --
      Jehovah be praised, Oracle was not selected
    2. Re:Languages are different by Anonymous Coward · · Score: 0

      Whenever the subject of programming languages comes up, it seems there are always those who like to take a random dump on C++. I wonder how many of these critics ever bothered becoming proficient in the language. If they did, they would see that it promotes large-scale framework or application development (hundreds of thousands or millions of LOC, often spread across dozens of shared libraries or DLLs) that would require extraordinary effort if done in C, without the overhead/requirement of a virtual machine.

    3. Re:Languages are different by gweihir · · Score: 1

      Thank you, I have learned C++, have the standard and consider it unsuitable for almost any task, except maybe an OS kernel. (Which was the original target AFAIK.) A combination of C and OO capable scripting is far more powerful, but requires you to actually know what you are doing on a conceptual (not language) level. I have used this approach with very good success and all of Perl, Python and Lua for the scripting. I saw what happened when my tools were ported to C++. Essentially they became hard to compile, hard to maintain and hard to understand. The mistake was to port everything to C++, both the scripting layer and the C layer.

      C++ is acceptable, if you have a toolmaker using it to create libraries. But it offers little advantage over C in this role and quite a few disadvantages.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:Languages are different by greg1104 · · Score: 4, Insightful

      Java as a base language is just fine. The problem is that the sort of problems people like to solve with Java involve things like database interaction, web applications, and user interface construction. And doing all those things turns Java programming into a giant library exploration exercise.

      Many other languages end up falling into the same trap if you try to push them toward the same things Java aims at. Python for example has a pretty weak database interface layer. If you want to build a non-trivial DB app, you're likely to add both a database driver plus an ORM solution to make that work sensibly. As a PostgreSQL developer I run into psycopg2 + SQLAlchemy as an example combination. The resulting code is arguably no less "library call sequencer" than a similar solution built using JDBC + Hibernate. And the Java one also fits together into all these other "enterprise" app widgets--application servers and database connection poolers for example. You can do all that in Python, too, but you'll find yourself wandering into the same scale of library mess in the end.

      Building an application development framework toolkit that doesn't feel like your language has been turned around to suit the needs of the library is a hard problem. I think one of the reasons Rails has become so successful is that it did a better job than most of avoiding that problem (albeit while giving you a whole different set of problem trade-offs to worry about instead).

    5. Re:Languages are different by Anonymous Coward · · Score: 0

      An OS kernel (and device drivers) seems to be one of the few system programming tasks for which C++ is not in fashion, because of the hidden overhead of object assignment statements, copy constructors and the like. User interfaces, whether GUI or CUI, are probably not the strong suit for C++, with the notable exception of shrink-wrap desktop applications like MS Office (they are just plain faster than Java or .NET GUI's, regardless of what anyone says about performance parity).

    6. Re:Languages are different by Raenex · · Score: 5, Insightful

      They can be in your way, they can make you jump though hoops, they can require you to create so much noise that you need tools to write anything in it (java is a prime example).

      While I'll admit that Java has too much boilerplate, tools are good regardless of any language you use. You don't need tools to write in Java -- people managed before fancy IDEs came along. However, because Java is statically typed, it lends itself to more powerful tools. This is really helpful as projects get bigger.

      I also have observed that most of the Java crowd never manages to get to the level of being even mediocre programmers.

      Oh please, cut the bullshit bashing. I could say the same thing about Python programmers, but that's just throwing insults around.

    7. Re:Languages are different by Anonymous Coward · · Score: 0

      When Java first burst on the scene, I joked in a "ha-ha only serious" kind of way that it would be a career goal to never write any Java. So far I've succeeded. It seems like the threat of "you must do Java" has passed. Posts like this make me feel pretty good about never having to deal with it. It sounds like there will be a lot of legacy Java out there though. Java==COBOL.

    8. Re:Languages are different by Anonymous Coward · · Score: 1

      I like python too. My *ONLY* bitch about it is beginning and ending tags that are non existent. Indent level? Really? I can NOT tell you the number of times this has created a bug for me, because the spacing was off. Had one 'flavor' where if you mixed tabs and spaces in the same file (one dev liked tabs the other spaces) or didnt put tabs on empty lines it would cause the python interpreter to go into lala land.

      That is *THE* one thing wrong with python. What is this punch cards? Seriously? Indent level? Did I step back into the 60s or something?

      I disagree with your C++ statement. I know it is 'cool' currently to rag on it. But it is just as slim or overweight as any other language out there. I have seen abominations written with it. I have also see works of art. You can write crap code in anything.

    9. Re:Languages are different by Nursie · · Score: 3, Interesting

      Python's good.

      It's quite refreshing to go to a language where (as someone with a lot of experience in programming but not much with python) with such flexible syntax that "I wonder if I can write it this way?" usually works.

      And as for rapid prototyping it's great. A couple of evenings and 500 or so lines of python and I can have something that would take me weeks in C. Of course in C I would have had more fine grained control over behaviour and I do run up against barriers in python every so often.

      The major downside for me is the GIL. For anything processor intensive you have to work around the language to use the resources of a modern system, rather than work with the language.

    10. Re:Languages are different by Anonymous Coward · · Score: 0

      Your comments strike me as somewhat unusual. You seem to recognize the value in abstraction, but then continue on to denounce it when bad programmers use it poorly. The problem is that understanding is not something that everyone is well-suited for, especially understanding a raw logical system like the computer. And understanding is something that must occur to write good code. Good code doesn't make it to execution by mistake. Sure, you can mistakenly write good trivial applications that do some basic processing and output a result. But any sufficiently complex system does not reach a high quality without understanding.

    11. Re:Languages are different by Anonymous Coward · · Score: 0

      The company I worked for specially put that OO was a naughty word in their job advertisement to scare away Java programmers, because in the experience of my bosses, Java programmers tend to mediocre at best.

      I have to say I agree.

    12. Re:Languages are different by TheReaperD · · Score: 1

      As a person about to get into database + html design an maintenance, I would like to work with PostgreSQL. What language(s) would you recommend for the front-end interface?

      --
      "Be particularly skeptical when presented with evidence confirming what you already believe." -
    13. Re:Languages are different by Capsaicin · · Score: 2

      I like python too. My *ONLY* bitch about it is beginning and ending tags that are non existent. Indent level? Really?

      I think we all felt that like at the beginning. Now I get really annoyed when I have to use curly braces.

      I can NOT tell you the number of times this has created a bug for me, because the spacing was off. Had one 'flavor' where if you mixed tabs and spaces in the same file (one dev liked tabs the other spaces) or didnt put tabs on empty lines it would cause the python interpreter to go into lala land.

      You need a get text editor. :p

      Seriously though this isn't a major problem if you take a few steps to avoid it. For a start, make sure your text editor will substitute any tabs you might accidentally put into python code with four spaces. Say you use vim or a derivative (I use gvim), put a line in your .vimrc file which will do this automagically, ie au FileType python set shiftwidth=4 expandtab (you also need to make sure .vimrc has :filetype on with pure vi you have to use a hack of setting ts really wide (as there is no et). But whatever text editor you have you ought to be able to set this up.

      Secondly if you are working with someone else's code check for mixed tabs and spaces by running python with the -t or even -tt switch at the cmd line. If there's a problem just do a quick sed s/\t/ /g src.py > src_fixed.py or do this in your editor.

      Once your work environment is properly set up this problem simply vanishes. With time you will come to appreciate the clean code this affords us. Marking blocks by indentation is both easier to type and because it enforces good indentation practice, easier to read and maintain. I had a similar problems with the python idiom (not enforced) not to use accessor methods, but to access attributes directly. Until I realised the properties overcame any tight coupling issues and allowed for changes in object level implementation without breaking any dependencies on that object, all the while resulting in code that is much easier on the eye.

      What is this punch cards? Seriously? Indent level? Did I step back into the 60s or something?

      I've been trying, in vain, to find that Dijsktra quote about how indentation might in the future be used to mark off blocks ... did I just imagine it? Suffice to say that in the 60s, 70s and 80s they could only dream of such syntactic simplicity. This is nothing like column specified Fortran. If that is truly your "*ONLY*" bitch, then with a bit of workflow setup and some more experience using the language, you are about to fall seriously in love!

      --
      Better to be despised for too anxious apprehensions, than ruined by too confident a security. --Edmund Burke
    14. Re:Languages are different by greg1104 · · Score: 1

      I work with people who have built successful web application with PostgreSQL as the database store using Ruby + Rails, Java + Tomcat, and Python + various additions; at a really high level, building extensions to Django is even a popular option. Which is preferable really depends on where you intend to go with this. If you want a spot with a smaller web company, Ruby would be more likely, and giant companies tend toward Java. I can't think of a good way to stereotype the companies that prefer Python, but they are out there too.

    15. Re:Languages are different by GPLHost-Thomas · · Score: 1

      You need a get text editor. :p

      No, the fact the language doesn't deal with the real programmer's life issues with (eventually) bad text editor, or simply because there will always people with bad or diverging habits is python downside. The fact that one may or may not use a text editor that you consider "good" or that you think tabs or spaces are the bad way is irrelevant. You may "like it", and I can see why (like it's forcing people into doing good indentation), but do not dismiss the issues associated with it.

    16. Re:Languages are different by abigor · · Score: 2

      The multiprocessing module is your friend. When it comes to Python, forget threads.

      "multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine."

    17. Re:Languages are different by Anonymous Coward · · Score: 0

      Haskell. Now.

    18. Re:Languages are different by m50d · · Score: 2

      You don't need tools to write in Java -- people managed before fancy IDEs came along.

      I'm pretty sure anyone who did that will be taking early retirement for their RSI. Java has its place but writing it unassisted is literally physically painful.

      --
      I am trolling
    19. Re:Languages are different by Nursie · · Score: 1

      Yes, you're probably right, I ought to take the time to learn that interface next time.

      At that point in my last project (yet another fractal browser) I switched to C++ and OpenGL/CL...

    20. Re:Languages are different by Anonymous Coward · · Score: 0

      You can say what you want about Java but it is increasingly the standard in a wide range of commercial and academic fields.

      Java is simple, fast, consistent, standardized, and cross-platform. You can write everything from embedded applications to highly-multithreaded server code in Java. It is not a perfect language, and it's not the right language for every job. But for a great many tasks it's a fine tool.

      Calling Java developers 'mediocre' is a cheap shot, and it's wrong. Almost all of the best programmers I know write Java on a regular basis, although none of them would pretend that it's the only choice or even the best choice in every case.

      Truly good programmers understand that writing code that's easy to understand is more important than doing 'what you think is right'. Your design is not so cleaver to outweigh the disadvantage of no one else being able to understand your intentions. Java encourages consistency (because the class library gives so many examples of the canonical way to do things), simplicity (because the language is simpler and better defined than most), and documentation (because of Javadoc).

    21. Re:Languages are different by MareLooke · · Score: 1

      With all due respect but Java > COBOL still holds. Ever tried writing a GUI or OO code in COBOL? No? Pray you can keep it that way.

    22. Re:Languages are different by PixelJaded · · Score: 1

      As to C++, I think that abomination would have been better aborted before birth. You need to know far too much about its internal execution model to write efficient code. At the same time, it is not light-weight anymore.

      I'm sure that since you have recommended the abortion of C++, the people who wrote Webkit, Firefox, Microsoft Office, Open Office, KDE (and most of its associated apps), Doom3 Engine, Unreal Engine, Call of Duty, Super Mario Galaxy, Halo (and every AAA game ever basically), etc. will realise their incompetence / lack of experience and switch to C, Lua or Python since those are your personal preferred languages "now".

      C++ is a heavy-weight language, but it does not generate heavy-weight or poorly optimized code. If that were true it would never have been used for Symbian, Android, every modern game engine, Internet Explorer 4 running on 486s, etc. Last year I was using a modern C++ compiler to target code to embedded 25MHz 386s and no optimization work was required to handle thousands of transactions per second. The C++ compilers today actually generate faster code now than they did when the 386 was in its prime. The core design of C++ is extremely elegant once you have an appreciation of the difficulties involved with balancing type safety, performance, meta-programming and other concepts that become significant when writing large, high performance applications. It does a good job of elegantly solving problems that few if any other languages even attempt.

      C++ is not the best tool for every job, and certainly not a useful tool for amateur programmers, but it's a fantastic tool nonetheless. Your personal lack of experience does not make it a bad tool for use by professional programmers who are qualified. Its like trying to claim a heart surgeon's instruments are worthless for saving lives simply because you are not skilled in operating them.

      I also have observed that most of the Java crowd never manages to get to the level of being even mediocre programmers.

      C++ and Java are both widely used internally at Google, Oracle, IBM, and C++ is used heavily at both Microsoft and Apple. When you say java programmers (like those at Google) rarely rise above being mediocre programmers while complaining that C++ is too difficult to learn, your arrogance is matched only by the irony of your words.

    23. Re:Languages are different by jgrahn · · Score: 1

      As to C++, I think that abomination would have been better aborted before birth. You need to know far too much about its internal execution model to write efficient code. At the same time, it is not light-weight anymore.

      I'm sure that since you have recommended the abortion of C++, the people who wrote Webkit, Firefox, Microsoft Office, Open Office, KDE (and most of its associated apps), Doom3 Engine, Unreal Engine, Call of Duty, Super Mario Galaxy, Halo (and every AAA game ever basically), etc. will realise their incompetence / lack of experience and switch to C, Lua or Python since those are your personal preferred languages "now".

      C++ is my favorite language too, but let's be honest -- lots of software which sucks has been written in C++. It's a language which has had the misfortunate to be hyped in the past, and co-hyped with Object Oriented Everything.

      On the other hand, when people like the grandparent can claim to like C and still call C++ an abomination I can only attribute that to ignorance. Just see what a typical non-trivial C program uses instead of the standard C++ containers -- typically a mess of buffer overflows, memory leaks or homegrown type-unsafe and inefficient containers. I'd rather see that complexity *once* in the language, than N times with a myriad variations in the programs.

    24. Re:Languages are different by Anonymous Coward · · Score: 0

      Emacs. And no, I'm not kidding.

    25. Re:Languages are different by Anonymous Coward · · Score: 0

      A programming language is simply a tool to get your computer to do what you want.

      Do you see tradesmen having flame wars about which type of screwdriver is better? The Robertson? The Philips? The Torx? Personally, I prefer a nice slot for screwing, but to each his own...

    26. Re:Languages are different by Toksyuryel · · Score: 1

      If you want to see some really beautiful C code, take a look at the Enlightenment project http://enlightenment.org/

    27. Re:Languages are different by Anonymous Coward · · Score: 0

      Java is great for me for just one reason: the tools.
      Eclipse is a wonderfull tool to refactor code. You can rename a method or move it and be certain that you didn't break the code. Of course, this is possible because is a static typed language. You can't have this and many other refactorings with python.
      I work at a project that needs to translate code from smalltalk to java ( for various reasons ). One of the steps of the process is inferring the type of a variable using the methods, or messages if you are a smalltalk guy, called on it. Everyday the automated process catches a method that is not implemented and would break on production. A simple mistake that could be easily avoided, but that would be disastrous on production. One time a friend of mine asked a python programmer how they dealed with this kind of problem, he said that if you didn't cover your code with 100% unit tests, then you shouldn't program. Not very realistic....
      Of course, if you use reflection on java, then there's no diference.
      There are bad programers in every language. Java is the most used language on comercial softwares, as far as I know. It's natural that most bad programmers are working with java, but thats not a problem with the language. Java is a very powerfull language, it is multiplatform, have a huge community and lot of libraries. Tools like hudson, maven, eclipse.
      Python is good if you are working alone on a small project, because the code fits inside your brain and refactoring and improving code is easy. But, if you work in a big project, with other people and errors that happen on production costs you money I would recomend you to learn java.

    28. Re:Languages are different by gweihir · · Score: 1

      The thing about abstraction is, if you overdo it, it does not help understanding at all, it just obscures necessary detail. True, finding the right level of abstraction is more art than science. The experience that I have made doing code review for Java, is that often there is abstraction for abstractions sake and you have to dig through layer after layer until you finally find one where something actually happens. This is hugely counterproductive, makes the code slow, bloated, hard to read and understand. My impression is that many Java programmers learn to do these abstraction layers without learning that they need to have a good reason for each abstractions step and that without that good reason they must not do it in order to get reasonable code quality.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    29. Re:Languages are different by gweihir · · Score: 1

      Well, in my experience, Java is complex (as you cannot stay in the core language if you want to get anything done), slow, a memory hog, has inconsistent library interfaces, and cross-platform development requires you to know each platform in question. Also, it is neither low-level (as C or C++), nor high-level (as, e.g. Eiffel) nor scripting (as Python, Perl or Lua). It wants to do everything and as a consequence is worse than most other tools at anything.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    30. Re:Languages are different by gweihir · · Score: 1

      Having seen some things out of Google, I know that they are not the wizards some people still believe they are by a fairly large margin. You find tremendous arrogance there and you find many fans that take in anything Google without question.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    31. Re:Languages are different by gweihir · · Score: 1

      You mistake me. Containers are the one thing done better in C++ than in C. However, I found that with just a very small number of OO-style containers in C, the problem goes away. Of course most people claiming to understand OO would not be able to do it in a non-OO language.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    32. Re:Languages are different by gweihir · · Score: 1

      There is a difference between learning and using. I advise people to stay away from Java and C++ for learning. Once they are competent programmers, they can use whatever tool is handy.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    33. Re:Languages are different by RoccamOccam · · Score: 1

      I won't argue the programming merits of significant indentation. However, one thing that it has done for Python is it has helped build a loyal development community. There aren't many languages that work this way, so for those developers that really like that feature, there are fewer competing interests.

    34. Re:Languages are different by Anonymous Coward · · Score: 0

      That's the thing about Java. The Java libraries (and much of the language itself) seems built around making all sorts of weird and obscure edge cases possible or even doable. It at least makes all the hoops visibile, but it seems to require one to jump through at least some of those hoops to do even relatively simple things.

    35. Re:Languages are different by Anonymous Coward · · Score: 0

      Have to agree with you for C++, it's an abomination. I'm an intern right now, and my tutor who is an engineer wants that all the code I write is divided with one class per cpp file. It's an Ogre3D application which also use tinyXML, I love Ogre3D, but by making it OOPish it's going to be much more code, and apparently I'm doing this because apparently the guy "doesn't know shit about 3D", because it seems too complicated for him.

      C++ is really crap, it's adopted by a lot of programmers, but seriously most programmer don't use what makes the strength of C++, or they don't really need it, or they don't know or to use efficiently.

      I just hate the name "C++", it's like someone upgraded the language is some way, or like it's better or something.

      C people are system, kernel and OS programmers, so they are aware of low level concerns, while C++ people

      To me C++ would be interesting if STL and/or boost were implemented in the language as a feature and as a syntax, unfortunately it was not designed for this, and I don't know if we'll ever see it.

      C++ is a low level friendly language, but it allows abstract programming, which is not a good because you have to name your classes into relevant names, which ends up in reality to be an horrible thing to do. You can't have both advantages, it becomes difficult for the programmer to use one language like C++ than to use 2 languages which have different purposes.

  5. From lesson 0 by xs650 · · Score: 4, Funny

    "A programmer will eventually tell you to use Mac OSX or Linux. If the programmer likes fonts and typography, they'll tell you to get a Mac OSX computer. If they like control and have a huge beard, they'll tell you to install Linux. Again, use whatever computer you have right now that works."

    1. Re:From lesson 0 by TomHeal · · Score: 1

      "A programmer will eventually tell you to use Mac OSX or Linux. If the programmer likes fonts and typography, they'll tell you to get a Mac OSX computer. If they like control and have a huge beard, they'll tell you to install Linux. Again, use whatever computer you have right now that works."

      I run Windows because I like to play games :)

    2. Re:From lesson 0 by Anonymous Coward · · Score: 0

      I prefer Windows personally, though I'm in the minority. I usually buff it up quite a bit, though. The GNU coreutils and binutils are available on Windows if you Google them, and a lot of the other functionality you'd expect from a *n?x system is all there or available. MSYS is also nice, and MingW allows me to compile a lot of code that I otherwise wouldn't be able to (though I still usually use msvc when possible). Someone else might say "why not just use *n?x if you're going to make your Windows environment so similar to it?" to which I would respond "because I like and understand Windows." I don't dislike using other systems (in fact, using them was what led me to seek out tools that offered similar functionality for Windows), but I just prefer a Windows environment. It's what I grew up on and it's what I know inside and out.

      It's also nice that I can develop a relatively simple application and have people actually willing to buy it.

    3. Re:From lesson 0 by jsvendsen · · Score: 1

      If you want to program, you should be fine with first learning to dual boot. Anyway, you can play a lot of games in OSX now.

    4. Re:From lesson 0 by SomePgmr · · Score: 1

      I think you'll find that people are mostly amenable to that arrangement nowadays. I keep a couple different machines set up with different sets of tools. I always have a windows distro somewhere to do work-related stuff and the rare game (office, exchange, activedir, photoshop, etc). But I choose to do much of my programming work on other platforms, when able (python, C, etc). Obviously any the of the .net stuff still happens in windows.

      I think most all of us have long since come to a, "use whatever you prefer... just choose the right tool for the job."

  6. Other Free High-Quality Tech Books/Writing? by theodp · · Score: 2

    Philip Greenspun has some good titles: Philip and Alex's Guide to Web Publishing (dated, but I paid cash money for it back in the day), Software Engineering for Internet Applications, and SQL for Web Nerds. If you find yourself in the DB2 world, Graeme Birchall's DB2 SQL Cookbook is a must-have.

  7. Re:Advice from and old programmer. by Anonymous Coward · · Score: 1, Funny

    I have a fever, and the only cure is more COBOL.

  8. Only a limited starter no Python by nikunj · · Score: 1

    Looks like a good attempt on programming, but if I am starting on Python today, I'd prefer using the current version.

    This is a good price-point; yet, if you want to do anything more than an evening with Python, try...

    http://diveintopython3.org/ or
    Computer Programming for Kids http://cp4k.blogspot.com/

    1. Re:Only a limited starter no Python by gweihir · · Score: 3, Interesting

      I have been doing Python 3 for some time. The language is better than Python 2, but you still frequently run into things that are not ported yet. So I would definitely advise either to learn Python 2 and have a look at 3 or the other way round.

      For larger projects, I would advise to still use Python 2 at this time, but with a style that allows an automated upgrade later on. This will mean not using some Python 2 features.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Only a limited starter no Python by im_thatoneguy · · Score: 1

      I loved this website:
      http://www.trypython.org/

      It's an interactive class on Python and sounds a lot like Learning Python the Hard Way.

    3. Re:Only a limited starter no Python by heathen_01 · · Score: 1

      I have been doing Python 3 for some time. The language is better than Python 2, but you still frequently run into things that are not ported yet. So I would definitely advise either to learn Python 2 and have a look at 3 or the other way round.

      For larger projects, I would advise to still use Python 2 at this time, but with a style that allows an automated upgrade later on. This will mean not using some Python 2 features.

      With features like this it is not suprising that nobody wants to use languages like Java anymore.

  9. Exercises not all that good by Warlord88 · · Score: 2, Informative

    I am a novice level programmer in C++/Python and I thought I could benefit from this book. But the exercises seem to be ridiculously simple and it seems a book only suited for someone with zero or negligible programming background.

    1. Re:Exercises not all that good by gweihir · · Score: 3, Interesting

      ... it seems a book only suited for someone with zero or negligible programming background.

      It is. There is a place for such books as well. It does not hide this fact either.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Exercises not all that good by Warlord88 · · Score: 2

      My bad. I never thought Slashdot could run a story on a programming book that I find it easy!

    3. Re:Exercises not all that good by phantomfive · · Score: 1

      It's a great book. It is a simple book, but it explains it well. I may send it to the next person who asks me how to be a programmer, and see what they do with it.

      --
      "First they came for the slanderers and i said nothing."
    4. Re:Exercises not all that good by Anonymous Coward · · Score: 0

      I agree, fully. This is something I may give to 12 year olds after they complete a round with Guido van Robot. Glad I saved myself a buck with the free HTML!

      Hey, me lesson 18. Me guru Python man. ... NOT!!!

      [captcha says "aghast" - all to accurate for the occasion]

  10. This sounds like a good start by billstewart · · Score: 2

    A month or so ago I decided to pick up a Python book at the Borders-is-dying sale, and while it's from O'Reilly, the book is too much of a reference - a lot of bottom-up "here's are six different list-like things" and "nobody expected the Spanish Inquisition, which is why you need to use this method to catch the exception it throws, but you can change that by overloading _ _ that _ _ method name's variable __pope__ or using _ComFyChaiR_ instead, but you can't set __pope__ to French, because that object uses __antipope__ instead, though in later versions you can modify it by using Cardinal()."

    A friend of mine pointed me to python.org's tutorials", which were going to be my next step, but this looks pretty simple and accessible too.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
    1. Re:This sounds like a good start by Toksyuryel · · Score: 2

      A good, free book I've been learning from is http://diveintopython3.org/ I find it to be much better than this book. This book gives really bad advice. For example, claiming that "vim and emacs are for professional programmers only" completely disregards that the only way to get good at either of them is by USING them for a while, a good long while, which would go so well with the message he claims to be sending with this book. Instead of stopping to learn them later, which could take months, you could be learning them concurrently with Python (which is in fact what I am doing right now). Advising not to learn Python 3 AT ALL is similarly bad advice- it's that sort of mentality that causes the adoption rate to be so slow in the first place. Learning both side-by-side would be much preferable, and then you could use your new skills to help port all the old libraries lying around to Python 3.

    2. Re:This sounds like a good start by Anonymous Coward · · Score: 1

      This book is aimed at beginners, people who may have no coding experience whatsoever. Not people switching from other languages.

      Anyone who recommends vim / emacs to absolute beginners should be shot. They bought the book to learn python, not vim / emacs.

      The reason Zed Shaw wrote this book was because he thought Dive Into Python was crap: http://oppugn.us/posts/1272050135.html

    3. Re:This sounds like a good start by lee1 · · Score: 1

      I think Dive Into Python is excellent and Shaw's objections are unjustified. Pilgrim's method is to show you a program that you're not expected to understand immediately and then explain it line by line. Shaw thinks this is too confusing for beginners, and is a bit of an hysterical ass about it.

    4. Re:This sounds like a good start by wisty · · Score: 1

      Which of Shaw's objections?

      That DITP uses ODBC as "your first python program"? Good call, ODBC sucks as a way to introduce python. Something URL or HTML based would be 10 times better.

      That DITP uses advanced inline stuff in the first example? I'm ambivalent. It can help to "dive in" then explain later.

      Shaw's hard-man personae? OK, it's a bit over the top. But if Zed Shaw comes out with "I don't think this is the most appropriate example." rather than "DITP should be shot in the fucking face."; nobody will think he's seriously objecting.

    5. Re:This sounds like a good start by Anonymous Coward · · Score: 0

      For example, claiming that "vim and emacs are for professional programmers only" completely disregards that the only way to get good at either of them is by USING them for a while, a good long while

      You mean for eight or more hours a day, five or so days a week? Like a professional programmer would and a dabbling amateur certainly wouldn't?

      You're an idiot.

    6. Re:This sounds like a good start by styrotech · · Score: 1

      Not that I've read it, but I was under the impression that Dive into Python was aimed at experienced programmers wanting to learn Python quickly without all the extra fluff around learning to program getting in the way.

      And I thought that Python the Hard Way was instead aimed at teaching people to program and Zed only used Python because it was a reasonably good choice for a first language.

      If there's anything wrong, it's probably that beginner programmers are being sent to the wrong material.

  11. Re:Advice from and old programmer. by Tasha26 · · Score: 1

    Too late! At $1 (£ 0.65) and ease of paypal, I literally just grabbed myself a PDF copy. In my defence, the popular 3D program Blender uses Python.

  12. Forget that, go OCW and GPL book by x1n933k · · Score: 2

    Check out MIT's OCW. Free lectures with a GPL Python programming book that does an excellent job at explaining programming and the Python language. The lectures are bad quality but the projects are good for practice.

  13. Misleading by Anonymous Coward · · Score: 0

    Anyone else think this was about watching Monty Python on VHS?

    1. Re:Misleading by greg1104 · · Score: 2

      Oh, you think watching Python on VHS is the hard way, do you? Why, in my day, if we wanted to see a good Monty Python skit we had to go kidnap the performers, construct a set, and buy enough booze to get them drunk enough to perform. VHS? Luxury.

    2. Re:Misleading by ender- · · Score: 1

      Oh you think that's the hard way? Why, in my day, if we wanted to see a good Monty Python skit, we had to form our own dirt out of the elements found in the universe, and evolve our own life forms until they were advanced enough to do Monty Python skits! Set Construction? Pfft! A luxury!

    3. Re:Misleading by greg1104 · · Score: 1

      You started with a universe having elements in it, did you?

    4. Re:Misleading by berashith · · Score: 1

      a universe. In my day we had nothing but a singularity.

  14. What format is the PDF in? Kindle? by billstewart · · Score: 1

    When you bought the PDF, what format was it - Kindle-shaped, or letter-sized paper (A4 or 8.5x11 etc.) or something else? If it's Kindle, it looks like a good price.

    Also, I was surprised by the terms of the free HTML - you're not allowed to change it! The big reason for reading it in that format is precisely to change it, by copying code examples and pasting them into your Python interpreter to see what they do :-)

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  15. Code by people much better than you by billstewart · · Score: 3, Interesting

    One of the things I really liked about C was that once you've learned a few basics like how pointers and structs work, looking at code written by people much better at C than you just makes sense and comments like /* you are not expected to understand this */ are quite rare. That wasn't as true about C++ or Java, where many kinds of things are readable (after getting the basic "object" stuff down") but some of the template stuff is too obscure. It wasn't true at all about APL or PERL :-)

    I was expecting Python to resemble LISP with a different syntax, but it's looking a lot messier than even Common LISP, and of course a lot of the moving parts are hidden in the large number of pre-written modules that come with Python.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
    1. Re:Code by people much better than you by Caesar+Tjalbo · · Score: 1

      I was expecting Python to resemble LISP with a different syntax, but it's looking a lot messier than even Common LISP, and of course a lot of the moving parts are hidden in the large number of pre-written modules that come with Python.

      I don't know why you expected that but I fail to see how whitespace looks messier than parentheses. The hidden moving parts come with a high level language, it's not supposed to be as basic as C or C++. The downside is that not needing to understand the low level operation can lead to not being able to understand the low level.

      Unfortunately, there's no shortage of beginner books for Python but resources for intermediate/advanced programmers are harder to find imho. One is essentially forced to study code written by (hopefully) better programmers.

      --
      "I'm not much interested in interoperability. I want substitutability. I want to be able to throw your software out."
    2. Re:Code by people much better than you by ginbot462 · · Score: 2

      >> books for Python but resources for intermediate/advanced programmers are harder

      I somewhat agree, I feel its like that for many languages except domain specific (e.g. graphics, database) ones for C/C++, but would like to point out two other O'Reilly ones:
      Programming Python (Unfortunately, covers a bit too many unrelated, but advanced topics for me)
      Python Cookbook (Recommend this one, though like it implies, all over the place. You pretty much read it online)

      However, when you get into more specific items like: SWIG/boost wrapping you're left with documentation and google.

      --
      Atlas Shrugged : Thematic Story :: Battlefield Earth : Organized Religion
    3. Re:Code by people much better than you by billstewart · · Score: 1

      The "messier" comment wasn't about the visuals (I'm fine with (either) indentation or parentheses (having learned indentation on keypunch systems (and having used RPG-II and Fortrans 2,4,and Watfiv.))) The messiness is in all the special cases and nonorthoganality and other complexity - after hearing Pythonistas raving about their language for years, I was assuming it would be much neater than PERL, perhaps a Rob Pike or N.Wirth level of aesthetic purity (but still with a large number of pre-written modules.)

      --

      Bill Stewart
      New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  16. I thought that was a joke. by Animats · · Score: 1

    I'd heard of "Learn Python the Hard Way", but I thought it was a joke.

    If you know any other programming language, Python is very easy.

    1. Re:I thought that was a joke. by garaged · · Score: 1

      Totally agree, and the best thing about python is that you usually can get very readable code often with fewer lines than the corresponding alternative you already know. Much like going from bash to perl on a complicated script, I would say

      --
      I'm positive, don't belive me look at my karma
    2. Re:I thought that was a joke. by maxume · · Score: 1

      The book is aimed at people that don't.

      --
      Nerd rage is the funniest rage.
  17. Re:What format is the PDF in? Kindle? by Inner_Child · · Score: 3, Informative

    You can always grab the ePub for that same $1 and use Calibre to convert it to a format the Kindle can use. I just bought it myself, looks great on my Nook.

    --
    Today is red jello day - all workers must eat all of their red jello. Failure to comply will result in five demerits.
  18. "Old programmer" here too, since 1982 by Anonymous Coward · · Score: 0, Troll

    And, for text processing? It's "up there" with the likes of PERL, because of RegExp... good stuff!

    * I co-wrote a system to obtain HOSTS file data with my nephew (from DNSBL lists, HOSTS files of others, & other data sources, including my own researches) in Python 2.7x to:

    ---

    1.) De-duplicate it/normalize said data

    2.) Alphabetize it

    3.) Convert the larger + slower 127.0.0.1 blocking IP Address of the "loopback adapter" address to the smaller + faster & most "universally compatible" 0.0.0.0 blocking IP address

    ---

    For HOSTS files... that's doing so, as I write this, & "automagically", via Python!

    Why?

    Well - I first used to do it circa 1997-2002 using Access Databases & a SELECT * DISTINCT ORDER BY query system after data import, & then export back to text file for the HOSTS file & yes... it worked, but, it didn't "nab" the data itself automatically & on timed intervals!

    So, about mid 2002, I later opted for a Borland Delphi system (because it's fast on strings), & @ the time? I used a "pure brute force" normalization route (slow on LARGE lists, but extremely fast on "smallish ones" (up to 1/2 million line iterms or so)).

    That's because in those days?

    Heh - That's when a 16,000 line HOSTS file for blocking out adbanners &/or known malicious sites/servers/hosts-domains was "huge"...

    Heh - I have, as of writing this & checking the tempfile my system uses before final commission back to the actual HOSTS file here, over 1,459,188++ entries in it... that telling anyone anything?

    Not nowadays though!

    Fact is, the malware-in-general & online attacks via bogusly scripted sites, botnets, & more problem got bad, and I can tell you this FOR A FACT from when my data started flooding in FAR FASTER than it used to, started around 2003-2004...

    I needed something BETTER on large data sets! I was contemplating rewriting the Delphi program algorithm to compensate (took 2 hrs. time on a Intel Core I7 920 CPU).

    See - Around the time I got to 750,000 entries though?

    The "brute force" deduplication algorithm I used in Delphi couldn't really "do the job" as well as it used to... was great & fast (tops 2-4 minutes on 1/2 million records IF I busted up the data into 48 parts, which the program had the options to do that IF I had lots of data) - this was a "temporary fix" though, vs. an algorithm that wasn't fitting the data set sizes anymore though!

    So, sure, I could have rewritten it, but Delphi isn't used as much as it used to be! Time to change...

    (BUT, in its day? In, of all places, a competing trade journal "VB Programmers Journal" Sept./Oct. 1997 issue, it KNOCKED THE CHOCOLATE out of both MSVC++ & VB5... by DOUBLE on MATH & STRINGS! Which is, why I used it of course - HOSTS are text data, & composed of strings!)

    So... what to do?

    Well, my nephew gets the idea to try my idea of HOSTS file processing (he's a junior @ RIT), & to do it in Python

    Guess what... it worked GREAT on this size file!

    The libs in Python have been written VERY well, lots of "DataStructures coursework" thinking went into their libs (written in C/C++ iirc)

    In fact it worked SO well, I decided to take what he had & extend it with errtrapping, better filtration, cleaning up some mistakes he made in filtration, adding console outputs, & better automation with parameter passing functions etc./et al!

    Hell of a LOT LESS WORK TOO, than Delphi or C/C++ code, even with their native string functions libs... which are good, but more work (Python turned up to be "VB-EZ" in fact!)

    So - I tried Python, for TEXT PROCESSING (when I was actually considering PERL first, actually) & have NOT looked back since!

    (Don't knock it, till you've tried it, & with every language, it tends to lend itself WELL, to certain things... for text & string proc

  19. Exercises that good by JeremyBanks · · Score: 2
    That is the idea. The first sentence from the site:

    Have you always wanted to learn how to code but never thought you could?

    and then from the next paragraph:

    ...At the end of LPTHW, you'll know the basics of coding...

  20. Just kidding, but... I think I will now! apk by Anonymous Coward · · Score: 0

    Got a nice help online for this also, very cool!

    http://pythonconquerstheuniverse.wordpress.com/2009/11/12/how-do-i-reverse-a-string-in-python-3/

    APK

    P.S.=> One of the things I like about Python is the AMAZING amount of help online there is for it... unreal! Since I like to do "ReVeRsE-PsYcHoLoGy" on trolls? It's an idea... apk

  21. Confused by the title by FrootLoops · · Score: 1

    Learn Python "the Hard Way" to me implies an advanced book. It seems they meant "Learn Basic Python Well". I kind of prefer this title, too--it's much friendlier for the apparent target audience, even if it's not as catchy.

    1. Re:Confused by the title by Permutation+Citizen · · Score: 1

      Yes, the "hard way" doesn't mean it's advanced, it just means you have to type again and again boring things because it's supposed to be a good learning method.

      Just go through the python tutorial, it will be more effective on every aspect.

  22. Many thanks! by Anonymous Coward · · Score: 0

    This was an outstanding post!

  23. Pro Git by MrEricSir · · Score: 1

    Pro Git is a great resource if you want to get into Git. (You can buy a dead tree version as well.)

    --
    There's no -1 for "I don't get it."
  24. I learned Python... by sconeu · · Score: 1

    By watching The Life of Brian, Monty Python's Flying Circus, and Monty Python and the Holy Grail

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    1. Re:I learned Python... by Tumbleweed · · Score: 1

      By watching The Life of Brian, Monty Python's Flying Circus, and Monty Python and the Holy Grail

      That would be "Learning Python the Completely Different Way".

    2. Re:I learned Python... by Anonymous Coward · · Score: 0

      Since I just recently introduced my 12 year-old son to Monty Python I found this headline intriguing. Never even crossed my mind that it would be about the OTHER Python. Oh well.

    3. Re:I learned Python... by styrotech · · Score: 1

      Yeah but nobody expects to learn it that way.

  25. Re:What format is the PDF in? Kindle? by Luke+Wilson · · Score: 1

    Actually you're not supposed to copy and paste the code. That would definitely not be the hard way. You are supposed to retype the examples yourself, just like back when books were print only.

  26. It is not just the language by NicknamesAreStupid · · Score: 1

    It is the libraries, frameworks, and targets. These are the difference between just learning a language and having grown up with it.

  27. Non issue by Capsaicin · · Score: 3, Interesting

    No, the fact the language doesn't deal with the real programmer's life issues with (eventually) bad text editor, or simply because there will always people with bad or diverging habits is python downside.

    In the same way that the the it is difficult to drive nails into wood with a nail file is the downside of a nail. Once you apply the correct tool in the correct fashion the problem vanishes.

    Really all you have to do is alias python to path/python -tt and there is no problem only a syntax error. Or Alternatively, I have a "bad habit" I tend on occasion to leave the semi-colon off the end of the line when writing in Perl or C. Thus both Perl and C's "downside" is that they "[don't] with the real programmer's life issues .. simply because there will always people with bad or diverging habits." Makes sense to me.

    The fact that one may or may not use a text editor that you consider "good"

    I wrote "... whatever text editor you have you ought to be able to set this up." If you can't then the editor is not "good," but not as a function of my personal aesthetics, but due to its lack of fitness to do its job. Are there really programmer's text editors out there that cannot substitute a tab for four spaces throughout a file?!!

    You may "like it", and I can see why ... but do not dismiss the issues associated with it.

    After 2 or 3 months annoyance with the tabs/spaces "issue" followed by about 10 years withoIn factut even noticing any, I think I'm entitled to dismiss the "issues associated with it."

    As it happens I wasn't dismissing the issue, I was offering advice about how anyone still suffering from this issue could dismiss it.

    --
    Better to be despised for too anxious apprehensions, than ruined by too confident a security. --Edmund Burke
    1. Re:Non issue by Hognoxious · · Score: 1

      Alternatively, I have a "bad habit" I tend on occasion to leave the semi-colon off the end of the line when writing in Perl or C.

      The subtle difference being that a semicolon is detectable by the venerable mk1 eyeball, therefore you don't need to apply any of the bandaids you suggest.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    2. Re:Non issue by Capsaicin · · Score: 1

      The subtle difference being that a semicolon is detectable by the venerable mk1 eyeball, therefore you don't need to apply any of the bandaids you suggest.

      Yes I agree, the invisibility of different kinds of white space, and not the failure of a language to make allowance for a programmer's bad habits, is the source of this "issue." However, to characterise my suggestions as "bandaids" is emotive misdirection. The issue is trivially dealt with: Set up your tools properly and it ceases to exist. Editors are highly configurable. They are so for a very good reason. Use the force.

      --
      Better to be despised for too anxious apprehensions, than ruined by too confident a security. --Edmund Burke
  28. Things about trolltalk.com /.ers should know by Anonymous Coward · · Score: 0

    NOW - First note that the very SECOND I said "HOSTS FILE", note the reply my init. post got by an Anonymous Coward?

    There's a reason for it, read on!

    (Especially in my p.s. below where actual PROOF is & this argument with the same AC here today I blew him away on, regarding my Python HOSTS file processing program I noted here -> http://yro.slashdot.org/comments.pl?sid=2265388&cid=36604424 ):

    NOTE THE MODERATION, to "Insightful"? here in the parent troll's post:

    http://developers.slashdot.org/comments.pl?sid=2278690&cid=36606908

    And then, the downward moderation by HONEST others afterwards?

    Again - There's a reason for it!

    It's obviously a troll, & modded up, INITIALLY (but in a cheating way by the trolltalk.com bunch I have caught them in before, see below, keep reading this only gets better):

    I.E.-> Trolltalk.com members here mod others down, @ the decent posters' expense no less, & mod themselves up, via nefarious tricks... tricks & off topic harassing trolling + libel I will produce proof of!

    So - that all "said & aside":

    IF some of you have EVER wondered WHY a post of yours was modded down (especially vs. countertrolling, or tomhudson, for example (there ARE others amongst their bogus group too))?

    Don't wonder!

    Especially if you "blow the away" many times on tech topics & get their "geek angst up", as I have vs. tomhudson here as an example thereof -> http://slashdot.org/comments.pl?sid=2230966&cid=36418796

    ONCE YOU DO THAT?

    Well - They will scan for you either by SearchSlashdot, or GOOGLE if need be (or your post history) & mod you down to "oblivion" as they have literally told me they would IF I ever took a registered "LUSER" account here!

    E.G.:

    ---

    "First off, why don't you just get an account instead of posting AC? Some (many) of us are tired of you're trolling and would like to be able to mod you down" - by Anonymous Coward on Monday May 23, @01:08PM (#36219132)

    FROM -> http://it.slashdot.org/comments.pl?sid=2177744&cid=36219132

    ---

    (I would register here actually, & yes, even IF they down-modded me, because I have hundreds of mod ups EVEN AS AN AC (& we start @ ZERO, unlike registered LUSERS (no, the good folks here are not that - just the trolltalk.com crew)).

    So, why don't I?

    Well... A gent named Andy K. has "APK" already, & I won't settle for another username (I like being myself online, nobody can take THAT from you anyhow).

    Plus, & I'll be STRAIGHT about this: As an AC, I have a very simple & FAST method to post as much as I like, & no dumb discriminatory "10 posts per 24 hour limit" most AC's have that are NOT registered accounts!

    So that all "said & aside", you want PROOF of my accusations, beyond that quote above...?

    See my p.s. below!

    Especially in regards to HOSTS files, myself being modded down for posting about them, & tomhudson + countertrolling MOSTLY & often by AC replies!

    (Because I've blown tomhudson's DOORS OFF many times on technical issues when he has trolled me, see link above on THAT note!)

    APK

    P.S.=> HOW TROLLTALK.COM (tomhudson, countertrolling & others) cheat the moderation system!

    (Here is where countertrolling explains what he's doing while he trolls myself to his fellow trolltalk.com friends in fact)

    NOW, they do this MOSTLY to harass you, to get you into theirr "journals" they CLAIM are the "most viewed" etc. & highly rated etc./et al!

    That's the

  29. O'Reilly = crap by Anonymous Coward · · Score: 0

    O'Reilly only publishes crappy titles these days anyway

    1. Re:O'Reilly = crap by Anonymous Coward · · Score: 0

      eat a penis

  30. 'learn new languages in about a day".... Bullshit by cruachan · · Score: 2

    Most of this "advice" is bullshit. The "line I've been programming for a very long time. So long that it's incredibly boring to me. At the time that I wrote this book, I knew about 20 programming languages and could learn new ones in about a day to a week depending on how weird they were. " gives it away.

    Sure if you've got a background covering C you can pick up those languages based on C syntax pretty quickly - in terms of writing raw statements - but that means very little as most of the heavy lifting these days is done using the supporting libraries. Sure myself I picked up C# syntax in about that, but groking .Net to a productive level takes a fair bit longer. Even Javascript, which appears very simple for someone with a C background is deceptively simple to think you've got but you're probably missing out on the subtleties whole protoypical inheritance model. And then there's C++. Can anyone who doesn't code C++ as their day-job for less than two years really claim to have C++ and completely under their fingers?

    And we haven't even considered more unusual things like Haskell or Prolog, or even Lisp where it's not just a question of the syntax. Sure if by 'picking up' you mean getting to the point of being able to code Quicksort then yes, but otherwise - well I call bullshit. And I've got over 20 years experience and an average of one language a year over that (but I'd only claim to really have half a dozen completely understood).

  31. Just snagged a copy by bazmail · · Score: 2

    This is exactly how I like to learn, a dew lines about the code, the code, and expected output. Its concise, no crud in there. Its a format i'd like to see more of. I remember reading a C++ book, one of those monster ones from the late 90s that used up about 50 pages printing out encoded resource files, pages and pages of non-human readable crap. (Being a nub at the time I actually typed a lot of it out)

  32. even a blind chicken sometimes finds a kornshell.. by muckracer · · Score: 1

    > 1. Go through each exercise, 2. Type in each sample exactly

    > Do not get sucked into the religion surrounding programming
    > languages as that will only blind you to their true purpose of being
    > your tool for doing interesting things.

    Yes, but to type in the programming exercises, do you recommend using vi or emacs? :-/

  33. "in-depth O'Reilly book" by Anonymous Coward · · Score: 0

    I've never seen an in-depth O'Reilly book. They all seem to be printouts of man pages. Does anyone have a list of gems from O'Reilly that they'd like to share because I found most of their stuff a waste of time.

    1. Re:"in-depth O'Reilly book" by siride · · Score: 1

      Programming Perl is pretty awesome.

  34. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    GNU Emacs, of course.

  35. Re:Advice from and old programmer. by Joce640k · · Score: 1

    Agree. I'm always being told how wonderful/portable it is but every time I try to run a Python program I get "wrong version" or something.

    Chapter 0 of the book has "Make sure you install Python 2 not Python 3.". Uhuh, there's a language I want to invest some time in. Not.

      Is there a reason why the language designers didn't put some kind of versioning into their language when they took the decision that backwards compatibility wasn't important to them? Some sort of shebang on the first line with the version number...? It's not difficult.

    The other setup advice, ie.:
    Open Edit->Preferences select the Editor tab.
    Change Tab width: to 4.
    Select (make sure a check mark is in) Insert spaces instead of tabs.
    Turn on "Automatic indentation" as well.

    Doesn't inspire me to learn Python either. Why impose a rigid spacing structure on a language in a world where tabs aren't standardized (and never will be)? Brackets (or whatever) aren't difficult.

    I grok that Python is great for I'm-too-busy-to-learn-a-proper-language programmers to knock batch scripts together quickly but it's not a language for serious work (ie. programs that take more than a day or so to write).

    --
    No sig today...
  36. Do what I did by Anonymous Coward · · Score: 0

    Use sharepoints/ms access and get a promotion! I am a techgod in the eyes of computer illiterates!

  37. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    Just use 'cat > program.py'.

  38. Re:Advice from and old programmer. by joss · · Score: 1

    So, your post comes down to "I've never used python, let alone programmed in it, but I know enough to insult those who do".
    I programmed in mostly C++ and java (with some lisp and ML) for 20 years before I tried python, and when python is a little sluggish for my needs, I fall back on them but I hardly ever need to. Maybe you're the one who can't be bothered to learn something new and are looking to justify that to yourself.

    --
    http://rareformnewmedia.com/
  39. Re:even a blind chicken sometimes finds a kornshel by Spacelem · · Score: 1

    Yes, but to type in the programming exercises, do you recommend using vi or emacs? :-/

    The author suggests gedit, for all platforms, which is a fair enough suggestion. However he then insists on using spaces over tabs, without any explanation of the relative merits, thus already choosing a side in yet another programming disagreement. A simple "choose one and stick to it" would have sufficed.

    Personally If I follow the book I'll be using vim + tabs, because those are what I'm used to and prefer, but that's just me.

  40. All Python programmers used to work at Google? by PeFu · · Score: 1

    Cited from http://learnpythonthehardway.org/book/ex50.html :
    "Other Python programmers will warn you that lpthw.web is just a fork of another web framework called web.py, and that web.py has too much "magic". If they say this, point out to them that Google App Engine originally used web.py and not a single Python programmer complained that it had too much magic, because they all worked at Google. If it's good enough for Google, then it's good enough for you to get started. Then, just get back to learning to code and ignore their goal of indoctrination over education."

    Hmmm... I remember times when Guido v.Rossum, Tim Peters and others were working at a company called BeOpen.com ... may this shows my age.

    --
    Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany
  41. Heh: I see PyThon fans took care of the troll by Anonymous Coward · · Score: 0

    Advice from and old programmer. (Score:-1, Flamebait)

    Is now the moderation on his post, when it was this before:

    Advice from and old programmer. (Score:0, Insightful)

    ---

    * So, as the saying goes: "The community takes care of its own"

    (Good job fellas)

    These trolltalk.com pests are EXACTLY what I said they were in my post about them here:

    http://developers.slashdot.org/comments.pl?sid=2278690&cid=36608082

    That showed how they operate unfairly against myself, & probably others here too... & what they do AND how they go about doing it, in down-moderating others, & modding one another up in teams (even if their post is a troll or just plain useless b.s.!).

    * Trust me: Unfortunately, I know, 1st hand - They've literally been doing it to me for over a year now here on /. forums

    (Just because I "blew them away" here -> http://slashdot.org/comments.pl?sid=2230966&cid=36418796 shown, & many times for their attacks on myself on HOSTS or Windows - talk about "geek angst"...)

    APK

    P.S.=> These trolltalk.com pests that infest the /. (slashdot) forums (mainly tomhudson &/or countertrolling)? Victims of their OWN "geek angst" & absolutely NO morals/scruples/principals/ethics whatsoever...

    ... apk

  42. Re:even a blind chicken sometimes finds a kornshel by Bacon+Bits · · Score: 1

    Neither:

    If a programmer tells you to use vim or emacs, tell them, "No." These editors are for when you are a better programmer. All you need right now is an editor that lets you put text into a file. We will use gedit because it is simple and the same on all computers.

    --
    The road to tyranny has always been paved with claims of necessity.
  43. Re:What format is the PDF in? Kindle? by Tasha26 · · Score: 1

    Adobe Reader X "Properties" says it's been made using LaTex and is 8.25 by 10.75 inches (20.1x 27.3 cm), doesn't look very A4 to me.

  44. Re:even a blind chicken sometimes finds a kornshel by swillden · · Score: 1

    Yes, but to type in the programming exercises, do you recommend using vi or emacs? :-/

    The author suggests gedit, for all platforms, which is a fair enough suggestion. However he then insists on using spaces over tabs, without any explanation of the relative merits, thus already choosing a side in yet another programming disagreement. A simple "choose one and stick to it" would have sufficed.

    Personally If I follow the book I'll be using vim + tabs, because those are what I'm used to and prefer, but that's just me.

    I think that's a foolish decision.

    Sure, either tabs or spaces will work fine, as long as you're consistent. The problem is that once you move beyond toy programs you will be sharing code with other developers, modifying code you get from other sources, etc. And that other code will use spaces, which means that when you mix your tab-using code with it, stuff will break.

    When writing Python, follow the Python community's coding conventions, and one of the strongest and most important is to use spaces, not tabs, for indentation.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  45. Ignoring the joke aside question by drinkypoo · · Score: 1

    Does OSX actually have any advantages over any other OS when it comes to typography?

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    1. Re:Ignoring the joke aside question by lucian1900 · · Score: 1

      Not really, at least not at the moment. OS X 10.6, latest Gnome/KDE and Win7 all render text nicely, with a few tweaks.

  46. I'll buy THAT for a dollar! by ilsaloving · · Score: 1

    Sorry, had to say it...

    1. Re:I'll buy THAT for a dollar! by djbeauchamp · · Score: 1

      I just ordered the book, and I was kinda surprised at the cost of the book and shipping which had me digging for a coupon code. Fortunately I was able to find one and saved 20% using coupon code SUMMERBOOK11 at checkout. Code is valid at least till the 30th of June.

    2. Re:I'll buy THAT for a dollar! by ilsaloving · · Score: 1

      I went for the ePub version. For $1, I don't mind supporting an author even if the book is below my skill level.

  47. Re: Java crowd being mediocre programmers by Anonymous Coward · · Score: 0

    I like (and use) Java a lot but there's some truth to the statement.

    Java has a funny learning curve. You can start writing things that
    work pretty quickly, but it takes a very long time to learn how to
    map your problem to java correctly the first time -- I mean years.
    And a long time to learn to have enough confidence to rip something
    out and start over when you realize you've gone down the wrong path. And if
    you're working with a group, it's even harder to restructure. Plus
    people working commercially have managers beating them up
    with deadlines. So people crank out what they know and patch
    up large systems keeping time impact to other programmers and
    existing releases to a minimum, and you end up with a lot of
    sub-optimal code.

    But you can get it right. We've got one system that we got pretty
    close to right a few years back and it's held up without much change
    while being retargeted over and over again to different applications.
    Why? We got the underlying model right, and we mapped that model to
    Java the right way.

  48. Even BETTER version (using regexp) by Anonymous Coward · · Score: 0

    #TrollTalkComReversePsychologyKiller.py (Ver #3 by APK)
    import re

    def reverse(s):
        try:
                trollstring = ""
                for apksays in s:
                    trollstring = apksays + trollstring
        except:
            print("error/abend in reverse function")
        return trollstring

    s = ""
    print reverse(s)

    try:
                            s = '...and once word got round of "APK'' + ''s AMAZING DISCOVERIE!!", Python usage plummeted.'
                            match = re.search('"(.*)', s)
                            if match:
                                                            s.replace ('"','')
                            s = reverse(s)
                            print(s)
    except Exception as e:
                            print(e)

  49. Movies by Anonymous Coward · · Score: 0

    I think if you start with the Holy Grail or Life of Brian first, its much easier. Then maybe hit the Flying Circus series.

  50. Re:even a blind chicken sometimes finds a kornshel by lysdexia · · Score: 1
    "If a programmer tells you to use vim or emacs, tell them, "No." These editors are for when you are a better programmer. All you need right now is an editor that lets you put text into a file. We will use gedit because it is simple and the same on all computers. Professional programmers use gedit so it's good enough for you starting out."

    Can't beat that.

  51. Re: Java crowd being mediocre programmers by siride · · Score: 1

    You don't have to hit enter when you reach the end of the textbox. There is a thing called word wrap.

  52. If programming languages are religion, Python is.. by Warwick+Allison · · Score: 1

    nihilism where the most meaningful syntactic element is the empty nothingness of space.

  53. Re:Advice from and old programmer. by surgen · · Score: 1

    Is there a reason why the language designers didn't put some kind of versioning into their language [...] Some sort of shebang on the first line with the version number...? It's not difficult.

    C:\>python
    >>> import sys
    >>> sys.version
    '2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]'
    >>> sys.version_info
    (2, 6, 5, 'final', 0)

    You were saying?

  54. A Critical Review by pinkushun · · Score: 1

    I perused the chapters from start to end, skimming over all-too familiar ones, and looking at the writing and examples explained. It's a fine read for people new to programming.

    It may not be very technically in-depth, may not cover all examples, and it may not warn about all the caveats, but it's a good place nonetheless.

    That's the point of this book.

    If you already know programming, you might find it a bit slow, and would probably prefer something like Dive Into Python.

    I like the creative examples near the end, which introduces ideas like string manipulation and sentence parsing.

    I found some of the writing too prolix, for my liking, but that's just me. And no, I don't have ADHD; my other personality might though.

    Kudos to the Author, Zed.

  55. Re:Advice from and old programmer. by N0Man74 · · Score: 1

    It's your loss. I spent a lot of time learning "proper languages" before getting around to trying Python.

    When I finally got around to looking at the language, I regretted not learning it sooner. I was able to both learn the language and write the program that I needed in less time than it would have taken me using the languages I already knew.

    Python is a handy tool to have available. Sure, it isn't the best tool for every job, but neither is duct tape.

  56. Re:What format is the PDF in? Kindle? by g0bshiTe · · Score: 1

    I never copy paste code even when I can and probably should. Instead I type it out. I find my understanding of what it does deepens, and I tend to retain it longer.

    --
    I am Bennett Haselton! I am Bennett Haselton!
  57. Re:'learn new languages in about a day".... Bullsh by Warwick+Allison · · Score: 1

    Python is a language that takes a day to relearn every time you have to switch to it. I foolishly chose it over Java for my Google app engine code. Only a few hundred lines, but so stupidly different in syntax to every other language that I regularly use it's just a pain. I hate it. Python is fine if that's the only language you use, or if you have a keyboard where it's really hard to type { and }.

  58. Re:even a blind chicken sometimes finds a kornshel by Spacelem · · Score: 1

    I'm a scientific programmer, mostly working on mathematical models and simulation. Almost all the work I do is for myself, and I have very little experience working with others' code. Many of the people I know who use Python are in similar situations. I have personally had far less trouble with tabs than with spaces (aesthetically and functionally), and it's what I'm going to continue using until my circumstances change, since Python doesn't care either way (only the community, who will never see my code).

    I just think that if you're going to tell people to use spaces instead of tabs, at least explain why. It's rather inconsistent considering the author tried to avoid the issue with text editors.

  59. Re:'learn new languages in about a day".... Bullsh by Anonymous Coward · · Score: 0

    > Most of this "advice" is bullshit.

    I've seen endless numbers of programming tutorials that start with "type this in, and run it." Rarely do they adequately explain in advance what the code is supposed to do and what it means. They never offer any help if your example won't compile/run either. You're stuck.

    The very first lesson should be about program design, not code. You wouldn't build a house without drawing up a blueprint first, would you? Otherwise how do you know what you're building? Yet the vast majority of programming books tell you to start coding right off the bat. I think this is a significant contributor to why we have so much bad software out there today.

  60. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    > 1. Go through each exercise, 2. Type in each sample exactly

    > Do not get sucked into the religion surrounding programming
    > languages as that will only blind you to their true purpose of being
    > your tool for doing interesting things.

    Yes, but to type in the programming exercises, do you recommend using vi or emacs? :-/

    He didn't get sucked into that - he recommends gedit.

  61. Re:'learn new languages in about a day".... Bullsh by evil_aaronm · · Score: 1

    Different purposes:

    designing a house and developing a "real" application

        vs.

    learning how to use a scroll saw and how to use a programming language.

  62. Re:'learn new languages in about a day".... Bullsh by Anonymous Coward · · Score: 0

    I'm writing a project in IronPython at the moment - my first serious venture into the language. Actually I find it not at all bad mostly and most things certainly code up pretty quickly - much more so than C# or VB. However when I trip over an I really trip over an issue because all the documentation for .Net is in C# and whilst translating is generally easy enough, occasionally it's a complete nightmare. I've probably saved myself a little time over writing in C#, and it's certainly very nice looking code, but not without issues.

    Python is relatively exotic in syntax compared to the run of C/C++/Java/Javascript type languages, but it's not that far from the nest.

  63. Seems like a good way to learn to hate programming by Anonymous Coward · · Score: 0

    This method is pretty horrifying. It's as if someone suggested learning German by repeating hundreds of sentences in German. You can't learn by merely copying stuff down; you have to learn by doing. If the book had a bunch of exercises that started with a code sample and then said, "look at this example and try to do something subtly different," that would be "learning python the hard way." This is just "learning python the boring way." This book takes learning programming, which should be fun, and turns it into a chore.

  64. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    "If a programmer tells you to use vim or emacs, tell them, "No." These editors are for when you are a better programmer. All you need right now is an editor that lets you put text into a file. We will use gedit because it is simple and the same on all computers. Professional programmers use gedit so it's good enough for you starting out."

    It's right there in the book which makes your joke kinda dumb.

  65. Re:Advice from and old programmer. by Beyond_GoodandEvil · · Score: 1

    Python is a handy tool to have available. Sure, it isn't the best tool for every job, but neither is duct tape.
    Sacrilege! How dare you besmirch the holy duct tape! Burn him! Burn the heretic!

    --
    I laughed at the weak who considered themselves good because they lacked claws.
  66. Better yet on original build (1 more escape) by Anonymous Coward · · Score: 0

    #TrollTalkComReversePsychologyKiller.py (Ver #2b by APK)

    def reverse(s):
              try:
                              trollstring = ""
                              for apksays in s:
                                      trollstring = apksays + trollstring
              except:
                      print("error/abend in reverse function")
              return trollstring

    s = "String to reverse."
    print reverse(s)

    try:
                                                      print(5)
                                                      s = "...and once word got round of \"APK\'s AMAZING DISCOVERIE!!\", Python usage plummeted..."
                                                      s = reverse(s)
                                                      print(s)
    except Exception as e:
                                                      print(e)

    ---

    And, there we go - most "primitive build" there is, but it works just using / escapes.

    APK

    P.S.=> Which will, of course, save me time when I do a "ReVeRsE-PsYcHoLoGy" reply back to the trolltalk.com trolls like tomhudson &/or countertrolling doing to myself here for more than a year... apk

  67. Re:'learn new languages in about a day".... Bullsh by ender- · · Score: 1

    At the same time, drawing up the blueprint doesn't do you any good if you don't know how to nail two boards together properly...

  68. Re:'learn new languages in about a day".... Bullsh by Medievalist · · Score: 2

    I've got over 20 years experience and an average of one language a year over that (but I'd only claim to really have half a dozen completely understood).

    I've got almost 40 years in, and long ago lost count of languages, operating systems, and hardware environments.

    You'll get past this stage.

    You will never have any living computer language "completely understood" for any significant amount of time if you are working on anything more meaningful than simply tracking that language's implementation arc in a world of constantly changing underlying platforms.

    There's a difference between learning a language and memorizing that language's commands and libraries. There's a difference between knowing a language and knowing which language features are optimally supported on a specific OS or hardware implementation, too.

    Learning how you learn is the key, and I think you've already got that. Trying to learn every single thing there is to know about a computer language is a waste of time that could be better spent creating something wonderful. Instead, just learn language weaknesses and vulnerabilities, and google for syntactic boilerplate as you need it.

    Hopefully you'll reach a point where you know exactly what you want to accomplish, and how that can be optimally computed in the target execution environment (regardless of whether that evironment is an embedded RISC processor or a browser DOM) and you'll plot the best path to get to that goal in whatever languages are available to you.

    Eventually you'll probably start avoiding the use of any libraries at all, and start liking languages with very terse syntax. When you find yourself preferring to write fifty lines of C rather than five lines of perl that calls in 50,000 lines of code from CPAN, look out! If you don't keep that tendency well under control, you might turn into Paul Graham.

    To avoid that fate, train yourself to always write code that is maintainable by people who are far less skilled than you are. That way you can delegate maintenance and enhancement to less skilled hands, and go do more interesting things yourself.

  69. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    From the article:

    If a programmer tells you to use vim or emacs, tell them, "No." These editors are for when you are a better programmer. All you need right now is an editor that lets you put text into a file. We will use gedit because it is simple and the same on all computers. Professional programmers use gedit so it's good enough for you starting out.

  70. subjective much? by luis_a_espinal · · Score: 1

    Agree. I'm always being told how wonderful/portable it is but every time I try to run a Python program I get "wrong version" or something.

    Chapter 0 of the book has "Make sure you install Python 2 not Python 3.". Uhuh, there's a language I want to invest some time in. Not.

    Is there a reason why the language designers didn't put some kind of versioning into their language when they took the decision that backwards compatibility wasn't important to them? Some sort of shebang on the first line with the version number...? It's not difficult.

    The other setup advice, ie.: Open Edit->Preferences select the Editor tab. Change Tab width: to 4. Select (make sure a check mark is in) Insert spaces instead of tabs. Turn on "Automatic indentation" as well.

    Doesn't inspire me to learn Python either. Why impose a rigid spacing structure on a language in a world where tabs aren't standardized (and never will be)?

    That's only the convention the author is using. Python spacing rules are more flexible than that. If you wanted to really know them you could have googled it a long time ago. As for the rationale (again, google it?) it does make up for much readable code. I know that for some it is an idea that they cannot stomach, but readability as part of the syntax is a good think.

    And as of why, have you ever had to face code with horrendous indentation or no indentation at all? Specially when people mix code with markup (oh the atrocity)? If you haven't then either you have been a lucky bastard always working with the best of programmers in eternal bliss, or you don't have much work experience at all. Newsflash: most programmers suck at writing readable code. And no, sometimes you cannot run a formatter on source code to fix the damned thing (for political and sometimes even technical reasons.)

    In times like these (which are far more often that one would wish), you do end up wishing for some sort of readability function as part of the syntax.

    Brackets (or whatever) aren't difficult.

    And yet people still fail at writing readable code blocks and scopes with them. For that matter, if it compiles it's great, even if it is impossible to read.

    I grok that Python is great for I'm-too-busy-to-learn-a-proper-language programmers to knock batch scripts together quickly but it's not a language for serious work (ie. programs that take more than a day or so to write).

    It is the premier language for scientific computation and game scripting. And it has been used quite successfully in the enterprise - even if it hurts you - for writing complex applications. At this point you are just trolling and pulling arguments out of thin air just to justify your dislike for the language. I mean, it is your right to like or dislike as you please. Just don't pretend that you are being accurate, educated or objective about it.

  71. Re:Advice from and old programmer. by Eponymous+Hero · · Score: 0

    +5! (Score: 6, Hilarious)

    --
    insensitive clod overlords obligatory xkcd car analogy russian reversals whoosh pedant fanbois ftfy in 3...2...1..PROFIT
  72. Re:If programming languages are religion, Python i by Anonymous Coward · · Score: 0

    isn't nihilism more about a belief that everything is meaningless, so what's the point?

    if the meaningful synctactic element is the nothingness of space, that is probably closer to buddhist ideas, where the emptiness of things is as important (and definitely not meaningless) if not more important than the substance of things.

  73. Re:Advice from and old programmer. by Eponymous+Hero · · Score: 0

    Guys, I'm just like you. I put my pants on one leg at a time. The only difference is once my pants are on I make killer apps!

    --
    insensitive clod overlords obligatory xkcd car analogy russian reversals whoosh pedant fanbois ftfy in 3...2...1..PROFIT
  74. Agreed, 110%, & what kills me about these by Anonymous Coward · · Score: 0

    Guys talking about "Experienced Programmers" is, they haven't learned what I said @ the bottom of my 1st reply, & that is that EVERY LANGUAGE HAS A "NICHE" IT IS PARTICULARLY GOOD AT, & they all lend themselves to certain thing very well.

    Let's see - Since 1982 here, I've written code professionally in:

    COBOL
    RPG
    FORTRAN
    Assembly
    C
    C++
    JAVA .NET dialects (mostly VB.NET &/or ASP.NET)
    PASCAL & variants thereof (Delphi)
    BASIC & variants thereof (such as VB or VBA)
    PERL
    Python
    DOS Batch &/or *NIX shell scripts
    SQL (not really a language, it is, & it isn't by itself @ least)
    HTML (not really a language, more text process markup tool)

    * And, it's ALWAYS work too, even on shorter stuff like I did above, because it's NOT just about writing the code, it's about making sure the DATA COMES OUT STRAIGHT too!

    There's system analysis/business analysis involved as well!

    (Imo, you most always see things you could have done differently or better & more "generically"/catch all for more circumstances etc./et al, later on OR even then... but, then it's a matter of deadline & time free you have IF you can "get back to it later" & correct for it (if REALLY needed that is) & further "optimize" past the QA & bugtest regression tests cycles).

    If you aren't willing to learn new things, then, you're really "limiting" yourself... because diff. shops/companies use diff. tools, & they're are NOT going to change entire codebases to suit you (I learned that early on, my 1st 2yrs. coding professionally really).

    APK

    P.S.=> The parent poster & the fellow you replied to, imo @ least, are the kinds of guys "stuck in their loops" perhaps @ that which they learnt & stuck by ONLY... & aren't flexible enough or willing to change + learn/grow!

    ... apk

  75. Re:Seems like a good way to learn to hate programm by berashith · · Score: 1

    it does this. the extra credit on each exercise gives a challenge based on what the basic goal of the exercise was. I havent looked through all of these to find if there are some that are especially exciting or fun, but the chance at a bit of entry-level creativity is there.

  76. Re:even a blind chicken sometimes finds a kornshel by Anonymous Coward · · Score: 0

    gedit

  77. Re:even a blind chicken sometimes finds a kornshel by swillden · · Score: 1

    I think that believing you'll never have to share code with others is eventually going to cause you great pain. I hope I'm wrong :-)

    Oh, and vim can be configured to always use spaces, but make that completely transparent to you.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  78. Not recommended, the explanations are too thin. by RobertinXinyang · · Score: 1

    I have done very little programming (other than excel) since my college classes in Pascal. based on the reviews here, and the fact that the book is available online for free, I decided to give this book a try.

    I have gotten to this, "Try more format characters. %r is a very useful one. It's like saying "print this no matter what". Search online for all of the Python format characters."

    Well, I searched online. I went to http://docs.python.org/library/stdtypes.html and found this

    String and Unicode objects have one unique built-in operation: the % operator (modulo). This is also known as the string formatting or interpolation operator. Given format % values (where format is a string or Unicode object), % conversion specifications in format are replaced with zero or more elements of values. The effect is similar to the using sprintf() in the C language. If format is a Unicode object, or if any of the objects being converted using the %s conversion are Unicode objects, the result will also be a Unicode object.

    If format requires a single argument, values may be a single non-tuple object. [4] Otherwise, values must be a tuple with exactly the number of items specified by the format string, or a single mapping object (for example, a dictionary).

    A conversion specifier contains two or more characters and has the following components, which must occur in this order:

    The '%' character, which marks the start of the specifier.
    Mapping key (optional), consisting of a parenthesised sequence of characters (for example, (somename)).
    Conversion flags (optional), which affect the result of some conversion types.
    Minimum field width (optional). If specified as an '*' (asterisk), the actual width is read from the next element of the tuple in values, and the object to convert comes after the minimum field width and optional precision.
    Precision (optional), given as a '.' (dot) followed by the precision. If specified as '*' (an asterisk), the actual width is read from the next element of the tuple in values, and the value to convert comes after the precision.
    Length modifier (optional).
    Conversion type.
    When the right argument is a dictionary (or other mapping type), then the formats in the string must include a parenthesised mapping key into that dictionary inserted immediately after the '%' character. The mapping key selects the value to be formatted from the mapping.

    Just to ask, do you really think this means much to a person who has not been involved in programming for several years?

    This book is both too basic, with the instructions of "just type what you see," and too advanced, with an assumption that the reader already knows about the subject and needs no explanation beyond "go look it up somewhere"