Lasso: Hang Yourself With It

This current project has been one challenge after another. This is the case with every project, which is why I love developing software…never-ending challenges. However, the challenges in this project do not come from needing to find better/faster/cooler ways of accomplishing goals. No, the challenges come from the searing incompetence of the programmer who started the project but was fired before he could complete it.

Here’s a short list of grievances:

  1. No functions. The entire website, which contains some very complex functionality, is one gigantic if/then/else statement.
  2. No comments. Not a single one in what has to be 30,000 lines of very sloppy code.
  3. No foreign keys. He referenced discrete fields, like a user’s name, to create a relationship with another table.
  4. Three SQL datatypes were employed: integers (for the unused primary keys), datetime (for the odd occurrence when he actually decided to timestamp something) and varchars with a length of 255 for everything else, and I mean everything.
  5. Fulltext indexing on every single varchar field. Every. Single. One.
  6. Goofy character based flags. After all, why use a boolean or an tinyint 0/1 pattern when you can have flags like “enabled/disabled/Enabled” or “yes/no/NO.”

On top of it all, the legacy code is written in an absolute abortion of a language known as Lasso. Lasso is this…idiosyncratic, we’ll call it…language favored by “programmers” who favor Macs. Here are a few of the neat “features” of Lasso:

  1. Rather than following that boring old void function myFunc(args) pattern that every other language on the planet uses, Lasso eschews “functions” for “custom tags” with this sweet prototype syntax: define_tag: -myFunc, -required=’arg’;
  2. Passing variables to functions…I’m sorry, custom tags…by value as the default behavior must be passe to Lasso; variables are passed to functions (custom tags) by reference by default . You’ll need to root pretty deep into the language guide to discover documentation on this little gem of reality.
  3. It has its own middleware server and site administration tool that sits between the web server and the code. Every web language out there has a parser or JIT compiler that sits in the same place, but Lasso does it differently. Admins have to create sites, then create database connection entries, designate which tables can be accessed by which users, decide which filetypes can be accessed, etc. etc. ad naseum. It’s no wonder my predecessor was the worst coder in the galaxy: he didn’t have time to learn anything as he was to busy trying to get a new website set up in Lasso’s SiteAdmin tool so he could actually then start writing the damn thing.
  4. Nobody uses it outside of seven people in England. Therefore if you are looking for community help…you’re screwed, unless you’re willing to wait for someone to answer a question on the one Lasso forum that exists on the entire internet at Nabble.com.
  5. You can’t buy a book on it, since, you know, publishers exist to make money and you can’t make money selling books about a language that seven people use. Well, there is one book published on Lasso 5 (current rev is 8.5).

I need a gun with one bullet.

Taking the Plunge

This day has been years in the making. I started learning to write code as a kid when my Dad brought home an Apple //e. A few years later I graduated to a book on 8086 assembly language. I studied engineering in college. Seven years ago I left a very good job to focus on becoming a programmer. There have been a few detours along the way, turns off of the road caused by poor choices and some bad luck.

So here I am, 7:00 in the morning on the Friday following my last day in someone else’s formal employ and I cannot be more confident in my choice. I’ve saved as much money as I could afford. I’ve worked evenings and weekends for the last few years to develop the necessary connections, reputation, and skills. I’ve turned down investors offering relatively handsome sums of money because I’m not willing to give away equity that has little present value but massive future value.

I’m stoked, amped, jacked…insert the superlative synonym for excitement, it’ll fit. I open up my IDE and…

Macs and Me, Part I

One of my current projects is a “Rescue Ranger” deal where a project has been abandoned and I’ve been brought in to save the day. Literally. If this project doesn’t get done my client, a large ad agency, will lose one of their top accounts.

A stipulation of the contract is that I do as much of the work on-site as possible…on a Mac. Now I have absolutely nothing against Macs. I’d buy one to use myself except for the fact that I rely on too many Win32 programs to get my work done, Visual Studio 2005 and VS.PHP being the most important. The Mac in question is pretty cherry. It’s a G…5? Whatever is the latest and greatest, big processors, lots of RAM, and one of those ridiculous 30″ flat panels…the best Mac money can buy. It still has OSX rather than the latest operating system that Jobs just released a few months back.

I now have about 16 hours total on a Mac and…well, I’m underwhelmed. I’ve heard and heard about how they’re so easy to use, they’re so intuitive, anyone can use them, yada yada yada yackety schmackety. I haven’t found them to be any easier to use than Windows XP.

Easier than Vista? Yes, definitely. *nix from the bash shell is easier that than steaming pile, but then that’s what happens when you design by automated tests rather than by UAT.

But I digress. I found installing programs to be a pain. I needed the MySQL GUI Tools package as well as OpenOffice. Using Windows XP I download, double-click, and go. Using this Mac I had to download, double-click, drop into the shell, tweak settings, re-install, and go. Easier? Not so much. My time is worth a nice chunk of change, and I blew half an hour of it on the Mac.

It was also s…l…o…w. There were two databases that I needed to back up from my client’s network. I hooked up my XP powered Lenovo to do the larger one and used the Mac to do the smaller one. The Mac took 20 minutes, my Lenovo took 2. Why on earth would a shiny new Mac be an order of magnitude slower than a year old PC, and a notebook at that? Everything else took longer too. Opening Dreamweaver on the Mac took twice as long as on my laptop. Opening a website in Firefox took about three times as long.

The other minor annoyance is that to use a right-click context menu I have to hold down the Ctrl key on the incredibly tiny impossible to use if you have hands larger than a midget’s keyboard.

I’m less than impressed to this point. Maybe it’s like when your friends talk about how awesome a movie is and then when you see it your reaction is, “Seriously? That wasn’t that cool.” Perhaps there’s no way a Mac can live up to the hype.  My gut reaction is that for neophytes, a Mac might be better. If all you do is use Firefox to surf the web then it might be marginally easier. I dunno…I’ve been on computers since my dad brought home an Apple //e (PR#6 FTW WOOT!), so I have zero perspective on what it’s like to be totally new to computers.

Marketing Mathematics: The Importance of Standard Deviation

Averages and Standard Deviation

Adrian Peterson rushes for 96 yards per game...with a standard deviation of 78 yards.I frequently deal with marketers and marketing departments and am just as frequently astounded by how ignorant most marketers are of how to apply mathematical and statistical practices to their trade.One fundamental stands out most prominently: the meaning and power of calculating standard deviation when examining averages.

Marketers love to talk about averages. However, the most important part of an average is almost always overlooked: standard deviation.

The best way for marketers to look at standard deviation is to view it as a measurement of consistency.

Let’s say you’re the coach of a football team and it’s fourth down with four yards to go to the end zone. You have two running backs, one who averages five yards with a standard deviation of two yards and another who averages seven yards with a standard deviation of five yards. (Kudos to MathGeek for this example).

Which back do you choose? The correct answer is the first back, because he’s more consistent. While he’s not likely to bust a run for big yards, he’s also not as likely to get stuffed at or behind the line of scrimmage.

A more applicable example is average order size. Companies LOVE to talk about average order size. One of our clients’ average order size is about $160. But the standard deviation is $256!

What’s this mean to a marketer? It means that in this case average order size is totally and completely meaningless as order sizes are all over the place. It means that if you look at 1000 orders very few of them will be close to $160. Any effort focused on increasing average order size would be a waste of resources because the focus would be upon a segment that doesn’t exist…there simply aren’t very many customers making orders at $160.

A better practice would be to examine a frequency distribution of order sizes to determine the ranges in which most orders are placed…but that’s an issue for another posting.

So how does one calculate standard deviation?

Simple! It’s the square root of the sum of the squares of the differences from the statistical mean divided by the degrees of freedom.

Ok, so it’s not so simple, but spreadsheet software packages like Microsoft Excel or OpenOffice Calc make it simple for you.

You know how you can highlight a range of numbers, say A1 to A10 and somewhere else on a the spreadsheet, maybe A11, type “=SUM(A1:A10)” and you get the sum of those number? Just do the same thing, except instead of SUM put “STDEV”…so you’d have “=STDEV(A1:A10)”.

It’s that easy. Excel or Calc does all the heavy lifting.

Just Say No To Cheapskates

I was a salesperson before I was a software engineer; now that I’m starting a company, I’m once again a salesperson. I’m happy to say that I’ve learned quite a lot in my hiatus from sales; being on the receiving end of the pitch has taught me quite a bit and I’ll be a much better salesman this time around.

There is one lesson, however, that I’d like to communicate to anyone that is listening: don’t do business with cheapskates.

Cheapskates will hammer you on price until no profit margin remains. Cheapskates will raise absurd post-sale objections and insist that your pre-sale answers were different. Cheapskates will fill your voice mail with ludicrous questions and complaints about your product. Cheapskates will create a negative association with your name among post-sale support staff and when you need a favor from them (you will) you’ll be out of luck. Cheapskates will never be happy with your product and at best you’ll have a marginally satisfied client from whom you will never receive referral business…and if you do, it will be the undesirable business of other cheapskates.

