The Value of Choice

February 22nd, 2010

(A former boss of mine once said that he knew he’d written something good when he could go back and look at it six weeks later and still like it.  There’s some merit and a problem or two there but the idea stuck with me.  I was looking through some of my site archives this week and found the files from a weekly column I tried to start on the site in 2004.  Here’s an abridged version of one from March 2004 that I particularly like.  It’s not perfect but it has a certain spark to it.)

I went to McDonalds for lunch with a couple of co-workers earlier this week.  I suggested they super-size it while they still can after the news report I saw not too long ago that McDonalds is getting rid of their super-size option.  Evidently, the recent bad publicity engineered by the Food Police concerning the effect of fast food on people unwilling to make better nutritional choices has the company a little nervous about its bottom line.  Fortunately, the frivolous lawsuits aimed at fast food last year by people blaming the restaurants for their obesity were thrown out.  Various states are now rushing to pass legislation banning similar suits but bad publicity still costs money and Mickey D’s probably figures that people will be just as willing to buy larger selections separately when deprived of the convenient Feed Bag Value Option.

I didn’t super-size it myself although one of my co-workers did.  I guess I wasn’t feeling overly devout during this visit to the Church of the Golden Arches so I just ordered the large size of the Big Mac meal.  My doctor’s devotions, on the other hand, involve him charging me large amounts of money for a few minutes of lecture time about my weight so I feel obligated to give him something to complain about.  I can’t really explain the economics or logic involved in that transaction but it does result in me being able to eat Big Macs so I just accept it and chow down.  I swear those Big Macs used to be bigger.

I am well aware, as every other person with two brain cells to rub together should be, that McDonalds is an occasional treat rather than a daily solution.  Despite my relatively poor eating habits and the above bit of satire, I cannot tolerate a continuous diet of fast food as some people can.  I am also aware that the nutritional mischief I get into has its eventual consequences.  As a friend of mine once said, very simply; “We make our choices.”  Unlike those who choose the route of litigation and media-sponsored intimidation, I accept responsibility for mine.  If I add a dessert to a meal at my favorite restaurant or lounge on the couch eating Doritos in front of the TV, the choices involved are mine and mine alone.  The server at the restaurant, the store that sold me the Doritos, even the people who advertise the food bear absolutely no responsibility for the actions that I take of my own free will.

Unfortunately, it seems that more and more people in this society are unwilling to accept this responsibility or understand the concepts of free will and choice.  As I indicated in last week’s column, the freedom to make the wrong choices is vital to a person’s actual ability to make the right ones.  This is not as heretical as it may sound.  It simply means that when you act as the law or circumstance compels you to, it is not virtuous or moral beyond the obedience to the law.  When you make the correct choices independent of any law because your conscience and intellect require you to, that is true integrity. 

The mark of an intelligent and moral person is the ability to regulate their own behavior according to their beliefs in the absence of external restrictions.  In a larger sense, the fewer laws that a society passes which require the government to act as a parent, the healthier the society will be as its inhabitants are required to think like mature adults and take responsibility for their own behavior. The inability to grasp this seems to cross political lines as both conservatives and liberals demand that the government rule on their respective issues.  The mentality behind these demands not only limits the opportunity for people to be responsible for themselves but also takes a certain elitist and patronizing view toward the people it claims to protect. 

The lawsuits against the tobacco companies may have at least had some merit, the hypocrisy of a government that had been profiting from tobacco taxes for years notwithstanding.  Tobacco, after all, is an addictive product and there was evidence that the companies had manipulated the levels of nicotine.  Then we had the lawsuits against the gun manufacturers on the basis that they were somehow responsible for the crimes committed with their product.  Is anyone for suing makers of baseball bats?  How about Ginsu??  You can create a lot of mayhem with a knife that can cut through an aluminum can and still slice a tomato. 

I’m just waiting for the first lawsuit against a media company by someone claiming various consequences of emotional distress caused by a perceived bias in that company’s publications.  I suppose we might as well limit free speech while we’re at it.  That freedom of thought business is a dangerous thing.

Finally!

February 15th, 2010

Programming Microsoft Access is finally online!  The first 11 chapters are available on Drewslair.com and there will be more articles to follow.

I’m very interested in your  feedback.   I do what I can to make the material accessible but the more input I get, the better it will be.

Almost there …

February 12th, 2010

I’m managing to get my fingers to keep working despite the latest cold snaps and have finished the first draft of “Programming Microsoft Access”, the series on Visual Basic for Applications that I’ve been working on for the last couple weeks.  Now I’m going through the chapters and revising as needed.  It’s amazing what you find when you step back and look at the material from an editorial standpoint rather than the writer.  So far, I’ve changed some examples, switched around a couple of chapters and found some typos and errors that would not have looked good on the site.  Basically, I’m trying to take my own advice from the chapter on algorithms:

“Throw everything you can at your code and try every way you can imagine to break it.  I know it’s tedious and it looks like it works so why tempt fate, right?  Trust me; finding a bug in your code and fixing it before it goes to the customer can feel a bit like having someone shoot at you and miss but it’s better than what you feel when the customer finds the bug.”

