Obfuscator

13 08 2009
Obfuscate berasal dari transitive verb yang berarti darken, to make obscure atau confuse. Dalam terminasi software engineering, obfuscation adalah “the deliberate act of nondestructively changing either the source code of a computer program or machine code when the program is in some compiled or binary form, so that it is not easy to understand or read.” Code obfuscation merupakan proses untuk melakukan obcuring pada java class agar sulit untuk di decompile menjadi source kembali (reverse engineer).

Karena sebuah mobile aplication akan di porting dan di delivery pada berbagai jenis dan jumlah handset, dapat disimpulkan manfaat utama dari obfuscation antara lain pada aspek application size, to improve performance, footprint reduction, dan protection for intellectual property / security. obfuscation pada dasarnya melakukan penamaan ulang untuk class, methode dan variable, dll dengan penamaan lebih pendek, menghilangkan comment atau informasi debugging. Beberapa obfuscator juga mengimplementasikan optimisasi pada bytecode (byte code transforming) dan beberapa teknik shrinking lain. Beberapa open source obfuscator yang sering digunakan antara lain ProGuard dan RetroGuard.

Beberapa IDE juga sudah didistribusikan dengan obfuscator seperti Netbeans IDE dengan mobility pack nya yang telah di bundled dengan Proguard Obfuscator. Sun WTK dan Eclipse IDE juga mendukung third-party obfuscation namun harus dispesifikasikan dalam proses deployment. Developer juga dapat mengganti obfuscator atau menambahkan langkah obfuscation pada cript Ant.

Berikut salah satu contoh cara untuk memasukan Obfuscator pada Netbeans IDE (pada contoh ini, menggunakan Netbeans IDE 6.5 dan ProGuard 4.3) :
1. Download ProGuard obfuscator dari http://proguard.sourceforge.net/.
2. Untar atau unzip file tersebut
3. Masukan ProGuard obfuscator jar pada directory netbeans, contoh : C:\Program Files\NetBeans 6.5\mobility8\external\ (langkah ini bisa di skip)
4. Buka Netbeans IDE, pilih Tools –> Libraries, dan Library Manager akan muncul
5. Pilih Progruard Obfuscator pada Class Library folder –> pada Classpath pilih Add JAR/Folder, dan Form untuk memilih Obfuscator Registry akan muncul
6. Defenisikan lokasi tempat JAR obfuscator yang akan digunakan –> Ok, path dari JAR file tersebut akan tampak pada Library classpath tersebut
7. Simpan perubahan pada Libray Manager dengan tombol OK

Untuk menggunakan obfuscator tersebut pada proses deployment :
1. Klik kanan pada nama project –> pilih Properties
2. Pilih Obfuscating –> dan lakukan adjustment pada bar Obfuscation Level (1-9) sesuai dengan spesifikasi project yang diinginkan pada hasil deployment. Pada level tertentu, developer akan diminta untuk memasukan additional obfuscation level.
3. Tekan Ok untuk menyimpan perubahan property project dan obfuscator akan otomatis digunakan oleh IDE pada saat proses deployment.

Sangat disarankan untuk melakukan testing pada hasil deployment dari obfuscator ini, karena pada lobfuscation level tertentu, model logic tertentu, penggunaan API tertentu, dan handset tertentu, JAR hasil deployment oleh obfuscator tidak dapat dijalankan. okay, happy coding dan selamat mencoba !!

another article as advance read can be found at http://www.devx.com/wireless/Article/28989/0/page/2





10 signs that it’s time to look for a new job

11 08 2009
This article was copyed from Tech Republic, maybe that can be used as consideration for you that think to quit from your current job. Good luck guys

———–
Author: Becky Roberts

Changing jobs can be a life-altering decision that requires considerable courage, especially in the current economy — but it’s easier if you’re convinced it’s the right thing to do. IT pro Becky Roberts put together a list of factors that helped her decide on a career shift.

Before I quit a job I had held for nine years and four months, I gave the topic of job-changing a great deal of thought. However bad a job may be and however much you dread Monday mornings, making the decision to leave the job — especially one you have held for some years — is never an easy process. Even if your boss is an ogre, your pay raises haven’t kept up with the cost of living, and your skills haven’t been relevant for six years, you know you can handle this job.

There’s a large degree of comfort in your current responsibilities and the company you’re familiar with. Part of your brain knows you’re capable of more, but another part is fraught with self-doubt and wakes you from sleep at 2:00 AM in a cold sweat, beaming an image of you in your new job frozen by ignorance, out of your depth, and facing termination.

