Category Archives: Tools

The Best Intentions

Well, I set out tonight to do some more studying of PowerShell, my new love in life. Then I intended to create a blog entry, but a Twitter post reminded me of something I’d seen on the Hanselman Forums, and next thing I know I’d sucked up my alloted time over there.

So if you want to see what I’ve been up to tonight, check out the Hanselman Forums at
http://www.hanselman.com/forum/default.aspx

Most of what I posted was in these threads: Productivity Tools, Hanselminute Shows, Off Topic and Philosophy of Software.

I can’t leave without passing along at least one PowerShell related tip: I’ve been listening to the PowerScripting Podcast all week. They’ve had 19 shows so far, I started at 0 and am up to number 8. Very good stuff, lots of links to PowerShell tools and tips. One reason it’s taking me so long is I keep stopping to make notes or check out some link they give.

Advertisements

Avoiding Burnout OR How I learned to stop worrying and love the PowerShell

Most geeks I know tend to be workaholics. We go and go and go on a subject, spending long hours in front of our PC’s until we’ve conquered whatever we’ve been working on. It’s important though to avoid getting burned out. When we’ve exceeded our capacities, we’re depressed, dread looking at things, our productivity goes to near zero and stress wreaks havoc on our health.

For the last two months I’ve been hammering away at SQL Server, getting ready for my presentations at the recent code camp. While I’m not quite at the burn out stage, I recognize it’s just around the corner and decided I needed a break. At the same time I came away from code camp energized and wanting to learn something “techy”. The answer then was obvious, to find some technology that was new to me, and that I could use in conjunction with my SQL Server work, but was not directly SQL Server.

I twittered about going to the bookstore on Sunday, what I was actually looking for was a book on F#. (Yes, I’m an old fogey and still like books as a good platform for learning.) F# seems to fit well with processing sets of data. Sadly the stores lacked any tomes on the subject.

powershellstepbystep I did find, however, a book called “Windows PowerShell Step By Step”. This looked like a great fit for my needs. It’s small, around 220 pages so it’s something I can easily read in a short amount of time. It’s on a subject I was interested in, PowerShell. I believe PowerShell will soon become an integral part of all Server based technologies, and we’ll be able to perform remarkable amounts of maintenance and more with PowerShell.

Over the next few days I’ll give some more resources for PowerShell that I’ve already found, but I can tell you I love PowerShell already. My post for today is not so much about PowerShell but about burnout. When you’ve spent a lot of time hammering away, don’t forget to come up for air every so often. Look around, see what other tools are available for you to learn. You’ll find yourself refreshed, and have new skills to boot!

The Developer Experience

In case you’re wondering why the slowdown in the blog this week, I’ve been spending all my free time getting ready for Alabama Code Camp 6. My first presentation of the day is “The Developer Experience”. It’s chock full of practical, low cost (or even free!) ways to make your life as a programmer more productive.

As promised in the session, here’s the complete PDF of my slides:  The Developer Experience

Alabama Code Camp

The sixth Alabama Code Camp is coming up February 23rd, 2008. Registration is now open, as is the call for speakers. Many, including myself have submitted, you can see them by going to the Alabama Code Camp site and clicking on the speakers link. The list of speakers is very impressive, no less than eight MVPs, and at least two authors. I’m humbled to be amongst such distinguished company!

Here’s the synopsis for my two sessions, in case you are curious:

Introduction to SQL Server Integration Services

Whether you are creating a full blown data warehouse, doing a data conversion from an old system to a new one, or integrating applications together SQL Server Integration Services can help. Get an overview of this powerful tool built into SQL Server.

The Developer Experience

Learn about tips and tricks to enhance your experience as a developer both in the physical world and the virtual world. See hardware that can make your life easier, software additions for Windows and Visual Studio, even how just a few tweaks in the Visual Studio options can make your experience as a developer more pleasant and productive.

This is shaping up to be an impressive code camp, so don’t hesitate and get registered today!

Feng Shui and the Art of Development

I’m not a big proponent of Feng Shui. For those unfamiliar with it, Feng Shui is a Chinese philosophy that essentially says that the placement of your furniture can have a big affect on your health and prosperity. Like a lot of things, something that starts off as a good idea seems to me to be carried too far. I do however firmly believe that your physical environment can have a dramatic effect on your mental environment. I saw a blog posting by Scott Hanselman describing his new home office layout. It was then that I realized something important: my own home office no longer worked for me.

