Just sharing some of my inconsequential lunch conversations with you... RSS  

Wednesday, January 17, 2007

Don't ever blog on corporate sites

Here's another example of why we shouldn't blog at corporate sites:

So it's with some surprise that I see IBM's former Fellow, "Father of Websphere" Don Ferguson, is already in the process of being airbrushed out of history. His blog already redirects to the home page for IBM's dW bloggers (he's still listed as I type this) despite the cached version showing no signs of being any less defensible than it was a month ago. You can see an older version in WayBackMachine. It seems that, now he works for Microsoft, his views are retrospectively unacceptable. Or is there another explanation?


Scoble is right:
Blogs should never be erased — for any reason. That breaks the Web.

taken from: Scobleizer

Tuesday, January 16, 2007

REF: How to: inject StateValue objects using constructor injection

Watch out for Mariano Szklanny, he has been posting some great articles, like:

The Composite Web Application Block included in the Web Client Software Factory has a very useful class named StateValue that allows you to use the ASP.NET Session and still keep you classes testable. To use it, you just have to declare a public field in your class as shown in the following code.

REF: Web Client Software Factory: Add View (with presenter) Recipe

The Web Client Software Factory has a recipe named Add View (with presenter) which automatically creates a view with presenter implementation for you. The generated code for the view looks like this.

Sunday, January 14, 2007

User Experience Specification

Here's an example of a clear and simple user experience specification, taken from orcas next gen continuous integration.

Thursday, January 11, 2007

Uninstalling Windows Applications

Uninstalling Windows Applications is not always as simple as it should. Sometimes the uninstaller just fails, making impossible the installations that demand previous uninstall.

Microsoft has this little utility that can help you here: Windows Installer CleanUp Utility.

Prior to that, if you want a decent uninstaller application, not the XP one, please try: myUninstaller. And yes, you can search for a string in the installation's list :)

Monday, January 08, 2007

REF: Bringing down an entire ASP.NET web site for maintenance

in: infoQ


From time to time operations may find the need to bring down an entire ASP.NET web site for maintenance. And of course a warning message indicating how long the maintenance will take would be useful. ASP.NET 2.0 makes this easy with the magic file known as App_Offline.htm.

By simply placing a file named App_Offline.htm in a web site's root folder switches the site to maintenance mode. The app-domain is shut down and all incoming requests return an error code with the contents of the App_Offline.htm. Once maintenance is complete and the file is deleted, the next request will restart the app-domain.

In order to prevent Internet Explorer from showing "Friendly Http Errors" instead of your message, developers should ensure the App_Offline.htm is at least 512 bytes long. If you simply don't have that much content, the file can be padded with HTML comments or other hidden text.

Sunday, January 07, 2007

Tank god for VM disk snapshot technology

After installing Team Explorer on my "Orcas" Virtual Machine, Visual Studio stopped working. As I wasn't in the mood to look for a solution, I just shut the VM rolling back the file system changes.

I was delighted with this capability, as the OS was a W2K3, where I didn't have restore points.

About the Team Explorer/Orcas incompatibility, I didn't find any clue. If someone's know what's happening, please drop me a comment. Tanx in advance.

Friday, January 05, 2007

The Architecture Journal

Strangely enough, there are still some good free journals out there. A great example is the The Architecture Journal.

Thursday, January 04, 2007

Benchmarking data tiers

Choosing your data tier is not always an objective choice. So I've decided to setup a data tier benchmarker. Here's how it works:

First I started choosing a simple entity: a Category.

Then I defined a simple data tier facade for it, as follows:

public interface IDataFacade

{

void Create(ISessionFacade sessionFacade, Category category);

Category Read(ISessionFacade sessionFacade, int key);

IList<Category> PagedRead(ISessionFacade sessionFacade, int page, int pageSize);

void Update(ISessionFacade sessionFacade, Category category);

void Delete(ISessionFacade sessionFacade, Category category);

}

 

As you certainly already noticed, I create another interface to façade the data tier session - ISessionFacade.

 

