Posts Tagged ‘Development’

(on Technorati , Del.icio.us)

File List Applet – now with more autotools!

I decided that before I did any more work on the applet, I would improve its installation process to make it easier for people to try it out. So, the process to get and build the source now looks like this:

Download

  • Browse source here.
  • Download the source: bzr branch http://stevenbrown.ca/src/FileListApplet

Install

  1. Install dependencies (Ubuntu package names given): sudo apt-get install python-xdg python-gnome2-desktop python-gtk2 python-pyinotify
  2. Branch the source using the bzr command, above.
  3. cd into the directory.
  4. ./configure --prefix=/usr (the prefix is important!)
  5. make
  6. sudo make install
  7. If the applet does not show up in your Add to Panel menu, try restarting the bonobo-activation-server: killall bonobo-activation-server.

Autotools

Autotools is pretty much the standard in source package management on linux. Except for the name, there is nothing automatic about autotools. Every encounter I’ve had with autotools has usually defeated me and left me frustrated and leaving whatever I was working on to do something else. For me, because I had labeled it the next step, it basically stalled the entire project for a while. Most people tend to copy and paste other projects’ autotools setup, but I figured that was overkill for my purposes and I didn’t find anything that quite suited me. I looked at gnome-blog, but it seemed like some stuff wasn’t quite working properly and some was completely unnecessary… in fact, this seemed to be a trend when looking at the autotools stuff in projects. Why is this? Autotools is not simple and due to this simple fact, I think it fails completely on many levels. Developers massage it enough to get it working, but few actually understand it all – I know I sure don’t! So please forgive the sloppiness and feel free to send patches. 🙂 I gave up doing a couple things, like getting the revision number (bzr revno) and including it in the version string (see configure.ac). I know it’s probably something super simple, but I couldn’t seem to pass a variable containing a string as the version….

I feel that GNOME, as a platform for development, could seriously benefit from some kind of frontend to autotools that handled GNOME development nicely and hid as much as possible from the developer (including all those nasty config files that pollute the package tree). Anyway, I did not have an enjoyable time grappling with autotools, but I’ll end this mini-rant here.

Reading – XP and Design Patterns

I got a few books out from the library, recently, which I’ve been reading on the bus. I’m currently alternating between Extreme Programming Explained: Embrace Change and The Joy of Patterns: Using Patterns for Enterprise Development. I wish I had read the XP book before being project manager for my Software Engineering project at University, a couple years ago. But perhaps having gone through that experience allows me to relate to the material more directly. It’s easy to read and the author, Kent Beck (one of the fathers of XP), identifies the reasons behind the development methodology, and the problems they help solve. I’ve always had this feeling of agreement with XP practices, many of which seem like common sense, but haven’t always been able to articulate the reasons. Thankfully, the author does not have this problem. 🙂 I’m about 50 pages in, and it’s quite good, so far.

I picked up the Design Patterns book because the one I wanted, Design Patterns: Elements of Reusable Object-Oriented Software, wasn’t there. (The library has 3 copies of it, but it’s always out with a wait-list of people requesting it. This list now includes me. 🙂 ) Anyway, the one I picked up is extremely terse. There are UML diagrams provided, sample code, and a problem description… but not much in way of explanation. It’s format is kind of like this: there’s this problem, how do we address it? Boom, here’s a pattern. Boom, here’s a diagram. Done. Next. Or… but we could improve on this pattern with this other pattern. Boom, another diagram. Why? Figure it out.

This book is fine if you’ve been exposed to the patterns previously, and need a refresher, but it is not a good source to learn from. I’m familiar with some of the patterns, but even then, they may be called something different, or implemented slightly different, and it’s been a while, so it takes me longer to understand than if there was more explanation. Looking forward to picking up the other patterns book. If you have not been exposed to design patterns before, or are a relative beginner programmer, and definitely if you are not familiar with UML diagrams, avoid this book. It’s a book on design patterns (not a simple topic) that’s less than 200 pages, so you can’t really expect a thorough resource. I’m about half way through it. On one hand, I’m curious what such a small book has to offer, but on the other, I’m not sure I’ll finish it. I’ll probably concentrate on the XP book, for now.

2008 In Review

