Search Results: "agi"

17 December 2005

Jonathan McDowell: X11 Programming

I'm feeling somewhat stupid. I sat down tonight to have a look at writing a basic fire/flame demo thing under X (the sort of thing people used to write in 3 bytes of x86 assembly 10 years ago). See, I'd quite like a funky xdm/login thingy for my laptop, so random people who see me use it on the train think "Woah, cool". I'm sad like that. Anyway, my idea is a ring of fire with the login prompt in the middle. This seems simple. Except when I try to get involved with programming X. Now, I'm not a graphics programmer by any stretch of the imagination. But all I want is a nice simple framebuffer I can store pixels of 24 bit colour into. Or 8 bits with a colourmap is fine too. If the functions for dealing with the colourmaps are decently documented. This isn't much to ask, is it? Perhaps the issue was that I assumed Xlib would just provide me something that could do this. Or that I'd be able to find decent docs easily. Or that I had more than 2 braincells to rub together. But I've given up now. I really don't understand how to get Xlib to just let me XSetForeground to a 24 bit colour and then XDrawPoint. I tried to fight XAllocColor. I even accepted defeat and had a quick look for a simple X framebuffer library. No joy. So, can someone point me at the right docs to inhale for this sort of thing? Or a really lightweight C library that'll make it all really easy?

15 December 2005

Benjamin Mako Hill: OLPC and Charges of Technological and Cultural Imperialism

Quim Gil asked a number of good questions about the One Laptop Per Child initiative. I will not answer all of his questions now and am not sure answers exist yet for every question. With that said, I will try to answer his final question with the traditional disclaimer that the thoughts expressed here are my own and may or may not be shared by others within the project are not the official position of OLPC. Quim asked, "what measures will be taken to avoid or [inhibit] the spread of a (unconscious or well-intentioned?) cultural neocolonialism?" I have been asked this question many times. It is an issue that concerns me personally. As such, I'll give you my personal feelings on the subject. Discussion of cultural colonialism, Westernization, Americanization or techno-imperialism are hardly limited to OLPC. Sometimes it comes in the form of reactions against what is seen as the homogenizing or Americanizing effect of US-based multinationals (e.g., McDonald's or Nike) or against the culturally oriented US-based motion picture or recording industries. In terms of technology, the debate is often framed in terms of Appropriate Technology. There is an argument that modern information technology -- designed and developed in highly industrialized countries to address their particular set of cultural contexts and needs -- may be inappropriate and potentially dangerous in the developing world. This is a fair critique. But while there may be a danger, insisting that the technology be kept out is unrealistic and may miss the larger evil. These discussions can not responsibly ignore the fact that, depending on whose numbers you trust, there are between and 1 and 2 billion mobile phones in the world today and that number will reach something like 2.6 billion operational units in 2009. That's nearly half the world population and it's not hard to find out where most of those phones are going:
All the growth in subscribers is coming from emerging markets," says David Taylor, Motorola's director of strategy and operations for high-growth markets. Researchers predict that of the 1 billion cell phones expected to be sold in 2010, half will be in developing economies. (link)
Information and communication technology is, in one form or another, on a fast track into the developing world. That may very well be a problem but it's not the biggest problem in this field. The bigger problem is the nature of the technology that is being imported. People in the, rich and developed countries may have cellphones, but they frequently also have computers: full-fledged, reprogrammable, hackable computers; computers that they can use to write software, design hardware, install new OSes on, and even -- if they are really adventurous -- use to reprogram their mobile phone. People in the developing world will have information technology (in the form of cellphones at least) but do not have the ability -- no matter how interested, talented, or intelligent they are -- to change the way they work. This is the greater danger. The most powerful and empowering quality of information technology in the context of personal computers is that as communication is being mediated, facilitated, and defined through software on computers fully within users' control, each user has the ability to determine the terms on which they communicate. In a world where people are communicating, trading, voting, learning, working, and organizing through digital channels, massive power lies in the hands of those who have the tools (e.g., computers and development platforms) and access and permission (e.g., Free and Open source software) necessary to make the necessary changes. In three years, there will be a billion people in the developing world who are using information technology on the terms and at the whim of the today's global elite and they will not be able transcend their role and consumers and subservients in this context. Their ability to transcend their depressed role in larger economic contexts will be highly influenced by this fact. The developing world's "computers" will not be able to create or change the software that define them. The code that runs these devices will be proprietary and will remain immutable even in the context of additional hardware. Unless we do something about it. As far I'm concerned, that something is two steps:
  • We need to create and distribute -- real computers that can be used as development platforms -- at a price that can begin to compete with their alternatives (e.g., phones, thinclients, WebTVs, etc).
  • We need to make sure that these machines are hackable -- totally hackable -- on every level. That means open hardware. That means Free and Open Source software. That means open specifications, protocols, and data formats.
