Pages

Wednesday, March 14, 2007

Subversion Without Network

My Friends and I have a small project out side of work. We meet on weekend and its been going for almost a year now.

At the beginning of our project we decided to use a repository server and decided that we'll use CVS. We struggle a lot trying to install the CVS server, but finally we have it running in a couple of weeks (yeah its not a great achievement :( )

In the middle of our project we have some misfortune. And because of that, our cvs server got shipped away (don't ask the details :P). Because its been months, since the start of our project, none of us remember the complete step to install the CVS server. Remembering the pain searching docs, etc, to install our CVS server in the first place, we decide not to install the CVS server and focused on our development.

I have reason for this, its not only because we are lazy or ignorant :P. We are waiting for the release of subclipse 1.2.0, An eclipse 3.2 (calisto) plugin for Subversion(SVN). Actually in the start of our project we already favor SVN over CVS. But the lack of stable plugin for calisto force us to use the alternative, CVS.

The story goes on and we successfully install SVN server and Subclipse.

As i mentioned earlier, we meet on weekend for this project. And do most of the work on weekdays after work. I don't own any laptop, so in the weekend i usually bring my source in an USB and manually merge the code. But since we have our SVN server setup, something gotta change.

After a couple reading of the subversion documentation, we finally find a way, so i can merge my source with the repository without have to buy a new laptop :P

Here's the complete step that work for me :
  1. First we set an eclipse workspace for me in one of my friends computer that connect to the repository.
  2. I plug my USB that contains my project from my home workspace.
  3. Using windows explorer, I search my src folder in my USB for all of .svn directory and delete it. Remember search the src folder and other folder that you need to commit like context folder in a web based project.
  4. I copy the src folder (and context to if you're working with a web based project) , from my USB to my workplace in my friends computer.
  5. I start eclipse in my friends computer
  6. Switch to my workplace
  7. Eclipse mark all of the changes i made at home.
  8. I Commit the changes to the SVN repositories.
  9. Done, clap your hands >:)
Actually at first try we try to copy all of the project source, from the USB to my workspace, but it didn't work. When we start eclipse, no files is marked changed. After reading the documentation, we find the reason. Its how subversion work.

After you initially add your files to subversion repository. Subversion create a .svn directory on your local folder, the folder is hidden. It stores a copy of the files in your current directory, and use it to determine changes you made to the files and directory.

PS : I have my own subversion server in my home, and commit the changes i made to the repository before i copy it to my USB. That's why my .svn repository don't mark that any changes has been made since last time i commit to SVN repository when i copy my project source to my workplace in my friends computer.

Thursday, December 21, 2006

QOTD : Wish

No one can resurrect the dead, Not even those who are called Gods. Thats what my father used to say.

Thats why within this limited amount of time in our lives, we have to live for the things we believe in no matter what.

- from TRC-

Wednesday, December 20, 2006

Trust

If its given to the right person, Trust can be a very powerful weapon :)

Friday, December 15, 2006

lesson no 1

I've got a lesson today.

If you compared two variable with different type, example BigDecimal with int. Then use the larger type comparator operand.

here's the code snippet

BigDecimal zeroInBigDecimal = new BigDecimal(0);

