When is a reversed string, not a reversed string?

reverseThe .NET framework has a lot classes, with a lot of methods. So many in fact that when certain, obvious ones are missing, it’s a puzzle as to why. One such missing feature is a Reverse method for strings. Taking a collection of characters and reversing them is easy; so why is it missing?

As I wanted such a method, and didn’t want to burden the library I was writing with a disconnected feature, I created the ReversedString nuget package, which supplied it. Job done. Still, why isn’t it included in the standard framework? Experimenting with tests led me to a possible reason. Continue reading “When is a reversed string, not a reversed string?”

AS3 static inheritance: developers beware! (revisited)

A while ago I wrote an article on the oddities of AS3 with regards to its lack of static inheritance. As part of my AS4 proposals series, I started writing a proposal for introducing static inheritance to AS4. In the process of writing it, I delved deeper into this topic and found that AS3 static inheritance is a truly strange beast indeed. It can be summed up neatly (though probably confusingly) as “for a class B that inherits from a class A, public static methods of A are inherited as protected static methods (which cannot be overridden) by class B” Continue reading “AS3 static inheritance: developers beware! (revisited)”

I hate arrogant software!

Most people will be familiar with dialogues that prompt you with something like “Are you sure you want to be that stupid?” They rarely put it so bluntly, but that is effectively what they are asking. I have no problem with such prompts, because either I am about to do something stupid and its good to be told so, or I know better than the software and so I gladly accept full responsibilities for the resulting action.

There is a class of dialogue though that really riles me: the sort that says “You cannot do that”. Continue reading “I hate arrogant software!”

DIY geek jokes on tea/ coffee mugs: Mug<T> arrives

Mug of teaOne of my weaknesses in life is a love of (well really a need for) a constant feed of tea throughout the day. As such, the mug from which I drink that tea is important to me: it needs to be big (saves on too many trips to the kitchen) and I like it to be personal to me in some way. Around a year ago, the Daily WTF website started selling a big mug carrying their logo. It was perfect and thus started my geek mug collection.  Soon after I received a free .NET Rocks mug in lieu of an email I’d sent to the show. It was the same large size as the Daily WTF mug. I don’t think the email every got read out, though I’ve missed some shows in the last year, so may have missed it. My mug collection stood at two, and there it remained for the next year.

Recently I came across the website of the company that I think makes both the the mugs I have: zazzle.com. They offer a great way of designing your own one-off mugs. For some time I’ve wanted a mug I’d seen with Cup<T> (which reads as “cup of T” – it’s a generics thing) and this seemed the ideal way of getting one. I could even “fix” it to a more pedantic Mug<T>. There was one problem: Zazzle UK charge a hefty fee in Britain for their mugs and worse, they charge a piss-taking amount for postage. They are great if you live in the USA, as they charge less than £10 if you don’t mind slow delivery. Here though, they wanted a minimum of £7 just to deliver the thing, on top of the £13 for the mug itself. £20 for a mug with a seriously geeky joke on it? I tried contacting Zazzle to point out how insane their postage charges were, and got a generic “thanks for your enquiry about our new P&P prices” response. I doubt a human had even bothered to read my email, so no joy there. So the idea died a death.

A couple of weeks back, I mentioned the matter on Twitter, and as a result, I got a recommendation for a cheaper – much much cheaper, ie nearly half Zazzle’s price – company here in Britain that could also do such mugs for just £11 including P&P. A special thanks to @Graham White for finding the company- Focus Prints – for me by the way, as I’d failed to find them myself. So I whipped up the simple graphic I needed:

Mug with CSS is Awesome upon it. Visual joke.

The problem is, whoever came up with this idea gets money every time someone buys the mug from Zazzle. As zazzle are way too expensive, I’ll not use them. I have no way of paying the copyright owner if I get it made elsewhere. I’ve yet to resolve this ethical conundrum.

Flex Builder is dead. Long live Flash Builder

