Showing posts with label computerish stuff. Show all posts
Showing posts with label computerish stuff. Show all posts

Sunday, November 30, 2008

GreedyBastard

is the name of the latest addition to our home network. He's a fat bastard too, but that name was already taken[^].

You might remember I've been planning to set up a Windows Home Server machine here to handle data backups. Those plans came to fruition a month or six weeks ago, using the old PC Sonya used to have. A couple of 500 Gig drives for data, a 160 Gig drive to boot from and that old (four years old - yikes, how time flies) computer now sits headless under the desk. Sonya seems to think it's there to put her shoes on when she's not wearing em!

Naturally the price of the server software dropped a week or so after I bought it; it's now on egghead for a hundred bucks or so after I paid $140 for it. That's life.

As for the software itself, it just works, which is how I like it. I'm still wrestling with the IIS security model, to say nothing of getting SQL Server 2008 accessible across the network! I know why they're making it more secure (slammer anyone?) but do they have to make it so damned hard to configure? It's not like Joe Blow is about to run out and purchase SQL Server 2008 (or even download the free express edition).

Windows Home Server is, by contrast, a no-brainer to install and configure. Well that fits the target market, the aforesaid Joe Blow but it's fine by me. It does help my peace of mind that we're sitting behind a router. I've chosen not to use the remote access functionality built into the product, preferring to stick with my existing arrangements of non-standard ports assigned to each remotely accessible machine, forwarded by the router to each machine and using Windows Remote Desktop. If I ever *did* need remote access to GreedyBastard I can always remote to this machine and then use the WHS console.

For the rest, well they make it very easy indeed. Bring up the server and connect to the network. Download the 5 and a half million security updates. Once that's done enable remote admin on it so it can truly go headless and then, on each client machine, navigate to the shared software folder on the new machine. Install the WHSConnector software and you're almost done. By default the entire client machine is backed up save for a few places that really don't need backup, such as the internet cache, the swapfile and so on. If you're feeling brave you can add one or more exclusions - directories you don't want backed up.

Then just let it run and overnight it backs up each client. It spends a lot of time determining what's changed since the last backup. Interestingly, it seems to be doing some kind of checksumming of files. I added yet another new machine to the network yesterday; this one's a web server/development box with Visual Studio 2008 - total disk usage about 25 gigs when you factor in a complete install with SQL Server 2008 (ah, so *that's* why I've been struggling with network database access) and a bunch of other stuff. Extra disk usage on GreedyBastard? About 3 gigs. I attribute this to the fact that the new machine is essentially a clone of this machine (same development environment) and thus the new machine's backup can consist of a bunch of links to files already backed up.

The other nice thing about WHS is the way it handles file sharing. It sets up a bunch of 'known' directories for music, photos etc. You copy your files to there and anyone in the workgroup can read em. Yeah yeah, big deal. No really, it supports folder duplication for those folder - two copies spread across your storage space (and across different spindles if you have multiple drives). Sounds like RAID but a damn sight easier to set up. You just add a new drive, reboot the machine, it notices the new drive and asks what you want to do with it. Add it to the storage pool? Yup. A couple of hours and a *lot* of hard disk activity later, and it's redistributed your files so that they'll survive a hard disk failure. Well, that's the theory though I haven't yet put it to the test.

It's intelligent about external backup. We have a 250 Gig USB drive. The first time I backed the public folders up it took about 60 Gigs (mostly my music files). The second backup took about 250 Meg (the extra music I'd added in the intervening week). Viewing the backup sets I can see 60 Gigs or so in each set but I know the second set is linking to the files that *didn't* change, in the first set.

Do you reckon I can convince either Sonya or Andrew to use the public folders? Not on your life. 'It's backing up my machine' they say 'that's all I need'. Well, yes, but those backups are *not* part of the external backup set. I reckon they are, without even realising it, playing a numbers game. The system is resilient enough if only one machine fails at a time - but if one of theirs dies *and* GreedyBastard dies at the same time they'll be out of luck. I won't be - I'll have the external backup of *my* files. Of course, the house could burn down but if it does I reckon losing a bunch of symphonies will be the least of my worries.

Wednesday, October 01, 2008

Light Internet usage

On Sunday I caught up with one of my sisters. After the inevitable exchange of news one of the hazards of being a computer nerd raised it's ugly head; would I look at her computer and maybe fix whatever it was that prevented her connecting to the internet?

So we proceeded to the study and waited while it booted. Given the age of the machine it booted surprisingly fast - no more than maybe 5 minutes! Then she clicked on the DUN (Dial Up Networking) icon and I listened for the familiar modem sounds. Not a sausage. Aha, thought I, either she hasn't turned the modem on or it's dead. But she swore black and blue she has no modem. I very much doubt my sister has perfected the art of using DUN without a modem and I was about to start tracing cables when we saw some messages logged in the progress window; it had connected and was validating. Ok, so the modem has no speaker or it's turned off; either way it's not worth the argument whether she has a modem or not. Sufficient unto the day that I know she has and she doesn't need to care.

Lo and behold, mystery solved, the validation failed with the usual message about user name or password not valid.

'I can't fix this; you need to contact your ISP and find out what's going on' said I.

She whipped out a piece of paper containing her username and password; the original paperwork from the ISP when she set the account up. She retyped the username and password and tried again. Nope, same error message and, from me, the same response.

Then I spied some interesting details on the sheet. At the time of writing it's just past midnight, Australian Eastern Standard Time, on October 2 2008. This receipt was dated November 1, 2003. And next to the date was the purchased number of hours; 200 hours. No, she hadn't bought any more hours. Indeed she was adamant that she couldn't have used up anywhere near 200 hours in the all but five years since initial purchase.

Now that's what I call light Internet usage!

Thursday, September 04, 2008

Infectious snobbery

My new job involves VB.Net code and some ASP.Net. It's going to involve a lot more ASP.Net in the future so it behooves me to learn it.

Uh huh, that's right, I was hired for the position without having the exact skills required. It's an exercise in optimism from my new employer, who is working on the idea that if I already have the necessary breadth of software development experience in Windows and c++ it shouldn't be too difficult to learn a new environment.

I have to say that's a very refreshing change from the usual attitude and one that I certainly appreciate.

Indeed, at the interview I wasn't even asked all that many technical questions. I can understand that; I always hate having to try and gauge a candidates real knowledge and experience in a mere hour.

My resume had included a link to my articles over on Codeproject[^] and my new boss remembered reading an article I'd written about using lex and yacc[^] (actually he mainly remembered it because I mention being a Kentucky Colonel[^] in my bio at the bottom of the page) so they had some real code I'd written available to read. I always knew those articles would pay off someday and they have; so far this job is great.

But back to VB.Net and ASP.Net. As hinted above, I don't have a lot of experience with either. Indeed, I wrote my first ever ASP.Net/VB.Net app last week, in half a day. Not much of an app but it fills a need and it's deployed for the one person in the world who needs it (not me). As for the VB.Net stuff, well, it's pretty easy to pick up. Some wierdness in the way one connects events and event handlers but for the most part it's a programming language. *shrug*

Last weekend I brought home a thick volume from the office library, something about business objects in VB.Net. I can't remember the full title but if it's about business objects you already know it's pretty dry stuff.

Sonya took one look at the VB.Net part of the title and said, in a tone of incredulity, 'VB????'

All those years of being a c++ snob have come back to haunt me. And it's not even entirely true; when one wants a quick proof of concept or, even better example, a COM testing host, it's hard to go past VB.

As for the future? We're going to be making a start on rev 2 of the app once I get back from Australia. I'm going to have to try very hard not to let years of c++ get in the way. After all, the ad I answered when applying for the job did express a preference for people who knew that languages other than those with .Net in the name existed.

I think the bottom line is that performance matters but so too do development cycles and maintainability/extensibility. Now there's a motherhood and apple pie statement for you!

Sunday, August 31, 2008

His'n'hers

I mentioned the other night that I was suffering from a violation of the golden rule[^].

I haven't entirely fallen though; we went out today and bought ourselves a pair of 22 inch widescreen LCD monitors. One for me and one for Sonya. It was always going to be an easier sell on buying a decent new monitor if Sonya also got one.

It feels like there's an acre of screen sitting in front of me now but I'm loving it. Sonya's having more difficulty getting used to it; she surfs the web more than I do and she notices just how much of the screen is wasted by most websites. I hadn't realised, until we got the new laptop, also widescreen, just how many websites don't take account of the target resolution. That's why I've changed the look of my blog, so it'll resize to account for your screen.

I swear that never again will I fail to test my own apps on odd screen resolutions. I used to limit the testing to 800 * 600 and assume it'd look ok on anything larger but I now know better.

I told Sonya that if she really didn't like the new screen she was welcome to choose another and I'd take the first one off her hands. I fear she's not falling for that one! But you have to try don't you.

Andrew's showing signs of envy; his CRT monitor looks distinctly old fashioned now. It probably didn't help when I said 'wow Andrew, look how small it is!'. But I'll end up paying for that sly dig; already Sonya's talking about giving him a new monitor for his birthday, which just happens to be 19 days away. Coincidentally, that's the same day that I fly to Australia. Not that I'm counting.

Thursday, August 28, 2008

I can't see the computer

I mentioned the other night[^] that Sonya has a new computer and that her old one will eventually become our home server. She was convinced, at the time, that she'd copied or archived everything she could possible want from it; I was equally convinced that she hadn't. Hence my caution about reformatting it.

