James Randi about Arthur C. Clarke

March 21, 2008 by automatthias

Randi shares some stories regarding his friend Arthur C. Clarke and makes a comparison of Stanley Kubrick to Steve Jobs.

Python mocker for Gentoo

March 16, 2008 by automatthias

Here’s an ebuild for Python mocker. Really cool mock module, which doesn’t come up high on Google.

Correct Answers

March 14, 2008 by automatthias

I had this idea for some time now, but I never bothered to draw it. However… here’s my strip, titled “Correct Answers”:

Correct Answers

…I did my strip in 10 minutes with bitstrips.com.

Converting DVD lectures to mp3

March 9, 2008 by automatthias

I don’t study any more since December 2006. I’ve completed my Masters, and… the game seemed to be over. But when a friend has recommended TTC courses to me, I started listening to them… and become addicted. I’ve completed Philosophy of Religion by James Hall, Great Ideas of Psychology by Daniel N. Robinson and Explaining Social Deviance by Paul Root Wolpe. I’m currently listening to Argumentation: The Study of Effective Reasoning by David Zarefsky. I have a few more courses to go through, so I won’t be out of lectures anytime soon.

However, it turned out that watching them as videos doesn’t work well for me. When I’m at home, I have plenty of other things I’d like to do. But they work well in audio, as I can listen to them when commuting. I’m going to buy new courses in audio, but what about those ones I have already in DVD? Can I convert them into audio?

I’ve put together a shell script, which dumps all tracks from DVD and encodes them into mp3 format. It also normalizes volume, so the voice of the speaker has more or less constant volume, which is good when listening in noisy environment.

It was written on Linux, if you’re a Windows user, you can try running it under Cygwin.

First!

March 1, 2008 by automatthias

It’s a state of mind.

Dear beloved in Christ

February 15, 2008 by automatthias

Scammers are learning and adapting. Are we having a Christianity surge in the United States? Yes? Why not take advantage of that? Instead of people dead in a place crash, we now have a dying Christian convert. Here’s an example of new, religious context for the old 419 story.

DEAR BELOVED IN CHRIST,

CALVARY GREETINGS IN THE NAME OF OUR LORD JESUS CHRIST. I AM MRS. EVANGELIST REACHEL MIKE, A WIDOW TO LATE JOSEPH MIKE. I AM 56 YEARS OLD, I AM NOW A NEW CHRISTAIN CONVERT, SUFFERING FROM LONG TIME CANCER OF THE BREAST, FROM ALL INDICATION MY CONDITIONS IS REALLY DETERIORATING AND IT IS QUITE OBVIOUS THAT I WONT LIVE MORE THAN 3 MONTHS, ACCORDING TO MY DOCTORS, THIS IS BECAUSE THE CANCER STAGE HAS GOTTEN TO A VERY BAD STAGE. MY LATE HUSBAND KILLED DURING THE U.S.A RAID AGAINST TERRORISM IN AFGHANISTAN, AND DURING THE PERIOD OF OUR MARRIAGE WE COULDN’T PRODUCE ANY CHILD. MY LATE HUSBAND WAS VERY WEALTHY AND AFTER HIS DEATH, I INHERITED ALL HIS BUSINESS AND WEALTH THE DOCTORS HAS ADVISED ME THAT I MAY NOT LIVE FOR MORE THAN 3 MONTHS, SO I NOW DECIDED TO DIVIDE THE PART OF THIS WEALTH, TO CONTRIBUTE TO THE DEVELOPMENT OF THE CHURCH IN AFRICA, AMERICA, ASIA, AND EUROPE.

I AM WILLING TO DONATE THE SUM OF ($8.5, 000.000.00 M U.S.DOLLARS), TO THE LESS PRIVILEGED. SO I WILL LIKE YOU TO GET THIS FUND AND USE IT TO HELP THE POOR AND THE LESS PRIVILEGED ALL OVER THE WORLD.

I HONESTLY PRAY THAT THIS MONEY WHEN TRANSFERRED WILL BE SURE FOR THE SAID PURPOSE, BECAUSE I HAVE COME TO FIND OUT THAT WEALTH ACQUISITION WITHOUT CHRIST IS VANITY. MAY THE GRACE OF OUR LORD JESUS THE LOVE OF GOD AND THE FELLOWSHIP OF GOD BE WITH YOU AND YOUR FAMILY I AWAIT YOUR URGENT REPLY SOON ON MY PRIVET EMAIL ADD, (evangelistr…@yahoo.it).

