Archive for Philosophy

Religious Wars and New Years Resolutions

Yeah, so I suck at keeping this blog fresh.  Sue me, I have a business to run.

Actually, please DON’T sue me.

Wow, do one’s perspectives change on so many things once responsible for owning a business.  Take that funny little “sue me” colloquialism.  One part of me enjoys the snark, the other part of me feels the cold tentacles of fear wrap around my heart.  Lawsuits aren’t a joking matter when one could put you out of business.  Never mind the fact that there’s nothing legitimate for which a party could take legal action against us; just the cost of paying an attorney to dispense of unwarranted litigation would bring the pain.

Here’s another thing you don’t care about once running your own business: religious wars of the nerd kind.  I just read a comment thread on Slashdot about Perl having moved over to using the source code version control system git.  These guys were blasting away at each other with warheads like “git takes up less space” or “subversion has better GUIs” or “you’re just too lazy to use the command line” or “git runs faster.”

These are the arguments and conversations of developers who are on someone else’s payroll.  I can tell you straight up, I don’t give a damn about hard drive space, not when I can buy a terabyte for less than it costs to pay an developer to work for a couple of hours.  I don’t care which is better, command line or GUI; I care about what will enable my developers to spend the least amount of time jacking with version control.  Nor do I care about which runs faster (within reason) as I can buy a dual-core funny car for, again, less money than a couple hours of highly skilled labor.

Simply put, owning and operating a business has stripped me of all nerdly religious beliefs.  In place has grown an agnostic pragmatism.  My goal is to get code written at the highest quality within the smallest reasonable timeframe at the lowest cost.  In our case this means running Apache on hardened Windows servers, writing PHP using Microsoft Visual Studio, using SVN to manage source code, and Python on roided up Ubuntu boxes for number crunching.

On a different note, my only conscious New Years resolution is to be more diligent about this blog.  I believe that what we’re doing and learning represents a unique perspective, but if I don’t take the time to communicate that perspective is lost to time.

How To Make Your Site Web 2.0 Compliant

I originally wrote this bit of snark at the very end of 2006, just barely over two years ago.  It’s been sitting in my “Drafts” folder ever since.  The funny part is that two years later, I pretty much employ all of this stuff (or encourage my graphic designers to do so).  Yesterdays snark has become today’s best practice.

Having made a decent living from “Web 1.0″ back in the late nineties and early part of this decade, I have to say that I’m really happy to see that “Web 2.0″ has arrived. Hopefully I can get in on some of that sweet Google buyout scratch, because I need a new BMW.

But to do so, I need to make sure that the sites I create are Web 2.0 compliant. After doing some research, I’ve compiled a short list that defines a sure path to Web 2.0 success.

1) Take up the whole screen width.

Seriously, keeping the width of your screen limited to 780 pixels or 1200 pixels or whatever is SO 2002. None of the cool kids do that anymore, and you want to be one of the cool kids, right?

2) Use LOTS of gradients and rounded corners. Bonus points if your gradients are blue.

Nothing says “I’m ready for some of that sweet buyout money” like gradients. And nothing says “I rock the Web 2.0″ like blue gradients. Look at all the coolest sites: Digg, Flickr, etc. Blue gradients abound!

Furthermore, nothing shouts “I’m a square” like square corners. And you don’t wanna be a square.

3) Make graphics all glass and mirrorish looking

Everybody knows that glass and mirrors are totally sweet.

4) Big bold fonts in big colored text input boxes.

Now that you can buy a 19″ LCD for under $200 bucks, you’d think that since these displays are vastly superior to the CRTs of Web 1.0, we webbish folks can use 10 point fonts with impunity.

Think again. Black is white, what’s new is old, blah blah blah. The really clever thing is to use BIG fonts, especially in your input text boxes. Just remember that only the kids with velcro sneakers leave the background on those boxes white. Throw some color back there…and don’t forget rule number 2.

5) Do something AJAXy.

