Classic ASP (older site maintenace).

July 10, 2013

Lately I’ve been charged with adding some functionality to an older internal site done with good all Classic ASP and Java Script.

What a terrible mess. I’m fortunate to have learned to hook up Visual Studio to the code so I can step through the code and find out what makes it tick.

I has been a daunting task changing anything without breaking something else. I’m writing this in the middle of a break from the madness (I exaggerate of course), just so I’ll not run the hall way screaming!

In any case, Option Strict was not turned on, so there are hundreds of variables that are not dimmed. Some are mistyped (typos not the type kind) and forms are well.. malformed!

I hope I never do this to the next guy coming behind me!

BTW, if you are good programmer and you love coding don’t ever forget what it was like when you become a manager and start thinking that everything is easy!


Time Management Mistakes

April 29, 2011

The image lists some common time management mistakes. It is by no means all there is but we have to start somewhere.

What are your ideas on overcoming some of the issues outlined here?

Perhaps you could take one or two and outline how you have overcome that particular issue.

Mind Map of Commong Time Management Mistakes

Common Time Management Mistakes

DIY Stands for your keyboard!

November 6, 2010

About a year ago, I read an article that described sitting for extended periods time and the effect on one’s metabolism.

Recently another article came out, see it here: Couch Potato

For a long time I’ve had an alarm in Outlook remind me to get up, stand, stretch every so often.

I went all out this time and made a little keyboard stand so I can… well…stand for longer periods of time.

Home Made Raised Keyboard Stand

DIY Raised Stand

Now the alarm reminds me to sit down 🙂

Since my first attempt I have now added a second section for my other monitor. Everything is good so far.

Now my setup does not compare to the adjustable tables made by this company
Adjustable Tables

I really like the one below, only problem is that it costs about $4,000 and the model is not included!

Debugging Classic ASP

October 22, 2010
How wonderful it would be if we only worked on the latest and greatest! But Alas! That is not meant to be.

I’ve been using VS2003 to debug Classic ASP web sites we still support. The ability to insert breakpoints and step through the code has been great.

Recently I decided to use VS2010 to accomplish the same thing and here is what I’ve found out so far.

Visual Studio 2010 Splash Screen

I complicated my life a little bit more 🙂

Looking around the web I found various articles that discussed the steps to accomplish said debugging.

The first thing you need to do is make sure your classic ASP site is set as the default web site in your local IIS. The built in web server will not work with classic ASP sites.

Setting it up the classic ASP site as the default website was kind of odd for me. Since that’s not how we did it when using VS2003. We would have a normal local website and just open it using VS2003.

Well it was not that easy, you would create a new project add all the folders and files to it and then run it. That has not changed, it’s just that now the website you are debugging is at the top of the hierarchy in your local IIS.
Internet Information Server Properties Window

It is also important that you click on your Configuration button for the site:

Once you’re there, click on the Debugging tab and check Enable ASP server-side script debugging as well as client-side script if you need to.

Application Configuration Window

Make sure you apply, click Ok on the previous screen and you’re site is ready to be debugged.

But if you hit the start debugging button or press F5, you’ll get all sort of nasty errors.

What you have to do is view in browser first. That’s Ctrl+Shift+W or click the View in Browser icon:

You can get to Ctrl+Shift+W through the keyboard, the icon or under the File -> View In Browser menu item. This will start your website on your browser, running on your local IIS.

You are of course not done yet. You must attach to the process. And you do that by clicking on the menu item Debug -> Attach to Process, or menu item Tools -> Attach to Process or keyboard combination of Ctrl+Alt+P.

There was a write up back in 2006 for VS2005 here: Attaching to Process

It even has some code to create a macro to bypass this Ctrl+Umpteen+More madness!

Finally stepping through code in all it’s glory in Classic ASP:

Stepping through ASP code.

Classic ASP lives on!

The OneNote experience…continued!

August 8, 2010

I recently wrote a friend of mine the following:

Dear Friend,

I hope you are doing well. I wanted to share with you this site:

It’s all about OneNote, how to use, tips etc., etc.  🙂

I have now been using OneNote for about two weeks. Everything goes in it. My personal notes, work, web stuff, code samples, troubleshooting solutions. Clippings from the web and more. I’m so enamored with this program I’ve now gone mad and recommended to fellow developers and showed them how I’m using it.

I get excited about certain things to a fault! 🙂 This program has been around since 2003. I used blogging originally as a way of writing some of my thoughts in a diary like manner. The downside was that I could not really put down very personal stuff on the web. With OneNote I now have my journal, my very own diary which is password protected and of course all the other things that go with it. Notes for the day, notes on projects and more as I mentioned before.

Hope you or someone in your team finds the link useful. There are other similar software programs, I happen to have access to this one.

One more thing, I can draw directly into this program. That’s just absolutely ‘fantaboulous’!


Your friend in tech: Otto

Screen Shot of OneNote page.

The OneNote Experience!

July 28, 2010



June 30, 2010
For some time, I have been pondering the use of NOT EXISTS in my subquery statements.

A friend of mine guided me towards this method of excluding certain records quite a while ago. So I have been using NOT EXISTS but did not quite fully understand the difference between NOT IN and NOT EXISTS.

In my particular situation a query with a four table join needed some optimizing plus certain records excluded from the query.

I played around a bit and found that using NOT EXISTS produced a substantial difference in performance. Using NOT IN on the where clause of the query took in this case 9 minutes and 35 seconds.

Using NOT EXISTS produced the results in exactly 688 milliseconds.

This is a monumental difference.

I also got a very clear understanding of what’s going on when I came across this post: NOT EXISTS vs NOT IN.

While the post ascertains that in certain circumstances, there is no difference between the two, the best thing is to test both. I will forever keep this in mind. Thanks to my colleague Bill, to Gail from SQL in the Wild and a mention to the O’Reilly book Oracle Performance Tuning which also directs you in this path. The book is authored by Mark Gurry and Peter Corrigan.

So this is what we’re talking about:

The fight between not exists and not in!

Who wins this match?

Select [columns]

From [table1]

Join [table2] on [table1.column] = [table2.column]
Join [table3] on [table1.column] = [table3.column]
Join [table4] on [table1.column] = [table4.column]

Where condition1 = ‘x’
And table1.column NOT IN ( Select [column]
From [table1] tableAlias
Where tableAlias.column = ‘xvalue’)

That took a whopping 9:35 minutes to complete.

Whereas the query below, took all of 688 milliseconds!
Select [columns]

From [table1]

Join [table2] on [table1.column] = [table2.column]
Join [table3] on [table1.column] = [table3.column]
Join [table4] on [table1.column] = [table4.column]

Where condition1 = ‘x’
And NOT EXISTS ( Select ‘xvar’
From [table1] tableAlias
Where tableAlias.column = ‘xvalue’
And tableAlias.column = table1.column)

I think in this case, we know who the winner is!