Refresh Jun 11 2011
If you’re reading this in a feed reader, you won’t notice much difference, but if you’re reading this at ejdraper.com, then you’ll spot that I’ve changed the theme on this blog, to the awesome cardstock theme by Parker Ehret. As the transition from my sole trader ejdraper.com business to KickCode Ltd has now been complete for a few months, I think it makes sense to retire the old ejdraper.com brand as a professional entity, and reclaim ejdraper.com as a personal site of sorts. Expect more links and things I can’t fit into 140 characters on Twitter. For technical stuff I’ll probably post on the KickCode blog, but will link back here too.
CommentsGeckoboard & Rails 3 Jan 4 2011
As it might be obvious from my previous post, I dig Geckoboard a great deal. It’s a fantastic, useful tool for visualising data at-a-glance. My immediate thought when I got my invite and started to play with it was of course, “what other stats can I hook up to this awesome app?”.
Once I’d gotten Watchy integrated with Geckoboard, and exposed a wide variety of cool, useful widgets based on FreeAgent data, I got thinking about how cool it would be to have a plug-in, easy to use solution for exposing data from Rails apps. Thus, Chameleon was born.
Chameleon is a Rails 3 engine in a gem that you simply add to your Gemfile, and it provides a generator for creating the widget files needed to declare the data you want to expose, and also includes the controller/views to handle requests to render different widget types. Currently it can handle the “number and secondary optional stat” widget, the line chart widget, and the pie chart widget. It handles authorisation for widgets using static keys/tokens, or optional dynamic blocks to be evaluated at runtime, and also allows for public widgets that require no authorisation.
Using Chameleon, I was able to add a widget to let me know how many people sign up on the holding page for my new app Stashlog, in under five minutes - from Chameleon installation through to deployment.
So on to the good stuff - the latest and greatest version of Chameleon, 0.2.0, is now pushed to RubyGems, so simply adding:
gem 'chameleon'
to your Gemfile should work. It’s open source, and available on GitHub, so for anyone that wants to check out the code, or indeed wants to fork it and add to it, then go right ahead! And there is documentation on the wiki on GitHub too, outlining installation, creating a widget, configuring a widget, and the different available widget types.
Any suggestions are more than welcome - this is just the initial release and I plan to improve it and add additional widget types in the future.
Gem: https://rubygems.org/gems/chameleon
Code: https://github.com/ejdraper/chameleon
Documentation: https://github.com/ejdraper/chameleon/wiki
And don’t forget to follow me on Twitter for all of the latest updates on Chameleon, amongst other things!
CommentsGeckoboard & Watchy Dec 10 2010
As I previously mentioned, I recently launched a web app called Watchy with Kat Neville. Also, I’ve recently received a beta invite to test out Geckoboard, a fantastic dashboard application that lets you add widgets displaying data from various sources, to construct a dashboard full of useful information. Seeing as how some of the most useful information that I want to see throughout my day usually pertains to my business, and specifically the business analytics and calculations we have in Watchy, I thought it’d be a great idea to build some basic Geckoboard widgets into Watchy to bridge the gap.
These widgets aren’t public in Watchy yet, however if you use Watchy and Geckoboard and think they might interest you, then please get in touch with me and I can setup your Watchy account so that you have access to them. Likewise if you’re a Geckoboard user who also uses FreeAgent and would love to access these stats on your dash, then please sign up for a Watchy account, and then get in touch so I can get you setup. These widgets will be a feature of paid accounts when we exit beta and launch paid plans on Watchy, but for anyone who helps me test them now, I’ll make sure that you get to keep your access to them, regardless of whether you move on to a paid Watchy plan or not.
We have three types of widgets, each with a multitude of data to show. The three types are:
Line chart widget
Pie chart widget
Text widget
Now on to the good bit, the instructions for adding a Watchy widget to your Geckoboard dashboard. First things first, lets click Add Widget on the top right of our Geckoboard user interface (you’ll need the top menu showing if it isn’t already):
You then need to choose the type of widget required. For a line or pie chart widget, you need to select “Custom Charts” from the list on the left, for a text widget, select “Custom Widgets”.
For a line chart widget, a 2x2 panel size works best:
For a pie chart, a 2x2 size also works best:
For the text widgets, a 1x1 size seems to work best:
Regardless of the widget you are adding, once you’ve selected the type and size of widget, you’ll see this form:
Lets run through the fields:
URL data feed is the most important one. The URL should look like this: http://SUBDOMAIN.watchyapp.com/widgets/WIDGET.xml?api_token=API_TOKEN. You’ll need to replace SUBDOMAIN with the subdomain you use to access your Watchy account, WIDGET with the name of the widget you want to add, and API_TOKEN with the API token that is shown on your Account Settings page on Watchy once you have contacted me and asked me to enable API access for you (in due course, you’ll be able to enable and disable API access yourself from the Account Settings page).
So what widgets are available? Here is a rundown of the widgets exposed by Watchy, and the name that you need to use in place of WIDGET in the URL data feed field:
- average_week_billable_line - this shows an accumulative line chart of billable time based on an average week, calculated over the last four weeks
- average_week_unbillable_line - this shows an accumulative line chart of unbillable time based on an average week, calculated over the last four weeks
- last_week_billable_line - this shows an accumulative line chart of billable time for last week
- last_week_unbillable_line - this shows an accumulative line chart of unbillable time for last week
- this_week_billable_line - this shows an accumulative line chart of billable time for this week
- this_week_unbillable_line - this shows an accumulative line chart of unbillable time for this week
- average_pie - this shows a pie chart breakdown of the time spent on various projects, calculated on an average over the last four weeks
- last_week_pie - this shows a pie chart breakdown of the time spent on various projects last week
- this_week_pie - this shows a pie chart breakdown of the time spent on various projects this week
- billable_time_this_month_text - this shows the billable time so far for this month as a figure, with a % increase/decrease based on the same time last month
- billable_time_this_week_text - this shows the billable time so far for this week as a figure, with a % increase/decrease based on the same time last week
- billable_time_today_text - this shows the billable time so far today as a figure, with a % increase/decrease based on total time for yesterday
- money_this_month_text - this shows the money earned based on billable time so far this month, with a % increase/decrease based on the same time last month
- money_this_week_text - this shows the money earned based on billable time so far this week, with a % increase/decrease based on the same time last week
- money_today_text - this shows the money earned based on billable time so far today, with a % increase/decrease based on the total money earned yesterday
- unbillable_time_this_month_text - this shows the unbillable time so far for this month as a figure, with a % increase/decrease based on the same time last month
- unbillable_time_this_week_text - this shows the unbillable time so far for this week as a figure, with a % increase/decrease based on the same time last week
- unbillable_time_today_text - this shows the unbillable time so far today as a figure, with a % increase/decrease based on total time for yesterday
So for example, if my subdomain is “test”, my API token is “1234567890”, and the widget I want to use is “money_today_text”, then the URL to use would be:
http://test.watchyapp.com/widgets/money_today_text.xml?api_token=1234567890
The optional API key field can be left blank, as our API key/token is within the URL.
The widget type should be set as “Custom”.
The feed format should be set as “XML”.
The reload time can be set based on personal preference, I have mine set to 15 minutes. It is possible that in the future we may introduce rate limiting for API tokens, to stop overuse of the API, and so I’d ask that you please only set a refresh rate that is necessary for the stats that you want to keep up to date, inline roughly with how often you post new timeslips to FreeAgent.
The label can be set to whatever you want to see on the widget itself, so usually it pertains to the type of data you have chosen to show.
And that’s all there is to it! You can add as many or as few widgets as you can find room for on your dashboard, and you can end up with a great, at-a-glance view of your business analytics like this:
So please, if you use FreeAgent and you’d like to give these widgets a go, then sign up for Watchy if you haven’t done so already, and then get in touch so I can enable API access for you and give you an API token.
Any feedback on the widgets is much appreciated, as are suggestions for how they can be improved, or indeed any additional widgets that people would like to see!
Comments11 tips: Build a web app in one month Oct 20 2010
http://www.safetygoat.co.uk/2010/10/11-tips-on-how-to-build-a-web-app-in-one-month/
11 tips for building a web app in one month, written by Kat, my partner on our new web app, Watchy. It’s got some great detail on our experiences building and launching the first version of Watchy in just a month.
CommentsAnnouncing: KickCode Sep 6 2010
Bit behind on this one, and anyone who follows me on Twitter will have already seen this - but last week, on September 1st 2010, KickCode Ltd launched. This is my new development company, offering web and mobile development, and specialising in Ruby on Rails and Android development. It’s a culmination of almost 18 months hard work freelancing doing web development, and I’m now taking it to the next level by running my own company and brand. The new site has case studies on a lot of my work, and contains more information about the ethos of the new company. Many thanks to the awesome Capra for the outstanding design work.
If you have any feedback on the KickCode site, then please let me know. And of course if you’re looking for web or mobile development, then please contact us over on the KickCode site!
CommentsRunning Free Aug 14 2010
This was an article I wrote a few months ago, but for some reason forgot to tidy up and actually publish. I’m doing so now as after re-reading it, I still think it’s right, and if anything it’s even more pertinent now given Apple’s “antennagate” issues with the iPhone 4, and the news that Android phones are now outselling the iPhone.
I already dropped a link to this article (ironically penned by Daniel Lyons, of Fake Steve Jobs fame) in my recent link post, however there was a really interesting point in that article that I wanted to follow up on. Daniel says:
I was a little shocked recently when an Apple spokesbot responded to the news of Android’s outselling iPhone OS by reciting the old chestnut about Apple’s having more phones out there.
I was shocked because it’s a familiar line, one that I’ve heard countless times in my 20-plus years covering technology. But I’ve only ever heard it from companies that are doomed and in total denial about it.
We’ve seen this movie before. In the 1980s, Apple jumped out to an early lead in personal computers, but then got selfish. Steve Jobs, a notorious control freak, just could not play well with others.
Along came Microsoft, with Windows, which was a knockoff of Apple’s operating system. Microsoft partnered with everyone and today has 90 percent market share, while Apple’s share lingers in the single digits.
Today the battlefield is mobile devices, and just as before, Apple jumped out to an early lead. And just as before, Jobs got selfish. He won’t support Flash, or any cross-platform tools—because he wants developers locked into his platform, and his App Store, where he collects a 30 percent commission.
I find this fascinating, not only because it rings very true to what’s actually happening, but also because there aren’t a huge amount of people picking up on it. Sure, there are lots of people switching to Android. Sure, there are lots of people questioning what Apple are doing. But specifically comparing this to the last time Apple became irrelevant? Wow, who knew there were so many similarities?
Right now the path that Apple are going down is very odd, and one that I’m surprised no one within the organisation is questioning or doubting (or perhaps they are, albeit not publicly). While they are no doubt a very successful company, they are also stifling innovation, and as Daniel says, they appear to be trying to make as much money off of the ecosystem they themselves created as possible. That tends to only end up with one result - people will want to look for platforms that encourage innovation and competition, and that share the wealth and respect a little better. Apple’s strategy might be working in the short term, but is ridiculous over the longer term, and I think they will need to address these concerns with their next generation of mobile device and platform, or else perhaps they’ll simply be doomed to repeat history, and consign themselves to always being the company that could start a trend, but sure couldn’t bask in it.
CommentsDiscipline May 29 2010
I’ve just finished reading Cesar’s Way, a book written by The Dog Whisperer, Cesar Millan. It’s a fantastic read if you have a dog, and has really helped me better understand our gorgeous pet Dalmatian Rocky. Some of the insights though are more profound than just how they relate to our canine friends. In particular, Cesar’s take on discipline I found to be very interesting:
To me discipline is a word that helps me to stay on target, to reach my goals and dreams. It’s a word that allows me to stay balanced, to be a respectful human being, an honest human being, someone who wants the best for himself and for everything around him - from trees, to animals to human beings.
It’s easy to see how being disciplined can help to set rules and boundaries for someone else - whether it’s for a child, an apprentice, or a pet. However, self-discipline is just as important for us to be able to achieve our own goals, whether they are personal, or as part of a broader team or group effort. Often self-discipline is harder than being disciplined on someone else’s behalf. When working with someone else, we might find that they are the motivation we need to stay disciplined, but without that motivation, it’s easier to slack off and convince ourselves that we don’t need to be so hard on ourselves. It basically comes down to responsibility - and being responsible for more than just yourself is great inspiration, and a great motivator to stay on track. With a baby on the way, and an incredible wife (as well as a pet puppy dog in need of leadership!), I feel like I’ve never been more inspired and disciplined, so that our goals and dreams as a family can be realised.
CommentsTab Cleanup May 22 2010
Haven’t posted in a while, been crazy busy with lots and lots of cool stuff. Figured it might be a start though just to post some recent great stuff I’ve been looking at and reading.
My Common Git Workflow - good article from Yehuda Katz about a basic Git workflow for common operations, specifically compared to the equivalent Subversion commands.
Smash Into Vim - PeepCode episode on Vim, a text editor that is getting a great deal of positive interest from a lot of Rubyists. I haven’t yet watched this, but am planning on doing so as I’m considering making the switch from emacs.
Localized external services - an interesting look at testing code that hits a remote external service API.
The WebM Project - an attempt at a truly open web video format, with some pretty big players involved.
Google Font Directory - Google now have a Font API for using non standard fonts in your web apps. Am I right in saying that this is similar to Typekit, albeit free, open but with less fonts to choose from?
Sayonara, iPhone: Why I’m Switching to Android - fantastic article that does a very good job of summarizing the reasons why Android is a far more compelling mobile platform than the iPhone. I just upgraded my HTC Hero to an HTC Desire and I’m even more impressed with Android now at version 2.1, and with the latest generation of phones.
Commentsautotest Jan 13 2010
I’ve just recently started using autotest again, and it’s making development so much easier, and more enjoyable. If you do any TDD (test driven development) with Ruby, you need autotest running, as it really improves the experience massively.
With autotest, and growl, you can plod away writing failing tests, implementing code so that they pass, and then rinse and repeat - all the way getting messages flash up telling you when tests are broken, and when tests are passing again. It’s a great way to iterate through writing code to meet user requirements, and incredibly satisfying as you turn failing tests into passing ones, with working code.
So what do you need to do to get it setup? You’ll need to install ZenTest, which contains autotest amongst some other tools:
sudo gem install ZenTest
You can then install the following gems too if you don’t have them already:
sudo gem install autotest-growl
sudo gem install autotest-rails
Finally, you’ll need to setup a small config file, called .autotest in your home directory (~/.autotest):
require "autotest/growl"
That’s all you need in that file, now just hop into a Rails project directory, and run autotest:
cd /path/to/project
autotest
You’ll then get output from the initial test run, and from now on while autotest is running, when you edit a file, it will re-run any tests it deems to have been impacted by a change to that file. It will pop up test failures and test successes as growl notifications too. To force it to re-run the entire test suite, press ctrl+c once. To end autotest completely, use ctrl+c twice in quick succession. Bear in mind for things like database schema changes, you’ll need to do the following to get the test database schema up to date and inline with the development database, otherwise your tests when being run under autotest will fail:
rake db:test:prepare
Now get cracking with those user stories, get those tests written, and then turn them from red to green!
CommentsRuby on Rails Tutorial Jan 9 2010
Not a great start to my yearly goals - right after posting about how I want to blog every other day, I manage to go six days without a post! Time to try again, starting from today…
I was planning my next article as a follow-up to the Getting started with Rails 2.3.5 article I did in December, when I stumbled across this rather brilliant work in progress online tutorial book, Ruby on Rails Tutorial, by Michael Hartl (author of the great Railsspace book). Rather than write some more beginner articles that are probably covered by that material (or soon will be), I figured I’d point my readers in the direction of that resource, as it is certainly shaping up to be a great read for anyone just getting started with Rails.
So going forward I’m going to concentrate on some more advanced topics, and a few more interesting things perhaps for those who are already up to speed with the Rails basics. I’m going to be covering some of the alternative datastores popping up under the NoSQL umbrella - CouchDB and MongoDB on the document database side, and Redis on the key-value store side of things. I’m also going to have a play with the very latest Rails 3 code, so look for a few articles both on building a new app with Rails 3, as well as migrating existing apps.
And if anyone has any requests for intermediate or advanced topics they’d like to see me cover, then let me know. In the meantime, even if you’re an expert Rails developer, it’s still worth checking out the Ruby on Rails Tutorial book and helping Michael out with any feedback you might have.
CommentsPage 7 of 31 | Next page | Previous page