July 20th, 2010 §
Building the requirements
I’ve been doing some initial work on the app now and have built the basics stylesheets and database tables to let me develop the app and be able to see what I’m doing. It’s important to me to be able to see some meaningful output as I work, and the initial CSS only took half an hour or so to knock up. Plus, I find it easier to keep good HTML coding in mind if I have an output model to aim at - I know the structure of the markup I want to put out and I can change the look of it to something a bit more professional once I’ve built the basic framework of the code.
The requirements text looks like this so far:
Overview
Birding Record is a tool to help birders keep track of the birds they see, the venues they go to and the birding trips they make. The software should be as easy to use as a paper tick-list, but powerful and flexible enough to be able to analyse records in whatever way the birder needs to get the most out of their hobby.
What it is
Birding Record provides:
- as many lists as the birder needs to record the birds they see
- for non-year lists, a simple tick yes or no which records the date seen
- for year lists, a tick to record yes or no, plus a ‘first date seen’ and ‘last date seen’ field for recording migrant arrival and departure dates
- bird records provide space for notes, and for users to upload their own sound and image files for each species
- venue records let you record details for the places you go birding
- journal records let you record notes and bird counts for species seen on each trip, and these can be linked to venue records to build up a detailed record over time
What it is not
Birding Record does not provide:
- field guide notes to help identify species—the aim is for the birder to record their own notes as they go rather than to provide generic information for them
- venue information for where to see birds
- wider migration records for species (although it is hoped that, with a big enough user population, we could collate results on a central site)
My first big decision
I am stuck on how to associate bird records with the lists they appear on. For each bird I would like to be able to record a number of lists, with a simple true/false record to show if that bird should appear as ticked on that list. There appears to be two ways to do this:
- Record this value in the Bird table - nice and easy but will require a more substantial update to add new lists as I’ll need to update every record in the table
- Record these values in a separate table for the list and provide a separate table for each list with each row recording the bird id and date ticked. Makes the queries a level more complex, but would allow for recording extra data such as date last seen and count
Database good practice leads to the latter, only recording the data for birds you have seen. The extra flexibility of being able to record additional data for each tick is promising, the only downsides being slightly more convoluted queries and a bit of overhead to create the table in the first place as it will need to be created with 500-odd rows to initialise the data for each bird. This seems like a small price to pay though, so I’ll build the structure like this, at least to begin with.
July 16th, 2010 §
I’ve been wanting to try and extend what I do with PHP development for a while. I’ve been coding in it for a while, and I think its time that I put something out for others to look at and use. I’ve been working on an application to manage tasks and projects, thinking a lot about what I need the app to do, and building a framework in which I can develop the code to deliver the functionality. This is ready to go - more on this in another post.
This is all well and good, but the process has been long and the changes very many. Not something that I could put together and write up as great example of developing and delivering software. My idea is to push through and build some of the other apps I’ve been thinking about and keeping a journal here to document my thoughts and processes. I’m doing the work in quite small chunks on the train which gives me a good amount of stuff to write up each day.
The project
The first app I’m building is a tool to help birders keep tick lists and journal entries. I’ve had a look at software available and there doesn’t seem to be anything available online, and the installable software seems to be mainly for PC (not suitable for me as a strictly Mac/Linux user). The core features need to be:
- All British birds are maintained in a database with details on names, categories and other non-changeable (or rarely-changeable) data
- lists for users to keep a record of which birds they’ve seen - life lists, year lists, garden lists, county lists, etc. - some already in place but users can add their own. Each record can be linked to dates so that the user can build up a picture over the years of migration patterns for birds in their areas of interest
- main page will show the list of birds with ticks to show which have been seen on which list
- Detailed pages for each bird will allow users to upload their own photos, notes and audio to build their own record of information for each species
- Journal allows users to record detail for individual birding trips, with links to bird species pages where applicable
These will form the basis of the design spec and screen layout, and I’ll build the architecture in such a way that I can easily extend and add features once it is all up and running.
Watch this space…
Post script: Anyone reading this who wants to have a look at my task management application and give me some feedback - please drop me a line!
February 26th, 2010 §
I was going to reinstall ubuntu this morning. I’ve been playing about with openbox, kubuntu, ubuntu studio and others, and my system felt like it was getting a bit clogged up. Conky was showing odd behaviour on the CPU, RAM usage was high, and it generally looked like there were far too many processes running. Time to reinstall, thought I.
But no. Half an hour spent judiciously pruning software in Synaptic, and some minor config file tweaking later, and I’m back up with a lithe, almost pristine system. And with no time-consuming reinstalling and reconfiguring, not to mention the lack of stress I always get when I hit the continue button after repartitioning. Even if I know I’m all backed up and have done all I need to, I always suffer the heebie-jeebies after OK’ing that “You do know that all of your data is about to be destroyed? All of it?” dialog.
Long and short - I’m keeping on top of my game and actually quite enjoying not stressing about the system I’m using. I’ve also started to look at Linux home recording stuff ready to write and play some new songs. More on that anon.
February 15th, 2010 §
I had a problem last week. I had refactored TasksApp to be wholly object-oriented, and had just finished the second round of refactoring code - tidying up classes, moving code that could be reused into more sensible places, and generally tidying up ready to launch my project on the world.
I checked out a new working version to use with my live database and was appalled at how slow the app had become. Loading the home page with around 100 tasks was taking a couple of seconds on my local machine; much slower than it had been before I refactored. I did some quick testing and saw that the delay was increasing with the number of projects and actions displayed.
First port of call, make sure the database indexes were set up right. All looked ok, apart from a couple of indexes that were now useful with the query chanegs I had made. Fixed these, but no dice.
Secondly, set up XDebug to pump out some profiling information, and use KCacheGrind to have a look. Not much I didn’t know, but confirmation that the time was all being taken in instantiating and displaying project and action objects. A brief look didn’t show anything up so I decided to leave it and come back to debug the paths through the app in Komodo when I had a bit more time. Very annoyed that my lovely, modular, readable, extendable code was behaving badly like this.
This morning I noticed that a page on our intranet was really taking along time to load, and saw a message in the status bar about bit.ly. Hmm. A quick trip to the Firefox add-ons window, and one uninstalled plugin later - all is fine. The page snaps up in super-quick time, and all is well. Lesson learned - test web apps in Firefox with all plugins turned off, and have confidence that the code I produce is good-quality code.
February 11th, 2010 §
…not because I feel the obligation, but because the act of blogging about the thought made me realise that I spend far too much time installing other distros and then setting them up to work exactly like Ubuntu. I appreciate the freedom that Arch gives me, and I appreciate the flexibility that that system provides. It’s just that I don’t really need it. This came into sharp relief thanks to this sequence of events:
- Want to boot Ubuntu to a text prompt and then start X when I need it
- Can’t find an easy way to do it as they seem to have changed the boot process to avoid using inittab
- Throw all my toys out of the pram at The Injustice Of It All
- Wipe my machine and spend a whole weekend getting Arch to work, booting nicely to a text prompt
- Blog about my new found freedom
- Take an hour installing and setting up the software I need to get Arch to boot to a graphical log-in as I’m fed up of the text one
Granted, I know a lot more about Linux than I did before I started, but that’s another few hours lost that I could have spent improving my Python or PHP skills, or writing a chapter of my novel, or sorting out some of my photos, or any one of the other hundred things on my to-do list. And I could have done any of those on any of the distros I’ve tried in the last year.