It should not surprise you that I was right in this instance; I'm sure we've all made that mistake before. Thus I set the machine up with remote desktop enabled and all the drives fileshared. We're behind a NAT router so that's probably pretty safe (but remember, I'm not a system administrator[^]).

A couple of days later I took the machine down and moved it to the other side of the room while we worked out a better location for it. It's getting difficult to fit all the computers in! If we ever manage to move from this damn apartment to a real house I have a use for some of the extra closet space.

When I got home from the office that evening Sonya mentioned that she 'couldn't see' the old machine. Apparently another set of forgotten files needing copying.

'Strange' I said, 'I can see it perfectly well'. She looked puzzled, because I wasn't sitting at my computer. I pointed. She looked.

'Do you see any cables?'

Sheepish look.

'Oh'.

Now I know where Andrew inherited *his* sheepish looks from.

Monday, August 25, 2008

The Golden Rule

I've had a fair amount of success at sticking to the software developers golden rule; *never* ever have a better computer at the office than at home. I've even been known to knock back the offer of a faster machine at work because I didn't want to have to deal with having a lesser home system.

Of course, and I knew this beforehand, the new job has upped the ante. The computer hardware itself is nothing special; just a bog standard dual core with a couple of gigs of memory. Three of my four computers here have 4 gigs each; the fourth, Fatbastard, has a mere gig because he doesn't need more than that, all he does is record and playback TV.

Nope, the ante is that at the new job we all have dual monitors. Even the receptionist has dual monitors. I've never had that before and I fear some expenditure lies ahead. How fortunate that the prices of high resolution flat panel monitors have dropped as much as they have.

Bastards, bastards, everywhere

If you thought we'd gone overboard with six[^] cats you don't know the excesses we can rise to when it comes to computers.

When I left the last job (was it a mere two days ago?) I had to surrender the laptop. Not much of a loss; it was about four years old and weighed a lot more than I want to lug around airports. But we've become accustomed to having internet access when in hotels and it wasn't a hard sell to buy ourselves one. Indeed, my wife had to expend almost no effort at all to get me to agree!

So we're now the proud owners of a low end 17 inch widescreen laptop with dual core Athlon mobile and a bunch of memory and hard disk. Plus the inevitable DVD burner we'll never use as a burner. It weighs half what the old one did and I no longer find myself swearing sotto voce as I switch from notepad to web browser, waiting for the damn thing to catch up. Who knows, I might even start liking Vista! Even with Vista it feels plenty fast. Gotta admit, DVDs look damn good on it too!

Well one thing led to another over at Frys Electronics and we decided that as Sonya had not had a single upgrade on her main computer in four and a half years that maybe it was time to bring her into the modern world. Another dual core Athlon plus motherboard for the princely sum of $89 (plus tax) total. For a low end upgrade it certainly moves fast and the sad thing is her computer is now faster than my primary computer. My audio workstation is considerably faster though.

Now of course we're not going to scrap the old machine (we had a spare case and power supply sitting around so Sonya effectively has an entire new machine) so it's going to become our WHS (Windows Home Server) machine in a few weeks, once she's sure she's copied everything off that she could conceivably want.

So lemme see, counting the laptop we now have eight computers. Given that there are only three of us living here that seems a trifle excessive even to me.

Oh, the title of this post? I admit I may have gotten carried away with a wholesale renaming of my computers. We now have Fatbastard, the HTPC, Bigbastard, my audio workstation, Littlebastard my VS2008 development box, Robbastard, this machine and Bastardtogo. I'll let you guess which one that is.

Monday, May 19, 2008

'taint Lorraine, 'taint Lisa

nor is it Beatrice!

I really try and avoid the role of 'system administrator' at work. It's not my field though the boss stubbornly refuses to believe it. He sees a software developer, ergo he sees a computer expert and all computer experts are expert at everything about computers, right? Uh huh.

Nonetheless, as the only 'computer expert' at work, I'm called upon to do many admin tasks. Thankfully I've managed to keep it simple though I will never understand why the guy who set our network up decided to call the fileshare 'data-drum_2003' (not the real name but syntactically indentical). Since it's the only fileshare everyone uses why not simply call it 'data'? Likewise with the single shared printer in the office. Why not call it 'printer1', thus allowing for the possibility of a second or perhaps even a third printer? But nope, he decided to call it 'KyoceraM'. From which you could guess that it's a Kyocera printer. Well and good but there's a reason Windows allows arbitrary names. And the reason isn't to be obscure!

As I say, I try to keep it simple. I could change the share name or the printer name but then I'd have to update everyones computers. And users being users I could email them about the change with complete confidence that I was wasting my time and theirs. So we live with it.

Recently, as I wrote[^] a couple of weeks ago, I had to change our source code server. That server also happened to be our FTP server. Fortunately we don't have a lot of FTP activity going on and it was, frankly, far more important to me that I get our source code and history migrated than to get FTP services going again.

Having finally got the new subversion server set up and convinced myself that all the old sourcesafe history was still, well, safe, it was time to put the new machine on the public side of the network. Fortunately it's a Windows 2003 server machine with all the latest patches applied and it seems to be pretty well secured. Now go read the second paragraph of this entry. I'm NOT a network administrator (some would say I'm not a network administrators arsehole and they'd be right) but I've done what I know. I've run port scans against the public internet address and the only ports it finds open are the ports I expect (FTP, HTTPS and Remote Desktop).

I'm sure you've heard anecdotally what happens to a new machine exposed on the internet. One of the stats I've seen (whether I believe it is another matter) is that an unpatched Windows XP SP1 machine is supposedly completely compromised within 20 minutes of first exposure. Considering that it takes at least an hour, even on broadband, to download and install all the patches, you can see the problem. Thus daily malware, trojan horse, virus and rootkit scans on my new server.

On the inside I check the logs daily (though how long I'll do that is another matter). So far the only log showing any activity is the FTP log. Fascinating stuff. There's one persistent bastard, based in Japan going by the whois results on his IP, who's been trying for about 2 days to break in. His attempts are neither regular or fast enough to indicate a software based attack; he seems to be sitting at his computer typing password after password. Poor bastard will never succeed until he realises that I've renamed the system admin account AND the FTP user name list does not include Administrator. I reckon he must have a dictionary of western girls names because that's what he's been trying.

USER Administrator
PASS Lorraine
530 Login or password incorrect!
Disconnected

USER Administrator
PASS Lisa
530 Login or password incorrect!
Disconnected


I almost feel sorry for the poor bastard. But only almost; I've turned on autoban - 10 failed attempts and the IP is ignored for an hour. We shall see if he returns.

Monday, May 05, 2008

Subversion

I don't often write about programming matters. I used to, back in the early days of this blog, but even then I didn't write much about the act of programming so much as some of my thoughts about doing the job right. It's one thing to be able to write a correct for loop; it's another thing entirely to know when to!

Which isn't to say that I think I'm the be-all and end-all of software development; far from it. I still haven't embraced the .NET framework in the way that Microsoft would prefer. I still think in MFC terms though I'm trying to break out of that mould.

Until very recently we used Visual Source Safe (VSS from now on) at work. We had the necessary plumbing (written in .NET forsooth) to access it across the internet; a necessity at the time we installed it when I was shuttling back and forth between France, Dallas, The Philippines and Phoenix.

I've been using source code control in one form or another for more than 20 years, starting with RCS on Unix, PVCS on the PC and settling on VSS because it was effectively free (included with MSDN). I even wrote my own incarnation of RCS back in 1988, using a bunch of command line utilities and PKZip. It worked well if somewhat slowly. Then again, back in 1988 everything worked somewhat slowly!

Anyone who claims to be a software professional and who doesn't use *some* form of source code control is claiming above their station!

To be honest, my experience with VSS wasn't nearly as bad as most users claim. I've never lost a file; nor have I ever experienced datastore corruption. This could be because I've always worked either alone or in relatively small teams; it's entirely possible that I'd have hated VSS with a passion had I been working on a large team.

But recently we've had a few new projects crop up that, whilst based on our current codebase, are sufficiently different that it made sense to create branches. Up until then it was sufficient to label each release in the database.

VSS makes it harder than it needs to to do the branching thing. Creating a branch is easy enough, but merging the changes back into the trunk some time later is a real pain!

Cue Coding Horror[^] and an article on Subversion. I'd heard of it; maybe now it was time to suck it and see. While I thought about it our VSS server at the office died. Server is a grand title for the machine; at 9 years old it was getting more than long in the tooth and it was only a desktop machine anyway!

So I scrounged a three year old Dell Xeon server with RAID. I managed to resurrect our old server long enough to import the VSS database using a freeware tool found here[^]. This was very important to me; I wanted to have our entire history available, not just the source to the last full release we did.

The migration wasn't a smooth process; there were one or two projects that refused to migrate. How fortunate that both were so out of date that no one, including myself, knows what they were for! I haven't been here forever you know!

In the end I decided to keep a copy of the VSS database on the new machine as well, 'just in case'. I doubt I'll ever refer to it but it's only a couple of gigs.

On the client side I use TortoiseSVN[^]. Wow is all I can say.

Saturday, July 15, 2006

The Visual Studio 2005 launch

Even though I've pretty much lost interest in new releases of any development environment as such I still work in the industry and I do try to keep up with the news as it relates to my area of specialisation.

'Twasn't always so of course; I was one of the very first purchasers of Visual Basic 1 and I used to pay extortionate international dial up rates to download the latest release of Zortech C++ (both events of 1991).

I've been using Visual Studio since before it was even called that! Visual C in early 1992. MSVC in various versions, most long forgotten, including MFC 1.0 which, as I recall it, came on 20 floppies and took more than ten hours to install if you didn't have smartdrv installed. Installing smartdrv cut the install time to about 2 hours.

I attended the Phoenix VS2005 launch which happened the day after the product was officially released. A free event; all one had to do was register ahead of time, print out the form with a bar code and front up on the day.

I've never really enjoyed the Microsoft events; too much time to impart too little information. The bait that got me to go to the VS2005 launch was that they were giving away a full copy, not time limited, of VS2005 professional. Always nice to have the latest.

Microsoft have learned a thing or two over the years; at previous launches they'd give out the freebies first and then do the presentations; but not this time. If we wanted the freebie we had to sit through the entire lecture. Bite the arm off at the shoulder time!

So up I fronted, at a movie theatre complex over near the 101 on Indian School Road. Microsoft had booked two theatres for the day; one live, the other for the overflow crowd who would get to see the live theatre presentation on video.

Once we'd checked in we were each handed a coupon good for popcorn and a soft drink.

There are few sadder sights in the world than the sight of a thousand overweight bearded developers, each clutching a 46 ounce bucket of popcorn in one hand and a 16 ounce drink in the other!

Sunday, May 14, 2006

Adventures in ADL

ADL[^] is, of course, Adventure Definition Language, a freeware language you can use to write Adventure games similar to the Zork[^] series.

Zork was, if you've never seen the game, the best text game ever! None of those fancy graphics! The graphics were in your head as you read the text descriptions and built your own vision of the Great Underground Empire. A pretty good description of reading any novel of the last 500 years I'd reckon!

I have wonderful memories of playing Zork in the mid 80's; of spending hours trying various combinations of button pressing to solve the dam puzzle; of learning to save early and often! Thus a game teaches us survival patterns for the real world!

In 1987 the internet was a different place; there were no web sites. Everything was either ftp or gopher or usenet. I saw a post in an email about some new C program available on usenet, distributed as encoded chunks within the emails. As I remember, it was distributed as a bunch of ksh self describing scripts which, when run, created a source directory containing the source code. I still have the output of those scripts; it's part of my standard 'burn to DVD when rebuilding' sequence.

The program was ADL and I used it to write a game based on the characters I met at Hewlett Packard.

What game would be complete without a monster? My monster was the memory leak! My game included some examples of leaking source code and the solution to the puzzle was the repairing of the bug!

The game had a description of our office where each 'room' was a desk. One of the desks had a collection of Playboy magazines and if one of the characters, Theo, picked one up and went to the toilet the game would send me email. The surprising thing is that I received many more than one email from that source.

Since I didn't tie the action of taking a playboy to the dunny to a specfic user ID I suspect that Theo was much maligned!

Saturday, May 06, 2006

Corny jokes

Though, for a change, not mine!

When I worked on software at Hewlett Packard in 1989 it was on HPUX, their port of UNIX to their hardware. I was a pretty big fan of UNIX in those days and I still reckon the original architects had some great ideas. The idea of piping the output of one program into another is still breathtaking in the range of possibilities. A pity in some ways that they were also lazy typists; ls really doesn't leap out at the newbie as the obvious command to see what files you have!

There was one feature I really liked the first time I saw it and that was the core dump. It's a given that as a developer I'm going to make mistakes; it's also a given that the program is probably going to crash at the most inconvenient time and most likely when not running under the debugger. Having UNIX automatically create a core dump made it a lot easier to find the reason and fix it. In comparison, at the time MS-DOS had no such facility and it was hardly possible to implement it under a real mode operating system where no instruction could ever cause a protection exception. Instead we saw the system hang and most of the time not even the 3 finger salute (Ctrl Alt Delete) would work.

Core dumps were pretty frequent at the time I was on the team; we were moving from the initial 'hot frenzy' of coding into the stabilisation phase and it was usual to arrive at the office in the morning to find half a dozen or more core dumps per team member awaiting analysis from the overnight regression test runs.

Simon took the term literally. At lunch he'd eat an apple and, without fail, having finished the apple he'd drop the core in the bin and announce 'another core dump!'.

Boom boom!!!

Thursday, April 27, 2006

Shell games

Though not the pea under the thimble trick![^]

Nope, this is a trick I played on Cliff many years ago when we worked at Hewlett Packard Australia on a 4GL language product.

Our development system was a Unix box with character based terminals. Sometime after I left HP I visited some friends there and they'd advanced to using X Windows and I have to say that the idea of having wallpaper and icons in 1989 seemed pretty cool. Very few of us were serious about using Windows in 1989 - it was pretty much a toy operating system back then.

You could send a particular escape sequence to the terminal and it'd lock the keyboard. Send another escape sequence and it'd unlock. Being children in adult guise with high tech toys to play with, we frequently sent the lock escape sequence to /dev/ttyXX to lock up someones terminal. They'd type something, see that it didn't appear, look around, see the smirk and swear! Then we'd send the unlock sequence and work went on.

After a while that got boring. So I wrote a script that monitored the victims home directory. Every 60 seconds it'd check the length of the .kshhistory file (I may have the filename wrong) and if the file had changed it'd wait another 60 seconds and send the terminal lock sequence. Then it'd wait a random amount of time between 5 and 30 seconds and send the unlock sequence. The beauty of this scheme is that if the victim didn't run any shell commands nothing happened. If the victim did run the odd command the random time delay hid the relationship. It took the victim literally weeks to conclude that some bastard (ie, me) was running a script against them!

Need I even say that Cliff was the first victim?

The Hidden Gospel

Last night I mentioned Cliff, the born again Christian.

We were working on a 4GL system. Remember those? An idea whose time hasn't come and probably never will. But we were trying and our system had evolved into a 3 megabyte executable. This was 1987 and that was pretty big for the time; you couldn't possibly have had such a large executable on a PC without the overlay manager and if you had it would have run like a dog that died last week! If you didn't experience 1987 PC technology you don't know what you missed and you don't know what a bullet you dodged! :-)

Our system ran on Unix. One night we were working late trying to hit a deadline. I was working on my bit of the executable, Cliff on his, Simon on his and so on. We'd type 'make whatever' (I can't remember what the whatever was) and it'd invoke 'make' which did whatever steps were necessary to build the file. CS 101 stuff.

The problem was that our makes all failed. It was 10 PM and Cliff, the family man, had gone home. Simon and I investigated. Our makes failed because we had less than 3 megs of disk space left for the entire team.

So we ran the Unix 'du' utility (my memory may be a trifle vague about the exact commands but the result is accurate) and found a 10 meg shortfall between what was shown as free space and what was shown as disk usage. In 2006 when you can buy a 500 gig disk drive for less than US$300 a mere ten megs is nothing. Heck, that's barely enough space for a few minutes of audio in MP3 format!

Somehow I have a vision of a veteran of 1966 computers saying much the same thing about the resources we had available in 1987. Heck, when I was working (says the hypothetical 1966 veteran) 4K was more than enough to implement a complete symbol table. Doubtless 40 years from now our almost unimaginable 500 gig hard disk will be smaller than on chip cache!

Well, that's the past and the future and the now of 2006. In 1987 Simon and I had a 10 meg shortfall to explain that was seriously impeding our ability to meet the deadline!

We dug a little deeper and discovered that Cliff's 'du' and 'ls' totals exactly matched the 10 megs we were missing. Some headscratching as we looked at the listing of his home directory and then I noticed that he had 2 (count em, two) directories called . (dot). More head scratching as we tried to work out how on earth he could have two directories with the same name! The penny dropped. He had one called dot and one called dot space. A cd into dot space and the mystery was solved. He had the entirety of the bible stored there!

Well that fitted. We did an 'su' to root and deleted dot space and suddenly our builds completed.

Given that this was a violation of company policy something had to be done. Perhaps we chose the wrong 'to be done'. We modified the MOTD file (Message Of The Day file, the file that is displayed to Unix users when they log in) to advise that Cliff had found a way of hiding stuff.

The bastard ran his directory stuffup script on my home directory again. I hadn't remembered to modify the admin audit files to hide my tracks!

Wednesday, April 26, 2006

On the edge of a cliff

or should that be cliffhanger?

Quite some years ago I worked with a Born Again Christian by the name of Cliff. As you might imagine, given the rubbish I write, his born againness didn't overmuch impress me but I can live and let live. If someone wants to go overboard on their sincerity to the cause of Jesus I'm perfectly happy to let them, so long as they don't try and evangelise to me! Nope, let me correct that, so long as they don't try and evangelise period!

A difficult call; where is the line between mentioning enthusiasm for something and ramming it down your throat? I think the line is reached when the target of the evangelism starts exhibiting signs of terminal boredom or similar. By that measurement Cliff failed to notice.

Cliff was also afflicted with a lack of humour. Almost the most dour man I've ever met and as such, ripe for the teasing. So one afternoon I asked, almost casually...

'Hey Cliff, got any nude pictures of your wife?'

Stony glare and a curt 'no!'

'Wanna buy some?'

Boom boom!

But he got me good for that little prank. This was back in the days when I was working on Unix systems; thank god I've been able to move on to Windows. A much nicer environment. When I logged on to the system the next morning my home directory looked all wrong. It's a long time ago and I can no longer remember which files I should have seen; all I remember is that they weren't there; instead I had a bunch of single letter directories. Checking into a few of those revealed a lot more single letter directories. And so on, following the chain down. Eventually the penny dropped. He'd run a script, as root, against my home directory, which had taken every file and sub-directory, broken the names down character by character and created subdirectories. My files still existed, under random names, deep at the bottom of a very many layered subdirectory structure.

What a bastard! :-)

Sunday, April 09, 2006

BEEP is louder than beep

Back in the early 80's when I worked for Hewlett Packard I learned to program the HP9825A[^] Programmable Calculator. It was considerably more than a calculator though! If we installed the HPIB interface card and the I/O ROM we could use it to control test instruments and I remember writing more than one program to ease the effort of calibrating a spectrum analyser.

Indeed, if I remember rightly, the major market for the 9825A was the instrument control market.

The programming language it used was called HPL, which as far as I remember was a variation on APL though, given that I've never seen an APL program, that may be no more than faulty remembrance.

Like many specialised languages HPL had a bunch of machine specific keywords. The only one I remember is 'beep' which did exactly what the name would suggest; it beeped the machine. Unlike a great many machines of the period, it was possible to specify the pitch and duration of the beep and you could, if sufficiently misguided, write a program to play monophonic and monotonal tunes on the machine.

The keywords in the language were defiantly lower case; it would accept lines written in upper case, parse them and convert keywords to lower case.

One of my colleagues, Gary, fancied himself a musician and he became interested in the possibilities of the machine. Many a lunch hour he'd spend playing around with the beep statement. He wasn't a programmer so he asked me to explain some of the more subtle nuances of reading data arrays from mass storage so he could store his tunes.

After a while he became unhappy with the lack of control over the volume and he asked me how he could vary it.

