OdeToCode IC Logo

AppDomains and ASP.NET

Monday, December 6, 2004 by scott

Thanks to Jason Haley for the kind words about OdeToCode.

 Today I responded to some questions I’ve gotten over the last week with a little something entitled “What ASP.NET Programmers Should Know About Application Domains”. I hope you like it.

 

Thinking Ahead

Sunday, December 5, 2004 by scott

Local carpenters have rebuilt the Ise Jingu shrine in Japan every 20 years since 690. The 62nd rebuilding will start in 2013, and will take about 8 years.

Twenty years seems like a terribly short time for a shrine to be around. A common mortgage term in the U.S. is 30 years. We’d be upset if we had to rebuild our homes every 20 years.

On the other hand, twenty years is a terribly long time in software. Even 5 years can be a stretch. Off hand I can only think of 1 major piece of Microsoft software that has remained the “latest and greatest” for a 5 year stretch: SQL Server 2000 (and this is just a guess, but I don’t think it was in the master plan to ride that horse for 5 years).

Today I was thinking: what I would do if someone asked me to write software that would last for 20 years? Andy has me thinking about this, thanks to his recent comment.

If I go backwards 20 years I’d be bumping up against the fringe of my computing experience. If someone asked me then to write software to last for 20 years I’d have no choice but to write in Basic on a Texas Instruments 99 4/A. If customers were still using the software they’d have to buy spare parts from eBay, or (more likely), run the software on a PC under emulation.

How could I develop software today to last 20 years and have some isolation from the aggressive innovations in platforms and runtimes and preferably never even re-compile the code?

C++ offers me a ubiquitous, standardized language, but it’s hard to write portable code, harder still to write portable GUI code, and tediously hard to write portable GUI code without a dangling pointer lurking. Recompiles for a different architecture are required. If I were to just target Windows XP - can it still run in 20 years? Maybe. Ben Armstrong has Windows 2.03 running on a Virtual PC today.

Java takes care of dangling pointers and runs on many platforms, but is not a standardized language. If IBM ever talks Sun into turning Java open source, it would certainly look more attractive. There is a healthy amount of community and open source activity around Java today, which is always encouraging, but in 20 years Sun's lawyers might complete the mission of suing every supporter.  

Then there is .NET. At least one language, C#, is standardized. There are open source implementations of the runtime from outside of Microsoft, but writing a GUI with portable code is still problematic, and the rate of change is still high. There are also the rumors that a future OS version will only support one version of the runtime. Would my program still work there?

Some ASP.NET applications are now working on both mono and the MS runtime from the same code base, but don’t get me started on web applications. If, in 20 years, people are still writing applications by throwing HTML, DHTML, JavaScript, cookies, and cascading style sheets into a blender and hitting the ‘stir gently’ button, then the entire industry should retire and become dentists. We couldn’t do any worse then the one working on Chris Sell’s son. Actually, the thought of being a dentist terrifies me. Instead, I think I’ll be a taxi driver - at least I can talk to new and interesting people without them having cotten in thier mouth.

In the end, I’d have to think both .NET and Java would undergo major breaking changes in at least 10 to 15 years. I have a feeling C++ will still be chugging along, but my crystal ball manufacturer does not have a good track record.

To really look ahead, visit the page of the Long Now Foundation and think about the challenges of building a clock to last 10,000 years. How do you power the clock? How do you provide instructions for someone to maintain the clock? What do you do to lessen the risk of damage from earthquakes and roving, juiced up teenagers?

Speaking Of Blogger Power

Friday, December 3, 2004 by scott

If you’ve never heard of a company named MEDITECH, it doesn’t surprise me. You might be surprised, however, to know they are one of the largest enterprise-scale software vendors in the healthcare industry. They are a private company and go quietly about their business.

With such a quiet reputation, it was surprising to see their President and COO accept an invitation for an interview. Not just any interview, but an interview with a blogger – and an anonymous blogger no less. You can read the interview over on HISTalk, which always has juicy tidbits about the healthcare IT space from someone in the know.

I had the opportunity to sit and talk software architecture with Mr. Messing earlier this year. I can tell you he is not a fan of the .NET platform. Seeing as how they build everything from scratch (and I mean scratch), this is not surprising. The approach affords them a great deal of independence, but you have to wonder how long one company can keep up.

