Older blog entries for shlomif (starting at number 44)

Freecell Solver Lecture

It went very well if you ask me. There were not too many participants. I think that all the people who were present were Guy, Adir, Muli (mulix), Emil, Tzafrir, Nadav Har'El, and another one whom I know but don't remember his name. There was a lot of active discussion throughout the lecture, and several times everybody burst in laughter; I felt I was doing okay and keeping most people interested, and later on, when I asked him, Muli noted that he found the lecture more interesting than he expected.

I think it went well for several reasons. First of all, I made sure I feel confident about giving it, and know that I'll do fine. Confidence go a long way to making the audience like you. Secondly, I decided not to just read the slides, but rather tell it in my own words, and extend some stuff from my own memory. I'm still not sure that I'm a good speaker, but those skills may probably evolve as well as revolve.

There were a few suggestions that were brought up during the lecture, which may be a good food for thought for the future. One of them was another discussion of how to avoid solutions that are not too long, without blocking deep states that may prove useful in the future. They were not too satisfied with the optimization scan (nor am I sure it is an absolutely robust solution).

Another thing that came up was Nadav's suggestion that I store the states like RCS does, by using deltas from the original one. This sounds like an interesting idea, which may reduce memory consumption drastically, but will make comparing states harder.

Note to self: implement a compact allocation for the move stacks. (very important)


I finally have an on-line BK repository. It took me quite some time to get the ropes, but I think I now know how to use the basic system. It is more tedious to work with than CVS is, but I suppose such power has to come at some cost.

I'll probably check Arch and Subversion sometime later, just to get an objective review of what they give me.

I woke up today at 02:00 AM which is quite early for what I'm used to. I then turned on the computer and started working on it, and then tried to go back to sleep, but could not so I continued working on it until breakfast.

I managed to finally be able to understand how to work with BitKeeper. It requires quite a lot of commands just to commit the changes into the master repository, so I'd better write scripts to automate it (like Linus Torvalds did). I'll probably use it for LM-Solve, just to get a feel of how to work with it and what it can do.

Other than that, I did all kinds of bit and pieces like making the shoes of the BSD daemon a bit nicer. I went running at around 9 O'clock and close to home, I again encountered the same girl jogger I saw yesterday (wearing a differentyl coloured set of clothes). Maybe she has the habit of running everyday at around this time.

31 May 2002 (updated 31 May 2002 at 15:25 UTC) »

Freecell Solver Lecture

I finished it, gave it some final touches and uploaded it to vipe. You can find it here. Now I have to review the slides before the presentation on Monday.


The 3-D impression of a BSD Daemon we created now has moving parts, thanks to a lot of effort I invested in it. Writing Inventor Scenes in C++ sure is tedious. I still have to inform my partner about it.

An exercise that we were given in the "Internet" course, turned out to contain a bottom note saying that we should better use the book "Routing in the Internet". I left it at my apartment, so now I'm stuck without it. But who is John Galt? The way things are progressing it seems Roy and I will have to spend some time off the summer vacation working on the project. We just can't seem to find enough time during the semester proper.

I eventually finished the SICP 2 exercise. I implemented the Minimum Spanning Tree Algorithm with awful complexity because I was too lazy to implement a binary heap from scratch. Whatever: the lecturer said that complexity was not the issue here.


Yesterday, I could not drive through my usual trail in the Yarkon Park because there was a Food Festival there. Today I saw that people started dismantling all the equipment and stages that was left there. So it's probably back on track. There's some kind of activity going on in the middle part of the park, but I don't know what it is. There are just several large heaps of stones or dirt.

Today, a girl jogger sort of accompanied my trail for a large part of my ride through the University St. I then lost her as she jay-walked (or rather jay-ran) across the red-lights in Qeren Qayemet. It was no the first jay walk of her that I witnessed.

Freecell Solver

I placed the source on the CVS repository on BerliOS and since then I was able to hack on it. So far, I did some cleanups of the code, added an unlimited tests order, and implemented compact allocation for some resources. In the compact allocation scheme, I allocate contigous blocks from a buffer, rather than individuallly malloc everything.

The CVS is by far more convenient that keeping tar.gz archives. The problem is that it takes some time to commit it, because the connection is slow.

TuxRacer Demo

I downloaded the TuxRacer 1.1 Demo by SunSpire Studios. The graphics are better than the old Open-Source version. It took me some time to get used to it, but now I like it a lot. I'll probably talk my dad into buying the full game, because it looks very promising.

Learning STL

I've learned a bit of STL yesterday, and covered some of the basics of vectors, lists and iterators. Programming one of the exercises the tutorial gave me turned out to be quite tedious, and it took me a long time to get it right. The problematic part was the data structure logic more than the API.

I don't think I will invest much more extra time in it, because I'm not using it now, and until one needs to use something, he has little motivation to learn it.


mulix said that in his diary, but I might as well too. I hacked on the perl script that generated some code their, and cleaned it up a bit. Most of what I did had to do with making the code more perl5-ish instead of the perl4-like mess it used to be.

I talked with Guy Keren, the other prominent developer of Sys-Call-Track and he said that what he also would like to see is the entire philosophy of the script re-factored. But hopefully, I can do that by doing several incremental changes, rather than one complete re-write.

Freecell Solver Lecture

I started translating the points I wrote to HTML slides. I finished quite a lot of them, but it will take me some time until everything can be placed on-line.


I have a precept on Thursday for "Algo Design", due to the fact that my T.A. has been drafted into the Army with a Turtle-8, and the replacement T.A. does not have the same hours.

Furthermore, I have to sit with my Computer Graphics and "Algorithms" partners, before the weekend.

Learning C/C++

My sister, Noa, called me and requested that I buy for her a book on learning C and C++. Today, I bought the book "A Book on C", which I can still recall from "Intro to CS". Hopefully, it would be suitable for her.

Her original idea was that I should buy her a book in Hebrew, but I told her they are probably sub-standard. Going to Prof. Kimchi's site strengthened this, and I saw there that he recommends "A Book on C".


I had to stay in the Technion today, and may remain for the rest of the weekend. The ironic thing is that it's holiday during the weekend ("Shavuoth") and I won't be able to enjoy it. The anti-christ in this story is the course "Computer Graphics" whose homework require my partner and I to invest quite a lot of time in the front of the computer, hacking with OpenInventor and Motif.

Hopefully, I won't have to do too much Motif programming this time. Building proper GUI is a tedious task, and I have time finishing it in a reasonable time. Especially with a something like Motif that is very awkward and not programmer-friendly. I spent most of the time in the previous exercise trying to get the dialogs to work, and the OpenInventor part was relatively easy.

I really wish I could do Inventor programming in Perl. (or in anything in the same vain). But I'm not aware of any binding that allows it. Maybe, I'll get to it one day. I also wonder how much is Inventor dependant on Motif? I.e: how long will it take to make it available for Gtk+ or something else?

There are Motif bindings for Perl, so maybe I'll settle down for them.

Other than that the last SICP exercise took way too long, because the MIT Scheme debugger was awkward to work with and buggy. My apartment-mate recommended me to use Dr. Scheme, so I think I'll give it a try. And now I have to draw an environment diagram... %-). Plus, I don't know how to draw box-and-pointer diagrams for streams. (and the lecturer was abroad to give a presentation, so I could not ask him).

The other courses are going quite well. Eran and I finished preparing the preliminary reports for the VHDL experiment. But the instructors there did not let us simply hand what we prepared as is. We'll have to be there to see for ourselves. I was told the Sun workstations there don't have floppy disk drives and the Internet connection is not functional. I'll have to go there and find out.

Liat and I prepared the "Design and Analysis of Algo" third exercise and are meeting on Tuesday to prepare the third. I wrote a Perl script that implements the Edmonds-Karp flow analysis scan. We have now standard to learn about complexity, intractibility, Turing machines and friends.

Money Oriented Programming

I just had a three-way chat with two of my fellow students. I am a Perl proponent, one of the others think C++ is the best language in the world (and cannot understand why Perl can be a good thing), and the other works at Sun hacking on Java, and thinks it's much better than either C++ or Perl.

The Java guy asked me how much new code is written in Perl. I told him a lot. "OK" he said, "but not one in scripts, scripts are just workarounds. They are not real code.". I told him scripts were perfectly good code. Then I told him of some applications I wrote that were written in Perl, like the initial version of the IP-Noise simulator, or lm-solve. He said, "OK, but I want code that companies write".

I told him that he gets on my nerves and said "First you rule out scripts' code, now you rule out open-source code. Next thing you'll rule out every other Perl code on the planet!". Moreover, it's hard to compare the volume of codes in different languages. In some languages, many tasks would result in much shorter codebases than in others (and vice versa).

I now fully realize the reason why Stephanov (the STL guy) called Java money-oriented programming. I don't have anything against making money or against selling products or APIs commercially. However, Sun seems to see Java as a hypeware whose prime purpose is to bring it money. I actually see Java as a clean and fun language, which could prove useful to many people. But it's not a language that gives me too many new insights. It short of falls between the chairs of C++ and Perl.

Perl (and Python, Ruby, yeah, yeah) is not about getting money. It's about getting your job done. People utilize Perl and it either saves or even brings them money. However, it was designed as a good language which people would like to use, and not as a commercial hype to make money off those who fall for it and do not know other languages to know better.

Software can be duplicated and distributed for virtually no cost. Charging money for software, or not releasing its source, is therefore a not a robust way of doing things. By robust I mean that you constantly have to make sure your product is a good one, and to make it better. By making it open-source, however, you necessarily give up hope, and so you give a statement of intent, that it is good in any case.

There are some things that are good in Java. But I'm not sure people would have been that enthusiastic about it, had it been released in a quite, hype-less fashion.

I should probably tell about the C++ vs. Perl argument later, but it seems that it will take me some time to convince him that learning Perl is worth his time.

LaTeX Printing Blues

My partner for "Designs and Analysis of Algorithms" wrote our third homework in LaTeX, and included EPSes of several graphs generated by GraphViz in it. The .ps seemed fine, and looked well in GhostScript, but ps2pdf generated absolute garbage. The Com-Net lab engineer has only configured printing for the Windows NT workstations, because the network card used by the HP printer is temporary. So I must convert them to PDF to print them here.

I tried converting the EPSes to PDF, but they also looked bad in gv. Maybe my version of GraphViz does not generate very well-formed ones, which causes some problems. So I had to print the PostScript file. I scp'ed the file to my account on the NT farm or Linux farms.

I went to the Linux farm but could not login from my faculty-wide account. Luckily, I could login from the account dedicated to my computer graphics course. I scp'ed the file from the other account and tried printing. What gives? There wasn't an lpd server on the system.

Next resort: I logged in the SGI machines and run lp on the file. Now this printed perfectly on both sides of the paper. Thank you, Technion, from making such a simple task so complicated.

I tested it now, and I could convert the PostScript to PDF by using "ps2ps" on it first. But it seems to have a degraded quality. At least when viewing it. At home the Linux cannot print anything as the printer does not respond to characters being sent to it from some reason. And Epson 740 is supposed to work perfectly with Linux.

Some Extra thoughts about Human Engineering

