Home

Wed, Jan. 11th, 2006, 10:49 am
Database Basics

Raymond Lewallen is a new name for me - I found his blog in CodeBetter.com's blogs, but he's got a great post on Database Normalization here that I should keep in mind whenever I'm working on a new table.

He's apparently doing a whole series of posts on Database Basics, so it's something to keep an eye on.

Tue, Dec. 20th, 2005, 01:25 pm
Rules of Debugging a CS problem

Having been woken up last night with a phone call about a problem at work, I realize thinking about it that there's two principles that I followed while fixing it.

1) Try it again.

Sometimes, something doesn't work because of momentary problems with networking, with resources, or rogue magnetic fields. Why not try it again and see if it works a second time? If you're doing this on a process that runs remotely, this can help if it fails again by letting you directly see error messages that may have been lost before. If this is something you're doing on your own computer, sometimes this is known as 'Reboot, and try again', although the necessity of that seems to have declined. I remember doing it a lot more at CSS than I have at my last two jobs. (Of course, that may more be a comment about how stable Windows 2000 or CSS's software was. :)

2) Don't assume the solution of the problem.

When I got called last night, the first thought I had (at 3:30 in the morning) was that it was due to the big change I had installed earlier that night. There were a lot of changed pieces, and it was possible that one of them could have caused the problem. But after thinking a moment, I realized that we should check other avenues as well - such as the tables that the failed process reads from. It turned out that the particular problem I was called on was caused by a different problem that I hadn't fixed. (And re-running that earlier step fixed the problem, letting me return to sleep.) If I hadn't taken a moment to consider alternatives, I could have spent a fair amount of time trying to solvethe problem better spent sleeping... heck, I might have been forced to get out of bed!

3) Check Versions.

This is sometimes a problem, and something to consider as well. What version is the problem code? Is it the version that should be there? Is there a mismatch in the system somewhere? It's important to make sure the code you think you're fixing is in fact the code at fault. And if nothing else, investigating versions gives you time to work out what's going on, and possibly, to wake up.

Thu, Dec. 15th, 2005, 04:00 pm
Too much Integration

Wow.

I've hit an annoying wall here at work. For what I assume to be security and backup reasons, our 'My Documents' folders aren't on our own drives, but are instead pointed to directories on another machine in the system. This is good in a number of ways - backups are done of this drive every night, so if you keep your work on that directory it's backed up for you.

But it also can be bad, as I'm seeing now. I can't work on anything in that directory, and the same machine has the Sourcesafe instance that I use, so it's difficult to work with anything that's in SS, such as VS.NET, without running into problems with it. But, luckily, I _can_ still work without a connection to Sourcesafe, so that's not too bad.

But that's our lesson for today, I think. Integration with other tools is good, but forced integration is bad. Because if part of the network, or one important machine, or lords what is preventing you from part of your system, the rest of it should work.

Fri, Dec. 9th, 2005, 12:13 pm
Unit Testing and SQL

I've recently started playing with Unit Testing and SQL Statements, particularly changes to stored procedures and triggers. A big problem with coding these is the same as with coding anything else (such as in Java and C#), things don't always work the way you think they will. Only you get the bonus extra problem of having shitty debugging tools.

SQL Unit Testing )

This is working really well for me. Let me know if you give it a try or are doing something similar.

Wed, Dec. 7th, 2005, 10:07 am
Microsoft Visual Studio: Rock the Launch

So, yesterday for my birthday I took off from work and attended Microsoft's big show in town: the Rock the Launch event, this time held in the Denver Convention Center. I was unimpressed by the event.

They had the usual free food, they had some fairly nice handouts, and it's nice to have a free copy of the Standard Edition software, but the presentations fell pretty flat. The keynote was largely a bore, I'm afraid (I spent the last half hour of it walking up by one of the doors to stay awake), and the two presentations I did attend seemed like pretty accurate retreads of the presentations they had in, oh, April or May when they did a big presentation on the Beta 2 of the same software. It was all new and exciting now, but on repeat it was pretty slow and boring. Plus, a lot of the presentations feel like a) talk up exciting new things, b) start working on code, c) copy big blocks of pre-made code into the project, and d) voila! Only, sometimes it was more exciting because the 'voila' wouldn't work. *roll eyes*

