Two more real-life "state puzzles"

[please suggest term for "state puzzle"]

1. DD is working at VisionMap. Every day at noon, he walks to his wife's work to get the car.
(Technically, they have one car, but instead of sharing it on a day-by-day basis, each of them holds it for half a day). Nurit answered immediately, but I would have no chance.

2. VZ, came to his base after the basic training. He was sent to join a car that was going to Ramallah, with three guys. One, knew the road. Two others were the drivers. What was Vadim's job on the mission?

----- SOLUTIONS ------
1. one had to put kids in kg, and the other to pick them up.
2. the navigator had to stay at the destination. VZ's goal was to remember the road and navigate the stupid drivers back.


Nullables in C#

AM2: "C# has a new and fantastic boolean type. It's called nullable bool. It can be true, false or unknown..."
P: "Fantastic? Depends if you are asking or answering"



Somehow I missed the news of what's known as Bintsagate othello cheating scandal (A well-known player, Bintsa Andriani, was caught cheating on a tournament organized by French Othello Federation).

What's flattering, is that he was using CEZebra - the program by Gunnar Andersson and myself.


Drinking is bad

DB is an amateur photographer. Yesterday, he had to smoke several hookah alone to to produce smoke for his photographic experiments.


Just because I am paranoid does not mean I am not being watched

The old line was brought up by OH recently.
This is by VZ: "Just because he's paranoid, does not mean he should not be watched"

Any further derivatives?


@Merida, Yucatán, México

¿How do you type the @ sign on the Spañish keyboard?

From my google talk today with Gal:

[Status] ¿¿¿ how to type with this kbd ???
Gal: ¿mexico upside-down questionmarks?
Me: and no at sign, so can´t login to facebook
Gal: lol. Here: @
Me: thanks man!!!

(gone to paste it)


Heart of gold

For the second time, we made a contest of funny stories and performance on the company bus trips. Yesterday was not an exclusion, yielding another whole bunch of stories from one day.

NK's story about a bar mitzva party. The kid's parents were new immigrants from USA, and what they tried to say was this: "He has a Golden heart with the capital G".

Alas, no capital letters in the Hebrew alphabet, so here's what they got:
"yesh lo lev zahav im zayin gadol"


[Rcl'd] Self-sacrifice

A BBQ party, with AK and other good people. At the end, I was in charge of the fire-extinguishing job. I stepping on the burning ashes, and got a remark from AF: "hey Pavel, what a self-sacrifice.." then he corrected himself - "..sacrifice of the shoe"

This is a story of a great coincidence. Later that night I was reading "mostly harmless". Well, guess any more words are useless - either you are already laughing or I don't want to spoil it.

Ford Prefect rescued himself "by means of self-sacrifice". In that case, he threw half of the pair of shoes (which maks one shoe) while hanging on a weather baloon - to divert a vogon rocket that was fired at him.

When asked how does it make a self-sacrifice, he replied 'Because they were mine!'. In this new terminology - a regular, plain sacrifice is when you sacrifice something that belongs to someone else. Quoting King of the far far away from Shrek: 'Some of You Will Die, that's a Sacrifice I'm Willing to Make'


Happy Birthday :)

Last september I got a milluim-smelling envelope from the gaza division. "uh oh" I thought to myself. Jap knife, open, "happy new (jewish) year!" says the letter. whaah, thinks pavel.

Just a few days later I get another envelope - same size same color. OKAy, *NOW* it's reserve service call, thinks pavel. "Happy Birthday!!!" says the letter.

And the birthday was happy.


One-time key

"Never store your PIN number near your credit card" says your credit card company. AL has a better idea. When he gets a CC, he writes down in a think black permanent marker, right on the credit card.. the XOR of this PIN and other number which he never tells anybody.

This way, he can always recover the PIN if it is forgotten, and whoever steals the card will immediately be locked as he will try to enter the XOR.

