Code, headaches and life

Wednesday, May 2nd, 2001 at 12:00 am | 1,438 views | trackback url

PODS

mysql>
select url from pods limit 1,1000;
543 rows in set (0.01 sec)

PODS grows.

Choices..

getopt()
getopt_long()
getopt_long_only()

or..

Trying to determine the best way to be intelligent about argument parsing, and making sure that the devices passed as arguments are valid, and are only devices, and not files. Have to remove the user from the equation here. Think devfs, usb, serial, IrDA.

I suppose I could use stat() here after parsing the argument, like:

void report(char *, struct stat *);
int main(int argc, char *argv[])   
{
        struct stat status_buf;
        
        while (--argc) {
                if (stat(*++argv, &status_buf) < 0)
                        perror(*argv);
                else
                        report(*argv, &status_buf);
        }
}
void report(char *name, struct stat *buffer)
{
        int i;
        struct passwd *passent;
        ushort mode = buffer->st_mode;
        
        printf(" %s :", name);
        printf(" Access mode 0%o: ", mode);
        
        for (i = 6; i >= 0; i -= 3)
                printf("%s", accesses[(mode >> i) & 7]);
                printf(" ");
}

Headaches, dark circles under my eyes

Not yet sure what to make of the randomness in my head, one day no headaches, but stuffy sinuses, next day, clear sinuses, raging headaches, next day, clear sinuses, no headaches, but I see flashes of purple, next day I wake up with a bloody nose or dried blood in my nose. Weird.

Time to revisit this.

Fear of KABOOM!

I found out when I took my truck to have an oil change, that there was a pretty severe gas leak under the truck. It wasn’t leaking out in a way that would cause a puddle or drip, but when I was driving, it would “spray” out, causing a gas smell around the truck, but the truck itself was dry underneath. Come to find out, the last time I had brought it in for repair, they forgot to secure the fuel line, and it was hanging on top of my driveshaft, and the driveshaft was slowly grinding through it.

EEK!

$74.00 or so later, and now it should be ok. They patched the fuel line with a length of secured hose and clamps. It’s a good thing I wasn’t parking anywhere outside where a quick spark could have sent my truck into Truck Oblivion, or with me inside it.

Buzzword coming, duck!

The buzzword for this week is… XML!. Yes, I’ve slipped into the fold and am diving in head-first into learning as much as I can about XML. I have a little pet project that will be using this quite heavily, and the more I read and learn about it, the more I can see it’s usefulness in a lot of the projects I’m working on. One example using PODS:

<PODS>
  <SITE TITLE="SCIFI.COM delivered directly to your
    handheld device! Includes news, schedules, and other SCI
    FI facts and information." DOMAIN="scifi.com" 
    PROTECTED="no" ROOTPAGE="index.html" 
    PROTOCOL="http">
  </SITE>
  <SERVER>
    <ADDRESS>208.243.116.240</ADDRESS>
    <TYPE>apache</TYPE>
    <VERSION>1.3.6</VERSION>
  </SERVER>
  <URI>   
    http://www.scifi.com/handheld/
  </URI>
</PODS>

Plucker could definately use a retrofit around it’s config files, and the parsing of ~/.plucker/home.html for those that use it. I’ll have to play around with this a bit more as I learn how to use it more effectively.

pilot-link will be getting an infusion of XML as well, very very soon. No, XML can’t yet make coffee (though it can describe the coffee, the pot, the bean, the… ah, forget it), but for places like Palm data, and record formatted content, it “Just Makes Sense(tm)”

Life

Well, for those that may have read my most depressing diary entry ever, I should comment. Things are getting a bit better here, though life is still as uncertain and grueling as ever. This week was a train wreck, and I fear it’s going to get worse.

I really wish Maureen “I Hate Linux” O’Gara would really begin to get her facts straight, and stop drudging in the sewers for rumors, just so she can be first-to-market with them. She reminds me of someone else who has recently been put on my list for spreading unsubstantiated rumors.

I truly feel sorry for these angry, depressed people with such low self-esteem.

enough for now…

comments go here

Last Modified: Wednesday, May 2nd, 2001 @ 00:00

Leave a Reply

You must be logged in to post a comment.

Bad Behavior has blocked 968 access attempts in the last 7 days.