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!

Wednesday, December 31, 2003



Yes, filters are the answer. Look, aggregators suck; no matter how good some of a site's content is, you can find yourself pitching 10-80% of it, depending, right off the bat. Blogs suck (for the reasons listed yesterday). What you want is content, your way, right away, etc. You don't just not want spam, you do want anti-spam. And most anti-spam is on the net, not delivered into your POP3 mailbox.

You need a targeted web spider running a filter pulling you your own definition of anti-spam, from sources you trust (in my case, maybe macrumors.com, The Washington Post, joelonsoftware.com, java.net, oreillynet.com, rec.games.video.classic, Apple's java-dev mailing list, etc) and from similar sources you don't know about.

Now that's an aggregator. No, Google's "similar" search doens't hack it. It shows you what's similar to a *specific* page on the site, not the site as a whole, or the author as a whole. Thus the "inverse spam filter".

Venture capitalists send money now. Get in on the ground floor. ;^) Oh, I'm sure it's been done before, but I haven't gotten one yet so no-one's quite at the proverbial tipping point just yet.

posted by ruffin at 12/31/2003 03:06:00 PM
Tuesday, December 30, 2003



Sometimes a blog that used to be chock full of useful technical information dies a horrible, horrible death. All of a sudden you're reading about the author's favorite sports teams, blogger friends they met online, their pets, the lastest Lord of the Rings movie (they've already stolen six hours of my life; dare I give them more? Read the books. They're cheaper and better), or, worst of all, the author stops programming all together [as far as you can tell when you skim the blog now].

Scott Andrew is one of the latter cases. He used to have great html -- especially standards compliant dhtml -- stuff on his site. That's dead now. He's now simply a geeky musician who has managed to leverage his blogger fame into cash, apparently. I'll concede, having not kept up, that perhaps he's even relatively okay at this new hacking of his. Good for him, bad for us.

Anyhow, after a long hiatus from skimming his bits, I took a quick look and stumbled over this fairly funny diatribe [in the "archaic : a prolonged discourse" sense] regarding some legal body called the ASCAP suing a club over bands playing covers from other bands without paying royalties.

ASCAP03: u r ILLEGALLY using music without a license to bring in business. of course, i won't tell u how i know that, or explain y purchasing a license can help yr business. and no, u can't buy a license, that ship has sailed. PAY UP, THEIF!!!!!!!

Club0wnz0r: Even though a license would cost me less than $2/day for nearly-unlimited commerical use of music, I'll instead close my doors 2 live music and complain loudly 2 TEH MEDIA!!! u r a mafia-style shakedown!!!!!!

ASCAP03: u r robbing musicians of thier livelihoods!!

Club0wnz0r: u r robbing bands of a venue. u IS LOSE

ASCAP03: HATE U :P

Club0wnz0r: SHUTS UP

posted by ruffin at 12/30/2003 11:48:00 AM



When your iTunes "randomly" picks out songs like this one [iTMS URL] more often than you'd expect, it kinda makes you wonder what message it's trying to get across to you... iTunes must know more VB6 than I thought.

posted by ruffin at 12/30/2003 11:28:00 AM



Potentially interesting blogs...

The .NET Guy
Geek Noise

And just for good measure, an article of complete madness (embedding .NET inside Java).

posted by ruffin at 12/30/2003 09:23:00 AM
Monday, December 29, 2003



Having trouble unregistering an ActiveX exe? Here's your answer:

Run it with the command line parameter '/unregserver'.

C:\MyAppFolder\MyApp.exe /unregserver


posted by ruffin at 12/29/2003 06:28:00 PM



When Microsoft's JDBC for SQL 2k's documentation says:

Microsoft SQL Server 2000 supports multiple instances of a SQL Server database running concurrently on the same server. An instance is identified by an instance name.

To connect to a named instance using a connection URL, use the following URL format:

jdbc:microsoft:sqlserver://server_name\\instance_name


... it's lying. That'll just net you the ever popular...

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket

... error.

Just leave out the double backslash and instance name. The port will do you just fine. For example:

strJdbcUrl = "jdbc:microsoft:sqlserver://myServersName:2080"; // instance at port 2080

How do you find out the port for named instances? Apparently the port is taken randomly on first start (versus the standard 1433 for defaults) -- port 2080 above. To find out what port it took, you can port sniff OR, much easier, hit "Start, Programs, Microsoft SQL Server, Server Network Utility", then look at the instance you want, click "TCP/IP" (needs to be in the enabled list), and check out what port's listed. Voila.

