Bad, bad Powerpoint

A couple of days ago, someone in my vicinity needed to create a Powerpoint presentation with lots and lots of JPEG files. She was doing this on a netbook which is usually pretty fast, but after adding a couple of pictures, she noticed it slowing down to a crawl. She was working on a USB key, and not on the hard drive. But that was not the reason for the computer’s slowness. It was because Powerpoint needed to keep all the images in the computer’s memory, and when memory fills up, the computer gets slower. The solution is obvious: in Powerpoint, you can link to images instead of embedding them in the presentation file itself.

After figuring out how to do it the new file appeared a fraction the size of the old file and the computer was responsive again.

Sixty slides with JPEGs later, she saved her work. The next day she copied the folder with the presentation and the image files to the computer’s hard drive. To be sure, she checked if all the images were still there when opening the presentation without the USB key inserted.

They weren’t.

It turned out that when linking to an image, Powerpoint uses the absolute path to the image, including the drive letter. The USB key was called E: and the hard drive C:, so the images couldn’t be found.

In Powerpoint’s file menu there is an option called Pack and Go. This function creates an archive file that can be extracted on another computer, so that it can be shown there. I can guess how that works. During packaging, all the absolute paths of all the file links are made into relative paths, and during unpacking they are prepended with the absolute path leading to the folder where the presentation is unpacked.

It seems to me that this is not a solution, but dirty workaround to a problem that shouldn’t exist. Simply using relative paths would have solved this and would have had no downsides. Why Microsoft would choose to use absolute paths in the first place is beyond me.

Pack and Go

  • Share/Bookmark

KDevelop 4: first steps

This will be one of those blog entries that I write primarily to document for myself some stuff I found out after some effort, but that might also be useful for others.

When developing applications, I primarily use Java, mostly because it will do everything I want and it’s the language I’m most familiar with. My IDE of choice is Netbeans.

However, my desktop environment of choice is KDE, and recently I thought of developing a plasmoid, so I decided to check out KDevelop 4, the IDE that seems most suited for KDE development. I got as far as a hello world in C++. Here are my first steps.

First I installed KDevelop and cmake. In Arch Linux (my primary OS for some time now), I did that thusly:

# sudo pacman -Sy kdevelop cmake

Then I ran KDevelop and started a new project:

  1. Click Project -> New From Template…
  2. Select C++ -> No GUI (CMake) -> Simple CMake-base C++ application
  3. Enter hellokde at Application Name
  4. Select None at Version Control System, then click Finish.
  5. Enter the path to your project directory at Installation prefix, then click OK.

Build the project:

  1. Right click on hellokde and select build.
  2. Wait until the build window says *** Finished ***.

Start the application:

  1. Click Run -> Configure Launches…
  2. Select hellokde and click + at Launch Configurations (at the top)
  3. Select Executable -> Executable and click the ellipsis (Open File Dialog).
  4. Navigate to the executable: projects/hellokde/build/hellokde and click OK twice.
  5. Click Run -> Execute Launch.

Hello KDE! And now for my first plasmoid…

  • Share/Bookmark

Scarlett Thomas, The End of Mr. Y

Book cover

Book cover of "The End of Mr. Y" by Scarlett Thomas

A while ago, I read PopCo, also by Scarlett Thomas, and I found it a fantastic read. It had a compelling and believable story and it gave me lots to think about, which is basically all I need from a book. I was therefore looking forward to reading The End of Mr. Y. I’m afraid I didn’t quite like it as much.

Partly that is because the story doesn’t really make a lot of sense, avoids  interesting questions and answers others the wrong way. The book is about a place, called the Troposhere or Mindspace, which is generated by the shared subconsciousnesses of all animals, or at least all mammals. Whether fish/bacteria are included as well isn’t mentioned. The space is entered via a homoeopathic concoction that was first discovered by the writer of a fictional book with the same title as this book.

The Troposhere looks different for anyone who enters it, and anyone who does can use it to infiltrate the minds of people or animals without their victims knowing it. Once a mind is entered, the minds of beings close to that person or animal can be entered as well, and by close we mean all kinds of close. This way, even dead relatives’ minds can be entered and time travel is also possible. Several time travel paradoxes are created but remain unresolved with phrases like “time doesn’t work that way”. I find that disappointing.

The main character, Ariel Manto, reads the book, brews the potion and enters the Troposphere. She meets a mouse god, a being who is generated by the combined praying of a small sect somewhere in the U.S. Later in the book, we find that the Christian god is created the same way, but he is a lot more powerful since power is determined by the number of people doing the praying. The mouse god protects her from two renegade American secret agents who need a monopoly on the Troposphere’s usage to use it as a weapon and therefore try to kill her. When she learns how to, she simply changes their minds, while she take refuge in a church. The agents can’t enter the church, but it remains unclear why.

In the first half of the book, there is a scene in which Ariel needs to access files on a computer that she can’t login to because she doesn’t have the password. This computer is going into storage within ten minutes, but she doesn’t know what she is looking for on it. The solution to this problem is easy, if you know what’s going on. Just take out the hard drive and put it in your own computer so you can access it from there. Instead, she asks someone from the computer department to reset the password, puts the My Documents folder on her iPod and hopes she has the files that she needs.

This is not terribly important, but illustrative as the same thing happens to the supposedly interesting discussions that follow on more substantial subjects. At some point in the story, Ariel makes a case that either God has triggered the universe or there must be multiple universes. She derives this from the fact that the original Big Bang-particle must have been a normal particle to which quantum physics applied. It didn’t. Basically, quantum physics only applies to small things, while Einstein’s relativity only applies to big things. The Big Bang particle is where both theories must come together (small particle, big mass) so both theories break down. The same happens in black holes. The entire discussion that proceeds from this point ignores that and is therefore useless.

There is also a discussion between a geneticist and a theologian about science (evolution, Big Bang)  versus myth (creationism, I.D.) which ends in the theologian claiming that you can’t really prove anything, so scientific theories are just as meaningless as myths. This is presented as a proper philosophic stand point, but is in fact nothing more than a cheap creationists’ trick known as solipsism. What the theologian basically says is this: my world view and my observation do not correspond, so I adapt my observation. The geneticist should have seen through this.

Subjects are discussed and dropped without reaching a satisfying conclusion. Characters in the book theorise about machine code, which exists more or less in the way they describe it, but I can’t determine if Thomas knows that, because she makes mistakes. She makes the age-old mistake that the most basic form of information in computers is ones and zeros. It’s not, it’s electrical currents that are interpreted as ones and zeros. Since in the same discussion electrons play a different role from the binary digits, the discussion is flawed.  I could go on. There are many examples in the book that sound smart but really aren’t.

Ariel goes back in time to free the first generation of lab mice and in the end prohibits the book from being written in the first place. By then she has a companion, Adam, who has already died by staying too long in Ariel’s head and starving, but he is still alive in the generated shared consciousness. This is neither logical nor explained.

In the end Ariel and Adam travel throughout the Troposhere, get to the end and enter a nice garden with a tree and a river. Then the books ends with Ariel saying “And then I understand”. Understand what, exactly? At the end of consciousness there is Eden? What does it mean?

Not very good.

  • Share/Bookmark

Martin Bril, De kleine keizer

Book coverI never shared the Martin Bril’s predelection for France, or his interest in Napoleon, but the fact that the emperor started the ninetheenth century by sweeping away most of the decadent European aristocracy must mean that he had some kind of vision. In some ways sadly, this was as definite as a wednesday security patch for a bad American operating system, because his version of the new century didn’t last very long.

