Marketing 101. Consulting 101. PHP Consulting. Random geeky stuff. I Blog Therefore I Am.


The FuzzyBlog!

 Wednesday, April 16, 2003

Feedster Now Improved for the Mac!  Or I Didn't Take the Red Pill

I feel like 1997 -- old table based html for layout.  Or that I didn't take the red pill that is "CSS nirvana".  I just moved from elegant CSS based tabs for Feedster to crappy old tables.  No matter what I did, I couldn't get those CSS tabs to work correctly in IE for the Mac so I finally just took them out, made a crappy little table and all is good.  It looks fine on the Mac, IE6, Mozilla. 

Note: Given the huge number of Macs in blogdom, I know I should have done this sooner but I kept thinking "I can do it; I can fix this; I want to take the red pill and leave 1997".  Nope!


1:44:13 PM      Google It!   comment []    IM Me About This   

Keeping Your Server From Running Out of Disc Space

Not too long ago, I got a panicked IM from someone I know in Blogspace.  "Scott my server won't let me log in to Movable Type.  Can you help me?"  He shot me a root password and I started reviewing the logs, checking for DB errors, etc.  Then either he or I thought of "does it have free disc space"?  A quick "df -h" told us /dev/hda1/ was at 100%.  That's bad.  So we cleaned up some stuff and I thought he might benefit from some code I wrote a while back.  What it does is once per day send me a report via email like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              18G   17G  561M  97% /
/dev/hda1              23M  4.1M   17M  19% /boot
none                  250M     0  250M   0% /dev/shm
10.225.183.68:/        36G   23G   11G  67% /mnt/10.225.183.68
 

Once a word has been allowed to escape, it cannot be recalled. -- Quintus Horatius Flaccus (Horace)

The key thing here isn't the code.  That's pretty damn simple.  The big deal is that I made it interesting by appending the results of the standard Unix tool fortune to it.  Here's another example:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              18G   17G  561M  97% /
/dev/hda1              23M  4.1M   17M  19% /boot
none                  250M     0  250M   0% /dev/shm
10.225.183.68:/        36G   23G   11G  67% /mnt/10.225.183.68
 

If you would understand your own age, read the works of fiction produced in it. People in disguise speak freely.

We all get way to many automated things via email and if you at least make them interesting then you might bother to read them. 

Here's the php code.  There are lots of ways to make it better but I just dashed it off.  Perhaps it will be useful. 

Note: The real lesson here is that more developers need to start taking user psychology into account.  I've had boring sysadmin reports before and I used to generally just delete them.  Now I actually read them since I never know what might be in them.  If I had been a little bit smarter, I would have varied the fortune routine to sometimes give 2 fortunes or 5 or maybe insert a random picture from the net. 


10:24:05 AM      Google It!   comment []    IM Me About This   

Where's the RSS for Chris Lydon?

I just saw Dave's note about Christopher Lydon having a blog so I popped on over to it to add it to Feedster.  The autodiscovery routines in Feedster are actually quite good but when I see an influential person like Chris (or phil greenspun), I like to make sure personally that they're in Feedster.  So I'm there and I'm looking.  And I can't find the rss button.  So I try the defaults of index.xml and rss.xml and that's not there.  So finally I think to look at the source and *poof* I see it.  Its /xml/rss.xml.  Sigh.  Can't products from the same manufacturer (Manila and Radio) use the same defaults?

Still I was pleased as punch to see that Manila produces the relative link for auto discovery.  That's very cool.


10:00:04 AM      Google It!   comment []    IM Me About This   

Advice for Programmers: Having the Guts to Admit you Crash

I know a lot of programmers and damn few of them have the guts to admit their programs crash and their code reflects that.  Now I don't really care whether or not the crash is due to bad user input, utter user stupidity, bad programming or whatever.  What matters is that there was a crash and that the user lost work.  Now whether or not programs should save the user's document automatically or not is a question.  People like Tog say yes.  I'm not so certain but I just plain don't understand why programs aren't smart enough to save their own settings -- WHEN THE USER MADE THEM -- instead of on exit. 

Here's an example.  I'm currently working on my presentations for PHP-CON and I had the document open when my machine crashed.  I go back into PowerPoint and that document isn't in the list of most recently used files.  So now what do I have to do?  I could look in MyDocuments and try and pick it out of thousands of other documents but instead I started a (slow) search for my hard drive for *.ppt modified in the past 24 hours.  With gigabytes of space, where you put something isn't readily apparent anymore.  I have enough to remember, do I really need to know what folder a file exists in? 

The whole concept of "write configuration changes on exit" dates back to floppy drives / slow storage and the concept that the user's experience will be perfect.  Get a clue software developers -- things aren't perfect.  And I'll even grant you that its not your fault -- users do dumb things all the time.  Still shouldn't you adopt "defensive programming" so that a user never loses work?  To me its really a question of having the guts to admit that your program will probably crash and what do I do to make sure that the user's work isn't lost.