Sheesh. When all else fails, read the directions. When the directions fail, try something you still haven't thought of, or at least start Googlin'.

posted by ruffin at 12/29/2003 12:21:00 PM



No, sorry, this blog's not about pot.

posted by ruffin at 12/29/2003 10:12:00 AM



Another "Ruffin reacts to whatever Joel's pushing on his site lately" blog entry, in this case a response to a Joel's blog on Biculturalism, here talking about what's different in the land of software development between stereotypical Windows and Unix programmers.

Microsoft Internet Explorer itself is nothing but a tiny 89 KB program which wraps together dozens of very powerful components which are freely available to sophisticated Windows programmers and which are mostly designed to be flexible and powerful. Unfortunately, since programmers do not have access to the source code for those components, they can only be used in ways which were precisely foreseen and allowed for by the component developers at Microsoft, which doesn't always work out.

...The Unix cultural value of visible source code makes it an easier environment to develop for.




That's simply not true in the sort of set in stone fashion Joel delivers it. Let's take the The Tale of J. Random Newbie that Joel points to (itself written by Eric Steven Raymond) as proof -- in that anyone who's programmed can immediately see the truth in the tale.



In desperation, [after trying to use closed-source libraries that cause memory leaks and other problems,] Newbie starts making his own bricks โ€” simulating less stable library services with more stable ones and writing his own implementations from scratch. His replacement code, because he has a complete mental model of it that he can refresh by rereading, tends to work relatively well and be easier to debug than the combination of opaque components and workarounds it replaces.

Newbie is learning a lesson; the less he relies on other peoples' code, the more lines of code he can get written. This lesson feeds his ego. Like all young programmers, deep down he thinks he is smarter than anyone else. His experience seems, superficially, to be confirming this. He begins building his own personal toolkit, one better fitted to his hand.

Unfortunately, the roll-your-own reflexes Newbie is acquiring are a short-term local optimization that will cause long-term problems. He may get more lines of code written, but the actual value of what he produces is likely to drop substantially relative to what it would have been if he were doing successful reuse. More code does not equal better code, not when it's written at a lower level and largely devoted to reinventing wheels.

Newbie has at least one more demoralizing experience in store, when he changes jobs. He is likely to discover that he can't take his toolkit with him. If he walks out of the building with code he wrote on company time, his old employers could well regard this as intellectual-property theft. His new employers, knowing this, are not likely to react well if he admits to reusing any of his old code.


Let's take Joel's idea that open sourcing fixes this issue/makes things easier to program for on two levels.

1.) In house code.
2.) Third party code/libraries.

1.) Raymond is obviously not talking about in-house, whether the source is open under your IP agreement or not. But if you try to extend this "lesson" there, it should be said that you'll be making a huge mistake. Though it'd be great to have J. Random Newbie point out the bugs, you might not necessarily want him fixing it. But you most certainly should have some process for getting the bugs fixed quickly.

What's most important about libraries is that they work as advertised and have excellent documentation. The code should look great too, of course, but there are legimate reasons to keep that closed. These lessons can range from not having J. Random in there hacking in poorly constructed band-aids to keeping your IP your IP. In fact, you'd rather not give others the ability to hack the original willy-nilly, as those fixes might not ever make it back through the checkin process to the original process. That make sense?

You need to have a process (pointy hair DOWN) for bug fixes libs and first-rate dev documentation. The bottom line is that if you're having these problems in-house, Newbie's done you a great favor by pointing out that you don't have first rate, bet your company on it level code.

(Which also makes me note that the story is stereotypical in that Newbie never tells anyone that he's having trouble. There's no management worth a rip in this one, or even a more senior programmer buddy. This is why you can't hire a simple computer geek and think you're ready to lock him in a room and expect great code as a result. Communication skills are awfully important -- and geek skills in your managers are every bit as important as that. Meeting half-way can't be rated highly enough.)

2.) You're using code from a company whose code sucks. Stop using it.