'Piece of cake, mate' I said. 'If you type beep in lower case you get low volume, if you type BEEP you get loud and if you type Beep you get something in the middle'. Obviously I'm paraphrasing but it would take way too long to type out the whole conversation.

He was convinced and went off to lunchtime programming happy. It took him ages to realise that no matter what case you used when inputting a program the machine would always convert keywords to lower case!

Monday, March 06, 2006

Fingers crossed

but so far it works. The software I'm working on that is.

I made the deadline but only just; I was still running the installer builder and testing the installs at midnight Monday night my time. Well I was trying to test the installs but that's nearly impossible without virgin hardware. Unfortunately I have neither Virtual PC (or VMWare) here let alone the resources to run it so I had to resort to blowing away my product directory and registry key and then run the installer and see what happens. Fortunately we have a very limited audience for the software and better than 99% of the time the installer is really doing an upgrade.

It all looked good so I did a final build and went to bed. Today, Tuesday, it was crunch time. Front up with the new installer on a memory stick, install it on an oven and see what happens.

One of the things I wrote in January whilst here in the Philippines was a 'version switcher'. A utility that knows how to create a zipped backup of all the vital settings and files and can switch between version X and version Y. It would have been much easier to write if the filesystem was transacted but it isn't so we do it the hard way. The whole point being that if something goes wrong it will undo filesystem and registry changes and you end up with a consistent and workable installation. I may write a CodeProject article about it.

