First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

April 2008 Blog Posts

Finally someone pronounced my name correctly

Last week Craig Shoemaker published the 50th show of this great Polymorphic Podcast: ASP.NET MVC Resources.

Around 4:15 he says hello to me and thanks me for pointing him to some resources, and doing so he is the first English speaking person I know that pronounced my name and also also my surname right.

I lived in a English speaking country for 8 months and it was frustrating to never hear my name pronounced correctly even after I put an audio file pronouncing it the Italian way (JB almost got it during my video interview), so it's great to hear someone who never met me to do it right.

So, if you are wondering how Simone Chiaretta is pronounced, just listen to the podcast, or to the MP3 file I put on my blog last year.

And again, thank you Craig for mentioning me in the podcast and including my two articles among the 47 resources.

Where I'm going to talk this Spring

This year it's going to be a busy spring for me:

  • April 26th/27th: Loci - Evoluzione generativa: Aurora - an art exhibition where there I presented a short video I made with Processing (on Vimeo 2 drafts of the final video) - Porto Sant'Elpidio
  • End of May: Introduction to ASP.NET MVC - This is a private 2h workshop I'll deliver for my colleagues at Avanade Italy - online
  • June 14th: UGIALT.NET conference - The second conference of the the Italian ALT.NET group. Actually not a real talk, but an OpenSpace meeting... but I'll probably be among the moderators of the group on web development - Milano
  • June 27th: Testing Web Applications - A event organized by DotNetMarche about testing applications: I'll talk about the ASP.NET MVC Framework and how it makes easier to test web applications - Fano (PU)


Technorati Tag: ,,,

Relocating to Bermuda


It's not April 1st...

And it's not about me...

A friend of mine, a member of the Italian .NET user group, is doing the big step, and moving to Bermuda, the sunny, surfy, sharky islands in front of Florida.

I did the same more than one year ago and I know how difficult it is to leave all your friends, family and completely change the way you used to do, and start a new life somewhere else, so I wish him all the best.

He is blogging his experiences relocating to Bermuda, how to get a work permit and all that stuff.

I know there is a .NET UG in Bahamas, founded by Kyle Baley, but I didn't know there was some interest in the IT in Bermuda as well.

If you are living in Bermuda or you know someone else doing .NET in Bermuda, please contact Raffaele, so he will not feel alone among tanned surfer and divers.

Technorati Tag: ,,

My ALT.NET geek code

Lorenzo becoming a "official" evangelist

lorenzo-barbieri Another important community member is joining Microsoft. This time is not the member of some cool opensource project, but is a very active blogger and TFS expert Lorenzo Barbieri.

Today it's his last day as "free man" in his old company, and from tomorrow he will start his new career as Developer Evangelist for Microsoft Italy, and will start to go around Italy and Europe trying to push TFS to everybody.

My best wishes and congratulations to Lorenzo. Hope he will not stop blogging and taking part in the community as he is doing now.

Having a crush on jQuery

A few weeks ago I started to play around with jQuery and I already banged my head against some small gotchas of the framework. But a comment made by Jake Scott opened my eyes:

