Git – ignore files starting with period / full stop / dot

I use Git on my Mac, but some repositories are on the Windows drive of my Mac. Mac creates system files in Windows for each of the files, for example default.html will wind up with another file in the same folder called .default.html. This is all a bit annoying in Git which picks up on these system files, even though I have no interest in then.

But you can exclude them. Edit your .gitignore file and add:

.*
!/.gitignore

Moving on – leaving icix.com after 11 years

icix_logo

It’s been a weird, strange kind of a day, because today marks my last day working with icix.com. I don’t have my diary for 2003 anymore, but nearly 11 years ago, around the middle of August, I took a call from my youngest child’s godfather, who coincidentally happened to be an advisor and mentor to a bunch of startups and business people.

He told me he knew of a couple of guys who had secured investment and were trying to build a web site, but having problems coming up with something that worked. I said I’d go and have coffee with them, and in a dingy office on the NEC campus in Melbourne I met Matt Smith and Tim Marchington, the founders of icix.

Before too long the “coffee” morphed into them asking me to build a site, from scratch, to be ready in 5 or 6 weeks, without access to the previous developer’s 6 month’s worth of work. A short time frame, but we prevailed and to cap everything off, Tim’s wife gave birth the day the site launched – two births in one day!

Since then I’ve worked almost continuously for icix, although with a bit of a break in the mid-2000s after the sale of our Artshub business and the birth of our youngest child. She had a number of health issues, starting with severe epilepsy at 5 months old, and culminating in open heart surgery at 20 months, so we took a great deal of time out from all work related projects to look after her, something I am grateful the Artshub sale money enabled.

I wish I could say I am leaving icix because I’ve had a better offer, sadly I cannot. After spending 12 months trying to firm up my ongoing contract status we were not able to come to an mutually agreeable arrangement.

Maybe it’s a cultural difference but Americans seem to favour the shock and awe approach to any negotiation, I’ve seen even the most inane meeting turn into a slanging match in my time in San Francisco. Many Americans in business appear to regard the smallest negotiation as a competition, ignoring that this only results inevitably in a winner and a loser. It’s in contrast to my experience in Australia, and indeed the UK, where in general a consensus approach is more the norm. Obviously tough decisions can lead to disharmony, but I always feel a more collaborative attitude prevails, seeking to find the balance between the needs of all parties, whether it’s deciding on a venue for lunch or negotiating the sale of a company.

In this instance, after a year of being told how valuable I was to the company, how they’d welcome an opportunity to provide me with pathways to expanding my contribution, eventually I was presented with a contract offer with a pay rate less than I was paid to build the original icix site all those years ago. I felt incredibly disheartened, not just because the amount was so low, but because it seemed the last 10 years had not mattered one jot.

All this was in the name of ‘sustainability’, I apparently don’t fit their system, so I needed to be ‘standardised’, which is also saddening because it means they don’t understand that if everyone is slotted into a convenient generic box, there’s nobody empowered to disrupt, to call out something as rubbish, to act as the irritant that forces people to think twice.

Standardisation is another word for bland in my dictionary. Every company needs a rebel, although that’s far from how I ever would have described myself. But I’ve always been the odd one out at icix, the square peg in the round hole, which led to a constant stream of people asking for my help, my advice, my accumulated knowledge. And in turn I hope I added some colour to offset the routine.

There are some fantastic, dedicated and talented people I have had the privilege working with at icix, and others who have already moved on, either voluntarily or because they too did not fit the cookie cutter mould. I certainly wish all of them the very best whether still at icix or in their new roles. There is a close coterie I will miss terribly because they’ve become my friends as well as colleagues.

One thing I definitely won’t miss are the work hours, for the past couple of years I’ve managed an engineering team spread between San Francisco and India. So 5am has been my normal work day start time to talk to the USA, but I’d still be answering Skype chats at 7pm from the Indian team, meaning I’ve been available and online for 12 or more hours a day, including Saturdays given the Americans are a day behind. That kind of routine takes its toll on your health and family.

One benefit of no longer being at icix is as an outsider I can keep a close eye on their progress. I have a decade of my life invested in the company. Of course I’m privy to much internal information that I cannot share publicly, but from now on I’ll have no more access than any other outsider, and can cast a more critical eye over their public activities and progress.

Later today I’ll be pouring a drink, possibly two, and indulging in a little reflection. And then consider how best to embark on the next 11 years.

5 stages of validation for a startup business idea

Someone was asking Fiona and I about our views on validating an idea for a startup, they had been prompted by, amongst other things, posts on Pollenizer. Over lunch Fiona and I came up with our 5 stages of validation of a business idea for startups.

Our view is there is no such thing as validation of the complete business proposition until you’ve actually made a shedload of money, which thus provides the validation. It’s fine to test your ideas to a limited audience, or small groups of informed experts, but you are still guessing when you assert that because they all think it’s a winner, you can go slap a deposit down on your private island. Or super yacht  or whatever bauble you are planning to spend your billions on.

Stage 1 – Run the idea past domain experts

Talk is cheap. So talk a lot. Go find people in your market, buy them lunch, ply them with booze and sketch the idea for them. If they respond “fabulous” then great. If they express concern, then listen to their feedback and revisit your proposition. It doesn’t mean it’s a bad idea, you may not yet have learnt how to present it. Rinse and repeat.