YOURS IN CHRIST.

EVANGELIST REACHEL MIKE.

Thank God I’m an atheist.

Loud minority of color haters

February 10, 2008 by automatthias

I was struck by one sentence in the git-svn course.  It’s about the way a computer program displays its output. It’s about colors. Some people like to see code annotated with color, like this:

Colorful code

You can see, that keywords from the programming language are highlighted. Colors are a new channel of information transfer, highlighting code syntax allows us to use our natural ability of color recognition, to work with the code more efficiently.

Without colors, this code looks like this:

Code with no colors

Sure, you can still read the code. But… is the word “class” is spelled correctly? Are all the quotes balanced?  You don’t know, unless you examine it quite carefully.  With syntax highlighting, you can determine that by looking: is it yellow or not?

However…

some people hate colors way more than the rest likes them

…and that’s the reason why color highlighting is turned off in git by default. I once heard a convincing argument against colors: that command “ls” with option “–color” calls function stat() on every file it lists, which under certain circumstances is a highly undesired thing; but this argument was then followed by “real UNIX doesn’t have colors” (is it a form of a “real programmer” thing?), which destroyed the whole impression. Yes, sometimes you might want to turn colors off…

But why turn the option off by default for the whole project? The majority has to give in because of loud minority?

In a democratic system, and I believe Free Software movement is about democracy, software should be optimized for the largest benefit of the whole, or at least the majority.

If I find myself among the minority and I can’t get the majority willfully convinced to my option (without hate speeches), I’m going to give in. And I expect the same from others.

USB storage devices and gparted

February 8, 2008 by automatthias

USB devices like pendrives and external drives stopped mounting. I couldn’t work out what was the problem. dmesg showed that the USB device was recognized. Gnome volume manager was started. Hal and dbus also working. And my drives just wouldn’t mount automatically.

I’ve finally found a solution on forums.gentoo.org.  The problem was that gparted, which I happened to install a while ago, put this file into hal’s configuration:

/usr/share/hal/fdi/policy/gparted-disable-automount.fdi

I found the „true” part in the file, changed it into „false”, restarted hal, and voila, my drives are being mounted now!

Why was the file put in that place? The story is, gparted puts it there on start so usb devices don’t get in its way. It removes this file on exit. On graceful exit, that is. If it’s killed, it doesn’t remove it and the file just stays there.

Supernatural for Linux users

February 8, 2008 by automatthias

 I bet you guys have a hard time figuring out how it works with woo-woos. Here you have it black on white. If a woo-woo would be a sysadmin, they would do more or less:

$ dd if=/dev/urandom of=i-believe bs=1 count=$RANDOM
18676+0 records in
18676+0 records out
18676 bytes (19 kB) copied, 0.172968 s, 108 kB/s
$ chmod 755 i-believe
$ ./i-believe

And voila! All the work is done!

Watching an interlaced DVD with MPlayer

January 30, 2008 by automatthias

Resuming my tech-notes blogging…

I’ve recently bought three Studio Ghibli’s movies. I don’t have a TV-set (yes, lenina, I’m still not watching any TV), so I’m watching DVDs on my laptop. DVDs I got are interlaced, when watching them on a computer, you can see small horizontal stripes along the sides of moving objects.

On a TV-set, this is not a problem, actually, interlacing makes animation on TV-set smoother. But on a computer, all you get from interlacing is stripes.

MPlayer comes with few deinterlacing plugins, from which yadif and kerndeint seem to work best (but I’m open to other suggestions). However, my video output is GL:

maciej@clover ~ $ cat .mplayer/config
vo = gl
autosync = 20
monitorpixelaspect = 1
af = volnorm=2:0.6
ao = pulse

The problem with those deinterlace filters is that they don’t cooperate with the gl video output. Fortunately, there’s an easy fix for that: append scale filter.

mplayer -vobsubid 1 -vf kerndeint,scale dvd://5

Replace 5 with your title number. The vobsubid option tells MPlayer to display subtitles. I like to watch Japanese movies with the original soundtrack and English subtitles. Usually, English dubbing reveals too much about the characters and lacks the original expression.