Entries Tagged 'development' ↓

git add -u

This is a nice one:

CODE:
  1. git add -u

This only adds already commited files to a new commit. And leaves files not in the git repository alone.

Sublime Text 2

I installed sublime text on my Ubuntu 11.10 box but I had some troubled loading external python modules:

CODE:
  1. loaded 937 snippets
  2. >>> import distutils
  3. Traceback (most recent call last):
  4.   File "<string>", line 1, in <module>
  5. ImportError: No module named distutils

This is how I solved it:

Edited ~/.local/share/applications/sublime.desktop
Especially this line:

CODE:
  1. Exec="/home/leon/Software/bin/sublime" %U

/home/leon/Software/bin/sublime contains this:

CODE:
  1. #!/bin/bash
  2. cd /usr/lib/python2.7
  3. /home/leon/Software/SublimeText2/sublime_text

Then I installed some excellent plugins:

Nice: github resumé

Generate your own Github resumé

Removing packages marked rc

I got an error when building the 2.32 version for ubuntu. Some packages once where installed but got removed. But they still had the status rc.

So I purged them with the help of this blog.

I compiled evolution with the help of a Makefile that I downloaded.

I had to add the "maverick" distro and install some additional packages such as:

  • gobject-introspection
  • autopoint
  • libgdata-dev

I removed the evolution-exchange plugin.

The master branch of gweather required gtk3 so I changed that to: gnome-2.30 (or something)
I had to apply a patch to solve a build error.

Bottom of this post: http://www.mail-archive.com/evolution-hackers@gnome.org/msg03863.html

http://www.mail-archive.com/evolution-list@gnome.org/msg15575.html

Zend_db

Zend Framework logoThe last few days I've been spending my time on creating a website with Zend Framework. A lot of it I liked but the Zend_db stuff is is a complicated piece of crap. I've worked with a lot of ORM's and db api's but the Zend_db stuff is really the most awfull I've had till now.

I really, really don't want to work with it ever again and I regret that I chose ZF for this particular project just because of the db layer.

Nice guide to upgrading magento

http://www.nicksays.co.uk/2010/03/fool-proof-magento-upgrades/

CODE:
  1. ./pear upgrade --force magento-core/Mage_All_Latest

python libindicate

I saw that there are python bindings for libindicate. They're called "python-indicate".

There's also a wiki about this new feature from Ubuntu. I thought about creating a plugin for weechat that uses this library. Especially because the notify-plugins is useless if you're away and somebody mentions you on irc. Libindicate would be perfect for this. First have to find out how the behaviour of the applet would be.

[update]
I asked my question on the libindicate launchpad so I'm very curious about the answer(s).
[/update]

messaging-menu-karmic ubuntu 9.10 libindicate

Choosing a new editor: Emacs vs. Vim

For php I use Zend Studio for Linux. We have a license at work for it and it is in my opinion the best editor for php. It's relatively fast and you can use it to quickfix php over an ftp connection.

For Ruby I use netbeans. I would also like to use it for php but it doesn't allow to quicly open a file via ftp/scp or whatever. And it can sometimes be sloooooowwww. I've  seen netbeans used on a Windows platform and there it is much faster.

When I right-click on a project in netbeans for the first time, it takes 5 seconds (not lying!) to render the popup-menu. Come onm take forever!

And because I was now developing with Python I decided to try a new editor. Something more hardcore and lighter. Something nerdy :) So ofcourse I only have two decent options: Vim & Emacs.

I already had try them with Ruby. But I found good Ruby (& Rails) support rather lacking by both of them. I believe that the python comminity is more hardcore and therefore are using more arcane editors :) And maybe because they aren't afraid to hack away in another language than their own (lisp, vimscript).

I think I have been comparing the two editors for nearly two weeks now. I have spent hours and hours comparing, trying and browsing for blog posts about the two. At the end, I really didn't know which one to choose. I really suck at deciding something :) So I made a little list of what I find to be strong points of each editor:

VIM:

  • Better syntax highlighting/theming supprt (wombat ftw!!)
  • Faster/smaller
  • No weird handling of new buffers like with emacsclient
  • No daemon like: emacs --daemon
  • Better python integration
  • Easier to make extensions
  • Preview of docstrings when using omni completion

EMACS:

  • Better python-mode
  • No commandmode/normalmode
  • Directory browser/editor
  • Debugger (better integration with external tools)
  • easier to begin
  • Everyting is a buffer™

And now I have chosen to be the editor with which I am going to work is...... (drum roll please) .......:

Gedit!

No, it's (g)Vim :)

And while writing this article I was looking for a WordPress/blog plugin for Vim and Emacs. At a glance it looked like the wordpress plugin for Emacs was a little bit better. So already I was doubting my decision... So it could be that I switch editor in the next few months :) But I'm first going to really use gvim to see if it fits with my workflow and is really useable for me.

As cherry on the pie, a nice screenshot of my gvim in action:

Vim with python-mode

[update]
I've installed Netneans 6.8m2 and it feels a lot faster than 6.7 but python completion is as bad as in 6.7.
[/update]

[update2]
Found out about Vim's netrw. So Emacs no longer got "Directory browser/editor" as a strong point.
[/update2]

Rmp -> Pmpd

monty-pythonI've ditched Ruby for my mpd project and started using Python. Not that I like python that much more but the Gstreamer library for python is much more complete. I really wanted gapless playback and the Ruby Gstreamer libray just doesn't support that. If it does by the time you read this: please let me know :)

The new Pmpd project (looking for a better name) can be found on github. The hardest part so far is having to restructure the sources. Python is not a difficult language to master at all but I'm very picky on how everything fits together. My ruby project felt right on that part. But the python equivelant has some things I just don't like enough up to now.

Phoogle: a _good_ fixed version

Recently phoogle broke because of some Google maps update. The original creators of Phoogle haven't updated the code (yet). And when searching online for newer, fixed versions all that showed up were crappy hacked Phoogle files by people who don't know what they're doing.

So hereby I present to you: a fixed Phoogle files which is hacked decent.