Martin Bril’s book is a collection of columns about Napolean that he wrote for various news papers. He calls the subject his passion, which is made evident by the way he writes about him, but I can’t figure out why exactly Bril holds Napoleon in such high regard. Bril mostly lists Napoleon’s deficiencies and forgets to write about his allegedly brillant strategic insights and barely describes the way he introduced standards in Europe that still hold today.

The book is easily readable (except for a couple of untranslated citations in French) and Bril tells a couple of illustrative anecdotes, but I fail to see the point of this book. If Napoleon is not your cup of tea, the book is uninteresting, and if he is, you probably know already anything that’s in there.

  • Share/Bookmark

X Forwarding and sudo

I administrate a remote linux machine of someone I know who now and then needs me to help him out. To find out if applications actually work, I use X forwarding. To do that, the remote box has X forwarding enabled, by having this line in its /etc/ssh/sshd_config:

X11Forwarding yes

Then I use:

me@localbox:~$ ssh -X remotebox

to log in at the remote machine, and then I can use whatever X application I like, and it will display on my local monitor. But whenever I become another user on that machine, using su or sudo, X forwarding stops working, with these messages:

X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:10.0

The reason for this is that

X authentication is based on cookies — secret little pieces of random data that only you and the X server know… So, you need to let the other user in on what your cookie is (http://www.debian-administration.org/articles/494).

The original user that I used to ssh into the remote machine has such a cookie, but it seems that the other users on that machine can borrow it. Lets say my user on the remote box is called `me’ and the other user is called `otheruser’. Then all I need to do is make the cookie readable by the other user, and make the other user aware of the display and the cookie:

me@localbox:~$ ssh -X remotebox
me@remotebox:~$ chmod 644 .Xauthority
me@remotebox:~$ su - otheruser
Password:
otheruser@remotebox:~$ export DISPLAY=localhost:10.0
otheruser@remotebox:~$ export XAUTHORITY=/home/me/.Xauthority

And then I can happily run x applications as otheruser.

  • Share/Bookmark

Site unreliabilty

This site will be completely unreliable for the next (and past) few days, due to my house being more or less rebuild. The electricity has to be shut off now and then and there is a chance of short cuts as well, so I have to turn the server off during the day.

I have no other solution at the moment. It should be over at the end of next week.

  • Share/Bookmark

Lucid break Firefox Flash plugin (+solution)

After upgrading their Ubuntu 9.10 machine to 10.4 (Lucid Lynx), someone in my neighbourhood noticed that Flash had stopped working in Firefox. Googling around didn’t provide me with a solution, but reinstalling the plugin did the trick:

# sudo apt-get remove flashplugin-nonfree flashplugin-installer
# sudo apt-get install flashplugin-nonfree flashplugin-installer
  • Share/Bookmark

The consumer's responsibility

Here’s a thought:

As I understand it, lots of Greeks, who have been reaping EU benefits for years without paying any taxes whatsoever, seem to be under the impression that they are not to blame for their country’s current problems, and are now protesting that they are being sent the bill.
This reminds me of the world-wide “It’s not my fault” protests against drastic measures that we will see within a few decades, when global environmental crises present itself, compared to which the current financial crisis will look like a minor nuisance.

  • Share/Bookmark

A day at Emmen Zoo

Two weeks ago I visited the Zoo in Emmen (links to Dutch site), where one week earlier an Indian elephant was born. Emmen, a small provincial town near the Dutch – German border, is where I was born. What sets its zoo apart from most other zoos I’ve been to is the amount of relative freedom that the animals have. They can freely roam about on plains, in some cases barely aware of the spectators. The fact that many of them breed can be interpreted as prove of their happiness.

Using the camera on my phone I shot a few scenes, including (at the start, and barely visible) baby Elephant being guarded by its mother.

  • Share/Bookmark

Hanka Clout/Crea orchestra play Debussy

  • Share/Bookmark

 

September 2010
S M T W T F S
« Aug    
 1234
567891011
12131415161718
19202122232425
2627282930