Kevin Nelson Marshall

Now that I've outlined my basic goals for this series on beginning programming we need to spend a little bit of time setting up our development environment. Once we're done with this step we'll finally be ready to start digging into code!

For the most part there are three different operating systems you are likely to be developing on, Linux, Macintosh, and Windows. Since this series is really all about helping 'non tech.' people learn to program a little, I'm going to assume that you aren't on Linux (if you're running Linux, you are probably already technically savvy and won't get much out of this series -- but feel free to read along and correct me when I miss-speak).

So, assuming you are one of the 'regular' people out there, you've got either a Mac or a PC.

If it's a Mac set up is going to be a breeze as most of the languages we're going to play with come preinstalled in OS X.

If you've got a PC, you'll probably have to do a bit more initial set up but it's all one-time stuff and shouldn't be too bad if you just follow the steps in the articles I point out.

For everything we're going to do throughout this series (at least to start), we're really only going to use two primary tools...a text editor and a command line. There are of course lots of different ways you might want to develop, test, and run your own stuff but for this series we're going to try and keep it clean and simple. So in addition to setting up support for each language we'll be playing with, I'm also going to give you some quick information on the text editor and command line tools I prefer to work with for each system (but you are free to use your own favorites if you don't like my choices).

Rather than repeat lengthy instructions for installing support for each language, I'm just going to link to a good reference for each. There are tons of great resources out there on each language, so feel free to do your own searching if the ones I point out aren't good enough for you or you are just inclined to find other options (always remember, Google is your friend when you've got questions or hit a wall on getting something to work).

Also, to make this easier, I'm going to break the rest of this post up into two parts (one for Mac owners and one for PC owners)...so just skip to the section that's appropriate for you.

MACINTOSH:


Developing on a Mac has become somewhat of a standard in the past few years (the laptops are pretty powerful, built pretty solid, and come with a ton of stuff pre-installed or easily added). Mac also gives you the option of installing Xcode and other tools that make it possible to develop for interesting things like the iPhone and iPad (which I won't dig into throughout this series because they vary in concept and implementation quite a bit from the others I will be covering).

My preferred command line tool for the Mac is called 'Terminal App' and should be able to be found in your 'Applications' folder as Terminal.app. Once you find it, I recommend adding it to your icon dock because you'll be using it a lot in development.

My preferred text editor for the Mac is called 'TextMate' which you can download from http://macromates.com - the only downside to TextMate is that it's not free (it's the only thing in this set up phase that isn't free). Still, I think it's by far the best option for development on the Mac so I highly recommend you grab a copy.

Instructions for installing Perl can be found at http://www.mactech.com/articles/mactech/Vol.18/18.09/PerlforMacOSX/index.html

Once you have Perl installed, jump to your command line and try the following:

perl -v

If perl is installed properly, you should get some information back about what version of perl you are running. If it's not installed correctly, you'll probably see something along the lines of "perl is not a recognized command"...in which case, you should do some Google searching for help on installing Perl or ping me in the comments or via email for extra help.

Instructions for installing Python can be found at http://diveintopython.org/installing_python/index.html

Again, once you've installed Python, jump to your command line (as a beginner, it's always a good idea to close the Terminal App and start a fresh one any time you install a new program...this should save you some troubles in having to set any new PATHS and things before you can work with your newly installed stuff). From the command line, try a command like the following:

python --version

Just like above, you should get information back about what version of Python you are running.

Instructions for installing Java can be found at http://www.java.com/en/download/manual.jsp

And again, after install we jump to a command line and try the following command:

java -version

Hopefully you get information back about what version of Java you are running (Java is particularly picky about your system CLASSPATH values -- so if you hit troubles in installing Java, start by googling how to read/set/update your CLASSPATH and PATH variables).

Instructions for installing PHP can be found at http://developer.apple.com/internet/opensource/php.html

After install, go to your command window and try the following:

php -v

One more time we are hoping to have information about what version of PHP you are currently running.

I know this set up stuff is a bit daunting (and boring), but we are almost done...I promise!

Instructions for installing Ruby can be found at http://www.ruby-lang.org/en/downloads/

And once you've got it installed you should be able to go to your command window and try the following:

ruby -v

Which should report back the version of Ruby you've got installed.

That's it! Finally are development environment should now be all set up and we are ready to start playing with code...which we'll do in the next post in the series (I promise).

WINDOWS:


Developing on Windows has become much less popular these days (most 'professional developers' I know are either on Linux or Mac these days)...but it's really not such a bad option. And if nothing else, it's pretty affordable.

Command line stuff in Windows is really just a DOS window. There are a couple different ways you can get into a DOS window, but my preferred way is to just click your 'start' button, go to the 'run' option, and then enter 'cmd' and click 'go'.

My preferred text editor for Windows is ConText which can be downloaded from http://www.contexteditor.org. ConText is the closet Windows program I have found to mimic what you get with TextMate for the Mac but there are of course a ton of text editor options for Windows (so feel free to use whatever you're most comfortable with).

Instructions for installing Perl can be found at http://strawberryperl.com

Once you have Perl installed, jump to your command line and try the following:

perl -v

If perl is installed properly, you should get some information back about what version of perl you are running. If it's not installed correctly, you'll probably see something along the lines of "perl is not a recognized command"...in which case, you should do some Google searching for help on installing Perl or ping me in the comments or via email for extra help.

Instructions for installing Python can be found at http://diveintopython.org/installing_python/index.html

Again, once you've installed Python, jump to your command line (as a beginner, it's always a good idea to close the DOS window and start a fresh one any time you install a new program...this should save you some troubles in having to set any new PATHS and things before you can work with your newly installed stuff). From the command line, try a command like the following:

