Twitter and Link Protocols March 9th, 2010

Believe it or not, links aren’t just to HTTP(s) websites – they are for anything. You can link to FTP sites and file sharing services in the past have supported linking to content on their clouds, such as Magnet.

With Ubuntu you can link to a package or application for a user to install from their trusted repository. Give it a shot and install the awesome Droid font, Pidgin, nautilus-open-terminal, or all at the same time.

Twitter doesn’t support links from theses protocols, but almost all links on Twitter use URL shortening services like bit.ly or TinyURL. Right now you can use TinyURL to link to unsupported protocols on Twitter. Like I did here.

I can see that Twitter might want to protect users from these unfamiliar links. I don’t think this is making the service any more secure though, since anyone trying an exploit can easily use a redirect as I did.

Stupificated February 7th, 2010

I’m going to be running through a gauntlet of dumb in a “study” I’m calling Stupificated. Here I’ll be spending a week straight unplugged from anything creative, educational, or remotely close to intelligent. We’re talkng about scraping the bottom of the barrel here:

  • No programming or fixing technical problems. If I have a problem with my system, then I’ll have to call one of my friends to fix it, even if I know the solution to the problem.
  • No toying with design, graphics, or writing. These are creative outlets and massive learning experiences.
  • No selectively choosing good things to watch on TV. I have to be hit with the shotgun of stupid by burying myself in the worst of the worst:
  • Surfing aggregate sites like Digg, Reddit, or Slashdot will be out of the question. Any internet activity will be strictly limited to playing stupid (Flash) games.
  • Most games, like Counter-Strike and Warcraft III (strategy-like games) are out of the question, but I might use a World of Warcraft trial.

Oh, and somewhere in there is BET, which when someone reminded me I almost called this whole thing off. Every day I’ll be measuring myself with some metrics. I noticed a weird paradox here though, very much similar to quantum mechanic’s measurement problem: the act of measuring my intelligence is learning to some degree. Basically I have to find some ways to subtly measure my intelligence, memory, comprehension, etc. without interfering (much).

Since I know I’m very likely to lose my mind, I’ll be taking some psychological evaluations along the way. Also, as a non-regular drinker, I’m banking on my desire to consume alcohol exploding.

Why would you want to do it?

Some irony in the scenario is: there are people who do this all day, every day, and it’s their life. They gave up trying to learn – for whatever reason. This is a temporary experiment for me. To some, my response is: How can you live it? I’ll be counting down the days, while some lost count a long time ago.

I’ll be starting this within the next month, since I have to plan a full week around it. I can’t very well stop tutoring someone and tell them “Oh, I’m trying to be stupid for a week, sorry, can’t help you!” I also have to get it done before some conventions come around, so it’s a slight balancing act with time.

I’ll also be measuring my recovery the week after, and I’m speculating the rebound time will be very quick.

Please give me your ideas. This is another world for me, and I’m just picking the low hanging fruit I can see. If you have an idea of something that breaks the scale of ignorant – let me know! Tweet @KristopherIves with #stupificated or leave a comment below. I’ll be reading this until I start the study, and I’ll be editing this article before and after the study. Ideally I would like to have some kind of “stupid schedule” of what to watch.

Easy Compiz Tricks February 3rd, 2010

A while ago I tweaked Sam’s simple animations plug-in for Compiz, mainly so windows I minimized would slide away to match some of my other settings. This was to strike a balance between usability and performance, since none of these effects use alpha blending. During this time I made some jokes about a Spinner Rims plug-in to illustrate how people rev the Compiz engine when they first hop behind the wheel. Oddly enough, I’ve actually had others ask me for this plug-in and had Google Alerts on random forums about it – as if it was real, which perplexes me.

Sometimes applications don’t always (or can’t) describe a window correctly, which can make Compiz use a different animation. For example, when I drag a tab out of Google Chrome it uses my open animation for the window, which really disrupts the feel of drag and drop tabs that otherwise is very elegant. Another example is with generic frameworks like Adobe AIR or Java Swing, where all the widgets are treated the same. How do we work around this?

Luckily, Compiz is well equipped to handle this. You’ll need the Compiz Configuration Settings Manager (CCSM), which I think almost everyone has installed, and it should exist out-of-the-box so users can see how powerful the software really is. In the case of Google Chrome:

  1. Open CCSM (ALT+F2 ccsm or Preferences/Compiz Configuration Settings Manager)
  2. Click the Animations plugin
  3. Press the New button underneath the list
  4. Select None for the animation with the lowest possible duration
  5. Click the Add icon near the Window Match field
  6. Click the Grab button and target Chrome (it should give you class=Chromium-browser)

Make sure this is moved up the list so it overrides any other settings, since it’s specific to Chrome. You can later go back and click the Grab button again and add more windows to the blacklist. Now when you drag tabs in Chrome they won’t be so awkward. After getting used to no opening animation with one application, I ended up disabling them for all. I still use the other animations, but I’ve enjoyed not having any opening animations for non-decoration windows.

Movie Review: Dark Country January 31st, 2010

Dark Country is a film about a newly married couple driving through the desert. It tries to combine the cheap budget of a single setting of Phone Booth and the comic book like photography of Sin City – and fails painfully every step of the way.

My main problem with this movie was continuity. It jumps all over the place and has too many holes. I noticed when I checked IMDB that I’m not alone. Since I don’t advocate watching this piece of trash, below is a little bit of a spoiler.

There are two timelines set in present day and some time period that is hard to detect and is only once vaguely refereced as 30 years ago. They drive around in cars from the 50’s, 80’s, and 2000’s and use cell phones intermittently. If you’re trying to decode all of this nonsense, then you’re probably putting more thought into it than the makers did.

A lot of time is spent in a car with very bad green screen. The backgrounds are a joke. Everything is just a black background.

Wikipedia says this movie had a budget of $5 million. Where did it go? I hope every penny went to the actors, because even though they didn’t do an amazing job – everything else was a complete flop.

Rating: (1/5)
Hover over the stars to see why

Anyone who disagrees, I’d love to hear why! Leave me a comment or tweet @KristopherIves with your two cents.

RSS Feed Notifier for Windows January 30th, 2010

There are some sites I have to interface with that are uncompromising. Thankfully, there are RSS feeds to even-out some of the crummiest sites around. Feeds take out the hunting for important content in a jungle of non-sense. While they aren’t anything new, it’s nice to talk about something that isn’t a just a buzz-word.

Readers vs Notifiers

Many applications, including Google Reader, are in the business of organizing your content for you. This isn’t my primary use for a feed, so the focus is on notification RSS applications. I’m looking for something like Twhril or GMail Notifier but for feeds that is:

  • Minimalistic – It shouldn’t try to do everything under the sun. I just want it to read feeds, notify me, and let me navigate into my default browser.
  • Unobtrusive – It shouldn’t bug me all the time, and has to provide a readily available option to toggle notifications.
  • Lightweight – I don’t want to run a Virtual Machine (VM) just for my feed reader. Python is okay though.

Feed Notifier

This is a very simple and sleek application by Michael Fogleman. It’s simple to use and easy to integrate with Firefox, and it’s new and still being actively maintained. It weighs in at 8MB, which I thought was a bit much, but I think this has something to do with including Python. This is closed source, which is my only gripe.

RSSNotifier

This is a free (GPL) notifier written in Java, so it runs everywhere. You can run it from the web by clicking here (WebStart) or download and install it from their homepage. When I found the project I saw they didn’t have an installer, so I “packaged” an NSIS installer, so you can easily install it on Windows.

Install RSS Notifier for Windows (EXE)

NSIS script for RSSNotifier for developers (for NSIS)

Use a better RSS notifier that’s free? I’d love to know! Leave a comment or tweet @KristopherIves and I’ll update the article with credit.

HTML 5 Video Downloading January 29th, 2010

The new HTML 5 video feature being used in capable browsers like Google Chrome is purely awesome. It amazes me that a feature this new works so well, although it does have some quirks, it’s still better than Adobe’s Flash player, and it’s improvement isn’t bottlenecked by Adobe or any single entity. I chuckle knowing that Adobe has just recently began to address the concept of hardware acceleration in this arena, and luckily they are too late – because we hate Flash video. It was used as the tool it was, and the web will now abandon it.

This is open source  in motion. If Chrome, Webkit, FFMpeg, and various other projects where closed source, we’d be moving along at the rate of molasses, like we did with Adobe’s Flash player, IE, and other proprietary software.

With that praise, there are some interesting holes, and in time they will be filled correctly. Right now the biggest would easily be how HTML 5 video warrants videos going full-screen. There are security and usability land mines that must be dodged, such as allowing web pages to enter this mode without the users consent. While I want the feature right now, I don’t want to play API hopscotch like Adobe did, so I understand some delay in this area.

I also have a growing interest in editing video, which you can’t do on YouTube directly. Somewhere you’ll have to download that video. In the past I’ve used FireFox extensions that do some voodoo to rip the FLV or MP4 stream out, but now that we’re using HTML 5 video – it’s just a file. Without any extensions here is a way to save YouTube videos in Chrome:

  1. Go to http://www.youtube.com/html5 and make sure you’re in the HTML 5 beta. You can undo this if you want later.
  2. View the page of the video, like this: http://www.youtube.com/watch?v=Y3lzd9yJP9Q (ACTA debate)
  3. Right click the video and choose Inspect Element.
  4. Double click the div element below the one that is selected. It will have class="video-content-loading". This will expand that element.
  5. Click the link in the src element of the video tag.

