Archive for General

System Daemon Manager

The System Daemon Manager (SDM) is a tool for running any program as a daemon (background process without controlling terminal) on a Unix system.

  • Each daemon is given a name by the user. SDM will watch the daemon, and will allow you to stop the daemon (or check whether the daemon is still running) from any terminal by name.
  • SDM uses lock files to determine whether a daemon is running, so this avoids problems with stale pid files. The disadvantage is that the lock files may not reside on an NFS filesystem (since NFS doesn’t support lock files).
  • Finally, SDM can be run as any user, not just root. Of course, with SDM you can only stop daemons that are started by you. SDM itself doesn’t need root privileges.

Usage

An example will say probably more than words. In the following demonstration, we start gedit as a daemon:

[bash@localhost]$ sdm start my-fancy-gedit-daemon gedit ~/cool-file.txt

The second argument is the name for this daemon, and the other arguments are the program to start. gedit will now run as a daemon, so even if we close the terminal window (thereby sending a SIGHUP to all processes in the terminal), gedit will keep running.

We can check gedit’s status at any time:

[bash@localhost]$ sdm status my-fancy-gedit-daemon
PID: 14235

If we close gedit manually, and we run the ‘status’ command again, then SDM will tell us that that daemon is not running:

[bash@localhost]$ sdm status my-fancy-gedit-daemon
Not running.

Finally, if the gedit daemon is running, then we can stop it with the following command:

[bash@localhost]$ sdm stop my-fancy-gedit-daemon

Download

You can get SDM through its Subversion repository:

svn checkout http://public.railsplugins.net/repos/sdm/trunk

Once you’ve checked out the source, you can install it with this command:

make install

SDM requires Perl 5.8 and the Time::HiRes module.

Comments (1)

Windows Update hosed my Windows!

Yesterday I ran Windows Update. It told me to restart the computer, but since it was late, I shutdown.

Today I booted Windows. AVG tells me that avgcc.dll is not a valid DLL. I started Internet Explorer – it froze when loading a page. I started MSN Messenger – it tells me shfolder.dll is not a valid DLL. Windows Update hosed my Windows installation! Upon analyses, it turns out that 6 more DLLs in my system32 folder are corrupted. I don’t even have the Windows installation CD – PC vendors don’t even provide them anymore these days, so I can’t reinstall Windows. Heck, this computer doesn’t even have a restoration partition. I eventually managed to restore the DLLs by asking others to send them to me.

Comments

Quote of the month

From “Welcome to the NHK”, episode 2. :)

And no, it’s not a fake. It’s not a bad translation either. Download the fansub yourself if you don’t believe me. :)

Comments

Congratulations Mike

Mike finished his final exams. Hiep hiep hoera!

Comments

The terror of “users”

OK, maybe “users” is the wrong word. I should say, “leechers”.

What am I talking about? I am talking about this Slashdot article, in which people complain that fixing the bug in CVS is not good enough for them. Before you mark me down as one of those “l33t elitist bastards who don’t have about users and should die and burn in hell” (like many Slashdotters apparently do to OSS developers), read on.

I’m an open source developer. I’m also a student. Right now I’m 4 weeks aways from my exams. I just spent 3 hours studying Management & Organization, for which I have to read about 100 pages per week. Other subjects I have to study for the upcoming exams are Linear Algebra and Basic Computer Science Models. One of the reasons why I write open source software is because I enjoy programming. I usually try very hard to make my software as easy-to-use as possible, even to nontechnical end users. In fact, the past few months I have spent hundreds of hours writing documentation for non-technical end users – documentation which is full of colors and screenshots to make it as easy to read as possible. When users have a serious problem I usually try to help them as much as I can, provided that I’m not too tired or busy or anything like that. And I do all this while I have very few time because of my study, for free.

Am I someone who don’t care about users? Would I have spent all that trouble writing documentation and making my software as friendly as possible, if I don’t? According to the Slashdot article, I apparently am. It is apparently a sin to ask users to see whether they can reproduce a bug in the CVS version.* It isn’t good enough for them to ask them to help me out a little bit. No, the leechers expect me to do all the hard work for them – to sacrifice my free time, for free. And apparently I’m a miserably failure if I don’t do exactly as they demand.