There was a lot of vendors of different sorts at the event, but they seemed to be there more to talk to decision makers at the companies than developers like myself. I'm not going to buy 20 servers from HP, I'm not going to hire five temp programmers from Robert Half, and I don't need a business process analysis. The one manufacturer's booth that was important to us programmers was the one for Microsoft Learning/Publishing, which had a bunch of .NET 2.0 books on display for people to flip through, and which had (by lunchtime) run out of fliers. (To be fair there were also a number of booths for the local user groups, which were interesting but I'm already aware of them.)

I picked up my free stuff and my software and left early. Then, I tried installing the (currently free) express editions on my laptop, and the SQL Server Express still won't work right on my laptop. Oh, well, more practice with MySQL, I guess.

Mon, Nov. 14th, 2005, 11:59 am
Graphical Dungeons

(Crossposted to both [info]jcfiala and [info]fiala_tech, as it pertains to both.)

It's interesting, playing Final Fantasy Online recently. It reminds me of when I was back in college, and really getting into MUDs, particulary the TinyMUD variety, which had recently just been created.

For those of you who are scratching your head, let's go off into that for a moment. A 'MUD' is short for Multi User Dungeon - they started out as adventure games, where you'ld encounter monsters, fight them, kill them, gain experience and gold, and so forth. All in text, and after a while you'ld raise up in level to become a Wizard, which would then allow you to create an area of your own, which other people could come into and adventure. There's a variety of different types of this, but sooner or later James Aspnes created the first TinyMUD - so named because the theory was that you could put it up after a week of coding, leave it up for a month, and then dispose of it when everyone became bored of it. It became more of a social environment than a combative one, not having any integral combat mechanics. Anyone could build parts of the world, but only if they gathered up enough pennies - which you got by solving puzzles other people had constructed, retrieving treasure objects (which had a number of pennies invested in their creation), and then sacrificing the object to get the reward. Once you had enough pennies, you could use them to create puzzle areas and homes of your own.

Eventually the puzzle-building part of the MUD went away, and the socializing and roleplaying took over, and the next several years showed various expansions of MUDS into different types of programmable objects and systems. All text-based, and a lot of fun. (As is partially shown by my GPA at the time.) These days it's rare to need pennies to construct an area to live in on a MUD - instead, there's usually a quota system limiting the number of objects you can make.

Anyway, I remember sitting around with some fellow MUDding enthusiasts back then (1990?), and commenting about graphical MUDS - we agreed that it would be vary difficult - I think we were thinking of static rooms, with standard descriptions/pictures that would be stored locally and called up by text - this was way before the current wide open broadband rates. Back then, it was all modems and local networks.

And now we've got MMORPGs - basically, the original combat MUDs all over again. You create a character, outfit it, and then go out into dangerous areas to beat up monsters and solve puzzles to gain gold and xp. So far (as far as I know) you can't create your own areas inside of a MMORPG for other people to enjoy, but who knows? One part of FF Online is the home room, which you can buy furniture for, which both gives you more storage for items, but also can give you 'feng shui'-like benefits. You even organize the items in your room, including putting things on top of other things.

I think we might see a more social/intractive building environment game, and I think it really could take off. A combination of the adventure/questing background, as well as the ability to change the world, and move it in a different direction. It's really just a question of who does it.

Mon, Nov. 7th, 2005, 08:41 am
More on Refactoring

It's been a while since I've read Fowler's book on Refactoring, and I found some of the points from the book, particularly the different types of refactorings, fading from memory. What I really need is a Refactoring Pocket Guide, like the handy little books that O'Reilly prints. (I found their Linux Pocket Guide particularly useful for finding a quick reference for what command I need. It may not explain it totally, but when I'm trying to remember the command to check the spelling of something, it's helpful to pick up and see.)

So, there isn't one. So I'm writing one for myself. There's a lot of different refactorings available in Fowler's book, and once I've got those all down I think I'm going to look around and see what else I can find. I may also start looking into SQL refactorings - there's different ways of doing things in SQL, and some of them can be quite useful. (Technically, adding a new index to a table is a SQL refactoring. The database effectively works the same - but now it works faster.)

I just need to not be distracted so much by Final Fantasy Online. :)

