Thursday, December 06, 2012

Setup Cyrus IMAP account on Thunderbird

I connected to Cyrus-IMAP server using Thunderbird. There's some problems on the first try :

  • All the folder reside under INBOX folder. Trying to move them up fails
  • The sending does not work, always hang with the message box informing that it can not save to Sent folder
I was in the middle of following some troubleshooting direction from this discussion when I see there's textbox labeled "IMAP Server Directory" in "Account Advanced Setting" dialog (Account Management > Server Setting > Advanced) . I input the annoying "INBOX" root folder mentioned above and surprise surprise, it makes the root folder go away. The sending is acting normally after it too.

Below is how the dialog looks like :


Wednesday, December 05, 2012

Setup postfixadmin on top of existing postfix installation

My office mailserver was a result of migration sometime ago. It was done in a limited time at that time so I only migrated the needed data and setup to keep it running as soon as possible. So, stuff like postfixadmin was left out (the system is postfix+courier+sasl setup).

Until this recent time that I need to add the account that it started to bite me. Most of the setup guide for postfixadmin assume a pristine install where it generate the database from scratch which could possibly wipe out my existing installation. So, I need to follow them less linearly.

After some searching around, I settled using this article as a starting point. However, it's quite outdated (to the point the writer marked it oudated on a big font at the top of the page) but it prove useful in my case nonetheless. It also assume fresh install but it define the steps more clearly including some behind the scene matters that happen which help me make some workaround for my specific case.

So, here's the summary (some silly-but-useful trial and errors and mistakes omitted) on what I did :

  • Backup like crazy. It's a live system after all and one can not be too careful
  • Download and install the .deb package from  postfixadmin site : dpkg -i postfixadmin*.deb.  Saying no when asked for auto setup apache and database.
  • Add apache setting : make symbolic link on /etc/apache2/conf.d/postfixadmin to /etc/postfixadmin/apache.conf
  • Add setting for the existing postfix database to /etc/postfixadmin/config.inc.php along with other settings there
  • I couldn't find the admin account for it and find the solution to reset it here. Here's what I did on my case : 
    • Installed dovecot-common package since I used courier instead of dovecot. It is needed to get access to dovecotpw utility
    • run : dovecotpw -s MD5-CRYPT -p password | sed 's/{MD5-CRYPT}//'
    • update the admin account (it's on admin table of postfix db) with the above result  
After that things went quite smoothly. I get access to user management again and adding the user is a snap.


Wednesday, November 14, 2012

Multiple Monitor Setup : 2 +1

It is quite the norm now to use multiple monitor setup for software development. It used to be that dual monitor setup is quite hot but now three monitor is already quite common. However, I find it better to have 2 + 1 setup instead of going to 3 monitor setup (with "+ 1" being a screen of another device ).

I have only certain space at one time (not to mention attention) and with several devices and gadgets I use, they all have to battle for the space in my workspace. So, I set aside one side for secondary device instead of third monitor. I find it more useful this way since I have more flexibility with the third space which I can use for Laptop, Tablet or even Books when needed. Also, if I want to breath a little I can just clear it up (or have there a snack, tea or whatever).

Below is my current workspace following the above setup.


With the above setup, I have quite generous leftover space as below.


 As you might see, there is still some space free for support stuff.  That is PS3 on the far corner for those stressful times :), connected to the secondary monitor (Dell monitor) that has comfortable source auto-switch.

And here's my Windows workspace which has the blank right space to be used for the +1  as the above setup i.e: for non-desktop devices.

As you might notice, I am generally a desktop guy. I don't like working on laptop so much (at least for major development work) unless I really need to.

I find the +1 screen can function as third monitor quite easily e.g: opening references, utilities and even with more flexibility. The downside is that it has no direct computing connection to the main machine which break a flow a little compare to having the keyboard and mouse interacting with the integrated three screen. This can be helped a little using stuff like cloud, file sharing,  bonjour protocol, etc.



Tuesday, October 23, 2012

Integrating Personal Information Manager accross Devices

I like to have integrated Personal Information Manager (Calendar, Task, Contacts, Notes, Files) across my devices. It just does not make sense for me to have different set of tasks, calendar, contacts, etc.. on different devices that I used.

On the pre-Cloud days I used BirdieSync at the core of my synching (I am a happy Thunderbird user). It worked well until I updated my mobile ecosystem to Apple (iPhone and iPad). It was the time when I switched my system to Cloud-based since trying to keep device-to-device synching was no longer practical. So, below are my current setup in general.

Backend : Google, Toodledo and Dropbox

After some searching I settle with Google, Toodledo and Dropbox  as backend :
  • Google : Calendar, Contacts, Email
  • Toodledo : Task, Support Notes
  • Dropbox : Files
They form a powerful combination to support all my data need.  Also, with a high availability of clients on virtually all devices I have great flexibility on forming the setup on the Frontend

Desktop : Thunderbird+Lightning and Addons

 On the desktop I manged to have one conveniently integrated setup below
  • Thunderbird + Lightning Calendar Addon. I only used the calendar on Lightning since the task on Toodledo does not support bidirectional synching to it
  • There are Google Providers Addon that helps sync contact and calendar with Thunderbird
  • For Toodledo, I mount it to Thunderbird using WepApp Tabs Addon
Apart from the above, Dropbox pretty much handle the rest of the data i.e: various files.

Mobile : Pocket Informant, Toodledo App 


It's quite flexible on the mobile side these days since lot of various options available to connect to the above backends. Here are just the highlights of what I used currently
  • Pocket Informant. It synched all calendar, task, contacts and notes to Google and Toodledo, so it's almost a one-stop solution for it
  • Dropbox client. The mobile version support file viewing to some extent.

Having a reliably integrated Information Manager is essential to have us really using it. Otherwise, on this time of multiple devices, we'll just play around with the system on the beginning and potentially discard it later on when the data become scattered and unusable.

I find the above setup working for me personally. You might find other setup more align with your usage and the level of integration that you think is acceptable.

Tuesday, October 16, 2012

How to speed up Code-Build-Test cycle on Android Development

I find that without serious tweaking, Android Emulator can be quite a pain to work with. It's slowness can disturb Code-Build-Test cycle significantly and it accumulates on each cycle wasting some precious development time and not to mention breaking the thinking and work flow.

Here's some tweaks that I find helpful to minimize the problem and make the development flow comfortable again :

  • Configure Hadware Acceleration for emulator to the best that your machine can support. Follow the guide to Setup hardware acceleration Android's developer site. Using it accelerate the Graphic and Virtual Machine
  • Increase the RAM of emulator
  • Minimize the builtin data size of the app. If there's a lot of multimedia files, find a way to just use only small subset of it while developing. The bigger the data the app has, the longer it took to port the app from the development system to emulator which would be bad when happen hundreds time a day
There is also one non-technical matter that I find quite helpful and that is using multiple monitor. With the emulator on the second monitor and the IDE on the first one, the testing, tracing and fixing can be more fluid and relatively faster since there is no window switching occur.

Tuesday, October 02, 2012

Storage and Reader/Player App on iOS for File-Centric Usage

I was a happy Windows Mobile user back in the day and I like how I can access it somehow just like another storage system. The system can be used more as File-Centric system rather than App-Centric like the recent mobile system.

This feature can be quite useful sometime e.g: bring file when in a hurry to  read/play on the go or copy somewhere else later. I missed this kind of use case when started to use iPhone where it has sand boxed model for the App and the only way to interact with the app and storage is through limited iTunes storage model (which is not quite intuitive nor practical at times).  

Thus, my search for a good storage-related app started. Along the way I find that the apps I found also feature built-in reader and player. This is quite interesting since this makes it a self-sufficient subsystem in itself beyond just a mere storage app and it fits with my needs mentioned above.

So, here's some of the apps that I used right now :

  • File Explorer (Universal). This is the most complete in term of feature that I know of. What I really like is how it can access Samba share and Play directly (without copying) many formats that iOS does not support natively. It has great reader/player functionality but from the feel of it took more of  Storage first, Reader/Player second approach.
  • Good Reader (iPad). I needed more advanced PDF reader for my iPad than the built-in one, so I bought this. It turns out it could function as a storage app too and in fact many people use it as such. It's reader first app though with a good general-purpose storage facility.
  • ReaddleDocs (iPhone). I got this when it goes on sale (free) but despite it's price at that time it is a very good app. It's rival Good Reader for reading feature although for PDF reading, good reader has much more sophisticated feature. However, the interesting aspect of this app is how beautiful the built-in reader/player is. It complement my usage of File Explorer above.
Apart form features listed above, all of those app support  features typically exist storage app is quite complete (cloud services support, web-based interface, etc..). They are all enable me to use iPhone/iPad in File-Centric manner when needed.

Friday, September 28, 2012

Getting Started with Android Development

Recently I had project to build Android App. So, here's some notes on starting out with Android Development.

 

Development Environment

First things first, the development environment setup. I look up for a good IDE to work with Android and it seems Eclipse is de-facto standard so it's not a hard choice. However, choosing which package of Eclipse to download is overwhelming and there does not seem to be a good convention for it around the net. I decided to got with "Eclipse for Mobile Developers" since it has "Mobile" word in it and from the package description it seems light enough. So far, I think it's a good choice and I don't have any serious problem with it.

The next step is installing Android Development Tool from Eclipse's built-in marketplace. It's a breeze though since the installation process from the marketplace took care of almost anything needed. It setting up the brand new Eclipse install into an environment ready for Android App development including including Emulator, Debugger, etc. The only thing I need to do is checking up some license agreement and clicking next.

Not all is rosy though. As I start testing making the first app...

First App and Emulator Issue

My first test code does not run and it turns out I had to install system image first. I installed through Android SDK Manager and after it the "Hello World" app finally ran.

The default emulator setup is quite slow though so you need to tweak it in AVD Manager, adding GPU, storage and stuff to to the virtual device accomodate the testing better. It ran very well afterwards.

 

The Development Resources

For development resources, Android Developers page is quite indispensable. That and some googling (which many times point me to Stack Overflow discussion) is pretty much what I need to get things done so far.

Also, along the way I find a nice little xml-serialization/object-mapping library called Simple (a pretty simple name :) ). It's java-based but the binary already compatible for the use in Android development. I haves used it since and it rocks!, no need to deal with xml parser if I don't really really have to. 

It's been a pretty nice experience of developing on Android. I probably starting out when many parts of the development has quite mature so it flows quite nicely. Also, Eclipse is a great IDE and very helpful. It's a little on the "heavy" side but still very usable and has tons of useful features which make it's heaviness issue negligible.

Tuesday, September 18, 2012

iOS Getting Started notes

Below are some Apple references materials that I follow when starting out iphone dev sometime ago. It's more or less in order of reading from the introductory/basic to specific  :

Later on, I find the book "Programming iOS 5 Second Edition" by Matt Neuburg pretty much cover all of the above in one nicely structured book made me wish I had it when starting out. It's the most balanced book on the subject and very suitable for early learning since it give the basics a very good treatment. The book gives a solid foundation for more advanced subject. Still, reading the official documentation from Apple would give the most up-to-date and detailed coverage (with the down side that it is  not being too convenient for casual reading). So, it's a good complement for the formal references.

Sunday, September 09, 2012

Exploring guitar sounds : AmpKit and Korg AX1500G


My AmpKit Link arrived yesterday, so this good lazy sunday morning was a good time to test-drive it and I had a good time exploring it. For those who never heard of it yet, it's basically a connector to interface the guitar to iPhone/iPad that enable them to function as sound processor. It's pretty neat and enable a lot of possibilities for effects and processing/recording.

My current effect is Korg AX1500G. It's an old but dependable multi effects and you can do tons of combination of sounds within ranging from the practical one to weird, alien sounding noise. So, naturally,  I did some comparison with it, while testing Ampkit Link (with AmpKit App). There is already a lot of review about these products though, so you'll be well-served by googling about them and I don't think I can add any new things.



I didn't have a concrete picture initiallny on what to use the AmpKit for. It's more of a curiosity and sounds like an interesting to play with. After all, the AX1500G, with my already scarce spare time, still waited to be explored and used more (it's been gathering quite a lot of dust recently).

It turns out that the sound that comes from AmpKit is quite nice. There is also a lot of tools and settings to play with. I played around with recording, background track, SoundCloud integration. Below is the result of doodling around with it. Be warned though, it's pretty monotone, amateurish stuff :)  :



 All around I am happy with it and hope to explore more of it. There's also additional purchasable effects which seems interesting to play around with. I figure it would be useful as a mobile, instant effects to replace bringing a big and heavy one. What I need is just the Ampkit Link and the iPhone, which I usually bring anyway.

Tuesday, August 07, 2012

Now Playing Desktop Display for VLC using Geeklet

I was looking for now playing display on the desktop for Mac. I used combination of Samurize, Foobar and Now Playing Simple Plugin in Windows and would like to have the similar experience.

The closest combination I can find is by using Geektool. There's a posted geeklet for Now Playing on VLC to be used with Geektool but it no longer work when I tried it. It seems the xml posted by vlc web interface has changed since the posting of that Geeklet.

I end up playing around with the new vlc's xml myself using XMLStarlet to get the value I want. It's a great command line tool for handling xml. Here's the command that I then feed to Geektool (using shell Geeklet) :

cd /Users/Hafiz;curl -o vlcstatus.xml -s http://localhost:8080/requests/status.xml;./bin/xml sel -t -v "/root/information/category[@name='meta']/info[@name='title' or @name='artist' or @name='album']" vlcstatus.xml

What it does is dump the xml to the file using curl, and then XMLStarlet parse and display the relevant part (artist, album, title). When the above command put in shell Geeklet, Geektool will then display it on the desktop.

Here's how it displayed on the lower-right corner of my screen.


Monday, July 30, 2012

Use Restkit Object Mapping directly

Restkit has a good object mapping library inside it. However, it's used is integrated with it's loadObject function and not really clear how we can use it directly without going through loadObject. This is useful when we have data we want to map that does not come from loadObject flow.

There's a brief hint on this on Restkit's Object Mapping manual on section Task > Performing a Mapping. It shows how the mapping is called internally.

Here's the clases related to Object Mapping in Restkit :

and here's summary of the steps :
  • create an instance of RKObjectMappingProvider
  • make mappings for each model using RKObjectMapping and add it to the instance of  RKObjectMappingProvider above (using setMapping function)
  • when it's time to do the mapping create RKObjectMapper instance following the "Performing a Mapping" documentation mentioned above




Accessing app content on iOS device or emulator on

When developing iOS app that store data to device, having a direct access to the filesystem will help a lot on debugging. Here's the references of it on Stackoverflow to access them : for device and emulator. Below are the summary :

  • For device, use project organizer on XCode to access device. From the device entry, you can download the filesystem content of the app
  • For emulator, the filesystem reside on : ~/Library/Application Support/iPhone Simulator/[OS version]/Applications/[appGUID]/

Tuesday, July 10, 2012

iThoughts and Freeplane compatibility

I used Freeplane a lot, not just for mindmapping but also for other uses like lists, outlines and notes. So, it's quite useful for me to having it accessible as much as possible. Currently, the best available option to have Freeplane's file  mobile on iPhone and iPad is using iThoughts. It is not perfect and many aspect not translated well between them, but it's usable and good enough for my need for now.

Here is some tips and notes of using iThoughts as "mobile" Freeplane :

  • Turn off "Resolve Auto Attributes" under "Export Options" group in iThoughts. This will map auto/blank attributes on iThoughts to defaults to Freeplane which is better than having to deal with confusing translation of Auto/inherited attributes
  • iThoughts only know edge color, so every node color (text, background, edge) will all translated (flattened to be more exact) to edge color on iThougts. The bad thing about this is that it's a lossy translation, so when you re-open on Freeplane, all node-related color are back to default except for the edge color
  • Icons compatibility is quite limited. Some typical groups and sequences like flags and numbers are in-sync as some punctuation-based icon like question and exclamation icon is in-sync too. So, use icon sparingly and test for compatibility
  • Even after yo have established your personal convention you might still see some surprises on maps/nodes. This usually some Auto format issue. Try to reset the format to Auto on iThoughts and/or Default in Freeplane and reapply the needed formatting. This usually get the format in-sync again
iThoughts is a good app in itself, but it's Freeplane compatibility it's just medium level. Although it would be ideal to have full Freeplane  app but with some tweaks above  iThoughts could do the job for now.

Monday, April 23, 2012

muCommander to "complement" Finder in OSX Lion

I recently found muCommander File Manager. It's simple, dual-pane file manager (as a bonus, it's also multiplatform due to it's java usage). It supports natively several file protocol e.g: smb, ftp. However, the biggest use of it for me currently is that it can open windows share when Finder can not.

I have many issues with Windows Share in Finder and it can break the workflow sometime. muCommander help with that in many cases. On some other needs, it does not entirely solve the problem since it can not mount it and only allow transfer. This means I can not open the file directly through the share but need to copy it locally first. Still, it's a good help for now until Apple fix the interoperability with Windows Share.

Apart from that, I probably won't use it much beyond helping the windows share issue above. and some occasional need for dual pane.  It's a nice looking File Manager but a little too simplistic for my needs.

Wednesday, April 18, 2012

Powerful but light PHP Framework/Library combination : Slim, Twig, Idiorm/Paris

I need to work on PHP website recently and were looking for libraries and framework to approach it better with the latest components available. My previous perception on PHP is that it has has a lot to catch up with existing solutions on Ruby and Python. However, this time it seems it already has done it's homework and now has many options regarding some development in web programming e.g: Template Engine, Microframework, ORM.

Here several libraries/framework that I find can form a good combination for small to medium project :

  • Slim is a micro framework for PHP. It is a good enough to help separate the web application into a more modular, decoupled architecture (call it something like MVC if you like). It's a very low-cost approach compare to using full-blown framework like Zend. In Python, I used Flask and it's quite similar.
  • Twig is a templating Engine. It's like Jinja in Python. In fact, the initial coder is Jinja developer, so it's not too strange that it feels quite similar. I don't think people should write/generate HTML code inside PHP directly  anymore. It's inhumane :). Templating engine helps the code deal with the logic exclusively while it deals with how to present it. It has a good two-ray integration with Slim above : there's Slim extension for Twig and Twig can be plug to Slim as Template engine.
  • Idiorm/Paris is a a very light ORM layer for PHP. It just one class and one file with a straightforward and simple uses yet it does the job really well.
So far, I find the combination above serve me quite well. They are quite flexible, does not force too much assumptions/model and has small learning-curve and overhead.

Monday, April 16, 2012

Manage Linux system services using sys-rc-conv

There's a good tool to help manage system service in linux : sysv-rc-conv that I start to used just recenrly. It's much better than having to deal with /etc/rc*.d stuff.


I don't know why I haven't used it before, probably because of the name :). It does describe the context and function well but not exactly easy to remember and pass around.


Thursday, April 12, 2012

Integrating Apple Ecosystem


Early this year I got some iPhone app project to start. So, it began my serious usage of Apple Ecosystem. I start to use together iMac, iPhone4 and iPad2. It's been a very involving process to get them integrated into my current workflow (which up till then was mostly Windows-based). Most of my previous system is still used except for HTC Touch Pro2 which is replaced by iPhone4. Below are some notes on the integration process :

  • Moving to The Cloud. My previous main GTD system is synced directly using cable with my HTC-TP2 act as the central on the synching with Laptop and Desktop with WMDC and BirdieSync as a glue. With the inclusion of the new devices it would no longer possible (or at least very impractical) to keep doing it. I guess this is what the clouds are made for. I now rely on Google Map, ToodleDo and Dropbox for most of the syncing.
  • Java-Based software are ported well. Java works. I got jEdit, Freeplane, Astah working and ready to use on
  • Mutliplatform software do it's job well. Firefox and Thunderbird has no issues here.
  • Most of the software has comparable counterparts. Most of the software has more or less a comparable alternative on each platform. Some are better but some are less fancy, so overall it's a draw, I guess. I miss TortoiseSVN quite a lot in iMac.
Apart from the software it's mostly the adaptation that take some time. I don't like to just imitate what I did on other platform to another one. It's more satisfying, and useful on the long run, to try to understand first the new platform different approach and to migrate the needs as natively as possible before improvising more later on. For example, I tried built in Mail and Calendar on iMac for sometime before switching back to Thunderbird+Lightning.

So far, I enjoy the new systems and it brings many fresh views, new approach and utilities.

Tuesday, April 10, 2012

jEdit on Mac : How to get better font rendering


Text Editor is one of the first software I look around when I start using Mac. I am a jEdit user on windows but I figure I tried what's available natively on Mac first, in case there's something better and works natively. Long story short, jEdit is still the best option for me.

It runs quite well on Mac but somehow it seems something is a bit miss in the way it renders font. The characters are a bit blurry, although not too bad and I still managed to ignore it for sometime. However, after a while, the difference with the native editor like TextEdit start to raise some curiosity about the difference on how they render the font.

The discussion here, finally shed some lights on the issue. Below is what need to be set on jEdit (quoted from the original post) :

Edit the file: /Applications/jEdit.app/Contents/Info.plist

.. somewhere around line 66 you'll see these options

      Properties
     
        apple.awt.textantialiasing
        true
        apple.laf.useScreenMenuBar
        true
        apple.awt.antialiasing
        true

.. just after those lines, add the following extra properties:

        apple.awt.graphics.UseQuartz
        true
        apple.awt.rendering
        quality

.. restart jEdit, and you should have much nicer font rendering!
:-)

It looks much nicer after it and give me even less reason to try to move from jEdit.