Sunday, January 21, 2007

The .Net Evolution

If you’re a programmer, or someone interested in programming, then you’ve no doubt been subjected to the battles over the years regarding which programming language is the “best”.

Years ago I started using Basic, so it was quite natural for me to select Visual Basic as my language of choice when I decided to get reacquainted with coding. There are strong opinions over which is better – Visual Basic or C++. C++ programmers love the control they have with their language and how fast their compiled code runs in relation to VB.

VB’ers, on the other hand, are all about getting their project completed and up & running quickly. VB allows a coder to create and implement a form (the “screen” the user interfaces with) very quickly, and with much less pain than is required with C++. And I do suspect that VB doesn’t execute quite as quickly code that is heavy on calculations. But many VB applications are not about speed – they’re about responding to the user’s input.

But then came along .Net. Microsoft created the .Net Framework which is a suite of tools that permit a coder to work in any of several different languages, such as VB.Net, C++.Net and C#.Net, and then essentially compiles all of these into a very similar, if not identical, machine code, the language that a computer really uses – 0’s and 1’s.

This obviously suggests that there is no longer a speed advantage using the C++ language. I’m sure there are plenty of readers who will want to dispute that point. I welcome all such comments. My intent with these writings is to help educate, and that includes me!

I don’t by any means want to start a war, but if it is a fact that VB.Net is now as fast, or nearly as fast, as C++.Net, then I’d be hard-pressed to suggest that anyone new to coding would select any language other than VB as their tool of choice.

I am often utterly amazed at how quickly I can take a vision in my mind and turn it into a functioning reality in an hour or two with VB.Net.

If you have a differing opinion, please share it with us.

So after my first project, Run for the Roses, was complete, and I had established a vision for my next project, I purchased the .Net suite of programming languages – Visual Studio 2003 to be specific. The first thing I realized was that this new version of VB was a fair amount different than VB6. Every time I need to create a variable array, for instance, I have to go peek at how to do that. And to let one class “see” another class you have to create another class to act as the conduit. That probably makes no sense to anyone who doesn’t program, but suffice it to say that Microsoft could have made my life a bit easier if they had made a few more tweaks to things that should be very simple…

On the flip side, I definitely like the IDE a lot better than that of VB6. The IDE is the Integrated Development Environment. That’s where you actually write your code. The IDE is a suite of tools that assists you in writing your code correctly, by showing you errors as you make them, by creating forms – the user interface- and all the other things you do to create an application.

Once you write some code, you then click a button to “compile” your code. This is when .Net takes your human language code and converts it to the language of the computer – 0’s and 1’s. This is also when the .exe file is created – the executable file. Once compiled, you click on the exe file to run your newly-created program.

I’ve written previously about all the books I’ve acquired and read through my technological journeys. I typically would run out and buy two or three 1200 – 1400 page behemoths to have on hand for those times when I hit a roadblock. You have to have two or three volumes because there is never one book that covers most of what you need. Some specialize in this, some in that.

But you know, what I find myself doing most often these days is checking the help that is integrated into the VB IDE, which is often cryptic and sometimes incomplete, and if I don’t get the answer I need there then I jump to Google and search for the answer there. Rather than start into one of my behemoths.

I’ll search for something like: “allintext: vb.net textbox text validate” and I’ll almost always get two or three ways to do what I wanted to do. By the way, if you use Google always start your search with “allintext:”. This will ensure that only links come up that include ALL of your search words on the linked page. This will greatly focus your search effort.

The moral of the story is that I have a bookshelf full of VB.Net books, but I solve 90+% of my issues with the built-in help or Google.

Next time, we’ll talk about deployment. And no, not to Iraq…

Labels: , , , ,

Tuesday, January 16, 2007

Run for the Roses

Grew up in Louisville, Kentucky. No, not Louie-ville. Lou-u-vul.

Haven't lived there since 1973. Yeah, I'm pretty old. At least you'll think that if you're under 30. If you're not, I'm in my prime, Baby! Fifty-three is where it's happenin', as far as I'm concerned. I make good money, healthy as hell, have a phenomenal Sweetie, and love life. Experience meets resources. Wow.

If you're under 30 and think it's all over when you're 50 - man, you're gonna be surprised. Life STARTS at middle age. Please don't get me wrong. Don't mean to sound full of myself. Its just that by my age, you've had a good while to amass resources - and you definitely know who you are. Including your failings. But you learn to accept them. I, for instance, know that I'm a hopeless introvert. If my Sweetie leaves my side for 10 minutes at a party, I'm sweatin'. I consistently say things that fall in the category of "did I say that, or just think it?". Not a good trait for a banking executive...

But I digress.

Having grown up in Lou-u-vul, the Kentucky Derby has a special place in my heart. So when I decided to create a thoroughbred racing simulation I knew the venue HAD to be Churchill Downs - Home of the Kentucky Derby.

The birth of "Run for the Roses".

Five years, and lots of learnings later, RFTR was released. Did I make a mint? Uh, no. Have I sold quite a few? Absolutely. I offer every buyer a 90 day money-back guarantee. I haven't had to refund the first dollar.

Is the program perfect? Hardly. But when people email me with an issue, I work diligently to resolve the issue. Apparently I've done a pretty good job at resolving issues. And at making RFTR better as time goes by.

Today, too often, software is released with an absolute expectation that a patch will be coming out in a few weeks - because the initial release is buggy as hell.

Whatever happended to putting out a quality product, fully disclosing any deficiencies, if necessary, and standing behind your work? Isn't that how to do business?

I just "upgraded" the software tool I use to manage my finances to the 2007 version, and I have had NOTHING but problems. I don't have the patience to tell you what a really LOUSY piece of work I've been subjected to - and from a major company. There doesn't seem to be any pride in authorship anymore...

But WE can change that - by writing better programs, and by demanding better quality.

Join me, please.

Sunday, January 14, 2007

How NOT to Build a Website (cont)

In November of 2006 my wife, Shirley, and I took a Mexican Riviera cruise. In anticipation of some much-needed downtime I ordered a book called Head Rush Ajax. Not sure why I bought that book except that I had heard of Ajax, and the book looked interesting in its format.

Well, I read that entire 400 page book during the 8 day cruise. And yes, there was plenty of time left over to make sure that my Sweetie was fully engaged and entertained during the cruise! I felt as though I really understood Ajax after reading that, but more importantly it made me start thinking more about both javascript and html.

When I got home I ordered Head First HTML with CSS & XHTML. If you’ve never read this series of books, you just have to do it. I have never learned as quickly as I did reading those books.

So anyhow, the Head First book on html made me realize how easy html and css is to use. I immediately restructured all of my websites using css. Now I can change the look and feel of an entire site by changing a few lines in the css document.

I do continue to use DW8 for updating and creating my sites, but it’s funny – now I use only the “code” window and never look at the “display” window! And I feel as though I have absolute and complete control of every aspect of my sites and pages. I can move anything anywhere on any page with a quick css update.

So the moral of the story is that if you have, or want to have, a website, learn html and css and do it the right way. You may wonder why I continue to use DW8 if I can write html in Notepad. DW8 still provides good value to me because it helps me see code errors as I make them, and makes it easy to ftp the updates to my live sites. I can make a change, click two buttons to review it, click two more buttons to upload it to the web servers.

That is how to build a website the RIGHT way.

Labels: , , , , ,