Oct 09 2007

My patch in Banshee

Tag: C#, Gnome, Mono, Open Source, Software EngineeringDan @ 7:04 am

A while ago I coded a small patch which I submitted to the Banshee music player project. It has a plugin which supports sharing of your music library via the DAAP protocol, but it was only sharing individual tracks and not playlists which made browsing a large collection a little tedious. So I cooked up a little code to solve the problem and attached it to a new bug in Banshee’s bug tracker.

I was happy to find my patch was accepted and was eventually released in version 0.13. I’m even happier to find that with the upcoming release of Ubuntu 7.10 my patch has found it’s way downstream to my favourite distro too.

It’s interesting to chart the progress of an open-source contribution: I submitted my patch upstream (i.e. directly to the Banshee) on 13th Feb 2007, it made it into a stable release six months later on the 5th August 2007, and now in October it’s beginning to make it downstream into the distributions. In total around eight months have passed. At first this appears to be a long time but it’s better new features don’t float downstream too quickly so they have more time to mature.


Sep 03 2007

Learning C

Tag: C/C++, Software EngineeringDan @ 5:45 pm

This year I’ve been making a concerted effort to learn C. Properly.

I’ve toyed with it a good few times over the last few years, but never studied it in a focused way. After the Chairman of our company (actually a real C programmer) indicated that I was “a bit of a girl’s blouse” because I didn’t know C, I decided something had to be done.

My ultimate goals are to be able to create or improve Linux drivers for bits of hardware that don’t work, and to be able to fix bugs for myself in C based Linux apps.

A games programmer I know recommended that the K&R book was still the best in his opinion, so I bought a copy and got started. Others have told me it’s not so good. I can understand this point of view, if I didn’t already know other programming langs it would be quite an uphill climb, but I’m really enjoying it.

Another decent book I’m planning on reading properly once K&R is done is Expert C Programming by Peter van der Linden (Paul: thanks for recommending I read this). If anyone knows any other books or great sources of C info/wisdom I’d love to hear about them.


Jul 27 2007

Useful Talk on Packaging Java Applications for Ubuntu/Debian

Tag: Java, Linux, Software Engineering, UbuntuDan @ 6:56 pm

Came across an excellent JavaOne conference session on software packaging for Ubuntu/Debian. It has a specific focus on packaging Java software but I found it gave an excellent general insight into the process of getting a piece of software, commercial or free, into the Ubuntu repositories. The main example used was the experience of the Sun engineer Harpreet Singh who was responsible for packaging the Glassfish application server which is now available in the Ubuntu multiverse repository.

Here’s the link, you will need a Sun Online account to access the talk:

JavaOne Technical Sessions - Packaging Java Platform Applications into Ubuntu


Feb 27 2007

UK Government Software Patents E-Petition Response

Tag: Open Source, Software EngineeringDan @ 11:09 am

Today an answer has been given to the E-Petition on software patents which was raised a few months ago.


Dec 15 2006

HOWTO: Installing Netbeans 5.5 on Ubuntu

Tag: HOWTO, Java, Linux, Software Engineering, UbuntuDan @ 11:19 pm

Netbeans is not currently available in the Ubuntu/Debian repositories. I believe this is because it uses the Sun CDDL licence which is considered incompatible with the GPL.

However, as an end-user you may wish to use Netbeans despite that. Although it comes with a neat installer wizard I personally prefer to try to get native .deb packages where possible in order to get native package management and menu/launcher icons. I found a debian packaged version by Daniel Baumann. It appears he put it on the Debian new queue but is wasn’t accepted. He’s made the prepacked binaries available here:

http://archive.daniel-baumann.ch/debian/packages/netbeans/5.5-1/

However, I wanted to learn something so I decided to try building a package using the current 5.5 source dist from Netbeans archive and Daniel Baumann’s debian package source. Here are the steps I took.

Building and Packaging Netbeans 5.5 for Ubuntu

1) Grab daniel-baumann’s patch here

netbeans_5.5-1.diff.gz

2) Get the Netbeans 5.5 source from:

http://www.netbeans.info/downloads/all.php?b_id=2180&src=1

I picked up the ’source’ tgz file from the table of links at the bottom of the page.

3) Untar the sources

  1.  
  2. mkdir netbeans
  3. cd netbeans
  4. tar -zxf netbeans-5_5-ide_sources.tar.gz
  5.  

4) Now apply the patch to the sources

  1.  
  2. # first decompress the patch
  3. gunzip netbeans_5.5-1.diff.gz
  4. cd netbeans-src
  5. patch -p1 < ../netbeans_5.5-1.diff
  6.  

The patch simply installs the debian packaging kit into the Netbeans 5.5 src directory. After applying you will find the new files under the newly created debian directory. For more info on what these files do see The Ubuntu Packaging Guide or the Debian New Maintainers Guide.

6) Next build the packages and install

  1.  
  2. debuild -uc -us
  3. sudo debi
  4.  

When debuild completes there will be 2 .deb files left in the directory above:

netbeans-ide_5.5-1_all.deb
netbeans-platform_5.5-1_all.deb

debi installs both files by reading the netbeans_5.5-1_i386.changes file which will have been generated in the directory above.


Dec 15 2006

HOWTO: Packaging Java 6 for Ubuntu

Tag: HOWTO, Java, Linux, Software Engineering, UbuntuDan @ 10:18 pm

Update: As of Fri 19th Jan 07 Java 6 has now been officially included into the Dapper Backports repository. See it’s package page.

Today I found out how to package Java for Ubuntu/Debian. I wanted to see if a .deb package file of Java 6 was available for Ubuntu I found details on creating one in the following forum post: Re: JDK 6 Available…now when is a deb coming?. The instructions there are great except they don’t work perfectly for Dapper so here are the modified steps for Dapper:

1) Patch ‘java-package’

The Debian Java Maintainers have created a tool make-jpkg which is a neat script to take the Sun Java native linux .bin installer and turn it into a .deb package. This script comes in the ‘java-package’ package which is in the multiverse repo in Ubuntu.

Dapper stocks the 0.27 version which does not support conversion of Java 6 yet. However, mlind attached a patch to his forum post (link above) to add support for Java 6 to java-package version 0.28. Luckily it’s not difficult to tweak the patch for 0.27. Here’s the modified version of the patch:

java-package_sun-java6.dapper.patch

Here’s the instructions on how apply the patch and build the updated package:

  1.  
  2. mkdir java-package
  3. cd java-package
  4. sudo apt-get build-dep java-package
  5. apt-get source java-package
  6. cd java-package-0.27
  7. patch -p1 < ../java-package_sun-java6.dapper.patch
  8. debuild -b -us -uc
  9. cd ..
  10. sudo dpkg -i java-package_0.27local0_all.deb

2) Package sun-jdk6

Now that you’ve updated java-package it’s time to package Java 6. First download Java 6 from Sun. You need to download the Linux self extracting file (jdk-6-linux-i586.bin). Here are the instructions on building it (taken from the forum post listed above).

  1.  
  2. mkdir sun-jdk6
  3. cd sun-jdk6
  4. # put jdk-6-linux-i586.bin into this directory
  5. make-jpkg jdk-6-linux-i586.bin
  6. dpkg -i sun-j2sdk1.6_1.6.0_i386.deb
  7. sudo update-alternatives –config java
  8. # select the new Java 6 installation as the provider of java
  9. java -version
  10. # Output of the above command should be
  11. # java version "1.6.0"
  12. # Java(TM) SE Runtime Environment (build 1.6.0-b105)
  13. # Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

Nov 22 2006

Bug Triage

Tag: Software EngineeringDan @ 10:41 am

Triage‘ is a medical term for the process which happens in an emergency of sorting out who will die no matter what, who will need help so they don’t die, and who will be fine whether you help them or not. ‘Bug Triage‘ is a process in software engineering to sort out which bugs will be fixed now, which wil be fixed later, and which won’t be fixed. In addition to this each bug must be assigned a severity (a technical metric), and a priority (a business metric).

This is of course a rather general description. A good clear description can be found here: Bug Triage Meeting - Severity & Priority. Erik Sink has posted on his bug triage process here: My life as a Code Economist.


Nov 14 2006

Java now Open Source under the GPL2

Tag: Java, Linux, Open Source, Software EngineeringDan @ 10:23 am

Yesterday announcements were made that Java has been released under the GPL2 Open Source licence. Here’s some of the relevant links:

Apparently it’s an early version of Java 7 that is immediately available under the new licence, this includes the Hotspot VM and the ‘javac’ compiler. However, the Java API class libraries and certain 3rd party components are still not yet open.

Personally I think this is great news. Adoption of Java has clearly been hampered on open source operating systems because it remained under a closed source licence for so long. It has allowed technologies such as Mono/.Net and Python to get ahead for development of cross platform desktop apps where Java may have a been a viable choice if only it’s licence had allowed it to be shipped along with standard packages.


Oct 02 2006

My Must-Have Applications For Ubuntu

Here’s a list of some of my favourite or most relied-upon applications on Ubuntu. It’s not exhaustive but it’s a start. It doesn’t include extras like multi-media codecs or any of the sort of things you can get easily with something like EasyUbuntu. The lists arranged by purpose and are ordered alphabetically not by preference. Some things are not available in the Ubuntu repositories and are marked as such.

Desktop

  • deskbar-applet
  • gnome-keyring-manager
  • kde-style-polymer (from external source - makes QT apps look ok on gnome, see my post here)
  • MSTCoreFonts
  • nautilus-open-terminal
  • nautilus-scripts:
    • nautilus-script-collection-svn (subversion shortcuts)
    • nautilus-script-manager
  • skype (only beta 1.3 works, needs kde-style-polymer or looks ugly, get it from www.skype.com)
  • Tomboy (desktop notes tool)
  • xnest (for nested X logins)

Development

  • apache2
  • emacs-snapshot-gtk (emacs for the gnome desktop)
  • JEdit (from external jedit repo http://dl.sourceforge.net/sourceforge/jedit)
  • java:
    • ant
    • sun-java5-*
  • meld (visual/graphical diff tool)
  • mysql:
    • mysql-server
    • mysql-client
    • mysql-admin (note a wrapper script is needed as a bug workaround on this, can’t remember the bug link just now)
    • mysql-query
  • .Net (just listing the basic dev packages here)
    • mono-devel
    • monodoc-manual
  • php5:
    • php5 (basic setup for use with apache)
    • php5-* (choose whatever extra modules you need)
    • php5-cli (command line version)
  • python
  • ruby
    • ruby
    • irb
    • lib*-ruby (pickup any of the extra packages you need)
    • ri
    • rdoc
    • rails
  • subversion
  • vim-gnome (gvim)
  • vmware-server

Networking

  • Avahi (zeroconf/bonjour)
    • avahi-daemon
    • avahi-utils
    • libapache2-mod-dnssd (to auto-advertise apache2 sites available on your machine)
    • service-discovery-applet
    • libnss-mdns
  • ethereal
  • firestarter (basic firewall manager)
  • gftp (sftp and ftp client)
  • NetworkManager
  • rdesktop (Remote Desktop and Terminal Services Client)

Sound & Multimedia

  • banshee music player
  • f-spot photomanager
  • gnomebaker (cd-burner)
  • gxine (media player)

Sep 08 2006

Power Vim Usage: Tips & Tricks for Everyday Editing

I’ve recently become a bit of a vim convert. Not for all editing tasks at the moment, but I’ve found myself choosing it sometimes in preference to my previous favourite editor JEdit.

I like vim for quick editing as I’m finding the key sequences very speedy once you’ve learned the basics. I miss JEdit’s fantastic hypersearch feature, however, knowing vim I’m sure there’s a way to do something similar.

Found this article today looks like it’s got lots of useful power-user tips for getting more out of vim. I’ll have a look through later.

Power Vim Usage: Tips & Tricks for Everyday Editing


Next Page »