Life

This year has been pretty big. Naturally following up with lots of events from last year, these are some quick memories. My nephew, Rayden, was born on Feb 12th, six weeks early! This caused the father (my brother) to be indisposed for my dad’s (2nd) marriage on Feb 14th. I got bumped up to best man (but didn’t have to do much) and had a rather empty hotel room to myself in Vegas. I attended the Open Web Vancouver conference. I went to Whistler mountain for the first time in years and plan on going again soon. I went on a fantastic road trip down the west coast of the United States, something I will never forget. I slacked off most of the summer but managed to do quite a bit of rollerblading and outdoor activity hanging out with Kurt (visiting from Brazil). My brother, now a father, married the mother of his child on August 3rd. I was best man at this wedding, as well – with more responsibilities, but they were well received and totally worth it. Our beloved cat, Sky, met an early and terribly unfortunate end. We had our first encounter with bed bugs who are now the sworn enemy of our household. Vancouver, a city that sometimes doesn’t get snow all year, had its whitest Christmas ever with 60cm (2 ft) of snow! Perhaps we should have seen snow in April as a sign….?

That reminds me: Happy Holidays for 2008! Guess I was a little late on that… Here are some pictures of our insane weather in Vancouver.

Geekery

With my free time, I think I was able to really exercise my geekiness in 2008. I released a couple updates to the Rhythmbox Jump-to-Playing plugin, which led me to submit my first patch to an upstream project! Said patch was accepted and will be in the next version of Rhythmbox! Yay. 🙂 It was just for some XML UI description, but it feels nice to have helped improve (even a tiny bit) a project that will be installed on thousands of computers in the next cycle. I also released a usable proof-of-concept GNOME Panel File List Applet which has stayed on my panel and I find quite useful. And I’ve done a couple little scripts and how-to’s that fall under the “nerd” category quite nicely. Oh yeah, and significant website updates. Next website todo item is to customize the attachment page for my theme, I think…. Also, I joined Twitter. And Identi.ca. And LinkedIn….

Art

Not many artsy things done this year. But with the significant improvements of tablet handling in Linux, I did some random doodles and a birthday card. I may not do it very often, but I still enjoy drawing, thank goodness.

Blog Stats for 2008

My Blog is by no means high traffic, but stats are fun! (These stats were obtained using the wordpress.com Stats plugin, and exclude the Feed stats, because I use Feedburner for that… although, I’m thinking I should revert that, now that I mostly use wordpress.com Stats.)

Top 3 Referrers:

  1. http://live.gnome.org/RhythmboxPlugins/ThirdParty (402)
  2. live.gnome.org/Boston2008/GUIHackfest (209)
  3. siuyee.com (126)

Top 3 Posts and Pages:

  1. Pidgin 2.1 UI Ideas (1,053)
  2. 2D Game Art and the Virtual Console (580)
  3. Rhythmbox Plugin: Jump to Playing 0.2 (455)

Top 3 Search Engine Terms:

  1. rhythmbox (327)
  2. bug (174)
  3. pidgin (165)

Top 3 Clicks:

  1. Pidgin UI screenshot attached to a bug (57)
  2. Pidgin UI mockup (50) by Hylke Bons
  3. SF2 HD Ken (42)
  4. The fourth was launchpad.net/desktopdrawers with 38 clicks, so it’s kinda cool I helped advertise a small project a little. (A project I’ve submitted patches to, no less. 🙂 )

Thanks

Thank you, everyone, for a wonderful 2008. It’s been interesting, and despite a failing economy, I’m looking positively toward 2009.

Happy New Year! (????????????????) 🙂

File List Applet – GNOME Panel Applet

This is kind of a proof of concept I’ve been playing with. The idea is that finding a file within a folder is often easier by type, and you are often only interested in the most recently modified file. The problem with a file manager is that although you can easily sort by either type or modification time, you cannot filter your view of all the other files you’re not interested in. I previously wanted to address this issue within Nautilus, (and I still believe this functionality would be wonderful in Nautilus), but I ended up doing this much less ambitious applet as a proof of concept.

