Search Results: "will"

8 April 2008

Gunnar Wolf: Some Rails plugins: Real FK

I have mostly shifted my main development language to Ruby, as most of the work I do tends to be pretty well covered with Rails. That's not new, however - What is new is that I feel I have got to the point where I actually have something to share. And it feels very good.
So my next couple of posts (three, actually) will be covering some plugins I've written. They are, of course, just sketched - but they work reliably enough to be deemed as useful by their author ;-)
Today I will start by blogging about RealFK. Of course, I will be copying from its documentation/description - I wrote it as well, so I'm not really plagiarizing my own site. I'm not suing self. You can of course also browse the RealFK SVN tree. References Rails is built upon a "dumb database" concept. Rails assumes the database will not force restrictions upon the user - i.e. that the model validators are all there is. But I disagree ;-) I was raised with PostgreSQL, not with MySQL, and I do believe the database can and should impose sane values - It should impose trust on the data..
So, if you want to create a relation field, properly acting as a foreign key and refering to another table, instead of doing it via the ActiveRecord::ConnectionAdapters::TableDefinition#column (or even ActiveRecord::ConnectionAdapters::TableDefinition#references) methods, declare them with add_refrence:
  def self.up
    create_table :proposals do  t 
      (...)
    end
    create_table :proposal_types do  t 
      (...)
    end
    create_table :proposal_statuses do  t 
      (...)
    end
    add_reference :proposals, :proposal_types
    add_reference :proposals, :proposal_statuses, :null => false, :default => 1
  end
The corresponding fields (proposal_type_id and proposal_status_id, respectively) will be created in proposals, and the RDBMS will impose a Foreign Key constraint. The references can be removed via remove_reference, i.e., for inclusion in down migrations:
  def self.down
    remove_reference :proposals, :proposal_types
    remove_reference :proposals, :proposal_statuses
    drop_table :proposal_statuses
    drop_table :proposal_types
    drop_table :proposals
  end
Of course, in this case the remove_reference call is not really needed - But if you are dropping a table that is referred to from a table that will remain existing, you will have to remove the foreign key constraints (that is, the referring columns). Join (HABTM) tables When you define a simple has_and_belongs_to_many (HABTM) relation in your model, you are expected to create an extra table representing this relation. This is a very simple table (i.e. it has only a row for each of the related table‘s IDs), and it carries foreign key constraints.
Please note that join tables are not supposed to carry any extra columns - If you need to add information to join tables, think twice and better use a has_many :elements, :through => :othermodel declaration, and create the othermodel table manually. To create a HABTM table representing that each person can attend many conferences and each conference can be attended by many people:
  def self.up
    create_table :people do  t 
      (...)
    end
    create_table :conferences do  t 
      (...)
    end
    create_habtm :people, :conferences
  end
  def self.down
    drop_habtm :people, :conferences
    drop_table :people
    drop_table :conferences
  end
The last call will create a conferences_people table (according to Rails' conventions, table names are sorted alphabetically to get the join table‘s name).
Note that in this case, in the down migration, the drop_habtm call must appear before the drop_table calls, as it carries foreign key constraints.

Kartik Mistry: Tips: Travelling in BMTC


* Wake up early, catch bus in early morning. Avoid rush-hour traffic. * If you can’t wake up early, you will have crowded bus, go inside with hard try and look for person who has next bus stop to get seat. You need to study hard to become master in this - if person is moving his/her bag, keeping mobile/pen/paper in pocket, go nearby and wait he/she stand up and grab the place! * Make sure that you are not standing near door, crazy drivers shuts it suddenly and chance of injury is high. * Do not seat on seats reserved for ladies :P (either marked red or written on it). * Still, if you can’t find place, play ‘frozen-bubble’ or finish pending calls and wait for your stop! And, yes. Don’t assume that ’same bus number’ will reach you at ’same place’. The bus number on BMTC is volatile. And, please don’t ask ‘How to travel at evening’, I have left it upon your luck!

Erich Schubert: Licensing software

If you are writing free software, choose your license appropriately. This can make a big difference with respect to adoption of your software.I'll just show you an excerpt from a Debian changelog:
* DFSG version of Mono 1.9
  + Deleted the mcs/class/System.Web.Extensions/ directory as
    mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JSON/*.cs
    is licensed under Creative Commons Attribution 2.5 which is not
    DFSG-free.
Debian policy doesn't allow us to include Creative Commons Attribution 2.5 in the main Debian archive, since that license doesn't meet the Debian Free Software Guidelines, which are part of our social contract. Therefore we must and will remove such code.debian-legal summary for "main" Creative Commons licensesCreative Commons is aware of these issues:
Creative Commons recommends and uses free and open source licenses for software.
And then they suggest to use GPL. While there is a link in the right side menu to the Creative Commons page on licensing Software, they IMHO don't make this obvious enough. Their license chooser should include a central link "if you intend to license software, read this".Creative Commons even includes "wrappers" for common licenses: CC GPL, CC LGPL, CC BSDSo if you like Creative Commons because of this pretty "commons deed" human-understandable version of the license they offer, just use these wrappers. The "legal code" links will actually take you to the GNU or Opensource.org license pages.I'm not aware of a good reason to use an opensource license other than GPL, LGPL or 3-clause BSD, depending on how you want to allow your opensource code to be used in combination with non-free software. If you are contributing to a bigger project, choosing the same license as the main project is although a very good idea.

Kartik Mistry: Late report: fossmeet@NITC, Calicut


* With uncertainty principle playing in full form with me, I decided to go to Fossmeet@NITC. But, came to know that there is no bus tickets available! What to do? I called up dear tuxmaniac aka Aanjhan and he suggested me to go by taxi. wow. Pretty expensive it will be, I thought. What ever, we decided to go with burning (hip) pockets and the journey was terrible. I did such long travel (7 hours) in taxi after long time. Anyway, we reached at NITC around 6 AM. The Keralian atmosphere was excellent and I felt similar humidity like Mumbai and that made me a bit sad. Ah. The event was already kicked off the day before and I attended Praveen’s talk on openid while figuring out that wifi is not working for us (proxy and they didn’t care to let us know password etc). So, we headed towards lab and enjoyed some Internet while seating in ‘Foss for school children’ workshop. Lunch was ok, but I enjoyed talking with different people and it was nice talk with Ani Peter about current localization work from Redhat. These guys simply rocks! Got my conference tshirt before ‘Medium’ size is out-of-stock. We were eagerly waiting for our dear Pradeepto, and voila, he came and started his talk! I was attending his talk first time (always missed due to some or other reasons..). Excellent and interactive. No slides. /me need to learn something from this fellow! We were 100% tired at evening. So, first we changed to better ‘room’. Thanks to NITC co-coordinators who did quick action for this (Why we requested for changing room? Answer: The previous room had only one power-supply plug! and we want to do hacking at night!). We then headed towards ‘Malabar Palace’. Excellent South Indian food and beer. The next day — I was suppose to give talk on ‘Contributing to Debian’ but by some magic, the talk was disappeared from schedule. Sad. Anyway, we (me, tuxmaniac and pradeepto) gave live talk on ‘How to contribute to free software’. We used SVN, Bugzilla, Wiki, SF.Net and other tools (IRC!) to show how students can use these in college projects and make it much better and how it can lead to Free Software development. I did svn commit for KDE Gujarati (Idea stoled from Rusty’s talk at Foss.in/2007). We then decided to leave the place. The return trip was amazing. Pookat lake and Mysore Palace. Amazing places. We had nice dinner and Kamat Hotel and I bought one wood penguin too (Total number of Penguin toys=4, Now). I learned that Calicut is also known as Kozikode :)

Kartik Mistry: 45 days


* I was hell tired from useless promotional calls and SMS from Vodaphone from last 30 days (I got my new number on 6th March), So, I tried their Do Not Disturb form and submitted it. Also, did SMS to toll-free number. And, I got this email after one confirmation email: “We would like to inform you that we have updated the number under DND option and the promotional SMS/calls will be stopped on your Vodafone number 9xxxxxxxxx within 45 days.” OMG, 45 Days!!!

7 April 2008

Neil Williams: Finally booked the flights!



alt="I'm going to DebConf8, edition 2008 of the annual Debian
developers meeting" />

Sat 2nd 0725 LHR, 10:45 MAD, 12:25 MAD 1940 EZE.
Sun 17th 21:45 EZE, 14:30 MAD (18th) 16:30 MAD 17:50 LHR

William Pitcock: Feeeeeeeeeeeeeeds.

After reading some blogs today, I have noticed an unnatural obsession with large feed icons. So, I hereby propose that feed icon sizes are derived based on the website creator’s perceived self-worth. So therefore, to optimize and convey to the world, the amount of psuedo-intellectual bullshit that is my blog, I have hereby rendered a new size of RSS icon, intended for only the most full of themselves people on all of the Internet (e.g. me). Reserved for the most egotistical of the Internet. The 512×512 feed icon. Isn’t it fantastic? This rendering is distributed under the WTFPL, but is rendered from a modified SVG image which is MPL/GPL/LGPL trilicensed, so you can probably just pick one of the latter three as far as licensing goes. Also available in 1024×1024 and 2048×2048 for those who are even more full of themselves than I.

6 April 2008

Mike Hommey: WebKit on the rocks

I’m preparing a new upload for WebKit, which will be targetted at unstable. It is much easier to deal with than Gecko, fortunately, so it won’t take several months to get something in shape. The main “difficulties” here is that I’m dropping the Qt WebKit package, since this will be provided along Qt, and the upstream build system for the Gtk port switched from qmake to autotools, which is not a really bad thing ; so, nothing impossible. Note that switching to autotools also means using libtool, which means no way to use -Wl,–as-needed anymore :-/. Yes, libtool, by trying to be smart, puts it almost at the last position in the arguments list, making it useless. ACID3 in new GtkLauncher

Neil Williams: Installing packages just built with svn-buildpackage

CVS has a nice cvs-debi so I've now got a shell one-liner that can do the same for SVN:
$ dcmd ls $(eval find ../build-area/ -name '*.changes' grep $(eval parsechangelog grep Version cut -d' ' -f2)) grep '.deb$' xargs sudo dpkg -i
Run from the working directory of the package (usually trunk/), it ensures that you get the version-you-just-built, gets just the .debs and installs all of them.
I can feel a shell alias coming along...

Pierre Habouzit: [RC-Bug-A-Day] Day 19

Today is again about removing packages from testing as my hintfile says. We've discussed (in the RM team) policy a bit, and it seems that we agree that packages with Release Critical bugs open for more than 3 weeks without any kind of activity from the Maintainer warrant a removal from testing without prior notification. Tonight's work is then just doing the quite not fascinating work of going through this list and look for removal candidates. Note that we will always give more time to Maintainers that need it to fix a bug, if he/she states so in the bug report. Needing time is perfectly okay. Not telling about it isn't.

Romain Francoise: Shared links for 2008-04-06

Mike Hommey: Xulrunner 1.9b4 in experimental/NEW

It finally happened, sorry for the delay. 1.9b4 is currently being uploaded to experimental. Yes, I know, this is not 1.9b5, which was released a few days ago. This is because I wanted to do some more work on 1.9b5 and didn’t want to delay the upload any longer. Now, for the uninteresting statistics, following are the diffstats, excluding directory debian/ and configure: for version 1.8.1.13-1: 113 files changed, 1393 insertions(+), 824 deletions(-)
for version 1.9~b4-1: 53 files changed, 932 insertions(+), 466 deletions(-)
for work in progress version 1.9~b5-1: 39 files changed, 848 insertions(+), 423 deletions(-) (the latter will obviously evolve)

Ben Armstrong: Install Debian on your Eee PC over wireless

Installing Debian on your Eee PC is even easier now, as the option to install over wireless is now present in our custom debian-installer image. Also, the new installer automates installation of many more things than prior releases, so wireless, acpi hotkeys and suspend all ‘just work’ out of the box. Two barriers remain to including wireless support for the Eee in Debian main. The first is the lack of wireless support in the official d-i installer. The second is the dependency on the non-free madwifi driver. I have no illusions about this being ready for Lenny, but I hope in Lenny + 1 this will be realized. The good news is that Nick Kossifidis is working on getting support for the Eee into ath5k. For patches, see: http://kernel.org/pub/linux/kernel/people/mickflemm. I have created a stub page FreeYourEee in our wiki about making a completely DFSG free install of Debian on the Eee. I encourage anyone going this route to contribute.

5 April 2008

Russell Coker: Blog Posts Should Stand Alone

I believe that apart from some exceptions (such as “links” posts) each post should stand alone. A reader should be able to read a single blog post and understand the author’s point without needing to visit any external sites. A common mistake is to write a post that can not be understood without following the links. This means that if one of the links gets taken down then the post can not be interpreted. Also if a reader has Internet access problems that deny access to the other site (which is not uncommon) they will be unable to find the original source and thus miss the point. It’s quite common for people to download copies of blog content before going out of net access (I routinely load a Planet feed of the blogs I read before travelling). Some people read blog content via email, for such people reading blogs without net access will be even more common. If a blog post can’t be immediately understood then a significant number of readers will just skip it. If too many posts from one RSS feed (where “too many” is a subjective value that varies from reader to reader) have this problem then they may just unsubscribe from the feed. Also even people who do have good net access will sometimes skip posts which require them to visit an external site. It takes more time and if they aren’t sure that the content will be of interest then they skip it. Finally writing an explanation of your point tends to result in more clear communication. At the shallow end of the blog pool it’s quite common to see posts which link to web pages and express disagreement with them. If the web page which is referenced makes several points (it’s very rare to find pages which strictly make a single point with no sub-points and no chain of logic to support the point) then it can be difficult or impossible to determine what the blogger specifically disagreed with. A post which summarises a page and gives specific reasons for agreeing or disagreeing with it gives little potential for confusion or miscommunication.

Francois Marier: Encrypted swap partition on Debian/Ubuntu

The swap partition can hold a lot of unencrypted confidential information and the fact that it persists after shutting down the computer can be a problem.

Encrypting a swap partition however is slightly tricky if one wants to also support suspend-to-disk (also called hibernation). Here's a procedure that worked for me on both Debian Lenny and Ubuntu 7.10 (Gutsy Gibbon):

0- Install the cryptsetup package:
apt-get install cryptsetup
1- Setup the encrypted partition as root:
swapoff -a
cryptsetup -h sha256 -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/hda2
cryptsetup luksOpen /dev/hda2 cswap
mkswap /dev/mapper/cswap
2- Add this line to /etc/crypttab:
cswap /dev/hda2 none swap,luks,timeout=30
3- Set the swap partition to be this in /etc/fstab:
/dev/mapper/cswap none swap sw 0 0
4- Configure uswsusp to use /dev/mapper/cswap and write unencrypted data
dpkg-reconfigure -plow uswsusp
You will of course want to replace /dev/hda2 with the partition that currently holds your unencrypted swap.

(This is loosely based on a similar procedure for Ubuntu 6.10.)

Francois Marier: Searching through the contents of emails in mutt

Mutt has a built-in feature for search the body of emails in the current mailbox (see ESC-b) but it's also possible to make this extremely fast by plugging-in external tools. Here's a quick description of my mairix setup.

After installing the package,
apt-get install mairix
create a .mairixrc in your home directory containing something like:
base=/home/username/Mail
maildir=inbox:archives*:sent*
mbox=debian*:jokes
mfolder=search
database=/home/username/Mail/.mairix_database
(This assumes that you store your mail in ~/Mail and that you want the search results in a new ~/Mail/search maildir folder.)

Then you need to run mairix once to index all of your emails:
mairix
which you will of course want to run regularly. I created this cronjob in /etc/cron.d/mairix-username:
17,37,57 * * * * username /usr/bin/on_ac_power && /usr/bin/mairix
(To avoid waking up the hard drive needlessly, I prefer to restrict the indexing runs for when I'm running on AC power. Take that out if you're not running it on a laptop.)

Finally, the last bit of setup is in ~/.muttrc:
macro index \eb 'c=search'<enter><shell-escape>'mairix ' 'Enter Mairix search term'
which makes mairix take over the ESC-b shortcut.

If you use GPG, you should also add this to your ~/.muttrc to make sure that mairix can see all of your messages by saving them as clear text:
set fcc_clear=yes
bind index s decrypt-save
bind pager s decrypt-save

Yves-Alexis Perez: Xfce battery plugin broken?

Using Xfce on your laptop running Debian? The battery plugin is unusable? Don't panic, we're aware of this. Basically, the situation is a mess, for some reasons: There is an open bug in Debian and in Xfce where we track the situation. Somebody proposed on the Xfce bug a patch to enable sysfs support on the battery plugin, and we integrated this patch on Debian (starting 0.5.0-3), but the patch is not really good, as it hardcodes too many things, and especially the directory names (it uses AC and BAT* while some people are know to have ACAD). So with the sysfs patch included, the plugin doesn't work at all on some users's config. The next plan is to remove this sysfs patch and revert to procfs, until we know better how everything will be in Lenny. In the meantime, Nick Schermer is hacking on a hal based branch of the battery plugin. I'm currently running it daily, and it works fine. Nearly all the low-level work is let to hal, and the battery plugin only takes care of the display, in Xfce panel. This is nice, but add a dependency on hald for the battery plugin, wich is something some user may not want. At first, I thought it would be better to release Lenny with 0.5.0 battery plugin and only after switch to the hal based one, and add the hald dep, especially since the plugin is still kind of experimental. But seeing the mess it is currently, we may have to switch before, and sooner than we thought. [EDIT]: xfce4-battery-plugin_0.5.0-6 was just ACCEPTED. It contains a fixed sysfs patch which fixes the “hardcode” problem. Thanks to Daniel Gibson!

Lars Wirzenius: My name is...

In response to bubulle and others: My name is Lars. It's written liw, and pronounced Lasu. My family has another name for me. That's between me and them, but was given to me by my grandfather who thought I looked like a particular African political leader when I was a baby. I won't tell you what it is, because I might have used it as a password in the 1980s. If you get any part of my name wrong, don't worry. There are over 100 recorded misspellings of my family name. "Van Breda" and "Lessick" are my current favorites. Anything you will come up with is likely more recognizable than those. I'm not particularly attached to what you call me. My sense of self, self-worth, and honor, are not dependent on other people.

Pierre Habouzit: [RC-Bug-A-Day] Day 18

Paid work burnt all my free time recenlty, that's why there wasn't a rc-bug-a-day for two days. I'm back with two removals, a couple of gcc-4.3 FTBFSes fixed. And 5 uploads for RG bugs from Sandro Tosi that were rotting in my mail client. The bad news for tonight is that gcc-4.3 FTBFSes are now RC, since it's the default compiler on several architectures. That's almost 40 new RC we now have to deal with. The fun part will be that those RC will probably hinder some transitions to testing. Maintainers, please, fix your packages. There are still too many packages with RG bugs on them, open for many days, from maintainer that are otherwise quite active on IRC or the lists

Holger Levsen: Extremadura details

I thought the spanish region of Extremadura had 4 million inhabitants and 200000 computers running GNU/Linex, a custom Debian distribution.

I was wrong. It's 1 million inhabitants and ca. 100000 computers running Linex - which is a much better ratio :-)

The exact number is not really known, because about 2000 computers (or so, details...!) don't provide data back for some unknown reasons. Probably a configuration detail.

Details are sooo important, and I love that. But at the same time, details are irrelevant (100000 or 102000...), I love that too.

Personally, I think the Debian Edu developer gathering the last 3.5 days here in Extremadura was very productive and fun. It was so productive, there were so many fun, interesting and insightful discusssions, that currently I can only think of one detail, I want to mention here, which really isn't a detail, but something bigger. I'm very very happy about the work which was put into bug 311188 here, mostly by Winnie. #311188 is just a meta bug, the juice is in the details, all the bugs which are blocking this bug.

And as you are probably interesting in this detail, why we care so much about this bug, let me explain: the blocking bugs of that bug will prevent upgrades from Lenny to Lenny+1 from working without problems for Debian Edu installations. That's why we care - it's only a detail, but an important one.

And now I'll run to get a last drink from the hotel bar, instead of correcting details in this post. Thank you, Cesar y Jose, for arranging this great meeting and everybody else, who makes Debian a fun thing to work on details and the great picture!

Next.

Previous.