Wednesday, August 31, 2005

Geek Challenge

Here are some interesting programming challenges. There are more of them but the main one has only 13 levels. Out of 2371 people that started it only 3 completed all the levels.

I am currently working my way at level 8. Catch me if you can. (My user is Arjuna).

Tuesday, August 30, 2005

Serious Stuff

Since the previous post had no real intention of providing interesting information, this one makes up for it.

Here are two links I discovered:

This is a nice FPS that has 96kB. A lot of procedural textures and other cool stuff included. The game is pretty large (I haven't finished it yet). Take a look here for more informations about .theprodukkt which is the demo team that produced this game.

The second link contains a browser-based word-processor and desktop publishing. In one of my previous posts I was discussing something akin to a browser based OS. Here we see a browser based word-processor. I wonder when will someone finally integrate everything tightly into a package?

Monday, August 29, 2005

On Paths

Today I am going to talk about paths. I am not speaking about path as in "the path you choose in life", nor am I going to speak about path as related to file-systems. I am going to talk about path as a synonim to road.

It is my own impression that there is probably one thing that us, Romanians, and especially the breed that lives over here in Bucharest is good at: making paths. It is very obvious once you arrive here. You can see paths everywhere.

Let us take an example: As I go to the local supermarket (a Carrefour) there are at least four (probably more) ways of access. There is a paved way towards each of the gates. In spite of this, the preferred way of access from one side of the store is via an unpaved path.

I am under strong suspicion that most paths that I have seen in other places in Europe are also done by Romanians. Therefore, I thought that there should be at least some laws that describe paths:

Law 1: Any two points can be connected by a path
Law 2: If there is a green sector, someone will make a path through it at some point in time.
Law 3: Any path once made through a green area shall never be green again.
Law 4: Any path once made shall become wider and wider until the whole area nearby becomes one barren land.

What does this spell you ask? It spells bad infrastructure, lack of respect for the common good and probably lack of sensitivity to nature.

Thursday, August 25, 2005

In other news...

In other news, Google published Google talk today. I installed it, didn't like it.

Don't get me wrong here. I am not a Google hater or something. I use some Google products a lot. I just don't think Google Talk is cool.

To give two positive examples of software that I like from Google: Google Earth and Google Desktop Search v2 and Google Print. I liked both of this a lot (besides the search engine, of course).

Anyway... andrei and probably other people who read this think I hate Google. On the other hand, CK and maddox think I love Google. I for one see the subject a little different... like some kind of whale. I like some parts of it, dislike other. On the whole, I consider it a subject of study.

Freakonomics Review

Ok, so I finally finished one of these days Freakonomics. As all good boys know you can find it at Amazon. Bad boys know, additionally, that you can find it on P2P networks ;). So here should be the promised review.

What I liked about the book was the sheer novelty of the book. There were some new questions asked, and some old questions answered in a new manner. One of these questions was formulated in the following way: If drug dealers make so much money, how come they still live with their moms? The answer is pretty surprising (I will not spoil your fun by giving the answer here).

So the question is... what is this book talking about? Well... it's hard to say. In my opinion it is a book that teaches you how to think about the world. I could say that the style of the guy is similar to the style of Socrates (in Plato's dialogues). He questions everything and always tries to come out with new answers. Some of the answers seemed bold, but all of them had at least some sense. I do believe that this way of thinking is highly beneficial to everyone.

Unlike a typical economic book, which is very dry, this one has some actual novelty in it. I do believe for one thing that most sciences have a more important purpose than to be used by the ones that master them to gain money as employees. I believe that this is where most teachers fail when teaching their disciplines.

For example, economics is a science to teach people how the world works. Mathematics is a science to teach people how to think. Informatics has a similar purpose to mathematics. It teaches people about processes and approaches to solve problems.

To become an employee means almost the same thing as learning English to become a translator. Usually, you learn a foreign language as a means to communicate to other people, to expand your horizons.

I think that this is generally why I liked Freakonomics. It teaches you how to think.

Tuesday, August 23, 2005

Flipcode Closed

As I was surfing randomly yesterday, I found out that flipcode closed. It was one of the most important sites on game programming. A lot of knowledgeable people hang around there.

Well, I guess life goes on. There are other similar sites out there right now. Six years ago this was not the case. Flipcode was certainly an innovative site.

Monday, August 22, 2005

On Destiny

This post is rather different from the preceding ones. I am not going to talk about anything technical but rather I will talk about questions that keep me from sleeping.

When waking up I am generally in a good mood. However, as the day progresses, the state of my mind degenerates. I often feel, by the end of the day sad or preoccupied by various defects that mark my personality. The next day, the cycle repeats. Almost like a factory, I seem to be dragged in a direction that is pretty much determined. After some thinking, I realized that almost everyone else is the same. People seem to act often against their will.

One of the things that I managed doing these days was reading Freakonomics by Steven D. Levitt and Stephen J. Dubner. I have not finished reading it, but I shall write a review here when I do. In this particular essay I shall try to discuss only one of the chapters of the book. The chapter in discussion is chapter 5, What Makes a Perfect Parent?.

Levitt uses a study done by the U.S. Department of Eduction. The study was done on an enormous amount of children. He puts forth a number of questions like: "Does it matter if the child's parents were well educated?", "Does it matter whether the child had low weight?", "Does it matter if the child is regularly spanked?", etc. In the end, he reaches some conclusions. For the curious amongst you, the first two factors mentioned above matter, while the third does not.

What surprised me most was the conclusion he reached at the end of the chapter. He said that the only common trait of all the factors that matter is that they are "Things that parents are". Meanwhile, the common trait of factors that do not matter are that they are "Things that parents do".

Extrapolating this to my case, I realized for a second the nature of destiny. I realized that a person should be in a certain way to do a certain thing and not vice versa. What you do is defined by what you are.

Offtopic: If some of you saw the movie "Batman Begins", you probably remember that in the movie there was a similar quote but it was exactly the reverse of this. I don't know if it was for marketing purposes or what, but generally speaking that quote was also true, but in another way. For the outside world, you are defined by only what you do (i.e. by the way you manifest yourself). However, acts cannot be made without a certain personality behind them.

Back to the topic again... I have certain friends who are very skilled at certain things (like programming). What I realized by looking at the way they thought is that they generally think different than most people. For example, they are very curious. They also often have a very intense passion for things they do and very often are aggressive when it comes to their skills.

I realized for one, that when people imitate this way of doing things, their skill also increases. It is somehow like this: You must first become a good programmer to be able to learn to program. You must become a good tennis player first and learn tennis second. You must be a fighter first, and learn boxing later, after you became a good fighter.

Now for the bad news. I found that generally, to adapt your mind in various ways I found that you must do a lot of repetitions. You must do that thing which you attempt to do. And this must be very often. If you learn to play Go, you must do it very often. You must play with high ranked and low ranked. You must play very often with people that have a rank just above yours. You must watch games played by guys that are far better than you are. You must solve problems.

The same applies for nearly any other domain, be it Go or programming, mathematics or martial arts, or even if you want to be a better student at school. And speaking of school, one thing that I found VERY annoying is that the accent is always on theory. Which is dry without practice.

At any case, this concludes the post. It probably is abrupt and probably isn't very unified but, I felt like I needed a core dump on the subject.

See you next time...

Sunday, August 21, 2005

Why I Like Perl

Perl is a fairly recent addition to my knowledge. I needed a program that would generate a random string given a regular expression. I found only one solution that was good enough for me. It was a module for Perl. Since I actually needed the code, I opened a book nearby (which happened to be Learning Perl by Randall Schwartz and Tom Phoenix). I skimmed through it and through the man pages of the module and in about 1 hour I wrote the thing that I needed. So I thought it was quite OK as a programming language.

I already knew Python fairly well, and I had nothing better to learn (actually I had, but I didn't like that other option very much). So I said... what the heck? At any rate, since a lot of people are using it, it should be at least doing something right. Of course, if a language is not used by a lot of people, that doesn't mean it is a bad language, but that is a different story.

So I finished reading Learning Perl (properly this time and doing the exercises) and I started reading Programming Perl by Larry Wall.

The book was too much. I am not able to remember even half of it. However, I liked Perl because it was fun. Unlike Python, I was able to code anyway I liked it. Writing Perl code is almost similar to cartooning. Or doing something similar. At any rate, small projects were very easy to get done. It was also pretty cool because it looked like a spoken language (Of course, I am forgetting the $,@,% here ;)). I was usually able to write a statement any way you like. Another thing that I liked was those default variables. I liked them because they make the code shorter.

However, I really didn't like the way the code was looking when it got big. As the code grows, it seems harder to mantain.

So where am I now? Well, somewhere in the middle. Lately I have been using Python a lot more again. However, I still use Perl as a glue language (which was designed to be in the first place). The irony here is that even though Perl is bigger than Python, I really think that it is better suited for smaller projects than Python.

On a larger scale, I think however that even Python breaks, and you probably are forced to use a stronger language (C++ for example). I haven't got to work in projects of such magnitude yet. After talking to andrei (he posted here in response to one of my previous posts), I generally think that languages like C++ and Java are a lot more used than they should be.

At any rate, if anyone out there cares to learn Perl, you might as well give it a try. Some things are done easier using it. Also, as Musashi once said, "do not have just one school". As a result, I do not care a lot about the philosophy (TIMTOWTDI or the Pythonic way)... I just take a problem, and solve it (and in the meantime I try the easiest way to do it).

Keep your mind flexible. And if you are used to Python, Perl might just make it flexible enough.

Let's limbo :D

Saturday, August 20, 2005

eyeOS

Here is an interesting concept (again, click the title to see what I mean by the word here). EyeOS is an OS with a web interface. Well, in reality it is not really an OS per se. To install it you have to have a web server that supports php. After that the installation process is pretty straight forward (it is described on the site).

How it is? Well it has a good interface. It is simple but also beautiful. It can also be improved a little. It would be nice if you could customize the appearance of the site.

What are the perspectives? Well I would have liked something like this done on an account by google. Imagine the possibilities. You would truly have GoogleOS. And you would be bothered by security (Google would protect the datas). An account of 20 GB with eyeOS on it would surely be a great thing.

Anyway, I have not thought on the problem very much, but I think that something like eyeOS is probably an interesting move for companies like Google, Yahoo or Microsoft. With the advertising of mobile technology, (live CDs, flash-sticks, laptops, etc.) this seems a sensible move.

Thursday, August 18, 2005

One Computer To Rule Them All

Steps:

1) Check the link in the title.
2) Buy me one.
3) Be given the title of hero and all other honours, whistles and bells.

Monday, August 15, 2005

The Perfect Programming Language

I have a very clear idea on how a perfect language should look. Actually, the design is so simple that it is altogether more annoying that something like this isn't already out there. I will call it the Perfect programming language.

1) The Perfect programming language should be compact and elegant. Good examples are Python, C and Lisp. If it fits inside someone's head with ease, it is compact. Perl and C++ are NOT good examples.

2) The Perfect programming language should be interpreted most of the time but it should be compiled whenever necessary. Lisp is the only one with a similar feature.

3) The Perfect programming language should have a large user community and a mechanism for distribution similar to CPAN. Also it should have something similar to sourceforge. C/C++, Java and Perl are where people should look for. Lisp is exactly what I don't want my language to look (i.e. fragmented in 1001 pieces).

4) The Perfect programming language should be dynamically typed. I don't want ugly templates similar to those that can be found in C++. Dynamic typing is the future. People should look for this at Lisp and Python.

5) The Perfect programming language should treat code as data. Lisp only makes the cut here.

6) The Perfect programming language should have objects. You should be able to do anything you want with those objects. Add methods to certain objects, create classes, inherit, extend, etc. CLOS, C++, Python and Ruby have all some interesting stuff in it. Perl does NOT look good from this point of view..

7) The Perfect programming language should be relatively easy to read. Any of the languages mentioned above (including Perl and Lisp) make the cut. Of course, something like Python is desirable. Actually I would love it if Python would have ';' (semicolon) removed. In this way you wouldn't be able to obfuscate the code. Of course, you wouldn't be able to write in-line code, but I wouldn't mind this very much. After all, people already have Perl and bash for in-line commands, I need a programming tool.

This is almost everything.

Fads

This is probably a unique post. At least, I will try to keep it unique.

