The usual warning applies: I am writing mainly for myself on topics that interest me. I'm not bothered if you're not interested in them.
When I stopped coding last session, I was sitting with an interesting problem to solve: the code to include the header and footer wasn't working.
After spending too much time going line by line through the code, I eventually noticed something painfully obvious: I had misspelt a folder name and missed the trailing 's' from templates.
Sigh.
When I get some spare time, I'm going to have a long hard look to see if there is a good visual editor for css files. A quick look didn't find one, and I'm more interested in getting to doing some coding.
I do find css more than a little frustrating at times, and I should probably go back to first principles and relearn using the latest standards - this would be a good excuse for a trip to a good bookshop, but both my favorites have closed (that's Borders and the Waterstones branch in the MetroCentre).
When I buy a book I like to hold it and I really love the smell of a new book. It's even more important for technical books to have a look at the actual contents before deciding to buy. Once I've decided I want the book, I'll get it then and there - I don't like the delay between ordering and getting a book delivered (even if it works out cheaper).
Most of my inspiration for the html and css was taken from the "CSS: The Missing Manual" book.
Friday, 18 May 2012
Wednesday, 16 May 2012
Learning PHP the hard way
I have been given a challenge: to learn PHP well enough to demonstrate my programming prowess.
Most people will have no idea what PHP is, and probably care less. Not to worry, read on and you will possibly learn more than you are interested about.
Most people will have no idea what PHP is, and probably care less. Not to worry, read on and you will possibly learn more than you are interested about.
Friday, 6 April 2012
Fuel on Rails - the Static Pages
Progress!
I've made a little progress with the app, but it has felt like mostly taking backward and sideward steps working out the differences between erb and haml.
Static pages for the site have been setup, with a fairly plain gray colour scheme that needs something doing to liven it up a little.
A logo
I do have some ideas for a logo, and may resort to watercolours while I create some designs. I'll postpone deciding on a site colour scheme until I do create a logo: it would be a shame to have to change it more than once.
I'm having a debate with myself about the app title - perhaps "Fuel on the Road" might be better. I haven't decided if I'm winning or losing the debate though.
Signing up
Signing up victims users
Next step is to get a signup and signin process set up. This is going to need careful thought, for the people like myself who forget passwords (perhaps I should just keep to using one password everywhere).
Fuel: a Ruby on Rails app
I'd spent several days thinking about what I wanted to create, had several complicated ideas then (prompted by filling the car with petrol) decided on an app to monitor fuel consumption.
So far I have created some screen layouts while thinking about what I want the app to achieve.
Initial Screen layouts
Homepage
There will be a homepage with possibly some statistics on the data held, although what I don't quite know what - perhaps something line the total spend on fuel in the past month compared to 12 months ago.Sign up
A means to register on the site. Every site needs one, unless all the data is to be made public. I didn't seriously think about that at all.Sign in
A means for a user to recover a forgotten password would be helpful here, it's a feature I certainly have used several times on various websites.Users homepage
To show details of the vehicles operated by the user. Initial builds may restrict to a single vehicle.Vehicle details
A history of the fuel used and some comparisons with 3/6/12 months ago might be interesting.
Fuel upload
The means of adding the fuel used to the database.
Not much point without including this!
Not much point without including this!
What else?
The means to allow another user to upload fuel details might be useful (I know it would for me), and that would need some form of authorisation scheme, along the lines of friend requests on social networking sites.
Top Down Design
I intend to use a combination of Cucumber feature lists and rspec specifications to ensure the app is working the way I intend. This will also help reduce the risk of a change breaking the site without being noticed.
I did notice something interesting: I have written one user script for logging into the system, and I currently have 100% code coverage. Although as I don't have any lines of code in the system, that's quite easy to achieve.
The next steps
They are going to be to create further rspec and cucumber test scripts and implement the user sign in model, followed by adding vehicle details and then adding fuel loads.
I have a fairly comprehensive list of all of the fuel I have put into my current car going back several years since I first bought it (about a week before I started dating my girlfriend).
The source code is currently sitting on a github repository, with the first build pushed to heroku, although I'm not planning on publishing the url for the moment.
Saturday, 17 March 2012
Ruby on Rails
Like many others, I have signed up for the Software as a Service online course hosted on corsera.com, it is my first real look at Behaviour Driven Design and Test Driven Design.
I find it interesting that the IDACS development team I worked with at the turn of the century followed many of the Agile principles, although we didn't have the formal sprints and reviews. We did, however, meet up at least once a month to review our work (and the occasional pint or two was imbibed).
My current project is with coming to grips with the whole SaaS principles.
The first week was learning some basic Ruby (a language I am rapidly coming to love), followed by a trip into Ruby on Rails and this last week with using Cucumber to have test scripts that pass or fail the code that has been written.
I have been having an interesting time trying to get Cucumber to work nicely on my OSX machine (thankfully the SaaS course provided a vm with everything set up ready to rock). Everything in the Ruby world seems to be evolving at a rapid pace, and many of the online instructional videos are a little out of date.
To get Cucumber to run on my machine, I found (after much perusing and changing keywords in searches) that the following seems to work:
In the Gemfile, add the following code:
Adding
Run bundle update at the command line, followed by:
This creates the features folder with the appropriate helper addons.
I did spend some time trying to work out where the web_steps.rb file had gone, but it is no longer included as part of the package. Apparently due to people creating steps files that are over detailled and prone to being brittle and breaking with relatively minor changes to the codebase.
Now all I need to do is to start building apps using the tools. One is going to be a blog type facility based on the Railscasts videos, and the other is to make a waiting list management site.
I find it interesting that the IDACS development team I worked with at the turn of the century followed many of the Agile principles, although we didn't have the formal sprints and reviews. We did, however, meet up at least once a month to review our work (and the occasional pint or two was imbibed).
My current project is with coming to grips with the whole SaaS principles.
The first week was learning some basic Ruby (a language I am rapidly coming to love), followed by a trip into Ruby on Rails and this last week with using Cucumber to have test scripts that pass or fail the code that has been written.
I have been having an interesting time trying to get Cucumber to work nicely on my OSX machine (thankfully the SaaS course provided a vm with everything set up ready to rock). Everything in the Ruby world seems to be evolving at a rapid pace, and many of the online instructional videos are a little out of date.
To get Cucumber to run on my machine, I found (after much perusing and changing keywords in searches) that the following seems to work:
In the Gemfile, add the following code:
group :test do
gem 'rspec', '>=2.5.0'
gem 'capybara'
gem 'cucumber','>=1.1.4'
gem 'cucumber-rails','>=1.3.0'
gem 'database_cleaner'
gem 'webrat'
end
gem 'rspec', '>=2.5.0'
gem 'capybara'
gem 'cucumber','>=1.1.4'
gem 'cucumber-rails','>=1.3.0'
gem 'database_cleaner'
gem 'webrat'
end
Adding
gem 'haml-rails'
will also give you the haml templates instead of erb (wish I found that before I set up my current test project).Run bundle update at the command line, followed by:
rails generate cucumber:install --capybara
I did spend some time trying to work out where the web_steps.rb file had gone, but it is no longer included as part of the package. Apparently due to people creating steps files that are over detailled and prone to being brittle and breaking with relatively minor changes to the codebase.
Now all I need to do is to start building apps using the tools. One is going to be a blog type facility based on the Railscasts videos, and the other is to make a waiting list management site.
Monday, 20 February 2012
Imagine Cup NE: The rest of the world, BEWARE!
Just over two weeks ago, James asked at the last minute if I could go with him to an information event about the ImagineCup; I had already committed myself that evening so sadly couldn’t accompany him.
He returned home, and was just a little bit enthusiastic. I got an email saying “You’ll be a mentor for the ICNE hack, won’t you? I’ve told them you would” I said yes, signed up and wondered what I was letting myself in for.
Today Ben asked me to put together a few words on what I thought of the ImagineCupNE event last weekend from a parents perspective. Foolishly, I said “yes”, then sat staring at a white screen for twenty minutes without anything useful appearing. This is what eventually (and after too much MacDonalds coffee) emerged:
To have the opportunity to mentor some of these young people has been an incredible honour for me. The amount of enthusiasm and passion shown by all of the future developers show me that the industry had better beware: the next generation of developers are ready to rock the IT world.
At the start of the event they organised themselves into teams and started discussing ideas to propose for their entry into the ImagineCup North East heats.
Every team came up with several ideas, and the various mentors pointed out good points and areas to improve and change. Every team I talked to had several good ideas knocked back, but they kept persevering and improving and adapting their ideas.
As well as discussing how they were going develop something to improve the world, they spent time in workshops covering a wide range of topics, from Presentation Skills to Sales and some fairly technical topics too, and the ideas gleaned made dramatic changes to some of their ideas and proposals.
I've watched the IT industry from the early 80's, when I got bitten by the computing bug, and the change I've seen is nothing to the change that the ImagineCup developers are going make over the next ten or fifteen years.
I will openly admit to being in tears of pride at the end of the event, my son and two of his friends from college came up with a proposal (after many, many changes and knockbacks from the mentors).
One of his team (and I don't have my notes as I write this) got nominated as the most supportive developer, and the tears were caused by Ben's comments that my son was most highly commended for his attitude and knowledge.
Several of the other mentors had told me during the event about James' interest, knowledge and persistence in asking questions on the workshop topics: James told me later that he had three pages of questions that he did not ask about the cloud workshop.
I only have one complaint about the event: only one of the teams will get through the regional heats to get to the country finalists. From what I have seen they all have the potential and ability to be very successful in the finals.
What were the highlights for me?
He returned home, and was just a little bit enthusiastic. I got an email saying “You’ll be a mentor for the ICNE hack, won’t you? I’ve told them you would” I said yes, signed up and wondered what I was letting myself in for.
Today Ben asked me to put together a few words on what I thought of the ImagineCupNE event last weekend from a parents perspective. Foolishly, I said “yes”, then sat staring at a white screen for twenty minutes without anything useful appearing. This is what eventually (and after too much MacDonalds coffee) emerged:
To have the opportunity to mentor some of these young people has been an incredible honour for me. The amount of enthusiasm and passion shown by all of the future developers show me that the industry had better beware: the next generation of developers are ready to rock the IT world.
At the start of the event they organised themselves into teams and started discussing ideas to propose for their entry into the ImagineCup North East heats.
Every team came up with several ideas, and the various mentors pointed out good points and areas to improve and change. Every team I talked to had several good ideas knocked back, but they kept persevering and improving and adapting their ideas.
As well as discussing how they were going develop something to improve the world, they spent time in workshops covering a wide range of topics, from Presentation Skills to Sales and some fairly technical topics too, and the ideas gleaned made dramatic changes to some of their ideas and proposals.
I've watched the IT industry from the early 80's, when I got bitten by the computing bug, and the change I've seen is nothing to the change that the ImagineCup developers are going make over the next ten or fifteen years.
I will openly admit to being in tears of pride at the end of the event, my son and two of his friends from college came up with a proposal (after many, many changes and knockbacks from the mentors).
One of his team (and I don't have my notes as I write this) got nominated as the most supportive developer, and the tears were caused by Ben's comments that my son was most highly commended for his attitude and knowledge.
Several of the other mentors had told me during the event about James' interest, knowledge and persistence in asking questions on the workshop topics: James told me later that he had three pages of questions that he did not ask about the cloud workshop.
I only have one complaint about the event: only one of the teams will get through the regional heats to get to the country finalists. From what I have seen they all have the potential and ability to be very successful in the finals.
What were the highlights for me?
- A 2am run to MacDonalds and a £90 bill. The parcel shelf of my car was packed with drinks, and the two developers were buried in MacDonalds packages.
- Going to bed at 3am listening to them discussing their projects and waking at 6 still hearing them discussing and improving (no namby pamby hotel beds - sleeping bag and carrymats for the mentors was the order for the day)
- Running out of petrol on the way home - I did make it home (just), but was only the fuel in the lines and the car didn’t want to get as far as the petrol station the next morning.
- Watching the pleasure James has had from his new phone - the prize he well and truely earned.
Tuesday, 1 November 2011
Getting VirtualBox to run on Debian 6
I got sick of seeing the "Could not load the host usb proxy service verr_file_not_found" error message when starting VirtualBox. What was even more annoying was that it worked under Ubuntu 11.04 without any problems.
I am running VirtualBox version 4.1.4 r74291 and have installed the VirtualBox 4.1.4 Oracle VM VirtualBox Extension Pack (available here: https://www.virtualbox.org/wiki/Downloads).
After a bit of poking through documentation I found this page https://forums.virtualbox.org/viewtopic.php?p=33944.
Next tried adding the usb file system to fstab
1. Find the group id
$grep vbox /etc/group
vboxusers:x:121:g6ujj,ns
and as root, added the following to fstab:
none /proc/bus/usb usbfs devgid=121,devmode=664 0 0
Success! Or at least I now get a different error message "VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to the 'vboxusers' group."
Checked my groups settings, and no: I wasn't a member of the vboxusers group (although I am an administrator - go figure!)
Logged off and on again and that did the trick.
Now I can enjoy the delights of testing under Windows XP again. Yes, I know I can run most of my cross-compiled code under Wine, but there is nothing quite like being certain, is there?
Subscribe to:
Posts (Atom)