That is my personal goal in OLPC and it is one that has seemed to have been echoed by others involved in the project. Of course, I have hardly washed myself or my project of the stigma of cultural imperialism yet. That said, while making a completely malleable machine allows every user to, if they choose to, transcend their role as a consumer of technology and technologically-defined culture, one side effect of this process is that it also allows them to do so on their own terms. Because the machine is completely free and open, users are free to use the machine in ways that not only have the originators not considered, but that they could not imagine. With time, the machine -- and its software in particular -- can be rewritten, reshaped, and eventually replaced with something of, by, and for its users. Of course, this will not happen overnight. As the first step, OLPC will attempt to create something we think provides a compelling and flexible platform with which the world can learn and build. With this in hand, governments and ministries of education that purchase the machine will get to shape (or replace?) the platform in line with their own ideas and curricula. As the students and communities to which the machines are deployed learn and build with and upon the machine, another transformation will occur. As those communities grow in relation to their technology, this change will be sustained. The potential for this dynamic and empowering relationship is the reason I'm here.

Gunnar Wolf: Moving between version control systems

As many people have expressed in their blogs after Bubulle's initial rant, I am also joining the game :)
Some weeks ago I decided to finally move my personal documents repository from CVS to SVN - Why SVN? Because I don't need a distributed system, I am the only person with write (or read) access to it... Besides, I'm too lazy - The one feature that made me start using SVN and not any other system is that you can use it just as if it were CVS, but without the ridiculous constraint placed by just integrating many individual files instead of managing the whole beast as a repository.
I had a problem, though, that made me lose good part of an evening - I think it might be related to #333105, but I'm not sure: I converted my repository using cvs2svn, which saved all my five years worth of commit history (whee!), grouping commits that seemed to belong together in single SVN transactions (whee!!)... But binary files were all corrupted. To make things worse, I didn't notice this until I had to present a talk in Peru - and my laptop's working copy was severely FUBAR.
Well... I managed to give my talk - And yesterday I finally decided to restore sanity to my life, reviving my doc_gwolf SVN tree. The stupid steps?
Phew :-/

14 December 2005

Joe Wreschnig: How to remove features

