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)

January 2007 Blog Posts

Photocasting with FeedDemon

A few months ago, following the advice of my dear friend Janky, I switched from RSSBandit to FeedDemon. I couldn't stand anymore that an rss reader was using more memory than Visual Studio Team Suite while debugging a Pocket Pc application running on an emulator smile_omg.

It costs a few bucks, but allows me sync the read feeds between my laptop and my pc at work, so I don't have to read the same posts twice: this is possible since FeedDemon uses Newsgator to retrieve the feeds.

Last week I saw on Nic's laptop a nice effect on his FeedDemon (yes, he is using FD, too...): he had all MediaRSS feeds (the one with photo enclosures, mainly all the ones from Flickr) with a nice thumbnail row on the top of the newspaper view.

I couldn't get it working, even using the same style he was using.

Digging inside the newsgator support I found this thread: Preview Pane for Pictures.

It basically says that this MediaRSS thing is supported in FeedDemon, but not in Newsgator, so, in order to make it work, you don't have to sync the feed with the server, but only have it on the local machine.

And, with Flickr, you have to subscribe to the rss_200_enc format, and not to the atom one (which is the default one).

Here is what I achieved, subscribing to my wife Flickr (now mainly pics from her trip in Patagonia) feed in the rss_200_enc format (the one with enclosures)

Eating My Own Dog Food - Subtext v1.9.4.x

As Steve already did, I'm eating my own dog food, too...

So this blog now is running on Subtext 1.9.4. How can you be sure I'm not kidding you?

Just have a look at the header section of this page: it now includes a new html meta tag:

<meta name="Generator" content="Subtext Version" />

So, please, if you can, poke around, and eventually report bugs in the usual way: submitting them to sourceforge.

CruiseControl.NET 1.2 Released

Owen Rogers sent the announcement on the mailinglist a few minutes ago. CCNET has a new version: 1.2.

Here are some of the new features:

- automatic checkout from svn and cvs (there are performance improvements for cvs as well)*
- project-level view of the server log through the webdashboard
- better clean up of child processes for more rapid stop/restart of the ccnet server
- better mono support
- view a project's configuration through the webdashboard.

And go to the project website for the complete release notes.

If you are a CVS user you need to change a few things in your config file.

Here is the direct link to the download on Sourceforge.

Ice Climbing

Unfortunately I cannot do ice climbing here in Wellington (well... I cannot do real rock climbing either in Wellington).

Today I was looking for some climbing videos on YouTube and I just found this one: not real climbing, it's a cartoon, but  really really funny.



UPDATE: Since many newsreader don't display embedded objects, this is the link to the video Ice Climbing

ASP.NET AJAX 1.0 released!!

It's official, ASP.NET AJAX (formerly known as ATLAS) has just been released. Everybody is speaking about it: ScottGu, Nikhil Kothari.

Here are the official download link, the link to the docs (with video tutorials, too), and, for readers that still don't know what ASP.NET AJAX is, there is also an "About" page.

Also, the ASP.NET Podcast by Wally produced a lot of nice shows about ASP.NET Ajax and its Control Toolkit, both audio only and video.

A funny thing is that the main blog about AJAX, ajaxan, doesn't say a word about it.

UPDATE: A few hours later this post, also ajaxan wrote a post about the release.

Community Credit prizes

After a lot of strange things happened at various post and custom office in Italy, I finally received in New Zealand the prizes I won last year taking part in the Community Credit website competition:

  • Yoda shaped backpack
  • Darth Vader as Potato Head
  • the "50 Jobs worse than yours"
  • stomach ache virus plush toy (I won a set of carnivore plants seeds, but since here in NZ they are a bit paranoid about anything that can contaminate the native plants and animals, we decided to play safe and change prize)

And here are the pictures, taken in my new house in Khandallah, Wellington:



Two SP1 in two days

A month after my first try, yesterday I tried again. I started at 8:30pm stopping all useless programs (RSS Readers, Outlook, Skype, Gtalk, MSN Messenger and all that sort of stuff). Then I stopped almost all window services running, and cleaned all the temp folders (one of which still contained some stuff - 430Mb -  remaining from the other try).

Ready, set, go!!!

15 minutes for the patch to extract itself to a temp folder, then other 10 minutes for the MSI to configure itself. Finally I get the "Do you want to install the Service Pack 1 for Visual Studio 2005..."? I click yes and I go and watch the sunset (yes, in NZ the sunset is at 9pm :-)) and drink a good glass of NZ Pinot Noir (well, actually more than one :-)) with Nic and his wife Leonie, which are hosting me in their lovely house till I find my own.

Two hours and half after I launched the installation I get a popup saying that it needs some more space to continue with the process. Well, it's funny since I had almost 2Gb available on the disk before starting: I move a folder on another drive and then everything works fine. And at 11:30pm, 3 hours since the beginning, I had the SP1 installed on my laptop.

Then today, I decided to install the SP1 also on my machine at work, on Vista. I launched it this afternoon before leaving from work. I hope tomorrow morning everything will be fine, so that I can install, as suggested by some, also the Visual Studio 2005 SP1 Update for Windows Vista Beta.

Here are some links that explain better the problem I had during the installation:


PS: as you may have noticed, with this post I started to use the XFN stuff available in the WLW plugin package available on CodePlex and the XFN relationship addin for Subtext.

Your encryption algorithm may fail moving to .NET 2.0

In my first week of work in Wellington at Calcium, I'm starting to migrate the application from .NET 1.1 to .NET 2.0.

The wizard did correctly almost all of the job, and the only thing I needed to change to make it compile without too many warnings was changing the old (and obsolete) Parameters.Add with the new Parameters.AddWithValue (I think I did it 1000 times).

Once it compiled we had a very strange problem: we are sending username and password, encrypting them using TripleDES, then serializing as string and then sending over the wire with remoting. And of course decrypting them on the server side.

But when they arrived on the other side everything was messed up. Hours and hours of searches on Google brought me to a page on MSDN: CLR Run-Time Breaking Changes.

The problem that was affecting us was the the following:

Short Description: Encoding.GetBytes() may not emit unpaired high or low surrogate characters for certain encodings (e.g. UTF-8 Encoding and UnicodeEncoding).

Description: For Unicode standard compliance, Encoding.GetBytes() will not emit bytes if there is an unpaired or out of order surrogate. This is most obvious if the caller call GetBytes() with one high or low surrogate. In this case, UTF8Encoding and UnicodeEncoding will not emit nothing.

The Unicode 4.0 requires that compliant applications not emit unpaired surrogates. In v1.1, GetBytes() will emit bytes for lone surrogates if the encoding supports it (such as UTF-8 and UnicodeEndcoding). However, this leads CLR not to be Standard compliance with Unicode 4.0.

The change can break application's assumption about that GetBytes() will emit leading high surrogates or mismatched surrogates. BinaryWriter.Write(char ch) is one example of being broken.

User Scenario: If the application assumes that GetBytes() will emit high or surrogate if it is called with one surrogate (1/2 of the pair) at a time, or will emit a surrogate at the end of the character buffer, they may lose the ability to correctly generate surrogate pairs.

To make long story short, what the above means is that the GetByte method will work only if it is dealing with real string and not just sequence of random bytes.

That is what we used in our encryption code: we encrypted the password (the encryption method returns an array of bytes) and the serialized to a Unicode string. But since now the GetByte method will throw errors in case of "strange" strings we were not able to deserialized the string correctly.

Looking around more I found a blog post that gave me the solution to solve the problem: just serialize and deserialize using a Base64 string. So, the quick fix is, instead of serializing with:

byte[] encrypted = memoryStream.ToArray();
return Encoding.Unicode.GetString(encrypted);

and then deserializing with:

byte[] rawData = Encoding.Unicode.GetBytes(cipher);

You have to change with the following.
You serialize with:

byte[] encrypted = memoryStream.ToArray();
return Convert.ToBase64String(encrypted);

and deserialize with:

byte[] rawData = Convert.FromBase64String(cipher);

So, you are still working on 1.1, change your ciphertext serialiazation format to Base64 before converting to 2.0. And if you are just looking why your encryption code stopped working on the 2.0... well, now you know why.

Five things I'm not telling you

Steve Harman decided to tag me for the latest meme around in the blogsphere. So here I'm telling you 5 things about me.

I was tagged also on my italian blog community, so here I'm translating (more or less) the same 5 things:

  1. I turned on my first computer only in 1993, during my first exam at the university: I was studying Science of Composite Materials. It was love at first sight, I got the maximum mark and after a few year I decided to quit that course and switch to Computer Science.
  2. I raced Mountain Biking from '90 till '98, but I had to quit due a nasty problem on a knee. I still have this problem even if I had a knee surgery and I'm doing specific exercises
  3. I've been an anti-MS till the release of the .NET framework: before that I was programming on ASP classic and VB6 for work, but I loved Java, so I used that language for all my side works and opensource projects.
  4. Even if I'm Italian I hate soccer: the only team sport I like is basketball. And I'm a big fan of Pallacanestro Varese, and I was the webmaster of the Official Gianmarco Pozzecco website, aka "the atomic fly". And I was at the stadium when Varese won his last Italian Championship, in 1999.
  5. Before starting living on my own (well.. with my wife), 6 years ago, I was 10kg more then I'm a now, I dressed with "boring" clothing, while now I'm more a "surf-style" guy

Now it's my turn to tag someone else:

And remember: I didn't tell you anything

Finally in Wellington

After a long but pleasant trip around half globe, this afternoon (yes, now it's night in Wellington, which is 12 hours ahead of Italy) I finally landed in Wellington. I was told this is the first clear day since the beginning of the summer, but at 9pm it was cold, much more cold than I expected and compared to beginning July in Italy: we are now around 14°C.

But the views are much better then the one I had at home in Milan.

In order you see:

  • the view from Nic's place in the afternoon
  • the view from Andrew's garden (Andrew Butel, CTO of Calcium)
  • the view from Nic's place at sunset

Hopefully I'll start blogging tech things again in a few days...

Just a quick update from Heathrow

Yesterday I told you next time I have blogged, it would have been from Nic's house in Wellington...

but now I'm blogging using a wifi hotspot in Heathrow airport in London, using the T-Mobile access point, at the cheap price of 5£ (7.5€ or 9 US$ or 14 NZ$) per one hour :-)

Just a quick note about security checks: I had to remove from my hand baggage my laptop, my PDA, my iHome alarm clock to have them scanned separately from the bag, and also take off my shoes... ok, in England you are all paranoid about terrorism and so on... but... please... do you think I'll hide a bomb inside a PDA? or inside my iPod?

I also found a power plug, so now I know how to spend the next 4 hours before my plane takes off to Sydney.

My last post from Italy

This is the first day of 2007, and my last night for me in Italy

Tomorrow morning I'll be leaving for Wellington, NZ, where I'll land in the afternoon of 4th Jan, after almost 30 hours in the sky.

So, this is my last blog post from Italy. My next one will be using the wifi network of my kiwi friend Nic Wise (he is also an MS MVP) in Wellington.

See you in 3 days!!!