Redemption from quick judgement (Politics)

Chris from the .Net user group mailing list often post on his blog political posts. Fair enough that’s the beauty of the web, and he even qualifies it nicely, his blog’s at “” with the tag line “Irregular injection of opinion”. So in his posts he takes what I think is a pretty hard line against the welfare system. The problem, which is mime, is I just feel so baited by his words. He’s posted some flame bait and some good points.

Anyway, he posted his power point slide from his TechEd talk, and low and behold its on smart clients, and the Composite UI Application Block. So I’m watching the slides with no voice over, wishing I could have attended the original talk. Then it occurred to me that if I had been at TechEd there would have been a high chance that I wouldn’t have attended a talk from Chris because I felt so out of touch with his apparent political stance. This is really the most silly of things.

So I started thinking how Chris could have such a strongly angled view of the welfare system (related to family/child support). I must agree there are problems, but I get the feeling he thinks it should all be scraped, so that he get more of his dollar back. But what occurred to me today when I realised that I had an issue with Chris, was maybe he’s just not experienced some things that I have, maybe he sees things as a cost to him, verse him helping other because he’s lucky. I’m not trying to saying he is where he is at due to luck and not due to a lot of hard work, but more of a maybe he hasn’t been delt some really bad hands.

More on this the angle of experiences and bad luck, a friend of mine came over from the UK to work ~3 years ago. In that time he has flown back three times due to his father getting sick and then dying and recently his mother been sick and staying until she passed away. All’n’all I think he’s been over in the UK for almost 5 months not working, and watching his family die. I’ve not experience of this. But it really makes me appreciate my parents. It’s one of the experiences you’ve had or you haven’t. Having talking over our lives with this friend I can’t help think this guy’s been hit with the bad luck stick.

So back to political things. I think a large part of the difference of opinion is also experiences. I’ve been in situations (child, and young adult) where the welfare system has been a heaven send. When my wife and I where younger and I wasn’t earning as well as I am now, we where entailed to support for our children’s preschool fees and the likes, my point is for most services we volunteered to stop receiving government support before we were required, due the hoops and constraints it put on you. But I’m thankful they where there. I thank those that helped me (via tax). So now I’m paying more taxes, I don’t see it as buying my neighbour an Xbox for there kids. Hell I’d like an Xbox first. But I’m saving my money so I’ll be better off later. And that’s maybe an area I dislike about the welfare system is that I’m paying for others to smoke, drink, gamble. Sure I buy ~2 lotto’s a year and drink some wine, but it’s not the weekly norm.

So in some sense people are just thinking of them selves. And that’s where I tie this altogether, the overwhelming feeling I original got from Chris was his sense of self. And that’s what the political parties are playing to. I’m still undecided as to which direction to chose. I’d be more interested in underlying polices than tax cuts, what are the sub points that are important to each party, what is not important. Stop with the pandering to the masses with tax.

So I apologise to Chris for been offended by his political stance, it is after all just opinion.

Post TechEd knowledge sharing.

Kevin (one of our senior developers) has returned from TechEd. The first demo he did was showing how ClickOnce works. He spent the afternoon getting our current .Net 1.1 application running in .Net 2.0 Beta 2, then configured ClickOnce and showed it working. It just worked. I love the client based roll-back support and forced upgrades features. So while I was thinking this is great, I was also thinking its about time. This is what people need to smite the ASP.Net everywhere mentality. Now deploying real apps via HTTP will be as easy as “configure and click” for the developer, and easier for customers to use.

The other topic Kevin was quite keen about was SQL Server Integration Services (SSIS). This should make life easier for us, or if not easier to do, allow us to step up to a new level of service (product stability and administratively) better than we are presently doing it. I’ve found this seven part series on SSIS (1 2 3 4 5 6 7) that I’m working my way through. Seems like a nice system.

Kevin’s got some other topics he wants to investigate to see if they will add real value to our development process. So I look forward to more reading and demo’s in the next few weeks.

TopCoder - Single Round Match 261

Well yesterday I took 2 hours off work in the middle of the day to compete. The end result was a “why did I bother”.

The first problem was a really simple prime number search problem. You had to search a range of numbers, and for those numbers that were primes, modulo the prime with a given number. Return the lowest remainder with the highest frequency. Well I wrote the fancy Sieve of Eratosthenes and stuffed it up. Another coder in my room noticed my mistake and found an example case that it failed. At lest it took him three attempts to find it, so he got no gain of points from it.

After some investigation there appears to be a couple of ways of doing the inner loop in the sieve. (Using the same variable naming as in the linked example)

The most obvious is

for( int k = i*2; k <= n; k+= i )

and how the above example code does it, which is faster

for( int k = i*i; k <= n; k+=i )

Which computes from the square up, but when tested they give the same results (tested up to 100,000,000). But my mistake was the loop termination ended at k < n and I initlised the inner loop as int k = i; thus it looked like this.

for( int k = i; k < n; k+=i )

So now at Greig‘s recommendation I’ve written it up the correct way, and I’ll keep it handy for future competitions. Of note is that I wrote my incorrect code faster than
Mark‘s correct code, in a time of 11:21 vs. 14:44. But that’s not much of a victory.

The second problem was about binary trees and was worth 550 points. I really did not know how to solve it, and after reading the post match write-up I still do not understand it, so I’ll have to try the example code, and see how it works. So in the competition I tried implementing a permutations based solution (as this looked like what was happening) but I couldn’t get it to work in time. I even went and found a C++ example, but couldn’t get it to work ether.

To add insult to injury, I challenged another person’s 550 point solution in the challenge phase, and failed.

Final competition result, a score of -25. This put me in 298th equal out of 308 instead of 215th equal if I’d not challenged. So now I’m back in Division II with a ranking score of 1009.

Weekly Hockey fun.

Well I had a good game of underwater hockey tonight. I only got elbowed in the face once, my ankle skinned once and my elbow whacked against the pool bottom twice. Oh and I got my stick hand hit pretty hard. But the real gem was the turn out of good players. So each time I received the puck I was too busy fending off tackles, instead of making good ground. Scored a few goals, got some good passes in and generally had a good time.

Development Style

A hybrid post where I plan to wonder through different idea spaces (compared to going off on tangents while trying to keep to a single idea).

Anyway I just finished listening to the latest audio interview on Roy Osherove’s blog between David Platt & Juval Lowy. I enjoyed this interview, and one of the highlights for me was Juval describing how intranet development should be done with smart clients not with web forms. This has been a pet peeve of mine since Microsoft started pushing .Net 1.0. A large focus of the technology drive was “every thing should be a web form” which to me missed the whole advantage of a sand boxed/managed environment that .Net/Java gave you. The idea of doing user interfaces in HTML (or what ever) and using lots of JavaScript to manage the user experience is awful. To me this represented an extension of JavaScript from what it was designed for, to the realm of “well it stretches that far.”

The coolest thing to me about Java (before .net) to me was the idea of applets. Sort of what ActiveX should have been but wasn’t. So when I heard about .Net I naturally thought of a pretty version of Java applets. Because you knew the UI widget set was going to be uniform with the user system. Anyway, one of the local companies I interview at >1 year ago, where so proud of building a .Net app for their remote users. The Engineer talked about web forms, and I sat there with him while he described writing more (and more needed) JavaScript to do the maths (scheduling of advertisements and cost modeling) on the client side to get “better performance” I just knew they didn’t get it, and I didn’t want to work there. It just seemed such a crime of developer’s time, and a really poor solution delivered to the customer.

Anyway there seems to be more support in .Net 2.0 for smart clients with things like ClickOnce for deployment management etc. It just seems strange to me that anyone would do anything different. When the application has a known/controlled install base, anything other than smart/thin client based development seems like proposing a substandard experience.

The other related thing is I had an interview at the local HP office yesterday. The building looked really nice, they had plenty of parking and quite a nice view, but no pool. The ~3+ hour interview was fun. I had to implement a piece of software that was meant to be a web form (ASP.Net) but I have no experience doing web forms so they changed it to win form. The task was to build a simple customer management app. But I had two hours to get through as much of the feature list. Gosh writing a slap dash app is so against the ideas of clean application development. After patterns like MVC, frameworks for smart clients and unit testing, been asked to slap it together actually seems like the most worthless of tests. The only value I can see from the test is how much domain knowledge the interviewee has. Things like clean abstraction, commenting, unified event handling, get thrown out the window. It was more stressful than the algorithm programming on TopCoder. I think asking me to talking them through a design of what I would have done would have added more value. It would show I knew how I’d tackle the task and the fundamentals of client UI design. This would appear to be of more value than weather or not I could slap together code that followed none of those principles in a tight time frame. Especially when afterwards we discussed how so little time is spent coding, and the projects are well managed through a structured development cycle.

David and Juval at the beginning of the audio interview where discussing about how this is how software should be engineered. I agree with this. Big systems need big process. My problem is I’m not the biggest fan of big process. I’m a fan boy of prototyping stuff. Solving the “but you can’t do it” type thing. The skunk work projects. Working thought task lists that are planned out a year ahead is not me.

The Coding Challenge is On!

The Coding Challenge is On!

I knew Mark couldn’t resist the lure of a programming challenge. I notice he didn’t link to his profile so I’ll to the honors for him: Shojun.

I was thinking about entering this SRM but decided 4am was just a little on the wrong side of the clock to start programming. The next SRM is on Wednesday at 1pm so I’ll be there with bells on.

Google Code Jam 3

I entered the Google Code Jam yesterday. I was pleased with my effort when after 50 minutes (of allocated 60) I had completed to two assigned problems. I was working on problem set #1 (room 7). I had a score or 502.75 point (out of 1000) and at 13 hours into the 24 hours period, I was ranked 46th for my problem set.

But my 750 point problem failed system testing, so my final score was 178.59, this put me in 266th (of 939 people, but 482= was the last place) position for the problem set. But my Google rank was 1359 which is better than my best Top Coder ranking.

Which reminds me that the night before I entered the Top Coder SRM 259, I was in division II after my poor Top Coder Open results. The three problems where easy to-do so I’m now back in division I (but only by 2 points), so I need to pull finger and do better in the next SRM. I got top score in the room I was in (#16) and I placed 11th (out of 273) for the division. So even though it was 11pm when I started and 1:30am when I went to bed, I was feeling good.

SQL Reporting Services 2005

I went to a .Net User Group meeting last night. It was hosted at SunGard and Adam Cogan was the presenter. He gave a good talk about the features of SQL Reporting Services 2005, with a few side stories while the designer was busy “designing”. The Design tools were very slow at times, but he was running a beta version under virtual PC, so there is room for forgiveness. That mixed with I not sure how much work was been done behind the scenes.

But really what impressed me was how simple it was to click and drop it all together. I really like the Client report building, that feature would come in handy here at work.

All’n’all I really useful piece of software. For new development Business Objects must be packing them selves.

One of the good titbits was Adam explaining how he deploys database applications, and how he thinks it’s the application responsibility to set-up the server correctly. He showed how they laid the files out, and how the application did the checking and loading of .sql and .rpt files.

But the highlight of the evening was wining a free MSDN Polo Shirt.

Underwater Hockey

I was just reading Charles Sterling’s blog about him trying underwater hockey, and it reminded me that I wanted to post about the joys of taking the sport back up. After not playing the game for ~3 years I’ve started playing again. The major problems with this I lost fitness, but I can remember what I used to be able of doing. So you’re on the bottom of the pool, trying to swim around somebody (who you later find out is turning 60 in December) and decide to turn on the turbo leg, but they cramp instead.

My legs have never been my best asset in the swimming pool, when I swim most of the propulsion is from the arms, but when your playing hockey with great big flippers on, it’s all about legs. So I’ve got quite use to having my legs cramp when at the bottom of a pool. The best solution is to “not panic”, and then followed by given in to death. Once you relax to the fact your going to die, I often find your legs relax enough that your can float to the surface to breath, thus actually avoiding the pre accepted fate. Then you need to get out of the pool and stretch.

In the case of a few weeks ago I was on the side of the pool lying on my back. Both my calf’s where in the cramped but not stinging state, but each time I tried sit up, they would explode in pain. It took about ten minutes before could get up to stretch. But besides that I love underwater hockey.

Google Desktop Development

This morning Ryan emailed me some ideas for development projects with Google Desktop. I liked his ideas, and have been thinking of how it could be achieved. But my point is I went off to read the Google Desktop API and it seems like a really cool thing.

One cheeky idea I had was setting up the desktop on a server, then using the API to index your intranet, and then providing a search button that called back into the desktop API, thus getting Google search for your intranet on the cheap. More than likely breaking rules of the license, but just an idea.

But what really impressed me was the richness of the API and how you could use it as your universal storage for text based stuff. With the journal and contact type entries, you could write plug-ins for your normal apps, and use it as your master synchronization point.

I just went searching for Ryan’s web-site so I could link to him, so I loaded up the Plaxo website (which Ryan put me onto) and realised this is exactly what I had just been talking about. I really like Plaxo. Some friends have recommended Bebo, but after having tried Plaxo, Bebo just came across as ugly, and a very polluted UI.

My only gripe about Plaxo is that the user experience could be improved by using AJAX. The page that this is the most painful on is the contact list, where each click on the business and private card widgets causes a full page reload. Otherwise the page design is nice and clean.