Google sucks. Use Ecosia.

That Google sucks is not up for debate here. Google is evil. They are mean and mean people suck. Period.

At this point — if you value the Internet and don’t think it should be owned by a mega corporation that has incentive to control the content you see — you should cancel your Verizon phone contract and stop using all Google services. Even the Google search engine.

Instead, use any other search engine of your choice, but I recommend Ecosia. It’s free, fast, and backed by Yahoo, Bing and the World Wide Fund For Nature (WWF). It basically works like any other search engine but, unlike others, Ecosia gives at least 80% of its advertising revenue to a rainforest protection program run by the WWF. (Now, if we can only get Ecosia to create banners in a format other than proprietary Adobe Flash …)

Replace Google in your Firefox Search Bar. While at Ecosia.org, you can find an “Add Ecosia” option in your Search Bar drop down. Like this:



Then you can set it as your default search engine.

Some alternatives for other Google services

As soon as the Google-Verizon deal was announced, I stopped using all Google services. For the ads on this blog, I switched to AdBrite. (I know it’s not exactly a freedom-respecting, do-gooder service, and the ads can be a little obnoxious, but I haven’t seen AdBrite scheming to take over the Internet lately …) For web statistics, I turned to Piwik and Awstats — and now I actually own my own web site usage data instead of Google. Here’s a little snippet from the Google Analytics Terms of Use:

4. NONEXCLUSIVE LICENSE . [...] You will not [...] copy, modify, adapt, translate or otherwise create derivative works of the Software or the Documentation; (ii) reverse engineer, de-compile, disassemble or otherwise attempt to discover the source code of the Software.

[...]

6. INFORMATION RIGHTS AND PUBLICITY . Google and its wholly owned subsidiaries may retain and use, [...] information collected in Your use of the Service.

Ahh, freedom. Piss off, Google.

  • Share/Bookmark
Posted in The World According to Me | Tagged , , | 2 Comments

HOW-TO: Fix “Multiple AttachmentData objects were returned” errors in Atlassian Confluence

So, if you found this blog post, I assume you’ve run into this particular problem in your installation of Confluence. And you’ve probably also found the Atlassian KB article, RuntimeException Multiple AttachmentData objects were returned when only one was expected, which is only marginally helpful at best. The “resolution” suggested by Atlassian — “Rename the attachment and upload again” — is not a resolution at all. It’s a workaround. It doesn’t even acknowledge the root cause of the problem: that Confluence and its underlying database disagree on the definition of integral attachment data, and the database somehow ends up storing data that Confluence doesn’t like.

Of course, when a problem is worked around rather than resolved, it’s bound to come up again. In this particular case, as long as the wonky data remains in the database, the attachment migration task will fail if you attempt to move your attachments from the database to the filesystem:

ricky@dvwbwiki41:~$ less /var/lib/tomcat6/logs/catalina.out
[...]
Exception in thread "Attachment data migration task" org.springframework.dao.IncorrectResultSizeDataAccessException: Multiple AttachmentData objects were returned when only one was expected for attachment: Attachment: eob-sample10.gif v.2 (155845103) confluenceadmin
[...]

The specifics

As noted in the error above, there are multiple records in the ATTACHMENTDATA table having the same ATTVERSION and ATTACHMENTID values. But that’s just half of the problem. Let’s start with the ATTACHMENTS table:

mysql> select ATTACHMENTID, TITLE, PAGEID, ATTVERSION, PREVVER
     > from ATTACHMENTS where TITLE like '%eob-sample%';
+--------------+------------------+-----------+------------+-----------+
| ATTACHMENTID | TITLE            | PAGEID    | ATTVERSION | PREVVER   |
+--------------+------------------+-----------+------------+-----------+
|    155845103 | eob-sample10.gif | 155718494 |          2 |      NULL |
|    155845106 | eob-sample10.gif | 155718494 |          1 | 155845103 |
|    155845107 | eob-sample10.gif | 155718494 |          1 | 155845103 |
+--------------+------------------+-----------+------------+-----------+
3 rows in set (0.02 sec)

Well, there’s an obvious problem: two ATTACHMENTID with the same ATTVERSION belonging to the same PAGEID. This is why looking at the “Attachments view” on PAGEID 155718494 would show two “Version 1″ listings for this attachment.

Now, let’s take a look at the ATTACHMENTDATA table:

mysql> select ATTACHMENTDATAID, ATTACHMENTID, ATTVERSION
     > from ATTACHMENTDATA where ATTACHMENTID = 155845103;
+------------------+--------------+------------+
| ATTACHMENTDATAID | ATTACHMENTID | ATTVERSION |
+------------------+--------------+------------+
|        155877870 |    155845103 |          2 |
|        155877871 |    155845103 |          2 |
+------------------+--------------+------------+
2 rows in set (0.00 sec)

ZOINKS. There’s the other obvious problem: two different ATTACHMENTDATAID having identical ATTACHMENTID and ATTVERSION values.

The resolution

First, let’s just get something out of the way: I haven’t looked at all into how the data got like this in the first place. And now let me put some words into your mouth: “At this point, you do not care — you just need it fixed so you can go back to your real job and stop troubleshooting this … infernal … thing.”

This is probably not the only, and likely not the best, way to fix this, but one resolution is to delete the unnecessary records from each table:

mysql> delete from ATTACHMENTS where ATTACHMENTID = 155845106;
mysql> delete from ATTACHMENTDATA where ATTACHMENTDATAID = 155877870;

And Bob’s your uncle.

Other thoughts

Taking a look at the actual Jira ticket, CONF-7882, is interesting. One of my favorite snippets from the ticket:

excerpt from the HibernateAttachmentDataDao.java l.65
// TODO find a more appropriate exception
if (dataObjects.size() > 1)
throw new RuntimeException("Multiple AttachmentData objects were returned when only one was expected");

That snippet has been there for over three and a half years and the comment still remains in the code.

But the granddaddy fave from this ticket is what Don Willis says on the ides of April back in 2008:

Don Willis [Atlassian] added a comment – 15/Apr/08 3:18 AM
I suggest we add a unique constraint to the attachmentdata.attachmentid column. That would stop this situation happening in any new instances. It might create another bug, since there’s presumably an application logic flaw that attempts to insert two data rows for the one attachment, but this bug should be easier to find once the unique constraint causes an exception to be thrown immediately by the second insertion.

BINGO! We have a winner! I hope Don is still there, and I hope he someday has a chance to implement this unique constraint (and maybe a composite unique constraint like it on the ATTACHMENTS.TITLE and ATTACHMENTS.ATTVERSION columns?), thereby aligning the application’s idea of data integrity with the database schema. Then, perhaps this deep, dark conspiracy which forces development teams to find defects, log them, identify the root causes, suggest viable solutions, and then … completely forget about them — perhaps then this conspiracy will be exposed once and for all.

And then I hope Don Willis gets a promotion.

Other other thoughts

If Confluence were a truly communal open-source project, I (or some other annoyed user) would likely have checked in a fix for this years ago, someone at Atlassian would have reviewed it (Don?), and maybe it would have been promoted to the testing branch and then release branch. And, dare I say it, the product could be far more stable than it is today, with the defects that annoy users the most being addressed through an open-source community process, while Atlassian develops the lion’s share of the new functionality. Of course, that model probably wouldn’t be simpatico with the current licensing terms for this “open source” product.

Cheers.

  • Share/Bookmark
Posted in Geeky Stuff, The World According to Me | Tagged , | Leave a comment

HOW-TO: Rip audio CDs to FLAC format with Rubyripper

Rubyripper So, you’ve liberated yourself from the prison of proprietary audio formats like MP3 and decided to move to an open format with growing industry support and a far superior sound quality: you’ve selected FLAC. And if you run a GNU/Linux distro on your computer, there may not be a more bulletproof tool than Rubyripper for making high-quality (almost exact) copies of your audio CDs in the FLAC format.

How to install Rubyripper on a Debian-based distro

To get the latest release, browse to http://code.google.com/p/rubyripper/downloads/list. At the time of this writing, the current version is Rubyripper-0.6.0. Download and extract to a directory of your choosing.

You’ll need a few prerequisites and some recommended packages — on Debian 5.0.5 (lenny):

$ sudo apt-get install cdparanoia ruby cd-discid eject vorbisgain normalize-audio

I also recommend ruby-gettext for translations and ruby-gtk2 for the GUI interface. However, obtaining these packages varies across distros — do a quick search and make sure you have these packages installed before proceeding. In my case, I got them via the libgettext-ruby1.8 and ruby-gnome2 packages, respectively.

To install, go to the extracted rubyripper-0.6.0 directory and:

$ ./configure --enable-lang-all --enable-gtk2 --enable-cli --prefix=/usr

Or, choose your language(s):

$ ./configure --enable-lang=de,hu --enable-gtk2 --enable-cli --prefix=/usr

Finally:

$ sudo make install
$ make clean

The installed executables will be named rrip_cli and rrip_gui.

You may also run them directly from the install directory:

$ ./rubyripper_gtk2.rb

Or:

$ ./rubyripper_cli.rb

However, it’s also handy that a Rubyripper launcher is installed under Applications > Sound & Video.

If you ever change your mind and want to uninstall:

$ sudo make uninstall
$ make clean

Ripping CDs

The obvious first step is to insert an audio CD into your drive. By default, Rubyripper expects this to be /dev/cdrom, but tweak this to your needs in the Preferences > Secure Ripping applet.

The other important value to specify is the offset value for your cdrom drive. An easy way to find the exact vendor and model is to use the lshw command. In my case:

$ sudo lshw
[...]
        *-cdrom
                description: DVD-RAM writer
                product: CDDVDW SH-S223Q
                vendor: TSSTcorp
[...]

By cross-referencing my drive with http://www.accuraterip.com/driveoffsets.htm, I can see that the offset value is +6. Yours may be different.

So, why is this offset value important? Basically, because Rubyripper is meant for “secure ripping” and the offset value of any drive using a shingle write/access technique plays a part in the equation. Rubyripper aims to deliver high quality rips from audio CDs by ripping the same track with cdparanoia multiple times and then comparing the results. Directly from the README file:

The underlying philosophy is that errors are random and therefore will differ with each trial. Since the files don’t always match directly proves that at least part of this is true. However, it might be that some read errors are not random and will happen exactly the same with multiple trials. In this case an error would slip through unnoticed.

A completely secure rip can never be guaranteed, neither by Exact Audio Copy (which inspired Rubyripper), nor by any other ripper. Factors like the quality of the audio-cd and the quality of the cdrom drive are very important as well. Despite these problems Rubyripper tries to do it’s very best.

From here on out, things are pretty simple and intuitive. The default FLAC encoding and cdparanoia options will probably work just fine for you, but here are some useful links for tweaking things to your liking if you choose:

A few helpful tips

Ripping to a single FLAC file. At first, this might seem like a silly idea, but it turns out there are lots of valid reasons you may choose this option. For example, there may not be any silence between the songs on your CD (such as Pink Floyd, The Wall), or maybe you’re old-fashioned and you only listen to all songs on the CD contiguously, or it could be that you just prefer to manage fewer files on your hard disk. Whatever the rationale, I highly recommend that you tick the Create cuesheet option as well. This will allow you to navigate the tracks while you listen in players that support cuesheets — I use Audacious. Also, most CD writer software can use the cuesheet to put the track markers in the right places and read the CD-TEXT values if you ever burn your FLAC file back to an audio CD. The cuesheet is basically some metadata and a list of “index markers” in the file:

REM GENRE Rock
REM DATE 1979
REM COMMENT "Rubyripper 0.5.7"
REM DISCID aa09370d
PERFORMER "Pink Floyd"
TITLE "The Wall (Disc 1)"
FILE "./Pink Floyd - The Wall (Disc 1).flac" WAVE
  TRACK 01 AUDIO
    TITLE "In The Flesh"
    PERFORMER "Pink Floyd"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "The Thin Ice"
    PERFORMER "Pink Floyd"
    INDEX 01 03:19:42
  TRACK 03 AUDIO
    TITLE "Another Brick In The Wall (Part I)"
    PERFORMER "Pink Floyd"
    INDEX 01 05:49:35
  TRACK 04 AUDIO
    TITLE "The Happiest Days Of Our Lives"
    PERFORMER "Pink Floyd"
    INDEX 01 09:00:20
[...]

Ripping multiple formats at once. On the Codecs tab, you can tick multiple codecs at once. This is handy if you have two different target devices and require different formats. For example, my portable player supports OGG Vorbis files, but not FLAC. However, when playing tracks on my home stereo system through my Roku SoundBridge and mt-daapd, I play FLAC files. As an organizational bonus, Rubyripper provides a %f variable in the filenaming schema, so the different file types end up in different directories.

As always, I hope this helps. Cheers.

  • Share/Bookmark
Posted in Geeky Stuff, Tuneage | Tagged , , , , , | Leave a comment

HOW-TO: Install VirtualBox OSE Guest Additions in Debian testing (squeeze)

For the impatient or inattentive
Install the virtualbox-ose-guest-x11 package and you’re all set.

Beastie eating apple ... get it?

Beastie eating a striped apple ... get it?

So, you want to run Debian testing (squeeze) in VirtualBox at a screen resolution higher than 800×600. Admittedly, this is not a complicated problem to solve, which is precisely why this post is so short.

But first, note that Beastie is eating a striped apple in the image to the left and his tail is actually a Debian logo. This is not important and has virtually nothing to do with this post — I just think it’s funny.

About the environment

Pretty straightforward and probably a lot like yours.

  • Host OS: Debian 5.0.5 (lenny)
  • Guest OS: Debian testing (squeeze) as of Aug 7, 2010

A few prerequisites

You’ll need these:

$ sudo apt-get update
$ sudo apt-get install build-essential linux-headers-$(uname -r)

NOTE: Of course, if you haven’t set yourself up as a sudoer, become root and skip the sudo command.

The gotcha

Don’t try to mount and install from the Guest Additions ISO image. I am not certain as to why, but I could not execute the VBoxLinuxAdditions-x86.run file as any user, with any permissions. No matter what I tried, I got a “permission denied” error and couldn’t really find anything helpful on the net.

A (the?) solution

In the guest OS (squeeze), install the Guest Additions from the package repository:

$ sudo apt-get install virtualbox-ose-guest-x11

A little more detail can be found at Package: virtualbox-ose-guest-x11 (3.2.6-dfsg-2)

Screenshot-Squeeze Daily #9 [Running] - VirtualBox OSE

Debian testing (squeeze) with VirtualBox Guest Additions installed

Hope this helps. Cheers.

  • Share/Bookmark
Posted in Geeky Stuff | Tagged , , , , | Leave a comment

Net Neutrality and what it means to you

Save the InternetYeah, yeah, this is a bit of a rerun post, but I think it’s important you consider acting out to protect Net Neutrality.

I woke up this morning and read a commentary from Al Franken at CNN: Net neutrality is foremost free speech issue of our time. Of course, this got me all bunged up and pissed off again, so I wrote another letter to my Congressman, Mike Capuano. Again.

John Richard Sheaves
Cambridge, Massachusetts 02139-1203
August 7, 2010

To the Honorable Michael E. Capuano:

I am writing to voice my concerns over the fate of Net Neutrality and the conduct of the FCC.

I helped pay for the Internet and I rely on it every day. Net Neutrality is the bedrock of freedom of information, innovation, and equal opportunity online, and I request that its protections continue to be extended to all users of the Internet. I do not want mega-corporations with commercial incentive to limit or regulate freedom of information on the Web, to install virtual “fast lanes” or “toll booths” that enable monopolies and corporate profiteering, or to decide whether I will have a voice with which to speak and what my eyes will see online. Please work to ensure that companies like Verizon and Comcast do not obtain this power over me and the Internet. All Internet users should be provided equal opportunity to consume and produce information at identical service levels, whether that user is the guy next door writing a neighborhood news blog or a media mega-corporation promoting their next summer blockbuster.

At the time of this writing, more than 1.9 million Americans have expressed support for Net Neutrality at Congress and the FCC. They want control over the Internet to remain in the hands of the people who use it every day.

The FCC must regain its resolve to protect Net Neutrality on wired and wireless networks. Please work to reclassify broadband as a “telecommunications service” and keep the Internet open and free of corporate gatekeepers. You must stand with the public by protecting Net Neutrality once and for all.

Thanks, and be well.

Fore more information, I recommend you visit SaveTheInternet.com, and I urge you to act now. Cheers.

  • Share/Bookmark
Posted in The World According to Me | Tagged , , | Leave a comment
  • Your Ad Here
  • Join the FSF