Monetising Mario

Nintendo’s latest game to make the transistion to mobile has had a mixed reception. The criticism has focused on reducing Mario’s traditionally subtle control scheme to a single interaction (jump) and charging £7.99 after “appearing” as a free game on the appstore.

For us they got both of these spot on and their execution of asking for payment is as good as it gets.

  1. You get to play through a fair sample of the game for free (1/8th)
  2. You are presented with a clear “point of sale”
  3. You are given another free trial (20 seconds of the level 1 final castle)
  4. You have a single price to buy the game, without advertisments or popups
 
  • Level Select
2. Paywall Presentation 3. Purchase Screen

What is an Algorithm?

What is an algorithm?

It’s a reasonably straightforward question isn’t it? But one that yields quite a few debates. I’ve written the following answer to ‘what is an algorithm?’ question based around the STEM computing classes with children.

First it helps I find it helps if you pretend you’re asking one of these to solve a problem; if you don’t tell them everything they get into a real mess!

Robot algorithm

 

An Algorithm is a precise set of instructions to solve a  problem*

For me, that gets to the heart of the definition: solving a problem in a precise manner.

The problem being solved could be as simple as calculating the number of times ‘as’ appears in this sentence or as complicated as finding the quickest route for a journey across rush hour London.

What’s interesting about algorithms and not obvious from their definition is that once created, executed and observed they can often be refactored/reused to solve other problems that require the same generic process to solve.

For example, I’ve lost count of the times I’ve written a function to solve a specific problem then subsequently refined and abstracted it slightly to solve a much broader range of problems, often implemented using polymorphism. This elasticity, once you recognise it, is for me, the root of writing maintainable code. e.g. In the example above, rather than searching for a specific word, you would refine the algorithm to search for any word. This is obviously beyond the stated curriculum but a nice example of a way to illustrate a seemingly abstract part of the curriculum.

I’ve been asked about efficacy a few times as part of the definition and my view is that its not part of the definition. Efficacy is important for Computing Science but it’s not part of the definition.

* As some children are pretty young, under 7,  we don’t talk about Turing machines. But I know a few people favour this addition to the definition and describe it as something that could be simulated by a Turing complete machine. Although I do wonder if we could somehow simplify and adapt this into the design and discussion of Turing machines…

Node-Red A visual tool for wiring the Internet of Things

Node-Red A visual tool for wiring the Internet of Things is a fantastic web-based app that is perfect for helping children do something with their Raspberry Pi – actually, it’s perfect for helping anyone do something with their Raspberry Pi!

Node-Red A visual tool for wiring the Internet of Things
Node-Red A visual tool for wiring the Internet of Things

As it’s built on node-js, a Javascript based server environment for running cross-platform applications, it’s incredibly simple to install and get running (it’s honestly just a few commands and it’s running.

From there, it’s as easy as dragging nodes on a page and wiring them up. For example, you could use it to quickly and easily set up a light sensor on your GPIO which then sends a tweet when it’s getting dark.

Anyway, you get the idea, have a look over at the node-red site for more  info:

http://nodered.org/

 

 

WordPress protecting Denial of Service (DOS) attacks with Fail2Ban

 

Wordpress DOS denial of Service Fail2Ban
WordPress DOS denial of Service Fail2Ban

If you run a weblog chances are you’re among the 70% of them that are running WordPress. If you are you’re more than likely seeing various attempts on your security, perhaps DOS as a result of exploit attempts on xmlrpc.php so I highly recommend reading this article on Fail2ban.

Fail2ban is a great utility that allows you to set up monitoring of log files and filter them according to very specific rules. For example, you can specify a filter to watch Apache web logs for requests using https and ban, i.e. prevent them from accessing your server for a period of time,based on the number of requests made in a certain time period.

Here’s a great blog on how to set it up:

http://r3dux.org/2013/06/how-to-stop-apache-dos-attacks-with-fail2ban/

FEATURE: Girls get coding!

Great blog post by local journalist  on getting more girls into coding and Computing.

Everyone knows how to use a computer, right? We practically live on them. Whether it’s a laptop, a desktop, a mobile phone, or a tablet people of all ages are spending more and more time on them.

We chat to friends on computers, we work on them, we take photos and make videos with them, and we share all these things with other people using our different devices.”

For the full article head over to https://grrrlslife.wordpress.com/2014/12/11/feature-grrrls-and-computers/

The Pi and Programming
The Pi and Programming

The Top Twenty Programming Languages in GitHub for 2014

I’m writing an overview of Code for a project and thought I’d see if you can query GitHub at a meta-data level. Turns out you sure can 🙂 Check out the GitHub Archive over here http://www.githubarchive.org/

Row repository_language repos_by_lang
1 JavaScript 267193
2 Java 200889
3 Ruby 188521
4 PHP 126322
5 CSS 124412
6 C 111537
7 Python 103123
8 C++ 56977
9 Objective-C 44526
10 C# 42716
11 Shell 33517
12 R 19724

(Generated used Adam Bard’s query and Google Big Query via his blog http://adambard.com/blog/top-github-languages-for-2013-so-far/)

SELECT repository_language, count(repository_language) AS repos_by_lang
FROM [githubarchive:github.timeline]
WHERE repository_fork == “false”
AND type == “CreateEvent”
AND PARSE_UTC_USEC(repository_created_at) >= PARSE_UTC_USEC(‘2014-01-01 00:00:00’)
AND PARSE_UTC_USEC(repository_created_at) < PARSE_UTC_USEC(‘2014-06-10 00:00:00’)
GROUP BY repository_language
ORDER BY repos_by_lang DESC
LIMIT 100

Web Development Problems with Apache following MacOSX upgrade to Yosemite

Yosemite OSX

 

If you’ve just installed the Yosemite beta on your development machine and your web environment has stopped working – as it usually does following a major OSX update – it’s likely this.

Apache has been upgraded to 2.4 from 2.2 and you’ll need to adjust your Directory directives as follows:

2.2 configuration:

Order allow,deny
Allow from all

2.4 configuration:

Require all granted

 

Here’s the full upgrade page from Apache.org

PHP is also upgraded to version  5.5.9 (cli) (built: May 10 2014 21:37:28). I’ve not encountered any major issue there yet but it’s worth reading upgrade pages on that too. Here’s the PHP page on the changes and compatibility issues.

 

Don’t Panic – A Guide To The Computing Curriculum

There’s a few exciting announcements to come from inPractice, the first is a free guide to the new curriculum for teachers that I’ve decided to release as an open-source document (on github) via the creative commons license. I’d love it to be collaborative and multi-lingual so if you’d like to pitch in, fork the code and get in touch 🙂

It’s written for teachers and anyone wanting to know a bit more about the concepts in the curriculum. It will contain interactive examples plus the Craft Computer resources with full instructions.

It’s in progress now, but in the spirit of Agile development, you can read what’s there now or download and contribute if you’d like – click the image.

The next announcement will be about the physical computing product we’re working on which is called: parc.io. More on that soon!

Don't Panic
Don’t Panic

Do Parents Think Computing Is Important For Children?

Throughout the Kickstarter campaign I’ve been using it as an opportunity to reach out to parents and get their opinion on the new Computing curriculum and general drive to push it into schools.

I had a great email from an old school friend who’s not technical and reflects the general consensus I’ve found quite well:
Hi Dan
It’s essential that children are given the opportunity and access not just to learn about computers and coding but to really understand it.  If my daughter is being taught maths so that the methods and numbers are unpicked and she understands why numbers work they way they do so she can apply that understanding with any set of numbers then surely the same benefits apply when it comes to computers/coding.

I am concerned that even though computers/technology touch nearly every aspect of our lives there is still a ‘mystique’ about them or coding is seen as a ‘dark art’ it must be mainstreamed in education if we are to encourage our kids to learn and be turned on to the possibilities to then go on to choosing a career path that sees them create the next generate of technology or use their knowledge in engineering, science or research (areas that need a boost of entrants).  My son has just started secondary school having only had a limited experience of working with code and it frustrates me to think that this may continue.

Even if your kids are lucky enough to go to an extremely well resourced school their experience and exposure to computers and coding depends entirely on how adept the teacher is with it.  Even then I’m willing to bet that its ‘surface’ learning rather than a deeper understanding.  Too often lack of resources is used as an excuse for not exposing the children to this kind of stuff at all which makes practical solutions such as yours a total win:win.

I want my children to ask why? when they are being taught, and get past the surface learning that provides limited value and does not give them the tools to learn and acquire knowledge and skills as they move through their school years.  Using outside of the box methods to teach them a different perspective on such a critical part of their lives & futures should surely be the top of the list.

I hope this isn’t too ‘soap box’ but its something I feel very strongly about.

The One Thing I Can’t Live Without – Paper!

My friends at the design studio Burning Red are doing a weekly blog task for their newsletter Red Matter and asked me to do this week’s topic which is…

The one thing I can’t live without

My name’s Dan Bridge, I’m a programmer and I spend a LOT of time in front of computers, laptops and tablets. I poke, prod and punch numbers, words and functions into them to make them do useful interesting things. Sometimes they won’t do what I want. That usually means I haven’t told them what I wanted them to do clearly enough.

In order to work out what I want computers to do, here’s the thing I couldn’t live without: pen and paper.

My Note Pad
My Note Pad

Most people think programmers just sit at machines and transfer code thoughts straight from their head into the computer but everything I do I usually sketch out on paper first. So that notebooks are indispensable for me. They let me test things out, order my thinking and add lots of weird doodles and arrows

It’s the one thing I couldn’t live without – work wise!