Sometimes you can't help it -- that company's the 800 lbs. gorilla in your marketplace (ESRI comes to my mind). In this case, you absolutely do need to do what Newbie does first in the story -- make ugly workarounds and document them. In this case, open sourcing the code would do squat for me and even less for, say, ESRI. I'm not going to have the time to figure out what's going on (eg, Furthurnet's code), much less fix it. I need to tell the [ESRI-like] company stuff's broken or be happy with the workarounds -- or do my best to start a rival in the marketplace.

(Now there's where open source helps. Do I have time to start a rival company to a multi-million dollar profit, farily danged large co? Of course not! But, hopefully, there is an itch I can scratch that, put together with everyone else's itches, make for a relatively stable alternative. Then, once you hit critical mass, you can put a company on top of that for support on installations, etc. But that's pretty pie in the sky.)

Anyhow, that's this morning's ramble. Libraries are, at least in theory, the best way to go, even if the code itself is open sourced. Clean, well-documented break points are necessary for good code reuse, and if your third-party provider, again, open source or no, can't give that to you, you're using the wrong software.

posted by ruffin at 12/29/2003 09:35:00 AM
Sunday, December 28, 2003



Eventually I'd like to start using Bayesian Filters in The Digest Handler. Classifier4J might be a good start.

Gotta love the open source community. Glad I finally gave a little back.

posted by ruffin at 12/28/2003 06:39:00 PM
Friday, December 26, 2003



Ah, another Xmas season has come and gone. Nothing really to add but that I find myself enjoying VB.NET more than I thought I would and that I finally saw a PowerMac G5 in action (dual 1.8 GHz). Very fast. The dual proc trick took an end run around Moore's Law, and you've now got no issue but price standing between picking a Mac OS X box over a Windows one. If you compare experiences, I think you'll begin to find the Mac is a better deal. I did bag Halo for Xmas, and that runs bearably well even on my 1 GHz G4 iMac. That with the iPod-giving-a-rama that apparently went on over Xmas, and you've got one happy Steve Jobs.

I take that back -- I do have one more bit to add. I played with REAL Basic 5 a bit over the holidays -- about three hours or so -- and I'm all but sold. Will probably sink in the $99 entry fee Jan 1st.

What's to like:
* Resizable GUIs in about a tenth of the time (maybe less) than it'd take me to get things going in Java.
* Visual Basic like scripting speed
* Compiled applications, not easy to decompile bytecode

What's to dislike:
* Very immature language (though this could certainly be partially my limited exposure). Object-oriented approach is lacking, as it does in VB6. A better list:
* No interfacing
* No polymorphism
* No inheritance

But for quick utilities -- and even GUIs on top of something serious -- there no better way on the Mac platform, OS 8-X. Now if I could just get the JNI-REAL Basic [currently nonexistent] plugin bridge figured out...

posted by ruffin at 12/26/2003 12:37:00 PM
Saturday, December 20, 2003



Even crazier is my top rate when iDVD is doing nothing, which, of course, does nothing but support the blog quote below:

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
543 EncoderSer 84.5% 0:38.70 7 122 237 21.1M 17.9M 36.9M 136M

posted by ruffin at 12/20/2003 06:48:00 PM



All over the net people are claiming iDVD gives burn times roughly equal to the amount of digital video you're burning. I'm trying to burn a pretty lengthy DVD right now (over an hour), and though I'm over a third of the way in, iDVD is telling me I've got 527 minutes to go. ?!?!!

Welp, that's probably a bit longer than I should expect, but
here's a clue that says perhaps that isn't so crazy (though the time just keeps going up, which isn't cool at all; started at 180 minutes to burn or some such)...

On an 800-MHz iMac G4, iDVD took nearly 2 hours to encode and burn 20 minutes of video. It compresses video in the background while you work, so burn time appears shorter in most situations.

posted by ruffin at 12/20/2003 06:40:00 PM
Friday, December 19, 2003



Want to use a Sub Main other than the default in a VB.NET Windows.Forms project? Just declare a Shared Sub Main.

Shared Sub Main()

Not sure how I feel about using VB.NET, which is a "cultural requirement" in a current project. Been getting to the point that I wish I could use as few tools to get my work done than wishing to learn as many as possible, and C# fits in with my preference for Java right well. That said, it is nice to have VS.NET so "VB6-ified", as the best thing about VB6 has always been the IDE, esp. the GUI RAD. Even more, I suppose I should admit I enjoyed how easily I could do the same hack work VB6 encourages in VB.NET. Getting up to speed didn't take long at all, and the Windows.Forms GUI widgets, combined with the context help in VS.NET's status bars, etc, make up one of the nicest, most intuitive GUIs I've seen. For all I've said about #develop, VS.NET certainly puts it easily to shame -- which goes to show it's more than just the widget toolkit that makes for a positive experience.

Admittedly, VB.NET has all the power of C# or Java when it comes to developing things "correctly", with object oriented concepts I've been dying to use in VB6 -- particularly inheritance, free use of arbitrary objects as method parameters and return values, and interfaces. I'm certainly not compromising power, though things like the Module (which has no constructor, at least not by default) and other leftover VB crutches, which still retain a bit of momentum in VS.NET, really don't seem at home as part of the mix. Overall, however, it seems it'll do an admirable job of letting VB6 hackers comfortably rethread their heads from that hack of a langauge to the .NET CLR. Ultimately, I believe I'll enjoy the switch and be thankful that, at least at my day job, I don't have to try and coax the oft lamented Swing into service.

posted by ruffin at 12/19/2003 05:36:00 PM



Had reinstalled XP after wiping slick a drive and found I'd wiped my DVD encoder. That stunk and finding the DVD player/decoder buried in one of the support discs for the laptop wasn't my idea of fun. A little Googling later brought up the VLC Media Player, an open source project that does right well. After IM'ing that link to a few schmoes, I got passed this URL which lists a ton of bootlegs of recent movies (no download links; I suppose this serves to gives you what you need to search for to grab a certain version, as well as rating the quality of each version).

No no, this is not to say I've suddenly become an Irish Pirate ("BLARNEY!!!!!!!!"), but it did occur to me that there's not really a Furthurnet equivalent when it comes to movies. There are a number of main stream games that have been open sourced and usually a pretty good homebrew selection for old gaming consoles, and heavens knows there are tons of open software applications that are essentially as good as commercial counterparts. With the aforementioned Furthur, there are gigs and gigs of great, near commercial-quality shows/music tracks from popular, contemporary bands to use with your warez player -- legally.

But I haven't stumbled over the "open/free" movie community, and I've the suspicion that, when I do, it won't quite be the same sort of high quality I've come to suspect with other free movements.

Blah blah blah.

posted by ruffin at 12/19/2003 03:24:00 PM



This article continues the long line of Reasons I'm Not So Impressed With Apple's Implementation of Java.

Author's Note: When run on Mac OS X with Java 1.4.1, the scrubber bar has repaint problems when a file is opened but is not yet playing. It does not have problems on OS X's Java 1.3.1 or on Windows, so this may be a version-specific bug, and has been filed appropriately. You can look in the sample code for the many workarounds I tried to get the scrubber repainted correctly.

posted by ruffin at 12/19/2003 12:40:00 PM
Thursday, December 18, 2003



Oracle again...

INTRODUCTION TO ORACLE:

String concatenation || can be use in the SELECT clause


SELECT area_code || '-' || phone_number
FROM address;


will concatenate the area code 518 and phone number 2766666 and produce a result like 518-2766666.

posted by ruffin at 12/18/2003 03:57:00 PM

[At least one version of] Oracle apparently dislikes strings being inserted into data fields, no matter what their format. Here's the workaround I used:

For example. If I want to execute statement:

select to_date('11/20/2003 10:21:00 PM', 'MM/DD/RRRR HH:MI:SS AM') from dual;

.. oracle will complain when my nls_language is set to SLOVENIAN.
after I set it to AMERICAN, everything works fine.


[Update, 12/19: It should be noted that SQuirreL SQL, the open source, Java based isql client, is a super app for anyone doing database work. I was helping install a JSP app built against SQL Server that was being deployed on Oracle, and SQuirreL made testing permissions, checking up after the customer's dba for tables and triggers, etc, even "DTS" type moves from an off-site MS SQL Server to the customer's Oracle server a no brainer, not even requiring opening a new application. The best part is being able to play dba without learning a new suite of dba tools. ANSI SQL and SQuirreL can go a long ways towards extending dba skillz learned on MS SQL, Postrgresql, mySql, Oracle, DB2, even hsql, to anybody else in the same list. Kudos to that app. I'll have to buy it dinner sometime.]

posted by ruffin at 12/18/2003 11:15:00 AM



Good to know:

You're using Oracle and I didn't know that. If your version of Oracle is less the version 9, INNER JOIN isn't even an available command...

posted by ruffin at 12/18/2003 10:04:00 AM
Wednesday, December 17, 2003



From the same site that had the Oracle autoincrement info, below. Thought it had a few comments fairly well worded. Doing a lot of command-line work this week, installing a web system onto Tomcat running on Apache running on Solaris, using the Korn shell, and have been enjoying what you can get done without a mouse (so very quickly) when you have to.

Thanks to the Microsoft monopoly, sometimes people get the mistaken idea that since I work on computers, that means I fix PCs running Windows. While I might be able to fix your PC, I rarely use Windows and am by no means an expert in it. I have no patience for deciphering the cryptic meanings of silly icons; we evolved from using pictographs to written language for a reason!
...

If I'm a geek, you might ask, then why does it look like my boring old web page was designed in the early 1990s? This is why: one person's idea of a really neat-o spiffy web page is another person's eyesore, so I'd rather stick to basic html with plenty of content and leave the useless Flash intros (the modern answer to the 'blink' tag) to others.


Those are two bits that jive with me a touch. Why is a GUI better, at least for getting work done? (One thing does come to mind -- having a cheat sheet for any application right in front of you (ever seen my VIm cheat sheet?)) And fancy web pages usually just mean they aren't going to look the way you intended in two years. Granted, even these pages have a tough time in NS 4.x (colors are off/gone from css), but they do look okay on most any browser -- particularly nice in links, if I do say so myself.

Back to hackin!

posted by ruffin at 12/17/2003 04:07:00 PM



Autoincrement primary key for Oracle: Suppose you have a database and you want each entry to be identified by a unique number. You can do this easily in mysql by specifying 'auto_increment' for your number, but Oracle makes you work a little more to get it done. Here is one way to do it by creating two database objects, a sequence and a trigger. I find myself wanting to do this every now and then but not often enough that I remember the syntax from time to time, so I decided it was time to write myself up a little cheat sheet. This is an extremely basic outline, so please try it first on a test table if you don't know what you're doing.

posted by ruffin at 12/17/2003 12:23:00 PM
Tuesday, December 16, 2003



http://jakarta.apache.org/tomcat/tomcat-3.2-doc/appdev/deployment.html

posted by ruffin at 12/16/2003 10:06:00 AM
Friday, December 12, 2003



Pop quiz time. What does the following VB6 code output to the immediate window?

Private Sub Form_Load()
    Dim strSmack As String
    
    strSmack = "unchanged"
    Me.changeString (strSmack)
    Debug.Print strSmack
    
    strSmack = "unchanged"
    Me.changeString strSmack
    Debug.Print strSmack
    
    strSmack = "unchanged"
    Call Me.changeString(strSmack)
    Debug.Print strSmack
End Sub

Public Sub changeString(ByRef strToChange As String)
    strToChange = "Changed"
End Sub


If you said...

unchanged
Changed
Changed


... you'd be right. Why?

Well, notice the space that's between changeString and (strSmack) in the first call. That's because we aren't "Call"-ing it explicitly, so the sub doesn't expect parameters between parenthesis. We "should" have called the sub like we do in the second call with no parens at all.

But since we do use parens, VB is evaluating the strSmack variable and passing in that value, not the string itself. It's sending in a clone of the strSmack object so there's no handle to strSmack at all. Crazy. It essentially evaluates to what we'd've gotten had we called this code:

Call Me.changeString((strSmack))

See what I mean? Instead of strSmack going in ByRef (which is, you should recall, the default; we coulda left that out of changeString's param list), a clone of strSmack is passed in instead, to which we have no handle at all.

*sigh* Love me some VB6. It has helped me buy my iMac at home, however and keep a roof over my head, so I won't complain too much just yet.

posted by ruffin at 12/12/2003 01:52:00 PM



Just installed VS.NET 2003 and am not happy with the end of the installation. Apparently it's built-in update/security fix apparatus requires that IE be configured as your default browser or some such or it can't get to the net. It also tries to fire up WIndows Update for you after installation, which sent my Firebird window to windowsupdate.microsoft.com where I got, of course...

Thank you for your interest in Windows Update

Windows Update is the online extension of Windows that helps you get the most out of your computer.

You need to be running a version of Internet Explorer 5 or higher in order to use Windows Update.


That's lazy. It's poor programming. I might expect it out of a contractor selling a few small apps... or even a contractor creating a system for a homogenous intranet. But I do not like seeing MS assume the world is using only their software. Usually MS has great ideas filtered through a money maximization machine, which often castrates the great ideas or at least undercuts them. This, otoh, is just lazy.

posted by ruffin at 12/12/2003 09:27:00 AM



1979-05-MVC.pdf>The purpose of this note is to explore the thing-model-view-editor metaphors through a coherent set of examples.:

posted by ruffin at 12/12/2003 09:21:00 AM
Thursday, December 11, 2003



I'm not sure who in their right mind (or left) would do it, but you can save $50 if you're an educator buying a CD-ROM-only iBook:

Apple Store (U.S.):
$949.00
800MHz PowerPC G4
256K L2 cache @ 800MHz
12-inch TFT Display
1024x768 resolution
128MB DDR266 SDRAM
30GB Ultra ATA drive
CD-ROM
ATI Mobility Radeon 9200
32MB DDR video memory

Configured for education only

posted by ruffin at 12/11/2003 05:54:00 PM



More "spam to self". Sorry.

Java Native Interface: "The quickest method is to use the Java Native Interface. This involves writing a wrapper class in C as the bridge between the Java application and the native method. As an example let's consider a situation where you may need to call Visual Basic code from Java."

posted by ruffin at 12/11/2003 01:58:00 PM



Make Your Swing App Go Native, Part 1: "On the Mac, there is a third party library called Notifications, written by Gregory Guerin. His library uses JDirect, Apple's form of Java native integration, to call the OS X Carbon APIs that control the dock. It is thoughtfully released under the Artistic License, so we'll use it here."

posted by ruffin at 12/11/2003 01:48:00 PM



Just to round out the sounds & beep VB6 code:

Option Explicit

Private Declare Function beep Lib "kernel32" _
    Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Public Sub playBeep(Optional lngFreq As Long = 1000, _
     Optional lngDur As Long = 40, Optional lngTimes As Long = 1)

    Dim i As Long
    
    For i = 1 To lngTimes
        beep lngFreq - 10 * i, lngDur
    Next i
End Sub

posted by ruffin at 12/11/2003 10:36:00 AM



OpenP2P.com: Today's interesting reading:

The day may not be too far off when photocopiers come with mechanisms to detect infra-red or ultra-violet readable-only barcodes or RFIDs on plain paper to lock consumers into a particular kind of paper. Of course, such barcodes would be pitched as 'feature enhancement and copyright enforcement mechanisms'.

posted by ruffin at 12/11/2003 10:07:00 AM
Tuesday, December 09, 2003



What a crock

Seeing as we are a very small software company, we don't have the necessary resources to keep a dedicated machine running Jaguar for testing purposes. And, seeing as we want to stay on top of the latest and greatest from Apple, we are migrating all development to Panther. We will continue to do our best to support Jaguar users and the latest Jaguar friendly versions of all out products will remain available for download.

I could understand if they were saying they couldn't say, purchase hardware that would run Windows 2003 quite yet, but to say we can support OS X's latest and greatest and not keep a Jaguar partition on the same box is just lame. If it's a time thing, say you don't have time. It's not a "dedicated machine" issue.

posted by ruffin at 12/09/2003 08:38:00 PM



Way to go, Sun! Swing ROCKS!

Whew! As I said, Swing is not an example of simplicity and clarity in program design. This is a lot of complexity for an obvious modification. Be that as it may, this code does demonstrate the Factory Method design pattern in spadesโ€”the pattern is used three times in an overlapping fashion.

posted by ruffin at 12/09/2003 11:18:00 AM
Monday, December 08, 2003



Just so that those who come after don't have to wonder why "unregister deleted dll" doesn't even give a Googlewhack, here's the answer. Download something called RegClean 4.1a. Run it. Hope for the best. You won't find it at microsoft.com any more; they've apparently stopped supporting it (possible answer why). You can still google it up pretty easily, however.

Update: Of course that didn't work. Get the name of the dll from your VB6 IDE (Alt-P-N), open regedit, select "My Computer" at the top (very important), hit ctrl-F, and start a-searchin'. I've been deleting the entire folder any time I found any key with the dll's name, and so far so good. Scary though.

posted by ruffin at 12/08/2003 04:58:00 PM



What I've been trying to do in VB, but in Java.

posted by ruffin at 12/08/2003 03:57:00 PM



Hrm. They aren't all that far off.

Introduction to the Hungarian language:
megszentsรฉgtelenรญthetetlensรฉgeskedรฉseitekรฉrt

Option Explicit
Private WithEvents mwcmnTest As CoffeeMonitor

posted by ruffin at 12/08/2003 03:26:00 PM



It's probably a good idea to ensure that any html link you want people linking to is shorter than 80 characters, queryString included. In "old school" formats, including even email, this is bad (received in an email reviewing programming books):

ASP.NET 2.0 Revealed
By Patrick Lorenz
Published by APress
http://www.amazon.com/exec/obidos/tg/detail/-/1590593375/qid=1070426482/sr=8
-1/ref=sr_8_1/104-4338465-2549514?v=glance


Luckily for whatever reason just the first "line" of that URL still gets you to the right place in Amazon, kinda like 1-800-THIS-IS-TOO-LONG still gets you to 1-800-844-7478 (whatever that phones), so kudos to them. Their Mail Order Monster is on the way.

posted by ruffin at 12/08/2003 09:31:00 AM
Friday, December 05, 2003



What? You want to quickly add code to your VB 6 app to play a sound file?

1.) Create a module.
2.) Insert the code that follows.
3.) Call playSound.
4.) Figure out you don't have a .wav file called C:\online.wav and fix that.

Optional: 5.) Add beep code to the module for SUPRA-SOUND MULTIMEDIA SPECTACULARS!!!