flashbuilderLast Friday, Adobe announced that Flex Builder 4 will actually be called Flash Builder. As many folk use Flex Builder to create non-Flex SWFs, it does make sense. Remember Flex is little more than just a bunch of ActionScript classes after all, so Adobe could well have been limiting sales of Flex Builder with its old name.

What seems odd though is that there seem to be no plans to rename the Flex SDK at the same time. The Flex SDK is equally inappropriately named as it contains all of the core Flash classes, the compiler, ASDoc generator etc, as well as the Flex classes. Also without a change to the Flash Pro designer tool, confusion will continue to reign as Adobe will have two products called Flash Pro and Flash Builder Pro respectively. Such a half-baked name change smacks of some poorly thought-out marketing decision at too low a level within the company.

Another oddity of the name change is with regard to trademarks. According to the Adobe website, the fully qualified name of Flex Builder is the ridiculously cumbersome Adobe® Flex® Builder™. Presumably Adobe will try to slap a trademark on Flash Builder too. I’m no lawyer, so may be wrong here, but I suspect that as existing products using the name Flash Builder have been around for years, the TM on Adobe’s Flash Builder will mean little more than “Totally Meaningless”. See a4desk.com and the flashbuilder tool on tucows for example. Third party software houses will presumably therefore be free to use the term in their products too. Given how anal Adobe normally are over trademarks, I’m surprised at the name choice therefore.

Stack Overflow isn’t just a software Q & A site

Back in the days when Commodore were able to advertise 64K of memory as being synonymous with the large memory of an elephant, stack overflow errors were common. With limited memory, only a small amount could be spared for the stack, and a series of function calls could easily fill it up.

These days, when computers have 5-6 orders of magnitude more memory, the concept of a stack overflow has been relegated to an in-joke name for an excellent developer Q & A site. I was therefore more than a little surprised when a Flex app produced the following stack trace:

Scrolling down through the stack trace, everything that came after what I’ve copied above was just many references to the one method. I’d written a recursive method who’s test for the end of the recurse would always fail, so it had gone into an “infinite loop”. It just goes to show, no matter how much memory you have, a run-away recursive method will always run out of stack space. Stack overflow errors still exist, they are simply hidden away from all but sloopy recursion junkies… 🙂

WTF: BBC have a “no news day”

You have probably heard of “slow news days” (generally marked by the news channels on the TV having to show happy stories), but the BBC website today was havign a case of a “no news day”:

BBC home page with blank news
BBC home page with blank news

Look closely at the News section on the left, it looks like this:

Where's the news gone?
Where's the news gone?

A case of cost cutting in the present gloomy economic climate perhaps? 😉

How to block the automatic installation of IE8

no-to-ieMicrosoft have announced that IE8 will be released as a priority update via the Windows update service, which means that – unless you only do manual updates – you’ll get it when Microsoft want, rather than when you want. Fear not though, for in these weird times we live in, Microsoft have gone and done something sensible for once: they’ve offered a simple, official, mechanism for preventing it being automatically installed. For the average – non technical – user, the process will be automatic. This is a good thing. For technically savvy users, the avoidance route is simple, and the option remains to manually upgrade when ready. This too is a good thing.

If you want to take control of the update of IE on your machine:

  1. Download the installer exe.
  2. Run the installer and extract the command to a suitable folder.
  3. Start a cmd window, cd to your chosen folder and type:

If you later change your mind, either find it is the optional updates via Windows Update, or start a cmd window once more, cd to your chosen folder and type:

See the download page and FAQ for all the gory details of the affected register key etc if you want to know more.

Apple on apple: what you get when you cross an Apple fan boy with an orchard of apples

Demonstrating that the devotion of Apple fan boys to all things Apple, one japanese fanboy has achieved the ultimate in devotion: Apple branded apples.

Apple branded apples
Apple branded apples

The orchard owner apparently stuck various Apple stickers on his fruit whilst they were still green and unripe. The sun then rippened the fruit, save for the covered bits. When harvested, and the stickers were removed, he had himself a box of fruit bearing the Apple (and iPod) logos:

Box of Apple-branded apples
Box of Apple-branded apples

I guess this proves there really is no limit to the madness of the Apple fanboy…