Updates – gone wrong

Using open source, and collaborated source is great. It’s a group effort, supporting a group cause.

There’s a downside though. What happens when a function in a module or application changes names in a version? Why change name? Well, unfortunately, it happened to me tonight, and it took a good bit of time to trace the culprit down.

What has happened is someone took the time to update the core files, sweet, unfortunately, they took the time to abbreviate a function to a shorter form of its name.

Here I am finding out why it won’t compile.. It’s all correct, code seems valid, but, the function called isn’t outputting anything. That function has been there for a fair while, why wouldn’t it be now? Anyway, I opened the source file, and dug around, and .. they shortened the word “string” to “str”.

Honestly, it wasn’t that big of a deal, but it’d have helped if they left an alias function, so it didn’t break other programs that made references to that function. It’s not that hard to do that either, for example

function old_functionname(vars here) {
new_functionanme(original vars);
}

function new_functionanme(vars here) {
//do exact operation
}

And that basically keeps all happy. The function can be updated, without worry, or breaking others programs! If you code for the open source community, or collaborate on a project, do others, and yourself a favour, don’t rename functions unless you have to, and if you do, alias the other function, unless the code has changed “THAT” much, that it’d likely break the application anyway, without the coder reviewing it. It saves us all time and unnecessary research. Those 3 characters cost me at least 20 minutes of debugging. Not funny.

This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *