Some of my notes other than Java and Python. Mostly about other stuffs I play with such as Linux, Ubuntu, CentOS, Solaris, VirtualBox, VMWare Player, ... or whatever stuffs passing by...
Wednesday, July 17, 2013
GnuCash with PostgreSQL in Linux Mint
The Eclipse based IDE usually getting slowed down after a Windows hibernate session and need to be restarted to get it to the right shape. Another big problem is that every so often, I have to restore the installation from a compressed file because it just crashed and irrecoverable.
I learnt that those problem doesn't show when running the IDE from Linux. Those at office, especially our department start converting their desktop to Linux but I wasn't able to do that as I still have to deal with some presales matters and WebEx.
I have decided that Linux Mint will be the main operating system I will be working on. Linux Mint is an Ubuntu derivative OS, so although it has its own repository, it also depends heavily on Ubuntu repository.
Just like in Ubuntu, installing GnuCash is just a matter of typing this command:
$ sudo apt-get install gnucash
I had a GnuCash running well on Windows, and I would like to use that in my Linux Mint without having to switch OS. When I install GnuCash the Ubuntu way (Linux Mint is a derivative of Ubuntu Linux), I was caught by surprise that it only supports the xml and sqlite3 format!
On my Windows 7, the GnuCash of the same version supports xml, mysql, and postgres.
It made me wonder, why should a GNU application not supporting PostgreSQL database in a GNU operating system, while it offers connection to the PostgreSQL database in Windows!
After a few days, scratching my head, Googling around, I finally found out that one library in Linux was missing, which is "libdbd-pgsql".
$ sudo apt-get install libdbd-pgsql
The command would just do the trick! Nice, I can continue using my GnuCash without having to restart and switch OS!
Sunday, July 10, 2011
Tech Bubble in Causal Loop Diagram
Recently while taking the Enterprise Architecture Practitioner course with NUS ISS, I learnt how to use Causal Loop diagram.
I want to try composing the diagram on various topics. For today, it's the tech startup bubble.
Wednesday, June 8, 2011
The next SG GTUG Meetup
I looked at the website and wanted to see how far I have missed those meetups. One in March about SingPath (Chris' project). But he did explained to us on last Singapore Java User Group meetup. Android Honeycomb on February. January on Game Development. So much from August 2010 to March 2011.
No meetups on April and May.
So last time was the Google DevFest on June 2010. Can't believe it was one year. So what I have missed mostly were the Android stuffs.
Next meeting will be about AppEngine, stuffs I am playing with a lot. Ikai will be the speaker.
OK. Can't wait for the next meetup. Yipee!
Monday, March 28, 2011
Google Translate (Chinese --> English) read in Chinese dialect instead of translating to English
I expected that the translation was something like "Happy Chinese New Year", or "Happy New Year", instead it shows up in one of those dialects.
Meanwhile the same thing when you put the characters in English --> Chinese translation, they will put the same characters, along with the Mandarin pronounciation below (gong1xi2 fa1cai3).
Thursday, December 23, 2010
Merry Christmas everybody!
Merry Christmas 2010!
Wish you a joyous Christmas, happy holiday!
Ubuntu Maverick Meerkat 10.10 on my laptop
This time I won't get fooled around by installing the 32-bit version. This time it has to be the 64-bit kernel!
I followed the instruction given by PendriveLinux.com.
It's quite straightforward and easy to install.
Tuesday, December 7, 2010
My wishlist for my blogger site
- a good syntax highlighter, at least similar to SyntaxHighlighter by Alex Gorbatchev; I know at certain time people managed to have it run on their blogger sites, but most of the links I found in Google is a very old links that seems to no longer working at all.
- customize my own blog template
- put links to my other blogs (I think this one should be very easy)
Sunday, December 5, 2010
Converting Wordpress Blog to Blogger / Blogspot
When I search in Google, there is a hope in wordpress2blogger tool. It is a hosted tool at Google App Engine. Google App Engine put the limitation of the upload to 1Mb, so you can only upload blog less than 1Mb in size. Of course we can work around the limitation by importing the blog bit by bit.
For my case, I divided into 4 chunks.
This is how I did it:
1. Login to your Wordpress account, and navigate to the Dashboard for the blog that you want to transfer to Blogger/Blogspot. I was using Wordpress 3.0 which had slightly different configuration and menu from the one described on the appengine hosted tool.
2. Click on Tools (left accordion menu section) > Export (link)
3. Download the Wordpress XML file.
4. Upload to the wordpress2blogger.appspot.com website, click [Convert] (button).
5. You will automatically download from the site, a new format that is importable by blogger. The file normally will be named blogger-export.xml
6. Open your Blogger account, create a blog if you haven't got one, or you can import to your existing blog. Go to this link: Dashboard > Settings (tab) > Basic (tab) > Import blog (link). Choose the file.
That's it! Done.
Saturday, December 4, 2010
Installing Go language on Mac OS X
Go supposes to run well on machine with GCC, Mercurial, and Bash. Mac OS X has them all. To my surprise, I already have Mercurial on my Mac OS X box!
I created the /swdevel/golang/hgco. Then checkout from the Mercurial repository from Google Code.
I am following the instruction given here http://golang.org/doc/install.html
$ hg clone -r release https://go.googlecode.com/hg/ go
requesting all changes
adding changesets
adding manifests
adding file changes
added 6822 changesets with 26893 changes to 3944 files
updating to branch default
2435 fles updated, 0 files merged, 0 files removed, 0 files unresolved
It succeeded checking out from the Mercurial repository!
$ cd go/src/
$ ./all.bash
...
...
--- cd ../test
1 known bugs; 0 unexpected bugs
---
Installed Go for darwin/amd64 in /swdevel/golang/hgco/go.
Installed command in /swdevel/golang/hgco/go/bin.
*** You need to add /swdevel/golang/hgco/go/bin to your $PATH. ***
The compiler is 6g.
On OS X the debuggers must be installed setgrp procmod.
Read and run ./sudo.bash to install the debuggers.
Well, they warned me for a known bug!
The system doesn't seem to get the processor correctly, AFAIK my Mac Mini supposed to be Intel Core2 Duo while it detects amd64?!?
It displays a bunch of compilation messages. It took somewhere around 8 minutes on my Mac OS X box.
The 6g denotes that your architectures is x64, while 8g is for x86.
Then I need to do this:
$ echo 'export PATH=/swdevel/golang/hgco/go/bin:$PATH'>> ~/.profile
$ cat ~/.profile
Check whether you have exactly code below in the last line of your ~/.profile
export PATH=/swdevel/golang/hgco/go/bin:$PATH
Close your shell window, and open a new one (this is an important step so that your ~/.profile will be executed!).
Test on the new shell window:
$ 6g
It should displays something like this:
gc: usage: 6g [flags] file.go...
flags:
-I DIR search for packages in DIR
-d print declarations
...
...
-x print lex tokens
Done installation!
Next post will be showing the hello.go (hello world of Go language) on the Mac OS X box.
Wednesday, November 24, 2010
Back to go -blog
[caption id="" align="aligncenter" width="450" caption="Guru Go Blog"]
For those who don't understand Bahasa Indonesia, "goblog" means "stupid". "guru" here means "teacher". A university or academy tried to increase the awareness of impact of blogging, and spread through the national seminar and workshop for teachers. But the title "guru go blog" means "stupid teacher". They should (as teachers should) pay attention to the English grammar. "Guru go blogging" instead of "Guru go blog" (which may also reflect the truth, by the way).
The lost of my blog settings in this domain, coupled with the coming of our newborn baby 2 months ago, has made me too lazy to post something on my blog. I did wrote some half completed blog entries, but didn't manage to finish it.
Now I began to realize that it was too long. This is not what I really want. I want to be able to update my blog regularly!
I managed to get my blog up again 3 months ago, and now the baby has been sleeping more and more regularly. I think it's time to come back to my blog.
Currently I am trying to compose a mini site on IT Career, and it is bilingual, in English and Bahasa Indonesia. The target market is of course the people beginning to enter career in IT and people in the middle of IT career (which is just like me).
Saturday, July 10, 2010
Again about Google DevFest 2010
Yesterday I had to leave an hour earlier from the Google DevFest 2010 event, as I have to catch up with my wife, she was waiting for me for the second Antenatal Class. I missed the Code Lab, the Maps and Buzz T-shirts. Ouch. 5:30pm I had to leave while they ended the event on 6:30pm.
Flash back: After lunch time, there were some presentations on Google Apps, by Patrick Chanezon, followed by success story of people who developed applications for Google Apps. One from creately.com (http://www.creately.com). Another round from SingPath (http://singpath.appspot.com).
One thing that was missed a lot is the power points (aka power plugs). It was awful so many people carrying laptop and no power plug on the Connexis Theater. Almost everyone were running out of battery.
I just don't know why the crowd was kinda lacking enthusiasm to verbally respond to the speaker on stage with 'ooo's, 'aaaa's, 'yeah's, 'alright's and stuffs. Most of the time the crowd was silent.
Nevertheless it was a must-attend event of this year. I will attend the next event for sure.
Friday, July 9, 2010
In Google DevFest 2010
Currently I am attending the Google DevFest 2010. Timothy Jordan and Bob Aman in their presentation on Open Social.
Today the registration was pretty crowded, and they differentiate based on the first letter of your first name. I was in the "A-F queue". The queue was long and the registration process was draggy.
They changed the schedule a bit, Daniel Lee presented the Google Maps as opposed to the initial schedule on the web site: Google DevFest 2010 in Singapore. He showed us how to create a coffee shop location based informative web site as an example.
After the first session, Jeremy Orlow, an engineer working on the Chrome team, explained the HTML5 and the Chrome. They skipped the Q&A for HTML5 and Chrome. May be they pushed forward because we're late because of the registration, so in order to finish during the lunch time, the organizer advised to ask in person to Jeremy during lunch time for anyone who want to ask questions.
Then here comes the third session, and its about Open Social. Tim was of more lively presenter than others I think. More like MC may be? Google Buzz API stuffs, atom, OAuth, Salmon, Pubsubhubbub etc.
Wednesday, June 23, 2010
Chicken Pau Objective-C
Or we might as well call it "Objective C para gente pobre" (Spanish, thanks to Claudio) above title translates to "poor man's Objective-C".
What I mean by poor man's Objective-C is the development using the language which pre-dominantly using the Apple hardware and the latest Apple compiler. That the rich man's version of Objective-C.
But if you are just like me, who is still saving to buy an Apple hardware, may be this approach will be a short term cure for your addiction. We will start with something as simple as an Ubuntu 10.04 Lucid Lynx Linux box, which is far more affordable than Mac boxes. My objective was to be able to have a hands on experience with the Objective-C language, before moving to the platform where you need to invest more bucks. Practically I decided to learn the language using "poor man's Objective-C" (it's "Objective C para gente pobre" -- thanks to Claudio).
Luckily enough, the Objective-C compiler that we use are from the GNU family of compilers (gcc, cc10bj), which by far the most widely used and widely ported compiler family. It's available everywhere for free. Those guys at Apple also uses GNU compilers, which make it easier for us -- that we don't have to install another proprietary tools.
One sad thing though, the GNU compiler set doesn't fully support the Objective-C version 2 which is the case with latest Cocoa platform. But as I said, my objective was to have a hands on experience on the language, you get the feel, familiarize with it, then you can move one when you piggy bank accumulate enough to produce a bang on the fruity stuff.
Let's start. I assume you already have your Ubuntu box installed.
[sourcecode lang="shell"]
$ sudo apt-get install gcc
$ sudo apt-get install gnustep-base-runtime
$ sudo apt-get install gnustep-core-devel
$ sudo apt-get install gobjc
$ sudo apt-get install gnustep-gui-runtime
$ sudo apt-get install libgnustep-gui-dev
[/sourcecode]
Most of the time you just need to answer "Y" for the questions raised.
Let's make it official by writing a hello world application.
[sourcecode lang="c"]
#import <stdio.h>
int main(int argc, char** argv) {
printf("Hello, world!\n\n");
}
[/sourcecode]
Save the file as hello.m
Compile it using our gcc tool:
[sourcecode lang="shell"]
$ gcc hello.m -o test.out
[/sourcecode]
If it compiles successfully, try to run ti.
[sourcecode lang="shell"]
$ ./test.out
Hello, world!
[/sourcecode]
Here we go, a hello world in Objective-C!
Ok, it's a bit cheating, the only difference from the C language in the source code was only the use of import instead of the usual include
[sourcecode lang="c"]
#import <Foundation/Foundation.h>
int main(int argc, char** argv) {
NSLog(@"Hello, world!\n\n");
}
[/sourcecode]
Now, it's a bit hairy to set the compile right, but for now, just follow this:
Compile it using our gcc tool:
[sourcecode lang="shell"]
$ gcc hello.m -I /usr/include/GNUstep -fconstant-string-class=NSConstantString -lobjc -lgnustep-base -o test.out
[/sourcecode]
If it compiles successfully, try to run it.
[sourcecode lang="shell"]
$ ./test.out
2010-06-23 18:25:06.816 test.out[4981] Hello, world!
[/sourcecode]
Hooray, now we have the development environment that runs the Cocoa Foundation framework!
A glimpse of the Objective-C langauge
Only until recently the Objective-C shows back its teeth. Now with Apple Macbooks, Macbook Pros, Mac Minis, iMacs, iPhones, iPads, iPods devices around everywhere, the Objective-C is enjoying popularity as it has never before -- to the extent that now Apple is the largest technology company in term of market cap.
The language has been with the NeXT, a company founded by Steve Jobs after leaving Apple, and the company that brought back Steve Jobs to Apple. Having its popularity at its peak, it brought about the whole tools it's been using all those time.
I have always wanted to learn this language. I remembered it's been there for very long. I saw things comp.lang.objective-c group in the Usenet. But those day when my campus' bandwidth was still very limited, and the only few NeXT workstations are out of reach, it's difficult to get access to this language and platform.
A short look at the code revealed that it is a derivative of C language that one to make sure that the message passing between objects are very clear. I heard this was an influenced by Smalltalk, which I think make senses. I often encounter a lot with people who started learning and developing C++ applications; when they talk about object's "methods", they still call them "functions". They still ask "how to call this object's function" when the correct question is "how to invoke this object's method". That's not the case when you learn the Objective-C language. "invoking a method" also called "sending message" in Object Oriented paradigm (I think it's from Message Sequence Chart, the predecessor of UML's Sequence Diagram). The Objective-C is stressing more on the latter. It must also has been influenced by Mach micro kernel design and MPI which uses message passing instead of passing a shared memory location.
The good thing about thinking in a way of "sending message" or "passing message" from one object to another is, it applies well to a fine degree of parallelism. When you are running on a lot of core (as it is now), it's good to see the objects as sending messages to each other, and not invoking methods. "sending message" across objects are safe meanwhile "invoking object's methods" must consider all the thread related stuffs.
I know that in order to become a good Cocoa (the framework for Mac OS X and iPhone apps) application developers, we'll need to learn the language well. The language is used by most of the GUI frameworks in Apple platforms. While some of the syntax is just resemble what we have in C language, the Objective-C has also departed from C language in so many ways. Some of the syntax looks very weird, especially when you are from C++ and Java background like me.
[sourcecode lang="c"]
NSString *myStr = [[NSString alloc] init];
[/sourcecode]
I don't know how weird it is for you, but this is the syntax of allocating memory for the NSString object (simply by sending "alloc" message), then sending "init" message to the newly allocated object.
Friday, June 18, 2010
Now running on Wordpress 3.0
When I was editing one of the posts, I got a notification to upgrade to Wordpress 3.0. The upgrade was seamless (at least I didn't notice any glitches).
I wish some other application will be able to do the same thing when upgrading.
Great job, Wordpress team!
Wednesday, June 16, 2010
Twitter overloaded again...
Yesterday evening I opened Twitter site after not checking it for quite some time. It was over loaded... It says "Twitter is over capacity."
Some friend says last time they notice this happens when the Dow Jones Industrial Average (DJIA) dropped for a while.The market dip. It seems that the stock market users like to tweet.
What was causing yesterday's over capacity?
World Cup match?
Monday, June 14, 2010
Mercurial Server 1.0.1 Installation on Ubuntu
And of course if you are just as lazy as I, you will use the CollabNet Subversion or Edgewall Trac.
Mercurial Server from Lshift is one way to achieve similar thing. Though it is named Mercurial Server, it is not a server in traditional client/server perspective. It leverages the SSH authentication to make it like a central repository where multiple user can access and serves the same purpose.
Surprisingly, it is very easy to install in an Ubuntu box.
[sourcecode lang="shell"]
$ sudo apt-get install mercurial-server
[/sourcecode]
Gotcha! You have it now.
With this Mercurial Server, you can access the server using:
hg clone ssh://<ssh-user>@<host-name-or-ip-address>[:<ssh-port-num>]/<folder>
[sourcecode lang="shell"]
$ hg clone ssh://mercurial@192.168.0.1/projects
[/sourcecode]
Saturday, June 12, 2010
Attending Singapore Google Technology Group Meetup
Today I attended this Singapore Google Technology User Group Meeting. It's my first time to attend such a Google meetings. Some of previous meet ups had always fallen on the wrong days -- on the day that I have something else to do. Today I am glad to be able to make it, attended the meeting, and Wesley Chun, was the speaker. He presented 2 sessions, one about Python and the other one about Google App Engine.
This guy's a hardcore Python guy, wrote the Core Python series of book, and was a presenter in the PyCon Asia Pacific 2010, Singapore -- an event that has been held last 3 days. Awesome in depth knowledge, vast industrial experiences, and keep the talk flows fluent.
The rest about the meeting can be found here: http://www.sg-gtug.org/2010/05/sg-gtug-special-tutorial-session-june.html
Monday, May 31, 2010
VirtualBox now downloadable as "Oracle VM VirtualBox 3.2"
The crowd is still waiting what will happen next with this product as Oracle has already had its own VM before the Sun Microsystems acquisition.
Wednesday, May 26, 2010
NTLM authentication is no longer supported by Spring Security 3.0.x
I am exploring the way to automatically authenticated on Windows platforms on Spring Security. The older way of doing this is by using the NTLM_FILTER which works with Spring Security 2.0.x.
I just realised that the NTLM filter is no longer supported in Spring Security 3.0.x. The preferred way to do authentication is using the Kerberos.
http://blog.springsource.com/2009/09/28/spring-security-kerberos/
I have stumbled upon this Kerberos authentication has since my freshmen year at university back in 1995. It should then be I remember when using the yellow page tools on SunOS in SPARCstation boxes; the ypbind, yppasswd, etc (renamed NIS) are Kerberos based. It's been around for years, yet I haven't had much experience in setting the configuration on the server from scratch.
Now that I have to explore this, it's time to go in depth with this Kerberos stuffs.
The Windows NT which formerly has its own authentication system, that time, began to adopting standards such as LDAP, Kerberos, etc. NTLM -- which stands for NT LAN Manager, hum, sounds very very oldies kind of stuff -- has been superseded by Kerberos based authentication. Windows 2000 started providing Kerberos authentication as an alternative. Of course since the introduction of Kerberos based system, the transition has been slow, suggesting the new user to use Kerberos by default, and only supporting NTLM when they need backward compatibility with old systems (such as Windows 98). Nevertheless there are some people is still using the NTLM on their legacy systems.
The Spring Security team has deprecated the NTLM integration and move to Kerberos based authentication (for Windows systems) instead.



