Please help Newt Gingrich name his hand-held computer (hint, smartphone)

Apparently Newt Gringrich, the prominent US politician, is trying to keep up with the times. In this priceless video posted on YouTube the other day Newt muses over a conundrum apparently keeping everyone up at night over at Gingrich Productions. Gingrich Productions is, incidentally, “a performance and production company featuring the work of Newt Gingrich and Callista Gingrich”. One naturally presumes as a ‘production company’ some involvement with technology and communications equipment.

Yes, Newt is seriously discussing what to call a smartphone – by which I mean it seems he has never heard the word ‘smartphone’ and instead is asking viewers to come up with suggestions of what to name this new-fangled multi-purpose device. His best idea so far is ‘hand-held computer’.

Curiously, in an interview with The Weekly Standard the interviewer asserts:

“it’s clear that Newt is fascinated by tipping points–moments where new technology or new ideas cause revolutionary change in the way the world works.”

It seems Newt hasn’t been keeping up. Perhaps he’s been too busy reviewing books on Amazon. Fun fact of the day, despite his day jobs, including a stint as Speaker of the US House of Representatives, Newt is, wait for it, a Top Reviewer on Amazon.

No honey, I didn’t buy a TAG Heuer watch on eBay using PayPal

The phishers are getting better and better, and it’s fascinating how, by playing the law of averages, inevitably they strike it lucky. This is an email Fiona just received:

Screen Shot 2013-05-14 at 2.12.58 PM

It looks perfect, exactly like a PayPal/eBay purchase confirmation. And the kicker is, I already have a TAG Heuer watch, and we’re extensive users of PayPal, so Fiona came asked, ‘hey did you buy another TAG watch?’.

I showed her how, if you View Source on this email (or indeed, in Mac Mail hover your mouse over the links) the actual URLs are in Russia, with a .ru address.

Of course we did not try any of the links. But I’ll bet my last dollar that the pages will be excellent copies of the PayPal log in pages, and thus the scammers would have access to our PayPal account, and our linked bank accounts and credit cards.

Here’s PayPal’s page on spotting fake emails:

Screen Shot 2013-05-14 at 2.21.39 PM

The fake email Fiona received doesn’t ask for personal information. The only thing that triggers an alarm at first glance is the lack of a personal salutation – notice it just says ‘Hello,’, not ‘Hello Fiona’.

And not everyone knows how to check the URLs behind the links of an email, and to realise they are not pointing to the real PayPal web site.

Another blogger has also seen this email and pulled it apart some more to reveal the type of nasty Javascript exploit you could be exposed to by following the links.

Select a random record with SQL server

Easy little trick, if you need to select a random record with SQL server as part of a query:

SELECT TOP 10 column,column FROM table ORDER BY newId()

Or could do:

SELECT TOP 10 percent column,column FROM table ORDER BY newId()

This is not brilliant for very large data sets, you can use TABLESAMPLE, for example:

SELECT column, column FROM table TABLESAMPLE (10 PERCENT)

Or:

SELECT column, column FROM table TABLESAMPLE (100 ROWS)

There is  caveat with TABLESAMPLE, it’s not fabulously random – and the number of rows returned may not match what you asked for, especially with small values, so if you ask for 10 records you might get back 20. And if you ask for 5 you might not see anything returned at all. I’m not entirely sure I’ve completely wrapped my head around TABLESAMPLE, you can read more on MSDN. But newId() is something I use all the time, and I’d stick with that unless you find your data set is large and the query is slow.

Google thinks I’m the spitting image of Zach Galifianakis

david2

Apparently the ability to search Google Images using an image you upload has been around for a couple of years, I only fell over it today by accident.

Go to Google Images and click the camera icon at the right hand end of the search box. You will be prompted to upload an image, and Google will then search for images in its index that match.

I searched using the image above – it’s a studio shot taken for an investment prospectus a few years ago. Lo and behold it found a list of pages that include that image, and then gave me a list of “visually similar images”. Which is when things turned a little scary:

Screen Shot 2013-05-10 at 9.48.07 AM