So how do you know when it’s time to go? Based on my experience, here are my top 10 indicators that it’s time to make the change.
1: You know you aren’t performing to the best of your ability
We all go through slumps, bad days, even bad weeks when we just don’t care, don’t give it our best… but what if that week turns into months? If you just don’t have what it takes to give it your best, something needs to change. This is a common sign of burnout or of being overworked, underworked, underchallenged, or out of your depth.
If lack of motivation is the only issue, it may be possible to effect change within your current company by requesting different responsibilities, more training, or another position. But if none of these options is available, it’s time to update your resume.

2: You start gravitating toward coworkers you can be disgruntled with
Think about the people with whom you choose to socialize at work. Whose company do you seek out? Are you drawn toward the malcontents, the people who derive pleasure from complaining about their boss, the declining benefits, and the unreasonable overtime? When people ask you what you like about your job, is it rather like when Uncle Bob asked, “What’s your favorite subject at school?” and all you could think of was recess?

3: You can’t picture your future with your current employer
Do you remember those irritating questions the last time you were interviewed: “Where do you see yourself in three years? Five years? Ten?” Perhaps it’s time to ask yourself those questions again. But this time ask, “Do I see myself HERE in three years? Five years? Ten?” If the answer to any of these questions is “no,” what is your plan? Where do you want to go? When were you planning to make your move?
As much as we’d all like to simply wake up one day to find ourselves in the perfect job, the chance of it happening is probably slightly slimmer than a one-eyed, polka-dotted aardvark materializing in your trash compactor. If you know that you want to be working someplace else at some point in the future, it’s never too soon to make a plan.

4: You take inventory of your job’s pros and cons… and the cons win
If you’re having a hard time deciding whether to change jobs, try this simple exercise. Create a document with two lists — things you like about your current job, the pros, and things you dislike, the cons. Next, apply a weighting to the items. This can be as simple as a value from 1 to 10 to rate the importance of each factor. For example, if the stringent dress code is on your list of cons but it isn’t that important to you, give it a 1 or 2. But if the excellent health insurance is a pro, it would probably warrant at least a 7 or an 8.
Next, add up each list. If the cons outweigh the pros, it’s probably worth at least considering a change. If nothing else, this exercise will force you to focus on what you specifically do and do not like about your current position and give you a more concrete idea of what to look for in a new position.

5: You look for ways to improve your current situation but you can’t turn it into what you really want
Another useful exercise is to take your list of pros from the previous exercise and expand upon it. Elaborate on the items already on the list and add other items you wish you could claim about your current position. When you’re finished, review the list for items you may be able to make happen at your current company. If you want more responsibility or more flexible hours, you might be able to work that out, whereas if you work for a missile manufacturer and happen to have developed pacifist beliefs since accepting the position, your only reasonable option is to seek a position in a different company. In other words, before jumping ship under the assumption that a new position will make all your problems vanish in an instant, make the effort to effect improvements in your current position. If trying to make changes proves futile, you’ll be more confident that seeking a new position is the right thing to do.

6: Your skills are lagging and your position offers no opportunities to update them
How is your skill set? Are you able to keep your skills up to date? What would happen if your company went under today and you were forced onto the job market? Would you struggle to find a better or even an equivalent position because your skills are out of date? If this is the case, is there anything you can do to rectify the situation in your current position? Are there training opportunities you haven’t been taking advantage of?
If it’s not possible to stay employable in your current position, it’s definitely time to make a change, even if you enjoy the job and your company seems stable. You may be able to supplement your company’s deficit by paying for your own training, but without the opportunity to use your new skills in a work environment, such training will be of little value. To determine the current marketability of your present skill set, try searching for jobs equivalent to yours. Do you meet the minimum requirements?

7: You can’t get enough positive reinforcement to keep your spirits up
Do you feel valued? Feeling valued in your job is one of those almost indefinable benefits or forms of compensation that can’t be measured by any objective means. The degree to which someone needs to feel valued to be happy in a job varies greatly from person to person. Some people are perfectly content never to receive a word of praise or public acknowledgment of their achievements. For others, this type of recognition is more important than a generous salary.
The first step toward obtaining an appropriate position in this respect is to become aware of your own needs. The next step is to develop some techniques for determining whether these needs will be met when considering a new position, perhaps by asking appropriate questions during interviews or by finding current employees willing to talk. If you’re already in a job that you otherwise like, figure out what you need in order to feel valued and find ways to communicate these needs to the appropriate person.
If the only time your boss talks to you is to tell you that you need to do better or improve your attitude, try explaining that it would also be helpful to know when you are doing something right. Try being proactive and ask your peers, your users, or your superiors to let you know if there’s more you can do to help them. This could have the pleasant side effect of eliciting some positive feedback when they tell you that they’re perfectly satisfied with your current level of service. If you still can’t get the validation you need, it could be time to seek it elsewhere.

