>>> import this

>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>>

Cern Week 12

This week I spent some time reinstalling a test server with different configurations. For this I did some reading on quator (quattor is a system administration toolkit providing a powerful, portable and modular tool suite for the automated installation, configuration and management of clusters and farms running UNIX derivates like Linux and Solaris). I further wrote an RPM for OpenJDK for Scientific Linux. As people are really annoyed with the Java license. But the problem is to bootstrap the OpenJDK you need proprietary software again. So we can't publish the rpm externally. So after reading I did some research about Licensing, as my course doesn't cover this in great depth. I had quite a lot to do, with getting an idea of what there is out there and what it really means. What is FSF compatible and so on. After this I decided to commit to one Licence the PPL ( THE PACIFIST PUBLIC LICENSE) my self. This seams to be the License that I agree with the most. (I suppose I could have used the BSD + some ideas, but do want my software to be published again if someone modifies it)
I did some C++ programing on a Project and some reasearch in my dash program. Further I still have my french lessons which are going really well.

ArrayList in Java

I have just ported OpenJDK to Scientific Linux and so I had a look around in how Java is implemented. You should do this. Just to see how ArrayList works or Math.Random does teach you quite a lot about Java and how compilers are designed.
Because OpenJDK still relies on proprietary Modules I cannot publish my rpm here. Sorry.

CVS rant

I have been using CVS for many years now, sometimes Subversion. And it works. It is not very fast but it works. I had a look at git a while ago and found it to be very kernel specific. Now I had a look at
mercurial
And it seams to be really sweet. One feature I really don't like in CVS is the branching. When I have an idea I want to try it in an unstable tree or an featurexyz tree. This is very hard to do in cvs because if you bug fix some stuff in the main tree you get into merge hell. So developing on two trees is a pain and I end up not doing it. So I taught git might be good because it was designed to be able to handle this very nicely. And again it does. But mercurial does it too and is more non kernel orientated.
Further I don't like the server approach CVS has. As I move around the world quite a lot having a central CVS server is not always easy. So a server less approach seams to be more suitable for my case.
I will try developing my next project in it and will report, but for now have a look at it. Many big project use it

A nice little flash app

Everyone is talking about Google generating their own OS and so on. I came across this
http://www.yourminis.com/start
It is really quite nice. And I think this is somewhat how the Google Operating System would look like if they produce one. Have a look at it. Maybe don't use it for everyday life :) Instead try IceWm.

Picasa

Lots has been said about Picasa and Flickr, and I don't want to get involved. But I use Picasa and it works.
On my windows box I have the Picasa program and it uploads quite nicely to my web page. It works with videos and it can remove red eyes. But what has been annoying me for a while is that my friends can really see when I upload new pictures to a already existing album. So I have to create a new album every time I have 3 pictures from a night out. But after some research I found that Picasa Web has a program interface. So now if you use this rss feed you should be able to see all the new pictures I upload, quite like flickr does it with the photo stream.

With Preview
http://picasaweb.google.com/data/feed/base/user/ribalba/?kind=photo

Just the name
http://picasaweb.google.com/data/feed/api/user/ribalba?kind=photo

