Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Wednesday, April 1st, 2009 07:04 pm

I love it when I can do things efficiently.

One of the features I’ve long wished LogJam (the LJ client I use) had is persistent templates for posts.  It has drafts, but always asks if you want to delete the draft after you submit a post.  Annoying, and carries the risk of accidentally deleting your drafts that you’re using as templates.

Recently I decided to go add a templating feature, but on studying the code, it appeared that it would result in considerable duplication of code.  But it occurred to me that there was another approach to the problem ... and I just used it.

So I just de facto added a capability to LogJam to use drafts as persistent templates, plus a control in the preferences UI to turn the feature on and off ... by adding six lines of C and changing one.  Seven total changes across four different files, to add a significant UI feature.

That’s efficiency.

Tags:
Wednesday, April 1st, 2009 11:11 pm (UTC)
Nice!
Wednesday, April 1st, 2009 11:27 pm (UTC)
Bless you! I lack the skills but have always wanted this feature. I've pestered the LJ dev team for online versions, but apparently its not important. Hadn't gotten as far as finding a client. Pleased to see you took it on. Yay open source. :-)
Thursday, April 2nd, 2009 01:45 am (UTC)
See http://www.babcom.com/public/logjam-patches for all my LogJam patches. I should probably drop an index page in there explaining what each one does.


.....And done. http://www.babcom.com/public/logjam-patches/
Thursday, April 2nd, 2009 04:58 am (UTC)
It is the sweetest thing in the world when you can see how to make a change like that! I used to give monthly awards to coders that could make a robust change with the fewest lines of changed code. Sounds like you would win for the month!