Setting up your development environment.

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).

This post has received 39 loves.


ARCHIVE OF POSTS



This is the personal blog of Kevin Marshall (a.k.a Falicon) where he often digs into side projects he's working on for digdownlabs.com and other random thoughts he's got on his mind.

Kevin has a day job as CTO of Veritonic and is spending nights & weekends hacking on Share Game Tape. You can also check out some of his open source code on GitHub or connect with him on Twitter @falicon or via email at kevin at falicon.com.

If you have comments, thoughts, or want to respond to something you see here I would encourage you to respond via a post on your own blog (and then let me know about the link via one of the routes mentioned above).