Friday, June 04, 2004

To finish a point I was making earlier (and he quotes (like anyone cares (oh dangit, did the French overparenthesizing again)):

[quote]

I also have oodles of old material from the long-lost sjoerd.org website to recycle. sjoerd.org was, in a way, my blog before blogging existed. I abandoned it because I was too far ahead of my time (okay, life happened and I did not have time... get off my back, please). However, it was very, very popular with Microsoft employees.

[slash quote]

When I had my own site, sjoerd.org (only taking it because sjoerd.com was unavailable... and oh goody goody goody, look at what was blocking my registration... and I begged this guy, but noooo, he had plans; wait, did I mention there are some people that need to be stabbed to death with a piece of pocket lint (yes that would take a few weeks -- that's the entire fershnikkedthe point, dangit)), so to remind you, when I had this site to exercise my ASP (no .NET) skills, I was also a programmer.

Well, the emphasis on that just lost its way, did a pirouette and landed four-square on the wrong friggin' part of the sentence.

The point being that when I was blogging avant la lettre, I was also doing a lot of Beta Testing. From Visual Basic 4.0 until Visual Basic .NET 2002, I was involved from the first betas onwards. I hosted TUSUC, my Visual Basic .NET 2002 Beta 1 version of "The Ultimate Silly Unit Converter". And if I say so myself, it friggin' rocked. OSDN or SourceForge be damned, nine people were contributing to the source code, ON A BETA 1 RELEASE, ON AN APPLICATION THAT WOULD NEVER MAKE A DIME, OUT OF LOVE OF THE DEVELOPMENT ENVIRONMENT. I would get between 60-150 distinct sessions daily out of microsoft.com. The only person I could identify as having visited my site was Peter Torr (who by now has a much better blog than my site ever was). Life was good. People at Microsoft were paying attention to me and (I like to think) liked what I wrote (because, as the weblogs revealed, people read EVERYTHING on my site once they got interested...). My life was good. I was half an inch a way from an invitation to Redmond. I felt the way Rory must feel. Or maybe that's just my inimitable modesty attempting to draw a comparison between someone as lofty as I am and him, being witty and at least moderately accomplished and all. Yes, that is sarcasm. And yes, that means I would dearly love buying Rory a few bottles of things that are bad for the liver if he ever gets in the general vicinity of Sacramento.

Anyway, between Beta 1 and Beta 2, they did the AndAlso/OrElse thing for Beta 2 (I will blog about this later)... and I was done. Man, stick a fork in me and roll me over and I was done. That was insulting to every single VB programmer in the world. Like, um, "we think this is just waaaayyyy too difficult for you, so we'll mess up any good this might have for you" kind of insult. (Okay, they had some points why they changed it, not in the least the general Internet outcry -- but they listened to the wrong people: people who were about to abandon VB anyway). Nowadays, give me one, single advantage of VB, Paul Vick. One that is not IDE-related.

I dare ya. (Actually, I want you to prove me wrong here. I have 9 years of VB experience, and it breaks my heart having to leave it lately -- there's some SERIOUS emotional investment here! The things I wrote in VB 3.0 and 4.0...).

Oh man, am I mad now. There were 6 more paragraphs after this, but blogger decided to die. Anyone out there with real blog hosting that doesn't die? And has RSS?

Remember that fork? It's in me now. Bleh. Done.

SQL Server 2000's IsNumeric LIES!

Quoth the Books Online:

Remarks
ISNUMERIC returns 1 when the input expression evaluates to a valid integer, floating point number, money or decimal type; otherwise it returns 0. A return value of 1 guarantees that expression can be converted to one of these numeric types.

[ emphasis mine ]


Now try this in Query Analyzer:

Select IsNumeric('.')

...which returns 1. So, for bonus points, what does this do?

Select Cast('.' As Numeric)

...an error. Wonderful. Lies, lies, lies. This function could be in the Bush administration!

Thursday, June 03, 2004

Visual Studio 2003 or 2005?

So everyone is abuzz over the Visual Studio 2005 Team System. Imagine my surprise to see, in Visual Studio 2003, in the C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\VS SCC\1033 folder, VisualStudioTeamCoreUI.Dll...

Guess they've been working on it for a while.

Actually, the most amazing thing is that the name hasn't changed in over two years! Is the marketing department ill, or were they the first against the wall when the revolution came(*)? Of course, that's assuming all kinds of things, but speculation is fun.

Even funner would be to get an answer from someone on the Visual Studio team, but the odds of them -- actually, anyone -- finding this blog are not that good.

(*) Yes, that's a Hitchhiker's Guide To The Galaxy reference.

Tuesday, May 18, 2004

Coherence

I just realized that I sound spectacularly incoherent in my previous two posts. After much soul-searching, I have determined that:

- I have a lot of things to say (yes, dear peanut gallery, that has nothing to do with whether these things are worth saying in the first place, thank you)

- I ramble.

To remedy the situation, I have come up with the following program:

1. Organize my thoughts before I post.

I think this 1 step program will help me achieve the lofty goal of coherence.

Or, to put it another way: please stay tuned -- I intend to make sense.

Some day.

User profiles

Here's what Longhorn needs: user profiles.

What I'm envisioning is that after setup is complete (i.e., upon first logon), the system asks you what you are: a normal user, a power user or an IT professional. It then sets up Explorer, IE and the likes to do all the things in the profile's typical ways. For example, for IT professional, uncheck Hide extensions for known file types, Show hidden files, uncheck Hide system files... you know, all the stuff experienced users do EVERY DIGGETYDANGED TIME they log on to a new box.

And maybe a few extras, like dunking the user into the Advanced dialogs for networking. I mean, for the love of Pete, Mike, your favorite deity and his or her son (if applicable), how many times does one have to click on Advanced buttons or tabs in Windows XP to get to a usable and/or familiar dialog?

Sheesh. Okay, end side rant.

Come to think of it, this can be done for XP as well. As an add-on. An easy one, too. What you need is:

- An configuration file with all relevant registry keys to export
- A small utility to export those keys to a .Reg file (preferably with a web option -- imagine logging on to a Windows 2000/XP box and just typing in www.mysite.com/my.reg, Open, and presto... ooohhh... aaahhh...)

Wait a second. I could write that and make some money! Ah well. Too late. I've spent too much time positing the idea here anyway (about as much time as it would take to write the damned thing, by now).

But for now, I'll settle for Scoble to push this up the chain for Longhorn. Robert (can I call you Robert? (can I call you anything? (oh, dangit, I'm doing the nested parentheses thing (if it doesn't sound familiar, you do not know your big-nosed Frenchmen very well (aaaaghhhh! L'infection!)))))