Sun, Oct. 30th, 2005, 10:29 pm
John sells out for VistaDB!

*grin* I'm interested in .NET programming, and I'm interested in databases, so this caught my eye. Basically, I try to help raise the word of mouth on VistaDB, and I might get a free copy.

VistaDB 2.1 database for .NET has been released
This 2.1 update includes over 60 improvements, including new support for .NET 2.0 and Visual Studio .NET 2005. VistaDB is a small-footprint, embedded SQL database alternative to Jet/Access, MSDE and SQL Server Express 2005 that enables developers to build .NET 1.1 and .NET 2.0 applications. Features SQL-92 support, small 500KB embedded footprint, free 2-User VistaDB Server for remote TCP/IP data access, royalty free distribution for both embedded and server, Copy 'n Go! deployment, managed ADO.NET Provider, data management and data migration tools. Free trial is available for download.
- Learn more about VistaDB
- Repost this to your blog and receive a FREE copy of VistaDB 2.1!

I don't know if I'm big enough to be worth a copy, but I'm willing to try. This is going through the blogging community, and I'm always willing to try out a new database other than SQL 200x (which I've been getting in various flavors from Microsoft) and MySQL (which we all know is free).

Fri, Oct. 28th, 2005, 11:16 am
Linux apt-get problem fixed

Well, I dived into my first hand-jiggering with Linux the other day, when I sat down and worked out the problem with the apt-get. It turns out that something was failing while some scripts were being run as part of removing these items. I basically had to read through the scripts, making sure that what they wanted to do was more or less done, and then put 'exit 0' at the top of them so that the scripts would effectively be skipped. That let me eventually get them cleared out.

I may later on try to re-install them later, but right now I'm having fun with Ruby. I don't know what about working in Linux has me working on Ruby as well, but I'm not worried about it. It's interesting, it's new, and I'm having fun, so I'll keep at it.

I'm experimenting - seeing how long I can just leave that computer running without needing to shut it down or reboot it. So far it's coming along very well, which is cool.

Mon, Oct. 24th, 2005, 07:30 pm
Odd errors in Xandros Linux

Well, I've been playing around with my new Linux installation. So far it mostly works fine, with a couple small oddities.

1) One problem is that gmail works verrry slowly in Firefox. I suspect the javascript is having trouble with the slow processor. But, I can use gmail through either another browser (which doesn't use javascript and isn't as pretty, but works) or just run it on my windows machine.

2) I've got something odd stuck for libapache-mod-perl and libapache-mod-php4. Whenever I install anything else with my machine, I get errors complaining about installing these two packages, even though I'm not trying to install them! Ah, well. Whatever I do want to install does get installed just fine, though - I just installed irb (interactive ruby) and am playing around with it fine.

Also picked up the 'Linux Pocket Guide' during the weekend. It says it's mostly for Fedora Linux, but I think it mostly applies to debian flavors as well, and it's a nice small book to carry around, in comparison to any of my other Linux books.

Mon, Oct. 17th, 2005, 08:52 am
Linux now working

Well, I've finally gotten Linux working, done some hardware work, and am generally very pleased with myself.

A few jobs ago they used to occasionally sell old computers they weren't using anymore. They'd fallen a bit behind the curve to be developer machines and got moved back to be a server, and now they'd fallen too far behind to be a server. So they'd sell them (often for $20-$40 bucks) and write the rest off as a loss.

I'd gotten one, and kept it. I'd tried to transplant some parts into this IBM laptop-with-dock that I'd gotten for cheap, but unfortunately I hadn't managed to get that to work, and the whole mess had laid in the back room. (Apparently one of the cats pissed on it, showing their disdain for the IBM architecture. Or at least, for things left unloved in the back.) And then I got these free books on Linux...

So, I dragged it from the back, cleaned it up, and started hooking things up to it. The hard drive had been completely wiped - undoubtedly required by the licensing of whatever variety of windows we had been using - and so I got the Xandros Linux disc that came in the back of one of the Linux books (Linux Made Easy), and let it go to work.