All this is great, of course, and at last there's a service to help you. You just enter your life's master password, and neither it nor the generated per-website passwords will ever be sent to their server.


Baby swinging machine

Just brought home an electronic chinese weight measurement device. Unbelievably, I had to RTFM on how to turn it on. It just wouldn't talk to me. A "light tap" says the guide. Okay. The biggest bang I can possibly deliver, indeed does turn it on - and I am not considered weak. (Actually, I found a simple way to slam it against the floor - supposedly, it's not only the average force but the signal frequency which also matters).

This reminded me something. A short while ago I visited Dima Kuchin and his new baby in Holon. We had a talk about software and IT industries, and he told me about his friends, who also had a baby.

The little guy didn't sleep too well, so his parents bought an electric swinging device. The killer feature: an audio trigger. Whenever it detects cries above some volume treshold, the swing motor turns on for five minutes. And then there was evening and there was morning, and also a bug and a workaround. Yes, they were software engineers. Can you guess the end of this story?

The baby was too quiet for the automatic craddle, and all his tears would all be in vain. The parents sleep in other other room... Now, every time they hear their baby crying, they scream aloud. That keeps the young guy happy, without ever having to get up from the bed.

"услышав лай караульной собаки, часовой дублирует его голосом"

More on the subject of children: do yours have GUIDs?


Do you know percents?

Last Sunday together with the APhO team, we've meet the israeli science minister, Daniel Hershkovitz. He's a great guy and he told us many stories.

During the great professors' strike, he was not much into politics. Yet, he was in the committee responsible for the talks. It finished with a white night of agreements.

"Look, " someone said, "if we give you 1.5%, the other guys will also want. And if we give out 1.5% to both groups, it will already be 3% to the total budget".

"No, " he said, and started to slowly explain to the whole finance ministry and histadrut leaders the proper mathematics of dealing with fractions.

Ofer Eini, the histadrut chief, carries a pocket mathematician with him sometimes. The young guy says: "yes, that's true what you explain, in theory. In practice, it is not exactly so..."

I found it first

A story comes from Dr. Eli Raz, ILPHO. They have built a huge hot-air balloon for something [TODO add picture]. It was unconnected for a while and then accidentally risen and flew away. Eli went after it fast with a car to ramot itshak.

When he came, someone was nearly finished packing it into his SUV. Eli: "I am sorry, this is my balloon". The guy - "No, it's mine. I found it first!"

The balloon was successfully returned to owners.


Interviewing tips

Joel says there're on you two relevant parameters to measure: "smart" and "gets things done".

Together with DP we came up with easier, down-to-earth and more engineering-oriented quantities directly measurable in a human conversation:

1. Bandwidth
2. SNR

Bandwidth is how fast one can think to produce output. This might not always be important, but usually it is, especially when estimating price-performance ratio to make the hiring decision.

SNR - Signal to noise ratio - is the ratio of meaningful, smart, relevant and correct things s/he says to the total audio output. It's usually up to the interviewee to balance the trade-off between SNR and Bandwidth, but you should be able to factorize by it to deduce the total mental capacity.

All other skills you should be able to teach the employee yourself. If you cannot teach, don't hire anybody. Relevant background = oxymoron, if you are going to develop only new things. Remember - specialization is for insects.

Link: history of programming languages

"1972 - Dennis Ritchie invents a powerful gun that shoots both forward and backward simultaneously. Not satisfied with the number of deaths and permanent maimings from that invention he invents C and Unix"



Losing weight

While laughing at me for comparing my weight before and after long running distances, my friends compiled this ultimate guide for weight loss. Here's what you can do to reduce the mass of what is considered your body:
  • aerobic workout (2 electron-volts per C02 molecule)
  • going to lavatory (number one and number two)
  • sweating
  • haircut, shaving
  • sneezing/coughing
  • donating blood/bone marrow
  • donating organs
  • crying
  • spitting
  • vomiting
  • male orgasm, female menstruation
  • manicure/pedicure

