Posts in category 'rants'

  • ColdFusion Tip Of The Day - CFCs Are *Objects*

    So I have the “pleasure” of working on a couple ColdFusion projects on the side. The thing about ColdFusion is it’s a lot like Perl: wonky syntax, often used by total amateurs, and can be horribly abused to do really bad things. And guess who primarily uses ColdFusion? Yeah… total amateurs.

    As a beautiful example, let’s consider the CFC, or ColdFusion Component. This concept was added to ColdFusion in order to add modularity and object orientation to what was, frankly, a largely procedural programming mish-mash. And it does a pretty good job:

    1. It provides mechanisms for encapsulation.
    2. It encourages code reuse.
    3. It encourages documentation.

    Well, assuming it wasn’t being used by amateurs. See, a CFC can, and should, be used like a real object. But let’s say you’re a dumbass who doesn’t understand object oriented programming. Well, in that case, you might do something really stupid, like use a CFC as just a container for a bunch of utility functions that are only loosely related. For example, you might do something stupid like:

    <cfcomponent output = "false">
      <cffunction name = "init" access = "public" returntype = "myType">
        <cfreturn this>
      </cffunction>
    
      <cffunction name = "firstThing" access = "public">
        <cfargument name = "Datasource" type = "string" required = "1" />
    
        ...
      </cffunction>
    
      <cffunction name = "secondThing" access = "public">
        <cfargument name = "Datasource" type = "string" required = "1" />
    
        ...
      </cffunction>
    
      <cffunction name = "thirdThing" access = "public">
        <cfargument name = "Datasource" type = "string" required = "1" />
    
        ...
      </cffunction>
    </cfcomponent>
    

    See, because this person is a moron, they don’t understand the concept of instance variables. A smart person would stuff the datasource into an instance variable, and populate it when the object is initialized. A complete moron would just pass the same parameters in over and over again because he or she is a god damned moron who shouldn’t be allowed near a computer, let alone permitted to program one.

    deep breath

    Bonus tip: Naming arguments to a function “table1”, “table2”, “table3”, etc, should resulting in the “developer” being dragged into the town square, tarred, and feathered.

  • Honeywell Wanted My Soul Today

    So I just had the weirdest salesman/door-to-door guy bother me. This wasn’t the usual hard sell thing, as I first expected. Instead, what they wanted to do was place a sign on our property to advertise Honeywell (specifically, their home security products), and in exchange they would pay us. How could I possibly say no?? Well, you see, the problem is I’m already pissed enough at the sheer ubiquity of advertising, and the last thing I wanted was my house to turn into a glorified billboard. Not to mention the fact that I think home security systems are largely overrated (it’s not like it would take more than ten minutes to break one of our windows and steal a bunch of valuables) and are nothing more than a way for companies to cash in on fear.

    So, unsurprisingly, I said “fuck that”… though in somewhat more polite language. But the best part was the guy’s reaction. “But… we’re gonna pay you.” he replied, as if the price of my soul, not to mention my values and dignity, were so easily purchased. He seemed genuinely puzzled, not to mention a little put off, that I didn’t want to become a Honeywell marketing tool.

    Well, to Mr. Marketing guy and to Honeywell, I say it again: fuck that. I already have to constantly put up with advertisements. Everytime I browse the web, turn on the TV (after I’ve already paid for cable), or go to the theatre (with a ticket I already paid for), I’m bathed in advertisements and product spots. Why would I want to pollute my nice little neighbourhood with even more?