This post is an attempt to clarify and generalize the main points of:
and explain why equality is an excruciatingly hard goal. Note that equality is meant, first and foremost, to be formal equality in front of the law. I am not interested here in questions of economical equality, although extreme economic inequality often has legal and social repercussions.
What does it take to create equality?
A small remark on programming conditionals. This is true for C and C++, but it might be true also for Java and other languages. I haven’t checked all of them.
It is about conditionals.
I’m seeing lots and lots of double OR and double AND in conditionals. In fact, I find it rare to see a single single operator these days. (Sorry, I couldn’t resist the pun). Almost without exception, every multiple conditional I see has the form:
if ((x>0) && (x<MAX_VAL))
Which is kind of silly, really. What one should do is use the simple single-operator
if ((x>0) & (x<MAX_VAL))
We had an issue at work. Our dev. team is managing a php server, which sends and receives binary KET files of constant size (say, 5kb) to production servers. I was rewriting some of the production servers and I notices that sometimes I’m getting TLE files in instead of KET files, and that they are 11 byte too big.
I checked it out. Apparently the dev. team was sending the KET files for compression (via php gzcompress). They were very much surprised to learn that the output files were larger than the original KETs. “Apparently”, they sighed, “gzip is not a very good compression. Let’s find another one”.
Which is the wrong conclusion. They have a meagre chance of finding a compression engine which wouldn’t expand the files. And this is a good excuse to explain this to the rest of the world.
An introduction to data compression
Pigeon hole principle → no general compression scheme possible.
Range limitation → Data redundancy → range-specific compression possible.
Prima facie, compression is an impossible task.
A few years back, a friend bought me Bernard Lewis’ “What went wrong” and asked me for a review. This is somewhat late – but you might find it interesting.
Lewis’ starting points seem obvious: is the 13th century, Islam was the future. The Islamic centers in Mesopotamia were the peak of civilization. 700 years later, Islamic Mesopotamia is poor and sordid.
He is searching for an answer in culture. That seemed weird to me. Culturally, the east – and especially the Islamic east – was not a lethargic culture.
And I think I have a better explanation now.
A nice keyboard
Ever so often I stumble across another annoying feature Microsoft is putting into their products. It never ceases to amaze me how creative the folks at Microsoft are at mis-designing products. Their products are always sleek, elegant, easy to use, and contain some hidden monstrosity under the folds.
At work, we have Microsoft Keyboards – just the most unbelievably hideous trap ever to be inflicted upon the unsuspecting world. The keyboard look nice enough, and is OK to use. Look at the picture. Notice those three little flat keys just between the ENTER and the numpad? Above the upper-arrow and below the “delete” key lurks a monster. Yes, it is a SHUTDOWN KEY! In the middle of the keyboard!
Need I tell you the details? You type a document, send out your little finger to press “up” or “del”, and all of a sudden the computer is shutting itself off.
And today I encountered another trap, at home. Here I am working at my computer (sometimes I still use MS windows, you see). And out of the blue pops a message. “Do you want to save?”. Well, why would I, in the middle of a messy revision? I press ESC, and the computer shuts down. Got me: It had an automatic update that was so much more important than my work…
So, shut down your automatic updates on Windows, double check MS products before you buy them, etc. All these advice work, but in my experience, they don’t work very well. remember: MS will always have the upper hand. There’s always another snark hidden beneath the table, ready to jump at you when you least expect it.
Below are several short tips which will help you survive C programming. I’ll be adding and amending this from time to time.
The most terrifying aspect of the C programming language is closely related to it’s core strength. Programming in C is all about using pointers – which are memory locations. Thus, in C, when you need a variable to work with to store numbers and manipulate them, you don’t have to deal with the variable directly – you use it’s address, instead. This is, of course, a really stupid thing to do when you just have to use a single variable to store a single number. But it is an enormously useful strategy when sending that variable off to a distant procedure, or when dealing with large arrays.