Wednesday, September 17, 2014

A Good Developer is a Lazy Developer

A Good Developer is a Lazy Developer


What!?!? You're kidding, right?

Sometimes I work long hours. Late nights, early mornings. I even keep a notepad handy in case I get an idea in the middle of the night. I've solved many problems at 3am. So why would I make such a ludicris statement as "A good developer is a lazy developer"?

Because it's true.

Over the years I have seen dozens of frameworks, processes, architectures, patterns, etc. all designed to make my life easier. Why would so much work go into making my life easier? Because we are all sick and tired of rewriting the same sort or filter or query over and over again.

Software development has gone on long enough that, except in very special cases, what we're writing has already been written. What we're trying to do has already been done. And what we stay up late at night trying to figure out is only a web-search away, if only we could figure out the right search to get us to it.

Imagine trying to sort a list. All of us programmers have done it. We had to sort a list to pass that horrible CS class, didn't we? We don't ever have to do that again. Every way you can imagine sorting a list is already out there. If you use ASP.Net you can sort any list with one line of code and a delegate method (see a future post on this blog for more on delegates). The delegate method itself is almost always going to consist of one line as well; a simple compare statement. If you write more than that, you are not lazy enough.

How about dates. Oh...I used to hate dealing with formatting dates. Everyone wants their dates displayed differently. And don't get me started with localizing dates. US dates have the month first, everyone else puts the day first. What a mess! Not really. In ASP.Net it is easy. Using a combination of the String.Format methods and the System.Globalization namespace you can get your dates into the format you want with little extra effort. This namespace will also get those commas and periods in your numbers formatted for the right locale with no sweat at all.

Get Lazy!

Learn the API's.

Use the libraries.

References

System.Globalization
String.Format

Thursday, September 11, 2014

Starting Over

It's time I start aggregating all of my various blog posts from around the net. I blog about a number of topics from art and music, to technology, and even stories and odd topics from time-to-time. I'll start with a re-post of a blog entry I posted in July about Quick Draw on Hulu. The post is a little dated now since Dodge City Days is over for 2014, but I have added an update to the end so be sure to read to the bottom.

Dodge City

Originally Published 7/27/14

Growing up in Kansas I never gave travelling to Dodge City a second thought. I couldn't picture it being much more than the dozens of other intersection towns I'd gone through too many times already. So I never went.

Recently, my travels have taken me directly through Dodge City as an ideal stopping point. I wish I had gone before. A city of just over 27,000 residents, Dodge is bigger than most small towns and certainly earns the title of "City".

While other small towns have retained their town squares, Dodge City has gone one step further and retained a small piece of the true Wild West. When you visit you can spend the day exploring the Boot Hill Museum and Front Street experience. This single-block replica of an old west town draws you in and takes you back over 100 years into our western past.

Only a few blocks away, Amtrak still features a rail depot and Santa Fe museum that completes the experience. Riding in from Chicago or Los Angeles is easy aboard The Southwest Chief - an old Santa Fe line that Amtrak continues to run today.

Thanks to these attractions, Dodge City supports an abnormally high number of hotels so you won't have any trouble finding lodging. Unless, of course, you intend to enjoy Dodge City Days - a one-week carnival of events held during the last week of July every year. During Dodge City Days more than 100,000 visitors descend on Dodge City for rodeos, concerts, parades, historic recreations and many other activities.

In 2014, over the last weekend of Dodge City Days a very special event is planned. In an historic recreation of a traditional cattle drive, the city plans to break a record. Guinness will be observing as an attempt will be made to host the largest cattle drive down a main street. Celebrity Marshalls will be on hand including John Lehr and Nancy Hower - co-creators of the Hulu Original series, Quick Draw. Join them as they help kick off the record-breaking cattle drive. Don't miss season 2 of Quick Draw starting on August 7th on Hulu. If you haven't seen season 1 yet it is a must-see.

Intersection Town

I feel that I should explain a term that I used in the article above. Intersection Towns is a term I use for the many, many towns that have two highways intersecting near the center of town and might or might not have a single traffic light. I don't have anything against intersection towns. In fact, I'm quite fond of the many county seats that still have a town square around their courthouse.

Great Bend, KS c.2014
Visit some of these towns - the character and charm is something quite wonderful. Great Bend, Kansas (the town depicted in Quick Draw) is, in fact, much more than an intersection town today, but still has a beautiful courthouse building in the center of a picturesque town square. Visit there if you get the chance - you'll be glad you took the time to stop and look around.

If you can't get to Great Bend or Dodge City look on a map, find the nearest small-town county seat and take a drive. It's worth a day-trip and a nice lunch somewhere you've never been before.

Update

As of today (9/11/2014), the seventh episode of season 2 has gone live. I can't say that it's "aired" since that terminology really doesn't apply anymore. What a joy it is to see John Lehr and the rest of the cast goof it up in fictional 19th century Kansas. The tidbits of real history, unpredictable improv comedy, and fairly adult humor makes me belly-laugh over and over again.

But what makes Quick Draw just a little different than the rest of the historical fiction out there is the way that they mix in the ordinary. Episode 7 features a shoot-out that has got to be closer to the real thing than any other western has ever depicted. The characters spend more time talking to each other and reloading than actually shooting. That tiny addition of realism adds so much to the humor. Try out Terry Gilliam's Jabberwocky for another look at the "what it must have really been like" humor and you'll see what I mean.

Oh, and if anyone is counting. The shootout in season 2, episode 7 just took the top spot away from the duel in season 1, episode 7. I won't use any Harvard Math on you, but I bet season 2 will have a few more episodes than season 1.

Links