Friday, December 30, 2005

Network resource KILLERS

I’m not a Web programmer, so I can’t say how you should write web sites. I do, however, have enough experience in software development and networking in order to know some of the thing you should not do.
I had to play quite a lot with the Windows Event Viewer lately. While working, I noticed an ever recurring warning that goes like so:
“TCP/IP has reached the security limit imposed on the number of concurrent TCP connect attempts.”
Since it even happened very shortly after having rebooted my system, I decided to track down the source of it. Here are results of playing with the netstat utility:

1. No particular application open. Netstat returns 3 TCP connection owned by the following processes: MsnMsngr.exe, Skype.exe and gnotify.exe. Makes sense, doesn’t it

2. I opened one instance of Internet Explorer and entered YNET. Now, in addition to the above-mentioned 3 connections I had 61 other connections, all owned by IEXPLORE.EXE

That’s definitely a huge WTF ?!?!?! You open one single web site and you’re swamped with so many connections that in the end the OS has to start imposing limitations because it believes you may be running a virus/worm or some other threatening application.
Needless to say that when I checked with FireFox the behavior was more or less the same (didn’t count exactly the number of connections but it’s close enough).
Also, most other sites I checked, although they do use quite a lot of connections, it’s still not that much.

Sunday, December 18, 2005

.NET 2.0 Goodies

I’ve finally started to work with .NET 2.0. I know, it’s considered very late, but I had my reasons...
Anyway, here is one line of code I had to use today that makes use of several new features I find very cool (and useful):

Array.ForEach(threads, delegate(Thread t) { t.Join(); });

Assuming you have an array of threads named ‘threads’, this line will make sure you wait for all of them to complete. It uses Generics, Anonymous Methods and Anonymous Delegates all at once…

Sunday, December 11, 2005

IDesign's Serializer

In one of my first posts I reported on a MessageLoop object I wrote and posted to the CodeProject.
Today I discovered that at IDesign they wrote a Synchronizer object (go to the link and search for the word 'Synchronizer') that provides the same functionality. Their implementation has the advantage to implement the ISynchronizeInvoke interface, which means the solution is much more complete. But then again it means that my implementation, is much simpler. Also, I have added some features to my implementation that you won't find in Synchronizer:
1. Priority on messages (i.e. make it possible to execute a message before older messages)
2. Limit the queue size - when the limit is reached, new messages are being dropped.
I haven't added these features to the published version yet, but for my personal needs they are important, so I'll keep using it (although I might merge both some time in the future).

Thanks to my friend Moshe Anconina for pointing this out to me.

Saturday, December 10, 2005

I burned my wife...

Believe it or not, but last week I actually burned my wife. After having served her a boiling cup of tea, I made a wrong movement and the cup turned over, spilling all of the boiling liquid on her leg.
It was a nightmare! Even though it took us only 2 or 3 seconds to get her pants off and put enormous quantities of water on the burn, the damage was already done. She has a 2nd level burn on an area of 20x40 centimeters. She said that the pain during the first day was worse than giving birth. And she gave birth without epidural!!!
I can't emphasize how sorry I am and how bad I feel about this. She's not angry, of course, for it was obviously and accident, but I still feel I would have better liked doing it to myself on both legs than having her suffering this.

Maybe the most infuriating thing it that if the water was just a few degrees lower, the burn would have been much lighter. So what I do from now on, and that's my tip as an experienced leg-burner: whenever I prepare some hot beverage, I make sure to add a bit of cold water before serving it!!!

I sincerely hope that maybe this post will help avoid such accidents for other people.

Thursday, December 08, 2005

Had some problem with my Atom feed

There was a problem in my last post - it caused my Atom XML to be corrupted, so anyone who reads my posts through RSS got dissapointed.
I fixed it and apologize in the name of (it was a post automatically generated by sending an email to Blogger, to which I made small modifications).

Tuesday, December 06, 2005

Visual SourceSafe madness

Say you want to install Visual Studio 2005 WITH the new Visual Source Safe client.
Well, apparently it’s much more complicated than you’d have thought.
Just go here and you’ll see what I mean.


(Thanks to my friend Gil for pointing this out to me)

Friday, December 02, 2005

FireFox dillema

In the past I have tried using FireFox. It left me with mixed feelings. On one hand, I liked the tabs A LOT and felt the configuration options are much more usable than with IE. I also felt that the way favorites could be saved in groups (also by saving all open tabs in one click) was particularly helpful to me. But on the other hand I was disappointed to see that: a) the memory footprint was very similar to that of IE (sometimes higher sometimes lower) and b) Since many sites are still incompatible with FireFox, I had to keep using both all the time.

In the end I decided that there was no point wasting my time juggling between them all the time, so I crawled back (with my tail between my legs) to our not-so-good but certainly old IE and stopped using FireFox.

Until today.

Today I found out there is an add-on that seems to be able to solve that exact problem: the IETab. It provides you with the possibility to view web pages in an IE tab from within FF. You can switch between using the IE engine or the FF engine with a single click, or even configure a list of websites that will be opened in an IE tab by default. This seems to be exactly what I needed!

Bottom line: I’m going to download the latest version of FireFox right-away, and install it with the IETab. Hopefully it will make it possible for me to enjoy both worlds and live happily ever after…