Category Archives: programming

Mobile Dev Joy : The Adventure with Mobile Browser

My post today will be rather technical, but I’m sure some will find it interesting because it’s about a topic that’s not as widely discussed as others. Some may even find it useful. It’s about my brief stunt with mobile development.

Some time ago I was asked to look at a web-based apps which is to be used with a mobile phone. A Nokia E70 to be exact. It’s based on Symbian S60 3rd edition platform. Basically, a Javascript which is supposed to run won’t. So I looked into it.

This piece of Javascript is vital for usability reasons. Without it, the input process will take up to 50% longer. So I thought, yeah I’ll set aside a bit of my time and hack this.

Then I realized that when I thought the browser situation on the PC / desktop platform is a mess; it actually look very tidy and well-ordered compared to the situation on the mobile platform 🙂

First, mobile platform is much more limited — in terms of CPU / processor power, memory capacity, secondary storage (hard disk / flash ram) capacity, power, etc. These limitations in turn must be taken into account by all mobile browsers. Which causes various quirks / incompatibilities to surface when you dig deeper into it.

Second, free(dom) software has not yet made as much impact here as it is on the desktop. Therefore we have plethora of proprietary technologies, which sometimes doesn’t work together / conform to the open standards.

Third, there’s not as many documentations available on the topic. As I googled around, I realized in horror that I may have to hack around much more than I thought necessary.

Back to the hack – first thing I tried was to install Opera mobile (not Opera mini). Yes, we’re willing very willing to pay Opera if it works. In short – the Javascript works on it.
Unfortunately, Opera mobile crashes around so much, it’s impossible to enjoy any kind of productivity with it.

Also there are a LOT of quirks with Opera mobile when used with keypad.
They are small things, but gets annoying very quickly. Which doesn’t help when you’re trying to accomplish good amount of work.

Maybe it’d be better if I try an older version of it, but seeing it consume too much RAM anyway; I thought I’ll give the built-in browser a try first.

Called “Nokia Mini Map Browser” because of its “mini map” feature, it’s speedier than Opera mobile and doesn’t use as much memory. However, the Javascript on our web-apps doesn’t work there.

So I thought, perhaps this browser doesn’t support the latest version of Javascript. Or worse, perhaps it has its own version of Javascript. That would suck greatly.
Anyway, I started to try looking for documentation on the topic, also for a tool to help me debug the problems there.

I found Nokia Mobile Browser Simulator 4.0. It’s Java-based. However, it seems to be hard-coded for Windows, with Windows installer too. Ok so I found a Windows machine, and set it up.

To my dismay, it doesn’t work very reliably. To be precise, it won’t even load the web-apps. While the actual browser in Nokia E70 will display it correctly.

With documentation on the subject (Javascript capabilities of Nokia Mini Map Browser) also very lacking, this is starting to look like a dead end.
Until I found out that the Nokia Mini Map Browser is actually an open source project !

Code named “S60browser”, or “S60Webkit”, it’s available from opensource.nokia.com
There’s hope – if there’s code available, then anything can always be traced / found out.

My sharp-minded readers will quickly realize another thing – yes, it’s basically the same as the Safari browser, the one on Mac OS X 🙂

Nokia Mini Map Browser aka S60browser aka S60Webkit is based on another open source project called WebKit. Which happens to be the foundation used as well by Apple to build their browser, Safari.

Now this is getting interesting 🙂

I dug deeper into these new clues, and began to feel sure that both browser’s cores are indeed identical. Which means that I’d be able to debug the problem with Safari browser.

safari-pref-advanced
I fired up Safari, invoked the Preferences screen, and clicked on Advanced icon. I enabled “Show Develop menu in menu bar”, then I restarted Safari. A new menu then showed up. I chose Develop – Show Web Inspector (also accessible via Cmd-Alt-i)

I got the detailed error message in no time. It’s “Object [object HTMLInputElement] (result of expression document.getElementById(“testForm”).submit) does not allow calls“.
As I already mentioned, the script works on Firefox and Opera, but somehow it doesn’t work on Safari. So it’s Googling time again.

Turn out it’s a generic error message whenever Safari have problems executing a function.
So it could be that the function doesn’t exist. Or the function name is mispelled. Or any other function-calling related problems.
Great, looks like this will cause more questions than it answers…

Thankfully I wasn’t on the wild goose chase for too long. A comment on a blog post gave me the hint I needed :

I gave a form button the *same name* as the function it was calling in its onclick. This error was the result.

Joshua, thank you. That’s exactly what happened in my case 🙂
A line in the script is as follows :

document.getElementById(“testForm”).submit();

While there’s also a button on the same script named, you guessed it, submit :

<input type=”submit” name=submit />

