Sunday, January 29, 2006

AIBO and QRIO - May you rest in peace...

For those who haven’t had the opportunity to meet AIBO or QRIO, I suggest you run looking at the video clips on Sony’s site, because Sony announced recently that they are stopping production of both.

I have had the opportunity to play a bit with AIBO, when Ehud Sharlin came to give a talk at our CS Seminar. This little robot-dog was really impressive. Put some fur on it, and you might really get attached to it! Being a dog-lover, I can’t say it’s the same as the real thing. However, being an AI fan, I must say it’s really impressive and a real loss for the AI community.

Thursday, January 26, 2006

XOR operator in C#

There is a XOR operator in C#!!!
For some reason, it’s impossible to find it by searching for “XOR” in MSDN (either in the index or using the search). I don’t know why they’re trying to hide that…
So anyway, it’s a simple bitwise operator: ^

C = A XOR B should be written: C = A^B;

(and there’s of course the complementary ^= which also performs an assignment)

Wednesday, January 25, 2006

Bringing your PC to a technician...

YNET published today a very interesting and sad article.

They took completely good computers, incorporated one technical problem to each of them and brought them to 6 different PC technical labs.
If you want the full details – have a go at the article on their site.

For those who want the summary (or don’t read Hebrew):

First technical problem: graphics card not right in its slot.
Results: 2 labs fixed the problem with no cost. 1 lab replaced the graphics card with a new one and demanded approx. 30$ for it.

Second technical problem: some of the memory was replaced with corrupted memory, which caused the computer to fail startup.
Results: 2 labs claimed the motherboard AND CPU needed to be replaced. 1 lab simply recommended upgrading to a completely new computer.

Need I say more?

Sunday, January 22, 2006

Matlab number formatting

This is an issue that has annoyed many (me included).
Matlab, by default, displays floating point numbers in their ‘short’ format. That is, the number ‘0.181096612595921’ will be displayed in the Command Window as ‘0.1811’. The problem is that you have no indication whether that’s the whole number, or like in this case, only a rounded ‘short’ version of it. Also, it’s not very obvious how this should be changed in the environment (the Matlab Help is far from being the best in town).

So, for those of you who are interested, here it is:

  1. Changing the format in using the Preferences (these changes will remain forever, until you change them again):
    1. Changing the Command Window display:

Click on the menu: File è Preferences. Choose ‘Command Window’ and change the ‘Numeric Format’ combo.

    1. Changing the Array Editor:

Click on the menu: File è Preferences. Choose ‘Array Editor’ and change the ‘Numeric Format’ combo.

  1. Changing the format for the current session only: use the ‘format’ function. For example:

‘format long g’ – will display the number above as ‘0.181096612595921’,

Whereas ‘format short g’ will display it as ‘0.1811’.

For details about the various options, check the help on the ‘format’ function.

Thursday, January 19, 2006

Wireless router

That’s it, I’ve had it! I’ve been suffering from my Wireless Broadband Router for the past half year and enough is enough!
When I bought my laptop last summer, I also bought a wireless router to go with it, of course. Not knowing what router’s best, I let the guy who sold me the computer to choose the router. So I ended up with a router by Edimax (BR6114WG to be accurate).
At first, everything went smoothly. The installation was fairly easy and I was relatively happy. For the first time in my live I had the possibility to work from my back yard, so I was ready to close an eye on the disconnections I experienced once in a while.
Then, with time, I encountered several problems:

  1. The wireless network is really unreliable. Even from short distances, with little disturbance, the connection gets disconnected once in a while.
  2. If the router remains on for several days (typically around 3 days), it suddenly stops providing Internet connection.
  3. On two occasions the router simply dropped dead. The first one required a complete replacement (it took them 2 weeks to reach to this conclusion). On the second occasion, it suddenly came back to life after a few hours.
  4. Once in a while, the router becomes ‘almost dead’. I won’t get into details, but just day that to revive it I had to unplug/plug it to the electricity several times in a row.

In the end, I decided that I’ve been wasting way too much time on this stupid piece of plastic. I checked out the user reviews in Zap and decided to buy a new 3COM router with 3Yrs guarantee. It’s 20-30% more expensive, but if it will save me the administration time, it’s certainly worth it.

I received it today. The installation was slightly more lengthy than with the Edimax (although the documentation is much more professional). I’m happy to say that it’s now up and running. I’ve got a good feeling about this – let’s hope I’m not wrong!

