Skip to main content

Posts

Ruby on Rails at June's AgileNorth meetup

Tonight was June's AgileNorth meetup and the topic was Ruby on Rails . It was hosted by David Draper who did an excellent job of introducing Rails in an easy to digest way even though he has very little Rails experience himself. Just shows what a good trainer can do! He demo'ed a shortened version of Curt Hibbs's Recipe Cookbook tutorial using the RadRails plugin for Eclipse as his IDE. David started by creating the database in mysql (note: just the database - no tables) and then used RadRails to create the initial 'cookbook' application environment. He used the ' migration ' feature of rails to create the database tables which were auto-generated by ruby code - this was one feature of rails that I was not aware of and was particularly impressive (for me at least!). He used the scaffolding tools of rails to auto-generate the recipe & category models, the cookbook and category controllers and all the associated views. All of this was done in lit...

Solving Ubuntu permission problems when mounting a Windows SAMBA drive

After using Ubuntu desktop for a while I decided that a backup of my files would be a good idea and so went about attempting to mount and copy a whole host of files. I attempted to mount the SAMBA drive running on my Windows fileserver as myself: smbmount //backups/andrew.beacock shares/backups -o username=andrew.beacock,password=******** but was told that I didn't have permission to, only root can mount to SAMBA drives. So I popped the word 'sudo' in front of the command and tried again. This time it connected successfully and I was able to browse around the shared directories. I then attempted to use rsync to back up my important folders but ran into problems again. It complained that I didn't have permission to delete files off my share, so again I popped the sudo command in front of the rsync command and thought it was me being stupid. I then ran into a really strange problem where even though I was running as root and the files on the server were owned by root ...

Time Management Tracker extension for Firefox

Sorry for not blogging for over a month it's a bit crazy in my life at the moment! Been doing tons of DIY, trying to choose and order a new kitchen plus a short break to Paris. Hope to be doing something soon that is worth blogging but for now how about a rather clever little timer that records how long to spend surfing the net when you are meant to be working... TimeTracker Firefox Extension Technorati Tags: Time Management , WorkHappy , Firefox , Extension , Andrew Beacock

Solving XPlanner's $DISPLAY issues on a headless Linux (Debian) server

A month or so ago at work we started playing around with XPlanner , a project planning and tracking tool for eXtreme Programming (XP) teams. I downloaded it to my Ubuntu workstation, unzipped it and ran startup_xplanner.sh . Everything worked fine, all the graphs displayed, all the reports, etc. We then decided that we would start to use it seriously and so it needed moving to a central server. This is when our problems started. We started to get errors such as: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) . This was due to XPlanner now running on a headless server but it requires the Java AWT graphics libraries to draw the graphs. These in turn use the underlying system's X server, which requires some kind of X server running. After some investigation I found Xvfb , an X server virtual framebuffer which will happily run on a headless se...

A list of US 'time zone IDs' for use with java.util.TimeZone

If you program in Java and have to convert dates and times between different timezones then you will know that the Date, Calendar & TimeZone objects of the java.util package are the way to go. The JavaDoc for java.util.TimeZone mentions that you can use a 'time zone ID' of "America/Los_Angeles" to get the US Pacific Time. It doesn't give examples of any other time zone ID, so here is a list of the standard US time zone IDs: Area Abbrev Zone Name Eastern Time EST America/New_York Central Time CST America/Chicago Mountain Time MST America/Denver Pacific Time PST America/Los_Angeles Alaska Time AST America/Anchorage Hawaii-Aleutian Time HST America/Adak (Table sourced from Statoids: Time Zones of the United States .) Technorati Tags: Java , TimeZone , Calendar , Date , Daylight Savings , Andrew Beacock

Never forget to attach a file to an email with the AttachmentRemember Thunderbird extension

AttachmentRemember is a rather nifty Thunderbird extension checks your outgoing email message for words that indicate that you might have wanted to attach a file to your email before you sent it. So the message "Please see the attached file" would trigger if there was no attachment (once you add the keyword "attach" to the extension). Talk about saving face in the work place. Technorati Tags: Email , Attachment , Mozilla , Thunderbird , Andrew Beacock

Programming is easy?

Over on the 37signals blog they had this comment from a customer: A feature request came in that told us: “Programming wise it is fairly simple.” Jamis responded, “Some people have no clue.” Click here for the rest of the post. Right on brother! Technorati Tags: 37signals , Andrew Beacock

Surely software developer magazines doomed for failure?

There is an interesting post from Eric Sink regarding the eventual death of developer magazines . I used to subscribe to a couple of software development magazines, EXE was one of those - an excellent magazine that I would probably still subscribe to. It was bought out by Dr. Dobbs and was killed off as soon as it was bought. Since 2000 I've not referred to one magazine for any help in software development, why bother when there is so many fantastic resources on the net? Technorati Tags: Eric Sink , Andrew Beacock

Resetting a PostgreSQL sequence

To reset a sequence so that the next time it's used it returns 1 run the following SQL: select setval('my_sequence_sq1', 1, false); The first parameter is the sequence name to set the value of, the next is the value to set it to, and the third field is whether the sequence should return this value or the next increment when it is used next. For the official documentation please read chapter 9.12. Sequence Manipulation Functions from the PostgreSQL 8.0.7 Documentation . Technorati Tags: PostgreSQL , Database , Andrew Beacock

Your priorities are what you DO

Do you ever wonder how you are meant to work on high priority long term tasks when you seem to have a never ending list of "urgent" (but non-important) tasks to work on? Mark Horstman from the excellent Manager Tools podcast has a few words to say on the matter . My key takeaway from his post is: What is it that you DO? How do you spend your time? Because what you DO really IS what your priorities ARE . This really hits home on what you should be doing rather than what you are doing. It also indicates why it can start to get you down when you don't get to work on the them. Mark covers this when he says: The disparity between what they know their jobs to be and what they spend their time doing is the primary source of their dissatisfaction in their role. What you need to do is figure out how to spend less time dealing with the non-important but "urgent" work and more time on the important strategic stuff. Stephen Covey covers this with Habit 3 : "Put Fi...

Google Page Creator - Nice & Easy! Unsafe

I discovered Google Page Creator this morning (via the technology section of memeorandum ) and then spent the next 5 minutes signing up and creating my first GPage. Check it out! It looks like a very simple, easy to use tool that will make creating webpages very easy for non-techies (but you can still get access to the raw HTML for those more tricky issues). Update: In my haste to spread the word I failed to notice something pointed out over on the One Degree blog , your Gmail username is part of your URL so it's trivial for spammers to figure out your Gmail email address. Technorati Tags: Google , Page Creator , Website Design , Andrew Beacock

Why do you want that feature?

37signals have got their heads screwed on the right way. Over on their Signal vs. Noise blog Jason has posted about why they have many 'features' missing. His response: "It just doesn't matter" . Their latest product is "easy group chat for business" called Campfire . It's a web-based IRC-type service which allows you to chat, share files and pictures. They have left a large number of so called 'features' out and many people have been asking why on their forum. They take the view that if it's not essential for the service to operate correctly then you have to make the hard decision of whether to include it or not. Any feature no matter how small costs, whether in time, complexity of the resulting code or in the usability of the final product. When you are designing software for someone other than yourself how do you take the same approach? If they are paying the wages then surely what they want wins? My thoughts at the moment revo...

Restricting Firefox's memory leak usage

There has been a lot written recently about the "memory leaks" of Firefox 1.5 . The lead engineer for Mozilla Firefox, Ben Goodger posted about this over on the Inside Firefox blog . Apparently one possible "leak" is actually a feature - Firefox caches a number of the previously viewed pages in memory so that should you want to go "back" they don't have to be downloaded again. Obviously this can be a tremendous performance boost when going back but the default rules that Ben posts abouts got me a little concerned. Here is a table of the system ram size and the default number of cached pages: RAM Number of Cached Pages 32MB 0 64MB 1 128MB 2 256MB 3 512MB 5 1GB 8 2GB 8 4GB 8 As you can see if you have 1GB of RAM or above it will cache 8 pages by default, but if you have 512MB then it will only cache 5. I have 1GB in my machine but will be caching the same about in memory as a 4GB machine - so I changed this setting to only cache 6 pages. Here's ...

Webapp design hints & tips from the del.icio.us founder

Joshua Schachter presented at the The Future of Web Apps summit in London this week and both Peter Cooper & Simon Willison have posted some excellent notes from that session. The key findings from these notes for me are: Keep URLs simple. Leave all the framework invisible, it doesn't help the user, keep URLs clean. "Nobody cares" about complex URLs. Some latency in the system is OK - work out where you have leeway, e.g. RSS feeds can fall a few minutes behind without anyone minding. Keep API simple - REST, etc. When people ask for features, get to the bottom of why they are asking for that exact thing. Solve the problem, rather than doing exactly what your asked for. The features you put in are as important as the ones you leave out. Don't waste time building features nobody uses. These cover similar points to the ones I raised in yesterday's post about stripping requirements down to the bare-bones . Technorati Tags: del.icio.us , Joshua Schach...