So Safari got confused, and threw this generic error message.

And it’s very easy to fix, I just need to change the button’s name value to something else – and it works now on Safari & Nokia Mini Map Browser, as well as on Firefox and Opera.

I love happy endings 🙂

Moral of the story ? Open source software empowers developers.

And this is not the first time – my MSc thesis was about to fail; when I found ping’s source code on the Internet. It gave me the hint needed to continue the project. The thesis got among the best mark at that year.

With availability of the source, we can learn from the brightest minds on Earth with ease. The knowledge and wisdom become available for all.
Even to the ones with feeble minds, like me.

Here’s another cheer for free(dom) software movement : May the source be with you 🙂

(oh, and also, all hail Google !)

Codefetch.com dkk – search engine untuk source code

Pernah mencoba melakukan pencarian spesifik untuk bahasa pemrograman tertentu di Google? Tentunya Anda sudah tahu apa arti dari kata “frustasi” — seringkali Anda membutuhkan informasi tersebut segera, namun hasil Google banyak yang meleset.

Codefetch bisa membantu Anda disini. Dimana Google bersifat umum, Codefetch melakukan pencarian pada contoh-contoh program yang ada di berbagai buku pemrograman. Karena itu, hasil pencarian di Codefetch cenderung lebih tepat & berupa source code yang berkualitas.

Beberapa contoh aksi Codefetch bisa dibaca di artikel ini.

Tidak itu saja, Anda juga bisa menemukan tampilan ala Google Zeitgeist di halaman ini.
Sip lah, ternyata PHP masih tetap nomor satu 😀 (buru-buru pakai baju tahan api)

Perlu yang lebih powerful lagi ? Anda bisa mencoba Koders.com

Silahkan baca panduan pemulanya, cukup mengesankan bukan ?

Jadi programmer saat ini makin mudah saja. Kalau dulu kadang musti mencari-cari contoh source code di BBS luar negeri, dengan membayar biaya telpon SLI 😛

Dan jika itu masih belum cukup, Anda masih bisa mencoba Krugle, dan CSourceSearch

Happy coding !

Lagi belajar coding? Ada layanan webhosting (nyaris) gratis untuk Anda

Anda sedang belajar PHP ? Bingung bagaimana cara menampilkannya di Internet ? Osama dong, dulu saya juga mengalami masalah yang sama. Sampai berhari-hari saya mencari provider hosting gratis, dapatnya juga cuma ngasih kapasitas seupil 😀

Adik saya malah apes, dia dapat domain name gratis — tapi kemudian disandera oleh mereka. Sampai sekarang domain name yang bagus tersebut masih tetap tidak bisa dia miliki lagi.

Sekarang sudah enak buat Anda sekalian.

Kawan saya, Riyogarta, menawarkan webhosting gratis (1) bagi Anda yang sedang belajar PHP (2)

Fiturnya ?

* Disk Space 2000 MB atau lebih
* Bandwith 18GB/bulan atau lebih
* PHP versi 4/5
* MySQL 5 dengan jumlah database unlimited
* PHPMyAdmin yang sudah terinstall
* Satu account Shell/FTP user
* Empat puluh account email (Webmail/POP3/IMAP) dengan domain yang Anda miliki
* Unlimited subdomain (khusus bagi mereka yang memiliki domain).
* Backup file ( 1 hari sebelumnya, 2 hari sebelumnya, 1 minggu sebelumnya, 2 minggu sebelumnya, 1 bulan sebelumnya, 2 bulan sebelumnya )
* Backup database ( hanya dipergunakan dalam keadaan darurat saja, Saya tidak mau direpotkan dengan permintaan restore dari Anda)
* Mmm, apalagi ya? 😕 Cukup sebegitu dulu 😀

Keren kan ?

Salut untuk bang Riyo atas inisiatifnya ini. Ini dia tindakan nyata yang dapat membantu banyak kawan-kawan kita.

OK, bagi yang tertarik, silahkan langsung klik disini saja. Enjoy !

(1) Awalnya gratis, namun kemudian setelah mempertimbangkan beberapa hal, termasuk kemungkinan layanan gratis ini di abuse, maka beliau terpaksa memutuskan untuk menarik sedikit biaya. Hanya Rp 15.000 untuk webhosting 2 tahun!

(2) Ada beberapa persyaratan, jadi tidak semuanya bisamendapatkan fasilitas ini. Tapi ini semata-mata untuk menjamin bahwa yang mendapatkan ini betul-betul adalah mereka yang memerlukannya.

A+, bahasa pemrograman untuk bidang Keuangan

A+ adalah sebuah bahasa pemrograman yang dibuat khusus untuk kebutuhan bisnis, terutama pada bidang keuangan.

Uniknya, A+ ini di develop oleh staf Morgan Stanley, dan lalu kemudian dirilis dengan lisensi GPL ! Morgan Stanley terus mendukung development A+ sampai saat ini.

Morgan Stanley adalah perusahaan terbesar 38 di dunia, dan masuk di dalam daftar Forbes 500. Morgan Stanley banyak menggunakan berbagai software yang dibuat oleh staf IT mereka sendiri dengan menggunakan bahasa A+, dengan hasil yang bisa kita lihat sendiri.

Quote :

A+ is a descendent of the language “A” created in 1988 by Arthur Whitney at Morgan Stanley. At the time, various departments had a significant investment in APL applications and talent, APL being a language well-suited to the manipulation of large arrays of numbers. As technology was moving from the mainframe to distributed systems, there was a search for a suitable APL implementation to run on SunOS, the distributed platform of the period. Not happy with the systems evaluated, Arthur, motivated by management, wrote one geared to the business: large capacity, high performance. He was joined in his efforts as the language took on graphics, systems’ interfaces, utility support, and an ever-widening user community. Over the course of the next few years, as the business began to reap tangible value from the efforts, the pieces were shaped into a consistent whole and became A+.

A+ soon became the language of choice for development of Fixed Income applications. It offered familiarity to the APL programmers, the advantages of an interpreter in a fast-paced development arena and admirable floating-point performance. A significant driver was that many of Morgan Stanley’s best and brightest were the developers and supporters of the language. Through their practical application of technical values, they instilled fervent enthusiasm in talented programmers, regardless of their programming language backgrounds.

maxq: Alat bantu testing web-application

Dengan semakin berpindahnya development ke platform web, maka kebutuhan akan alat bantu nya menjadi semakin terasa.

Jika Anda pernah merasakan berbagai kebutuhan berikut :
1. Regression testing: memastikan bahwa situs Anda tetap berjalan sebagaimana mestinya setelah di update
2. HTML validity: memastikan bahwa situs Anda menghasilkan kode HTML yang sesuai dengan standar
3. Automatically extract information / do some action on a website

Maka MaxQ adalah salah satu solusinya.

[ Situs MaxQ ]

Software development Java gratis senilai hampir US$ 2000

Sejak beberapa waktu yang lalu saya mulai tertarik untuk mencoba development di Java. Yang pertama-tama saya lakukan adalah mencari IDE (Integrated Development Environment) yang bagus untuk Java, karena ini akan dapat sangat membantu proses belajar saya.
Setelah mencari beberapa waktu, saya menemukan sebuah yang baik, namun harganya sekitar US$ 500. Maka rencana belajar Java saya tunda dulu ketika itu.

Kemudian saya menemukan bahwa ternyata Sun kini sedang menawarkan IDE Java mereka untuk di download tanpa biaya – padahal harga retailnya nyaris mencapai US$ 2000.
Anda dapat mendapatkannya dari link ini: http://developers.sun.com/members/promo/freetools/index.html

Jika Anda belum menjadi anggota SDN (Sun Developer Network), maka Anda akan perlu mendaftar terlebih dahulu sebelum bisa mendapatkan penawaran ini. Pendaftara SDN cepat (hanya mengisi 1 halaman form) dan gratis.

Semoga bermanfaat.

Belajar PHP – cara mudah & cepat

Update: versi terbaru dari artikel ini bisa dibaca disini.

Sudah beberapa kali saya mendapat pertanyaan tentang bagaimana cara yang mudah dan cepat untuk belajar PHP. Kali ini akan saya posting disini, mudah-mudahan jadi bisa bermanfaat untuk lebih banyak orang.

  1. Install PHP & MySQL.
    Jika Anda menggunakan Windows, Anda bisa download FoxServ. Jika Anda menggunakan Linux, silahkan install Apache, PHP, MySQL; misalnya dengan merujuk kesini.
  2. Pelajari tutorial-tutorial berikut ini (sesuai urutan):
    1. Memulai belajar PHP
    2. Membuat form sederhana
    3. Membuat form yang terdiri dari beberapa halaman
  3. Agar bisa mengakses MySQL dari PHP, silahkan membaca tutorial yang bagus ini: Webmonkey.com: cara memanfaatkan MySQL dari PHP
  4. Kalau sudah memahami semuanya, bisa dilanjutkan ke 2 topik berikut ini – tidak wajib, tapi berguna/menarik untuk diketahui :
  5. Selamat ! Anda kini sudah cukup menguasai PHP – ini saat yang tepat untuk mulai mengakrabkan diri dengan cara-cara untuk mengamankan PHP

Beberapa informasi tambahan:

Semoga bermanfaat.