8: Your salary just isn’t enough
Are you paid what you’re worth? Although receiving inadequate financial compensation for your efforts is rarely the sole or even the most important reason that people change jobs, it’s a significant factor. For most people, being paid what they’re worth — at or above the going market rate for their job function — is an essential aspect of feeling valued. Don’t know what you are worth? Try looking at comparable positions on job hunting Web sites, review compensation surveys, or update your resume and submit it to a headhunter to solicit feedback.
Being paid inadequately can be particularly galling if you happen to find out that one of your less experienced and/or less qualified co-workers is being paid more. Early in my career, I was given the task of training a new employee, an assignment I took on quite willingly until I learned that despite her lack of experience, her salary was almost exactly double mine. Although I continued to train her, my enthusiasm definitely waned. My request for a mere 5 percent pay increase was denied, so I took the only reasonable course of action and secured a position with a different company. In this case, salary was not the only factor, but it was the one that finally persuaded me to make a change.

9: You want to live somewhere else
Have a great job but hate the location? Even if you have the perfect job, unless your career is the single most important aspect of your life, disliking the area in which you live or having a burning desire to live someplace else is an important factor in deciding to change jobs. Since accepting my first IT job, the need to relocate has been a significant force in my decision to change companies three out of four times. In fact, of those three, I relocated twice without even having a job to go to.

10: Your company or work situation has changed radically since you were hired
Your job used to be perfect, but now it has changed. Maybe your company was bought out or your boss retired or got reassigned. Or perhaps your company had a significant shift in operating philosophy or in its mission, and now you’re no longer working in the same environment into which you were originally hired. If such changes occur, you basically have three choices: Go with the flow and make the most of the situation, quit, or stay and complain. These types of changes can be so far-reaching in their impact upon your daily life that the result is not dissimilar to being forced to change jobs and companies. You may be going to the same physical location each day, but every other aspect of your job has been transformed. Even if you’re not unhappy with the changes, this is a good opportunity to reexamine where you are in your life and make sure you take full advantage of the new circumstances.





Prepocessing

11 08 2009
Masih seputar tidak begitu manisnya slogan write once, run everywhere pada java mobile, maka porting menjadi hal yang cukup krusial yang perlu diperhatikan mobile developer dalam mengembangkan sebuah produk mobile application. Hal – hal yang menjadi perhatian seperti : display size apa saja yang didukung ? JSR API apa saja yang digunakan oleh source ? di platform apa program ini akan berjalan, Nokia S60 ? Nokia S40 ? blackberry ? Motorola ? Bahasa apa yang akan digunakan untuk antar muka ? dsb. Dari hal – hal tersebut, developer dapat menentukan variabel apa saja yang akan disertakan dalam proses deployment.

Preprocessing adalah cara porting yang dilakuakan dengan memodifikasi kode program berdasarkan platform yang akan ditargetkan. Simbol prepocessor ini dapat digunakan untuk melakukan testing pada berbagai emulator dan deployment pada berbagai platform berbeda. Hal ini sangat menguntungkan dan menghemat waktu, karena memungkinkan developer untuk membuat konfigurasi berbeda – beda untuk menghasilkan berbagai versi program yang akan berjalan pada platform / handset berbeda dengan source dari project program yang sama. Sebagai contoh, perubahan pada logic pada line program cukup dilakukan 1 kali dan akan berdampak pada keseluruhan konfigurasi, atau jika line perubahan tersebut hanya akan digunakan untuk konfigurasi tertentu (misal hanya untuk handset S60 tapi tidak S40), maka cukup tambahkan prepocessor pada line tersebut.

Berikut contoh penggunakan prepocessor untuk kasus pendefenisian variabel berdasakan resolusi layar :

#if screenWidth == “175″
widthX = 10;
heightY = 20;
#elif screenWidth == “240″
widthX = 20;
heightY = 30;
#endif

Berikut contoh penggunakan prepocessor untuk pada penggunakan canvas, dimana pada platform nokia mendukung fullcanvas pada package com.nokia.mid.ui. dan yang lain cukup menggunakan package standar pada javax.microsedition.lcdui.

#if nokia
import com.nokia.mid.ui.FullCanvas;
#else
Import javax.microsedition.lcdui.*;
#endif

