Writings Photos Code Contact Resume
English

You are here

Written in English.

How did I cast my vote for the EGLUG administration elections ?

Submitted by msameer on Tue, 28/02/2006 - 7:19pm

I had a few points to consider:

  • Familiarity with drupal as it's the CMS behind EGLUG, Of course familiarity with drupal means that the person is either a coder which is a good thing or at least familiar with drupal which is still a good thing.
  • Familiarity with the drupal API which is needed if we are to write EGLUG specific modules. We are already using some custom modules.
  • For the future, I don't see EGLUG moving away from drupal, Even if this happened, I still guess it'll be a php platform.
  • Experience with server administration and configuration, This is not really that important as it's unlikely that EGLUG will have its own server,
  • The ability to reasonably handle the administration tasks.

The above criteria are the ones I decided to apply on each candidate.

1 Alienbrain
The guy is familiar with drupal and the drupal API, He's a hard-core php guy.
He knows how to manage a GNU/Linux server, He already did some work for EGLUG
Even before being a senior user, He ported the modules used by EGLUG to drupal
4.6

2 MSameer
I'm familiar with the drupal API, Wrote some modules either for myself or for
EGLUG. I've been an administrator since I the beginning of EGLUG, I'm not a php
wizard but I know how to get things done. I also have fair knowledge in managing
GNU/Linux servers. Why did I gave myself 2 ? It's because I don't have much time.
And because I still think that the need for drupal familiar people is more
than the need for server admins "Well, Me and Amr are also server admins ;-)"

3 Phaeronix
The hardware wizard and the guy behind what I'd like to call "EGLUG official
love CD" and "The best Egyptian hardware support under GNU/Linux"
Islam is not really a coder, He's a bug hunter. I think he has free time for
EGLUG, I'm not sure about his php and/or drupal skills. But I know that there
is a great mind inside his skull. I guess he has good experience when it
comes to servers.

4 DarKnesS_WolF
The talented rise in the GNU/Linux world "Might not be true :-)"
even if he doesn't realize that ;-)
I'd say that the best thing about him is his ability to RTFM, RTFM, RTFM, ...
He's not a coder but he is fine with GNU/Linux on the server side.

5 Pronco
From what he said, He seems to be fine with drupal and CSS, I also *think* that
pronco has a fair knowledge about GNU/Linux despite the fact that he was running
windows 2003 server :-)
I did put him here because I never feel he's there participating in general
Which makes me fear he might not have enough time.

6 Conceptor
Yes Diaa might be a GNU/Linux hard-core administrator, But He's only an
administrator, With the above 5 candidates I guess we won't need an
administrator as I still think that it's unlikely for EGLUG to get her own
server. Also diaa was one of the least active in the last administration team.
He's always saying that he is doing events and so, The fact that he's unable to
realize is that all what he is doing is great but it's not related to the
duties required from an administrator. Looks like diaa wanted to help but
I have no idea why isn't he. He's always saying nonsense about not having
enough permissions on the server to do the administrative duties, Yet you
get to know that he's saying nonsense when you discuss it farther with him.

7 ramez.hanna
Ramez is my friend, He's a hard-core administrator and he's a php coder.
I'm not sure about his familiarity with drupal. I'm just putting him here
because an administration team candidate who posts his skill list after the
start of the elections despite the calls on the forum can either be:
* One with no time at all which renders him unsuitable for the team.
* One who doesn't respect the community which makes him unsuitable too.

Finally, This is my own opinion regarding the suitability of the candidates for
that particular position and this is how I've casted my vote.
I didn't post this before although EGLUG rules don't apply here. It's just because
A lot of people might be reading my blog and I felt I might be affecting the elections result and it might be considered campaigning and I don't like it. Play by the rules ;-)

Anyway, To all the above people, This is not my opinion in you in general and this has nothing to do with our personal relations and I don't want anyone of you to discuss what I wrote about you.


Don't fear the socket. Discontinued.

Submitted by msameer on Sat, 25/02/2006 - 4:42pm

