Friday, June 23, 2006


Microsoft Robotics Studio

Microsoft Robotics Studio is the excuse I have been waiting for to buy a robotics kit. I am particularly tempted by the Lego NXT as I have the added excuse of playing Lego with the kids :-) It is too warm in Milano these days to stay inside and work have fun with robotics but I am looking forward to having some fun this autumn.

The Community Technical Preview comes with with samples and tutorials and can be used to develop applications on different hardware. The Microsoft Robotics Studio Simulation Engine lets you play around without having a physical robot. Microsoft Robotics Studio offers:

  1. A scalable, extensible runtime architecture that can span a wide variety of hardware and devices. The programming interface can be used to address robots using 8-bit or 16-bit processors as well as 32-bit systems with multi-core processors and devices from simple touch sensors to laser distance finding devices.

  2. A set of useful tools that make programming and debugging robot applications scenarios easier. These include a high quality visual simulation environment that uses the Ageia Technologies™ PhysX™ engine.

  3. A set of useful technology libraries services samples to help developers get started with writing robot applications.

Thanks for the tip Michele

Thursday, June 22, 2006


Microsoft Certified Architect

I am not a fan of Microsoft Certifications but the new Microsoft Certified Architect program looks promising:

The Microsoft Certified Architect Program will validate top industry experts in Information Technology Architecture. These professionals will likely have 10 or more years of experience in Information Technology with at least three years of experience as a practicing architect, and will possess strong technical and leadership skills and form a distinguished community. Unlike other Information Technology certifications, this credential will be granted by industry architects, as candidates will be required to present to and be approved through a rigorous review board process overseen by previously certified architects.

A longer and more expensive process but hopefully the certification process will give more accurate results:

  1. The candidate applies for the program by completing the program application and paying the application fee.

  2. The candidate's application is assessed relative to the established criteria, such as years and type of experience, architectural knowledge, and complexity of technical solutions to determine whether the candidate will advance in the application process. If he or she does advance, the next step is a telephone screening with an MCA who will determine whether the candidate is accepted into the program.

  3. Upon acceptance into the program, the candidate will work with mentors to prepare for his or her review board interview. Additionally, the candidate will continue to work on his or her documentation. The documentation consists of a dossier that includes a work history, an architectural solution case study, and a document specifying instances in which the candidate has displayed the program competencies.

  4. As soon as a mentor determines that the candidate is ready, the candidate submits his or her final documentation and schedules the review board interview. For more information about the review board interview, see Review Board Interview.

  5. At the conclusion of the interview and a positive vote from the review board, the candidate is awarded the MCA credential. For information about the composition of the review board, see Review Board Composition.

Friday, June 9, 2006


How to fix "java.lang.OutOfMemoryError: unable to create new native thread"

I recently came across this exception on a couple of java systems that use many threads  java.lang.OutOfMemoryError: unable to create new native thread. The strange thing was that the JVM had been assigned a lot of memory (1.5GB) and that it had at least half the memory available. Michele found this article that points out that the more memory you give to the JVM the more likely you are to get java.lang.OutOfMemoryError: unable to create new native thread exceptions when you have many threads.

Which makes perfect sense when you think about it. Each 32 bit process on Windows has 2GB "available" memory as 2GB is reserved to Windows. In my case the JVM grabbed 1.5 GB leaving 500MB. Part of the 500MB was used to map system dlls etc in memory so less than 400 MB was left. Now to the crucial point: When you create a thread in java it creates a Thread object in the JVM memory but it also creates a operating system thread. The operating system creates the thread with a thread stack in the 400MB that is left, not in the 1.5 GB allocated in the JVM. Java 1.4 uses a default stack size of 256kb but Java 1.5 uses a 1MB stack per thread. So, in the 400MB left to process I could only generate ~400 threads. Absurd but true: to create more threads you have to reduce the memory allocated to the JVM. Another option is to host the JVM in your own process using JNI.

This formula gives a decent estimate for the number of threads you can create: 
(MaxProcessMemory - JVMMemory - ReservedOsMemory) / (ThreadStackSize) = Number of threads

For Java 1.5 I get the following results assuming that the OS reserves about 120MB:
1.5GB allocated to JVM: (2GB-1.5Gb-120MB)/(1MB) = ~380 threads
1.0GB allocated to JVM: (2GB-1.0Gb-120MB)/(1MB) = ~880 threads

Java 1.4 uses 256kb for the thread stack which lets you create a lot more threads:
1.5GB allocated to JVM: ~1520 threads
1.0GB allocated to JVM: ~3520 threads

I have not tried the 3GB switch but it should in theory let you create more threads.

Thursday, June 8, 2006


Full Source Code for the Built-in ASP.NET 2.0 Providers

The full source code for the following built-in ASP.NET 2.0 providers are available for download:

  • Membership

  • Role Management

  • Site Navigation

  • Session State

  • Profile

  • Web Events

  • Web Part Personalization

The source code comes with VS 2005 projects for building the code.

More info on ScottGu's Blog


Expression - Community Technology Preview releases

Microsoft delivers alternatives to several Adobe products with the Community Technology Preview release of the Expression family:

The Microsoft Expression blog has more details.

Tuesday, June 6, 2006


I am full: no more NDR spam please

I have had enough of NDR mail spam. I just came back from Mugello and I was met by this inbox:

(1 legitimate e-mailif you can spot it)

SPF does not seem to fix the problem so I am left with the following options:

  1. Quietly drop on message in my e-mail client (a major pain when I download mail with a pocket pc)

  2. Remove the wildcard routing on This means the NDR will bounce back to the postmaster sending me the NDR (a pain for the innocent 3rd party but I save bandwith and -a lot of time- hunting down spammers)

Suggestions anyone?

Thursday, June 1, 2006


Going to Mugello

I'm going to Mugello. Time to forget about work and spammers that drive me crazy and have some fun! No PC, no blog an no stress until next week :-)

(Picture from Google Earth)

The weather forecast is not the best but I am sure I will enjoy it anyway. The MotoGP race last was fantastic and this year I will have the opportunity to see all of it: free practice, qualifying as well as the races in the 125, 250 and MotoGP categories.