* Now, if you say that nontechnical users don’t know how to use CVS – that’s an entirely different issue (I spent lots of time writing user-friendly SVN instructions for non-technical users, but that’s besides the point). But what I’m talking about is the attitude of the leechers. They think “users” are god-like creatures who deserve to be worshipped by their slaves called “developers”. And money? No, we have to do all this for free. When we ask for money the leechers suddenly shut up and ignore your post, and go whining in another thread. They whine but are not willing to put their money where their mouth is.

Worse, they come up with threats like “if you don’t write top-quality bug-free user-friendly software for free, OSS will never succeed on the desktop!”, “my boss will forever see OSS projects broken amateur toys on SourceForge and you’ll never get a job in the IT field!”, “it your program is not user friendly then don’t release your crap at all!”.

What has the world become? What has become of manners? I’m giving a gift away for free, and I event spend my free time helping people, while I get no reward for it. And the leechers whine and whine. I have never heard of someone who receives a gift and then complains that it isn’t good enough and demands for a better gift. (Well… except maybe Paris Hilton who didn’t like the ring she received from her former fiancee ;) ) But apparently the leechers think it’s normal when it comes to software.

But what about closed source software?

People complain all the time that OSS software is inferior to commercial/closed source software, claiming that paid professionals will even work on the boring parts of the program while the OSS hobbyists don’t. Well there’s a truth in that statement, but when you ask those very same people to pay OSS developers, they suddenly shut up and go happily back to whining next time there’s a similar article. And they think their expectation is justified because apparently you’re a god if you can’t write code.

And what about commercial open source software? People never think about that when they compare open source software to commercial software, even though there are many successful commercial open source software, such as Ximian/Novell’s Evolution and OpenOffice.org. Those people praise all commercial software for being user friendly (while critcizing open source software for being unfriendly), but for some reason that doesn’t apply to commercial open source software.

What about closed source freeware? Leechers seem to have completely forgotten about that. They whine all the time about abandoned/pre-alpha projects on SourceForge being an example of how open source software are generally crappy, and praise closed source software for being high quality, but don’t even mention the legion of crappy closed source freeware apps. In fact, hobbyist open source software is almost always better than hobbyist closed source freeware.

What about bad closed source software? Every closed source software has its own flaws and its own set of problems, and their users complain about them. But Slashdotters ignore that completely and act as if closed source software is always perfect.

As for the original issue (the complaint about the response “fixed in CVS”): apparently they’re OK with how closed source software authors deal with the issue. So why don’t we all close public access to CVS and tell them “the fix will be in the next version, and no you can’t get it earlier”, just like closed source authors do?

Comments (4)

The ultimate showdown

The ultimate showdown, starring:

  • Mario
  • Sonic
  • Batman
  • Chuck Norris
  • Godzilla
  • Optimus Prime
  • Gandalf the Grey
  • Gandalf the White
  • Power Rangers
  • Captain Kirk
  • Etc.

Comments (2)

New ideas for captchas

Our forums allow anonymous posting because that lowers the barrier for users. Some time ago I modified the forum and added a simple anti-spambot protection. The protection asks the user to enter a specific string in a field, or he wouldn’t be able to post. Recently a bot (assuming it really is a bot and not “cheap paid workers from South Africa” or something, as Mike suspected ;) ) broke through the protection and spammed the forums. That bot has now been banned of course, and I changed the anti-bot string. I didn’t implement a “real” captcha (autogenerated string in an image, possibly with added noise to protect against OCR software) because it would take too much time.
Our forums requires visual confirmation (captcha) when registering an account. Mike suspects that there are spambots who can break through the captcha, because there are quite a few registered users who have unusual/suspicious URLs in their profile, although they don’t post anything on the forum.

Today I suddenly came up with two ideas while thinking about captchas. Has anyone ever seen ASCII art captchas on the net? I don’t! What about captchas that are made of colored HTML table cells (to simulate pixels)? Never seen them. There are probably no spambots at the moment who can read ASCII art or colored-HTML-table-cells-”images”. So why not use them as captchas?