I've started writing a simple sockets programming series. I passed by Beej's Guide to Network Programming Using Internet Sockets and discovered that it's very good and it's not that complicated like I thought a few years ago.

Looks like I skipped the introduction as usual and jumped to the code or the guy improved it, I can't really tell.

That's why I decided not to continue the series.


A new theme...

Submitted by msameer on Fri, 24/02/2006 - 7:56pm

Probably you can notice that ;-)

I still have to do a few things with javascript, Maybe I won't.

I guess I like the new colors, Someone deserves a big thank you for the basic logo especially when you know that she did the drawing on my iPAQ using the stylus. The rest was created using The GIMP and emacs. Emacs, The past, Present and future.

I wanted the theme to be pure CSS but I failed, I had to do the top part using tables and I'm telling you that it's UGLY.

Finally. IE, You suck *** *** ****, All various problems from float drops to breaking the semi-transparent PNG logo and forcing me to use a GIF one to doubling a div margin. While the first one was triggered by a resolution of 800*600, The last one was always happening.
Opera for windows had a very tiny problem with the small image in the top right of the footer but I'm ignoring it.

Drupal, I raise my non-Red Hat to everyone behind you. Easy theming, There might be problems due to the default drupal CSS but I was able to iron them out in a snap!

Windows, You suck, The colors aren't being displayed correctly, I don't know how or why but I don't really care.

I still need to reorganize a few things here and there but it takes time.



Lighty powering foolab.org

Submitted by msameer on Sat, 18/02/2006 - 10:58pm
Yes, I've discovered that Lighttpd is now in Debian, I grabbed the sarge backport from backports.org and here it is!
Probably you won't notice anything, Maybe the server'll be a bit faster. But for me, I can serve more requests now as lighty is more lightweight than Apache ;-)
Graphs ? Generated every minute. ;-)


As you can see, I don't have much requests but why not use something that can allow me to expand ? :-)
Probably I won't leave the graphs for long, I'm just enjoying the rrdtool module of lighttpd!

Linux 2.6 SUX!

Submitted by msameer on Sat, 18/02/2006 - 2:04am

First, I know that I should STFU because I'm not going to write a patch to fix it but I can't as I'm not a kernel developer and the knowledge I have about the kernel development is the same as the knowledge I have about T.V internals ;-)

Really 2.6 is annoying, I don't know what's wrong with Linus. Yes thanks Linus for releasing Linux as a GPL'ed kernel and for working on it but you still suck :-)

A few days ago I went to the office, Powered on my laptop, startx and errrrrrr. I'm not allowed to startx. WTF ?

After digging around for some times I discovered that the Xwrapper.config file has been replaced by a strange file, I discovered later that it was the fonts.dtd file from the fontconfig package. WTF !!

Simply, I fixed the file and managed to startx, Something wrong with the colors ? I finally discovered that the rgb.txt file has been truncated. I also discovered that a lot of directories has been turned into files. I was sure that someone didn't crack my laptop. After I fixed this, I was trying to switch my keyboard layout to Arabic but it didn't work. Open a terminal and damn! "setxkbmap" is crashing, Google told me that some files might be missing. I reinstalled the relevant debian packages and it worked.

I had to stop and consider it, Is it a file system corruption ? I never had this with Linux before. I rebooted using a live CD, Ran fsck but it was fine. Odd!

I booted my normal system back and started to work, I'm a full time employee after all and this suck when you want to poke around :-)

Never mind, I'll have a detailed look later.

I was doing something when I suddenly got a message on the terminal and the file system was remounted read only by the kernel.

ext3_free_blocks_sb: bit already cleared for block

Enough is enough, The night before I installed the 2.6.15 kernel from sid. Now I can say that it might be a corruption in the kernel data structures. I rebooted and fsck again, shit I never had any entries in my lost+found directory since I swotched to linux, Now I have something like 22 Megabytes.

That's it, I downgraded the kernel to the 2.6.15 from testing, kept rebooting and running fsck until it stopped reporting filesystem errors.

