Tuesday, September 30, 2008

FCKEditor doesn't update value while in ASP.NET UpdatePanel

For FCKEditor 2.6.2 to update data from within an UpdatePanel on Firefox, I had to add some Javascript…

this.Page.ClientScript.RegisterOnSubmitStatement(
this.GetType(),
"AjaxHack",
"for ( var i = 0; i <>
);

Thursday, September 25, 2008

TypeRacer

TypeRacer is a really cool online game for typists to race each other in what is one of the coolest typing tutor of all time. Technically speaking, TypeRacer doesn't tutor you but rather lets you practice and compare your typing skills with others from around the world.

TypeRacer is also available as an Orkut application that you can add onto your profile. Users on TypeRacer added through Orkut have a link to their Orkut profiles from within TypeRacer allowing other users to contact them via Orkut.

It's only after about a half hour of typing that I was able to cross 100WPM and that put me at the lower end of the high scores chart. I hope you've been able to do better. I can't imagine how some people manage to exceed 180WPM.

VLC Player 0.9.2

VLC Player 0.9.2 offers several U.I. improvements to one of the most widely used video players. For the uninitiated, the VLC player is like a swiss army knife as it can play just about any audio or video format that you can throw at it.

In full-screen mode, the playback controls offer ease of navigation with the mouse. At times, the player does seem to return to window-ed mode but it's just a slight annoyance compared to the versatility of the player. I'm sure we won't let a little detail like that come in the way of watching Death Race.

ASP.NET Authentication Web Service

The ASP.NET authentication web service is a really cool way to avoid using the UpdatePanel, but you may want to think about it when you've got a really funky custom-built Membership provider.

When I started building a conventional ASP.NET application, I added in the code to load user information into the membership provider as I was retrieving the user object from the database anyway. It got me a little extra performance and everyone was happy.

Then, the need to use AJAX came up and I used the Authentication Service from within client-side Javascript to perform authentication. Using a regular user account to log into the system resulted in an error; further investigation revealed that the session object wasn't accessible so I looked around for any setting that would enable accessing session state. Unfortunately, there was none :-(
I then added an extra call from the client-side script to call another web method that would load the user object into a session variable to avoid errors on other pages.

I guess sometimes, a performance hack can come back to bite you.

Monday, September 15, 2008

Extending bound field may not be what you want

I read an article by Oscar Peli on extending the bound field class and I thought it would be a great way to put some order into my grid views by enabling validation. It turns out, that's not such a good idea and it's better to stick with the plain ol' "Convert to Template Field" option that the GridView column editor gives you.

When I replaced the bound fields in my class with an extended version that added validators, I couldn't even click on the Edit link next to the data as that would cause a validation and the validation error resulting from it would prevent the gridview from switching to edit mode.

Perhaps it's because my GridView is in an UpdatePanel?

Friday, September 12, 2008

When the designer.cs bites back

A couple of minutes ago, I replaced a few Button controls with ImageButtons in an ASP.NET application and decided to roll them back using the VSS rollback feature. Everything should be back to normal, right? Well, I rolled back the ASPX files. The application keeps displaying an error for the designer.CS files for each of the pages because the type of the control defined in the designer.cs file does not match the type declared in the .aspx file. I opened the page in Visual Studio, switched from source view to design view and it worked for a page so I tried to do it for the other pages. However, Visual Studio decided to hang on me after the first page. I then just gave up on it and went to the designer.cs file to manually change the types. I think I’m beginning to like the Web Site project better than the Web Application project in Visual Studio.

Sunday, September 7, 2008

Retrospective / Post Mortem Analysis

A key element of agile development is to periodically, or at the end of the project, review progress in retrospective and adapt accordingly. This is known by many names:

  • Retrospective

  • Post Mortem Analysis (PMA)

  • Lessons learned

  • De-briefing

  • Post project review

  • Blame and flames

  • Post Partum



Irrespective of what you call it, you have got to discuss certain aspects of the project for the review to have significant value. Reflecting on the original development schedule and the timeline according to which the project was delivered, you can identify estimation errors & design defects that you can try to improve on for other similar projects. You can get feedback on the software processes in place; the effect of the processes should be measurable Eg. defects/KLOC (avg. no. of defects for 1,000 lines of code). Early warning signs for problems can be identified if the project did run into rough seas at some point. This analysis would also evaluate the effectiveness of design reviews, code reviews and Q.A. processes.

Saturday, September 6, 2008

Javascript: Implicit variables are global

Unlike the case in some programming languages, using implicit declaration for a variable in Javascript makes it global. Take a look at the code below:

function foo() {
x = 3;
}

function foo2() {
alert(x);
}

Function foo() *appears* to have a variable 'x' declared within it's scope. Looks can be deceiving, as they say. Unless there is a var declaration, this x is visible globally so if we ran foo() followed by foo2(), foo2() would display an alert dialog with the number 3.

I guess it doesn't really matter much as the code runs within the browser sandbox but you would expect trouble if it were a server-side application and your developers were unaware of this little nuance.

Credits: I have Michael Freidgeim to thank for this bit of info as I read about it from his blog.

Thursday, September 4, 2008

LiveTrace on Black & White images

I tried running Adobe Illustrator's LiveTrace against a black & white image and the results were pretty bad - I ended up having most of the objects in the image joined together in a single path so I ended up doing a manual trace.



I applied the Stamp-Sketch effect to turn it to black-and-white.

Wednesday, September 3, 2008

Google Chrome Browser


Is it Opera? Is it Firefox? No, it's Chrome!

Google has just made it's entry into the web browser business. So, web developers, it means you've now got to make your websites compatible with Internet Explorer, Firefox, Opera, Safari and Chrome (and Konqueror).

Here's the link to download Chrome.

Monday, September 1, 2008

Illustrator LiveTrace: Vector-izing in under 2 mins

Remember my post from June when I mentioned about the LiveTrace feature in Illustrator? I used it to vector-ize an image and it did so in a minute and a half (1 min. 30 sec.). I took away the background, made some corrections to the paths and exported the image to a PNG.

Here's the result:



The sweet little girl in the picture is Preethi, aged 11. She's the one who showed me how much fun kids really are. Although her parents died in a car crash about 2-3 years ago, she still has a pretty positive outlook.