I recommend you read (if you haven't already) Manning jQuery in Action, its the best book on Javascript ever :)

jquery_logoEven if I might not second the "best book on Javascript ever" part of the comment, I got the book yesterday afternoon and I already read 4 chapter of the book while on the train. I've to say that the books is really well written and easy to understand. And I think I have a crush on jQuery.

I've been using Javascript since a very long time - probably it's one of the first programming language I used when I started developing for the web in '96 - but this framework puts together all the good things from the various programming languages used on the web and everything become so easy to write, and in less time.

You have a bit of CSS, a bit of fluent interfaces (they call it action chaining), you've got also a little feeling of Linq, you have a tiny library (only 15Kb minified and packed) that is very easy to extend with extension methods, and a huge ecosystem of already available plugins. And of course you have Ajax and animation effects.

One of my favorite thing is the way jQuery abstracts the onLoad event of the page:

    alert("I'm loaded, but the images not yet");

The cool thing is that the function defined runs when the DOM tree has been loaded, not, as with the standard onLoad event, when all the element of the page (including all the images) have been loaded. This avoids that a image that takes too long delays the execution of start-up scripts as sometimes happens now when the Lightbox effect doesn't work because some external images or scripts are slow to load.

So, from my first impressions: CSS + Javascript + Linq + fluent API + anonymous methods = jQuery.

OK, there are some gotchas, but which framework doesn't have some?

I'm starting to use it for the UI of the new features in Subtext 2.0 and I might add some goodness to my blog. Let's see if it turns in real love.

Technorati Tag:

MacBook invasion at MVP Summit 08

I was looking at blogs with reports on the MVP Summit 08 and on a post from a TFS MVP from Canberra I found this picture of one of the meeting rooms:


In this little portion of the room 3 MS MVPs are using MacBookPro (highlighted with the black circles)... are MacBooks becoming one of the favorite brands of laptops for .NET developers?

Technorati Tag: ,

OutOfMemoryException using ReSharper 4

Last week, while working on the new features for Subtext vNext, I encountered a strange problem that never happened to me before. I was running the latest "works here" Nightly Build of ReSharper 4 (build num 767) and started getting tons of OutOfMemoryException.

The problem started to happen when, after developing all the DataAccess and BusinessLogic with a TDD approach (so no UI involved), I started adding textboxes and method calls in aspx pages. So I guess the problem has something to do with handling aspx files and all the added complexity that a simple class file doesn't have.

It seems to be quite a old issue, since it was reported in 2006 on ReSharper 2.

Today, while browsing R# wiki I found a page that contains a fix for this problem:

OutOfMemory exceptions are often caused by address space fragmentation in Visual Studio process. For users experiencing excessive OutOfMemory exceptions we provide a tool which overrides Visual Studio's memory allocation policy to ensure more continuous address space for Common Language Runtime.

To use the tool download file, unpack it and run devenv2005_wrap and devenv2008_wrap instead of devenv.exe for Visual Studio 2005 and 2008 correspondingly.

I just downloaded the wrapper, together with the latest nightly build "works here" (build num 775) and for the moment didn't have the exception yet.

Beware the $(...) in jQuery: $("#elementId") != document.getElementById("elementId")

Lately I've been playing a bit with jQuery, one of the raising javascript frameworks and I found out something I was not expecting to find.

But let's step back a bit: in jQuery the dollar sign function $ is a shortcut for the main function of the framework which is used to select html elements in the page. This $ method accepts a css-like selector as argument, so if you want to select a specific element by its id you have to use the hash: $("#myElementId") returns a reference to the DOM element boosted by jQuery. We can say it's a shortcut to the usual way of getting a DOM element document.getElementById("myElementId").

With this idea in mind, thinking that jQuery added its goodness to the standard DOM Element via extension methods, and after reading on the docs that when called with the id selector the jQuery method returned a DOM Element, I was expecting to get a reference to the real DOM element. So I passed it to an ASP.NET Javascript function and it complained that the DOM element didn't have a style property. Where was I wrong?

It took me a while to understand why I was wrong: the $ method gives a jQuery object that is always an array of Elements, even if the docs say otherwise.


So to the get the real DOM element you have to use $("#myElementId")[0] or the more friendly $("#myElementId").get(0)


So, just to wrap up, $("#elementId") != document.getElementById("elementId"). And comparing to the ASP.NET Ajax Library, it is also different from the $get("elementId") which is exactly the same as doing the getElementById the old way.

It took me a whole afternoon to understand this... I hope this post will save you 4 hours of your time as well.

In The Lounge

As you might have noticed, a few days ago I added to my sidebar an ad space. The reason for the ad is that I joined the Lounge, an advertisement network on the .NET space with quite a few famous bloggers. I'm not in the same with them, since I don't have the same audience and influence, but in another room, the .NET small publisher room, together with Subtext mate and new MVP Steve Harman, "ASP.NET MVC in Action" co-author and CodeCampServer key contributor Ben Scheirman and a few more.

When James Avery says:

Simone Chiaretta is one of the developers of Subtext and a great blogger, I think I have the entire Subtext team on The Lounge now.

He is right. The 3 key developers of Subtext are now in The Lounge (Steve, Phil and I).

Sidebar working on Win2008... almost

As I anticipated a few days ago, I'm trying to install Win2008 on my MacBook, and one of the things I was really missing from Vista was the Sidebar, mainly because I got a few request for enhancements for my CCNET Sidebar Gadget and I wanted to work on it a bit in order to make it better (hoping MS will not drop the only useful feature they added to Vista).

But the Sidebar doesn't run smoothly on Win2008 from inside Fusion: I followed the instructions on how to install it, and it works with "local-only" gadgets but the ones that connect to the internet to get data (like the Weather gadget, the Currency conversion one) don't work. I got to see my CCNET Monitor running once, but then it stopped working as well (as you can see here also running in Unity mode in VMware Fusion).


Seems like they don't even try to ask for the url (no request show up either in Fiddler or WireShark). Might be a security configuration, but I cannot find where to turn it off (and yes, the firewall is already off). And since it's running on a VM in a Mac there are some many things that can go wrong, and the problem can be anywhere.

If someone had the same problem, and solved, please post a comment here... otherwise, I'll keep you posted on this Sidebar on Win2008 saga.

Got my copy of Visual Studio Extensibility

As I mentioned a few weeks ago, my friend Keyvan from Iran just published his first book with Wrox: Professional Visual Studio Extensibility.

Today I got my copy of the book. I never had the need to extend Visual Studio in the past but now I'm building some tools to facilitate the migration of a large project (more than 1M lines of code) from .NET 1.1 to .NET 2.0, so this will really help. Thank you Keyvan for being releasing the book in time to help me with that work project.

Professional Visual Studio Extensibility 

Running Win2008 on my Mac

After reading Damien's post about his Win08 Server installation on his MacBook Pro I decided to try and do the same on my MacBook (without the "Pro").

Since I made the switch to the Mac I always did my little home coding on my old laptop or on my work ones, but now I decided to do more coding and less writing and I prefer to do it at my desk on my 20" Cinema Display, so I need to run Visual Studio on my Mac. Here the need to install Windows.

Setting up Windows 2008 Server on the Mac with Boot Camp was pretty easy:

  • Create a partition for the Windows Installation using the Boot Camp Assistant (I allocated 15GB)
  • Insert the installation CD, reboot and install Windows
  • Once Windows loads up you need to install the Drivers from the Boot Camp CD
  • Optimize Windows2008 Server to run as Workstation

I think some drivers are not supported since I cannot use the specific features of Apple trackpad or I cannot use the iSight camera (probably the Vista drivers are not working well on Windows 2008 Server), but most of the Apple hardware is working fine (I hope Boot Camp will be upgraded to support Win2008 soon).

But I'm not that concerned because I want to run Visual Studio while using my and Safari browser, so I installed VMWare Fusion so that I can see Windows apps as if the were native on the Mac.


I still have to install Visual Studio and do some real works, but I'm pretty impressed with the setup for the moment.

What's happening with Subtext?

SubtextLogo_6.pngIf you subscribed to subtextbuild twitter feed or added Subtext build server to the list of CI server you are monitoring with CCTray, or better, the CCNET Monitor gadget for Vista you might have noticed that the number of builds raised a bit in the latest days: the reason is that finally the Subtext team is having a bit more spare time than before and we are planning to release Subtext vNext pretty soon with some exciting new features.

Code Monkey Song

A song by Jonathan Coulton, a computer programmer and self-described geek turned folk rock singer: Code Monkey.

Picture by Len
Seems like there quite a lot of videos for this song.

via Travis Illig on twitter

The most important quality of a developer: Self-criticism

Last week I visited in Milan an art exhibition on Francis Bacon, "the last of the great 20th century masters in painting".

Together with his paintings, attached to the walls there were quotes taken from some interviews and one really made me think:

I think an awful lot of creation is made out of, also, the self-criticism of an artist, and very often I think probably what makes one artist seem better than another his that his critical sense is more acute. It may not be that he is more gifted in any way but just that he has a better critical sense.

He was a painter so obviously he was talking about artists, but you can replace the word "artist" with "developer", "architect" or "writer" and the sentence will still be true: it applies to almost all jobs that involve some kind of creative process, like development, designing architecture of applications, writing tech articles and blog posts.

Don't just implement the first design you come out with, but try and refine looking at it from different angles before to start writing code.
Don't just release the first piece of code you come out with, but do a self review and try to make it clearer and better.
The best developers/architects are the ones that always criticized their own work in order to make it better.

kick it on

Congratulations JD!!

The Golden Boy of the Wellington .NET user group (aka JD) just received his MVP Award for his contributions to the ASP.NET community in Wellington and NZ: Congratulations JD!!

I remember him as one of the first developers from the community I met last year back in January, when I had my first talk at the Welly UG.

Back to coding

After all those months where my main community related activity was writing articles, this weekend I decided to go back into coding:

But not only coding, also a bit of writing since I'll go with the series about ASP.NET MVC on DotNetSlackers.

So, stay tuned...