<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>JonathanLeighton.com - Blog</title>
  <id>tag:jonathanleighton.com,2008:mephisto/blog</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://jonathanleighton.com/feed/blog.xml" rel="self" type="application/atom+xml"/>
  <link href="http://jonathanleighton.com/blog" rel="alternate" type="text/html"/>
  <updated>2008-01-15T23:21:11Z</updated>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2008-01-15:8006</id>
    <published>2008-01-15T23:20:00Z</published>
    <updated>2008-01-15T23:21:11Z</updated>
    <category term="Blog"/>
    <category term="date input"/>
    <category term="forms"/>
    <category term="javascript"/>
    <category term="jquery"/>
    <category term="plugin"/>
    <category term="ui"/>
    <category term="widgets"/>
    <link href="http://jonathanleighton.com/blog/jquery-date-input" rel="alternate" type="text/html"/>
    <title>jQuery Date Input</title>
<content type="html">
            &lt;p&gt;I have &lt;em&gt;finally&lt;/em&gt; managed to polish off, document, test and release a &lt;a href=&quot;http://jonathanleighton.com/projects/date-input&quot;&gt;jQuery Date Input plugin&lt;/a&gt; I initially wrote whilst at &lt;a href=&quot;http://torchbox.com/&quot;&gt;Torchbox&lt;/a&gt; last summer. It&#8217;s been a long time coming so I&#8217;m glad to have got it out the way now! Comments and feedback are much appreciated.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2008-01-13:7967</id>
    <published>2008-01-13T15:21:00Z</published>
    <updated>2008-01-20T22:11:53Z</updated>
    <category term="Blog"/>
    <category term="activism"/>
    <category term="arrest"/>
    <category term="bonn square"/>
    <category term="climate change"/>
    <category term="green"/>
    <category term="oxford"/>
    <category term="police"/>
    <category term="protest"/>
    <category term="redevelopment"/>
    <category term="trees"/>
    <link href="http://jonathanleighton.com/blog/not-just-about-trees" rel="alternate" type="text/html"/>
    <title>Not just about trees</title>
