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, October 3, 2006

Intellectual Property

Protect your creations.

Several months into my work on Run for the Roses I decided that I had better figure out how to copyright or register my work. I wasn't so much concerned about someone stealing my work itself, as I was worried that someone else would write a piece of software using the same name, register it, and then I couldn't use that name for my project.

Now, as luck would have it, when I wrote that first little program back in 1982, I believe it was, I decided to register it with the U.S. Copyright office. So I knew the name was protected as the name of a computer software program. I just updated that registration.

You may be asking how important it is to do this.

As I understand the law, you are not required to formally register or copyright a piece of work. By the simple act of creation, it is protected. But by publishing it in some fashion, and indicating that it is protected, you may head off those who would otherwise seek claim to your work.

This is right from the Copyright Office's website: "No publication or registration or other action in the Copyright Office is required to secure copyright... Copyright is secured automatically when the work is created, and a work is “created” when it is fixed in a copy or phonorecord for the first time. “Copies” are material objects from which a work can be read or visually perceived either directly or with the aid of a machine or device, such as books, manuscripts, sheet music, film, videotape, or microfilm."

Until a few years ago a work had to be published to be automatically protected. And published meant:
" 'Publication' is the distribution of copies or phonorecords of a work to the public by sale or other transfer of ownership, or by rental, lease, or lending. The offering to distribute copies or phonorecords to a group of persons for purposes of further distribution, public performance, or public display constitutes publication. A public performance or display of a work does not of itself constitute publication."

But now you can easily communicate your ownership to others through the use of a simple phrase:

"Copyright 2006 - All Rights Reserved"

The easiest way to "publicize" this for me was to put it on my website and use that line at the bottom of each page. We'll talk later about how easy it is to set up your own website.

So why did I go to the trouble of registering my work? I suppose mostly because if there was ever a dispute, I could pull out my little registrar's certification and say "see, its MINE!". Doesn't mean someone won't sue you; but you'll be better positioned - plus you may thwart (first time I ever used that word) any number of possible litigants (that word too).

OK - so how do you go about registering your work?

It's really very simple. First, go to the U.S. Copyright website where you'll see a section called How to Register a Work. Look under Literary Works. You can read up on the process there, but basically you'll use the Short Form TX for most registrations. The cost is $45 and it is NOT a fast process. I have waited 9 months for a registration to be completed for a work.

But the folks there are really nice, if you ever need to talk to them (rare). Particularly a guy named Joe. He told me last year that they got something like 14,000 registrations each DAY!

Anyhoo, print out Short Form TX, fill it out, print out your code (I believe the requirement is either all the pages, or the first 50 and last 50 pages), write a check for $45, send it in - and wait.

By the way, if you are registering graphics, you'll need to send in the graphics on a CD or DVD (or a print of them if there are few), and if you're registering sounds of any sort you'll also need to send in a CD/DVD. With Run for the Roses I sent in all of that.

You'll finally get a certificate back signed by Joe or one of his colleagues that certifies that your work is Officially Registered!




Labels: , , , ,