All posts tagged ‘Programming’

File Under: Glossary

Hash

A hash, also known as an associative array, is a collection of data in which each piece of data has two components: a key and a value. Much like the hash at your local diner, JavaScript hashes go unordered: They’re not indexed by numbers. For example, if you wish to use JavaScript to put up a different GIF animation on your site every day of the week, you might throw all these animations into a hash associated to each weekday as a key. Then you would refer to the key day to invoke that day’s animation.

For example, in a normal array, you’d have:

  dinner[0] = "monkey brain";

  dinner[1] = "meatloaf";

But in a hash, you could use a string as the index:

  dinner["monday"] = "monkey brain";

  dinner["tuesday"] = "meatloaf";

File Under: Glossary

Hover

Much like standing behind your co-worker while she slaves away, hover implies standing by but not doing anything. In dHTML, it refers specifically to when the user has positioned her cursor over a link but not yet clicked anything. The style will not change if the cursor is simply passed over the link, but you can set an action to take place after a predetermined amount of hovering.

File Under: Glossary

Loop

A loop is like a programming thought. Say you’re a police officer using a radar gun to catch speeding motorists. If the speed limit is 55 miles per hour, you might say to yourself: “If a car makes my radar gun display a higher value than 55, I’ll pull them over, but until then I will continue to take readings. And perhaps snack on this cruller.” In programming, the statement of this loop would be the action (firing up your motorcycle and chasing the speeder), and the expression would be the evaluation of whether or not the passing car made your radar gun read higher than 55. This is an example of a “while” loop:

  while (carSpeed < 55) {

  carSpeed = readRadar();

  // note:readRadar() should return the latest carSpeed

}



pullEmOver();  // this will only execute once carSpeed is >= 55

File Under: Glossary

Object dHTML

In object-oriented programming, an object is a self-contained entity that consists of both data and manipulation procedures.

Similarly, HTML 4.0 includes the <OBJECT> element to extend HTML in order to make it more dynamic. <OBJECT> allows an author to download external data or programs into the current page. This element can be used to gather other pieces of information, including Java applets, ActiveX controls, and possibly dHTML. The long-term goal of the World Wide Web Consortium (W3C) is for the <OBJECT> element to become the only way to embed data, replacing the <APPLET> and <IMG> elements.

File Under: Programming, Software, Web Apps

Forget Perfection, Release Your App to the World

fail whaleMost developers are probably familiar with Linux founder Linus Torvalds’ motto: “release early, release often.” The reason is quite simple: Shipping something useful is better than withholding that usefulness until it’s reached perfection.

Of course, there are exceptions. If you’re developing flight control software or a heart monitor interface, we sincerely hope you do not ship imperfect software. But when it comes to web applications, getting your software to the public is often more important than making sure it’s absolutely perfect.

The reason shipping a flawed version is often better than shipping nothing is summed up nicely by blogger Jeff Atwood, who recently wrote a post entitled, Version 1 Sucks, But Ship It Anyway.

As Atwood writes, “instead of spending three months fixing up this version in a sterile, isolated lab, you could be spending that same three month period listening to feedback from real live, honest-to-god, dedicated users of your software.”

The result in that scenario is that you end up with not the software as you dreamed it, but as users really want it. There’s actually a third sentence in Linus’ motto: “Release early. Release often. And listen to your customers.” And it’s impossible to listen to your customers if you don’t have any.

While it’s become something of a joke in Google’s hands, this is where the “beta” moniker serves a real purpose — to let users know that you have something, but it isn’t perfect.

The tradeoff for users is (or should be anyway) that they have some influence on the product’s future. In this scenario, “release early, release often” means your app gets feedback when you need it most — before it’s fully baked. The end result might not be your application as you imagined it — the internet is littered with web apps that started out as one thing but became quite another in the hands of users — but you’ll have delivered something people find useful. It might be hard to let go of your vision, but sometimes your users are smarter than you are.

As Atwood puts it, “it’s saner to let go and realize that when your software crashes on the rocky shore of the real world, disappointment is inevitable… but fixable!”

See Also: