I must have that keyboad

| Saturday, February 28, 2009

I've used several different types of keyboards over the years (crash would tell you "a couple of years") and I thought I found my true match. The Microsoft Natural Ergo keyboard 4000 and I were the perfect together. It never felt cheap and I could bang-out code very fast. I was sold on the concept of the ergo keyboard until recently. I purchased a MacBook Pro and found that the smaller compact keyboard was even easier to type with. They keys are low-profile and functional. I can type for hours and never feel any kind of ache in my hands or wrists.

Recently, we have decided to sprint from home a couple of days out of the week, so I've been on a quest for what I call Home Office Zen, you know, because I want to be comfortable when I work. When I built my house I built a home office with it because my hobby, in addition to my carrier, is programming. I blew a bunch of money and installed hard-wood flooring and some really nice wood office furniture. My wife is a full-time student so I've set-up the office so that we can work in the same room at the same desk and not be in each-others space.

Today I found a deal on a new monitor that I could not refuse. It's some no-name brand 28" HD monitor that was $299 (floor model). Anyone who's ever used an external monitor on a laptop knows that you've got to get an external keyboard to go along with it. While I was at Bestbuy today I thought about picking up another Microsoft keyboard but something drew me away from the PC keyboards. It was the Apple stand. I've always loved how nice the Apple Keyboard looks but I've never played with it. I had my son with me and needed to kill some time while they prepared my monitor so I started banging on it (he helped of course).

Wow! This keyboard rocks. It has the exact same feel as my MacBook. In fact, it has something is was desperately missing from the PC keyboard; the delete key. There is a key named delete, but it is really a backspace key. Yeah, you can do fn + delete but who wants to do a two handed delete? Also, the Apple Keyboard has 10-key, which I use a lot.

I'm sold! It is time to bail on Microsoft once again. At $49 snaps, I'll probably get one for my cubie as well.


Powered by Qumana


Hard Coding Production Applications

|

I have never understood why anyone would hard-code a single line of code in a production environment. The implications are so large that one would think twice about doing it right?

I'm guilty of doing this very early-on in my programming career as a very junior programmer. I created a web reference in a .net 1.1 application and forgot to mark it as 'Dynamic". Everything was fine and dandy until the reference needed to be changed during a deploy. The scrambling that went on during that time was insane. That was my first and last experience with hard-coding a production environment.

Don't get me wrong; I still hard-code certain things. For example, if I'm slapping together a quick demo, or creating a very specific unit test, then sure I will hard code. Doing this in production is sloppy and very dangerous. You really tie your hands in terms of agility and you increase the cost of change in the future.

I recently worked on a major engineering effort that required replication from a legacy database to sql server. I worked with Crash data modeling and was able to get it functional in no time at all. The time consuming effort was replicating the legacy model, a flat file approach, into our normalized sql model. Once that was done, the next major effort was balancing the two systems (this is an ongoing effort). The interesting thing about replicating is that I was forced into hard-coding but this is not a production client-facing application.

I've been done with the replication part of the project for some time and have moved on to other things, like reporting. I have delivered reports to QA and considered the project done as far as the specific schedule tasks were concerned. The legacy system continues to provide all reporting and drives all UI until we start pushing more and more reports through QA.

The programmer that I worked with is an Application Lead Developer with over 20 + years experience working with this legacy programming language. His responsibility was to write programs that send his data through to my replication programs. We worked well together, other than small disagreements on the data model and who has the better database. It's all just banter really.

This programmer approached me on Friday and asked me if I was ready for the next update (the client was loading a lot of data into our system very soon). I was curious what he meant when he asked if I was ready. Did I need to prepare for something that I was unaware of? Were there new requirements that needed to be implemented? I was confused about his question. The data model had been written and functional and was always ready for new data. So I asked him to elaborate on his question. He asked if I was ready because I was responsible for all the reporting for this new load of data. I thought to myself, I'm not responsible for any reporting, only writing reports, the business is responsible for the reporting. I started to understand what he was getting at. I told him, that I did not think the reporting would come out of the new system because the two reports I hade done were in QA and we still did not balance (something he is aware of and has a few tasks to complete so that we can balance). He seemed a little annoyed at my response and told me that this meant he had some work to do if he was going to provide the reporting. I asked him why he had work to do, it was just reporting, the same reports we have always provided. He said that he had hard-coded his reports specifically for the prior year and that some more programming needed to be done so that we could report on 2009 data. It was at that moment that I realized why he asked me the original question. His entire programming world is a giant hard-coded mess of spaghetti code. He was shocked that I was not prepared because he assumed that I needed to program my reports to handle the new data for the new year. I, in return, was horrified at the though of him hard-coding anything these reports. I'm sure my programming buddy was someone who lost sleep during the Y2K thing...

