FizzBuzz Rethink

Or maybe overthink would be more appropriate….

[UPDATE] I’ve written a followup about why an over-thought solution like the one proposed here can be / is a good thing. And just to be blazingly, obviously, painfully clear on the matter. I do not think that every problem should be over-thought to the degree I took this. My solution represents a crazy amount of code for such a small problem. It’s intended as an example of how I’d mentally approach a real and complex problem presented by a client.


Why you should learn toki pona

If any of the following are true you should learn Toki Pona:

  • You want to learn a language, but you don’t have time.
  • You want to learn a language, but you don’t have anyone to speak it with.
  • There are things you wish to say to your friends in public (or in the workplace) without other people knowing what you’re saying.

“Toki Pona is a minimal language that focuses on the good things in life. It has been designed to express the most, using the least. The entire language has only 14 basic sounds and 118 words. The grammar, although different from English, is very regular and easy to learn.”


Why you should be using a distributed source control system

I was reading some articles yesterday that finally made the light bulb go off about distributed source control management (scm) and why we should be using them. First off, a distributed scm, unlike CVS or Subversion, has no central repository that all others pull from. It’s possible to set one up and say that it’s the master and tell people to pull from and push to it but that’s more a matter of convention. What’s truly unique about these systems is that each checkout is it’s own self-contained ecosystem. And there are many reasons this is a good thing:


The niftiest little Rails plugin you never heard of

Back in January of 2006 Ezra Zygmuntowicz came up with an exceptionally cool Rails plugin that, IMNSHO, should be in rails core. It’s called ez_where and it’s svn repo is here.

What’s so cool about ez_where? Well, the to really understand it’s beauty you have to step back to one of core concepts that’s at the heart of frameworks like Rails: Database Abstraction and Object Relational Mappings. Before these concepts really came into their own we were all writing raw SQL commands in our apps. Now we interact with a layer of abstraction that lets us work with the objects we’re actually programming with instead of database structures. Except, that’s not quite true with Rails. With rails you end up writing things that are possibly more complex than the SQL statements we’ve been trying to avoid. Here’s a particularly egregious example from a ticket system I’ve been working on:


On DRM

When it comes to DRM “protected” music people tend to be either completely ignorant as to how it affects them, or even that it affects them, or they’re religious zealots who have such extreme viewpoints you can’t have a sensible discussion about the issue.

But there’s one simple exercise that will explain just how dangerous DRM is to you and your friends:

  • What computers were people using ten years ago?
  • Can you run the software from those computers on your current computer? Does anyone even support or update the software from then? Would you want it even if they did?
    Macs were running OS 7 in 1996. Windows was Win 95.
  • Considering that Moore’s Law essentially says that computers will double in power every 18 months do you really think that the computers we have ten years from now will even remotely resemble the ones we have today?

With that in mind what will become of the DRM “protected” music you buy today from iTunes, or almost any other online music store, if the software to decrypt it can be reasonably expected no neither be supported, nor runnable in ten years?


Select Gifts On Sale

Select Gifts On Sale

Those were the words prominently displayed in the window of a Pier 1 Imports today, and they are so very wrong.

  • Gift: [n] something acquired without compensation
    If it’s on sale, you have to purchase it to get it. If you have to purchase it to get it it’s not a gift.
  • In this sentence “Select” reads as a verb, and you can rest assured that they don’t want you to actually select the sale items because the sale items are the ones they’ve cut the profit margin on to entice you into the store to hopefully buy items that are not on sale. Ignoring the fact that the “Gifts” aren’t actually gifts they should either use quotes to indicate that someone has referred to these gifts as “select” and thus making it clear it’s an adjective, or they could have used “selected gifts” instead.

Yes you can easily interpret what they meant to say but the point is that you shouldn’t have to interpret their meaning. The people who made that signage (actually it was a static window decal) are being paid good money to construct English promotional material. Were I their employer I would feel gypped to think that my employees a) couldn’t correctly construct a four word sentence and b) not one person in all the meetings that this surely went through was bright enough to catch these obvious errors.


On Warranties and Guarantees

Your warranty / guarantee says a lot about you and your products and shouldn’t be considered some legal thing to what you will and won’t reimburse the customer for when things go wrong.

Your company sells quality products or services right? Shouldn’t you stand behind them as if they were as good as you claim they are?

Let me give you an example. I’m looking for a new messenger bag because my current one has two holes and is starting to break down in other areas. I want something nice, that will last me a more than just four years and I’d narrowed down my search to two bags. The Ogio Hip Hop (in spite of the name) and the Ground Shinumo. I was having trouble deciding between them. The Ogio had pictures of the inside (on various sites) that looked like what I wanted but no reviews and the Ground had great reviews but no pictures of the inside. They both claimed to be durable and to use uber-fancy materials to resist wear, but every bag that isn’t pure crap claims that.


On having a mission

The cranium of a good developer is filled with ideas for new applications. Most of them tend to bounce around with little energy and eventually succumb to entropy. Some ideas are made out of bouncier stuff and eventually reach escape velocity, at which point they are launched down the arms and funneled out the fingertips. You can tell just how cool an idea is by the speed of typing relative to the developers average words per minute.


XML-RPC vs SOAP

Update: This article was written years ago, however, the information still holds true. What I would note is that these days both XML-RPC and SOAP have excellent libraries which makes working with both fairly simple. This article is about the capabilities of the two technologies, however, in my experience the question is no longer one of capabilities. It’s a question of which one you need to talk to, or which one your framework has baked in. In most cases the answer is SOAP. However, if you’re considering writing your own API, my recommendation would be to seriously consider using XML-RPC. It’s far less complicated and bloated, and the combination will make your debugging efforts much easier in my not so humble opinion.


Financial Entropy of a Webapp Subscriber

image

I was consumed with dreams about Stephen Hawking’s black hole entropy formula last night, which is frustrating because the math is, sadly, beyond me. But, I mention it to you today because, knowing so little about black holes my mind instead kept trying to change it into an formula to calculate the Financial Entropy of a webapp subscriber.

So, I put it to you, dear reader, have you, or any of your math enabled friends, come up with a formula for calculating the finincial entropy of a webapp subscriber? If you haven’t, but you could, there are many many entrepreneurs who would sing your praises and happily buy you a drink.