MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.

As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.

x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Friday, January 30, 2004

Potentially okay free hex editor:

frhed Homepage: Frhed is my free binary file editor for Windows 95/98/NT

posted by ruffin at 1/30/2004 10:26:00 AM
Thursday, January 29, 2004



Netbeans is a hack. A nice, full-featured, well-meaning, relatively useful hack, but not exactly clean around the edges. IDE Score -- IBM: 1, Sun: 0, Apple: -1.

posted by ruffin at 1/29/2004 04:53:00 PM
Wednesday, January 28, 2004

MacInstruct: Networking 101

posted by ruffin at 1/28/2004 09:20:00 PM

Config options for Dell laptops have a neat new set-up for productivity software.

Productivity Pack including WordPerfect and Money

Microsoft Office Basic Edition 2003 [add $139 or $3/month1]


Finally. Office isn't the pack-in. That has to help keep the price down, and should also help with the .doc near monopoly.

posted by ruffin at 1/28/2004 07:04:00 PM



This explains why software development goes so awry in one quick sentence.

Because 70 percent of the cost of developing software is attributable to personnel costs, the skills, experience, and work habits of engineers largely determine the results of the software development process.

Why is that so helpful?

First -- it explains why so many managers -- and programmers! -- have unrealistic expectations on why what should happen by when in your applications. There's really nothing to "wait on" when it comes to hacking. The raw materials are all there. If you're good, you can build the largest "building" quickly. If you're not, it may never get done. If you're average, it might take you quite a while -- or not!

But it's not even that simple. Coders have good days and bad, flashes of insight and problems that will approximate arch-enemies. Remember that SAT math question where it took you seemingly forever to answer, but once it came to you what the "trick" was, you couldn't believe it'd taken you that long? What about the question you never got (on the SAT or elsewhere if you banged that test out)? Insight blocks happen when you're hacking too, and they make it difficult to schedule & estimate projects.

It's not like the truck's late or the shipment's delayed or the weather's too rainy to pour the foundation. The raw materials are there as soon as you have a laptop and a net connection. But, strangely, that doesn't mean you don't have to wait for your metaphorical ship to come in. It's hard enough to estimate how long a construction project will take, and that's often much more tangible. No wonder software projects have a reputation of being impossible to accurately estimate.

posted by ruffin at 1/28/2004 10:54:00 AM
Tuesday, January 27, 2004

All you needed to know about CLOB fields in Oracle and JDBC (and probably then some for most of youse).

posted by ruffin at 1/27/2004 05:35:00 PM



How to create the equivalent of a "database" in SQL Server (a tablespace -- at least I think that's what I'm doing) in Oracle:

CREATE TABLESPACE "SMACK"
     LOGGING
     DATAFILE 'C:\ORACLE\ORADATA\INSTANCE\SMACK.ora' SIZE 5M
     EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

posted by ruffin at 1/27/2004 02:46:00 PM



Why Notepad on Windows Server 2003 hasn't yet figured out how to deal with 0D 0A versus 0A 0D or simply 0D line endings, I'm not sure. You'd think Microsoft could invest the $1000 of resources required to handle that to the project.

posted by ruffin at 1/27/2004 12:34:00 PM
Thursday, January 22, 2004