Living in Outlook

February 9th, 2010

In my last post, I included the outline for the series on Access VBA that I’m writing.  Of course, an outline is just that – a rough summary of what the finished project should look like.  It can’t be carved in stone.   

So while I’m working on the chapters for decision loops, I realize that I don’t have anything in the series about using arrays to store information which is probably because I rarely use them myself.  I reviewed a couple of other books to get some ideas about what to include in the series but in the end we do look at things based on our own experience.  That’s one more chapter to add.  I’m getting there.   The hardest thing for me is coming up with the different examples to illustrate some of the ideas. 



Trying to fit my life into Microsoft Outlook ...It’s ironic but after all these years I’m finally understanding the value of keeping To Do lists.  About every other year on average, I buy a yearly planner with the idea of being more organized and within a few weeks it ends up sitting on a shelf somewhere because I just can’t get into the habit of using it.  Meanwhile I’ve had all these ideas for projects I’d like to do that never went anywhere because I got distracted by something else and forgot about them.  Now I have a giant folder in Outlook that’s growing at least one new branch every week with various details of the stuff I’m working on. 

I have one task list called “Archive” which has two subfolders under it; “Completed” and “Project Ideas”.  The Project Ideas list is a bit like my Amazon.com Wish List (BTW, Amazon, thank you so much for that feature.)  It’s all the projects that have sounded interesting over the months and that I’d like to try sometime but haven’t gotten around to yet.  It includes such things as ideas for new site articles, certifications that would be nice to have and software I’d like to evaluate.  Keeping them there keeps them from cluttering my Current Projects list and lets me actually get something done rather than drowning in all the possibilities.  Outlook also lets me prioritize items so that I can know what’s important and what’s just a cool idea. 

Then I have my Project Task List and Project Journal where I keep notes on specific things I need to do and what I’ve done each day respectively.  It’s a new habit but I’m working on keeping it going.  There’s also the Resources section where I keep lists of websites and other items that I can use for different projects. 

Now if I can just move a few more projects over to the Completed list.

A few thoughts at 3 a.m.

February 6th, 2010

I’m plowing my way through writing the next chapter of the Microsoft Access for Beginners series and have the insomnia to show for it.  This chapter, an introduction to Visual Basic for Applications, is one I’ve been wanting to do for awhile and should have done a long time ago but always found a way to put off.  Writing chapters on the basics of forms and reports was easy compared to introducing the reader to a programming language with an entirely different environment from Access, an event-driven paradigm, variables, decision loops and all the other fun stuff that does questionable things to a person’s brain over years of exposure.

The other chapters have been rather large for web articles and the subject of this one is so much more complex that I’ve broken it up into sections to avoid sending the readers into shock.  So far, the sections are lining up like this -

  1. Introduction – An explanation of the purpose of VBA and event-driven programming.
  2. Environment – An explanation of the programming environment and its elements.
  3. Procedures – Methods, functions and custom properties.
  4. Variables – Declaring and using variables to hold values for use in the program.
  5. Operators – Symbols used to carry out mathematical, comparison and other operations in VBA.
  6. DoCmd – I felt the DoCmd object which provides a variety of shortcut methods deserved its own section.
  7. Control Statements (multiple sections) – Decision loops and structures including IF…THEN, SELECT CASE and WHILE … LOOP.
  8. Algorithms – Once the syntax is understood, it’s time to learn how to design an actual procedure.  Determining the path for getting the right results.

That’s not the end of it but after the section on algorithms, I’ll put it all together and consider Version 1.0 of the series ready for upload.  Otherwise, it might take another few years.  Future (near future, I promise) sections will include material on:

  • Classes / Object-Oriented Programming
  • Best Practices including commenting and error handling
  • Debugging
  • Getting Help

So, why am I doing this?  All this work for a series of tutorials on a relatively obscure personal website?  There’s probably a touch of OCD involved but it also has to do with the e-mails I’ve been grateful to receive over the years from people who’ve benefited from the series.  I hope I’ve helped save some data along the way.  It also keeps my brain active, my skills sharp, my credentials as a writer somewhat defensible and my resume polished.  In the end, I figure everybody wins …

… or at least nobody gets hurt.

Stay tuned …

PDFCreator

February 3rd, 2010

PDFCreator is an free tool from PDFForge.org for creating PDF files from Windows applications. The installation adds a printer to windows which accepts the output from Word and other programs and outputs PDF files. It has a great autosave feature which will automatically save the files to the folder of your choice with a datestamp filename so you don’t have to name every one if you’re doing a lot of printing.

You can find the program and more details at http://www.pdfforge.org/products/pdfcreator.

Understanding SQL

February 3rd, 2010

(Recovered post)

I’m trying to add some new articles to the site and finish out the Microsoft Access for Beginners series while gradually writing about more advanced topics. Microsoft Access is fun but it takes more than Access to make a programmer.

One good example is Structured Query Language (SQL), the scripting language that Access and other databases use to read and manipulate data from the database. It’s easy to rely on the Query Builder interface in Access and equivalent interfaces in other database systems to do the work but until you learn how to read and write SQL on your own, you won’t truly understand how databases work. Besides, it’s pretty much expected if you want to get any kind of a real job working with databases and it really isn’t that hard.

