Friday, November 22, 2013

Gunnar Optics

A while back I learned of a product called Gunnars, which are basically high-tech glasses for those who work on computers.  I've had a pair of Gunnars now for about 3 months and this is my review.

First a little background.  For people such as myself who work on computers all day, we face health issues - the best known is carpal tunnel syndrome.  Well, if you believe the marketing engine behind Gunnars then there is another hazard out there in the form of harsh lighting conditions.  Most computer users have made the switch from the old analog CRT monitors to the newer flat panel monitors.  One unseen downside to this switch is the light quality of these monitors.  All flat panels (except plasmas) use either tiny fluorescent tubes of LEDs as the light source.  Both of these light sources do not produce consistent warm light but have a large spike in the blue spectrum of light.  To make matters worse, most offices are illuminated with overhead fluorescent lights.  So the user is being bombarded with strong blue-light all day long.  So far all of this is fact, not some marketing spin.  Fluorescent and LEDs do emit disproportionately high levels of blue light, and blue light carries the most "energy" and would therefore be the hardest for your eyes to process.

Now, Gunnars claim their glasses cut down on this blue light which in turn reduces eye-strain.  But the big question is, do they actually deliver?  After 3 months I can say the answer is most definitely yes!  Right from the beginning I could feel a difference. Before Gunnars, at the end of the work day my eyes were tired and strained, but with Gunnars my eyes feel much better.

There is however one downside to my particular Gunnars - comfort.  The shape of my nose is such that I have a hard time finding comfortable glasses.  I rarely wear sunglasses because they are so uncomfortable on my face.  And the Gunnars are no different.  At the end of the day my eyes feel great, but my nose is sore.  Last year I got my first corrective pair of glasses in my life - I ended up selecting a pair of Flexon frames.  These are the first ever glasses I can wear without pain on the bridge of my nose.

So would I recommend Gunnars?  That depends.  They're not cheap - expect to pay about $100 for non-corrective lens, more if you need a prescription.  So you will probably only benefit from them if you spend a lot of time in front of a computer.  If that's you, then I recommend trying them.  But don't do what I did which is purchase off their web page.  Instead, find a local store that sells Gunnars and go try them on.  That way you can find a pair that's comfortable on you.

Friday, November 15, 2013

Linux will never be mainstream until...

So this is a little rant about Linux.  But first let me clarify - I like Linux!  While getting my undergrad we used Linux and Unix servers.  And even though I work and develop on the Windows platform, I still run Linux virtual machines and I want to see the Linux platform succeed.  That said, Linux will never truly succeed and become mainstream until they make a lot of changes.  Three that I'm always stumbling on are...

GUI not command line
Linux seems to have this huge obsession with command line applications and setting program configuration manually via configuration text files.  Even as a developer I tire of this quickly.  It's so much nicer to open a graphical program and click a checkbox to enable a feature.  The last thing I want to do is run a command line tool and try and remember the syntax to add the setting to a text file.

Distribute compiled binaries
If you want to download a program, chances are the program is distributed as the source files leaving it up to you the user to compile the program.  Are you serious!?!  I'm a developer with the know-how to compile applications and I don't want to do this.  So what's the average person suppose to do?  Fortunately companies like Ubuntu compile common applications to make it easier.  But what if the application you want is not one Ubuntu offers?  I'm all for offering the source files, but also offer compiled binaries to make it easier for the casual user.

Tar/GZip suck, stop using them
This is closely related to distributing compiled binaries, but the Linux development community is seriously in love with tar and gzip.  It's to the point where if a company also distributes Windows binaries they might distribute them in tar/gzip format.  I don't care what platform you're working on, tar/gzip are old and suck!  I recently downloaded some files for Windows.  The tar/gzip file was 15.8 MB in size and the raw tar file was 59.1 MB in size.  Compare that to 13.5 MB for pkzip and 9.82 MB for 7Zip.  Pkzip and 7Zip are both available for all platforms and wipe the floor with tar/gzip.  So please stop using tar/gzip.

Sorry for the rant, but again I want Linux to succeed but until they make lots of changes such as these three, Linux will never truly succeed.

Monday, October 28, 2013

Why I hate newspapers

In keeping with the theme of my previous post, I wanted to talk about why I hate newspapers.

  1. I dislike reading.  If I'm going to read something it's going to be something I find interesting such as a technical document, scientific article, etc.  Not the newspaper.
  2. I hate the smell of newspapers.  I don't know if it's the paper, the ink, or a combination, but newspapers have a distinctive smell and I hate it.
  3. I hate the way newsprint rubs off on your hands.  They use the cheapest form of printing which results in the inks rubbing off as you read it.
  4. I hate the feel of the paper.  Newspapers use the cheapest paper they can find and I don't like the feel of it.  The difference between newspaper and high quality paper is significant.
  5. Newspapers cost money.  Whether it's a one-time fee from a newspaper machine or a regular subscription, you're still paying money for what is available elsewhere for free.
  6. There are far better "electronic" alternatives (more on that later).
  7. It's a huge waste of time, energy, money, and resources.  How many trees go into making newspapers every year?  How much gas is burned delivering it to houses?