Option Explicit

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub playSound()
    sndPlaySound "C:\online.wav", &H1
End Sub

posted by ruffin at 12/05/2003 02:19:00 PM



I'm afraid the day job and a couple of "hobbies" have kept me from updating The Digest Handler to the point I'd feel comfortable marketing it (one needed feature and two annoying bugs that don't kill functionality, but do make it less useful), but that hasn't stopped Sun from making the app work better with its newer JVMs.

Swing's native look on WindowsXP for Java 1.4+ is really quite good now. Here's a quick snap of The Digest Handler (on the left) next to Thunderbird (right) on WinXP:



Even in the rough jpg, you can tell the tabs, font, and shading all look very native in Swing now -- the highlight color's even the same! Apple's had the Aqua look and feel for a while now on OS X (see tiny pic, right), which also does a very nice job of making apps look native. I've also seen a screengrab of an early version of The Digest Handler running on Linux (Gnome, iirc) that looked fairly nice. I think I'll finally move the default look and feel for DH from Metal (the "Java look" or "Cross platform" look) to native. I'm betting most end users prefer apps that look and behave natively (login and password for the previous link are both "archives").

That said, look at the WinXP screenshot, above, again. See how the highlight color is the same in both apps (dark blue) but the text doesn't go from black to white in the Java app as it does in the app using native widgets on the right, making the text difficult to read. It's little gotchas like this that I'll end up programming around that drive me mad. The Java progress bar, otoh, actually does change color of text as the bar grows through it, which is a strange, "We got the system test right here, but not there," situation I don't admire. Kinda like when the makers of Crystal Reports fix an error and then reintroduce the same error in a later version. I understand a programmer -- or a different programmer -- might reintroduce a bug, but you'd danged well better have a test that looks for that bug on the QA department's books now. That's a huge QA gaffe. Not quite so bad here (not a regression of sorts, just differing levels of quality in different widgets), but it's along the same lines.

I'd point you to Joel's article (there's that bear again) on craftsmanship and relate it to this Swing example, but after taking a look at CityDesk, I'm finding it harder and harder to give his anecdotes the stock he believes they deserve. Believe me, he's got better places in the app to put his time than fixing a bug that he says will give him, "ten times as much code to handle large files gracefully, code that maybe 1% of our users will ever see." That's a great thing to fix eventually, but it looks like the way Fog Creek Software is prioritizing issues isn't the most efficient. Scratching the wrong itch doesn't just happen in open source software.

posted by ruffin at 12/05/2003 10:49:00 AM
Tuesday, December 02, 2003



Sorry freakinname readers; today's a documentation/planning day, so I'm squirreling away links like mad. So without further ado, here's another:

Extreme Rules, Code the Unit Test First

Creating a unit test helps a developer to really consider what needs to be done. Requirements are nailed down firmly by tests. There can be no misunderstanding a specification written in the form of executable code.

Course I've always wondered how to write unit tests for GUIs. It's awfully easy to write a test for server-side code, but what about when a user's involved? Well, dummy, that's easy, as explained here:

>[Issue with unit testing number] 2)There is a lot of user input reqired.

For the past year we have developed unit-testing approaches for user interfaces. Basically, the 'button-click' (gui element) action is invoked by the unit-test which then makes sure that the appropriate results occur. We assume that system testing will make sure that the right actions occur when the user presses the gui button.

posted by ruffin at 12/02/2003 02:05:00 PM



Another bloggeriffic Monday.

Take two perfectly equal programmers. Sit 'em down at laptops with a Net connection. Give them each the same two projects.

Programmer A works (let's be reasonable) seven hours a day for a week for two weeks. Make Programmer A work on Project 1 the first week and Project 2 the second.

Programmer B works (let's continue to be reasonable) seven hours a day for a week for two weeks. Make Programmer B work on Project 1 the first half of each day and Project 2 the second half.

Guess who's further along, in my anecdotal experience, at the end of two weeks? That's right! Programmer A. As the number of projects goes up, the difference becomes more pronounced.

posted by ruffin at 12/02/2003 01:12:00 PM



Designing Enterprise Applications with the J2EE Platform, Second Edition:

MVC... organizes an interactive application into three separate modules: one for the application model with its data representation and business logic, the second for views that provide data presentation and user input, and the third for a controller to dispatch requests and control flow. Most Web-tier application frameworks use some variation of the MVC design pattern.

The MVC design pattern provides a host of design benefits. MVC separates design concerns (data persistence and behavior, presentation, and control), decreasing code duplication, centralizing control, and making the application more easily modifiable. MVC also helps developers with different skill sets to focus on their core skills and collaborate through clearly defined interfaces.

posted by ruffin at 12/02/2003 10:38:00 AM



Along the same lines, some people think it's okay for programmers to be poor communicators b/c, well, it's all mumbo jumbo to them anyhow. You can put some social reject in a back room, give him a laptop, and come back to find something seemingly working in a few weeks. What's the issue?

This is your company, daggum managers! Think about it -- often your doctor feeds you stuff you can't make heads nor tails of, and often people will just accept whatever prescription the doctor writes out without thinking twice. Am I saying you should you always second guess your doctor? Not at all! But you should prefer a doctor that can turn the mumbo jumbo into something you can understand. It's your body; it's your life. You should be informed, and your doctor should take the time and have the communication skills to make sure you're exactly that. The is the context that lets you make more informed decisions about your life after the visits. Your trip to the doctor just became that much more useful.

Same with programming and codebases. Know what's in your codebase. Comment it. Document it. Discuss it. Combine communication with code. It's no different than any other job. Don't let your programmers steamroll you like a doctor without a bedside manner!

posted by ruffin at 12/02/2003 10:23:00 AM



Word to the wise: Okay, this isn't exactly the kind of thing I like to stick in this blog, but it pops up enough on the Net that it probably bears saying. One thing I've learned intellectually (and learned the hard way), even if I don't always put it into practice, is not to fan a flame [war]. It's usually best, as soon as you feel you've gotten a flameous reply, particularly in a public forum, to try and compliment the attack's author and gracefully bow out. Even if you're [Americans, say jokingly, please] conscious goal is to be The Alpha Male of All Males (and I haven't stumbled over a flame involving a woman iirc), your current flame war, no matter what it's about, is not that battle. ;^)

There's a pretty nasty flame war going on on the aspfriends.com lists right now (brought to me by, yes, you guessed it, The Digest Handler), and it's really pretty silly. It's just wasted bandwidth and time for the people interested in learning about .NET and asp.net. Strangely, the list owner is one of the combattants. It's really quite silly, and both fellows look pretty silly to me. "Chat with me." "I hate chat." "You're a stone." "No, you're a [contents deleted]." * Not quite actual quotes!

Agree to disagree. If you want to understand why someone is still thinking what they're thinking, ask questions. Don't explicitly defend your point of view. I think I've heard Ben Franklin was awfully good at that, not that that matters one iota. But for the most part, when communication becomes a pissing contest, stop trying b/c the communication stopped quite a while back. "It's not your fault." (ha)

posted by ruffin at 12/02/2003 10:12:00 AM
Monday, December 01, 2003



Testing labs are pretty danged important. You should, as I believe I've said before, be able to get your legacy apps that are still supported up and running as quckly as you expect to be able to start debugging them. Even if your code is accessible, if it can't be run (code not containing ini files, databases, dlls, etc), it can't be maintained.

Simple but true. ;^)

posted by ruffin at 12/01/2003 04:10:00 PM



I prefer companies that actively think of their customer as a renewable resource than those who don't. Repeat business is the best business. Repeat business because you locked a customer in to your solution regardless of quality, however, doesn't count. In some non-legal sense, that's fraud.

posted by ruffin at 12/01/2003 08:59: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.