Thursday, July 29, 2010

Continuous Newbie Gains

I've developed a new weight lifting methodology, which I call "Continuous Newbie Gains" or CNG for short. This methodology I have progressively refined over the past several winters and is actually an off shoot from Winter Wall Syndrome which I discussed a while back.

The basic premise for CNG is as follows:
  1. Get enthusiastic about going to the gym.
  2. Start going to the gym regularly and strictly following schedule etc.
  3. Experience all the loveliness that accompanies starting fresh at the gym, the excessive DOMS and the all the Newbie gains that can be had.
  4. Get distracted, get a cold, get injured playing rugby, lose focus, go away on holidays etc
  5. Stop going to gym regularly.
  6. Miss a few sessions here and there.
  7. Suddenly realize that you haven't been to the gym in a month.
  8. Decide that you need to get back into it.
  9. Return to step 1.
I realized as I walked to the gym to shower after my morning ride today that this is pretty much how I operate over winter. And apparently I find its a great way to get to the gym in the cooler months.

Wednesday, July 28, 2010

Using Parted Magic to Ghost System Drives

This lovely live CD saved me, or rather it would have, had I bothered to use it when I first setup my computer at work with Windows 2008 server.

You see what happened to me yesterday was that as I was testing the installer and uninstaller for our next release a gremlin got into my system and corrupted the registry settings for the latest copy that I had just installed. This was all well and good until I decided to run the uninstaller on the broken install and when it got to the point of deleting files it read the corrupted entry and thought the install directory was "/" as a result it started deleting random files from my system hard drive.

Unfortunately as I had only thought about cloning my system drive I was left with the task of reinstalling my computer from scratch. In a effort to see the positive side of this whole thing I am telling myself that I was probably due for a system clean up anyway, but its not quite working for me. So this time around I have taken the extra step of using Parted Magic a live CD with partitioning and disc tools on it to clone my drive, the features are listed below.
  • Format internal and external hard drives.
  • Move, copy, create, delete, expand & shrink hard drive partitions.
  • Clone your hard drive, to create a full backup.
  • Test hard drives for impending failure.
  • Test memory for bad sectors.
  • Benchmark your computer for a performance rating.
  • Securely erase your entire hard drive, wiping it clean from all data.
  • Gives access to non-booting systems allowing you to rescue important data.
  • Runs from the CD, no install required.
Using Parted Magic it only took around 15 minutes to clone my freshly setup system drive to my secondary hard disc in preparation for the next time that I destroy my system install. Which I have to admit happens a little too frequently for my liking as I spend a lot of time at work installing, uninstalling and upgrading  software while testing. Once I completed the cloning I tested a restore to make sure it worked and in only ten minutes or so I had a freshly restored system.

Now that I have armed myself with a clone of my system drive I can resume my work duties happy in the knowledge that even if everything goes pear shaped again I can get up and running again a whole lot quicker than a complete system reinstall, except for a few personalization tasks and updating to the latest code bases I can be back up and only in 20 minutes.

Tuesday, July 27, 2010


It has really been that long since I studied programming but as I’ve started looking at some of the iPhone Development Lectures from Stanford on iTunes University I’ve noticed them talking about some things that I’d blocked out (Assignments and exams) and some things that I’m not sure I’ve ever heard of such as the Model View Controller architecture pattern. In the case of MVC I am not sure whether it is because I mostly did low level programming courses at Uni or because it is the latest pattern to re-emerge as favourite among the development community.

In an effort to get more comfortable with the concepts involved in the MVC pattern and how to program within it I thought I would right up a short post. You may have noticed that some of my posts seem more like brain dumps than anything else, this is because I often reach a point of enlightenment or understanding on a subject when I attempt to explain it to someone else. In this case, all my readers get to be that someone else. I am sure there is some amusing quote that I should be quoting to illustrate my point here but a ten second google didn’t reveal it to me

The basic premise with the MVC pattern is that you have a Model which represents and contains the data that the application uses, a View (or collection of views) that is a rendering of the data, or subset of data, in a way that allows user interaction and a Controller is  the glue that links everything together.

Models store data and provide domain logic that provides some meaning to the raw data, such as ranking information or totalling a shopping cart, when a model’s data changes it will notify its associated view via the controller.

The Views are what the user sees and interacts with, they are the visible side of the program and are related to a specific model or model subset, they know how to display the data that is contained in a particular model in a way that is meaningful to the user. A view allows a user to modify data in the model by sending events to the controller, which decides how to handle them.

The Controller oversees the interaction between the View and the model, the controller contains the application logic and determines how a View modifies data within the model.

As I said, this post was to clarify things in my head, I hope you found it useful, but be warned there will be more posts like this coming your way.

VS 2010 is wayyyyyyy better than VS 2008

At work recently we converted our projects from Visual Studio 2008 to VS 2010 and let me tell you I am loving this change.

Firstly, our product consists of 65 different projects all loaded into a single solution, previously this would take several minutes to load up when first opened and if anything was altered externally then reloading would also take several minutes. Now, this takes around ten to twenty seconds. Also, the strange hiatus after all the projects have been loaded and before you can actually interact with anything has been greatly reduced. I think it is still there but it is much less annoying now because it is so much shorter.

Secondly, build times are quicker, anecdotally I’d say that they are 20-30% faster and clean times are at least twice as quick as they were previously. I have also read that there have been some improvements to multithreaded compilation in VS2010 but I have yet to tweak any settings to see if I can further improve the build times.

Thirdly, as Scott has detailed on his blog, there are a whole collection of new and improved ways of searching code. In fact what inspired me to write this up is the “Navigate To” functionality. To get to the new dialog you simply select CTRL  + Comma and the dialog will pop up.

As you start to type the name of the file, object etc that you are interested in the search results update automatically. This is a seriously quick and easy way to navigate to a particular file. Another awesome part of this is that you don’t need to searching with the right syntax etc like the Find dialog. It will pick up strings containing what you have typed etc, no need to worry about sticking * either side in the search dialog.

This is just a short post to let you know that it is worth it to upgrade if you can. If you want to find out more information I recommend SchottGu’s series on VS 2010 and .Net 4

Friday, July 23, 2010

New York wastes water

Coming from the Land of Droughts and flooding rains one of the things that I noticed immediately when arriving in New York was the use of water. As I walked to my accommodation early on the morning of our arrival we dodged puddles and hoses as the sidewalks out the front of buildings where hosed and scrubbed. Such a thing is almost abhorrent to me as currently in a great deal of Australia one can not even water their lawn let alone water down the side walk. Any such efforts can result in a fine. 

Obviously there is a need to maintain a level of cleanliness is an area as densely populated as Manhattan and the New Yorker that I was staying with was quick to point out is that if the sidewalk isn't kept clean then the building can get 'cited' for not maintaining it. While a few of the buildings where using high pressure cleaning systems which by there very nature use less water, a great deal of the cleaning that I saw was being down with hoses that didn't even have nozzles on them.

The second thing that I noticed was sprinklers running all over the place, in the middle of the day, quite often spraying water into puddles or big pools of mud, indicating that they had been running quite a while. I guess to most people that this wouldn't seem weird or even particularly wasteful. But again, it is one of those things that you just wouldn't see in Australia at the moment. I live in Melbourne and until a couple of months ago the only time I was allowed to water with a sprinkler system was between Midnight and 2 AM on two days of the week. This has since been relaxed to being able to water between midnight and 8AM on two days of the week. Otherwise watering was to be done by hand held hose, again only on two days of the week and never between 8 AM and 8 PM. So to see giant puddle forming displays of sprinklers all over the place in the middle of the day struck me as odd.

The third thing I noticed is the ridiculous amount of water that is present in an American toilet, to the point of making the passing of a large meal from the night before dangerously likely to incur splash back and an over enthusiastic wipe can result in a handful of soggy paper. I did not see one half flush toilet anywhere in New York. Also, the majority of urinals that I visited flushed on approach and often departure, each flush taking at least a gallon of water. No where in New York did I see a waterless urinal or seemingly even a timed flush urinal.

Now I contrast this to Boston, the first bathroom I used has waterless urinals and a sign on the wall explaining why the new taps that where fitted where good (sensor activated, temperature controlled) at conserving both energy and water. This theme was reflected across the town, never did I see a sidewalk or pavement getting hosed down, nor did I see sprinklers running during the day. I did see some sprinklers running at night. There where many water less urinals and there seemed to be an awareness across the city of the need to conserve water and energy. An awareness that I didn't see any where in New York. Indeed the only energy conservation awareness that I saw was the news discussing shops being fined for having doors open with their air conditioning on. They where using it as a gimmick to pull in customers during the heatwave conditions. 

I shall finish this post with a disclaimer, I am sure that there are people and venues in New York that are concerned about their water usage, I just didn't see them.

Mouse Pad? We don't need no stinking mouse pad!