Monday, January 16, 2006

French Onion Soup

Yet another soup I really like for cold winter days. It’s extremely simple, and if you give it enough time it’s wonderful!
Last time I made it I used leek (‘kresha’ in Hebrew) instead of onions and it turned out to be maybe even better.


  • 4-8 Onions depending on their size. Could be replaced by the same quantity of leeks
  • 50gr. Yellow butter
  • 2 soup spoons of white wheat
  • 1 liter of Chicken Bouillon
  • 1/2 cup white wine
  • 1/4 cup Brandy
  • Salt, peper, Chili powder


  • Cut the onions in stripes. I simply cut them in half and then cut each half in thin slices.
  • Fry the onions in the butter, using a high cooking pan. Make sure you keep the fire LOW! It should fry for around an hour, maybe even more, and still not burn. Keep stirring once in a while. You must continue frying until the onions are almost completely melted, transparent, with a slight yellow tint (not burned!). Most of the time I leave it on the fire with closed top (except for when I stir, obviously…).
  • Add the wheat and stir thoroughly. Let them fry with the wheat for 1-2 minutes. You must keep stirring otherwise the wheat will burn.
  • Add the bouillon and the wine. I usually warm the bouillon up beforehand, but it’s not a must. If you don’t have enough liquid to cover all the onions, you can complement with warm water (or more bouillon). Turn the fire up until it boils.
  • Lower the fire and keep it at boiling temperature for another ½ hour (sometimes a little more). Make sure you continue to stir once in a while; otherwise the onions get stuck on the bottom and… burn.
  • Add the Chili powder, salt and pepper – according to your taste
  • Stir and leave on the fire for a couple of minutes
  • Take off the fire and add the brandy, stir
  • Mission accomplished

Side note: Chili powder is not something you’ll see often in an onion soup. I tried it once, and found it adds a special taste to the soup, makes it interesting. It also gives it a nice orange-red color (that is not due to over-burning the onions). I’ve never made an onion soup without it since then!

Building a DAL using Strongly Typed TableAdapters and DataTables - by Scott Guthrie

Scott Guthrie (a.k.a. ScottGu) is starting a series of tutorial postings on common data binding design patterns. He’s definitely done a great start with his first post about Building a DAL using Strongly Typed TableAdapters and DataTables.

Thanks Scott!

Friday, January 13, 2006

Mother of all soups - the Chicken Bouillon and a Bouillon-based vegetable soup

Almost all the soups I do are best made with a basis of a chicken bouillon. In some cases, you could do with just water, but usually the bouillon changes the soup from ‘good’ to ‘excellent’. I never use flavoring powders and the like. They are full of mono-sodium glutamate, which is unhealthy and sometimes difficult to digest…

Clear Chicken Bouillon


  • ~2 kg chicken parts. I usually prefer the neck. If I can’t find necks I use wings. Chicken comes out much better than turkey, in my opinion.
  • 1 large celery root
  • 1 or 2 parsley roots
  • Various herbs for a “bouquet garnis”. I use mostly parsley and celery but feel free to use also coriander, dill or whatever you like.
  • (optional) 1 or 2 small dried hot peppers
  • 4-5 bay-tree leaves (“Laurier” in French or “Dafna” in Hebrew or “Laurus nobilis” in Latin)


  • Put all the ingredients in a large, high cooking pan.
  • Fill with water such that all the ingredients are totally covered.
  • Let it boil. Beware – the content has a tendency to overflow when the fire is too high. If it does overflow, it becomes really messy, so once it reaches boiling temperature, make sure to lower the heat.
  • Leave it at boiling temperature for 2-3 hours (more towards 3..). Stir once in a while and make sure everything is covered by water. During the whole cooking, leave the cover almost closed (i.e. leave a small gap for the superfluous steam to get out). Some notes should be made at this point:
    • If you leave the cover completely open, the soup will dry out to quickly and you’ll be left with too few liquid.
    • If you leave the cover completely closed, there’s a good chance it will overflow. Don’t blame me at that point!
    • If you stop cooking too early, the soup won’t have enough tastes.
  • When it’s ready, transfer it to a large container, preferably one that is transparent and has a thin bottom (explanations why in a second). Make sure to filter out everything: the chicken, the herbs and especially the hot peppers. I usually give the chicken to my dog and dispose of all the rest.
  • You may have some remaining residue in the new container – don’t worry about it for the moment.
  • Leave it in the refrigerator for several hours (I leave it for the night).
  • In the morning, what you should have in your container is a somewhat jelly-like substance. On the bottom you should see the entire residue, and on the top there is a layer of pure fat. Sometimes the fat can become creamy of even crusty; sometimes it’s much like heavy oil.
  • The idea is to keep the jelly and drop the rest (fat and residue). Since the bouillon has become jelly, it’s a really easy job:
    • With a spoon you scratch all the fat and dispose of it.
    • Then you can extract the bouillon while leaving the residue in the container.
  • That’s it! Now you have a strong, clear and rather low in fat bouillon. You could either keep it in small containers in the freezer for later use (either in soups or other dishes) or make some really good soup out of it right away!!

