Cern week 5

So tomorrow I am moving into my new flat so blog entry today. I spent the week benchmarking OpenLdap and writing a tool for this. I am planning to publish it under sf when I resolved the memory leek. I wrote it in c as I felt like I should take this up again. Now I remember why I stopped using it for every day programming. I spent one whole afternoon in ddd and valgrind to find that the connect_to_host ldap system call was pointing to an empty struct. This is of course not documented when you encounter the error. But when you have found it and you know what to search for you can find it everywhere. And it can be resoled through just letting it point to NULL and not to the struct.
Further I moved office on Monday. Now I am in a nicer bigger office with a coffee machine right next to me (Photo).
I registered for some Perl lessons with certificate so at the end of my placement I am a certified Python and Perl programmer what can't hurt. After winter I want to do the same with C++ and maybe some Linux sysadmin. I have to talk to Jan about this once time has come. That's about it. The flat I am moving in tomorrow is really nice. Quite big (40m^2), in the middle of town and fully furnished what is something very hard to find.

Some notes on slapd.conf:
If you want to run a Ldap server some hints.
Set this to the max as otherwise the values are far to low
conn_max_pending_auth 65435
conn_max_pending 65435

By default this is off but to be on the safe side
reverse-lookup off

This is not really required but it can't hurt
sizelimit unlimited

If you are benchmarking this will stop giving you the timeout errors. In production I would take this out.
timelimit unlimited

Normally there are 16 threads. For a shared server this might be ok but not if I have the server only for ldap.
threads 50

Just adding thees lines made my Ldap server respond 500 times quicker.
Standard config about 20 queries a second.
New config 1000 queries a second.

Google are liars

I am currently translating some stuff from German to English. I used Altavista Babel Fish for this. But I thought I might try Google translate. So I added my text into Google and it translated to the same as Babel Fish. Ok, I though, Google has a deal with altavista but why don't they give them some credit. But then I read this:
From : http://www.google.com/intl/en/help/faq_translation.html#google
Has Google developed its own translation software?

Yes. Google's research group has developed its own statistical translation system for several language pairs now available on Google Translate.


This is definitely wrong here is some proof:
The German sentence :

Das Ziel von Google besteht darin, die Informationen der Welt zu organisieren und allgemeinnutzbar und zugänglich zu machen.
is translated into
The goal of Google consists of organizing and generally usable and accessible making the information of the world.

in both systems

AltaVista Babel Fish Translation enables you to translate short passages of text or entire Web sites among 19 pairs of languages.
is translated into
AltaVista Babel Fish translation of enables you ton translate short passages OF text or entire Web of sites among 19 pairs OF LANGUAGE{s,S}.

The only difference is the s at the end of languages babel Fish makes it upper case too Google makes it lowercase. Why this is capitalised, I don't know?

So ok now something more scientific:
CERN (frz. Organisation Européenne pour la Recherche Nucléaire, vormals Conseil Européen pour la Recherche Nucléaire), die Europäische Organisation für Kernforschung, ist eine Großforschungseinrichtung mit zwei Speicherringen (Synchrotronen) sowie verschiedenen Teilchenbeschleunigern, welches in Meyrin in der Nähe von Genf in der Schweiz liegt.
translates to
CERN (frz. {O,o}rganization Européenne pour la search Nucléaire, before times Conseil Européen pour la search Nucléaire), the European organization for nuclear research, is a large-scale-research facility with two memory rings (Synchrotronen) as well as different particle accelerators, which lies in Meyrin in close proximity to Geneva in Switzerland.

By both. Only difference is the case of the o in organisation. (diff with -iwb output's nothing)

So it seams like Google uses the same algorithm and dictionary as babel fish or the other way round. But babel fish is Yahoo?

Vista

Ok with all due respect Vista is better than XP. I have been running Vista for about 1 Month now and it works. It has nicer features than XP and at last Microsoft has stopped everyone from being root. And they have added many nice features my Mom will love and never understand. And if you don't really give a shi* what your pc is doing Vista is great (700 MB of memory usage, and pagefile.sys is accessed about every 20 sec.) The Defender tool is quite nice to see what is happening at boot no regedit anymore. And it tells you what problems your Pc is having. In total it seams that Microsoft is going into the right direction. But of course I wouldn't be writing this if I would be totally satisfied. By default windows indexes your hard drive all the time. It takes snapshots that you then can recall. So even if you delete a file it is still there. And driver support is slowly picking up. But please don't try and install XP drivers they will fail horribly, and you will be sent to the good old blue screen.

Once I have figured how LDAP works I will write more



From the Microsoft Help system.
How much disk space does System Restore require?

To store restore points, you need at least 300 megabytes (MB) of free space on each hard disk that has System Protection turned on. System Restore might use up to 15 percent of the space on each disk. As the amount of space fills up with restore points, System Restore will delete older restore points to make room for new ones.

Cern week 4

So Friday again. This week was fairly uneventfully as Juana was here and my boss was on holiday. What of course doesn't mean I didn't do any work. I set up a LDAP server for the user logons. The idea is that the user data is taken out of ldap and the passwords over kerberos. Setting up LDAP is not as easy as people make it seam. You have to get used to a quite horrible tree structure and totally new commands. (They could have made a SQL syntax, but they didn't). Then I started setting up the clients. What was good fun as I made quite a few nodes unusable. This wasn't actually really my fault. I was working on them with ssh and then my computer decided to crash. So all the configuration was wrong and the nodes wouldn't let anyone in anymore. After this is decided to use qemu to do the testing and then roll out a patch set to my development cluster. Once I knew it worked. Then I spent quite some time building qemu and installing SL in it. Further I did some research in how I could monitor the performance once I would start testing, hopefully in 2 weeks.
On Wednesday Juana and me joined a tour around Cern and the Atlas project that is currently being build. That was really interesting. Everyone should see this if they get the chance to. The time was exactly right as not everything had been build so you could still see into the detector. What wouldn't have been possible in a few weeks time. Pictures are here.
I further investigated into using git as a versioning system. I am going to try this on Monday.

Will about java script

Dear Javascript developer

I would love to use your code but i cant understand it. Maybe its because im not as fully web2.0 compliant as you or maybe its because i cant stick my head that far up my own arse. Next time you decided to right some code please with it can you send details of where i can obtain some of the shit you where smoking when you wrote it.

yours sincerely

Will

From : http://docs.google.com/View?docid=ddrx963p_90drhmx9

Cern week 3

I spent most of my time this week on writing the requirements for my Project. Was quite interesting talking to all the people and finding out what they liked and disliked about the old system. And how stuff works. It is quite hard to manage 5000 different machines with 80 different configurations. Then I did some math with x users, y computers and z services you have (x*y) + (x*z) accounts to manage. This is quite a lot is you image cern has 21000 users, 5000 computers and about 230 services. This means my system has to manage 106,150,000 user accounts. Further I started investigating what other HPC centers use. I read quite a lot on the net and wrote to some mailing lists. I further created a service so that every machines has a unique certificate (ssl) and this works over sindes. So the user logon can be encrypted (kerb5) and so can the transfer of the user data. I investigated into using a finished solution like Oscar. I spent quite some time looking into the structure already available especially the structure the Windows people use and if I could make some use of this.
I spent some time installing my 3 new development machines I got and configuring them. Further I got a new desktop what was really nice of my boss. Now I have 6 cores just for my desktop, what makes it blazing fast. And a joy to compile on. But this is not a real problem her as I have access to a 150 node distcc cluster. That's about it. Still got no flat. What is really worrying me. As I have to leave my flat in 2 weeks. But Juana is here and she is helping me to find something. More to come

Sourceforge Project started s##

So at last I have started a sourceforge project. This is my object distribution language or s##. I Hopefully this will be my final Year project in some aspects.
http://sourceforge.net/projects/sxx/

Cern week 2

Ok so the second week is over. Lets summarize.
I spent most of Monday setting up my CVS server (Concurrent Versions System) and a twiki page for my project, further I configured Emacs to do what I want and played around with my servers. Further I started reading the source code of the currently running regis project, so I can understand what my replacement system has to do. While reading the source code I made notes and added these to to requirements document. Further I added what my system doesn't have to do. So I don't shoot over the top. My boss was on vacation. The next days where spend adding a bug tracking system (savana) and a documentation server (twiki) to my project. Further I registered a source forge project for my private research that I am allowed to do while at work. I further wrote a random string generator for someone and wrote a test program to see if the numbers where really random. (See blog post). I spent some time trying to understand mock and to build an enlgihment rpm for the SCLinux distribution. But this was impossible because of Libraries being non backwards compatible. I found this out after killing my machine. I registerd my personal Cern homepage and build a project page.
I had to attend a health and safety training. Which is a big issue here as the particular accelerator is highly radio active when it starts. So I had to know all the security measures if I get in the way of the beam (maybe I don't need it then, I think I won't be able to do anything to help myself then) Further to access the computer center I needed to do this. Why? I don't know but maybe if a rack falls over or something like that (Edd nearly chopped of his finger with a rack). I registered for some french lessons and I am going to learn phython. I really need to learn french as everyone speaks it here and if you try to speak English they all hate you. I mean the English hate the french too. Comme ci comme ça. Especially the guys at the petrol station try to give you back the wrong change. I found an English pub which sells Carling and Kronenburg. So I don't have to miss the English cat piss. That's about it. I am still desperately looking or a flat. If I don't find one next week I have a big problem.

Math.random() really quite good

I am just writing some stuff in Java and I had to be shure that Math.random() was quite random. You never know with thees random methods. So here some gnuplot output of 200000 and 20000 runs.



And here is a little program where you can creatre a random String or StringBuffer with just characters.


 1 public class helloworld {
2
3 /**
4 * Just runs the method. If a arg is given with that if not with 16 chars
5 */
6 public static void main(String[] args) {
7 System.out.println(getRand((args.length > 0)
4 ? (Integer.parseInt(args[0])) : 16));
9 }
10
11 /**
12 * Return a random string
13 *
14 * @param how long the string should be
15 * @return the string could be a StringBuffer for performace
16 */
17 public static String getRand(int howLong){
18 /* Use string buffer as String+= is very slow */
19 /* Read Effective Java by Bloch, Josh*/
20 StringBuffer returnBuffer = new StringBuffer();
21 for (int i = 0; i < howLong ; i++) {
22 returnBuffer.append ((char) (Math.random() * 26 + 'a'));
23 }
24 return returnBuffer.toString();
25 }
26 }
27


Code coloring and highlighting done with http://alexonasp.net/codehighlighter/Default.aspx

Facebook is shit


I got an email from a girl who is comming to geneva too, from my uni. But I didn't know here and a google search didn'r reveal more as that she liked to go clubbing. But she told me that she is registered with facebook. So I tought let's have a look. Now my ran't about this page begins. What I can't see a profile with out an account. So I register with my brilliant name 'your mum fxxx me' ok then facebook knows I have a gmail account from (myemail)@gmail.com and offers me a link 'Open Gmail'. I think sweet dont have to hit [ALT]-[TAB] once to see my gmail account no I click on it. So now facebook looks into my gmail account contacts and suggests friends from the Emails it has found there WHAT. Facebook scans my gmail account and you can tell it to do so. Further after drinking a coffee, and realising that now some hacker in the newport knows all my email contacts and maybe my emails I try to find this girl. But I still can't view her profile as she has to be a friend or something. Ok to be fair you can get faccebook to scan all your IM accounts too. Why would anyone use this platform. It's like giving someone your phone (lets say Yahoo) and tell them "shure you can look through it and shure call who you want and copy everything while you are at it. Buy the way here is my recent call list"
Please do not use this junk. Except Chris Taylor (Religious Views: Deutsch)

Note
I told you so http://www.cbc.ca/technology/story/2007/08/13/tech-facebook-code.html

Cern Work

Ok now some personal stuff. I am currently working at Cern in Genva as a technical student.
Here the link to my main project https://twiki.cern.ch/twiki/bin/view/FIOgroup/FsRegisReview
and here to my web page
www.cern.ch/ribalba

Ssh

So after looking for this page quite some time here a link http://vext01.blogspot.com/2006/10/computing-mystery-solved-ssh-without.htm
this is very usefull it lets you log on to a machine over ssh without asking a password
Thx Edd

Cern Week 1

So this is it my first week at Cern is over. So what did I do.
First I had to go through the procedure of getting an Id card and sort out all the paperwork. This was not as easy as I though as everything was in French, which I don't speak. Further I had to sort out my Parking permit and other small stuff like a bank account and so on. After getting my logon name (ribalba :) and my desktop, I had to install it with scientific linux. This is a Red Hat clone especially designed for research facilities. While doing this I tripped over a kerberos Error. So I spent one whole day tracking it down and creating a workaround for it. The error was caused through a password hash in the /etc/shadow through wich PAM Unix allowd you to login but the afs mount didn't get a valid Token as this requires PAM Kerberos to get one. So in you have to put AFTpw in the /etc/shadow file to get PAM Kerberos run. Further you now use a little tool ccdbuser to add a user to your local machine which is in sync with Kerberos. I started reading the source code of the Project I am going to replace . Which is written in Perl and C and hardly documented (Designed 6 Years ago). Futher I started to gather some Use Cases / Descriptions and agreed with my Boss that the Requirements stage will be done in compliency with the UML standard. I got my own development Cluster which I am currently playing around with to understand how scientific linux and the current system work. That's about it. I have a really nice office which I am shareing with one other guy who is currently on holiday.