Search Results: "cas"

19 November 2006

Erich Schubert: Video transcoding

My camera has a video function. Nothing special, but it works okay. Actually the image quality maybe is even better than a typical PAL or NTSC camera. There are other drawbacks - tiny microphone, and I can't zoom while recording or handle light changes. So it can't replace a real camera, but it's okay for some limited use cases. Last weekend there was a Balboa workshop in Munich, with excellent teachers. At the end of the days we recorded the teachers repeating the moves they tought us during the day. A perfect situation to use my camera: good lighting, no lighting changes, no zoom changing needed. These videos are quite big, due to the limited compression capabilities of the camera. (the video codec they used is MJPG, i.e. the camera just saves 30 jpg images per second). So I decided to recompress them. I tried transcode first, but it messed up the audio (which played back at double speed). Mencoder worked like a charm. Size savings of a factor of 8-12 are easily possible (well, depending on your camera, YMMV) without much tuning or serious loss in image quality. Here's the commandline I used:
mkdir out
for nam in *.avi; do
  mencoder "$nam" -ovc lavc -oac lavc -vf hqdn3d \
  -lavcopts acodec=mp3:abitrate=48:vb_strategy=1:vbitrate=600 \
  -o "out/$nam"
done
Notice that I also enabled a noise filter. Due to the nature of MJPEG, there is a certain amount of noise in dark areas, which I don't really care about. Filtering noise both improves compression and image quality IMHO. Depending on your video, of course. Here the dancers are well-lit, just the background isn't; I don't want to see noise in the background amplified by a compression trying to adopt to it. :-)

Ross Burton: Sound Juicer "Wish I Could Stop You From Talking" 2.16.2

Sound Juicer "Wish I Could Stop You From Talking" 2.16.2 is out. Tarballs are available on burtonini.com, or from the GNOME FTP servers. Loads of fixes!

Sven Mueller: Why is VoIP/SIP so hard?

Eric has asked: Why is video conferencing so hard? Actually, I would extend that: Why is SIP so hard? It’s far from being easy to find suitable SIP clients which support chat, voice calls and preferably also video calls. Preferably, I would obviously like to find versions of the same client for different operating systems, but I would actually accept any sufficiently stable clients. Currently, my research is focussed on a Windows client, but I will soon also need one for Linux. As of now, the client closest to what I would like seems to be CounterPath’s eyebeam/X-Lite, which supports chat, voice and video, including proper presence support, but it has several problems, the most annoying ones being a nice “little” memory leak (going from 50MB total size to 350MB total size within a few days without much SIP activity) and the fact that it sometimes uses up 100% CPU while putting itself to high priority, which makes it almost impossible to recover from this without a hardware reset. I’m glad WengoPhone went GPL[*] for their 2.0 version. From what I saw, WengoPhone is quite promissing and the fact that it is now opensource makes it much more likely that it evolves quickly into a stable, portable and usable platform for SIP telephony. Anyway, if someone knows good SIP clients, which support at least voice and IM/chat and run on Windows or Linux (preferably both), I would surely be interested. [*] In case anyone wonders like I did: the source for the WengoPhone 2.0 pre-releases/release candidates is available only via a subversion checkout as described in their wiki.

18 November 2006

Martin F. Krafft: Online in the skies

I am sitting on Singapore Airlines flight SQ 25 from Frankfurt to Singapore and have wireless connectivity, reasonable for SSH usage. The service provider ConnexionByBoeing is phasing out of business, and in a move to appease the passengers, made the service free of charge in October, throughout the end of the year. This is definitely a first for me, to be able to "surf" several thousand metres above the ground. And while it certainly makes the next twelve hours seem like a lot less [*], I do wonder whether I'd even want broadband on every (long-distance) flight. Flying has always been relaxation to me, time off to read or watch movies I'd otherwise never see, to sleep, dream, stare at clouds, talk, think, be, drift. With the Internet available, work could creep into this time for those who lack control over their use of time. While I tend to disagree that I fall into this group, my dear friend Hanspeter seems to think otherwise. And isn't it great how in such situations, denial does nothing but reconfirm the position of the proponents? It's like smoking, which I do on the occasion. Tell someone that you're "only an occasional smoker" and you'll likely earn an expression of pity and averseness as your peer marks you down as a smoke addict.
[*]

Singapore Airlines is making this a very enjoyable experience. Asian hospitality really amazes and captures me every time. I only wish I had more time than a few days in Singapore.

We're flying in a Boeing 747-400, either very new or completely redone. The in-flight entertainment spans 80 on-demands movies, 90 TV shows, about 200 audio CDs, and several documentaries and live news channels. Add the Internet and those long hours are history.

Andreas Metzler: anti RFID wallet

Mako asks for a RFID-proof, vegan wallet. This is what I have been using for a couple of years:
cigarette case I started using it since my maestro/credit/whatever cards broke frequently, being RFID proof is just a nice side effect. The obvious downside is that I need to carry change separately in my pocket, but I wouldn't want a wallet big enough to carry the huge Euro coinage anyway.

Sven Mueller: CBDS and kittens

Steinar H. Gunderson wrote about CDBS once again, and I couldn’t agree more. CDBS introduces a lot of complexity for non-trivial packages, and it especially is basically undocumented. So what is CDBS’s value? For non-trivial packages, it is hard to use, since you basically need to decipher the CDBS code. For trivial packages however, it doesn’t add much value over dh_make. That’s actually sad: I like the general idea behind CDBS, but it is implemented badly IMHO. What it should do, if implemented right is to automate anything you want done on an easy package while providing and documenting (which includes consistently named hooks and options) all the interfaces needed to maintain non-trivial packages. Ideally, this would even include packages which need multiple build runs (like providing two differently configured versions of the same binary in two packages). But as said: It would need consistent names and proper documentation, and CDBS fails both currently. I however hope this improves in the future. Don’t ask me to work on this however, since personally, I’m quite happy using debhelper on my packages, since it is removing complexity (not typing work or lines of code) from debian/rules while keeping it obvious from that file what is done during a build. I would really like to see the reasoning from Erich on why he thinks CDBS is NMU-friendly, since I don’t get why he thinks so from his blog post.

17 November 2006

MJ Ray: Want a Pint? Give us your prints!

As if the underhand registration of children wasn't bad enough, this NO2ID newsletter describes another way to encourage people to submit to scanning:
"The scheme which is backed by the Home Office was first trialled in Yeovil but plans are afoot to expand the system to Coventry, Hull, Sheffield, Leeds, Gwent, Nottingham, Taunton and possibly Swindon. Drinkers must have their thumbprints scanned and supply their name, address and date of birth to enrol onto the system before they are allowed to enter licensed premises taking part in the scheme." "If you are in any of the towns affected, especially Yeovil, and are willing to do something then send an e-mail to phil@no2id.net (please put "pub fingerprinting" in the Subject).Don't get depressed, don't give in and get a home-brew kit - get angry and do something!" "PS. If anyone knows a pub that would like to take NO2ID beer mats, Newcastle NO2ID has created some with our logo on the front and key counter-arguments on the back, ideal for starting the discussions of the scheme that we need."
Not even our beer is safe from the ID State!

Evan Prodromou: 26 Brumaire CCXV

I've been pretty interested in making Web sites WebSoftwareFriendly for a while, so I'm pretty psyched to see that Yahoo and Microsoft have embraced the Google Sitemaps format. They've started a site for the format, http://www.sitemaps.org/ , which lists out the protocol, which seems to be unmodified from the original Google version. Sitemaps have been a necessary part of Web sites for years. Netscape -- back when it was a browser -- had an RDF-based sitemap format that had a brief flare of popularity just before Netscape went into its weird late-90s spiral. Then RDF people got really abstract and academic, and decided that sitemaps weren't what RDF was all about, and RDF sitemaps were forgotten. So sitemaps went off the air, and we've had to wait for a standard on the idea until today. Yahoo lets you submit sitemaps today, as does Google; Microsoft Live supposedly will support it sometime in 2007. One thing that's interesting is a new "ping" protocol, for when the site is updated. I'm not sure how well it works or if it's even implemented, but it's interesting to see it working. I think the weak part of this whole thing is that site owners have to submit sitemaps to each search engine; it would be nice if there were some sort of discovery, like an HTML <link> element, so that other types of Web software besides the big search engines would benefit. tags:

Knowing when to hold 'em From O'Reilly's wrapup of the Web 2.0 Summit, I got a good link to some other Evan's Knowing When to Hold Em. It's a little discourse on the growth of Web 2.0 sites after they've been acquired. Evan Williams, the author and the guy who sold Blogger to Google, knows whereof he speaks. He has some graphs that show traffic for various Web 2.0 sites sloping precipitously upwards after their sale to some big company. The implication being, I guess, that the sites would have been more valuable to sell later. He also points out that few of the sites have benefited visibly from being acquired. I'm not sure the argument makes sense. Traffic is a cost centre as well as a potential source of revenue for companies. Keeping servers up, running, and cogent is hard work. Most small Web sites have been throwing labor and cash into their sites for a while, and the ability to keep such a site going into the Alexa top 100 is beyond most small companies. Paying for a lot of servers, developers, designers, sysadmins and bandwidth for another couple of years may make the site bigger and more desirable for acquisition, but it's a big risk to take. My favourite part of the discussion is that my friend Kevin Fox shows up at the end with some good points about when and how to invest. tags:

Free Software Java I've been programming in Java off and on since the first beta versions of the VM and JDK in 1995. The language has always had a certain cachet with the Open Source set -- the free-as-in-beer tools, good documentation, and cross-platform compatibility made it an Open Enough system, roughly equivalent to proprietary C compilers shipped with every Unix variant. Its release was roughly synchronous with the growth of the Web, and Java applet support in Netscape made the first round of rich client applications conceivable, if not exactly elegant. And then Java grew onto the Web server; and into other parts of the network; and then all of a sudden everything had to be Java. The system grew from this nifty little tool to The Enterprise Solution For Your Enterprise. Serious people worked on Java. I worked on Java when I needed to be serious. Java stopped being fun. Early efforts at getting Open Source Java VMs and development kits working were pretty successful, but they just couldn't catch up with the rapid pace of development on Sun's core product. But inclusion of the language in the Gnu Compiler Collection, the great JBoss J2EE system, the growth of Apache's Jakarta project, and the growing Java Community Process made Java less and less a regular product, built in a silo behind a corporate firewall, and more of an Open-Source-y project. So I guess it was inevitable that Sun would either Open Source its codebase, or end up irrelevant. They probably squeezed just about all they could out of it without going Free, so that's pretty impressive. I think Free Software advocates are supposed to be grateful about this; my main reaction is: why did you put everyone through all this crap for so long? You've wasted 12 years that could have gone into making Java really incredible. We'll see what happens. My main interface with the JVM for the last year or so has been through scripting languages like Rhino JavaScript engine (very fun) and Pnuts. Who's got time for Java programming any more? tags:

Steve Langasek: On setting and meeting goals, and statistical fun

While NMUing plays an important part in getting us to a release, as shown by the thousand or so fixed-in-NMU RC bugs that we recently cleaned up the BTS state on, it's evident after doing this whole release-managing thing for a while that there is a very high (non-linear) correlation between the age of an open RC bug and the likelihood that a release manager is going to have to touch it at some point in order to get it fixed. By and large, maintainers really do a good job of fixing their own packages, which is probably something we don't say enough - maybe 75% of all RC bugs, I'd guess, will (or would) get fixed by maintainers in the first week without anyone needing to poke them about it, and of the remainder, probably another 80-90% get taken care of by BSPers and serial-NMUers like bug-a-day mascot Steinar Gunderson. That's why I'm not bothered overly much by the idea of full-archive searches for hidden RC bugs, like Lucas's piuparts tests, affecting the release timeline, because I know that 95-98% of those bugs are going to be gone two weeks after they're filed anyway, especially when they're no-brainer fixes to maintainer scripts or dependencies. But then that leaves the other 2-5%, which are the ones nobody else has fixed. And why hasn't anyone fixed them? Because they're the hard ones, of course... So although I follow the debian-bugs-rc list and occasionally swat a few non-bugs closed to save the maintainers time, and also provide some nudges when it looks like a package is causing RC bugs to be filed on other packages, my goal for the last full week of my Dunc-Tank contract was to get the count of etch RC bugs unfixed in unstable that are 20 days old or older down from around 50 to under 30. This seemed a reasonable goal, since it had been at 80 the week before, and it would go a long way towards helping the real blockers on the release. Initially I was aiming to bring down the count of RC bugs unfixed in testing that are 20 days old or older to this number, but quickly realized that this wasn't going to be realistic because it depended too much on the autobuilders all operating optimally and there wasn't time to both help fix 20 of the hardest RC bugs and handhold 60 RC bugfixes into testing in one week. In the end, we did miss this lesser target by a day or two. Still not a bad week's work, given that I'm pretty sure I fixed about 20 of these bugs myself in that time period (through NMUs, removals, and analysis+downgrades) and they seem to average 3 hours of work for a fix. And we've been holding at or below 30 on this list of bugs since then, so we're successfully keeping up with new bugs aging past the 20-day mark, which is also a good sign. Unfortunately, I seem to have left myself to fix the alpha Xorg 7.1 bugs on my own time. :) By now the announcement has made the rounds that the release team doesn't think we can hit the Dec. 4 target date because more time is needed for a final release candidate of the installer. Does that mean that RC bugs were the wrong thing to be focusing on for the past weeks? Well, no; if you want one place in Debian where Brooks' Law holds, I think you'll find that getting a d-i release out is it, and we still have a hard road ahead to make sure we do get our other RC issues sorted out in the same time frame. The installer just happens to put a lower limit on a release date, we still have an opportunity to screw it up from there. ;) At least the statistics suggest that we're going in the right direction. Only 13% of RC bugs fall into the "20 days or older and unfixed" category. Half of all RC bugs over 10 days old have a fix of some kind in unstable, and 64% of all reported RC bugs are less than 10 days old. We'll see whether this graph backs me up on this in a couple more days.

Michael Janssen: I work hard, every day of my life

Most of my fitness transition plan has been focused on exercise. Get more exercise and eat the same as you did before, and you will lose weight. This has to be true, based simply on physics. Back when I was using the Hacker's Diet, it worked like a charm. Then it was all about eating less calories, because I wasn't really keen on doing exercise in my olden days. It worked for a while. Unfortunately I got stressed and stopped countign calories, and weighing every day. I've started the weighing again, and maybe I can actually fire up gnuplot again and produce some pretty graphs like the one on the left.


I've had an iPod for approximately 5 years now. That puts me a bit ahead of the curve. I still remember seeing the original iPod commercial, and looking literally seconds later for how much it was, and seeing how much I could sell my old player on eBay for. Having been in the mp3 scene for a while at that point, I knew that it would turn everything on it's head. I got it and replaced my normal player for walking to and from class and listening while coding. Now I have a new iPod video, and it is the chief entertainment while I'm in the exercise room. At first I was just listening to my fairly large music collection. Then I started listening to podcasts again - they are about the right length, and I enjoyed them. Now I've harnessed the power of the video iPod to kill two birds with one stone: I'm watching my large collection of Anime at an hour a day. This means about 3 episodes if I skip the openings and endings. I also watch Heroes on Tuesday nights, after I transfer it from the TiVo. The only problem I'm having with this setup is that the screen is small, so I need to hold it fairly close to my face in order to read the subtitles.

Today marks one month on the diet and exercise regimen. I started on the scale at 344 and this week's average was 337, 7 pounds lighter. I'm going a little slower than my goal of 2 pounds per week, but I seem to be hitting the right buttons at least.

This week (Nov 10 - Nov 16):
Minimum: 335.5 (-2.5) (Nov 14)
Maximum: 339.5 (-0.5) (Nov 16)
Average: 337.2 (-2.05) (137.2 to goal)
Exercise Calories: 2563 on 5 days
Average Calories per session: 512.16

16 November 2006

Russell Coker: biometrics and passwords

In a comment on my post more about securing an office someone suggested using biometrics. The positive aspect of biometrics is that they can't be lost, no-one is accidentally going to leave a finger or an eye in their car while they go to a party while other authentication devices are regularly lost in such a manner.

The down-side is that having your finger or eye stolen would be a lot less pleasant than having a USB device, swipe-card, key, or other security device stolen. I think that it's good to have an option of surrendering your key when under threat (for the person who might be attacked at least).

Rumor has it that some biometric sensors look for signs of life (EG temperature and pulse), but I believe that these could be faked with a suitable amount of effort. A finger attached to a mini heart/lung machine should make it possible to pass the temperature and pulse checks (although I don't think that I have access to any data that is important enough to justify such effort on the part of an attacker).

One thing that biometrics could be useful for is screen-blankers. It would be good to be able to have a screen-blanker for your computer that operates when you go to get a coffee. For a period of 10 minutes after leaving a biometric method could be used to re-enable access. After that time a different method would ave to be used. This gives the convenience of biometrics for when you need it most (the many short trips away from your computer that you make during the day) but removes the benefit for an attacker who might consider removing part of your body. Also I am not convinced in the general security of biometrics. There are claims that you can make a finger based on a fingerprint which can fool a biometric sensor. If those claims are correct then a biometric sensor would still work for a coffee break (presumably you are not far away and will be back soon, and other people are in the area). The coffee break security is usually to prevent casual snooping such as colleagues who want to see what was on your screen but not actually do anything invasive to get it. Another benefit of biometrics for a screen saver is that although I trust people in the same office as me (whichever office that may be) not to try anything when they might get caught I still don't want them shoulder-surfing my password. Replacing the trivial authentication cases with a fingerprint reader would prevent that.

In the KDE 1.x days I had a shell script launched when the lid closed on my laptop which would lock the screen (the screen-saver ran in the background and a signal could make it lock the screen). This meant that I could merely close the lid of my laptop to lock the screen, this is fast and easy and also is not immediately recognised as locking the screen. Some people get offended if you lock your laptop screen when in their presence as they think that you should trust them enough to leave your most secret data open to them (generally people who aren't serious about computers - I'm sure that the same people would happily lock their diary if I was ever in the same room as it). Being able to lock the screen in a non-obvious way is a security benefit.

Regarding the comment about using a USB device to store passwords, there are two problems with this, one is that all passwords will be available all the time, this means a program that is permitted to access password A would also be given access to password B. The other is that the passwords can be accessed easily. The ideal solution is to have an encryption device that uses public key cryptography and stores the private keys on the device with no way of removing them. It would also permit the user to authorise each transaction.

I would like to see a USB device that stores multiple GPG keys and implements the GPG algorithm (with no way for anyone with less resources than the NSA to extract the keys). The device would have a display and a couple of buttons. When it is accessed it would display messages such as "signing attempt on key 1" and allow me to press a button to authorise or reject that operation.

This means that if I insert the key to sign an email I won't have a background trojan start issuing sign and decrypt commands. The only viable attack that would be permitted is the case where I want to sign a message and my message is sent to /dev/null and a message from an attacker is signed again. The non-arrival of my original message would hopefully alert me to this problem. I am not aware of any hardware which supports these functions.

Also I have just received a couple of RSA SecurID tokens as a sample. An RSA representative phoned me to ask about my use of the tokens, I said that I am an independent consultant and I have been having trouble getting my clients to accept my recommendations to use such devices and that I want to implement them on a test network so that I can give more detailed advice to my clients and hopefully get them to improve their security. For some reason the RSA rep found that funny, but I got my sample hardware so it's fine.

Jordi Mallach: Debconf7 travel options

The Debconf team just announced that registration is now open for next year's Debconf7, to be held in Edinburgh next June. The preparations seem to go at good pace, and they already have a Travel wiki page with information so attendees can start looking for the best option for them. I am delighted to see they have been thinking about every case out there and it will be possible to swim all the way over to Leith, not even getting a bad cold. Thanks! This of course is yet another reason to plan ahead so I don't miss out, like last year in Mexico. Erinn, remind me about it in late May or so, mkay?

Adrian von Bidder: A replacement for screen

ITP: retty says:
retty is a tiny tool that lets you attach processes running on other terminals. So you were running that mutt outside of screen at your home machine and now wanna check your mail? Attach it with retty, do whatever you want, detach it again and everything is as it was before. You don't have to run them all in screen just in case.
Daniel Jacobowitz analyzed the tool a bit:
What it seems to be doing is injecting code onto the stack which causes the target process to open your terminal and dup2 it onto stdout, stderr, et cetera. Interesting.
Interesting isn't really the word I'd use here. More like Eek! Incredibly ugly, but incredibly useful if it works reliably.

Benjamin Mako Hill: Dare to DReaM?

I went to a talk today by Sun scientist Susan Landau on Sun's DReaM/Open Media Commons DRM system that I've mentioned in the past. Landau used a variant of these slides to do a rough overview of the Sun system and the problems that it is trying to solve. Halfway through her talk, Landau showed a slide titled, "Users Matter: Creative Commons." Elaborating, Landau mentioned that she had been talking to a number of people -- both at CC and outside -- about the possibility of using DReaM to enforce the terms of CC licenses. I interrupted Landau to point out that CC licenses had an anti-DRM clause that, as far I knew, would make her system unusable on CC content. The CC anti-DRM clause, plus the resistance of the CC and iCommons community to accept parallel distribution language, are why it's impossible to play CC-licensed works on an unmodified PlayStation or XBox (these systems only play signed disks) -- even if you include an unencumbered copy alongside! Landau reassured me that I must be mistaken and that she had talked about DReaM in depth with CC leadership, lawyers, and technical advisory board members and she was sure her system was at least possible. Puzzled, I shut up. For most of the rest of her talk, Landau talked about fair use and how a DRM system might go about respecting it. In his qualified endorsement of the DRM system, Lessig mentioned that DReaM, "would be implemented to allow individuals to assert 'fair use,' and unlock DRM'd content, with a tag to trace misuse." At the time, I had a hard time imagining how fair use could be built into such a system -- separating fair from unfair use is remarkably resistant to technical solutions. Even bright light cases like verbatim copies every page of the Encyclopedia Britannica might be fair use if I were to make them into a paper m ch bust of Johann Gutenburg or use them to wallpaper a gallery wall. Landau's acknowledged the trickiness around fair use and suggested a compromise:
By default, works might be encumbered in the ways and to the degrees that the copyright holder wish. However, users could petition for an unencumbered "fair use copy" by identifying themselves and then checking some boxes and explaining (briefly) why they think their use for the work qualifies as fair. Once they've done this, the system would present the user with an unencumbered, watermarked, and fully traceable piece of media.
Conceivably, requests would be subject to some sort of review (at the very least to prevent automated requests) and non-fair uses of watermarked goods would be strictly tracked. If a "fair use" copy is found in the wild, the watermark would be traced and the originator would be held liable. Of course, anonymous fair use becomes impossible but, as Simson Garfinkel pointed out at Landau's talk, users may have a right to anonymous speech and to fair use but not to anonymous fair use. "Fair" enough. It is perhaps important to point out that DReaM does not currently implement this "fair use" system and that, one can only assume, the vast majority of DReaM users (e.g., Hollywood movie studios and their ilk) would have no little interest in giving their users a blanket ability to make "fair use copies" and would in most cases choose not to enable such an option. But let's return to the issue of DRM enforcement of CC license terms. While I was initially quite confused by the idea of DRM enforcement of CC license terms, it made much more sense when I looked at the CC anti-DRM clause itself:
You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement.
The emphasis (mine) points to the crux of the issue. The CC anti-DRM clause only blocks technological measures that overstep the boundaries set in the rest of the licensee. For the free licenses, that's a wide boundary that leaves little room for DRM. But as I've pointed out before, CC is a lot more than just free licenses. Landau mentioned that her group was primarily interested in using the DReaM system to enforce attribution and non-derivative work clauses in CC licenses -- a wise choice as non-commercial use is hard enough for humans to discern. As a result, the DReaM system might be used to make it impossible to remove attribution from CC works or might block modification to works marked as "ND." The catch that led me to believe that CC license blocked all DRM was the fact that I didn't think it would be possible for a DRM system to respect fair use. After all, each CC license includes an explicit affirmation that, "nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use." The question that the possibility of a CC DRM scheme like DReaM hangs on is: to what degree does Landau's suggestion live up to the fair use legal bargain? Landau pointed out that a number of lawyers including Pam Samuelson and CC's technical advisory board and legal staff have been generally positive about her fair use permission-asking compromise. Honestly and on CC's own terms, it's hard to see why they wouldn't be. The loss of anonymous fair use was only ever a right we enjoyed by a fortunate accident. Watermarks are only there to "keep honest people honest." If you are not doing anything wrong, what do you have to hide? But DReaM enforcement of CC licenses is a bad thing and the bad taste that it inevitably leaves in many commoners mouths is not hard to explain:
  • Many commoners are not comfortable with the idea of DRM because it shifts power over users' computing devices away from the users and makes computers obey the will of a copyright holder. That's true of DReaM just as much as as it is of Apple iTunes or Microsoft DRM.
  • Many commoners are not completely comfortable with all CC licenses, so the idea of technical protection measures enforcing these terms, even those allowing for fair use lines and in line with the will of the author, is seen as dangerous.
To solve the first issue, CC needs a more strongly worded anti-DRM clause -- ideally one tied to a parallel distribution clause. To solve the second, we will ultimately need a new banner under which only truly free cultural works will reside. Susan Landau doesn't have it easy but she does seem to have the genuine best interest of consumers and users at heart. That's more than I can say about the vast majority of people in the DRM business. She's trying to walk a fine line and she's almost certainly being abused and heckled by folks in the industry who call her "communist" and by folks like me who feel that she's sacrificing essential principles in an attempt to compromise. The one thing we all agree on is that the ground she's treading is mine field. Yet while I sympathize with her, I must speak out against both her and DReaM. A DRM compromise at this stage would be insanity. This is a fight we have to win.

15 November 2006

Russell Coker: economics of a computer store (why they don't stoc...


In some mailing list discussions recently some people demonstrated a lack of knowledge of the economics of a shop. Having run a shop for a few years (an Internet Cafe) I have some practical knowledge of this. I will focus on small businesses in this article, but the same economic principles apply to large corporations too.

When running a shop the main problem you have is in managing stock. There are two ways of getting stock, one is to have wholesalers give it to you for a period in which you can try to sell it and you pay for it when it's sold, this is probably quite rare (I don't know of an example of it being done - and probably no retailer wants to talk about it in case they lose it). Often retailers consider themselves to be privileged if they are permitted to pay for hardware one month after they receive it! The more common way of getting stock is simply to buy it and hope you can sell it in a reasonable period of time (often the wholesaler will offer to buy the stock back at a 10% discount if you can't sell it).

To buy stock you need money, this can come from money that has accrued in the business account (if things are going really well) or from a mortgage taken out by the business owner if things aren't going so well. For small businesses things usually don't go so well so the money used to buy stock is borrowed at an interest rate of about 7% or 8% (I'm using numbers based on the current economic conditions in Australia, different numbers apply to different countries and different times but the same principles apply). The ideal situation is when there is money in the company bank account to cover the purchase of all stock, this means that the cost of owning stock is that you miss out on the 5.5% interest that the money will get in a term deposit.

Almost all stock has a use-by date of some form. Some items have a very short expiry (EG milk used to make hot chocolate in an Internet cafe, some have a moderate expiry date (computer systems become almost unsellable in about 18 months and lose value steadily month after month), but in the computer industry nothing has a long expiry date.

Let's assume for the sake of discussion that you want to run a small computer store that is open to passing trade (this means that you must have stock for an immediate sale). Let's assume that all items of computer hardware lose half their value over the period of 20 months at a steady rate of 2.5% of the original price per month (I think that most computer hardware loses value faster than that, but it's just an assumption to illustrate the point).

The next major issue is the profit margin on each sale. If you can make a 20% profit on a sale then an item that has lost 10% of it's value while gathering dust in your store will still be profitable. However the profit margins on computer sales are very small due to having a small number of major manufacturers (Intel, AMD, nVidia, ATI, Seagate, and WD) that have almost cartel positions in their markets and there being little to differentiate the stores apart from price. I have been told that 3% profit is typical for retail computer hardware sales by the small companies nowadays! Now if the stock will lose 2.5% of it's value per month, you pay 0.5% interest per month and you make a 3% profit then if an item remains in stock for a month then you lose money. So on average (by value) you need to have stock spending significantly less than a month in your store. Cheap items such as low-quality cases and PSUs can stay in stock for a while. More expensive items such as new CPUs and the motherboards to house them must be moved quickly.

What's the first thing that you do to reduce stock? You can keep stocks low, but there is a limit to how low you can go without losing sales. The next thing to do is to not stock items that customers won't often buy or items where there is a similar item that you can stock as a substitute. The classic example of this is hard drives, a customer will want a certain capacity for a certain price - if their preferred brand is not in stock they will almost always take a different brand if it has the same capacity at the same price. Stores often advertise prices on multiple brands of hard drive in each capacity, but often only try to keep one brand in stock.

Of course this is a problem for the more fussy buyer. If you want to buy two identical parts from the same store on different days you might discover that they don't have the stock on the second day and that they instead offer you something equivalent. Not only do retailers have issues with managing their investment in stock but wholesalers have the same problem. So if a retailer runs out of WD drives and discovers that their preferred wholesaler has also run out of WD drives then they just buy a different brand - most customers don't care anyway.

There are some companies I deal with that have a business model based on services. One of them sells hardware to customers at cost, but charges them for the time spend assembling them, transporting them, etc. The potential for a 3% profit on the hardware isn't worth persuing, they prefer to just charge for work and also save themselves the sales effort. Another company I know operates almost exclusively on the basis of ordering parts when customers request them (but still make a small profit margin on the sales), this means that the customer can be invoiced as soon as the hardware arrives. The down-side to this is that wholesalers have the same stock issues and they sometimes have excessive delays before the wholesaler can deliver the hardware.

Dell is the real winner out of this. As they operate by mail-order they don't need to have the stock immediately available, they have a few days to deliver it which gets them time to arrange the supply. They can also have a central warehouse per region which reduces the stock requirements again. A 3% profit on items that rapidly decrease in value makes it almost impossible to sustain a small business. But an organization such as Dell can sustain a successful business at that level.

Of course the down-side for the end-user is that Dell doesn't want to have too many models as that just makes it more complex for the sales channel. Also they have deals with major suppliers which presumably give them deep discounts in exchange for not selling rival products (this is why some brands of parts are conspicuously absent from Dell systems).

10 years ago there used to be a small computer store in every shopping area. Now in Australia there are a few large stores (which often only have a small section devoted to computers) and mail-order. There seems to be much less choice in computer hardware than there was, but it is much cheaper.


PS I've attached a picture of day 39 of the beard.

Steve Kemp: I could kill, but I don t care about it

I’ve significantly updated the code behind the Debian Administration website over the past few days. Now: I still need to decide whether to open up the inter-user messaging system, and implement a few more tweaks and fixups. But these are pretty trivial to do, it is more a matter of deciding whether they are appropriate things than actually writing the code. All of this work combined with travelling a fair amount recently has left me behind on several fronts though. I’m going to dedicate tomorrow to catching up on the biggest outstanding issues, but I’m not sure how far I’ll get. Being behind on things actually makes me feel pretty good, I’m no longer on as many critic paths as I was a few months ago, so whilst getting behind is frustrating and annoying it doesn’t affect quite so many people/projects/packages/things. Either way better to be happy and behind than the reverse .. ObXen: The xen-hosting setup managed to reach an uptime of 100 days. I’m obviously not geeky enough; powers of ten remain much more significant to me than powers of two! Actually I take that back: I can recite powers of two to rediculous degrees and disassemble x86 and z80 hex dumps into opcodes with a fair degree of accuracy .. About time I got more practised at patching binaries; although its hard to find GNU/Linux software which requires serial numbers ;)

MJ Ray: Business: Email, sigs and signing

Ian Rawlings wrote in an article in uk.comp.os.linux that:
"There was a legal precedent set in the UK a little less than a year ago, in which the company's name and contact details in an email signature were taken as sufficient identification of the company for the contents of the email to be acceptable as a contract [...]"
and then helpfully provided some references about it. The headline on Disclaimers could make emails into contracts [The Register] seems a bit off. Even the article ends:
"The end result of this could be that people who include a signature and disclaimer at the bottom of their emails might actually be making themselves more liable than people who just send one line emails."
Note the might there. It's quite a leap, isn't it? Mehta v J Pereira Fernandes SA [2006] EWHC 813 (Ch) (07 April 2006) appears to have ruled that headers were not a sufficient signature, rather than that a plain text signature block (sig) is sufficient. Have I missed a key point here? AFAICS, the ruling contains the following key general points:
"28. I have no doubt that if a party creates and sends an electronically created document then he will be treated as having signed it to the same extent that he would in law be treated as having signed a hard copy of the same document. [...]"
"30. [...] if a party or a party's agent sending an e mail types his or her or his or her principal's name to the extent required or permitted by existing case law in the body of an e mail, then in my view that would be a sufficient signature for the purposes of Section 4. [...]"
I doubt that a sig is quite the same as a hand signature, as it doesn't necessarily 'serve as a method of authentication' as required by the Digital Signature Directive ( 1999/93/EC, Electronic Signatures Regulations 2002), but there are times when it could bind one to things. Essentially, using a sig is like using headed paper, not like hand-signing. Parts of the ruling (para.19) seem to argue that automatic insertions make things carry less weight AFAICT - does that hint at how futile those forced stupid disclaimers would be if relied upon in court? Does the same automatic-or-decision point also mean that using a electronic signature tool (gpg or whatever) selectively helps it carry more weight than signing everything automatically? I don't agree it ... signs death warrant for Digital Signatures [Financial Cryptography] Interesting questions. Anyone know if the answers are decided yet?

Wouter Verhelst: #include &lt;stdarg.h&gt;

The stdarg API, which allows you to use a variable number of arguments to a function in C, is pretty fun. However, it's also pretty limited in what it allows, to a degree that it invites people to try and find workarounds to things you can't do with the API as it is documented. Unfortunately, this almost always breaks when the software is compiled on hardware that happens to be not your own, as there is a reason why stdarg is implemented the way it is: portability. A (not so) recent discussion on #debian-devel on OFTC showed to me how this confuses many people. Don't worry—it confused me too, the first time I had to think about it. The problem is that in order for stdarg to be able to do what it does, it needs to read function arguments from whereever they are stored. Where that actually is depends on the operating system and the hardware you're using; it could be on the stack, but e.g., the SPARC architecture actually has a mechanism to pass parameters using processor registers (although those are most likely not used when stdarg is in use, since the number of parameters that can be passed that way is obviously pretty limited). If parameters are on the stack, then you may be able to just access the memory as you would access any random variable; but it could also be the case that you need to take some specific steps to access the stack, or perhaps your architecture or operating system has some protection for stack-based security attacks, which would make it impossible to directly access memory on the stack that is actually part of another subroutine. So if you try to do anything that isn't defined in the stdarg api (like trying to figure out the number of arguments by peeking inside the va_list data type, or passing a va_list to another function without using the C99 va_copy macro) will break. Yes. Very sorry.

Matthew Palmer: Severe Discomfort's "The Joy of UDP"

(For the grammar Nazis out there: no, that apostrophe is not misplaced)
There are times when a connectionless protocol almost doesn't seem worth the hassle. Take, for instance, the troubles of a round-trip communication, using UDP, where the initial request is sent to a secondary IP address on an interface. Your code, on the server, might look like this:
 s = UDPSocket.new
 s.bind('', 12345)
 loop   data, remote = s.recvfrom(65535); s.send(data, 0, remote[3], remote[1]  
This is a pretty simple Ruby fragment which just reflects your UDP packets back at you. It really doesn't get much simpler than that. Connect to this thing from somewhere else (using nc -u remoteip 12345) and you can reflect packets back and forth to your heart's content. Or so you'd think... When talking to a regular IP address, your packets probably look something like this (when viewed using tethereal):
 192.168.0.1 -> 192.168.0.2 UDP Source port: 35716 Destination port: 12345
 192.168.0.2 -> 192.168.0.1 UDP Source port: 12345 Destination port: 35716
Fantastic -- I send a packet, and get one back. In netcat, you see whatever you typed printed back out again. But, what if I add a secondary IP address to the server's interface (ifconfig eth0:1 192.168.0.5, for instance) and try sending packets to that IP address (with nc -u 192.168.0.5 12345)? I get this insanity:
 192.168.0.1 -> 192.168.0.5 UDP Source port: 35772 Destination port: 12345
 192.168.0.2 -> 192.168.0.1 UDP Source port: 12345 Destination port: 35772
And of course, no self-respecting network stack is going to accept a packet back from a totally different IP address, even if it did manage to get the ports right. Hence, the client never sees the return packets, and thinks that the server is snubbing it. What's happening here seems insane, but it's actually just a regular artifact of a connecntionless protocol like UDP. You see, we've bound our socket to the "any" address (the empty string in the call to #bind tells UDPSocket to bind to the "any" address -- no, I don't know why either, it's not a particularly intuitive interface). When we get the packet into our app via #recvfrom, we get no information on what address the packet was actually sent to, only that the OS decided that the packet was for us (yay for encapsulation). The only information we get is where the packet was coming from -- and due to the fact that the kernel keeps no connection-related information around for the socket (the kernel figures it'll hold us to our connectionless pledge), when the time comes for us to send a packet back, we have to explicitly say where we want that packet to go -- that's the remote[3], remote[1] arguments in the #send call. The brain-leakage starts when we work out where to say the packet is coming from. When we send the packet, a source address needs to calculated -- again, the kernel keeps no information on source or destination because we're connectionless. Because our socket is bound to the "any" interface, the OS thinks it has carte blanche to set whatever source address it likes. In Linux, the behaviour appears to be to pick the IP address set on the primary alias for the interface that will be used to send the packet out on. So for the common case (one IP address per physical interface) everything is fine. But those corner cases, gee, they're awfully sharp and pointy... The solution, of course, is to send the packet out through a socket that is bound to the particular address you want to use as the source address -- then the kernel knows what source address you want, and there's no confusion. Seems pretty trivial, right? Surely every sensible network application does that already, right? So obviously Ruby's UDPSocket implementation just sucks. That's what I thought, and I don't blame you if you think so too. But before you raise pitchforks and storm the gem-covered castle, try repeating our little experiment with some other widely-used UDP-based applications, such as net-snmpd or your ntp server. (The NTP server is a little different, in that to trigger the problem you need to start it and then setup the interface alias, for reasons I'll explain later). Both net-snmpd and ntpd exhibit the same behaviour as our trivial UDP echo service -- at least, the versions present in Ubuntu Breezy do, although I can't imagine everyone's suddenly cottoned onto this problem in the last 12 months or so and come out with a rash of fixes. So, basically, everyone seems to be suffering from the same malady. For values of "everyone" that equal "some UDP servers". There's some services that don't seem to have such troubles with alias interfaces -- the Bind DNS server comes immediately to mind, and ntpd works fine if you start the NTP server after you setup the interfaces. Why the difference? These services are clever and bind to each IP address on the system separately, like so:
 $ netstat -lun  grep :53
 udp        0      0 192.168.0.1:53          0.0.0.0:*                          
 udp        0      0 192.168.0.5:53          0.0.0.0:*                          
 udp        0      0 127.0.0.1:53            0.0.0.0:*                          
This is very cool, and solves the problem, except that if you add another interface after you start Bind, it doesn't pick up the new address, and you're boned until you restart the daemon. It also increases code complexity a bit, since you need add a select into your request handling loop (instead of just blocking on the #recvfrom call, like I've been doing thus far). Whilst I'm never happy about unnecessary complexity, I'll deal with it where I have to, but the real killer for this application is the "you can't change your interfaces after starting the daemon" rule -- my particular need is to make requests to a virtual service IP address, and restarting my service after each IP address change is going to suck hard. I mentioned ntpd earlier because it has some extra trickery at work. It's list of bound interfaces looks like this:
udp        0      0 10.6.66.6:123           0.0.0.0:*                          
udp        0      0 192.168.250.6:123       0.0.0.0:*                          
udp        0      0 172.14.16.6:123         0.0.0.0:*                          
udp        0      0 172.31.62.1:123         0.0.0.0:*                          
udp        0      0 192.168.37.179:123      0.0.0.0:*                          
udp        0      0 10.64.64.64:123         0.0.0.0:*                          
udp        0      0 127.0.0.1:123           0.0.0.0:*                          
udp        0      0 0.0.0.0:123             0.0.0.0:*                          
It listens to every IP address explicitly plus the "any" interface. I'm not quite sure why, either -- just listening to the specific addresses works for Bind, and if you add an interface alias after starting ntpd, it exhibits exactly the same problem as the trivial UDP echo service, so I don't think that listening on "any" is really gaining it anything. Listening on "any" does make ntpd behave differently to Bind: with Bind, if you send packets to an interface that wasn't available when Bind was started, it just completely ignores you (because it lacks a socket listening for packets to that address), while with ntpd the packets hit the "any" socket and suffer from the wrong-source-address bug. At the moment, my best chance of a solution appears to be to follow Bind and ntpd's lead and hook onto every address, but with the extra twist inspired by ntpd -- listen on the "any" address as well as all of the specific addresses. If I use any packets that arrive on the "any" socket as a trigger to rescan the available addresses (to add any new addresses that have been created since the last scan), that should solve all my problems. Now I only need to make it work (and deal with the insanities that will no doubt result). Wish me luck. The screams of pain and frustration you hear (no matter where you are in the world) are probably mine.

14 November 2006

Lucas Nussbaum: When Ubuntu users discover that unofficial repositories can be harmful

Unofficial APT repositories are a PITA in the Ubuntu community. Most users use stable release (see previous post about that) since Ubuntu development releases tend to be much more bleeding edge than Debian unstable. But users still want the newest software, so they use unofficial repositories. There are lots of posts about private repositories on Planet.ubuntu-fr.org, and it seems to be the same on other local planets. Recently, somebody posted a sources.list file with a huge list of unofficial repositories. The maintainer of one of these repositories, J han Kiviniemi, was surprised to be in this list without even being contacted first. He chose a good answer: he uploaded a package with cool new default wallpapers. He also wrote a detailed explanation, with which I couldn’t agree more. But this story raises a question: why do all these people work on their unofficial repositories, instead of filing and fixing bugs, improving the official packages, and getting their packages into Ubuntu ? It’s a shame that so much manpower is lost on such stuff. PS: Johan Kiviniemi seems to have a lot of good opinions. :-)

Next.

Previous.