The version switcher (officially it's the Version Manager) has been an invaluable tool. In just a month it's saved my bum more than once. Strange then that some parts of management puzzled over whether the time I spent writing it would have been better spent on other things. My direct manager didn't puzzle; he understood instantly so I let him argue the point with the luddites. He's worth his weight in gold!

It turns out that so far I haven't needed to switch back to a previous version. But it's early days yet. There's an oven full of devices going through test as I write; tomorrow I get to deal with the backend folks who will find at least one thing to complain about.

Almost all the work I've done for the past month has been writing code to record things we never before needed to record. Major database revision and lots of new code to update records. Most galling to have someone in your face demanding to know why we didn't record that piece of data. 'Because we never needed to.' You're about as convinced as I am about how good that answer was. Yet it's true. We really didn't (and from our point of view still don't) need to know who started a session and who ended it. The backend folk do. So I had to add new code to capture and store that information. And much more information than that.

But the backend folk only care about the Philippines facility. They don't care about the facilities in Houston or Dallas or Hiji or Nice. I do. The new stuff that the Philippines are demanding is meaningless to the other locations. In my more mischevious moments I've thought of writing only to the Philippines demands and when the other locations complain about more steps blaming it on the Philippines.

But I really can't do that, tempting though the thought is. So we now have a new concept; production ovens and engineering ovens.

