seanmonstar

Jul 30 2010

How I Name Boolean Variables

Naming variables is important stuff. Besides the classic “classes should be nouns, methods should be verbs” stuff, I find another very common naming convention I use is in naming my Booleans.

Particulary, I like to name them so they are a question. You can read the name of the variable, and feel you were asking a question about some object. And the question must be a yes/no question for it to work. No howAreYou variables. I make sure that it truly does sound like a question. I don’t like using single word adjectives or adverbs, like running or recommends. I’ll add is or has to make it sound like a question.

Some examples:

server.isRunning
book.isRecommended
dog.canBark
table.shouldReplace

It’s much easier to tell by looking at them that they are boolean values. Whereas, something like item.likes could actually be a number, of how many people liked the item. item.isLiked tells me that something liked the item. It’s going to be a yes or no answer to my boolean question.


Jun 24 2010

Apr 1 2010

Enthusiasm Starts at the Top

Some people can get super excited about their projects, and others can’t wait till it’s done. That attitude, that enthusiasm, bleeds into everyone else on the project. Some people might try to argue that everyone controls their own attitude, and to a degree, they’d be right. But this isn’t about whether individuals can overcome a dominant attitude. That’s not the issue at stake. The issue is that by being glum or not-caring about your project will affect others working on it, and why would you bet on them being able to overcome your apathy?

Clients that don’t care

When you get a client manager that just doesn’t care about his project, that project is going to suffer. When that person doesn’t care about details, the workers don’t care about details. When he doesn’t care about deadlines, the works don’t either. When he doesn’t bother to explain expectations at all, the workers don’t want to try to guess at them either.

Basically, if you’re not willing to care about your own project, why should we? And don’t tell me it is our job to care, cause thats bah-log-na.

When the top guy cares

When the manager or owner of a project really cares about it; when he really thinks it’s an awesome idea and that so much of it will be so grand; that enthusiasm filters down to the workers on the project and makes them excited too. When you have someone higher in the company come by and say “Ooohh” and “Aaahh” at your newest implementation or refinement, you get excited about your work. Or before you start, if said person shows how important he thinks this feature will be, and how much better we’re going to do it that anyone else, that rubs off onto you.

Take a look at Steve Jobs. He thinks his products are brilliant. They’re the absolute best. Everything else is crap. He’s excited about his new products, as the come out, like the iPhone and the iPad. And I’m certain that his attitude about how awesome he thinks his products are, and how great the next version will be, is half the reason why Apple’s stuff really is so good. The engineers and designers there start to think they’re making the best gadgets in the world, and so they try harder to make sure it really is.

Britt Selvitelle from Twitter told a similar story:

I remember from years ago at school a professor of mine got down on his knees and spread his arms to the whole classroom of college students and said “I love Algorithms!” and it really stuck in my mind.

—Britt Selvitelle from Twitter Talks About Passion

I’m sure that professor influenced many of the students to care more about algorithms than they previously might have, and came out of that class with higher scores and deeper appreciation of how awesome algorithms truly are.

My boss cares so much

My boss loves our product. He thinks it’s the best website manager in the world. You can’t tell him differently. And you know what? Because he thinks so, we all think so also. He’s always showing new people our product in his office, and we can hear him down the hallway, saying how awesome this is, and how much better that is, and next release, it’s going to do something else even cooler!

If you have project, and you want it to succeed, make sure you think the world of it. Because your enthusiasm will rub off onto your workers, and even onto your customers.


Mar 23 2010

The Relevance of SEO

A few people in the web world have started an argument about whether websites need to invest in SEO. I understand why website owners would be confused about the topic, but it should be pretty straightforward for web designers. This article was a long time coming, they just provoked me to sit down long enough to fill up a page of my opinion. Actually, I think these people are trying to say what I’ll be saying: make a good website, and the rest will come.

The SEO That Doesn’t Matter

