[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: xystrus
Subject: intro
Date: Tue, 12 Mar 2002 01:41:01 -0500
User-agent: Mutt/1.3.27i

Ok, so now that I've blabbed a bunch, I'd like to give you roughly the
same intro that I gave Alain.  I'm an out of work Unix system admin
who just recently lost his primo job working for a Linux start-up co.
Since I have the time, I figured I'd take some time to sharpen my
coding skills.

I've done some programming on tiny projects, but I have no experience
at all working on large projects.  I became interested in mailutils
because I was considering writing my own IMAP server, after various
disappointments with UW-IMAP, and reports from friends and associates
that the freely available alternatives weren't much better, for one
reason or another.  I first came across mailutils before it became
mailutils...  We were looking for a POP server that was small and
fast, and we came across what eventually became gnu-pop3d, and is now
part of gnu mailutils.  We ended up switching to IMAP, and went with

We had a bunch of problems with UW-IMAP, and I had even more problems
at my last job.  That's what made me want to write a new IMAP server.

My coding skills are about what you'd expect from a college junior
doing solid 'A' work.  I'm interested in helping out in whatever way
I can.  I'd like to see a nice GPL'd IMAP server, and I'd like to 
take the opportunity to sharpen my coding skills and work in a group.

Right now, I'm going to start going through the code and figuring
out what is where and why...  Since I don't really have a lot of 
experience writing large programs, I'm prolly going to ask a lot of
questions about why things were done the way they were done, not to
bust anyone's chops but to understand why choices were made...  But
I'll try not to try anyone's patience. :)  

For example, here's a snippet of code from imap4d.h that defines
macros for the various IMAP states:

  /* Global variables and constants*/
  #define STATE_NONE      (0)
  #define STATE_NONAUTH   (1 << 0)
  #define STATE_AUTH      (1 << 1)
  #define STATE_SEL       (1 << 2)
  #define STATE_LOGOUT    (1 << 3)

I'm curious why these were defined this way...  It strikes me as
a little inefficient.  Each time these are used, they are replaced
with a bit-shift calculation, whereas there is no calculation (and
the parentheses are obviated) if they're defined with constants:

  /* Global variables and constants*/
  #define STATE_NONE      0
  #define STATE_NONAUTH   0x1
  #define STATE_AUTH      0x2
  #define STATE_SEL       0x4
  #define STATE_LOGOUT    0x8

I don't really think one is more readable than the other...  Am I
missing something?  (In practice, I think the compiler recognizes
that the first cases are all constants, and replaces them with
the constants, so I don't think this example makes much of a 
difference, though I could be wrong.  Anyone?)

Also, if there are things that people want worked on, let me know,
whether it be in imap4d or in some other part of mailutils.  It'll
probably be at least a week before I'm familiar enough with the 
existing code to start writing some.  I hope to be useful after that
though.  ;-)  I'm going to start poking around in the code tomorrow...
right now it's Tequila Time(tm)!  :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]