Right. Anyway, I have much more to say about Scoble, Rory, Longhorn and the likes. I also have lots of introducing myself to do. I also have oodles of old material from the long-lost sjoerd.org website to recycle. sjoerd.org was, in a way, my blog before blogging existed. I abandoned it because I was too far ahead of my time (okay, life happened and I did not have time... get off my back, please). However, it was very, very popular with Microsoft employees.

But more on that later.

Monday, May 17, 2004

The olden days

...and on the 32nd try, he found an available blog URL. 220 did the trick.

What better way to start off a blog with a blast from the past?

In the bad old days, I messed around with MASM, GWBasic, QBasic, Turbo Pascal, Turbo Prolog... Whatever I could get my grubby little hands on. Then, around '92-'93, Kijk Magazine started running SuperLiners: a monthly feature of whatever can be accomplished in 50 lines of code in whatever language.

And I had never written a Tetris. Everyone should write a Tetris. Right?

Ah, when the stars align... it's a wonderful thing. Behold. And shiver.

The fun part is: it still runs, provided you can find an old Win9x box with QBasic on it. (And, of course, get rid of the crazy line-breaks this site insists on inserting). Enjoy.



SCREEN 0, 1: WIDTH 40: KEY OFF: COLOR 15, 0: CLS : CLEAR : DEFINT A-Z: E$ = CHR$(219)
PRINT "Score", , , , "Lijn", , " 0", , "Next", , , , , , , , , , "Level", , " 0", , "(c) 1992"
FOR I = 1 TO 23: LOCATE I, 13: PRINT E$; : COLOR 0: PRINT STRING$(12, E$); : COLOR 15
PRINT E$; : NEXT I: PRINT " Stats", "GW-Tetris 3 "; STRING$(14, E$); "Sjoerd Verweij";
READ N: DIM P$(N, 4), R(N, 4, 4, 4), Q(N), H(N, 4), B(N, 4), A(24), M(N), F$(3), D(3), C(4)
FOR I = 1 TO 3: READ F$(I), D(I): NEXT: FOR I = 1 TO 4: READ C(I): NEXT
FOR H = 1 TO N: READ W$: Q(H) = LEN(W$) / 16: FOR I = 1 TO Q(H): READ K$
RANDOMIZE -TIMER * RND: FOR G = 1 TO LEN(K$)
P$(H, I) = P$(H, I) + CHR$(C(VAL(MID$(K$, G, 1)))): NEXT: FOR J = 1 TO 4
IF (INSTR(MID$(W$, (I - 1) * 16 + (J - 1) * 4 + 1, 4), "1") > 0) THEN H(H, I) = H(H, I) + 1
FOR K = 1 TO 4: C$ = MID$(W$, (I - 1) * 16 + (J - 1) * 4 + K, 1)
R(H, I, J, K) = VAL(C$): IF C$ = "1" AND B(H, I) < K THEN B(H, I) = K
NEXT K, J, I, H: T# = 1.5: RANDOMIZE -TIMER: B1 = 5
24 B = B1: X = 2: Y = 6: S = 1: GOSUB 49: B2 = B: B1 = INT(RND * N) + 1: B = B1: GOSUB 48: B = B2: Y = 0: X = 20
SC! = SC! + Q(B) * INT(RND * 15): COLOR 15: LOCATE 2, 1: PRINT SC!; : M(B) = M(B) + 1
IF M(B) / 5 = M(B) \ 5 AND M(B) < 100 THEN COLOR B: LOCATE 23 - M(B) / 5, B + 27: PRINT E$;
27 Y = Y + 1: T1! = TIMER: GOSUB 48: WHILE T1! + T# > TIMER
Z$ = INKEY$: IF LEN(Z$) > 1 THEN Z = ASC(RIGHT$(Z$, 1)) - 70 ELSE Z = ASC(Z$ + CHR$(0)) - 23
IF Z = -10 THEN O = 0: U = S: W = X: V = Y - 1: WHILE O = 0: V = V + 1: GOSUB 45: WEND: Y = V - 1: T1! = T1! - 3
IF Z = 10 THEN T1! = T1! - 3
IF Z = 5 THEN GOSUB 41 ELSE IF Z = 9 THEN GOSUB 42 ELSE IF Z = 7 THEN GOSUB 44
WEND: U = S: V = Y + 1: W = X: GOSUB 45: IF O = 0 THEN 27
ON (Y > 1) + 1 GOTO 39: GOSUB 48: FOR I = 0 TO H(B, S) - 1: FOR J = 0 TO B(B, S) - 1
A(Y + I) = A(Y + I) + R(B, S, I + 1, J + 1) * (2 ^ (X + J - 14)): NEXT J, I: M = 0: FOR H = Y TO 23
IF A(H) = 4095 THEN GOSUB 50: M = M + 1: SC! = SC! + INT(RND * 100)
NEXT: IF M < 2 THEN 24
COLOR 15: LOCATE 15, 1: PRINT F$(M - 1); : SC! = SC! + D(M - 1): NU! = TIMER
WHILE TIMER < NU! + 1.25: WEND: LOCATE 15, 1: PRINT SPC(10); : GOTO 24
39 CLS : COLOR 14, 0: PRINT "Volgens mij ben je dood! Nog eens?": I$ = INPUT$(1)
IF I$ = "j" OR I$ = "J" THEN RUN ELSE WIDTH 80: CLS : KEY ON: END
41 U = S: V = Y: W = X - 1: GOSUB 45: X = X + (O = 0): GOSUB 48: RETURN
42 U = S + 1: IF U > Q(B) THEN U = 1
V = Y: W = X: GOSUB 45: S = -(O = 0) + (S AND (S < Q(B) OR O = 1)): GOSUB 48: RETURN
44 U = S: V = Y: W = X + 1: GOSUB 45: X = X - (O = 0): GOSUB 48: RETURN
45 GOSUB 49: O = -(W > 27 - B(B, S)) - (W < 14): FOR I = 0 TO H(B, U) - 1: FOR J = 0 TO B(B, U) - 1
IF R(B, U, I + 1, J + 1) = 1 AND SCREEN(V + I, W + J, 1) > 0 THEN O = 1
NEXT J, I: RETURN
48 COLOR B: LOCATE Y, X: PRINT P$(B, S); : COLOR 15: RETURN
49 COLOR 0: LOCATE Y, X: PRINT P$(B, S); : COLOR 15: RETURN
50 D = D + 1: FOR I = H TO 2 STEP -1: A(I) = A(I - 1): FOR J = 14 TO 25: LOCATE I, J
COLOR SCREEN(I - 1, J, 1): PRINT E$; : NEXT J, I: SOUND 1000, 1: LOCATE 4, 1: COLOR 15
PRINT D; : IF D / 20 = D \ 20 THEN T# = T# * .7: SOUND 2000, 2: L = L + 1: LOCATE 11, 1: PRINT L
ON (L > 3 AND D / 15 = D \ 15) + 1 GOTO 56: FOR I = 2 TO 23: FOR J = 14 TO 25: LOCATE I, J
COLOR SCREEN(I + 1, J, 1): PRINT E$; : NEXT: A(I) = A(I + 1): NEXT: SOUND 100, 1: COLOR 0
LOCATE 23, 14: IF L < 8 THEN PRINT STRING$(12, E$);
56 RETURN: DATA 7,DOUBLE,150,TRIPLE,300,TETRIS,900,28,219,29,31
DATA 1100110000000000,2243322,11110000000000001000100010001000,2222,2432432432,0100111000000000100011001000000011100100000000000100110001000000,12433222,243224332,2224332,1243322432
DATA 1110100000000000110001000100000000101110000000001000100011000000,22243332,22432432,1124333222,24324322,1110001000000000010001001100000010001110000000001100100010000000,222432,1243243322,243222,224332432
DATA 01101100000000001000110001000000,122433322,24322432,11000110000000000100110010000000,224322,12433224332


If anyone has the original code (this is a somewhat sanitized version I grabbed from the Web), I'd be much obliged. I think it was published in the June 1994 edition of Kijk.

PS: Sorry for the mondo-extendo action you will experience on this page because of this listing. It had to be done. Did I mention I was sorry?