Microsoft Excel max number of columns

The last column in Excel 2007 is XFD:

What number is that?

X*26^2 + F*26^1 + D*26^0 =
24*26*26 + 6*26 + 4 =
16 224 + 156 + 4 =
16 384 = 2^14

So Excel uses 14 bits for columns which is odd, but I guess they use the other 2 bits for something else.

Also the base-26 numerical system (26 letters in English language) is pretty odd too, but I guess this is a legacy issue.

Wikipedia is there when you need it — now it needs you.

Wikipedia is the single most useful web site on the internet. I don't spend a single day without using it (the only other that applies is Google).

Wikimedia (the non-profit organization that runs Wikipedia) lives on donations mostly. This year they would spend $9m and they may not be able to raise that much. Here’s the report for the last year:



They want to keep Wikipedia ad-free so go help here:

Review: Dell BH200

Some years ago I wanted to buy Bluetooth headphones. Then my phone (Sony Ericsson K750i) did not support the A2DP profile, so I gave up. My next phone (Nokia E71) had such an aghast audio player that I did not have the mood to use it as an mp3 player.

Android’s audio player is pretty nice and as a whole the OS is a lot of fun to play with. I recently got a 8GB SD card, so I have the storage to put a lot of music onto.

Few days ago I was wandering, searching for a car charger for miniUSB (for my phone) and by the way asking for bluetooth headphones too.

In one of the shops they offered me these:

dell bh200

They were amazingly comfortable. I think I could jog with them. I tried them with the phone and they produced a pretty good sound. The charger was miniUSB just like my phone’s.

The good thing is that they’re foldable and have a lot of controls (next, previous, volume up/down, start, pause). And the price was amazing  - €35, so I got bh200 folded

They last more than my phone can play music, so I’d say that the battery life is satisfactory. The good thing is that they have a mic and can be used as a handsfree too.

The most amazing thing is that they can play while charging, which is amazing and since my laptop has bluetooth, I can use them to listen music from the laptop too.

While not listening, the headphones hang on the neck without making me uncomfortable.

The only issue I have is that somehow the headphones cannot switch easily from media to audio mode, so I cannot talk while listening.

Highly recommended.

I so very much hate Windows Live Writer

I thought I had found the holy grail of blog-writing interface and that it's name is WLW (Windows Live Writer).

WLW does a lot of things (check out the link) but it crashes a lot, it's so very slow, and it requires a VM.

I'm looking for an alternative. Please tell me one if you know.

Virtual machines and the HDD issue

There’s this common issue with virtual machines – the HDD deficiency (I may have coined a new term). You see contemporary processors are so fast and allow virtualization that they can easily handle the load. The harddrives in contrast cannot handle load coming from different entities, that is, harddrives are bad in multitasking. It’s just to expensive to switch between tasks.

Most modern operating systems have a mechanism called commonly paging. It refers to the process of moving data from the limited main memory (ram) to a special (most often) file on the disk. The main memory is gazillion  times faster than a harddrive, but limited, ergo the need for more virtual memory. Weirdly enough most contemporary OSes start using the page file way before they reach the limit of the physical memory (actual ram).

Contemporary machines can handle a lot of memory (2 or 4 gb for example). So why use a page file?

Switching the page file can be done like this:

then do that:

This is the memory print of my vm:

idle:vm.memory.print with 3 browsers, outlook, word:


I think the handling of my machine (host os)  is better now. Let’s see if the impression persists…

How is it that all laptops are with DDR2, only Apple goes to DDR3?

Most currently sold laptops are with DDR2 memory. Even the high-end ones, like Sony Vaio. It would seem that only Apple sells its current line of laptops (the aluminum body ones) with DDR3.

Why is that? Why isn’t there other high-end laptop with DDR3? It would only make sense to make it faster with DDR3. Or maybe it wouldn’t make it faster? I checked it out.

This is an excerpt from a post in the forum of

The polymac has 2gb of DDR2 @667mhz much like it's predecessors. The aluminum mac has 2gb of DDR3 @1067mhz. At first glance you might say WOW! 1067 is a lot more megahertz than 667! I gotta have that.

This doesn't figure in 3 things.

1. DDR3 increases speed at the penalty of higher latency. In real life terms, lets simplify it a lot and say that DDR2 and DDR3 are cars, and that the top speed of DDR2 in this case is 66 mph and the top speed of DDR3 is 106mph. But DDR2 has lower latency than DDR3, so lets say DDR2 only has to drive 5 miles and DDR3 has to drive 8 miles. So if the speed were the same it would take DDR3 longer cause it has a longer way to drive. DDR3 makes up for it by driving faster, and as you can see the faster you can get DDR3 the less difference the latency makes (i.e. that 3 miles makes less over all difference when you drive 160mph i.e. DDR3 1600mhz (no not available on macbook)) What this does mean though is that at lower speeds of DDR3, there isn't much benefit as the extra latency makes the performance very similar.

2. According to others you can upgrade your ram to DDR2 800mhz

