Skip Navagation

Full On Design

A Web Development & Technology Blog

 

Getting the Weather in PHP

A few months ago I made a small PHP class which can get the weather based on latitude and longitude. Anyway you can now download it and contribute to it over at Google Code.

Here is a code example of how to get the weather:

$w = new Weather('50.799995', '-1.065545'); // Input the Latitude and Longitude
echo $w->getLocation()->getWeather()->sayHuman();
// Ouput~: Portsmouth, England, PO4 8 | Partly Cloudy 4°C, Humidity: 93%, Wind: N at 8 mph

Enjoy!

Getting Started with HTML5 Canvas

The HTML5 canvas is a really neat new feature which allows you to draw shapes. It’s a little unknown of how it will be implemented in the mainstream web, however current forecasts suggests it can create really cool games such as Pirates Love Daisies, applications such as Sketchpad or even a new method of CAPTCHA.

Here is a quick cookbook on how to get started with Canvas where you will learn how to draw basic shapes and colours.

Finding your Feet

The first thing you need to start playing with the canvas tool is a browser which supports canvas. Currently most modern browsers do support canvas (This includes, IE9, Google Chrome and Firefox).

Next, set up the shell of your HTML5 page. To save you time I have made a basic example you can copy.

The important thing to remember about adding the canvas tag to your page is:

  1. Your page has the html5 doctype, otherwise it might not work.
  2. You add a width and height, otherwise your graphics may look cropped.
  3. You add a “Your browser does not support the  HTML5 notice” notice in the canvas tag for older browsers.

Read the rest of this entry »

Developing for Android with NetBeans – Thoughts so far

A few days ago I decided that Google recommend IDE for developing on Android (Eclipse) was pants on head silly. Somewhere between the high memory usage (700MB on idle),  poor performance on my laptop (It would lag every time I scrolled) and other annoyances (e.g. when it thought there was a bug, were their wasn’t but would not run anything until I fixed the imaginary bug). Thus I decided to see if NetBeans (My preferred IDE for working with Java) could be a better alternative.

Setting up Android to work on NetBeans

Off the bat, NetBeans does not have many development tools for Android. In fact after an evening of searching I managed to only find one plugin for NetBeans. The plugin I found was nbandroid, which hasn’t been updated in a few months, but for now was the best option.

Installing the Android for NetBeans plugin was quite easy, the NetBeans Wiki has a well written tutorial on how to get everything set up.

Initial thoughts

NetBeans is a much cleaner and easier to use interface in comparison to Eclipse, however a few differences stood out to me.

NetbeansIDE Android Application

Firstly, you will need to have a reasonable understanding of android projects’ file structures, otherwise your pretty much back to square one. If you have a good reference material this should not be an issue, but if your looking just to have a play around it could end up being a little headache.

Read the rest of this entry »

Socialize This 2.1.0 Update Details

Open Graph Socialize ThisI’m currently preparing Socialize This 2.1.0 for release. Hopefully it should be ready by Tuesday the 18th. Here are the main changes.

  • Added Open Graph Support
  • Added goo.gl Support
  • Fixed the AJAX digg widget bug.
  • Added “Share this Link Set”
  • Removed the @Anywhere widget set.
  • Tidied up the admin panel a little.
  • Clean up code a little

One of the big new features is Open Graph. Its data you place in the head of your document to define how your page will be defined on Facebook.

The update will be available in the WordPress Plugin Directory when the update is released.

Twitter Status URL Shortener 1.1 Update Information

Within the next few hours I will be releasing an update to my Google Chrome extension Twitter Status URL Shortener. It’s a worthwhile update, mostly because I’ve been meaning to update it for a while and I’ve made a few neat adjustments based on feedback.

Twitter Status URL Shortener

Some of the key changes are:

  • The icon no longer takes up real estate next to the URL bar.
  • Smarter URL shortening i.e. if the URL is shorter or about the same length as the shortened URL it will not bother shortening it.
  • It’s faster! I adjusted the speed a little and now it’s a little more suitable for fast typing users.
  • Support for goo.gl.
  • Caching was also added, which makes tweeting URL’s multiple times faster.

You can try it via its Google Chrome Extension website.