Exit interview hint (not that I'm having one soon, at least that I know about):

Many people will tell you to be completely positive as you leave. This, overall, is a very very good piece of advice. Focus on the good things that happened there. Remember, pointing out all that's wrong now will only leave a bad taste in the mouth of your soon-to-be-ex-employeer. You're no longer around to provide context for these issues, to back up what you think. Instead, you'll have given criticism without construction, so to speak, which makes for nothing but a complaint. They were paying you to point out what was wrong before. Now, you're going somewhere else, and it's time to play the ritual.

Now all that in mind, I think the exit interview allows you a great opportunity, if you do really care about where you work[-ed], to put *one* piece of constructive criticism on the table. It must be well-thought out, you must be as concise as possible, and you must not, under any circumstances, start debating particulars. You'll find many managers will be somewhat surprised that you'd mention a problem and quick to characterize it as a parting shot. Instead of getting bogged down in particulars (though you should have quite a few examples in your head) where your ex-manager can nitpick and feel the problem doesn't exist, simply use your bowing off the stage as an opportunity to broach the subject, blazing the most difficult part of the trail -- the trailhead -- for those who might voice the same concern in the future. Hopefully that future response won't be, "You''re missing the mark," but instead will be, "Ah yes, [ex-employee 14423] mentioned that as well. And here's someone else who believes the same thing. Perhaps I should deal with it."

You'll become somewhat symbollic with this sort of parting gesture, and that's a good thing. Keep it positive, short, and constructive, without example (as anti-intuitive as that seems), and keep the rest of the exit interview horribly upbeat.

posted by ruffin at 1/22/2004 11:57:00 AM



We recently had a customer decide, while we were on site for an installation, to change the names of all the fields in our database. Unfortunately we were using, at best, a two-tiered approach, which meant going through all our jsp pages and changing every place we referred to a field name. Okay, okay, admittedly much of the issue was in the coding practice, but we'd been contracted for a bare-bones site with a minimum of development time. 1-2 tiers are all you get.

The issue here is that a small change like that can mean hours and hours more development time. And the lesson doesn't stop there -- poorly crafted objects from 3rd party developers mean the same sort of thing. I'm using ESRI's ArcObjects on a current project, and the things are horribly convoluted and often buggy. Things aren't straightforward, and though there often seem like there are many potential solutions to an issue, often only one route actually works properly (if any at all). It's all about finding workarounds.

What does this tell me? Easy -- that ESRI released their objects before they were ready to be used for enterprise level applications. And not taking the extra month or year on their end to clean up is collectively costing the companies that try to take the objects and make customizations years and years, if not decades, of extra wo/manpower similar to what the on-site dba did for our jsp pages.

posted by ruffin at 1/22/2004 10:15:00 AM



It's absolutely irresponsible for msnbc to have stories that don't render properly in Firebird/Mozilla. I believe this is just as good a reason to file suit against MS as any other, and I don't mean that lightly. What other news site requires IE to read simple stories? I imagine it probably works in Opera or some such, and MS thinks they have an out that way. Or perhaps it doesn't -- in any event, it's absolutely insane that such a large arm of two even larger corporations can't make html that works cross-browser, and I'm going to go postal -- maybe even Howard Dean-al -- on this one. (Okay, maybe not, but it sounds aggravated, and that's the message here. This should be illegal.)

So msnbc requires IE to view some pages, IE to watch any video, and even the freakin' buttons for voting don't work in Firebird when the rest of an msnbc page does. You mean msnbc web hackers can't figure out how to work radio buttons and html forms the way the w3c tells them to? *stew* This is *definitely* on purpose. You'd have to go out of your way to hack like this. Might come back to "uplevel" and "downlevel" browsers in .NET, which .NET decides that only uplevel browsers will be offered the full functionality of certain widgets, and "uplevel" conveniently only contains IE among its ranks.

This needs to stop.

posted by ruffin at 1/22/2004 09:38:00 AM
Friday, January 16, 2004



Just saw a big ole black dog walking down the street by himself across the street outside the office window. Naturally he stopped to mark an old tire sitting out by the trash can. That was humourous enough to me for some reason (as the dog, acting very independant and person-like, quickly undercuts that appearance by urinating in the street), but as he walked off I noticed another large piece of trash that was on the ground directly behind him he'd obscured earlier. Yep. A toilet.

How does that have anything to do with computer science? Urm... No matter how wonderful your UI, somebody's still going to miss the point. When you're shipping a shrinkwrapped app (or even a downloaded, end-user, client-app), keep in mind *those* people are in your market too. Not just computer-savvy users like you -- there are also people that would rather pee on a tire than into a toilet.