It works pretty well. It's got about 256 MB of ram at the moment - I replaced one of the RAM chips this weekend, to see if it would take a 128 MB chip, and it's got the 20 GB drive that it wants to use. (I tried to fit a 40 GB drive we had laying around, but that didn't want to work.) This being Linux, I've installed a bunch of programs, and I still have only used about 2 GB or so.

Xandros is damn easy, by the way. Stick the CD into the drive and it sets everything up for you. It autodetected and used my hard disc, my networking card, my monitor, my mouse, and my keyboard without any trouble. It pre-installs a bunch of helpful programs for you to use on the first go, and it's got this downloading program that lets you install a bunch more by just clicking. A little work on making it prettier here and there, and I really don't know why this couldn't go big for other users.

I also found this absolutely cool switch-box for the monitor, mouse, and keyboard. You plug the three of them into this little box smaller than a deck of cards, and it's got wires that snake out to both machines. Then I just have to hit Scroll Lock twice to flip from one machine to the other - which saves me a ton of wires.

Thu, Oct. 6th, 2005, 02:33 pm
Fun with Linux

Well, like I said in my last entry, I've been pretty interested in Linux since I got my load of delicious books from No Starch. I've been clearing some room in my desktop computer to set it up as a dual boot, but I'm not sure yet which distro to use. So, I've been doing a little shopping around.

There's this thing called a Live CD, which basically is an operating system burned onto a bootable CD or DVD. You reboot your computer, slip this CD into the slot, and instead of paying attention to the usual Windows information on the hard drive, it works off of the boot disc. All the fun of Linux, without any of the headaches.

So far I've only tried two of them. Knoppix I've played with a little now - I got myself a DVD burner the other weekend, and so I downloaded the big DVD version of Knoppix. What you end up with is a crazy array of interesting programs to play with, although I haven't set it up yet so I can save the things I try out. I've also downloaded Ubuntu Linux, a distrobution which is useable both to install onto your machine and which runs as a Live CD.

I'll probably try out a few more - why not? It's just about free, it's pretty easy to use, and it works fine. The only possible problem is that it's difficult to get one of the pre-set Linuxes to work with wireless that isn't working through a PCMCIA card - so although i was able to boot my laptop with it, I wasn't able to talk to the network. Luckily my desk computer is wired into the network, so that's not a problem.

Fun!

Wed, Sep. 14th, 2005, 01:44 pm
Free books!

Things happen in the oddest ways.

A while back I came across a notice on a lego board I sometimes frequent (www.lugnet.com). He was looking for people to read over and make suggestions on a manuscript which became 'The Unofficial LEGO Builder's Guide'. It was interesting and fun, and along the way I got $200 in credit for No Starch Books.

I like No Starch - they do good books. I absolutely adore the Web Programmer's Desk Reference, and I've been reading bits and pieces of their Steal This Computer Book 3. I got some good stuff, but what I'm currently reading and admiring is Linux Made Easy, a fantastic book about installing Xandros 3 Linux onto your machine. It comes with everything you need to install it on the disk included, and this distro is apparently built with an eye for being instantly useable by Windows users.

I'm looking forward to trying it out, and then maybe picking up a cheap PC for my 'sister' Trixii and letting her enjoy it. She doesn't need much in a computer, really, and it looks like this will be more than she'll need.

Wed, Jul. 27th, 2005, 11:42 am
Everything I know about Programming...

Browsing the blogs today, i came across this entry by a chap named Christopher Diggins.

Basically, he puts fourth four things he knows about programming - four fundemental truths.

  • code will change

  • code is harder to read than to write

  • if you haven't tested it, it's probably wrong

  • it will take twice as long as you think



Another one I'd put forth is 'The first version of anything you write will change before it's released.' That's true for most non-trivial code, I've found. I'll make a first version, get it settled in, and then later on, I'll have to change it.

And that's fine - I figure I have to anyway. If I try to anticipate everything that I might do, I spend far too long at it. Best to get down a first idea of what's supposed to happen, and then once that's working, I work in the changes that are necessary to fit in any other or new functionality it's got to have.

That reminds me of the Refactoring book, that I finished reading last month and keep meaning to review. (Not that it specificly needs a review. It's been out for a few years, it's truths are still very true, and I think just about everyone has commented on it.) The whole idea of the Refactoring book can be summarized as: your code changes as time goes on, and it helps to have little changes you can make to that code so that it does the same thing, but in an easier to understand and easier to modify way.

Same function - different form.

It's something I'd been doing for years, really. I'd never known there was a name for it - never knew there was a whole growing library of information on how these things worked. I just did it - and in Visual Basic, too. Running into a former co-worker after I left CSS, I was told he knew when he was reading code I'd worked on - because each function was smaller than a page. I rather liked that.

I guess I've been agile for years. Just - no one *told* me.

(and now I get to be agile with unit tests. And I loooove the unit tests.)

Tue, Jul. 26th, 2005, 11:37 am
Agile - July meeting

This month the Agile Denver group met at the Agile 2005 conference that's happening here in Denver. It's a shame I can't attend the conference - but we don't have the money, and I'm on a project where I can't spare a week off. But it looks like a fun time.

The session was a talk by Tim Lister, who gave a great talk about things we still don't talk about. It was largely a laid back talk, and quite fun to listen to.

Man... I really wish I could attend the rest.

Tue, Jul. 19th, 2005, 08:08 pm
Ron Jeffries - "Why Software Development is Easy"

Last month, at the Denver Agile meeting, we had the pleasure of having Ron Jeffries there to discuss with us on the topic "Why Sofware Development is Easy". I thought it was a really interesting talk, and franticly took notes. For my benefit, I've transcribed them - but you're welcome to peek at my notes. Keep in mind that these are the rough notes I scribbled down - although I've done my best to make them make sense, they may only make sense to me.

But hey - it's good to share.

My Notes )

