Wed, Jan. 11th, 2006, 10:49 am
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.
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.
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.
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 TestingCollapse )
This is working really well for me. Let me know if you give it a try or are doing something similar.
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.
(Crossposted to both jcfiala
, 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.
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. :)
*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).
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.
Well, I've been playing around with my new Linux installation. So far it mostly works fine, with a couple small oddities.
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.