Search Results: "bod"

3 March 2008

Raphaël Hertzog: This time of the year again

Yes, it’s DPL election time again. On the good side, we’ll spend less time this year than we used to thanks the constitution change. On the bad side, it seems that almost nobody is interested to run for DPL (even HE is not sure yet!). I’ve been relatively satisfied by the work done by sam (although one can always do better) and it looks like many share this feeling… and when this is the case, we just expect the DPL to run again. But sam clearly said that he won’t run again. What a pity. I also don’t plan to run this year[1] but I’m always interested in leadership issues and I’d gladly be part of a DPL team. Hopefully someone will provide such an alternative on the ballot this year. Right now, I’m more in the mood of implementing some real changes (like the symbol based dependencies that I added to dpkg-shlibdeps) instead of trying to convince others to do them. When you associate this to some support of the leadership in place, it can give very good results. Now back to real work, I still have to test and polish the dpkg-source rewrite which adds support of several brand new source package formats. Feel free to check out our progress in the sourcev3 git branch. [1] Feel free to convince me otherwise by adding some comments here. Partagez cet article / Share This

2 March 2008

Jan Wagner: 10th Chemnitz Linux Days

Like Meike already told, it was a nice event, like always. IMHO it’s based on the good balance of community and a small amount of business booth and of course the visitors.
This year we was apart the Sidux Project. Didn’t heared about (much) before, but their slogan is Hot & Spicy! Maybe ‘hot’, cause it’s based on Debian unstable. Hopefully you won’t get tears if it’s too spicy. Anyways … if you want, you could take a look. My opinion is, this would be a good case for a Custom Debian Distribution, if there would be a requirement for it. But he.. everybody is free to do, what ever he want, if nobody else is restricted.
The talks I attended was in most cases excellent, some of them was funny … only one of them did really suck. Desktop Virtualision … after the talk, my question if there could anything else virtualized then the OS from Redmond, was answered with ‘Unfortunetly only XP’ … how lovely!

Steve Kemp: And time keeps dragging on

So, as I previously mentioned I want to be able to tag messages in Mutt. There exist folder-based solutions already, using the X-Label header. There doesn't appear to be any existing solution allowing you to view all messages with a given tag across mailboxes. So I wrote a simple shell script to create virtual mailboxes, such as ~/Maildir/tags-debian for all messages with a debian tag, using hardlinks. My conclusion is that this solution will not work properly in practise, primarily because of deficiencies in mutt. The simple case works just fine. I add a tag to a message, and later when the indexing job runs the virtual folder is created. I can open it and work on it just fine. So where's the problem? Well in my case I tend to tag messages with a label such as "todo". Once I've done whatever I was supposed to I can remove the tag. Using this hardlinking scheme I cannot remove the tag(s) in the virtual folder - I have to remove it in the original message which is a real pain. Why? Well quite simply mutt will not let me work on my virtual message without destroying the hardlink.. If I use the edit function, for example, I am presented with a copy of the mail for editing - and the hardlink is replaced when that copy is saved. Even the edit-label patch which allows you to edit the X-Label header from within mutt ends up replacing the hardlink with a new file! So whats the solution? Well I guess I want to be able to run an external command against a message in mutt - passing the filename of the Maildir message as an argument. That way I can edit the live file. Right now I don't believe that is possible, but I'd love to be told different. If anybody has any solutions of editing, or even just deleting, a header from a message within mutt - in such a way that the hardlink isn't destroyed please do let me know. Simple reproducer:
mkdir -p ~/Maildir/.foo/cur
mkdir    ~/Maildir/.foo/new
mkdir    ~/Maildir/.foo/tmp
cp 'validmessage' ~/Maildir/
ln validmessage ~/Maildir/.foo/cur
Now edit the message - start mutt open the message in the index and press 'e' - the hardlink is now gone. Replaced by a new file with the contents, so the original mail message is unchanged. Update: I've got an "edit-inplace" primitive working, via the very hacky header-fu patch. It is not complete, but it demonstrates that it can be done. My world is now complete.

1 March 2008

Steve Kemp: Where troubles melt like lemon drops

I've been re-reading RFC 2822 again over the weekend, for obvious reasons, and I'm amused I've not noticed this section in the past:
3.6.5. Informational fields
The informational fields are all optional. The "Keywords:" field contains a comma-separated list of one or more words or quoted-strings. The "Subject:" and "Comments:" fields are unstructured fields as defined in section 2.2.1, and therefore may contain text or folding white space.
subject  = "Subject:" unstructured CRLF
comments = "Comments:" unstructured CRLF
keywords = "Keywords:" phrase *("," phrase) CRLF
Now we all know that emails have subjects, but how many people have ever used the Keywords: header, or the Comments: one? It'd be nice if we could use these fields in mails - I can immediately think of "keywords" as tags, and I'm sure I'm not alone. I've looked at multiple "tags for mutt" systems, but all of them fall down for the same reason. I can add tags to a mail, and limit a folder to those mails that contain a given tag. But I cannot do that for multiple folders and that makes them useless :( Has anybody worked on a multi-folder tag system for Mutt? If so pointers welcome. If not I'd be tempted to create one. I guess implementation would be very simple. There are three caeses: The first two are easy. The second could be done by writing a cronjob to scan messages for Keyword: headers, and writing a simple index. That could then be used to populate an "~/Maildir/.tag-results" folder, via hardlinks, of all matching messages. Better yet you could pre-populate ~/Maildir/.tag-$foo containing each message with a given tag. Then theres no searching required! (Although your cronjob would need to run often enough when the tag were added to a message it would appear there within a reasonable timeframe. Update: I've written the indexer now. It works pretty quickly after the initial run, and is quite neat! tagging messages with mutt.

Christian Perrier: ITP madness

I'm just back for 45 minutes during this week-end and seeing the ITP madness that currently floods -devel, I'm just getting mad about it. Debian seems to become crazy: we get people popping up and intending to package tons of varous things while dozens of our key packages are rotting in the BTS with bugs piling up over dust because they need new blod to clean them up and keep them alive. Please wake up: what about *maintaining* what we have right now instead of packaging the 42th lightweight HTTP daemon written in <insert obscure programming language name here> while everybody setting up a webserver just installs Apache? :-) PS: I knew I shouldn't have read mail...:-)

29 February 2008

Ben Armstrong: Using wiki.debian.org for project management

From the start of the DebianEeePC project, we have used a combination of the irc channel and our wiki site to our great advantage. The DebianEeePC/HowTo/Install document has been actively maintained as we go, serving not only as a good reference for new users, but also for existing users and developers to see where improvements are being made and what is left to work out. Recently, we’ve started using the wiki for task management as well. Patterned after DebianInstaller/Bugs, we now have DebianEeePC/Bugs where we link to reports on the BTS for packages we maintain and our own usertags on packages we don’t maintain. As well, we are keeping a DebianEeePC/Todo to manage our tasks. I see from a search through the wiki that lots of other Debian subprojects keep Todo lists, but most of them have little more structure than point-form lists. A few, though, have structured these pages a bit more carefully. For instance, some of these use tables listing who each task is assigned to, when it was assigned, and when it is completed. Our point-form list is a bit more free-form regarding task assignments. Participants can register their interest in a given task and what they are doing as a subpoint of the task. As for state changes over time, we rely on the revision history on “info” page for people to be able to see state changes for particular Todo items. When something is done, it just gets dropped from the list. I haven’t exhaustively reviewed everyone’s Todo page, but from my brief survey I haven’t seen a couple of things I’ve added to try to help people choose what to do next. The first is to tag items with six difficulty/importance pairs, rating each actionable item from Easy/Urgent to Hard/Wishlist. The second is to state dependencies between items using anchors. It would be nice to see any of you are doing something similar and hear about whether it has worked out well for you. I’m happy with how the irc/wiki combination has helped with project management. In the past with a different project I’ve made an abortive attempt to use the task management system at Alioth, but it just seemed too cumbersome and nobody ended up using it. With the wiki, it appears barriers to participation in task management are sufficiently lowered that everyone is willing to help keep it up. And with irc, we can keep on top of defining and assigning (or more usually volunteering to do) various tasks, and making sure the wiki is kept completely up to date. It takes a bit of discipline to do, but after the habits are established, it gets easier, and the rewards are well worth it.

28 February 2008

John Goerzen: Trac & Git

For quite some time now, I've been running Trac over at software.complete.org. Most of my free software projects -- well, the ones where I actually go to the effort to make formal releases -- have a Trac instance. This Trac instance provides a wiki, bug tracker, downloads area, timeline (with RSS feeds), and VCS integration.

Trac is a nice program, but one thing has bugged me about it all this time:

Every trac instance is its own island.

I have 17 trac instances out there for my projects. To see what bugs are out there on my own server, I have to check 17 websites (or 17 RSS feeds or whatnot). Publishing a new program is not a lightweight process.

So today I started poking around looking for something better. I really like Trac's way of integrating the wiki with the BTS and the commits; wiki markup can refer to a bug or a changeset, and bugs can use wiki markup too.

I looked at Redmine, Mantis, and Roundup, and I also have experience with RT.

Of these, Redmine looks the most interesting. Multiple projects support, per project wiki and forums, gantt charting even, and support for SVN, CVS, Mercurial, Bazaar, and Darcs -- with Git support out there as patches to their development tree already too. Oh, and I saw references to a Trac importer as well. One thing that makes me nervous, though, is that they have no links to sites that use Redmine (except one in the news section), and Google isn't turning up users either. Does nobody use this thing?

What else should I be looking at?

Over on the Git side, I'm still liking Git. I have now migrated several Mercurial projects over to git (see git.complete.org). I am also playing with Darcs to git migration using darcs2git, which also is going well. Sometimes gitk shows a nicer representation of a Git repo converted from Darcs than I was able to get from Darcs.

Erich Schubert: Vote Green, please.

There are communal elections in my region this weekend.Green campaignI'm a supporter and member of the Greens. Please support us by voting for us.Don't vote for CSU. Ever. Just think of what they've been doing towards spying on citizens, data retention and such. They fight against your freedom by blaming the "terrorists".We could use up to 20% greens, and there is no way we're going to reach that anytime soon. So it's save to vote for the Greens. Even with your vote, they'll probably just reach 10%, and that definitely is a good thing for democracy. Nobody is talking about the Greens becoming the strongest party, you know... but we could use more Greens than we currently have in the parliaments. If we have 4-5 reasonably strong parties and changing coalitions, that helps fighting corruption.

Erich Schubert: Vote Green, please.

There are communal elections in my region this weekend.Green campaignI'm a supporter and member of the Greens. Please support us by voting for us.Don't vote for CSU. Ever. Just think of what they've been doing towards spying on citizens, data retention and such. They fight against your freedom by blaming the "terrorists".[Yes, I am aware that these topics are national, not communal topics. But in communal topics it's the same thing. CSU wants to waste billions of money on a train which is 10 minutes faster at the airport, and which nobody is going to use because it's quite a bit more expensive. The money could be used for much better purposes, but I guess they owe some construction companies ... It is a fact that they have introduced study fees, despite the need for more high-qualified people; they should be putting more money into our universities instead of driving people away from higher education.]We could use up to 20% greens, and there is no way we're going to reach that anytime soon. So it's save to vote for the Greens. Even with your vote, they'll probably just reach 10%, and that definitely is a good thing for democracy. Nobody is talking about the Greens becoming the strongest party, you know... but we could use more Greens than we currently have in the parliaments. If we have 4-5 reasonably strong parties and changing coalitions, that helps fighting corruption.

27 February 2008

Sergio Talens-Oliag: Tips &#x26; Tricks: plone, nginx and path rewriting

The problem On a couple of Debian Etch systems we have a plone-site that is published using a backport of the nginx web server. The Zope instance is running on the standard port and serves the Plone contents under the /plone path. Initially we were publishing the site to the external world using an https site served by nginx using the following entry on the configuration:
  location /plone/  
    proxy_pass http://plone:9673;
    include    /etc/nginx/proxy.conf;
   
The proxy.conf contents are quite standard:
  # proxy.conf
  proxy_redirect                  off;
  proxy_set_header                Host $host;
  proxy_set_header                X-Real-IP $remote_addr;
  proxy_set_header                X-Forwarded-For $proxy_add_x_forwarded_for;
  client_max_body_size            0;
  client_body_buffer_size         128k;
  proxy_connect_timeout           90;
  proxy_send_timeout              90;
  proxy_read_timeout              90;
  proxy_buffer_size               4k;
  proxy_buffers                   4 32k;
  proxy_busy_buffers_size         64k;
  proxy_temp_file_write_size      64k;
With this settings we see the /plone contents using the same path that is used by the Zope instance, but after testing we have decided to change the /plone path and server the contents under the /web path. The Wrong Solution The fist option I though about was quite simple, rename the Zope's plone object to web. Seems reasonable and simple for someone without Zope experience (I don't administer the internals of the Zope/Plone site), but now I know that it is a very big mistake, because renaming objects in Zope in not cheap, as it implies that the server has to modify all the contents of the renamed object and the operation can take a very long time. With my ignorance I tried to rename the plone object using the Zope administrative interface and after a minute or so I cancelled the page loading that was running on my browser, thinking that I had cancelled the rename operation. To make a long story short I'll tell you that the operation was still running and after several hours the folder was renamed (in fact I noticed when the good solution broke, as I had already solved the problem using the next method), but something went wrong and part of the site functionality was broken... the final solution to the debacle has been to recover a backup of the Zope instance older than the rename operation and continue from that copy. The Right Solution (TM) It seems that Zope has a couple of systems to do Virtual Hosting and the best option is the use of the product called Virtual Host Monster, a weird and confusing system (IMHO, of course), that does the job once the right configuration settings are in place. The best solution to our problem was to modify the requests done by the reverse proxy without touching anything on the Plone site (the original one already had a Virtual Host Monster object installed and that was the only thing that we needed to add). The nginx configuration for the new /web path is the following:
  location /web/  
    proxy_pass http://plone:9673/plone/VirtualHostRoot/_vh_web/;
    include    /etc/nginx/proxy.conf;
   
With this change, when the user asks for anything under the /web/ path the Zope server gets the contents traversing the /plone object and adding to it the elements that appear after the VirtualHostRoot component, ignoring components that start with the _vh_ prefix (the protocol and host name of the requests are not modified, as we did not touched that). Once the object is found, the server rewrites the URLs included on the HTML files using the path components that appear after the VirtualHostRoot one, including the suffix of the components that start with the prefix _vh_. For example, when the Zope server receives a request for an URL like:
  http://plone:9673/plone/VirtualHostRoot/_vh_web/home
it publishes the content found on:
  http://plone:9673/plone/home
but the HTML files returned assume that their base URL is:
  http://plone:9673/web/home

Anand Kumria: $title

$body

24 February 2008

Jaldhar Vyas: The 2008 Things Jaldhar Discovered Last Year That Everyone Else Knew About Already Awards

And the Golden Sombrero goes to... Another awards show took place today but nobody is paying any attention to that. All of Hollywoods elite can be found at the King Plaza Buffet in Jersey City for the 80th annual Things Jaldhar Discovered Last Year That Every Else Knew About Already Awards. (Known in the industry as "the Golden Sombreros") Here is a list of the winners. Game: Hungry Hungry Hippos This game is awesome! But don't play with three year olds. They cheat. Book: Discworld series by Terry Prachett When The Color Of Magic came out in 1983, I dismissed it as merely "The Hichhikers Guide to Mordor" but last year I read it again and this time it grew on me. Since then I've been steadily reading the whole series since June at an average of one a week. Music: Rammstein Smell the umlauts! I have no idea what they are actually going on about but this is what Metal is supposed to sound like. Mental Condition: Oedipus Complex All of sudden last October or so, my son started screaming and crying whenever I got anywhere near my wife and he would cling to her like the proverbial limpet. Then three months later, just as suddenly, he stopped. Very strange, not to mention creepy. Linux command: grep --color=auto Everyone knows GNU ls can be colorized but did you know the same is true of GNU grep? I didn't. Why wasn't I informed of this earlier? L. Ron Hubbard Lifetime Achievement Award: Coke Zero I used to drink way more Coke than was good for me so I decided to give it up. Diet sodas don't taste very good so I was resigned to not drinking soda at all. Luckily for me Coke Zero has no calories or sodium but does have caffeine and a taste like actual Coca-Cola. Perfect!

23 February 2008

Philipp Kern: Trouble with head and legs

Normally I don't have that much pain. Some headaches from time to time, and a busy nose, but that doesn't cause pain, just lots of used tissues. But now I'm at FOSDEM and on the way there yesterday I had some severe headaches and today my right leg and foot hurt quite much. What's up. I guess the latter is related to my slipping on the stairs of the Delirium, where the beer event took place. It got me covered in beer, which wasn't a problem (luckily only two, but well, both were half empty afterwards) but it seems that the bump had some consequences. (No, I wasn't drunk, but too many already spilled too much beer on those stairs.) Now I don't actually see much when looking at the leg, but it feels a bit burning. There's some light, though: I just enjoyed an extensive shower at the hotel and it provided me with some relief. In other news I just tried DesktopBSD and it failed. Apart from the screen being a bit blurry (like with radeonhd without the blitting fix applied) the main blocker was the missing WiFi support, but hey it's an Intel 3945, so it can't be that hard. Maybe I get around into implementing UPnP into Gobby soon, looking at UPnP's test code it does not seem too hard. Funny enough the router providing free WiFi at the hotel broadcasts UPnP stuff so the port mapping actions probably work (as UPnP does not offer any means of authentication). No pictures, yet. Heh.

20 February 2008

Steve Kemp: No, no, no, no.

I'm going to admit up front here that I'm pushing my luck, and that I anticipate the chances of success are minimal. But that aside .. There are a lot of people who read my entries, because of syndication, and I'm optimistic that somebody here in the UK will have a copy of the following three books they could send me: (All three are cheap paperback pulp fiction novels from the 1980s written by Alex Raymond.) If you have a copy of any of those three books, and are willing to part with them, then I'd love to hear from you. Either as a comment or via email. I'm certainly expecting to pay for them up to around £5 for each volume.
Backstory: I read the first when I was 10-12, then mostly forgot about it. A while back I remembered enjoying it and bought volumes 1, 2, 3, & 4 from an online store. I got screwed and volume 3 hasn't arrived, but possibly that will be rectified soon. Here in the UK the last two volumes are either extremely rare or extremely in demand. Typically they seem to sell for £15-30 - I'm frustrated to not have the conclusion, but not desperate to spend so much money upon them, (been there, done that).
So if anybody has some or all of these books and can bear to part with them please do let me know. </luck:pushing>

Jeff Bailey: Met with the surgeon.

Angie, Leif and I met with one the two surgeons who will be doing the work. I s'pose it's good and bad that the co-director of the UCSF Spine Centre, Dr. Mummaneni is personally taking on the case. Good that I'll have the best possible care; Bad that I'm apparently interesting enough to warrant it.

Meeting with him was matter of fact. He talked about how he'll approach the surgery (from the back, since the placement of my aortic arch and innominant vein would make coming through the front problematic). It looks like I'll have rods and screws from T1-T6, with a cage replacing the vertebra at least at T3 and possibly at T4. People don't usually do that much movement in their thoracic back so, ongoing, his opinion was that I largely won't notice it.

In hospital-time will depend on whether or not the surgery can be done in one shot. Because of the trickiness of the area, it may not be possible to get it entirely from the back, and he'll do two surgeries rather than one if that can avoid me winding up in a wheelchair. Ideally, there's one surgery, and a week later I'm home and able to take care of myself. The way they take the tumor out in a couple pieces is known as "en bloc spondylectomy", but may not be possible with the way the spinal nerve is being pinched. He described the surgery itself, and the simple version is "remove one or two vertebra, replace them with cages, stabilize the surrounding area". Yay to the Black and Decker surgical division.

He'll be assisted by Dr. Chau for spinal cord monitoring and the rest of the surgery.

The last thing they did as I left the hospital last Saturday was a full body CT scan with contrast, and the radiologists have declared that that they see no additional tumors in the body. I'll visit with an oncologist to do some final tests, but consistently the answer is coming back that this isn't cancer, it's more likely an isolated mutation. Dr. Mummaneni doesn't feel that this is a side effect of sitting at a computer since I was 3 years old, any of the car accidents, or being hit across the back with a flute case in grade 9.

I did ask if I'll set off metal detectors at airports after this, and apparently the titanium used doesn't do that.

So, erm. What are the risks? Honestly, pretty consistently less than doing nothing. Having this thing would eventually result in paralysis anyway, and aside from the usually OMG-they're-cutting-me-open-anything-could-happen type of things that don't keep me from biking to work on a regular basis, all the other options are "And life improves from here". Informed consent means that I have statistics in my head that I'd rather not dwell on and a laundry list of things to panic about when I wake up in the middle of the night but those really are just nerves acting up and stress wanting to come out. Nothing wrong with any of that.

Surgery is booked for March 3rd. We'd hoped to go to Vancouver for Leif's birthday around then, but I've been asked not to fly. Rapid pressure changes apparently will aggravate what's there now.

I feel good about this. I'm back to pretty much 100% after the hospital time last week, and noticed that after the embolism that I'm moving a bit freer than I was before. That's enough to start the optimism going already. We've also twiddled my medicine for every 8 hours rather than 6, which will help me sleep better, and reduced it, which will help me feel better.

Having time-frames and knowing that I'm in good hands is a lovely place to be after all that.

19 February 2008

Jeff Licquia: Its Not Like You Care About Your Documents

Recently, as part of the many antitrust/anti-competition legal actions they’re suffering under, Microsoft released specifications for the old Office binary file formats. As expected, they’re big and complex. Joel Spolsky (a former member of the Excel team) had some thoughts on their size and complexity:
With a little bit of digging, I ll show you how those file formats got so unbelievably complicated, why it doesn t reflect bad programming on Microsoft s part, and what you can do to work around it.
The digging turns up reasons that make some sense: the limitations of older computers, feature creep, a complete lack of attention to the future. But it’s hard to see some of these reasons as “why it doesn’t reflect bad programming on Microsoft’s part”. Carelessness is common, sure, but we don’t call it a virtue because everybody does it. And these are problems that should have been on someone’s radar at Microsoft. It’s one thing for a grunt programmer to hack a feature to meet a deadline; it’s another for the management to simply go along with it, or to not order a rethink when the problems come to light. When you read about hacks like the following, everything sounds nice and reasonable, until you remember what the end result is: that Microsoft Excel doesn’t have a standard format for storing and manipulating dates!
There are two kinds of Excel worksheets: those where the epoch for dates is 1/1/1900 (with a leap-year bug deliberately created for 1-2-3 compatibility that is too boring to describe here), and those where the epoch for dates is 1/1/1904. Excel supports both because the first version of Excel, for the Mac, just used that operating system s epoch because that was easy, but Excel for Windows had to be able to import 1-2-3 files, which used 1/1/1900 for the epoch. It s enough to bring you to tears. At no point in history did a programmer ever not do the right thing, but there you have it.
It may not have been the wrong decision, in the sense that it enabled them to ship, and shipping is everything in some circles. But as a design decision, how can anyone defend such inconsistency? Business information technology was able to move forward in the early ’90s because older document formats like 1-2-3 and WordPerfect were simple enough to import easily into Microsoft Office. Today, when we talk about moving to open-source suites like OpenOffice or online systems like Google Docs, detractors left and right cite the pain of document conversion as a reason to hold back. But if Joel is right about the old binary formats, the pain of transition is like the pain of changing your oil: you can pay now, or you can pay a lot more later. Even Microsoft is having trouble opening its own files from long ago, with “long ago” being a period measured in years, not decades. Maybe you didn’t write anything a decade ago you’d care to read again today; maybe you can’t imagine any of your stuff being worth reading a decade from now. Do you want to take that chance? Thankfully, I was a geek, and kept most of my documents in plain text. Today, I take care to save important documents in formats and encodings designed for the long haul, like Unicode, ODF, and PDF. It helps that I avoid Microsoft software like the plague. (If you think they’ve changed since the bad old days, just surf the web in Firefox on Linux sometime, and see how many badly-rendered pages look much better when you switch their text encoding from Unicode to “Windows-1252″.) If you have a lot of Office documents, even if you’re happy with Office, you might consider whether you care about opening those documents ten years from now, and whether you’d rather take the time to future-proof them while you still can.

17 February 2008

Martin F. Krafft: The Penny & Martin adventure: phase 2

Following the first phase, the second and final phase of the Penny and Martin adventure ended last Friday at Wellington airport. I am now 11 500 metres high on my way from Bangkok to Zurich, looking back at seven days on the New Zealand South Island, another in Wellington, and a night in Melbourne. Here s the summary of the 2200km we travelled, with selected photos inline. Penny has more pictures in her Flickr album. My New Zealand beer top-ten, in reverse order: Monteith s Original, Monteith s Black, Mac s Great White, Monteith s Golden, Monteith s Celtic, Monteith s Pilsener, Emerson s Pilsener, Mac s Hop Rocker, Emerson s 1812 India Pale Ale, and (drum-roll): Mac s Sassy Red. Yum! The Emerson beers get no links because the brewery website uses Flash. Thanks, Penny, for a fabulous two weeks! NP: The Flower Kings: Back in the World of Adventures

14 February 2008

Adeodato Sim : Python raw_input() with an editable default value, using readline

OK, blogging this because I would have found it very useful today if somebody else had. Hopefully the title is enough to get love from the search engines.
  import readline
  def raw_input_with_default(prompt, default):
      def pre_input_hook():
          readline.insert_text(default)
          readline.redisplay()
      readline.set_pre_input_hook(pre_input_hook)
      try:
          return raw_input(prompt)
      finally:
          readline.set_pre_input_hook(None)

12 February 2008

Evan Prodromou: 23 Pluvi se CCXVI

Since we launched Vinismo a few months ago, I've been watching the world of wine blogging with great interest. One thing I really like is Wine Blogging Wednesday, wherein wine bloggers around the world pick a topic or theme and all blog about wines that match that theme, once a month. On Wednesday. Thus the name. I'm surprised I have to explain this. Anyhoo, this months theme is just seven words: the reviews of wines have to be exactly seven words long. I figured, heck: if I'm ever gonna do a WBW review, this has gotta be the easiest to do. Oh, and the wine theme was reds from Italy, which may be the easiest drinking wines in the entire world. Niko and Pio So: Niko picked up a bottle of 2005 Pio Cesare Barbera d'Alba before coming over to our house last night, and we had a glug while doing some floor puzzles with Amita June. My impression? Earthy, melon, medium-bodied; needs sharp cheese. Woo-hoo! Now I'm a real wine blogger. tags:

10 February 2008

Steve Kemp: I wish I could tie you up in chains

Today I've been mostly unwell. Although I have managed to write some minor new code, and watch a little bit of Doctor Who on DVD. Recently several people have been ranting about Ruby on Rails. I like it, but I wouldn't use it for personal development in a hurry. Deployment is fiddly, and upgrades are annoying. But one thing that I utterly condemn Rails for is helping to spread bad paging throughout the online world. So, what is "bad paging" and why is it important? Well cool URLs don't change, right? "Bad paging" is any user-interface which presents you with a limited view upon a changing list of items which is non-bookmarkable. Consider the following "list". Assume it represents your view of a collection of items numbering 100+. You may only view ten items at a time; clicking "next", or "previous", to navigate your viewport:
1.  first item
2.  second item
..
10. tenth item
[see next: /start/1] [see prev]
Whats wrong with this picture? It is subtle, but this list is broken. The issue is that when the list grows new items are prepended to the front, yet the navigation is linked to the starting page number. If that description wasn't clear consider what happens if you want to bookmark the page containing item 11. How can you? Right now it is at /start/1. If a ten new items are appended to the head of the list then it will instead become /start/2 - as items that are currently numbered 1-10 will be shifted forward to become items 11-20, and and they will be on page /start/1 instead. The solution is simple enough once you consider what you want to happen: So why does nobody do that? (As a counter example look at my website: Rather than the 'Show previous' items linking you to the changing link /start/1, it instead links you to /start/569 (for example).

Next.

Previous.