I listen to the same radio station each and every morning. Problem is, so do a lot of other people. The server I need to connect to allows for a maximum of 100 connections, so what I end up doing is repeatedly trying to connect until I can get one of those connections. Until now….
I created this little applescript to hammer away at that server. I saved it as a playlist, and just run the following :
I’m just getting around to snooping around Sql Server 2008, and noticed that they have FINALLY added just a DATE datatype. What this means is that we can now just store a date, rather than a date and the time. No more will we have to write SELECT CONVERT(VARCHAR,GETDATE(),101)!!!!!
This now does the trick :
SELECT CAST(GETDATE() AS DATE)
I checked my GMail today, and noticed a new “Themes” link. I clicked on it and behold, a plethora of new color themes for my GMail. I then found the mother of all themes : Terminal!
The other day I was reading Joel Spolsky’s blog post on his new site he just released called Stackoverflow.com. To summarize, Joel and his team created Stackoverflow as a resource for developers to get answers to questions they have. This got me to thinking about the resources I utilize on a daily basis.
Just Google it!
Joel points out that the way Developers usually go about getting those answers is to Google their question and grab the first response they find. I agree that this is usually the first thing I do, and for the most part, this usually works. For instance if I’m trying to get a client’s C++ project up and running, and I’m coming across strange and cryptic compile time errors, I’ll do a Google search in hopes of having some light shed on the problem. Probably for most of us, Google does the trick, as nothing beats a finely indexed resource. Like many Devs, I used to have a ton of those 600 page Wrox and O’Reilly books spread out all over the place. But since just about any piece of information I need is on the web, tech reference books are pretty useless anymore. In fact, I gave all of mine a way about a year ago on freecycle.org.
Use your networking skills
Of course if you work in an office with other Devs, you can always hit them up when you come across a problem. But if you’re like me, and you telecommute, you have to build a network of resources you can bug. I have a few pals whose ears I bend from time to time via instant messenger (and they do the same with me). More times than not, just talking out a problem solves itself.
Sometimes Google just doesn’t cut it and you just can’t get your question answered. So the next best thing is to post your question on a message board. For instance, on the project I’m working on now, I’ve had to interface with the Quickbooks SDK. Intuit has a very nice message board with lots of activity. A lot of boards allow you to specify to have an email sent when a response is given to your question. I would recommend looking at the current responses on a board to see how often people post (ie:is there a new response every minute versus a day). If it appears as though only a few new posts per day get entered, then I would look elsewhere.
Paid technical support
A lot of products offer technical support you can pay for. One client I worked with actually purchased a year’s worth of tech support from Business Objects (Crystal Reports) and had me call them about an apparent bug with Crystal Enterprise. I can report to you that this was a big waste of time, with me spending about a month going back and forth with the support people, who in the end, couldn’t address my issues.
Still no answers huh?
Sometimes no matter how hard you Google, or how many people you bug, you just can’t get an answer. What I end up doing in times like this is to approach the problem differently. For instance, I recently had to get a legacy COM application running in Windows SXS mode (this is COM free registration with the help of a manifest file). I had the majority of the app running ok, but there was one component that would continue to read from the registry rather than the manifest file I created. I was able to narrow it down to line of code where this was happening. I tried a few alternate approaches until finally I got it to work.
I don’t have a problem admitting that I can be "slow" at times to discover things that have existed for a while. One of those finds, for me, is the ability to type in a FireFox’s bookmark title in the address bar. For me, this is very similar to using Quicksilver for the Mac, where you just start typing something, and Quicksilver starts to filter through it’s huge list of applications it has indexed on your machine. The nice thing about FireFox’s address search is that you usually only have to type a letter or two of a bookmark before it appears. This is way quicker than messing around with a mouse. All I did below was hit Command+L (drops the cursor in the address bar), and then start typing the bookmark I want to access.
I downloaded Google’s new browser Chrome last week, and wasn’t all that impressed. It didn’t seem, to me, to run that much faster than my Firefox 3 (keep in mind I was running Chrome through my Parallels for Mac VM).
The one awesome thing Chrome brings to the table is the concept of an Application shortcut. This is nothing more than a desktop shortcut to a particular Web Application. For instance, I use Google Docs an awful lot, so I created an Application shortcut to a Google spreadsheet. Now instead of opening up a browser and navigating to Google Docs, etc… I can now just click on the shortcut, and it opens up the spreadsheet in it’s own window, with it appearing to be an independent app, much like an MS Office document.
I moved my 5 gigabytes worth of digital photos from my Mac to my PC tonight. This is usually a pretty easy thing to do, as you just copy your “Originals” folder in the iPhoto directory to it’s new destination. I didn’t care about copying the photo albums from iPhoto, but the problem I ran into was getting to the keywords my wife and I added for every stinking photo. iPhoto uses it’s own proprietary method for storing keywords, so I needed to export them somehow.
Thankfully I found the iphotokeywordutilities app that did the trick for me. It’s a little tricky to get going, as you have to :
2.Open iPhoto and select the photos whose keywords you want to export.
3. You then click on the applescript from the downloaded zip
I was tasked with this a month or so ago, and came upon a great site called http://www.wikimatrix.org/. It even has a wizard that asks you a number of questions, and then recomends different wiki apps for you.
You can download it from here.
I’ll have to download this and take a spin.
Two things I’ve read about that sound neat off the bat :
(1) Automatic auditing : one of my recent posts detailed how to do this. As I said, I end up doing this on practically every project, so it’s nice Microsoft is baking this right in.
(2) Date only and Time only datatypes : HALLELUJAH! I can’t tell you how many times this has screwed me when doing date comparison, and all I’m concerned with is a date, but the time element throws it off.
One of the more common tasks I perform from project to project is the creation of audit tables. The easiest way I know how to do this is to create a copy of the table I want to audit, and then add a trigger to the parent table. For my example I’ll use my ever-so-popular MLB database and my TEAMS table. The schema for TEAMS looks like:
The audit table for TEAMS will be an exact copy, with a couple of modifications. First, TEAM_ID needs to be a copy, so it’s no longer an identity column, The second change I made was to add an AUDIT_DT column to capture when the change occurred :
I then add a trigger to the TEAMS table to capture updates and deletes (I only want to capture when the original column changes, not when it’s added) :
That’s it! A couple of things you may want to consider when creating an audit table is :
- Remember that the audit table gets an insert for each update/delete to the parent table. This can have some performance ramifications. One of the things I do is not put any indexes on the audit table.
- You’ll want to purge the data from this table from time to time (or back it up).
Tags: SQL Server