Apparently I look similar to a bunch of Korean nuclear scientists, plus at least two chaps  named Christian.

For fun I tried with the charcoal sketch I use as an avatar on most sites:

charcoal cleaned up small

Here’s where I struck gold.

Screen Shot 2013-05-10 at 9.56.19 AM

Check out the first image on the bottom row. Google thinks I look like Abraham Lincoln. Most importantly note the middle image on the bottom row.

zach

Yup, you got it right, Google reckons I’m the spitting image of Zach Galifianakis.

[UPDATE]

Turns out I’ve been scuppered by my complete lack of celebrity knowledge, apparently the image is of Bradley Cooper, it’s just that Google Images showed me the name “Zach Galifianakis” when I rolled my mouse over. So that’s who I presumed it was. Clearly I’ll never make an entertainment reporter on the E! network.

 

Caught out by my own child over an Aston Martin

astonmartin

After nearly 16 years as a parent I really should know better, but clearly I never learn. My son knows full well I covet a Maserati, as a fall-back an Aston Martin would suffice. I’m constantly buying lottery and sweepstakes tickets where one of the prizes is a car such as this.

From time to time, like many parents, I have been known to lament to my children that if it wasn’t for them, I’d be retired and living on my tropical island, and tooling around in an extremely expensive motor vehicle.

This desire is made all the harder by our neighbour over the road, who often parks his Maserati in the drive way, straight in my eyeline as I walk out our front gate. Of course, the Maserati lives in the driveway because all the space in his garage is taken up with his Ferrari. That’s what comes from living in a ‘nice’ suburb.

And with the text message above my 12 year old now clearly believes you can have your cake and eat it too.

Be a brave and nimble entrepreneur in your business

Print

I’ve just finished reading PayPal Wars, Eric Jackson’s 2012 recounting of the growth of the online payment company from inception to its purchase by eBay. The story is remarkable for the long list of challenges and cliffhangers the company negotiated in a short time in order to achieve success.

If you look at some of the great dot com boom failures like boo.com and webvan.com they are characterised by leadership unwilling or unable to read the tea leaves and react quickly. PayPal’s tale is a strong counterpoint, showing how acting nimbly and decisively wins the day.

To some extent the PayPal story is not one of a technology company, rather a group of people brought together by circumstance (one college friend bumps into another college friend); but united by a shared vision to change the world – in PayPal’s case, their founders saw how the ability to easily send money from one person to another could achieve political and economic change around the world. They saw PayPal as a force for good, for the disadvantaged, for small businesses who otherwise were at the mercy of behemoth financial institutions. It is also a story of the challenges any entrepreneur faces when they plunge into the great unknown to create a new business.

The entrepreneur’s journey is almost always rocky. I haven’t had a real job since 1996, and in that time I’ve faced poverty and riches in almost equal proportions. Along the way my partner and I have built and sold a couple of internet businesses, started and failed at a couple more, and started yet another that is still in its infancy, shows early potential, but will require much effort to properly realise its vision. Sometimes I find myself questioning whether I have the ‘right stuff’, the energy and will to invest my time and emotions into a venture that may or may not succeed.

We’ve had a business almost die due to a key database and its backup crashing. We’ve run out of money to the point where I couldn’t afford a tram ticket. I’ve personally made decisions that in retrospect were poor, and financially harmed my family. Working long hours without the safety net of a salary and under constant financial stress is destructive to personal relationships.

Sometimes I wince at the stupid things I’ve done, yet in the process I hope I have learnt some of the same lessons as the PayPal team.

You must be brave. You need the courage to act in the best interests of the business, even in the face of opposition from those around you. PayPal’s management and staff staged a coup against their CEO Elon Musk and forced him to resign because they were unhappy with the strategic direction, especially halting all web site feature development in deference to an attempt to build a whole new version of the site in what was believed would be a faster, more scalable packet of technologies. Yet by doing so the company sacrificed the ability to respond to the daily challenges from competitors.

You must be nimble. PayPal started as a way of sending money between PalmPilots. Eric Jackson, who was leading the direct mail efforts, identified an opportunity with auction site users and started to target them. Eventually that became the company’s main growth driver before later diversifying into activities such as enabling all web site owners to capture payments and the PalmPilot application was quietly retired. The entire business needed to pivot on a pinhead. In contrast, PayPal also owes a great deal of its success to eBay’s inability to quickly enough deploy and develop its own payments system BillPoint.

You must know when it’s time to bail out. PayPal took the deal with eBay because otherwise it was possible their prime competitor BillPoint, owned by eBay would shortly be in a winning position. In contrast the management of  boo.com and webvan.com should never have even allowed the companies to progress as far as they did. But arrogance or an inability to understand and accept the signs of failure led to implosion. They should have bailed earlier – sure, they would still have failed, but the losses would have been more contained, the impact on staff and customers lessened. Instead they waited until they were overtaken by the inevitable.

It’s one of the great attributes I love about business in the USA – the permission to fail. In the land of opportunity it is expected you simply bounce back, dust off, and try again. A notion I wish more of the Australian business world would embrace. Too often I think bravery is confused with recklessness; nimbleness with flightiness; and understanding when to bailout with piking (as leaving a party early is colloquially known in Australia).

Some entrepreneurs seem to have an innate understanding of these qualities, others like me need to learn by experience. There are other qualities of course – humility is one I suspect I struggle with. But for me if you are going to succeed in your business you need to embrace them, and learning the lessons of the past from people like those who built PayPal is essential.

Image: _dakini_

An Australian in San Francisco, translation guide

Each time I arrive in the USA I try to mentally unplug my Australian English dictionary, and insert the USA English cartridge. Whilst I’m sure my American friends find my accent charming (well, the woman who cut my hair, and the checkout chick at Safeway certainly said they “luurve my accent”) on occasion I just plain confuse the locals.

I continue to refuse to spell words using ‘Z’, or drop my ‘U’s when writing, even when producing work-related documents where the primary audience is American. Need a little subversion here and there. And that’s despite me working with HTML code a lot, which is firmly USA – ‘centre’ is ‘center’ and so forth. Which reminds me, I was standing outside an office building one day in San Francisco, named the ‘something something centre’. I pointed out, tongue in cheek, to my American friend how pleasant it was to see the word spelt right – to which he replied the owners probably wanted to make the building sound ‘fancy’! So there you are, ‘centre’ is fancy, ‘center’ is not.

There are many websites offering Australian <-> American translations or word equivalents. Here are the ones that confuse my US friends if I forget the mental dictionary change.

  • American leaves fall off trees in Fall. Australian leaves wait for Autumn
  • Americans plug things into power strips. Australians plug things into power boards.
  • Americans buy Advil at the drug store. Australians buy Panadol from the pharmacy.
  • Americans eat their entrees after their starters. Australians eat their entrees before their mains.
  • Americans cook with cilantro. Australians cook with coriander.
  • American babies poop in diapers. Australian babies poo in nappies.
  • Americans wear their thongs on/in their bum. Australians wear their thongs on their feet.
  • Americans use the restroom. Australians use the toilet.
  • Americans lounge around in tracksuit pants. Australians lounge around in trakky dacks.
  • Americans wear their fannies at the back. Australians wear their fannies at the front
  • Americans go up in elevators. Australians go up in lifts
  • Americans use bathroom paper. Australians use toilet paper
  • Americans walk on sidewalks. Australians walk on pavements
  • Americans open trunks. Australians open boots
  • Americans buy gas. Australians buy petrol.
  • Americans drive pickups. Australians drive utes.
  • Americans root for their sporting teams. Australians root their…..hmm, perhaps we should stop here 🙂

Image: tedeytan

Backing up from Mac and Windows (Parallels) to Dropbox

dropbox-feature

I’m away from home at the moment, hanging in San Francisco for a few weeks. All lovely and well, however, everyday my MacBook Pro is not connected to my 2Tb external drive and TimeMachine doing its thing every hour I lose another few hours from my life. Particularly having recently enjoyed major calamity with an OSX update that necessitated most of a day perched at the local Genius Bar to repair.