This applet will let you add any number of folders to it, and will try to categorize the files automatically and intelligently. Currently, it’s more automatic than intelligent as it just looks at the mime-type. Even so, I’ve found it especially useful for keeping track of all my downloads:

Steven is catching up on the latest on planet.gnome.org and has downloaded a couple screencasts demoing the latest and greatest. These files are typically 2-10 megabytes, so they didn’t download instantly. Steven continues reading and forgot about the screencasts until a couple hours later. At that time, he can simply click on the File List Applet, select Downloads, select Video, and look at the top of the list for the newest files. Steven is happy. When finished, he can follow the same process to delete them – without once opening his file manager and being assaulted with ALL the files in his Downloads folder.

Ultimately, I would like to extend the idea to provide the same type/subtype menu system for all files under all folders – a type of summary – but I have not implemented that yet. There are other features in the cooking pot, as well, but I have to get started on some “RL” tasks… like my resume. 🙂

Screencast

I had a problem recording audio, so I ended up typing as narration. Unfortunately, this makes the YouTube one pretty unwatchable, but you can give the “HQ” version a try.

Download

No tarball yet as it’s still extremely rough.
Browse the source here.
Branch the source: bzr branch http://stevenbrown.ca/src/FileListApplet

Install

Update 2009/04/05: Updated install instructions here. (Some people don’t look at the comments….)

Installing will require some manual modifications.

  1. First, make sure you have the following packages (Ubuntu): python-xdg, python-gnome2-desktop, python-gtk2, python-pyinotify
  2. Then branch the source.
  3. Adjust the FileListApplet.server file’s location to wherever you keep it.
  4. Then copy FileListApplet.server to /usr/lib/bonobo/servers/.
  5. Restart the bonobo-activation-server. killall bonobo-activation-server
  6. Add it to the panel like other applets.

Update 2008/12/05: Added a couple screenshots.

WiiWare and WordPress Update

It was a nice fall day a couple days ago. I really enjoyed this sight, in my backyard. 🙂 Quite overcast and dull, the last couple of days, though.

Games

I updated my About page with my Tetris Party friend code. (Add me!!) It’s pretty fun, but I say that as someone who has never owned a Tetris game before, so I’m not a Tetris vet… (unlike Shirley and Alex, who think the DS game is far superior, apparently). My only real complaint with the game so far is the music – they could have done AWESOME things with it. I want a hoppin 8bit remix of these classic tunes… the included midi, even the classic stuff, is pretty dry and slow. Need something with a faster pace. The computer moves at seemingly impossible speeds at levels above 12, but I suspect that some people out there can play like that, as well. Scary. (Especially the top ranked in the Americas, Java AI … hmmm…) Anyway, I can’t beat level 13 yet. And I think I still like Dr Mario for VS more… so fun. … but Tetris Party offers tonnes of modes, including 4-player vs! That’s pretty cool. Maybe I’ll become a Tetris snob, yet.

While on the topic of Wii(Ware), I also got World of Goo. It’s a really great physics based puzzle title. I really love the dark and comical graphic design (reminds me of Tim Burton’s stuff). The music in Goo is epic, as well. I can’t believe everything was made by two guys (+1 for Wii optimizations); two guys in debt! They’re my heroes. Seriously. Both Tetris Party and World of Goo are the most expensive games on WiiWare ($12 US, $15 US, respectively), but I haven’t been disappointed. And with Goo especially, I don’t have any problem supporting the little guys making great stuff. That’s where I’d like to be. 🙂

WordPress

I updated my wp-upgrade script to display a big warning to deactivate all your plugins before continuing (wouldn’t want to damage your database!). Then I used it to update to WordPress 2.6.3. I think that makes me largely up-to-date.

Rhythmbox Plugin: Jump to Playing 0.3(.1)

Update 2012-01-29 – Deprecated:
Brief: This plugin has been deprecated. For future versions and updates, please go here.

