" /> Bill de hÓra: July 2006 Archives

« June 2006 | Main | August 2006 »

July 31, 2006

Top 5 Bozo Bit Phrases in Email

Dare Obsanjo: "Top 5 Bozo Bit Phrases in Email - What are yours?"

1: "It seems..." - Accusation. Translation: I think you are wrong, but I lack the conviction to speak plainly. To obtain plausible deniability, I'll qualify myself from the outset. Variant form - "I'm surprised"

2: "Hmm." - Grandstanding. Translation: you are wrong and I am going to counter your point; yes, I am thinking about this issue very deeply, clearly much more deeply that you are. Variant form - 'Um'.

3: "Erm."- Indirect ad hominem. You're wrong or a fool, but I don't have the guts to tell you straight up, so I'll pretend to be puzzled by what you're saying. Variant form - "huh?".

4: "Is there a problem..." - Fire and motion. Translation: I'm putting you on the backfoot on this one by framing an accusation as an innocuous question; I don't really care about a solution, as long as you're tied up framing a response.

5: A long cc list. Premptive escalation. Translation: I'm politicizing this mail by enlisting people who can or might affect your perception of what the undesirable outcome might be unless I get what I want.

Obsanjo focused on buzzwords. The above I find more general to the medium of email. Another one would be any expression of "concern", but that's not particular to email.

July 30, 2006

link_to '(delete)' {:action => 'delete', :id => recipe.id}


    <% @recipes.each do |recipe| %>
        <%= link_to recipe.title, 
                    :action => "show", 
                    :id => recipe.id %>,
        <font size=-1>
        <%= link_to "(delete)", 
                    {:action => "delete", :id => recipe.id}
                    :confirm => "Really delete #{recipe.title}?" %>
        <td><%= recipe.category.name %></td>
        <td><%= recipe.date %></td>
    <% end %>

I know it's a tutorial (otherwise a good one) but that's pretty bad. Destruction over GET is a worst practice. Assuming that isn't idiomatic Rails any more, an update to that article that uses a POST form would be much appreciated. It's Rails, it'll take 5 minutes - right?

Update: not even five minutes! Anthony Eden say to add ":post =>true" on the action.

    <% @recipes.each do |recipe| %>
        <%= link_to recipe.title, 
                    :action => "show", 
                    :id => recipe.id %>
        <font size=-1>
        <%= link_to "(delete)", 
                    {:action => "delete", :id => recipe.id}, ,:post =>true
                    :confirm => "Really delete #{recipe.title}?" %>
        <td><%= recipe.category.name %></td>
        <td><%= recipe.date %></td>
    <% end %>


That nobody else could do

Obie: "I really don't think Seaside poses serious competition to any of the major web frameworks. Too much voodoo.."

Obie is probabaly right, but Voodoo is all relative, isn't it? That's more or less what a Struts person might say looking at Rails - "too much voodoo". There might well be a lot of voodoo in Seaside, but show me another framework that can support what dabbledb does. I think Zope/CMF could do it, but not Rails, not until the RDBMS dependency is thrown out and a generic model/dsl for content is supplied in its place. If that's voodoo, so be it.

I think the difference between Seaside and say Rails (or Django), is that Rails provides what Obie once called "Productivity Arbitrage" - the ability to do something you're already doing, at a drastically lower cost or improved rate thereby changing market dynamics - typically by introducing a new efficiency that reduces the overall value of the market but increases your absolute income from that or a related market. Whereas Seaside makes new markets possible. Rails is like a Jacquard loom, Seaside is like a horseless carriage. You need both types of innovation.

Django 0.95


Adrian Holovaty: "We're pleased to introduce Django release 0.95, a formal packaging of all of the significant advances in Django development since the 0.91 release in January 2006.". Some highlights:

  • Hooks for custom authentication
  • Optional modules decoupled 1 - they've always been optional, but up to now you had to build their tables.
  • Optional modules decoupled 2 - you can use stuff like django templates outside Django.
  • Use Django without a database - goods news for people like me, Tim Bray and the other 6 non-XML people in the world who think dbs are optional ;)
  • Database transactions

Full release notes are on djangoproject.com.

The main takeaway from this release is that the Model and DB APIs are crystallising fast - there will be some changes, but nothing like what's been going on in the last 12 months. That's good news for people who are considering deploying on Django or looking at it for production use, and 0.95 is definitely what to look at. If you are looking at Django and are put off by the "0.9" status - please don't be - it's in very good shape.

The rest of the post are my personal notes on what's improved since magic-removal was merged into the main line last spring:

No more magic imports

Old code:

   from django.models.website import newsentrys

Note how the module (your webapp) is imported via django.models and not your webapp's namespace. There's some serious meta-reflection type stuff going on there. It's cool stuff, but here's the problem - "newsentrys" is the name of the db table, not your object. That was entirely functional but seriously leaky.

