You are not logged in.
who was it that said python can be fun?
i read somewhere that python is fun to program in, wth?
i was bored 5 minutes ago so i though, hey, my weekends start now, why don't i join the python wagon ...
6 minutes later, i still feel liek i wanna explode,
mainly cos of the damn indentation karp...
sorry if this is supposed to be in off-topik, move it if it's supposed to be please,..
i'm gonna go lie down... x|
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
Indentation is better than nested {}'s or if/endifs. Don't you indent your code anyway?
<3 python
I am a gated community.
Offline
only if my fingers accidentally brush up against the spacebar... eww cooties lol
me loves my curly braces and semi-colons; lol
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
omg! i can't belive there is still people not indenting their code!
Indenting my code is the one most important (and time saving) thing i ever learned, through all these years since i started out. Probably the easiest thing to learn as well.
"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."
SETH / Jane Roberts
Offline
python can't help you if you refuse to code proper.
Offline
I think its safe to say that python was designed to enforce a specific coding style and that most people who choose that coding style prefer Python.
Dusty
Offline
indentation is one of the best rules of any programming language, if you plan to share your code with anybody.
Offline
The first time I did Python coding it felt awkward but after a short while I was just at home.
It's just a matter of getting used to indent and that's all.
There are some programs that will indent, "python style" automatically, like Komodo and that is very nice but Komodo is also very slow to load and I've hardly use it anymore. Nowadays I mostly use Quanta.
Offline
There are people that whine every time a new feature or concept is introduced in programming language design or technology in general - even when it has advantages. This is change resistance- plain and simple - basic human nature.
They did the same thing when object orientation first came out. There were C programmers who complained, "Creating objects and classes is boring and annoying. Why not just put everything in function libraries?"
Or...
"Passing functions to other functions as parameters is weird. I don't like it."
Or...
"Why switch from Windows to Linux? Who said Linux was fun? Fooling around at the command-line makes want to explode. Windows is so much more user and hardware friendly. Yeah, there's an occasional blue screen of death, but all OSes have problems like that."
"I know nothing except the fact of my ignorance."
- Socrates
Offline
Python is fun and emacs is great at indenting it
But I have always been very strict on my indenting in any language. Indenting makes it so much more readable!
Offline
While I know that indentation is a good thing to do to structure your code and make it readable I just don't get why this woud belong to the syntax of a language.
Since I do not know squat about Python someone enlighten me. I fail to see the technical reason. Someone else mentioned, that curly brackets and semicolons are not used in Python which means that indentation is Pythons way of separating functions, loops and whatever from another. Or am I completely wrong?
Todays mistakes are tomorrows catastrophes.
Offline
There is no technical reason. It's purely syntax. Syntax is never technical (except for lisp and forth). I mean, if people bitch about indentation vs {}, why not bitch about "else if" vs "elif", it's the same damned argument.
Offline
You are correct. This is a simple, legal and complete python program:
for i in range(5):
print i
while this is illegal
for i in range(5):
print i
Offline
Righto. Thanks for the clarification!
Todays mistakes are tomorrows catastrophes.
Offline
thanks guys for ur input ...
i guess i'll python another go, it seems nice from over hear, maybe i get closer and poke it lol..
i've found eric4, it seems to help with the indentation,
and also, it' doesn't seem so bad now i experimented a lil with it,
cos you don't need to to [return] on line statements like
if "i have to do it":do_it()
the documentation i used (@wikibooks) mentioned nothing of the sort, so hehe..
beside, if i put it off now, itll be a problem next year when i'm forced to learn it by my uni.
thanks again for ur input.
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
noriko: my guess is you're just not using an editor that autoindents, which is a bad idea. I'd recommend picking up something like emacs or vim - they are invaluable editors to know.
Offline
noriko: my guess is you're just not using an editor that autoindents, which is a bad idea. I'd recommend picking up something like emacs or vim - they are invaluable editors to know.
<troll>
Especially Emacs.
</troll>
SCNR. They are both great Editors.
Todays mistakes are tomorrows catastrophes.
Offline
vim ... I've tried to learn how to use it a dozen times and every time I end up running scared after the first 15 min.
Offline
vim ... I've tried to learn how to use it a dozen times and every time I end up running scared after the first 15 min.
This might help: http://www.andy-roberts.net/misc/vim/vim.pdf
You just have to remember that vim has 'modes', and once you've got used to that then you're away.
Offline
Python code is either beautiful or borken
Offline
ralvez wrote:vim ... I've tried to learn how to use it a dozen times and every time I end up running scared after the first 15 min.
This might help: http://www.andy-roberts.net/misc/vim/vim.pdf
You just have to remember that vim has 'modes', and once you've got used to that then you're away.
arooaroo,
Thanks for the link! As soon as I recover from my last traumatic experience with vim (you must consider that each failure affects my self-confidence :shock: ) I'll give it another try with the reference
Offline
ralvez,
don't worry, I reckon 99% of vim newbies go "wtf?!?" I certainly did. And whilst I probably use a minuscule amount of Vim's functionality, I see find myself being so much more productive than more standard editors.
Offline
I'm old style when it comes to coding... coz I like to 'hand code'.
I'm a relatively good typist too, so I strongly believe that I'm just as fast as someone using a WYSIWYG tool to do the coding for them with the added advantage that I can make more intelligent decisions about code than a piece of software and on top of it I can do a cleaner job at it too.
Add to that that I'm humble and we have the perfect combination for a good 'old style' programmer.
I've been using Quanta and Bluefish for a number of years now but I yet want to understand Vim since I have heard so many good things about it.
Offline
Well, Vim isn't just a programmer's editor - it's great for general text editing. However, it comes with a huge wedge of features that will be useful for programmers. It's not an IDE - it won't try to take control, or auto-generate cruft that you don't need - so it's as 'clean' as you are.
It's amazing how much you can do without a mouse with text-editors like Vim. Once you've got a few key-strokes under your belt then you'll be flying.
Offline
thx guys,
@phrakture
y ur right, geany also kinda does it it but it could be better, but i'm getting to "having to" autoindent, it's turns out it's not so bad afterall ...
wish i'd done it better before, cos now i gotta rewrite about 700 lines of php, it's prolly the most messy piece of code u've ever seen
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline