Becoming Programmer

  • Archive
  • RSS
  • Ask me questions about programming

Yer Such a Tool.

While it is certainly true that it is a shoddy workman who blames his tools for bad work, it is still best to use good tools and not make life more difficult than it has to be. Key tools that you will need include a text editor, source control, various Web browsers, a database management system, an image editor, and a programming language and application server (which, though not the same thing as an application server, will influence or be influenced by our choice of application server). I’m not going to cover any programming languages in this article, and thusly will also skip over application servers; they are reserved for the next article.

Text Editors

Without a text editor, you won’t be able to write code. A text editor is different from a word processor. Word processors format text with layout and font information; technically speaking, a Word document is essentially a program to instruct MS Word how to display the text data also contained in it. Text editors provide no ability to store such layout and style information, they contain only data, and only data that can be manipulated via your keyboard.

There are a lot of choices when it comes to text editors. It seems like every programmer at some point in their lives tries writing a text editor. There are some significant ones that have been around for quite a while and have some pretty decent features. One of the key features you will want with your text editor is syntax highlighting. Syntax highlighting editors display different parts of code that have special meaning in a particular programming language in different colors and styles to help them stand out from each other. It’s probably one of the most useful features of more advanced text editors. Some other features that are quite handy are keyboard macros (shortcuts for performing user-defined actions), tabbed document interface (it’s handy to have all of your code files open, but contained in the same window), and integrated file viewers (one frequently has to flip between multiple text files).

One thing to consider while selecting a text editor is whether or not you ever intend to work on a variety of operating systems. If not, picking one that is only available on your favorite OS is not a problem. My main machine is Windows 7, but I also have a Mac OS X machine, an Ubuntu Linux machine, and a FreeBSD machine that I use fairly frequently. For that reason, I typically use Vi as my editor for its ubiquitous availability. You’re going to be spending a long time in your text editor, so spend a long time trying different ones out to figure out which one you like best.

There is no particular ordering here. Unless otherwise noted, these are available for pretty much any operating system.

  • Crimson Editor. I’ve used this program several times before and I like it a lot. It’s simple to use and has a lot of nice features. Unfortunately, it’s only available on Windows.
  • Emacs. I hates it, precious. But that’s just my personal opinion. Emacs is kind of a crazy program, it is sometimes called an “operating system that you run on top of your operating system”. Without any extra configuration, it’s a very capable text editor that requires a short learning period before you can use it at all (it does not share any UI features with any other text editor on the market). I personally find it way too complex, but lots of people claim extremely significant productivity enhancements from learning and sticking to Emacs. Whatever. I mostly only mention it because I’ve used it, had difficulty with it, know you will hear about it some day, and wanted to warn you.
  • Notepad++ is very similar to Crimson Editor. The differences are pretty minor. Again, it only runs on Windows.
  • TextMate is like Crimson Editor or Notepad++ for Mac OS X. If you are an OS X user, it will probably fit your expectations for how a program is supposed to work a lot better than any of the other choices.
  • Vim (Vi improved). There are two types of users on Unix systems: Emacs users and Vi users. They will argue with each other all day long. I find Vi a lot easier to use than Emacs, but I recognize that it’s not quite as extensible as Emacs, though that is rather much splitting hairs as one might say that Emacs is too extensible. I like Vi because it’s usually available on just about any Unix-like system I find myself on, so I usually don’t have to install it anywhere. It can also run on Windows. It takes a little while to learn how to use it (though not as long as Emacs).

There is also a class of programs called Integrated Development Environments. IDEs take care of a lot of different programming and project management tasks for you, and often feature wizards for setting up new projects. They can be very complex, though, and often create extra files in your project folder that can be confusing.

  • Eclipse is one of the most featureful IDEs on the market, but it is also a very complex beast. If you’re just getting started with programming, it might be a mistake to start with Eclipse, but eventually in your career as a programmer, you should gain some familiarity with it.
  • Microsoft Visual Studio used to be an extremely expensive, but very featureful IDE. Nowadays, there are various free versions that allow you to work in specific programming languages. Since I work in C# a lot, I use Visual Studio a lot. It has a lot of features that can seem pretty daunting at first, but unlike Eclipse, it offers pretty reasonable default values for many of those features and doesn’t require a lot of reconfiguration before it works well. Unfortunately, it only runs on Windows and unless you’re willing to do a lot of extraneous setup and hacking, is limited in the number of programming languages it can work with. That said, if you’re working on Windows in one of the programming languages it supports, it’s one of the best options available. As with Eclipse, you should consider gaining familiarity with it in the long run.
  • NetBeans started out as a proof-of-concept for building an IDE for Java in Java. For a long time, that meant it sucked hardcore, but recent versions are very good. Because it’s Java, it runs on a lot of different operating systems. I also think it’s significantly easier to use than Eclipse. It’s not as popular as Eclipse, though, and that can mean that some of the newest programming languages don’t work with it very well.
  • With the right plugins, Emacs and Vim can both be made into IDEs. For some programming languages, Emacs is the only IDE available for them. I personally think that’s reason enough to ignore those languages, but again, that’s a personal problem of mine.