Comments (1)

Confirmed by netcraft

Isak seems to have declared me dead, so here I am to prove that I am not. Besides, I can’t really concentrate anymore after having studied for 6-7 hours.

By the way, did you know e^(iy) = cos(y) + i*sin(y)? Or that the solution for y” + y’ + y = 0 is e^(-x/2) * (c1 * cos(sqrt(3)/2 * x * i) + c2 * sin(sqrt(3)/2 * x * i)) ? I do, and I hope I still do by Monday.

In other news, I was a huge Delphi fan. In my opinion, Delphi 3 was the best IDE at the time. I installed Delphi 2005 Architect a few days ago. WTF?!?!?!?!?!?!?! It requires .NET Runtime, .NET SDK, Microsoft J# SDK, Microsoft XML Services, Microsoft OtherStuff. Delphi has become 10 times slower, even on this ultra-fast Athlon64 3000+. It looks very similar to Visual Studio, only more bloated. But it looks nothing like the old Delphi. Things have become too Microsoftish. Delphi crashes at exit. Half of the components are useless database components. Overkill.
No more Delphi for me. Borland isn’t what they’re used to be. :(

I also installed Visual Studio 2005.NET. And frankly I can’t see why people like it so much. The form designer isn’t up to pair to Delphi’s (not even Delphi 2005′s). And its slow even on this fast computer.

Comments (1)

“help meee!!! yum broke my system!”

Mike’s past blog entry absolutely hit the nail. I too am a fellow Fedora 4 user. A few days ago I ran yum check-update. And look! Shiny KDE updates! Even though I’m an avid Linux user and developer, I really don’t care what version of KDE I have as long as it works. I type yum install kdelibs kdelibs-devel kdeblabla .... (I don’t type yum update because the Fedora Extras repository contains a broken directfb package!!!!) and an hour later or so it was installed.

A few hours passed. I got a phone call. “Go online on MSN”.
Huh? I didn’t shut down Gaim. Wait a minute, where did Gaim go? I don’t remember shutting it down. *starts Gaim*
A few seconds later -> instant crash. I restart Gaim, I talk to someone on MSN. As soon as they talk to me, instant crash. I can’t figure out the problem. gdb didn’t produce anything useful (it says abort() is called). I also tried to burn some DVDs – didn’t work, as k3b crashes at startup!! I then noticed that yum upgraded to KDE 3.5.

Moral of the story? Its just as Mike says, repositories cause a lot of problems. You would have thought (or at least, that’s what everybody tells me) that the distribution will guarantee that packages work well together. Nope, here’s one case so that myth has been debunked.

Everything works again. I search some Fedora forums and found out that I had to upgrade to the latest k3b (luckily they had an RPM for Fedora or I’d have to compile from source). I also managed to make Gaim not crash by upgrading to 2.0 beta (which has its own share of problems but that aside).

Back to autopackage

Is it Autopackage or autopackage? A few years ago, Mike said it should be autopackage, because he doesn’t want autopackage to become a brand, but rather a system component that seamlessly integrate in the system, and that the user shouldn’t even have to know that it exists. I wonder if he still holds the same opinion today.

Software installation on Linux

Sometimes I wonder whether Linux will ever succeed if things continue like this. One would think that people would be aware of the problems after reading all the complaints on Slashdot (“no Linux is nowhere near usable enough like Windows/OSX!!”). But apparently some people think in radically different way.

Is making software installation easy for the average user a good thing? I think so. My friend (who studies computer science by the way), who installed Linux recently, also thinks so. “Software installation on Linux is fucking hard” – so he said. But some people disagree. Notice the last post, by tomato. I said that autopackage is targeted at the average user, and he says that that’s an argument against autopackage! His philosophy is that average users should not be able to install software – a trained sysadmin should do that for him. “WTF?!” my friend said.

I wonder what will happen to Linux as long as people with that kind of mentality are still around.

Comments (1)

How to get people work for free

In other words: how to find volunteers to help you with your project. A must-read for every open source project maintainer.

Comments

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »