New Toy

Vacations and holidays are my primary excuses for buying new toys.  Since I’ve got a trip to the American southwest (at least the Utah and Arizona parts) coming up soon, I figured I’d buy a new lens to capture the landscapes and canyons I plan to see.  Since I don’t have any truly wide lenses, I settled on a Tokina 12-24mm for the Nikon D70s I shoot with.

I bought it used on clearance from Penn Camera, which probably saved me at least $100.  I’ve never shot anything as wide as 12mm (I think it’s technically 18mm because of the multiplier effect) before, so we’ll have to see how the vacation shots turn out.

Granting full permissions to all tables and views in a database

One of my assignments is to write a script that will grant CRUD (create, read, update, delete) permissions to a database role.  SQL Server Management Studio does a nice job of generating scripts for adding logins, roles, and adding users to roles, but isn’t terribly clever about granting permissions across types of database objects.  Some of the difficulty has to do with not having upgraded to SQL Server 2005 yet.  Thanks to some helpful people at Stackoverflow and a page I found through a Google search, I was able to put together a script that handles the permission-granting part a bit better.

Step 1 was to develop a query that generated all the commands for granting permissions.  Here’s the query I got from Stackoverflow that retrieved all the user tables and views:

SELECT * 
FROM information_schema.tables 
WHERE OBJECTPROPERTY(OBJECT_ID(table_name),’IsMSShipped’) = 0

This query is especially useful because it filters out system tables and views that can appear if you query the sysobjects table.

Using a cursor to apply permissions to all the tables was something one of my colleagues first suggested.  I only found this implementation today, and adapted it for my purposes.  The change I made to the code in that implementation is in the select statement.  I populated the @tables variable this way:

SELECT ‘GRANT SELECT, REFERENCES, INSERT, UPDATE, DELETE ON ‘ + TABLE_NAME + ‘ TO ‘ + @role
FROM information_schema.tables
WHERE OBJECTPROPERTY(OBJECT_ID(table_name),’IsMSShipped’) = 0 

@role is declared earlier in my script as varchar(50).

I still need to grant execute permissions on the stored procedure.  I’ll need a different select query to accomplish that.

First Impressions of Google Chrome

I started using Google Chrome (hereafter referred to as just “Chrome”) yesterday to see how it compared with Firefox 3 (my current browser of choice).

So far, it does seem faster than Firefox.

I find the user interface to be clean and intuitive.  Particularly nice touches include:

  • The subtle “do you want to save this password” functionality (probably lifted directly from Firefox 3)
  • The default home page (most visited pages, recent bookmarks, recently closed tabs, etc)
  • Combination of location and search textboxes
The last of those changes is perhaps the most important one, because the current UI of both Firefox and IE keep page locationa and search separate.  While you can enter search terms into the location bar and get either search results or an actual page with both Firefox and IE, you wouldn’t guess if from the interface.
As far as how pages look in Chrome, they look the way they should (at least on the sites I visit regularly).  Pages that don’t render properly in Chrome don’t render right in Firefox either.
One thing that seemed odd was how long it took for the bookmarks I imported from IE to show up in Chrome.  They didn’t appear right after I was done installing, but later, after I’d done some browsing.
For now, I miss having plug-ins like FlashBlock in Chrome.  If I still feel that way after another week or two, I’ll stick with Firefox.

smallestdotnet.com

Scott Hanselman came up with this site that tells you what version of .NET you’ve got and your shortest path to .NET 3.5.  I’ve tried it from a couple of different Windows machines (one virtual machine, one real) and it works pretty well.  When I browsed the site with my iPhone, it figured out I was running a Mac.

Especially useful is the JavaScript snippet he provides that lets you have that functionality on your own website.  I’ll definitely be passing this url around the office.

Other People’s E-mail

Lately, I’ve been getting e-mail at my Gmail account that are clearly intended for other people.  I thought “Scott” and “Lawrence” were fairly common names individually, but the number of people who believe that slawrence [at] gmail [dot] com belongs to them has grown to the point where it’s beginning to become inconvenient.

The e-mails that concern me the most are the ones that contain people’s travel information, passwords to certain websites, and cellphone bills.  Because they’re automatically e-mailed from these sites, I’m not sure what the best way is to contact these folks to have corrections made.

I welcome any suggestions readers (all 3 of you ;-)) might have on the best way to deal with this.

My iPhone Review

I picked up a white 16GB iPhone 3G on July 13.  After a month of use, I can add my 2 cents to the tons of reviews already out there.

Battery Life

I have to recharge the phone every two days, running with 3G and wi-fi off, except when I need them.  If I leave 3G on, I have to recharge the phone after a day.  From people I’ve talked to about other 3G phones, this amount of battery life is typical.

No Keyboard?  No Problem.

I’ve found that I can type with 2 thumbs reasonably quickly, even without the physical clicking of keys.  I can’t type as fast as I could on my old Nokia 6820, but it’s still usable.

The iPhone as a Phone

The only functionality obviously missing is support for MMS (picture mail).  It seems odd that phones AT&T gives away have a feature that the iPhone lacks, but that’s the situation.  While it isn’t a feature I want desperately to use (I barely used it on the Razr), having to surf to a website to receive MMS messages someone sent you is inconvenient.

I like everything else.  The recent call and voicemail features are particularly well-done.

The iPhone as a Web Browser

Browsing the web is where the iPhone really shines.  At this point, there’s no other device its size that enables you to surf the web so easily.  If you aren’t an AT&T wireless subscriber, this feature alone is probably one of the best reasons to buy an iPod touch.

While the iPhone doesn’t support Flash, I see this as a plus.  On my work and home machines, I use Firefox 3 with Flashblock enabled on virtually every site.  No worrying about ads, or video I don’t want, or the battery life penalty that would likely come with Flash support.

The iPhone as an iPod

Last week was the first time I used it much as an iPod (I was in Toronto).  As cool as the click wheel was on previous iPods, multi-touch crushes it.  I didn’t think navigating through a large music/video collection could get easier, but it is.  Watching videos on a screen that size isn’t bad at all.

E-mail on the iPhone

So far, I like this feature.  Occasionally, I’ll see a “This message has not been downloaded from the server” note, but that only happens with my Comcast e-mail account.

The Apps

I spent a lot of time playing JawBreaker when I was at Pearson International waiting for my flight home.  It’s an addictive little game.  Beyond that one, the apps I use most are NetNewsWire, Facebook, and Pandora.

Overall

I’m very pleased with it.  I’ve only gone traveling with it once so far (to Toronto for Agile 2008), and even though I had a laptop with me, I barely used it.  If I had it to do all over again, I would have left the laptop at home and simply synced the iPhone with my work e-mail.  It’s that capable and excellent a device.

An Alternative to NUnitForms

I first heard about Project White from someone at the Agile 2008 conference last week.  I haven’t had a chance to play with it yet, I’m very curious to see how it compares.  Since it comes from Thoughtworks, I think it’s going to be good.  If it makes testing of modal forms and dialogs easier, I’m already sold.

If anyone out there has already been using Project White successfully, it would be great to hear from you.