A Couple Of T-SQL Quickies
It’s been a while since I’ve posted any SQL Server content, so in a bid to get back into the swing of things, here are a couple of very simple, but useful, T-SQL commands. I’ve used these recently in a large project I’m working on.
Identify all tables with no Foreign Key constraints:
select distinct
t.name
from sys.tables t
left outer join sys.foreign_keys fk on t.object_id = fk.parent_object_id
where fk.object_id is null
order by t.name;
List all tables in a database, with row counts
select t.name ,
ps.row_count
from sys.dm_db_partition_stats ps
inner join sys.tables t on ps.object_id = t.object_id
where ps.index_id < 2
order by t.name;
Goodbye Posterous, Hello WordPress
I’ve been a Posterous user for over 3 years, having used them to host all my sparsely updated blogs. It came as a bit of a surprise this week when their founder Sachin Agarwal announced that the company had been bought by Twitter. From the press releases, the acquisition appears to be more about buying the people rather than the product. All good for the Posterous staff I think, I’m pleased for them if it works out. However, where does it leave the users? This particular statement on the announcement makes me think that all development on the current Posterous Spaces platform will stop and will eventually get killed off.
Posterous Spaces will remain up and running without disruption. We’ll give users ample notice if we make any changes to the service. For users who would like to back up their content or move to another service, we’ll share clear instructions for doing so in the coming weeks.
A company actively encouraging users to backup and find another service is a sure sign this thing isn’t going to be around for much longer.
As it turns out, this was fairly good timing for me. I’d been considering moving blogging platforms for a while, but with no immediate need to do so, I’d put it off. This announcement gave me the push required.
While I’ve been a fan of Posterous, I’ve also been frustrated by its lack of flexibility. In addition, I also wanted more control over my data, I wanted to own it rather than have it in the hands of someone else. This has been an issue for me with many services over the past couple of years. For example, the proprietary format of notes in Evernote led me to start using Simplenote and Notational Velocity, for the simple reason that I can move my data elsewhere if required. So when it came to choosing a new blogging platform, the key thing was self-hosting. The natural choice was WordPress, it being so ubiquitous and easy to install. Using this guide by SQL Server guru Brent Ozar, I was up and running in no time.
I’ve consolidated both my personal and SQL Server blogs into one, all the SQL content can be found here. Now I just need to get back to writing again…but this will probably have to wait till I finish my Creative Writing Open University course in the summer. My words are at a premium!
I chat, I message
Since I stopped using Windows as an OS for personal use, almost four years ago, I also gave up using IM chat programs. Back then, I was a fairly big user of MSN Messenger, but when I found the Mac version at that point to be flaky to say the least, I ditched it completely. And I didn’t miss it at all. Apart from using Skype for remote work purposes, I’ve shied away from almost all other chat programs.
On Thursday last week, I had read an article on Lifehacker about IM app Adium, and various plugins that were available for it. I decided to fire it up and connect it to my Google and Facebook accounts. To give me something to compare it against, I did the same with iChat – an app I’ve never clicked on since the day I got my first MacBook Pro. I found both apps to be pretty much similar in functionality, certainly for my uses, there was nothing to compel me to use one over the other.
Later that day, Apple announced Mountain Lion, their upcoming version of OS X. Included in this version will be a number of iOS-like features. One of them being Messages, the new version of iChat. The beta was released that day. Quite the coincidence I thought. Messages has one very compelling feature: integration with iMessage for iOS. This means that any iMessage conversations on iPad or iPhone can be carried on in Messages and vice versa. Having used this for a few days I’m certainly liking it. It puts iMessage at the centre of instant communication for Apple users. More importantly it means I can use the full size keyboard rather than having to tap away on the iPhone screen all the time!
This kind of app convergence across desktop and mobile devices is certainly seems to be the way forward. While it has it’s detractors, I’m all for it, and excited by it. Although it could do with some consistency – will the iMessage app on iOS open up and start supporting other IM protocols, such as Jabber and AIM? I’d like to think so.
If instant messaging becomes ubiquitous across devices and operating systems, the question begs, where does this leave email and SMS?
October Playlist – The Exact Feeling
October was an excellent month for new album releases, the pick of the bunch being Bad As Me by Tom Waits. Unfortunately this isn’t on Spotify as yet, so the playlist only includes the second single, ‘Back In The Crowd’ – probably the weakest track on the record. Anyway, you should all be buying it, as it is an absolute belter of an album. Another record notable by it’s absence from Spotify is the new Richmond Fontaine release, The High Country. I’ve been listening to it a lot, a fine example of storytelling via music.
The new Ryan Adams record Ashes & Fire is also a fine return to form, in the vein of the excellent Heartbreaker album, his debut from 2000. Ryan appeared on one of the BBC Four Songwriters Circle shows with Neil Finn from Crowded House – a nice reminder (as if I needed one) of how good a lyricist he is too. I was particularly pleased to see Paul Brady on another episode of said show, an extremely under-rated musician.
As is almost always the way, I eventually got into the new Wilco record, The Whole Love. These always take a few listens to sink in, they’re not noticeable for their immediacy. But great songs and outstanding musicianship yet again.
The playlist is completed by a couple of funk tracks by Gil Scott-Heron and Rick James, one of my favourite songs by the late great Bert Jansch, some Judie Tzuke (who I’ve been listening to a fair bit since hearing her on the John Martyn tribute record), and The Tragically Hip – a band I never tire of.
The playlist is here.
- Nobody Wants To – Crowded House
- The Exact Feeling – The Tragically Hip
- Lucky Now – Ryan Adams
- Black Moon – Wilco
- Living For The Corporation – Paul Brady
- Stay With Me Till Dawn – Judie Tzuke
- Back In The Crowd – Tom Waits
- Waiting For The Axe To Fall – Gil Scott-Heron
- Mary Jane – Rick James
- Born Alone – Wilco
- The Black Swan – Bert Jansch
- Kindness – Ryan Adams
- Freak Turbulence – The Tragically Hip
September Playlist – Sentimental Man
I’ve been unable to think of a word to describe the sort of music I’ve been listening to recently. It’s been more laid-back, less rocky and with little of the country/blues roots that I normally have on the go. I stumbled across live releases by Lloyd Cole and Counting Crows, both of which are excellent. The latter is a live version of their debut record, August And Everything After, one of my favourite records. This month’s new find was the Boston-based bluegrass band, Crooked Still, whose 2010 release, Some Strange Country includes a nice version of The Rolling Stones’ ‘You Got The Silver’. I’ve been re-listening to the back catalogue of The Blue Nile, totally in love with Paul Buchanan’s vocals right now.
I still can’t get enough of John Martyn. A tribute record to the big man, Johnny Boy Would Love This, was released this year, and there are some absolute crackers on it (even the inclusion of Phil Collins isn’t enough to put me off!), but the best by far is the version of ‘Hurt In Your Heart’ by Judie Tzuke. A very tough song to cover, but she really nails it here.
My own band Fake Gods are now on Spotify, so have cheekily added one of our tracks to the set too.
The Spotify playlist is over here, enjoy!
- Perfect Skin – Lloyd Cole & The Commotions
- Prospect Street – The Big Dish
- Because Of Toledo – The Blue Nile
- Sentimental Man – The Blue Nile
- Couldn’t Love You More – John Martyn
- Hurt In Your Heart – Judie Tzuke
- Anna – Brendan Campbell
- You Got The Silver – Crooked Still
- Turning Away – Crooked Still
- Wanderlust – Love & Money
- Rain King/Thunder Road – Counting Crows
- What’s The Frequency Kenneth? – REM
- On A Sea Of Fleur-De-Lis – Fake Gods
Kindling
So Amazon announced their new Kindle range this week, which included the new Android-based tablet, the Kindle Fire. I really like the current Kindle device, but I’m not sure how I feel about the new products yet. It seems a touch half-baked to me, and there are some design decisions I really don’t understand.
iPad Competitor
In the non-techie media there has been much talk of how the Fire is a competitor to the iPad. I believe this thinking is all wrong. The Fire is purely a media consumption device. Whereas the iPad can be used as a device to create content as well as consume it. The two are not the same, although they are broadly marketing to the same people. I do think the Fire could impact iPad sales, but not to the extent that some so-called experts believe. The Fire to me is more like a portable media platform rather than a mobile computer.
Pricing
A lot has been made of the $199 price tag for the Fire. No doubt it’s an excellent pricing point. Likewise, the entry model being £89/$79 puts that into the “disposable” device category. But as Dave Caolo of 52 Tiger points out, the cost price is a touch disingenuous, due to the fact that the device does not even ship with a charger.
Design
The new Kindles have done away with the hardware keyboard, a great move in my opinion. It’s one of the worst things about the current Kindle, making it look rather dated. The base Kindle model is now 30% lighter, and is a touch smaller. However, this change has impacted the battery life, which is halved to one month, storage space (also halved to 2GB) and means the device no longer has any audio capability. It’s an interesting trade-off, given that the current Kindles are extremely light anyway, did they really need to make it any less heavy? I always thought the two month battery life was a huge selling point for a dedicated book reader.
I’ve not mentioned the Touch yet – the new $99 ($149 for 3G) touch screen Kindle. I’m not entirely sure where this model fits in to the scene. It’s a middle ground that I don’t really get. The Touch and the Fire both introduce a design change that makes zero sense to me – the buttons on the sides to turn the pages have been removed, so page navigation is done purely by the touch screen. The easy-to-access hardware buttons gave the Kindle a usability that reading apps on the iPad, for example, could not compete with. I really don’t understand the thinking behind this move.
Amazon have done some really good and exciting things this week with these announcements, I reckon they’ll sell a shed load of the base and Fire models in the run up to the holiday season. I’m more tempted now for the base Kindle myself – as a dedicated “one thing well” reading device, it’s at a compelling price for a very good product. I’ll be interested to see the Fire close up and get a feel for it, although it’s not something I’d personally be interested in (as an iPad owner). When the new devices start shipping next month, we’ll start to see how consumers feel about the design changes, and whether Amazon is onto another winner with the Fire.
If this is an indication of what the new Ryan Adams record is going to sound like, then bring it on! Release date is 11th October. Lovely stuff.
Beer! Stewart’s Pilsen and Hefeweizen
It’s been a while since I’ve blogged about beer, probably because I haven’t been drinking as much recently. But since I picked up a couple of new beers at Craigie Farm today, I thought I’d post my thoughts on them here.
Both beers are brewed by Stewarts Brewing in Edinburgh, who make some cracking beers. I had a pint of their Pentland IPA in my local the other day, and I highly recommend it.
The first I had tonight was their Pilsen. I’m not a huge fan of lager styles, but I do like a good German Pilsner. This had a classic lager aroma, and poured a large and frothy head. The palate delivered a clean, tangy zing from the Saaz hops. Nicely bitter, this is quite a refreshing beer, and a good indication of the Pils style.
Next up was their Hefeweizen, a Bavarian style wheat beer. Pouring this produced a very cloudy and vibrant orange body with a huge head. Initially the taste was a bit disappointing, but after a few mouthfuls, the delicate banana flavours came through on top of orange and clove. A very lively and effervescent beer, one I enjoyed the more I drank.
Both very enjoyable beers, I’d certainly buy them again. One slight complaint though would be the price; at £2.49 each for 330ml bottles, they’re not the cheapest. But, given that they are rarely brewed, being the special beers, I can’t criticise the pricing too much.
Meanwhile, in my own little brewery, I’ve got 21 litres of oatmeal stout fermenting away nicely. This is my first attempt at an all-grain stout, it smells great at the moment and I can’t wait to try it in a few weeks time. My summer ale is being drunk at a decent pace, it’s a fairly good session beer at just 3.5% ABV.
Now time to find some more beers to drink and write about during next weeks NFL games…
August Playlist
It’s the start of a new month, so here is my playlist for August. I didn’t listen to as much music as I usually do last month, I was catching up and trying out a lot of podcasts, which is what I listen to when I’m commuting. My big musical find was the last record from Phosphorescent, a band that’s been on the periphery of my musical radar for a while. I stumbled across their 2010 release, Here’s To Taking It Easy, and was grabbed immediately by it. It’s a fairly upbeat record for an alt-country style band, and it has plenty of pedal steel guitar to keep me happy.
The knee-jerk reactions to the English riots of a few weeks ago upset me somewhat, with the right-wing rhetoric being spouted over the likes of Facebook and Twitter at odds with my leftie stance. So I found solace in the intelligent and inspiring songs of Billy Bragg and Dick Gaughan. Waiting For The Leap Forwards and Whatever Happened felt particularly apt at the time.
Talking of Billy Bragg, I was recommended Frank Turner by a friend, who is similar in style to Mr Bragg but without the political edge. I was pleasantly surprised, one to keep an eye on.
Over the course of the month I dipped heavily into the back catalogue of James Yorkston, went through my yearly Deacon Blue obsession, re-found The ‘59 Sound by The Gaslight Anthem and saw this superb video for the James Grant song My Father’s Coat. But the most exciting news of the month? A new Tom Waits record to be released in October! Yay! And a single out now, Bad As Me. Quality as always, following on nicely from the Brawlers section of his Orphans release. Bring it on!
Get the Spotify playlist here.
- It’s Hard To Be Humble – Phosphorescent
- Waiting For The Great Leap Forwards – Billy Bragg
- Whatever Happened – Dick Gaughan
- Peggy Sang The Blues – Frank Turner
- I Don’t Care If There’s Cursing – Phosphorescent
- Woozy With Cider – James Yorkston
- A Different Kind Of Love Song – Dick Gaughan
- The Patient Ferris Wheel – The Gaslight Anthem
- Just As The Tide Was Flowing – James Yorkston
- Help Save The Youth Of America – Billy Bragg
- Bad As Me – Tom Waits
- Raintown – Deacon Blue
- My Father’s Coat – James Grant
Enjoying Technology
From ShawnBlanc.net:
The iPhone, iCloud, iPad, iTunes, OS X Lion, Apple TV, and the MacBook Air are, in a way, one single product. And they are today’s quintessential example of technology that is extremely usable, extremely simple, and evokes great delight.
This sums up how I feel about technology at the moment. All the devices and apps that I use congregate and communicate pretty much seamlessly. I’m enjoying using technology more than I ever have.