My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://ripper234.com and update your bookmarks.

28 September 2007

My Age

According to this website, I'm 19.4 years old, and will live for about 54 more years. Of course their calculation didn't factor in the fact that I'm a Quantum Immortal :)

Best Cat VS Dog I Know

Cat Diary

19 September 2007

Tamagotchi 2.0

Horrible.

Though, I am forced to wonder if I even have a right to say this. You know, WoW and all...

Yaaar

Happy Pirates Day!

15 September 2007

Google Around The World

Google made a video representing how an email message gets around the world. The video is made up of bits and pieces filmed by people all around the world.

Amusing watch.

13 September 2007

WoW Birth Control

http://www.youtube.com/watch?v=cbU1EBYh0ZQ

I solved the problem by hooking my gf to WoW :)

06 September 2007

Weirdest Game

Weirdest game ever, thanks to Gabel for the reference.

05 September 2007

Famous Death Quotes

"This is no time to make new enemies." - when askd to forswear Satan :)

Link

03 September 2007

The Design of MS Paint

http://www.youtube.com/watch?v=Hxx2KcPWWZg

Took me a while to figure out this is not real.

Fwd: FW: Fw: Fw: הטרנד החדש - מוצרי חשמל שקופים

A bit sick, seeing all your stuff from outside the fridge.

Practical Database in C#

Today I took Eli's challenge (whether he intended it as such or not not :).

Among other things, he mentioned on his blog his opinion that LISP is a more powerful programming language than C#. He offered Practical as an example of LISP's power. Practical is a very simple database built using very few lines of codes.

The challenge I took on myself is to code Practical in C# and compare the implementation with the one given in LISP.

It took me 2-3 hours to read the link on Practical and code it in C#, and I wrote a great deal more lines of code than what I saw in the LISP code. So in a simple contest, C# (or just me as a coder) lost.

However, here are my thoughts:


  1. About 80% of the code I wrote is general purpose. It simulates abilities already existing in LISP. General-purpose classes I wrote are:

    • ConsoleReader - Reading any class from the Console.
    • DefaultFormatter> and ListFormatter - Pretty-print any object or list.
    • Functors - Functors in C# are called delegates. I didn't find (nor looked too hard) for functions to combine, negate and manipulate delegates - so I wrote some.
    • MoreXmlSerializer - As a naming convention, I like to name MoreFoo any class that contains methods that I believe should have been in Foo from the start, where Foo is some class supplied by the framework. Starting at C# 3.0, the ability to add methods to existing classes is supported, so I could adjust the naming convention accordingly.
    • StringConverter - Convert a string to to a given (dynamic) type.


    Besides this code, the actual Practical C# code is very small and concise.
  2. The C# code is type safe. I'm not aware of type-safety in LISP, though as I said I'm not a LISP pro.
  3. The code I wrote is in C# 2.0. Some new features in C# 3.0 should help make it a bit more concise (especially lambda expressions and LINQ).


I think this experiment didn't change my opinion greatly. Yes, functional programming is good. It exists in C# as well as in LISP. Yes, LISP handles lists very well. But, not everything is life (or in programming) should be represented as a list.

I'm attaching my code here. If you have suggestions or comments, please let me know. Also, once I install Visual Studio 2008 (I'll probably wait for the final release), I might try coding this in C# 3.0 and see how it helps the cause.

02 September 2007

Fwd: קצע מ-קצרים על מחשבים


Stolen Software

Beware of the yellow midget!

Good Programmers

See a discussion on the selection of programming languages on Eli's Blog, and my note about general qualities of good programmers.