Commence Coding

You wanted code, well now you have it!  Using the "Hello World" lesson from the tutorial I am currently using, I crafted the simple yet nifty bit of code you see below.

One of my main reasons for starting this blog was to describe the way a non-programmer thinks about and works through introductory programming.  I have to be honest though, the above code was simple.  For the most part, it was just a matter of typing in the command print,  followed by a string (the green stuff in quotes), and if necessary the mathematical expression (the purple numbers with orange mathematical operators).  

In order to see how this code actually works, you need to run the program.  Because I am using TextMate, it is painfully easy for to run this program and view the output.  All I need to do is press Command + R  and TextMate runs the program for me:

I realize that not all of you have access to TextMate, so I also decided to run the program using the command line (which I figured is a bit more universal in nature).  Note that when I say command line, I mean in the Unix sense a la Terminal.  For all you Windows users, sorry but I gave up windows a long time ago so this will be of no help to you.  

Anyhow, all you need to do to run the Python program from the command line is open up Terminal, navigate to where the Python file (.py extension) is located using the cd command, and then type python hello_world.py, where hello_world.py is the name of the Python program you wish to run.  If you need a little more help with navigating around your computer in Terminal, see Using The Terminal with Ubuntu or Getting to the know the Terminal.  Here is an example of what running a Python program in terminal looks like:

You can ignore the orange lines and focus on the stuff in green.  Notice that I saved the hello_world.py file on my Desktop.  I navigated to my Desktop by opening up Terminal and typing in cd Desktop.  From here, I ran the Python program by typing python hello_world.py.  As you can see, the program ran, and all the information that was called by the print command in the hello_world.py file was printed on the screen.

For the next few posts, I will refer to this post when I mention running a Python program. There are multiple ways to go about running a Python program, but I will let you explore the alternatives.  

Tools of the Trade

Excuse the length between posts, but the combination of an ensuing product release has put a damper on the amount of free time I have had.  Good news, I have wrote my first Python program!  It's just a one line Hello World program, but hey it's something!


Before I get into all that though, I wanted to let people know about the tools that I am using to aid me in my journey through Python.  For my computer, I am using my new MacBook, which thus far has been outstanding.  One quick note I will make about my Mac is that like most newer Macs, it already came with Python installed on it.  For this reason, I will initially not be posting about how to install Python because to be honest, I didn't have to do it so I really never learned.  

For my editor (i.e. the thingy I wrote Python code in) I am using TextMate.  It's fun, easy, and what I use on a daily basis at work.  It also has these nifty "Bundles" that contain shortcuts that can save the savvy users a lot of time with the more monotonous parts of writing code (or so I am told).  

Finally comes the tutorial.  Expect this to change often as I out grow the basic tutorials and find cool new stuff to work through.  Rest assured, I will always make it clear when I change tutorials and provide a link to the current one I am using.  For now, I will be using The Non-Programmers Tutorial for Python.  I think the name says it all, and from what I have gone through thus far, it appears to be a pretty easy and reliable tutorial.

That wraps up my summary of the tools I am using.  I will try to write most of my posts in a style that can be applicable to you no matter what tools and resources you are using.  However, in the event I fail to deliver clarity, please feel free to ask me a question.  

P.S.  Enough with the Jibber Jabber, real Python code will be present in my next post!

'Hello World' meet the Renaissance Man

Well it's about damn time!  I got the idea to start this blog several months back when my brother-in-law, who has attempted to get me to learn everything from C to Javascript, sat me down for a weekend long Python crash course.  Call it one of those magic moments (programmers, please chime in if this has ever happened to you...I don't want to seem weird!), but something just clicked.  For some unknown reason, the neurons in my brain said "yeah that makes sense".  From then on, I decided that Python would be my first real attempt at getting into programming.  


Don't get me wrong, I have tried other languages.  However, I have never gotten so inspired as to actually start a blog that would chronicle my journey through learning a language.  Trust me, you won't find any blogs by me about C++ or PHP.  So what inspired me about Python?  Well, in addition to the aforementioned magic moment, I also had an epiphany of sorts.  On the same weekend that my eager and ambitious brother-in-law was attempting to cram all of Python into my brain, I also attended a conference that really served as an eye opener.  The conference itself was nothing great, but the people there really made me think.  Without going into detail, lets just say this conference was very beginner at best.  Now there is nothing wrong with that, after all I am beginner at best.  What really struck me though, was the mindset of many of the conference attendees.  It basically boiled down to "If I can't do it, well I'll just pay someone else to do it for me".

First off, I have nothing against paying other people to do things for you in the world of development and programming.  There are tons of brilliant people out there with amazing skills that I wouldn't think twice about dropping some coin on.  My problem is this.  I have this philosophy that I adopted as soon as I decided to work in the tech sector.  This maybe a re-hash of some guru's saying, but basically I believe that in the world of tech, you are either moving forward or standing still.  Call me paranoid, but in my view, if you are standing still, then you are getting passed by all those folks moving forward.  It is my firm belief that you constantly have to keep moving forward with your skill set.  Becoming complacent and thinking that what you know now is good enough for the duration of your career is a dangerous assumption.  I feel this is the case for any profession, but definitely in the tech sector, were change happens at such a rapid pace.  In high school I was turned on to the notion of the "Renaissance Man".  A "Renaissance Man" is one who strives for knowledge and whom possesses a diverse skill set.  So, consider this blog and the work I put into learning Python as my attempt to keep moving forward toward that persona of the "Renaissance Man".