I recently gave a short talk at the last Microsoft Health and Life Sciences 2009 developer conference in New York. The main theme was architecting health solutions in the cloud and challenges that come with it. You can watch the talk here.
9 Feb
How to ensure code quality: THINK
There is a heated argument going on between Uncle Bob (Robert Martin) and Joel Spolsky (joined by Jeff Atwood). To recap some of the arguments, in a stackoverflow podcast Joel and Jeff undermined the value of using SOLID principles and things like TDD. Uncle Bob wrote a pretty strong blog post in response to the podcast. Although quite entertaining to read, something struck me really hard while I was going through the comments that are left on Uncle Bob’s blog. The comments on both sides were turning the discussion into a flame war on how to write good quality code. Using TDD or SOLID principles or not? Is testing needed or is it a waste of time?
It’s sort of interesting to see a slew of people with engineering or computer science backgrounds fighting religiously over one methodology over the other. One thing that stood out was how no one ever took a second to think what they were so frivolously defending. On one side there is a successful small business owner, ex-Microsofter, a geek world publicity on the other side there’s Uncle Bob who co-wrote the agile manifesto.
It is somehow assumed that people who are good at one thing should be naturally good at everything else. Following this assumption religiously can get anyone to narrow their horizon to the point where it might not be possible to realize that they are looking at the world through a needle hole. While it’s perfectly reasonable to get advice from Joel on how to start a small business, everything else he says should be taken with a grain of salt. After all, the blog and BOS Forum is there to create traffic and increase visibility of the FogCreek web site. Uncle Bob on the other hand is still a day to day developer, and in one of his blog posts he mentions the fact that he lets the experts do their job (he refers to them as business types doing their business thing) so he can concentrate on what he knows best; to write good OO code.
While SOLID principles are something that I personally love and try to follow every day, no one argues that those are the only principles that lead to perfect, clean implementations.
Developers using methodologies TDD, DDD, BDD UNIX or Windows platforms, functional or oo languages have only one thing in common that they have to do to write good code; THINK. Regardless of what three letter acronym you religiously follow, if you don’t think about what you’re doing you are destined to fail, through your chosen methodology’s fast route.
So what should you think about when writing good code? My list is pretty simple:
- Do you clearly understand what you’re trying to achieve? Make sure you understand the problem you’re trying to solve by asking questions, reading that business requirement for a second time or just Google the problem domain!
- Break it down. There’s a reason your college professor kept telling you this. Break down your problem into pieces that you can actually solve with 10-15 line methods each.
- Verify the solution to each before moving to the next piece, mock if necessary: If the multi-step process requires interaction between the steps, don’t be afraid to mock it! You can check out Moq, RhinoMocks or TypeMock
- Make sure that future enhancements won’t involve modification of existing code. (Check out the open/close principle article on wikipedia for more information on this)
- Test for boundary conditions and see where your reasoning fails.
- Repeat 1-5, cleanse and ship.
Following a simple sanity check like the one above, will save you lots of frustrated hours in front of the computer. You can use the extra time to actually reason about higher level problems than simple implementation details.
Note: if you are developing any sort of framework, scratch anything that I mentioned above. Almost NONE of the points in application development apply to framework development. A great deal of care and planning must go into framework development that cannot be covered with a simple bullet list. I strongly suggest using Framework Design Guidelines as a sanity check tool.
4 Jan
New Year’s Resolution: 1680×1050
I finally made the switch and got myself a mac. It’s more along the lines of I had to, in order to do some iPhone development, and probably will not be my main machine. Touching a mac for development purposes for the first time was a big shift. Stepping outside the Visual Studio and .NET was not quite comfortable. I say it wasn’t because I have to admit as much as I didn’t want to go closer to C from C#, objective-C is a whole different world, and at the end of the day it ain’t that bad.
Having worked with .NET for a long time, I am very accustomed to how things are grouped in .NET. All in all I think it’s still the best framework out there. However, the more I read about Mac development, more I liked certain things about how the framework is layred.
At the same time the OOP interperation of Apple — or NeXT in this case, since can clearly see the NeXT residue in objective-C by looking at the NS prefixes– is quite differen than of Microsoft’s. Some of the things I quite like are:
- Message dispatch
- All-heap allocation
- Dynamic runtime
- Anonymous objects
I’ve always been a proponent of statically typed languages, especially C#, and I still am. Even VB has always felt weird to me despite the fact that it runs on the same framework. In the 36 hours that I spent with objective-C however, things felt pretty intuitive and didn’t bother me much. I have to admit that I have not even compiled a relatively large code-base yet, so my opinion might change in the near future.
One thing that greatly annoys me however is the IDE. I am convinced that Microsoft wrote the best IDE on the planet so far. Having used emacs, vi, eclipse, xcode, notepad++ and VS, I have to admit that VS wins hands down. I think that’s one of the reasons why developers will hesitate switching to another environment including myself. I am constantly trying to see how I can use Visual studio to write Objective-C.
All in all the architecture surprised me greatly. After all the next couple of months might be enjoyable writing some iPhone apps.
For anyone interested in finding resources on iPhone development. In the absence of a good eBook, I turned to online resources. During my hunt for resources I came across a couple of links that I found quite interesting. Here’s a list of sites that I personally used to get a feel of Objective-C and Cocoa.
20 Dec
Blogging About Code
On a recent trip I had a couple of minutes to kill and had no access to any quality reading material or an ipod which left me with an Internet connection and a blackberry.
Then it occurred to me that I could read some blog posts with google reader, my favorite RSS reader along with Snackr. I thought what the heck how much bandwith are blogs going to consume? That turned out to be a gross underestimation. When one is on a desktop/laptop with at least a megabit connection and everything is lightning fast, one doesn’t realize what’s really going on in terms of what the content is composed of as long as it appears instantly on the screen.
I didn’t know that most of the software/tech blogs that I tend to follow are simply not readable on mobile devices. The reason? Huge screen shots of code/technical material that get scaled down and require at least a good minute of panning on the device to see what’s going on. Its one thing to use screen shots when its needed but putting up a screen shot to post 20 lines of code? That’s plain out lazy.
There are ways of formatting this content, and when the number of mobile devices are growing exponentially with iPhones and BlackBerries taking over the cellular market we should start paying more attention to content representation on different clients.
It looks like I’m not the only one dealing with code screen shots either. Scott Hanselman has this great post on code highlighting in blog posts. It’s a must read for software bloggers.
21 Sep
Live Mesh
Nowadays people usually have more than a couple of computer that they regularly use. This naturally ends up in a mess if you are working on a couple of projects. You need to use a thumb drive, or email the files, or upload them somewhere. If you happen to forget to synchronize the latest version of that presentation you are stuck “re-constructing” it, or asking people to email you a copy, etc. Not fun. Having done the same mistake a couple of times, I was looking at different solutions like SyncBack and iBackup but somehow I never could get used to the manual intervention. I wanted something that is integrated into windows explorer…
About a couple of months ago I ended up signing up for Live Mesh. A service by Microsoft that lets you synchronize documents across computers (Windows, Mac, Mobile Devices) and also connect to the computers whenever you want. Your documents also can be accessed by a public computer. In short, all your documents are with you regardless of where you are. (Does it remind you of the .mac?)
Installation
Installation is really painless just like any other live application. It takes a couple of minutes to download and then you’re ready.
Integration with Windows
Microsoft really got it right this time. Live Mesh does not interfere with anything, no annoying toast notifications, pop-ups, jumping dialogs. A service starts with Windows, then an icon appears int the taskbar.
You can add your computers to your account using the web interface at Mesh homepage.
After adding your devices, when you click on the mesh icon on the taskbar you will see a list of your devices. It looks like this:
You can now connect to the computers that are online and remote control them from wherever you are. Let’s look at the folder integration in Mesh.
In Mesh world you have a “virtual” desktop that is online. Folders can be created on this desktop using:
- Any of your computers that are signed into the mesh service.
- Mesh web interface.
After creating the folders they will be synchronized with your desktop. A placeholder will show up on your desktop.
Double clicking this placeholder, will prompt you for a physical location on the computer that will be used to store the synchronized files.
After you’ve done the initial set-up, double clicking on the file will bring a screen similar to this:
1 Sep
HealthVault Integrated Web App Article Series
Almost a year ago Microsoft announced its health platform. Since then Google has joined the bandwagon as well with Google Health. Microsoft had quite a bit of a head start. As a result, with growing partner feedback , they keep updating the Healthvault API and introducing new functionality to meet the needs of partners.
HealthVault SDK contains a couple of sample applications. However, I could not find a step by step tutorial into building a new HealthVault integrated application. So I decided to write a tutorial on how to create a HealthVault integrated web application.
If you are interested in reading more, articles are hosted on Netsoft USA web site.
28 Aug
.NET 3.5 SP1
Up until now most service packs meant something was missing/wrong. The name service pack was associated with bad software. It looks like that is bound to change. More and more software vendors are using service packs to actually introduce new features to their products.
Latest example of this is the .NET 3.5 Service Pack 1, introduces some really big items like Entity Framework, and ADO.NET Data Services.
For those of you living under the covers, Entity Framework is big. It raises the abstraction level between the data mapping and the object model. Programmers can then code against object model level abstractions rather than lower level constructs. You should definitely check out Entity Framework if you are remotely interested in developing applications that have a fairly complex object model and a database.
25 Aug
To-do lists
While looking at some forums like BoS for newly launched products by micro ISVs (mISVs), it strikes me how many people are actually creating and launching “To-Do” lists or some sort of note keeping application/web site. There is already a plethora of applications, both free and commercial, that already attack this problem.
However, there must be a nice size market such that each week a new one pops up. Now what I suggest is a bit different. How about an application that actually stops the user’s HULU or YouTube streaming, displays the TODO item with BIG red fonts and actually forces the user to do whatever is necessary to get rid of the message. I think TO DO lists need to be proactive!!
If you can think of a better TO DO list idea, drop me a line. Who knows it might be the next big mISV idea.
2 Aug
ISP down
Sad news,
It looks like my previous ISP has not kept my data and I’ve lost most of the blog. I will try to re-create most of the posts. Thanks for the support!
-Burag
23 May
Hello world!
Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