Did that satisfy the Philippines? If you reckon it did I have a great deal on bridges that you might be interested in!

'You mean that we have to run the configuration utility to set production for every oven?'

Uh huh. No matter that it's a one off setting that never needs to be revisited. I reckon these folk would complain if you hanged them with a new rope!

I'm definitely not being paid enough to do this job!

Monday, January 02, 2006

It's amazing

the difference half a gig of memory can make. You'll remember that I wrote[^] a while ago about the memory requirements of Visual Studio 2005. This weekend, having some extra cash in hand, including the $390 I need to make my US citizenship application, I decided it was time to upgrade to a gig of memory.

That was a saga in itself. I might have some extra cash but that doesn't mean I want to splash it around. So I did the usual internet searches for who might have the best prices. Surprisingly that honour went to Frys Electronics. We have two outlets here in Phoenix. One is near the office way down south of Scottsdale, the other is a fair distance to the west. Being that it was a weekend and I certainly had no desire to go anywhere near the office I chose to go to the one on Thunderbird near 35th Avenue. I should have known better. Not only is parking there a bastard this time of the year but they didn't have what I wanted in stock. The next best price they had was way more than I was prepared to spend. So off to Best Buy. I had no expectation that they'd have a competitive price and so it proved; about $260 for a gig of memory.