Wednesday, July 7, 2010

Glacial Agile versus Whatever: A Comparison of Software Development Styles

I used to work for a large multinational, with a gigantic development team (several thousand developers) working on a 30 year old code base, with many millions of lines of code, originally written in C and slowly translated into C++. I know work for a small Melbourne based web development company, working with a small development team (~10) on a product that is around 5 years old, with around 250 thousand lines of code, originally written in VB.Net and now being mostly written in C#.

Obviously the differences between the two extend beyond the differences in their respective projects and code bases. Perhaps the most jarring difference, although not the most surprising, is the different styles of code design, development and testing. At the old company, as a result of the complexity of the product and the environment in which it is developed, the software development life cycle required large upfront code design efforts and very defensive coding practices. At my present company for the most part there is less need for upfront design and more ability to adapt a design as it is being developed and tested. At the old company there was a large set of established processes for everything from feature approval to how to test systems, at the new company, there are very few established processes beyond code management and release delivery.

At the former company given the age of the code base and the incremental nature of feature development I coined the term Glacial Agile to describe our software development process. We where essentially doing agile development, we would add one or two features per iteration with a bit of design up front and testing at the end, but instead of taking a two or three weeks as you would do in a normal Agile process, it took us 6-9 months per iteration. If you take this over the life of the project, 30 years, then it doesn't seem as bad.

While I was at this company there where many efforts to try and get all the development teams to switch to Agile Development, often it seemed only because a manager read about it somewhere and wanted to be an instigator of change. For some of the projects this made sense, but not the core product of the company. The established process, while often frustrating, had been honed over many years to the point where it was quite good at protecting the product from failure and introduced bugs, but not so good at adding new features.

At my present company, we are still working on the processes, currently code reviewing is being trialled. For the purpose of this blog post I'm going to call the process here Whatever. The reason that there isn't much process in place is because the current system kind of works, it has been built up by the people that work here slowly and is for the most part contained in a few peoples heads. Actually, upon reflection, it is wrong to say that there isn't much process. There are indeed a variety of processes that are used and have been developed over the last few years at the company. What is missing is a formalized version of the processes that are used. All the processes are stored in the heads of those that manage the projects, I shudder to think of the impacts of one of the key players stepping in front of a bus, but it could set us back months in product development (not to mention of course the emotional effects).

As an example, when I first started here almost a year ago, there was no instructions, no document, or even a rough outline of how to setup a system to run source code, no instructions on how to setup the Databases etc. I had to ask a few different people to help me set up my system and between them they managed to get everything covered. Knowing that I would have to setup quite a few different systems in the future I tried to cram everything into a document (which reminds me that I should probably update it)  and then tried to find somewhere to upload it, it is still sitting on my own computer.

While the Ad hoc processes do, for the most part, work quite well they are getting less effective as the company and product grows in size and complexity. The introduction of formalized processes will be a long and probably slow process, most of the employees have never worked in large companies and they are not familiar with working with formal processes. We all enjoy the informal nature of the work that we do here but I can't help but feel it would benefit from a little more structure around some aspects of the work. In particular to me we're working on a section of code for a new feature and it has been rewritten several times and even now a few weeks shy of when we intend to release it, we are restructuring and changing class names etc, this could have been combated with more upfront design and analysis.

It is heartening to see that we are employee more aspects of rigorous software development, and in the future we can only hone and improve the processes that we do have. Now, if only I can persuade people to get all this stuff written down it can only help our planned efforts to grow as a company. The other day there was a discussion about having another development or test team located somewhere else in the world (such as the US). This caused great angst among everyone as they thought it would be too hard to work in that situation. While I tend to agree that it is easier to be able to work on something when you can walk over to everyones desks, it is not overly hard to work with people spread all over the world, if there are good processes and communications systems in place.

I've tended to ramble a bit here, but I guess the point is, at the old company I found the process restrictive and at times quite annoying, it is only by moving to a small company with not very many processes that I appreciated the power and the need for a solid set of processes to work with. Eventually we'll get processes in place for the whole development processes and I continue to aim for this. We've got code reviewing in the process now (although annoyingly not as a result of my efforts over the last year) and we'll continue to develop better processes in the future

Tuesday, July 6, 2010

Great Scott!!!

Keep your eyes peeled for a modified Delorean and some punk wondering around in 80s clothes.

Marty McFly arrived in our time period just over an hour ago. If you have no idea what I am talking about then you need to check out the Back to the Future Trilogy.