What I *really* need is the ability to backup sets of files each night to my Dropbox account. It’s not TimeMachine of course, but a daily backup of key work files goes a long way to alleviating my anxiety.

Tonight I sat down to make this happen – and discovered how easy it was. The key to all this, whether Mac or Windows, is that whatever you want to be on Dropbox needs to be in the Dropbox folder on your computer. So the trick is how to copy or syncronize your work files over to the Dropbox folder at regular intervals – eg once a day.

The Mac solution involves using that Swiss Army Knife – the Automator. Along with Preview this has to be one of the handiest gadgets tucked away on your Mac that I suspect the majority of users never touch. Here’s an article explaining how to use Automator to create and schedule a workflow that will copy any files you like from anywhere on your Mac into your Dropbox folder.

Screen Shot 2013-03-11 at 10.35.11 PM

I have Windows 7 running in Parallels on my Mac. Very few of the files in the Windows drive are irreplaceable. Almost all of them are part of code bases, and thus part of source control – either TFS or Github. Which means, on the whole, they exist somewhere else in the cloud. But some, even if in source control, I prioritise highly because they consitute key property that I’d *really* hate to lose. So a copy in Dropbox lets me sleep a little sounder.

My discovery of the day? Microsoft SyncToy, a free tool that can keep two folders on your computer in sync. I followed the instructions in this handy blog post and was up and running in no time.

On the left I chose the local folder on my Windows C:. On the right I chose my Dropbox folder on my Mac hard drive.

Screen Shot 2013-03-11 at 10.22.12 PM

I did ponder the sync options for a moment. ‘Synchronize’ means it’s going to keep the folders in exact sync – so if something happens to my Dropbox folder – like I have a glass of wine too many and decide to do some pruning, it could reflect back to the original files. Instead I chose ‘Echo’ – that’s a one way street, pushing file changes to the DropBox folder, which makes sense to me for the task at hand.

Screen Shot 2013-03-11 at 10.22.02 PM

You can use Windows Task Scheduler to automatically fire the sync action.

I have a nice and fast Comcast cable connection in the San Francisco apartment, so the initial push of all the files up to DropBox didn’t take that long. I pay $9 a month for the 100Gb storage option, so unlikely to run out of space in the near future.

Convert decimal/dotted IP number to hex string

I had need today to pull a bunch of IP numbers from a database and return them as hex strings from a query to my code. It took a little messing, but finally figured out a solution.

DECLARE @b varchar(30) SET @b = '64.233.160.0'

SELECT 
RIGHT(CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 4) AS int)), 2),2)
+
RIGHT(CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 3) AS int)), 2),2)
+
RIGHT(CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 2) AS int)), 2),2)
+
RIGHT(CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 1) AS int)), 2),2)

The above returns ’40E9A000′. Breaking it down:

— gives me the first octet as an integer

CAST(PARSENAME(@b, 4) AS int)

— converts the integer to a hex literal

CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 4) AS int))

–converts the hex literal to a string

CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 4) AS int)), 2)

–grabs the right hand 2 characters of the hex string

RIGHT(CONVERT(varchar(max), CONVERT(VARBINARY(4), CAST(PARSENAME(@b, 4) AS int)), 2),2)

 

Classic ASP – maintaining sessions between secure and non-secure pages

If you use secure (SSL) and non-secure pages on your IIS-powered web site, and are using session variables to hold information about your users, you most likely will find those session variable values disappearing as your user switches from non-secure to secure pages – for example, they are in your online shop, and then click to Checkout and Pay.

The problem is IIS – by default it creates a new sessionId for users when they hit the SSL pages – so any session values you already created against the non-secure page sessionId are lost.

It’s easy to fix, in IIS7 anyhow. In IIS go to the properties for your web site and open the ‘ASP’ properties page. There is an option down the bottom entitled ‘New ID on Secure Connection’. By default this is set to True. Change it to False and click the Apply link.

https_session

Switching between SSL and non-SSL can also be a reason users experience a time out, or seem to be automagically logged out in the middle of something.