Welcome to my little place on the web.

I'm a software developer and occasionally when time allows, I like to blog about my various coding project here. I also like to tinker with home automation, retro gaming and more.

I have also shared some of my software, which I hope may be of use to others. It's on my software page.

Hide message

Displaying entries for #codingclear filter

Newest entries

Leaning Java - Android game development

I have been meaning to learn Java for a while a now, but as usual it’s all about finding the time. Over the last few weeks I have been fortunate enough to come across the brilliant Java tutorials over on Kilobolt.com. Not only do they cover Java basics, but they continue to step you through creating your own framework for game development. Then port them across to Android via the Android Studio IDE.


At the end of the tutorial you have a one level robot platform game, shown above. The development has gone fairly smoothly. ... read more

RSS feed updated and a sitemap

It seemed crazy to me that the original code would generate a feed every time you accessed the page, generating lots of unnecessary database class. I have updated my code so that when I add a post it will replace a static blog.xml file.

So if you have subscribed to my RSS feed, please refresh your reader by re-pointing to digitalgeek.me/blog.php or digitalgeek.me/blog.xml.


I have also improved the site indexing files. This is using pretty much the same code to create a sitemap.xml. I hope this will help getting my pages listed on Google... read more

Added support for coloured toolbars in android

Continuing from my previous post regarding the dynamic backgrounds and colours. Starting from version 39 of Chrome on Android (Lollipop) you can also set the toolbar colour. It's easy too. You just need to add a meta tag for theme-color in the head. So now if you're on Android hopefully your toolbar should be not the boring grey. Head over to the htmlrocks.com website for more details.



Pretty backgrounds

As much as I originally liked the green circuit board background, after a few months I think it's time for a change. Well, more like some variety. I have updated the site so that the background and highlighted colour is dynamically selected by a pool of images I have set. This is done via php, overriding the stylesheets.

Images are from places I have visited. Don't worry the circuit board is still there too. I'm sure you would miss it :) There is also a new section on the sidebar that tells you a little about the background. I hope you like it.


RSS feed now available !

RSS feed has now been created.


This is generated via php pulling the blog entries off the database in real time. I should really look at caching this. Maybe a project for another time. RSS feed is added to the header so should get picked up automatically by your rss reader pointing to this page.


Over 10 posts and no paging!

Managed to get to post number 12 and no paging! Currently it only returns the top 10 rows from the database. Maybe I never expected to have over 10 posts! :)

There will now be an 'Older entries' link at the bottom of the page. This has been accomplished by returning 11 rows from the database. Row 11 does not display the article, but instead generates the 'Older entries' button passing the id in the querystring. When the page is reloaded it will only return posts equal or less than the id querystring. Give it a try!


HTML5 site refresh

Now that I have restyled the site for mobiles. It has made me reassess my html. I really should be using html5.


So the last few evenings I have been replacing many of my divs with the new header, nav, article, time, etc. There is a great article here - http://fortuito.us/diveintohtml5/

Don't expect anything to change. Most of the new tags are for accessibility, so that screen readers can manage the site better.

These changes do bring some backward compatibility issues with ie8. ... read more

Updating the site for mobile devices

Time for another website update. This time I looked at making some style changes to allow a different view for mobile devices.


My first step was to add the media attribute to the current stylesheet link element. With this set, the style will only be used on computer screens over 1069px. I then created an additional stylesheet called mobile.css. This stylesheet will be used on handheld devices or screens under 1069px. New and updated element below.

... read more

We have #hashtags

Now that I have a few varied posts, I thought it’s about time I started to look at categorising these entries. My original plan was to create a new table to store the categories in the way you would expect with a normalised database. Then it occurred to me, if it’s good enough for twitter, it should be fine for my little humble site. I’ll use these new-fangled things called hash tags.

Using php regular expression, whenever there is a word with a #hash in front it, my code will wrap a hyperlink round it. Clicking this link will then return a list of posts that contain the same ... read more

Comments are finally here - am I alone?

Sometimes the internet can be rather lonely. I’m a number of posts down now and I have no idea if anyone is reading this, well except for my wife checking my spellings.

With this in mind, today I have spent a few hours creating an additional comments table. With this table created, the code was surprisingly easy to do, with just an additional SELECT and INSERT statement.

So don’t be shy. Say hello from the comments section.


Older entries