Fri, 14 May 2010

Project Work and Crazy Expectations

I've never been a fan of detailed or formal requirements docs for software or other projects, as I've found the customer's needs always change and sticking to a pre-made list is impossible. But there has to be *something* to start with, something reasonably detailed enough to make an estimate (and I recommend doubling that before telling the customer). I got an email from a potential client recently:

"...help me in setting up an already purchased server, programming of some modules in Perl and handling in cron jobs for one of my projects. I would appreciate a quick turnaround time."

Apparently, this was enough detail to come up with a fixed-bid estimate - even after I challenged and asked for more detail.

Another example - a friend of mine wanted me to develop a web-based, database enabled app with user, admin and reporting interfaces, calendaring and email hooks. This was supposed to be an easy project I could put together one night, in my spare time.

Sometimes conveying the scope of a project is hard. Hidden from the casual user is how a software app works under the hood (all-too frequently behind a web browser). When you've been doing project work for a while, you get a sense for where the pitfalls and time-sinks lie, it's just hard getting clients to see them. I'm sure I've heard this analogy somewhere before, but projects like these are like icebergs - the part you see is just the smallest part. Unfortunately, to your clients, this part is all that exists.

posted at: 12:57 | path: / | permanent link to this entry | 0 comments |

Tue, 20 Apr 2010

Partitioning Woes

Who partitions servers like this? A braindead hosting provider, that's who.

Filesystem Size Used Avail Use% Mounted on /dev/sd1 16G 1.5G 13G 10% / /dev/sd3 4.8G 275M 4.3G 6% /var /dev/sd2 246G 564M 233G 1% /home /dev/sd0 99M 18M 77M 19% /boot

I mean think about it.../tmp, /usr/local, and /usr are all lumped into the root partiton. /boot is tiny, given that this is a 300GB disk, and on CentOS (this is a CentOS 5.3 dedicated server) that tiny /boot will fill up after a few kernel upgrades - since the old kernels and related files hang around unless you delete them. And 5GB for /var? Again, it's a 300GB disk...meant to be used as a web/database server - you could be a bit more generous here. While we're at it, LVM would be nice. Sheesh.

posted at: 16:46 | path: / | permanent link to this entry | 0 comments | tags:

Fri, 16 Apr 2010

HTML Tag Removal Utility - unhtml

I updated 'unhtml' [0] today and copied it into /sys/sdf/bin so others could use it. Unhtml is a command-line utility to strip tags from HTML source. I'm using it to convert pyblosxom posts to gopher-suitable text.

posted at: 17:27 | path: / | permanent link to this entry | 0 comments |

Thu, 15 Apr 2010

Some More Light Reading...

I like the Forgotten Realms novels so much, I've been reading all of them. Right now I'm reading the Paths of Darkness Collector's Edition [0]. So far all of RA Salvatore's books in this series have been great, although I'm guessing you'll like them better if you were or are into D&D.

posted at: 16:06 | path: / | permanent link to this entry | 0 comments | tags:

Thu, 07 Jan 2010

Some Light Reading...

I'm taking the family on a long-overdue vacation up to Vermont next week. In anticipation of doing lots of reading, I picked up two of R.A. Salvatore's Forgotten Realms trilogies, 'The Dark Elf' [0] and 'Icewind Dale' [1]. If the reviews on Amazon and bn.com are any indication, they should be quite entertaining.

posted at: 21:12 | path: / | permanent link to this entry | 0 comments | tags:

Sun, 03 Jan 2010

Kickin' it Old School

Going through my desk drawers recently I came across my 10-year old Palm IIIe [0]. I threw some batteries in it, and lo and behold it still worked fine. Luckily, Palm connectivity under Linux was stable ten years ago [1] - five minutes and a USB-to-serial converter later, I was installing plucker [2] and some of Cory Doctorow's novels [3]. Here is what it looks like:

Palm IIIe

Despite the small screen (160x160), it's actually nicer to read ebooks on this than any backlit-LCD screen of today (although the Palm IIIe does have a cool illuminated-green-text "backlight", I don't use it as it tends to eat batteries rather quickly).

