You found some behavior you think isn’t right in a piece of software and you are thinking about reporting a bug.. Wait, stop, read this first as it will save you time in back/forth with the developer.

Is this actually a bug or desired behaviour?

Ask on the mailing list for the software first. Most developers do things for a reason.

Does a bug already exist for this?

Look through the bug tracker / issues for this software, it’s possible a bug already exists. If so you can throw a +1 at it, +1 is a universal “bump” to show your interest. You can also track issues on tools like Github.

Are you reporting the bug in the right place?

Etherpad, as an example doesn’t take plug-in bug reports on the core bug tracker. Plug-in bugs should be reported on the individual plug-in bug trackers.

Want it fixing quickly?

Create a bounty. You will be more likely to get a fix in a timely fashion. This is especially true for feature/enhancement requests.

Provide information

Bug reports like “I can’t click on anything” are completely useless. Include information such as:

Operating system

Your browser

Your browser version

The page you are on

Provide Steps to replicate.

Provide how you got the problem to happen.. IE

click on page X

click on element Y

do Z.

Don’t be a leech.

When you file a bug developers will look at your repository and if this is your first ever bug report and you don’t contribute anything back to any other projects it’s likely you will be ignored.

i18n (Internationalization) in applications roughly means adding support for translations and other languages. In this blog post I will talk you through a general approach to implementing i18n in Cordova Apps. If your app isn’t open-source, move along, the 90s is on another website.

As Cordova apps are written in HTML/CSS/JS we can easily leverage existing web platforms and services to provide i18n at break-neck speeds.

Sit back and enjoy..

Once you have completed your implementation and it’s approved by the WMF the WMF translation team will translate all of your strings and commit them back to your repo. You might want to provide the WMF team with the ability to see each of your strings in situ in a browser, this means providing a mechanism to fake Cordova events..

Summary

This implementation is basically a straight copy of how we handle i18n in Etherpad, it’s pretty robust and clean to implement. All in all a complete refactor of the NFC Ring Control App while implementing i18n took about a week of full time commitment, well worth doing as now the larger community can provide translations which if I was to do hans solo would take months

I have been experimenting with using a webcam to measure an objects size, width and height.

It works by comparing the size of a user defined box to the size of a magnetic strip (which is also user defined). I tested it against a ruler and it seems accurate but obviously the larger the object the more accurate it becomes. Right now it’s setup to measure the size of a ring finger.

I use getUserMedia / Canvas to do most of the interaction between the webcam and the browser and I’m using PaperJS for drawing the boxes onto the canvas. The actual math is really simple

// Takes a scale value and tries to figure out the mm diameter of each ring
function scaleToRingSize(widthPx){
return (85.72500 / stripWidth * widthPx).toFixed(2); // 85.72500 being the width of a magnetic strip in mm
}

I’m researching using Tracking.Js with some custom OpenCV maps to do better object detection, I know this is possible but right now the algos are a bit buggy and I’d need a lot of positive images to create a good training set. If I could do some object tracking in theory I could auto detect the strip / target object size and automate / realtime the whole measurement process and in theory I could do ask a server to do real time object detection, but that’s for another day..

The measurement app might not quite fit on your page, this is because it’s 800px x 600px with absolute positioning, I guess I could make it use relative positioning but right now I’m not interested.

The tool will work in all browsers that support getUserMedia which is IE11, FF 17, Chjrome 21, Safari 7 and Opera 12, iOS Safari, BBB 10, Opera Mobile 12. For more browser support queries see getUserMedia browser support. Obviously if you are still using IE then you have probably made many other poor life decisions and you are beyond my help. Obviously because I’m using JS / CSS the app will work on a mobile and desktop webcam so you can in theory measure objects whilst on the move.

I had to worry about the overheads of the large javascript fabric.js library so I decided I didn’t want the additional overheads of jQuery. It’s entirely written in JS (with obv some CSS/HTML) throw into the mix. I could probably refactor it down to just JS without too much headache and this would give site admins the ability to do something like:

<script src="measurer.js"></script>
var measure = new Measurer();
measure.create("targetDiv"); // can do it like this because getUserMedia is limited to one instance of browser/OS.
measure.on('success', function(measurement){
alert("Got a measurement of", measurement);
measure.destroy();
});

You will need a card with a magnetic strip on the back, ideally a credit card as these are guaranteed to be a universal size.

Final thoughts: None of the images are saved to a server but as you know these images are being passed through the Internet which means your ISP is sending a copy of them to the NSA. I strongly recommend against using this tool to measure any part of your anatomy.

Cloudflare is a service that speeds up your website or blog loading speed times by handling your website DNS and acting as a CDN for your sites content. I tried it out on MySchoolHolidays.com

CF = Cloudflare.

Some things that rock:

CF sped my page loading up by minifying my JS/CSS etc and reducing the hops to the static content. Also DNS lookups were marginally faster (<5%).

Some of the plugins available may be of use to others but weren’t for me and some of them even introduced JS bugs.

CF introduced me to some new techniques for doing stuff such as catching client side JS bugs.

CF would help me scale quick

CF protects against exploits and scrapers.

FREE and if you want pro you can pay a small amount.

Some things that suck:

No round robin ergo no high availability for sites that use this which means greater downtime.

Poor customer support.

Horrible console and back end.

Bugs, lots of bugs. Everywhere…

Paid option doesn’t really give you much in the way of improvements if anything.

CF “always online” feature doesn’t work.

No wildcard domains.

Cloudflare have a great opportunity and a huge audience but they have some massive problems to deal with if they want to make it a worthwhile service for me to adopt across the board.

Note: I’m too lazy to include stats.

Summary: Use the free version, get used to using a CDN for offloading some page content. Make sure you setup analytics before so you can review your page speed load times. Amazon and Google have similar offerings that will probably have a higher QOS ergo provide a better ROI.

This script will send you an email when a new property in your area comes up on twitter.. Replace shoreditch with the area you want and add in some email addresses. You will also want to modify the price.. at current it’s set to a minimum price of £150 per week.

It was written to solve a problem where we would be out looking for flats/apartments and we needed to be one of the first people to respond. This script gave us the edge that meant we could secure a good property in the limited window of time we had.

You need to be familiar with NodeJS to use this. Execute it as a cron job or however you want.. It will store results to a database called db.db

The code was written by @pitapoison – He is an awesome developer, you should follow him. We literally made this over a cup of tea and a bowl of pasta, it took 15 minutes and saved many hours.

I think it’s interesting to see the approach we used to solving a housing problem, something that affects everyone yet so few will take the time to create a piece of software that gives them the edge.