Given that the perennial, uh, “discussion” about GNOME’s features is on us again, I thought I’d share the method I use to remove options from Quod Libet. I break them, and see how long it takes people to notice. Well, no, not really, but the amount of brokenness in an option is a good metric for whether or not people change it. One of the first options in QL was a checkbox for “Show album cover”. Sometime around 0.7 or it became impossible to turn this off, and I didn’t notice until I was redoing the preferences dialog for 0.11. Rather than fixing it, I just removed a few dozen lines of code and made it always on. No one has ever asked for it back (though someone probably will now). This has happened a couple of times. On a related note, three months ago Bram Cohen made an interesting post about configuration in software, which has been rolling around in my head picking up smaller objects since. There’s a lot of “configuration” that we don’t think of as configuration — for example, the volume in an audio player is stored in basically the same place (same file, GConf tree, whatever) as, say, where the program looks for files. But we only think of the later as part of our “configuration.” That’s because we control the volume “nearby,” in the same place we view it, but the location to look for files in a very different spatial place (an entirely separate window). No one would be crazy enough to put a volume control in a Preferences dialog. So “configuration” becomes synonymous with “hard to find”. The answer to configuration creep, then, is to provide as much direct manipulation as possible. At least from the UI perspective. You’re still screwed from the combinatorial explosion on the implementation side. Beyond that, one thing I’d really like is for context menus to be more common. That is, users should be able to expect to right-click on a widget, and change changable aspects of that widget. This also means making right-click involve no surprises — it shouldn’t activate buttons, shouldn’t delete things, etc. Otherwise people will be too afraid to right-click to try configuring. This feels like a good substitute for when direct manipulation isn’t really possible, because the most direct form of manipulation is already taken up by the widget’s primary purpose. Anyway, Quod Libet is going to be moving in this direction in the future. We already have plugins configurable in the same dialog where you turn them on and off. In 0.16 the tray icon has become an interface almost unto itself, and so it has a separate Preferences dialog now, launchable only from the icon. (It also only has one thing to configure, but that might change. Most importantly, it can grow, without getting in the way of people who don’t care about the tray icon.) For 0.17 I’m probably going to fulfill the common “display remaining time” feature request by putting a radio context menu on the time display. And so on. Fixing Real Bugs
But enough about UI wankery. Does anyone know of a nice C parser for Python? Inspired by a bug he found in mmapmodule, Michael’s written a tool to find type signature issues in CPython functions, but its usefulness is lessened by the fact it returns a ton of false positives and probably also misses many things as well. You Are All Self-Absorbed
My project for a class this semester involved trying to extract useful categories from the link structure of weblogs. Unfortunately it turns out weblogs are all about navel-gazing, and the link structure isn’t at all useful. The majority of shared links on Planet Perl,Debian,GNOME,Python pointed to perl,debian,gnome,python .org, and the majority on MSDN Blogs pointed to microsoft.com. Only about 10% of links pointed to a post on another weblog. Given that additionally weblogs tend to not have comments (and even if they do, people reply in another weblog post anyway), that’s kind of sickening. Can you imagine how much email would suck if only one out of every 10 mails got a reply? I wouldn’t be able to spend all day reading about how Debian’s FTP masters are doing their job properly.

Benjamin Drieu: CVS rulez (Score:-1, Flamebait)

As it seems people are arguing about the revision systems hype, I just wanted to point that CVS rulez. Sure, it does not $some_obscure_witty_feature but, hey, is this feature really useful? I've been using CVS for ten years, coded around 500k source line of code and honestly, it suits all my needs. To tell the truth, I don't even use all of its capabilities. So, CVS can't keep history of a file when you move it. Big deal? After all, renaming a file is just like creating a brand new one. Leave a commit message stating previous name of foo is bar if you really need history and that is it. So far, I never stumbled upon a case where this "feature" limited me or made me loose more than 15 seconds. Same for distributed RCS. Sure, on the paper they look good. Call me a moron but I never managed to use one properly. Even a large but well managed project does not need such monstruosity. Matthew is right on one point: RCS are like languages, geeks advocate languages because of a specific subset of features. But they don't realize 90% of functionality of a language is present in all other languages and the 10 other percents can be achieved with method if you really need them. I personally find very discouraging to learn a brand new RCS for every project I contribute to if upstream has decided this one is cool. If you want users to contribute, use a standard RCS as well as a standard mailing-list system, common language, etc.

13 December 2005

Uwe Hermann: Rails 1.0: Party like it's one oh oh!

Yay. Ruby on Rails 1.0 has been released 39 minutes ago. I will probably check it out for real now (although I usually use Drupal for web development work, of course). They sure have some funny quotes on their website ;-)
Ruby on Rails is astounding. Using it is like watching a kung-fu movie,
where a dozen bad-ass frameworks prepare to beat up the little newcomer
only to be handed their asses in a variety of imaginative ways.
--Nathan Torkington, O'Reilly Program Chair for OSCON
(via mir.aculo.us)

Aigars Mahinovs: Here is a quick idea for you - Free Software tax. ...

Here is a quick idea for you - Free Software tax.
Imagine a voluntary 1% tax that is collected by a non-profit US foundation from the people that signed up for the program. Imagine that amount exempt from the usual taxation. Imagine that money channelled to Eastern Europe or Russia or India or China or anywhere else where the cost of living is low and a lot of smart people live. Imagine then that students are hired for 4-10$/hour to work on free software tasks that are voted on by the "taxpayers".
So, anyone up to implement that? If you do, please contact me for coordination :)

