Thursday, December 06, 2007

Selecting by Date in SQL Server

Yes, I'm still around. I hadn't been working on anything new for a while, hence no posts as I figured things out.

Bloggertizer (keyword link: get paid to blog) is growing nicely; up to over 250 blogs listed now. If you own a blog, check it out.

As I mentioned in my Muay Thai Developer post, I take Muay Thai lessons. It didn't take me too long to discover how fractured the Tampa Bay Martial arts community is. Being a problem solver by nature, I decide to try to bring the community together and (keyword link: Tampa Martial Arts) was born.

Rather than build the site from scratch, I went WebWizForum, a prepackaged forum written in ASP. I chose their hosted solution for $8.00 a month, which includes a brand-free version of the forum, all set up and ready to go.

Out of the box, the site defaulted to default.asp. I wanted more of a home page to greet new visitors, so I went into the control panel and changed the default page to index.asp and wrote a custom home page that draws from forums posts.

One of the presentations I make on the home page is a list of upcoming events. I noticed the list was showing past events, event though I was using a WHERE clause that should have been filtering out past events (pseudo code):
WHERE TheDate >= Date()
Now why didn't that work?

One thing I had noticed was that the server the site was hosting on had the date default set to UK format. In the US we write December 6, 2007 as 12/6/07, in the UK it's 06/12/07. Yet my Date() was returning the right value formated to match the default set on the server.

So I ended up using a different method to sort by date. There's a built in style parameter in SQL server you can use with the convert function that converts a date to number.
This ends up with a YYYYMMDD integer (20071206 for example). Now I needed to compare it to today's date:
But guess what? If the month or day is less than 10, this returns only 1 digit; the SQL conversion returns 2, with a 0 in front if the number is less than 10. So I needed to add a 0 in front of the number if the month or day was less than 10. Easy:
What this does is put a leading 0 in front of the number, then grab the right two characters. So for a number less than 10 (6 for example) , I end up with 06, grab right two and I get 06. If the date is greater than 9, I end up with three characters, but I only grab the right two: 011 ends up as 11. So I ended up with:
WHERE convert(varchar,TheDate,112) <= "&Year()&Right("0"&Month(),2)&Right("0"&Day(),2)&" ORDER BY TheDate ASC
The result is a record set containing records where TheDate is greater than or equal to the current date.

Sunday, October 21, 2007

New Web Endeavor:

I'm always trying new stuff and here's my latest. (mandatory key phrase link: Blog Advertising) is a FREE blogger/advertising matching service like PayPerPost, Smorty or Blogsvertise, but without any fee.

It's for:
-Bloggers who want to earn extra income with their blogs
-Advertisers interested in purchasing blog posts or links

How it works for bloggers
1. Register
2. Add your blog(s) (Title, URL, Description, Tags)
3. Respond to advertiser looking to buy posts or links
4. Earn extra income by selling posts or links

How it works for advertisers
1. Register
2. Browse or search to find blogs you want to advertise on
3. Click 'Contact' to contact the blog owner
4. Get traffic and generate 'buzz' with blog posts and links

Bloggertizer cuts out the middle man and leaves the deals up to the blogger and advertiser to work out.

(another mandatory key phrase link: Advertise on blogs)

Browse Blogs by tag, date added, blog name, blog owner, or TradeRating
Search Blogs by keyword(s)
View TradeRating
View live stats for each blog with a single click (PageRank, Alexa Rank, Pages and Backlinks for Google, Yahoo and MSN)
Message Center (only share your email if you want to)
Hide blogs, users or tags
Save Blogs and create
TradeRating to keep users honest

So if you're looking for an effective advertising option, you can Hire bloggers to write for you.

If you're a blogger or an advertiser, you ought to check it out!

Wednesday, October 10, 2007

Handy-Dandy Full Text Index Stored Procedures

One of the host I use has SQL Server 2000 databases, but the Full Text Index management features through Enterprise Manager are disabled, so I have to do all my Full Text Index stuff through Query Analyzer.

Here are the stored procedures you can use to create, add tables too, and populate the index.

Handy-dany system stored procedures for setting up a full text index on SQL Server 2000:

Enable full text indexing on the database:
EXEC sp_fulltext_database  'enable'
Create a full text catalog
EXEC sp_fulltext_catalog   'FullTextCatalogName','create'
Enable full text index on a table
EXEC sp_fulltext_table 'TableName', 'create', 'FullTextCatalogName', 'PK_TableName'
Add a column to the Full Text Catalog
EXEC sp_fulltext_column    'TableName', 'ColumnName', 'add'
Activate the index
EXEC sp_fulltext_table     'TableName','activate'
Start full population
EXEC sp_fulltext_catalog   'FullTextCatalogName', 'start_full'
Set Change tracking with the Background option
EXEC sp_fulltext_table 'TableName', 'Start_change_tracking'
EXEC sp_fulltext_table 'TableName', 'Start_background_updateindex'
Note: Change tracking does not track any WRITETEXT or UPDATETEXT operations.

Friday, September 28, 2007

How to be Successful in Business and Life

Being successfully isn't as hard as you might think, especially in today's mostly courtesy- and competency-free society.

Here are four simple guidelines that will help you be successful both in your personal and professional life. If they sound deceptively simple, it's because they are. Nevertheless, if you follow these guidelines you will immediately set yourself apart and above 98% of the population:

Do what you say you are going to do
This is the only guideline that requires any thought. In order to implement this guideline, you must understand the limits of your own abilities. Before you open your mouth: don't say it if you can't do it. If you do say it, then do it.