Watch out!

*This was shamelessly stolen off someone else at work.

EDIT: Oh man it was a fake. I got pwnd. Meh, still funny.

Unboxing my new Mac Book Pro :D

I'm not going to post a whole heap of pictures there are plenty of other unboxings out there on the interwebz for you all to find. I just wanted to point out a few things that I thought where cool with my shiney new Apple MacBook Pro. Firstly, I'll just say,

This thing looks awesome, the screen is bigger than I thought it would be and I'm glad I got the high-res antiglare version the clarity is great and I can fit a whole lot of stuff on the stuff on the screen at once. Which for me is great as I work with dual 24 inch screens at work and always struggle when I have to go back to less screens. (I've been afflicted like this for a while, ever since I found an old PCI video card back in the day and had a 17 in Trinitron and an 'awesome' 14 in fish bowl CRT hooked up at home, going back to one screen even with more res just doesn't seem as good. Although the new shortcuts in Windows 7/Server 2008 are awesome (half screen etc)). Also, I'm loving the back lit keyboard, it looks schmick, although it must be said there seems to be enough room to put in a number pad. Not that you really need one and its probably better than squeezing it in like they do on some other laptops and sacrificing key size or usability.

I've always admired Apples sense of design (although as we can see it has apparently affected the reception on the iPhone 4, you can read my take on that here) but still, they pursue form and usability to an almost insane degree, both in their hardware and their software. They even put a lot of effort into their packaging, in the past they have won design awards for this.

Again, I'm impressed by their package design, first when you open the case you notice a large piece of foam stuck to the top of the box that protects the top of the laptop and holds it in place in the box, the second, which I admit is a total wank is the little popup tab that says "Designed by Apple in California".

It is a wank, but it makes sure that you all know who designed this beast and where, also it serves as a tab to allow the easy removal of the computer from the plastic that is holding it in.

A few things will obviously take some getting used to, the one mouse button thing and getting back into the feel of Expose and the dock, its been a while since I used OS X. On another note this could be my last update for a while as I am off to New York for a friends wedding and a two week holiday. While I'm there I think the first purchase on my list will be a case, something like this one.
Speck MacBook Pro 15" See-Thru Hard Case - RED
Which still allows full access to everything but'll prevent me from denting the case, especially behind the screen. Thankfully I'll have some cash back after gertting my GST refund from the friendly folks at Australian customs (there is more info on that in an earlier post)

Friday, July 2, 2010

Why we should recycle instead of Desalinating!

So previously I discussed the links between energy and water in modern society, in particular the costs of desalination.

Today I just wanted to give a short comparison between recycling water (and yes recycling sewage) and desalination. Basically the only reason that Australia's major cities have desalination plants is because people are a little squeamish. Or to put it another way because people are stupid. If you tell someone that the resulting output is cleaner and less contaminated than regular water they still won't touch it, the problem is that it is psychologically dirty. People think that it is dirty and can't drink it.

The problem is people don't think further than that. The reality is that if you live in a country town (or Adelaide for that matter) then you'll probably be drinking 'recycled' water and not really think about it. The difference here is that somewhere further upstream some towns "output" has been cleaned etc and then squirted into the river, then the downstream town pumps this out of the river, processes it etc and pumps it around town as its water supply.

The difference with places like Sydney and the Gold Coast is that that process would be short circuit the "psychological cleansing" that shoving the water into a river and pumping it out again is removed. What people don't understand is that it makes no difference. What is equally silly if you think about it is that this is what is happening in Sydney anyway, they pump the shit out the "deep water outlet" and then suck in sea water for the desalination plant....

I'd love to think that if people knew a few things about it they would want to chose recycling water over desalination anyway. One it is a heap more efficient to recycle water than to desalinate it and two the recycled water is actually a lot cleaner.

To take the first point the efficiency of recycling lets consider Singapore, arguably the most advanced country in terms of both desalination and water recycling technology. Their most efficient desalination plant uses 3 MWh/ML where as their most efficient recycling plant uses 0.7MWh/ML to produce drinking water.

To the second point, again using Singapore as an example, several Silicon processing companies have relocated operations to Singapore because of the reduced costs that surround using the recycled water output. Silicon processing, specifically the production of wafers for semiconductors, requires very pure water. Singapore supplies this companies with output direct from their recycled water plants that is so clean they can vastly cut down on the amount of processing that they do on the water before it is used in their processes.

Finally, and this applies to both Sydney and South East Queensland the power requirements of desalination place such an additional burden on the power systems that we will not be able to meet it without considerable investment in power supply and generation infrastructure. When you factor in the increased water bill to subsidize the construction and then operating costs of the new water plant and the increased power costs for the infrastructure and new generation capacity there will be a serious impact of the desalinized water on the consumer.

Perhaps this hip pocket impact will make people rethink the "Desalination is King" mantra and reconsider both recycled water and storm water capture technologies.

SOURCE: IEEE Spectrum 6.10

Blogger Sharing Buttons and Custom Templates

So when I read this post on the Blogger Buzz Blog that said sharing buttons where now supported natively on blogger I was pretty stoked. Up until now I had been using a set of custom buttons from one of the sites dedicated solely to adding sharing buttons to pages and blogs. However, I didn't really like how they crammed you through their web page or blasted crappy advertising all over the shop.

Anyway, I excitedly enabled the feature straight away on my blog to no avail. I could see that it was working on other peoples blogs just not mine. The blogger help was anything but.... I searched a few times and couldn't find what I was looking for, I'd give up for a couple of days and then when I saw them on another blog I'd get annoyed and look again.

Finally this morning I finally found my way to this post on  it seems that the problem was that I had manually customized my template and it couldn't figure out what to do. (Annoyaronically* I had only customized it to add the other sharing buttons in the first place!)

Anyway if you're having problems with adding the sharing buttons check out the post lined above!

*My latest attempt at making up a word. Annoyaronically should be used when something is annoyingly ironic.

Thursday, July 1, 2010

Maybe the Apple Product Managers shouldn't "Just say no!"

Alright, so some of you may have seen my earlier post Apple Product Manager? Just say No! but I am starting to think that perhaps, they need to listen to their engineers occasionally. It hasn't come out yet but there has got to be an RF engineer somewhere around Cupertino that is sitting there at the moment thinking

"I told you so!"
In case you've missed it, I am referring to the "debacle" surrounding the funky antenna design on the new iPhone (I am guessing that the "funky" new design hasn't been used with any other phones because, well as we can see, holding the antenna directly causes attenuation issues.)

It would appear that the culture of saying no has spread to the customer service and PR ranks of the company, now it isn't just the Product Managers saying no, the PR flacks are now saying
 "There are no reception issues with the iPhone4"
 And in the latest blow to the companies image the Boy Genius Report has managed to get some leaked documents for how Apple Care representatives are to deal with calls regarding the antenna issues. The full text is:

1. Keep all of the positioning statements in the BN handy – your tone when delivering this information is important.
a. The iPhone 4’s wireless performance is the best we have ever shipped. Our testing shows that iPhone 4’s overall antenna performance is better than iPhone 3GS.
b. Gripping almost any mobile phone in certain places will reduce its reception. This is true of the iPhone 4, the iPhone 3GS, and many other phones we have tested. It is a fact of life in the wireless world.
c. If you are experiencing this on your iPhone 3GS, avoid covering the bottom-right side with your hand.
d. If you are experiencing this on your iPhone 4, avoid covering the black strip in the lower-left corner of the metal band.
e. The use of a case or Bumper that is made out of rubber or plastic may improve wireless performance by keeping your hand from directly covering these areas.
2. Do not perform warranty service. Use the positioning above for any customer questions or concerns.
3. Don’t forget YOU STILL NEED to probe and troubleshoot. If a customer calls about their reception while the phone is sitting on a table (not being held) it is not the metal band.
4. ONLY escalate if the issue exists when the phone is not held AND you cannot resolve it.
5. We ARE NOT appeasing customers with free bumpers – DON’T promise a free bumper to customers.

Which certainly does seem bad, but really that is pretty much how I would expect them to react. Two things surprise me the most about this issue, one is the fact that Steve Jobs doesn't give a shit and the second is the vehemence that people have reacted to the problem. I am not surprised that that there are issues with the new phone, its a new hardware platform, the only thing mature about the iPhone is the OS. The Evo has a 12 second battery life but we haven't seen the same level of vitriol surrounding the issue. I guess the main difference is that they have at least made a noise about attempting to fix it in the next revision.

I can't help but think if Steve had said something more along the lines of we'll investigate the problem instead of hold the phone like you're a contortionist on a lunch break then we wouldn't see this level of reaction.

At the end of the day, the new iPhone has much better reception than the 3GS and most people will probably shove the phone in a case anyway, rendering the whole issue moot. Of course, if AT&T's network didn't suck balls then this whole issue may not even have been noticed.