Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Python is cool?

 
Post new topic   Reply to topic Printable version
 View previous topic  The Halo/bees story. Post :: Post Hanging Computer  View next topic  
Author Message
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Tue May 09, 2006 1:58 pm   Post maybe stupid    Post subject: Python is cool? Reply to topic Reply with quote

So I was reading that informal python tutorial waiting for a client's machine to run some updates and I noticed something:

Code: Show/Hide
...       a, b = b, a+b


What? How cool is that? If it weren't for all this gay new formatting to learn I'd learn this in a heartbeat.
_________________
Oldbie Server Help
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue May 09, 2006 3:12 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Why would you ever do something as convoluted as that?
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Tue May 09, 2006 3:22 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

if you wanted to display the fibonacci sequence?

sorry, i didn't display the whole code snippet, but just the part i liked about the syntax.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue May 09, 2006 4:17 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Yes. And I'm saying it is silly to code that way just because you can. It is confusing.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue May 09, 2006 10:12 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Agreed, do it in two/three lines like everyone else
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Tue May 09, 2006 10:26 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Mr Ekted wrote:
Yes. And I'm saying it is silly to code that way just because you can. It is confusing.

I take it you just l o v e perl and viewing other people's code?
Back to top
View users profile Send private message Add User to Ignore List Send email
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue May 09, 2006 10:36 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Perl coders should be rounded up and shot. Right after the self modifying assembly coders are.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Tue May 09, 2006 10:59 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
Perl coders should be rounded up and shot.


:*(
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue May 09, 2006 11:13 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Mine GO BOOM wrote:
I take it you just l o v e perl and viewing other people's code?


I hate perl, and I hate other people's code. My programming philosophy is all about code ownership. Even if it's a multi-person project. Break things up into functional blocks. Define the interfaces between them. Give each block to a programmer. They are the experts in their respective blocks, and do all the design, coding, commenting, and maintenance.

You touch it, you own it. Taking someone else's code and trying to fix something is just asking for trouble. You often have no idea how far reaching a simple change might be--how it affects the rest of the design. People should also be able to use whatever coding style they want--whatever is easiest for them (and not anyone else) to read. If the person quits, then assign the block to someone else and let them reformat it to suit their needs.

The whole notion of full-blown code sharing on a massive project makes me want to vomit diced carrots.
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Wed May 10, 2006 12:15 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

That's okay. Perl still loves you.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Wed May 10, 2006 11:12 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Mr Ekted wrote:
Yes. And I'm saying it is silly to code that way just because you can. It is confusing.


That's an ignorant viewpoint. If you consider anything that doesn't copy the behavior of C to be confusing and silly, you'll just be restricted to coding in these types of assembly languages all your life: C, C++, and Java. If you consider "a, b = b, a + b" to be convoluted, there's something wrong.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed May 10, 2006 12:08 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

C, C++ and Java aren't assembly languages.

If it made the code more obvious, then I'm all for it, but making things more obscure is just dumb, especially when the less obscure way is 1 extra line.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Wed May 10, 2006 12:42 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
C, C++ and Java aren't assembly languages.


Really, they are assembly languages. Not really.

They're not high level in any way. Everything you write in them maps directly to how processors execute instructions, and when you write in them, you have to tailor your code to how the processor thinks, not how humans think. Obviously, you don't write instructions like mov %eax, %edx, but that's not the point I was making. These languages provide virtually no level of abstraction above the way machines work.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed May 10, 2006 1:48 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

You are a moron. Please never go into programming as a profession.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Wed May 10, 2006 2:45 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Wow, I agree with Brain.
Back to top
View users profile Send private message Add User to Ignore List
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Wed May 10, 2006 4:16 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

I agree with 9:08am Brain.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed May 10, 2006 6:40 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Oh, I agree with 1:48pm Brain. icon_sad.gif

And Ekted, what if someone makes some crappy app but it's open-source? You should remake it yourself instead of modifying his code?
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed May 10, 2006 8:25 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

I disagree, RPI forever
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Wed May 10, 2006 8:29 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
And Ekted, what if someone makes some crappy app but it's open-source? You should remake it yourself instead of modifying his code?


Well, there are 2 issues: crappy code and sloppy code. If someone writes crappy code, why use it all? Make your own. If someone makes sloppy code, then you have 2 options: submit fixes and let them work it into their own style, or take all the code and reformat it to your style (then you have to do it all yourself).
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu May 11, 2006 11:02 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Ekted wrote:
or take all the code and reformat it to your style (then you have to do it all yourself)

Alright, that was what I was talking about.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon May 15, 2006 4:41 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

I'd like to point out you can unpack tuples in a similar way:
Code: Show/Hide
x, y, z = (1, 2, 3)
This gets used in asss modules.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 17 page(s) served in previous 5 minutes.

phpBB Created this page in 0.645544 seconds : 45 queries executed (75.5%): GZIP compression disabled