<content type="html">
            &lt;p class=&quot;right&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/turnip/2189867728/&quot; class=&quot;image-link&quot; title=&quot;View this photo on Flickr&quot;&gt;&lt;img title=&quot;A small boy smiling while standing next to a placard which read 'Trees NOT council sleaze!'&quot; src=&quot;http://farm3.static.flickr.com/2256/2189867728_026e797948_m.jpg&quot; alt=&quot;A small boy smiling while standing next to a placard which read 'Trees NOT council sleaze!'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Yesterday was an eventful day. One of the last remaining &#8220;green spaces&#8221; in Oxford city centre is &lt;a href=&quot;http://en.wikipedia.org/wiki/Bonn_Square&quot;&gt;Bonn Square&lt;/a&gt;. Unfortunately it has been neglected by the council and is currently in quite a state. So instead of making improvements, like, ooh I dunno, having someone maintain the place, the council have invested £1.5 million in &#8220;redevelopment&#8221;.&lt;/p&gt;


	&lt;p&gt;The redevelopment involves cutting down four mature trees (estimated over 100 years old) and slapping sandstone over the archaeological remains of a Georgian church and cemetery. There will be seven younger trees planted instead but it baffles me why the architects could not have designed around the existing trees (they had to design around a memorial which would obviously have more been difficult to get away with removing.)&lt;/p&gt;


	&lt;p&gt;The key point though is not simply about saving a few trees from being chopped down. The Bonn Square redevelopment is part of a much bigger plan for the &#8220;regeneration&#8221; of the west end of Oxford. Most worryingly this involves huge expansion of the Westgate Shopping Centre. The current plans necessitate the felling of many more trees, and the compulsory purchase of 18 houses for elderly and disabled people, plus a part of Oxford and Cherwell Valley College.&lt;/p&gt;


	&lt;p class=&quot;left&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/turnip/2189039983/&quot; class=&quot;image-link&quot; title=&quot;View this photo on Flickr&quot;&gt;&lt;img title=&quot;An activist talks to the public about the protest&quot; src=&quot;http://farm3.static.flickr.com/2322/2189039983_d0a4f3f7ca_m.jpg&quot; alt=&quot;An activist talks to the public about the protest&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;There is an &lt;a href=&quot;http://www.oxford.gov.uk/planning/west-end-compulsory-purchase-order.cfm&quot;&gt;ongoing public inquiry&lt;/a&gt; into the compulsory purchase order, so it is not guaranteed the development according to current plans will even happen. Despite this, the council have been felling trees for the Westgate expansion at the same time as felling the Bonn Square trees. &lt;del&gt;There has been no public consultation on the expansion&lt;/del&gt; (&lt;ins&gt;please see comments below&lt;/ins&gt;) and it fails to meet the council&#8217;s own environmental standards.&lt;/p&gt;


	&lt;p&gt;The felling of these trees has been met with fierce opposition by environmental activists, which in turn has raised the profile of the Westgate development in the public knowledge (the council hasn&#8217;t exactly been shouting from the rooftops as it tries to force people from their homes.) As the council&#8217;s intentions became clear, an initially small group of activists formed a protest, climbing trees to prevent them from being felled. Gabriel Chamberlain occupied the last remaining tree in Bonn Square on the 4th of January, and has now been living in the tree house for 10 days. Tomorrow, the 14th, a court will decide whether to grant Oxford City Council an eviction order, which may spell the end of the protest.&lt;/p&gt;


	&lt;p class=&quot;right&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/turnip/2189824930/&quot; class=&quot;image-link&quot; title=&quot;View this photo on Flickr&quot;&gt;&lt;img title=&quot;A security guard looking at the camera&quot; src=&quot;http://farm3.static.flickr.com/2101/2189824930_645bd7396e_m.jpg&quot; alt=&quot;A security guard looking at the camera&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Yesterday a number of activists gathered at Bonn Square in solidarity with Gabriel. Nobody thought it would be a particularly big event but the protest struck a chord with the people of Oxford and generated considerable interest. At one point there were apparently as many as 100 people there, including many younger people who felt strongly about what the council is trying to do to their city.&lt;/p&gt;


	&lt;p&gt;After placing solid metal fencing right around the tree, the workmen tried to extend it to surround Bonn Square entirely. In response to this protesters &lt;a href=&quot;http://www.indymedia.org.uk/en/regions/oxford/2008/01/389278.html&quot;&gt;forced their way in&lt;/a&gt; and the council apparently held an emergency meeting about health and safety concerns, resulting in the fencing being removed.&lt;/p&gt;


	&lt;p&gt;One of the biggest problems for Gabriel is that he has been effectively cut off, making it very hard to get food and most importantly water to him. This is presumably to encourage him to come down from the tree and face arrest. At about 2AM this morning a friend and I decided to try to get some supplies to Gabriel in the quiet of the night. There were still a pair of security people at Bonn Square and a pair of policemen in a car. We decided the best plan was for my friend to try to distract the security whilst I threw a bottle of water to Gabriel.&lt;/p&gt;


	&lt;p class=&quot;left&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/turnip/2189867352/&quot; class=&quot;image-link&quot; title=&quot;View this photo on Flickr&quot;&gt;&lt;img title=&quot;Gabriel poking his head out of the tree house&quot; src=&quot;http://farm3.static.flickr.com/2015/2189867352_18d6049ace_m.jpg&quot; alt=&quot;Gabriel poking his head out of the tree house&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;My throw was frankly abysmal and the water bottle fell on the ground inside the fenced off area. Perhaps Gabriel or somebody else was able to get it from the ground but I don&#8217;t know because I was very quickly arrested &#8220;on suspicion of littering&#8221;. For real. After roughly 2 hours in a cell I was released without charge; apparently something to do with the area being private property and fenced off made it an un-prosecutable offence.&lt;/p&gt;


	&lt;p&gt;As I understand it, this effectively made the arrest unlawful, but a solicitor advised me pursuing that avenue may just see me charged for something else (like public disorder). In any case I am not significantly worse off from the situation, but I do feel very angry over the principle of &#8220;arrest first, ask questions later&#8221;, where the arresting officer clearly felt the need to assert control. I may make an &lt;acronym title=&quot;Independent Police Complaints Commission&quot;&gt;IPPC&lt;/acronym&gt; complaint. &lt;ins&gt;Update: People have noted that the solicitor&#8217;s advice was dodgy. I am currently seeking legal advice from another solicitor and may take it to court. If not I will make an &lt;acronym title=&quot;Independent Police Complaints Commission&quot;&gt;IPPC&lt;/acronym&gt; complaint.&lt;/ins&gt;&lt;/p&gt;


	&lt;p&gt;Overall, I think the recent action has been extremely successful and generated significant public interest. I think we can be sure this won&#8217;t be the last protest over the council&#8217;s desire to turn Oxford into a more characterless, consumerist city.&lt;/p&gt;


	&lt;h3&gt;More information&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Oxford Indymedia &#8211; &lt;a href=&quot;http://www.indymedia.org.uk/en/regions/oxford/2008/01/389324.html&quot;&gt;They paved paradise and put up a parking lot&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Oxford City Council &#8211; &lt;a href=&quot;http://www.oxford.gov.uk/news/news.cfm/current/1/item/2627&quot;&gt;Bonn Square transformation begins&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;e-architect.co.uk &#8211; &lt;a href=&quot;http://www.e-architect.co.uk/oxford/bonn_square_oxford.htm&quot;&gt;Bonn Square Oxford, Grame Massie Architects&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Councillor Matt Sellwood &#8211; &lt;a href=&quot;http://matthewsellwood.blogspot.com/2006/10/westgate.html&quot;&gt;Westgate&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Green Party &#8211; &lt;a href=&quot;http://www.greenparty.org.uk/news/3275&quot;&gt;Oxford Green arrested as City Council defy public demand&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Oxford Mail &#8211; &lt;a href=&quot;http://www.oxfordmail.net/display.var.1961701.0.protesters_invade_oxford_square.php&quot;&gt;Protesters Invade Oxford Square&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2008-01-10:7934</id>
    <published>2008-01-10T13:47:00Z</published>
    <updated>2008-01-13T18:44:52Z</updated>
    <category term="Blog"/>
    <category term="city of london"/>
    <category term="exhibition"/>
    <category term="modern art oxford"/>
    <category term="oxford open"/>
    <category term="photography"/>
    <link href="http://jonathanleighton.com/blog/the-oxford-open" rel="alternate" type="text/html"/>
    <title>The Oxford Open</title>
<content type="html">
            &lt;p&gt;&lt;a href=&quot;http://www.modernartoxford.org.uk/&quot;&gt;Modern Art Oxford&lt;/a&gt; are running this brilliant exhibition called &lt;a href=&quot;http://www.modernartoxford.org.uk/Exhibitions/&quot;&gt;The Oxford Open&lt;/a&gt; (the private view is tomorrow and then it opens to the public on Saturday). The basic idea is that anyone who lives or works in Oxford can submit a piece of art. There is no selection committee and they accepted about 500 works, so I guess there will be a complete range. I submitted a board of 7 photos; the project was a study of people during the rush hour in the &#8220;&lt;a href=&quot;http://en.wikipedia.org/wiki/City_of_London&quot;&gt;square mile&lt;/a&gt;&#8221;. It&#8217;s all black and white film and I&#8217;ve never scanned them in so they&#8217;re not on Flickr. Let me know what you think if you go :)&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2008-01-04:7881</id>
    <published>2008-01-04T21:18:00Z</published>
    <updated>2008-01-04T21:20:03Z</updated>
    <category term="Blog"/>
    <category term="37signals"/>
    <category term="basecamp"/>
    <category term="security"/>
    <link href="http://jonathanleighton.com/blog/basecamp-security-bug-fixed" rel="alternate" type="text/html"/>
    <title>Basecamp security bug fixed</title>
<content type="html">
            &lt;p&gt;Last month I &lt;a href=&quot;http://jonathanleighton.com/blog/37signals-security&quot;&gt;blogged about&lt;/a&gt; a security bug in Basecamp which allows administrators to see all the users&#8217; passwords. Yesterday, David Heinemeier Hansson &lt;a href=&quot;http://jonathanleighton.com/blog/37signals-security#comment-7860&quot;&gt;commented&lt;/a&gt; that it has now been taken care of and fixed, which is great. It turns out I was wrong about them ignoring the issue; there was a previous, similar issue which is the one talked about on the Basecamp forums, but what I encountered was separate to that. In hindsight I should have tried to contact 37signals before ranting about it on my blog, but I guess you live and learn.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2008-01-04:7865</id>
    <published>2008-01-04T00:29:00Z</published>
    <updated>2008-01-04T00:31:58Z</updated>
    <category term="Blog"/>
    <category term="laptop"/>
    <category term="london"/>
    <category term="oxford tube"/>
    <category term="vodafone"/>
    <category term="wifi"/>
    <link href="http://jonathanleighton.com/blog/oxford-tube-wifi" rel="alternate" type="text/html"/>
    <title>The Oxford Tube - Free WiFi</title>
<content type="html">
            &lt;p&gt;I went to London on &lt;a href=&quot;http://www.oxfordtube.com/&quot;&gt;The Oxford Tube&lt;/a&gt; today and used the complementary WiFi available on the coaches. Whilst this sounds like the ultimate geek&#8217;s dream, there are a number of reasons I probably wouldn&#8217;t bother lugging my laptop around London for it again:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;It&#8217;s desperately slow as the connection comes from a Vodafone &#8220;thingy&#8221; (not sure what they could do about that as the bus doesn&#8217;t exactly stay in the same place)&lt;/li&gt;
		&lt;li&gt;They force you to fill out a little form before connecting. This includes giving them marketing info such as why you are travelling, and your email address. &lt;em&gt;Evil.&lt;/em&gt;&lt;/li&gt;
		&lt;li&gt;The connection is censored by Vodafone, which could be turned off but isn&#8217;t. &lt;em&gt;Really evil.&lt;/em&gt;&lt;/li&gt;
		&lt;li&gt;Maybe this doesn&#8217;t affect other people but I found using my laptop for any length of time whilst on a moving coach made me feel quite sick&lt;/li&gt;
	&lt;/ol&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-12-19:7602</id>
    <published>2007-12-19T20:03:00Z</published>
    <updated>2007-12-19T20:05:11Z</updated>
    <category term="Blog"/>
    <category term="activism"/>
    <category term="change"/>
    <category term="climate"/>
    <category term="climate change"/>
    <category term="global warming"/>
    <category term="mark lynas"/>
    <category term="six degrees"/>
    <link href="http://jonathanleighton.com/blog/six-degrees" rel="alternate" type="text/html"/>
    <title>Six Degrees by Mark Lynas</title>
<content type="html">
            &lt;p class=&quot;right&quot;&gt;&lt;a href=&quot;http://www.amazon.co.uk/Six-Degrees-Future-Hotter-Planet/dp/0007209045&quot; class=&quot;image-link&quot;&gt;&lt;img title=&quot;The front cover of Six Degrees&quot; src=&quot;http://jonathanleighton.com/assets/2007/12/19/six-degrees.jpg&quot; alt=&quot;The front cover of Six Degrees&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;This year my perspective on the world has changed enormously. For a number of separate reasons I&#8217;ve learnt a lot more about climate change and the problems it will create. I feel very strongly that I want to do whatever I can to help tackle climate change issues; going to the &lt;a href=&quot;http://www.climatecamp.org.uk/&quot;&gt;Camp for Climate Action&lt;/a&gt; at Heathrow this summer was a turning point for me, and I&#8217;ve been involved with other activism since.&lt;/p&gt;


	&lt;p&gt;Unfortunately, whilst there has been a huge amount of scientific research done on climate change (a lot of which gets rolled into reports by &lt;a href=&quot;http://en.wikipedia.org/wiki/IPCC&quot; title=&quot;Intergovernmental Panel of Climate Change&quot;&gt;the &lt;span class=&quot;caps&quot;&gt;IPCC&lt;/span&gt;&lt;/a&gt;), it&#8217;s often hard to get the facts in layman&#8217;s terms whilst still being able to back them up with reliable evidence. Many people are sceptical about the severity of the issue and will seize any opportunity to prove you&#8217;re talking complete rubbish (there seems to be a suspicious view that environmentalists are bent with a selfish desire to suck all comfort from modern life). For this reason, and because I wanted to understand the impacts further myself, I decided to read &lt;a href=&quot;http://www.amazon.co.uk/Six-Degrees-Future-Hotter-Planet/dp/0007209045&quot;&gt;&lt;em&gt;Six Degrees&lt;/em&gt;&lt;/a&gt; by &lt;a href=&quot;http://www.marklynas.org/&quot;&gt;Mark Lynas&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;The book is based on the idea that &lt;a href=&quot;http://en.wikipedia.org/wiki/IPCC&quot; title=&quot;Intergovernmental Panel of Climate Change&quot;&gt;the &lt;span class=&quot;caps&quot;&gt;IPCC&lt;/span&gt;&lt;/a&gt; have projected an increase of global average temperatures of up to about 6°C (the &lt;a href=&quot;http://en.wikipedia.org/wiki/IPCC_Fourth_Assessment_Report&quot;&gt;2007 Fourth Assessment Report&lt;/a&gt; projects up to 6.4°C). Unfortunately 3°C or 6°C doesn&#8217;t really &#8220;mean&#8221; much &#8211; it doesn&#8217;t tell us anything about the possible effects of such increases and some might not realise that as a global average rise, as much as 6°C would be a &lt;em&gt;massive&lt;/em&gt; change. &lt;em&gt;Six Degrees&lt;/em&gt; takes the reader through the likely outcomes if the earth were the warm by up 1-6°C, devoting a chapter to each degree rise. All the evidence comes from &lt;a href=&quot;http://en.wikipedia.org/wiki/Peer_review&quot;&gt;peer reviewed&lt;/a&gt; science publications and there is extensive referencing at the end of the book.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Six Degrees&lt;/em&gt; is well-written and easy to understand, although unfortunately sometimes a little dry; it&#8217;s definitely not light bedtime reading to set you up for happy dreams, the changes which are on the cards are frankly terrifying and although Mark often emphasises that there&#8217;s no point despairing, it&#8217;s easy to feel that way. For me though, the 7&lt;sup&gt;th&lt;/sup&gt; chapter was where it all came together &#8211; Mark does a brilliant job of putting the rest of the book into context, analysing why the problem exists in the first place and why it&#8217;s not going away either quickly or easily.&lt;/p&gt;


	&lt;p&gt;Perhaps the most important conclusion &lt;em&gt;Six Degrees&lt;/em&gt; comes to, for me, was the compelling evidence that we can&#8217;t just chuck wind turbines and energy-saving light bulbs at climate change and make it go away. The figures simply don&#8217;t add up:&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;&#8220;[Jeffrey] Dukes calculates than an average US gallon of gasoline required approximately 90 tonnes of precursor plant material in the process of its formation in ancient oceans [...] Calculated globally, human society consumes the equivalent of 400 years&#8217; worth of ancient solar energy [...] each year through our use of fossil fuels&#8221; 

&lt;p&gt;&lt;cite&gt;&lt;em&gt;Six Degrees&lt;/em&gt; by Mark Lynas, p.280&lt;/cite&gt;&lt;/p&gt;&lt;/blockquote&gt;

	&lt;p&gt;Whilst many people probably realise that energy-saving light bulbs aren&#8217;t the solution to all our problems, there is definitely a feeling that given enough research and technology the problem will cease to exist. It&#8217;s won&#8217;t. Efficiency and renewables are important, but that will only work in tandem with another policy: &lt;strong&gt;Reduction&lt;/strong&gt;. &lt;em&gt;Six Degrees&lt;/em&gt;  has an interesting analysis of the psychological reasons for the state of denial many people are in, which says a similar thing.&lt;/p&gt;


	&lt;p&gt;To conclude, if you feel in the dark about what climate change could actually mean for the world, &lt;em&gt;read this book&lt;/em&gt;. Alternatively you could forget all about this article; environmentalists are out to get you and &#8220;climate change&#8221; is an elaborate hoax, it&#8217;s not like people are dying or anything, right?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-12-14:7515</id>
    <published>2007-12-14T00:01:00Z</published>
    <updated>2008-01-04T21:20:49Z</updated>
    <category term="Blog"/>
    <category term="37signals"/>
    <category term="basecamp"/>
    <category term="password"/>
    <category term="security"/>
    <link href="http://jonathanleighton.com/blog/37signals-security" rel="alternate" type="text/html"/>
    <title>37signals don't care about the security of your password</title>
<content type="html">
            &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; This &lt;a href=&quot;http://jonathanleighton.com/blog/basecamp-security-bug-fixed&quot;&gt;has been fixed&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I have a lot of respect for &lt;a href=&quot;http://www.37signals.com/&quot;&gt;37signals&lt;/a&gt;. I think they produce some excellent software and have played a very big part in moving forward the web industry. Obviously as a Rails advocate I can&#8217;t really have any other opinion.&lt;/p&gt;


	&lt;p&gt;But. As web application users we have come to expect that if we set a password in an application, it&#8217;s not going to be freely given out to other people. The more technical of us probably expect any web application worth its salt to hash our passwords so that they can&#8217;t be freely read by a hacker. Maybe that&#8217;s naive but the fact remains that a vast majority of people will blindly trust websites with the the password they set. And a vast majority of people will use the same password across multiple sites.&lt;/p&gt;


	&lt;p&gt;Basecamp does not hash your password. Nor, in fact, is this an accident; you can see your password in plain text by clicking &#8220;My info&#8221; ⇒ &#8220;Use OpenID instead&#8221; ⇒ &#8220;Reveal my special username/password&#8221;.&lt;/p&gt;


	&lt;p&gt;&lt;img title=&quot;A screenshot of the Basecamp interface showing a user's password&quot; src=&quot;http://jonathanleighton.com/assets/2007/12/13/basecamp-password.jpg&quot; alt=&quot;A screenshot of the Basecamp interface showing a user's password&quot; /&gt;&lt;/p&gt;


	&lt;p&gt;Not only have they built this lack-of-security intentionally into the application (don&#8217;t get me wrong, this is awful, but just telling a user his own password doesn&#8217;t seem so bad), but &lt;strong&gt;they also provide your password to account administrators&lt;/strong&gt;. All an administrator has to do is click to edit a person within the account, and again, they can see anybody&#8217;s password in plain text. I am appalled.&lt;/p&gt;


	&lt;p&gt;It gets worse though. Somebody highlighted the issue on the &lt;a href=&quot;http://forum.37signals.com/basecamp/forums/1/topics/587&quot;&gt;Basecamp forums&lt;/a&gt; (that&#8217;s how I found out about it). So, you&#8217;d think they&#8217;d turn around and say something reasonable like &#8220;Oh right, yeah, it really shouldn&#8217;t do that and we&#8217;ll fix the problem &lt;span class=&quot;caps&quot;&gt;ASAP&lt;/span&gt;&#8221;. Do they? Fuck no. Instead Jason Fried from 37signals says (in &lt;em&gt;May 2007&lt;/em&gt;):&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&#8220;We do plan on changing the way the password field words [&lt;em&gt;sic&lt;/em&gt;] this year.&#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;&lt;em&gt;This fucking year!&lt;/em&gt; I&#8217;m sorry but that just doesn&#8217;t cut it. Security is not a joke and there is no point having an &lt;acronym title=&quot;Secure Sockets Layer&quot;&gt;SSL&lt;/acronym&gt; certificate if you happily toss around users&#8217; passwords with complete abandon. I certainly would no longer trust 37signals with any sensitive data and I hope those who read this will consider that too.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-10-06:6363</id>
    <published>2007-10-06T15:49:00Z</published>
    <updated>2007-10-06T15:51:59Z</updated>
    <category term="Blog"/>
    <category term="controller"/>
    <category term="metaprogramming"/>
    <category term="rails"/>
    <category term="rspec"/>
    <category term="ruby"/>
    <link href="http://jonathanleighton.com/blog/rspec-on-rails-specify-request" rel="alternate" type="text/html"/>
    <title>RSpec on Rails extension to specify the request</title>
<content type="html">
            &lt;p&gt;Very quickly: this allows you to specify the request you are testing with which makes it possible to &lt;span class=&quot;caps&quot;&gt;DRY&lt;/span&gt; up your tests by defining &#8220;example builders&#8221; (which can then be used in many different behaviours).&lt;/p&gt;


	&lt;p&gt;Like so:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;describe ArticlesController, :request =&amp;gt; { :get =&amp;gt; :show, :id =&amp;gt; 53 } do
  # This...
  it &quot;should find the article&quot; do
    Article.expects(:find).with(53)
    get &quot;show&quot;, :id =&amp;gt; 53
  end

  # Might become this...
  it &quot;should find the article&quot; do
    Article.expects(:find).with(53)
    send_request
  end

  # Which might become this...
  it_should_find :article
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Grab the code from: &lt;a href=&quot;http://pastie.caboo.se/101764&quot;&gt;http://pastie.caboo.se/101764&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Chuck in your 2 whatever on the &lt;a href=&quot;http://rubyforge.org/tracker/?func=detail&amp;amp;#38;atid=3152&amp;amp;#38;aid=14304&amp;amp;#38;group_id=797&quot;&gt;RSpec issue tracker&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-09-24:6263</id>
    <published>2007-09-24T19:42:00Z</published>
    <updated>2007-09-24T19:44:26Z</updated>
    <category term="Blog"/>
    <category term="delegate"/>
    <category term="delegation"/>
    <category term="law of demeter"/>
    <category term="principal of least surprise"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://jonathanleighton.com/blog/rails-delegate-default-option" rel="alternate" type="text/html"/>
    <title>Default option for Rails' delegate method</title>
<content type="html">
            &lt;p&gt;Rails contains a handy shortcut for adhering to &lt;a href=&quot;http://en.wikipedia.org/wiki/Law_Of_Demeter&quot;&gt;The Principle of Least Knowledge&lt;/a&gt;. If your &lt;code&gt;Person&lt;/code&gt; class has an address, and you want to get the person&#8217;s country, you can delegate it like so:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class Person &amp;lt; ActiveRecord::Base
  ...
  delegate :country, :to =&amp;gt; :address
  ...
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This is all well and good if you can be sure that there will always be an address for any given person. If address is nil and country is called, however, an exception will be raised (because &lt;code&gt;nil.country&lt;/code&gt; is undefined).&lt;/p&gt;


	&lt;p&gt;Sometimes it&#8217;s helpful to be able to specify a default value, so I extended the &lt;code&gt;delegate&lt;/code&gt; method to allow you to write:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class Person &amp;lt; ActiveRecord::Base
  ...
  delegate :country, :to =&amp;gt; :address, :default =&amp;gt; &quot;United Kingdom&quot; 
  ...
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;A word of caution however: use this with restraint. In general, default values should be stored in the database, not in your code. A next step for this might be for &lt;code&gt;delegate&lt;/code&gt; to be association-aware, so that it can look up defaults from the database automatically when it encounters a nil object.&lt;/p&gt;


	&lt;p&gt;Here&#8217;s the code (mostly based on the current Rails implementation):&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class Module
  def delegate(*methods)
    options = methods.pop
    unless options.is_a?(Hash) &#38;&#38; to = options[:to]
      raise ArgumentError, &quot;Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, :to =&amp;gt; :greeter).&quot; 
    end

    methods.each do |method|
      if options.has_key? :default
        code = &quot;(#{to} &#38;&#38; #{to}.__send__(#{method.inspect}, *args, &#38;block)) || #{options[:default].inspect}&quot; 
      else
        code = &quot;#{to}.__send__(#{method.inspect}, *args, &#38;block)&quot; 
      end

      module_eval(&amp;lt;&amp;lt;-EOS, &quot;(__DELEGATION__)&quot;, 1)
        def #{method}(*args, &#38;block)
          #{code}
        end
      EOS
    end
  end
end&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-07-12:4046</id>
    <published>2007-07-12T19:42:00Z</published>
    <updated>2007-07-13T08:52:54Z</updated>
    <category term="Blog"/>
    <category term="bug"/>
    <category term="css"/>
    <category term="firefox"/>
    <category term="flash"/>
    <category term="z-index"/>
    <link href="http://jonathanleighton.com/blog/flash-z-index-bug-firefox" rel="alternate" type="text/html"/>
    <title>Flash z-index bug in Firefox</title>
<content type="html">
            &lt;p&gt;Today I needed to make a drop-down menu work over a page which had flash content. I searched around a bit and quickly came up with &lt;a href=&quot;http://joshuaink2006.johnoxton.co.uk/blog/82/flash-content-and-z-index&quot; title=&quot;Joshuaink: Flash content and z-index&quot;&gt;John Oxton&#8217;s post on how to do that&lt;/a&gt;. So I stuck in the &lt;code&gt;wmode&lt;/code&gt; parameter and leaned back in my chair as I tapped &amp;lt;btn&gt;F5&amp;lt;/btn&gt;. Except it didn&#8217;t actually work. Hmmm.&lt;/p&gt;


	&lt;p&gt;To cut a long story short, after much head-banging of the frustration rather than heavy metal variety, I discovered this was due to a bug in Firefox. Basically, if you have absolutely positioned elements inside an element which has &lt;code&gt;overflow: hidden&lt;/code&gt;, the absolutely positioned elements will not appear over the flash content, regardless of &lt;code&gt;z-index&lt;/code&gt;. The solution is, of course, to set &lt;code&gt;overflow&lt;/code&gt; to &lt;code&gt;visible&lt;/code&gt; and find another way to do what you were trying to achieve with &lt;code&gt;hidden&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;/assets/2007/7/12/flash-z-index.html&quot;&gt;Here is a test for this bug&lt;/a&gt;. I have verified that this affects Firefox on Windows and doesn&#8217;t affect &lt;abbr title=&quot;Internet Explorer&quot;&gt;IE&lt;/abbr&gt;. Flash z-index doesn&#8217;t work on Firefox/Linux whatever you do because &lt;code&gt;wmode&lt;/code&gt; isn&#8217;t supported on that platform yet. I don&#8217;t know how Firefox/Mac is affected &#8211; if anyone wants to let me know in the comments that would be great.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-07-08:4000</id>
    <published>2007-07-08T22:30:00Z</published>
    <updated>2007-07-08T22:32:15Z</updated>
    <category term="Blog"/>
    <category term="cheesy"/>
    <category term="cringe"/>
    <category term="google"/>
    <category term="google maps"/>
    <category term="maps"/>
    <link href="http://jonathanleighton.com/blog/customise-route-google-maps" rel="alternate" type="text/html"/>
    <title>Customise your route on Google Maps</title>
<content type="html">
            &lt;p&gt;Google Maps have recently rolled out a new feature which basically allows you to drag and drop the route to change it in any way you want. This is really useful and cool but &lt;a href=&quot;http://maps.google.com/help/maps/directions/index.html&quot;&gt;the video&lt;/a&gt; they&#8217;ve put up is fantastically cheesy. Makes me want to cringe, especially the &#8220;look at each other, turn, smile, wave and &#8216;bye&#8217;&#8221; at the end!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-06-18:3842</id>
    <published>2007-06-18T16:08:00Z</published>
    <updated>2007-06-18T16:11:11Z</updated>
    <category term="Blog"/>
    <category term="ruby"/>
    <category term="singleton"/>
    <category term="singleton pattern"/>
    <category term="testing"/>
    <link href="http://jonathanleighton.com/blog/testing-singleton-classes" rel="alternate" type="text/html"/>
    <title>Testing Singleton classes</title>
<content type="html">
            &lt;p&gt;Testing &lt;a href=&quot;http://en.wikipedia.org/wiki/Singleton_pattern&quot;&gt;Singleton classes&lt;/a&gt; can be a bit of a problem. The fundamental idea of a Singleton is that a class should have one and only one instance. However, one of the fundamental principles of testing is that tests should be atomic &#8211; you create a new instance of the object being tested before running each test.&lt;/p&gt;


	&lt;p&gt;As you can imagine, this kinda sorta totally doesn&#8217;t work out.&lt;/p&gt;


	&lt;p&gt;Fortunately the &lt;code&gt;Singleton&lt;/code&gt; module in Ruby&#8217;s standard library provides a fairly easy way out of this. If you were testing a &lt;code&gt;RemoteControl&lt;/code&gt; class, you could &#8220;reset&#8221; the Singleton instance like so:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;Singleton.__init__(RemoteControl)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Simply place that in your teardown method and you&#8217;re sorted: you still get the security of only having one instance of &lt;code&gt;RemoteControl&lt;/code&gt;, but the slate is wiped clean after each test.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-06-15:3813</id>
    <published>2007-06-15T16:45:00Z</published>
    <updated>2007-06-15T16:47:22Z</updated>
    <category term="Blog"/>
    <category term="juliet"/>
    <category term="photography"/>
    <category term="romeo"/>
    <category term="romeo and juliet"/>
    <category term="shakespeare"/>
    <link href="http://jonathanleighton.com/blog/photography-romeo-juliet" rel="alternate" type="text/html"/>
    <title>Photography - Romeo &amp;amp; Juliet</title>
<content type="html">
            &lt;p class=&quot;left&quot;&gt;&lt;img src=&quot;http://jonathanleighton.com/assets/2007/6/15/romeo_and_juliet.jpg&quot; alt=&quot;Romeo, about to drink the poison&quot;&gt;&lt;/p&gt;

	&lt;p&gt;I&#8217;ve uploaded the final prints of a college project I did on Romeo &#38; Juliet. They are available &lt;a href=&quot;http://www.flickr.com/photos/turnip/sets/72157600365330381/&quot;&gt;on Flickr&lt;/a&gt;. It&#8217;s not the best way to experience them &#8211; one day I may even get round to doing the &#8220;Photography&#8221; section of this site and my projects will all get their own little dedicated pages. But for now, enjoy.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-06-11:3780</id>
    <published>2007-06-11T21:15:00Z</published>
    <updated>2007-06-11T21:19:04Z</updated>
    <category term="Blog"/>
    <category term="plugin"/>
    <category term="project"/>
    <category term="project manager"/>
    <category term="text editor"/>
    <category term="wishful thinking"/>
    <link href="http://jonathanleighton.com/blog/text-editor-perfect-project-manager" rel="alternate" type="text/html"/>
    <title>My perfect project management plugin for a text editor would do the following</title>
<content type="html">
            &lt;ul&gt;
	&lt;li&gt;Allow me to define the directory the project is contained in&lt;/li&gt;
		&lt;li&gt;Not worry about files outside that directory; if I want them in the project I will move them into that directory&lt;/li&gt;
		&lt;li&gt;Sync its list of files/directories with the filesystem &#8211; the two are one and the same and do not need to be managed separately&lt;/li&gt;
		&lt;li&gt;Not require me to specify where the &#8220;project file&#8221; should be stored. I don&#8217;t care.&lt;/li&gt;
		&lt;li&gt;Remember the files I currently have open&lt;/li&gt;
		&lt;li&gt;Bring me immediately back to where I left off when I start the editor, unless I start it to edit a file outside of the current project, in which case no project should be opened&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;That can be pretty much boiled down to:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;A &#8220;project&#8221; is a directory&lt;/li&gt;
		&lt;li&gt;Remember what I was doing&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I have yet to find this elusive beast&#8230;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://jonathanleighton.com/">
    <author>
      <name>Jon</name>
    </author>
    <id>tag:jonathanleighton.com,2007-06-06:3748</id>
    <published>2007-06-06T13:53:00Z</published>
    <updated>2007-06-06T13:57:47Z</updated>
    <category term="Blog"/>
    <category term="hornet"/>
    <category term="insects"/>
    <category term="photo"/>
    <category term="photography"/>
    <category term="wasp"/>
    <link href="http://jonathanleighton.com/blog/visited-by-a-hornet" rel="alternate" type="text/html"/>
    <title>Visited by a hornet</title>
<content type="html">
            &lt;p&gt;There I was, minding my own business when a &lt;a href=&quot;http://en.wikipedia.org/wiki/European_Hornet&quot;&gt;hornet&lt;/a&gt; decided to fly into my room. So of course I did what every photography enthusiast would do &#8211; caught it in a beer glass and took pictures! Unfortunately I don&#8217;t have a macro lens though so there was a limit to how close I could get.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/turnip/533122512/&quot; class=&quot;image-link&quot; title=&quot;Photo Sharing&quot;&gt;&lt;img src=&quot;http://farm2.static.flickr.com/1255/533122512_44a0996359.jpg&quot; height=&quot;333&quot; alt=&quot;Hornet&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;By measuring the beer glass (approximately 6cm diameter) and looking at the photo I think it was approximately 3.5cm long which according to &lt;a href=&quot;http://en.wikipedia.org/wiki/European_Hornet&quot;&gt;Wikipedia&lt;/a&gt; means it may have been a queen &#8211; it was definitely a female as the abdomen clearly has six segments.&lt;/p&gt;


	&lt;p&gt;While this critter looks like quite a mean mo-fo, hornet&#8217;s are apparently much less aggressive than their smaller relatives like wasps, and their sting is comparable (Europeans, that is &#8211; &lt;a href=&quot;http://en.wikipedia.org/wiki/Vespa_mandarinia&quot;&gt;Asian hornets&lt;/a&gt; are much scarier).&lt;/p&gt;
          </content>  </entry>
</feed>
