General

Posts that cover general aspects of programming.

Getting Started With PhoneGap And Android

PhoneGap is a free and opensource framework for developing mobile applications. It is a great way of creating applications that work across multiple devices including iOS, Android, Blackberry, Windows and others. It works by rendering HTML pages using a browser, which means that you can create applications using just HTML and JavaScript. It also allows you to interact with elements of the phone like the camera and accelerometer through JavaScript using a simple API.

I recently set about trying to use this system to create an application, and as I have an Android phone I started by creating a simple Android app. The PhoneGap website has a number of getting started guides, including what software you need to get started. I found that they were a little wrong for getting started in Android. I am running OSx so the instructions here might not work for you, but they should be fine for most *nix based systems.

LAMP And Beyond: A Review

Saturday 30th June saw a one off event organised by the PHPNW community called LAMP and Beyond. The idea was that it would bring together people of differing abilities with the aim of sharing skills and experience with servers, programming, source control, or whatever happened to be of interest at the time.

With 30 or so people signed up to the event we filled the top floor of MadLab in Manchester and got started (after a bit of coffee first). Taking some post-it notes we wrote down what we wanted to know about and what we could teach about onto a board and then broke off into groups where people's interest matched.

User Group Meetups Are More Than The Talks

The good thing about working in a city like Manchester is that there is an active digital community. This means that there are quite a few digital events as well as a number of communities and user groups. I have been going to (and even organising) local user groups for a while now and I always learn something or help someone out, but the groups are more than that.

I recently encountered an attitude (from more than one person) that made me think that the point of usergroup meetups was slightly lost on them. Essentially, I saw that people were taking one look at the agenda for a meetup and saying "oh, there is nothing on the agenda that interests me, so I won't be going".

MoSCoW Requirements Gathering And Estimates

Understanding what it is that the client needs is an integral part of software development. The client will usually help you out by telling you what they need the system to do. What you will generally have is a big list of the things that the system should do. Rather than explain the difference between the terms "function requirements" and "non-functional requirements" to the client, you can save time by using MoSCoW. This is an abbreviation for Must, Should, Could, Won't and can also be written as MSCW or a number of different ways. I prefer the addition of the o's as it makes it more easy to communicate the idea to clients. The idea behind MoSCoW is to go through everything that the client wants the system to do and applying one of the four terms to that feature.

Ideas Of March

This week I was pointed, somewhat ironically through Twitter, to a blog post from Chris Shiflett about how we need a blogging revival. Which is something I quite agree with as although Twitter is great for a sense of community, it is impossible to impart good technical knowledge and/or experience through 120 characters.

Blogs are a fantastic resource. I have lost count of the times that I have been stuck on a problem and after a quick bit of searching I have found a blog post from someone who had exactly the same problem, but managed to find a solution to it. I have quite a few people who have done the same thing with #! code and have posted comments on how I have helped them out, which I find really rewarding.

Does An IP Address Provide Useful Tracking Information?

An IP address is an address for a computer on the Internet. The usual example used is of a web server that can be accessed via a URL that is translated behind the scenes into an IP address, but IP addresses can be used to find any computer on the Internet.

When a normal home broadband user accesses the Internet they send their transmission through their Internet Service Provider (ISP) who have a collection of IP addresses they use for their users. ISPs tend to get blocks of perhaps several thousand IP addresses that they will use as a pool for their users. When a user logs on they are given an IP address and when they log off this address is sent back to the pool for other users to use. The actual systems in use here are a little bit more complex than this, but this is the essential idea.

PHPNW09 A Review

Last weekend saw the second annual PHPNW conference, and it was an excellent conference. There were some 200 people attending the event and we got to see some interesting and informative talks. When I arrived at the talk I received a bag with some brochures in it as well as a KitKat (which I ate for breakfast) and a years subscription to PHP|Architect. Everyone at the conference was also fed very well for lunch and dinner and Sun sponsored a free bar at the end of the first day, which was nice.

What I thought I'd do is go through each of the talks that I attended and copy in my responses from the joind.in reviews that I have been posting during the week, but also embellish them with further thoughts and comments. Also, joind.in seem to have deleted one or two of my reviews so I will have to write them from scratch anyway.

Using Netbeans PHP Code Templates

Netbeans is a great IDE and with every version lots more features are introduced that make it even better. One thing that I like to use is the code templates, which have been available from version 6.5. Code templates allows you to type a simple command and get a section of code. What commands you can use depend on what version of Netbeans you are using and which programming language you focused on. As a PHP developer I usually download the PHP version, which comes with a set of PHP code templates. To try one out go into a PHP file in Netbeans and enter if followed by a tab. Netbeans will automatically change this into the following:

A Look At robots.txt Files

A robots.txt file is a simple, static, file that you can add to your site in order to stop search engines from crawling the content of certain pages or directories. You can even prevent certain user agents from crawling certain areas of you site.

Lets take a real-world example and look at what you would do if you decided to set up a Feedburner feed in place of your normal RSS feed. I won't go into why you would do this much, other than to say that you get some nice usage statistics and it can save on some processing power on your server as your feed is only looked at when Feedburner updates. Once you have allowed your blog to issue the Feeburner feed instead of your normal feed you then need to stop search engines from indexing the old feed. This stops is appearing in search indexes and things so that you can get your users to grab the Feedburner feed and not your local feed. You would then put a robots.txt file in place with the following content.

Virtualization With VirtualBox

Virtualization is basically a term used to describe the creation of a computer in software. The main benefits of which are that if you want to try out an operating system or test client server communications you don't have to get multiple computers. You can simply create a few computers virtually, which will act just like the real thing.

There are quite a few virtualization products available, some are free and some cost quite a bit of money. After messing about with quite a few different virtualisation products other the past few weeks I have uncovered a great bit of software called VirtualBox from Sun Microsystems.