Monday, December 27, 2004

412.aspx

Disaster relief from donating bloggers

We had a scary day yesterday as a very close friend of us is on vacation in Sri Lanka. Luckily it turned out that she was in the middle of the country and was unaffected by the disaster. I was wondering what we can do to help the victims of the earthquake and tsunamis when I came across this post by Greg Hughes



"This is the right time to stop what you normally do, get out of your little digital world that you assume is all-defining and all-encompassing (it’s not, really) and come back to reality...Very real people are experiencing very real pain, and you can do your part to help them recover."


Nick Bradbury is donating what he earns from TopStyle and FeedDemon to the International Red Cross. I know it is not much, but I will donate what I get from Google AdSense in December from my blogs Crap And Crapability, Cool Or What and /egilh to the International Red Cross.


I hope more bloggers follow the example of Dan Gilmore and donate what they can to help, or let Scob know if they have other suggestions for helping.

Wednesday, December 22, 2004

403.aspx

10 Tips for Writing High-Performance Web Applications

The January 2005 edition of MSDN Magazine has a list of tips for writing high performance ASP.NET applications.


Nothing new, but a useful reference for people that are new to ASP.NET development.


 Via [MSDN Just Published]

402.aspx

VMWare 5.0 Public Beta

VMWare is very useful when testing playing with the latest and greatest betas or developing software that can will break your machine. There are several new features in VMWare 5.0:



  • V2V Assistant: Creates VMWare Virtual Machines from Microsoft Virtual PC virtual machines

  • Movie Capture of all the operations you do in the virtual machine

  • Performance Enhancements

  • Support for 64-bit Hosts

It can be download from the BetaNews FileForum