To differentiate between a cheapskate and a reasonably price conscious prospect, ask yourself, “does this prospect focus on the ‘I’ and ignore the ‘R’ in ‘ROI?’” This is key: cheapskates focus on the ‘I’ and no matter how much ‘R’ you bring them, all they will ever see is the ‘I.’

If you find yourself dealing with a cheapskate, gracefully extricate yourself from the situation and move on to another prospect.  Don’t waste time that you could be spending with a quality prospect.

Just Make It Work

One of my consistent frustrations with many other IT people (read: computer nerds) is there is a direct relationship between their personal knowledge base and expertise and their sense of self-worth. Ergo, to question the decisions or actions of many IT people is akin to questioning their identity as a human.

This leads to the type of behavior lampooned by Jimmy Fallon in the Saturday Night Live sketch “Nick Burns: Your Company Computer Guy,” where a lisping nerd know-it-all comes and treats his internal clients with condescension while he solves what to him are trivial problems.

At least Nick Burns can figure out how the problems with which he’s presented. I’m willing to accommodate a certain amount of boorish, annoying, or arrogant behavior if someone is good at what they do. I call it the “House Principle,” a la the booring, annoying, and arrogant Dr. House on TV. But the most difficult situation is when someone has behaves in that manner yet doesn’t have a clue what in the hell they are talking about.

This is where the real problems arise, because challenging this person’s statements or decision results in them taking personal affront to your skepticism because their sense of self-worth is completely ingrained with their knowledge. It becomes not an issue of (for example), “Why is our outgoing email being sent from the IP 123.456.789.0 rather than 123.456.789.1″ but an issue of them hearing your question as a statement proclaiming, “You’re an incompetent idiot, and a moron.” The result is a hyper-defensive over-reaction. There are three letter acronyms thrown about (some of which may be made up on the spot), software vendors are cursed, and excuses are made.

The situation boils down to someone refusing to accept responsibility for either making a mistake or not having had the necessary knowledge…or both. Thing is, I don’t know anyone who doesn’t make mistakes and I don’t know anyone who knows everything, so I’m not in the least shocked when such a situation comes up.

I haven’t yet figured out how to communicate to this type of individual without investing an inordinate amount of time into ego stroking. You see, I just want it to work. Whatever it is, just make it work. I don’t care if you made a mistake or didn’t know something at the time of configuration, I don’t care about why there’s no way you could have known this, I don’t care hearing about the incompetencies of Microsoft, I DON’T CARE. JUST. MAKE. IT. WORK.

Press Conference: The OS Depth Chart

After much speculation I’m happy to say that I’ve arrived at this season’s operating system depth chart. Controversy has been swirling and there have been quite a few rumors circulating so I’m hoping to put those to rest today.

First, I have some rather unpleasant news to get out of the way. As you all know there have been repeated disciplinary issues with Windows Vista. An inability to consistently connect to wireless networks, difficulties with formerly compatible software, and repeated tardiness in boot up times…you’ve all been talking about these things. I regret to inform you that Windows Vista has been permanently dismissed from the team for gross misconduct. We’re all disappointed, especially given the anticipation surrounding this operating system.

With that out of the way, I’m happy to say that I’ve elected to give the starting nod to the operating system that has proven itself successful in past seasons, Windows XP. XP has matured into a reliable OS that does what I need it do, makes good decisions, and has all but eliminated the BSOD fumbles of prior seasons. We’re looking forward to continuing successful operation into the next few seasons with Windows XP at the helm.

I know there were hopes that Ubuntu Feisty Fawn would be given the starting nod. Feisty did great work with the opportunity it was given and exceeded our expectations. However, Ubuntu still needs at least another season of development before it will be starting material. There are some weaknesses to be resolved such as poor wireless handling, but the improvement we’ve seen has been incredibly encouraging. Expect to see Ubuntu via VMWare during situations when things are in hand and the opportunity to build experience presents itself. Our hope is that Ubuntu will be ready to take the starting snap when XP steps into retirement.

That’s all for now. Thanks and we look forward to a successful season.

Web Development != Search Engine Optimization

A recent conversation with a colleague brought up the subject of search engine optimization and marketing (SEO), web development, and managing client expectations. The basic issue is that most clients do not have an understanding of the fact that SEO is a specialized practice and industry separate from but related to web development.

Many clients expect that SEO is “just part of the package” when having a website constructed, and it is to a very limited extent. It is the responsibility of the developer to ensure that the URLs are “SEO-friendly,” that there are HTML and XML site maps, that the site is as close to W3C compliance as is reasonably possible, to avoid gratuitous use of Flash (or better yet, just avoid Flash altogether), and to ensure that Javascript and CSS degrade gracefully, etc.