Nobody has time to wait for a screen refresh these days. Those are just annoying. So be sure to have stuff that happens without a screen refresh. And note that since AJAX is the new Kleenex, you don’t really even have to go to the trouble of actually doing any nasty AJAX. Just make sure to have some stuff that bounces or jiggles or fades in and out or opens up like venetian blinds. Don’t worry, these are TOTALLY different than the Stupid Javacript Tricks ™ of Web 1.0.

6) Don’t use tables.

Tables are for losers. People that use tables are like the kids that got the plain metal braces. But people that use DIV tags and CSS are like the kids that got the super cool braces with the clearish anchors and colored wires. The results are the same, but you look so much cooler getting there.

It doesn’t matter that tables are (pretty much) homogeneously supported across all browsers and that getting anything beyond basic CSS layouts to render consistently across all popular browsers is a game of Sisyphean whack-a-mole.

Just don’t be the kid with the metal braces.

7) Arbitrarily drop a vowel, add a consonant, or 1337itize to your url

Digg.  Flickr.  Del.ico.us.  What do these sites have in common?

That’s right, a sweet domain name that has a really clever spelling.

Naming your site something relevant to the service it provides is so Web 1.0, so here’s how you figure out a sweet domain name.  Let’s use this site, “CompulsiveCoder” as an example.
Step 1, drop a vowel…CompulsiveCodr

DONE!!! Heck yeah, that looks awesome!!!

That’s pretty much it.  All you really gotta do know is figure out what you are going to do when you get bought out for millions of dollars.

Development Software I Can’t Live Without

There are already just about a million “Top Ten” style software lists. Regardless, here is the software without which I could not conduct bidness:

1) Visual Studio 2005
Yes, I know…we write mostly PHP at my company, but Visual Studio happens to be the best IDE available. I have a copy of 2008 that I haven’t installed yet, mainly due to the fact that I’d have to re-buy a bunch of plug-ins such as…

2) VS.PHP by Jcx.Software
This little gem allows PHP development on Visual Studio. I mentioned this a million years ago when I’d first started using it and I’m pretty much convinced it’s the best thing since sliced bread for PHP developers and it’s only $99.

3) Visual SVN
Yet another brilliant Visual Studio plugin that integrates open-source brilliance with…Microsoft. It integrates Subversion, the remarkable source code management system, right into Visual Studio. Everything you’ll need is available from either a context menu or via the menu that appears in the, um, menu bar. For those of you already familiar with Tortoise SVN (upon which Visual SVN is built), basically this product shoehorns Tortoise into Visual Studio. It is worth the $49 per license several times over.

4) Visual SVN Server
This is a product by the same company, but it’s remarkable enough that I felt it deserved indivual mention. It makes the creation and management of Subversion repositories, users, and security as simple as navigating the very intuitive user interface.

5) FileZilla FTP Client / FileZilla FTP Server
Free FTP client, free FTP server. Each product is very very easy to use. I used to be a SmartFTP user but after that product started to decline in quality, RootCause steered me in this direction.

6) FoxIt PDF Reader
FoxIt is a free PDF viewer and printer that frees you from the shackles imposed by that horrid piece of bloatware known as Adobe Acrobat. I don’t even know how big the Acrobat is these days, probably around 45MB…just to read PDFs! The 2.44MB FoxIt download frees you from this stupidity.

7) Open Office
The Sun-backed productivity suite has almost completely obviated our need for Microsoft Office. I say “almost” because the only reason I have Excel is that I needed to run a regression analysis a while back and Open Office does not have a good statistics package. That one example aside, I haven’t used office since we opened our doors. This, however, would not be possible without…

8) Google Applications
Who needs the cruft commonly known as Microsoft Exchange when Google provides excellent (and constantly improving) web based applications? Not my company (and probably not yours, despite what your CTO tells you).

9) TredoSoft MutipleIEs
Any web developer has to contend with the steaming pile that is the world’s most popular browser, Internet Explorer. While IE 7 has fixed some of the stupidity, there’s a lot of the universe that is still on IE6 (and a few on 5.5), and web developers have no choice but to deal with this. This free download from TredoSoft makes this easy and it works much better than other solutions.

10) PuTTY
This SSH/telnet client is indispensable for anyone that deals with Linux servers. And there is even a version for WM6 phones!

The High Cost of Cheap Hosting

