This blog has moved to Medium

Subscribe via email


Archive for February 2008

What You Need to Know to Work For Me

If you are ever interviewed by me and I happen to ask you, say, to write a function that returns the nth element in the Fibonacci Series, you had better not give me the recursive solution.

It appears that about 90% of the people asked this give this solution straight away, without asking the examiner anything about efficiency. I find this appalling.

Even if efficiency is not always the number one criteria (or even in the top 5), in this instance the recursive solution is much worse (exponential VS linear complexity) than the non-recursive solution AND is not much simpler to code. The difference is about 3 lines of code.

I expect programmers to anticipate and consider such concerns, and even if not asked specifically to give an efficient solution, in such a case they should (unless of course they ask the examiner if efficiency is a concern and get a negative answer).

P.S.

There are some acceptable recursive solutions. For example, from Wikipedia:

public void run(int n)
{
if (n <= 0)
{
return;
}

run(n,1,0);

}

private void run(int n, int eax, int ebx)
{
n–;

if (n == 0)
{
System.out.println(eax+ebx);
return;
}

run(n,ebx,eax+ebx);

}

I don’t object to the actual recursion, just to the exponential inefficiency.

Fake Sites

Lately I see many sites using common misspelling with similar site design to attract users. Today was the first time I was attacked by one such site.

I was searching my own blog on the net to understand who if at all links to it, and got
this dangerous and misleading site. I saw a supposed link to my blog that looked like this (don’t follow this one):

http://technorati.com/blogs/qimmortal.blogspot.com

Clicking it I got a Firefox warning asking if I want to run this “.com” application. Evil bastards.

Science Vs Faith

Not faith in God, which cannot actually be refuted by “contradicting evidence”. Rather, faith in some religion and stories, some of which contradict known scientific facts (= theories proven beyond reasonable doubt), like Evolution.



My First Unfamiliar Reader!

Woo Hoo!

I just got the first confirmed reader of my blog which is not someone I know – Mord Shtern (he receives a link to his blog as a modest reward).

I took this chance to look at some Feedburner stats, and there seems to be a jump in reader count since last month.

This might have something to do with the fact that Yoav shared many of my recent posts as interesting in his blog and/or the fact that Zeirman mentioned me and my post about real time strategy games.

Thanks guys 🙂

If you survived this self-absorbed post you get something in return:

The Best Incredible Machine Ever

Here

You haven’t seen anything like it, though I would bet it wasn’t filmed in a single take.

The chess plays are ingenious.

Too Long, But the End is Amusing

Some Comics I Like

  • xkcd – For geeks only! Funny and smart
  • Penny Arcades – For gamers only. I don’t understand over half of it, but the parts that I do are good.
  • PHD comics – For master students and above only? Not very amusing so far. Perhaps I shall stop once I’m no longer a student. BTW, the current one nicely describes what I’m doing yesterday and today, though I’m more light headed than him. Grading papers can be very funny sometimes (one error a student wrote from a “Spot The Bug” – “This function name is too long”)
  • Basic Instruction – So far I’ve seen only the parts Yoav’s filtering out for me, which are all excellent.

Something I Wrote Once

Words are bullshit. Words are bullshit because they make us think we know the answer. When we say them, we think we know what we feel because we put it into words. When I write them (I’m writing some right now), it makes me feel I can articulate myself, express how I feel. But I can’t. The image presented by words is always a fake one, even when the words are best-intended.

This is Zen, as much as I understand Zen.

And yet, words are all we have

P.S.

A possibly relevant quote from Albert Camus I just found by accident.

“Do not be surprised. I do not like writers and I cannot stand their lies. They speak so as not to listen to themselves speak. If they did listen, they would know that they are nothing and then they would no longer be able to speak.”