Search Results: "pini"

2 January 2008

David Welton: Tcl and Tk 8.5 out

Actually, they were out a few weeks ago, but I've been on vacation at the in-laws' near Monselice, Italy. The release announcement is here: http://www.tcl.tk/software/tcltk/8.5.tml It's worth writing about, because it's been a long time in the making, and contains a number of improvements. Particularly noteworthy in my opinion are 'real' hash tables (dicts), an even better sandbox model (Tcl and Java have the best sandboxes that I know of), and a theme engine for Tk that, in the right hands, significantly improves how it looks. In the fickle world of language fads, Tcl doesn't get the respect that it should these days. Like anything, it has problems, but what doesn't, when examined up close? It's ironic that for years it has gotten things right like Unicode support, and OS-level threading, that are currently being worked on in Ruby. Hecl obviously owes a great deal to Tcl, but since it's a new language (more or less necessitated by cell phone limitations), we're free to take a stab at improving things that Tcl doesn't get right. In any case, Tcl is worth a look if you want to play with something that's fundamentally different from a lot of popular languages, and the core team has put a lot of work into the latest release, so give it a whirl (perhaps using tkcon instead of the readline-less tclsh executable) with an open mind, and see if you don't learn something new.

28 December 2007

Lior Kaplan: conffiles, newer packages and purging


Earlier this month Kumar Appaiah opened a bug against the culmus package as part of the stable -> unstable piuparts upgrade tests. First, I’m proud in Debian to have these tests. Thanks for the people involved with running them, parsing the log files and reporting the bugs. I really feel the lake of such checks in commercial distributions I work with. After finding the time to get to the bottom of the bug, and talking with Kumar, it seems most of the bugs found in the test are similar. I think this might indicate something wrong in a more basic level of the package handling. The source of these bugs is how to handle files which were conffile in version x, but aren’t included in version x+1 (as a regular file). In the common situation, the conffiles are removed only during the purge process and not during upgrade or removal. But if a conffile doesn’t exist in the x+1 package, no one will “own” it after the upgrade, and no will purge it in due time. This is why changing conffiles can result in extra files on our system, which is the problem discovered by the recent piuparts test. One solution will be that each package maintainer will add the necessary code to the maintainer scripts to remove the file on upgrade. A second solution is to decide the wanted behavior in such a case and to have dpkg handle it for all packages. The behavior can be to remove the old conffile during the upgrade (postinst script) or to dynamically add it to the list of files owned by the package. Although technically possible, I’m not sure if the second method is “legal” with the debian policy. I thought it would be better to hear others’ opinions before submitting a wishlist bug about this.

23 December 2007

Wouter Verhelst: They managed!

It took them half a year, but the Belgian federal politicians finally managed to come up with some form of government. I can't say I'm impressed. Well. In a way I am impressed. After trying for 6 months, Leterme still failed to produce some form of government. Since the situation was becoming quite dire, the King gave Verhofstadt the initiative, who then promptly produced a government in only two weeks. Granted, Verhofstadt's mission was not as hard as Leterme's. Verhofstadt was told to form a government only to handle the most urgent matters, and which will be disbanded at Easter; Leterme was asked to form a government to last for four years, which is how long a Belgian federal government usually holds office. And yes, Leterme's mission has most likely been one of the hardest one in the history of Belgian formation talks. But even if all that is true, I'm baffled at the fact that the intention now still is to make Leterme the prime minister at or around Easter. In my opinion, he's had his chance and blew it. Then again, maybe I'm biased. I've never liked Leterme; and when his party CD&V decided to ally themselves with a separatist party, I decided to gracefully extend my antipathy to his entire party.

11 December 2007

Wouter Verhelst: Hardware sucks, but their manufacturers too.

A while back, I needed to do something with a mainboard made by Intel. The mainboard doesn't have a PS/2 connector; so I had to use a USB keyboard. In itself, this is horrible; USB is an incredibly bad interface to connect a keyboard to, IMO. But, well, sometimes the decision isn't yours, you know. Bad Intel. Given my above-stated opinion on USB, I guess it's not surprising that I don't have a USB keyboard; I don't believe in them. But, well, a mainboard without a PS/2 connector doesn't suddenly get one because I look at it, so I went to a nearby computer shop with the intention to buy me a keyboard. While it's bad enough that I had to get me a USB keyboard, they managed to make things worse. The particular model that I'd bought is broken in ... well, let me count the ways.
  1. Blue LEDs are annoying. Yes, a keyboard needs LEDs to show that num lock (etc) are enabled, but a yellow LED works too, and is far less flashy or distracting.
  2. A "Fn" key is nice if you want to overload keys on your keyboard. However, if there is not a single key on your keyboard that is overloaded using the Fn key, then you're silly.
  3. The particular model used a "condensed" layout, rather than the standard 105-key be azerty layout. I'm used to the standard 105-key keyboard layout, and having to type on one that is different is no fun. When I mentioned this to the salesguy, he told me that I'd "get used to this pretty quickly". Well, perhaps if that were my only keyboard. But I also have my home desktop (standard 105-key layout), my laptop (apple azerty laptop layout), some m68k macs (mac azerty 105-key layout), and some more; then, it doesn't get so easy.
  4. They keys on the keyboard were flat as on a laptop keyboard, rather than thick as on a desktop. This makes it harder to disassemble when it gets dirty, with the risk of breaking it (I've had to have my laptop's keyboard replaced when I broke it by disassembling it because the keys started to get stuck and I wanted to clean it...)
Now obviously it's possible to fix most of these issues by simply buying a decent keyboard—except that the shops that I went to simply don't have a decent keyboard anymore these days. At least this one still had 105 keys; for reasons that totally escape me, some keyboard manufacturers today seem to think it's a good idea to drop the insert key on their keyboards. WTF? People just don't make decent quality keyboards anymore these days... Bad hardware manufacturers. Bad, bad, bad!

10 December 2007

Lior Kaplan: Load Balancing Jboss with Apache and mod_jk

Apache’s mod_jk has nice load balancing features. They work quite well for me with Jboss. The basic configuration is to install Jboss on several machines and have an Apache to load balance them. But while the load balancing is good, the Apache machine becomes a single point of failure. I was asked how to overcome that. The main principle I want keep is the “keep it simple, stupid” principle. Doing a round robin DNS between two machines is nice, but doesn’t really provides real the load balancing (as it always does 50/50). It also doesn’t check for the the load before it does the balancing. Other options like using mod_backhand and mod_proxy_balancer all leave me with the same single point of failure problem. That’s why I prefer to use an active/passive cluster to make sure Apache can move to another server in case of a failure. The IP address the users get is a virtual (or floating) IP, which can “jump” between the cluster nodes. There are several ways to create that cluster, but that’s probably for another more general post. I’ll be happy to hear other opinions…

5 December 2007

Biella Coleman: Rethinking Blogs: The importance of fewer posts and preaching to the choir

It is hard to believe that I have been blogging for over five years. And what is clear is that being an assistant professor is not all that conducive for blogging and this is materially evident in my sparse posting pattern over the last few months. It has been particularly bad in the last month thanks to a week long international trip, back-to-back sickness over Thanksgiving week, and finally going to Washington D.C. for the AAAs. But this retreat from blogging as well as teaching on so-called Web 2.0 software, like blogs, has made me rethink the value and limits of the craft of blogging and so I am going to take some time (that I feel like I don t really have, but oh-well..) to write them down as I am preparing a short piece for on the politics of Web 2.0 and I hope I can transfer some of these ideas there. So as I have already mentioned, I am an now infrequent blogger. Prior to the era of RSS, this could have meant the death of my blog because if people went to visit my page and there was no new post and then this happened a few more times, they would just stop visiting. The magic of RSS is that it brings the blog post to you and this alters the landscape of possibilities within the context of what has been nothing short of a seismic explosion of blogs. What I am finding and this will be no surprise to anyone is that it is just too difficult to keep up too many of a certain class of blogger the prolific poster who posts medium to long posts and worse, nearly everyday! To make a point about the effects of this, allow me to tell a story: Two blogs I really like are Joe Reagle’s blog on Open Communities as well as Tenured Radical. Both provide captivating posts but I recently unsubscribed to Radical Tenure and not Joe Reagle s. Why? My decision was purely pragmatic. Because she posts way too much, I just can t keep up. If I stop reading her blog for 2 weeks, and then pay a visit via bloglines, I am faced with a blogolanche and I am trying to avoid, at all costs, overwhelming situations. On the other hand, if I stop reading Joe s blog for 2 weeks, there may be one or two posts so I feel like I can spare the time to continue reading. Ironically, I will now visit Tenured Radical every month, much as I did prior to the RSS era, just to take a quick scan and see if there is anything I must read. There is another class of blogs, such as Sivacracy, that update their site frequently but the posts are tidy and short and so I can usually keep up and they provide important news for my projects. But the type of blog that provides longer ruminations has proliferated (and I really like reading those) but I suspect that as the blogosphere has expanded, less people can commit to those types of blogs. In other words, today, you may hang on to more readers, if you only blog 1 to 2 times a week instead of 3-5 weekly posts that are medium to long in length. Now I may be completely OFF the mark with this by generalizing my own experience so I would be interested in hearing people s experiences or better, if anyone could point me to someone who studies these types of pattern, I would really appreciate it. On a related note, last week I taught a now famous piece by Cass Sunstein on political balkanization on the Internet that is in part secured by blogging. His core argument, which I think stands to some degree, is that the blogosphere is less an arena where people with different inclinations and views meet to debate, and thus change their views, but is an arena where your pre-existing ideas are reinforced because you are simply reading and debating with people who hold your worldview. As I mentioned, I think this is true in so far as you don t see people on the left and right engaging in some debate that substantially transforms their ideas. But the argument is faulty or missing something crucial about the nature of politics, in so far as that the so called left or right or so called liberal and conservative positions are truly not unitary so that if different types of liberals/lefties are engaging with each other to change positions and ideas within that group, well then, the critical function of blogging is in fact well and alive. To state using an example, there are plenty of liberals who, in my opinion, could use a little radicalization and perhaps this is happening in the blogosphere because people come across a spectrum of ideas and positions from within their political pole. Finally and this point really is not mine but I am poaching it from Jeff Juris who made it last weekend at the AAA meeting during his presentation on activist videos. One of his findings was that activists were the only ones watching video s documenting protests when hosted on radical political sites like Indymedia. When they were placed on Youtube, the audience expanded considerably: conservatives were also watching them, but they effect was not to make their more sympathetic toward the left and their political points, but simply to reinforce their position, which is evident in the archived comments expressing their great distaste of the left. This is a perfect example of the Balkanization that Sunstein talks about but with an important reversal: it comes from confronting difference not avoiding it! But Jeff made the excellent point that there is a critical function in preaching to the choir: it ensures that the choir will not stop singing! That is, your political passions are not simply ensured, they must be renewed and given the massive amounts of apathy peppering our population, renewal by confronting what you believe in, is vital. So my advice is keep producing posts, keep reading even if it tends to be stuff you already believe in BUT please, post less. Less, I think, is really becoming the new more….

4 December 2007

Eddy Petrișor: wiki.d.o theme -is it bad timing or too late?

I have been working recently working on the wiki.d.o theme; this work was started last year around May - June and I halted it due to lack of time. The point was (opposed to what many might have thought) to make a theme that looks like the www.d.o theme.

Currently the TODO is outdated, so here is an updated one (I'll update it and push it there, too):
There are some screen shots with the current theme as seen on Opera, Epiphany (for some reason sometimes different from iceweasel) and MSIE 6.0, but here are again since I expect that my public darcs repo will change:

In MSIE (by far the most annoying browser and creates the most issues):


In Opera:


In Epiphany (the window was smaller, the content isn't bigger):

If you want to contribute, you can:

darcs get http://users.alioth.debian.org/~eddyp-guest/darcs/wiki.debian.org_theme

read the README to understand what matters, and tackle one of the items on the TODO list above.



I found it pitiful that Zack has based his PTS rework based on the wiki.d.o default theme since that theme is, in my opinion the one that should be corrected (at least the colors should be).

I am not an expert in aesthetics and i don't claim that the www.d.o theme is beautiful, but it seems that the recurrent discussion of it being replaced with something better never found a person to make it true. This is one of the reasons I stopped last year since it seemed the dream would come true at that time.

Evan Prodromou: 13 Frimaire CCXVI

I'm organizing a micro-coworking session here in Montreal for 6 December (15 Frimaire). "Micro-coworking session" is just a fancy way of saying "hanging out together and working at a caf ". Folks will be meeting in the back of Caff ArtJava from about 9AM to about 5PM. More info on the subStation Coworking event page on Upcoming. The event is for people interested/involved in (or supportive of) Station-C, the incipient Montreal coworking facility scheduled to open in February 2008. But everyone's welcome to come by -- heck, we'd have a hard time keeping you away. tag:

Private and public life in the age of Facebook One of the things I find interesting about life on the Internet is the distinction between public and private life. So much of our lives are on-line today; for many of us, the Web is where we make our living, make our friends, enjoy our social life, and plan our off-line activities. But what about those personal activities that don't jibe with our intended professional image? If we have out-of-the-mainstream political or religious views, or unorthodox social activities, how do we keep them to ourselves? How do you talk about things on-line with friends that maybe you don't want your parents or other family to know about -- or vice versa? How do we preserve our reputation in more than one sphere, in situations where those spheres are very different? I think there are a number of strategies for doing this.
  1. Be discreet. In other words, just don't put personal stuff on the Web. Keep up your professional image at all times, and don't use Web sites or tools to make connections in more private ways. This is probably the safest strategy, and the one that most privacy groups and media recommend. But there are some downsides, too. You miss out on the Web's power to enhance your life as a well-rounded human being -- your personal life languishes for the benefit of your professional one. You give up on some important opportunities to connect with other human beings in a deep and meaningful way. Especially if your interests are shared by only a small percent of the human population, it's unlikely you'll run into other people who share them off-line. I also think there's something unhealthy about stifling your personal side for your professional life's benefit.
  2. Use pseudonyms. Another way of being "discrete" -- here, I mean separated into different parts. I think this is one of the most common ways to deal with the problem. Use your "real name" for activities, groups, and opinions that you feel safe presenting to the world at large, and use made-up names or handles for activities you might not feel like discussing at a job interview. This can be very successful, but also nerve-wracking. What parts of life require a "secret identity", and what parts don't? What if one part of your life leaks into another? It can also be tedious to set up, say, two or three different Flickr accounts, two or three Facebook accounts, umpteen blogs, etc. Or, you keep a LinkedIn account for work and a MySpace one for your partying set, and hope that Google doesn't make a link between the two. But you can get sick of managing them, and other people don't know which name or pseudonym to use and when to "out" you to their other friends.
  3. Integrate. By this I mean: let your personal and professional life grow together. Decide what parts of your personal life you're willing to make public, and bring them into your public persona. Parts of your life that you don't feel you can integrate, consider letting go of. I think this can be risky and difficult, but ultimately I think it's the most healthy psychologically for people who spend a lot of time on the Web. Most often, these people either work for themselves and don't have to answer to others, or they work in industries where offbeat or out-of-the-mainstream lifestyles are tolerated or encouraged (or the need for highly-skilled people makes those "quirks" easier to ignore). Or they just gamble that nobody at their work or in their family is really checking (quite often the case).
  4. Wait for better software. I think the main reason that this is a problem is that social software developers aren't very good sociologists. Or, rather, we focus on the software rather than on the social. It would be nice to see the next generation of Web services support the multiple facets of a person's life. I'm an Open Source fanatic, a Web developer, a wikitista, an entrepreneur, a father, a Burner, a Montrealer, a man, a prankster, a partier and a cook -- among many other things. How can social software, or a federation of services, let me reflect these different aspects of my personality to my friends, coworkers, colleagues, relatives and strangers? Could I define finer-grained relationships with others than just "friend", and choose what parts of my life to feature or downplay with each? It's a fascinating design and implementation question, and my hope is that someone will take on the challenge in the future.
I think this is a situation where our society and our software both need to evolve and change. It would be nice -- very nice -- if edgy politics or weirdo culture didn't hurt your chances of advancing in your chosen field. And if friends, family and colleagues could accept us all for who we are, in all our parts. But it will also be nice if software and software usage patterns on the Web let us find a way to adapt to that, too. People have lots of different parts and lots of different personae that they inhabit at different times and in different contexts -- it would be great to match our social software more to that reality. tags:

One-liners Some other things to note:
  • Montr al has had an insane amount of snow in the last few days. I dug out our car for about 90 minutes this morning, and drove for hours in snow-blind traffic. Not an easy time, but boy the city is lovely like this.
  • I'm doing a talk on extending MediaWiki at the PHP Qu bec meeting this Thursday, Dec 6. Meeting info is here.
  • Pictures from Montreal Santarchy are available on Grimmwire's Santarchy Montreal 2007 set. Great group, fun crowd, loooooong night. Oh boy.
  • Speaking of SantaCon, Santarchy in Second Life sounds totally nutso.
  • My server overload problems seem to be getting better. I moved Vinismo to its own server on Amazon Elastic Compute Cloud. I also moved SonaUiki and the Br leurs site to GoDaddy, where I have a ridiculous number of free Web hosting credits. It worked surprisingly well, and GoDaddy supports PmWiki out-of-the-box. Nice! Update: Apparently GoDaddy adds a whole bunch of ads in on their free Web hosting. I didn't notice; I have Adblock Plus installed. Gar. I'll have to move these sites back pronto.
  • My light and convenient Toshiba Port g R200 has been throwing I/O errors. So I gotta get a new hard drive. Good news: the thing's still under warranty (yay!). Bad news: I gotta drive through this miserable weather to a place in St. L onard to get the HD replaced. Boo!
tags:

30 November 2007

Daniel Burrows: The Dreaded I-Word

A popular and recurrent topic of conversation on the Internet has the following form:
Is (X) innovative?
I occasionally find myself reading these discussions; they have the same sort of macabre fascination for me that's often ascribed to train wrecks, messy divorces, and Usenet. Of course, the outcome (or rather the lack of one) is always predetermined. The only variable is how many pixels will be mutilated and how many absurd postures will be struck before the dust settles. Why do I say the outcome is predetermined? Because in not one of these discussions does the person posing the question precisely define what innovation is. If the discussion concerned, say, whether an object was blue, or made of concrete, or 5 meters by 6 meters, this would not be a real problem: while any hair can be split, there are commonly accepted definitions of blue, concrete, and meter that are sufficient for an informal discussion. But innovation is not blue, concrete, or meter. Different people have subtly, even radically different views of what constitutes innovation and how to measure it. Hence, any discussion involving more than one person quickly devolves into chaos. One person will say, X is innovative because of such-and-such, and another will reply, X is not innovative because of such-and-such unrelated reason. Both writers are correct by their own definitions of innovation; they are answering different questions, and so they end up talking past one another. Although these discussions never go anywhere, I think it's entertaining and enlightening to catalogue some of the definitions of innovation that the participants use. I've listed some popular definitions below; feel free to email me with more suggestions and I'll update the list. Of course, since people rarely bother to define their terms, most of these meanings have been inferred from the statements people have made about what is and is not innovative. As a result, some of them are fairly absurd and may not accurately reflect the opinions of the speakers, had the speakers stopped to think about what they were saying. Caveat lector. Conventions: Below, personal pronouns such as I and me refer to the speaker. The words product, idea, and technique are used interchangeably and as appropriate to refer to the thing whose innovativeness is in dispute.
  • The idea advanced the state of human knowledge.
  • The idea was an improvement over existing ideas.
  • The idea improved the state of practice within its field.
  • The idea was previously unknown.
  • The idea was previously unknown to its creator.
  • The idea was previously unknown to me.
  • The technique solved a problem thought to be unsolvable.
  • The technique solved a problem with no known solution.
  • The technique solved a problem with no solution known to me.
  • The technique solved a problem with no solution known to its inventor.
  • The product was aesthetically pleasing to me.
  • The product is entirely unlike any other product with which I am familiar.
  • The product is exactly the same as some other product with which I am familiar.
  • The product solved a problem more effectively than existing tools.
  • The product made its creator the wealthiest living human.
  • The product made its creator wealthy.
  • The product made someone wealthy.
  • The product reaped a huge profit for the corporation selling it.
  • The product was bought by many people.
  • The product was used by many people.
  • The product was useful to many people.
  • The product was useful to someone.
  • I bought the product.
  • The product was useful to me.
  • The product was created by (some particular entity, such as Toyota or Apple).
  • The product was not created by (some particular entity).
  • The product is good. (NB: of course good is another ambiguous term with many definitions, one of which appears to be innovative; the fun never stops!)
A Contrarian View This post charitably assumes that the purpose of the discussions I described, and the goal of the participants, is to arrive at a commonly agreed-upon answer to the opening question. In reality, though, most discussions on the Internet, particularly when they involve many anonymous or pseudonymous parties, are just tribal wars. Individuals decide which side to affiliate themselves with, then search for arguments that will tend to support their side or undercut the opposition. Facts and logic are largely irrelevant, except as weapons with which to smack one's opponents, and a dismissive put-down is as good as or better than a reality-based analysis. Actually changing your mind based on the evidence presented shows weakness, and is to be avoided at all costs. If you have to assert that up is down, do it. In this environment, using vague terms appears to be a bonus, since it gives you more wiggle room and opportunities to play gotcha!. If someone responds to your post with facts that rebut you based on the definition you were using, you can pick any other definition and say ...but what about..? Which is why these discussions (in which no-one is actually discussing anything) are both a fascinating window into human nature and a depressing commentary on human nature, and why I keep finding myself reading them.
PS: This post is the first long post that I've used ikiwiki to write. An advantage of my new workflow, where I write posts on the bus and commit them into a local git repository, is that I have a nice block of time to write down random thoughts that have occurred to me on the way to or from work; sometimes I forget what I was going to write over the course of the day, and when I get home I usually get deluged in email and real life. It's always amazing to me how long it takes to write posts when I actually think about what I'm doing. This post has taken me at least an hour to compose, and I think probably more (especially counting the composition I did in my head while, e.g., walking from point A to point B). It's a lot harder -- which means, of course, that it's fun; if I don't get distracted by a coding project, I'll be trying to take advantage of my new workflow to post more often.

28 November 2007

Andrew Pollock: [tech] Two years of Python

As last Wednesday was the second anniversary of me joining Google, I thought it an opportune time to reflect on how I've found learning Python. It's no big secret that Google is a Python shop. I'd been meaning to learn it a for a while prior to joining Google, but never found enough reason to other than because it seemed to be the cool new language. If I had a task that required me to write a script, I could do it in Perl in 30 minutes, or spend a day trying to wrap my head around how to do it Python. I think I'd known and been writing Perl in some form or other for about 9 years. I've hardly written any in the last two, which is a bit sad. I even bought Perl Best Practices shortly after moving over here, and haven't gotten around to reading it. The only Perl I write these days is for personal tasks to try and stop myself from going totally rusty. Anyway, I thought I'd write down some of my observations of Python, from a "veteran" Perl programmer's perspective. Not that I consider myself to be a shit-hot Perl coder by any stretch of the imagination... No punctuation I really like the lack of punctuation. It makes the code look a lot cleaner. I go back to Perl and my eyes bleed after trying to dereference a reference to a scalar, or something like that. It's just ugly in Perl. No curly braces/indentation for blocks The indentation thing isn't so bad. If you're using vi, you really need something along the lines of
set shiftwidth=2
set smarttab
set autoindent
set expandtab
in your ~/.vimrc What I do miss is being able to bounce on the % key to find the beginning and ending of a block. I've heard rumours of a way to configure vi to do something similar for Python code, but I haven't gotten around to finding out. There seems to a general opinion that if you're writing a block that is so big you can't find the beginning and end of it, you're probably doing something wrong. String concatenation It's always struck me as bizarre how the most obvious way to concatenate a string in Python is also one of the least efficient. In fact, there's whole studies been done into different methods of string concatenation and their efficiencies. Prototyping is easy Now I may just be ignorant of some Perl shell here, but the number of times I've written a quick Perl script in /tmp to do some proof-of-concept thing is immeasurable. The fact that you can just fire up a Python interpreter and try something quick and dirty to see if it's syntactically sane, or does what you expect is fantastic time saver. ipython makes it an even more pleasant an experience. No CPAN I was initially a bit disappointed that there wasn't something like CPAN for Python modules. In practice, using Debian, I haven't found this to be that big a problem though. List joining is wacky I still find it weird that you don't join a list by a method of the list, you do it by a method of the string you want to use to join the list together with, that is, I think it should be mylist.join(" ") when it's really " ".join(mylist). That's just always struck me as unintuitive. urllib2 doesn't hold a candle to libwww-perl I think even last time I checked with Python 2.5, it's impossible to make a HEAD request. The mind boggles. No setuid support I can't complain too much, I think I heard somewhere it's going away in Perl as well, but it was certainly very convenient to be able to write setuid Perl scripts. I miss that convenience in Python. Not that one has to write setuid scripts all that often. Regular expression handling is painful It's about on a par with Java. You just can't beat Perl's =~ operator. "There's more than one way to do it" versus only one way to do it Perl's always had the adage of there being more than one way to do things. I think that has been its downfall in terms of readability. Heck, I've written some monstrosities that I've looked back on in a month's time and wondered what on earth I was thinking at the time. I think it's far easier to write readable Python than it is to write readable Perl. I think that's about everything. I never did any real object-oriented programming in Perl, and so I tend to take a procedural approach to things in Python as well. I haven't written any massive bodies of code in Python (although I did help maintain one for about 18 months). I like Python. It's become my first choice for writing random scripts now. Now I look at Ruby like I used to look at Python when I knew Perl quite well. Ruby has some nice things (like Perlish regular expression handling), but it brings back all that punctuation noise again. I'm not in a huge rush to learn it, even though there's a lot of hype around Ruby on Rails. I think I'd rather investigate Django or Pylons

23 November 2007

Russell Coker: Election 2007

I am a member of the Greens. The main reason for joining them is that they have principles. The Greens Charter [1] guides everything, policy must comply with the charter and candidates agree to uphold the policies which have been ratified if they get elected. There are no “non-core promises“. The policies of the Greens are all positive. The major parties have some mean-spirited policies that aim to help Australians by making things worse for people in other countries. Unfortunately for them the world is very inter-connected at the moment, so it’s difficult to harm other countries without harming yourself in the process. As you might expect the Greens are very positive towards the environment. Anyone who expects to live for more than 30 years (or who has children) should be very concerned about this. Currently even the most cautious estimates of the scope of the climate change problem by reputable scientists suggest that there will be serious problems in the next few decades. If you are young or have children then you should vote for the Greens (that covers most people). Many religious groups have determined that God wants them to help the environment, for example the Australian Anglican Church General Synod 2007 resolved that “the Anglican Communion’s 5th mark of mission to safeguard the integrity of creation and sustain and renew the life of the earth; and recognises that human activity contributing to Climate change is one of the most pressing ethical issues of our time”. Anglicans and believers in other religions that have similar ideas should vote for the Greens. The Greens have policies that are very positive towards minority groups. If you are not a straight-white-Christian then this is a strong reason for voting for the Greens. If you are a straight-white-Christian but have compassion for others (as advocated in the Bible) then again voting for the Greens is the right thing to do. The Greens policies are humane towards people in unfortunate situations, including drug addicts, the mentally ill, and the unemployed. When considering who to vote for keep in mind that at some future time you or a close friend or relative may fall into one of those categories. Finally the Howard government’s industrial relations legislation is very bad for the majority of workers. If the Greens get the balance of power in the Senate then they will be able to get such laws significantly changed or removed. The Greens election web site is here [2]. As an aside, I never liked Paul Keating (our last Prime Minister) until I read his op-ed piece in The Age about John Howard [3]. Also here is an interesting article on preferences and why the major parties want people to misunderstand the Australian electoral system [4]. In summary if you vote for the Greens as your first preference and they don’t win, then your second preference gets counted, and if that party doesn’t win then the third preference counts, etc. So if you have the two major parties in last and second-last position then your second-last preference may make an impact on the result! Putting Greens in the #1 position does not “waste” your vote. Parties get government funding based on the number of #1 votes, vote for the Greens as your first preference and you effectively give them $2 for their next campaign. Finally when a party wins an election they immediately look at where the #1 votes went and often adjust their policies to please the people. Vote #1 for the Greens and if Labour wins they will have more of an incentive to adopt policies that are similar to those of the Greens.

22 November 2007

David Welton: Android, Hecl and scripting

Aside from my hard drive crash, I've been working to figure out the best way to integrate Android and Hecl. Since Hecl has been a small, simple, humble language suitable for J2ME (or JavaME or whatever), that has meant in the past that it hasn't really been able to utilize more complex or advanced Java features like reflection, because they aren't present in the J2ME API. Android's more complete implementation of "Java" (yes, I know about the VM, but the programming language I'm writing in is still Java) opens up a number of possibilities. First on my list of things to do was aim for a generic access layer for Java objects using reflection, so that you can do things like this:
$button settext "blah blah"
Now that we have that working, I also wanted to be able to create new Android widgets from Hecl, which is where things get tricky. The "problem" is that I want something that feels like a scripting language, not simply a reflection of the underlying Java. For instance, the XML description of a button looks like this:
<Button id="@+id/execute"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Execute"
/>
Which is actually not so bad in terms of verbosity. The Java code is uglier, in my opinion:
Button button = new Button(activity);
button.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
button.setText("Execute");
Especially the LayoutParams business, that is nowhere near as clear as the XML, where it's very obvious what values you're giving to what parameters. You wouldn't know that from the Java code without looking up the constructor for the LinearLayout.LayoutParams class. Now, with Hecl I could of course write the code by hand to make things 'friendlier', but I'm worried that if I have to do that too much, it will take a long time to cover the rather extensive API, and it will also bloat the code. The ideal solution would be subvert the XML stuff for my own purposes, however, that's proving tricky. My first idea was to utilize the AttributeSet parameter that you pass to many View derived objects' constructors, in order to transform code like this:
button -text hello -layout_width 100 -layout_height 34
Into something that Android can digest. Unfortunately, that's proving difficult, as the internals of Android barf on the class I'm passing them, even though it, to my knowledge, implements the AttributeSet interface without any problems. This really made me wish that they would hurry up and release the source code, because I would have a far better understanding of the relationship between the XML attributes and the Java methods if I had access to what's going on under the hood. Harumph. My next attempt was a hack that takes things like -text and transforms them into calls to setText, but that isn't as good, because you need a little bit more custom code for things like the layout parameters, which require special handling. However, lacking the source code, or some help from the Google folks with access to it (which isn't likely over the next few days as they're doubtless off consuming turkeys), it looks like that's what I'll have to do.

Raphael Geissert: freshmeat.php: a watch helper

Yesterday I posted to -qa about a watch helper script I wrote so freshmeat projects can be used in watch files.


By the time of writing this post there hasn't been any reply yet, which actually disappoints me.
So abusing a little on the fact that my posts are visible on planet.d.o I'd like to know what is everybody's opinion (replying to my message on -qa is preferred to seeing some blog post comments :)).

Freshmeat by providing an XML file with the project's information seems to be addressing the common problems caused when trying to keep track of upstream in a more-or-less automated way.

I really hope this script is put together with sf.php at qa.debian.org/watch/ to make it possible for even more packages to use watch files to keep up with upstream versions :).
And about the xml-fetching *problem* I'm open to suggestions and preferred ways of doing it.

Next thing to do is write some similar script for the kde,maemo,gnome,xfce,debian,qt,etc - apps,look,art,themes,etc .org websites (this will require some collaboration on the site's side unless I play with some regexes, again, to extract the information and generate some listings like with freshmeat.php).

18 November 2007

Evan Prodromou: 27 Brumaire CCXVI

I've been getting really interested in the new crop of Linux-based operating systems for mobile devices. I got a Nokia N800 earlier this year, which I've found really useful -- although a little frustrating, too. And I've been following the developments on OpenMoKo with great interest, too. So last Monday, when Google Android came out, I offered to give an experienced developer's opinion of the development kit for Network World. I spent most of the afternoon trying out the SDK, checking out the documentation, watching the presentation videos, and working on sample applications to get a feel for it. I'm pretty impressed with Android, and I think it's got a good shot to become the Open Source mobile application platform. I think that whoever wins in this space has the chance to shape how all mobile phone platforms work in the future, and to take a good chunk of the market. Opening up the phone platform to allow a real marketplace of third-party apps is, I believe, going to be a huge advantage for whoever can make it work. I think the main two contenders in the area are well ahead of Android so far, but they're really going to have to capitalize on that lead in the next 8-10 months before the first Android handsets are set to hit the market (late 2008 -- although we'll see about that schedule). And I'm not sure they've got the means and commitment to do it. Nokia has been screwing around with the N series of Internet tablets for a while. Which is great -- the operating system is clever, the GUI ("Hildon") GTK-based, and development in Python on the platform is a breeze. The basic tools -- media player, RSS reader (ingenious), Web browser, email, etc. -- work well. However, for unexplained reasons, Nokia hasn't put a damn phone into the thing. If there is a similar device that does everything that the N800 (or N810) does, plus has a phone in it, which one are people going to buy? It seems obvious to me. The other interesting OS is OpenMoKo, which I think is a great project with exactly the right goals. However, there's been some disappointment in the enthusiastic community around the OS as schedules have slipped and the developer preview devices shipped without a functioning dialer app. These two projects will have to fight uphill against the fear, uncertainty and doubt generated by the Android announcement and SDK release, even to stay in the game. And, to be fair, Google's announcement was masterful: classic vaporware -- for a product that won't be shipping for at least a year. But they got a pretty solid list of partners for the platform to sign on (albeit with only vague requirements for support). Best of all, they released a one-two punch of a bunch of developer information videos with tantalizing views of a nice-looking potential device, and a good SDK with tons of documentation and developer tools. It even includes an emulator that looks like a little phone. Awww! Android is slick, it's deep, and it's well-designed. The architecture is smart and sophisticated without being too clever for its own good. It's built on conservative -- maybe a little too conservative -- twin pillars: Java and Linux. For hardware providers, there's Linux's tried-and-true driver framework. For applications developers, way up at the top of the stack, there's good ol' boring Java, with new and smart APIs targeted specifically for mobile device apps, all on top of a new virtual machine called Dalvik that (supposedly) optimizes the hell out of Java bytecode. I was really impressed that the emulator emulates much more than just the Java APIs -- you can build ARM binaries in C that run on the thing. Very nice. Am I still going to get an OpenMoKo device? Maybe. But I'm going to continue playing around with the Android SDK, and looking for early developer versions of Android-supporting devices? Oh, yeah. Oh, and the article I did the research for is here; strangely it ended up on ComputerWorld rather than NetworkWorld. OK for me, though. tags:

More about me and my cool life So, I talked yesterday (Journal/27 Brumaire CCXVI) about how much weight I've lost in the last few months, which has been great. Another thing that's been going on for me is that I've started using the Getting Things Done process for scheduling my tasks and my time. I've never been particularly good at managing my time, but at least I've always known that however late or irresponsible I might be, my brother Ted would always be later. But when I visited San Francisco in August, Ted was really doing great. Friends and family kept telling me how responsible and down-to-earth Ted seemed lately. And whenever he had an idea for something to do, he wrote it down in his little Sidekick device. Ted showed me how the GTD system worked for him, and so I went out and bought the book and started reading it. I have been doing GTD for a few months now, and I've found it really satisfying. I don't worry as much any more about little things that I should be doing -- they're all captured in my system. It's really gratifying. I don't know if I've been quite as successful as Ted in improving my personal productivity, but I do know that I'm feeling a lot better about things and about myself. Which is really all that matters. tags:

Skating away Maj, Amita June and I went ice-skating today. It was AJ's first time out on the ice, and she really enjoyed it (most of the time). We had a couple of spills, mostly because it was really my first time skating with a 2-year-old, and partly because it was her first time skating with anyone. We went to the indoor rink near our old house on rue Cartier at the corner of Marie-Anne. Pretty soon we'll be able to go outside on the pond at Parc Lafontaine. catching our breath Maj isn't really a big skating fan, but she seemed to have a good time this time around. Which made three of us. I think we've got the makings of a Sunday-afternoon family tradition. We'll see, at least. tags:

More one-liners
  • I'm glad to see that the Mister Wong logo contest I talked about a while ago (Journal/21 Thermidor CCXV) has borne fruit. The top 12 logos look pretty good.
  • Maj and I have been catching up on season 3 of Deadwood lately. Great show, nice to see that season three is as solid as previous ones.
  • We've got RecentChangesCamp coming up in San Francisco in February 2008 (I think). Anyone interested should get involved at http://aboutus.org/RCC2008 .
  • What's the best alternative to the Sitemaps protocol for people who are into RDF? I'm thinking you could just make a hugantic RSS 1.0 feed -- after all, it is the "RDF Site Summary" format. Best of all, most search engines consume RSS as a recommended feed format. I'm going to try it with Vinismo and let you all know. The downside: I'm not sure many processors will handle a 100,000-item RSS feed very well.
  • Norman Mailer died just as I got around to reading the copy of ''Oswald's Tale'' I stole from the Driskill Hotel last year at South by Southwest. I can't help feeling responsible.
tags:

12 November 2007

David Welton: The Economist on Business Books

Kicking ass in an unflat world is The Economist's take on recent efforts in the world of business books. As the creator of Squeezed Books, their opinion was of interest to me. As is often the case, they don't disappoint, with lines like
Things to bear in mind as you do, he says, include the need for your company to have purpose, to seek out ideas from the fringes, and to embrace the democratising power of the internet none of which will be news to anyone who has been in business for more than a few minutes.
What really caught me eye, though, was this:
There is also growing demand from overloaded executives for shorter books. So in January Harvard will launch a new hardback series, Memo to the CEO , covering subjects such as lessons from private equity and the future of strategy. Each book will be about 100 pages long and will cost $20. In a similar vein, Harvard has adopted the approach taken by iTunes to pop albums, and has started to sell individual chapters of books online an idea that has been a hit with academics in particular.
A lot of good business books take a sensible central idea, and then proceed to fluff it up to a length where it can be published as a book. Often, this makes for a good read, as the anecdotes and case studies and whatnot are interesting, but for those in a hurry, or simply wanting to know what the basic point of the book is about, it's just padding. So, it looks as if the idea behind Squeezed Books is a good one, now I just need to get better at attracting more people to contribute summaries, and discuss the books on the site. One thing I've done to that end is stipulate that the summaries are available, unless otherwise noted, under a creative commons license.

9 November 2007

Adam Rosi-Kessel: Is the MBTA Killing Itself?

As I stand in a near cattle-car packed South Station, waiting while no trains arrive and no trains depart (”signal difficulties”), I wonder if forces are conspiring to make MBTA service so poor that it enters a death spiral of poor reputation for reliability, increasing fares, lower ridership, less revenue, etc.. One or two long delays or canceled trains in a short time span can be ignored, but after a while it may become impossible for the T to recover the lost goodwill. There’s a saying in trademark law, “once you’ve lost a customer, they’re often gone forever.” Are signal difficulties for real, by the way? More on this topic: this excellent op-ed in the Globe about the importance of mass transit to the local economy and life sciences in particular; contrast with this news about what the T plans as its next big project (hint: “T TV”). Not much good news here, either. Is anyone listening? Technorati Tags: , ,

Adam Rosi-Kessel: Is the MBTA Killing Itself?

As I stand in a near cattle-car packed South Station, waiting while no trains arrive and no trains depart (”signal difficulties”), I wonder if forces are conspiring to make MBTA service so poor that it enters a death spiral of poor reputation for reliability, increasing fares, lower ridership, less revenue, etc.. One or two long delays or canceled trains in a short time span can be ignored, but after a while it may become impossible for the T to recover the lost goodwill. There’s a saying in trademark law, “once you’ve lost a customer, they’re often gone forever.” Are signal difficulties for real, by the way? More on this topic: this excellent op-ed in the Globe about the importance of mass transit to the local economy and life sciences in particular; contrast with this news about what the T plans as its next big project (hint: “T TV”). Not much good news here, either. Is anyone listening? Technorati Tags: , ,

7 November 2007

Christian Perrier: 10 years of public transportation

On Sept 30th 1997, alternated traffic regulation was decided in Paris for the day, because of a pollution peak. As of now, this has been the one and only time this decision was applied and it won't probably happen again because of many (stupid) limitations: Anyway, when this happened, I was, like dozens of millions of moron^W people in the Paris area, driving from my home to my work place (the same home and workplace than now): 30km one way, between 30 and 120 minutes (most of the time 45-60). I then decided to try using public transportation for one full month and then see if I can survive it (as many people who seldom use public transportation, I had horror stories in mind, such as full trains, no respect of schedules and of course, the horrific FRENCH STRIKES). This was 10 years ago and I never stopped. Since then, my daily trip is: So, about 75 minutes from my home to my work place. 30-60 minutes "lost" per day? Not really. In the train, I can read, sleep (funnily an internal system always wakes me up at the right moment) and of course, hack on my laptop (which is my most common activity there). This, quite comfortably with enough room for my arms, feet. The same goes for the bus rides (I don't suffer from car sickness). I still haven't found a way to hack while walking (but I found some free Wifi spots at some bus stops). So, in my opinion, I *won* 90 minutes a day. And, indeed, Debian benefits it a lot as this moment is my privileged moment to work on my packages, or write stupid things in my blog, or just hack around and look for things to improve in our favourite distribution. In 10 years, I of course have a few "horror stories" about crazy schedules, missed busses and of course the awful FRENCH STRIKES. About the latter, the reality is that I just have to look at the special schedules on strike days...and spot the few trains that are schedules (either 1 every 30 minutes or, at worst, 1 every hour....when the usual schedule is 1 every 15 minutes)...and then I reach my home/work pretty safely, while many moron^W other peopl suffer from awful traffic jams on highways. So, in short, here am I, ready for 10 more years of public transportation use and being seen as an ET in my neighbourhood because I leave home by WALKING even if I am not a high school teenager. Strange person, indeed? Not to forget: from my records, I saved about EUR41,700 by doing this, assuming a cost of 0.4EUR/km, 60km/day, 200days/year for the car trips....and EUR623/year for my transportation card. I should buy a brand new SUV..:-)

6 November 2007

Wouter Verhelst: Programming languages suck?

Bruno De Wolf blogs about programming languages. His statement: "all programming languages suck". Not sure whether I agree. But's let look at his arguments. In his words, a good programming language, among others, is readable by a guy who didn't write the original program and who doesn't know all the language details or libraries. Personally, I don't agree. Code readability, above all, depends on the programmer. Programming languages that impose structure can probably help, but it's possible to create unreadable code in any language—that doesn't need goto. Since I went to the 'karel de grote' institute of higher education, I learned quite a number of programming languages. Hairy code is possible with all of them. Unreadable code is easy with some of them, and some of those I do consider good programming languages. I guess my criteria are different: That's it, I guess. In my book, a programming language is a tool to get a job done. A good tool is flexible, not too unwieldly, and somewhat intuitive. Like a hammer. If you want to build a table, you probably need a hammer, among other things. The better the hammer, the more likely it is that you'll get a nice table. But even the best hammer won't get you a wonderfully crafted table if your carpenter sucks at his craft. And so it is with programming languages: it might help if you use a proper language, but any good programmer can write readable code in any programming language.

Christian Perrier: RWC: why did France lose...

...at least, in my opinion (which is obviously biased, let's admit that). There are several reasons for this loss: Some *bad* reasons for the English victory:

Next.

Previous.