Sponsored by Best Buy
You Are The Last-Minute Gift Master! (Guaranteed Win.) view!
bestbuy.com - This gift is never obsolete, everyone likes it and it's always in stock at the last minute...
65 Comments
- zephc, on 10/12/2007, -1/+24I've tried OO Perl before, and it is NOT fun.
Was your snippet supposed to be an argument *for* using Perl? - Schpariel, on 10/12/2007, -1/+15> Python is a very handy tool whenever you need to put together a small script that manipulates some files
> in a few minutes.
I hate it when people say that Python is just for "small scripts"; Python is also great for large projects : A lot of big projects like Severance are made with Python. EVE Online, one of the best MMORPGs these days is also programmed with Python. - bionicvskungfu, on 10/12/2007, -0/+14Such a great language, also check out the beginner tutorials on the python site.
http://wiki.python.org/moin/BeginnersGuide
http://www.python.org/ - bariswheel, on 10/12/2007, -3/+16YouTube is written entirely in Python.
- SOUCHAN, on 10/12/2007, -0/+13Dive Into Python is by far the most easily understood and practical introduction to Python I've seen.
Read it at http://diveintopython.org/toc/index.html - bariswheel, on 10/12/2007, -4/+15I can digg a comment up 3 times in a row...
rowr? - balls187, on 10/12/2007, -1/+12Python is the most gansterific language of all time.
I generally like tackling problems, but programming in python is pure joy.
However, isn't:
#! /usr/bin/env python
more portable than
#! /bin/python - saichele, on 10/12/2007, -0/+8I chose Python as my first programming language. Within 3 months I was writing a multi-threaded gui-based app with asynchronous sockets. Obviously the app was crap, but what other language could get a total newbie up and working with such advanced tools so quickly? I've now been programming for 8 years and have worked in multiple languages. While I subscribe to the philosophy of 'choose the right tool for the job', I will readily admit that programming in Python is simply the most enjoyable way to program, hands down.
- rodrigo74, on 10/12/2007, -0/+7This is such a great free book for such a great language.
I've been programming for nearly 15 years now (from Lisp to Pascal to Modula-2 to C/C++, then Delphi, then Java, then C#...the usual drill) and after so long I was getting kinda bored doing always the same, always the same.
When I decided to learn Python (just to be able to make some quick and dirty Qt/PyQt apps for my Linux installation) I rediscovered the pure joy of programming that I had long forgotten how it felt. It is such an elegant, clean and above all intuitive language. - spiderfish, on 10/12/2007, -0/+6This last comment reminded me of Discworld. Do you really think there's an imp inside a camera drawing the pictures?
- massivemayhem, on 10/12/2007, -0/+6This is a more comprehensive introduction to Python: http://rgruet.free.fr/PQR24/PQR2.4.html
- Sudar, on 10/12/2007, -0/+5"Can anyone confirm YouTube is written in python?"
It was on digg some time back.
http://digg.com/programming/YouTube_is_almost_entirely_written_in_Python - arnar, on 10/12/2007, -0/+5For those who are interested, EVE Online is actually written in a Python variant called Stackless Python.
http://www.stackless.com/ - kdehead, on 10/12/2007, -1/+6"YouTube is written entirely in Python."
and there's rather a lot of python glueing google together.
Guido Van Rossum , the guy who invented python, works for them:
http://www.python.org/~guido/Resume.html - Ademan, on 10/12/2007, -0/+4No, battlefield 2 and battlefield 2142 both use python for scripting, mostly config scripts as far as i've seen, but i'm sure it's available in other places as well.
- rodrigo74, on 10/12/2007, -0/+4You can write unit tests to check that single, atomic units of code (e.g. a single method in a class) work as they should, and then you can write integration tests to be sure that things work OK when put together. Lots of people write tests that traverse lots of classes, interface with databases etc thinking that's unit testing but that's actually integration testing.
So unit tests may not solve _all_ your problems, but it is a great start to be sure that you got at least the basics covered, and to quick check that your newly updated code didn't break anything else in the vicinity. I would consider unit testing the least a programmer can do in terms of quality assurance, and then more complex testing can be added as the software gets more complex. - balls187, on 10/12/2007, -0/+4http://mail.python.org/pipermail/python-dev/2006-December/070323.html
Straight from the mouf (okay keyboard) of Guido V R (creator of Python PL). - bustedagain, on 10/12/2007, -0/+4It's called appreciation.
- Stonekeeper, on 10/12/2007, -0/+3These are the languages I have learnt in chronological order: Basic, GFA Basic, 68K ASM, Pascal, C/C++,Java,Perl,PHP,TCL/TK,Python.
Of all of these, Python has been the most productive by far. It's also a lot of fun, although I had the most fun with 68K ASM on an AtariST. Maybe I'm just twisted ;)
What's interesting to my mind is that I've kinda gone full circle. GFA Basic was a very powerful basic but obviously didn't have the modern language constructs that we have now (objects, iterators, libraries come to mind). I liken it to hardware: we started with machines the size of large halls and shrunk and shrunk, until now, when we have Virtualization and big iron consolidating lots of servers. It's like the new old.
Python is great though: powerful language, a lot of support libraries, shallow learning curve, cross platform. I can't think of anything you couldn't program in Python. - bffoley, on 10/12/2007, -0/+3Civ 4 isn't written entirely in Python. It uses it for a lot of its scripting though
- blafusel, on 10/12/2007, -0/+3Agreed - plus: http://www.python.org/about/success/
- veracon, on 10/12/2007, -0/+3SVN is in fact coded in C; Bazaar, however, which is a competitor to SVN, is coded in Python.
- thatjoekid, on 10/12/2007, -1/+4Google use Python all over the place, and Civilization IV is written in it - I don't think many people can deny it's worth looking at.
- t3hX, on 10/12/2007, -2/+5You bring Apple into something that has no relevance to Apple (besides the fact that python comes with and runs on OS X.) Prepare to be dugg down.
- CCB0x45, on 10/12/2007, -0/+3Python is good to learn in conjunction with obj-c because there is a great python obj-c bridge, we use it all the time at work to link our obj-c executables into our python scripts.
- Manhigh, on 10/12/2007, -0/+3Is Civ IV written in it or does it just employ it for scripting?
- veracon, on 10/12/2007, -0/+2Python is a great language, but this introduction really doesn't do justice. It's filled with incorrect information, such as saying that the keys of a dictionary must be of numeric types or strings; a correct statement would be that they have to be hashable. While that does indeed count strings and numbers, other types like booleans, None (God forbid) or even tuples will work. It also doesn't explain that the latter are immutable, which is really a key piece of information. And it even states that sets need a list argument upon instantiation; while they also accept tuples and, more importantly, strings.
But hell, if this is what's needed for people to start learning... - Berkana, on 10/12/2007, -0/+2Unit testing? Is Python a language designed for strictly Functional Programming? If not, and of it uses OOP and the behavior of the programs depend on local state stored in various objects (as most OOP applications tend to), I'm not sure how unit testing could be done to any good effect in Python, since the outcome of such an OOP application is more than the sum of its parts, depending on the interaction of objects and their respective mutable states.
Could someone more familiar with Python please explain to me how unit testing works in Python? - inactive, on 10/12/2007, -0/+2More python: http://www.youtube.com/watch?v=XcxKIJTb3Hg
- lstep, on 10/12/2007, -0/+2"#! /bin/python"
This is an error. I don't know any Linux distribution that puts python in /bin. python is normally (and should be) in /usr/bin/ . - utcursch, on 10/12/2007, -0/+2If you already know programming, the best no-nonsense intro to python is A Byte of Python by Swaroop C H
Maintained as wiki:
http://swaroopch.info/text/Byte_of_Python:Main_Page
Downloadable versions (Plain Text, PDF) also availble:
http://www.ibiblio.org/g2swap/byteofpython/files/120/ - pyman, on 10/12/2007, -0/+2I have been programming sine '93 using 13 languages (so far) and Python is by far my favorite.
No curly braces easy to read (PERL ugh) and the finished product works everywhere. - catastrophee, on 10/12/2007, -0/+2This will be a good start for me on Maya 8.5, which now includes python for scripting.
- zephc, on 10/12/2007, -0/+1There are a bunch of different ways you can go about learning the fundamentals so you can know how to pick up more CS knowledge later on. I can only tell you what worked for me: i learned C and Z80 assembler, then learned C++ (probably not a good 2nd language, but if you use it, its a good hit-the-ground-running language). After that I don't recall all of what I learned, but theres Perl, Objective-C, Java, Scheme, LISP, PHP, Python in roughly that order, with some other less interesting languages peppered in there. More than anything structured learning (college) worked well for learning, just stick to it and don't drop out.
- CaptainMordecai, on 10/12/2007, -0/+1Once you learn one they are mostly the same. Learn the concepts, not the language per se. The language basically doesn't matter, its just a way to express the program. That said going from one programming paradigm to another is a bit more difficult. OOP languages need to be treated differently to procedural ones (a ***** hot C programmer will probably be a lousy C++ programmer if they treat it as 'C with classes') just like trying to apply OOP principals to functional languages like haskell will leave you in a bit of strife.
BTW I'm learning Objective-C too =] - Stonekeeper, on 10/12/2007, -0/+1Amstrad BASIC! I forgot about that. I think I lumped Aquarius BASIC and CPC BASIC together...
- CCB0x45, on 10/12/2007, -0/+1Just to comment on my above post, the obj-c bridge is particularly useful if you are on OS X(which I assume you are since you are learning Obj-C) since it gives you access to all the foundation classes from python(further strengthening python as a scripting language)
- fanboydcs, on 10/12/2007, -0/+1currently I am learning objective C, on the 5th chapter of the book (Stephen Kochan is awesome since he assumes no prior C knowledge), I am hoping that learning a complex programing language will allow me to quickly pickup other complex languages like python and java.
- zephc, on 10/12/2007, -0/+1Python works pretty well for whatever you need. As for unit testing, I suggest something called doctests, which are multi-line comment strings of python interactive shell sessions. Check out http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-2-doctest.html
- Ademan, on 10/12/2007, -0/+1I'm not familiar with python to the point of being able to describe that, but i do know it's a multi-paradigm language, not strictly functional, not strictly imperative.
- zzleeper, on 10/12/2007, -0/+1I'm not a CS, but an economist:
My main exposure to programming is through VBA and a few "econometric" programming stuff (Matlab, Stata, ...).
For me, jumping to the C / C++ / Java bandwagon is simply not feasible. The cost far outweights the benefits. However, Python is so easy to learn, so fun! Learning it is not a cost actually, but part of the fun!
With Java, I'll be stuck with all those dots. With C++, well.. it's a steep learning curve. Python, OTOH, is much more easy for a non-CS, and has 100 times more power than VB or other "easy stuff".
Viva Python! - kdehead, on 10/12/2007, -0/+1sinclair basic - z80 asm - amiga amos - clipper - perl - php -python
- diecastbeatdown, on 10/12/2007, -0/+1i'm not sure where this big arguement comes from about whitespaces. it is quite simple to nice if you are off by a space or not and if your code is so massive that you can't keep track of such things then you need a program that can monitor this for you. i've never had any errors due to my indentation. don't use tabs, and don't go any deeper than three indentations. like linus says, if you have to indent more than three lines then your code is *****.
- biotique, on 10/12/2007, -0/+1@did49ddjf4j3idi
As most people in this thread I'm more interested in Python than your whining.
So if you don't like Digg or Python what the hell are you doing here, tard?
Actually, don't answer... stfu, gtfo and take your bs with you! - t3hX, on 10/12/2007, -0/+1AppleScript - HyperTalk - QuakeC - C - Objective-C - Python
Each learned from necessity...
Now I use Obj-C for full apps, and Python for quick stuff.
I also learned a bit of Javascript, Perl, PHP, PowerPC ASM and C++ along the way... but not enough to actually code from scratch im them.
Oh, and GLSL too. - tuffy, on 10/12/2007, -0/+1Python is a joy, but a good text editor is a must. Anything that inserts literal tabs (0x9) instead of multiple spaces is going to be a huge headache. It's also very helpful to have one that'll let you highlight a block and indent/un-indent it as needed - which comes in handy when you need to stick a try/except block around some code. These features are pretty common, but they go beyond the usual Notepad stuff.
- tuffy, on 10/12/2007, -0/+1Not far wrong, though.
http://en.wikipedia.org/wiki/Python_%28programming_language%29#Humor - LaundroMat, on 10/12/2007, -0/+1Interesting. My path runs along these: Atari BASIC - Amstrad CPC BASIC - Amiga AMOS - Amiga Assembler (86020) - AmigaE - VB - PHP - Python
86K assembler was the most fun as well, and AmigaE introduced me to OO programming, for which I'm forever grateful. - Archon810, on 10/12/2007, -3/+3SVN is written in python too I believe. So are most of google pages that have some kind of interaction (adsense, adwords, etc).
-
Show 51 - 66 of 66 discussions



What is Digg?