Good save?

posted by ruffin at 1/16/2004 11:07:00 AM
Thursday, January 15, 2004



GPL robs a commercial programmer of their most important asset -- a code toolbox to which they own every right. That's why I like Public Domain, BSD, MPL, SPL, or even the LGPL an order of magnitude more than the GPL.

posted by ruffin at 1/15/2004 01:24:00 PM

I've heard a lot of issues with the iPods' batteries. I realize this won't work with the original model (nor the new Minis), but if you've got a dock, what's the issue?

The Belkin Battery Pac keeps the music playing by letting you power your iPod device with replaceable batteries - even when your internal battery is drained. ... The Battery Pack uses four standard 'AA' alkaline batteries that you can simply replace when the charge is gone.

$59, one time. Then AA's forever.

I've heard similar complaints about the Game Boy Advance SP, which doesn't use standard batteries, and hope something like this comes out relatively soon for it as well.

This seems like a barely related entry until you think of what it means when it comes to standards. Hey, proprietary is great when it doesn't incur extra cost to the customer. But as soon as you've got tie in, I've got a problem with you. The best job security should be given to those whose work is good enough they don't require any. Make code that anyone can access, extend, maintain and you'll find, more often than not, you're the one doing it (which, in this context, is a good thing).

That said, I just ordered The Psychology of Computer Programming from AbeBooks for $10, to see what's what with egoless programming. Pubbed in 1971 originally, no less. Sheesh.

posted by ruffin at 1/15/2004 11:26:00 AM
Wednesday, January 14, 2004

Thank heavens. I think that's what my 1400 needed

Running out of options, I went to Apple Appleโ€™s Older Software Downloads site,+ and found a disk image for an OS 8.1 Disk tools disk (Macintosh/System/Mac_OS_8.1_Update/Disk_Tools_PPC.img.bin).

posted by ruffin at 1/14/2004 09:25:00 PM

A little case in point on the issue I was dealing with just a minute earlier, today.

DOM-Compliant Validator Controls
by Steven A Smith

Paul Glavich has written a set of validation controls that have better compliance with the DOM than the packaged validators that ship with ASP.NET...

posted by ruffin at 1/14/2004 09:44:00 AM

Here's an interesting reply from the moderator of the "AspNetAnyQuestionIsOk" list at yahoogroups:

Subject: Re: Question on the Display of an ASP.NET Page
From: "Charles M. Carroll"
Date: 14 Jan 2004 10:35:50 -0000

http://developer.apple.com/internet/bestwebdev.html
is a great reference on such matters.

At 02:06 PM 1/13/2004, you wrote:
>Hi All,
>How can we prevent the controls and fonts in a page to be the same
>for all the browsers. I created a page. But the same page appears a
>little differently in another browser. How to stop these floating
>fonts in a page. The fonts are coming out of the Label when viewed in
>a different browser.


Hrm. Apple has the best reference on making crossplatform code? Surprising. Not today's answer to Webmonkey (which used to be awfully good) or some set of Netscape pages, but Apple.

But after looking at the pages, sure enough, all the references are there. Actually an awfully useful page.

The second issue that the thread on the list raises is that .NET is, as I've noted/predicted/whatever, bringing people to the net who don't have html skills. .NET's web controls make for very nice looking GUIs in specific versions of IE on Windows, but after you reach a certain point, all bets are off. And .NET doesn't give a net-newbie the tools to make things right. Kinda like all those ADO wizards in VB6 that hid so much from you that, as soon as something wasn't quite right, you were left starting from scratch. (As a quick aside, those issues seem to be fixed. Data binding controls, at least in Windows.Forms, is very straightforward now and includes hooks all over the place to grab as low-level an object as you'd care to, for the most part.)

