2007-07-29

18 years old?

Strange coincidence: 3rd time during the last 2 weeks they refuse to sell me beer without checking my ID. I don't really look 15YO I think. This time, when the waitress looked at my driving license, she was very surprised and screamed something like "1977, Oh MY GOD!" :)

Continuously updated, for reference: last time I was refused to buy beer without ID was: [5/10/2007]

2007-07-23

UI Lessons

This one is too hilarious to send you to the source (which is http://www.thedailywtf.com).

2007-07-19

Hot colors and cold colors

Most people think of red as a "hot color" and blue as a "cold color". This is, of course, completely wrong from the thermodynamical point of view. All astronomers and photographers known that. However, even the later still call the R and B sensor pixels as "hot" and "cold" ones sometimes, instead of vice versa.

The confusion is probably from the fact that people have only seen relatively cold objects, like the sun or a light bulb, which are just a few thousands of ºC.

So, it's suggested that from now on we refer to them as "hot" and "very hot" to avoid confusion. And by the way, pink is both hot and cold, and green is neither.

boost::tuples

To my surprise, today is the first time I've seen boost's tuples. They are actually pretty cool.
Remember the matlab's multiple return values [a,b] = func(c,d) semantics?

Now in C++, with a few cool boost::tuples:
int i; char c; double d;
tie(i, c, d) = make_tuple(1,'a', 5.5);
For the rest, go to tuples reference.

Unfortunately the boost guys have completely missed the idea of physical units recently, but that's a whole different story.

Misplaced ads

http://www.oddee.com/item_87332.aspx

If needed, lookup 404.

Another funny link from today is in Russian, so I will attempt summarizing. A couple was reserving a hotel room over the phone, and the first question was about the price. The second question left them ROFLing and speechless and was about their roof's color. Let's leave the reason for the later question as a puzzle [חידת מצב] for you...

Solution here: [They couldn't identify the hotel on Google Earth]

2007-07-18

Waldek Gorzkowski [1939-2007]

DISCLAIMER: The following should not be read by anyone. It contains information which should never be serialized into text. It has a potential (even though no intent) to hurt others. It is not recommended for children and/or adults, quoting in written or oral form. With all due respect to , and there is lots of respect, please close the window now.

HEY?? By reading further, you confirm to have closed the window.
----

[text deleted, after a request by ILPHO authorities. moved to a private forum in ILPHO wiki]


Canonical hebrew translation

of the plumbers' ad "We repair what your husband's fixed"

By YoavM:
"אנחנו מתקנים את מה שבעלך סידר"

2007-07-14

Magic numbers in code

The following is from a piece of code which has fallen into my hands. It's from [a large military industry]. There's a new approach to the problem of magic numbers in code.

..
Byte_1_type vmu_ver_minor;
Byte_1_type spare_bytes[SIXTY_NINE];
U08Int_type checksum;

(Yes that's a #define to 69. Now you have all the means to make SIXTY_NINE be 17, like in fortran :)

LevR: "someone really hates numbers out there, I guess".

A cool advantage of interpreters

There's a well-known site for stupidity wonders in software development, named DailyWTF. It's actually pretty nice, though sometimes I disagree with the editors. In either case, I have a whole bunch of programming WTF stories from my own environment(s). The following is a 2-year-old WTF from [some large financial organization, name withheld to protect the guilty].

We all heard about production software systems running in "debug" configuration, just because "they work better than their release counterparts". The later would crash, presumably because of higher chances to accidentally overwrite useful data in case of more dense static memory allocations.

This time it was something much more severe. ZM reports that he found a group working on a near-production version of a system, written on Visual Basic which they ran on a server with installed VB6 by means of "F5". They couldn't do it any other way, because their application ....would not compile.

2007-07-13

Lawyer's education

A nice quote, best used during an introduction talk for law studies in a university:

"Civilization starts with the idea of a real agreement -- for example, 'We crap here and we sleep there, OK?' "

The Fibonacci salad

As known, I've recently moved. This triggered series of celebrations of the new place, and I received various gifts. It's common for people to bring chocolate or wine (especially when they don't know what to bring,) but AO was original and brought a huge salad. This reminded me of a story about another salad (no connection).

It's said to be from the folklore of [censored] military intelligence unit. The idea of the Fibonacci series was used by their kitchen to make the so-called Fibonacci salad which they used to serve every day. The recipe is to take yesterday's salad and add to it the one of the day before yesterday.

(While writing this, I decided to look up google and discovered that there is a real thing named Fibonacci salad)

Session state

It was a design discussion meeting for Visionmap's flying system software. In stateless protocols, session state is usually maintained by means of exchanging some kind of a session cookie. It is also known to everybody around that my brain is nearly completely stateless.

When I asked the guys to remind me where we finished yesterday, I was brought this (by RM).

Traffic jams on ayalon? No problem!

http://picasaweb.google.com/bugpwr/MiscPhotos/photo#5066234504402137714

(Relax, he's not fallen down. And this is of course a joke)



This is also from Ayalon, not funny:
http://picasaweb.google.com/bugpwr/MiscPhotos/photo#5086634249863766562

2007-07-10

Recycled: Know your universe

(An old story reported by DimaG, years later confirmed by MichaelP)

A group of mathematicians (from my bro's company) were celebrating a birthday of one of them. Then, after severely long drinking it got very late (aka early). Consequently a suggestion was raised "to go watch the sunrise at the sea". [End of story]

Yes, that was in Tel Aviv. It was later confirmed by MP that the plan was indeed carried out. For the readers who don't yet know what kind of a world they are living in - it weights about 6e24kg and is about 13Mm wide. Tel Avis is in the east part of the Mediterranean, enjoying lots of beautiful sunsets daily.

I guess their act was not because they didn't know, but just a combination of late night thinking and extended drinking. One day, on the plane back from Thailand, one of the APhO2003 members caused me fear for his life due to suffocation danger from laughing from this story. (I was asked to tell without thinking where would the sun rise now, and after a correct answer I had to tell him this legend.)

Cleaning the windows

As in most skyscrapers, windows cannot be opened more than just a little bit. This is not because of the safety in respect to accidental dropping of long uranium nails, and neither to prevent residents from launching origami airplanes. The real reason is building safety. This might sound pretty strange at first - one would think that opening a window would release the wind pressure buildup on the building, but in fact it's tangential wind force which is significant.

Such buildings' windows are very strong, because if an incident storm is strong enough to break a few - it can bring down the whole structure. The problem here is, of course, cleaning these windows after a dust storm, which usually takes months. So my windows open just a little bit, and from the wrong side (bottom). They are double windows here at 59th floor (for safety) so magnets wouldn't work.

Here's a list of ideas - most of which contributed by the APhO2007 team while visiting me recently (for future reference):
[1] Yoav's idea of a sophisticated mechanical construction
[2] Jonathan: start a small fire, and they will bring a huge water pump outside
[3] Me: Installing wipers (like windshield wipers in cars)
[4] Catching a few bugs to stick little brushes to them, and release them to crawl outside
[5] Hamutal suggested that cleaning a window of someone below me is easier than cleaning my own. Assaf's added an important insight that residents of the first floor will clean the windows of the top floor, and it's their problem how they do it.
[6] AssafS also suggested that we could clean the inner side VERY hard
[7] Amos: cool the room down with the air conditioner to let drops condensate on the other side, and then use a standard ultrasonic cleaner.
[8] Inverted pendulum mounted on the roof: would bump into walls with something soft, and once started, maintaining the motion should be as easy as in a normal pendulum.

2007-07-07

Coding standards

Yesterday, I was holding a development conventions meeting with all developers at Visionmap. It was an interesting discussion with many humorous highlights.

At one point during discussion of variable, function and project naming strategies, it was suggested by VadimK that keyword "Utils" should be banned in library names, or they drift into becoming garbage cans. Some raised concerns what happens when you don't place a garbage can in a certain area. Then someone raised the issue of "New" keyword in function names.

Was it in Futurama where they had "New New York" and the old city of the future new york was named "Old New York"? (Base one numerals - says VZ). Then, LevB told us they have two functions named something like ComputeTransformationMatrix() and ComputeTransformationMatrixCorrectly().

(a typical situation which would happen when one doesn't want to risk breaking 128 other working projects, during a war)

RoieM: "This is surely very bad. It should have been a boolean parameter! :)"
LevB: "With a default - false."

[ROFL]

Getting started

A few years ago I noticed that nearly every day something unusual, funny or fantastic in any other way happens to me. I thought making a blog out of this could be an interesting idea, but then I would have first to collect enough written stuff before going online, and that just never worked out.
I've been always thinking "if I had a personal blog, I would have published this".

At Visionmap, I was taught that everything told more than once should have instead been written, and yesterday I was finally broken. I know almost for sure that I won't have any time to maintain it, but maybe it's a catalyst for some stuff to get out for my friends' amusement.