Subclass this

In object-oriented languages there’s a nifty feature called code inheritance. People tend to think that this is a really cool ™ thing, since it allows you to quickly slab some new features onto a class whenever the need arises. In fact, there still seems to be a lot of folks who think that the whole point of object-orientation is to subclass a lot.

I’ve previously worked with Microsoft MFC, which was designed that way (but remember, that was back 1992) – as was the class hierarchy that makes your Unreal Tournament tick. I’ve seen object hierarchies spreading over 15 levels, and more.

The only problem with code written that way is that it sucks. A lot.

Continue reading “Subclass this”

Advertisements

It’s so 1999 again…

I just went over to GitHub to comment on a ticket. I wanted to put an URL in the comment. No problem, usually all those comment boxes have a help function nearby, that explains you how the markup works.

GitHub has a link next to the comment box that says “Parsed with GitHub Flavored Markdown“. When you click it, you end up on a page that tells you how their flavour is different from the standard one and then…

Continue reading “It’s so 1999 again…”

Law and morality

While I don’t usually bother too much with television, I’ve used an open source software called “TV Browser” for a while. It’s a nice little piece of software, giving you a electronic program guide right on your desktop.

This week, we were checking out the Italian TV (which can be quite odd, but that’s another story). The point is that the TV Browser doesn’t contain any Italian channels. To my astonishment I also discovered that, by design, the software doesn’t support importing the quite common XMLTV format.

The reason (according to the developers) is that some of the “grabber” scripts included in XMLTV may not be legal to use in some jurisdictions. Thus the origin of some xmltv data files might be questionable. Thus the TV Browser people don’t provide any generic support for the XMLTV data format. Because, possibly, maybe, could it be used by some people to view “illegal” data.

It pisses me off to no end, and not only for selfish reasons.

Continue reading “Law and morality”

The curse of blogs and vidcasts

It drives me crazy: Lot’s of those projects, especially in the Rails world think it’s a cool thing to have a “project” homepage that consists of a blog garnished with some video podcasts. But while this may look flashy, it’s not an excuse for a complete absence of structure and documentation.

I have to admit that what put me over the top today was the ruby-debug “home page”. It’s really a great tool that I use daily, but each time I visit this page I’m on the edge.

First thing, it’s a blog. I hate it. A blog is for news, but when I go to this page I want documentation. Yes, there is this little tutorial. If it’s not accidentally linked from a post on the front page I have to dig through all the “ruby-debug” posts to find it. At least it explains all the commands in the debugger, but it doesn’t go into the API to call the debugger from your code.

In the end, what would be so hard to put your documentation on a static page page that is linked from the front page? And maybe – behold – even add a link to the rdoc documentation that you can automatically generate from you code?

Continue reading “The curse of blogs and vidcasts”

The Rails Cult from the outside

When I was back for the new year, I (of course) noticed Zed Shaw’s rant about the Rails community. Even the Italian Rails mailing list opened a little thread about it. It seems that the man really had to vent.

Zed is opinionated, and he’s got some balls – which is actually why I contacted him for the Rails to Italy keynote in the first place. After meeting him in person I have to say that he’s a really friendly guy and was fun to have around.

I kind of enjoyed the rant because, hey, it was fun. Maybe that’s me; I also enjoy Gordon Ramsay’s shows because of all the cussing and cursing.

Still, it’s a bit like all this “Emacs vs. Vi” and “Linus vs. Richard” stuff, which is only really interesting to the people involved and some fanboys. If I’d tell my old boss (an excellent coder) that Zed Shaw hates Kevin Clark’s butt, he’d stare at me blankly.

But Zed’s rant addresses some “deeper” points, which get lost a bit.

I’ve been watching the “Rails community” as a newcomer and a kind of an outsider, and as someone who has no big stakes in the whole thing. And other than Zed, I’d not say that Rails is a ghetto. At times it feels more like a cult.

Email etiquette

I kind of stumbled onto a discussion about HTML email formatting. Obviously Microsoft has chosen to use a crappier rendering engine in the new versions of Outlook. How touching.

Fact is, completely disabling the HTML rendering is one of the first things I do when setting up my email client. One thing is that it takes the air out of 99% of all the phishing/spam/trojan/whatever mails you receive.

Second, and more importantly, to this date I have never ever received an email that added any significant value to the content by using HTML. Really, there are only two uses I’ve ever seen: a) “Cool” Outlook templates used by hapless people and b) marketing mail made posher by HTML.

Now, I don’t mind anyone sending me pimped email, as long as they have the courtesy to include a readable plain-text version. It shouldn’t be too hard, really.

Worst offender so far: The “social networking” people from Facebook. Every single email from them looks like this to me:

This message contains a rich-text HTML portion. Consult your mail client’s documentation for infomation on how to view it.

And of course it contains only one single sentence and a hyperlink. Close second is actually eBay – their text-only version is a convoluted mess. But to be honest even the HTML versions of their things tend to be badly laid out and nearly unreadable.

Last candidate on today’s list of email offenders is Hotspot company The Cloud. After using one of their WiFi hotspots, they are hell-bent on sending me their newsletter. They did include a plain text version – what they didn’t do is to provide any information on why they’re sending me their stuff or how to unsubscribe.

Email communication is quite essential in today’s business world. And people hate dealing with crap in their inbox, simply because there’s so much of it.

So it’s even more stunning that there are companies out there who still don’t know the most basic of rules.

Adding methods at runtime

One of the things that seems to draw people to Ruby is the ability to create and change all things at metprogrammatically at runtime. This in turn allows users to create things like domain-specific languages and the like.

I’m possibly overusing these features at the moment, because it’s a cool new thing ™.

So, let’s see how to add methods at runtime. Since this is Ruby, there are multiple ways to do this, making things more confusing.

(See also the follow-up article)

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: