Friday, June 20, 2008

Wish you were here

Absolutely awesome video! Simple but masterful piece which radiates positive energy. And the dancing style is quite catching.


Here is the guy's site - http://www.wherethehellismatt.com (and there is a much better quality video available). Toronto is not in the list yet so we still have a chance to make history :)

Tuesday, June 17, 2008

Code bombs and team morale

Jeff Atwood again did a good reading for us: code-bombing from the dark room. This is the essence of why the collective code ownership and even infamous pair-programming are actually helpful in shielding the programmer's ego.

It is much easier to give up on a 10-lines method than on a whole over-engineered and obtrusive application layer. I am so used to admit my ignorance very casually that it became a defensive mechanism for my otherwise vulnerable and envious soul. I like writing frameworks but majority of them have never seen light of the day. In the eyes of others exactly this practice supposed to make you a better programmer. Probably it did, because I avoided code-bombing my colleagues, providently submitting mere suggestions instead. Most of the time these fruits of weekend labor were criticized but some pieces were adopted after heavy rework, and that, indeed, made me a better developer. Critiques hurt a bit but kept me determined to go ahead and try to get those heartless bastards next time. How does a "suicide code-bombing" sound?

Software development is people's business and what comes good for a cubicle drone will go good for the whole project. Code reviews, especially if they cover results of months of work, are inefficient and leave people feeling more offended than enlightened. Daily cooperation will allow people admit and accept their mistakes with dignity and confident people are much more opened to learning. It is not even instrumental to have Jedy programmer on board as a team of generalizing specialists possess enough steam-power to self-propel the average skill level up and forward.

Sunday, June 15, 2008

Testing ASP.NET Ajax autocomplete extender with Watin

Back to our Autocomplete extender example.

One of the biggest reason we hesitate to unleash the ASP.NET Ajax toolkit onto our project is potential performance shortcomings. The load test would be nice addition to the test harness. We do not run Team System (not that we would have Visual Studio Test Edition available anyway) so we can judge TFS load testing suckness from the words of others.

The Watin tool seems to be a very good candidate for the black-box testing. My first attempt to run simple test wasn't any success.

[Test]
public void FirstTest()
{
IE ie=new IE("http://localhost/Prototype.WebUI/TestDataEntry.aspx");
ie.TextField(Find.ByName("ctl00$contentMain$txtManufacturer")).TypeText("n");
Thread.Sleep(200);
ie.TextField(Find.ByName("ctl00$contentMain$txtManufacturer")).TypeText("nis");
Thread.Sleep(200);
ie.Close();
}

When test runs, I could see that active fields are highlighted in a IE window, text being typed without any sign of Ajax. It's either Watin is missing events (which was unlikely knowing Jeroen's thoroughness) or ASP.NET Ajax techniques are too exotic to catch on (which is more than possible with Microsoft's history of lack attention to details).

After lengthy investigation and extensive Reflector code digging I found that Autocomplete extender attaches itself to the KeyDown event of the textbox so from this side we were more or less clear. Then I remembered my own adventures with ASP.NET testing and decided to kick other tires - play with runtime events reanimation. To make long story short - the following line brought my Ajax back to life for the Watin testing:

txtManufacturer.Attributes.Add("onkeydown", "");

That's right - "attach nothing to KeyDown event" - and all will start working as expected. Now we can load test questionable Ajax performance.

I didn't have time to investigate the differences in the generated code but I would start from blaming the ASP.NET Ajax code generation for this glitch. I bet, like with the SQL Data Source Wizard bug, somebody somehow overlooked some possible combinations.

P.S. I can't wait to lay my hands on Component Art components.

Sunday, June 08, 2008

Worktime music: Apocalyptica

The Unforgiven

 

Seeman (ft. Nina Hagen)

Friday, June 06, 2008

Introverted Programming: So what the Japanese management model really teaches us?

Not so far ago I've read a not-so interesting opinion on one forum which traditionally criticizes any kind of management style. It has inspired some thinking and this rarity needed to be captured.

We are used so much to invoke a Japan's authority in a business efficiency - but hardly look beyond the magic of events. Of course - agile this and agile that, lean development, kanban and just in time manufacturing - it all seems to work. But if you think about the organization of The Japanese Firm - what first comes to your mind? Loyalty. Not in a sense of Omerta code but rather in a sense of people identifying themselves with The Company and perceive their employment as a lifetime commitment.

So where I am going at? Maybe there is no mystery. Knowing the devotion and remembering that career advancement in Japanese company traditionally based on seniority, it is safe to assume that the vast majority of management in all levels is home-brewed. And likely their success comes from the deep understanding of the business area and processes (which they've being growing through) rather than from mere formal education (which they perfect nevertheless) or magic business techniques (which they invent and employ based on their expertise).

Thursday, June 05, 2008

"#region is evil" Part II - my bad

Ok, it is not always evil. If you have class with 50 properties, there is little can be done. Refactoring by grouping properties into the types is gross overengineering. So pack this stuff in the #region, I'll look the over way.

Smuggling a dose of LINQ to the .NET 2.0

As soon as you get hooked on the syntactic sugar like auto properties and object initializers, it is excruciatingly painful to overcome the abstinence returning back in the .NET 2.0. LINQ is even more addictive and it is good to know that there are people around who can supply us with the good stuff if we've found ourselves locked in the Visual Studio 2005 project. LINQBridge seems like a solution. The author is Joseph "C# 3.0 In a Nutshell" Albahary.

P.S. His LINQPad is worth to be looked at too - at least you don't have to fire up a fresh VS2008 project to try LINQ expressions. Would be nice, though, to have an intellisense there.

Wednesday, June 04, 2008

Fill'er up

I understand that there are more complex cause-and-effect principles involved but wouldn't it be funny if calling a towing service for your car will be cheaper than actually driving it?


© 2008-2013 Michael Goldobin. All rights reserved