Is It Byte or Is It Octet

If you read RFC for some network protocol, you will notice that word octet is used quite a lot. I hear quite a lot that they should write byte instead. However, there is subtle difference here.

Octet is always eight bits. Although one may argue that byte is also eight bits, but not so long ago one byte had seven bits of data (remember ASCII). If you go even before that, there were some machines that used lower or higher number of bits to represent one byte (6-bit, 10-bit…). At that time, byte was smallest accessible data unit - no matter how many bits it had. Only with very popular IBM/360, everyone moved toward eight bit bytes.

When writing specification of something on really low level (like RFCs do) with need to communicate across different generations of equipment, this difference is important.

Since byte (at current time) is always eight bits, whole argument seems purely academic, but tradition and precision is important. That is why RFC will never use byte when octet is needed.

How Big Is Int

When I started programming, I was told that C++ integer (int) is always as wide as processor. On 16-bit processors it was two bytes, on 32-bit processors it was four bytes. Reason was optimization. This was very simplified view since C++ only said short <= int <= long. However, it was true enough.

Currently there is not one but few 64-bit data models in use. You as developer do not have say on which model to use. Choice is made once you decide on which operating system your application is to be executed. If you use Windows you will use LLP64 data model (16-bit short, 32-bit int, 32-bit long, 64-bit pointer). With Linux as platform of your choice LP64 is used (16-bit short, 32-bit int, 64-bit long, 64-bit pointer). Difference is small, but it can make life difficult if you develop for multiple platforms.

Fortunately in most of modern managed environments (e.g. .NET, Java…) data type size is fixed. I find this much better.

Service Triggers

In order to speed up booting and avoid unnecessary hog on resources, Windows 7 gave us possibility of running services only when some preconditions are being met. Currently those preconditions include change of IP address, joining a domain, firewall changes, USB device insertion and few others.

This is great for services that need to perform some action when that precondition is met and spend most of time waiting (e.g. update some settings on IP change).

Currently there is no graphical interface to view/change settings so everything needs to be set through application’s code (or command-line). Since service (and it’s installer) are in best position to know when activation is needed, I do not find this a big limitation. Those programming in .NET will need some P/Interop in order to use it.

You can check this video for more details.

Logitech V470 Bluetooth Mouse Review

Illustration

Some time ago I was in Zagreb for a trip. Suddenly, an opportunity to play Starcraft was there, but my mouse was not. That is reason why I decided to go to closest store and buy myself a mouse for laptop. Until this moment, I used my trusty Microsoft’s IntelliMouse Explorer 3.0A for both home computer and laptop. Although it is very comfortable, it wasn’t well suited for use on road.

There were two requirements for new mouse. It needed to be comfortable for big hand and it needed to use bluetooth. It proved that later requirement was rather hard to fulfill. For some reason, all manufacturers like to have their own wireless dongle. Decision to avoid certain loss of that dongle was what kept me of Microsoft Arc Mouse. That mouse looks powerful!

One mouse that looked promising was Logitech’s V470 bluetooth mouse. It’s price was around 50 EUR which is little bit high, but it did looked fine and I did wanted to play Starcraft that night so I bought it.

Everything was packed in that “wonna bet that you cannot open me” plastic bubble but knife sorted that out. Inside of package you get mouse itself, instruction manual wrapped together with installation CD (I never used it - works without any additional drivers - at least on Windows 7), small cloth bag and two Duracell batteries. I was reminded that I need batteries when I saw that they are in package. Thanks Logitech for not going usual “batteries not included” route.

Connecting mouse to computer was painless. Just turn it on, press small connect button on mouse (bottom side) and search for new device on computer. Two of them will start communication and after ten seconds you are ready to use it.

I will not cover technical specifications here, but issue of comfort. Although this mouse is not quite big enough for my hand, it is bigger than those tiny laptop mouses. I had no problems with prolonged usage once I got used to it’s shape. Bluetooth connection has range of few meters - much larger than my arm in any case. Cursor movement is little bit faster than I was used to, but I got re-adjusted quite fast.

I found only one troubling issue. After you don’t move mouse for ten seconds, it goes into sleep mode. Waking is fast, just a fraction of second, but noticeable. You get feeling that mouse is stuttering a bit.

As final conclusion, I must say that this is one mighty mouse. :)

Keyboard

Illustration

I accidentally “de-enterized” keyboard on my laptop (HP 6730b). Somehow one CD left in my backpack managed to get under my enter key. Plastic beneath could not handle pressure and small piece went off. Although that piece had less than two millimeters in length, my enter key would not stay in it’s place with it missing.

Solution was simple and new keyboard (~40 €) arrived in two weeks (it may seem long, but this is quick for Croatia). Once I decided that I was competent enough to replace it, I took a look at documentation on how to do it.

I was surprised - not only that there was great manual, but there were also videos on how to perform small-scale part replacements.

Keyboard was replaced in less than ten minutes without a hitch. I finally got my enter key back and good feeling about Hewlett-Packard. Although they did nothing other than put some documents on-line, those documents were so good that they made me happy customer.

My next laptop will also be HP.