Take back control of the internet with RSS If only I wasn’t so dependent on content going viral on Facebook! If only I didn’t have to keep checking my favourite pages for updates! Fear not!
When we write code, we shape the world Fascinating talk by Avdi Grimm at last month’s LoneStarRuby on The Soul of Software. He contrasts two perspectives on software: Formalism. This is ...
bundle open gem source I didn’t realise you could do this, from a Ruby or Rails project using bundler/Gemfile: bundle open activerecord
Depot application with RSpec An excellent introduction to Ruby on Rails is Agile Web Development with Rails 4 by Sam Ruby. Around half of the book is devoted to building the “depot”...
Rails architecture Three thought-provoking talks about the architecture of a Rails application First, Bob Martin (2011) argues that Rails ought to be an irrelevant detail...
Too much Rails code? Put it in a gem! If you extract some of your Rails code into a gem, and test the gem separately, this will guarantee that the gem cannot depend on the rest of your appli...
Jekyll with Prose Jekyll is a beautifully lightweight alternative to the likes of WordPress. But the main disadvantage, for ‘normal’ users, is that you really need to be ...
What’s bothering me about Rails’s ActiveRecord class Product < ActiveRecord::Base # All of my attributes are public end I expect there are very good reasons to ditch the whole idea of encapsul...
WordPress to Jekyll If either of you read my posts by actually visiting this site, rather than by using an RSS feed reader (such as feedly), then you may have noticed some ...
WordPress to Jekyll Change of plan: I'm moving this site not from WordPress to Rails, but from WordPress to Jekyll. It was kind of fun developing a blog from scratch in Rai...
WordPress to Rails (5) static pages WordPress lumps posts and static pages together in one database table, but they need to be handled quite differently. At least for the time being, I’m ...
WordPress to Rails (4) uploads WordPress allows you to upload files (such as images) and include them in posts. These end up in a location such as .../wp-content/uploads/2012/06/githu...
WordPress to Rails (3) Bootstrap Rails is more about making web applications that actually do things than it is about making web sites that just look nice. But sooner or later, some att...
WordPress to Rails (2) permalinks Various changes since last time, such as adding user login authentication, with the following in the User model, which seems to mimic the WordPress auth...
WordPress to Rails (1) schema and scaffold I’m attempting to move this blog from WordPress to Rails. Why? Because I’m learning Rails!
pIDLy update It's been a while since I posted anything here. And today won't mark a significant change in that pattern, I'm afraid. But my python-IDL interface, pIDL...
Authors list script One of my most important roles within HerMES has been to generate the LaTeX for the lists of authors and affiliations in the astronomy journal papers (p...
pIDLy on GitHub I thought I'd better figure out what Git and GitHub are. Git is a revision control system, enabling you to keep track of changes to computer software (...
Aspect-oriented programming That’s right, not object-oriented, but aspect-oriented. What’s that all about then?
Update Regular visitors to [what was] my boring technical blog, may be forgiven for thinking that nothing is going on. This is my fourth post here in two years...
Generating LaTeX authors lists for MNRAS and A&A Okay, a bit boring, but as promised, here are some Python functions to generate LaTeX source for long authors lists for MNRAS and A&A.
MNRAS line wrapping in authors lists In case anyone else using the MNRAS LaTeX class has been tearing their hair out inserting line breaks manually into long author (and institution) lists,...
A proper UK keyboard layout for Mac Macs are marvellous. So many differences. Better in every way. But, having said that, some of the more trivial differences just plain irritating. For ex...
Astropython You (both of you) might well be interested in the new Astropython site, which looks excellent. Here’s the site’s own description: Research in astron...
Gmail on Apple Mail Well, Sussex University email is hopelessly (yes, hopelessly) broken this weekend, so now seems a good time to switch to a proper email provider for my ...
Pixelating a 2-D Gaussian with Python They’re coming thick and fast now. Here’s a Python function to accompany the previous post. It’s not maximally efficient, but should make sense…
Visualizing noisy images You have an image. Each pixel has a value with some uncertainty. How do you visualize the uncertainty in each pixel?
Python, FITS and DS9 Here's an easy way to display FITS images (or any array) in DS9 using Python (with PyFITS, NumPy and Numdisplay, which is part of stsci_python). First l...
PSFs in IDL Two methods of approximating a point-spread function in IDL: 1. StarFinder seems to do a great job at finding point sources in crowded fields. It includ...
The eclipse of IDL 7 I've finally made the transition from IDL 6.4 to IDL 7. Here are my handy hints... IDL Workbench rocks! (This is because it is basically Eclipse, which...
pIDLy: IDL within Python Now Python and IDL can talk to each other (okay, Python talks to IDL and IDL does what it's told), using pIDLy (pronounce as you please). I experimented...
IDL code miscellany IDLdoc 3.0 (more info here) gives my badly-written bits of IDL the deceptive appearance of being well designed, useful and user-friendly. So I've made a...
Moving files to trash from the Mac command line Ever wished you could move files to the trash from the command line on the Mac? Here’s how. First, buy a Mac. Then Option 1 (uses bash): add the follo...
Firefox or Safari? I've been using Firefox for a good while now as my web-browser. It's been the obvious browser to use on Linux and I've found it much better than Interne...