Premature Optimization: A Serious Problem

Programming 15 Comments »

It’s a common problem among programmers. Elegant code becomes obfuscated by a series of hacks and kludges that are supposed to “improve performance.” Two months later when your partner goes back to ajaxify your login form, or implement a bugfix, they lose three days trying to understand 1,500 lines of spaghetti code. Despite the long-term repercussions, many seasoned programmers continue to optimize prematurely with no regard for their partners’ happiness or their own well-being. Read the rest of this entry »

How big is your… database?

Database, MySQL 13 Comments »

I was just looking over some statistics for the back-end MySQL database for this site and another project I’m involved with. I was impressed to discover the server had executed well over 100,000,000 queries since it started 68 days ago (well, 118,565,844 to be exact). That’s over twenty queries per second, for more than two months, without a hitch. Talk about enterprise level. Read the rest of this entry »

How Readable is Your Blog?

Blogging, Software 11 Comments »

Readability Tester
I’ve been reading a lot of blogs lately and was wondering what the average blog’s readability was compared to say, the New York Times, or even the USA Today. I figured I could write a little spider to crawl a blog and calculate these statistics, but I never got around to it. Then yesterday I came across an interesting post discussing the ideal length of a blog post, and was inspired. So now, I present to you my Blog Readability Tester (I figured the name Charlotte was appropriate since she’s a spider that likes words). Read the rest of this entry »

Presentation Patterns: The Front Controller

Programming, Software Patterns 6 Comments »

The most basic presentation pattern is probably that old standby, the Model View Controller (MVC). Rather than re-hash MVC, which has already been covered elsewhere, I figured I’d jump ahead to something a bit more interesting: the Front Controller.

Presentation patterns in general are designed to promote the independent operation of the business logic (model) and presentation (view) tiers of a system. The controller is responsible for coordinating the operations of the other two layers by taking user input, manipulating the model, and causing the view to react appropriately. The Front Controller pattern goes a step further by exposing a single entry point to your system, and delegating incoming requests to objects that implement the proper behavior. Read the rest of this entry »

Design Patterns: The Singleton

Design Patterns, Programming, Software Patterns 7 Comments »

Global variables tie classes to context and create unnatural interdependencies in an application. A Singleton ensures that a class only has one instance, and provides a global point of access to it. If a system only needs one instance of a class, and that instance is used in different parts of the system, you can control instantiation and access by making the class a singleton. Read the rest of this entry »

Grokking software patterns

Programming, Software Patterns 10 Comments »

If you’ve been programming for any period of time then you’ve probably heard about these things called patterns. But unless you’re a professional you’re probably not quite sure what they are, or what they’re good for. I’ve decided to start cataloging some of the software patterns I use most frequently in my projects. But before I do that, I figured I should try explaining what a software pattern is. Read the rest of this entry »

How to write a simple PHP template engine

Programming, Tutorials 8 Comments »

Templates are a great way to separate logic from presentation in an application. There’s no shortage of template engines available for PHP, so why would you want to write another one? Well, because sometimes you don’t need a full fledged template language like smarty, and writing your own simple engine is as easy as it is useful. Read the rest of this entry »

Top 5 tops: keep tabs on your system

Linux, Lists 4 Comments »

Anyone who has spent any time at the command line has probably encountered the venerable top command. It’s an excellent system administration tool that make efficient use of the limited UI facilities available for command line applications. If you love top as much as I do, you may be interested in these other top-like tools that you can use to monitor other vital system statistics. Read the rest of this entry »

XSLT for web developers

Web Development 7 Comments »

Many modern web applications utilize XML and XHTML. But developers often fail to realize the full potential of these standards. XSLT is a powerful technology that can be used to transform XML documents into something else (like XHTML, CSS, or SQL). This post will briefly introduce XSLT and perform some simple transformations to an XHTML document. Read the rest of this entry »

The showdown: apache vs. lighttpd

Blogging, Web Development 3 Comments »

Is lighttpd faster than Apache? Can Wordpress handle high traffic websites? Rumors spread like wildfire on the web, and sometimes it’s hard to separate the truth from evangelism and clever marketing. Today I’m going to put Wordpress to the test, running under Apache and lighttpd, and see if a clear winner emerges. Read the rest of this entry »

Copyright © 2007 - Mike Malone / Icons by N.Design Studio
Entries RSS Comments RSS Log in
no image