Does This String Have Anything In It? in C#

by fwhagen Wed, 04 March 2009

The following code should be failed by the C#.NET compiler:

if (eventName != null && eventName.Length > 0)

It should never be used.  People, always use this instead:

if (!String.IsNullOrEmpty(eventName))

It is much more compact, clearer, singleton, and as a String class method, more efficient.

So stop it!  You will thank me later.  Not to mention:  Where are your parentheses?  Block your code.  Other people have to read it too!

That is all.

Keywords: , ,

Filed Under: .NET | Programming | Rant

Domain Transfer For Fun and Headaches

by fwhagen Wed, 03 September 2008

Well, the new domain is finally up. if you want to see it, but there is nothing there yet.  I purchased the hosting account 2 weeks ago and have yet to have the domain name properly transferred to the provider. 

Many years ago, I decided I wanted to have for myself, for professional development and personal/family use.  I took a chance on the upstart company GoDaddy when they started out because they were pretty cheap.  I was very pleased with their service, having dealt with Network Solutions for years before at work.  That is until this past week, when I tried to transfer it.  After waiting for several days, I discovered that the account was "locked" to prevent any accidental or unauthorized transfers.  If you have ever transferred a domain before, you know that is a bunch of crap.  I had to personally authorize the transfer, so why the lock?  Because of the subsequent failure to transfer, I have to wait 60 days to try again.  The waiting period is ICANN specified, and I really don't have any logical problems with that, except that GoDaddy now gets to hold it for another 2 months. 

I was able to forward the DNS records over, so it works for now.  And I have a long time left to get the domain settled, as well.  It is just very frustrating to deal with underhanded greed like that.  For the sum of $10/year. 

UPDATE [19:50]:  I was wrong about  On my way home this evening, I got a call directly from them expressing concern about my problems.  Now, here's the thing, I only posted my concerns here.  They took the initiative to track me down and fix the problem.  Well, tracking me down in the sense that I posted my domain name and they called my contact info, which only they have.  Long story short:  I am so impressed with their commitment to personal service that I am cancelling the transfer and will simply use DNS forwarding for my new site, as it works perfectly well.  I will continue to use them as my registrar and will definitely use them in the future whenever I can.  BTW, the 60-day wait is ONLY for sucessful transfers.  It does not apply to failed due to locks or privacy safeguards.  And the $10/yr jab?  Only heightens my impression of them.  They surely spent more than that in time and effort on one measely IT guy's satisfaction.

Keywords: ,

Filed Under: Blog | Rant

Flash - Web Necessity or Overbearing Evil

by fwhagen Wed, 09 April 2008

Just why do I hate Flash requirements on sites so much?  I mean, every time I see a nice webpage marred by some Flash applet, I cringe and wonder why they decided to make that choice.

It used to be that requiring a user to have Flash installed just to visit your site was an inexcusable arrogance on your part as a web developer.  And then there was the bandwidth requirements for the content; after all, you are developing locally, so who cares that the end-user has to wait?  Well, you should, for starters.  And many times I see Flash, even still, being used as an easy way out or to simply animate a graphic. So historically, there were many, many reasons to never use Flash except for very specific applications.

Today, many of those arguments are not valid.  I believe all browsers have Flash preloaded, and bandwidth concerns are almost negligible anymore.  So why do I still find Flash to be a over-bloated gorilla on an otherwise clean design?  After all, I find the exclusion of PNG support on many browsers today to be inexcusable, but the inclusion of Flash a mere convenience.

Unfortunately, I don't have any clear answers.  To me, Flash doesn't belong on most websites I see today.  Yes, Flash does have it place in many online applications, but not as a graphic element.  And I believe that is the crux of the argument:  it is not a good replacement for some well designed image elements.  I am an old school developer that believes that good, solid, static design will always be superior to flashy, dynamic design in the long run.  Do not mistake that statement as a call to return to HTML as the primary development tool.  I refer to design; not content, which should always be dynamic, save of course for documentary content.  In my opinion, as a former CBT developer and current Intranet developer and BI Programmer, all design should be restricted to good use of CSS, PNG/GIF/JPG, and XHTML.  And there is also the fact that it is a closed standard.  Or actually, not a standard at all.  Flash is owned by Adobe, and is subject to their whims.  I just don't think that belongs in general web design from an end-user perspective, much the same way that I don't think it's right to use PDF as a publishing medium for web documents.

And don't even get me started on the crapware/bloatware/spyware that is a mark of Adobe products lately.  I flatly refuse to use Adobe's PDF reader anymore, but use Foxit Reader instead for any PDF files I might need to read.

Keywords: ,

Filed Under: Programming | Rant

Are You an OS Fanboy?

by fwhagen Wed, 27 February 2008

The "Operating System Wars" are ridiculous, in my opinion.  There is NOT one better than all the others.  There IS a better fit for me than for you, or the latte-drinking poser using wi-fi (and nothing else) at the bookstore.  So if you have really strong opinions on the matter consider the following question:

Do you have any swag or merchandise that wasn't explicitly given to you?  In other words, did you PAY for a bumper-sticker, T-Shirt, laptop bag, etc. that is branded with your object of affection?