The current entry will be an entry about blogging. I see a growing tendency in the blogging community to blog about blogging. People often talk on blogs about how great blogs are, how to blog, how cool it is to write a web log, and stuff like that.

Of course, people blog about anything popular. So if blogs are popular, then let's blog about blogging. Otherwise, the traffic will drop very soon.

This seems to me like patting on your own shoulder. If you blog, it should be about something meaningful to the rest of the world, something that is worth telling. It should not be something that blogs for the sake of blogging. It would be the same as if New York Times would have whole articles about typography or paper production and maintenance.

Since for me traffic on this site isn't that important a factor, I will try to never post about blogging (this is an exception).

ASCII 0x004

Wednesday, August 10, 2005

The Bookmark Organizer

THIS has been the last night I ever lost. I shall never do that again. EVER!

On the bright side of things, I finished up the Bookmark organizer. Initially I wanted to write it in Perl, but it would have meant that people had to download libwww. So I used Python instead.

To be honest, the result is disappointing unfortunately. I like my hand picked stuff much better. Out of my 3873 bookmarks, my program wasn't able to find 923 of them. Many url's like this one:
http://tripod.com/~my_art_page/
get stored where dmoz holds tripod.com. So it's not very good. The program also writes only Opera output files.

The usage is fairly straight forward: borg.py opera_export_file. The unimaginative name comes from bookmark organizer. When it will finish you will have a file called dmoz.adr (on my computer it took 2 hours and something).You can import that file in Opera if you like. It will create a new folder called dmoz. Use it at your discretion.

The code comes with absolutely no guarantees. Make some backups, don't be stupid. Also, you can extend it in any way you see fit. I don't think there will be any upgrades.

Tuesday, August 09, 2005

Net Wars - Revenge of The Search-Engine

Yahoo announced that they index about 20 billion pages (versus Google's 8 billion pages). CNet was euphoric (see the title ... it's clickable :D).

In my opinion, the trouble is not that Yahoo is searching more, but Yahoo is actually searching better. If you will look only through a few searches you will see that Yahoo's search engines seem a little bit more relevant.

This seems to be a phenomena that is happening for some time. I was aware of it only when I realized that Google did not index pictures of Abu Ghraib abuses. Somehow, Google didn't seem so "not evil"-ish to me anymore. Of course, it has great software, but ... something is not right. This was not the only incident of its kind.

The battle for the web is most certainly not over. Yahoo, Google and Microsoft all have some aces in their hands. Google is rumoured to acquire Meetro. However with a market strongly dominated by Yahoo and MSN messenger, this seems to be very difficult. As counter, Yahoo released Yahoo Messenger 7 which is hailed to be a Skype-killer.

Google News was also improved by Google. It has RSS feeds. But so did Yahoo (at least since June last year). And since both services are based on the search engines of their owners, Google seems to be at loss again.

I am very interested on the way this competition will improve searching. I finish this with a quote of Frank Herbert:

"All governments suffer a recurring problem: Power attracts pathological personalities. It is not that power corrupts but that it is magnetic to the corruptible."

The Horror of The Bookmarks

After a lot of postponing, I finally came around to organizing my bookmarks. I have a lot of them. I have about 4000 bookmarks (after deleting duplicates and removing dead links).

So here I am, with a directory tree in which some directories have more than 400 items. What am I going to do? This is a pretty difficult question, with no easy answer.

The inquiring minds want to know: "Why in the world do you need 4000 bookmarks?". After all, my room mate says: "You should only put in the bookmark folder the stuff that you use very often". Good candidates amongst this are: IMDB, ,Storage Review, Google News and some similar stuff.

This seems a reasonable recommendation. However, you have to ask yourselves: Why should you put these particular ones there? If you visit those addresses often enough, you remember them easily. Even more, Opera has a nice feature (nicknames) which makes it redundant for people to look in the Bookmark folder for the most visited websites.

In my opinion, Bookmarks are for that section of the web which has (or had at some point in time) relevance to you. I for one, realized that in time, my interests travel a rather spiral trajectory. I focus on one domain of activity for a period of time, which leads me to another domain and so forth, until I come back at the activity that started it all, but with a higher understanding of the problem.

So the bookmark menu should have in my opinion a lot of links which should be used to give you new ideas. You should easily have access to all of them.

This is not to say that some pages never loose relevance. For example, I was at some point in time interested in learning VRML. However I never got to learning it. Those bookmarks were deleted a few years ago, considering that VRML proved irrelevant.

How did I solve the problem? Well... I didn't fully solved it. I used a makeshift hierarchy of directories that I mapped on the system. Unfortunately, my hierarchy is not perfect.

It seems that for a large number of results, folder based strategy is suddenly very limiting. I would rather have an approach similar to the label system used by GMail. Unfortunately, I don't really have that thing here.

The final solution is probably going to involve a script, which will take the hierarchy of directories from dmoz or somewhere else and automatically place each link in the appropriate directory. This will probably have a better result. Unfortunately I was so lazy these days that I was unable to finish the script. When it's done, I will post a link to it here.

Friday, August 05, 2005

New Students

Recently the admission exams for various universities in Romania's ended.

My sister, Ioana, was admitted at the Academy of Economic Studies in Bucharest. I wish her all the success in the world.

Mystik, a close friend of mine was admitted at the Faculty of Architecture in Timisoara. Grades in Romania are on a range from 1 to 10, 10 being the highest. Mystik had 9.90.

I wish them best of luck in future endeavours.

Dan Ionut Fechete Won 1st Place at The CEOI

Dan Ionut Fechete is the brother of one of my friends. He has won 1st Place at the Central European Olympiad in Informatics, held in Hungary this year.

Here is the official ranking list.

Keep it that way Dan!

Thursday, August 04, 2005

Vulgar Programming

Learning a new programming language is often easy. However, if it does not expand your horizons, it is probably not a very useful way to spend the time.

The term Vulgar Programming was suggested to me in a discussion with a friend of mine, Metadev. Metadev realized one day that most of our acquaintances, who had to program, knew only a small subset of the standard C library. Many of them were afraid (or simply didn't knew) advanced C++ ideas like templates and operator overloading. When needed, they implemented similar functionality in C or (when a GUI was needed) they used Java. Perl or Python were less used.

We browsed some code in the local repository and the statement seemed to be statistically true. The statement often seemed to be true for fellow students at our University.

Now this was for us a mystery. These people most certainly learned about the aforementioned stuff in the courses we had. What then was the problem?

The problem seems to be a lack in the homework system. A C programming class has 13 lessons distributed along a semester. Along these 13 lessons, various homeworks are given. Students do the homework but fail to understand the necessity of the theory behind each new idea explained. Those who do understand the ideas, do it because they program in their spare time.

Even when students do understand why something is good, without reinforcement, they often forget it.

In the discussion between me and Metadev, Metadev coined the term Vulgar Programming to the style of programming of those who used to reinvent the wheel a lot. I choose here to change the meaning a bit to make it positive. Vulgar programming is a method of programming of somebody who starts with very little formal instruction (unlike most university classes), but doubles it with a lot of research and hands-on experience. It is like going to China to learn to speak Chinese. It is the best method to do it.

While most will say that lack of interest is the main cause, I for one do believe that a new method of teaching programming is required. In this new method of teaching programming, only the bare essentials are taught formally at the beginning. This bare essential is about the same in each procedural language: data-types, decision and looping constructs, functions and classes. This should be almost skimmed over (and not really learned).

After this, a homework should be assigned (it could be done in teams, in my opinion). This homework should have the property that it is very laborious to solve with the aforementioned means, but very easy with a specific feature of the language (for example templates, or other ideas).

The students will have two choices ahead: to write it the hard way, or to document themselves about new language features that might help them. The latter of thinking yields in my opinion to better programmers overall.

It rarely helps having read the 900+ pages edition of "The C++ Programming Language" by Bjarne Stroustrup if you forgot a lot of it as soon as you finish the book. It is much more useful to extract information from it and make it yours forever.

Tuesday, August 02, 2005

Welcome

Welcome to my blog!

My name is Doru-Mihai Muntean. The hype was too much to resist so I finally decided to set up a blog.

This blog will be updated as often as possible. It will contain my thoughts on issues related to technology, mathematics, linguistics and current events. The main reason for this weblog is to organize thoughts in a useful manner.

I am excited about the opportunity to discuss ideas with you guys, so please feel free to join and comment.