To me there is absolutely no redeeming quality to newspapers.  The "content" they provide can be gotten off the Internet for free on sites such as cnn.com, nbcnews.com, local TV stations, etc.  You can get classifieds and jobs off craigslist and monster.com.  Store sales, ads, and coupons can get viewed going to that stores website.  And the best part is, all of this "electronic" content can be easily searched using a computer, something you can't do with newspaper.

It's no secret the newspaper industry is really hurting.  Less than a decade ago the newspaper ads brought in about $17 billion dollars annually in the US.  Today that number is less than $4 billion and dropping.  As an industry you can't sustain losses like that and continue.  Already major newspapers throughout the US have been closing.  The whole industry is in a downward spiral that will not stop in my opinion.  As newspaper revenue drops they have no choice but to reduce the content of newspapers.  But as content decreases, the number of subscribers will decrease also.

I don't think I'm alone in my projections here.  Most younger people won't touch a newspaper, they prefer something electronic.  So newspapers are clinging to the "older generation."  But once they pass on, no one will be left and they will be forced to close.

In my opinion, the newspaper industry missed a golden opportunity here by not looking forward.  A decade ago they should have shifted their focus to an online presence.  The goal is to create online content that people want enough to be willing to pay for an online subscription.  In addition to news, opinions, ads, classifieds, etc. they should have taken advantage of the benefits afforded by the electronic medium.  For example, show a map centered around the readers location and put a "dot" on the map where ever a news event took place.  Then people can see news events that happened near them.  Yes, such a system would require tons of money to develop, but all the newspaper houses throughout the US could have pooled their resources and created such a system.  This would have prevented sites like craigslist from "eating their lunch."  But as it stands, it's too late.  The damage has been done and I don't think they will recover.  I think the industry will die.

Why I hate the Post Office

This might sound a little strange, but I hate the Post Office.  As far as I'm concerned they offer no service I want and I wish I could stop receiving mail completely.

Why do I dislike the Post Office so much you ask?  Simple, most of the mail I get I don't want.  Most of the mail I get is "spam" or junk mail, which no one wants.  This comes in two forms.  The first is mail addressed to me.  Magazines, brochures, ads, etc. from companies I've purchased from.  These aren't so bad because you can usually contact the sending party and request they remove you from their mailing list.  This takes time and it's a hassle, but it can be done.  The second, and most common, is mail that was not addressed to me or anyone.  Basically some company paid the Post Office to drop this mail into everyone's mailbox.  What I hate the most about this mail is there's no way to "opt out."

All of this junk mail, whether addressed to me or not, is such a huge waste.  I get sick when I think about how much time, energy, and resources were wasted to print and deliver this mail just so I can throw it away and fill up the landfill.  I mean, how many trees a year are cut down to send out junk mail and catalogs?

Any information that I want/need doesn't come by mail anymore.  Everything like bills, statements, letters from friends and family, etc. is sent electronically.  Yes, there are times you need to send something physical, and that's what package shipping companies like UPS and FedEx are for.  I don't mind the Post Office when they are delivering a package, but mail needs to stop.  In my opinion the Post Office has made only 2 good decisions in the last two decades.  First is flat-rate boxes.  Shipping a box without having to worry about the size or weight is convenient and nice.  The second is forever stamps.  Until such time as letters are a thing of the past, stamps will continue.  And never having to worry about rate increases is nice.

So when people talk about the Post Office having financial difficulties, closing offices, reducing services, cutting delivery days, etc.  I welcome these.  To me this is good news!  Whatever it takes to force the Post Office to realize their future is in direct competition with UPS and FedEx and not as a letter carrier is a good thing.

You might point out that the USPS is the second largest employer in the US (behind WalMart) and as such their downfall would result in millions of lost jobs.  As far as I'm concerned that's no reason to keep the Post Office around in it's current form.  One hundred years ago you didn't dial anyone's phone number.  Instead you merely picked up the phone and an operator picked up the other end.  You told him/her who you wanted to call and they literally "patched" you to the other person's line.  But with the advent of phone dialing tens of thousands of operators lost their jobs.  Should we still have operators to dial for us given a better way was inverted to call someone?  No.  By the same token, should the Post Office employ millions of people to deliver letters when a better way to communicate has already been invented?  No!

