Montag, 24. September 2007

Latest KDE4 Beta (2+) impressions

I just finished trying out the latest KDE4 Beta LiveCD in VMWare Server. It is still very (very!) buggy and seems to support only 256 colours, but it gives a lot of impressions of the upcoming KDE4 stable. I noticed that it is surprisingly fast (even in the VM) even though it has a few effects enabled.

You can download the LiveCD here.

Here are my screenshots:

The dialog in the upper left corner appears when moving over a symbol. You can control the Desktop here.


Dolphin - The new standard file manager.







The new sound system seems to be just great!

Desktop effects.




Umm.. Yeah... Buggy! :)

Sonntag, 23. September 2007

How to permanently mount a samba share on Linux

This blog post has been moved to the new blog: http://blog.scopeport.org/nix/permanently-mount-samba-share-gnulinux/

Freitag, 21. September 2007

How to save energy with Linux

I just discovered this great Intel website: http://www.lesswatts.org/

It gives you useful tips and guides how to save energy on Linux powered machines. In addition to the usual tips like "reduce LCD backlight power" there are some hints i would have never thought of - Did you know that you can save energy by editing your syslog configuration?

There is also a tool to detect programs that "misbehave" when your computer is in idle mode and cause a higher consumption of energy: http://www.lesswatts.org/projects/powertop/

I think it is very useful or even necessary to save as much energy as we can. Not just for your notebook batteries or your electricity bill but also for the climate.

Sonntag, 16. September 2007

Microsoft ads on linux.com

I was a little confused when i saw this Microsoft® ad on linux.com:

They should definitely improve their doubleclick.com blacklist. Even though the "Compare" site of Microsoft® is funny when you are familiar with Linux... Did you know that Windows has less downtimes and is more secure than Linux? They do also only compare to Red Hat Linux.
They must be really frightened of Linux and OpenSource in general when they compare Windows servers in the way they do on "Compare".

Freitag, 14. September 2007

Why you should write valid HTML code

...because validity is important.

What does validity mean?
Validity of HTML code means that the code simply has no errors in it. An error could be a not (correctly) closed tag or a missing doctype declaration. It is a common mistake to think that websites that are displayed correctly are automatically valid.
The correct syntax and usage of HTML is maintained by the World Wide Web Consortium (W3C)¹ since 1996.

What is the problem?
HTML is a global platform independent standard. Billions of people can visit your websites. Or should I say billions of different computer configurations can visit your websites?
For now its not possible to create websites that look the same to every possible browser/operating system/screen resolution/javascript/... combination and configuration.
The Browsers are the main part of this dilemma. It is them who understand HTML in different ways and manners – What results in quite different looks.
Of course there are dirty hacks to detect browsers and change the html or css code depending on the result – But thats really a very dirty hack.

How can this happen if there is a HTML standard? Well... After the Netscape Navigator was displaced by the Microsoft Internet Explorer in the late 1990s² Microsoft's browser was nearly unrivaled. There was apparently no need for Microsoft to improve the compatibility to other browsers. They began to „understand“ HTML code in their very own way and many webdesigners began to code their HTML in the way the Microsoft Internet Explorer understood it.

A few years later (around 2002) Mozilla came up with the Firefox Browser. People began to like it and the Microsoft Internet Explorer was losing market share. From now on there were two big browsers in the game.
Because of the long year dominance of the Microsoft Internet Explorer many websites were coded to be „best viewed with Internet Explorer“ - or: not valid! Mozilla had to change the behaviour of its Firefox Browser to display those websites as good as possible. But they were not able to do that without breaking some rules of valid HTML.
None of the big browsers reads HTML code in the completely correct way – They even read it in different (wrong) ways.
So coding HTML that is displayed the same by all browser is like talking to a japanese and a german in english if none of them speaks another language then their natural one. - Almost impossible.

What to do?
Right now it seems like there was no way out of that. It is just like a vicious circle.
Someone has to break out of this circle! And to me it looks like it's us – The webdesigners!

The main requirement for an agreement between browser developers about understanding HTML code in a valid way is to have many many many valid websites in the world wide web. If this should ever happen our digital lifes would get much easier. Imagine being sure about the display of a website in every popular browser just by validating the code. Lovely.

Sounds great! But how do I write valid HTML?
Because this is a huge (but not really hard) part of Webdesign I cannot tell you how to write valid HTML code here exactly.
I think the best way is to intially create a website the way you always did. Then use the W3C Markup Validation Service3 and check the website. Fix the errors step by step until you get the green „This Page Is Valid [html type]“ message.

Dont forget to place the „valid“ Icon4 on your validated website.

It is your turn now! Write valid HTML code and make the first step to a less stressful work and world.


1) http://www.w3.org/
2) http://en.wikipedia.org/wiki/Browser_wars
3) http://validator.w3.org/
4) http://www.w3.org/QA/Tools/Icons

Mittwoch, 12. September 2007

Use Jabber!

Jabber is an free (as in free speech) instant messaging technology, like ICQ or MSN - It uses XMPP (an XML like protocol) which is highly extensible. Anybody can join the Jabber network and set up own jabber servers which are able to connect to any other jabber server. The whole Jabber infrastructure slightly equals the email (SMTP) system which can also be joined by everyone.
There is no central server which handles the whole communication of all members! If you have your own Jabber server (there are many OpenSource Jabber servers available) there is nobody who can unauthorized read your messages or claim any copyright (see http://en.wikipedia.org/wiki/ICQ#Criticism) on them.

I run my own Jabber server (ejabberd, http://en.wikipedia.org/wiki/Ejabberd) and it does not produce any notable CPU or memory load. It connects perfectly to the servers of my contacts - The setup took about 1 hour and i have not had any problems so far.

Check out http://en.wikipedia.org/wiki/List_of_Jabber_server_software for a list of Jabber servers.
As you can see there are a lot of servers available. Many of them will be in the repository of your favorite Linux distribution (though there a jabber servers for many more operation systems) - Check them out. I prefer ejabberd. It has an easy to use web interface.

Of course there are a lot of public Jabber servers if you don't want to run you own one. Ask Google or use the probably biggest one: http://jabber.org/ - The registration process may be unfamiliar to you: You don't have to sign up on the website. As on many public Jabber servers you can just point your Jabber client to jabber.org and register directly with your client. You will then immediately have your own e.g. @jabber.org or @example.com address. Friends can now add you with this address. Every Jabber client should be able to register you to public Jabber servers!

See http://en.wikipedia.org/wiki/List_of_Jabber_client_software for a list of Jabber clients. I use Gajim (not Gaim) on Ubuntu. It is easy to use, fast and supports PGP/GPG for client to client encryption of your messages. (Which is also a key feature of Jabber. Server to server encryption is also possible)

All in all Jabber is a great alternative to ICQ or MSN. There are so many extensions to the XMPP protocol that make Jabber unbelievable versatile. Check out http://www.xmpp.org/extensions/ for more information.

Check out http://chaosradio.ccc.de/23c3_m4v_1667.html if you speak German and want to know more about the versatility XMPP and Jabber.

Use Jabber!

Samstag, 1. September 2007

ABGraph v.1.0 is out

I just wrote a script called "ABGraph". It is free software, licensed under the GNU General Public License (GPL).
ABGraph is a simple tool to benchmark webservers. The program uses ab (apache benchmark) to actually benchmark the selected remote host. A graph in PNG format is generated with gnuplot and saved to the selected path/file.

http://sourceforge.net/projects/abgraph

Here is the source code:

#!/bin/sh

## Copyright 2007 Lennart Koopmann [lennart@dev-my.org]
##
## This program is distributed under the terms of the GNU General Public License (GPL)

VERSION="Version 1.0 (01.09.2007) \n"

## TODO: check if host is up |


########
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or

## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License

## along with this program. If not, see .
########

# $1 = hostname to benchmark
# $2 = where to output the PNG file

# $3 = number of requests (must be over 100)

# find out location of ab
ABLOC=`which ab`

#find out location if gnuplot
PLOTLOC=`which gnuplot`

echo "This is ABGraph $VERSION";

# check if all needed parameters are given
if [ -n "$1" -a -n "$2" -a -n "$3" ]


then

# move the gnuplot instructions to /tmp/abgraph-plotme
echo "set terminal png
set output '$2'
set title 'Benchmark results of $1'
set size 2,1
set key left top
set xlabel 'request'

set ylabel 'ms'
plot '/tmp/abgraph-data1' using 10 with lines title 'Benchmark 1 ($3/1)', '/tmp/abgraph-data2' using 10 with lines title 'Benchmark 2 ($3/25)', '/tmp/abgraph-data3' using 10 with lines title 'Benchmark 3 ($3/50)'
" > /tmp/abgraph-plotme


# first benchmark

echo "Benchmarking... 1/3 ($3 HTTP requests)";
$ABLOC -n $3 -g /tmp/abgraph-data1 $1 > /dev/null
echo "Great.\nContinuing...";

# sleep 5 seconds
echo "\nsleeping 5 seconds...\n"
sleep 5

# second benchmark
echo "Benchmarking... 2/3 ($3 HTTP requests, simulating 25 concurrent users)";
$ABLOC -n $3 -c 25 -g /tmp/abgraph-data2 $1 > /dev/null

echo "Okay.\nContinuing...";

# sleep 5 seconds
echo "\nsleeping 5 seconds...\n"
sleep 5


# third benchmark
echo "Benchmarking... 3/3 ($3 HTTP requests, simulating 50 concurrent users)";
$ABLOC -n $3 -c 50 -g /tmp/abgraph-data3 $1 > /dev/null

echo "Looks good. Finished!\n";

# generate graph (png saved to user selected path by gnuplot)

$PLOTLOC /tmp/abgraph-plotme > /dev/null

echo "The graph has been saved to $2";

# tidy up

rm /tmp/abgraph-data1
rm /tmp/abgraph-data2
rm /tmp/abgraph-data3

rm /tmp/abgraph-plotme

else

# display error message on wrong usage
echo "Usage: abgraph [hostname to benchmark with http:// and trailing /] [output file .png] [number of requests]"
echo "e.g: ./abgraph http://example.com/ /home/myhome/graph.png 500"

fi
The main requirements are an installed ab (apache benchmark) and a installed version of gnuplot.

the output of abgraph

a generated graph

The script is very useful for web developers and administrators to tune up their applications and servers.