The first uneasy steps...on Python
Feb. 2nd, 2009 03:05 pmThe thing that irks me most about many, many tutorials on programming languages, is that the author thinks his/her readers are all programmers already. If html was a bit more complicated, nobody could learn it by themselves, and I pride myself on the fact I learnt it myself when I was 15 (and the internet was new, and Geocities was the height of homepage civilisation, and De Digitale Stad was lame).
For example: I'm trying to learn Python. I've installed a Python Windows interpreter (learned about those when I did the skillport module on COBOL!) and pressed F1 for more info on Python. This brought me to a tutorial. Ready, set, here we go:
Whatever. I'm a n00b, so I don't really care about high-level data thingies, whatever those might be, and I've probably never grasped the idea of why object-oriented programming is important. To be honest, NoKey once explained what it entailed, and I've already forgotten it myself. I just want to get down to writing some code!
The Tutorial starts off with some geek jargon that makes you fear for the worst, and truly, the second chapter (Using the Python Interpreter) doesn't bode well. It assumes the reader knows what an interpreter is, and worse: that they know how to use one. Specifically, how to use the Python interpreter itself! Now look here, I've just downloaded this from the intharweb, I've never written a singe page of code before, never even seen the insides of an interpreter and am facing three html closing brackets (>>>) without even a clue what to do with them.
Telling me "The interpreter operates somewhat like the Unix shell: when called with standard input connected to a tty device, it reads and executes commands interactively; when called with a file name argument or with a file as standard input, it reads and executes a script from that file." doesn't help either.
I quit reading at that point. Instead, I just browsed on ahead towards the first comment box, which held and interesting bit of code I couldn't reproduce in my own Python.
*sighs*
Thank goodness I found this lovely book on Skillport: Beginning Python: From Novice to Professional, Second Edition by Magnus Lie Hetland. It starts at the very very beginning, includes simple steps and made me write my first Python program, which consists of two lines of text:
It does exactly this:
What is your name?
[You type in your name and hit enter]
Hello [name you just typed]!
And that's all! Regardless, I am extremely proud, as it took NoKey 37 lines in C to do exactly the same. And the book continues to explain why I used so many quotation marks, why I use raw_input instead of input, and what happens when you use single quotes to mark your string as well as inside the string itself. It's quite comprehensive so far, and I'm eager to learn more.
So ladidah, stupid python.org high level assholes. I'll stick with Magnus for now.
For example: I'm trying to learn Python. I've installed a Python Windows interpreter (learned about those when I did the skillport module on COBOL!) and pressed F1 for more info on Python. This brought me to a tutorial. Ready, set, here we go:
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.
From: The Python Tutorial [Python.org]
Whatever. I'm a n00b, so I don't really care about high-level data thingies, whatever those might be, and I've probably never grasped the idea of why object-oriented programming is important. To be honest, NoKey once explained what it entailed, and I've already forgotten it myself. I just want to get down to writing some code!
The Tutorial starts off with some geek jargon that makes you fear for the worst, and truly, the second chapter (Using the Python Interpreter) doesn't bode well. It assumes the reader knows what an interpreter is, and worse: that they know how to use one. Specifically, how to use the Python interpreter itself! Now look here, I've just downloaded this from the intharweb, I've never written a singe page of code before, never even seen the insides of an interpreter and am facing three html closing brackets (>>>) without even a clue what to do with them.
Telling me "The interpreter operates somewhat like the Unix shell: when called with standard input connected to a tty device, it reads and executes commands interactively; when called with a file name argument or with a file as standard input, it reads and executes a script from that file." doesn't help either.
I quit reading at that point. Instead, I just browsed on ahead towards the first comment box, which held and interesting bit of code I couldn't reproduce in my own Python.
*sighs*
Thank goodness I found this lovely book on Skillport: Beginning Python: From Novice to Professional, Second Edition by Magnus Lie Hetland. It starts at the very very beginning, includes simple steps and made me write my first Python program, which consists of two lines of text:
name = raw_input ("What is your name? ")
print "Hello, " + name + "!"
It does exactly this:
What is your name?
[You type in your name and hit enter]
Hello [name you just typed]!
And that's all! Regardless, I am extremely proud, as it took NoKey 37 lines in C to do exactly the same. And the book continues to explain why I used so many quotation marks, why I use raw_input instead of input, and what happens when you use single quotes to mark your string as well as inside the string itself. It's quite comprehensive so far, and I'm eager to learn more.
So ladidah, stupid python.org high level assholes. I'll stick with Magnus for now.
no subject
Date: 2009-02-02 02:34 pm (UTC)no subject
Date: 2009-02-02 02:52 pm (UTC)The only thing I can think of right now is that you've got some funky CSS which defines what your paragraphs may look like. We use some on the Dolle Griet website ( < p class ="broodtext" > and < p class = "tussenkop" >) but then the CSS defines how your paragraph should look, not the html itself.
no subject
Date: 2009-02-02 02:55 pm (UTC)no subject
Date: 2009-02-02 02:56 pm (UTC)no subject
Date: 2009-02-02 06:03 pm (UTC)Als de mannen hier bezig zijn met dat soort technobabble dan klaag ik altijd dat ik geen Nerd kan spreken. Van Sander krijg ik dan steevast de opmerking "dat maakt niet uit, jij spreekt lapjes."
no subject
Date: 2009-02-02 10:20 pm (UTC)Ik merk inderdaad dat ik bij programming languages altijd refereer naar de ene taal in context van de andere: "Oh, dit is net zoiets als in C++, behalve dat je..."
no subject
Date: 2009-02-03 05:04 pm (UTC)Ik probeer nu prolog te leren. Dat lijkt dan weer helemaal niet op java of wat dan ook, dus ik moet ook nog eens heel anders gaan nadenken, volgens mijn docent. Maar hoe dan wordt ook niet uitgelegd. Ik kan gelukkig wel bestaande programmaatjes uit het boek runnen, dan is meer dan ik op mijn computer kon met java.