November 05, 2009

What do you use Google Street View for?

My friends and I were planning a trip to New York. We were looking to rent an apartment for the week and one of our criteria was for it to have parking nearby. So while I went ahead and started emailing apartment owners asking them whether there was parking available, my friend looked up the addresses in Google Maps, switched to Street View and read the parking signs. Smart girl.

I'm curious, do you use Google Street View often and if yes, how or what for?

November 03, 2009

Make "Reply to all" default in GMail

A friend got tired of me ranting about how it vexes me that the 'Reply to all' action is poorly accessible (a whole 2 clicks away!) in GMail. She advised me to look in GMail -> Settings -> Labs and enable the Default 'Reply to all' feature. That helps, but only at the expense of the 'Reply' action.

I looked for the Forward email from 'Inbox' view feature but couldn't find it.

Oh well, can't have'em all.

October 18, 2009

Software Development Engineer positions at Microsoft in Ireland

My group within Microsoft Ireland is hiring! You can check out the list of available Dublin-based positions on our Join Microsoft Europe website.

At the time of me writing this, we have positions in the areas of mobile services, advanced data visualizations and cloud infrastructure.

Contact me at vlad.cananau@microsoft.com if you're interested.

May 28, 2009

Not sure? Bing it!

Today, at the D7 conference in the US, CEO Steve Ballmer announced Bing, Microsoft's new search engine, in a bid to change the way we search online. Bing was designed to be a decision engine, and a step forward from information search towards knowledge search.

www.bing.com will go live next week, in a market ~60% owned by Google. It's like David versus Goliath all over again, except David has a rumoured $80 million marketing budget and Goliath is the beloved of the people. Of the utmost symbolic significance, of course, bing rhymes with sling.

The world of online search has definitely become a lot more exciting this spring, with the recent launch of Wolfram|Alpha and the announcing of Bing. I'm anxious to see how this will ripple across the world wide web and how long it will take Google to react. Right now the ball is in Microsoft's court.

May 23, 2009

Felicitări, Adi Buzgar şi Călin Juravle!

Adrian Buzgar, Călin Juravle si Andreas Resios s-au calificat în finala probei regină a Imagine Cup, Software Design! Ei vor reprezenta România, Iaşul şi Universitatea Alexandru Ioan Cuza în finala de la Cairo (click pentru detalii şi poze). Felicitări şi respect, băieţi! Mult succes în finală!

GREAT SUCCESS!

May 15, 2009

Again* on overriding Object.GetHashCode()

Overriding Object.GetHashCode can rightfully be regarded as one of the more mundane tasks in .NET programming and indeed, often enough, when your own application is the only consumer of your code, you might as well return 42 (don't do it, though!).

However, if you're writing reusable components or if you're implementing types that you plan to use as keys in an IDictionary, you are required to provide (at the very least) a decent hash function implementation.

The hashing algorithm advocated by Joshua Bloch in his Effective Java is widely regarded as a good enough algorithm for most circumstances (think non performance critical). It's also very easy to implement, as per the sketch below:

  1. choose a non zero initial value and store it in a variable h
  2. choose an odd prime multiplier and store it in variable m
  3. for each relevant member field f (also used in evaluating this.Equals) do: h = h * m + f.GetHashCode()
  4. return h as the hash code
One thing I would recommend is encapsulating this into a utility method (or class, depending on the degree of API flexibility you want) for ease of reuse. The second (and I know I'm being somewhat pedantic) is surrounding the arithmetic operations in an unchecked block. Arithmetic overflow is bound to happen (and that's fine), but even if by default operations involving variables (unlike constants) are implicitly executed in an unchecked context, you can never be sure that the client code doesn't call your GetHashCode inside an explicit checked block, exposing itself to an unwanted OverflowException.

* No, my role in the team is not to implement Equals and GetHashCode all across our codebase :)

May 09, 2009

Never mind the bollocks, design upfront!

In a recent blog post, Robert Martin (aka Uncle Bob), one of the leading figures of the world of agile software development, tackles a widely circulated agile myth: up-front design is evil.