python --version

Just like above, you should get information back about what version of Python you are running.

Instructions for installing Java can be found at http://www.java.com/en/download/manual.jsp

And again, after install we jump to a command line and try the following command:

java -version

Hopefully you get information back about what version of Java you are running (Java is particularly picky about your system CLASSPATH values -- so if you hit troubles in installing Java, start by googling how to read/set/update your CLASSPATH and PATH variables).

Instructions for installing PHP can be found at http://php.net/manual/en/install.windows.php

After install, go to your command window and try the following:

php -v

One more time we are hoping to have information about what version of PHP you are currently running.

I know this set up stuff is a bit daunting (and boring), but we are almost done...I promise!

Instructions for installing Ruby can be found at http://www.ruby-lang.org/en/downloads/

And once you've got it installed you should be able to go to your command window and try the following:

ruby -v

Which should report back the version of Ruby you've got installed.

That's it! Finally are development environment should now be all set up and we are ready to start playing with code...which we'll do in the next post in the series (I promise).

posted by Kevin Marshall on 2010-08-05 02:47:45.033043+00
Comments: View Comments

As I briefly mentioned on Twitter and Facebook, I'm thinking about starting a series of blog posts focused what I feel are the basics of programming and how to do some simple things with code.

Almost as soon as I posted that I was thinking about doing this I got a handful of positive responses. That's generally enough motivation to get me to do just about anything (at least in the world of programming)...so let's give it a try!

Before I start digging into my vision though, I think it would be a good idea to outline some basic goals and other points I have for this idea. So here goes:

GOALS

1. Introduce people to the basic concepts of programming.

2. Teach people to approach problems from a programmers point of view.

3. Teach by doing (instead of Hello World programs, dig into small, but real projects).

OTHER POINTS

1. I want to talk about programming concepts and ideas more than I do specific language features. What this means is that I will intentionally bounce between different programming languages (such as Ruby, Python, Perl, Java, PHP, and others).

2. As much as possible, I will try not to assume my reader has any knowledge about how things work. So I'll try to spend enough time explaining the control flow and outside pieces you need to know/think about as we work through our examples.

3. Personally I learn best by trying (and doing)...so my approach to all of this is going to be very project focused. I'll pick something fairly basic, but hopefully real, that we'll walk through building together (and I'll do my best to explain all the hows and whys as we go along).

4. I know enough to generally get things working, but it doesn't mean I'm the best or most knowledgeable about anything I'm going to talk about...you should play with the concepts as much as possible on your own (and come to your own conclusions on what makes sense and what doesn't).

5. If/when people read through this stuff, I hope we can all have some lively discussion (especially Q/A) on everything we cover...that's the whole reason I have Disqus installed, so hopefully people actually use it. And remember, there are no stupid questions, especially with how poorly I write and explain things - so if you want more details or think something is wrong - SPEAK UP!

So that's it. That's my idea, and that's what I'm going to try to focus this blog on for a little while.

posted by Kevin Marshall on 2010-08-03 04:47:19.837459+00
Comments: View Comments

So I've had a busy couple of weeks that's been packed full of interesting things that I've been hoping to share around here. But, as is generally the case when interesting things are going on, I just haven't had much time to spare on sharing the details (and now I've probably forgotten half of the really interesting things).

Anyway since officially leaving Catchafire I've been keeping busy with:

1. bit.ly - Starting last week, I'm doing a month-to-month contract gig with one of my favorite internet companies out there! So far the two weeks I've been there have been super fun, and also somewhat challenging (since they are primarily a Python shop and until recently I haven't done a ton of actual/production Python)...in addition to picking up Python 2.x I'm also just getting used to their development process and learning all the ins-and-outs and who's who around the BetaWorks offices (BTW very awesome group of people).

Of course, in those two weeks I have managed to get a few little things done...the best of which is I've implemented the core of XAuth support to the bit.ly API (it will be a while before it can be released though as it still needs to go through internal testing and approval first -- and there's that whole SSL thing that needs to be set up for it)...I also built a quick and dirty Chrome extension as a front end for another REALLY awesome project Hilary has been working on for Bit.ly (not sure if I'm allowed to share details on that just yet)...and I did a few other little quick hacks to test some spam services.

More recently I'm working on some more back end pieces to the API and the reg. bit.ly web site (though I haven't made too much progess with that just yet).

2. When I'm not spending my time on bit.ly I've mostly been hacking away on the Android version of the FluWatcher app (a paid-client project)...which I *finally* got a dev. version done tonight (though I've already found a small list of bugs/tweaks to work out).

I now have dev. versions completed for the iPhone, BlackBerry, and Droid...and am really just waiting on final graphics/name approval from the client to be able to really close out the project and submit the apps to the various stores (and collect the rest of the payment - YEAH!).

Overall, it's been a really interesting (and somewhat frustrating) process building the same basic app for all three platforms...I have a lot of tech. things and opinions to share related to this experience but I'll save them for future posts.

3. Last week bit.ly actually hosted a hackathon (hackabit technically)...which was the perfect chance for me to throw together another quick wow.ly related tool...this time I started to build instapaperfeed.comwhich basically pulls the most popular links from your twitter feed once a day and dumps them into your instapaper account (so you can read them later if/when you want).

The project isn't actually ready for release yet (so this is the first public mention I've done for it, and I only do that because I know no one really reads this blog)...but the basics already work (actually everything but the daily scheduling and a pretty front end is in place -- right now you have to manually tell it to execute, and you have to know what it's all about because there's no help/information on the site).

When I get a few more minutes, I'll finish out those last few things and then start pimping it out to people to see what they think (so stay tuned!)

4. I'm still debugging a few little things with whotoget.com that have been pointed out to me (haven't really had any time to close this out yet).

5. My friends over at NFLDraftScout chose last week to move to new servers...and they hit a few snags that I had to jump in and help out on (luckily nothing too major).

6. David and I have continued to bounce around ideas and details about creating a new sports-related casual game company (my current plan is to stick with bit.ly as my main thing until we are ready to make a run with the ideas/team we are putting together on this)

...there's probably more but those are main things off the top of my head...oh yeah, throughout all of this I also took the past weekend off to jump out to MN to visit some friends and catch a Twins game in the new stadium (awesome!)...and the week before all this started we (the Marshall family) were on vacation in Williamsburg VA (also awesome!).

Long story short...it's been a busy but extremely fun couple of weeks. Right now, I'm ready to crash for a bit...but can't wait to see what the next two weeks brings!

posted by Kevin Marshall on 2010-07-22 03:51:38.504586+00
Comments: View Comments

After doing a couple of quick fixes to whotoget.com based on actual user feedback (yeah!) this morning, I headed into the city for a couple of meetings that turned out to be very interesting/fun!