You may remember my post here in which I preached about the importance of Human Engineering in software. But naturally, good human engineering extends towards other fields. Actually, getting people to know about your OSS project is relatively easy, assuming the project is actively maintained and technically sound. You just post regular updates on Freshmeat, and let Google and the Freshmeat Effect take care of the rest. (just please choose an original name, so you won't clog the whole search like Freecell Solver did).

But the problem is that I'm a writer as well as a programmer, and I'm distressed that my stories did not receive too much attention. But then I remembered how I got the few people who read them to do so: by being a good human engineer. I told them about them, got them interested in them, and got their attention. Until now, I thought the best way to get publicity was to get people to link to me from my site. I did not try too hard doing that, but maybe I should also complement it with a slightly different approach.

What I'd like to do is to get people to read them by making them interested in the story: telling them about it, answering their questions about it, and creating a culture of small and dedicated people around it. Chen Shapira told me she had already read "The Enemy and How I Helped to Fight it" (which I wrote) four times or so, while "trying to look for hidden meanings". So she probably likes it. She's also very fond of "The Pope died on Sunday" which is unfinished. If I can create a web culture of people like that, I will eventually get more people to know about the stories.

Like I said in the article, good human engineering is more about being polite and friendly, and there are some facts about my Internet presence, which I realized are not good HE. For instance, my homepage does not have a News section. Finding something new there is like "Cherche la Femme" - you have to use a web-diff tool. I think I should put one right between the title and the first <h2> heading. (and naturally archive previous news items)

And another thing: I should create a mailing list for discussing my stories, probably on Yahoo-Groups, this always helps creating a Net culture around something. For the time being, there had been some discussion of my stories on Hackers-IL, the Israeli Objectivism web-forum (which I "terrorized"[1] for a while), and perhaps other places. But nothing too serious.

Another problem, which is harder to resolve, is that I write most of my stories in Hebrew, and only when I'm happy with them, I translate them to English. Translating them on the fly is a pain, because I happen to re-write parts of them constantly. Naturally, I'll get a much larger audience had I wrote them in English, but I'm comfortable writing in Hebrew.

Recent Developments

Eran is not feeling very well and he could not sit today to finish the VHDL experiment. Nevertheless, we have till the end of May, and we don't have too much left to do. I stayed at Haifa today, because I thought I was going to meet Liat (my Algo Design partner), but I now got a call from her telling me she would not be able to make it, because there isn't a ride to the Technion from her workplace, today.

So I'm returning home, after I eat lunch today. I did not sleep very well today, so I'm a little unfocused and cannot concentrate. I should remember to send everything that I worked on the Technion back home. Let me se: the LM-Solve CVS repository (which I'm sending back and forth), the extra-new FCS lecture summary, homework in SICP 2, the previous homework in CG...

Hmmm. Better keep the computer on, just in case I forget something. I wish the Com-Net Lab had a publicly accessible source control server, on which I could put all my stuff.

Working in a Defence-Oriented Workplace

I keep getting contradictry opinions on what will it take to work in a company that oriented around military projects. According to Orna Agmon, I can forget about it because I did not serve in the IDF. According to my mother, I need to volunteer for one year in the IDF. Now, Roy said that all I need to do is pass a security clearance test.

Many of the Israeli Info-Tech jobs have something to do with the Army. Someone I met who works in El-bit said that some things are developed in five different places in the world at the same time, while three of them are in Israel. :-) That sounds a bit too illogical for me.

In any case, I'm not sure I'd like to work in such a place due to the high secrecy factor involved. I like to tell people about what I do or what I did. So far, I can tell everything I ever did in the past without me proving to be illoyal in some ways to my previous workplaces. I don't think secrets scale, but the army seems to think they are a necessity. It is also possible I'll become nervous because of something that happened in my workplace, which I'll have trouble telling about to my friends and family.

The Ironic thing is that some "Atuda'im" (People who do their university degrees before the army service, and later serve as officers for a longer time) are allocated as administrators in something that requires little if any of the scholastic knowledge and proficiency. And then the army complains that it still lacks engineers, even though, there is a surplus of them (at least in some areas) in the Israeli market.

Check the following link for something I wrote regarding why I think there should be a voluntary recuirement into the Israeli army. And ironically, the latest situation has only made it clearer for me on why it is necessary.

35 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!