Source Control

Source control systems are probably the most vital tool you will ever use in programming. Think of them as time machines for code. They are a lot more than that, but if you’re working by yourself that is the best feature they offer. If you are working with others, they also provide a great way to share code with each other and avoid make changes that conflict with each other.

Imagine you are working on a project and you get it working pretty well. Then you decide you want to change how a certain part of the project works, to make it work better. In the process, you accidentally break the entire project and now can’t figure out how to get it back to working again. This happens more often than you probably expect right now. If you didn’t have source control, you would probably get in to a habit of creating redundant copies of your project files. This works for the immediate future (like today and tomorrow), but if you ever get distracted and have to spend time off of the project, then when you return, you will find a mess of files and not remember which one is the best version. Even if you come up with a reasonable naming scheme for the files to avoid that confusion, you still have a lot of useless files sitting around on your hard drive. It’s sloppy, and sloppiness is bad practice.

With a source control system, whenever you get your code to a state in which it is working, you “check in” your code. You essentially record a snapshot of the code in a specialized database, and then hack merrily away at the code in your project without nary a thought. If you break the code and can’t figure out how to fix it, you can then “revert” the code to that previous state and be ready to get back to work in short order.

Another great thing that source control does is that it allows you to make a comment when you check your code in. This means that you have a time-stamped record of the changes that you’ve made to the project. You can review that history at any time and get a pretty good idea of how the project evolved over time. This is often invaluable information for someone just joining a project. Keep in mind, even if it’s your own project, if you haven’t touched it in a month, you should consider yourself a stranger just joining the project. Keeping project details in mind over time is impossible, there are just too many points of information to keep in your head. So don’t bother, use source control.

Finally, when working with other people on projects (and that should be a goal of yours, single-person projects get boring after a while as you are limited in what you can do to your own skillset), source control provides a plethora of features to help manage the work your team performs. Without source control, sharing files back and forth can be very tedious and often dangerous, as changes can sometimes cover a lot of files, meaning you could end up overwriting changes you are working on yourself in those same files. Source control systems provide the ability to “merge” two copies of one file, to find out if there are any overlapping, and give you a chance to correct any conflicting changes before the file is overwritten.

Any programming project worth working on is worth using source control. You might as well be playing Russian Roulette with your project otherwise.

  • Git was developed my Linus Torvalds of Linux fame to be the version control system of the Linux kernel project. Git is unique in that it is a distributed source control system, meaning that you don’t necessarily have to use a central server for coordinating sharing between programmers. In case you do want to use a central server, there are a number of good, free services that are available, such as Github (my favorite) or Gitorious.
  • There aren’t any others worth mentioning. Believe me, I’ve tried a lot. Git is kind of hard to learn how to use, but it is worth it. Don’t waste your time with anything that is not distributed, they are broken by design. You might consider Mercurial, but it’s slow compared to Git. Might as well just learn Git and get it over and done with.

Web Browsers

If you’re here, you already have at least one. You better go download and install all of the other ones, though.

  • You don’t have a choice for Internet Explorer, it’s either already on your computer or you won’t be able to get it. While there is a browser for Mac OS X called Internet Explorer, it’s technically not the same browser and nobody uses it.
  • For Mac OS X and MS Windows (sorry, no Linux or FreeBSD), get Apple Safari here.
  • For everyone: get Google Chrome here, get Mozilla Firefox here, and get Opera here. 
  • As of right now, there aren’t any others worth mentioning. 

Yes, get all of them. We’re going to be doing some Web development and it will eventually be necessary to test our sites in all of them.

Database Management Systems

Databases are extremely handy tools for the storage and manipulation of data. There are a lot of different types of database systems, but we’re going to primarily focus on Relational Database Management Systems (RDBMS). The term “Relational” means that the database is focused on maintaining linkages called relations between data elements. The other types of databases (you will hear of them generally referred to as No-SQL databases, though that is technically a misnomer) aren’t as prevalent, and while they are extremely handy for their given purposes, their purposes are very advanced and specific. As with any art, it’s best to learn the common ways before forging forward with subverting them.