Stage 2 – Build prototype MVP and run past potential users/trend setters

Make something people can try. Doesn’t have to be all the bells and whistles, but sufficient that a potential purchaser can gain a good understanding of how your product will work; what it might do to make their lives easier, save them money – showing them how you intend to solve their pain points is essential because people will pay you money to alleviate pain. Rinse and repeat.

Stage 3 – Get pilot users for prototype

Build out your prototype and find a small group of users/customers/suckers to use the product for real. Make sure these users are friends, family or people you have strong relationships with for when you have a catastrophic failure. Because you quite likely will. Rinse and repeat.

Stage 4 – Sell it to someone for money

Make a proper version, with the feature set you have distilled down as being the core proposition. Take money off someone for them to use the product for real in the big bad wide world. Then go sell it to another customer. And another. Nail down the sales funnel, process and cycle. Rinse and repeat.

Stage 5 – Sell it to shitloads of people for shitloads of money

Do Stage 4 but x 100, or x 1000, and preferably x 1,000,000.

Congratulations you have validated your business idea. You can now subscribe to Private Islands of the World.

 

Parse JSON with TSQL in a SQL Server Stored Procedure

json_logo-555px

I’m a big fan of JSON as a data exchange format, it’s lightweight, and every API worth playing with is usually JSON-friendly. So in idle curiosity I wondered if it was possible to parse JSON with TSQL, and guess what, someone else has come up with a way to do so.

A hat tip to Phil Factor (and RedGate for their great Simple Talk blog) for his article Consuming JSON Strings in SQL Server. Phil not only has example code to parse JSON into a table format, he shows you how to go the other way – create JSON from table output.

SQL Server does handle XML, but let’s be honest, it’s a pain in rear to use. But it’s all we’ve got natively with SQL, as Phil says:

TSQL isn’t really designed for doing complex string parsing, particularly where strings represent nested data structures such as XML, JSON, YAML, or XHTML.

You can do it but it is not a pretty sight; but why would you ever want to do it anyway? Surely, if anything was meant for the ‘application layer’ in C# or VB.net, then this is it. ‘Oh yes’, will chime in the application thought police, ‘this is far better done in the application or with a CLR.’ Not necessarily.

Sometimes, you just need to do something inappropriate in TSQL.

I gave the code a quick try parsing JSON into a table and it worked great.

 

How to locate text string in a SQL server object – stored procedure, view or function

Sometimes it’s handy to just conduct a simple search of your SQL server objects to locate a text string.

SELECT OBJECT_NAME(object_id)
FROM sys.sql_modules
WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1
AND definition LIKE '%text%'

SELECT OBJECT_NAME(object_id)
FROM sys.sql_modules
WHERE OBJECTPROPERTY(object_id, 'isView') = 1
AND definition LIKE '%text%'

SELECT OBJECT_NAME(object_id),definition
FROM sys.sql_modules
WHERE
(OBJECTPROPERTY(object_id, 'IsTableFunction') = 1 OR OBJECTPROPERTY(object_id, 'IsScalarFunction') = 1)
AND definition LIKE '%text%'

SELECT c.name AS ColName, t.name AS TableName
FROM sys.columns c
    JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE '%MyName%'

Testing web sites in multiple versions of Internet Explorer

Ie8logo1

There’s nothing more frustrating running  a web site only to receive complaints that it “doesn’t work” in some specific version of a browser. The major culprit almost always seems to be Internet Explorer – I’ll leave the philosophical debate why this might be the case for another day.

The issue came up for me because I was messing with a little personal project the other night that uses the Bootstrap 3 framework. I tried the page in IE11, with IE8 emulation, and the pages didn’t work correctly – despite being on a full size screen, the pages were acting all ‘responsive’ on me, and rendering the mobile versions. I then read somewhere that IE8 emulation on IE11 is not accurate – pretty useful! It seems IE11 in IE8 emulation mode does not respect conditional statements – which was what was messing with my responsive design. It was not handling the media queries include that’s needed to correctly render modern CSS in an IE8 browser.

Of course the problem here is I don’t have IE8 on a real machine available to me anywhere.

However, help is at hand, with thanks to Microsoft, which has now made available pre-packaged virtual machines for many combinations of Internet Explorer and Windows OS.

Providing you have one of the virtual machine software setups, for example Virtual PC on Windows or Parallels on Mac you are in business. I use Parallels and here are the VM configurations available to me – it’s pretty wide, there’s even IE6 on XP, but also IE8, IE9, IE10 and IE11 on Windows OS  including Vista, Windows 7 and Windows 8.

Screen Shot 2014-03-07 at 8.03.59 AM

Downloading and setting up the VMs is a snap, within a few minutes I had a fully functional version of IE8 running on Windows 7 in a window on my Mac – and 10 minutes after that had diagnosed the problem with my web site and applied a fix. Note, if you are using Parallels on Mac there is some helpful information on the Parallels web site about configuring the VMs, starting with the fact the file you download has the wrong file extension – you need to manually update the file name before Parallels will recognise it as a VM.

An item with the same key has already been added (SQL Report Services)

Screen Shot 2014-02-26 at 7.42.34 AM

 

I was creating a new report in SQL Reporting Services, I pasted in the SQL query for the report and up popped the message “An item with the same key has already been added”.

Turns out I had two columns with the same name – which as always with these error messages, begs the question, why not just say so!