From August 2014

Processing & Processing.js for beginners Part 1

During my foray into the world of Arduino, I happened to come across a programming language called Processing.Conceived in 2001 by the artist Casey Reas and Ben Fry, it wasn’t until 2008 that Processing, an open source language came out of beta and has since had dozens of libraries added either as core libraries or extended (add-on) libraries, and it is one of these for the Arduino microprocessor which I have been exploring for data visualization and controlling a Arduino board as soon to be detailed in my Arduino World blog. Initially conceived as a tool to get non-programmers into programming because of its instant visual gratification; the language is based on Java, but with a simplified syntax and graphics programming model. Subsequently  John Resig, the creator of JQuery ported Processing to JavaScript in the form of processing.js scripts using the Canvas element for rendering, thus negating the need for a java plugin, which along with the likes of Flash whose use is quickly diminishing with the arrival of HTML5 and CSS3 which are capable of performing many of the jobs previously done by these. 

The processing IDE is open source and comes from the same stable as the Arduino IDE, as these two have a shared history. However, as mentioned in a previous post I amevaluating Sublime Text 3 and this not only has a syntax checker for both processing (.pde) and arduino (.ino) sketches, but also a plugin for the Arduino, thus this text editor can be a one stop shop for combined Processing and Arduino development, plus almost everything else you want to throw at it. However, there is at the time of writing a bug with this plugin it seems when attempting an upload of a Sketch to the Arduino Micro board, though everything seems fine with the Arduino Uno board, which is the only other one I’ve test it with so far.  If anybody has a fix for this, please share it in the comments below. To use Sublime Text for Processing you must have the original Processing IDE already installed and its location added to the PATH variable in Windows.

sublime text editor with Arduino library
Sublime text editor

The Processing IDE itself has a number of examples, including all the examples from the book “Getting Started in Processing – Making Interactive Graphics” by Ben Fry and Casey Reas, the founders of the language. This was my first introduction to the Processing language and I found it to be both well written and easy to follow book. Each chapter introduces a new concept and builds on that with plenty of incremental example programs. Theory is kept to a minimum and jumps straight into core programming concepts through hands-on projects. Suitable as an introduction for anyone wanting to learn basic programming or even professionals wanting to get into interactive graphics and data visualization.

The book has just over 200 pages divided into 11 chapters each covering a core concept and the book finishes with references and suggestions on taking your knowledge further, such as visualising data sent from an Arduino as in this simple example with a  light sensor whose output is displayed graphically. The openGL 3D programs didn’t initially work for me, however updating my display drivers quickly sorted this.

I  would definately recommend this book not just for someone wanting a hands-on introduction to programming but also experienced programmers needing an intro to interactive graphics.  If the reader already has some programming knowledge then he could probably work through the book and examples in a half day’s session quite easily I would suggest. I will definitely be building on my knowledge of Processing not only combined with the Arduino but also several of the libraries referenced on the Processing website, which itself is a very good resource, including a video introducing the core concepts.

As mentioned above, your Processing scripts can be run within a normal web page via processing.js and how to go about this will be covered in a subsequent post.

facebooktwittergoogle_plusredditpinterestlinkedinmail

Sublime Text, The Best Text Editor for Developers?

For some time now I have been considering changing the IDE/Editor that I use, which surfaced again today because of  a discussion thread in a Web Designer Group on LinkedIn. The question being posed was ‘what text editor is the best?’

sublime textI got into web design because I was asked to put together a website on the cheap by my then employer, and having not touched HTML for around 10yrs+, I opted for a free community hosting by BT which uses a WYSIWYG editor with the ability to incorporate additional but rather limited styling by adding some minor HTML or CSS. Even after a short while this became very frustrating and so for my next project I changed over to the CoffeeCup HTML editor and their free hosting option. Subsequently I moved over to 1 & 1 hosting when I started to do PHP, MySQL and CMS, while still using CoffeeCup’s HTML editor and struggling with its limitations, particularly its shortcomings when doing anything other than HTML. (Incidentally, I have always found that 1&1 have always given me good support once you have navigated your way through their telephone system.)

Initially, the Coffeecup HTML editor updates were free, but now seemingly charge for any new releases no matter how big or small. The latest version being up-sold on the fact that they have ‘greatly extended it’ with the headline of ‘structured data now included’  –  for the special upgrade price of $19 or $69 for a new install. Sorry guys, I don’t view this as ‘greatly extending’ and further I have been adding that to my sites myself already at no additional cost. The other limitations of this editor have been increasingly apparent as I get further into web development, such as no syntax checker for PHP and being able to collapse parts of the code in the editor between the {} for classes etc, which is essential for even moderately sized files. This editor is really looking rather dated now, with plenty of other free alternatives out there with more capability.  Always reluctant to give up the time to get to grips with another editor but it’s now got to the point where I am probably hindering my productivity by continuing to use this editor and so have decided to bite the bullet while between projects and start a quest to find the best editor out there, free or otherwise,  which brings me back to the discussion thread mentioned above…

Read more

facebooktwittergoogle_plusredditpinterestlinkedinmail

Quick Review: The New Google SEO

I must admit that I have only just got round to reading this kindle© eBook by Kathleen McDivitt although I purchased it back in 2012.  Couldn’t sleep the other night so searching through my kindle library in the hope of boring myself to sleep I found this title. Being one of those low-cost Kindle©  books my expectations were not great, as its now possible for anybody without any writing skills and only a passing acquaintance of a subject to publish to this format.

Alas, it didn’t have the requisite effect and I read it all (only 35 pages), and then still couldn’t sleep as I was reviewing in head how closely my websites aligned with the advice given in the book. In the interim since purchasing and reading this title I have studied the subject somewhat at length but even though I already knew most if not all of the advice given or thought I did, it always helps to review the basics from time to time, and this book does that in a succinct and easy digestible way.

As the subtitle –  What You Need To Be Successful with Google Panda and Penguin – suggests, the intention is give an overview of the Google Panda and Penquin updates and what you need to do to ensure your sites are not adversely effected but it also gives a very good overview of what you should be aiming for in your SEO approach generally. You only need a very basic knowledge and understanding of how Google is all-powerful in helping your online success or otherwise to get the best from this short book. If you are a seasoned old hand at SEO then you should already know the implications of Panda and Penguin by now, and so I would recommend this book to anybody just getting into the subject or with some knowledge as an inexpensive reminder of the fundamental principles to help get your site ranking high in SERPs. Even though it is relatively old in terms of SEO since Google are constantly tweaking their search algorithms, its content and underlying message of producing valuable content is still very valid today.

facebooktwittergoogle_plusredditpinterestlinkedinmail