I must admit that I haven't read literature on agile and that my team is rather struggling to function in a somewhat agile manner, so I'm far from being savvy. But I have heard people who claimed they were, say things like "you should evolve your design from nothing, one test-case at a time". Like Bob Martin, I too associate that with a certain solid-hoofed herbivorous quadruped's digested waste material.

In his post, Martin explains that the real agile principle is to avoid Big Design Upfront, not any design upfront. He criticizes the zealotry that turned a solid agile principle into a dangerous myth and argues that a Little Design Upfront is essential, and that we shouldn't be afraid to scale "Little" proportionally to the complexity of the project.

So how do we design upfront and still keep ourselves agile and resilient to requirements change? I believe there's at least one simple question to which if our design can answer, there's a high chance that we're on the right track: "How will I test this?".

April 21, 2009

Studiu privind salariile din IT-ul românesc pe Joobs.ro

Cu vreun an înainte să termin Facultatea de Informatică din Iaşi, am început să mă gândesc la inevitabilele negocieri de salariu de după interviurile pentru slujbe - interviuri pe care, evident, urma sa le trec "vâjâind ca vijelia" :)

Ca să-mi fac o idee despre piaţă, am întrebat în stânga şi în dreapta ce salarii au amicii mei programatori. Ei bine, am primit un număr impresionant de ... 0 (zero) răspunsuri. Unii au dat din colţ în colţ, alţii au refuzat orice fel de discuţie în legătură cu subiectul. Am încercat să pun problema altfel, întrebându-i la ce sumă cred ei că ar trebui să ţintesc. Am obţinut un succes la fel de răsunător. Plutea în aer o senzaţie ciudată de secretomanie amestecată cu paranoia (unele din persoanele cu care am încercat să discut nu voiau să-mi spună nici cât plătesc chirie sau leasing pentru maşină, ca nu cumva să-mi fac o impresie despre salariul lor ... O.o). Şi, gândiţi-vă, pe atunci economia încă nu era în criză!

Joobs.ro încearcă zilele astea să realizeze un studiu care pentru mine vine prea târziu, dar pentru care le-aş fi făcut cinste cu o navetă de bere înainte să plec în Irlanda. Studiul urmăreşte să ilustreze nivelul salariilor IT din România. Puteţi participa fără să fie nevoie să vă autentificaţi, prin completarea unui chestionar cu 5 întrebări - lucru care probabil vă va lua mai puţin timp decât v-a luat citirea acestui post.

April 20, 2009

First update to the mobile device browser file!

We've released the first update to the mobile device browser file that I was talking about in a previous post. We've added support for nearly 100 more devices and for the canInitiateVoiceCall capability.

You can download the file and see the release notes here.

April 17, 2009

How do you design exception handling?

A while ago I took over an internal tool with the task of turning it into a reusable component and enhancing it with new features. Given that it had been conceived as a command-line tool to be used only by the other developers in the team, the author of the code had a very simple exception handling policy: let'em all bubble up until they splash at the console - the user will know what to do.

So I rolled my sleeves up and started writing exception handling, and I was struck at how much grief it gave me. I knew the guidelines, I knew the recommendations, I knew the practices, but when I got down to the nitty gritty, it still felt on-the-fly, I still had the feeling that I wasn't doing it right, that it wasn't robust enough.

Last week I attended a 4-day training session on Design Patterns with Alan Shalloway, main author of Design patterns explained. The ~20 hours of training were very good, but as they were drawing to an end, I realised that not once had he mentioned exception and error handling. Alan did seem intimately familiar with the literature on design patterns and object orientation however, so I thought he would be the perfect person to ask: "How can I learn about designing exception handling? Has anybody written about that?".

But when he answered that he didn't quite know, I started thinking that exception handling design is an undeserving neglected topic. And the more I thought about, the more evidence I found. Think about it, how many times did you write a design document that included a section on exception handling? How many times did you design an interface and put serious thought into defining a set of exceptions for implementors to throw in a consistent manner?

How about it, then? Have you learned or worked out any design patterns for exception handling? I mean something more cohesive than your usual set of "do this / don't do that" guidelines, something reusable at design time rather than at implementation time. I'd very much like to hear from you on this subject.