And, of course, the third issue raise is why The Digest Handler isn't parsing up the individual emails quite right, often making the quoted reply an entry of its own. This is a known bug, and some slack company needs to get off of its slack arse and get that bug fixed. Were said company's employees all not employed elsewhere as well, I feel confident that said bug wouldn't exist. I'm also relatively confident that said employees' families, were said employees to have dropped their other jobs, would be very very hungry right now.

posted by ruffin at 1/14/2004 09:41:00 AM
Tuesday, January 13, 2004

About the Monkeybread Realbasic Plugin:

This plugin adds around 6000 functions, methods and classes to REALbasic.
Having grown over the last two years this plugin covers these main features:

* Added plugin parts to control HASP and Rockey dongles.
* DNS Resolution on Mac OS X (low level and high level).
* WebKit can be used to show websites.

posted by ruffin at 1/13/2004 02:57:00 PM



Nice silly waste o' time.



Though I'm not a huge Adams fan, I suppose the description is fairly close. Dang it. ;^)

posted by ruffin at 1/13/2004 11:03:00 AM
Saturday, January 10, 2004

My Powerbook 1400 (the "hobby" box) has had a lot of trouble since I've upgraded the processor. Could be any number of things going wrong, not the least suspicious is the hard drive. So I decided to back all 775 megs of it (wow! ;^D) up onto my iMac.

Now that's still a decent amount of data, and when you need to preserve the Mac specific resource fork (each file has two "forks", the traditional "data fork" (on Linux & Windows, that's all there is) and the resource fork that gets lost over plain jane ftp, etc), that means one thing -- Appletalk. And I'm networking the PB1400 with an 802.11b PCMCIA card. I wasn't hopeful.

Turns out, an hour later, everything over from PB1400 to iMac, no problem at all! I've been impressed with Appletalk since its inception. It's a rock solid networking protocol, and I've never had an issue with Apple's excellent implementations of it, from OS 6 on up, iirc. (WinNT, otoh...) Glad to see it's still supported in OS X. Now, to drop yet MORE hours into this danged 1400.

posted by ruffin at 1/10/2004 09:00:00 PM
Friday, January 09, 2004

Google Groups: View Thread "HOW TO? Change location of working folder for all pr..."

posted by ruffin at 1/09/2004 02:40:00 PM

I wondered how long it'd take this to happen...

The wireless broadcasts arrive on a thin slice of the FM radio band that Microsoft calls DirectBand (but should, of course, have called WatchBand). It's brought to you by local FM radio stations paid by Microsoft.

Let's face it, there's all sorts of infrastructure for getting one-way data out. It's about time somebody took convential transmitters and made 'em digital.

posted by ruffin at 1/09/2004 12:33:00 PM

The default dark blue text highlight color in Windows has always bothered me a touch, and not just because of problems with Swing. I'd found how to change it once before "on my own", but forgot. Here goes:

Want to change the color it uses? For example, if you're using the Windows Standard scheme, you may want to change that dark blue to red for some real contrast. Whatever your taste in colors, right-click on the Desktop, select Properties, and click on the Appearance tab. Click on the down arrow under Item, select Selected Items, and then choose a Color. Click on Apply to try out your change without closing the dialog box, or click on OK to make it stick. There, much better. Who ever heard of a dark blue highlighter anyway?

posted by ruffin at 1/09/2004 12:01:00 PM

It's about time I learned What is RSS? [Dec. 18, 2002]

(http://homepage.mac.com/asagoo/realbasic/ & http://home.mnet-online.de/leib/sascha/proj/sw/resources.html might help)

posted by ruffin at 1/09/2004 11:05:00 AM
Thursday, January 08, 2004

I'm not sure how I feel about the "new cool movement" to stop using Hungarian notation in VB.NET. Here's quick quote from usenet:

The unbridled use of Hungarian notation has the immediate consequence that it becomes terribly easy to fail to attach meaningful names which clearly describe a variable. In Code Complete, Steve McConnell notes that Hungarian notation 'encourages lazy, uninformative variable names'. Hungarian notation as it stands is simply useless; it is too much an invitation to make a mess of one's program. One can regard and appreciate the examples given as enough to end its use.

I've actually used Hungarian in my Java code fairly often, substituting VB6 prefixes where the objects most closely match, though I also tend to use a lot of Smack smack = new Smack(), with the var the same name, different first letter case, as its type (which doesn't work in VB.NET -- or does it? Seems to let me get away with it). With IDEs with autocomplete, it's a big help, and also helps you quickly view what sorts of child objects something you're messing with has. It's a useful commenting scheme, and those that say, like the previous post that I linked to, that comments lie and shouldn't be used are just plain silly. Sure, there's no machine readable link between comments and code, but that's no excuse to be lazy. Let's assume the IDE wouldn't build your app if comments were out of sync -- a good coder will go through the same amount of work with or without the extra check.

I do, however, know how I feel about this quote, later on in that post:

Am I to judge Charles Simonyi for having created of this monstrosity? Surely he meant only the best, and could not have foreseen the damage to young, impressionable programmers that would subsequently result from it. When he joined Microsoft back in 1981, he brought this notation system from his work in the 1970s at Berkeley and Xerox Palo with him, who subsequently spread it by force to the entire planet.

"As if code rusted."

posted by ruffin at 1/08/2004 05:51:00 PM



Dang it. Lost a blog.

Anyhow, short version is -- #develop, the GPL C# IDE, stinks. They had a great idea, implemented, but never bothered to add a QA process. Now the latest version of the thing won't even open my preferences panel without blowing up. It's really too bad. They had a neat thing.

posted by ruffin at 1/08/2004 02:24:00 PM
Wednesday, January 07, 2004



Firebird 0.7 for Window's PDF support stinks. To disable it, so that it'll download pdfs sensibly instead, like Safari, go to "Tools, Options", then select the "Downloads" section, then click the "Plugins" button. Find PDF. Click away the check that shows the pdf plugin is enabled. Crashed on me the first time I did that, but on restart [of Firebird] it seems to be working just fine.

posted by ruffin at 1/07/2004 05:55:00 PM



February's MSDN Magazine has a great article on console applications in .NET, and presents a very clean case (with examples) for how to make console apps in .NET. If you think of standard.out/.in/.err as "TCP/IP or http for intracomputer tasks", you'll see consoles are actually great building blocks for interoperable apps.

Anyhow, it's neat to see .NET allowing Windows developers to finally, easily make apps like the ones that have been running on *NIX for decades, and to see an MS sanctioned rag not only showing you how, but recognizing explicitly that Windows has been lacking in this powerful tech for quite a while (blaming VB6's over-reliance on GUIs as well).

posted by ruffin at 1/07/2004 10:45:00 AM
Tuesday, January 06, 2004



Don't think VB.NET was C#'s afterthought? You should [ms-help URL].

The DataGridTextBoxColumn class derives from the abstract (MustInherit in Visual Basic) class DataGridColumnStyle. At run time, the DataGridTextBoxColumn hosts a DataGridTextBox control that allows users to edit text.

...

[Visual Basic] Note The following types are not fully supported by Visual Basic: DateTime, UInt16, UInt32, UInt64, and TimeSpan. (Operators are not allowed.)

posted by ruffin at 1/06/2004 01:57:00 PM



When I read something like this:

I am trying to format a single column in my DataGrid (seems like a trivial thing, but holy crap nothing's trivial with a DataGrid).

... it pains me to say that Windows.Forms has started moving over towards Sun's Swing rather than towards a better version of UIs under VB6. Models are great in Ivory Tower land, but really should have a [possibly parallel] easier implementation written for conceptually easy hacks like this.

And yes, I know I've said I hate the DataGrid. That's in ASP.NET. As I've said before, MS has hardly done for web programmers coming to stand-alones what it's done for VB6 hackers coming to the web. My html tables don't help much in an exe, so here goes. Basically I'm trying to see if there's ever a time that a DataGrid would be practical in a real-world app, and the only thing I can see is its ability to easily overlay a DataSet and provide a quick GUI. So far, not impressed.

posted by ruffin at 1/06/2004 01:21:00 PM



Ever wondered why you get business cards in groups of about twenty thousand instead of a hundred, and end up with enough left over to feed a large colony of paper wasps each time you change addresses -- or jobs, for all that matters?

That's an easy one. Guess who needs the most business cards? That's right, managers. They actually give out hundreds of these things all over the place. Guess who orders business cards? Okay, well, some dude in procurement, but guess who makes the policy on how many are ordered? That's right! Managers again!

And we wonder why managers have a hard time understanding programmers and vice versa. [Often, for some unknown reasons (otherwise known as "politics"), these are] Completely different paradigms.

posted by ruffin at 1/06/2004 11:18:00 AM
Monday, January 05, 2004



To run the .NET command line compiler for VB.NET (vbc.exe), you might need to add something like:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322

... to your computer's PATH variable.

posted by ruffin at 1/05/2004 04:30:00 PM



Displaying html, even just for help pages, through Swing's JEditorPane stinks. It's slow, you have to program much of the functionality yourself, and no matter how you end up doing it, you end up with a sorry substitute for a browser.

SWT is one alternative, but that's a lot of overhead for one simple widget. If you're not going whole hog to SWT, you're probably still better off with a simple JEditorPane.

OR -- Use something native with a thin JNI wrapper. Sound difficult? Esoteric? Relatively speaking, it is. Luckily, for Mac OS X, we've got this example code from Dmitry Markman showing how to use the WebKit (Safari) via Cocoa in Java code.

Not "Java Pure", but a great, robust browser in your app.

posted by ruffin at 1/05/2004 08:11:00 AM
Sunday, January 04, 2004



I've got an old, near collector's item Mac that's running Mac OS 8.6, and recently Appletalked (via 802.11b!) some files from an old Mac desktop. Many of the files were in ClarisWorks format (phew, these are classic references), and I haven't installed Claris/AppleWorks on the 8.6er yet.

I do, however, have Word98 available.

Guess what happens when I try and open a ClarisWorks doc? That's right -- MacLinkPlus wakes up, checks the system for a proper word processor, and figures out there's nothing ready to catch the file. But it doesn't stop there -- a message pops up saying that the "Microsoft Word" on my system hadn't been written at the time my version of MacLinkPlus was released, but that it's going to translated into Word 6.0 format and give it a shot anyhow.

Now *that's* impressive. I'm not sure if Word98 had anything to do with linking itself to the ClarisWorks docs, but to me, the user, it doesn't matter. What I've got is a seamless process on Mac OS bringing an awfully out of date format on an awfully out of date OS into a somewhat recent version of Word. Whoever added the forward compatiblity function to these apps, possibly even just within MacLinkPlus, which might have just "guessed" Word98 was something close to what it understands (possibly from a four-char file type?), deserves a raise. ;^)

posted by ruffin at 1/04/2004 09:12:00 AM
Friday, January 02, 2004



