Often when I’m stuck on a task I’ll start procrastinating. I’ll go and empty the dishwasher, do some gardening, or read a book to avoid working on it. Most often this is because I have a rough idea of what needs to be done, but I know there are parts that I’m uncertain about, or I know the task will be a bit painful or annoying to complete.
We had a bank holiday in the UK on Monday and the weather has been lovely, so I’ve been outdoors harvesting vegetables. Our courgettes have done really well this year. I think putting them in the ground and underplanting them with white clover has helped the nitrogen levels in the soil, which means the plants are big and have lush green leaves.
It’s still surprisingly hard to find restaurants that serve organic food. So I was delighted to discover The Looking Glass in Cheltenham not only does organic food but they also make everything in-house and they’re open for breakfast.
The web is full of distractions: adverts, news, social media, email. It can sometimes be hard to remember why you opened the browser in the first place. Even opening a new tab is distracting. You see bookmarks, a search box and frequently visited sites before you’ve even begun the task you went on the web for.
The power of a system comes more from the relationships among programs than from the programs themselves.
This is my summary of the recommendations at the end of Unhappy Meals by Michael Pollan.
You’ve got to slow down if you want to go further.
I created this little shell pipeline to help me see the total amount given to or received from people and companies using my data in YNAB.
Some photos from a recent visit to Gloucester Cathedral.
In Ruby, Hash#select returns a Hash whereas Hash#find_all returns an Array.
I wanted a quick way to run some XPath selectors against a web page today. Nokogiri comes with a command line tool that you can pass a url and it will drop you into an IRB session. This allows you to play around with some Ruby code to explore a webpage before scraping it.
If you’ve followed along my previous two blog posts, Web Scraping with Ruby and Advanced web scraping with Mechanize then you’ll now have the knowledge needed to write a basic web scraper for getting structured data from the web.
In my last post I gave a basic introduction to web scraping with Ruby and Nokogiri. At the end of that post I mentioned that for more “advanced” scraping Mechanize was worth looking into.
Update Jan 22: Check out the next post in this series: Advanced web scraping with Mechanize.
My minimal banana bread recipe. This is very much at the bread end of the bread/cake spectrum, it’s not very sweet other than the sweetness from the banana. If you want more sweetness then you can add some sugar, soft brown if possible, up to 100g added after the butter. Recipe can be used as a base and then added to, for example after mixing in the flour you could add a handful of walnuts or raisins, some cinnamon, vanilla essence, honey, peanut butter etc, anything that might go with banana really!
Our very first all-grain American IPA homebrew
Go is a great language for building network based applications. It comes with some excellent tools for creating web-apps out of the box.
I’ve been playing with my Raspberry Pi starter kit today. It comes with a clear plastic case for mounting the Pi onto, but as I’ve already got a case I’m just using the breadboard and the components that were supplied with the kit. As well as the breadboard the kit includes the following components:
For a while now my shell has been taking a very long time to start up. It wasn’t so noticeable on more powerful machines, but on my late 2010 MacBook Air with “only” 2GB of RAM, it was very noticeable.
If we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent”: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger. Edsger W. Dijkstra
Recently I found myself wanting to access the resque-web ui on a live application. I had considered just running resque-web as a separate process, but after reading this article I realised that I could mount resque directly in the router, awesome!
Start at the top level with a user requirement. This will ensure that you are trying to solve the right problem in the first place.
I've only just got round to doing some coding with Ryan Dahl's great node.js project, although the project has been around for about a year now, so I've put together this short introduction to give you a taste of what node is about.
subscribe via RSS