Really, the Post Office is in a downward spiral that will not end for a long time.  As mail volume drops, they have no choice but to increase postage rates.  But as postage rates increase, people will increasingly turn to electronic ways of sending information.  This death-spiral will continue until, as I said, the Post Office is reduced to only delivering packages.  So the sooner the Post Office gets to that goal, the better.

Thursday, September 12, 2013

Access Violation in CPropertySheet::DoModal

One "feature" about MFC that has always annoyed me is when you create a wizard or property sheets, calling CPropertySheet::DoModal results in an access violation.  This problem is discussed in detail in Q158552.  In short, MFC tries to modify the dialog template, but the dialog template is stored in a read-only page.  This results in an exception.  The operating system catches this exception, changes the page to read/write access, and tries again.  So really this is just a nuisance if you're debugging your application because it breaks on the exception every time.

Well, turns out it can be more than a nuisance.  If you're testing with Microsoft Application Verifier enabled, you cannot debug your application further.  AppVerify is designed to catch buffer overruns by using read-only memory pages.  So when CPropertySheet::DoModal attempts to write to a read-only page AppVerify steps in and puts a stop to the show with a "VERIFIER STOP 0000000000000002" error.

So how can you get by this?  You could disable AppVerify, but testing with AppVerify enabled is a good thing.  It helps you catch other bugs that would normally go undetected.  But I found a simple technique that allows you to keep AppVerify enabled.  Use Visual Studio's resource editor to change the font of the wizard pages.  The default font is "MS Shell Dlg."  You can change this to any font, but I recommend "Tahoma" as this is the font the Visual Studio resource editor uses when the dialog is set to "MS Shell Dlg."  This means your dialog units will be the same which makes arranging controls easier.  Other good font options are "MS Sans Serif," "Microsoft Sans Serif," or "Arial."  These are also generic fonts with the same or similar dialog units.

The reason this works is because of what MFC does.  It checks the font of the wizard/property page and if it doesn't match the font of the wizard/property sheet, it makes a copy of the dialog template and changes the font back to the system default.  This new dialog template is read/write so when processed inside CPropertySheet::DoModal it won't cause a problem.  And if you're following along, changing the font of the wizard/property pages will not change your product at all.  Since MFC changes the font back to the default it doesn't matter what font you change it to, the look and feel of your product will not change.

Thursday, August 15, 2013

The Number Sign

In today's short and very random post, I wanted to talk about the number sign (#) - in particular the different names.  This symbol has at least three different names; 1) number sign, 2) hash, and 3) pound sign.  The official name (at least in North America) is "number sign."  In Europe it's called "hash."  What's interesting is most Americans call it the "pound sign" which is most likely because when used in the context of a telephone it's called "pound" or "pound sign."  But what's the origin of this "pound" name?

Let's start off by looking at the typical keyboard layout in North America.

You can see the number sign is located above the '3' key.  Now let's look at the United Kingdom keyboard layout.

If you look at the '3' key you'll see a different symbol.  This symbol (£) is called "pound sterling," or sometimes just "pound."

So the reason why the number sign is often times called the "pound sign" is because on the US keyboard layout the number sign takes the location of the pound sterling symbol.

Hopefully this gives you reason to ponder the next time someone says "pound sign."  That's an inaccurate name that probably dates back more than a century now.

Monday, April 22, 2013

Children's books

Now that we have two little kids in the house we're reading a lot of kids books.  I am absolutely shocked by how many kids books have typographical errors in them.

First off, kids books don't have A) lots of words or B) very long words.  [BTW, when I say "kids" I'm referring to 1 - 2 years old.]  So errors should be very easy to catch.  I'm an engineer and I'll be the first to admit my spelling and grammar are not the best.  So the fact that I'm catching all these errors just means there are most likely more errors that I'm missing.

Secondly, the whole idea behind a kids book is to help teach kids how to read and write.  How can kids be expected to grow up and speak proper English when the authors of their books can't even read or write.

So what are some of these errors you ask?  By far the biggest error is using the word till when they mean 'til. 'Til with an apostrophe is short for until, but so frequently the author uses till, as in "to till the soil."

Probably the second most common mistake is using round instead 'round (again short for around).  So the popular kids song goes, "the wheels on the bus go 'round and 'round."

Both of these errors are similar in that A) it involves contractions and B) both forms are legitimate English words which means you can't rely on a computer spell-check to correct the mistake.

And there are tons of other errors such as improper punctuation.  When listing 3 or more items use commas to separate them (or depending on the situation even semi-colons, but again we're talking about kids books so the list should never be so complicated as to require semi-colors to separate the items).

Most of the books we have were given to us as gifts or hand-me-downs.  There is no way I would ever spend money on a book like this in the store, I don't want to support authors who can't proof read something as simple as a kids book, or be bothered to have someone else check their work.