Less Brief:If you’re using a newer version of Rhythmbox, you’ll need a newer version of this plugin. I’m not sure exactly which RB version the plugin format changed, but I am currently using Rhythmbox 2.90.1 on Ubuntu 11.10 and this plugin no longer works. However, Timo Loewe has ported jump-to-playing to Rhythmbox 3, all properly hosted and everything! Get it and any future updates here (https://github.com/dmo60/JumpToPlaying). This is the version I’m now using. Thanks, Timo! 😀

– – – – –

The following pertains to the deprecated version of the plugin…

– – – – –

This plugin will display the View : Jump to Playing Song link as a button in the toolbar and/or as link in the Browser’s context menu. Other Rhythmbox plugins can be found here.

Screenshots


Using a future version of Rhythmbox – patch here – the menu item will appear in a plugin placeholder, above Properties. Otherwise, it will appear at the bottom, like previous versions.


From version 0.3, the Open Folder plugin will also be placed in the plugin placeholder.

Changes Since 0.2

Just a couple small changes since 0.2.

  • Selecting the context menu option in the preferences will now display the link in PodcastView and PlaylistView popups, as well as BrowserView and QueuePlaylistView.
  • Assuming the patch on bug 557152 is applied, this will place the context menu items in a plugin placeholder and allow the Preferences to remain the last menu item.
  • Update (Nov 10 2008): Modified version of patch has been applied to RB development trunk, so the next version of Rhythmbox will have this update. Yay! Version 0.3.1 of jump-to-playing is to account for the modifications. Please use it. 🙂

Download

jump-to-playing-0.3.tar.gz jump-to-playing-0.3.1.tar.gz
Browse the Source: Here
Grab the Source: bzr branch "http://stevenbrown.ca/src/jump-to-playing/"

Installation

  1. Extract the jump-to-playing folder into your ~/.gnome2/rhythmbox/plugins/ directory (or ~/.local/share/rhythmbox/plugins/ directory, if the .gnome2 directory doesn’t exist). Completely replace any previous versions.
  2. (Re)Start Rhythmbox and enable the plugin in Edit : Plugins.

Todo

From my previous post.

  • the gconf keys in gconf-editor say they have no schema. The main plugins’ keys have a schema and don’t give a warning. Definitely not serious, though.
  • it currently adds/removes the ui string when the options are toggled in the configure dialog. I have a feeling it might be better to only add/remove them in the activation/deactivation, and just hide/show here. Maybe faster?
  • it currently hides the browser button in small display mode. That has nothing to do with the jump-to-playing button. That should be in core, if it was decided that was the desired behaviour.
  • to hide the buttons in the small display, it checks the value at activation, and it connects to the View menu’s toggleButton’s “toggled” signal. So whenever it’s toggled, the gconf value for the small display mode is checked, but I think there’s a delay sometimes. Pushing Ctrl D quickly a few times may result in incorrect UI presented. I remember deciding that this is due to a delay set on the gconf callback to overcome some other bug….

All patches are welcome! 🙂

Update 2008/10/26: Added screenshot, descriptions to screenshots, and link to main plugin page.

Update 2008/11/10: Added link to version 0.3.1 and added description.

Update 2010/12/08: Added alternative installation directory.

Jump-to-Playing Rhythmbox Plugin TODO

I haven’t looked at the plugin for a while, but I’ve been meaning to reproduce my “todo” list for it that I wrote on the rb-dev list a while back.

  • the gconf keys in gconf-editor say they have no schema. The main plugins’ keys have a schema and don’t give a warning. Definitely not serious, though.
  • it currently adds/removes the ui string when the options are toggled in the configure dialog. I have a feeling it might be better to only add/remove them in the activation/deactivation, and just hide/show here. Maybe faster?
  • it currently hides the browser button in small display mode. That has nothing to do with the jump-to-playing button. That should be in core, if it was decided that was the desired behaviour.
  • to hide the buttons in the small display, it checks the value at activation, and it connects to the View menu’s toggleButton’s “toggled” signal. So whenever it’s toggled, the gconf value for the small display mode is checked, but I think there’s a delay sometimes. Pushing Ctrl D quickly a few times may result in incorrect UI presented. I remember deciding that this is due to a delay set on the gconf callback to overcome some other bug….
  • in the context menus, ‘Properties’ should really be the last item. They need a placeholder put in the UI core. UPDATE: I’ve filed a bug with a patch attached here. Jump-to-Playing and other plugins will need to be updated when the patch is applied. I’ve just done it on my local copy w/Rhythmbox HEAD…. Looks like this:
    Before (red) and After (green) applying the patch and using an updated plugin

    Before (red) and After (green) applying the patch and using an updated plugin

  • Show the context menu item in PodcastView and PlaylistView popups, as well. I’ve added this in my local copy, already. Maybe I should just bump the version and release….

Tweet

I signed up for Twitter. If you ever wanted to know what I had for breakfast, now you can! Yay. I also updated my blog’s sidebar with custom widgets; something I’ve been meaning to do for a while. I broke up the standard “Meta” widget into a Subscribe and an Admin/Login widget, and shoved the admin/login right below the Pages. I also made a replacement tag cloud widget that can specify the maximum number of tags to include… I’m not sure why the standard widget (which defaults to 45, and gets quite big) wasn’t created with that option. Also, taking Twitter’s motto to heart, I added my new Twitter feed as “Sutff I’m Doing” using a standard RSS widget. I might have to modify that widget to strip off my username from every post, though… it bothers me. And I should do something with the search….. I just haven’t figured out what. Anyway, I think it looks much nicer now.

I’m sure widgets probably already exist to do what I want, but I wanted to play around with WordPress and PHP a little. ^.^ Being neither a WordPress nor a PHP person, How to Create WordPress Widgets and WordPress Widgets with Control Panels were very helpful.

Rhythmbox Plugin: Jump to Playing 0.2

I’ve updated the Jump-to-Playing plugin for Rhythmbox. The latest version is now 0.2, and it’s a large improvement. Many thanks to Dan Mihai Ile for his work on the configure dialog and the gconf functionality! I’ve been really busy recently, and without his efforts, I wouldn’t have gotten around to working on this.

Screenshots

toolbar button, context menu item, about dialog, configure dialog

small display mode.  notice something missing?

Changes Since 0.1

  • Added preferences dialog based on work from Dan Mihai Ile, allowing either the toolbar button or the context menu item to be displayed.
  • Modifed the UI of the preferences dialog (HIG compliance).
  • Made the preferences dialog act immediately (HIG compliance).
  • Toolbar Jump-to-Playing button hides in small display mode.
  • Browser button also hides in small display mode. This should probably be moved into a different plugin, or the core. But I’ve left it here, for now.
  • Included QueuePlaylistView’s context menu in addition to the Browser Source popup.
    Moved UI XML into strings within __init__.py.
  • Added GPL license to files.
  • Updated plugin description.
  • Checks if small display is active on activation.

Download

jump-to-playing-0.2.tar.gz (Update: Newer version is available.)

Installation

  1. Extract the jump-to-playing folder into your ~/.gnome2/rhythmbox/plugins/ directory. Completely replace any previous versions.
  2. (Re)Start Rhythmbox and enable the plugin in Edit : Plugins.

Todo

  • Force “Properties” to bottom of browser context menu (may depend on placeholder being added to the context menu)
  • Add Configure dialog with checkboxes for toolbar and browser context menu, defaulting to toolbar only (both is a little redundant). Currently, both are added automatically.
    [x] Add button to toolbar
    [_]Add link to browser context menu
  • Hide toolbar button in Small Display mode.

The code could definitely be better and there’s still room for features/general improvements. All patches and code-clean-up are welcome! 😉

Rhythmbox Jump-to-playing Plugin

This plugin will display the View : Jump to Playing Song link as a button in the toolbar and as link in the Browser’s context menu. This is about as simple as a plugin could be (which is partly why I wrote it), but I’ve actually found it quite useful. Maybe you will too.

jump-to-playing-0.1

Download

jump-to-playing-0.1.tar.gz (Update: Newer version is available.)

Installation

  1. Extract the jump-to-playing folder into your ~/.gnome2/rhythmbox/plugins/ directory.
  2. (Re)Start Rhythmbox and enable the plugin in Edit : Plugins.

Todo

  • Add Configure dialog with checkboxes for toolbar and browser context menu, defaulting to toolbar only (both is a little redundant). Currently, both are added automatically.
    [x] Add button to toolbar
    [_]Add link to browser context menu
  • Force “Properties” to bottom of browser context menu (may depend on placeholder being added to the context menu)
  • Hide toolbar button in Small Display mode.