(But please don't rely on this there is nothing like a good look at http://photos.ribalba.de/)

The Design of Everyday Things

I just finished reading this book. It sounded really good. And the first 100 (+/-) Pages are quite interresting but then the Author just slipps off in a repeating rant about the same things. If you have the frame of mind like Linda Hole and you really are interrested in what makes things useable this is a really good book and you can learn a lot. But if you just want some easy tipps it is definatelly to much. The Author really know what he is talking about. But as lost of authors tend to do, he only talks about the most impressive projects he has worked on (like Eric Steven Raymond with fetchmail, or Joel with Exel) It's a light read, and quite interresting but not really a must read like 'The Pragmatic Programmer".

New blog

I am fed up with having all my ideas scatted around the place now I created a blog for this:

http://computingideas.blogspot.com/

Rss feed it and please give me feedback.

Applications used at work

I am just reading the paper my university gave me for my placement. And I have to state on what environment I work on so here we go:
My Desktop Pc

$ uname -a
Linux pcitfio88 2.6.9-55.0.9.EL.cernsmp #1 SMP Tue Oct 2 05:33:14 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/cpuinfo | grep "model name" | head -n1
AMD Athlon(tm) 64 X2 Dual Core Processor 4600+

My development Cluster

# of hosts (down): 60 (1)
operating system(s): 2.4.21-51.EL.cernsmp, 2.6.9-55.0.6.EL.cernsmp, 2.6.9-55.0.6.EL.cern1
# of CPUs (down): 204 (4)
average up time: 10 days, 20h:38m


I use gcc languages are c, c++, perl

Cern Week 11

Monday and Tuesday where spent learning Pearl. As the my University course does some Perl but not really in depth I decided to do some training. It was 8 hours a day and quite complete. Not much to say about it really.
The rest of the week was spent in bed ill, not touching a pc.
Further my French courses started. At Cern every employee can learn French for free. As I am living in a french environment, I have to speak it all the time, I have to be able to communicate in this language. So now I have classes 6 hours a week. We are starting right at the beginning (Je suis ..). But apparentelly it gets quite hard.

cern week 10

I spent most of Monday checking some stuff in the requirements document. This was due as some people had given me more input and I had to sync the online version with my notes. Further I spent some time on dbook. I spent Tuesday with fixing the sound (alsa) in the new kernel version. We had to publish a new kernel as an exploit was found with which normal users can get root rights. Further through this we had to reinstall all Linux machines. Fun. Lxplus was down while lunch what a few people didn't really appreciate. The main machines are being drained and installed separately as the main cluster lxbatch can't just stop. Further I was trying to fix the -Waffel++ errors. Wednesday I spent converting dbook to expat. Expat is far better suited than Xerces-c for my app. Xerces is a nice xml parser but quite big and it seams heavy with lots of features I didn't use. I think I was using about 0.1% of it. Expat seams to be more what I was looking for from the beginning. I learnt quite a lot through this as Xerces and Expat have two totally different approaches to parsing. Expat is is a stream-oriented parser so parsing whereas Xerces is DOM, SAX and SAX2. On Thursday and Friday Intel came in and did a talk and training on multi- thread/core programming. This was really cool. These managers from Intel talking about the future and what Intel is going to do in the next 10(+/-) Years. Further we got to play around with the Intel tools Intel® Thread Checker / Intel® Thread Profiler and Intel® Threading Building Blocks.
On the first day they did the some theoretical stuff and some aspects of multi threaded programming. Further they did some stuff on OpenMp. Which seams to be really nice. I wrote a little program in it and it is so much easier than pthreads. Just add a comment and let the compiler do the work.

-Weffc++ (C++ only)

OK I spent the whole day today trying to find an error in my new project. I keep getting an error out of the guts of the vector library. I was convinced that I was doing somthing wrong. So after lunch and and some attemts to fix my code I decided to rewrite my Makefile because it was an horrible hack and I wanted to upload it to sourceforge. While doing this I noticed that I had added the -Weffc++ g++ flag after I had read Effective C++: 55 Specific Ways to Improve Your Programs and Designs
So for a test I just removed it and I had a clean build. So after some searching I found a nice little post that tells me that this is an known error. So that's it, one day of debugging for something they can't put in the deocumentation.

So if someone gets this error, you know now :
$man g++
When selecting this option, be aware that the standard library
headers do not obey all of these guidelines; use grep -v to filter
out those warnings.

bash-3.00$ g++ -c -g -Weffc++ `curl-config --cflags` Ui.cpp -o Ui.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/allocator.h: In instantiation of `std::allocator':
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:79: instantiated from `std::_Vector_base >::_Vector_impl'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:110: instantiated from `std::_Vector_base >'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:142: instantiated from `std::vector >'
Ui.cpp:45: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/allocator.h:81: warning: base class `class __gnu_cxx::new_allocator' has a non-virtual destructor
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h: In instantiation of `std::_Vector_base >::_Vector_impl':
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:110: instantiated from `std::_Vector_base >'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:142: instantiated from `std::vector >'
Ui.cpp:45: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:79: warning: base class `class std::allocator' has a non-virtual destructor
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:79: warning: `struct std::_Vector_base >::_Vector_impl' has pointer data members
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:79: warning: but does not override `std::_Vector_base >::_Vector_impl(const std::_Vector_base >::_Vector_impl&)'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:79: warning: or `operator=(const std::_Vector_base >::_Vector_impl&)'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h: In instantiation of `std::vector >':
Ui.cpp:45: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:142: warning: base class `struct std::_Vector_base >' has a non-virtual destructor
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h: In instantiation of `__gnu_cxx::__normal_iterator > >':
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:564: instantiated from `void std::vector<_tp,>::push_back(const _Tp&) [with _Tp = std::string, _Alloc = std::allocator]'
Ui.cpp:95: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: `class __gnu_cxx::__normal_iterator > >' has pointer data members
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: but does not override `__gnu_cxx::__normal_iterator > >(const __gnu_cxx::__normal_iterator > >&)'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: or `operator=(const __gnu_cxx::__normal_iterator > >&)'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h: In instantiation of `__gnu_cxx::__normal_iterator > >':
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:375: instantiated from `size_t std::vector<_tp,>::size() const [with _Tp = std::string, _Alloc = std::allocator]'
Ui.cpp:130: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: `class __gnu_cxx::__normal_iterator > >' has pointer data members
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: but does not override `__gnu_cxx::__normal_iterator > >(const __gnu_cxx::__normal_iterator > >&)'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_iterator.h:587: warning: or `operator=(const __gnu_cxx::__normal_iterator > >&)'
bash-3.00$

The Pragmatic Programmer. From Journeyman to Master

So after reading another book I though I might write a little review again.
This was one of the best book I have read in a long time. I am sort of sad that no one at Uni told me about this one (Frank???). It would have made my second year a whole lot easier. It is amazing how I can study for one year and then by reading a 300 page book everything becomes clear. The two authors realty now what they talk about. Through a funny writing style you don't get board and it sometimes has parallels with joel on software. Really if I would have read this before the Integrated assignment I would have been able to sleep. Everything they talk about is summarised in 70 short tips that really make sense. Further there are loads of interesting and good hints for a software developer. Buy this book and read it, NOW, Otherwise you can't say you know computing.