« September 2005 | Main | November 2005 »

October 28, 2005

Focusing On Real-World Problems

October 28, 2005 • Vol.27 Issue 43
Page(s) 23 in print issue

This week I gave a couple of sessions and a day-long ADO.NET workshop at VSLive in Orlando. These trips give me a chance to get away from the office and out into the real world. I find it essential to hear about the problems faced by developers working with the old, the new, the borrowed, and the blown technologies. Along the way I eat and visit with as many different groups of people as possible, as well as network with the other speakers. We trade stories and solutions and try to get a better understanding of what we should be telling our customers.

A number of common threads seem to tie these anecdotal cases together: Systems evolve over time and are often sewn together with spit, bailing wire, and COM. When companies combine, they inherit the applications and staff from their new partner. It’s like marrying a woman with a collection of Duncan Fife heirlooms; you have to figure out how to get her furniture to blend into your 1970s chrome and steel motif. Sometimes it might seem easier to find another wife.

Striking A Balance Between New & Trusted Code

Even when you work with your own company's applications that have developed over time, you're faced with the problem of getting new systems to interact with existing ones. It's a never-ending process. As each new fangled “universal solution” arrives, you have to balance the reality of your budget with the demands of the new features your staff and customers demand. Should you launch off and try this new technology? Many technical managers say the people they are trying to educate see the .NET tools and languages the same way a toddler sees a flash of metal in the sand. It’s new, shiny, and fun, and the first thing they try to do with it is stuff it into their mouth. The managers know from experience that these sparkly objects might be land mines. What’s bright and new is often untried, inexperienced, and unable to solve the problems.

We mentors and IT development managers have to figure out which of the new tools and interfaces can really help solve our problems. We need to ask: Should we try to create a single block of code that works to replace the existing code across all of the existing systems, or do we try to link these disparate systems together? Does it really make sense to have a single block of source be all things to all systems, or should we build a cohesive (albeit custom) set of code that deals with the specific reality of the platform?

Focus On What Matters Most To Developers

Every company I’ve worked with over the years has tried to leverage its investment in hardware, software, and (most importantly) skills to solve these problems. At the last SDR, I encouraged Microsoft to stabilize the development tools. In order for management or mentors to understand what works best, we all must get and stay up to speed on what the vendors (like Microsoft) have to offer and what experts and users (the consumers) outside Microsoft have to say about it.

Based on the increased number of Microsoft folks speaking at conferences nowadays, I suspect that Microsoft is worried that the message being given to developers and their managers by third-party speakers is not on target. Case in point: The VSLive conference devoted an entire hour to MARS (Multiple Active Result Sets), and they plan to repeat this session several times in upcoming conferences.

Microsoft encouraged these topics and provided the speakers, but it seems strange to me that it would want to waste time on it. MARS has many unresolved issues; I would have expected Microsoft to spend more time on the important issues that impact more developers. One of the most common problems deals with how ADO.NET 1.0 and 1.1 mismanage the connection pool. Version 2.0 fixes most of these problems, but none of the Microsoft speakers I heard discussed the new connection pooling work incorporated in the 2.0 Framework.

Very few applications failed or could not be written because MARS was not available, but thousands of developers find that their connection pool overflows during production. Microsoft worked hard to fix these pooling issues, but I guess bug fixes don’t have the same marketing appeal as MARS. After all, Oracle has had it for years; SQL Server did not. Microsoft needs to stop worrying about shapes for its .NET taillights and start figuring out what makes the cruise control disable the brakes at 85mph.

October 27, 2005

re: Concurrency and ADO.NET

Ah, no. You can't pass an array to an IN clause--especially not with a JET database. You can't really pass an array to any procedure in JET or SQL Server. There is no corresponding type that's an array. There are ways to address the "IN" clause issue but they require creating an ad hoc query on the fly and populating it with the arguments. This is dangerous as it can lead to SQL injection attacks. In SQL Server you can pass a delimited string and parse it with a function (returning a Table) and use that with an IN clause, but this is not an option with JET.
I suggest asking technical questions on the Microsoft newsgroups. You'll get better response time...

re: Concurrency and ADO.NET

I apologize for cross posting, this is just driving me crazy. I have been
beating myself up all day trying to find one good example of adArray as part
of a parameter. I went this route.

Sub Test1()
dim cn as new adodb.Connection
dim s$
s = "Provider=Microsoft.Jet.OleDb.4.0; Data Source = somefile.mdb;"
cn.Open s

dim cmd as new adodb.Command
with cmd
..ActiveConnection = cn
.CommandText = "SELECT CompanyName From [Names] WHERE NameType IN ?"
.CommandType = adCmdText
End With

Dim ax() As String
ReDim ax(1) As String
ax(0) = "Member"
ax(1) = "Exhibitor"

With prm1
.Type = 8392 'Errors right about here, I want the Array ( ax() in
this example ) to provide the parameter values for an SQL IN Clause
.Direction = adParamInput
.Size = 20
.Value = ax()
End With

cmd.Parameters.Append prm1

Dim rs As New ADODB.Recordset
rs.Open cmd, , adOpenStatic, adLockPessimistic

Debug.Print rs.RecordCount

rs.Close
Set rs = Nothing

cn.Close
Set cn = Nothing

End Sub

I have also tried cmd.Parameters.Append cmd.CreateParameter(, adArray or
adVarChar, adParamInput, 20, az()). I get an error saying wrong type of
arguments. I have tried just about possible DataType in the Array, Also
tried adVarray + adVarChar, still doen't worh right.

Any ideas? If you see anything obvious or any suggestions to try it a
different way, please let me know. Thank you to all whom reply.

Regards,

October 25, 2005

OT: vb:feeds