Be on time
This is easy. It only involves one thing: when you set an appointment, show up on time (See #1). Don't set an appointment you know you can't make.

Return phone calls
This is easy too. When someone calls you, call them back.

If you aren't going to be on time, call
See rule #1. If you're going to be late or can't make it, call, apologize, and reschedule.

Wednesday, September 19, 2007

Muay Thai Developer

Muay Thai is also called Thai boxing. Much like kickboxing, except the knees and elbows are used as well. It's a very aggressive sport. I've been training for a little over three months in it, so yes, I am the actual Muay Thai Developer.

I was in a meeting yesterday and very bored, so I sketched out this comic. When I got home, I fired up Photoshop drew it.

Tuesday, September 18, 2007

So we're using Agile Development, right?

So the other day I'm sitting there, doing Software Engineering Manager things, when along comes one of the ladder rungs above me.

"Got a sec?"

I immediately raise my shields. Not much good has ever come from one of the higher rungs seeking to speak directly with me, or, heaven forbid, and actual developer. It usually meant the rung has just finished reading some industry article and has a brain stuffed full of 'best practices' and 'industry standards' which they now want to 'leverage'.

I sigh without trying to look like I'm sighing and turn away from the WAR (weekly activity report) I was putting together. "Sure."

"What's our development model?"

Ouch. Even worse than I though. Beyond tech and into processes.... I begin formulating an answer that won't make more work for me or my team.

He continues. "I just got this call from [corporate HQ] and he said all our competitors are using Agile development. He wants to know if we are too."

I shake my head regretfully and with great sorrow. "Our official process is about as far from Agile as you can get. Officially, our documented process is Waterfall, except that we skip the design and verification steps."

He looks disturbed. Obviously not the answer he wanted. "Really?"

I continue, relishing his discomfort while I can, because in the end, I'll have to give him an answer that makes him, and corporate happy; it's the only answer he will accept. Trying to lead him to the truth is, ultimately, pointless. But I can have fun making him step in some dog-doo on the journey.

"See, in Agile, you foster a cooperative relationship with the customer. The developers work directly with them to build functionality as required in quick, modular releases." He nods like he understands what I'm saying.

"But we don't do that. We make the customer submit a requirement. Then our requirements section looks at it and decides if it's valid."

More nods.

"If it is, then they validate it and pass it on to System Engineering."

More nods.

"System Engineering looks it over and then passes it to Project Management. Project Management assigns a Project Manager and then passes it to us."

More nods.

"I grab one of the developers and we call the customer and schedule a review."

I wait for him to ask why the PM doesn't do this, but he doesn't, so I continue.

"At that meeting, we take their initial requirement and begin fashioning a v-1 functional requirements document based on their immediate need."

I wait for him to ask why the requirements section doesn't do this, but he doesn't, so, I continue.

"It takes a few meetings, but we eventually complete the FRD and come up with a tentative delivery schedule."

I wait for him to ask why the PM doesn't do this, but he doesn't, so I continue.

"I pass that schedule back to the PMs."

"And then?"

"Well, then we build it. We schedule milestone reviews for the customer to look at sandbox installs as we complete the various modules. If they need changes, they can let us know right then and we can work that in for the next milestone. Along the way, we keep a test install up and running so the customer can review it."

I wait for him to ask why Systems Engineering doesn't do this, but he doesn't, so I continue.

"If there are changed to the schedule, we coordinate with the customer and pass that back to the PMs. Once we get acceptance, we deploy it to the operational network."

I again wait for him to ask why Systems Engineering doesn't do this, but he doesn't. Instead he asks, "So that's Waterfall?"

"No, I said our official process was Waterfall. What we actually end up using is closest to Iterative."

Fear shines in his eyes. "So what should I tell HQ?"

Well, I've had my fun.... "Tell them we're using the Iterative model, which is just like Agile only better because we satisfy more of the user's requirements with the first release."

He beams and goes away happy. He'll probably get a raise. Isn't software development grand?

Thursday, September 13, 2007

My Newest Web Site: Tizags, a Social Bookmarking site

Social bookmarking is system where users store links to web pages that they find useful or interesting. These links are accessible to the public or a specific network, and other people with similar interests can view the links by category, tags, or even randomly. Popular Social bookmarking sites include reddit, Digg, Newsvine, and

I don't much use the others, but I visit reddit a few times a day to see what interesting sites other people are finding out. I like reddit, but there were two main things that bugged me:

1. Their search didn't work worth a crap

2. You couldn't tag your entries; you were forced to select from their very limited list of sub-reddits if you want to try to add any classification to you submission.

So, like most egotistical developers, I decided to build my own social bookmarking site that had the features I wanted, looked the way I wanted, and worked the way I wanted. The result is Tizags.

Tizags is pretty much like any other social bookmarking site, except, of course, that I built it.

Tizags in a nutshell:

  • Registered users can submit links to interesting pages or sites
  • Outbound links are direct, no 'nofollow'
  • Tag based classification
  • A WORKING search (hear that reddit fans?)
  • Positive or negative filter by tags or user
  • Super double secret probation algo that keeps new links on the front page long enough for them to be seen (unlike reddit and digg where down voters can keep your link from ever even showing up!)
  • Report feature for inappropriate links
  • Save Links
  • Add Friends
  • Easily filter out links, link tags, or links by users

I made the site live on Friday, 7 Sep. Go check it out, tell all your friends, your enemies, the world!

Tizags Social Bookmarking

How You Know When You're Dealing with Technically Ignorant People

In the real world, I work as a software engineering manager. As high falutin' as that sounds, I'm really only one rung up from the bottom, the bottom being the software engineers themselves. Above me are four levels of local leadership and then 3 or 4 more off at corporate HQ. My immediate boss is at least technically conversant, in that you can say something technical to him and he probably knows what it means, even if he doesn't fully understand it or would be able to act on it. Once you get past him, however, the technical fluency drops as quickly as the salary goes up.

Being the SEM, I'm in meetings frequently, usually local with the next rung or three, occasionally a few rungs past that, and every now and then with the remote rungs from HQ. I was in one such meeting the other day, and growing bored with the the self-congratulatory way they were slinging around industry buzzwords, I began to keep a list every time some rung spouted some bit of nonsense or another.

So here's the list. When you hear any of the following phrases, you know you're listening to technically incompetent and ignorant people:

  • "Knowledge driven enterprise" - I preference ignorance driven enterprises myself, makes me look smarter
  • The word "leverage" in combination with anything (examples: "leverage our legacy systems", "leverage the data", "leverage our core competencies", "leverage our leverage", etc....)
  • "Real world needs" - as opposed to imaginary world needs?
  • "Share across the enterprise" - the enterprise again? Anyway, give me a good, old-fashioned stovepipe app any day, job security doncha' know. This isn't kindergarten, we don't share
  • "Maximize the workflow/our processes/our data/ etc..." - need I say more
  • "Proof of concept" - this means hiring someone outside the organization and paying them a ton of money to tell you how great your idea is
  • "Enterprise change" - I'm getting tired of the word enterprise, and, anyway, don't we fear change? Besides, I LIKE the enterprise just the way it is
  • "Marry the datasets" - That means taking two stovepipe applications you paid a ton of money for that do pretty much the same thing and spending a ton of money to build something new that does the same thing the two apps you just replaced did. And what if the datasets or the same gender? Then we have to do the development in Massachusetts....
These are just a few of the phrases that make me cringe whenever I hear them. They are also phrases that let me know me and my team will be doing a lot of work with no clear vision on the result. After all, in the oft-repeated words of the higher rungs: "they're only web pages, how long can it take?".

Thursday, August 02, 2007

How to Position a DIV at the Bottom of the Page

Most web sites have a footer - a section at the bootom of every page that contains links, copyright, maybe the dat, and other info. In a tableless design, putting this footer at the bottom is not a problem if the content of the page is longer than the page itself, but what about when you have a short content page, like a contact form or something?

In such a case, if you're using a tabless design and positioning DIVs using CSS, the footer will ride up right under the short content instead of being at the bottom of the page.

On a new site I'm working on, I ran into this. Rather than resort to the old stanrd of using a three row table, I want to position my footer using CSS only.

You can read the full post by following the the link in this post's title, but here's the code to position a DIV at the bottom of a page, regardless of how long the page content is (I've checked it in IE 6 and FF 1.5).

The CSS styles:
html {height: 100%;}
body {height: 100%;}
#nonFooter {position: relative;min-height: 100%;}
* html #nonFooter {height: 100%;}
#footer {position: relative;margin-top: -7.5em;}
<div id="nonFooter">
main content
<div id="footer">
footer content

Thursday, July 12, 2007

How to Stop a Framebreaker Script

OK, let's say you found a page and, being the good Netizen you are, you want to share the page with the audience of YOUR web site.

Like any good webmaster, you dutifully employ an iframe, with the source being the URL of the page you want to share. Alas, when you load your page, the screen refreshes and you're taken away from your site to the page you're trying to load into the iframe.

You've just been framebusted.

Framebreaker scripts are very common. Webmasters employ them to keep OTHER webmasters from re-presenting their content in another site. But for every action, there's an equal and opposite reaction.

The next time you want to load remote content into an iframe on your site, try:
<iframe src="" security="restricted"></iframe>
The SECURITY attribute in IE allows you to open a third-party page as though it was within the high-security restricted sites level as defined within IE. This means no Javascript and that means framebuster scripts won't work.

The attribute doesn't work in non-IE browsers however. Javascript framebusters function correctly in those browsers.

Monday, July 09, 2007

Monday, July 02, 2007

Windows Vista... Just Say No

As I previously mentioned, my wife's new computer arrived last Sunday, preinstalled with Windows Vista Home Premium. You can read about my experience (at least with Outlook) trying to get it set up. Seems my inital optimism at getting Outlook to work was misplaced, as Outlook wouldn't download any of her Hotmail (yes I used the Outlook Connector) and neither would Windows Live Mail beta.

Back into the breach this past weekend, this time a format and install. Twice. The result? Some sort of sync error whenever I try to download from her Hotmail account. So Hotmail no workee. Only way to check it was to go to the Hotmail site. That was late Saturday night. I fired off a scathing email to MS Support and went to bed.

So what did I do? Well, after spending Sunday playing with my son at the pool and on Playstation, I did what I said I should have done in the first place. Sunday evening, I did a quick format, popped in Windows XP, and two hours later had EVERYTHING up and running without any issues whatsoever. She's back on Outlook Express 6 (which is what she liked anyway), Office standard is installed, and all her messages, files and docs copied over from the old machine, which now does duty as a file server for backups.

So let's sum up last week's adventure:

Windows Vista Home Premium
Est. total time: 30-35 hours
End result: failure

Windows XP Pro
Est total time: 2 hours
End Result: success

Let's hope this new computer lasts as long as the old one.

I Got the Monday Working Song Blues, Vol. 4

Classic Floyd... make sure you play it for the kiddies.

Welcome to the Machine, Pink Floyd

Thursday, June 28, 2007

Windows Vista and Outlook 2003 - mapi32.dll Error Fix

I finally purchased my poor wife a new computer. She's been stuck on my old Pentium III 450 from 1999 for a couple of years now, ever since I upgraded. It's still serviceable and accomplishes what she wants, which is primarily email and some word processing, but man is it slow loading. And it won't even run some of the online flash games the kids like to play - the graphic are all jerky and stuff. Even GMail is slow because of the client side AJAX stuff it needs to do.

So I got her a new small footprint computer from Cyberpower Inc., pretty basic configuration: Socket AM2 Athalon 64 X2 3800, 1GB, 80GB drive, DVD+-RW. Came in a cool square box about the size of four shoe boxes stacked 2x2. And (deep breath) I decided to take the plunge and get it with Windows Vista Home Premium preinstalled.

It arrived in a week and I set it up last weekend. Vista comes with a free 30 day trial of Office 2007, but I already owned Office 2003 standard and I'm not interested in upgrading. So I after stumbling around in Vista for a while, I managed to set it to classic mode so it looked like Windows XP and I could actually find what I was looking for, I (in this order):

1. Installed Office 2003 Standard (Outlook, Word, PowerPoint, Excel)
2. Uninstalled the Office 2007 Trial version

Then I tried to run Outlook 2003 so I could set up her email....
Cannot start Microsoft Office Outlook. MAPI32.DLL is corrupt or the wrong version.

Outlook won't even start. All I get it that error. I'll spare you the two or so hours of research, uninstalling, re-installing, repairing and other efforts and just give you the solution that worked for me:
  • Locate the file MSMAPI32.DLL in Program Files\Common Files\System\MSMAPI\1033
  • Rename the file to something like MSMAPI32.XXX or MSMAPI32.OLD
Now restart Outlook. Hopefully you get the same result I got: Outlook showing up all nice and pretty and ready to play.

This doesn't address the further issue of setting up Outlook to work with her free Hotmail account. I know, I know, I've been trying to get her off Hotmail for years.

An aside - so far, Windows Vista has caused me nothing but headaches, mostly (I admit) because I have to fumble around to find things I know inside and out when it comes to XP or 2000. Would you believe some of the system files and folders don't even allow permissions to the Admin account?

If I had it to do over again, I would order the computer with XP Pro.

Tuesday, June 26, 2007

Retro Sneakers

Do you remember these?

Black Chuck Taylor Tennis Shoes

My daughter bought me some for Father's Day. We'd recently purchased her a pair of custom Chuck Taylor's for her birthday (xtra-high); we'd gone online and designed them ourselves (, click on the 'pencil' icon on the navigation compass). They took about 3 weeks to arrive.

When she asked for a Father's Day gift suggestion, I mentioned a pair of black high-top Chuck Taylors. With my wife's kind assistance, they were easily aquired (size 10). I opened the gift on Father's Day.

This weekend I wore them on the family outing to the YMCA. As we hiked across the parking lot towards the car, hearing the screams of the children still playing in the pool, we passed over a bit of sand. I looked back and saw my footprints, the distinctive diamond shapes from the soles of my Chucks. I was reminded of long summer days and grass stains, the smell of pine. I remembered how the fronts of the shoes would get worn smooth, the crisp white rubber fading to a washed-out gray. I would draw deisgns on the rubber, black pen usually, peace signs being in vogue at the time. Others would write the names of their favorite bands - Kiss, Rush, Led Zepplin, Supertramp....

For a the barest flicker of time I was 12 again, a new pair of sneakers on my feet, the summer wind warm on my face and my friends yelling at my side. Running so fast I didn't feel my feet touch the earth, the wind whipping my hair, watering my eyes, my breath burning in the back of my throat. For that smallest moment of time, I was there.....

Friday, June 22, 2007

SQL Server 2000 - Get Most Recent Record ID

If you're like me, you've probably wanted to get the record id of the record you just inserted. There are a few different methods of doing so depending on what database you're using, but this one is specific to SQL Server 2000. You'll have to try it yourself to see if it works on other databases. I THINK it works on Access 2000 or higher, but didn't test it. Should also work on SQL Server 2005 and 2005 Express Edition.

When you call a SQL statement, you can call multiple statements separated by a semicolon. The following is an example of a SQL statement that inserts a new record and then gets the ID assigned to that record, be it an autonumber or guid:
INSERT INTO TheTable (Field1, Field2) VALUES ('Value1','Value2'); SELECT @@IDENTITY AS NewestID
An example of how to use this would be (this assumes you've already set up your database connection and named it dbConn):
rID = ""
strSQL = ""

strSQL = "INSERT INTO TheTable (Field1, Field2) VALUES ('Value1','Value2'); SELECT @@IDENTITY AS NewestID"
set rs = dbConn.Execute(strSQL)
rID = rs("NewestID")
Now you have the record ID of your newest record in a variable!

Thursday, June 21, 2007

ASP "Save As" Dialog

Have you ever wanted to give a visitor to your web site an easy way to download a file without having to do a right click/save as? Or a way to bypass the way IE and other browsers autoload content into the browser when it recognizes the file type?

Here's a script to launch the "Save As" dialog box (teste din IE and FF). I created a file named 'save.asp'; all you do is feed it the name of the file you want to save.
qFile = ""
qFile = Request.Querystring("file")

Response.ContentType = "application/x-unknown" ' arbitrary
fn = qFile
FPath = "c:\Place\To\Save\The\File\" & fn
Response.AddHeader "Content-Disposition","attachment; filename=" & fn

Set adoStream = CreateObject("ADODB.Stream")
adoStream.Type = 1
Response.BinaryWrite adoStream.Read()
Set adoStream = Nothing

Simply pass in the name of the file you want the user to download as a querystring variable.

I'm calling it with a button instead of a link:
<input type="submit" value="Save it" onClick="window.location.href='save.asp?file=FileName'">
If you wanted to use a link, all you'd do is: <a href="save.asp?file=FileName">Save it</a>

It doesn't spawn a new browser window. It simply brings up the Save As dialog.

I've got it in action on my AddCaption site to allow visitors to easily save the image after they've added their text to it.

Wednesday, June 13, 2007

Generate a Random Letter in ASP

Generating a random number in ASP is easy; generating a random letter is just as easy.

Simply use the random number generater to generate a number between 26 and 97. This number cooresponds to the character (CHR()) of the letters a - z.

If you want to use other characters, here's a chart (use the decimal column).

Here's the function to generate a number between 2 numbers:
Function RandomNumber(LowNumber, HighNumber)
RandomNumber = Round((HighNumber - LowNumber + 1) * Rnd + LowNumber)
End Function
Assign the function to a variable and pass in the LowNumber (26) and the HighNumber (97) and convert the value returned to the character it represents:
RandomLetter = CHR(RandomNumber(97,122))
That's it!

Monday, June 11, 2007

I Got the Monday Working Song Blues, Vol. 1

Thought it might be fun to post a song that pretty much sums up how I felt this a.m., sitting in my cube, staring at the long road ahead and the dirt hole it leads to...

WARNING - contains mature lyrics!

Rage Against the Machine, Do What You Tell Me

If you have suggestions for songs about working, let's here them!

Wednesday, June 06, 2007

More on Microsoft and Web Development

If you read my recent post on Microsoft, you know my position on how they are becoming less and less of a factor in the web development community. If you're interested in seeing how Microsfot treats a hobbyist developer, check it:

Microsoft threatens its Most Valuable Professional

A sad tale of woe about a poor guy who had the nerve to try to make something for Visual Studio Express. I think, all along, most of us have had a distrust of Microsoft (and more other big corps for that matter), but it's disheartening to read they go after a guy like this.

Golly gee Microsoft, is it any wonder why CRAP.NET, and your company, is regarded with such disdain and distrust?

Tuesday, June 05, 2007

AddCaption Update

Last night I added the capability to load an image from a URL, so now you can cut and paste the URL for an image on any site, AddCaption will go get it, and then you can add a text caption to it!


Monday, June 04, 2007

Microsoft and Web Development: In Decline and Staying that Way

I got to thinking about the nature of the web this weekend as I built yet another web site in classic ASP. I started in the Internet industry in 2000 as a "web site coordinator" for an ecommerce web site. I was eager to learn dynamic programming, but wasn't getting the opportunity on the job, so I bought a book and taught myself. The first site I ever built (SFReader) is up and going strong.

As I became more adept at ASP, I began asking for opportunities to contribute on the programming side of the house at my job. Despite my developing skills and eagerness to learn more, my requests to contribute above and beyond my "web site coordinator" role went unheeded. Finally tiring of my initiative and motivation, my manager took me aside one day and said, "Dave, we hired you to be a web site coordinator, not a developer. You need to keep your focus on your main job responsibilities."

It took me three weeks to find another job. My manager seemed surprised when I turned in my resignation. Go figure....

Now, 6 years and 3 companies later, my official job title is 'Software Engineering Manager'. So in that time, I went from a hobbyist web developer to manager level. I supervise a team of 9 software engineers who develop web and database applications for a company Intranet. When I came on board in 2005, they were developing in .Net 1.1. We've since to the 2.0 framework.

Now here's the kicker: I don't know .Net.

Oh, I've got the books and know the best sites with tutorials and all that, but I've never typed a lick of .Net code. Occasionally, the realization that I need to learn .Net surfaces, not because I need it for my current job (I don't, I'm a pointy haired manager now), but because if I ever lose this sweet gig, I'll probably have to go back to programming and jobs for ASP coders are few and far between these days.

I still do web development on the side, and I still build everything I do in ASP. As far as .Net versus ASP for web development, Microsoft, IMO, went in the wrong direction. Sure, you can 'rapidly build and deploy dynamic web application', but put a .Net site out there and see how well it get crawled by the search engines with all that post back and web form and page state crap it uses.

Classic ASP was powerful and easy to learn. .NET is powerful, but certainly not easy to learn, even for experienced ASP developers. Look around the web and you'll see many of the biggest sites out there still use ASP (or PHP) and their stuff runs very well. .Net is an environment best suited for developers building object oriented web and database applications, not weekend code warriors, and it's the weekend code warriors and freelancers out there who built and are still building most of the web.

The penetration of .Net into this demographic ended up being much lower than Microsoft ever expected. A year ago, Microsoft put out Visual Web Developer, which is a free, light-weight version of Visual Studio 2005. Change the name and give it away - a cunning recruitment strategy to get people using .Net? Or a company desperate to bring hobbyist developers back into the fold?

1. Thousands of web developers have been using classic ASP for years. There's a ton of stuff developed in it and ton of resources on how to develop stuff in it. A lot of it is free. Just go to or to see all that's available.

2. All you need to start developing in ASP is a text editor. Microsoft web servers already have ASP installed, you can have an ASP page up and running in an instant, and there are no extra configuration settings or developing environment to mess with.

3. Doing a quick fix on an ASP web site is incredibly easy. If you've the cajones, you can even edit the page right on the the web server and view your results instantly. Try that on a compiled .NET web site. No fun, my programming friend. Fire up your development environment, start Visual Studio, load the project, make your edits, recompile, test. Did it work? Then redeploy the full application to the web site, restart IIS, and check the site. Did it work? Meanwhile, the ASP guy is talking to the new cute graphic artist over by the water cooler.

So by going to .Net, what Microsoft did was abandon an easily learned and implemented web development language that needed no special development environment to a much more complex, object oriented methodology that requires special tools. By doing so, they have pretty much cut out the hobby coder from the equation. The traditional webmaster now has to be a full blooded programmer just to be able to open up a user control's code-behind file to add another item to a DropDownList.

Most 'organic' developers (people who taught themselves) tend to be younger and just out of school. They have a ton of time, but not much money. They get interested in the web, what do they do? Buy Visual Studio and a computer with Windows XP for a couple of grand, or get an empty box for a few hundred dollars, load it with Linux and MySQL, and start typing PHP?

There are two types of programmers who work for me: ones like myself who, some years ago (usually 5 or more) taught themselves to program in ASP (or PHP). The demands of employment eventually forced them to .Net. The other type tends to be younger, maybe a few years out of college, but the difference is that they actually STUDIED programming, and specifically studied .Net. What I don't run into very much any more are job candidates who came up into .Net on their own.

When a neighbor or friend tells me they (or their kid, or their neighbor, or whomever) is interested in getting into web development and how should they get started, I ask what kind of web programming they envision themselves doing. If they reply, "I'd like to do stovepiped, enterprise class, scalable, Intranet applications designed to Service Oriented Architecture standards for a company Intranet" I tell them to start classes in .Net. If they say "web sites and stuff" I tell them to go buy a book on PHP and a book on MySQL.

So what's my point? Ever since Microsoft moved away from ASP to the .Net offering, there has been a continuing downward trend in programmers working in the Microsoft development environment. Newbies find .Net too hard to learn and too expensive to get started with, so they aren't picking it. ASP developers are declining as well, since the perception is that sooner or later Microsoft will stop supporting it. That leaves PHP, which continues to grow as a web development language and gain more and more programmers.

Microsoft screwed the pooch in a big way when they moved away from an easy to understand, inline coding language. The very essence that started the dynamic web is missing in .NET because it is too difficult. The hobby web developers and the newcomers face a much steeper learning curve and a more expensive startup, which usually leads them to choose another platform.

Microsoft's weak attempt to ignite .Net interest in weekend coders with their free offering of Visual Web Developer is too little and too late. As time passes, Microsoft and .Net will become less and less of a player in the open Internet community, relegated instead to the moribund development shops of major corporations, where mostly middle-aged men (who reminisce fondly about the good old days of ASP) and a few recent grads (mislead by their guidance counselors to study .Net) will grind out stovepiped OOP applications for an Intranet.

Sunday, June 03, 2007

Add Text to Image

I had an idea after reading a news article about lolpresidents, a site where people post pictures of presidents and presidential candidates with (sometimes) funny captions. I thought: "Wouldn't it be cool if there was a site where you could upload and add the text to the image right online?"

So this weekend I built it.
Add a Text Caption to an Image

You can resize images too.

Check it out....

Tuesday, March 27, 2007

Changing Table Owner in SQL Server

Something I do upon occassion, but not so often that I can remember it.

To change the owner of a table in SQL Server, open query analyzer, make sure you are in the database containing the table whose owner you want to change, and execute the following stored procedure:

sp_changeobjectowner 'TableName' , 'OwnerName'

TableName is the name of the table
OwnerName is the name of the account you want to assign ownership to

You can actually use this to change the ownership of any object in the database....

Monday, February 12, 2007

Money Making on the Web - Affiliate Marketing

Making money on the web is still very much possible, even for the hobbyist webmaster working in his or her spare time from the computer in the corner of the family room. Affiliate martketing is alive and well, albeit in a diffferent form than is was a few years before. Heck, if you've gone through all the trouble to learn ASP, you might as well try to put it to your own use!

For those of you who don't know, affiliate marketing is a method of promoting web businesses in which you are rewarded for every visitor, subscriber, customer, and/or sale you drive through your efforts. So it's sort of like traffic directing - you send the traffic, and if the custoemr completes a transaction, be it a sale or sign up, you get a cut.

Merchants like affiliate marketing because it's "pay for performance", meaning the merchant doesn't pay anything unless there are results. Some merchants run their own affiliate programs while others use third party services like Linkshare, Commission Junction, or Performics for tracking.

At it's most basic level, it works like this: You build a site about widgets becasue you collect them. You talk about them and rate them and, on your review pages, you proviode an affiliate link to a store that sells widgets. If any visitors to your website click throguh that special link and buy a widget, you get paid. Sweet.

Getting started with an affiliate program is easier than you think. Just head over to Amazon and sign up (it's called their Associates program). Then, on your blog write a review of a book you just read or a DVD movie you just watched. Amazon makes it simple to look up that product and drop in a bit of JavaScript code that will put an image of the book or movie up along with a coded link. Visitors pour into your site, read your glowing review, and hasten over to Amazon (through your link) and snap up the book. Viola! Instant Taco Bell money!

Stay tuned for more advanced money making conversations....

Friday, February 09, 2007

Some of My Sites

I’ve been pretty lax about adding new stuff to the site. I’ll try to change that. A few encouraging emails have convinced me at least more than on person is reading this thing.

It also occurred to me that visitors might be interested in seeing some of my projects. All the new ASP work I do nowadays is for my own personal projects, At work, we are on .Net 2.0. I cracked my first book this week, having finally decided that if I want to keep my job, I better get caught up!

Anyway…. Here are a few of my sites, some new, some old. WARNING: I’m a programmer, not a graphic designer! Try not to vomit on your keyboard. – this is a book review site for science fiction, fantasy and horror. It was my first ASP site and the one I used to teach myself programming. It launched in 2000. It’s grown a lot since then, with the addition a few years back of a forum that has become quite popular with SF fans and writers. It started on Access, but about a year back I finally ported it over to SQL. It gets about 500 visitors a day and remains my most popular (though one of my lowest earning) sites. You can get a free web page if you are a writer or fan of SF. I run an annual short story contest with cash prizes, and the Mother of All Speculative Fiction Directories is slowly getting bigger. It’s a fun site and I get all the free books I can read from the publishing companies! – my take on a directory site. I used some cool AJAX stuff here (yes, you CAN use AJAX with ASP!). Still offering free premium listings for kick-off, so if you have a site, submit it. – the mother of my price comparison sites. This one pulls from ALL the products in my database, which is populated with data feed inventory from over 40 merchants. For a while there, this and the niche site where doing REALLY well. Not so well any more…. Stupid search engines…. When I noticed a particular product doing well (like duvets for example), I’d break that product out into its own site ( I’ve got about 50 of them, but they are slowly expiring. Since the SERP debacle, some of them didn’t even earn back the $9.20 I paid to GoDaddy to register the name! My first SQL server site. I taught myself how to use full text indexing and how to write stored procedures with this one. – great domain name, sucky site. Pulls from the iShopHQ database. Someday I might do something worthwhile with it. Still pulls about 200 visitors a day, but I don’t know what they do there. They obviously aren’t buying anything….

So those are a few. I’ve got a ton of others, but they are all iShopHQ niche product knock-offs. The CPA and CPL I’m doing with Freetastic has given me a lot of great marketing ideas though, so I’m not done yet! I might post a little here about it, even though it’s not really ASP related.

Thursday, January 18, 2007

Form Field Focus On Page Load

Sorry for not posting in so long... I've been lazy, or, rather, busy with other stuff and lazy about RetroWebDev.

In any case, here's another (hopefully) useful tip; how to get the curser to be in a form field on a page load. I find it especially useful for admin type pages that require a log in. You can have everything ready to go for the user to just start typing.

<BODY onLoad="document.forms.MyForm.UserName.focus()">
In this example, your form would look like this:
<form method="post" name="MyForm" action="YourActionPage.asp">
<input type="text" name="UserName" size="15">
<input type="text" name="Password" size="15">
<input type="submit" value="Search">
This is a simple log in form with two fields: UserName and Password. In this example, when the page loads, the cursor will be placed in the UserName field.

Remember! JavaScript is case sensitive!