This got me thinking. Would Crash be ok with this? Is he even aware that this programmer is going to be spending time hard-coding his programs so that they were compatible with 2009 data? I'm sure he will be aware of it after this post (I have a sinister laugh right now). When I think about the big picture here I wonder why such a senior programmer would do this. I'd like to think that he was under a serious time crunch but I don't think that is the case. I think it is a philosophical thing. I get the impression that he, and several other programmers on the legacy system, are accustomed to hard-coding all the time. That's just how they do it; it is innate in them. In fact, one friend of mine called it "job security".

Without disrespecting this programmer; I want to ask him to justify his decision to hard-code. I don't think he realized the cost involved in that decision. To him, it's just another day at the office. I doubt he gets the whole technical debt thing.

Powered by Qumana

Our blog world has evolved

| Wednesday, February 25, 2009

Is there a better form of communication than a blog? Think about it; how can you get great information out to a large audience in a way that is fast, efficient and free?

Crash was looking for a way to formally document a project he was working on in a way that we easy to understand. There was a specific process that he wanted to write about and provide visual materals to support it. We have experience blogging so Crash had the great idea to implement blogging in our products.

It is not blogging in the traditional sense. It's documentation for processes and features, knowledge base articles, system maintenance notification and the list will grow. The end user has no idea a blog even exists. All they see is the rich content. The blog is just a content delivery tool.

The intent for now is to use labels to seperate our content and each area that utilizes that content will be label aware. Crash had the idea of making a custom blog control so that our programmers can easily implement this across all of our sites. My first two blog posts were kb articles that talked about how to use the blog control and how to use the blog class for a more custom implementation.

The best part is the savings. Google hosts the content; we just read and parse the atom. You may be asking yourself "does it scale"? Hmmmm, does Google scale? What if Google were to stop Blogger? That is simple; suck out the atom data into SQL.

All of our programmers have live writer now and Crash asked that everyone write at least one client facing post on any given sprint item.

This is very exciting. Our clients, users and even programmers are going to be blown away!

Sent from my iPhone.

The answer is: Too old to do the Super Bowl halftime show!

| Sunday, February 15, 2009

image

I think the United States has just collectively spoken with respect to Bruce Springsteen’s appearance when he played the Super Bowl halftime show.

So many Americans were shocked to see how much he had aged that the search phrase “how old is bruce springsteen” is number 4 for the month???  With all that’s going on in the world?  Credit crisis, trillion dollar stimulus bill, new President (aside from what’s on the lunch menu) to name a few…

Even scarier, slightly fewer Americans had  enough cause to Google “Penile Fracture”.

He’s 59, btw…