The Palm IIIe interface is very fast and will hold 4-5 full-length novels in plucker format. This isn't a lot by today's standards, but it only takes a few minutes to swap them out for new ones. I can download any book from project Gutenberg in plucker format for free, and can convert other books from HTML format right from the web with plucker-build (until commercial ebooks come without DRM, I won't be buying any, nor will I lock myself into one platform as with the Kindle).

posted at: 01:13 | path: / | permanent link to this entry | 0 comments | tags:

Wed, 30 Dec 2009

Text Adventures and Get Lamp

I still remember playing Zork happily for hours in my youth. For those that played them, text adventures encouraged logical, deliberate thinking that rarely exists in modern games. Poking through Jason Scott's blog ASCII [0] last night, I saw a note about Get Lamp [1] and put in a pre-order. If it's anything like BBS [2] it will be great. It's set to ship in March of 2010.

posted at: 14:33 | path: / | permanent link to this entry | 0 comments | tags:

Tue, 29 Dec 2009

Viewing the Top-Ten Worst SSH Attackers

If you must maintain an 'open' SSH server, this might come in handy. This is a quick way to view the top ten worst offending SSH attackers in your secure log. It works on Red Hat-based Linux boxen (e.g., CentOS, Fedora), but it can easily be modified for other OS's by just changing the pattern or logfile.

[root@mail ~]# grep 'Failed password for invalid user' /var/log/secure* \ | perl -nle 'print $1 if /from.+?(\d+\.\d+\.\d+\.\d+)/' \ | sort -n | uniq -c | sort -nr | head -n 10 1888 200.123.110.118 1058 187.17.82.179 1010 72.2.10.4 372 201.38.138.2 330 189.19.9.217 250 218.61.35.119 250 210.181.198.94 146 88.199.11.170 140 72.55.164.232 140 115.93.93.123 [root@mail ~]#

posted at: 21:44 | path: / | permanent link to this entry | 0 comments | tags:

Tue, 13 Oct 2009

Make Great Money Now as a Freelance Developer...

Well, I'm so glad the person posting this job put a plus sign after the number '10' for an hourly rate, because as a 'Senior mod_perl programmer' with 'lots of application development background' who is used to dealing with 'Difficult code with poor documentation' in 'Very large applications developed over many iterations', I would never even consider applying for this at just $10/hour - the plus sign makes all the difference!

Perldev WTF

posted at: 14:53 | path: / | permanent link to this entry | 0 comments | tags:

Sun, 04 Oct 2009

Squirrelmail Error

I came across an obscure error using Squirrelmail recently. The error was just the text "ERROR : Connection dropped by imap server" after attempting to login with a newly-created user - less than helpful, and the server logs were no help (I'm using the Dovecot IMAP server). I was thrown off by the fact that I had recently migrated this client's installation to a new server, and thought everything should have worked as it had before. The key turned out to be that this was a brand-new user account, and that user's Maildir folders were missing. The easy fix is to create the maildir folders:

su - newuser maildirmake $HOME/Maildir

One odd result of the failure to create the Maildir folders was that incoming mail was stuffed into an mbox-formatted mailbox named 'Maildir' in that user's home directory. I was able to convert this to maildir format using a nifty utility called mb2md. Here is the entire sequence of commands:

su - newuser mv Maildir mboxfile maildirmake $HOME/Maildir ./mb2md-3.20.pl -s mboxfile

I then copied an empty Maildir folder hierarchy to /etc/skel so it would be copied into new user accounts.

posted at: 00:59 | path: / | permanent link to this entry | 0 comments | tags:

Sat, 26 Sep 2009

Observations on Teaching Newbies to Use a Shell

I've been teaching Linux/Unix Fundamentals courses recently, and thought I'd share some observations about students - some that surprised me. The course I teach is very command line intensive; while the individual student workstations are setup with graphical environments (KDE), the course can be taught and the concepts learned from a console.

Some of the students I teach are absolute beginners to Linux or Unix, so they have never typed a command into a shell environment before. A lot of the other students' last experience with a command line was some exposure to MS-DOS that is now a faint memory.

more »

posted at: 05:34 | path: / | permanent link to this entry | 0 comments | tags:

Sun, 13 Sep 2009

Using Rlwrap to Keep Your Commandline Sanity

After many years of commandline use, I've gotten spoiled by the pervasiveness of GNU readline in shells and other shell-like apps, like the MySQL shell. When I do sit down and try to use an app without such support, the result is a fairly painful mix of cursing and visible control characters (Oracle's sqlplus interface is probably the poster child for miserable CLI experiences, with no convenience facilities whatsoever).

An easy way around this is to use rlwrap, a nifty little program that gives any badly-designed CLI interface full readline capabilities, including command history, searching and editing. Most Linux distros have packages for it, but if not, just download and install the source yourself. It's not very large, and can be installed in a local bin directory if needed. Then you do something like rlwrap sqlplus FOO/password@db1 @sql/settings.sql or rlwrap mailx. Enjoy!

posted at: 18:36 | path: / | permanent link to this entry | 0 comments | tags:

Tue, 08 Sep 2009

Perl CGI Programming, the Right Way

One of the best resources for learning Perl CGI programming online used to be Ovid's CGI Course. I was disappointed to find it no longer online, but glad to see it in updated form, now maintained by the Perlmonks community. It always distinguished itself from other CGI tutorials with its early attention to security and taint mode. Well worth the read.

posted at: 20:32 | path: / | permanent link to this entry | 0 comments | tags:

Fri, 04 Sep 2009

No Kidding...Really?

This [0] falls under the Master of the Obvious department. Glad my taxes didn't pay for this study.

posted at: 13:41 | path: / | permanent link to this entry | 0 comments | tags:

Fri, 14 Aug 2009

RCS Misery

While I am definitely old-school, and still use RCS for things like personal config files and documents, I would never consider using it on a development project where lots of developers are working on a shared codebase. I had to do just that recently for a contract I'm working on with several other developers. Absolute misery. Even worse, this version of RCS is hacked so that the VC metadata is not local, meaning I can't use Emacs' VC-mode to make life easier. Imagine locks that someone always forgets to release ("You done with that file?"), no merging, branching or private repos - so no way to test your changes without possibly breaking stuff other devs are doing. Sheesh.

posted at: 21:35 | path: / | permanent link to this entry | 0 comments | tags: