A “list items won’t wrap” Firefox css fix!

The last few days working on the openmoney.info website, I’ve had a major hassle dealing with what appears to be a bug in the html renderer in Firefox.

The issue is that in Firefox, text in a list item won’t wrap around a right floated image; like this:

  1. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
  2. sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Code:

<ol style="border: 1px solid #cccccc; width: 300px">
  <img src="/images/eric.png" style="float: right" />
  <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit,</li>
  <li>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
  ut aliquip ex ea commodo consequat.</li>
</ol>

In Safari & Opera the text in the second list item wraps just fine. After an hour of searching the web and trying various things with clear, and in-line, I discovered that the solution was to set the list item width to 100%. In other words, list items take on the width that they start at by default! Crazy. The solution:

<ol style="border: 1px solid #cccccc; width: 300px">
  <img src="/images/eric.png" style="float: right" />
  <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit,</li>
  <li style="width:100%">sed do eiusmod tempor incididunt ut labore et
  dolore magna aliqua.  Ut enim ad minim veniam, quis nostrud exercitation
  ullamco laboris nisi ut aliquip ex ea commodo consequat.</li>
</ol>

yields nice wrapping text for the second list item:

  1. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
  2. sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

If you aren’t viewing this on Firefox, the above two may look identical. That’s the whole point!

[tags]css,firefox,list item,wrap[/tags]

down the rails rabbit hole

The last month has been quite a trip down the rabbit hole into the new reality of ruby on rails! The promise of a powerful and well designed web application framework was just too much for me to resist, so I decided to leave my own yawaf framework behind (though it has certainly served me well).

So I’m posting this entry for those just starting down this path so you can see what might be on the path ahead of you and what I did to make my way over the learning curve.

  1. I purchased both the Programming Ruby and Agile Web Development with Rails books, and read them cover to cover. Both books are good. Dave Thomas really can write a good programming book.
  2. I dove into finally wrapping my head around the REST approach, which I also knew I wanted to switch to and was part of the reason I choose rails in the first place. To this end I found this great tutorial: RESTful Rails Development which expands on and gives clarity to the REST chapters in Dave Thomas’s book.
  3. Then it was time to install the creature on my PowerBook. The instructions in Dave’s book are pretty good, but the real place to go is hivelogic
  4. Once I had rails up I got my feet wet by implementing the bare essentials of the two projects that are the reason for switching to rails: the MANA stats project and, of course, open money.
  5. Since another reason for switching to rails was to be using an open source framework that others are well familiar with, and because open money is an open source project, and I want to get it out sooner rather than later, it was time to figure out where it should live. I find source-forge unbearably ugly, and though there are some other nice FLOSS platforms (launchpad, freshmeat), I settled on rubyforge for obvious reasons. So I spent a number hours learning my way around rubyforge (an instance of gForge) and setting up the open money project there. I realized pretty quickly that rubyforge is the right place to put up the releases of the projects and I may even use their svn repositories for a while, but gForge doesn’t cut it as a project development environment.
  6. So there I was off into another tunnel of the rabbit hole, which project development tool. So many of them… I see that lots of people, including the rubyonrails folks themselves, use Trac. However, I read many accounts of how difficult it was to install and get running, plus, I really felt that I wanted my project management tool to be in rails, to thereby leverage all my learning curve. I knew also that I was going to be modifying it out the wazoo, so it didn’t make any sense to learn yet another whole system. Dittio for various php bug-trackers, etc. After more hours of research, my options were then down to three: collaboa, retrospectiva (which is a fork of collaboa), and devalot. The first two are much more feature rich. But I ended up choosing Devalot, after talking with it’s author, Peter Jones (who seems like a real great guy) mostly because it just feels better than the others, but also because I like where it’s headed.
  7. Then I started to scratch my head about how in the heck I was going to deploy these apps. Yawaf is Perl base and deployable as plain CGI and works quite well for small sites. I’ve always known that I could switch to mod_perl if traffic increased enough to warrant it. Rails is another matter. You need to start out understanding deployment.
  8. So I read all that I could find, and tagged the good stuff for your reading pleasure on delicious. Upshot for me is apache 2.2.4 + mongrel + mod_prox_balancer + monit (not mongrel_cluster). [Update, after many hassles with monit, I ended up going back to mongrel_cluster (though I may add monit in later to monitor the cluster). See this e-mail exchange on the mongrel-users mailing list for details.]
  9. Then I realized that getting this to happen on my current VPS was going to be a nightmare, because it’s a DirectAdmin box, and getting apache upgraded to 2.2.4 was hard enough, but adding mod_proxy, etc was just not going to be doable while at the same time keeping it stable with my current apps live.
  10. So, then it was deeper down the rabbit hole into investigating Rails Hosting companies! Finding a hosting company in general is a huge pain and it is so variable according to your needs. Mine are complete control, hence VPS. Upshot: the company I wanted to go with, slicehost, is only taking reservations, and can’t fulfill orders for a month. Yow. (By the way, here’s a great writeup on rails hosting, and more delicious tagging of rails hosting in general.)
  11. So, now I’ve decided to do all this installation and testing of my future deployment environment on my basement Ubuntu server until slicehost comes through, or I find something better. For Ubuntu installation I’m taking some hints from these instructions which were missing one dependency for apache to compile for me (sudo apt-get install openssl libssl-dev). You may also want to check out this peepcode screen cast for another take on how to install the rails stack onto Ubuntu using deprec. It turned
  12. Once all the components are installed, the next challenge is configuring them to work right for your particular rails app. Enter bowtie, also by Peter Jones. Though still in development, this little utility produces configuration files for apache to use mod_proxy_balancer, and also for monit to launch and keep your mongrel instances up and running.
  13. Ok, so server is up and running, and I have a basic app on my development box, now I how do I deploy to the production server. Enter capistrano. Yet another learning curve. The trick is getting your deploy.rb script right to handle all the various problems… That will wait for a future post.
  14. Then, back into coding, I’ve realized that I just have to bite the bullet and start to use all the goodies built into ruby and rails for doing test driven development. So I started doing some background reading on good TDD practices which led me to behavior driven development which of course is why I’ve been putting of using TDD for so long because it’s BDD that actually makes sense. Here’s a great article by Dave Astels on BDD in the Ruby context. And fortunately there is rspec, a great implementation of BDD that integrates well into rails. The tutorial in the rspec documentation is very good for understanding it, and here’s the tutorial I used to get started using rspec in the rails context. Which led me to another helpful post by Dave Astels.

SnapMail on Seth Godin’s Blog

So marketing blogger Seth Godin has a mention of SnapMail in the same breath as File Maker Pro on his blog. It’s nice that my humble little program is in such august company, though the context is a bit sad. What’s so odd is how SnapMail was created before the Internet was at all a house-hold word, back in 93, and it still has such a faithful following. I guess there is something valuable about having a little communication tool that’s not on the Internet! Who’da a thunk?

[tags]SnapMail[/tags]

another currency metaphor

In my on-going quest for good metaphors and ways of thinking about the community/multi-currency world, an excellent metaphor came to me that is useful when talking about all this with programmers:

federal currency = global variables
community currency = local variables

Writing software with only global variables is not impossible, but their “liquidity” (i.e. the fact that they have “value” everywhere) is not an asset, but a liability. Of course an individual variable “loses power” by not being “valuable” everywhere, but its utitlity increases by being only have value in a given context.

The whole programming concept of “scoping” applies to currency!

[tags]currency, programming, scope, community currency, local variable, global variable, money, metaphor[/tags]

Phronesis and the Internet: the Process Revolution

I learned about the Aristotelean intellectual virtue of phronesis along with the related term episteme a few years back from Kathryn Montgomery in discussions about her book How Doctors Think. Episteme is the scientific rationality we are all quite familiar with. Phronesis is usually translated “practical wisdom” and is the kind of rational skill doctors and entrepreneurs have that is based on experiential knowledge and provides the ability to take the best action in particular circumstances. We are much less likely to have thought of this as a separate kind of rational capacity.
These terms came up again recently for me in the context of a collective intelligence discussion, which really set my mind going and has led me to some propositions and a conjecture:

Proposition: Whereas the printing press was an episteme engine, the Internet is a phronesis engine.
Alternative long phrasing: The printing press and the Internet are cognitive technologies that provide people and cultures with “mechanical advantage” or leverage for the development of the Aristotelean intellectual virtues of epistome and phronesis respectively.

It’s pretty easy to see how the printing press is responsible for the massive scaling of epistome into the general culture. It’s a bit harder to see how what the Internet is doing is the same for phronesis because our first viewing of the Internet (the web at least) has been that it’s just one giant sales brochure/advertising billboard/encyclopedia/etc, i.e. that it is a global source of knowledge. My proposition is that the key thing going on with the Internet is not access to knowledge, but rather access participation in knowledge processes. Three examples:

  1. Wikipedia. What really matters about it is not that we have access to a massive knowledge font, but rather that each of us can become encyclopedists and have to face the questions of ontological classification, neutral voice, objective/subjective reality, etc, that that entails.
  2. Blogs. A word perhaps for at least three information processes moved out mass culture: journalism, publishing, political analysis. Again the key shift is not that there is all this reporting/publishing/political analysis available for our consumption, but that that each of us can become journalists/publishers/political analysts.
  3. My own online-writing workshop. People come to the site thinking that they will get reviews of their writing which will improve it. They invariably discover that reviewing the work of others is how they end up learning to improve their own writing.

In each of these cases the key thing is the shift from access to static information, to active participation in an information process. The Internet is providing a “mechanical advantage” for putting people together in a place where they can jointly engage in the kind of information processes and processing that I think leads to the developing of phronesis.

Proposition: Economic revolutions occur when aspects of production are sufficiently amplified by cognitive technologies that new economic patterns of production come into being. Example: the printing press provided the intellectual infrastructure (a culture of epistome) for the expansion of the simple tools of production during the industrial revolution into what is called Capital in the classical economic sense.

Proposition: There is a new economic revolution under way, the Process Revolution, that is the result of the amplification of information and information processing by the cognitive technology of the Internet, and which is similarly bringing new economic patterns of production into being. These patterns are a new economic factor that can be called Information (capital I), which is defined (analogously to Capital) as the data plus the patterns and processes that use that data to organize production.

Proposition: New economic factors produce competing political systems that are answers to the question: who should own the new economic factor. Example: In the industrial revolution the question was: who should own Capital and the products produced by Capital. Communism proposes common ownership in the form of the State, and Capitalism proposes ownership by individuals.

Proposition: The new economic factor of Information is likewise producing competing approaches to answer who should own it. “Ownerism” which proposes the same answer as Capitalism (ownership by individuals, natural or corporate), and “Commonism” which proposes that its ownership be held in the commons (not by the State).

Proposition: Capitalism won out against Communism for three fundamental philosophical and systemic reasons:

  1. Capitalism was better at recognizing and building on individual dignity and potential.
  2. Capitalism is essentially decentralist because it pushes the intelligence out to the edges (see David Reed & Andrew Lippman’s paper on Viral Communication for details on this idea) where local information can be used to maximum advantage in decision making.
  3. Capitalism works with, not against people’s natural self-interest.

Conjecture: Commonism will win out over Ownersim because it shares with Capitalism the same first two properties as well as another property which is analogous to the third, namely that Commonism works with Information’s natural abundance and it’s tendency to flow everywhere, whereas Ownerism has to fight tooth and nail to keep it scarce and from getting out.

I’ve put together a more detailed presentation of these ideas (including their relation to money) in the form of a paper.

simple shared state protocol

Recently it hit me that I knew of no generalized protocol for sharing the state of an abstract space among a group of computers. I did a quick google search to see if I could find anything, and after coming up dry (which doesn’t mean it doesn’t exist) I decided to slap one together to test out the many uses for this that were readily apparent to me (i.e. any application where multiple users must be able to collaboratively make changes, and become aware of changes made to that space in real time: chat, bulletin boards, network games, etc.)
Of course there is similar stuff like Croquet that certainly does an even more complicated generalized version of this, and lots of single purpose applications, like Subethaedit which must also do thisbut I haven’t found other efforts that are quite as simplistic and generalized.
So, I slapped together the beginings of a protocol as well as a ruby based server, and a RealBasic based clients for OS X and Win to test out the ideas, all of which are released under the GPL license.
[tags]collaboration,FLOSS,sharing[/tags]