Wed, Jul. 13th, 2005, 01:00 pm
Whoo! Finished a book!

For the last couple of months I've been slowly working my way through 'Refactoring: Improving the Design of Existing Code' by Martin Fowler. It's good stuff, written for a Java audience, but I know enough Java that I don't have any problem reading it, and a lot of it applies to C# fairly easily anyway.

I'm probably going to work up a review of it later, but I found it to be a fantastic book.

Next I'm either going to read the C# socket programming book I found the other day, or 'Java after Work', which I picked up on Monday. JaW is interesting - a series of non-trivial Java example programs that do fun things - the first (and simplist) is a Java aquarium, the next after that is a simple hockey game. They're programs you probably wouldn't ever do at work, but using principles that you might use. (For instance, the Aquarium is a good introduction to Java Threading.) I'm quite happy with it.

Wed, Jul. 13th, 2005, 08:37 am
Mandelbrot Sets

Well, I've been quiet for a while. I was gone for a week on vacation (which did not go very well) and since then I've been catching up on the newsletter for DASFA. But while I was on vacation, I read a very interesting Arthur C. Clarke book called 'The Ghost of the Grand Banks'. A lot of it has to do with raising the Titantic, but a few of the characters are obsessed with generating Mandelbrot Sets. I decided to look into writing a program to calculate them when I got home.

And what do we have? A contest to program a Mandelbrot Set Generator! That's got to be some sort of sign, hm? It's being run by APress, and first prize is a Sony PSP, and the two smaller ones are iPod Shuffles. So, here's hoping, and good luck to you if you decide to join in.

Fri, Jul. 1st, 2005, 08:53 am
Unit Testing - a Hint

Well, this thing that's kept me busy all week is a complex bit of billing that's a completely new component. As such, I had a pretty open choice in how to develop it - so I've been using C#, and using NUnit to do unit tests. This has been incredibly useful - if I hadn't been, I might have been 'farther along' in getting code written, but it wouldn't be nearly as good as what I've got.

But here's a hint - if you're going to do a really complex test, with things starting and ending here and there... it's important to make sure that your test is written properly. Oy! I think I spent two hours on this one test, and the reason it's failed is a little embarassing - adding the wrong component to the wrong collection... Oh, well.

But now that I've got the test working properly, and my code is reporting the numbers my spreadsheet suggests, I'm very confident in my code's ability to work. So I feel good!

Wed, Jun. 29th, 2005, 11:57 am
Very, very quiet...

I'm really burning the hours up trying to get something done for work, so I'm not likely to comment much more here. I'm leaving next week to go on vacation for a week, so I don't know if I'll be able to post much then, either. (I plan to take my laptop and some books along, but there doesn't seem to be a lot of wireless access where I'm going!)

I'll try to come up with something interesting later :)

20 most recent