Then I created the integration test as follows:   

 

Category newCategory = new Category();

newCategory.Description = "testing"; 

//

// C r u d

dataFacade.Create(sessionFacade, newCategory);

//

// c R u d 

// Read

Category category = dataFacade.Read(sessionFacade, newCategory.Id);

Assert.AreEqual<string>(category.Description, newCategory.Description); 

// PagedRead

IList<Category> categories = dataFacade.PagedRead(sessionFacade, 1500, 10);

Console.WriteLine("categories.Count: " + categories.Count); 

//

// c r U d

category.Description = String.Format("{0}-{1}", category.Description,DateTime.Now.ToLongTimeString()); 

dataFacade.Update(sessionFacade, category);

sessionFacade.Flush(); 

//

// c r u D

dataFacade.Delete(sessionFacade, category);

sessionFacade.Flush();

 

 

The code above was executed on 8 threads, each iterating over 16 session openings, each callings 64 times.

 

Now for some fun: I implemented a NHibernate and a SqlClient version of this facades, for example:

 

public void Create(ISessionFacade sessionFacade, Category category)

{

((SessionImplementation)sessionFacade).Session.Save(category);

} 

And the result was: NHibernate implementation was 15% faster! Isn't it great?

Ok, I must confess, the SqlClient code didn't use parameters, that's probatly why. Yet, an excelent result for NHibernate.

And yes, it's true, this doesn't prove NHibernation's scalability. But it's a start, and at least can be backed by real data.

One of these days I'll benchmark NetTiers and LINQ for SQL, and post the results back here. Cya there :)

Wednesday, January 03, 2007

REF: The Iceberg Secret, Revealed

Yet another great posting on Joel on Software.

Here are some of my favorite highlights:

Customers Don't Know What They Want. Stop Expecting Customers to Know What they Want. It's just never going to happen. Get over it.

...

2. "We built it exactly the way they wanted. The contract specified the whole thing
down to the smallest detail. We delivered exactly what the contract said. But
when we delivered it, they were crestfallen."
...

3. "Our miserable sales person agreed to a fixed price contract to build what was basically unspecified, and the customer's lawyers were sharp enough to get a clause in the contract that they don't have to pay us until 'acceptance by customer,' so we
had to put a team of nine developers on their project for two years and only got
paid $800."

...

Important Corollary One. If you show a nonprogrammer a screen which has a user interface that is 90% worse, they will think that the program is 90% worse.

...

Important Corollary Two. If you show a nonprogrammer a screen which has a user interface which is 100% beautiful, they will think the program is almost done.

REF: An overview of virtualization methods, architectures, and implementations

IBM has posted this interesting article about virtualization history and implementations over Linux. Apart from the history, the article explains in a very simple way several types of virtualization.

in: http://apple.slashdot.org/article.pl?sid=07/01/02/1336221&tid=3

Tuesday, January 02, 2007

Is D the answer?

What's D?

D is a general purpose systems and applications programming language. It is a higher level language than C++, but retains the ability to write high performance code and interface directly with the operating system API's and with hardware. D is well suited to writing medium to large scale million line programs with teams of developers. D is easy to learn, provides many capabilities to aid the programmer, and is well suited to aggressive compiler optimization technology.

D is not a scripting language, nor an interpreted language. It doesn't come with a VM, a religion, or an overriding philosophy. It's a practical language for practical programmers who need to get the job done quickly, reliably, and leave behind maintainable, easy to understand code.

D is the culmination of decades of experience implementing compilers for many diverse languages, and attempting to construct large projects using those languages. D draws inspiration from those other languages (most especially C++) and tempers it with experience and real world practicality.



Is D fun? Yes. Is D aligned with my vision of a compiled languages enriched with some of the dynamic languages artifacts? Definitely yes! Is D the answer to my problems? Nope, in me case, I'll still put my hope on C#. Will D be the language of choice for OS developers? Hard to predict, but probably not.

Still a nice language...

Development Catharsis :: Copyright 2006 Mário Romano