Friday, 14 February 2014

Extracting the high level domain (or sub domain) from URL in T-SQL (SQL Server)

I've not posted anything technical for years now so when I had to solve this problem yesterday I thought it might be a good idea to publish it. And yes I did look for a solution online but all I found were approaches that did not work for me (e.g. did not work with sub domains) or involved converting to xml which I thought is pretty heavy for what I want to do.

So here's what worked for me:

 SELECT Url = SUBSTRING(SourceUrl,0,CHARINDEX('.',SourceUrl,0))  
 FROM  
 (        
 SELECT SourceUrl = REPLACE(REPLACE(REPLACE(REPLACE(SourceUrl, 'http://www.',''), 'https://www.',''),'https://',''),'http://','')  
 FROM myUrlTable   
 ) urlData  
Comments and improvements are welcome and I hope someone finds this useful!

Thursday, 13 February 2014

What have I read in 2013 (and why you should be reading some of these titles too)

This year I decided to include a short (1-2) sentences review for each of the books I have read. I also implemented a simple "star" rating: 1-3 stars where 3 is the most positive rating.
A shorter journey to work for more than half of the year and more time off on holiday meant a slight drop in my total number of books however overall I was very happy with most of the titles.

So here goes:

Audiobooks


** All Marketers Are Liars - Seth Godin  
** Purple Cow - Seth Godin  
I started the year under the influence of Seth Godin, also thanks to Joe Karthauser's recommendation. I found these books to have some great advice and good examples but overall I thought the core message was the same. So for some time I do not intend to get another book from the same author.

*** Living Without Stress or Fear - Thich Nhat Hanh  
I thought this is an amazing lecture. I recommend this wholeheartedly to anyone looking for insights into mindfulness and relaxation. Thanks to Rob Brown for recommending it!

** Mindful Leadership - Maria Gonzalez  
This book has confirmed my thinking around mindfulness and application in business environment. I am afraid not much more than that in it although if this is your first book on the subject it could be useful.

*** Positioning - Al Ries and Jack Trout  
This has been a real eye opener for me and has dramatically changed the way I sell stuff. Highly recommended.

** Pitch Anything -Oren Klaff  
I have mixed feelings about this book. Oren's stories are interesting, his approach is quite aggressive. I believe some things could be useful but be mindful of the environment and the culture as these techniques can easily upset people.

* Good Business - Mihaly Csikszentmihalyi  
Having previously heard only good things about the author I was a little disappointed with this book. In principal I am in agreement with a lot of it however the "flow" he describes can easily be mindless and I see no good things coming out of it!

* David and Goliath -Malcolm Gladwell  
This is the first ever book I pre-ordered. However while there's a lot of value in the advice and the examples after listening to the book I felt disappointed and I would not recommend it.

*** The Lean Entrepreneur: How Visionaries Create Products, Innovate with New Ventures, and Disrupt Markets - Brant Cooper, Patrick Vlaskovits  
I think this is a good book. It can be really valuable for entrepreneurs looking for more effective ways to build a business. I personally have found some useful insights that I have used myself.

** Real Influence -Mark Goulston, M.D., Dr. John Ullmen  

*** The Leader's Guide to Storytelling: Mastering the Art and Discipline of Business Narrative, Revised and Updated - Steve Denning
I very much enjoyed listening to Steve Denning read his excellent book. Highly recommended

*** The Ultimate Introduction to NLP: How to Build a Successful Life (Unabridged) Richard Bandler, Alessio Roberti, Owen Fitzpatrick  
This must be the 3rd or 4th NLP book that I read and for the first time I found the concepts presented here easy to remember and apply. If you're looking for single book on NLP I recommend this one

** Rewire Your Brain - John Arden
I think this is a good book although for me it confirmed my thinking which I have already formed by reading other similar books (like David Rock's "Your brain at work"). Nonetheless I think this book is a good read.

Kindle

12 Brain Rules - John Medina

*** Non Violent Communication - Marshal Rosenberg
To me this is not just a must read but such a powerful idea which has the potential to change the world. Having read the book twice I am definitely re-reading it again this year.

** The Start-up owner's manual - Steve Blank
Good manual overall, much easier for me to read compared with his first book. I do however prefer the practicality and style of Ash Maurya

*** Running Lean - Ash Maurya
I am a big fan of this book. Very practical, actionable advice with good examples and backed by lots more content online. If you are interested in building a web product I recommend reading this book.

Paper

** The 4 steps to E.piphany - Steve Blank
I am sure the content is valuable because I have read Steve's other book (See above). However I found this one to be extremely difficult to read after the first chapter.I'd suggest going for the startup owner's manual. Oh yes and there's some ideas I do not agree with (will blog about these soon).

** Personal Kanban - Jim Benson
Personal kanban is great, I use it every day. Does it need a book? I don't think so. It can be explained in a blog post. The book repeats over and over the same ideas. For beginners it might be great. If you already know a bit about this stuff find some info on the web.

The Winner

For 2013 I can't decide between Living Without Stress or Fear by Thich Nhat Hanh  and Running Lean - Ash Maurya so I'll go with two winners ;)

There was an error in this gadget