I’ve been in my house eight years now. Like a lot of folks, I accumulate a lot of things related to my work / hobby. Books, computers, CDs/DVDs, and gadgets galore. It probably doesn’t help that my home office is also my ham radio “shack”, the place that contains all my radios, books and associated gear. For some time now I’ve been pretty unhappy with my basement office, having problems concentrating, etc. It had even gotten to the point where I had no place to even lay a book and reference it while working. After reading Scott’s post I immediately realized what my problem was: my environment.

Unfortunately December and early January were a bit hectic, what with my wife’s health problems and work, I haven’t had much spare time. Well, this weekend good luck finally arrived. My wife is healing very nicely and is much more self sufficient. We had snow, which made going out impractical, so it was the perfect opportunity. I pulled nearly everything out of my office, placed a lot of my “junk” into storage and relaid out the tables I use for working.

I’m typing now from my reconstructed office. A lot of the spare parts I had accumulated are gone, boxed up and placed in the storage area under the stairs. A lot of old catalogs and magazines hit the trash, many of the books I seldom reference were moved to another area of the house that had space. I now have plenty of space for my computer and can finally have all three monitors laid out side by side. I have a workspace now, somewhere to put the book I’m using for learning or reference. In addition, the moving of old books gave me space to put away my new books. I was able to do a little shuffling so the books I currently reference the most were on the lower shelf within arm’s reach, instead of piled on the floor.

Once again my office feels like a safe place to learn. When it comes to your office, whether it be your desk at your employer or your desk at home, don’t overlook your environment. Everyone has their own style. Look around your office right now. Is it comfortable? Quiet? Can you think effectively? Are the tools you need close at hand? If you answered any of these “no”, then start thinking about what you can do to make your home office a refuge, a safe place to work and learn. Then go do it.

Arcane Fun Fridays – Broadcast your Podcast

A little fun tip for today’s post. As long time readers know I love podcasts. They are a great way to capitalize on time, learning while doing other activities. As I was puttering around the house, I wished I had an easy way to listen to my podcasts without having to use my headphones, and also be portable. Then it occurred to me, I did.

When I drive back and forth to work, I use a cassette adapter to plug into my cheapy mp3 player into the my old car’s stereo and listen to my podcasts. Sometimes I travel on business, and these days it’s seldom I get a rental car with a cassette, so I picked up an inexpensive radio transmitter, similar to this one but a heck of a lot cheaper. Well, being an amateur radio operator (often called “ham radio”) I have a wide variety of power supplies lying around. I dug into my box and found one kind of like this. I mated them up, found an unused frequency, and plugged the other end of the transmitter into the speaker jack of my computer and boom I was listening to my podcasts through my various radios. Very nice, and I can see a lot of use.

I was pleased too with the range, I can hear it all over my house and even into my yard a bit. I could probably get a bit more range moving it out of my office basement.

One last hint for today, next time you go to various stores keep an eye out for a “clearance” area. They are usually tucked away in the back corner of the store, often near the restrooms. I know I’ve seen them in Staples, Radio Shack, Office Max and Office Depot to name a few. You can get some really good deals, for example I picked up my transmitter for 10 dollars, marked down from the original 49 bucks. Also check out sites like woot for “deal of the day” specials.

Does MacGyver Dream of Mark Miller?

For Christmas this year my family gave me a copy of MacGyver, Season 1 and 2 on DVD. My wife’s side of the family gave me a gift card which I used to get seasons 3 & 4. I’m a long time MacGyver fan, but my wife had only seen one or two episodes and my kids had never seen it at all, so we’ve been having a lot of fun watching. My favorite part of the series was the voice-overs, where you’d hear MacGyver’s voice as he explained what he was doing. It always started with some odd thought or story that led you through the thought process of how he came to the conclusion to build whatever wacky life saving device he was constructing.

I’ve come to realize in some ways these blog entries are sort of like the MacGyver voice-overs, my inner thoughts being created for you on the web. So I hope you’ll bear with me a few minutes while I relate a rather bizarre dream I had last night.