Update: A USA foundation to get the money from USA, similar organisations in other countries would be needed to gather donations from that countries (in order for that money to be tax deducible). Of course students or other people from USA or Germany or UK or whatever would also be able to participate in getting the money, but the catch is - while 4$/hour in USA is half of the McDonalds pay, it is 4 times more then McDonalds pay their workers in Latvia. Quality control by feedback: after completion of a task - a mentor of the task leaves feedback in the profile of the worker.

Matthew Palmer: Diversity in Revision Control

Josselin Mouette has thrown down the gauntlet -- Subversion is the One True Revision Control System and we should all just Stop Worrying and Learn To Love The Handcuffs. In particular:
[...] just use subversion, and if you feel it's missing features, please contribute them. By standardizing on subversion, we lower the barrier for people wanting to contribute, instead of increasing it by asking them to install and understand new tools.
Quick thought experiment, Josselin: replace "subversion" with "Java". Or "Perl", or "C", or even "Python" or "Ruby". Or any other language. It doesn't matter which one. Even if the language you substitute is a good one, and one you happen to like, it's still a fairly obviously braindead idea -- that there can possibly be One True Programming Language for all problems, and that there can never be any improvement that can't be bolted into the existing OTPL. Revision control isn't so much different from programming languages. Different systems will provide different advantages and disadvantages. There's also incremental and revolutionary improvement that will take place over time -- machine code to symbolic to procedural to object oriented -- that can never take place within the established framework. I happen to really like the distributed model -- it reduces (though, naturally, cannot eliminate) the division between the Blessed and the Peons in a project (those with direct commit access vs. the rest of us). You can get disconnected operation for (almost) free. Also, despite the assertions contained in your article, the "barrier to entry", ironically, is actually lower with a good distributed RCS than with Subversion. The barrier isn't what you think, though -- sure, using an unfamiliar RCS is troublesome, but it's a lot less hassle than learning a new language, and people do that on occasion to hack on a particularly interesting problem. The real barrier to entry is forcing anyone who isn't blessed with direct access to The One And Only Repository to use inferior development support tools. "An example!" I hear you cry. Gladly. This morning (literally) I got enough of a handle on the internals of Ruby on Rails to actually track down a bug that was irritating the crap out of me. Being a good developer, I wanted to use revision control to track my changes. In the All Subversion, All The Time "utopia", that would involve getting an anonymous checkout, making a copy, hacking on the copy, then (when all was done) running diff -urN between the original and the copy, and sending it all upstream with a manually-created log message (assuming I could remember everything I'd done). You also need to manually remember (or encode it in your directory or something) the source of your tree, so upstream can merge it reliably (and compare it against other equivalent work that may have been done in the meantime). Doing it better, I could do an anonymous checkout, and then import it all into a new Subversion repository (or directory) of my very own, and hack on it in there. Benefit: revision control of my changes. But it's non-trivial to create a new repo and import everything into it, and there's still no automatic record made of the upstream source of my new repo. Wanting to make a second change is even worse -- I either have to make a whole new copy of my source tree (disk is cheap, but this is getting silly) or just keep forging ahead with changing my existing tree -- so this second set of changes can end up being dependent on the first (which is Not So Great if upstream don't merge your first patch). In the "new repo" scenario, you can branch from the root of your new repo and continue hacking on your newly created branch, which is a good start, but it's still icky. And good luck having the system track new commits from upstream while you're working, too. If the project was using a DRCS, in contrast, the problem would reduce to making a branch into your local archive, hacking (committing at will), updating with new upstream commits as you go along, and then publishing your changes to a public place for reintegration (or, in some cases, sending your changeset via e-mail). Oh, and before anyone starts screaming "if anyone can branch, it will encourage forking!", consider which is more likely to result in a permanent fork (rather than a temporary independent line of development): a local set of changes in a tarball or local subversion repo, both of which are hard for anyone else to collaborate on without major pain; or a branch in a simple-to-publish (or push) designed-to-be-shared DRCS archive, which automatically keeps all of your interesting metadata intact and coherent across archives, merges, time, and space (and possibly even dimensions). This utopia doesn't really exist, and is hampered by everybody having their own Pet DRCS, but the problem, I'm fairly sure, is transient, and my main point isn't even so much against the choice of Final Ultimate Solution, or even the problem space, but more about the attitude that everyone should get behind Any One System and stay there. I can't imagine the world of pain we'd be in if Josselin had posted his message a few years ago (but with s/subversion/CVS/i, naturally) and everyone had followed his advice -- can you imagine per-file changesets with no effective merge capability for the rest of eternity? <shudder />