But these are just the technical issues related to SEO and they primarily relate to making the site condusive to spidering by the search engines. The host of other activities related to SEO (research, keyphrase optimizing, back-linking, magneting, pay-per-click, etc.) fall far outside the developer’s scope of work. There is a thriving industry that revolves around SEO, just as there is a thriving industry that revolves around web development. There are conferences (Search Engine Strategies is the big one, taking place in San Jose right now), websites (Aaron Wall’s SEOBook.com and SearchEngineWatch.com are my favorites), mountains of books (Aaron Wall’s SEO Book and IBM’s Search Engine Marketing, Inc never leave my desk), and scads of white papers (I read everything produced by MarketLive and Avenue A | Razorfish).

Developers need to communicate this delineation between web developer and search marketer as soon as possible in the relationship; I’ve begun telling clients up front that I will deliver them a search friendly site, but that full SEO is another consultation altogether.

Here’s the analogy that I use with clients: engaging my development firm to build your website is similar to hiring a general contractor to construct a brick and mortar retail facility. One would probably not hold a general contractor responsible for the generation of foot traffic through the front doors of the store (although one would expect the doors to work smoothly, be marked with the appropriate signage, and be clean and professionally installed). In the same sense, unless the service has been explicitly agreed upon, one cannot expect a development firm to be responsible for the marketing activities that result in increased site traffic (although one would expect that the site work smoothly, employ established usability conventions, and be visually sharp and professional in appearance and operation).

Apache mod_write URI Length Limitation

I ran into an odd problem recently. I’m using mod_rewrite to do some virtual hosting in conjunction with the excellent Code Igniter PHP framework.

Out of sheer laziness and a desire to avoid having to do a SOAP transaction (since we’ve already got a couple of them going in this particular bit of code) MathGeek and I decided to put a bunch of data in the URI, hashfuscated, naturally.

Unfortunately it turns out that mod_rewrite chokes on URL strings longer than 255 characters by throwing a 403 error. Now, I’m not sure if its the TOTAL length, or just the individual length of a section of a URL. I tried a few things with regexps but I’ve not really come up with anything conclusive. I’ll have to wait until I’ve a) slapped a bandaid on the problem and b) come up with a real solution before I can fire up my dev box and mess with the module to figure out the true limitation.

Ubuntu: First Impressions

It’s been a couple of days now since I installed Ubuntu on my new laptop. Since that time, I’ve spent, oh, almost all of it goofing around it.

Pros:

Beryl - Windows Aero what? Oh my goodness Beryl is the most beautiful window manager ever built. It’s not something you can really verbally explain, so just go check out this video:  http://www.youtube.com/v/ZD7QraljRfM

Synaptics - The package installer works quite nicely and it’s rare that I have to drop down to the BASH shell to get things working.Community - UbuntuForums.org is a godsend; most of the answers I sought were found there.

Speed - One of my primary issues with Vista is that it is molasses slow; this is not the case with Ubunu, even with Beryl running. The boot time is literally a third of Vista’s (I timed it).

Cons:

Wireless - It refuses to work on boot unless I go into the Network Manager interface and quite literally just goof with it until it works.

90% - One can find free alternatives to most of the software that is necessary on Windows. Unfortunately the majority of that software is only 90% as good as what is available on Windows. The GIMP (Gnu Image ManiPulator) vs Photoshop is a great example. GIMP will do a lot of what Photoshop will do, but it’s…just inferior. The UI isn’t as good, some of the tools are named identically but have slightly different functions. It’s confusing.

The Gmail Notification client is another example: it works, but it’s buggy and carries the potential of getting an nastygram from Google asking you to stop drilling their servers via 3rd party software.

Bottom Line:

I frequent Slashdot therefore I’ve heard countless Windows vs Linux discussions. Many of those discussions center around the fact that those offering opinions have religious beliefs when it comes to operating systems. Those religious beliefs spring forth and, as some religious beliefs tend to do, they undermine the objectivity and rational nature of the individuals in question.

Once upon a time a young woman I interviewed for a position made the statement that “Linux is free if you don’t value your time.” This is a perspective that is frequently overlooked during these holy wars; when the issue of time or of a learning curve is mentioned, the counter-argument usually alludes to laziness on the protesters part.

Laziness is not the issue.
ROI is the issue. Does using Linux as a desktop OS yield ROI greater than that of using Windows XP? I know that using a Linux OS for a web application server yields a tremendous ROI when compared to using Microsoft; I have hard numbers to back that up.

More to come…