Search Results: "will"

10 April 2010

John Goerzen: Jacob has a new computer and a favorite shell

Earlier today, I wrote about building a computer with Jacob, our 3.5-year-old, and setting him up with a Linux shell. We did that this evening, and wow he loves it. While the Debian Installer was running, he kept begging to type, so I taught him how to hit Alt-F2 and fired up cat for him. That was a lot of fun. But even more fun was had once the system was set up. I installed bsdgames and taught him how to use worm. worm is a simple snake-like game where you use the arrow keys to eat the numbers. That was a big hit, as Jacob likes numbers right now. He watched me play it a time or two, then tried it himself. Of course he crashed into the wall pretty quickly, which exits the game. I taught him how to type worm at the computer, then press Enter to start it again. Suffice it to say he now knows how to spell worm very well. Yes, that s right: Jacob s first ever Unix command was . worm. He d play the game, and cackle if he managed to eat a number. If he crashed into a wall, he d laugh much harder and run over to the other side of the room. Much as worm was a hit, the Linux shell was even more fun. He sometimes has a problem with the keyboard repeat, and one time typed worrrrrrrrrrrrrrrrrrm . I tried to pronounce that for him, which he thought was hilarious. He was about to backspace to fix it, when I asked, Jacob, what will happen if you press Enter without fixing it? He looked at me with this look of wonder and excitement, as if to say, Hey, I never thought of that. Let s see! And a second later, he pressed Enter. The result, of course, was: -bash: worrrrrrrrrrrrrrrrrrm: command not found Dad, what did it do? I read the text back, and told him it means that the computer doesn t know what worrrrrrrrrrrrrrrrrrm means. Much laughter. At that point, it became a game. He d bang at random letters, and finally press Enter. I d read what it said. Pretty soon he was recognizing the word bash , and I heard one time, Dad, it said BASH again!!! Sometimes if he d get semicolons at the right place, he d get two or three bashes . That was always an exciting surprise. He had more fun at the command line than he did with worm, and I think at least half of it was because the shell was called bash. He took somewhat of an interest in the hardware part earlier in the evening, though not quite as much. He was interested in opening up other computers to take parts out of them, but bored quickly. The fact that Terah was cooking supper probably had something to do with that. He really enjoyed the motherboard (and learned that word), and especially the CPU fan. He loved to spin it with his finger. He thought it interesting that there would be a fan inside his computer. When it came time to assign a hostname, I told Jacob he could name his computer. Initially he was confused. Terah suggested he could name it kitty , but he didn t go for it. After a minute s thought, he said, I will name it Grandma Marla. Confusion from us did he really understand what he was saying? You want to name your computer Grandma Marla? Yep. That will be silly! Sure you don t want to name it Thomas? That would be silly! No. I will name my computer Grandma Marla. " OK then. My DNS now has an entry for grandma-marla. I had wondered what he would come up with. You never know with a 3-year-old! It was a lot of fun to see that sense of wonder and experimentation at work. I remember it from the TRS-80 and DOS machine, when I would just try random things to see what they would do. It is lots of fun to watch it in Jacob too, and hear the laughter as he discovers something amusing. We let Jacob stay up 2 hours past his bedtime to enjoy all the excitement. Tomorrow the computer moves to his room. Should be loads of excitement then too.

Russell Coker: Web Server Performance

We Have to Make Our Servers Faster Google have just announced that they have made site speed part of their ranking criteria for search results [1]. This means that we now need to put a lot of effort into making our servers run faster. I ve just been using the Page Speed Firefox Plugin [2] (which incidentally requires the Firebug Firefox Plugin [3]) to test my blog. Image Size One thing that Page Speed recommends is to specify the width and height of images in the img tag so the browser doesn t have to change the layout of the window every time it loads a picture. The following script generates the HTML that I m now using for my blog posts. I run BASE=http://www.coker.com.au/blogpics/2010 jpeg.sh foo.jpg bar.jpg and it generates HTML code that merely needs the data for the alt tag to be added. Note that this script relies on a scheme where there are files like foo-big.jpg that have maximum resolution and foo.jpg which has the small version. Anyone with some shell coding skills can change this of course, but I expect that some people will change the naming scheme that they use for new pictures. #!/bin/bash
set -e
while [ "$1" != "" ]; do
RES=$(identify $1 cut -f3 -d\ )
WIDTH=$(echo $RES cut -f1 -dx)px
HEIGHT=$(echo $RES cut -f2 -dx)px
BIG=$(echo $1 sed -e s/.jpg/-big.jpg/)
echo "<a href=\"$BASE/$BIG\"><img src=\"$BASE/$1\" width=\"$WIDTH\" height=\"$HEIGHT\" alt=\"\" /></a>"
shift
done Thanks to Brett Pemberton for the tip about using identify from imagemagick to discover the resolution. Apache and Cache Expiry Page Speed complained that my static URLs didn t specify a cache expiry time, this didn t affect things for my own system as my Squid server forcibly caches some things without being told to but would be a problem for some others. I first ran the command a2enmod expires ; a2enmod headers to configure my web server to use the expires and headers Apache modules. Then I created a file named /etc/apache2/conf.d/expires with the following contents: ExpiresActive On
ExpiresDefault "access plus 1 day"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access plus 1 day"
# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv ico pdf avi mov ppt doc mp3 wmv wav)$">
ExpiresDefault "access plus 1 year"
Header append Cache-Control "public"
</FilesMatch>

# Set up caching on media files for 1 month
<FilesMatch "\.(gif jpg jpeg png swf)$">
ExpiresDefault "access plus 1 month"
Header append Cache-Control "public"
</FilesMatch> DNS Lookups Page Speed complains about DNS names that are used for only one URL. One example of this was the Octofinder service [4], it s a service to find blogs based on tags, but I don t seem to get any traffic from it so I just turned it off. In this case it was the only sensible thing to do to have a single URL from their web site, but I had been considering removing the Octofinder link for a while anyway. As an aside I will be interested to see if there are comments from anyone who has found Octofinder to be useful. I ve also disabled the widget that used to display my score from Technorati.com, it wasn t doing what it used to do, the facility of allowing someone to list my blog as a favorite didn t seem to provide any benefit, and it was taking extra DNS lookups and data transfers. I might put something from Technorati on my blog again in future as they used to be useful. Cookies If you have static content (such as images) on a server that uses cookies then the cookie data is sent with every request. This requires transferring more data and breaks caching. So I modified the style-sheet for my theme to reference icons on a different web server, this will supposedly save about 4K of data transfer for a page load while also giving better caching. The down-side of this is that I have my static content on a different virtual server so now updating my Wordpress theme will require updating two servers, this isn t a problem for the theme (which doesn t get updated often) but will be a problem if I do it with plugins. Conclusion The end result is that my blog now gets a rating of 95% for Page Speed when previously it got a rating of 82%. Now most of the top references that are flagged by Page Speed come from Google, although there is still work for me to do. Also it seems that Australia is now generally unsuitable for hosting web sites for viewing in other countries. I will advise all my clients who do International business to consider hosting in the US or the EU.

Andrew Pollock: [tech/security] How not to do it

From http://www.symantec.com/connect/articles/active-directory-and-linux...
An alternative to allowing anonymous searches on your Active Directory is to allow the nss_ldap routines to bind as an administrator DN to your directory and perform searches in privileged mode. To do this, insert the following lines in your /etc/ldap.conf file: binddn cn=Administrator,cn=Users, bindpw You should be used to the "" thing by now. WARNING: The above example shows that the administrator user name and password have been coded in clear text in the /etc/ldap.conf file! Unfortunately, this file must always remain world-readable, because otherwise users logged on to the system will not be able to read data from the directory. You should not do this on a system where any user has shell access to your system, or can in any other way read this file.
If you've put the Administrator password in a world-readable file, you've already lost.

9 April 2010

Enrico Zini: apt-xapian-index now comes with a query tool

apt-xapian-index now comes with a query tool I've just uploaded a new version of apt-xapian-index to unstable. Now it comes with a little query tool called axi-cache. You can search this way:
axi-cache search foo bar baz facet::tag sec:section
In fact, you can use most of the things described here. You can then say axi-cache more to get more results, or axi-cache again to retry a search, or axi-cache again wibble wabble to add keywords to the last search. This allows to start with a search and tweak it. In order to work it needs to save the last search so again or more can amend it. Searches are saved in ~/.cache/axi-cache.state. You can search tags instead of packages by adding --tags. It will suggest extra terms for the search, and also suggest extra tags. It can even correct spelling mistakes in the query terms once the index has been rebuilt with this new version of update-apt-xapian-index. I need to thank Carl Worth who, with notmuch, reminded me that if I just build a nice interface on top of Xapian's query parser I go quite a long way towards making a Xapian database extremely useful indeed. axi-cache also integrates with bash-completion so that tab completion is context-sensitive to the command line being typed:
$ axi-cache search image pro
probability      process          processors       programmability  provides         
problem          processing       production       pronounced       proving  
$ axi-cache search kernel pro
problems     processor    production   proved       provided     
processing   processors   programming  provide      provides     
Thanks to David Paleino who wrote the bash completion script. Just for reference, this is the command line help:
$ axi-cache help
Usage: axi-cache [options] command [args]
Query the Apt Xapian index.
Commands:
  axi-cache help            show a summary of commands
  axi-cache search [terms]  start a new search
  axi-cache again [query]   repeat the last search, possibly adding query terms
  axi-cache more [count]    show more terms from the last search
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -s SORT, --sort=SORT  sort by the given value, as listed in /var/lib/apt-
            xapian-index/values
  --tags                show matching tags, rather than packages
  --tabcomplete=TYPE    suggest words for tab completion of the current
            command line (type is 'plain' or 'partial')
If you install the package for the first time, you may need to rebuild the index by running update-apt-xapian-index as root before using axi-cache.

Ingo Juergensmann: Syncing N97

We now have year 2010 but sometimes it still feels like living in the Stone Age of Computing. There's a smartphone, let's call it N97, with Symbian on it. Then there are a bunch of client computers such as a Debian workstation/homeserver running Sid, a Laptop running OS X with iCal and a Windows XP machine at work. Every machine itself (well, with the exception of the XP machine) is a nice piece of hard- and software offering a bunch of possibilities: you can manage your calendars, contacts and tasks.

The difficulty arise when you want to sync those calendars, contacts and tasks between all of the different machines.

There are several ways to address this task:

  1. WebDAV:
    Setting up a WebDAV is no rocket science and you can easily sync your calendars easily with Sunbird or Thunderbird/Lightning for example. But that leaves the N97 ouf of syncing. The N97 can be synced with iSync on OS X, but iCal is not able to work on a single calendar. You can either export a calendar to a remote WebDAV or subscribe it. iCal ignores changes done in other clients and will overwrite those.


  2. CalDAV 1:
    CalDAV (calendarserver) does require some more configuration before you can use it properly, but when done, it should be capable of syncing calendars, resources, tasks and such. Using CalDAV should work aorund the limitations of WebDAV as mentioned above. The calendars can be synced to CalDAV from iCal by creating a remote account and you can sync with iSync via Bluetooth. But you will need a local calendar in iCal, because you can't use iSync to sync your smartphone to your CalDAV remote calendar in iCal.

    iSync unable to use CalDAV for syncing


    Additionally there are problems when you delete an event from your CalDAV calendar on your smartphone. iSync will report an error like this:

    Freitag, 9. April 2010 21:45
    [Nokia N97]
    Changes of Events in writeprotected calendar on this phone are not permitted. These changes were ignored: test, 04/09/2010 23:00


    Deleting events in your local iCal calendar, however, is working well. In the end this result is not encouraging as I need the CalDAV calendars being in sync.
    Syncing with Sunbird on OS X doesn't work either. Maybe it would with DAViCal as server frontend?


  3. CalDAV 2:
    Because syncing via iSync doesn't work as expected it would be a decent solution if the N97 could sync directly to CalDAV. Unfortunately it can't, although there seems some progress with Symbian there. If that is already integrated into v21.0.102 of N97 firmware, it would nice if someone could point me to how configure the N97 properly.


  4. SyncML:
    Maybe another option would be to use some sort of SyncML server in order to sync calendars and stuff between those machines, but I don't know how OS X will work with that approach. Again, hints are welcome!


Syncing calendars and other stuff really seems to be painful. Using a third party webservice such as .Mac or Google Calendar is no option at all. I don't want to give private data out of my hands and control. So, a self hosted service is needed.
Dear lazyweb, is there a solution available for my problem? I hope so...

Christian Perrier: [life] Once you run a marathon...

...you want to run many. Everybody told me so. Which is why I was warned when I ran my first one year ago in Paris, I knew I would run other. So, on Sunday will be my fourth one and my second Paris Marathon. So, after 4h10mins in Paris (april 2009), 4h12 in Rambouillet Forest (all alone in full autonomy mode) and 4h00'49" in Cologne, my target this time is 3h50. Weather is announced to be perfect, my physical condition is AFAIK good, the motivation is very high....my only fear is that I registred in the "4h target" group (because, back in November, I wasn't expecting the results I got in February/March in half-marathons). As many people overestimate their target, I expect to be passing hundreds of runners during the first 5 kilometers, which is not the best way to start....but, hey, Paris streets are wide enough (except Place de la Bastille, my nightmare....I hope organizers solved the jam problem there). Of course, I kinda hope seeing fellow Paris DD's waving giant Debian swirls, including our wanabee-DPL.....but let's stop dreaming. And running in a sunny day all across Paris and along river Seine, will be great again even without Zack. I'll also be missing Ralf and No l who ran it last year: Ralf is unfortunately suffering from knee problems and No l is preparing for Mainz marathon (target: 3h??). Anyway, more news on Sunday afternoon....and let's enjoy a full rest tomorrow!

John Goerzen: Introducing the Command Line at 3 years

Jacob is very interested in how things work. He s 3.5 years old, and into everything. He loves to look at propane tanks, as the pressure meter, and open the lids on top to see the vent underneath. Last night, I showed him our electric meter and the spinning disc inside it. And, more importantly, last night I introduced him to the Linux command line interface, which I called the black screen. Now, Jacob can t read yet, though he does know his letters. He had a lot of fun sort of exploring the system. I ran cat , which will simply let him bash on the keyboard, and whenever he presses Enter, will echo what he typed back at him. I taught him how to hold Shift and press a number key to get a fun symbol. His favorite is the hat above the 6. Then I ran tr a-z A-Z for him, and he got to watch the computer convert every lowercase letter into an uppercase letter. Despite the fact that Jacob enjoys watching Youtube videos of trains and even a bit of Railroad Tycoon 3 with me, this was some pure exploration that he loves. Sometimes he d say, Dad, what will this key do? Sometimes I didn t know; some media keys did nothing, and some other keys caused weird things to appear. My keyboard has back and forward buttons designed to use with a web browser. He almost squealed with delight when he pressed the forward button and noticed it printed lots of ^@^@^@ characters on the screen when he held it down. DAD! It makes LOTS of little hats! And what is that other thing? (The at-sign). I ve decided it s time to build a computer for Jacob. I have an old Sempron motherboard lying around, and an old 9 black-and-white VGA CRT that s pretty much indestructible, plus an old case or two. So it will cost nothing. This evening, Jacob will help me find the parts, and then he can help me assemble them all. (This should be interesting.) Then I ll install Debian while he sleeps, and by tomorrow he should be able to run cat all by himself. I think that, within a few days, he can probably remember how to log himself in and fire up a program or two without help. I m looking for suggestions for text-mode games appropriate to a 3-year-old. So far, I ve found worm from bsdgames that looks good. It doesn t require him to have quick reflexes or to read anything, and I think he ll pick up using the arrow keys to move it just fine. I think that tetris is probably still a bit much, but maybe after he s had enough of worm he would enjoy trying it. I was asked on Twitter why I ll be using the command line for him. There are a few reasons. One is that it will actually be usable on the 9 screen, but another one is that it will expose the computer at a different level than a GUI would. He will inevitably learn about GUIs, but learning about a CLI isn t inevitable. He won t have to master coordination with a mouse right away, and there s pretty much no way he can screw it up. (No, I won t be giving him root yet!) Finally, it s new and different to him, so he s interested in it right now. My first computer was a TRS-80 Color Computer (CoCo) II. Its primary interface, a BASIC interpreter, I guess counts as a command-line interface. I remember learning how to use that, and later DOS on a PC. Some of the games and software back then had no documentation and crashed often. Part of the fun, the challenge, and sometimes the frustration, was figuring out just what a program was supposed to do and how to use it. It will be fun to see what Jacob figures out.

Phil Hands: Debian Tartan, in time for DebConf10

It looks like we have just enough interest for a second run of Debian Tartan. If we get it ordered in the next couple of weeks there will be time for kilts to be made in time be worn at DebConf10.The only issue at present is that it would be rather cheaper if more people were involved. For short runs the cloth costs 26.00 GBP per yard, and one also needs to find 400.00 GBP for the loom setup. Once you get to an order of 80 yards, the weavers will swallow the setup cost, and only charge 24.00 GBP per yard.In other words, if we're making only 46 yards (which seems like the current level) it's going to cost 10 GBP extra per yard, which is frustrating, as that then means that buying the remaining 36 yards to make it up to 80 yards will only cost another 365.00 GBP or a tenner a yard.If I wanted to make a profit out of this, I suppose I could speculate on the spare cloth, and then knock it out for 150% profit, but I have no desire to make money from my fellow developers, so while I'm chivying, and talking to the weavers, I'm not going to be underwriting the order like I did last time.So if you're even slightly tempted to join this cheerful clan then mail me now! Every extra kilt, skirt, tie, or other item ordered not only results in you owning a beautifully crafted item, but it also does your fellows good by making their orders cheaper too.At an order of 60 yards, the prices cross over, at which point there is no point in not making the full 80 yards, which can then be sold to late-comers to recoup costs for the early-birds.Go on -- you know you want one.Update: not sure what happened to the spam unfriendly mail link - use this: phil at hands dot com

Aurelien Jarno: Debian SH4 QEMU image available

Thanks to the great work of Nobuhiro Iwamatsu and others, Debian has an unofficial SH4 port which is close to complete (> 90% of the packages built). In order to help developers to fix bugs on this architecture, I have produced an SH4 QEMU image which is available at the same location as my other QEMU images. You will need a recent GIT HEAD QEMU to use it. Previous versions suffer from bugs in the MMU, causing segfaults and gratuitous TLB flushing. The MMU emulation is now hopefully correct, but still a bit slow. Also the emulated board is limited to 64 MB of memory, and this value can t be changed as memory extension would overlap the addresses used for peripherals. Update: I have backported the necessary SH4 patches into the QEMU Debian package version 0.12.3+dfsg-4.

David Welton: US Exports: "The Cloud"?

An Economist special report in last week's print edition talks about how the US will need focus more on savings and exports:

A special report on America's economy: Time to rebalance I've been thinking about that for a while too, especially after the dollar's recent weakness, although it has been strengthening some, lately, apparently due to the state of Greece's finances... I think that the computing industry is, in general, well poised to take advantage of that. For instance, what could be easier to export than computing power or "Software as a Service"? All it takes is a few minutes for someone in Europe to sign up to a US-based service with a credit card. For instance, compare Linode's prices and good service with most of their European competitors (gandi.net for instance, who are good people, and you have to love that they put "no bullshit" right on their front page). Not that they don't have good service in Europe, but it's very difficult to compete on price with the dollar being significantly cheaper. With the dollar where it is right now, gandi is almost, but not quite, competitive with Linode. If you don't include taxes. If the dollar weakens again, though, things could easily tilt far in Linode's favor. Besides a weak dollar, I think it will be important for companies in a position to do so in the US to focus on "the rest of the world". The US is a big, populous country where it's very easy to forget about far-off lands. Compare my home town of Eugene, Oregon to where I live in Padova. Google Maps says that it takes 7+ hours to drive to Vancouver, Canada (which, to tell the truth, isn't all that foreign in that they speak English with an accent much closer to mine than say, Alabama or Maine). Going south, Google says it's 15+ hours just to San Diego, although I think that's optimistic myself, given traffic in California. From Padova, I can be in France in 5 hours, according to Google, 3 hours to Switzerland, 4 to Innsbruck, in Austria, less than 3 hours to the capital of Slovenia, Ljubljana, and around 3 hours to Croatia, too. And if you wanted to throw in another country, the Republic of San Marino is also less than 3 hours away, according to Google's driving time estimates. You could probably live your entire life in a place like Eugene and never really deal much with foreigners, whereas here, nearby borders are both a historic and an ever-present fact. The outcome of this is that, to some degree, people in the US have traditionally focused their businesses "inwards" until they got to a certain size. Which is, of course, a natural thing to do when you have such a big, homogenous market to deal with before you even start thinking about foreign languages, different laws, exchange rates and all the hassle those things entail. However, if exchange rates hold steady or favor the US further, and internal spending remains weaker, it appears as if it may be sensible for companies to invest some time and energy to attract clients in "the rest of the world". "Cloud" (anyone got a better term? this one's awfully vague, but I want to encompass both "computing power" like Linode or Amazon's EC2, as well as "software as a service") companies likely will have a much easier time of things: for many services, it's easy to just keep running things in the US for a while, and worry about having physical or legal infrastructure abroad later. Your service might not be quite as snappy as it may be with a local server, but it'll do, if it performs a useful function. Compare that with a more traditional business where you might have to do something like open a factory abroad, or at the very least figure out the details of how to ship physical products abroad and sell them, and do so in a way that you're somewhat insured against the large array of things that could go wrong between sending your products on their merry way, and someone buying them in Oslo, Lisbon or Prague. Since this barrier to entry is lower, it makes more sense to climb over it earlier on. As an example, Linode recently did a deal to provide VPS services from a London data center, to make their service more attractive to European customers. However, they still don't appear have marketing materials translated into various languages, and presumably they don't have support staff capable of speaking languages like Chinese, German or Russian either (well, at least not in an official capacity). This isn't to pick on them; they may have considered those things and found them too much of an expense/distraction/hassle for the time being - they certainly know their business better than I do - and that they simply are content to make do with English. Other businesses, however, may decide that a local touch is important to attracting clients. What do you need to look at to make your service more attractive to people in other countries? In no particular order:

There's certainly no lack of work there, but on the other hand, it's possible to do almost all of it from wherever you happen to be located, rather than spending lots of money and time flying around to remote corners of the globe, as is still common practice in many industries.

Bdale Garbee: TeleMetrum v1.0 Boards Arrive

The first production run of TeleMetrum boards arrived from our assembler today, and overall things are looking good! Unfortunately, I specified the wrong value for a capacitor associated with the new and improved 150mA 3.3 volt regulator. The resulting symptom was interesting to debug... everything seemed to be fine except that the GPS chip wouldn't talk to us. After some investigation, it became clear that the 3.3 volt power supply was taking much longer to stabilize than it should... long enough that the power-on reset circuit was relaxing before the supply was stable! The cc1111 apparently handles this just fine, but the GPS chip doesn't. Since the new cap is optional, just removing it caused everything on the first test board to start working! The ultimate solution will probably be to both replace the new bypass capacitor with one of the correct value, and to swap out the cap in the reset circuit for a somewhat larger value to ensure we have plenty of margin in the reset circuit. I now have 4 of the new boards completed, turned on, and passing initial tests. Hopefully tomorrow I'll be able to wrap up the rest of the required functional testing. I then need to focus my attention on a business trip all of next week... but if all keeps going well, we're very close to taking our first orders. Stay tuned!

Gustavo Noronha Silva: Designing from the bottom up

Have you ever seen, while dealing in a support channel with a novice that just got in touch with the power of UNIX a conversation that goes like this?:
<novice> How can I process the output of a command, so that any number of spaces gets turned into a newline?
<seasoned> What are you trying to do?
<novice> I want to list the contents of a directory, but I want one per line.
<seasoned> ls -1
I have seen this numerous times, even as one of the actors. At times I was the novice, and many times in #debian-br I was the seasoned person trying to get the novice to focus on the problem they were trying to solve, not on the solution they thought was right. While reading M ir n Duffy s awesome paper about contributing to Free Software as a designer I couldn t help but get that image brought to my memory again, and again. Specially when I read this part:
This means the language and even the approach FLOSS projects take to solving problems tend to be focused on implementation and technology rather than starting with a real-life user problem to solve and determining appropriate implementation afterwards.
That does sound like us, and it does sound like many of the solutions we come up with. While I was reading her paper, there was a reference I got very interested in checking. It s a PDF with no links in it, so I only had the number of the reference. What I would have to do is I would have to scroll to the end of the paper, and find the reference, then somehow come back to the place I was looking at. My most immediate thought was you know, maybe evince should have tabs . Why? Because I could open a new tab, go to the place the reference was at, and to go back I just needed to close the new tab. Other options require much more effort - remembering the page I was at, or maybe the scroll offset more or less, and scan for the part of the text I was at. But those are not the only options! I could have the application set a marker on where I am, and have an easy command to go back to that marker, for instance, or evince could provide a way of looking ahead without throwing away the current state at all. I m pretty sure if I look around enough I will find tools that solve this problem in a fairly good way. Now, I think that is exactly how we ended up with tabs in so many places they do not make sense in, and with so many ad-hoc solutions that solve our problems in half-assed ways. Even in browsers, we tend to use tabs as ad-hoc solutions to real problems we have no real solution to handle yet, such as I want to check this other thing out real quick, but I do not want to lose any state of this page , or I want to check this out, but not right now, so let me open it, and then I ll come back to it , or maybe even I want to look at this now, but since it is going to take a while to load, I might as well let it load in the background, and when I finish reading this I can go look at it . These are the real problems we have, and I think we need better designs that solve them for real, instead of just patching them with the ad-hoc solution that tabs are. The other extreme of the spectrum is, of course, not doing something, or even anything for lack of the perfect solution. Using this is not a real solution as an excuse to not implement something that could serve as a temporary solution to a problem may cause more frustration than having to deal with the ad-hoc solution that is tested, and being applied to other applications for some time. After all, in many cases the ad-hoc solution can be later replaced with a proper one. I guess this is another instance of the very difficult problem of balancing different realities: proper design is not always available to start something up, specially if the application is backed by individuals and not by a company or a bigger project that could bring in designers to work on it from the start. In this case having something up and running is usually a very important first step in a free software project - usually required to get enough interest to make it worth designing for.

C.J. Adams-Collier: Getting started with gtk

This is a quick tutorial for getting a first gtk-sharp app up and going. Install MonoDevelop
$ sudo apt-get install monodevelop libgtk2.0-cil-dev
Start MonoDevelop It ll be in your GNOME application menu under Applications->Programming->MonoDevelop Create a new Gtk# Project
Create New Project

Create New Project

Select Gtk# 2.0 Project

Select Gtk# 2.0 Project

Select Project Features

Select Project Features

Hello World

Hello World

Run project You can run this boilerplate by pressing Ctrl-F5 Using the Designer Double-click on the file named MainWindow.cs in the Solution section. When the file opens, click the Designer button below the code view.
The Designer

The Designer

The Toolbox To add the Toolbox, press Alt-Shift-B or click View->Toolbox. Drag a VBox widget from the Toolbox to the main window.
Add VBox

Add VBox

Drop a Menu Bar widget into the top cell of the VBox, and a Statusbar into the bottom.
Insert Menu and Status Bar

Insert Menu and Status Bar

Properties grid Drop a Button widget into the middle cell of the VBox.
Add the Properties grid from the View menu (Alt+Shift+P or View->Properties).
Select the new button by clicking on it.
In the Properties grid, expand the Button Properties section and click the value of the Label field. Delete the default content and replace it with a different string.
Button with new Label

Button with new Label

Adding a Click handler Select the button in the Designer view
In the Property grid, select the Signals tab
Click twice on the text in the column to the right of the Clicked and replace Click here to add a new handler with MyButtonClickHandler
Add a click handler

Add a click handler

Click on the Source Code button below the viewer window to switch to the C code. You can use the find tool to search for the new handler you created, called MyButtonClickHandler. Ctrl-F will bring up the find dialogue.
Browse to click handler

Browse to click handler

Add some code to update the status bar.
	protected virtual void MyButtonClickHandler (object sender, System.EventArgs e)
	 
		var contextId = this.statusbar1.GetContextId("clicked");
		this.statusbar1.Push(contextId, "Clicky-Clicky" );
	 
Click handler code

Click handler code

Modify button layout The size of the running window is a little weird. I fixed mine by un-setting the Auto Size boolean and setting the Expand and Fill in the Box Child Layout section of the Properties grid.
Button layout changes

Button layout changes

Exercise button click handler Run your application with Ctrl-F5 and click on the button. You should see the new string show up in the status bar at the bottom left of the window.
Not yet clicked

Not yet clicked

Clicked + Status update

Clicked + Status update

Add Menu items
Create File Menu Entry

Create File Menu Entry

Create File->Quit Menu Item

Create File->Quit Menu Item

Add Quit event handler

Add Quit event handler

Add Clear Statusbar Activate Handler

Add Clear Statusbar Activate Handler

8 April 2010

Jan Hauke Rahm: 1st german Mini Debconf: it s official

Hi everyone, the usual channels already provided it: we are planning a Mini Debconf in Germany Berlin to be more precise. Yay! So, how is it gonna be? Well, there is the LinuxTag in Berlin which is held every year; this year s calendars show it on June 9th to 12th. As the location is the fairground and room is available, we found setting up a Mini Debconf right in the middle of it to be a good idea. The Mini Debconf will thus take place on June 10th and 11th. The night in between will of course be used, too. The hacklab we re planning will be open from the start until the bitter end without breaks. That of course is only fun if we re there to do something. :-) I sincerely hope that we re in freeze by then and the Bug Squashing Party in the hacklab will do all the best to Make Things Happen[TM]. I m also very pleased to see the german debianforum.de trying to participate. We should sort things out soon. This is a great opportunity for both of us to connect and learn from each other. Well, that s it for now from my side. For more details, in particular on how to help, see our wiki on debconf.org. You ll hear more soon!

Neil Williams: Emdebian and Google Summer of Code 2010

I've put up a proposal for the Debian part of the Google Summer of Code 2010 and this proposal is based on previous work with edos-debcheck for Emdebian Grip. It started from a simple mailing list post.

Even without formally announcing the proposal, I've already got a potential student!

7 April 2010

Patrick Schoenfeld: Ubuntu considering critical bugs an "invalid" bug?

I just discovered that bug report over at Ubuntu.
Short summary:
They have a script in upstart which is not meant to be run manually and if you do it will erase your whole file system. Additionally it seems that the fact that you shall not run that script is not communicated anywhere.

That alone isn't the most spectacular about it. Bugs happen. Whats spectacular about it is how a Canonical employee and member of the TechBoard (for people who don't know it: The people who decide about the technical direction Ubuntu takes) handles that bug. One quote of him to reflect it all:
Sorry, the only response here is "Don't Do That Then"

So what we have here is a classical case of bad programming. The problem in question is that the script expects a certain environment variable to be set. Fair enough. However it does not check if its set at all and instead of failing or using a sensible default it simply sticks to undefined behaviour. What we have here is a classical programming mistake every beginner tends to do. People who start programming often forget (or don't know) that every external value we rely on must be considered untrustworthy. Therefore a good practice is to check those values.In this case someone decided that this is useless because they suffer from the wrong assumption that nobody ever calls it manually and the other wrong assumption that caller of the scriptwill always set the environment variable correctly. This is a double-fail.
Now the developer in question does not accept that (someone else indicated why the behaviour of the script is dangerous), he simply says that the bug is invalid. Thats really a pity.

Romain Beauxis: [Security] Mediawiki 1.15.3

The Wikimedia fundation has just released a new security update for mediawiki. Unfortunately, I will have no time to prepare updated packages before next week. Hence, any interested contributor is welcome to propose/upload a fixed package. Additionally, there is a patch available. You may use it to update your installation while the package is being prepared..

6 April 2010

Sylvestre Ledru: Update of the linear algebra libraries in Debian

In the numerical computing world, the cornerstones libraries are BLAS and LAPACK. They have been used in most of the numerical software for decades (like Scilab, R, numpy, OpenOffice with calc, etc). During that time, many implementations appeared to improve the performances taking advantages of clusters, multicore, SEE 1,2,3,4 , various levels of cache...
Between the reference BLAS (refblas) to an optimized one like ATLAS or MKL (Math Kernel Library by Intel - non-free), it is not rare to have a 15 factor. In Debian, we use by default the reference implementation of BLAS (168 reverse dependencies) and LAPACK (178 reverse dependencies). If the results are usually bad, they are pretty easy to use. What is hard to use, is switch between highly optimized libraries.
For now, the main one in the archive is ATLAS. ATLAS build process will launch many computations to know what will work best on the architecture. Results are usually excellent. 1) Upload of a refactoring of the ATLAS package.
I have been working on this for a while and after 19 uploads into Debian Experimental and I am happy (and kind of relief) to upload into debian unstable the release 3.8.3 of ATLAS. The new key elements in this release are: Note that, as before, all prebuilt binaries of ATLAS will be always slower than if you built them on the target architecture (but using Debian binary packages will save a few kilograms of Uranium). And one of most important feature is the capability to switch to any ATLAS implementation. 2) Switch between the different implementation
The problem in Debian (and Ubuntu) was that it was hard to switch between the ref BLAS/LAPACK and the optimized libraries. The user has to play with the LD_LIBRARY_PATH to use the various optimized packages and since there is no convention between the various distribution, the upstream developer has to develop crappy tricks to handle such things. It is why I implemented the following proposal: Handle different versions of BLAS and LAPACK. The main idea is to use the update-alternatives system to allow a quick and easy switch. For example:
# update-alternatives --config libblas.so.3gf 
There are 3 choices for the alternative libblas.so.3gf (providing /usr/lib/libblas.so.3gf).
  Selection    Path                                           Priority   Status
------------------------------------------------------------
* 0            /usr/lib/atlas-core2sse3/atlas/libblas.so.3gf   55        auto mode
  1            /usr/lib/atlas-base/atlas/libblas.so.3gf        35        manual mode
  2            /usr/lib/atlas-core2sse3/atlas/libblas.so.3gf   55        manual mode
  3            /usr/lib/libblas/libblas.so.3gf                 10        manual mode
# update-alternatives --config liblapack.so.3gf
There are 3 choices for the alternative liblapack.so.3gf (providing /usr/lib/liblapack.so.3gf).
  Selection    Path                                             Priority   Status
------------------------------------------------------------
* 0            /usr/lib/atlas-core2sse3/atlas/liblapack.so.3gf   55        auto mode
  1            /usr/lib/atlas-base/atlas/liblapack.so.3gf        35        manual mode
  2            /usr/lib/atlas-core2sse3/atlas/liblapack.so.3gf   55        manual mode
  3            /usr/lib/lapack/liblapack.so.3gf                  10        manual mode
Thanks to this, it is just trivial to switch from one to the other... Conclusion:
I just pushed the changes into Debian unstable for blas, lapack and atlas.
I have been testing a lot these deep modifications and I fixed all the problems that I found. However, in case I missed something, please report a bug...

Jonathan Yu: Google Summer of Code 2010

Last year, I had a great time participating in the Google Summer of Code with the Debian project. I had a neat project with some rather interesting implications for helping developers to package and maintain their work. It s still a work-in-progress, of course, as many projects in open source are, but I was able to accomplish quite a bit and am proud of my work. I learned quite a bit about coding in C, working with Debian and met some very intelligent people. My student peers were also very intelligent and great to learn from. I enjoyed meeting them virtually and discussing our various projects on the IRC channel as the summer progressed and the Summer of Code kicked into full swing. The Debian project in particular also helps arrange travel grants for students to attend the Debian Conference (this year, DebConf10 is being held in New York City!). DebConf provides a great venue to learn from other developers (both in official talks but also unofficial hacking sessions). As the social aspect is particularly important to Debian, DebConf helps people meet those with whom they are working with the most, thereby creating lifelong friendships and making open source fun. I have had several interviews for internships, and the bit of my work experience most asked about is my time doing the Google Summer of Code. I really enjoyed seeing a project go from the proposal stage, setting a reasonable timeline with my mentor, exploring the state of the art, and most importantly, developing the software. I think this is the sort of indispensible industry-type experience we often lack in our undergrad education. We might have an honours thesis or presentation, but much of the work in the Google Summer of Code actually gets used in the field. Developing software for people rather than for marks is significant in a number of ways, but most importantly it means there are real stakeholders that must be considered at all stages. Proposing brilliant new ideas is important, however, without highlighting the benefits they can have for various users, the reality is that it simply will not gain traction. Learning how to write proposals effectively is an important skill and working with my prospective mentor (at the time he later mentored my project once it was accepted) to develop mine was tremendously useful for my future endeavours. The way I see the Google Summer of Code is, in many ways, similar to an academic grant (and the stipend is about the same as well). It provides a modest salary (this year it s US$5000) but more importantly, personal contact with a mentor. Mentors are typically veterans in software development or the Debian project and act in the same role as supervisors for post-graduate work: they help monitor your progress and propose new ideas to keep you on track. The Debian Project is looking for more students and proposals. We have a list of ideas as well as application instructions available on our Wiki. As I will be going on internship starting May, I have offered to be a mentor this year. I look forward to seeing your submissions (some really interesting ones have already begun to filter in as the deadline approaches).
Filed under: Computer Science, Peer Relationships, Software Engineering Tagged: Computer Science, Debian, Google Summer of Code, Support

Michael Prokop: Remote Console feature through Java applet failing?

I m working for a customer who s using IBM blades. Remote access isn t limited to e.g. SoL but also possible through a Remote Console feature using a Java applet. After migrating one of my 32bit systems to a fresh 64bit system I suddenly couldn t use this Remote Console feature any longer. The error message was (leaving it for search engines and help other affected users):
load: class vnc.VncViewer.class not found.
java.lang.ClassNotFoundException: vnc.VncViewer.class
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:152)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:447)
	at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:2880)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1397)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Network is unreachable
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:525)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:161)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
	at sun.net.www.http.HttpClient.New(HttpClient.java:306)
	at sun.net.www.http.HttpClient.New(HttpClient.java:323)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:458)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Applet2ClassLoader.java:46)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Applet2ClassLoader.java:126)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:123)
	... 6 more
Exception: java.lang.ClassNotFoundException: vnc.VncViewer.class
The error message might not be obvious at a glance and that s why I m writing about it actually. It s NOT the:
load: class vnc.VncViewer.class not found.
why it s failing but instead the real reason for the failure is the:
java.net.ConnectException: Network is unreachable
As you can read in Debian s Bug Tracking System in bug #560044:
Netbase has recently introduced the sysctl-setting
net.ipv6.bindv6only=1 in /etc/sysctl.d/bindv6only.conf and this setting will probably be the default in squeeze. This setting breaks networking in java, and any traffic will always
result in a java.net.SocketException: Network is unreachable .
To quote /etc/sysctl.d/bindv6only.conf:
When disabled, IPv6 sockets will also be able to send and receive IPv4 traffic with addresses in the form ::ffff:192.0.2.1 and daemons listening on IPv6 sockets will also accept IPv4 connections. When IPV6_V6ONLY is enabled, daemons interested in both IPv4 and IPv6 connections must open two listening sockets.
To work around this issue you can either execute the Java process through "java -Djava.net.preferIPv4Stack=true" or to change the IPv6 behaviour system wide execute "sysctl -w net.ipv6.bindv6only=0". To make this setting permanent across reboots adjust the setting inside /etc/sysctl.d/bindv6only.conf. After applying this workaround the Remote Console should work again.

Next.

Previous.