I wouldn't normally recommend subscribing to an aggregate feed, but I'm giving vbfeeds a try (via Bill...

October 21, 2005

re: Haunted Keyboard -- Backspace and Delete key stop working (Whidbey)

These issues have all been repaired in the current builds. In the September CTP the fix is to use fixed-pitch fonts. In the earlier CTPs if you ALT right-click on the menu, the keyboard should unlock.

re: Haunted Keyboard -- Backspace and Delete key stop working (Whidbey)

I didn't get really the solution. can you explain more please?

re: Finally, my ThinkPad is backed up and restored.

That's just what I'm saying. I downloaded the R&R program from the Lenovo site and use it to save an image of my T40 drive. It's persisted to a large USB 2.0 hard drive. WARNING: R&R formats the drive on first use. After that you can boot from the drive and choose the image you want. Note that these are not really images in the binary sense. They are composite backups. This means you can still choose an image to restore but you have to keep all previous backups as these are used to create the restored image later. I find this program fast and safe--and more importantly, it works where Ghost does not (in this case). No, I have not tried the new Ghost 10. I'm probably not going to stay with Ghost (or Symantec) because their support people (in India or Whoknowswhereistan) are, well... unacceptable.

October 20, 2005

re: Finally, my ThinkPad is backed up and restored.

Are you saying there is no way for me to Disk-To-Disk two hard drives using Ghost for my IBM Thinkpad X30? Ive tried it 6 times now with different configs and I cant get the new drive to boot. Im trying the Seagate Momentus 5400.2 100gb and the Hitachi 7500rpm 60gb. So... I have to use my network to do all this? How did you get the IBM Rescue and Recover to reconnect and restore the original data that was backed up?

Bradley

October 12, 2005

re: Vista, The Start Button and Filth in the Rivers

From what I hear about the Office 12 UI makeover, it appears to me that the "new kids" have taken over the asylum. (For better or worse.)

--rj

October 09, 2005

re: VersaPak Tools are Discontinued--Customers Left in the Lurch

Ah, the batteries are not the problem. It's the accessories that go with them. No, I have not found any more flashlights for them. It's too bad the flashlights that were available were so shoddy that they didn't last but a few years. They all failed the same way.

re: VersaPak Tools are Discontinued--Customers Left in the Lurch

Bill,
VERSAPAK batteries are still available many places (Home Depot, Lowe's, Best's, Amazon--prices all the way from $19 down to $7, depending on whether gold or silver).

I am interested in trying to locate the
flashlights (new/used) and having much difficulty.

I am new to your Blog, Bill. Would like to hear more.

Gary

October 05, 2005

re: Katrina and How we Got into this Mess

Again - it's hard to argue b/c I fundamentally agree with your conclusion. No bid contracts have and always will be a huge grease off for political cronies. The cruise ship stuff is absolutely unreal. The even worse one is the building of trailers (mobile homes) that won't even be ready for another year - and is only going to cause the same problems that plague housing projects to plague these places. There's soooo much wrong here it's sick - I just happen to think that it's both parties and both parties friends that are getting rich off of it.

As far as Kyoto - you have to give Bush a pass on that one though bill. 95-0 in the Senate - 95-0 means ratification was dead before it was even breathing. When Clinton signed it, he knew that it had 0 chance of passing the Senate or getting approved and was particularly uncool b/c he played the "Look, I'm a good guy, it's this awful Senate that's the problem here" card. However I'd be willing to bet big on this, if India and China were also subject to it - it'd probably have a decent chance of passing. Then again, look at Europe - although it's been ratified in most contries in the recent past, it's being phased in mighty slowwwwwly and for most of the years they were yelling about how evil we Americans were for not signing it, they hadn't done squat other than pay lip service to it.

On a brighter note though - i heard this morning on Right Wing NPR (Wall Street Jounal Mornings on XM) that California is giving out HUGE tax incentives for energy efficient homes, buildings and vehicles. I suspect this will be the beginning of a much larger trend and if govt finally puts its money where it's mouth is - then we might actually start losing some of our dependence on oil and the corrupt aholes that run oil producing countries (and the corrupt aholes here in our country that run them).

October 04, 2005

re: Katrina and How we Got into this Mess

Bill: You know I got nothing but respect for you man, but I think you're off here. And I'm not disagreeing with your conclusion, it's just the premise that I don't buy. [And although I'm loathe to defend Bush, Ken Lay had just as many friends on the Dems side as the Republicans as do most of the oil barons. The energy companies (and the Saudi's for that matter) are quite cozy with whoever is in power in Washington - that's not something reserved just for Bush). But to the point about elevated sea levels... (please tell me you aren't citing the same NPR that my parents used to listen.. that told me when I was a kid that we were going to die of overpopulation a la Erlich, or that we were going to freeze b/c the atmosphere was being depleted. It was Global Winter back then. NPR, at least for my lifetime has always had some fetish with Atmospheric catastrophes).


Being a native Miami boy, I had quite a bit of experience with Hurricanes and we actually learned quite a bit about them in elementary school. If you check out www.nhc.noaa.gov/pastdec.shtml? you'll see that from 1941-50 there were 24 big hurricanes 10 of which were category 3 and above. 92 major hurricanes have hit the states since we've been a country, and and 61 of them were before 1950... that's roughly 2/3 of them.

I'm in no way saying we don't waste too much energy as a country. I'm not making any commentary on Halliburton or the war. I'm simply saying that back in the 70's when I was a kid, I learned about the hurricane cycle which and if I remember correctly, it's typically 20-40 year patterns of accelerated activity and then relative remission for approximately the same time period. My parents have a high rise condo right on the water in Miami, and have had it for my entire life. No hurricane caused one penny's worth of damage there and I'll be dead and gone by the time one does in all likelihood.

There's enough real stuff to blame Bush for - causing this hurricane is not one of them and any future ones won't be caused by us.