OmniWeb is once again taking the browser where no one else is but that no one else has any excuse not to. Since OmniWeb introduced text boxes in web pages with spellcheck (not that I've been using it, obviously), it's really been on the forefront of what browsers should do. The link above shows some of the newest features, like having each individual site having the potential for having its own preferences.

The browser's last major change since Netscape 3 was dhtml. It's about time the browser and features from some more specialized online access tools were merged.

posted by ruffin at 1/02/2004 09:59:00 PM



As if the .NET datagrid wasn't crazy enough before, now there's someone whose entire site is dedicated to the monster... This page in particular, "A listing of Datagrid articles from other resource sites:", is pretty bad news. Nothing there but tons of datagrid articles.

[WARNING: Awfully long blog follows, mainly b/c I'm going to need to reuse this text (formaled up a bit) when I justify why I'm designing an awfully big system the way I plan to. Or I'll at least reuse the text in a post to microsoft.public.dotnet.framework.adonet]

freakinname talks ADO.NET and why the DataSet is overhyped

I'll admit, the whole ADO.NET set up perplexes me right now. There's a heck of a heck of a lot of effort in there to make distributed applications incredibly easy to make and maintain, but for your run of the mill system, I'm not sure what all this overhead gets you other than an unnecessarily complex object model.

Just as an example, let's say you have a system where you have tons of people out in the field, um, say surveying property parcels. You want them to be able to edit notes about plots, ownership information like phone numbers, contact address, etc, and maybe even add a few digital photos. You don't want them scrawling all this out on paper atop a clipboard, you want this to happen once, electronically, eliminating a data entry step from your current process (no clipboarded forms to rdbms back at the office). You do, however, want to maintain relationships between tables and generate unique keys for those relationships when adding new records and the like.

This requires a ton of overhead if you're dealing with, say, Visual Basic 6.0. You might have to hook up an Access database with all the entries your appraisers need when they're out in the field and you'll need to hack something to have all the information brought back in to your system once they're back. You'll need to keep track of primary key values, possibly replacing temp values from the Access file with truly unique ones generated by SQL Server or another rdbms. And you'll also have to check and see if anyone else has edited the fields the user in the field updated - even down to the tables your field user used to build relationships to new entries to ensure they're still valid.

ADO.NET has taken this task and made it much easier with its disconnected DataSets. The whole point is that DataSets are relationship-laden subsets of your data that you can take anywhere without having another hit to the main server. There's also a Guid.NewGuid method that will return unqiue strings that you can create on any computer, anywhere, and feel pretty confident you'll be able to use that as a primary key when you roll your disconnected DataSet back into your rdbms proper.

But other than when you're doing truly disconnected data manipulation (ie, you're physically taking the data away from the network where it's stored, at least for all practical purposes (a cell phone dial-in connection isn't quite the same as a 100baseT cable sticking out the side)), I really can't find - with certainty - more more than one reason to use a DataSet over the way I used to do it with ASP and vbscript. In ADO.NET, this translates to using the DataReader for pulling back data and using the [Sql/OleDb]Command's "ExecuteNonQuery" statement for INSERTs, DELETEs, and UPDATEs.

Examples like to show things where you've got, say, a forward and next button on a form that displays the values of one record at a time where each GUI element is databound to an element in your DataSet. But how did you decide what went into the DataSet to begin with? If we're, say, dealing with customer information (address, phone, etc), did you slap every customer in the DataSet before cutting your application loose? What happens if the user only needed to update one record and then move on from customers to orders? Now there's some overkill and wasted resources.

What, of course you didn't slap every customer in there? Just those with last name of "Smith", I'll bet. Well, you're getting close enough to having a user who only wanted one record, why not just pull that single record back? And if you do only pull one, what does a DataSet really get you? You can't sort one record. You don't need next and previous record buttons. You really don't need anything disconnected at all.

The answer why DataSets are still used is simple - overhead for updating. People would rather write code to databind than code to fill and parse results from individual elements that are later turned into SQL code. Why, I don't know, other than that's what the Microsoft wizards do for you. At this point, it really is a similar amount of coding to handle everything programmatically than to hook up validators and databinds for all the GUI widgets you have on the screen. I suppose perhaps you'd rather have a DataSet passed from your presentation layer to your data services tier to make your data services tier thinner, but now you've also got a pure data access object (the DataSet) mixed in with presentation code. Neither method is obviously better so far.