untuk melakukan testing dan deployment kode program diatas, dapat dilakukan dengan membuat konfigurasi berbeda. Pada Netbeans, dapat dilakukan dengan mendefenisikan ability dan value yang diinginkan pada project properties.
1. Klik kanan pada nama Project –> Properties

2. Pilih Abilities –> Akan tampak table ability yang otomatis di generate oleh IDE, pilih Add –> devenisikan variabel prepocessor baru yang digunakan pada line program. Anda dapat membuang variable abiliti yang tidak dibutuhkan. devoper juga dapat melakukan pendefenisian ulang untuk variabel ability yang sudah ada, seperti ScreenWidth, ScreenHeight, JSR, dll dengan menekan Edit atau klik pada baris nama ability yang akan di ubah –> Ok
3. Developer juga dapat membuat berbagai macam konfigurasi pada property project. Pilih Platform –> Manage Configurations –> akan muncul Project Configuration Manager –> pilih Add atau Add more –> akan muncul Add Project Configuration –> masukan nama konfigurasi misal, S60_3Ed_240×320 –> Ok

4. Pada konfigurasi ini, developer dapat melakukan kustomisasi yang spesifik untuk project seperti API yang didukung, platform, CLDC dan MIDP version, nama JAR – JAD untuk keperluan pendistribusian program, dll
Also can be read similar topic at :





Midlet Icon

4 08 2009
Dalam melakukan deploy aplikasi mobile java untuk handset sebenarnya, terkadang kita menemukan kenyataan yang membuat slogan java sebagai bahasa pemrograman yang write once, run everywhere tidak terlalu tepat atau semanis seperti bunyinya. Nyatanya, sering kali developer harus melakukan kustomisasi terhadap kode dan resource program, sesuai dengan kebutuhan handset yang akan di targetkan.

Salah satu contoh paling sederhana adalah Midlet Icon. Seperti yang kita ketahui, walaupun tidak diharuskan, akan sangat baik jika dalam pendistribusian program mobile java (midlet) disertai icon (biasanya dalam format png) yang akan tampak pada listing aplikasi dalam handset.

Umumnya, setiap handset terkadang memiliki ukuran yang berbeda – beda satu sama lain, sehingga sebelum melakukan deployment, developer mobile java perlu mendefenisikan ukuran midlet icon yang tepat untuk setiap handset. Midlet icon ini dapat di spesifikasikan dan akan tampak pada atribut pada JAD (java application descriptor) file, yaitu :

MIDlet-Icon: /testicon.png

atau

MIDlet-1: [nama midlet], /testicon.png,[nama kelas midlet]

atau jika anda menggunakan IDE, dapat mencari menu untuk melakukan customize midlet icon. Berikut salah satu contoh melakukan pendefenisian dan atau kustomisasi midlet icon(pada contoh ini, menggunakan Netbeans IDE 6.0)
1. Klik kanan pada nama Project –> properties
2.Pilih Build –> Libraries & Resource

3. Pilih Add Folder (jika image yang akan dijadikan midlet icon terdapat paad salah satu folder anda), dan defenisikan image yang diinginkan –> Open

4. Pilih Application Descriptor –> Midlets –> akan tampak tabel Midlets in the Suite –> pilih Edit –> spesifikasikan Midlet Name (akan muncul saat instalasi dan penggunaan program pada hanset), Midlet Class (kelas pada project yang mengimplemen midlet) dan Midlet Icon (akan tampak semua resource image yang sudah di defenisikan pada library tadi (langkah 2 dan 3)) –> Ok

5. Tekan tombol Ok pada kanan bawah form ini untuk menyimpan perubahan properties project

Setiap handset memiliki penanganan yang berbeda untuk ukuran Midlet icon yang tidak tepat. Sebagai contoh, ada yang otomatis melakukan scale icon tersebut pada ukuran yang tepat, ada yang menampilkannya tetap sebagai ukuran yang sebenarnya ehingga jika icon lebih kecil ia akan tampak kecil pada sisi kanan area (nokia s60) dan jika lebih besar tetap akan tampak terpotong.

Berikut beberapa rekomendasi ukuran midlet icon yang saya dapatkan dari beberapa referensi, atau saran developer lain dan telah di implementasikan beberapanya. Saya akan sangat berterima kasih jika anda mengkonformasi jika terdapat saran untuk ukuran yang lebih baik dan atau menambahkan list yang sudah ada.

Blackberry :

  • display size resolution 320 x 240 –> 46 x 48 pixels
  • display size resolution 480 x 320 –> 53 x 53 pixels
  • General –> 45 x 45 pixels

Motorola :

  • display size resolution 176 x 220 –> 27 x 24 pixels
  • display size resolution 240 x 320 –> 27 x 24 pixels
  • General –> 15 x 15, 16 x 16, 32 x 32

Nokia S90 :

  • small display size resolution –> 25 x 20 pixels
  • medium dan large display size resolution –> 64 x 50 pixels

Nokia S80 :
General –> 64 x 50 pixels

Nokia S60 1st and 2nd Edition :

  • display size resolution 176 x 208 –> 31 x 31, 42 x 29 (best fit), 29 x 29 pixels
  • display size resolution 208 x 176 –> 37 x 37 pixels
  • display size resolution 240 x 320 –> 53 x 53, 55 x 55 pixels
  • display size resolution 352 x 416 –> 76 x 76 pixels
  • display size resolution 416 x 352 –> 76 x 76 pixel

Nokia S60 3rd Edition :

  • display size resolution 176 x 208 –> 31 x 31 (best fit), 42 x 29 pixels
  • display size resolution 240 x 320 –> 53 x 53 (best fit), 55 x 55, 64 x 64 pixels
  • display size resolution 320 x 240 –> 52 x 52 (best fit), 54 x 54 pixels
  • display size resolution 360 x 640 –> 52 x 52 pixels
  • display size resolution 352 x 416 –> 64 x 64, 76 x 76 (best fit) pixels
  • display size resolution 416 x 352 –> 76 x 76 (best fit) pixels
  • display size resolution 208 x 176 –> 37 x 37
    208×208:37×37

Nokia S40

  • display size resolution 128 x 128 –> 16 x 16 pixels
  • display size resolution 128 x 160 –> 18 x 18, 24 x 24 (best fit), 29 x 29 pixels
  • display size resolution 176 x 220 –> 27 x 24 pixels
  • display size resolution 208 x 208 –> 46 x 46 pixels
  • display size resolution 240 x 320 –> 46 x 48 (best fit), 42 x 29 pixels

Nokia S30
General –> 16 x 16 pixels

7560 dan 3650
General –> 32 x 32 pixels

N90
General –> 84 x 58 pixels

Samsung

  • display size resolution 176 x 220 –> 27 x 24 pixels
  • display size resolution 240 x 320 –> 27 x 24 pixels
  • display size resolution 320 x 240 –> 27 x 24 pixels
  • General –> 16 x 16, 29 x 29, 32 x 32 pixels
  • D807 –>32 x 32 pixels – Ignores 8-bit transparency, maybe 32-bit alpha would work
  • E770 –> 16 x 16 pixels
  • Z140v –> 24 x 24 pixels – use ‘web safe’ colors at 8 bit (256 color)
  • Z400 –> 53 x 46 pixels – (empirical)
  • Z500 –> 40 x 34 pixels
  • ZX10,ZX20 –> 42 x 36 pixels- same as D807
  • All Others – None

Siemens
General –> 18 x 18, 14 x 14 pixels

Sony Ericsson

  • General –> 16 x 16, 32 x 32 pixels
  • V800, W900 –> 24 x 24 pixels
  • K608i, W600i –> 16 x 16 pixels
  • Seri JP4, JP5, JP6 –> 16 x 16 pixels (recommended by SonyEricsson)
  • K700i, T610, T616, T618, T628, T630, T637, Z600, Z608, K500, K506, K508, K700, Z500, S700, S710a, P800, P900 –> No icon
  • P910 – supports icons in various sizes and attempts to scale/adapt these to a size suitable for display. The icon size shouldn’t matter, only that smaller ones might show up a bit jagged due to magnification.

Sharp
General –> 27 x 27 pixels
GX Series –> 24 x 24 pixels

Sagem
General –> 18 x 18 pixels

Vodafone Japan
General –> 24×24 pixels
905SH, 903SH, 902SH, 804SH, 705SH, 702SH –> 42 x 42 pixels

Sanyo
4920 –> 9 x 9 pixels
5300 –> 16 x 16 pixels
8100 –> 15 x 15 pixels

LG
CU-500 –> 15 x 15, 16 x 16 pixels

Palm
Tungsten, Treo, Low Res –> 22 x 22, 9 x 15 pixels

Kebanyakan dari handset diatas mendukung midlet icon dengan format png 1bit-depth, 4bit-depth, 8bit-depth, kecuali Nokia S60 3rd Edition dengan konfigurasi terbaik hingga 24bit-depth.

Advance read :

Terakhir diubah pada 11 agustus 2009