Optimizing for SQL “if exists (…”

| Saturday, February 7, 2009

While perusing some of the code in Reporting Services 2008 i ran into the following code:

IF ( NOT EXISTS (
SELECT TOP 1 1
FROM
...

This was the first time I had seen the “select top 1 1…” usage.  I had always used “select * from…” because of my theory that the db dudes at Microsoft were smart enough to recognize when a query was inside of an “exists” test, and would return true or false immediately when the query had rows, regardless of how many, and regardless of what columns where being queried.  I also liked the “select * from…” syntax since I think it’s easier to recognize a simple existence test with the absence of column names.

The programmer who wrote the code above was thinking that the SQL Server was going to execute the query, return the requested data, then determine if rows existed.  Well, I can finally put this argument to bed.  Jacob Sebastian wrote:

First of all, EXISTS() returns as soon as a row is found. So it does not retrieve all the matching rows. The condition becomes true after the first row is found and EXISTS() function exits immediately.

I could not find any difference between 1, * or column names. Here are some test scripts.

He goes on to show every method (select *, select 1, select column, select top 1 1) uses the exact same query plan. 

I don’t mind the look of “select top 1 1 from…”, but I don’t want any of our programmers confused about special optimization rules for existence testing.

Scrum and Journaling

| Thursday, February 5, 2009

As Crash mentioned earlier, we have implemented the Scrum process. So far, I’m very pleased at the progress we are making as a team. The first couple of Scrum meetings were a little rocky but we seem to be in a groove now. The burn down chart is healthy and everyone seems to be acclimated to this new process. It’s not too far off from what we were doing before except now we have accountability to our fellow team members to get sh!t done.

One thing I see programmers struggle with is remembering what they did yesterday. This seems like a simple concept. All you have to do is review the burn down chart and you’ll know what you did. Everyone comes to the Scrum with a pad of paper and a bunch of chicken scratch of things they worked on the day before. For the team leads like myself, it is a little more difficult to remember what you did yesterday because we wear so many different hats in addition to our responsibility to Scrum and the sprint.

I won’t write things on paper, ever, so I went looking for a solution that would allow me to quickly jot things down so that I can stay focused on work and would be easy review them prior to the next days Scrum. I came across an application called EVERNOTE, which is a very cool note taking app on steroids.

Remember everything.

Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at any time, from anywhere.

So I can sync my notes/journal on the web, my iPhone, my PC desktop and MAC desktop. Are you kidding me? This is genius! The features are amazing, like text recognition on images for example. Where has this been all my life?

photo To bring Evernote into my Scrum life I needed it to be a daily journaling utility. Setting Evernote up to be that was simple. I created a notebook called “Journal”. I create a new note each and every day with the date as the title and SCRUM as a tag. That journal note is always open on my machine and syncs often so that I can access my daily journal from other locations, like my iPhone when I’m in a meeting. The next day just before the Scrum, I simply review my journal from the previous day. It’s drop dead simple and I feel comfortable with it because I can access the system from anywhere. The searching engine it bad a$$ which I like because I may want to see all the code-reviews I did at the end of the sprint, or review how many roadblocks I knocked down during the sprint.

If you haven't seen this yet then you have to try it. The best part is the price, FREE!

Whining Programmers

| Tuesday, February 3, 2009

A friend of mine sent me this email:

I had a conversation today with two senior programmers who happen to be users of a web based system that I have ownership of. The conversation started with the programmers expressing frustration with the search mechanism on the system they were using. I asked what they were searching for and they couldn’t remember but still wanted to complain about it. I’ve had the very same conversation with them before so I had an idea of what they were trying to do and I sent a big long explanation of how delimiters work in search phrases and how free text searching works which is why searching for “this.that” will return “this”, “that”, and many other combinations of those terms.

The users had a very simple problem that could be solved a few ways. Sure we could regex the where clause or do some other fancy tricks but why bother? This is a problem for two people out of 150 users. There is a very specific list of phrases that exists that they want to tag items with. The right thing to do is index those phrases and allow them to tag their items with these indexed phrases. Doing this also allows us to efficiently search on those indexed phrases.

They were not satisfied with this response. In fact, one programmer said something to the effect of “could you imagine if other searches worked this way”, and “why doesn’t the search just give me what I asked for?'”. At this point I felt like I was being challenged and talked down to. Hoping to give them an example that would make more sense, I asked the programmer to type their phrase in Google and see what happens. I also asked the programmer to then click on Google’s advanced search and see what Google did to their phrase. I was hoping for an “ah, I get it now. Lets index these phrases like you suggested”. Instead I got a “I’ll just come see you when I can’t find something”. Now I’m the one that is frustrated.

Like I said before, these two are senior programmers. I respect both of them because they have been doing what they do for a very long time. I figured maybe I had it wrong. Maybe, just maybe, I could learn something here and get schooled by a couple of old school programmers. I decided to take the very same search concept that they were trying and tested it on a system that they maintain.

Remember, the system they were complaining about is web based so search times need to be fast. The searches they were frustrated with took between seven and 30 seconds depending on the use of a free text search option we gave them. So, I logged on to their system, set up some data to match the very same scenario they threw at me and did my search. Their database is much larger so I was anticipating the search to take a couple of minutes rather than seconds. After about 45 minutes I stopped checking on it.

Seems to me like they are faced with the very same issue except they don’t get cool features like free text in their programming language. They would have to index the phrases somehow or write some intelligent code to handle the search but it did not work out of the box which surprises me because they seemed so shocked that my search didn’t work for them. My response to them was “Why doesn’t the search give me what I asked for?”.

I think there is a fine line between expressing frustration with a problem and whining about it. These “senior” programmers are problem solvers one would think. If my friend is explaining how his search mechanism works and they disagree with it or know of a better way to do it then they should have offered up some of their wisdom. Instead, they ended up whining and looking silly.

Programmers should approach other programmers with examples and suggestions if they find something they don’t like or disagree with. Whining creates problems, it doesn’t solve them.

I take that back. Some whining is ok as long as you know you are whining. Get over it and move on to the next challenge.

Tax Time

| Sunday, February 1, 2009

It’s always tax time.  It never goes away.  You pay it every paycheck of course.  You pay it with your mortgage.  You pay it with your bar tab.  This is just the time of year were we have to tell our Stimuli Overlords how much of the money they’ve confiscated from us is actually ours.

For the past ten years I’ve had an accountant calculate my share of my jack for around 200 tax deductible dollars.  Last year it seemed so simple for her, and so complicated for me that I decided to try out a 2008 version of TurboTax (what I used ten years ago before i upgraded to humans).  All I can say is – I’m glad I don’t write Turbo Tax.  It’s good software (I’m using the web version), but i pity the support team this time of year.  I’ve been through a couple of audits, so I know what they are looking for.  But had I not, I’d be asking them ALOT of questions…

So this year I feel a little more in control, but a bit less “insulated”. What could possibly go wrong?