Development General Internet/Links

Pet peeves being addressed

A while ago I posted about one of my Pet Peeves (Microsoft announces CD’s that you can order online, but only after you go online do you find out that you can’t get them shipped to South Africa)… Shortly after that the South African version of the MSDN Flash they announced that you could order the CD’s that I was looking for, and they’d ship them to South Africa for a small (around R35?) fee which was great.

With XP SP2, I was wondering how the heck I would get my home PC updated since I’ve just moved and I don’t have a phone line in the new place yet (and it will probably take over a month to get one installed)… On Friday I was browsing Microsoft South Africa’s site and I noticed a press release entitled “Windows XP Service Pack 2: Fact Sheet” which kinda hides the exciting content a bits, which say “Microsoft South Africa would like to encourage users to order a free copy of the Windows XP SP2 CD from its local call centre (0860 2255 67) and from mid-September CDs can be collected from Makro; Incredible Connection; Game; Dion and CNA – free of charge”!

This morning I saw that Matt Hausmann blogged about it, so I thought I should too. 🙂

And once I’ve put my PC back together I’ll be giving Microsoft a call.


Moving and GMail

A quick update… I’ve just moved house, and this morning I notice that I have 5 GMail invites to give away…

I noticed that Rory’s got a list of GMail Invites going, so you can leave a comment here if you want an invite and if mine run out, just pop over to Rory’s blog to find out where you can get more… Looks like Google’s been busy handing out invites this week. 🙂

[Update: All of my GMail invites have been used up… I’ll post a new blog entry should I be given any more…]



So, I was walking back to the office today after sitting in a coffee shop drinking a Seattle Coffee Company Grandé Caramel Chocolate Latté with cream (v.v.v. nice) and looking over a magazine wondering if I should get my hopes up that I’ll be able to get a Motorola MPX220 when I’m able to upgrade my phone on my Vodacom contract expires.

When [OH MY WORD, I was just looking up the domain for Seattle Coffee Company so I could put a link there when I found THIS news from like over a year ago saying that Starbucks bought Seattle Coffee Company, which is like super awesome because maybe we’ll actually get a Starbucks in good old South Africa (BTW, when are we South Africans going to get ownership of our .COM domain)… Anyway, I really hope we get one here – I’ll be their biggest fan. :-)] …. Ok where was I?

So I was on the way back to the office when I got asked very politely by a guy sitting on the pavement for some money… Now having grown up in the huge metropolis (NOT!) of Grahamstown, where the non-beggar to beggar ratio is about 1:5 I’ve kinda got quite used to saying “Sorry” and just walking on ignoring their pleas.  But today it struck me… I know that probably 9 out of 10 of these people actually are “fakes” who just beg because its easier than working and its good money. (Non south african’s might not understand that, but some of the beggars here earn probably more than most varsity leavers would)  BUT – lets just say that 1 out of the 10 is genuine… How do you help that 1 genuine case?  What help is really available for them?

Its like bus schedules in JHB, they must exist somewhere but where they are is definately NOT advertised…  I couldn’t tell you if our busses even have regular routes, because I’ve never seen a bus shelter with a route map on it. (Which would be the obvious place to put them IMHO)

So how would someone whose out of a job, got no money, no home, and no food get to hear about shelters, feeding schemes, or work placement facilities?  Do they even exist? 

Any pointers would be great… I’d rather give beggars a helping hand than get them “hooked” on handouts… at least that’s what I think I’d want someone to do for me if I was in the same situation.  I just don’t know where I’d start.



Hrm, I got an e-mail from a recruiter today… Pitty it wasn’t Gretchen or Zoë from the JobsBlog over at Microsoft – coz I’d not only like to meet them, but I’d love to work at MS too ;-). But the lady seemed quite nice and I’m fairly impressed that she found my contact details since they’re not listed on any of the local recruitment sites at the moment, so maybe she’s also a “net age recruiter” like Gretchen and Zoë… (If you’re wondering what I’m on about, read their blog – I did and saw a VERY different approach to recruitment. One that I really like)

Anyway, back to the point of the post… I’m fairly thankful to Gretchen and Zoë for some of their advice because it let me respond nicely to the recruiter as opposed to the “Who are you? Where did you get my e-mail from? And please don’t bother me again because I’m happy where I am” type of e-mail I might otherwise have sent.

So if you are (or anyone you of know is) looking for a short term contract doing C# based web development in Sandton for what sounds like a reputable company (I don’t know their name but they’re a Microsoft Gold Partner) let me know, and I’ll put you in touch with the lady recruiting for the job.

.Net Stuff Development Geek food

Q: When is 1 not equal to 1?

A: When you’re using .Net and boxed value types.

“What?? No, you’re wrong.  Its not possible – you must be using the framework incorrectly.”

That’s what I would have said, but I’m not so sure after having to fix our little problem at work this morning.

We have a function that takes 2 object parameters:
public bool myFunction(object left, object right))
Which tries a whole bunch of things and if non of them works, it returns:

The problem is as follows:

Int32 i32 = 1;
Int64 i64 = 1;
bool result = i32 == i64;
// outputs TRUE – expected
object o32 = i32;
object o64 = i64;
result = o32 == o64;
// outputs FALSE – expected
// This is expected since it would do a reference comparison BUT
result = i32.Equals(i64);
// outputs FALSE – not expected
// It does it because i64’s type is not the same as i32’s type
// The same goes for result = i64.Equals(i32).
// And also for result = o32.Equals(o64);

Now the question remains – how on earth do I get this code to work?  Currently I’ve written my own IsEqualTo(object left, object right) function which finds out which of the numeric types each object is and casts the left and right parameters to the most suitable types before it does the comparrison so that it works correctly… I’ll upload a ZIP with a sample solution in it that demonstrates the solution, but if you know of a better way to write the code (keeping in mind that it needs to be generic enough to handle any type variables that are passed in), please let me know…