11 December 2005

Matthew Palmer: Planet Saves the Day!

Never one to miss out on a good fad, I've recently been getting interested in Ruby on Rails. (OK, maybe it's not fair to call Rails a fad -- it looks really good -- but it is the Tech Of The Moment). What's the first thing you do when you hook onto a fad? You find the relevant blogs. Handily, RoR (as the in-crowd calls it) has a Planet-style aggregator, Planet Ruby on Rails. Less handily, the site is running a *very* half-arsed aggregator script that doesn't escape any of the HTML in the entries, so Liferea summarily spits the dummy at them all and I see nothing but titles in my viewing window. I sent a polite (yes, really!) e-mail to the site admin, asking if it might be possible to get an escaped version. I haven't had a response in a few days, and a lot of the entries look really interesting. So, I've installed my own local Planet RoR aggregator -- running The Real Planet. Planet is astonishly easy to install -- 3/4 of the work was writing the shell script to take the OPML from the original Planet RoR and massaging it into Planet config.ini format. So now I have Real Articles to read again. Life is good.

9 December 2005

Thomas Hood: tinnitus still

It's a month since I was exposed to excessively loud music at a concert and the tinnitus is getting worse. Imagine an infinitely long blackboard, and someone walking along, squeaking the chalk, forever. The sound is in your head when you go to bed, there when it wakes you up at night, and there at every moment of the day, demanding your attention. Damage to the inner ear does not heal. There is no cure. You are told to learn to live with the incessant noise, and to look forward to a life without silence.

8 December 2005

Enrico Zini: Making a film out of vncrec output

I have a vncrec output and I need to encode a film out of it. Note: this blog entry is getting updated with the feedback I receive by mail. All the part about recording an X session is being maintained in the Debian wiki. transcode won't work: tried everything, googled a lot: either it exits right away, or I use the dvd delay option and it shows an error from vncrec and does nothing. vncrec can generate xpm files, one per frame. However, imagemagick won't grok them complaining they have an illegal header. And xpmtoppm will complain that there is a line inside the file which is too long. The only thing that can load them is gimp. So, let's script gimp. I came up with this python script that kinda does the trick:
from gimpfu import *
def process (file):
      img=pdb.file_xpm_load("/home/enrico/tmp/cazzeggio/"+file+".xpm", file+".xpm")
      pdb.file_png_save_defaults(img, img.active_layer, "/home/enrico/tmp/cazzeggio/"+file+".png", file+".png")
      # (update) added to dispose of the image to avoid gimp swap to grow
      pdb.gimp_image_delete(img)
for i in range(1, 10000):
      process("img_%05d"%i)
Tested in the gimp python-fu console, it works, with the save and load progress bar popping up all the time grabbing the focus from whatever I was doing. There is a run_mode that can be passed to those file_xpm_load and file_png_save_defaults, however python-fu is happy to let me know that I don't need to bother about it. I searched, searched searched and I found out that this really means that there's no findable way to tell Gimp functions to STFU with python-fu. Now, how do I run that script AND be still able to use my computer? gimp has a nice --batch commandline option, from which it seems to only understand scheme. It has a --batch-interpreter option, but I couldn't find out any possible value that could make --batch understand python. So, it seems that the only way to run python is to either register a plugin, or type it in the python console. And no STFU. So I tried Xnest, so that I could at least iconise the whole thing out of my way. But it seems that xnest is denying connection from all clients I try to run in it. So I've run a VNC server. In the VNC server I run Gimp. Then I fire up the Python console inside that Gimp. Then I paste the script in the Python console. Then it starts working and I close the VNC client to get rid of the popups. Finally, this script helps me delete the big XPM files after they've been converted to PNG:
#!/bin/sh
for i in *.xpm
do
      if [ -e  basename $i .xpm .png ]
      then
              echo rm $i
              rm $i
      fi
done
If there were easier ways to do what I did, please mail me and I'll document them: no matter how I searched, I couldn't find any. Update: it seems that in the Gimp python script, the image doesn't get automatically garbage collected. As a result, the file ~/.gimp-2.2/gimpswap.whatever keeps inflating, so space is not really saved by converting the XPM files to PNG, unless I restart Gimp from time to time. Update: I found a function to deallocate the image: maybe that avoids the growth of the Gimp swap.

Arnaud Vandyck: jai-core in Debian?

Mid October, I contacted the jai-core project on java.net to change the license to a free/open source one: Issue35. He just replyed he is accepting the issue. This could be very good for fop or other packages that use jai in Debian. Many thanks to aastha! Note from the website:
This project contains the source code for the core Java Advanced Imaging API reference implementation containing the packages javax.media.jai.* and com.sun.media.jai.*

NOKUBI Takatsugu: Binary 2.0 Conference and some presentation methdos

Last week, Binary 2.0 Conference (Japanese) was held. "Binary 2.0" is a new buzzword inspired from "Web 2.0", so the definition is not clear. But many peapole enjoyed the conference. In that time, there are two new presentation methods. The first one is SPS - SDL Presentation System (Japanese). It seems realy cool. The presentation had some beautiful effects, like wave of water on the mouse cursor. The second one is GDB presentation method (Japanese) . He made a MIPS compatible CPU on a FPGA board, and control it via GDB remote debug protocol. It is also cool. On the other hand, I tried to make my presentation by Macromedia flash. It is my challanging since 2003, however I can't beat the above methods. However my method has an advantage, portability. The SPS make an executable file, it is dangerous to execute, and not portable. My presentation file can play under many flash player, like rich mobile phone's browser.

7 December 2005

Wouter Verhelst: Belpic 2.40

When I had almost finished packaging belpic 2.3.13.full, I contacted upstream to notify them of this fact, also mentioning that I'd replaced their build system (which used simple makefiles with many bugs) with an autotools-based one. To which I got the reply that they'd already prepared a belpic 2.40 in the mean time (available at readers.eid.belgium.be), and that they'd switched to SCons as their build system in the mean time. Since I'd spent quite some time on 2.3.13.full already by that time, I decided to continue to prepare that package, and focus on 2.40 afterwards Now of course I'm happy that they chose to use something different from plain buggy MakeFiles. I'm less happy that they chose something based on python, a language which I haven't liked, ever, and don't know much about either, but, well. That's their choice, right? I'm also less happy with the fact that it doesn't properly clean up after itself (requiring me to do ugly stuff in my debian/rules clean target), and that it doesn't work. Grmbl. The build currently fails on a file that hasn't changed, because it can't find a symbol which is defined in a file in the same directory that hasn't changed, either. When I rerun the gcc call with the -save-temps argument and review the preprocessed source, I see that that include file is mentioned, but not included. Something is clearly wrong here. Guess I'll have to start learning python... hrmpf. If you care, belpic is the software required to read out the information and keys in a Belgian electronic ID card. Not of much use if you don't need to read Belgian ID cards, though :-)

Anthony Towns: On Joey on Permissions

At the end of an interesting piece on permissions, Joey Hess concludes:
I could give many more examples of subsystems in Debian that exist at different point in the spectrum between locked down unix permissions and a wiki. There seems to be a definite pull toward moving away from unix permissions, once ways can be found to do so that are secure or that allow bad changes to be reverted (and blame properly assigned). Cases of moving in the other direction are rare (one case of this is the further locking down of the Debian archive server and BTS server after the server compromise last year).
I think Joey’s focus on “unix permissions” is a bit misleading; you could make the same argument more generally by talking about permissive and restrictive regimes. Permissive systems have the obvious risk of vandalism in various forms, whether deliberate and malicious like adding false information to wikipedia, or well-intentioned contributions that are low quality due to simple ignorance or carelessness. On the other hand restrictive systems have the somewhat subtler risks that good contributions will be turned away because the restrictions are more effort than they’re worth, and that the time it takes to administer the restrictions start detracting from the time to actually do the work in the first place. So obviously there’s a tradeoff. But as well as that, there are ways of easing both risks: the risk of vandalism can be overcome if the stuff isn’t relied upon too heavily and can be changed relatively easily – so problems in unstable aren’t much of an issue since they can be fixed in a day, and don’t affect people running mission-critical systems because they should be using stable or testing or similar. Likewise, managing restrictions can be distributed too: the new-maintainer process is a good example of that, in that a range of people are involved in helping people pass through the qualification round, and in that sponsorship allows people who haven’t passed through the main lot of restrictions to get their contributions in by going through a different process. One interesting approach, to my mind, is worrying less about permissions and more about space – so that different people with different ideas on how to do things can do them independently. That’s part of the idea behind usertags and usercategories: rather than having people try to find an imperfect compromise, let them work on the same stuff in the way they actually prefer. That reduces the risk of carelessness, in that you stop having any reason to bother other people, and also reduces the problem of restrictions, in that if you don’t have permission to work in someone else’s area, you can just setup your own area and work there. Perhaps the worst problem is if the drawbacks feed on each other: a restrictive system turns away contributions, which causes prospective contributors to get frustrated and hence careless, which then reinforces the reasons that the restrictions were put their in the first place and diminishes the chance they’ll be reconsidered. That’s a hard cycle to break, but it’s not one where anyone really wins. I’ll leave the last word to Joey:
Anyway, the point of this is that, if you survey the parts of dealing with the project where Debian developers feel most helpless and unempowered, the parts that are over and over again the subject of heated discussions and complaints, you will find that those are the parts of the project where unix permissions still hold sway. […] The challenge, then is to find ways to open things up to everyone, without throwing security out the window. It has to be done a piece at time, and some of the pieces that are left are the ones most resistant to this change.

5 December 2005

Martin F. Krafft: Drugs and the law

It is my strong belief that the law should diversify more when it comes to drugs and their use. In particular, the law should differentiate between
  • drugs that are dangerous to the taker, or can cause long-term damages, such as physical or mental addictions. This class would be primarily made up of the so-called hard drugs: opiates, entactogens, inhalants, steroids, sedatives, and stimulants.
  • drugs that cause hightened awareness and give the taker the ability to approach life, society, or any sort of philosophical question from different angles. In places, these are referred to as intellectual drugs: hallucinogens and (some) herbals.
If the law differentiates this way, each country could make it explicit whether it tries to protect the individual (which it should), or whether it protects the equilibrium of society (which could be considered fascist). Important: this is all about use of a drug. Cultivation, dealing, and related acts must be under separate and harsher legislation. The black-white approach taken by most governments these days really just pisses me off. Who are they to decide what an individual may do (or not) with his/her own body, assuming no harm comes to third parties? PS: No, I am not a junkie. I just get annoyed when someone is jailed for smoking pot or eating magic mushrooms in the forest. Especially if you know and respect that someone. NP: Mono, Under a Pipal Tree

James Morrison: Bachelorhood

I would like to annouce that I am a much better bachelor than Simon. For instance, my fridge is unplugged, the breaker on my stove is turned off, I have no phone, no couch, no table, and no tv. I throw my laundry into two piles. The clean pile and a dirty pile. The key to the two pile system is that the piles must be separated. Lastly, I am a much better cook, I only have one pot/wok thus I can make and eat a meal using only one pot and one utensil.

So, given Simon's announcement, imagine how poor a bachelor he would be without my help.

2 December 2005

Steve Kemp: Torrents + Perl

BitTorrent
BitTorrent is one of those applications that most people love. I love it when it works but I find it unnecessarily cumbersome to deal with. One example of what I dislike in the software - you can’t tell when a torrent has finished. Start a download:
btdownload curses headless  foo.torrent
Once the download has finished it doesn’t stop, it just continues to share the files and allow others to download faster. Great 99% of the time. But utterly sucky when you want to download XX files. The natural temptation is to run:
for i in *.torrent; do \
  btdownloadheadless $i
done
That doesn’t work. The first one never finishes. There isn’t even the option of exiting once the download has completed - or running another command, say. (OK my copy has “–at_finish=/bin/foo” - but only because I patched it. This just seems like a basic requirement, right?) Despite that it works well so I can live with it. My other irritation is that there is no functioning Apache mod_bittorrent where files into a directory have their .torrent files created and handled magically. There was a project to do this, but it appears dead now. Shame. Every now and again I get tempted to work on it, then I remember that I have big limits.
ION
Lots of Perl coding today. Simple plugin interfaces, and cleanups of old code. Almost enough to keep me awake.

Simon Law: WvDial

I've been struggling to get WvDial out the door for about two days now. This is why I'm still in the office at five in the morning. I thought I was just about done when I discovered the plethora of Debian bugs filed against it. WvDial is a magical piece of software that figures out how to talk to your modem to get you connected to your ISP. It used to be very popular back when everyone in North America used dial-up access to get on the newfangled Internet. Nowadays, many people have broadband service, so it's popularity has waned. However, people are starting to use bluetooth mobile phone modems now, so we're seeing a resurgence in popularity. Which is why, of course, I'm hoping to get another release out the door. I have the impression that I can't fix all of the bugs this time around, mostly because I don't have the hardware. But the easy ones should be solved so that we can concentrate on the tough problems.

1 December 2005

Matthew Palmer: OOP and the Get/Set issue

Steinar, your comments on the limited utility of Get/Set methods both struck a chord and touched a nerve with me. On the one hand, I completely agree that people need to spend more time writing methods that do something useful to an object rather than just exposing public methods. For example, how often have you seen something like this (in faintly python-inspired syntax):
 obj.count += 1
 [...]
 obj.count -= 1
 [...]
 if obj.count == 0:
 	obj.destroy
Instead of the far more descriptive (and well-encapsulated):
 obj.register_user()
 [...]
 obj.unregister_user()
 [...]
 obj.destroy_if_unused()
(or any one of a thousand other similar idioms). This is a contrived example, of course, and a real example would involve doing at least a dozen operations on an object's public attributes from another class (which results in class-associated logic being located in other classes in the system) instead of putting it in a method and calling that (thus keeping all of the logic with the data it's manipulating -- which is the point of OOP). Anyone who writes code like the first example above and calls it OOP is kidding themselves. Of course, you could make the code even more ridiculous with getter/setters:
 obj.setCount(obj.getCount()+1)
 [...]
 obj.setCount(obj.getCount()-1)
 [...]
 if obj.GetCount() == 0:
 	obj.destroy
Incidentally, if you ever see anyone turn the first example into the last example and say they're "improving encapsulation", please do the programming world a favour and kill them. kthx. On the other hand, Steinar, you say "I'm not denying that getters and setters for a few variables might make sense", which clouds the issue immensely. The idea of routing attribute access through a method is immensely useful. It even has it's own name -- the Uniform Access Principle. A few examples are in order (you might already have thought of these, Steinar, but who knows who reads my dribblings!): In my real-life case, there were few enough places to change all of the calls to a method, and since it's all written in Python I could have played __getattr__ games to get back to a method if I'd had to, but it would have been messy. But imagine a system written in a language that doesn't (somehow) support the Uniform Access Principle, and which was widely deployed (possibly even used by programs outside of our direct control) so the users of the class couldn't be adapted easily. Nightmare. Now, the real solution to the problem is to only use languages which support the UAP (Python can be hacked to do it; Ruby is, IMHO, almost a case-study in How To Do It; and there are other good languages out there). But, in ass-backwards languages that can't transparently map attribute accesses to method calls, I'd rather deal with getX()/setX() everywhere than have to try and perform the necessary gymnastics to later support dynamic value generation from what-was-previously-an-attribute. If, on the other hand, your post was primarily targeted at said ass-backwards languages, or programmers who cargo-cult manual getter/setters everywhere, let me join you in your derision. <grin>

Next.

Previous.