Worth to mention that you may even consider leaving your mass intact. Accelerating downwards, ultimately in a free fall, will show immediate results. If you want it long-term, move to the equator , a space orbit or a smaller planet. Remember - helium inhalation is cheating (as is swimming or travelling to low altitudes), despite the added value of making funny voices.

Enjoy, and don't go crazy. Thank you very much.


Software development is not for humans

It's fucking 21st century, and I am amazed every time how bad we are at this stuff. Another day, and another encounter with an online service from hell.

It started with a water bill.

(Well, yes, we are in Israel, which was supposed to be a desert - so that much is okay).

The postal paper bill would never write a tinyurl to the form. Instead, "pay fast and easy - at ramat-gan.muni.il". This is obviously not a pay form. It is a homepage of my lovely city full of flash animation, and after a couple of Control+F searches in it, I finally got redirected to citypay thru 4 more pages of ads. So far is okay, I am doing the same procedure every month. It is supposed to take an hour anyway, even though I am a fast typer.

Citypay.co.il. After a minute of loading - nicely colored labels to guide you where exactly to grab each and every of the 41 digits you need to copy from the paper bill. 41 digits!! If you do the math, 41 digits are more than enough to identify a single H2O molecule in the Mediterranean (I just did the math). One of the 9-digit numbers I had to type twice.

Now comes the credit card number. No smartass, you cannot cut-and-paste into the form. You are not supposed to store your billing info on your computer. What did you think you are doing. OKay. Just twenty more digits - but the punishment was far from over.

An invalid character in my street number. Oh really?! I live on Jabotinsky street. A lesson in Hebrew grammar: you need an apostrophe to write the guy's polish surname. No, not that evil apostrophe from SQL injection horrors, advertised by the completely wrong XKCD comix about Bobby Tables. It's the friendly and toothless apostrophe, Unicode codepoint 05F3.

Oh, I remember that lecture by Nimrod Luria at TASE. He scared people with an SQL injection and then started mumbling around that apostrophe is not the only apostrophe, and that "%27" must also be sanitized (no, it's a URL escape codes, you idiot. No chance to harm an SQL query with that one!). Furthermore, he advocated white-lists instead of black-lists to sanitize properly (People, support the characters, instead of banning them, please. It's not that hard). One good thing they learned was not writing any more code without my review.

Miraculously, since that lecture half of the online services ceased to accept my email address which usually has a plus sign in it. Okay, a spelling mistake in the street name convinced the page validator. But then goes Part B.

Remember all these online shops that crash right when you press the final "Confirm Purchase" button, so you don't know if you have purchased or not? Of course, they do so as they try to access the next layer of the application. If you are lucky, a refresh will make you pay twice (though on the other hand, you also get two teddy bears). Now, the dreaded white screen. Refresh. Nothing. Okay. Plan B. Oh, I can create an account @citypay! Maybe they will store my info once and for all...

Now, we have this "continue" button which is impossible to find, which is right in front of the screen, but no pixel of its beautiful image or the mouse cursor above it (WC_ARROW) would suggest it is something clickable. Clicking gets us to "Failed to Connect" in Firefox. Thank you very much. Plan C.

The "recorded aunts service" phone for the simple folk - here goes. After getting all the sixty one digits through the very slow blah blah, we have a message in a cute Hebrew voice "this bill is too recent for our database. Please try again in a few days..."