Now what ? I'm not going to reinstall ? Sure no.

I need to verify all the packages, I found debsums but I also discovered that not all the packages install an md5sum for their contents.

At that point I decided to go home.

I used debsums to verify all the packages with md5sumsand reinstalled all the packages with corrupted or missing files. I then reinstalled all the packages without md5sums for 2 reasons:
1) I can't tell whether they contain corrupted files or not.
2) To allow debsums to generate md5sums for them.

Now the only problem is that the md5sums files might be corrupted too but I decided that I'm still lucky ;-)

Everything was fine but I was really considering FreeBSD but then I thought about it again, I can't use it without trying to contribute but I don't like to contribute to a code under the BSD license which can be closed anytime.

Also, I won't be using stable, I'll be using release which is equivalent to Debian testing, It's also my fault that I used a kernel from unstable but come on, That's Linux, We are not talking about windows here. I mean even so, It should be stable.

Sure I wish I can report this as a bug but how ? I don't have any information to report.

The other problem is: How the hell am I supposed to use such a kernel when it enters testing ?

I can't also compile from source again for 2 reasons:
1) I've been building from source since the late 2.2, I tried building 2.6.15 some time ago but damn, mutt wasn't able to open my main inbos, grep complained about inability to allocate memory when I tried to grep through the ~500 MB file. Something is wrong and this makes me afraid.

2) If such a bug is there when we have a team of people maintaining the Debian package, How can I be sure that I won't hit something more sever when I'm on my own ?

I know that everything can have bugs but the filesystem driver ? Isn't this too much ??


Don't fear the socket: 1, The socket.

Submitted by msameer on Thu, 16/02/2006 - 1:27pm

Discontinued

This is the first of a network programming tutorials.

I hate such theoretical boring things, So I'll just copy and paste whatever I think'd be useful.

What is a socket ? A socket is an end point for communications, A socket is the corner stone of networking. You can consider it as a method of communication between two processes, Those two processes can be either running on the same computer on two different computers.
A socket is also an identifier that the application can use to identify that end point.

Each socket must have a type, The type defines the communication semantics, IT can be:

  • SOCK_STREAM: full duplex reliable connection, It insures that data is not lost or duplicated, TCP connections are SOCK_STREAM type.
  • SOCK_DGRAM: Used to send datagrams, Unreliable messages and it's connection-less, UDP is of SOCK_DGRAM type.

We have more types but you can RTFM to know more, I don't really care about them now.

Each socket must also have a protocol, It can be:

  • PF_LOCAL: Local interprocess communication, Also called PF_UNIX. It's used as a method of communication between processes on the same machine. The connection is represented by a file that exists in your file system.
  • PF_INET: Used to communicate between processes running on different computers.\ using the Internet Protocol "IP protocol", It can also be used with processes on the same machines, Especially for crappy operating systems like the Microsoft DOS extension called windows because they don't have PF_LOCAL.

Also probably more but that's what I'm going to list.

You can use the sockets to mainly create 2 things:

  • A server, Creates a socket, Binds it to a local address, Listens for incoming connections and accepts or rejects them.
  • A client, Creates a socket, Connects to a server.

Baghdad, The yet to be.

Submitted by msameer on Sun, 12/02/2006 - 3:36pm

As of today, The 12th of February 2005, The CVS now holds the new Baghdad code, I've dumped the old code and data files.
It was not accurate, A lot of correct words were flagged as incorrect and vise versa. Beside, using a SQL database as the back end storage engine wasn't really a good thing in my opinion.

I had a lot of ideas in mind on how to implement the new thing.

1) A complete word list with all the Arabic words, This is tedious and the list will be huge.
2) Continue using the old data set, I had o understand how it was generated, Extend it and/or correct it. I'm not a linguist and I think that my Arabic suck ;-)
3) Try to identify whether the word fed into the checker is a verb, a noun or whatever, Then try to get the root by removing prefixes, suffixes and non-needed letters from the stem. This wasn't easy because I didn't find rules to classify the words and I was able to get an exception to every rule I came out with.
4) As above but don't use strict rules, Instead try to apply all the rules and then classify according to the probability.
5) Ahmad Gharbeia had an idea, I shouldn't inspect each word separately, I should get the previous word into account too, This looks fine but the problem is that I need to build Baghdad as a library other applications can use, I'm not welling to implement the support for every application out there, Therefor I'll Create a plug-in for enchant as it seems to be the upcoming standard "According to Islam" and this will allow me to support both GNOME and KDE.
6) After talking with Amr Gharbeia, We decided to use a set of regular expressions to extract the root of a word then match this root against a word list, Of course this'll not always work so I'll have to add some AI to handle it but this is fine with me.
7) I extended the above idea, Now for the regular expressions, We have a file named after the number of letters of the word that'll be matched against this regular expression. Each line in this file is composed of 2 parts, The regular expression itself followed by the number of letters returned by this match.
For the word lists, Each file is named after the number of letters of words in it, So whenever a regular expression matches, We know the word list we should check for this word in.
By using the above method, We can avoid running a word against all the regular expressions we have thus saving time and processing power, And by knowing which file we need to check for the word we can achieve a bit of speed.
I know that the above algorithm needs to be optimized a lot but I leave this when it becomes slow.
I'll also be implementing a caching of correct and Incorrect words with their suggestions.
I'll also be implementing a separate word list for words with no Arabic roots, At the end we'll be using a hybrid model as I discussed with Alaa.

Now what does this mean ?

It means that we might end up with a FLOSS spell checker after all these years.

It also means that we'll need to start building the regular expressions and words lists which is not what I really like to do, Under other conditions I'd have shut my mouth because I'm asking people to do something I won't be doing, But as I'm doing all the coding I guess I have the rights to say that.

It also means that if the above algorithm fails, We'll have to live without an Arabic spell checker.

Now let me state the current situation:
1) Main library: Works, Not all the correction algorithms are there but it's in the same state as the release before the rewrite.
2) Data files: 8 words and 3 regular expressions, We can detect 24 words.
3) Enchant library: Completed.

The library still needs a lot of work so we can get private dictionary support, Encodings other than UTF-8, Diacritics stripping, Relaxed spell checking rules. But the word list is the most important thing now in my opinion.


Drupal authentication backend for dokuwiki.

Submitted by msameer on Tue, 13/12/2005 - 10:41am
This authentication backend'll enable your DokuWiki to authenticate using the drupal database.
This code is pulled from my svn which means that whenever I update it, It'll reflect the file displayed here ;-)
Or get the file directly from here.
Can't open the file!

Me, g++, C++ and the segfaults.

Submitted by msameer on Sun, 06/11/2005 - 3:22am

3 years ago, Alaa offered to teach me C++ to make a better mind out of my C overloaded mind.

Next day when I was practicing, I wrote my 1st C++ code and sure it had syntax errors, The result was a compiler crash.

These days I'm trying to implement something in C++, And yes, It had errors too. The result was also a crash

mohammed@uniball:~/projects/spell$ g++ -c morph.cc `pkg-config glibmm-2.4 --cflags`
In file included from morph.hh:4,
                 from morph.cc:6:
word.hh:5:18: error: glibmh: No such file or directory
word.hh:10: error: expected `)' before ‘,’ token
word.hh:13: error: ‘std::ustring’ has not been declared
word.hh:13: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:14: error: ‘std::ustring’ has not been declared
word.hh:15: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:16: error: ‘std::ustring’ has not been declared
word.hh:17: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:18: error: ‘std::ustring’ has not been declared
word.hh:19: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:20: error: ‘std::ustring’ has not been declared
word.hh:24: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:25: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:26: error: ‘ustring’ in namespace ‘std’ does not name a type
word.hh:32: error: invalid use of ‘::’
word.hh:34: error: ‘std::ustring’ has not been declared
word.hh:34: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
word.hh:35: error: ‘std::ustring’ has not been declared
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

Why do I have the feeling that I should stick to C only ? ;-)


Pages