The first meeting was actually a lunch at the famous Shake Shack (I had a Shack Stack, Fies, and a chocolate shake -- about 20lbs. of food in all, yum!)...I met up with Tim Marman who is an awesome developer in the NY scene (though he's moving to Pittsburgh soon).

Tim and I share a passion for technology and for fantasy sports (especially football)...and so we can easily pass hours on end chatting about the different projects we're hacking on or the different fantasy moves we're considering (or some combination of both!)...so catching up with him is always a good time.

My second meeting was at bit.ly, where I got a sneak peak at some of the really awesome things they are working on behind the scenes...and I got to talk more tech. in general and about some of ideas for all that beautiful data bit.ly is generating.

Overall, bit.ly (and really all of BetaWorks) is an awesome place to spend any time...there's a vibe around the office that you just don't get from many other places...and you know all the people there are top-of-the-heap sorts who are working on really interesting things (nothing like knowing I'm the dumbest guy in the room every time I walk into those offices -- then again, I'm aware of the same fact for almost every room I ever walk into so...)

Anyway, bit.ly has a bunch of ideas they want to put into action, but only so many people to actually do the work right now and so there's a chance I might get to help out with some of that...so again, super exciting to me!

So even though I didn't get much actual coding done today, it was an interesting and fun afternoon (plus the weather around NY was amazing today!)...and every so often it's good to move away from the keyboard, and you know, talk to real people about stuff.

Tomorrow the family and I head off for a week long vacation...so the trend of not coding will probably continue for a bit...but I'm sure I'll still fit in a bit here and there (I gotta finish out an Android app anyway).

posted by Kevin Marshall on 2010-07-02 03:08:38.618427+00
Comments: View Comments

Just a quick head's up that I have released another quick hack for people to play with:

whotoget.com

It's a little hard to explain (and if you check it out, you'll see that's one of the big issues I have yet to tackle around the site)...but basically the idea is a quick and easy way for a group of people to filter a CSV file.

The idea itself came to me as a specific request from some friends who needed something like this to (hopefully) save them some time in deciding as a group who they should or shouldn't invite to various events they host.

As explained to me, the process that they go through involves a flurry of emails and spreadsheets so that everyone has a chance to get the people they want onto the list for a given event...and then someone has to step in and complete the busy work of doing the final merge/purge of the results.

So what they were looking for was a simple system where they could upload a CSV file that all their employees could then, at their leisure, go through and mark which records should be moved to a 'yes' list and which can be put on a 'not for this event' list. Beyond that they had a handful of other basic ideas and rules around what they were looking for (for example, when you are saying 'yes' or 'no' to a give record within a dataset, you can just use the 'Y' or 'N' keys on the keyboard instead of having to click the yes or no buttons).

And so I really used their soft requirements as the basic road map for what to build in this initial version...of course I also threw in a few more things that I felt were required to make the system a bit more generic and scalable beyond just their specific needs (like the ability to work with variable length records in your CSV file, manage permissions on who has access to each of your datasets, and the ability to export the filtered results for each unique set of answers back out to a CSV file).

Overall, I'm pretty happy with this initial version and the basic feature set but the site itself could use a lot of help in terms of explanation (and general user interface stuff)...but I'll wait to see what feedback my friends who requested it and others have before I spend too much more time polishing any of it up!

posted by Kevin Marshall on 2010-07-01 04:21:47.405455+00
Comments: View Comments

« Older posts
 

Subscribe to my RSS feed »

BotFu feed with RSS reader

BotFu feed by Email


Search All Posts »


Kevin Marshall - Who's That?

I'm just your basic programmer. I can't spell to save my life, I'm not the greatest story teller, and I often ramble on about nothing. This blog showcases all of that!

If you're bored drop me an email at info at falicon.com or view my outdated resume.


Stalk Kevin on »

bit.ly
Delicious
Digg
Disqus
Facebook
Flickr
FriendFeed
Github
Last.fm
LinkedIn
StumbleUpon
Twitter (@falicon)

Archives by Category »

(28) Code »
(8) ColdFusion »
(15) Database »
(10) Factor »
(3) Falcons »
(320) General »
(13) JavaScript »
(18) Perl »
(17) PHP »
(20) Ruby »

Archives by Month »

(2) August 2010 »
(3) July 2010 »
(13) June 2010 »
(8) May 2010 »
(2) April 2010 »
(2) March 2010 »
(5) January 2010 »
(2) October 2009 »
(6) August 2009 »
(11) July 2009 »
(2) May 2009 »
(3) April 2009 »
(2) March 2009 »
(7) February 2009 »
(9) January 2009 »
(14) December 2008 »
(5) November 2008 »
(12) October 2008 »
(13) September 2008 »
(16) August 2008 »
(23) July 2008 »
(20) June 2008 »
(24) May 2008 »
(23) April 2008 »
(27) March 2008 »
(28) February 2008 »
(26) January 2008 »
(7) December 2007 »

Published Works »

Beginning Amazon's SimpleDB (Apress in dev.)
Pro Active Record (Apress 2007)
Web Services with Rails (O'Reilly 2006).

Contributed To »

Ruby Cookbook (O'Reilly 2006)
SQL Cookbook (O'Reilly 2005)
Various Reviews published in Computing Reviews

Free Code I've Created »

SimpleDB library in Python 3.0



This blog is powered by KickAssCode.