Archive for the ‘Developer’ Category

Data Science (Machine Learning) 101

June 12, 2016

Date Science, or Machine Learning, is a scary topic. It’s hard to know where to get started. It’s hard to even find a good definition of what it does and what you have to do. And there’s always the risk of unleashing the singularity or Skynet by mistake.

As I’ve given a few ad hoc presentations on Machine Learning (and though focused on implementing it with Azure, the basics are applicable to other platforms) I thought I’d take my random notes and present them as a primer. You don’t need to be a Rocket Scientist to get started, but having a basic understanding of Linear Algebra will be helpful. As this isn’t focused purely on Azure Machine Learning (AML), and there are good tutorials on getting started there, this isn’t a step-by-step guide for AML Studio.

The first thing to understand is that there are two main types of machine learning model: (more…)

jsNoSpam – make it harder for bots to find your email address

March 6, 2016

If you want to put an email address on a web page, and have it human readable and easy to click on to open up in a mail client you run the risk of exposing yourself to one of the sleazier sides of the internet. Spam email. There are bots out there which relentlessly hunt down email addresses so their masters can deluge you with unsolicited commercial email (or worse, virus infections).

The best solution is to never show the email address – get your users to use a “Contact Us” form or similar so that there’s nothing for the bots to find. But sometimes you can’t do that, either because of how the pages are hosted or your client simply doesn’t want you to.

So… jsNoSpam was born. 100% javascript, so all client side and easy to insert anywhere that allows you to edit raw HTML and include javascript.

The script works by doing a number of things…

  • Requires you to encode the email addresses so they never appear in a recognizable form in the script or HTML source.
  • Supports decoding the email address back to a usable format
  • Allows you to display the de-coded address on the page, or to require a user action (mouse over, click, keyboard navigation etc) before revealing the address.

Because the email address which is inserted into the page via the script is clickable and usable like any regular mailto: link would be user inconvenience is reduced to a minimum, but the effort for a bot to scrape the address is increased and hopefully as there are enough potential variants in how the script can be applied it will keep it ahead of the game.

Here is a live demo of the code in action.

The code is hosted on GitHub, and is open source and unrestricted license (though it would be great if you find it useful if you comment here). It’s been tested in as many browsers as I can and also with assistive technologies (eg NVDA) but if you do find an issue please comment (or better yet fire off a pull request for me to incorporate your fix).

On their own, the techniques used (encoding the address, requiring user intervention etc) are not new, but hopefully combined they will produce a robust enough solution for people who need this workaround.

Connected Cars and Smarter Smartphones

June 25, 2014

As smartphones get smarter, and cars more connected it seems to me that there is a huge untapped market. Not everyone will replace their car along with their phone (or vice versa) so an opportunity exists to create a flexible, standards based solution both for new vehicles and aftermarket retro fit scenarios.

Luckily many of the standards needed to deliver this already exist. Bluetooth, NFC, wireless charging, ODB-II can all combine to present a seamless experience – if only the software was available to tie it all together… (more…)

Will work for Internet Points!

February 3, 2014

For a year and a half I’ve been helping solve problems, write samples and clarifying questions to make them easier to answer. It’s not my day job and it doesn’t even pay peanuts. It pays me in something even less tangible … internet points! (more…)

Browser Profiles – an excuse to play with Chrome Extensions

December 27, 2013

Like many people I use a laptop that I carry from home to work and back again. That coupled with browser preferences syncing to my other machines means all my bookmarks and extensions travel everywhere with me.

At work (or on our VPN) there are certain intranet sites I can access that are not public, so I’d prefer not to see them if i can’t click on them. There are also some browser extensions that I don’t want to run at work because they are not on our IT departments approved list. This means that either I have to stop syncing settings, or use a different browser for work… or come up with a smarter solution. (more…)

Keeping a-head in the clouds

November 19, 2013

One of the great things about developing on today’s cloud platforms is elastic computing. You never know what the peaks are going to look like, but you don’t want to pay for hardware you’ll only use once in a blue moon. So you opt for a dynamically adaptive scalable solution.

If you’re read any of my posts about jsErrLog (or “jsErrLog posts” if it’s still down) you’ll know that’s what I did for that service. As I’m offering it for free to anyone with a reasonable load I needed something as cost effective as possible (ie free!). When I built it I looked at Windows Azure, Amazon’s EC2, a few smaller options, Virtual Private Servers and finally settled on Google AppEngine – in common with the others it offered a number of options for programming languages and data storage but the big bonus was a no-nonsense the free tier.

Sometimes however things don’t go quite as planned…

(more…)

Change the conversation – don’t play the numbers game.

July 12, 2013

For new entrants to the phone or tablet market the conversation always turns to how many apps there are. At launch, a year later, how fast the numbers are growing. The conversation is driven by the incumbents and echoed by the press and makes it very hard for a newcomer to be taken seriously.

What would happen though if a new entrant to the space, such as Mozilla with the Firefox Phone, decides not to obsess about the numbers game, but own the narrative and re-write the rules…

If you play the numbers game means you are spread thin, chasing a huge catalog and will constantly be behind the ball playing “me too” and catch up at the mercy of the big fish who probably don’t see you worth the effort until you have an established presence.

Defining your rules allows you to identify a small selection, maybe a dozen, of apps that users want, need or actually use as a base line and expend significant effort working with those partners to create the best version of their experience on your platform.

You help with engineering, dollars and resources, providing money, talent and demonstrating true partnership. Engage deeply with your partners and share the risk – you both need to comfortable enough to experiment with new features on your new platform, to iterate and fail fast but within that small group drive their success while establishing your new platform and demonstrating what is possible.