If the answer is "yes", then you are a fanboy and as such your opinion is worthless.  Because if you love a flavor of Linux, but would loathe it if Microsoft sold it, then you really don't have anything useful to add.  Or if your a Mac-fanatic mainly cause it ain't Micro$oft, dude, then you actually don't have an opinion, do you.  Even the Vista lovers who just think it's pretty, can't begin to evaluate the merits of the kernels.  You are only allowed an informed opinion if you actually have information.  Ok?

Also, if the answer is "yes", then shut up!  I'm sick of hearing it.

Thank you.

And before I get whiny comments, yes, there are other indicators that you might be a fanboy.  Consider them too.


Filed Under: Rant

What Is Wrong With Apple?

by fwhagen Tue, 05 February 2008

No, really, what is wrong with that company?  During the Super Bowl (oops, now I owe the NFL money for using their trademark), they ran ads for their new laptop/notebook/purse.  The advert focused on one crucial feature:  it's size. 

It fits in an interoffice envelope. 

That's it.  It fits in an envelope.  Ok.  So?  Who buys a computer because it fits in an envelope?  Who cares!?  Does it run the latest software, games, 3D-rendering suites?  We don't know.  Wireless?  Firewire/USB/Bluetooth?  No idea.  Two buttons on a mouse?  Does it even have one?  But I can sent it to you via Interoffice mail!

This is but the latest example of what's wrong with Apple.  If it doesn't matter what your computer is capable of, do you even need to have one?  Especially one that is that overpriced?  I am tired of this company diluting the computing gene pool.  Call me old; call me a tech-weenie; call me whatever you want.  Form is important; but for a tool, NEVER over function.  Never.  Get out of the business and go sell purses.  Of course, then they'll claim they invented them....


Filed Under: Rant

Concert Tickets and Scalpers

by fwhagen Wed, 21 November 2007

Someone help me, please.  I don't understand why scalpers are "evil profiteering bastards" and Ticketmaster and the venues are not.  What is wrong with buying any commodity and selling it to someone else at a higher price?  It works well on Wall Street, why not in entertainment.

"Face Value" is a myth.  The value of an object is the price you can assign that object and find a buyer for it.  If I buy a comic book for $1 and sell it to you for $50, then it has a value (to me and you) of $50.  If someone buys 10 tickets to Hannah Montana for $50 each and sells each one for $150 each, what is the value of those tickets?  "But the scalper is not a fan, he should not be able to buy tickets."  Why?  Give me one rational, valid reason.  The scalper is no different than any other commodity broker.  He takes a risk and typically reaps reward; but only if the market will bear it. 

If you don't like the tactics of the scalper, fine!  I don't either.  Don't buy from him.  But know that if you do, you validate his business model, and therefore condone his action.  On the other hand, I guarantee that when it is no longer profitable, rather it becomes unprofitable, the practice WILL cease.  Do not force legislation, do not cry about it.  Stop supporting them, and they will go away.

By the way, the people you should be angry at are the ones who paid $1000 for tickets to Hannah Montana.  Shame on them.


Filed Under: Rant

Daylight Stoopid Time - Fall 2007 Edition

by fwhagen Fri, 26 October 2007

Here's your reminder that DST is ending again this weekend and you will be losing your free hour everyday.  But Wait!!  Congress moved it this year:  It's actually next week!  Yay!  Another week of free hours.  It a good thing Congress is saving us Time and Money, and more than ever before!

Keywords: , ,

Filed Under: Life | Rant | Worse Than Failure

The Emperor's Lottery

by fwhagen Thu, 30 August 2007

When I am Emperor, I will have a quiet policy to fire any IT worker who starts an office lottery pool.  Not only are they wasting the time of people that are trying to get good work done, but they obviously do not have the mathematical and statistical skills to properly perform a programming or development task correctly.

What they do on their own time is, of course, their own business.  I love those who contribute to Ignorance Taxes.


Filed Under: Rant

Everybody Needs a Holiday

by fwhagen Wed, 25 April 2007

I guess today is Administrative Assistants Day.  Thank God, I know Iwouldn't be able to do my job everyday without them!  Who would... um... ah... Wait, I don't have one.  But it's a good thing they have their own special day.

You know, I think the guy who sweeps up the floors at the slaughterhouse needs a holiday too.   How about Offal Removal Specialist Day?

Here's a link!  link


Filed Under: Rant

Enough With the Iraq War Casualty Count Already

by fwhagen Tue, 20 March 2007

I'm on a roll tonight! 

Tonight's local newscast made sure to include the latest numbers of casualties in Iraq with a running total.  Now I am not belittling the sacrifice of the great men of our military; I feel the news media is.  You know, in this area, where there is a considerable percentage of military families, you'd think they would be more sensitive.  Oh, but that would be CENSORSHIP!

I don't yet have the numbers, but I am going to get them.  The Iraq war, and subsequent occupation, has seen one of the lowest casualty counts of friendly forces of ANY conflict on this scale.  I don't remember hearing the amount of whining when we were in Somalia, Bosnia, or Kosovo.  I do remember the occasional body count in the last two, but not like Iraq.  It's stupid.

And the protesters they always show.  Couldn't they find anyone better?  I mean these people are about as clueless as it gets!  I guess that is the problem, isn't it.


Filed Under: Rant