I’ve written two short articles on SQL Basics and Modifying Data with SQL that should give you a good start in understanding this simple English-like language. I’ve also included links to more information on Microsoft Office Online and other places.

As always, comments are welcome.

Just had to step out for awhile …

February 2nd, 2010

There was a bit of an oversight while transferring the site to a new hosting service and the blog went away for awhile but it’s back now and hopefully I’ll be able to keep it up a little more than I did before.

As I said, Drewslair.com was transferred to a new hosting service during January.  The previous host, ICDSoft, is excellent and I recommend them highly having been with them for five years.  The only thing they didn’t have was support for ASP.Net which I wanted to start using with the site.  So I did a little research and switched to 3Essentials which has also provided excellent service so far. 

Another benefit of the new service is that I’m able to maintain two websites instead of one on the account so I decided to use the AndrewComeau domains for the new version of the site which I converted out of Microsoft Frontpage and into Visual Studio 2005.  This new site has pages with the *.aspx extension so Drewslair.com is maintaining the old pages and, thus, the current Google links to all the current articles.  I’m not sure yet how the two sites will ultimately diverge.  I just know there will be a lot of writing involved.

You can read more details on my work with ASP.NET on the site at:  http://www.andrewcomeau.com/desk/programming/aspnet.aspx .

Design Abstractions

May 21st, 2008

(The following is a May 2008 post I’ve recovered from from a previous incarnation of the blog)

A few years ago, Joel Spolsky wrote a wonderful article for his site called The Law of Leaky Abstractions, the general idea of which was that while new technologies such as programming tools that let you build data interfaces by clicking and draging controls might make things easier for the average professional, they will never replace a solid understanding of the technologies they are built on top of. This is because the tools that do so much work behind the scenes never offer the fine control that the lower level tools will. They also provide an illusion of power that makes it easy to avoid learning the real substance. The article provided some good examples and now I have one of my own to share.

When I started working on the site back in 2000, one of the first things I did was to figure out what software I would use. I’d used Adobe PageMill on an earlier website attempt but that was no longer available and Microsoft FrontPage seemed to offer everything I needed for the right price. I came up with a theme for the site, put together some content and was pretty happy with myself for building a site and registering a domain name to go with it without having to do any of that tedious stuff like learning HTML. This would seem kind of surprising for a programmer like me but that’s the way it was. I just wanted to focus on the content and look and feel of the site and besides, I was busy with Access at the time.

It wasn’t until a friend of mine started designing a site of his own and went straight to manually coding the pages that I was more or less shamed into learning the basics of HTML. Even then, after I realized how simple it was and how I could have some finer control when I needed it, I was just as happy to keep using the code generation features in FrontPage.

Now, aside from the way FrontPage writes its own, rather verbose, HTML behind the visual designer interface, there’s another aspect to the abstraction. FrontPage also offers features that would often be done with other scripting tools like PHP and ASP. Instead of using these scripting options, FrontPage uses its own proprietary code. I have my theories about the reasons for this but what it means to the user is that in exchange for the ease of setting up something like a hit counter or dynamic navigation, the pages need to be published on a web server that has the FrontPage Extensions installed which will translate that proprietary code and display it as intended. That was fine with me as it wasn’t too hard to find hosting services that provided FrontPage support.

Then, last year, came the announcement: Now that FrontPage was no longer available, Microsoft had dropped support for the FrontPage extensions on Linux servers which meant there would be no more bug fixes or security upgrades. My hosting service has decided to keep supporting them but will drop them if there are any security problems. That’s pretty nice of them, actually.

So, I finally decided to get off the FrontPage fixation which meant getting back into HTML and figuring out how to do on my own all the things that FrontPage does for me now. I talked to a co-worker who has his own pretty impressive site and he talked about languages like PHP and JavaScript so I figured I’d be looking at those and other options.

I checked out a couple other page and site generation packages and wasn’t really impressed. The best one I found turned out to be buggy and I didn’t want to deal with that. Then there was the issue that I’d already paid for FrontPage so I started to look through it to see how I could use it without using features that would require the extensions. I was pleasantly surprised to find it has some nice features that speed things up once you’re ready to move to the next level of web development and actually do some of the coding yourself.

I won’t be able to use HTTP to upload the site without the extensions which means that I can’t just point FrontPage to www.drewslair.com and let it sort everything out. FrontPage does upload through FTP, though, and does a decent job of synchronizing the files. My hosting service provides a good control panel interface and I was able to setup a subdomain for testing and an FTP account that would point there so FrontPage could still handle things. The borders that are shared by all the pages and include navigation and the credits are also things that I’ll have to do on my own. FrontPage also made it pretty easy to manage the theme for the site but when I look at how it does it, it’s really just a jazzed-up version of cascading style sheets so, given some time, I can do that on my own.

There are other features that I’m not sure how I’ll do on my own yet but I’m sure I’ll find something. It will be a lot of work and take some time since it’s not the only thing I’m doing right now but in the end, the site will be better for it and I’ll be a bit smarter as a site owner.