For most of the incumbents this isn’t the way they play the game. Apple dictate to partners secure in their position, Google, with Android, rely on OEMs and the scale of their store to drive developers. Microsoft have a huge field Evangelism organization who can wield marketing dollars but are chasing numbers and have quarterly goals to meet and don’t seem to have the patience for long term engagements any more. BlackBerry are desperately copying any playbook that seems to make work but are finding resurrecting their brand hard going.

For a new player it’s a losing proposition to try and get into their race. Even if you launch with 50 thousand apps there will be the issue of quality and questions around the presence of the “must haves” who won’t have taken the risk, and every omission will hurt. If you make the headlines read “Twitter launches their next generation client on Firefox OS“, “Evernote delivers game changing update first for Firefox OS” you can control the conversation.

By controlling the conversation you become a platform that is aspirational and seen as innovative.

That is where technology evangelism has to return too, not being driven by the same old marketing and PR story that is seen as safe conventional widsom

Lazy developers make for bad user experiences

March 18, 2013

As a developer I can appreciate that dealing with user input is a pain. Dealing with anything messy humans do is always more annoying than handling nice clean inputs from an API. Developers and designers are human too, and they should think about the experiences they are creating, and how a little bit of consideration for the user can turn a frustrating process into a moment of delight.

  • Required fields: Indicate visually when a field is required, and ask yourself if the field is actually required for what the user is trying to do (delight them and they’ll come back and share more information incrementally). Especially in a world of security leaks I like to minimize what I share and you should help with that.
  • Formatting (phone and credit card numbers) is irrelevant: Should I enter my cell as (425)-555-5555, 4255555555, 425 555 5555 or something else? Actually all of those should be valid as it doesn’t take much effort to strip out spaces, dashes and brackets when you’re validating a credit card or phone number. If you need a particular format for your database or display then re-format it… but don’t force the user to comply with a rigid structure to make your life easier.
  • Don’t be redundant: Don’t make me tell you what type of credit card I’ve entered the number for. Using a simple issuer lookup you can tell me if I just entered an Amex or a Mastercard. If you need me to write an look-up API for you I will, just leave a note in the comments.
  • Passwords are a pain to remember: Just because you think the password rules on your site are obvious (at least one capital, one digit, only special character is an underscore and it must start with a different letter than your username) users have lots of passwords. Give them a reminder next to a where they have to enter it what those arbitrary rules are, ideally on initial entry and as an absolute must if validation fails.
  • Don’t ask me the same thing twice: In the US a ZIP code can tell me the City and State. Same in Australia or New Zealand or the UK and pretty much anywhere else. Can anyone explain to me why I have to enter both 90210 and Beverly Hills, California on a million forms? By all means display the City/State for me to confirm but don’t waste my time asking me to do a computers job. That thing I said about look-up APIs earlier, still true
  • Don’t be forgetful: Computers are good at remembering stuff, if developers are not being lazy. If I fill in a field or check a box on a form and something goes wrong with validation the only field I should reasonably be expected to re-enter is the password (and if you validate that and it passes assume I know my password and don’t make me rekey those asterisks again). If I checked “accept Ts&Cs” or “Don’t email me crap” the first time… I probably meant it so don’t forget it because I didn’t get my phone number in exactly the format you like.
  • On-the-fly, context sensitive validation is awesome: Make use of onchange and onblur events and Ajax to check each field as I go to save the user scrolling up and down a page to find what failed. Basic validation, like credit card checksums, for fields that are easy to miskey should not require a full form submission
  • When things go wrong, show me: When you finally get to a full round trip validation and have to show the user some errors you need correcting don’t just bundle some obscure messages at the top of the page – use visual cues and clear explanations to guide them to get it right

By making the process simple and eliminating points where the user can stumble your helping ensure that your form is not a roadblock where the user might get frustrated and abandon the process. When you go to the supermarket you look for the shortest line, or the easiest way to checkout, and you get frustrated if the process isn’t smooth. It’s just the same on the Web.

Even if you think you’ve gone beyond the things I mention above have you gone far enough? Are you watching your logs and other telemetry to see what fields users are stumbling on? Could you streamline the process further?

Your challenge: As designers and developers you should embrace the opportunity to streamline your users experience, and use every tool at your disposal to deliver a great user experience.

Spam and security

March 5, 2013

With a series of high profile security breaches in recent weeks (Twitter, Evernote, LinkedIn and others) the obvious concern is that the attacker has access to your account. In some cases it’s more than that. (more…)

a friendly bear to help with VPN tunnels

August 24, 2011

If you want to keep your internet traffic secure when using public WiFi or have a desperate need to pretend you’re in a different country to access an online service you’ve probably tried a Virtual Private Network (VPN) service like StrongVPN. As powerful as most of these services are they’re not exactly user friendly and for a casual user they can work out quite expensive.

TunnelBear hopes to change that with an easy to install, easy to configure and, above all, easy to use app. It also starts at a pretty great price – Free!

Currently available for Windows and OSX (hopefully Linux and iOS to follow) it’s a simple install that delivers both the simple dashboard app and the network drivers needed for VPN support and then it’s a case of fire up the dashboard, decide if you want to appear as a UK or US user and hit the “on” button to switch your network connection over to using the VPN. You can change locations or de-activate the VPN just by tapping a button.

For free users you get a monthly allowance of 500MB which should be enough for simple casual needs (and they run promotions where you can bump that allowance up). If you need a bit more – in fact, unlimited bandwidth and double the level of encryption on your connection – then they have a “Giant” plan for US$4.99/mo – less than the price of a coffee at the Starbucks where you’d want to be running this.

Looking forward to seeing this for Linux so I can add it to my bootable USB Key solution.