Via [BetaNews

Thursday, December 16, 2004

400.aspx

How and why people use camera phones

Microsoft Research has researched the use of Cameraphones. I'm about to get my first camera phone tomorrow, a Nokia 6630. Wonder what kind of user I will be.



In this paper we describe an in-depth study into how people (adults and young people) use their camera phones. Using a combined method of interviews and grounded discussions around a sample of actual photos, we look at people's intentions at the time of capture, subsequent patterns of use, and desires for future technology. The result is a 6-part taxonomy which provides a framework for describing the way images are used both for sharing and personal use, and for affective (or emotional) reasons and functional use. On the basis of this framework, we discuss the value of camera phones and point to ways in which future design may encourage its emerging value.


One thing is for sure: I can think of one occasion when I really wanted to have a camera handy!


I have used a Nokia 6600 the last few weeks while I am waiting for the replacement for my broken phone. Didn't use the camera much but I got the chance to try it the last time I was in London waiting for a flight.


Via [MSDN Student Flash]

Wednesday, December 15, 2004

398.aspx

SqlClient has a Max Pool Size setting of 100

Another lesson learned: Increase the Max Pool Size setting on systems that does a lot of requests to the DB if you use ADO.NET


I had problems earlier this week with a custom session management system that handles 15.000.000-20.000.000 requests per day per machine but is designed to handle a lot more.  The DB is pretty well optimized so call times for each query is only a few milliseconds in normal conditions. With 17.500.000 requests per day there are ~200 requests per second to the session management system with peaks that are a lot higher due to traffic distribution throughout the day.


I didn't realize that the ADO.NET Sql Client by default uses max 100 items in the connection pool. I expected it to grow the connection pool as needed to handle the increased traffic. I was wrong. When it reaches 100 connections it starts queuing requests. With >200 req/s it quickly reached the 100 item limit when the DB slowed down during batch operations.


The system scales a lot better with increased traffic after we doubled Max Pool Size setting in the SqlClient ConnectionString like this: 



Data Source=...;User ID=...;Password=....;Initial Catalog=...;Min Pool Size=10;Max Pool Size=200


 

Monday, December 13, 2004

388.aspx

Koders.com

Koders.com has tons of source code. Great if you're looking for ways to use a particular function, how to manage a particular error code or if you look for an implementation of a particular algorithm.


The search results can be filtered by language as well as license.


 

385.aspx

Google Suggest: Better than Auto Complete?

Impressive. The Google Suggest beta does a great job of auto complete for the .NET APIs:


382.aspx

The Holy Title of Software Architect

The To Software Architects: Serve End Users, Not Your Egos article on DevX is something to keep in mind for all software architects.



At one organization, they had a diagram on one wall that was 14 feet long and 4 feet high with tiny print. The architect was so proud of his masterpiece, his brilliance, his grand work. Minor amounts of investigation revealed that none of the team leads had the slightest clue what this massive diagram really meant, but it sure looked cool and impressed the executives when they visited the development area.


Individual developers had received smaller diagrams, filled with blocks and arrows, that told them exactly how to build their piece of the application. While attempting to interpret the diagrams, they had to resort to Googling the obscure patterns referenced and were made to feel incompetent for not knowing what a "Grafter" pattern was. Diagramming is about communicating what you're building, not about conveying your ability to memorize obscure names for common solutions.


I'm sad to admit that I see this behavior at work as well (I guess you better stop reading if you work with me:-) What do you tell a developer that proudly brings you the latest creation: a UML diagram that implements that latest and greatest patterns for something that can easily be done single class? Most of them do it to seek approval and show how much better they are than the other developers. Others suffer from the beta syndrome: the need to use the latest and greatest technologies and software.


I do my best to KISS every day as long as it doesn't hurt performance too much.  Keeping it simple has several benefits:



  • It contains less bugs

  • It is easier to maintain

  • It is easier to explain the design to the developers.

Or in the words of David Talbot:



If you're in charge of the software architecture, whether or not you've been bestowed the holy title, keep the focus on designing a system that works. Keep your diagrams simple and understandable. Don't pay too much attention to whether or not it is a proper Booch diagram or whether it utilizes GoF patterns. Don't try to micro-design every developer's piece of the whole, just where it integrates into the whole. Build the system to do what it needs to do, don't gold plate what the users will never see nor care about.


Just build good software on time and within budget.

Thursday, December 9, 2004

379.aspx

Pocket PC .NET CF encryption

.NET comes with a wide range of  cryptography options. The story is different on the .NET Compact Framework as cryptography routines have been removed from the .NET CF runtime to save precious memory.


Cryptography is an interesting subject in itself so I decided to port AES/Rijndael, the 3DES replacement, to C#. The official AES site links to sites with AES implementations in many different languages. I had a look, and decided to port Mike Scott's C implementation to C# and add some routes.


Download .NET CF C# AES source code


Next step for the Pocket PC password manager will be an encrypted CSV dataset or stream.

378.aspx

Ahhh! What a great start of the week: 3 days at home

Tuesday was a public holiday in Milano and Wednesday was a public holiday in all of Italy. I took Monday off so I have had 5 days working at home on “hardware” stuff: building a set of stairs, making a new room in the cellar, fixing the gate, hanging up Christmas lights and decorations with the kids.


Another week or so at work and I'm off for Christmas vacation. What a relaxing way to end the year :-)

Wednesday, December 1, 2004

371.aspx

Larry's Coding Conventions

A great, easy to follow, guideline for coding style.


I was surprised to discover that I'm using the same coding style in C# as Larry Osterman uses in C/C++ with some minor exceptions:



  • I start method names in lower case, i.e. I use printError instead of PrintError, (leftover from my Java days)

  • I ALWAYS put the constant part of an evaluation on the left: if (S_OK == result) is safer than if (result == S_OK)
    I know it doesn't really matter that much in C# as the compiler warns you but; better safe than sorry.

For some reason I end up swapping back to hungarian notation when I program in C/C++ for Windows. I guess I can "blame" Programming Windows by Charles Petzold for that :-)