New code:

  from website.content.models import NewsEntry

For that alone, upgrading is worth it.

Less framework cruft

Django never added much extraneous matter to your app code, and 0.95 trims it further. There are four python files to a site setup and each app is created with three files (both counts including _init_.py). It's really, really clean.

Cleaned up accessors

Old code:
   news_list = newsentrys.get_list(order_by=['-pub_date'], limit=5)

In fairness this keyword args style is a super flexible means of declaring criteria for view code. The thing is, we're not really dealing with the application models, we're accessing database rows with Python funny talk instead of SQL.

New code:

  news_list = NewsEntry.objects.all().order_by('-pub_date')

What's nice about this is that it's become about a thousand times easier to plug non db backends transparently into the API, or support multiple databases. This can act as a facade around Sparta for example; or ZODB. It means in the real world where you have to integrate with something other than your model's immediate tables, Django will have better support for that. Finally, the latter form is more readable - read both out loud and see for yourself. [If you don't think reading code out loud is important, don't try to debug code over the phone ;)]

Cleaned up Admin code

Admin code in your model is cleaner, there's less use of ((tuples,),).

Generic views

Jeff Croft sells this better than I ever could - generic views have lots of awesome points for people who want to build websites and not be programmers. Folks like Jeff are building home rolled weblogs almost entirely off the back of generic views. I'm thinking that they could be used to support the edit/introspection URLs we need for Atom Publishing Protocol. Every object in your webapp could be out of the box remote editable using APP aware clients, via generic views. Another upside to generic views is that they give you clean and stable URLs by default - most frameworks make you work for that, some go further and ensure you will have ropey URLs, unless you do an endrun around the framework.

No template name munging

No more magic file file extensions - 'news/index' in the code is no longer found at 'news/index.html' on the file system. It's a little thing, and other frameworks (Struts, Plone) do this, but I've never liked it, so I'm glad to see it gone. As of 0.95, when you have a "site-base.html" template, instead of declaring this:

  {% extends "site-base" %}

You say this:
  {% extends "site-base.html" %}

Not so good

RSS APIs. I've found the RSS APIs a tad awkward to extend, for example I had to patch to get proper atom support, you shouldn't need to do that. I think that's because the way the API works is you inject parameter values into a serialiser instead of pulling at it - if the field targets aren't there in the default data structure it gets tricky. I'm inclined to think that templates are a better way to generate feeds until this is reworked, but it's fair to say with my involvement in Atom, I'm prone to getting hung up on feed minutae. For most folks the inbuilt support will be just fine - at least Django actually has a way to emit RSS, which puts it way ahead of most frameworks.

Model Inheritence and One to One relationships. You can't subclass models and the committers have been warning us that one to one relations are going to change at some point. These are being actively developed, and didn't make it into 0.95.

Unicode and localisation. "Unicode Inside" is more or less there, kind of sort of, but it's inconsistent and you can get mildly bitten. Django is an internationalised framework, and localisation (l10n) for Django has grown well beyond Welsh at this stage, but, the .po files are not consistently generated or kept up to date, so some locales will pop up English strings now and then. I doubt the Django team will deal head on with l10n until after 1.0 when a freeze on strings might be reasonable. Every change in the code that alters or adds a user visible string affects the locale files which are just over 30 at the time of writing - that's the price of supporting internationalisation. Django builds a single .po file per locale for the core frame work and all contrib modules - true to its full-stack nature locale files are not broken out by module.

links for 2006-07-30

July 29, 2006

Moving from CVS to SVN at java.net

Matt Raible: "It's costing $750 to convert AppFuse from CVS to SVN"

Ouch. I wonder how much of that money gets kicked back to the authors of cvs2svn. Even at sourceforge you can get at the tarball of the CVS repo, which you can convert with cvs2svn on your own dime. Heck, it cost me less than that to get a lifetime account with Textdrive, where you can run your own cvs and svn repositories. With policies like that, java.net doesn't seem to have much of a future in OSS hosting, given subversion is likely to go mainstream next year.

Data is the new lockin. And if you can't move it, it's not your data.

links for 2006-07-29

July 27, 2006

Learning To Fly

learning to fly
Originally uploaded by bdehora.


Dion Almaer:

"I really want readable URLs that have meaning. URLs are the gateway to the content. If your users can guess things based on urls then you have won (or you may have lost if your usability is so bad that the user needs to guess urls ;). [...] If the dropdown is just lots of /article/XXXXX that will not help me at all."

