Friday, September 30, 2011

Playing with the python...

So after doing a lot of searching regarding what I should learn in terms of how to code again, I keep stumbling upon Python. I know I was pretty adamant before to not learn it, but I keep seeing it in job postings and how much folks find it so useful. So that's where I start. I actually wanted to start a while back and realized it so much more of a hassle to install it on a Windows machine. The Mac has it preinstalled. I simply get to Terminal (now that was an adventure in itself, Lion's very different than Leopard that my mom's iMac is on...I think it's Leopard) then type in python and bam! I'm at the interactive python interpreter (?). Can I say interpreter? It's so Scheme of me.

So what should I use to learn? I decided I had free online books to my disposal and started to look on books24x7. I found a book called "Python Programming for the Absolute Beginner." It talks to my level and well doesn't scare me like other books. It's been pretty nice with small jokes here and there.

My second adventure was how do I write a script? What editor should I use? My good friend GKrimer was online and said they used emacs. Well I am a sucker to go old school and reintroduce myself to my friend emacs. Oh ctrl-k how I missed thee. So what's awesome about emacs is it's also built into Mac. (My Air's been awesome so far, with a few drawbacks which will be explained in another entry of course!) Also the color coding is also already there so huzzah!

My third obstacle was how the hell do I run this script? I started googling how to run a script in emacs, then on mac, and realized, stupid, just type "python <filename>" into the terminal window. And ta-da! Here's the outcome of my first program in 7 years:

(To print screen on a mac it's Cmd + Shift + 4 all at the same time >_<)
 I know, go throw up now. But I made Alex run it and he was proud. :)

Not bad for my first time in a long while even though it was following a book. All and all a good start! I'm well on my way to eventually getting into mobile development!

First!

Yeah, I didn't know what to title my first post on this particular blog site, but figured, "First" is a good way to start. For this who were looking for my other blog, let me know and I can direct you to the right page. Otherwise, this new blog will chronicle my trials and tribulations on finding my inner geek again. There's a small inner CS mini me that wants to do coding again and well I'm going to satisfy its cries.

I know I may just be talking to myself here, but hopefully someone will find this site enjoyable or at least informational to see how much I can succeed with just a minimal amount of time every week to do something exciting besides work.