Many people think they get their website built, and then spend time and money on getting it search engine optimized by stuffing keywords anywhere they can. And they watch their rank go up a space or two, and then try to stuff relevant keywords anywhere else they can. Sometimes, there might be an analysis of keywords in regards to competitors’ sites, and then trying to pick better and more keywords than they do.

I’m not saying this kind of stuff does nothing. If you fit in relevant keywords where they should go (read: don’t stuff everywhere), and make sure you use keywords that customers are searching for, you can see a bump in ranking. But it’s miniscule compared to what really matters. And the amount of money you’ll spend getting such a tiny bump makes this matter even less.

What Really Improves Your Site Traffic

The things that really matter are the easiest things to do right. In short, be awesome, and get others to agree with you. Being awesome includes having web pages that describe what you do and how you do it so well. Then, spread the word, and having them “agree with you” by telling the web they should visit your web pages.

Be Awesome. Oh, and some content, too.

First of all, if you’re not awesome, then no one wants to read about you versus the people that are awesome. The whole point of Google Search is for Google to try to provide searchers with the most relevant and best information for their query. So whatever it is you’re awesome at, you need to make a couple pages explaining about said awesome topic.

In doing so, make sure your pages are well structured. The title tag should be a phrase that describes the page; not a place to fit 15 keywords. Something you would want to read in the SERPs and would be motivated to click on. Go ahead and make your heading tags (h1-h5) relevant sub-topics of your title. Make sure you provide a few good paragraphs and/or pictures about the topic at hand. Yes, you can use relevant keywords, but keep the text feeling natural. And, you’ll be getting a great benefit from having a “pretty” URL. Forget the query string cryptic mumbo-jumbo. You can likely just lowercase and dashify your title. This is everything Google themselves tell you to do.

Creating compelling and useful content will likely influence your website more than any of the other factors discussed here. Users know good content when they see it and will likely want to direct other users to it. This could be through blog posts, social media services, email, forums, or other means. Organic or word-of-mouth buzz is what helps build your site’s reputation with both users and Google, and it rarely comes without quality content.

Google’s SEO Starter Guide

These kinds of things are what a web design company and a copywriter will help you do.

Something that I’m always suggesting to any website owner that asks me about increasing their traffic, I always always always suggest something like blogging. Continuing to create quality content only does good for your website. Each new post you create, is another landing place for visitors. It can be about a specific topic, so you start to gain traffic for that topic from Google. Likely, if the topic is specific enough, you’ll be one of the best ranked pages for that search query.

For instance, since I’ve started blogging, I get traffic I wouldn’t otherwise get for topics like “basic password hashing”, “mootools tabs”, “css 3d effect”, and “javascript date math”.

Links, or Getting Others to Agree

After you’ve written your amazing content, and made so super useful to visitors, you need to get other people to agree with you. Google openly states that one of the biggest factors in whether they will link to you is if other websites link to you. Those other links are proving to Google “I felt this is page relevant and useful for the topic it is about”. Google is essentially trusting the web community to promote the good content above the mediocre.

So you promote your site in places that would want to know. Comment on other blogs with a link back to your blog/site. Join in on discussion boards about the topic, proving your knowledge. Your signature can contain a link back. Or, after a few selfless offerings of information, perhaps you can fit a link back to an article your wrote into one of your answers, where it is relevant.

You can leave a link in your email. And when you get an email asking about a topic you’ve already written about, you can provide the link in your email answer. Some people will eventually put links to you on their own website. Eventually, even bigger websites will do the same. As this happens, you get not only the traffic from that link, but Google increases their trust in you, and will raise you accordingly in their search results.

These things will make the biggest impact on your traffic. Anything anyone else offers might help, might hurt, but nothing will do as much for your website as providing awesome content, and getting people to share it with others.


Mar 10 2010

The Search for a Decent Windows Twitter App

I kinda like Twitter. It’s a fun place to leave occasional comments. It’s also a great way to find links to interesting information I would normally miss from my feeds. But being a Windows user, I have yet to find that Twitter application that is a joy to use.

I’ve tried out a couple applications, and found each one lacking:

There might be a decent application out there that I haven’t found, but these are the most popular ones available to Windows. It almost feels like people only want to make cool stuff for Macs.

Tweetdeck

Although it’s hugely popular by many, I can’t help but get annoyed at parts of Tweetdeck. To be fair, it’s the closest I have found that meets my needs, but that’s not good enough for me. It can easily handle auto-completing of replies, inserting photos and shortening links. It’s built with the idea of lists in mind, which I particularly like. I’ve currently got a list about MooTools and a list about games. Unfortunately, I have no option of telling the main list to ignore tweets from anyone in a separate list. I don’t want my main list filled with tweets about stuff I’ve already put into it’s own list. I just want a list of “everyone else”, but without having to create such a list and add every new person I follow to it.

I also have gripes about it’s UI. Marking Tweets as “Read” requires clicking individually on this tiny, 5px wide circle. And then after doing that, I must click at the bottom of the list of a tiny icon to “Clear Read”. And I often accidentally click on “Clear All”, since they’re right next to each other, and they’re so small it takes to long to visually register what each icon is.

The notifications system is buggy. Sometimes it hides the summary behind a window, sometimes not. Clicking the notification will bring up Tweetdeck. But sometimes, the notification won’t dismiss itself. Ever. You can hide Tweetdeck again and have a frozen notification sitting in the corner of your screen. The only way to dismiss it is to click it again. The usual behavior is that it should dismiss regardless after a few seconds.

And it’s an AIR application. Now, granted, AIR is pretty cool. It lets front-end developers create apps for the desktop. But given a choice, why would I want to run something in a Flash player all the time? It chews on my memory like a puppy that is teething. It lacks plenty of things that I’m used to having in a Windows app. And it’s integration is buggy (see above about notifications). Next.

DestroyTwitter

While it’s also an AIR app, which means I have similar complaints in that regard, it’s actually less buggy than Tweetdeck. Notifications don’t stick. I still miss my normal Windows feel though.

It has a much nicer way of handling Mark as Read: just check the option in settings to Mark as Read on rollover. And overall, the UI feels much nicer to use than Tweetdeck. You don’t have to hover over the avatar to find your common actions like replying or retweeting.

However, it doesn’t support lists at all. None. Just a single stream of tweets. No thanks.

Seesmic

A native Windows client, and it doesn’t have the Windows XP look either. It generally looks sweet, feels rather Windows-y. I like that it has useful context menus when I right click on things. It’s design is decent excellent. But it’s severally lacking in features. Severely.

It can’t load images from common sources like yfrog, it just launches the browser. While it doesn’t have automatic URL shortening, it does have an Insert Link ability. But my attempts to use it show that it handles errors poorly:

<bitly>
	<errorCode>0</errorCode>
	<errorMessage></errorMessage>
	<results>
		<nodeKeyVal>
			<errorCode>101</errorCode>
			<errorMessage>Unknown error</errorMessage>
			<nodeKey><![CDATA[http://google.com]]></nodeKey>
			<statusCode>ERROR</statusCode>
		</nodeKeyVal>
	</results>
	<statusCode>OK</statusCode>
</bitly>

Seesmic just dumped that straight into my message. And then it kindly warns me that I’m 282 characters over the limit.

While it supports lists, it has the same issues as Tweetdeck in that regard. But, clearing the timelines can also be wonky. I’ve clear my MooTools list timeline, and then added a new person to the list, and it just went out and refilled the entire timeline. Er, thanks.

And it’s bugtastic. Maximizing the window hides away the normal minimize/close buttons. You have to just click in the area and hope you guessed correctly. Even with notifications turned on, I have yet to see a single notification. It regularly errors when trying to get more tweets, and leaves me without updates for long periods of time.

web

Ultimately, at home, it’s just easier to use the web client. None of the clients I have found are good enough to do light browsing with. I do most of my reading at work, so when I bother to log on at home, I just want the latest part that I haven’t read yet. None of the applications I’ve tried seemed to have syncing. Loading one up at home would just dump the whole days worth of tweets into my timeline, and that’s useless to me.

Since the web application defaults to showing me the latest tweets, that’s usually all the ones I want to see anyways. Replying and retweeting are easy enough, although it would be great if it automatically shortened URLs for me.

“That” Twitter App

The application I’m looking for is a native client to Windows, doesn’t look like it came from the year 2000 in terms of UI, and has many of the features you’d hope to have in a Twitter client: URL shortening, image loading, notifications, and lists. I’d love the option to remove all listed people from my main timeline, but whatever. If it has those features, looks pretty (and is intuitive), and isn’t the buggiest piece of code in the world, I’d like to use it. But it really seems like so many developers only like making things for Macs now. There’s got to be developers who still work on Windows… or maybe I should just break out the C#-fu.


Mar 3 2010

A Less-Random Generator

In game development, it’s very common to want a random number. Maybe you want to determine damage done, if there was a critical, or what slot on the board to insert your piece at. And surprisingly (or perhaps, not), programmers are often looking to make this random number a little less… random.

Less Random, you say?

Yea, seriously. We really don’t want a real random number, because random is too random. Backgammon players rage on about how un-random virtual dice rolls are, and programmers can go to extreme circumstances to provide the right kind of random.

Role playing games have to overcome this too-random problem as well. In an RPG, you might be getting a random number to determine if the player character hit the monster. And considering the situations you find yourself in when playing an RPG, this dramatic but randomly generated experience can really suck:

A blade spider is at your throat. It hits and you miss. It hits again and you miss again. And again and again, until there’s nothing left of you to hit. You’re dead and there’s a two-ton arachnid gloating over your corpse. Impossible? No. Improbable? Yes. But given enough players and given enough time, the improbable becomes almost certain. It wasn’t that the blade spider was hard, it was just bad luck. How frustrating. It’s enough to make a player want to quit.

—Randomness without Replacement

It’s really quite interesting how much we really don’t want real randomness. Because real randomness is not biased. Pure randomness doesn’t care if that’s your 20th “1” in a row. It can lead to frustration, and cause people to blame the game for sucking, when really it was just a bad sequence of random numbers.

How We Perceive Random

It turns out, when we say random, as a player, we actually mean controlled random. Compare these images of dots plotted on a grid:

Which picture looks like the random we want? Apparently, the first is too random for humans. What I mean is, it doesn’t look random. We quickly identify patterns in the truly random picture. We see groupings and think there must have been numbers that were favored to get that result. We want to believe that randomness will evenly distribute it’s results across the spectrum. No patterns, no missed numbers, no repeats. Even.

The truth behind these 2 images is that the left image is a true random plot. The image on the right was controlled.

The plot on the right is […] composed of 64 smaller squares, each of which has 4 points placed at random. People don’t like the leftmost plot because it has several clumps of points that seem non-random. In fact, true randomness consists of a mixture of clumps and non-clumps. Randomness is different from homogeneity.

—Warning Signs in Experimental Design and Interpretation

A programmers solution

The way to handle controlled randomness is actually pretty simple. It’s commonly called a shuffle bag. The principle is that you take a bunch of tokens and put them in a bag. Then when you need another value, you pull a token out of the bag, and use that. Once the bag is empty, you fill it back up again.

You can control the percentage of a positive or negative result by setting the ratio of tokens you insert into the bag. You can also control what sort of “sprees” you can get from you bag by inserting duplicate values.

For example, with 1 hit value and 1 miss value, you have a 50% (1/2) chance of hitting. You also have the possibility of getting 2 misses or hits in a row. If you changed that to contain 5 hits and 5 misses in the bag, you could possibly end up with 10 in a row.

import random
class ShuffleBag(object):
	def __init__(self, values):
		self.values = values
		self.list = None
	def next(self):
		if (self.list is None) or (len(self.list) == 0):
			self.shuffle()
		return self.list.pop()
	def shuffle(self):
		self.list = self.values[:]
		random.shuffle(self.list)

The usage would be pretty simple. If I want a 20% chance of getting a critical hit on a damage roll, I would implement that like so:

bag = ShuffleBag([1, 0, 0, 0, 0])
while attacking:
	is_critical = bag.next()
	if is_critical:
		dmg = MAX_DMG
		doDmg(dmg)

Who’d have thought that you needed to do something special just to get “fun” random numbers? I think the root of it has to do with how statistics are all just a lie.


Jan 27 2010

Import * Considered Harmful

Something a Java programmer learns first is that there is this big, amazing library already built-in to Java, and you can easily use plenty of useful classes by using an import statement. Possibly the first thing you want to do is pop open a box to prompt your name, or say hello, and thus starts this terrible habit:

import javax.swing.*;

I’m guilty of it too. You don’t really know what you’re doing is all that bad. You know what you want from Swing. You only need the JOptionPane. And sure, the compiler shouldn’t be stupid enough to pack the rest of the Swing package into your jar file. In Java, at least, it won’t. There’s talk about whether certain bulk imports in Python will cause things to be included multiple times.

Collisions, or which List did you want?

However, in Java, you canget namespace collisions. coobird on Stack Overflow gives an excellent example:

Now, if we were to use a wildcard in the package import, we’d have the following.

import java.awt.*;
import java.util.*;

However, now we will have a problem!

There is a java.awt.List class and a java.util.List, so referring to the List class would be ambiguous. One would have to refer to the List with a fully-qualified class name if we want to remove the ambiguity:

import java.awt.*;
import java.util.*;// 'List' from java.awt -- need to use a fully-qualified class name.
java.awt.List listComponent = new java.awt.List()

This problem is exactly what I was trying to avoid when doing working with some Java, and prompted my need to let people know never to do this again. I was trying to call a class from the YUI Compressor jar, and the constructor required several classes. Unfamiliar with a couple of the names, I didn’t simply want to copy their import statements, since I already had written my own File class that was far more basic than Java’s. No need for conflicts, please.

Your code doesn’t have this problem? You’re only importing from one package, you say? What about the future of your code? Your class is still auto-importing the rest of your class’ residing package. What happens when someone creates a class called List? Or something else? Conflicted.

This leads to another frustrating reason not to use import star.

It screws Discoverability

Specifically, I was unsure which ErrorReporter was needed for the JavaScriptCompressor. The import statements at the top list 3 packages it could come from, and the only way for me to find out it to search each package.

package com.yahoo.platform.yui.compressor; 
import org.mozilla.javascript.*;
import java.util.*;

ErrorReporter could be a class defined in this package (com.yahoo.platform.yui.compressor), or it could be java.util, or org.mozilla.javascript. It turns out it’s in the latter, but discovering that took longer than it ever should have. Even the few minutes I had to spend to lookup which package contained the class so I could import it into my class file was minutes wasted. It’s effortless to have to used a more specific import statement instead. Especially if you’re using an IDE like Eclipse (which you are if you’re doing Java development, just press Ctrl + Shift + O).

Flex Builder is an extension of Eclipse, so no excuses there either. I imagine Flash has a similar shortcut, though even if it didn’t, just like in Python, it’s really not that hard. Honestly, it takes no extra effortto write the name of a specific class instead of importing the whole dang package or module.

This reason is what I feel is the more important reason why you shouldn’t use import * ever again. The more time it takes another programmer (or even yourself) to understand what in the world was going on inside your head at the time of writing, that’s time (and thus money) you’re costing your company.


Jan 7 2010

Tablets Will Replace Everything

Recently, there has been a bit of talk about upcoming tablets like the CrunchPad and the iSlate, and whether we need them, how useful they’ll be, or if they’re only use is browsing the web on the toilet. Many people are of the opinion that we don’t need one. Or that only gadget enthusiasts would buy it for couch web browsing. Well, I’ll go out and say it: Tablets will replace everything.

Crazy people think we don’t need tablets

I can imagine something like the iPhone with a much bigger screen being a gorgeous device with great capacity, but I don’t know where I would fit that into my life

Another former Apple executive who was there at the time said the tablets kept getting shelved at Apple because Mr. Jobs, whose incisive critiques are often memorable, asked, in essence, what they were good for besides surfing the Web in the bathroom.

—Just a Touch Away, the Elusive Tablet PC

The Eventuality

Eventually, everyone will carry a tablet for all their needs, technological or otherwise.

  • As a phone: We already use programs for telephony like Skype, and others access phone programs using touch screens via iPhones and Androids. If we’re already carrying around 1 piece of technology, why be bothered carrying two. We could talk similar to speakerphone, or an ear piece can easily be worn that will let us talk using the tablet via Bluetooth or some other means.
  • As a computer: Many people use their iPhones to access their e-mail, browse the web, and organize their life. It’s just a plausible on a tablet. The reason for using the iPhone is it’s portability; something the tablet will solve as well. With an on-screen, even typing comments, documents, and the like will be easily and portable.
  • As a reader: Surely, people enjoy reading blogs and their RSS feeds portably, such as on an iPhone. And with readers like the Kindle, we see people enjoy reading books, magazines, and newspapers the same way. It only makes sense to want your one personal device to do both. Another plus: students will forget lugging around text books. The backpack will become redundant. The tablet will let you look at the material for class, and also let you write notes with a touch screen keyboard.
  • As identification: Eventually, we’ll use digital identification over our driver’s licenses (or passport, etc). We’ll have some sort of encrypted file that we can pop open for showing when need be. And likely a way to broadcast it, like the public side of a private ssh key. I would be surprised if we didn’t take it further: our homes unlocking when we broadcast our ID near the door, our cars opening when we’re nearby, and the like.
  • As money: Paper money and even credit cards can be a hassle. Credit cards especially suck at letting us split the bill at a restaurant with 20 people. It’d be to everyone’s advantage if a vendor could broadcast a bill (or a money request), and we could accept on our device. Or if a friend needs to borrow a couple hundred or a thousand dollars. Sure, here you go [press button]. It will happen.

Dec 21 2009

Hacking To Meet Deadlines

As a deadline approaches far faster than you can type, you’re required to write some quick-and-dirty code to fulfill those feature requests.

In case you don’t know what I’m talking about, this is when there happens to be a flaw in your program’s structure. It’s an architectural problem: you did properly build the system to elegantly behave in an expected manner. Sometimes, it’s a problem from bad planning at the start. In other cases, it comes from scope creep, where features get slipped into a system that previously was not going to have such features. Gamasutra had a nice write-up about cases like this happening in the games industry. To put it as they did:

Programmers are often methodical and precise beasts who do their utmost to keep their code clean and pretty. But when the chips are down, the perfectly-planned schedule is shot, and the game needs to ship, “getting it done” can win out over elegance.

In a case like this, a frazzled and overworked programmer is far more likely to ignore best practices, and hack in a less desirable solution to get the [code] out the door.

My favorite example in that article is about a game where in a certain level, some game object needed to be hidden. Instead of doing things the proper way, code was written along the lines of:

if( level == 10 && object == 56 ){    
	HideObject();
}

I’m guilty of that

We know that happens far too often in our industry. Just the other night, I was guilty of doing exactly that.

As a developer for a commercial CMS, we provide basic e-commerce functionality. Recently, a client specifically needed coupon codes added to our getup. With a rather short deadline, and being busy as the year gets close to ending, I didn’t have much time to flesh out the design of this new functionality. Besides everything else we needed to do, this feature ended up with a 2 day implementation, with very little planning. Things ended up looking like this:

foreach($items as $item) {    if($item instanceof CouponItem) {    //get discount    }    //do stuff with CartItems}

I just tied in where we were calculating the totals of all CartItems, and if one of the items was a CouponItem, do discount stuff instead. Another situation was in the view, when showing the cart. I had another loop through the cart items, in order to show them all. With CouponItems now apart of the Cart, I had to handle the different properties of a CouponItem there.

<? foreach($items as $item) { ?>
<td>
	<? if($item instanceof CouponItem) { ?>
	<!-- Coupon stuff -->
	<? } else { ?>
	<!-- normal stuff -->
	<? } ?>
</td>
<? } ?>

One can’t help but feel dirty doing this. Just hodge-podging rules into place, that magically make everything all better.

Is it really that bad?

Some may be wondering, what’s the big deal? It works, doesn’t it? Why, yes! It works! And depending on your situation, that may be all that’s really necessary. After all, the point of software is to ship it. And it’s got to work. In the end, howit works on the inside has little value to the end user. That’s the same in my case. In the end, what really matters is that users can add products to a shopping cart and then checkout.

However, at the same time, since our product is something that I have to work on every day, writing software like this makes things more confusing, and hard to maintain. Come a few months from now, when we find a bug in the Cart Items somewhere, or when I need to add a new feature in there, that hacked in behavior is unexpected behavior. Unexpected behavior means its easy to break something when I modify code elsewhere. It also means that it will take more time to learn what the heck I was doing when I read it again in the future. And I at least wrote that code. The other developers have it worse.

Now that the deadline has passed, and it just works, I can spend the next couple days planning out a better, more elegant way of handling these coupon codes. My users won’t see the difference. But I will certainly notice it in a month or more.


Nov 17 2009

Why Must LAMP Setup Suck?

LAMP is common lingo for web developers. It’s an incredibly popular software stack to run dynamic websites. Many hosting companies include the stack for you, already configured and ready to go. But before we get there? That wonderful point where we trust our code to the production server, and then watch something blow up beautifully in a fire-y mess of status codes, fatal errors, and SQLStates. We developers like to test thing before then.

So I’m left wondering, why does setting up a testing environment suck so hard? Downloading a virtual machine is easy enough, and then you must download your flavor *nix. Boot it up, apt-get your flavor’s Apache, MySQL, and PHP. Getting Apache to work just the way you want, making sure you set up the right hosts, and run the correct modules.

While you’re at it, your apt-get listscould be wrong, or not contain all the files you want. And in the middle of one installation, you may find you hit your memory limit, that simply requires increasing to a supreme value.

There are competent, 1-button install programs that setup a WAMP environment. No hassles. Of course, the only downside being that the environment differs slightly than your production environment.

I recognize anyone needing a Linux server mostly knows how to set one up. But at the same time, the people wanting Linux servers are programmers. Isn’t our job obsession all about automating tasks that can be automated, and forever trying to make every task in that category? Certainly, it must be a common setup to have a Debian (or Ubuntu, or RedHat, etc) Virtual Machine using Apache, SQL, and PHP. Even desiring Python to be installed, with mod_python or mod_wsgi. Or how about coming with Ruby set up for you. These would all be excellent downloadable Virtual Machines that programmers would use regularly.

Only One Solution So Far

I’ve seen one installer for a Linux virtual machine, though not in the flavor I regularly use: SUSE Studio.

Build an appliance - or your own custom Linux distro - with a few mouse clicks. Customize it to your heart’s content, and share it with the world.

The concept is brilliant. If you want a SUSE virtual machine, you just login, select the version, check some packages to include, such as Apache, MySQL, and the like. And then it builds it for you. Check back in a couple minutes, and you can download it to your machine. Or you can start it up right there in the web browser.

If I were the technical director at a company, and we were going to be using a new development area for a new project, I could easily customize a box (with clicking, not with tedious command line memorization), and after it’s built, give it out to all the developers. That’d be huge! It certainly is a pain point to make sure all us developers have a virtual machine with the same settings.

The Way Forward

SUSE Studio has the right idea, for all things that should be installed. Anything that requires a specific set of instructions that you’re requiring humans to do, every single time, should likely be programmed instead. Hopefully we’ll see other versions showing up, so the PHP developer wanting to check out Ruby, for example, can just download a virtual machine with it already set up, and get to the important stuff: writing code and solve problems.


Page 1 of 2