if (txtCloseLevel.getValue().intValue() < 0) {
JOptionPane.showMessageDialog(this, "Close Level Must Be Greater Or Equal Zero",
"Error", JOptionPane.ERROR_MESSAGE);
return false;
}
the getValue method returned a BigDecimal instant, so the comparation should be
if (txtCloseLevel.getValue().compareTo(zeroInBigDecimal) < 0) {

why?
Because i expect the intValue() method to return maximum integer value when the txtCloseLevel.getValue() return a value bigger than the maximum integer value. But instead it return a negative integer number. A lesson to be learned :P

Negara Palsu

Sebetulnya ini pembicaraan makan siang antara gw dan tiga orang temen gw beberapa waktu lalu.

Seperti biasa disaat makan siang bersama kawan-kawan arah obrolan selalu tidak jelas. Dan ditengah-tengah pembicaraan gw memunculkan sebuah pertanyaan kepada mereka.

"Sebutkan satu kesamaan diantara seluruh orang indonesia"

Salah seorang menjawab, "Kita semua pernah dijajah belan.... da".

Yup, ditengah-tengah kalimat dia sadar ada daerah-daerah seperti aceh yang tidak pernah dijajah belanda, atau timor-timor yang dijajah portugis.

Orang yang lain menjawab, "Kita semua ras melayu, kalo timor-timor dan irian jaya gak dihitung".

Gw hanya tersenyum, menanti tanggapan orang terakhir.

Setelah beberapa lama menunggu akhirnya dia mengeluarkan komentar. "Tadinya gw mau jawab asal-muasal. Tetapi kalo dilihat dari asal-muasal orang irian dan timor-timor sepertinya gak mungkin sama. Jangankan hal itu di sumatra aja antara orang padang dan orang medan mengaku memiliki leluhur yang berbeda".

Kita semua terdiam untuk sejenak, akhirnya gw memecah kesunyian.

"Gak ada yang bisa jawab? Sebetulnya ada satu kesamaan yang dimiliki oleh semua orang indonesia, Bahasa Indonesia".

Yup, betul. Hanya hal itu saja yang menyatukan negara kita ini. Kita tidak punya latar belakang sejarah yang sama. Ada beribu kultur yang berbeda di indonesia. Bahkan keadaan alamnya pun tidak homogen. Dengan tidak adanya landasan dimasa lampau yang dimiliki bangsa ini, wajar saja kalau kita tampaknya begitu mudah dipecah-belah, karena memang sudah jelas, kita berbeda-beda. Dan perbedaan ini bukan seperti negara kita ini terbagi mejadi dua atau tiga bagian saja. Tapi bisa berpuluh-puluh atau beratus-ratus bagian.

Kalau begitu bagaimana mungkin wilayah-wilayah yang tidak memiliki persamaan ini bisa bersatu? Seperti keajaiban saja selama ini kita bisa tetap menjadi negara yang utuh. Dan disitulah jawaban peran dari jawaban gw.

Kalau kita melihat ke masa lampau, bahasa indonesia tidak akan terlepas dari sumpah pemuda. Sebuah tonggak sejarah, dimana bahasa indonesia diakui sebagai bahasa persatuan. Dan kalau kita melihat lebih jauh lagi sejarah tentang bahasa indonesia, kita mungkin akan terkejut akan perannya bagi bangsa indonesia. Bahasa indonesia dikonsepkan oleh oleh bung karno, bung hatta dan beberapa rekan lainnya. Dalam pembuatan konsepnya bahasa indonesia memang telah dibuat sesederhana mungkin untuk dapat dipelajari dengan cepat dan memiliki kata-kata serapan dari seluruh bahasa di indonesia. Itu semua dibuat dengan tujuan agar bahasa indonesia mendapat tempat di seluruh wilayah indonesia.

Thats right, bahasa indonesia semenjak awal memang sudah didesain untuk menjadi alat pemersatu negara kita yang tidak memiliki kesamaan ini. Thats the power of our founding father. Tanpa itu, tidak akan ada negara indonesia.

Negara Palsu

Atas dasar itulah gw menyebut negara kita ini negara kita itu negara palsu. Kita tidak berdiri karena kita memiliki suatu kesamaan yang memang secara mendasar dimiliki oleh segenap bangsa ini. Tapi kita memiliki kesamaan karena kita diberikan kesamaan, dibuat untuk memiliki kesamaan. Dan mungkin itulah alasan paling mendasar kenapa kita begitu mudah terpecah-belah.

Kalo melihat kenyataan itu sepertinya masa depan negara kita kelam banget :(, but thats not my point.

Point gw adalah, kita harus melihat kekuatan yang dimiliki oleh founding fathers kita. Berbagai instrumen telah dipersiapkan untuk menjaga kedaulatan negara ini. Pancasila yang benar-benar unik, bukan forking dari ideologi bangsa lain. Slogan bhineka tunggal ika yang sudah menekan kan kita perbedaan kita bukan permasalahan. Mungkin karena terlalu lama kita di indoktrinasi, kita malah menjadi alergi terhadap hal-hal ini. Guess what, karena kita terlalu berusaha menyerap ideologi-ideologi negara lain, tanpa menyadari negara kita ini begitu unik, bangsa kita mengalami krisis identitas. Kita menjadi bangsa yang amerika wannabe, atau arab wannabe. Jangan karena ada pihak yang melakukan misuse terhadap instrumen-instrumen itu. Kita menjadi benci terhadap dasar-dasar yang melandasi negara ini.

Dan sudah saatnya kita sadar kalau kita adalah negara yang unik. Untuk dapat ikut maju di jaman moderen ini, kita tidak bisa hanya mencontoh. Kita juga harus bisa melaluinya dengan cara kita sendiri. Karena kita memang berbeda, tetapi satu.

Thursday, December 14, 2006

Intermezzo

Argh... gw kehilangan mood menulis gw :(

Awal weekend ini kan gw liburan, hanya dua hari sih :P Tapi akibatnya, ketika hari rabu masuk kantor, setumpuk kerjaan sudah menanti. Gak punya kesempatan menyelesaikan draft tulisan yang gw buat :( akhirnya moodnya perlahan-lahan menipis *hiks*. Mudah-mudahan nanti setelah punya waktu luang gw bisa menyelesaikan draft-draft tersebut.

Seperti biasa, liburan berarti bermalas-malasan di rumah:P Menikmati hari disaat gak harus bangun pagi untuk berangkat kerja. That means watching movies, playing games, and watching re-run of friends if you're bored :D (gak bosen-bosen gw:D)

Gw gak tahu kenapa, kalo gw ngeliat Ross dan Rachel in their typical situation (if you know what i mean :D) mood gw gampang banget berubah jadi mellow :(

Ngeliat temen-temen mereka selalu bilang, "it's you guys", atau "It's Ross and Rachel you know", gw gak pernah mengerti kenapa bisa ada pasangan yang seperti itu. Yang bisa membuat teman-temannya mau melakukan apa saja untuk menyatukan mereka berdua. Membuat teman-temannya begitu bahagia dengan hanya melihat mereka bersama. So pure and unselfish, then again maybe thats what a real friends is :D

Hm.. atau mungkin juga karena mereka itu Ross and Rachel; gitu loh :D

Well enough for today, gotta find time to finish up that draft :D

Thursday, December 7, 2006

Spam Bot

I'm a big fan of tapestry. If you don't know what tapestry is, its a wonderful Java Web Framework. While the learning curve is very steep, but it is very reusable. That's what captured my interest, and soon, it'll be easy enough to learn :D
You can check the official Tapestry site at http://tapestry.apache.org

Well, i was browsing Tassel (Tapestry Searchable Selection of Components), a place where people submit their tapestry component that they think will be useful for others. Wondering around, reading description of each component, thinking about how can this component maybe useful for me, when i stumble on this one.

Name : EncodedMailLink
Description : Component that encodes email addresses into javascript so as to attempt to avoid detection by spambots.
Damn it! So that how it is!

I keep wondering why i keep getting email spam on my inbox. Once i created new email account, and left it for one day without telling anyone about it. The next time i log in, my inbox already fill with spam and junk mail.

Its not only happened to me. Almost every one i assumed experience it. Some people even accused yahoo, hotmail and other provider of selling their user list to the spammers. Well actually it doesn't have to be that way.

As you know online search engine like yahoo, google, etc. Used a software application that they called crawler or meta-bot, to crawl through the internet page by page. For each page they try to find a relevant information of how this page will be index. For example a page about planting flower maybe indexed by flower, planting, or gardening. So this page will be added to the crawler database by the relevant information. So when next time a user type "flower" in the search category of the search engine. This page will be showed as one of the page that has relevant information about flower.

And with the fast pacing growth of online search engine. Finding a crawler application is simple enough as inserting "internet crawler" in google. You will be given a list of option, from free to propietary appliaction.

So as the spammer, all you have have to do is get a crawler, create a sub crawler for specific criteria - Crawler that only index email address they found. And abracadabra the spammer database will fill with email address ready to be spam.

Damn it how can you fight this? No matter how you try to protect your email address. One day there will be a page that will show your email address. Damn, they out smart us again!

Update: Already found one

HS-Crawler
Description :
Email marketing is the ideal way to promote your business. HS-Crawler is a software designed to extract email addresses from web sites, search engines and Newsgroups.