Very Simple Vegetable (but not Vegetarian) Soup


  • Strong, fresh, chicken bouillon
  • Veggies J . I usually use the following:
    • 3-4 pealed, sliced carrots
    • 2 leeks (or 2 onions)
    • Pumpkin (in cubes)
    • 2-3 cloves of garlic, cut into slices
    • (optional) half a cauliflower (“Kruvit” in Hebrew), in small pieces


  • Just put everything in a large cooking pan. Make sure there is enough bouillon to cover all the vegetables. Let it boil and leave it at boiling temperature for about 1 hour. Don’t let it overflow!
  • When it’s ready, you can add spices. I would suggest only some salt. Since here in Israel the chicken comes already salted due to the koshering process, I actually don’t add anything.


  • If you want to give it an oriental taste, you can add the following spices (all or part).:
    • Coriander (I’d add it to the bouillon)
    • Cumin
    • Turmeric
    • A tiny bit of Cardamom (“Hel” in Hebrew)
    • 2-3 Cloves (“Ziporen” in Hebrew) – I’d add it to the bouillon as well

Well, I think that’s it for now. The next soups (not necessarily in that order) will be: “French Onion Soup”, “Rich Meat and Lentil Soup” and maybe “Simple Pea Soup”.

Bon Appetit

Thursday, January 12, 2006


One of the few things I really like about winter is the soups. So since the winter is now really showing, here in Israel, I’ve decided to start posting a few messages with the recipes of the soups I like (and prepare) the most. If you happen to try preparing them, I'd be happy to hear how it went (for the good and for the bad).

Tuesday, January 10, 2006

Nasty SQL Code

Oren Eini (or is his name Ayende Rahien? I'm a little confused about that) has a very nice blog I like to read. He must be going through a really hard time, trying to deal with extremely crappy code lately. I suggest you take a look at his 3 pieces of nasty SQL code (here, here and here). It’s worth it!

Tuesday, January 03, 2006

I'm back to IE

A few weeks ago I posted that I’ve decided to try using FireFox, with the idea of opening anything that is not sufficiently supported by FireFox with the IETab. Well, I’m sorry to day that this experience didn’t prove successful for me, and I changed my default browser back to IE.
Just to name a few reasons:
1. IETab Pop-up blocking – there is no way (that I could find) to define on which sites you want to allow pop-up blocking and which not when you’re using the IETab. You must set pop-up blocking to either ON or OFF for ALL the sites being viewed with the IETab. This is the most significant reason why I disliked the IETab. As Murphy would have wanted it, most of the sites I need to view with the IETab (mostly but not exclusively bank account sites) use pop-ups. So I do need to allow pop-ups, but I certainly don’t want to allow them for all the sites viewed with the IETab!
2. Performance – odd isn’t it? Well, some sites take up quite a lot of CPU with all their flash publicities and all. I don’t like it, but since I like the content I live with it. One of these sites is YNET. The problem with FireFox, is that even when the browser is minimized, it takes up a significant amount of CPU when these sites are open. With IE, once the browser is minimized, the CPU drops to normal and is free for my other stuff.
3. Defining sites that should be displayed with IETab – the list is a list of exact urls. You can’t define web sites. This has proven to be very annoying.
4. I don’t remember exact examples at the moment, but I did encounter some sites that didn’t look well either with the IETab or without it.

Until these issues are not fixed, I’m sorry to say I’ll have to continue using IE. I know that I could use both, and each time choose the best one, but I hate working that way.

(Right before sending this post I discovered there is a new IETab release. I'll try and play with it some time soon. Maybe it will make me change my mind?)