Search Results: "cas"

5 June 2009

Martin Michlmayr: Corporate participation in open source communities

Someone recently asked me a few question about corporate participation in open source communities and I thought I'd share my thoughts on this topic here. Are there differences between an open source project done for a corporation and one done for personal reasons? There are many different ways to run an open source project, led by a corporation or by someone else. Some projects that are run by corporations have few outside contributors. This is often the case with projects that require copyright assignment (i.e. contributors have to assign their copyright to the corporation). These projects may not gain all the benefits of a true open source community, such as outside contributions or high levels of peer review. However, they may still be very successful projects and may have high levels of quality. Projects done by a corporation may have better planning and may have more resources than other projects. When a corporation, especially a large one, starts or becomes involves in a project it can also give credibility to the project and attract a lot of interest to the project. This means that projects done by corporations may have a bigger impact and might also be more visible in terms of publicity. How do corporations successfully utilize an open source community? Corporations can benefit from an open source community in many ways. For example, they can often find people who will review their code or make code contributions. If people become excited about what the corporation does, they might also spread the word and create viral marketing for the corporation. Establishing a community around one's project is often also a good way to identify people to hire since you already have experience working with them and know their capabilities. How do open source communities successfully utilize their corporate relationships? Corporations can make several unique contributions. For example, large corporations can use their name to attract attention to a project and give it credibility. Furthermore, corporations have some capabilities that personal contributors often don't have access. They may have special testing equipment (such as servers with thousands of CPUs or hard drives) or access to a testing lab where a professional usability test can be done. Finally, corporations can sponsor developer conferences, which are typically very effective means for the community to come together and work on activities together. It is important for projects to remember that corporations are not charities and that they will invest in an open source project for a reason. Therefore, they have to ensure that the corporation will get tangible outcomes from their involvement or sponsorship, otherwise they may not stay involved in the long run. What are the risks for a corporation when working with an open source community? One risk is that the code (or other form of contribution) is not accepted. However, this is a risk any contributor to a project faces. Before making any sort of contribution, it is therefore important to become familiar with the project and its culture. Every project has their own "do's" and "don'ts" that have to be followed. Another risk is that a corporation will invest in a community project that later on is abandoned by the community. However, in this case, the corporation could take the lead and continue to maintain the project. What are the risks for an open source community when working with a corporation? One potential risk is that the corporation will assert too much control over the project. It's important for projects to ensure that the community as a whole has influence over the direction of a project rather than one particular player. Are certain certifications needed in order for someone to participate in open source projects for a corporation? Certifications are not needed to get involved in or start a project. However, it is important to become familiar with the open source community and the project one wants to contribute to. A good first step is to read the book Producing Open Source Software by Karl Fogel which is available online. As a next step, the community in which someone wants to get involved in should be studied, for example by reading the mailing list archives. This will help to become familiar with the culture of a project as well as the mechanisms to contribute to the project. How do open source communities communicate and collaborate with corporations? In the best case, employees from corporations would interact in the project like any other contributor. That is, they should use the existing communication channels, such as mailing lists, IRC or developer gatherings. Many companies are good at working "with the community" but the ideal scenario is for a company to be part of the community and to work "in the community", just like other contributors. This is the most effective way for them to make changes to the code and project. Of course, not every corporation will get involved in a project directly. That's why it makes sense for projects to collaborate with corporations in other ways. For example, projects can talk directly to companies to get samples of their hardware in order to add support for them in their software. Projects can also work directly with corporations to find out how their project can better meet the needs of enterprise users.

4 June 2009

Steve Langasek: Configuring-an-old-Debian-system

Chris, Please note that the method you recommend for activating libpam-cracklib only applies to lenny and earlier; it's obsolete for the upcoming squeeze release (and in Ubuntu 8.10 and later), where libpam-cracklib is integrated with pam-auth-update and will be autoconfigured. Running your sed command on a squeeze system will break pam-auth-update integration, and cause the admin headaches going forward if they ever have occasion to use anything other than pam_unix for authentication. So for a squeeze system, this should be:
apt-get install libpam-cracklib
... and you're done! Actually, the package defaults in squeeze are stronger than what you've listed: libpam-cracklib will set minlen=8 by default (instead of the uselessly-weak minlen=6), and coming soon, pam_unix should default to sha512 instead of md5 for password hashing.

3 June 2009

Aigars Mahinovs: Google Wave

So, the latest buzz on the web is all about Google Wave. I would urge everyone developing stuff for the Internet and technological people depending on the Internet for their daily work, to watch that introductory video. The concept is frankly mind-blowing. If this is done right and embraced by all the right people, Google Wave could be the new platform concept that could be used to create new generation of email, instant messaging, collaboration software (CMS, wiki, Sharepoint, workflow, ), blogging software and forum software and do all that while integrating back with current technologies, like Twitter and RSS feeds. It remains to be seen what parts will be open source and federated and what parts will remain Google-only services. For example, I am convinced that Spelly the spellchecker bot and Rozy the automatic translation bot will be hard to impossible to federate. This being Google, it is practically a given that the code will be good, but a bit hard to understand and contribute to. Management of the free software community and proprietary community relations will likely be the key to the success of this technology. I love the technology itself - imagine that you have a web blog. The blog software makes each your blog post a wave. When people leave comments on the post, these comments show up in your email inbox. You can reply to people right from there. By default your replies will show up on your blog and also show up in the email inboxes of the commenter, but you also have the option to mark your reply private and only send it to the commenter. Also it looks to be possible to choose to host all the data yourself or to make Google host all your blog and comment data and make your blog just be a frame where this data is displayed in, possibly allowing you to use very, very minimal system resources to maintain the blog even in a case of Slashdotting. I hate blogs without comments, let s replace them all. I would also love to see replacements to Microsoft Exchange and Microsoft Sharepoint be built using Wave technology with a full support to ODF if possible. Imagine collaborative document editing in OpenOffice using this technology in the backend. It would be one huge project, but it should be possible. Companies currently pay hundreds of thousands of dollars to set up MS Exchange+Sharepoint+Active Directory to be able to simply share documents in their Intranet and see who edited a document (no live editing, no change tracking). It is possible to make a much better product with ODF and Google Wave and it is possible to earn a bunch of money supporting such a product for companies that need support contracts. If it would be possible to licence spellchecking and translation services from Google in a way where a box is installed in customers data centre and the data to be spellchecked and translated never leaves that data centre, then I believe that people would be willing to pay for this superior spellchecking and translation experience. We need open source products that people can depend on. We also need ways for business people to sell services with an easily visible added value so that they can make money and contribute their developer work hours back to the open source projects. We (the free software community) have great ways to get a positive feedback loop with users that can develop software, but when our users have no interest in developing anything, the feedback loop breaks and free software growth slows down. There is a lot of untapped potential in this area - we just need to find a way to convert needs and demands of non-developers into code. I m gonna stop this rant before it diverges even further off topic, but the main point is - go watch the Google Wave demo, read the tech specs and think how you could integrate that into your free software project. Useful wave discussions (will update as I find more):

David Wendt Jr.: Stop clobbering my bootloader!

During this past weekend I tried to get Windows XP, Windows 7, OSX, Debian, and Ubuntu all on one machine. Due to some mishaps, driver oddities with Windows 7, and other things, I had to install certain operating systems multiple times. Now, the problem is, each operating system has it's own peculiar way of loading. Linux uses GRUB, Windows XP has NTLDR, 7 has the Windows Boot Manager, etc. Most of these operating systems also decide it would be helpful for the end-user that when his computer reboots, it can actually load the new OS. That's great, but I already have a bootloader.

I have a partition at /dev/sda5 which contains a GRUB installation. That's supposed to handle every OS's own method of booting, including the Linux installations which have their own GRUBs on their own partitions. But when you decide to overwrite the MBR, I don't get your nice and shiny OS. A good number of OSes use an MBR that won't boot an extended partition anyway. So instead of seeing your bright and shiny new OS, I see "NTLDR is missing". Or the ever-so-helpful "boot0: error". I'm -lucky- if I even get an OS at all, much less one that can load the grub shell so I can fix what you broke.

I understand having 3 GRUB installations plus a whole bunch of other bootloaders isn't exactly a standard use case. Most people don't go beyond dual-boot. But please, for the love of all that is holy, please just put a little checkmark somewhere,"Do not replace MBR". Ubuntu and Debian are the only OSes that actually give you that option in some form.

Or better yet, let's all just standardize on GRUB. Sure, it's not perfect, but it's as flexible as you can get.

2 June 2009

Holger Levsen: motivational mails for debian-edu-doc

This weekend I implemented an idea I had some weeks ago: sending regular mails with the translation status and the contents status of debian-edu-doc to the Debian Edu mailinglist, in the hope this would motivate people to finish the documentation and its translations. Currently the package contains four different manuals, translated in up to 6 languages: the old Debian Edu etch manual, the new Debian Edu lenny manual and manuals for teachers using Rosegarden and Audicity. All four are being written on wiki.debian.org, then exported to Docbook, then .po files are created with the great po4a tool suite. Those .po files are kept in svn of the the debian-edu-doc package, for translators to edit. Detecting missing or half finished content is done by putting the string "FIXME" plus a description what to fix in the wiki text. Then a small script is run by cron every 2nd and 4th sunday of the month, which outputs the translation status and greps for FIXME and formats this nicely. The result looks like this:

The (translated) debian-edu-lenny manual as PDF or HTML is available at http://maintainer.skolelinux.org/debian-edu-doc/

To understand this mail better, please read /usr/share/doc/debian-edu-doc/README.
This mail is automatically send by a cronjob run by Holger Levsen every two weeks. Please send feedback, suggestions, flames and cookies via this list.


debian-edu-lenny-manual.de.po: 545 translated messages, 193 fuzzy translations, 220 untranslated messages.
debian-edu-lenny-manual.es.po: 85 translated messages, 204 fuzzy translations, 669 untranslated messages.
debian-edu-lenny-manual.fr.po: 447 translated messages, 279 fuzzy translations, 232 untranslated messages.
debian-edu-lenny-manual.it.po: debian-edu-lenny-manual.it.po:7683: end-of-line within string
debian-edu-lenny-manual.nb.po: 711 translated messages, 159 fuzzy translations, 88 untranslated messages.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Features
FIXME: describe new features in 5.0.1+edu0 here.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Requirements
FIXME: a description of main-server and thinclient-server is missing.
----------------------------------
http://wiki.debian.org/DebianEdu/Documentation/Lenny//Installation
FIXME: probably each paragraph on this page needs to be (slightly) rewritten for lenny.
FIXME: describe PXE installation here, if its only two sentences, then they should be here.
FIXME: path to preseed file location missing
----------------------------------
[...]
====================
24 FIXMEs left to fix
====================


I'm quite happy with the result, now we we just need to fix those FIXMEs :-)

The same tools will probably be used for the illustrated Lenny installation guide and maybe others. I've described the requiered structure for such a manual on wiki.d.o in an email to debian-boot (as the discussion about that guide happened there), in case you are interested.

In mostly unrelated news, I've started running everyday again six days ago (slowly running a bit further each day) and yesterday I've also started with doing gymnastics. It was high time to realize and to change some stuff in my life, and it looks like I finally heard the call. And doing sports is by far not the only thing I want to do very differently again, it's just the most visible atm and it's also quite easy to do. Also I can feel it in my legs today :-) Now I "just" need to keep going forward, change is a continuous process, and nothing to be done with. Ever. The day I stop changing myself, the day I stop learning, I consider myself to be dead. I'm glad I woke up, thanks for contributing to making me wake up and for bearing with me sometimes.

Russell Coker: How not to write the way dumb people think smart people write

Don Marti has written an amusing and informative little post about the way that ill-educated people use phrases in print [1]. The one example that didn t fit with the tone of his post was the use of half mast to refer to a flag on land, that one is used often enough (both in print and verbally) that intelligent people will make that mistake. Here are some that he missed:

  1. The expression bailing them out can be used to refer to someone who helps someone escape from a difficult situation. That might refer to bailing water from a leaky boat or might refer to posting bail to secure someone s release from prison while awaiting trial. It certainly doesn t refer to baling which is the creation of a bundle (such as a bale of hay). I m sure that a farmer would appreciate some help at baling time, but such help would hardly qualify as rescue from a difficult situation.

  2. The expression woe is me is used (usually in a sarcastic manner) to refer to someone who feels that their situation is sorrowful. It is not whoah is me , I suspect that the word whoah was invented long after the expression woe is me became commonly used.

  3. Made up words such as worserer and worstest. I can understand that people such as Keith Olbermann [2] may find it a challenge to describe some of the bad people in the world, but he is articulate enough to rise to that challenge while using real words.

Can anyone add any more to this list?

1 June 2009

Junichi Uekawa: Trying to clap.

Trying to clap. I've tried making a 'crowd claps' kind of sound. I recorded myself clapping, 12 times, and mixed the sound with ecasound: ecasound $(for A in $(seq 1 12); do echo -a $A -i "$A.wav" -y $(( A / 5 )).$(( A % 5 * 2 )); done ) -a 1,2,3,4,5,6,7,8,9,10,11,12 -o alsahw,0,0,0 However, it doesn't sound quite right, it is too sparse. I tried mixing the same sound 12 multiple times, but it seems to make the sound stiffer but not in the way I wanted. Delay and echo doesn't get me the right tone. Hmmm.. ecasound $(for A in $(seq 1 3); do echo -a $A -i "hakushu.wav" -y $(( A / 5 )).$(( A % 5 * 2 ))$(( A % 2 * 2 )); done ) -a 1,2,3 -o hakushu2.wav

31 May 2009

Russell Coker: Expectations and Fandom

Russ Allbery has written about the hostile reactions of sci-fi fans toward the delay of a book release [1]. Russ makes some good points regarding the issue of whether paying $100 for some books entitles a reader to have the rest of the series written (in summary - no, the author owes the fans nothing). Russ also notes that when someone makes a public promise to do something (such as writing a book) they will probably be feeling bad about being unable to live up to that, and harassing them about it is not going to make them feel any better - or make them better able to do the work. Charles Stross has written a blog post about this topic, he makes some interesting points and the comments illustrate most of them [2]. One comment claims that the author of the delayed book in question flaunts his NFL watching while the same person also criticises the author for writing a blog. This level of contempt for the author amazes me. In case anyone is interested I watch The Bill and Desperate Housewives every week. Anyone who wishes to criticise me for watching soapies instead of documentaries is welcome to do so. But I will not make any apologies for spending some of my time doing things other than coding. If I watch Desperate Housewives instead of fixing a bug that inconveniences you then you just have to deal with it. I believe that taking a regular break from work is a basic human right, apart from which there is evidence to show that working excessive hours decreases the quality and quantity of work that is completed [3]. It seems to me that members of the free software community are in a better position regarding fans than most creative people, and that this is largely due to how transparent the development process is. The most influential members of the user (fan) base are software developers. While people will be disappointed when software is not released on time or has some bugs many users know what is involved and understand that no testing will find all bugs. Even some basic shell scripting can teach people the difficulties of programming and convince them to have a little more patience than they might otherwise have. So the typical user of free software will have some idea of what is required to write software while the typical reader of a novel has no idea of what is involved in writing a book. Another benefit for the free software community in this regard is the open development process. When users are unhappy about release delays (as some Debian users were before Lenny was released) they can easily look at the bug list. If a user is pushy they can be invited to fix some bugs themselves, if they investigate the matter and discover that the bugs are too difficult for them to fix then they will probably feel compelled to stop hassling the people who can fix the bugs. Complaints from users regarding the release process can be turned around with the software is late because YOU haven t fixed any bugs . Please note that submitting bug reports is NOT criticism, it is in fact helping the development process (particularly when the bug reports contain information on how to fix the problems). This exposes another significant difference between writing software and writing a book. Even if I was a talented author I would not be able to offer any assistance to an author who had trouble completing a work simply because I wouldn t have the same vision for the plot of a book. But it s not uncommon for software development projects to be forked if the users are unhappy with some aspect of how they work, and it s also not uncommon for a programmer to voluntarily give one of their projects to another developer - sometimes developers try and convince other people to take projects from them when they don t have enough time. Even without changing the ownership of a project, anyone can submit a patch. The patches that I have received from users of my software have generally been of a high quality and it has taken little work to merge them. A final difference is that any programmer can produce a private fork of a project. I have lost count of the number of times that I have produced custom versions of free software for my own personal use or for the use of my clients. Sometimes the modifications that I made were unsuitable for wider use (IE they broke things for usage cases that I didn t care about) so I just privately made the software do what I needed. This makes the upstream developer (or team) and other contributors irrelevant to fixing the problem in question. Now this is not to say that the free software community is perfect. But it seems that certain types of bad behavior that we see demonstrated in the sci-fi fandom circles are uncommon and the people who demonstrate them are significantly outnumbered by people who oppose such actions. Publicly criticising a programmer for watching the NFL in their spare time is akin to holding a sign saying kick me . As I am a fan of science fiction (and hope to write some in the near future) I wonder whether the sci-fi community could be changed to have a culture more like that of the free software community. The web site 365tomorrows.com publishes a short sci-fi story every day [4], they have been doing this for a few years now. They started out publishing work by a small team of authors with the aim of writing a story a day for a year. Now they also take submissions from users and they have a forum for budding authors to discuss their work. The site Protagonize.com is based on the idea of collaborative fiction [5]. I wonder whether the increasing number of sci-fi fans who join such forums will change the nature of the community. Maybe when a book is delayed the fans could take comfort in an increasing amount of fan-fiction based on characters from that book, I expect that the fan fiction will probably not impress all authors - and some may be offended by having their characters used in pornographic fan fiction. But that might just lead to a market shift towards authors who are not overly concerned about such things. When attending sci-fi book signings I ve noticed fans who appear to have stalking tendencies. I have been wondering how much of this is another symptom of the same problem and how much of it is due to science fiction attracting some people who don t understand the concept of personal space and who haven t considered the mathematics of interactions between famous people and fans - as one of many fans the famous person will not remember your fan letters or whether they have met you before, it s not possible. I look forward to the day when a well known author can have lunch with some fans after a book signing and not be afraid of weird fans. I wonder if Cory Doctorow [6] already has such cool fans, Cory seems to be one of the leaders in the new open way of writing and releasing sci-fi so it seems likely that he would be among the first to reap the benefits. I m sure that most authors would like to have lunch or dinner with their fans if they could be assured that the probability of getting stuck with a nutty fan was extremely low.

Wouter Verhelst: COBOL

According to The Registry, COBOL is now slightly over 50 years old. I wish I could say I never wrote a single line of COBOL, but I can't. In college, I was taught COBOL for three long years. Even though I've managed to purge most of that knowledge from my brain (good riddance), I still have nightmares about the horrible way in which one writes COBOL. I wish I could say COBOL is dying, but it isn't. People still write new COBOL today. I mean, seriously, there's a standard called 'COBOL 2002. 'Nuff said. I wish I could say COBOL isn't a problem, but it's the sole source of most of the Y2K issues way back when. Its features invite many of the kind of horribly wrong coding styles which cause bugs; Y2K is just one. I wish I could say COBOL code is pretty, but it isn't. Just to give one example: the first 7 characters of every line of code in each and every COBOL program are 0x20. That is, space. Nothing. Utterly useless. There is no reason for this in modern environments, yet it's still there. Note why I dislike significant whitespace. Another example is the fact that you can't just say 'foo = 1 + 1'. Instead, you have to say 'MOVE 1 TO FOO', and then add a second statement that says 'ADD 1 TO FOO'. I'll just use english if I want to write a novel, thank you. I wish I could say I didn't care about COBOL anymore, but for some weird reason, I do. And just in case you were confused: no, I do not have warm, fuzzy feelings for COBOL. If there was a button that would nuke all the COBOL code on the planet, would I push it? Probably not immediately. I'm sure it would take time for me to recover from the sheer joy of knowing that this button actually exists, before I'll be physically capable of keeping my hands steady for the amount of time required for me to actually be able to push it. COBOL is proof of either the absense of any deity, or the existence of the devil. Given the chance, no sane person, let alone a sane deity, would allow the creation of such an abomination. At least I don't have to deal with it anymore. That part is not going to change. Ever.

Russell Coker: LG U990 Viewty

I have just got a LG U990 Viewty mobile phone [1]. It s a 3G phone and came free on the $29 monthly cap plan from Three (minimum monthly spend is $29 - but this is free if you use $29 per month). My previous plan was the $29 cap but had a minimum spend of $20 per month, as I never happened to use less than $29 per month I am not paying more. For a modern mobile phone the actual phone functionality is a sideline. If a device was strictly designed to be a phone then I think it would be very similar to the Nokia phones that were available 5+ years ago - the Nokia I had in 1999 performed every phone function that I desired of it. Like most modern phones the LG U990 Viewty suffers in it s phone functionality from the desire to make it do non-phone tasks and from the desire to cripple it to meet the desires of the carriers (not the desires of the users). For example the home screen will always have at least two buttons for paid Three services and I have no configuration option to remove them. Replacing them with speed dial options for a couple of numbers that I regularly call would be handy. As the main screen is a touch-screen there is no excuse for this, they should allow the software to be reconfigured with more useful options. Eventually the Android will kill most of the other phones and this problem of phones being designed to suit the telephone companies instead of the users will be solved. One of the most annoying mis-features of the phone is that it doesn t properly handle address book entries with multiple phone numbers. One of my friends turns his mobile off when he is at home, so I regularly call his mobile and then immediately call his home number if the mobile is unavailable. With my previous two mobile phones I could press the dial button to bring up the list of previous calls and then use the arrow buttons to select from the other numbers that are attached to the same address-book entry, so with three button presses I would be dialing his other number. With the Viewty I have to go back to the address book. The compelling feature of the Viewty is the camera and display. It has a 5MP camera which makes it the second highest resolution camera-phone offered by Three - the LG Renoir (KC910) has 8MP but needs a $99 plan for it to be free. It also has a 240*320 resolution touch-screen display (in a quick search in January when I bought my phone the best resolution display I could find on a phone is 240*400 in the LG Renoir). While the camera is documented as being 5mp there are no specs available about the resolution of the CCD. I want to use the native resolution of the CCD for pictures (I think interpolation is a waste of space). The CCD might actually be 5mp, a picture of the 1400*1050 resolution screen on my Thinkpad allows me to read all the text even when small fonts are in use, so the CCD resolution must be significantly greater than 1400*1050. This is a really important feature as the Viewty will work well for making screen-shots for bug reports about crashed computers (several of my clients have expressed interest in getting one after seeing such a demonstration). One annoying problem is that the camera software takes a while to load, my trusty Sony digital camera starts a lot faster and the LG U890 phone I used for the past two years is also a lot faster and more convenient. This won t work well for photographing unexpected events. When I am traveling by public transport I will photograph the relevant pages of my street directory as I can zoom in to photos of the maps and read the street names, it saves some weight when traveling. The 2G micro-SD card (which incidentally cost $10 from OfficeWorks) will allow me to store a lot of maps. One interesting feature is the video recording capabilities. It can do 640*480 resolution at 30fps (which is pretty good) and 320*240 resolution at 120fps (they claim that you can film a balloon popping). In my quick tests the standard 640*480*30fps mode works well, but the 120fps mode requires much brighter light than most of my test environments, so I have not yet got it working properly. The phone has a reasonable voice recording function, it can record considerably more than 34 hours of audio and the quality is reasonably good if you use an external microphone. It is however quite poor if you use the built-in microphone for a dictaphone function, it seems that quality is poor at any distance. I had wanted to record my LCA mini-conf talks with my phone but unfortunately forgot to bring the adapter for the external microphone. It s a pity that the phone doesn t have a standard microphone socket as I have misplaced my Viewty microphone, when designing the phone they should assume that misplacing attachments is a common occurrence and design it to use common parts. I recently spoke to a journalist who uses his mobile phone to record interviews. He said that his phone supported phone calls, voice recording, and taking pictures - all the essential tasks for his work. It seems that the Viewty would be better than most phones for journalistic work apart from the issue of low quality voice recording when you have misplaced your external microphone. The text editor is unfriendly in the keyboard mode (I have not tried hand-writing recognition), one thing I don t like is the fact that the letters jump when you press them. This does allow changing a letter by moving the stylus before releasing the press (some people consider this a great feature). There are no cursor control keys (which is a serious omission), and the keyboard doesn t resemble a real keyboard. My iPaQ is far better for writing (I once wrote a full-length magazine article on an iPaQ). The stylus is quite strange and interesting. In the picture of the front of the phone the stylus is compacted with it s lid on. In the picture of the back of the phone the stylus is extended with the lid off. The end of the stylus clips in to the lid so that removing the lid drags the central part out of the body. It s an interesting design and with the string on the lid allows the stylus to be attached to the phone when it s not being used. But I have never used it. Even with an iPaQ (which had a proper stylus that attached firmly inside the body of the device) I often used a fingernail on the touch screen. I have not felt the need to ever use a stylus with my Viewty. One final noteworthy thing is the support for Google services. It seems to have client support for YouTube, Google Maps, GMail, and Blogger. This seems to be a major win for Google, the Viewty is one of the most popular phones at the moment and I expect that lots of people who buy them will now have an incentive to use the Google services. Between these sorts of deals and the Android I think that it will be necessary to have some sort of anti-trust action against Google. Google are generally doing good things for the users. I have been quite satisfied to use Google search, Google advertising on my blog, and Gmail. Also I have been moderately happy with Blogger (it was good when I started blogging) and Google Maps is useful on occasion. So generally I am happy with Google, but monopolies are bad for the users so I think that if things continue on their current trend then Google may have to be split into several little Googlets some time in the next few years.

30 May 2009

Joost Yervante Damad: how to set a serial port at MIDI speed in linux

Linux serial ports only work at standard speeds by default. MIDI runs at 31250 baud, which is not a standard speed. However there are tricks to get custom speeds, but documentation is quite fuzzy. This is a simple recipe that worked for me with an FT232 USB-Serial board.

Check the baud base of the device:

$ setserial -g -a /dev/ttyUSB0
/dev/ttyUSB0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
Baud_base: 24000000, close_delay: 0, divisor: 0
closing_wait: infinite
Flags: spd_normal low_latency

As you can see the baud base is 24000000 here.
Next calculate the divisor by dividing the baud_base you see here by the speed you want.
In my case 24000000/31250=768.

Apply the new setting:

$ setserial -v /dev/ttyUSB0 spd_cust divisor 768

Next start your serial application, you might want to make sure it is already set to the correct speed before you do the above changes else it might destroy your settings. The correct speed is 38400 baud, which is now aliased to 31250.

With minicom just use the menu (CTRL-A Z) to change the settings.

Screen can be used like this:

screen /dev/ttyUSB0 38400

Exit screen by pressing CTRL-A CTRL-\

Sweet.

Andrew Pollock: [life] On obtaining an E-3 visa from the US Consulate in Vancouver

I've already had one enquiry, so I guess I'd better get writing. Despite the lawyers being really down on using this Consulate, I have to say that from my experience, it's been the easiest so far. Or I'm just getting used to the rigmarole. The one screw up was I didn't read the instructions thoroughly enough, and we rocked up to the Scotia Bank branch to deposit the visa application fee in their bank account, and I thought the fee was quoted in Canadian dollars. Turns out, it was quoted in US dollars. It wasn't the end of the world that we didn't have cash, they could sell us US dollars on a credit card, except the bank would only accept Visa card, not Mastercard. I haven't had to deal with such bullshit since the great Cabcharge/Visa card war in Australia in the late 90's. Moral of that story: read the instructions multiple times. Carry one of each flavour of credit card when traveling internationally, just in case. That minor transactional hiccup aside, everything went fine. The Consulate itself does all of the pre-interview shenanigans on one floor (the bulk of the waiting around, the fingerprinting and photographing) and then they shoot you up to another floor for the "interview". Annoyingly, they run you through the metal detectors again on the higher floor. The interview was basically "So you work for Google? How about the food?" and then he told us to come back the next day to pick up the passports. I think we were in and out in about three, three and a half hours. I have to say, the ability to collect the passports from the Consulate later is a real boon. When you're in a foreign country, the last thing you want to deal with is any glitches in the postal system, or trying to get mail delivered to a hotel. This alone makes me like the Vancouver Consulate the best. We went back at the 2:15pm allotted "passport pick up time", and they came down to the security checkpoint on the ground floor and you show your receipt and they give you your passports back. They tell you to step outside and check it, and come back if there's any problems, so I presume you can at least talk to a human at that point if there are any problems. This is my third E-3 visa. They did not ask to see any of my supporting paperwork showing ties with Australia or anything else that I had in my giant wad of paperwork, just the approved Labor Condition Application, which they kept and returned with the passport the next day.

29 May 2009

Erich Schubert: Java hacks: Generics and toArray

Arrays and Generics in Java do not mix very well. In order to create an array, you need to know the object class the array is supposed to store.Arrays in Java are special: they can efficiently store primitive data types. The expected difference in efficiency between byte[] and Byte[] is pretty big (of course some good VM might optimize) for obvious reasons (think of: references, garbage collection, pointer sizes, ...).This is probably why you need to know the type before creating an array (because an array of primitive types such as byte will be different from one that stores objects of some kind).In particular, the following Java code
  String[] foo = (String[]) new Object[0];
results in a run time error ("[Ljava.lang.Object; cannot be cast to [Ljava.lang.String;"). But it gets more confusing when you introduce generics:
public static <T> T[] test()  
  T[] te = (T[]) new Object[0];
  System.err.println(te.length);
  return te;
 String[] foobar = test();
will print "0", then throw the same run time error in the foobar line.What happens here is that in the test() method, T actually is replaced with "Object" at compile time. Thus the array type works just fine, and so does the call to te.length. Upon returning, it is then cast into a String[] array and fails.Now here comes a crazy Java hack:
public static <T> T[] test(T... ts)  
  T[] te = (T[]) java.lang.reflect.Array.
      newInstance(ts.getClass().getComponentType(), 0);
  System.err.println(te.length);
  return te;
 String[] foobar = test();
The exception is gone, foobar is of the proper type now!A result of discovering this hack are these two methods:
public static <T> T[] newArrayOfNull(int len, T... ts)  
  // Varargs hack!
  return (T[]) java.lang.reflect.Array.
      newInstance(ts.getClass().getComponentType(), len);
 public static <T> T[] toArray(Collection<T> coll, T... ts)  
  // Varargs hack!
  return coll.toArray(ts);
 
Notice how elegant the last method looks - and it finally allows you to do toArray(collection) instead of collection.toArray(new WhateverClassTheCollectionHas[0]).Note that this is still a hack, and may or may not work with all Java compilers, JREs and/or Java versions.Update: Note that this 'hack' is also not transitive. The context calling toArray needs to know the object type at compile time. So it doesn't save you much more than writing "new KnownClass[0]" etc.Update: So I'm actually not using this - it's just a hack, and often quite hackish. The problem is that when you call e.g. toArray in an Generics context, it will actually create an array of "Object", so it makes much more sense to verbosely specify the class you want to use for the arrays (and get some reliability in use back).

28 May 2009

Sandro Tosi: Update on the Matplotlib book

Some people asked me how's the book writing is going. Ah you're right, it's a loooong time I didn't say anything of the progress, and here it is.

I've just turned the half of the book: about 10 days ago I've sent the 5th chapter (out of 10) and up to now I've covered this (high-level) contents by chapter:

  1. installation & setup
  2. first contact with mpl
  3. some more stuff (like graph types)
  4. OO style and some advanced things
  5. GTK embedding
6th (and current) chapter is about Qt, so even KDE guys will be happy :)

I found several problems when working with GUI design programs: both Glade and Qt Designer made me scream a lot; but probably it's just me that I'm not so used to GUIs :)

Other arguments will be: Wx, web, real use cases.

In particular for the last part (real cases) I'd like to hear some proposals from you. I've already got something in mind, but users opinion will help me direct my work better.

Sorry, I've got to "drop/reduce" the science chapter (it was superseded by the real use-cases one) since I don't think this is the right place for it. Of course, a couple of "science examples" might come into the mentioned chapter, but your proposals have to be at a low-medium level.

27 May 2009

Biella Coleman: Journal of Legal Anthropology

Something I have been thinking a lot about lately is why social science and humanities journals have been slower to move toward the land of open access in comparison to the hard sciences. There are a few obvious reasons but there are others which are still a mystery to me. I understand why existing journals can t easily pry away from established relations and obligations so I am not all that surprised that these journals, whether in the hard sciences or soft , have not gone open access. But perhaps newly minted journals are in better position to start right off the bat with an OA agreement. This is what the International Journal of Communication recently did and I am sure there are other examples. So today I was disappointed to find out that the following new Anthropology journal theJournal of Legal Anthropology has seemingly gone down a traditionalist copyright route. But I don t just want to point fingers here as I know editors are often in a very difficult position when seeking sponsorship and support for a new journal. That is, achieving OA, I understand is no walk in the park. And yet given their mission and given that it is a legal journal, it also makes sense to have some sort of open format:
International in scope, we hope it will be accessible beyond a specialist legal anthropology area and, in practice, both widen what is understood within the discipline of anthropology as legal and position the legal as also socio-cultural in terms of contemporary anthropology. The journal is produced by anthropologists interested in making anthropology accessible (translatable) in other settings and disciplines, and by legal practitioners with support from academics working in human rights, conflict and related areas
A walled garden is not suited for the flowers of access to grow. But perhaps they tried and failed. If this is the case, it would also be good to learn of these experiences, which can be used in future cases to pave the path toward greater access.

Biella Coleman: Journal of Legal Anthropology

Something I have been thinking a lot about lately is why social science and humanities journals have been slower to move toward the land of open access in comparison to the hard sciences. There are a few obvious reasons but there are others which are still a mystery to me. I understand why existing journals can t easily pry away from established relations and obligations so I am not all that surprised that these journals, whether in the hard sciences or soft , have not gone open access. But perhaps newly minted journals are in better position to start right off the bat with an OA agreement. This is what the International Journal of Communication recently did and I am sure there are other examples. So today I was disappointed to find out that the following new Anthropology journal theJournal of Legal Anthropology has seemingly gone down a traditionalist copyright route. But I don t just want to point fingers here as I know editors are often in a very difficult position when seeking sponsorship and support for a new journal. That is, achieving OA, I understand is no walk in the park. And yet given their mission and given that it is a legal journal, it also makes sense to have some sort of open format:
International in scope, we hope it will be accessible beyond a specialist legal anthropology area and, in practice, both widen what is understood within the discipline of anthropology as legal and position the legal as also socio-cultural in terms of contemporary anthropology. The journal is produced by anthropologists interested in making anthropology accessible (translatable) in other settings and disciplines, and by legal practitioners with support from academics working in human rights, conflict and related areas
A walled garden is not suited for the flowers of access to grow. But perhaps they tried and failed. If this is the case, it would also be good to learn of these experiences, which can be used in future cases to pave the path toward greater access.

Michael Casadevall: UDS Day 3 & KDE involvement

Hola all,
So this is my first blog post since UDS started (although I have been doing some work microblogging this session around (I find that if I treat it like multicast IRC using gwibber, it suddenly makes more sense to me). We're now three days into UDS, and working hard on defining what Ubuntu karmic will be, and I must say I am excited with the way things are shaping up to UNR discussions, to the Android Execution Environment (and if anyone has any questions on it, please direct those emails to Michael Frey and Debbie Beliveau as they are the people behind it, despite Slashdot's reports on the subject).

There are loads going on, including Moblin (which you'll see this afternoon), Android (same), ports kernel handling, and loads of other cool things come up. I'll comment on some of the more interesting things as time goes on.

In other news, as of late last night, I'm officially an upstream KDE developer with SVN commit writes. I've written an email detailing my plans for working on KDE to kde-core-deveonl, where is it is happily stuck in a moderation queue, so hopefully those involved in upstream KDE development will soon learn of my intentions :-).

I'll write more later,
Michael

Michael Casadevall: Jaunty Retrospect

Guess its my time to post something about my feelings on Jaunty.

The Good:
* armel successfully birthed
* powerpc well on the way to be well maintained
- Kernel and installer work mostly done by TheMuso (thanks :-))
- Image testing by the people of #ubuntu-ps3, myself, and TheMuso
- powerpc, and powerpc+ps3 both in the release annoucements for Kubuntu and Xubuntu :-)
* Kubuntu upgraded to KDE 4.2
* Xubuntu upgraded to Xfce 4.6
* PowerPC FTBFS rate in main very low. ia64, and sparc looking more improved.

The Bad:
* SPARC, ia64, and HPPA remain fairly foobar w.r.t. to the installer and kernel

The Ugly:
* The drama over notifications and update-manager

All and all though, I think its been a fairly good cycle. Looking forward to karmic.

Jonathan Yu: I Love Open Source


While working on my Google Summer of Code project today, I came across a bug that pretty much halted my productivity for the day. Early on in my project, I decided that working with Unicode is hard, among other things. Since I was restricted to using C, I had to find a way to easily manipulate Unicode stuff, and I came across GLib (I m not even entirely sure how, I think I just remember other projects using it, and decided to look it up.) Not only did it have Unicode handling stuff, it also provides a bunch of convenient things like a linked list implementation, memory allocation, etc. All in a way intended to be cross-platform compatible, since this is the thing that s used to power Gtk. I m not entirely sure how it differs from Apache s Portable Runtime (APR); maybe it s even a Not Invented Here syndrome. In any case, I, not suffering from that particular affliction, decided to be lazy and re-use existing code. For some reason, GLib s g_slice_alloc() call was failing. For those of you that don t know what this does, it is similar to malloc() in standard C it allocates a chunk of memory and returns it to you, so that you can make use of dynamic memory allocation, rather than everything just being auto variables. In particular, it means you can be flexible and allocate as much or as little memory as you need. So I spent the entire day trying to figure out why my program was segfaulting. Looking at the output of gdb (the GNU Debugger), the backtrace showed that it was crashing at the allocation statement. No way, I thought, that test is so well-tested, it must be a problem with the way I m using it. I changed the code to use malloc() instead of g_slice_alloc(), and the program started crashing right away, rather than after four or five executions with g_slice_alloc(). Not exactly useful for debugging. I mentioned my frustration with C on the Debian Perl Packager Group channel, and a friend from the group, Ryan Niebur took a look at the code (accessible via a public repository). After a bit of tinkering, he determined that the problem was that I was using g_slice_alloc instead of g_slice_alloc0, which automatically zeroes memory before returning it. It stopped the crashing and my program works as intended. I m still left totally puzzled as to why this bug was happening, and I m not sure if malloc isn t supposed to be used with structs, or some other limitation like that. But thanks the magic of open source and social coding/debugging, the expertise of many contribute to the success of a single project. It s such a beautiful thing. Posted in Computer Science, Software Engineering Tagged: Algorithms, Best Practices, Code Reuse, Computer Science, Google Summer of Code

26 May 2009

Michal &#268;iha&#345;: Nokia SMS decoding

Yesterday I finally found some time to analyze all filesystem message dumps for Nokia phones. I always hated way Gammu used to decode these messages, because in most cases decoding was almost same function just with added some random offsets. After some time looking into the dumps, I finally came out with description of the format. It it still not complete, but it allowed to simplify the code a lot while fixing bugs with some messages previous solution did not catch. Now I hope I did not miss anything and new code will not introduce new regressions.

Next.

Previous.