In my dream I’m standing on stage, in front of a fully loaded computer. It has all the bells and whistles, VS2008, SQL Server, and so on. On the other side of the stage, Mark Miller is there, in front of a similar computer. For those unfamiliar with Miller, he’s the genius behind CodeRush and RefactorPro, tools to help you write code faster. Some time back, when the product was first released Miller used to challenge the audience to beat him in a code writing contest. His machine had CodeRush, and he would use chopsticks to write code, his competitor could use their fingers but did not have CodeRush on their machine. Of course Mark always won.

So sure enough, in my dream there’s Miller, chopsticks in hand ready to go, and I’m the guy going up against him. Our task is to take data from table A1, create a mirror table and name it table A2, and then move all million rows from A1 into A2. As you might guess, in my dream, I win. How?

Well I didn’t write a program. Instead I first jumped into SQL Server Management Studio (SSMS) and used its script generating capability to produce a create table script. Make a quick search and replace and boom I’ve got table A2 created. I then jump over to the Business Intelligence Developer Studio (BIDS) to create a SQL Server Integration Services (SSIS) package to do the data move. (Yes, I probably could have used the script generation of SSMS again to generate an Insert script, but I was showing off.) In about three to four minutes I had accomplished the task and moved all the data while Miller was pecking away at computer with his chopsticks.

I didn’t win because I’m a hot shot coder who is smarter than my competitor. Miller is a (some say mad) genius who can run circles around me in the coding world. As I told the folks in my dream, and I’m telling you now sometimes the best solution to a programming challenge isn’t to program at all! If you read yesterday’s post, Straining at Gnats, you may recall I said “…take some time. Push back from your computer and think for a moment. Think what the true outcome of your application is supposed to be. Not “what will the program do” but “what will the program do for the user???” Think about how best to achieve the user’s goals.

When you are thinking about solutions, take a minute to look outside of your favorite programming language. Is it possible to achieve the goal without writing any code at all? What tool or tools do you have in your tool box that you can combine to get the job done? Here’s a great example that happened to me just before I took off on my holiday vacation.

As I’ve mentioned before at work we have a Business Intelligence (BI) app I work as the lead on, it imports data to a SQL Server 2005 warehouse via SSIS then uses SQL Server Reporting Services (SSRS) to generate reports. The data is imported from a work order management system we bought many years ago. We also have some engineers who have a tiny little Microsoft Access database. This database has a primary key column; we’ll call it a part number for purposes of this example. There are three more columns, some data they need to know for each part but are not found in our big system. They’d like to add this data to the reports our BI app generates. Two last pieces of information, they only update this data once per quarter. Maybe. The last few years they have only done 3 updates a year. Second, the big system I mentioned is due to be replaced sometime in the next two years with a new system that will have their three fields.

A lot of solutions presented themselves to me. Write an ASP.Net app, with a SQL Server back end then use SSIS to move the data. Elegant, but a lot of work, very time consuming for a developer, especially for something that can go away in the near future. Write an SSIS package to pull data from Access? Risky, since we had no control over the Access database. A user could rename columns or move the database all together, in either case trashing the SSIS. Several other automation solutions were considered and rejected, before the final solution presented itself: not to automate at all.

Once per quarter I’ll simply have the engineers send me their Access database. Microsoft Access has a nice upsizing wizard that will move the table to SQL Server, I’ll use that to push the data onto the SQL Server Express that runs on my workstation. I’ll then use the script generating capability of SSMS to make an Insert script for the data. Add a truncate statement to the top to remove the old data and send it to the DBA to run. When I ran through it the first time my total time invested was less than ten minutes. In a worst case scenario I spend 40 minutes a year updating the data so it’s available for reporting. That’s far, far less time that I would have spent on any other solution.

The next time you have a coding challenge, take a moment to “think like MacGyver”. Look at all the tools you have lying around your PC and see what sort of solutions you can come up with. Once you are willing to step outside the comfort zone of your favorite coding language, you may be able to come up with some creative, MacGyver like solutions to your user’s problems.

 

PS – If you missed the announcement while on vacation, DevExpress just released CodeRush / RefactorPro 3.0. More than 150 refactorings and lots of new CodeRush features! Update yours today.