[You can find that post at this URL: http://www.almaer.com/blog/archives/001220.html.]

The issue here isn't really what URLs look like, though that's important; it's how stable the URLs are. The problem with exposing any kind of synthetic database key is, come the day you have to reconstitute your database, or partition the data, or whatever, all your content URLs are subject to change.

magna carta

[You can find that image at this URL: http://www.flickr.com/photos/dehora/199870588/.]

The URLs don't always have to be readable to be good: Flickr uses hashes in its URLs which is just fine, as is Amazon's use of ISBN/ASIN numbers. When working with the number of resources they do, I'm reminded of what David Gelterner said: "If you have three pet dogs, give them names. If you have 10000 head of cattle, don't bother."

[You can find that quote at this URL: http://www.edge.org/documents/archive/edge70.html. It's about 40 internet years old.]

links for 2006-07-27

July 26, 2006

Fear wants to be free

Kent Beck:

"And here was the astonishing part. Here is own of the most devisive topics you can imagine, being discussed in electronic form. We've all used that excuse - "well if this was face to face I wouldn't be such a jerk". So here's this discussion going... intense topic, intense discussion, and, nobody was tryint to hurt anybody. Somehow the people involved in the discussion, had sense of comfort about their own selves and their own positions, and didn't need to take it out of anybody else's hide."

What you can't say

Greg Luck: "I get the feeling that everyone needs a next big thing, and if there is not one, they create it."

It's not as bad as all that. I guess if you wind up enough Java people, you can expect one to push back hard. The Unicode in Ruby would be nice tho' - we expect great things from Tim Bray.

July 22, 2006

links for 2006-07-22

July 21, 2006

links for 2006-07-21

July 20, 2006

links for 2006-07-20

July 19, 2006

plone.org gets a facelift

Originally uploaded by bdehora.
Now that's *much* better: plone.org

If you're looking at it in IE; there's a content block in the middle of the page you might not be able to see. It looks like this:

links for 2006-07-19

July 13, 2006

links for 2006-07-13

July 12, 2006

Hands up who's not in Ops

Werner Vogels: "There is no separate operations department at Amazon: you build it; you run it."

links for 2006-07-12

July 10, 2006


Steve Loughran: "I felt operations were a barrier on a small project, let alone a big one, because once you have a split between dev and deployment, you have problems. "

Dave Thomas: "In the real world we have this split, we have developers responsible for applications and we have a totally separate part of the organisation that's responsible for administering the application, for making things work. And I hate to say it, but that really is the way it should be."

My money's on Loughran. Web apps, grids, service oriention, are all about continuous deployment. Anyone remember the J2EE Deployer role?

July 06, 2006


[This is a test for the benefit of the APP WG.]

links for 2006-07-06

July 05, 2006

Strategic glue for a planet

Steve Loughran: "Ant has more tests than the entire specification suite of SOAP, WS-A, WS-RF, even WSDL (I think). And that is just a build tool, not the strategic glue for a planet."

via Patrick Logan

links for 2006-07-05

July 04, 2006

links for 2006-07-04

July 02, 2006

Switch Block

What does Ubuntu have that covers these off?

  • w.bloggar
  • feeddemon
  • freemind (update: maybe)
  • visio (as clumsy as visio is, dia isn't at the races)
  • word screen split (this is what stops me from using Oo all the time)
  • snagit
  • tortoisesvn (update: if you'll use gnome/nautilus)
  • pwsafe (update: Gorrila)
  • fiddler
  • copernic
  • wireless (I keep hearing about "kernels" and "drivers")

On the upside because the second tool I install on a new windows box after winzip is cygwin, I have had a nix style home folder under version control since forever.

That said, unlike Mark Pilgrim, very little of my data that I care about is tied into an OS, getting locked in doesn't worry me. I also amn't pathologically or morally adverse to Windows desktop (servers are another matter). And windows on laptops Just Works.

And look at what I get anyway:

  • Emacs 21
  • UltraEdit
  • Bash
  • WinSCP
  • Winamp
  • WingIDE
  • Gaim
  • Java (and everything that runs on it)
  • Python (and Django, and 4Suite, and...)
  • Ruby (and Rails, and there isn't an and)
  • RealVNC
  • Apache
  • MySQL
  • IDEA (it's an IDE dammit)
  • Eclipse (it's a platform dammit)*
  • ...and tons of stuff I don't have on the top of my head

No, the real problem is having to much to do. I haven't had the time to switch; at any point the last 2 years thinking about a switch would be a bad joke**. Switching would mean taking time off work as far as I can tell, or running 2 machines to move gradually, and I haven't figured out what the opportunity is versus the cost of getting up back up to speed on Ubuntu. Put it this way - if I can't get down to the Burlo to hang out in the bar with Steve Loughran, I don't have time to change OSes.

* I can't remember who asked me, but yes, I probably would try to develop Eclipse plugins in IDEA.

** unless there was some significant opportunity to offset switching costs. Short of getting a new box, I don't see it.