Oleh: kod34fr33 | 26/Februari/2009

jquery organization chart builder

download script here

use this script to convert unordered list (ul) of organization tree to simple chart

from:

ul1

to :

chart1

feel free to use/modify/distribute/ask/… :)

Oleh: kod34fr33 | 16/September/2008

sync apache vhost servername with /etc/hosts

The problem: i usually set up a local apache virtual host to build and test many of my work (i am web developer). but everytime i set/unset local vhost i have to update file /etc/hosts too in order to bind local domain name to localhost.

solution: create script to grab all enabled site from enabled apache virtual host and update /etc/hosts automatically.

Disclaimer: i do these step on ubuntu hardy heron distro, if you work on another distro, just adjust these step to fulfill your need

step 1 [create the script] :

#!/bin/bash

#get default
b='127.0.0.1 localhost';

#get all servername from apache2 vhost
for file in /etc/apache2/sites-enabled/*
do
   a=`grep Servername "$file" | sed 's/^\W*Servername\W*/'"$a "'/'`;
done

#override /etc/hosts
sed 's/^'"$b"'.*$/'"$b$a"'/' < /etc/hosts > /etc/new-hosts
mv /etc/new-hosts /etc/hosts

i give that script ‘sync-vhost.sh‘ and save it at /etc/init.d/ folder.

and don’t forget to run chmod ugo+x /etc/init.d/sync-vhost.sh

step 2 [modify apache start/restart/stop script] :

Note: this step would modify /etc/init.d/apache2 script which is a system script that will be called everytime boot up/shutdown and if you start/restart/stop/ apache2 web server. if you not brave enough just skip it. but if you brave enough to do it, just backup /etc/init.d/apache2 file before you modify it :p

modify /etc/init.d/apache2 file in order to automatically sync everytime apache web server start/restart

here’s the patch file content

118a119,122
> sync_vhost() {
>    /etc/init.d/sync-vhost.sh
> }
>
127a132
> 			sync_vhost
155a161
> 			sync_vhost
177a184
> 			sync_vhost

just save that patch and do patch /etc/init.d/apache2 <patchFileName> (remember, i use ubuntu hardy)

step 3 [do sync] :
if you skip step no 2, just run /etc/init.d/sync-vhost.sh
if you do step no 2, you might run /etc/init.d/sync-vhost.sh directly, or run /etc/init.d/apache2 restart

Oleh: kod34fr33 | 6/Mei/2008

instalasi default

perhatian:
ini hanya halaman pengingat diri sendiri biar waktu upgrade gak lupa *mulai pikun nih.

Partisi default :

Partisi Size Catatan
/ 9 GB (18%) terakhir kepake 4.5 GB
/home 31 GB (63%) terakhir kepake 23 GB
/var 9 GB (18%) terakhir kepake 3 GB

alesan :
- var agak gede buwat cache apt ;)
- home dipisah biar waktu upgrade gak perlu bakup
- home dibuat gede untuk nampung data tambahan

apt-get remove vi vim
apt-get install php5 php5-cli php5-mysql php5-pgsql apache2 mysql-server-5.0 mysql-client -5.0 liferea vim-full postgresql postgresql-client mplayer w32codecs rar unrar sun-java6-bin sun-java6-jdk sun-java6-jre

BAKUP SOP
-bakup /etc/apache
-bakup /etc/php
-bakup /etc/mysql
-bakup /etc/postgresql
-bakup /etc/bash.bashrc
-bakup /etc/vim/
-scan /var sapa tau pernah nyimpen file disitu :p

Oleh: kod34fr33 | 6/Mei/2008

Adjacency list tree on Mysql

Modelling hierarchy data in relational database is hard.

Adjacency list is one of few method to modelling this data to SQL.
if you do not know about adjacency list, or you want to know other method than adjacency list, you might wanto to read Joe Celko’s Trees and Hierarchies in SQL for Smarties

Adjacency list is known with its “easy to insert but hard to retrieve”.

In this post, i want to share my solution on hierarchy data in MySQL with Adjacency list method, in order to have these method work, you need MySQL with TRIGGER support (i use 5.0.45 version).

Lets take a look on dummy data:

Director
|-- Secretary
|
|-- Treasury Mgr
|    |-- Employee 1
|    |-- Employee 2
|
|-- Sales Mgr
     |-- Region 1 Mgr
     |    |-- Employee 3
     |    |-- Employee 4
     |    |-- Employee 5
     |
     |-- Region 2 Mgr
          |-- Subregion A Mgr
          |    |-- Employee 6
          |    |-- Employee 7
          |-- Subregion B Mgr
               |-- Employee 8
               |-- Employee 9

Now, create table

mysql> CREATE TABLE `employee` (
  > `emp_id` INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
  > `emp_parent_id` INT NULL,
  > `name` VARCHAR(200) NOT NULL,
  > FOREIGN KEY(`emp_parent_id`) REFERENCES `employee`(`emp_id`)
  > ) ENGINE=INNODB DEFAULT CHARSET=UTF8;

Then, to make life easier when retrieving data we need additional table (helper table) : a path table

mysql> CREATE TABLE `employee_path`(
  > `emp_id` INT PRIMARY KEY NOT NULL,
  > `path` TEXT,
  > FOREIGN KEY(`emp_id`) REFERENCES `employee`(`emp_id`)
  > ) ENGINE=INNODB DEFAULT CHARSET=UTF8;

after that, we need trigger to automate path builder everytime employee record inserted or updated.

mysql> DELIMITER //
mysql> CREATE TRIGGER `makeEmpTree` AFTER INSERT ON `site`
  > FOR EACH ROW BEGIN
  >  DECLARE `parent_path TEXT DEFAULT '';
  >  SELECT `path` INTO `parent_path` FROM `employee_path` WHERE `emp_id` = NEW.`emp_parent_id`; --updated on 2008-06-03 thx to /dev/null
  >  INSERT INTO `employee_path` VALUES(
  >    NEW.`emp_id`,
  >    CONCAT(IF(LENGTH(`parent_path`) < 2, '/', `parent_path`), NEW.`emp_id`, '/')
  >  );
  > END;
  > //
mysql> CREATE TRIGGER `updateEmpTree` BEFORE UPDATE ON `site`
  > FOR EACH ROW BEGIN
  >  DECLARE `old_path` TEXT DEFAULT '';
  >  DECLARE `new_path` TEXT DEFAULT '';
  >  SELECT `path` INTO `old_path` FROM `employee_path` WHERE `emp_id` = NEW.`emp_id`;
  >  SELECT `path` INTO `new_path` FROM `employee_path` WHERE `emp_id` = NEW.`emp_parent_id`;
  >  UPDATE `employee_path` SET `path` =
  >    REPLACE(`path`, `old_path`,
  >      CONCAT(IF(LENGTH(`new_path`) < 2, '/', `new_path`), NEW.`emp_id`, '/') )
  >    WHERE LEFT(`path`, LENGTH(`old_path`)) = `old_path`;
  > END;
  > //
mysql> DELIMITER ;

done!

lets take hands on data:

1st – INSERTING DATA

mysql> INSERT INTO `employee` VALUES
  > (DEFAULT, NULL, 'Director'), (DEFAULT, 1, 'Secretary'),
  > (DEFAULT, 1, 'Treasury Mgr'), (DEFAULT, 3, 'Employee 1'),
  > (DEFAULT, 3, 'Employee 2'), (DEFAULT, 1, 'Sales Mgr'),
  > (DEFAULT, 6, 'Region 1 Mgr'), (DEFAULT, 7, 'Employee 3'),
  > (DEFAULT, 7, 'Employee 4'), (DEFAULT, 7, 'Employee 5'),
  > (DEFAULT, 6, 'Region 2 Mgr'), (DEFAULT, 11, 'Subregion A Mgr'),
  > (DEFAULT, 12, 'Employee 6'), (DEFAULT, 12, 'Employee 7'),
  > (DEFAULT, 11, 'Subregion B Mgr'), (DEFAULT, 15, 'Employee 8'),
  > (DEFAULT, 15, 'Employee 9');

should be returning output such as

Query OK, 17 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

now, check on path table, it should have content like below:

mysql> SELECT * FROM `employee_path`;
+--------+----------------+
| emp_id | path           |
+--------+----------------+
|      1 | /1/            |
|      2 | /1/2/          |
|      3 | /1/3/          |
|      4 | /1/3/4/        |
|      5 | /1/3/5/        |
|      6 | /1/6/          |
|      7 | /1/6/7/        |
|      8 | /1/6/7/8/      |
|      9 | /1/6/7/9/      |
|     10 | /1/6/7/10/     |
|     11 | /1/6/11/       |
|     12 | /1/6/11/12/    |
|     13 | /1/6/11/12/13/ |
|     14 | /1/6/11/12/14/ |
|     15 | /1/6/11/15/    |
|     16 | /1/6/11/15/16/ |
|     17 | /1/6/11/15/17/ |
+--------+----------------+
17 rows in set (0.00 sec)

2nd – BASIC SELECT QUERY
Get all root nodes
Useful when hierarchy has multiple roots. (This sample has only 1 root)

mysql> SELECT * FROM `employee` WHERE `emp_parent_id` IS NULL;

Get Sibling node
sample query: get sibling of Treasury Manager (id = 3)

mysql> SELECT e.* FROM `employee` e, `employee` e2
  > WHERE
  >   e.`emp_parent_id` = e2.`emp_parent_id` AND
  >   e2.`emp_id` = 3 AND
  >   e.`emp_id` <> e2.`emp_id`;

Get Full Tree Nodes From Known Root Node
sample query:get full tree nodes where root is director (emp_id = 1)
Just replace number ‘1′ on ‘/1/%’ with another root id if table has multiple root node

mysql> SELECT `emp_id`, `path`
  > FROM `employee_path`
  > WHERE `path` LIKE('/1/%')
  > ORDER BY `path` ASC;

Get Branch Nodes
sample query: get branch nodes of Sales Mgr (id = 6)
Actually, query below is generalization of query above ;)

mysql> SELECT
  >  e.`emp_id` AS 'Most Root Node Id',
  >  e2.`emp_id,
  >  e2.`name`
  >  p.`path`
  > FROM
  >  `employee` e, `employee` e2,
  >  `employee_path` p, `employee_path` p2
  > WHERE
  >  e.emp_id = 6 AND
  >  p2.`emp_id` = e.`emp_id AND
  >  p.`path` LIKE(CONCAT(p2.`path`,'%')) AND
  >  e2.`emp_id = p.`emp_id`
  > ORDER BY p.`path` ASC;

Note:
- This query is not optimized!
- This query is generic query, so you could have fun with it.
e.g. : replace ‘e.emp_id = 6′ with :
+ ‘e.`emp_id` = 1′ and you have same result with query “get full tree from known root node
+ ‘e.`emp_parent_id` IS NULL’ and you have all tree grouped by each root node

get hierarchy style
To have hierarchy style we could use query below:

mysql> SELECT
  >  e.`emp_id`,
  >  CONCAT(
  >    REPEAT('  ',
  >      (LENGTH(p.`path`) - LENGTH(REPLACE(p.`path`,'/','')),
  >      e.`name`
  >    ) AS tree
  > FROM `employee` e
  > LEFT JOIN `employee_path` p ON e.`emp_id` = p.`emp_id`
  > ORDER BY p.`path ASC;

+--------+---------------------------+
| emp_id | tree                      |
+--------+---------------------------+
|      1 |     Director              |
|      2 |       Secretary           |
|      3 |       Treasury Mgr        |
|      4 |         Employee 1        |
|      5 |         Employee 2        |
|      6 |       Sales Mgr           |
|     11 |         Region 2 Mgr      |
|     12 |           Subregion A Mgr |
|     13 |             Employee 6    |
|     14 |             Employee 7    |
|     15 |           Subregion B Mgr |
|     16 |             Employee 8    |
|     17 |             Employee 9    |
|      7 |         Region 1 Mgr      |
|     10 |           Employee 5      |
|      8 |           Employee 3      |
|      9 |           Employee 4      |
+--------+---------------------------+

17 rows in set (0.00 sec)

3rd. Manipulating Node
To know whether those query below success or not, you could check yourself by comparing the result from “hierarchy style query” before and after execute each query below.
Move leaf node to another node
Sample query: move employee 3 to treasury Mgr

mysql> UPDATE `employee` SET `emp_parent_id` = 3 WHERE `emp_id` = 8;

Move leaf node to become root node
Sample query: make Region 2 Mgr become a root node (actually, IMO, this action should not happen in the context of employee ;p )

mysql> UPDATE `employee` SET `emp_parent_id` = NULL WHERE `emp_id` = 11;

Move branch node to another branch
Sample query: move Subregion A Mgr to Sales Mgr

mysql> UPDATE `employee` SET `emp_parent_id` = 6 WHERE `emp_id` = 12;

4th. Note

Testing can only prove the presence of bugs, not their absence.
–Edsger W. Dijkstra

This appoarch, of course, have a limitation.
Limitation, or bug, i know was (please share, if you found another limitation/bug) :

  • There is no checking when moving a node to its decendant. (I’m still thinking about check whether the new parent node is its decendant or not in before update trigger)
  • This approach does not cover node weight yet.(if you have no idea about weight, take a look at “hierarchy style” query result and compare it with sample hierarchy on the top. and ask to yourself, why Region 1 Mgr on the result become below Region 2 Mgr? ;p)

PS: I found postgresql developer wrote about another different approach of adjacency list in his blog. you might want to read about it.

Oleh: kod34fr33 | 28/Agustus/2007

Akhirnya…

setelah 6 bulan lebih bertualang melamar ke sana sini.. walaupun ada kebimbangan bagaimana nanti di tempat baru.. akhirnya, saya pindah!

sebenarnya sudah sebulan lebih sih pindah kerjanya :) berhubung baru ada waktu luang baru bisa posting deh. :p

Oleh: kod34fr33 | 3/Juli/2007

CakePHP lightweight template helper

I dont like template engine that:

  • you could use php code on the template
  • use neo/strange tag/language

so i made this helper. as the name, this is lightweight template engine, so this helper only do a templating. :) and the template file content only html. really.

well, i still have problem with snippet, so you could download the code here (dont forget to change file extension with .php and save it on app/views/helpers folder).

for sample of usage, i would show you how to build multiply table (no database used of course :p ).

url used : /test/multiply

controller content: filepath : app/controller/test_controller.php ( ups.. i’m forget to declare helpers :p )

class TestController extends AppController {
   var $name = "Test";
   var $uses = array(); //no db used. remember?
   var $helpers = array("template","html"); //updated 06/07/2007
   function multiply() {
   }
}
?>

before we continue to view and template file, first, we must set configure the template helper in order to to work properly. below are configuration needed:
a. template folder : this is similar to app/view folder; the path where all template file is under.
b. file extension : template file extension (like thtml for view)
c. block splitter sign : pattern to split template into blocks.
d. block name : pattern to determine block name (preg_match compat)

well, now i used the default configuration:
a. template folder : /app/templates
b. file extension : tmpl
c. block splitter sign : <!–blockSplitter–>
d. block name : <!–name=(.*)–>

if you want change this configuration, change it on templatehelper class.

OK, now let’s start build view and template file.

view content : filepath : /app/views/test/multiply.thtml

$template->startup($this->controller->viewPath,$this->controller->action);
$template->add("header"); //add header block to output$template->add("tableOpen"); //add tableOpen block to output
$b = 3;
for($a=1;$a<11;$a++) {
  $c = $a * $b;
  $template->add("tableRow",array("a"=>$a,"b"=>$b,"c"=>$c);
}
$template->add("tableClose");
$template->display();
?>

and finally, the template file…

template content : (file path: /app/templates/test/multiply.tmpl)

<!--blockSplitter-->
<!--name=header-->
<div align="center">Multiplier table with template</div>
<!--blockSplitter-->
<!--name=tableOpen-->
<table>
<!--blockSplitter-->
<!--name=tableRow-->
<tr>
<td>__a__ x __b__</td>
<td>__c__</td>
</tr>
<!--blockSplitter-->
<!--name=tableClose-->
</table>

Thats all folk. any question?

Update
recently i found template engine that work similar: Pattemplate.
i haven’t try this, but it looks promises.

Oleh: kod34fr33 | 6/Juni/2007

cakePHP bagian 1

hanya sebagai pengantar. Selengkapnya dapat dilihat langsung di manualnya.

I. struktur folder

/root
  /cake
  /app
    /config
    /controllers
    /views
    /models
    /webroot

penjelasan:
[1] cake/ berisi core library2 cakePHP framework.
[2] app sebagai folder root untuk menampung berbagai objek spesifik aplikasi web kita
[3] app/config berisi configurasi umum untuk cake php. diantaranya: core.php dan database.php
[4] app/controllers berisi file php yang spesifik memproses business logic aplikasi kita
[5] app/views berisi file php-html untuk antar muka (tampilan) aplikasi web dengan user
[6] app/models berisi file php yang spesifik memproses segala sesuatu dengan tabel database
[7] app/webroot berisi objek-objek html yang dapat diakses oleh publik (image, css, javascript).

tips:
[1] Folder cake/ dapat dishare antar aplikasi. jadi jika kita memiliki dua aplikasi web berbasis cakePHP, anda cukup memisahkan folder /cake ke folder lain yang umum dan mensharenya di aplikasi2 web, dengan cara mensetnya di file app/webroot/index.p (see manual for detail)
[2] Dalam manual disebutkan, untuk produksi lebih baik, folder cake/ app/ dan webroot/ dipisahkan untuk keperluan keamanan. (cake/ dipisahkan bila nantinya ada aplikasi lain yang berbasis cakePHP dapat dishare. app/ dipisahkan agar user tidak dapat mengakses langsung. webroot/ = htdocs)

II Naming convention
penamaan file dan class sangat penting di cakePHP. karena menurut saya, penamaan file/class ini yang membuat keajaiban di cakePHP terjadi.
Akan tetapi penamaan file/class ini, dapat memusingkan anda, apalagi jika anda tidak menguasai native english, karena penamaan file/class di cakePHP mengharuskan adanya plural (jamak) dan singular dan hanya tersedia untuk bahasa inggris.
[1] Model :
(a) penamaan file : disimpan di folder app/models/, singular (bukan jamak), antar kata disambung dengan garis bawah, ekstensi file: .php
contoh: Product.php; menu_item.php
(b) nama kelas : singular (bukan jamak), camel cased (huruf besar di setiap awal kata), harus extends AppModel class
contoh: class Product extends AppModel ; class MenuItem extends AppModel
(c) nama kelas = nama tabel. akan tetapi nama tabel harus dalam bentuk plural (jamak).
contoh: class Product = products table ; class MenuItem = menu_items table

[2] Controller :
(a) penamaan file : disimpan di dalam folder app/controller/, plural (jamak), antar kata disambung dengan garis bawah, file diakhiri dengan _controller.php
contoh: products_controller.php ; menu_items_controller.php
(b) penamaan class : plural (jamak), camel cased (huruf besar di setiap awal kata), diakhiri dengan Controller, harus extends AppController
contoh: class ProductController extends AppController ; class MenuItemsController extends AppController

[3] Views.
berhubung views bukan dalam bentuk class, maka yang pasti masalah hanya ada di penamaan file : disimpan di folder app/views/<nama controller>/, harus sama dengan action,huruf kecil semua, berakhiran .thtml

[4] Struktur URL : http://domain/controller/action/param/param/…

[5] database : setiap tabel diharapkan mempunyai field bernama ‘id’ yang bertipe integer auto increment, bila tabel berelasi dengan tabel lain, maka harus mempunyai field bernama ‘_id’
contoh: tabel ‘mothers’ dan tabel ‘children’ sesuai konvensi, sebagai berikut:
mothers dan children masing mempunyai field ‘id’
bila berelasi setiap child mempunyai mother, maka di tabel children harus mempunyai ‘mother_id’

langsung pake contoh aja biar tidak terlalu bingung.
sebagai contoh: http://www.cakephpapp.com/users/list

jadi untuk mengakses url tersebut, normalnya, yang dibutuhkan adalah sebagai berikut :
(a) database :
users table
(b) file inti :
app/models/user.php (yang didalamnya berisi class User extends AppModel)
app/controller/users_controller.php (yang didalamnya berisi class UsersController extends AppController dan class tersebut mempunyai function list() )
app/views/users/list.thtml

sekian dulu.. besok dilanjutkan detil di model, controller dan views.

catatan: ada satu hal penting mengenai cakePHP selain naming convention, tapi saya bingung bagaimana menjelaskannya. yaitu : di cakePHP, semua di override. ini sebabnya mengapa cake core library (folder cake/) bisa di share antar aplikasi, dsb dsb.. bila anda bingung tidak masalah, bila anda membuat aplikasi web anda akan mengerti.

Oleh: kod34fr33 | 6/Juni/2007

CakePHP XMLRPC Client component

this is my cakephp XMLRPC client component that i used on my last project.
*I still have trouble with code snippet with wordpress. then i cant exposed here. just download from link above*
original file name : xml_client.php

usage:
1. set host, port and param with these method:
[a] Set it on class variable initiation

     var $host = "SET HOST HERE";
     var $port = "SET PORT HERE;
     var $path = "SET PATH HERE";

[b] Set it with setter method from controller:

     $this-XmlClient->set_host("SET HOST HERE");
     $this->XmlClient->set_port("SET PORT HERE");
     $this->XmlClient->set_path("SET PATH HERE");

2. do xmlrpc client

     $response = $this->XmlClient->do_call("function method",array(parameter,parameter,...));

note:
[1] $response from do_call function is in array form (not xml form). if you want the raw response (which http header still available), you can get from

$rawresponse = $this->XmlClient->rawResponse

.

[2] To detect wether response was fault response, you can check with

$this->XmlClient->is_fault_response();

and, you can fetch fault string (“FAULT STRING BLA BLA BLA (err code: FAULT CODE)”) with this method

 $fault_string = $this->XmlClient->get_fault_string();

[3] this component only works for http 1/1 protocol.
[4] this component need php’s xmlrpc extensions (–with-xmlrpc)

thats all.
any comment?

Oleh: kod34fr33 | 27/April/2007

Kembali ke… java (1)

Mumpung lagi testing aplikasi java (dan walhasil harus belajar java), jadi sekarang posting mengenai java dulu aah…

Pertama-tama kita mulai dengan membuat program standar belajar pemrograman: Hello World!

disini program ditulis dalam 3 varian.

  1. Varian 1: program dibuat dalam mode minimalis alias yang penting bisa dieksekusi. itu saja
  2. Varian 2: varian 1 ditambah dengan menggunakan package
  3. Varian 3: varian 2 ditambah dengan membuat file jar (java archive) yang biasanya untuk distribusi

*catatan: (1) Untuk belajar java lebih dalem bisa baca buku thinking in java-nya bruce eckel (unduh disini) atau lihat tutorial resmi dari sun (2) java is CaSE SenSItIve. (3) Saya pakai linux, jadi shell dan struktur direktoriditulis dalam flavour linux

Varian I
code (filename: WelcomeBack.java) :

public class WelcomeBack {
     public static void main(String args[]) {
          System.out.println("Welcome Back to JAVA!");
     }
}

Kompilasi:
$javac WelcomeBack.java

Eksekusi:
$java WelcomeBack

Summary:

  • nama file harus sama dengan nama class atau proses kompilasi tidak akan berhasil
  • untuk eksekusi, class yang dieksekusi harus mempunyai metode public static void main()

Varian II
- Directory/folder structure: workspace/id/or/newbie/simpleApp/
- ketiga langkah di bawah dijalankan dari direktori workspace

code (filename: id/or/newbie/simpleApp/WelcomeBack.java) :

package id.or.newbie.simpleApp;
public class WelcomeBack {
     public static void main(String args[]) {
          System.out.println("Welcome Back to JAVA!");
     }
}

Kompilasi:
$javac id/or/newbie/simpleApp/WelcomeBack.java

Eksekusi:
$java id.or.newbie.simpleApp.WelcomeBack

Summary:

    • package = direktori
    • package strukturnya seperti URL (halaman web) yang terbalik

    Varian III

    idem dengan varian II sampai step kompilasi.

    Create jar file:
    $jar welcomeBack.jar

    Eksekusi:
    $java -classpath WelcomeBack.jar id.or.newbie.simpleApp.WelcomeBack

    anda tidak bisa mengeksekusi seperti ini:
    $ java -jar WelcomeBack.jar

    karena dalam manifest file tidak terdapat Main-Class attribute. Untuk membuat file jar kita menjadi dapat dieksekusi perlu diupdate file manifestnya seperti di bawah ini:

    Bikin sembarang file (mis: manifest.txt) dengan isi:
    Main-Class: id.or.newbie.simpleApp.WelcomeBack

    Update jar file:
    $jar umf manifest.txt WelcomeBack.jar

    baru bisa dieksekusi dengan cara ini:
    $java -jar WelcomeBack.jar

    Summary:

    • lebih lanjut mengenai jar bisa dilihat disini
    Oleh: kod34fr33 | 25/April/2007

    Semoga saya bisa mengambil hikmahnya

    Beberapa bulan terakhir ini saya sedang dirundung gundah. tidur tak nyaman, badan menjadi pegal2, sering sakit kepala, hingga puncaknya seminggu kemarin saat saya periksa ke klinik, ternyata tekanan darah saya naik menjadi 90/140.

    Setelah merenung sekian lama, akhirnya saya simpulkan sepertinya saya sedang kehilangan orientasi… :(

    Sekitar tahun 2003 dulu saya membuat resolusi hidup untuk jangka waktu sampai tahun 2010 nanti. poin2 tersebut adalah:

    1. Lulus kuliah secepatnya
    2. Bekerja secepatnya;dimana 2005-2006 bekerja dengan target menambah pengalaman, dan 2007 sudah settle (mapan) untuk persiapan menikah
    3. Menikah di tahun 2007 atau selambat-lambatnya 2008

    untuk nomor 1 saya berhasil menjalaninya, dengan lulus di tahun 2004. begitu pula untuk poin 3, bahkan untuk poin 3 ini saya mempercepatnya dengan menikah di tahun 2005. Ganjalan ada di poin 2, dimana hingga saat ini saya belum mapan di perusahaan yang bagi saya bisa menaungi kesejahteraan saya dan keluarga.

    Mungkin bila saya belum berkeluarga, belum ada tanggungan, saya tidak terlalu ambil pusing. Akan tetapi dengan kondisi istri tidak bekerja, anak sebentar lagi harus mulai mencoba bubur dan susu formula (tau sendiri berapa kisaran harga susu formula balita sekarang ini) membuat saya jadi berpikir tiga kali.

    Hari gini berpikir settle di perusahaan tertentu?? hmm… hal ini sempat terpikir oleh saya. Dengan kondisi ekonomi bangsa yang seperti ini, memang kita harus siap dengan segala apapun yang akan terjadi. “Tidak usah mengharapkan kemapanan, diterima kerja saja sudah beruntung.” begitu kata seorang teman.

    Sekarang saya bekerja di sebuah software house (masih skala UKM kalau saya bilang), dengan total karyawan < 10 orang. Saya ditempatkan di klien, sebuah BUMN, sebagai on site support. Tugas saya me-maintain tiga sistem buatan perusahaan saya, baik jika ada error atau sekedar maintenance biasa.

    Akhir 2006 saya ditawari klien untuk masuk menjadi karyawannya lewat jalur khusus, yang saya putuskan untuk menolak, dan menunggu jalur normal untuk mencoba peruntungan saya. Setelah tes psikologi dan wawancara dengan konsultan SDM mereka, ternyata tidak ada karyawan yang diterima (kabar yang beredar, konsultannya kurang canggih, yang diminta kriteria A, yang diloloskan kriteria B)

    BulanĀ  kemarin saya diberitahu (dan diminta untuk mencoba lagi) bahwa klien perusahaan saya ini membuka lowongan lagi. Setelah berpikir seminggu lamanya saya putuskan untuk tidak mengirimkan lamaran lagi. bukan menolak rezeki, tapi semata-mata karena saya kurang suka dengan lingkungan kerjanya. tidak kondusif.

    HHHHhhhh….. pikiran masih pusing, nulisnya jadi nggak fokus, ngalor ngidul.. . Sudahlah, yang pasti kita hidup hanya menjemput rezeki kita yang sudah ditakdirkan sebelum kita dilahirkan ke dunia ini… (sebetulnya statement ini bagi saya 1/2 salah dan 1/2 benar. 1/2 salah karena urusan rezeki masih bisa berubah asalkan kita mau berusaha. 1/2 benar karena Allah Maha Tahu, jadi sebelum kita lahir segala urusan sampai kita mati pun pasti Allah sudah mengetahuinya; hanya karena keterbatasan akal kita kita tidak bisa memahami bagaimana)

    Tulisan Sebelumnya »

    Kategori