January 2012
3 posts
Mac Quirks I shan't miss
In no particular order
“Put-back” from Trash is not available >50% of the time
Cut-paste does not exist - moving files is painful; drag-drop is no solution, since the windows dance around uncontrollably.
Needing to buy software, find hacks, or create hacks to fix these things which should work properly out-of-the-box
No Winamp alternative (cmus via homebrew comes closest)
...
1 tag
Breadth-first search
“Practice writing every day”. Sure, why not; though I think now-and-then is more achievable. I certainly need to practice.
I don’t think I will get chance to see my supervisor before heading back to the UK on Tuesday night, but was pleasantly surprised to see his name crop up in the minutes of the recent Barrelfish workshop in Cambridge. I hadn’t realised he was so...
1 tag
Thesis post #1
Still fishing around for a solid topic at the moment; waiting on mail back from supervisor and a response on the barrelfish mailing list about one of their topic’s availability. So it should be Haskell and Barrelfish or one or the other, but remains to be seen exactly what.
Yesterday’s talk with my examiner about structure, procedure etc went well. I’m confident that whatever...
December 2011
3 posts
I stopped to take a last look at my scrap heap of an apartment. Once again, life...
– Murakami, “Hard-boiled Wonderland and the End of the World”
Good news!
Today I finally met the guy who will be (fingers crossed) supervising me next semester for my masters thesis at SICS. Now to chat with my course supervisor about finding an examiner (or him doing it, as it’s in his interests), then find the relevant papers and start reverse-engineering reams and reams of C code in Barrelfish and GHC. Cool huh? Well I’m excited about it.
October 2011
7 posts
2 tags
First, understanding of information hygiene is crucial. When you choose a...
– http://falkvinge.net/2011/10/26/omgwtf-passwords-of-93000-politicians-reporters-bloggers-leaked/
3 tags
Truths are illusions which one has forgotten are illusions, worn-out metaphors...
– Friedrich Nietzsche
2 tags
3 tags
Shared test helpers for Cucumber, RSpec, Capybara
Let’s assume you’re driving Capybara in both RSpec request specs & Cucumber, for example you’re using Cucumber as a design/documentation tool, and RSpec for the more boring integration tests.
You don’t want to duplicate your click-this-click-that helpers to e.g. log_in(username, password). You may also have model state setup code which can be shared/reused.
Where...
4 tags
Distributed file coding, Ruby, binary data,...
Storage erasure codes
The fundamental idea here is to split a file into pieces, combine them with an invertible binary function to form new pieces according to some coding scheme, then
distribute the pieces across your storage nodes according to the same coding scheme.
The advantage of such a scheme over straight replication is increased fault tolerance at a reduced storage cost. The key point...
September 2011
10 posts
4 tags
I don’t know how much more emphasized step 1 of refactoring could be: don’t...
– Hamlet D’Arcy, via Steve Klabnik
2 tags
3 tags
4 tags
Git, learning or improving, there's always...
Here’s a few useful resources for learning more about git.
http://gitready.com/ looks like a really great open-source/community maintained tips & walkthrough site.
http://git-scm.com/documentation has a nice selection, and will be more complete & updated than this.
A great presentation video from one of GitHub’s founders.
A couple of nice books with free pdfs available...
5 tags
Testing element ordering with Capybara
I’m sure I did this with xpath once before, but for now it eludes me, so I went with another, simpler approach.
scenario "reordering links" do
m1, m2 = MenuItem.make, MenuItem.make
visit menu_items_path
page.all(:xpath, "//div[@id='nav']//a/text()").map(&:text).should == [m1.text, m2.text]
within :css, rails_dom_id_selector(m2) do
click '↑'
end
visit menu_items_path
...
5 tags
3 tags
XPath to test 2 child node properties
This is actually quite easy, it’s just a little different to how we normally structure code. I was expecting to use a boolean and operator, but then thought about what XPath actually does, and came up with the following solution.
(Rails, RSpec, Capybara example):
page.should have_xpath("//url/loc[.='http://www.example.com/']/../changefreq[.='weekly']")
The idea is to select some...
July 2011
1 post
7 tags
Rails / RSpec / Capybara / Selenium transactional...
The following discusses a setup quirk and work-around for RSpec request specs built with Capybara.
Scenario
You have some test code like this:
specify "clicking through to Paypal via the website" do
Configuration['Paypal Saved Button ID'] = "xxxxxxxxxx"
visit new_member_path
fill_in("member[name]", :with => "Ben")
fill_in("member[email]", :with => "bengnn@gmail.com")
...
June 2011
1 post
4 tags
Iterative design of experiment
I’ve been reading a little of D C Montgomery’s “Design and analysis of experiments” for a computer networks maths course at UPC.
Towards the end of chapter 1, which covers the hows and why of statistical methods for the design of experiments, it diverges from the usual bumph about controlled variables, response variables, replicates, etc, and starts talking about iterative...
May 2011
6 posts
3 tags
In-browser Logo interpreter (draw with turtles!) →
10 years old again, but I miss the robot that crawls around on the ground, this instant line-drawing stuff is no fun.
Start with a blank page Heroku April Fool’s Announcement Heroku Devcentre article
3 tags
Why testing distributed systems is hard
Concurrent programming models are necessarily nondeterministic, because they must interact with external agents that cause events at unpredictable times. Nondeterminism has some notable drawbacks, however: programs become significantly harder to test and reason about.
Parallel and Concurrent Programming in Haskell, Simon Marlow
You can (and should) still try and catch these situations with...
1 tag
The silence of the usual critics of “illegal”,...
– W. W., The Economist
2 tags
You can take a horse to water, but a pencil must be lead.
– Stan Laurel
1 tag
We are the sum of all our pasts
– unattr
1 tag
We’ve all had to drive the porcelain bus at some stage.
– Kevin Rudd
April 2011
10 posts
5 tags
Dirty code is code that does dirty things.
– Erlang Programming Rules
1 tag
If you smile when no one else is around, you really mean it.
– Andy Rooney
1 tag
A primary goal for the humanities and social sciences is to create better...
– Tara Brabazon, “The University of Google: Education in a (post) information age”
1 tag
Information is no longer a scarce commodity. But attention is. Why give it away...
– Rolf Dobelli, “Avoid News, Towards a Healthy News Diet”
1 tag
What the human being is best at doing is interpreting all new information so...
– Warren Buffett
1 tag
The greatest thing a human soul ever does is to see something and tell what it...
– John Ruskin, 1856.
1 tag
Universities ought to be subversive institutions
– Noam Chomsky
2 tags
Monads for functional programming - Philip Wadler →
The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating effects found in other languages, such as global state, exception handling, output, or non-determinism. Three case studies are looked at in detail: how monads ease the modification of a simple evaluator; how monads act as the basis of a datatype of arrays subject to in-place...
1 tag
Read, every day, something no one else is reading.
Think, every day, something...
– Christopher Morley
3 tags
After a lot of investigation, I finally figured out that the students had...
– Richard Feynman, “Surely You’re Joking, Mr. Feynman!”