If the video opens a tab, then you’ll want to change your Chrome settings on how it views/downloads that file. For me it started downloading a 300 mB MP4 file, which was throttled at about 96 kB per second.  It’s nice to have this rather simple workaround, but we can do better!

I’ve never developed Chrome extensions before, but getting started was easy. Having done some FireFox extensions, I would say this is much easier and has a lower barrier of entry. The extension I’m working on is called html5-video-dl and simply puts a button puts the video file URL into the download manager. Browsers that support HTML 5 video will probably do this on their own in the near future. The extension is being tested, packaged, and submitted to the repository. It should be available, and I’ll have a link so you can install it shortly.

How to Synchronize Code with Bazaar January 24th, 2010

Almost everyone has more than one computer, and you’ve probably got multiple machines you’ll need to synchronize your code onto.  To handle this I use Bazaar distributed version control. If you’re experienced with various VCS and are in need of convincing, see Why Switch to Bazaar?

Here are the main places I have to synchronize to and the reasons for doing so:

Linux Notebook
This is where I write most of my code and I mainly use Bazaar here as a way to keep a changelog and sometimes revert changes. It’s also nice to be able to get some quick stats. You can also create a repository within another, for example, if some piece of code starts to grow legs of it’s own.

Windows Machine
I keep a Windows install for gaming, but I do have Eclipse and Cygwin installed here. I simply use Bazaar to check out and test my code. Windows-specific changes are usually made from here and need to make their way back to my Linux machine for further testing.

Web Server
This is where I push all my public code. For things I’ve open sourced, the address is http://bzr.santiance.com/ and anyone can branch this. Release early, release often. For proprietary work this would be a private server. I authenticate via SFTP, but regular FTP is also supported.

The Public
When someone makes changes to my code the way I synchronize is with Bazaar or a patch. Some simple changes only require a patch, but more elaborate changes warrant a merge.

At any time all three of these can have different copies of the code. Bazaar handles merges quite gracefully, and when there is a conflict it’s quite clear how to resolve it. Before I truly embraced this system I was able to navigate my way through armed with just the 5 minute tutorial.

Example

I usually start by developing something on my Linux notebok, but I do the same thing from within Cygwin if I do develop something starting on a Windows machine. On Linux I keep my Eclipse projects in ~/workspace/, and in Windows I keep them in C:\cygwin\home\kris\. After I’ve crafted up something I’ll create a repository and add the project files and source code then commit my changes:

bzr init
bzr add src
bzr add .project
bzr commit

Supply the changelog information and Bazaar will have saved this initial commit. Now I like to get my code to either the public server or private development server if the work is proprietary. I do this by:

bzr push sftp://user@bzr.santiance.com/projectname

One great thing about Bazaar is that you can push/pull changes from all kinds of places. If I don’t have (internet) connection to my web server, I can push/pull from my Windows and Linux machines over SFTP or a network mount. I can later push these changes back to the web server, so I get some data redundancy to help avoid losing code.

For clients that don’t want to use version control, which sadly do exist, you can easily take a snapshot of the code to be sent:

bzr export TheProject.tar.bz2

You can change the archive file type by modifying the file extension. I most commonly use .tar.gz, .tar.bz2, and .zip for my projects.

BZR vs GIT

So, why do I have a Github account? Mainly because other projects I’ve worked with use git, since most of my original work would find it’s way to Launchpad. Both Launchpad and Github make it easy to submit changes from the command-line once you’ve got an account. Luckily Bazaar has plug-ins that make working with repositories in another format much easier for us.

When it comes to the argument of simplicity and low barrier of entry, my hat’s off to Bazaar. It’s handled every scenarios I’ve thrown at it, and my projects have survived the advancement of their storage format from pre 1.0 to (now) post 2.0. Both tools are equally capable, but Bazaar’s interface is more intuitive.

Send hate and flames @KristopherIves

Chromium vs Google Chrome January 24th, 2010

Chrome hit the scene about 8 months ago (in July, 2009) and has shown quick adoption and fast usage growth. For the most part, those where windows users. In Google fashion, a beta has been released. What’s the difference between Google Chrome and Chromium?

Chromium is what you’ll find in your repositories and for the most part looks like a normal open-source package, and indeed it is FOSS. It was started by Google, and they release a version called Google Chrome. So, you can see them as two sides of the same coin. Google will continue to bring the awesome changes from the Chromium project, and you can expect Google to share their code back.

Like many Ubuntu users I started using Chromium via the chromium-daily PPA (Personal Package Archive – Usually a cutting-edge place for packages provided by a user or developer, used to get the latest features of some package) This repository contains a daily build of the Chromium project. This repository, and the project, is a lot more stable, and I use the repository now.

Google’s Chrome (beta) on Ubuntu runs well and is a simple package download, but it completely lacks updates of any kind. I removed it because I wanted a slightly newer feature – Bookmark Synchronization. It worked across Windows and Ubuntu, might I add. Future builds will probably include some system of updates, but the way it looks right now you’ll have to install a package of a later version (update) or remove the beta and install the newer version manually.

The bottom line: Go with the chromium-daily PPA until Google Chrome has some kind of update system and has bookmark sync working.

Compiz, Patents, and Ubuntu January 22nd, 2010

No, this isn’t about the stupid max_waves conflict with Apple’s patent that everyone has been ranting (and working around) for the last few years. From what I hear the future 0.9.0 release won’t be hampered by it, but how does Compiz fair with patents? Who made Compiz, and who’s working on it today?

From my understand the original Compiz, before all the forks and subsequent merges, was developed by Novell via David Reveman with help from others. Now, in the aftermath of whatever happened, most (if not all) of the core developers aren’t around – and Novell has moved on too. While the developers are gone they did take a little something with them.

SYSTEM AND METHOD FOR EVENT-BASED RENDERING OF VISUAL EFFECTS is patent application #20080313540 by Anna Dirks, David Reveman, Stephen Carter, and Scott Isaacson filed back in 2007. This patent would go to someone who deserves it, but can it ever be used against the project in the future? Now Apple is filing for a patent on head tracking, which is something we’ve seen Compiz devs and plug-in writers have been doing for a while now. We want developers to get attributed for their hard work in Open Source, but nobody should have control over the ideas that power these projects.

Ubuntu is using the old 0.8.x branch written in C, while the team has moved on to the 0.9.0 release written in C++. With Ubuntu 10.4 (Lucid Lynx) being an LTS, it’s obviously not going to be in that release. Even once the package is more mature, there is still a big dependency issue lingering. While it’s obvious that the refactoring of the code yielded performance and maintainability benefits, it’s using libboost and favoring C++. With GIMP kicked off the CD to make space, what’s going to happen to Compiz?

Update 1: There is a thread going on UbuntuForums.org related to this, although some of it’s just anti-Apple rhetoric. I wish people would stop hi-jacking real discussion with this crap.

Update 2: I asked Novell if they could shine any light on the situation on January 26, 2010. Hopefully they are willing to at least take a look and get back with something besides a dear-john letter.

Bugs with GDK_NATIVE_WINDOWS January 18th, 2010

There are two bugs that I encounter a lot in Ubuntu 9.10 (Karmic) that irritate me a lot. Both bugs involve mouse clicks not being registered. I’ve got some workarounds and fixes, but first some background on these bugs.

Flash Bug (#410407)

This bug has been misidentified as a bug in Compiz, when in fact it’s a bug in Adobe’s Flash Player plug-in. It causes mouse clicks to not be handled by the Flash application. The bug is inconsistent – it’s an all or nothing thing. You’ll either get the bug on a video, or you won’t, and sometimes it can be coaxed into working by spamming clicks.

Eclipse Bug (#443004)

This bug has caused a lot of wasted time. Similar to the bug with Flash, clicking on a button with some dialogs will not register. It’s also inconsistent, which can be a real pain. Some dialogs in Eclipse can span many pages, such as the Export to JAR dialog.

Both of these bugs are related to a change that happened regarding GDK, the underlying method GTK-style applications use to draw things instead of calling X directly. I think the core problem is:

A small gotcha is that the GDK_WINDOW_XID() call is no longer a trivial accessor for the XID of the window, and thus must not be called from another thread without taking locking precautions.

This matches the inconsistency of the problems, since it’s a related to concurrency.

To combat the bug in Eclipse I’ve started using the repository version, since the SWT-related bug was fixed and they added support for user plugins.

The workaround for the Flash bug isn’t as nice, since Adobe is the master of making horrible “fixes.” For example, they pulled the rug out from underneath a lot of websites using Flash player to do the heavy lifting of uploading multiple files by requiring the file selection dialog to be initiated by a user interface interaction. Essentially you have to tell Flash not to enjoy the benefits of client-side windows by modifying /usr/lib/nspluginwrapper/i386/linux/npviewer to look something like this:

#!/bin/sh
TARGET_OS=linux
TARGET_ARCH=i386
GDK_NATIVE_WINDOWS=1
. /usr/lib/nspluginwrapper/noarch/npviewer

So that’s two features Adobe has nerfed in one configuration file (64-bit and client-side windows)