I'm going to pick up Python (for Highbrow) and Ruby (for Warbook).
For python, I'm starting out by doing Project Euler.net: http://projecteuler.net/
That means for the next few days, you guys may be getting random notes from me regarding the strange things I encounter in the world of snakes and jewels.
Starting out with Python:
• print automagically adds a newline. Why?
(Also, slicing is kinda cool. I like the string_variable[4:9] notation..)
• Using commas to concat multiple things that aren't strings results in extra spaces. :/ Ick. Can turn it into a string by using str, or using printf style printing with %s, followed by %. Oh, perl, how you have spoiled me.
• The forced syntax based off of indenting and lack of semi-colon line-endings still bothers me. Suspect I'll get over it eventually... hopefully.
• Where's my +=...?
• And... I can't do i++ or i--? EHHH??!?!?
[edit #...6ish]
http://projecteuler.net/index.php?section=profile&profile=21827
For python, I'm starting out by doing Project Euler.net: http://projecteuler.net/
That means for the next few days, you guys may be getting random notes from me regarding the strange things I encounter in the world of snakes and jewels.
Starting out with Python:
• print automagically adds a newline. Why?
(Also, slicing is kinda cool. I like the string_variable[4:9] notation..)
• Using commas to concat multiple things that aren't strings results in extra spaces. :/ Ick. Can turn it into a string by using str, or using printf style printing with %s, followed by %. Oh, perl, how you have spoiled me.
• The forced syntax based off of indenting and lack of semi-colon line-endings still bothers me. Suspect I'll get over it eventually... hopefully.
• And... I can't do i++ or i--? EHHH??!?!?
[edit #...6ish]
http://projecteuler.net/index.php?section=profile&profile=21827
no subject
Date: 2007-12-18 05:59 am (UTC)use + to concatenate without a space
to make print not automagically add a newline, add a comma on the end of the line
you'll get used to the indenting, especially if you set up your text editor with that in mind (there are some really god vimrc files out there).
++ and -- are not here. sowwy. +=1 and -=1 is the best you'll get.
no subject
Date: 2007-12-18 06:00 am (UTC)no subject
Date: 2007-12-18 06:07 am (UTC)Yeah, figured out most things (not sure why I had issues with += earlier... that was quirky. Gone now though.), but thanks.
no subject
Date: 2007-12-18 06:08 am (UTC)no subject
Date: 2007-12-18 06:24 am (UTC)Fun fact: We are all amateur-ish python programmers.
no subject
Date: 2007-12-18 06:40 am (UTC)no subject
Date: 2007-12-18 07:08 am (UTC)So far the only one where the algorithm took a while to run was #23 - my solution took about 40 seconds to run, so I'm guess it was grossing inefficient. Probably later I'll read the solutions thread and learn how to do it properly.