So why do it programmatically? Here goes...
1. Complete control over the 0s and 1s. Know what data is going where in your app, and be able to access data flow at any point in the process for more customization opportunities, whether they're needed or not.
2. Less overhead. VS.NET isn't going to be doing anything for you behind the scenes. This is similar to 1., but adds the fact that you don't have any extra XML (aka, "severely bloated ASCII useful only in totally anonymous logic sharing") filling memory with data values unless you actually want that data there (see for more freakinname XML-ige)
3. Most importantly, fewer new object models for your programming team to learn and maintain. KISS.

Which of course brings me to the single reason I can see to use the DataSet in an intranet .NET application - the "review and edit at once" function. Grab a datagrid, hook it up to a DataSet with every record that's, say, been entered in the last week. Not only can you review and sort using the DataGrid's top row, you can also modify the table(s) values right there in the grid, validate, and get ready to check back in. Not the best GUI, and certianly not award winning, but for quick, small edits to record values that are short (can be reviewed and shown in a small text box) which a user wouldn't be able to target with extreme accuracy before seeing all the values in front of them, the DataSet and DataGrid are perfect. ;^)

Labels:


posted by ruffin at 1/02/2004 01:28:00 PM



Canonical list of freakinname XML posts

Fri Sep 26, 2003 - Joel Spolsky on complexity to find new records
Mon May 12, 2003 - XML misses the mark of being accessible to a Desperate Perl Hacker
Thu May 08, 2003 - XML introduces unneeded maintenance headaches to development
Fri Mar 07, 2003 - The few legimate users of XML (hint: think anonymous)
Tue Nov 19, 2002 - freakinname waffles like Clinton during early thoughts on XML

posted by ruffin at 1/02/2004 01:25:00 PM



This /. post on SOAP's origins is well put:

XML-RPC and SOAP are not really OO RPC mechanisms (despite SOAP containing the word 'object' in it). SOAP is a bloated compromise spec created by committee by a few large players in the industry to satisfy all their requirements, and hence does not really enforce any sort of object or typing system.

posted by ruffin at 1/02/2004 11:01:00 AM



These are pretty wise words I wish I'd followed in retrospect for ye olde Digest Handler:

If you don't have a reason to use the Java platform any stronger than, 'I'd like to hit a niche platform Java provides me access to', you're better off picking another, more specialized tool.

I'm not completely sold on that -- REAL Basic's database support isn't quite what I want unless I shell out hundreds of extra bucks, but overall, very sound advice.

posted by ruffin at 1/02/2004 09:52:00 AM



The last blog reminds me that I'll probably eventually need to add some sort of security to the system I'm writing now. Microsoft Forms-Based Authentication is probably a decent first step for ASP.NET apps.

posted by ruffin at 1/02/2004 09:39:00 AM



This site isn't about pot, but I'm starting to wonder if the O'Reilly Network isn't.

Retrieves the salt and the hash of the password and salt from the database for the specified username. The user-entered password is concatenated with the retrieved salt and the hash is generated. If the hash matches the hash retrieved from the database, the user is authenticated.

What with all the hash and salt (pot & food)... At least they aren't poorly forced acronyms.

posted by ruffin at 1/02/2004 09:33:00 AM
Thursday, January 01, 2004



Great. The iChat AV beta is finally acting like one. Got a message this morning that I had two weeks until it expires.

Choices? Pay $29.95 to buy iChat AV from Apple, "save" those thirty bucks by putting them towards buying Panther (OS X 10.3), or revert to iChat 1.0.1. Naturally I reverted. A forced restart and lost spellcheck later, it's time to say hello again to Adium.

Or is it? After the download, my /Applications folder is owned by "system" and not letting me move Adium in there. To get around this, you have to "Get Info" on the Applications folder, select "Ownership & Permissions", and set the owner back to you (to grenade the problem) or, in my case, set the group permissions for "admin" back to read/write.

Nice, smooth, Apple-like interface there. Guess I'm supposed to get pissed and buy Panther. Sorry guys.

posted by ruffin at 1/01/2004 09:40:00 AM

<< Older | Newer >>


Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ยข, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.