Now let's go back to point 1. Now if DDR2 can go 80mph over 5 miles vs. DDR3 going 106mph over 8 miles, there's probably even less of a difference.

3. The last and most important thing to remember is that computer performance is tied to all the hardware, and is bottlenecked by some things far more than others. In some benchmarking between DDR2 800mhz and DDR3 1067mhz on a PC with virtually identical hardware otherwise, the bandwidth increased from 6146 to 6613... or about 10%. Which sounds alot faster. But then they performed other benchmarks, such as super pi, which showed that
the DDR2 800mhz finished in 46.08 seconds and the DDR3 1067mhz finished in 45.11 seconds. The difference is 0.97 seconds or a whopping 2.1% performance boost.

The guy even supplied a lot of benchmarks:

To further illustrate this here are some benchmarks with the old polymacbook vs the new aluminum macbook

To better demostrate apples to apples, (no pun intended we'll look at the 2.4 ghz macbook aluminum vs the 2.4ghz polycarbonate) in photoshop CS3

Lower time is better
Macbook Aluminum 2GB ram 99.34
Polucarbonate macbook 2GB ram 107.63

which shows that the macbook aluminum is faster 1067 vs 667 here.

But what happens when you upgrade to a 320gb 7200 rpm drive?

Macbook aluminum 2gb ram stock 99.34
Macbook aluminum 2gb ram 320gb 92.28

how about when we upgrade the ram?

Macbook aluminum 4gb ram stock 79.06
Macbook aluminum 4gb ram 320gb 77.19
Polycarbonate macbook 4gb 78.41

Then the guy continues with comparing prices of the two macbooks.


Since this is a forum post, one has to check the validity of the statements. So I went to wikipedia. This is what I found out:

CAS (column address strobe) latency (CL) is the delay time which elapses between the moment a memory controller tells the memory module to access a particular column of memory on a DRAM memory module, and the moment the data from given array location is available on the module's output pins.

In asynchronous DRAM, the interval is specified in nanoseconds. In synchronous DRAM, the interval is specified in clock cycles, and must be multiplied by the cycle time (i.e. divided by the clock frequency in GHz) to convert to nanoseconds.


Because they have multiple internal banks, and data can be output from one during access latency for another, the output pins can be kept 100% busy regardless of the CAS latency; the maximum attainable bandwidth is determined solely by the clock speed. However, that only applies if the data to be read is known long enough in advance; if the data being accessed is not predictable, the latency matters. For a completely unknown memory access, the relevant latency is the time to close any open row, plus the time to open the desired row, followed by the CAS latency to read data from it. Due to spatial locality, however, it is common to access several words in the same row. In this case, the CAS latency alone determines the elapsed time.

[…] Note that memory rated for a certain maximum speed can always be operated at a lower clock rate. The CAS latency can be set lower in such a case. […]

[Then there’s a table showing how DDR3@1066Mhz has a CAS latency of 7 cycles and DD2@666Mhz – of 5 cycles]


So the guy in the forum seems to be correct.

One thing remains unfolded though – why is the latency higher with higher speed? This is not explained in either the wiki, or the forum post. And unfortunately I don’t have the time to investigate.

If someone knows, please share.

This brings me to the reason I investigated all that - I have a spare 2x 1GB DDR@1066 Mhz:


(I guess no one will want them because only Macbook guys have machines with DDR3 and the minimum for them is 2GB)

I have high hopes for the 160GB-5400rpm-Hitachi harddrive though.


If someone is interested, please let me know.

10 items or less


Watching a movie has always made me want to share something and there’s always something obstructing me from doing so.

This time it’s different. It’s called 10 items or less. It has amazing music, it has an amazing chick, it has Morgan Freeman.

It’s a movie about how even the most mundane things can make one happy. It’s about enjoying life. This time I think I got it – it’s about enjoying life. IMDB says it’s about “how a positive attitude can change anything”, so I’m close.

There are some amazing moments, for example when Morgan Freeman follows this supermarket manager (an old Hispanic man) walking in small step a bit bent over.

Again a quote from IMDB – will “make you clutch your sides with laughter. It’s a rare masterpiece”. Go watch it.

Hacking the site of the cyber-crime fighters…

Ain’t that ironic: 2009-11-11 at 15.54.39 is the web address of a special division that fights cyber crimes (da!). It is a division of the part of police that fights with organized crime.

Screenshot taken 2009-11-11 at 15.54.39

This could only happen in Bulgaria.

The site should look like this: real 2009-11-11 at 16.04.53

Look at this zoomed part of the last screenshot:

Screen shot 2009-11-11 at 16.22.46

No comment

Update: the chief of cyber crime division denies the site being hacked.


Xmarks is the name of an old plug-in for Firefox called Foxmarks. Foxmarks is used to synchronize bookmarks to/from different browsers. When the guys made plug-ins for different browsers I guess they changed the name. Now it supports IE, Firefox, Safari, and soon Chrome.

Anyway it’s super useful, it’s free and it’s relatively stable. When you somehow override the new bookmarks with an old version (I happens a lot) it’s easy to restore from the browser (Firefox backs up bookmarks regularly).

I’m using one account for me and it’s ultra logical to create one for the office – now everyone has all the new links.

Also if someone is too paranoid, the plug-in allows to use a custom (own) server, which, if I remember correctly, was just a Web-DAV (or FTP) directory with some privileges, but when I tried it (a couple of years ago) it didn’t work that well.

Oracle on linux: changing the hostname messes up with Oracle

There’s this Oracle 10g R2 database. It’s installed on SUSE. The version of the SUSE as far as I know is 11.1. We had to change the hostname of the linux machine (some corporate standards). Changing the hostname made Oracle unusable. It started on startup, but could open port 1521 and still thought it is on the old hostname. “/etc/init.d/oracle-xe status” said things are not working, even though the processes started without an error. port 1521 was not opened. It was strange that the startup script didn’t say something is wrong. It was strange that the db could be used locally by oracle’s command-line tools ( I guess via pipes since the port hadn’t been opened).I tried Google the issue, but fruitlessly. Then I tried to figure out where did Oracle keep the old hostname, but the directory structure of Oracle is not that easy to understand. Being desperate I tried searching the whole hard-drive for a specific string:

grep –r “old_hostname” /

After 24 hours I gave up.

Solution 1

Being desperate and developing on another temporary oracle server, we decided to give up corporate naming strategies and to return the old hostname – IT WORKED.

Solution 2

By chance I saw that the old hostname was used in tnsnames.ora and listener.ora. Being stubborn I changed the hostname to the one we wanted to use and edited both .ora files. It worked. I hate Oracle.

Install Snow Leopard (Mac OS X 10.6) from a USB

Mac OS X 10.6 image is 6.3 GB. Using a normal DVD does not work.

Since I’m lazy to go out and buy a dual-layer dvd (8.5 GB max), I decided to use a USB flash to install the new OS.

This is a good guide on how to do that:

The only problem is that I didn’t actually use a USB stick, but this:

Kingston MicroSD HC 8GB. It comes with 2 different SD adapters, and what is very cool – a very tiny USB adapter. It’s the smallest USB I’ve ever seen.

I bought this for my phone, but came out to be very handy. By the way I highly recommend this Kingston memory.

So the problem with this memory is that it took roughly 2 hours for the Mac OS X 10.6 image to burn (I can’t say burn in this case, right?), while in the tutorial they say it took them only 20 minutes. The memory went pretty hot also – it was working hard for a couple of hours.

I wanted a clean install so I erased the hdd first.

Everything else went like a charm.

Install Snow Leopard (Mac OS X 10.6) from USB and restore only user files from Time Machine

Install Mac OS X 10.6 from a USB memory stick.

Here’s a tutorial on how to install Mac OS X from a USB stick.

Restore only user data from Time Machine

So now comes the restoring. I wanted a clean install – the last installation was pretty messed up.

Now is the time to say that I have a Time Machine for backing up stuff. I didn’t want to restore any system stuff, neither I wanted to restore users and their settings. I just wanted to restore ~/Desktop, ~/Documents, ~/Downloads, ~/MyFiles.

This came out to be VERY HARD.

When installing the OS, the installer asks for a Time Machine, but I said NO, cause I was afraid that it would restore more than I wanted it to.

After the installation was complete I launched Time Machine and tried to go back. I had the snapshots but couldn’t restore them because the owner of the files no longer existed.

With a lot of manual copying I managed to move the data back to my harddrive. Now I had to fix the permissions. Using Mac OS X for that could prove to be impossible.

The console

Going to the console helped a lot.

First to change the owner of a directory:

$ sudo chown -R mstoynov Desktop/
$ sudo chown -R mstoynov Documents/
$ sudo chown -R mstoynov Downloads/
$ sudo chown -R mstoynov MyFiles/

Some of the operations may fail with:

chown: Desktop/web/UC.class: Operation not permitted

The problem most probably resides in some flags being set up. Most probably uchg.

To see whether any files have uchg anywhere in a directory, I did:

$ ls -lOR Desktop/ | grep uchg
-rwxrwxr-x  1 502   staff  uchg   4228 29 Мар  2003 GrandeProjecto.jpx
-rwxrwxr-x  1 502   staff  uchg   1676 18 Авг  2003 GrandeProjecto.jpx.local
-rwxrwxr-x  1 502   staff  uchg    832 29 Мар  2003 GrandeProjecto.jpx.local~

To fix the uchg flag, I did:

sudo chflags -R nouchg Desktop/

Then again chown is required.

That’s it. Now my data is once more mine.

Chown the data on the time machine

The same problem with permissions exists in the time machine. There fixing them is not so easy – to many symlinks and too many directories owned by root. Also I don’t know whether I should remove uchg from anywhere. So fixing all that is not that simple. If I figure it out – I’ll share the knowledge.