I'm Grumpy?

Friday, December 3, 2004 by scott

A couple days ago, my editor at Packt sent me an email and described my blogging as “grumpy”.

Wow! I never thought of myself as a grumpy type. I took an informal poll among co-workers and 3 out of 3 people said I did not fall into the grumpy category.

The next day at work, the CEO came in and announced the need for a “get on the same page” type of meeting. The meeting time was 12 noon, and he ordered food to be delivered. The food, he explained (while looking directly at me), was because “some of you get grumpy when you’re hungry”.

Wow! Two accusations of grumpiness in as many days. Sure, my demeanor might change a bit when I am hungry – but it’s just the survival instincts I inherited from my Paleolithic ancestors who killed bison with their bare hands and ate the raw meat.

In the future I plan to start making some very subtle changes in my blog posts. Sometimes just tweaking the environment slightly can dramatically change perceptions. Hopefully you’ll come away with a smile on your face, and not feel you’ve been listening to the rantings of a grump on a soapbox.


ISNULL versus COALESCE

Wednesday, December 1, 2004 by scott
SQLJunkie Adam Machanic has a good analysis of the SQL functions ISNULL and COALESCE, both of which we can use to replace NULL values in T-SQL.

I wasn't aware of the perf difference, but I quit using ISNULL when it bit me in some code I was using to extract records from a client’s database. They had a field allowing NULL values where we did not. I was using something like the following batch, which has a bug.

CREATE TABLE #Foos
(
  FooID int PRIMARY KEY IDENTITY,
  FooDescription varchar(5) NULL
)
 
CREATE TABLE #Bars
(
  BarID int PRIMARY KEY IDENTITY,
  BarDescription varchar(15) NOT NULL
)
 
INSERT INTO #Foos (FooDescription) VALUES(NULL)
INSERT INTO #Foos (FooDescription) VALUES(NULL)
 
INSERT INTO #Bars (BarDescription)
  SELECT ISNULL(FooDescription, 'No Description')
  FROM #Foos
 
INSERT INTO #Bars (BarDescription)
  SELECT COALESCE(FooDescription, 'No Description')
  FROM #Foos
            
 
SELECT BarID, BarDescription FROM #Bars
 
DROP TABLE #Bars
DROP TABLE #Foos

The resultset from the previous batch will make my bug stand out:

1          No De
2          No De
3          No Description
4          No Description

Oops. ISNULL apparently truncates the replacement value (2nd parameter) to the size of the check expression (1st parameter), while COALESCE does not. Long live COALESCE.

OdeToCode News

Tuesday, November 30, 2004 by otcnews
  • AnandTech says ASP.NET is scalable and has numbers to prove it.
  • Michael Giagnocavo demonstrates the crack of an obfuscated .NET assembly.
  • Don Box unveils the “universal web method“.
  • DonXML fights back against bad XmlTextReader code examples.
  • Brendan Tompkins points to the latest release of SourceGear Vault.
  • Bruce Schneier has a different take on the security holes around Goggle desktop.
  • Rico has one rule for using GC.Collect: DON'T! Ok, really there are two rules, but you'll have to read to find out the second rule.

Arrogance

Tuesday, November 30, 2004 by scott

Richard Morin wrote in the Washington Post:

“…perhaps people will start ignoring the bloggers, who proved once more that their spectacular lack of judgment is matched only by their abundant arrogance.”

This line from the article “Surveying The Damage” spent time bashing bloggers who released early exit poll data on the U.S. presidential race.

I read this line thinking Richard Morin had blogging envy and was taking a few shots at the competition. Then I listened to two IT Conversation podcasts and started to agree. The podcasts were the Election 2004 session from BloggerCon III, and the Gillmor Gang’s interview with eBay tech evangelist Jeff McManus. There was more than one voice in these shows demonstrating a self-important arrogance.

If bloggers can convince politicians to blog, perhaps some good could result. If bloggers want to ram blogging and podcasting down everyone’s throats as the solution to all political, marketing, and business problems, then I don’t think they will get very far.

Poking fun at people who “just don’t get it” doesn’t work either.

Persistence and favorable results do work.

I think blogs are working extremely well in the tech community. I’ve made a number of friends I’ve never met (but hope to), and there is a great community atmosphere. It's passion, not arrogance, which makes it fun.