Sunday, May 25, 2014

Host a static website on Google Drive (in 5 easy steps)

You need to host a static website but don't have the time, money or resources to set up a web server.  Perhaps you're learning to code or just doing a demo. Here's a way to set up a web site at no cost, in just a few minutes.

Step 1. Create a new folder in Google Drive.

From Google Drive, Click 'Create', select 'Folder' and enter the folder name.
(I chose 'hybrid' for this example, but you can choose anything you want).














Step 2. Share the folder.
First select the folder you created (displayed in the folder list), then click the sharing icon.









In the Sharing Settings popup, go to the 'Who has access' section and click 'Change'


The Visibility options pop up will appear. Change the Visibility option to 'Public on the web'. 
Although set by default, make sure that 'Access' is set to 'Can view'.
Click 'Save'.



















The folder is now shared. Click Done.




3. Upload your web content.
Open the folder and drag/drop your web content into the folder.
You can upload HTML, JS, CSS.  (I'm sure you can try media files as well but I haven't).

(Note: I have used Hakim El Hattab's Stroll.js CSS experiment for this example. You can find the original content at http://lab.hakim.se/scroll-effects/ ).













Double check that the files are also publicly viewable.

4. Create your site URL.
Your Google drive folder is accessed using a specific URL. The site URL has the following structure:
Google Drive host / folder ID / your web page.html

First get your folder's unique identifier. Look in your browser address bar, the URL will end with a long unique string after the last "/".




Copy that long string.  Based on this information, we have:

Google Drive Host: https://www.googledrive.com/host/
Folder UID: 0B8SIN8IVD8DGRFByVGZ0Vjdfcnc    (** yours will be different)
Web page: index.html (this is the name of your web page)

Open up your favourite browser and enter the following URL (use your folder UID and web page name)

https://googledrive.com/host/0B8SIN8IVD8DGRFByVGZ0Vjdfcnc/index.html

Your web page should now display. Yay !! Almost there.

5. Make the URL a friendly one.

That URL is a little long - so the final step is to use a URL Shortener such as bit.ly or goo.gl

Copy your URL and enter it into your chosen URL shortener. Once converted you will have a short and simple URL such as http://bit.ly/1kCcqsO or  http://goo.gl/69KvBD


























Enjoy !!


Wednesday, September 18, 2013

Turn that old box into an Internet TV for less than $70...



So you've got an old TV or computer monitor with a VGA or DVI socket and it's looking pretty outdated because all the latest devices are HDMI only - including the cheap but amazingly great value Google Chromecast.

Well all is not lost! You can get a DVI-to-HDMI or a VGA-to-HDMI adapter and connect your TV or monitor to the adapter and then plug the Chromecast to the adapter. The adapter comes with audio sockets to take the HDMI audio and play it through the TV speakers. Really simple to put together and no software to set up.


Cost:
Chromecast:                        $35
VGA-to-HDMI Converter : $30 (or less on Amazon)

I have this setup on an old TV that was sitting in the garage. The picture quality is exceptional.


Monday, April 29, 2013

Watch the BBC iPlayer and ITV Player when outside of the UK on Ubuntu


This is a follow up to my post of a year ago. The instructions are simpler than last year's post. If you want instructions for the Mac go here.

I re-imaged an old laptop last year with Ubuntu (12.04 LTS).  If you've never tried Ubuntu before, head over to http://www.ubuntu.com/download  to try the latest version. The installation is straightforward and you can install it without affecting your Windows image (if that's what you're running). Not only is this fast (boots in seconds) it also has better support for a wider range of devices - specifically Wifi.

To run the BBC iPlayer on Ubuntu, do the following...

Step 1: Download tor from this site : https://www.torproject.org/.  The download button should detect your operating system. For Linux the direct link is here. Alternatively you can use the command line and enter sudo apt-get install tor.

Step 2: Unpack the tor tar.gz file. Open the folder that was extracted. On my machine it's called 'tor-browser_en_US'.  Double click the file called 'start-tor-browser'.



Press 'Run' when challenged.



 This will launch the Vidalia control panel. If all goes well, the control panel should connect to the Tor network and you should see the following status:



Once you are connected, the web browser bundled with Tor will appear and carry out a check to ensure you are online anonymously.



The bundled Tor browser is a cut down Firefox image that does not have Flash player installed - which is required for the iPlayer.  To use another browser, with Flash installed, we need to get the SOCKS host setting from the bundled Tor browser.

Step 3 From the bundled Tor web browser menu select Edit->Preferences->Advanced. Then press the Network tab. Click the 'Settings' button.   Make a note of the SOCKS host port (9050 on my setup).  If for some reason this is blank - then Check 'Manual Proxy configuration' and then enter 127.0.0.1 for the SOCKS Host and 9050 for the port.



Step 4: Set up tor to use servers in the UK. On the Vidalia control panel click "View the Network". The Tor network map will open.


This shows you a list of the servers that are available all around the world.  Sort the list of countries by clicking the column header for the flags. Once the list is sorted by flag - scroll down until you see the Union Jack (British Flag).  Make a note of several relays by typing their names in a text editor (several incase one is offline or has poor performance).

Once you have made a note of the relays - Close the tor network map.


Step 5Setup the Tor servers in the Tor configuration file.

In the Vidalia control panel, press the 'Settings' button. Then press the Advanced tab.


In the Tor configuration file section, click 'Edit current torrc'.
The torrc configuration file will open.


At the bottom of the list of settings add the following two lines. Replace #R1, #R2, #R3 with the names of the relays that you picked out earlier.

ExitNodes  #R1, #R2, #R3, #R4
StrictExitNodes 1

For example:

ExitNodes  TorLand1, StickItToTheMan, obelix
StrictExitNodes 1

(StrictExitNodes forces Tor use the list of Relays that you provide).

Also add the SOCKS Host and port number (if it is not present) ensuring the values match your settings.

SocksListenAddress 127.0.0.1
SocksPort 9050

Now press OK to confirm the changes and close the window. Press OK to close the Settings Window.

Step 6. Restart tor by pressing the Stop Tor button.  Once Tor has stopped - press Start Tor. When Tor has started successfully - then get excited - you're almost there !


Step 7a: Set up a Firefox to use Tor.  Open Firefox. Select Edit->Preferences->Advanced. Then press the Network tab.



Click the 'Settings' button.
Select 'Manual Proxy configuration'.  Enter 127.0.0.1 for the SOCKS Host and 9050 for the port.



Press OK then Close to exit the preferences.

Step 7b: Set up Chrome to use Tor. Open Google Chrome.
Click the wrench on the toolbar, then click "Settings" from the menu options.


At the foot of the page - click "Show Advanced settings".

In the section marked "Network", click the "Change Proxy Settings" button.



Click "Network proxy" from the list on the left.




Select "Manual" from the Method pick list.
In the SOCKS Host field enter 127.0.0.1
In the field marked ":" enter the port number 9050 (or whatever your setting was)
Press Apply and close the Network settings dialog.
Now Google Chrome is set up to talk to Tor running locally on your machine


Step 8:  View !!  You made it ! You can now head to the BBC iPlayer page at http://www.bbc.co.uk/iplayer .




You can also watch ITV at http://www.itv.com






Final notes

You are not limited to the UK. You can access online content any part of the planet. Just remember to change the relay for the host country.

Wednesday, November 28, 2012

It's a hybrid !!



The motor car industry is in transition right now. It is a slow process that will take the motor car back to it's roots as the 'electric carriage' of the 1830's.  Electric cars were common until the petrol (gasoline) overcame the limitations of battery storage capacity and vehicle distance, to dominate the market for over 100 years.  The long term trend in the rising cost of fuel, the impact of the combustion engine on the environment and changing social/work patterns have re-introduced the electric car back into the market.
Despite electric car innovation, if you are in the market for a new car today, it's likely that you will settle for a hybrid. The hybrid overcomes the deficiencies of current battery technology in electric cars while offsetting the rising cost of petrol.

Mobile application development can be described in much the same way. When people talk about writing mobile applications, they often talk about 'native' and 'HTML5' based applications. When you think of 'native' think 'petrol'. Developers will write apps in 'native' code - that is code that runs natively on the operating system. Because mobile devices use different operating systems, developers have to write their application multiple times - thereby incurring a high cost of development. And testing. And bug fixing. And enhancements. Even if you plan only on supporting iPhone and Android - that's still a hefty investment to make for the same piece of functionality. You will never have functional parity (think Windows and Mac software).  Don't be fooled by that starry eyed programmer who is telling you that writing a native application is the ONLY way to build your mobile application.

The alternative approach to developing mobile applications is to write a single web app that runs on the mobile browser, using HTML5, CSS3 and JavaScript, mitigating the high cost of writing multiple native apps. HTML5 mobile web apps are very much like the electric car. HTML5 is a new standard but the mileage is limited. HTML5 is a specification that has been evolving at the same time as the iPad - so naturally it falls short in supporting all the things you want to do on a smart phone or tablet today. Even with basic feature support (location, local storage and camera) HTML5 does not solve many of the mobility problems that developers face - specifically security, offline support and access to native device features and phone functionality such as push messaging.

Just like the motor car, there is also a third option - the hybrid.  The hybrid mobile application blends the best of web with native code operation. Hybrid apps run inside a native container and leverage the device’s browser engine to render HTML and process JavaScript locally. Hybrid development requires you to write one web application (HTML5, CSS3 and JavaScript) and access device features through a JavaScript API.  Apache Cordova (PhoneGap) takes this approach, as does emotive an mobile cloud computing platform (disclaimer: the company I work for).

There are many advantages to the pure hybrid model (by 'pure' I mean there's no  cross compilation of the source code - it is just run it as-is) - these include
  • faster time to market
  • standards based web programming model 
  • access to native device features
  • development team needs no training and no expensive native programmers to hire
  • reuse existing web assets - including mobile web assets
  • cost of maintenance is low
  • not locked into any vendor 
  • faster iteration time to build and revise applications

Yes - it's true that today you get more mileage from a native application over a web mobile application - but at a really high operational cost and you know that it is not the long term option.  HTML5 web mobile applications are cheaper and easier to produce but fall short in giving you full device access.

Just as with the car, if you are looking to build the next generation of platform independent, smart, context aware, enterprise mobile applications at low development and maintenance cost, then you want to go with a hybrid.

Monday, May 21, 2012

Sorry Sir, this club is SaaS only

Client: "....sounds great I'll take it. You do support on premise, don't you? We're an on-premise business"

Sorry Sir, we don't that. Let me explain why, Sir, by dispelling two software myths right off the bat.
1. companies that produce on premise software understand how to run it in production
2. your IT department can manage an app better than the SaaS company that makes it

Despite your disappointment and hurt feelings, Sir,  deep down you know that I'm right...

Client: "....I have some of the best ops guys in the business. You don't know my business"

  • Nice car Sir! Topped up the oil Sir? Water and air? But beyond that you probably leave car maintenance to the 'experts' Sir? The local dealer or the manufacturer that produces your car? Of course Sir, you're too busy and can't possibly spend the time to become a specialist in car maintenance Sir, can you? You are the car user but 'operations' is outsourced to a third party.
  • Nice house Sir! Assume you have running water, gas and electricity? Every one of these services is provided by a third party utility Sir? You could set up your own electricity generator and pump your own water from a well - but you don't have the time or infrastructure to do any of that do you Sir? You are a user and consumer of services, these services are provided by a third party.
Client: ".... nice examples - but this is software we're talking about. software is different....."
  • You run an on premise business Sir? Yes I understand. Your payroll is managed by ADP,  health by Blue Cross, copy machines by Xerox and email by Google, yes Sir? All the essential services you offer your employees are managed by third parties. These are the must-have "live or die" services you offer to your internal customers (your employees) and they had better be running in order for you to stay in business, wouldn't you say so Sir? You have implicit trust that these critical services are always available from these 3rd parties.

Now - lets consider the myths I mentioned shall we, Sir?

  • On premise software vendors spend years designing, writing, unit testing and performance testing their software. Excellent but they don't operate the software the way you do. Some companies "eat their own dog food" but there is no communication between those that operate the software and those that design the software. Since when does a product manager listen to the ops guy?  If they did perhaps there would less systems management, middleware and operations control software companies out there, wouldn't you say so Sir? And why is your maintenance budget so high? I suspect that your IT guys know parts of the software better than the on premise company that wrote it, because they run it every day in a real world setting with a mixture of other products and services.

  • SaaS companies are operating the software on a daily basis and their reputation depends on guaranteed service. For that reason, people designing the software consider the operational impact of their products and ensure that the revenue raised outweighs the costs to run and maintain. Many SaaS companies are deployed on a PaaS or an IaaS - meaning the specialism for managing the hardware, network and software stacks works on the principle of the division of labour - everyone focuses on doing a few jobs really well, instead of a lot of jobs really poorly. 


You know people aren't born with a natural understanding of any product or service. Why would you think that you can run this software yourself, better than the service we are providing Sir? We understand what we are building and how to operate it in a manner that ensures continued service and value to you.

So please, don't ask for on premise, we're not that kind of club.


Sunday, February 26, 2012

Let's get into character

There's a classic line in Quentin Tarantino's "Pulp Fiction". Two hit men, Jules (Samuel L. Jackson) and Vincent (John Travolta), are on their way to a job where they could be dealing with as many as six guys.

Jules says to Vincent that they should “get into character,” indicating that they each play a part when they go on the job. The job of hit man is nothing more than a career choice and they don’t necessarily define themselves within those parameters.


That's great advice that every software developer and product manager should take note of. Put yourself in the position of the user and really role play the moment or the "day in the life". Better still - get out of the office and go on the road and sit with the user you think you are building software for. I say "think" because most people building software are kidding themselves that what they are building is good for the user. 
Think like a movie star. You really need to get inside of the head of the user. Only then will you start to realise that the user really doesn't want to use your application because it SUCKS! More to the point, the user is just a transient, using your software for a brief, fleeting moment to accomplish a task (e.g. make the hit) - and then they need to get out.

If the answer to any of the following is "yes" then you're in trouble.
  • the user interface is dictated by the data model 
  • you built the technology and are now looking for a use case
  • the user is expected to remember the process steps
  • the app has a lot of neat features that users "might" want
  • executive management changed the design to suit themselves
  • that's how the desktop version works
  • "well it was good enough in my day"
Put simply - if the application doesn't do anything for the user - it sucks. The user won't use it again, unless forced to - and that itself is becoming an outdated, unworkable model.

Enterprise software vendors beware. If you hadn't noticed - users are walking with their feet - choosing to use other applications and devices.
Put yourself in the shoes of the user and forget about your bias for one technical solution or another.  

Of course technology matters because if you use the wrong tech or approach the performance or scalability will suffer and again the user won't use the software. Technology should be the second consideration, after you have nailed the user experience.

So the next time you sit down with your development team to knock out a new application or update an existing one - put on the white shirt, black tie and black suit, put "Misirlou" on the stereo and "get into character".....

Wednesday, February 22, 2012

Best Buy #FAIL: snatching defeat from the jaws of victory

Sony, Samsung, HP, Gateway - take note. You spend billions of dollars on research, development, marketing and advertising only to hand the keys to the kingdom over to a retail store and cross your fingers that the stores' happy elves will help your products will fly off the shelves.

Oh dear.

I went to Best Buy on Sunday - looking for a monitor for my office at work. If it's been a while since you've bought a monitor let me just say that now is an incredible time to get a great monitor for a low price. You should think about upgrading your existing monitor for an energy efficient LED model, they're as slim as a credit card, save space, look great. (OK - not as slim as a credit card - but pretty close).
As with anything technical I'd done my research before I went to the store - had a specific size in mind, resolution, HDMI ports and I'd preselected a couple of manufacturers. I checked that the store had the monitors I'd selected, in stock. Should have been a quick job, into the store, check the image quality, crank up/down the brightness/contrast, pick the one I like and then out right? Wrong.

Unfortunately, Best Buy had chosen to use all the monitors on display to advertise their warranty products. (We all know that warranties are a total scam and a waste of money). The video was a white, grey and gaudy yellow display that kept playing over and over again. There was no way to view anything other than the warranty video.

Net effect: it was impossible to differentiate between each product.

A store rep came and asked if he could help me. I asked him to remove the video so that I could compare the monitors by looking at the native display and several high definition images. At such a high resolution I'm sure the eye couldn't notice the difference - but each monitor does look different. If I'd wanted to buy blind I could have just ordered the monitor from Amazon.  The store rep said there was no way to remove the video. Despite explaining why, the store rep said that they could not remove the video. So there really was no way to compare the three models that I had preselected. Buying a monitor without seeing the picture is as stupid as buying audio equipment without listening to it.

So I left the store without a monitor. No sale for Best Buy - but worse still - bad news for the manufacturers. Just imagine investing so much in your product and your brand only to end up displaying some cheap ad for a useless warranty product. That's like swimming the English Channel only to give up two feet from the shores of France.

I drove to Fry's Electronics down in Palo Alto. All the monitors were displaying high resolution images on a slideshow. I could play video from each monitor. It took a while to decide as the monitors were all good and Fry's had a greater selection of monitors (also at cheaper prices). I left with a monitor and managed to get a discount on the monitor I'd selected. And no - I didn't buy the warranty package.