You are not logged in.

#1 2006-11-23 17:52:41

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

who was it that said python can be fun?

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

#2 2006-11-23 18:45:53

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: who was it that said python can be fun?

Indentation is better than nested {}'s or if/endifs. Don't you indent your code anyway?

<3 python


I am a gated community.

Offline

#3 2006-11-23 18:47:45

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: who was it that said python can be fun?

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

#4 2006-11-23 21:00:25

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: who was it that said python can be fun?

omg! i can't belive there is still people not indenting their code! smile
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

#5 2006-11-23 21:49:55

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: who was it that said python can be fun?

python can't help you if you refuse to code proper.

Offline

#6 2006-11-23 22:55:08

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: who was it that said python can be fun?

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

#7 2006-11-23 23:00:35

lang2
Member
Registered: 2006-02-10
Posts: 386

Re: who was it that said python can be fun?

indentation is one of the best rules of any programming language, if you plan to share your code with anybody.

Offline

#8 2006-11-24 00:10:48

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: who was it that said python can be fun?

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

#9 2006-11-24 01:24:59

battra
Member
From: Earth.US.Illinois.Chicago
Registered: 2006-05-12
Posts: 71

Re: who was it that said python can be fun?

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

#10 2006-11-24 01:51:24

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: who was it that said python can be fun?

Python is fun and emacs is great at indenting it smile

But I have always been very strict on my indenting in any language. Indenting makes it so much more readable!

Offline

#11 2006-11-24 06:27:47

mucknert
Member
From: Berlin // Germany
Registered: 2006-06-27
Posts: 510

Re: who was it that said python can be fun?

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

#12 2006-11-24 06:31:57

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: who was it that said python can be fun?

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

#13 2006-11-24 06:35:01

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: who was it that said python can be fun?

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

#14 2006-11-24 06:45:41

mucknert
Member
From: Berlin // Germany
Registered: 2006-06-27
Posts: 510

Re: who was it that said python can be fun?

Righto. Thanks for the clarification!


Todays mistakes are tomorrows catastrophes.

Offline

#15 2006-11-24 07:30:17

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: who was it that said python can be fun?

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.
wink
thanks again for ur input.


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

#16 2006-11-24 07:32:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: who was it that said python can be fun?

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

#17 2006-11-24 10:37:08

mucknert
Member
From: Berlin // Germany
Registered: 2006-06-27
Posts: 510

Re: who was it that said python can be fun?

phrakture wrote:

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>

wink SCNR. They are both great Editors.


Todays mistakes are tomorrows catastrophes.

Offline

#18 2006-11-24 12:39:12

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: who was it that said python can be fun?

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

Offline

#19 2006-11-24 12:53:17

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: who was it that said python can be fun?

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

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

#20 2006-11-24 13:11:47

myst
Member
From: Brest, Belarus
Registered: 2006-01-30
Posts: 54

Re: who was it that said python can be fun?

Python code is either beautiful or borken smile

Offline

#21 2006-11-25 00:46:37

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: who was it that said python can be fun?

arooaroo wrote:
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. wink

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 wink

Offline

#22 2006-11-25 14:05:12

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: who was it that said python can be fun?

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

#23 2006-11-25 15:06:49

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: who was it that said python can be fun?

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 wink for a good 'old style' programmer.  lol
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

#24 2006-11-25 15:15:52

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: who was it that said python can be fun?

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

#25 2006-11-26 12:27:17

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: who was it that said python can be fun?

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 wink


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

Board footer

Powered by FluxBB