The bill goes right into my paper recycle bin (I wouldn't let morons kill any trees). That's enough fighting for one month. Luckily, the fine rates are cheaper than my time. Maybe, just maybe, humans will learn how to make software by then.


ILPHO archive: Size matters

This story was brought from APhO2005 in Kazakhstan. Our team was met by the Israeli ambassador. Yes, the one that was involved in resolving the long-remembered security problems (See ILPHO's pbwiki). He also shared this lesson on sizes, and lengths in particular, while talking about the local bureaucracy.

The guy was sent for a several years diplomatic mission. As usual, his house contents were packed and shipped to his temporary home in the ex-soviet country. Several months have passed, and the luggage still would't arrive. Nobody seemed to know where was it on planet earth, or how longer will it take.

At some point the guy went completely nervous, and managed to fight his way through the kazakh and the russian bureaucracy to figure out the fate of his luggage. The luggage container was stuck in Omsk*, at a railway station.

The problem was this: the container length is 25 meters. The train car base is 50 meters long. (guess the answer?)

So, the guys have been waiting for another 25-meter container to pack them together, to reduce waste.

*a.k.a. my place of birth


Random numbers

Any decision-making process ultimately comes down to tossing a random, which is much cheaper than most other techniques.

In the past, people used to toss a coin. Earlier I suggested a more high-tech way, to do it with a credit card.

If it's a matter of honor, you should use rock-paper-scissors, and if you need more choices, you may want to use random.org. Or just say,

int Random() { return 17; }

BTW: Watch the Futurama's S4E15 about coin flipping, The Farnsworth Parabox.

RCLD: More IDF stories - the discipline officer

This is a story about an IDF rasar, pretty similar to the guy described by JoelOnSoftware. If you never served in IDF and don't know what a "Rasar" is, please read Joel's story as an intro. (In fact, I am pretty sure that more or less exact thing with a toilet described by Joel, also happened to me around 97 - but that's not what I am going to tell about).

Being a newbie at the start of the remaining years of my love-and-hate relationship with the 277 regiment's base, I was sent to a gate guarding duty. I was allowed to sit, on a chair, which was a pleasant surprise after what I was used to during the basic training. If have seen an Israeli army base, you know the large concrete protection blocks at the entrance that once were made fun of in MK-22 TV Series.

The chair base was just slightly smaller than the width of a concrete block. So, I put the chair on the block. While sitting high above and waiting for the passing traffic, I have been amusing myself with thoughts about what am I going to answer when I will be asked what is that I think I am doing, like "it's for better visibility" or whatever.

Soon, none other than the car of the base's discipline offier, sergeant major Yosi Nachmias, was approaching on its way out. Uh oh. "Come here, soldier" he said, in the usual scary voice that was supposed to make people turn white at an instant. I jumped off the block with my galil. And, despite all my preparaiton, his next question left me speechless.

"Who told you to sit like that??" he asked.

This way of thinking just never occurred to me. I could very well imagine people doing something without being told to. "Don't sit like that", he told, after which I never did it again.

Friend's account: the 'enlargement' way

One day while V was serving at a [top-secret intelligence research facility], a bunch of high ranked officers surrounded him.

"We have a problem. Someone accidentally deleted a whole bunch of important files. Can you help us?"

He said, "okay, but no questions asked about what I am going to do".. And he shut down all, and took the hard drive to the internet station. While trying to run a few cracks for some recovery tools, a large promotion appeared on the screen with a male penis. It was an 'enlargement pill' advertisement that caused lots of amusement.

The data was successfully recovered. After the incident, a new word was coined. 'Could you please do XYZ using the enlargement way?'

(Serialized with permission)



Oh, did I say my twitter is http://twitter.com/bugpower ?

And - twitter is cool. What's particularly cool about it is the search though good luck finding the search button. This way, you can read a thousand human reviews about the best website launch checklist, for example, in 5 minutes.


Reserve service (milluim) 2004: 'The peace process'

RCLD: A training session for my second service in Gaza (not the one for which I got a 'homat magen' award). An officer is demonstrating shooting positions for one-on-one combat with a terrorist attacking our post.

As several alternatives are discussed, one of the miluimniks speaks up -

"I heard there's something new. You may also conduct peace negotiations..."


Elections 2009: Quantum voting for amateurs

So, you don't know whom to vote for? Hesitating between 8 different parties? Hate "strategic voting" which makes the big parties stay big? Your heart is with Liebermann but you want to support Bibi for the prime minister at the same time? Here's how to proceed.

Step 1. You will need
1. One voting coupon
2. Two hours of time to drive to your parents' place (which is where your address is registered coz you never bothered to change)
3. Lots of good will to defeat the dirty marxists

Step 2. Approach the voting calpi and take the voting envelope
Take any number of voting notes of the parties you support.

Step 3. Close your eyes.

Step 4. Mix and shuffle the notes every possible way. Do it fast because the line is waiting. Pick up a random note without looking. Put it in the envelope. Put all others in your pocket.

Step 5. Open your eyes. Proceed out of the calpi. You are not done yet.

Step 6. Find a trash can. Close your eyes again. Throw away all remaining voting notes. Leave the place in peace and wipe your memory with a strong white flash, for safety.

Done! Congratulations. You have now rendered the world in a superposition of your vote options.

And now! Exclusive 30% discount for Advanced Quantum Voting course, in which you will learn to give arbitrary coefficients to superpositions of the parties of your choice.

Disclaimer: The author should not be held responsible for any global disasters if one tries to play with imaginary voting coefficients.

EDIT: Clara suggested 'quantum pregnancy'. For instance, imagine you are a woman, hesitating whether you want your child to be mindbogglingly smart, a fast runner or sexy as Pavel. And there you have three men at your possession with these unique properties, By having sex with all three at the short time, you may obtain a quantum child [note for purists: this is not the same as QM superposition]. Interestingly enough, sperm sells are able to identify and attack foreigners.


To err is human, to forgive is devine; Neither is IDF corps policy

Or, Rcl'd: "a disciplinary fault"

Back in 98 when I was a soldier in IDF, one of the drivers in our base (the ex 277 tank regiment HQ) was imprisoned for making a road accident near Kyriat Malakhi. His commander, cap. Gil'or Peri, gave a lecture to the whole base about the incident. "This is, first and foremost, a disciplinary fault," he said.

I've been thinking about the meaning of that phrase ever since, until VG96 (himself a commando fighter) got it all explained to me.

"In the army," he said, "every mistake is disciplinary. After all, you were TOLD not to make any mistakes..."

P.S. also reminds me of the great Joel's post about a rasar in IDF.

P.P.S., also important to mention, before the elections, the 2006 Brigitte Gabriel's video. Thanks Brigitte.

Finite simple group of order two

The annotated Klein Four's "Finite simple group of order two" (recently dag out):


[The credits for the linkification go to AnnK, LR and myself]

Warning for this post (adopted from XKCD): "occasionally contains strong language (which may be unsuitable for children), unusual humor (which may be unsuitable for adults), and advanced mathematics (which may be unsuitable for liberal-arts majors)."


Standards - who needs them?!

I got a pleasant and totally unexpected surprise from my bank. Following request to reset my password, a bank computer called me and spelled the new password to me... in the standard phonetic alphabet!! "b like bravo, s like sierra, etc.." I just couldn't believe my ears.

This was Mercantile bank, Israel just in case you want to switch.

And please, drive on the right hand side next time. And use boost, firefox and metric units. Thank you very much.

Joke #17

Everybody knows it. It's about a bunch of closefriends who, blah blah, oh well, ok, I will type it. They know each other for sufficiently long to tell the same jokes every time. So they numbered them, so that one could say "Joke 17" instead of the whole thing.

Next time, if you want to escape being told a joke you know, say "yes, joke #17". 17 is both the number of this joke and a random joke, for being the most random number.

Joke 17.1 is about one who laughs "oh, I haven't heard this before" and joke 17.2 is when one shouts "joke #800!" and gets a reply "shhh, why tell such rude stuff near women."

So, the time has come to build a global database. Please start by commenting to this post. The title should be a unique ID.