We have a number of clients who regularly ignore our advice, usually to their detriment. The latest debacle involves a client who sought our advice on hosting. We told them to just spend the money to get a Rackspace dedicated server. We also told them that under no circumstances should they use a GoDaddy solution.

Naturally the client chose to use a GoDaddy Virtual Dedicated Server. After all it only costs $50 a month! That’s $250 per month less than Rackspace! And besides, we don’t need all that horsepower!

So they signed with GoDaddy, but not before we told them that we washed our hands of any server related issues. If we were called in to deal with an issue that was determined to be server related, they would be obligated to pay our full ad-hoc rate.

You can imagine my (lack of) surprise when I opened up my Gmail this morning to find panicked emails from the client. The site was behaving strangely. After a bit of snooping, I found that both PHP and MySQL were running out of memory…no great surprise since this great GoDaddy deal only came with 256MB of RAM and since this web application involves some very complex queries on some decent sized tables.

The client called GoDaddy to see if they could upgrade their RAM allocation to 512MB, which they can…provided they move to a different server.

Let’s run the numbers on this deal: I’m dinging them for $125/hour, not excluding taxes. They’ve already used about 6 hours of time this month on server related issues, not counting the two hours I spent this morning. The server move will probably take another 6 hours, especially if they ignore my advice (again) and refused to spend the money and migrate to Rackspace. That brings us to 14 hours, or just under $1900 with taxes. I know for a fact that their guys have spent about 20 hours (not just on this issue) trying to get the server to play nice…say their guys make $35 an hour, that’s about $700. The annualized cost of the server is $600.

That comes to $3200 invested into this server, they’ve not yet been up two months, and it’s been one thing after another with this GoDaddy Virtual POS. Rackspace would have come to $3600 per year.

I have several other clients on equivalent Rackspace platforms and guess what we’ve had to deal with for server issue? Zip, nil, nada, null. Factor in the incredible customer service that Rackspace provides, the ridiculous connection speed, easy scalability, managed backup and it should be an easy decision.

(I don’t work for or have any affiliation with Rackspace other than being an extremely happy client).

Viva La Vida

The project about which I posted in March was a cluster learning experience and is the reason I’ve neglected this blog for so long.  At some point here I’ll pontificate about what went wrong and how I can (or have) learned from it.

In the meantime, I’m going to try to be more consistent with this thing.  I even went so far as to set a reminder in my Google Calendar.

In unrelated news, The Steampunk Workshop is a really cool website.  I’ve never really been into the steampunk thing, but I could see myself getting into it. I like working with my hands and it would be fun to engage in some less cerebral activity.

Taskix

I just stumbled across the most marvelous little utility. And by “stumbled across” I mean I read about it in PC Magazine and wondered why I’d never Googled for such a thing:

http://taskix.robustit.com/

It allows you to move taskbar items in Windows XP. For example, I like to have Visual Studio 2005 always running in the far left, Firefox to the immediate right of that, and then whatever else. Pretty cool.

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…

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.

Would you use a .NET framework construct with Pure C++?

I would.

Let me explain…

After diving into the .NET world head-first over the last 4 months with C# in a pure .NET shop I must say my reticence towards embracing the core technology has faded somewhat. Well, ok, a lot. It *is* very productive. And the C# grammar has some very handy features I will allow.

But I still feel a bit dirty not cleaning up after myself (I detest GC at a fundamental level, it perverts a language enforced ctor/dtor element to the acquire/release model intrinsic to OO programming, but that’s a different post….) … but, alas, I love the .NET framework. It’s what MFC never was (or Ritchie forbid, ATL) - or any other monolithic framework designed to help with all the grungy bits of code we all know and hated in a pure Win32 world.

Anyone who has coded perfmon counters, version info blocks and anything network related along with a ton of cobbled together bizarre interfaces (raw com anyone?) that comprises the life of a low level win32 jock must agree immediately, or risk being discarded as disingenuous.

So I’ve brought this up to coworkers - fellow C# jockeys mind you - would you write pure (unsafe, *gasp*) C++ if you had a library as clean and elegant as the .NET framework?

I sure would.
…If for no other reason than sheer romanticism.