Compared to our other choices for software, there are relatively few RDBMSs worth mentioning.

  • Microsoft SQL Server only runs on Windows, and the free edition has some pretty significant limitations compared to other free databases, but I think the tools that it comes with are second to none. It’s very easy to setup and very easy to use. Even with its limitations, I think it’s a good choice for a database when you’re just starting to learn. If you’ve chosen to go with all-Microsoft software (i.e. Windows and Visual Studio), then they integrate with SQL Server very well.
  • MySQL is kind of the darling open source database project amongst Web developers, and the laughing stock amongst database developers. Its quality issues have mostly been fixed by now, making it about as reliable as SQL Server. MySQL Workbench is pretty close to being as good as SQL Server Management Studio. If you’re not on Windows, so SQL Server isn’t an option, it’s a good choice for a beginner database.
  • PostgreSQL is what is known as an Object-Relational Database Management System (ORDBMS), which means it includes features of Object Oriented programming languages on top of a standard RDBMS. This probably doesn’t mean a lot to you right now, but I have found that these features are very nice to have. It is also one of the most reliable databases on the market, with a focus on correctness of implementation and security. It scales better than SQL Server and MySQL, so for long-term development it’s an excellent choice. I don’t recommend it outright because the tools available to it are somewhat primitive. PostgresSQL is free to use and does not have limitations like SQL Server, MySQL, and Oracle.
  • Oracle 11g. I’ve included this here for completeness, but I don’t like Oracle’s syntax, I don’t like the terms of use, and I don’t like its tools. Oracle used to be the database system everyone aspired to use, but it’s getting less and less prevalent. You might end up finding a place that still uses it, especially in financial institutions, but that’s way down the line.

Image Editors

Basic, competent image editing is a valuable skill, and learning programming is about efficient, useful skill acquisition. Raster images are the technical name for the images you’re most used to dealing with on computers: files full of colored pixels. There are a number of options for editors here.

  • Paint.NET is free, relatively simple to use, and has a pretty decent feature set. I like it a lot for lite editing duties. However, it’s only available on Windows.
  • The GIMP is a free, extremely featureful program for all of the popular operating systems, including Windows. But its somewhat anachronistic user interface may make it difficult for you to use (though it has certainly improved vastly over the years). If you’re on Linux or FreeBSD, you don’t have much of a choice here, GIMP is the only editor worth mentioning. If you’re on Mac OS X, unless you’re willing to shell out for Adobe Photoshop, GIMP is again the only viable option you have.
  • Adobe Photoshop, for Windows and Mac OS X users with cash burning a hole in their pockets, is the best of the best. If you buy this software (and right now it’s almost $700USD), you will never need another image editor again. There are things that Photoshop makes easy that are nearly impossible or actually impossible in any of the other editors. Since we’re only interested in basic image editing for the Web and games, then this isn’t a necessity. If, in two or three years after you’ve learned a lot more, you decide you want to continue working with imagery, it is an amazing tool.
  • There are a lot of other image editors out there, but I’ve either never used hem or wasn’t impressed with their features (mostly the latter). Sticking with the popular choices has the advantage that you will be able to find lots of help with their use. Feel free to try a few out (after all, exploration is a vital programmer skill), but stick to only the programs that offer the ability to edit in layers.
  • If you are on Windows, there is already installed MS Paint, and Linux users have a similar program called GNU Paint. They are both insufficient for the work we will be doing—I mention it to warn you against them.

There is another kind of image editor called vector image editors. Vector images are essentially programs that instruct the editor on how to draw the picture (raster vs. vector images is analogous to text files vs. word processor files). They are useful for making very clean, scalable graphics, like logos and other UI graphics. But there are techniques to do such with raster editors, and at the end of the day, the image usually has to eventually be made into a raster image. Incidentally, there are fewer free options than with raster graphics systems.

  • Inkscape is the best of the free editors I’ve ever used. Luckily, it’s available for pretty much any operating system you could be running. It also uses SVG (Scalable Vector Graphics) as its output format, which is convenient for a wide variety of applications due to the commonality of the SVG format.
  • Adobe Illustrator is the only other vector editor I care to mention. Like Photoshop, it’s expensive—about $600USD—but also like Photoshop it has a lot of features that make lite-work out of tasks that are very difficult or impossible in Inkscape. But also like Photoshop, we’re only going to focus on basic image editing.
  • Again, there are a number of other options that you may want to give a try, but I would stick to only those that can manipulate SVGs.
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
← Previous • Next →

About

Avatar A project-based approach to learning programming and project organization.

Me, Elsewhere

  • @moron4hire on Twitter
  • RSS
  • Random
  • Archive
  • Ask me questions about programming
  • Mobile

Sean T. McBeth, 2012.

Effector Theme by Pixel Union