Note: I consider the act of choosing a file work.  When you have thousands of files (and who doesn't), it is indeed work.  Most of us are pretty poorly organized.


9:46:55 AM      Google It!   comment []    IM Me About This   

I Know How to Fix My System But ...

Note: Long time readers have heard most if not all of this before.  Feel free to move on.  Its YAAMR (yet another anti microsoft rant).  More written to make myself feel better and lay out a strategy for moving off Windows as much as possible.

I just had another damn crash -- windows said "Adjusting Virtual Memory" and then ***poof***.  Full reboot and even a file system check.  That's two in two days.  I know what I need to do:

Re-install Windows

I'm sure that would probably fix it -- at least for a time.  This machine is now 2 years old and that means that "winrot" has set in.  I had an interesting chat with Scoble about this recently and he was very skeptical why I was unwilling to do this.  Here are my reasons:

  1. Microsoft sold me something that was supposed to be stable.  That was the promise of Window 2000.  Hell that was the promise of Windows NT.  An operating system which restarts itself when it decides it needs virtual memory and doesn't even have the decency to save all my work is utterly pathetic.  Quite honestly Microsoft lied to me and millions of other customers.  That's unacceptable.  And don't tell me that the solution is to upgrade to Windows XP.  I don't want Windows XP.  Not only does it look like Playskool but it changes low level things like how keystrokes work.  I've memorized Windows 2000 backwards and forwards and I'm not willing to relearn things because the company that sold it to me lied to me in the 1st place.  If I knew Windows 2000 was like this, I'd have stayed with NT4.  And do I really think that XP is better?
  2. My time is valuable.  I'm a developer and I bill out at between $75 and $100 per hour.  Conservatively re-installing the OS is about a 1 to 2 week investment of time (1 to 2 days to do a full backup (> 200 gigs on this machine and like everyone I don't really have a good backup approach so time is shot there); 1/2 day to do the full install; 1/2 day to find all the driver discs for hardware; 1 week on and off to migrate all applications; 1 week for shake down - discovering that I don't have this; X won't run on a new drive letter; etc).  So if you assume 2 * 40 or 80 hours that's an $8,000 investment in lost productivity.  Now I'll admit that I'll get some work done while this is going on but nowhere near a regular work week.  I've reinstalled OS's many, many times and it always sucks your brain dry. 
  3. Oh and the devil in an OS reinstall is in the details.  Here are things I'd lose that AFAIK there is no way to really recover: All my Internet Explorer passwords, some of which I really don't know.  All my fonts (ok that one isn't so hard but will I remember).  My browsing history so now I have to type in all my urls from scratch.  Passwords in other browsers of which Opera has some, Phoenix has others and Mozilla has the rest.  All my program defaults -- yeah Inbox Buddy is smart enough to save all its defaults NOT to the registry but for everything that does, I lose it.  Setting up all the options that you need in the apps you use regularly is a pain.  And with so much software downloadable, installation isn't just a matter of "find the cd" now its like "what site did I get that from?"  And if you paid for it then you have to ask "what's my serial # / password".
  4. Longhorn changes everything anyway.  According to a good source I respect, the next version of Windows, post XP, changes everything at the UI level.  So if I do re-install 2000, I face the same problems with stability.  If I move to XP which he claims fixes a lot of this, I have to relearn it and then 2 years from now (if they ship on time), I have to relearn it again.  As I said, my time is valuable and I'm sick to death of being "Microsoft's Bitch".  Everytime what I know is wasted by a Microsoft change or I'm forced to waste time because of their error, that's what I call being "Microsoft's Bitch" or perhaps more accurately "Bill's Bitch".  Think about it -- how would you feel if every time you bought a car they changed the brake pedal's location.  If you want to offer a new UI (say XP) that's fine.  But give me a compatibility mode that's identical.  Not 90%.  Let me make the change over at my own pace IF I want to.

So when I consider this rationally, the economically smart (remember that $8,000 figure) thing is to do this:

  • Reduce my reliance on Windows.  Use it only for:
    • Inbox Buddy / Outlook
    • Radio
    • Office apps when I need them
    • Testing browser stuff
  • Recognize and accept that Windows simply isn't a stable multitasking operating system
  • Start getting my daily data off Windows and onto a *nix platform or (better) a server based platform w/ browser or thin client access
  • Seriously consider Mac OSX.  Despite loathing the keyboard with a passion, I'm grudgingly using my iBook more and more.
  • Setup a home linux server and move all my files onto it so that my data is isolated from Windows crashes (don't laugh -- I have Windows 2000 server one machine that crashed and since it was my Active Directory machine, I can't get to the 2nd hard disc on that machine since the 2nd hard disc had the active directory settings)

A key point for Microsoft to understand on Longhorn is that whenever you confront customers with a choice where there is an economic consequence -- whether its system cost or labor cost, they have an opportunity to look at options.  If I was working on Longhorn, I'd be really concerned about "How do we make migration easy" -- so easy that people don't write rants like this. 

Oh and just in case you were wondering, this isn't generic hardware -- its a top of the line Compaq Deskpro Pentium III box w/ 512 megs of ram.  Not a 2.x gigahertz screamer but a respectable box by all means and from a good company.  All my fireware and USB devices have been disconnected for several weeks so hardware failures for the crashes shouldn't be an issue.  This is purely Windows as far as I can tell.  It is just plain bad engineering on the part of a monolithic company that is out of tune with their customers.


9:22:14 AM      Google It!   comment []    IM Me About This