Cutting a long story short, the best price I could find for a gig of PC2100 memory (my motherboard doesn't need and can't use anything faster) was $126 at OfficeMax. Uh huh; the local office supply shop about 2 miles away.

Just think about that for a moment you younguns. $126 for a gig of memory. Time was (said the old fart who read about it somewhere) that IBM used to be able to charge $10,000 a month to rent 4K of memory. And people would pay it! Indeed, my first computer (1977) had 256 bytes of memory that cost me about $40. Of course, back in those days we used to work 25 hours a day down the coal mines and walk 8 hours each way to and from work uphill in both directions!!!

Anyway, in a gig of memory Visual Studio 2005 is a pleasure to use. Snappy and responsive and I haven't run into any of the bugs I see reported here or at CodeProject. I have, however, run across one of my own. I'm working on an ATL COM project where the original project was created in VS2005. Every so often it gets to the point where it won't let me add a new ATL object using the wizards, reporting that one can only add such to projects enabled for MFC or ATL At this point if I reboot, reopen the project and try the same steps it works.

*shrug* it's still a helluva lot better than it was a decade ago.

Wednesday, December 28, 2005

It's time

to say an almost reluctant goodbye to Visual Studio 6. Hard to believe I've been using it for nearly 8 years. Of course I'll be keeping the install CD's around; you never know when you might need it, but I doubt I'll be reinstalling it on any of my personal machines ever again. Unfortunately we still need to keep it around until we can find the time to port our company codebase to something a little less venerable. Until we can find the time? I doubt that's going to happen until it's time to create an entirely new product from scratch.

It's been a good friend, has VS6, though it held me off learning STL for quite a while. I prefer all my projects to build at warning level 4 with warnings converted to errors and the only way you could achieve that feat was by disabling zillions of warnings. I didn't want to do that because it would turn them off for my code too unless I peppered my source with literally thousands of

#pragma warning(push)
#pragma warning(disable xxxx)
.
. // STL call that triggered warning xxxx
.
#pragma warning(pop)

blocks. An alternative was to modify the STL headers to hide all those pragmas but it's an article of faith for me that one does not mess with the headers that come with the development environment. (Nor does one EVER recompile the MFC DLL's - that way madness lies).

I know I'll miss ClassWizard but, on the other hand, I've been switching back and forth between VS6 and VS.NET 2003 for at least two years so I know I'll cope :)

Rest in Peace, VS6.

Tuesday, November 22, 2005

They really meant it

when they said Visual Studio 2005 needs a gig of memory. I've been using VS6 since it was released way back in 1998 and VS.NET 2003 for about 2 years; they both work well on my system, which is a 3 and a bit year old dual Athlon MP with half a gig of memory. The IDEs run smoothly and I never wait more than a split second for em to notice that I've changed views. Indeed, VS6 positively screams on a dual proc 2GHz system.

Not so for VS2005. I like what I see; the problem is that I get to see it for far too long whilst waiting for the paging subsystem to catch up. Its slow enough in half a gig that I'm going to hold off on actually using VS2005 until I can afford to double the memory space. That's not as high in the financial queue as finding the US$390 for the citizenship application!

On the other hand I don't want to sound like a luddite. Visual C++ 1.5, when it came out, probably required resources beyond the average; I don't remember. I do recall that in those days 16 megs was high end and installing VS 1.5 from floppies (all 20 of them) took over eight hours if you hadn't had the foresight to install Smartdrive. Installing Smartdrive cut the install time to 2 hours!

My impatience at the performance of VS2005 in half a gig of memory merely tells me that it's time I added memory; I'm not, for the nonce, at the cutting edge!

Sometime in the early 90's the first Pentium machine arrived at Unisys Melbourne. I think it was a 60 MHz box. At the time we had a saleswoman, Sue Anne, on the team. Most unusual for those days. Some of the younger guys grabbed the new machine and ripped the covers off so they could gaze their fill on that purple ceramic wonder. No cooling fans need in those days!

I remember watching Sue Anne watching them crowing over the new processor. She was moving her hips back and forth in a deliberately suggestive manner, chanting "Pentium, Pentium". She knew I was watching. We laughed.