Stripping requirements down to the bare-bones

Jason Fried of 37signals posted recently about how they choose the essential vs. non-essential requirements for v1.0 of their products. This got me thinking that: a) what a great idea, it makes perfect sense b) how many client-driven projects would allow such a thing to happen? With agile development and the process of release & iteration planning in particular, essential requirements would be moved in front of non-essential ones, so maybe when dealing with external client-driven projects the first iteration (or so) would produce the 37signals' v1.0 release? Technorati Tags: Jason Fried , 37signals , Agile , Release Planning , Iteration Planning , Andrew Beacock

Tidy up your Windows PC with the excellent CCleaner

CCleaner is a free utility for Windows XP which will clean up your system and generally get your machine back in order. It can clean up Internet Explorer and Firefox histories, cookies and temporary files. It removes the temporary files and log files that Windows updates leave lying around and it also has an excellent registry cleaner built in. This is particularly good at getting rid of old problematic startup errors that occur after you've uninstalled certain applications. I ran CCleaner for the first time on Thursday last week and it found 280MB of stuff that it wanted to delete! Most of that was internet cache files and Windows update rubbish, although I did have to uncheck it from deleting all my Firefox cookies. It also fixed about 90 issues with my registry. Just be careful to check all the settings prior to cleaning your system as it's pretty thorough ;) It's an excellent free tool and is now on my "must install" list! Technorati Tags: CCleaner , P...

Monkey Patch - a Band-Aid for code?

Yesterday Chad Fowler made a post about the virtues of monkey patching . It mentioned that his code "monkey patches some of the Rails core classes" but does not provided a definition. It wasn't something that I had heard of before so I went in search for answers. I found it within the documentation section of Plone.org (an open source content management system). Their definition is: A monkey patch is a way to modify the behaviour of Zope or a Product without altering the original code. Useful for fixes that have to live alongside the original code for a while, like security hotfixes, behavioural changes, etc. The term "monkey patch" seems to have originated as follows: First it was "guerilla patch", referring to code that sneakily changes other code at runtime without any rules. In Zope 2, sometimes these patches engage in battle with each other. This term went around Zope Corporation for a while. People heard it as "gorilla patch", thou...

del.icio.us search to replace Google?

Well maybe I've blown the title up a bit to big but I wanted to share an interesting experience I had this afternoon with search. A number of months ago I came across a website that helps you organise an event. You enter your name & email address and a title for the event. Then you add possible dates for that event along with a list of email addresses to send the invites to. I used it a couple of times and then forgot about it, deleted it from my (del.icio.us) bookmarks and removed all trace of it from my memory. This afternoon I wanted to find that site again, so I turned to Google . No matter what keywords I typed in be it " event ", "meeting", "invite" or "plan a party", it couldn't find it. I turned to del.icio.us and entered 'event' in the search box , the second result from "Everyone's items" was the one I was looking for, a site called MeetWithApproval.com . It's a very cool service and now that I...

Mozilla's Thunderbird email client turns 1.5!

It's not the newest news in the world (it's been out a few days) but I wanted to share that Thunderbird , the free and rather excellent email client has been upgraded significant from 1.0.7 to 1.5. I've been using Thunderbird for quite a while now both on Windows XP and Ubuntu Linux and find it to be extremely stable and a pleasure to use. Technorati Tags: Mozilla , Thunderbird , Andrew Beacock

Summary of January's AgileNorth Meetup

Update 19/01/06: Phran Ryder informs me that my unnamed pair is in fact Stephen Hutchison. Monday night was the January meetup of the UK north-west AgileNorth group. It was again kindly hosted by Katie at computing department of the University of Central Lancashire , Preston. There were 11 attendees, and like last time it was run by Murray Tait (with laptop and software setup provided by David Draper). We continued off from last time with more coding dojos , the first being a simple problem of reversing a sentence. Given "AgileNorth meets once a month" we had to produce "month a once meets AgileNorth" (maybe we could call this " Yoda-speak "). David Draper & Charles Weir took to the laptop to be the coding pair mainly responsible for typing in the code to implement the unit tests and referring to the JavaDoc where necessary. The rest of us were communicating to the 'customer' (Murray) and deciding what the next unit test should be (whic...