Sabtu, Oktober 20, 2012

Dadah, Blogger :D

Saya akan nulis di github karena jauh lebih nyaman untuk menyunting secara luring. Selamat datang, Octopress :D

mufid.github.com

Minggu, September 09, 2012

Really, Woman?



Ini dari status muka buku saya:

para wanita ngepost foto high resolution di facebook.

asal lu tahu, gak sedikit pria yang ngesave gambar kalian lu.. buat ditunjukin ke pria lain.. dan untuk ditunjukkan betapa cantiknya dirimu..

dan kau senang dengan itu? fotomu diumbar kepada lelaki yang tidak mempertahankan kehormatanmu? Murah banget ya kamu diri kamu mau dilihat sama lelaki sembarangan..

Sama kaya abg labil di Indonesia, ju
alannya aurat. Ya laku lah jelas...

mau berapa lelaki lagi yang kau ingin lihat fotomu? Mau berapa lelaki lagi yang bilang bahwa dirimu cantik?

Gw pakai Nawala DNS.

Simply karena sebelum pakai nawala, gw dapat dengan mudah membuka situs web yang isinya "Lihat bro, cantiknya ini. Kenalin, ini teman gua."

Padahal belum tentu itu temennya beneran. Bisa aja dia ngambil dari Random URL (yang mungkin bisa saja itu fotomu) terus disebar ke internet.

Tujuan dia mengumbar foto itu jelas: Iklan. Karena menebar foto wanita cantik, banyak orang yang ngebuka webnya, dan banyak yang dapet iklan dari sana.

Ngepost foto boleh aja. Tapi yang bijak, ya :)

Jumat, Agustus 24, 2012

Do We Really Need Rebutan?



TL;DR: Apakah ada algoritma khusus untuk rebutan IRS ini tidak terjadi lagi?

Untuk berebut masuk ke dalam ruangan adalah hal yang primitif menurut saya. Seharusnya orang antri untuk membayar dan utnuk masuk ke dalam ruangan tersebut untuk mengikuti suatu acara (seminar atau konser, misalnya). Seharusnya, antri itu tidak lama, kecuali untuk pembelian tiket on the spot. Anda harus membuka dompet, memberi tahu tiket yang Anda inginkan, dan mendapatkan tiketnya. Untuk on the spot agak aneh, karena setelah Anda mendapatkan tiketnya, tiketnya masih harus diverifikasi; doubling the amount of time you need to enter the room.

FYI, jika Anda telah mengambil kelas Sistem Operasi, paragraf selanjutnya akan serasa De Ja Vu. Yeah! Terima kasih pak Ibrahim!

Solusi berebut ini bisa diatasi dengan membuat antrian yang paralel. Yup, antriannya paralel. Jika antrian masih panjang, buat lebih banyak paralelnya. Lebih banyak lagi, lebih banyak lagi. Solusi yang sangat mudah dan pasti berhasil, tetapi mahal. Namanya scaling.

Dalam dunia cloud computing, istilah scaling berarti memungkinkannya kita "melakukan paralelisasi" atau "meningkatkan performa" tanpa "effort yang besar", tidak perlu merubah algoritma program; semua diatur di platform. Kita berharap scaling berlaku di dunia nyata. Ups tetapi tidak untuk beberapa hal. Antrian yang paralel mungkin bisa di-scale, tetapi ada yang tidak rasional. Ini masih soal rebutan..

IRS (dan KRS, atau terserah universitas Anda menyebutkan itu apa).

Apakah HARUS kita berebut mengisi IRS? Dulu-duluan, cepet-cepetan, siapa yang bisa berhasil login duluan ke sistem dan menyimpan perubahan, maka dia mendapatkan urutan terbaik di kelas? Dan siapa yang telat dia harus ikhlas untuk tidak mendapatkan kelas tersebut?

Sabtu, Agustus 11, 2012

Lalalalalalalalala

Saya sedang mencari lagu yang saya tau liriknya seperti di atas. Aneh? Tidak, itu lagu dengan paduan suara anak-anak dan seperti ada iringan aransemen ke-country-country-an, dan sering diputar saat saya sedang berjalan ke tempat yang agak kurang menyenangkan (baca: Mall).

Skenario pertama adalah mencarinya di iTunes Store. Tetapi tunggu, memang mungkin ada? Memang lagu itu terkenal? Lagu-lagu islami jarang ada di iTunes.

Skenario kedua adalah situs web lagu bajakan. Masalah di sini adalah semua berkas tersedia apa adanya. Tanpa penyortiran dan pengorganisasian yang sophisticated. Saya gagal menemukannya di sini.

Sampai di sini saya kehabisan ide. Pencarian di DuckDuckGo juga nihil.

Kemudian saya mencoba di,.. saya menyebutnya "The First iTunes Store in Indonesia". Melon.


Tetapi sayangnya, meski Melon dalam istilah software development disebut sudah dalam proses production dan bukan beta apalagi alpha, Melon mewarisi kesalahan dari "daftar lagu" biasa"

  • Tampilan Editor's Pick yang terbatas. (Bandingan dengan iTunes Store dan Google Play)
  • Algoritma pencarian yang seperti tidak ada penyortiran berdasarkan popularitas atau trending
Saya pikir koleksinya sudah cukup banyak, tetapi saya tidak menemukan lagu yang saya cari di sana.

Hm. Ada ide?

Jumat, Juli 13, 2012

We Are Not Compatible with Foreign Lifestyle

Yesterday i went out to Singapore to have a summit. That was my first time to go abroad. And i feel something different, slightly different with Indonesia. It's all about the time.

Singapore has GMT+8 time zone, not really similar with Hanoi, Bangkok, and Jakarta, even though actually we are in almost the same longitude. And this change everything: It takes no matter for me if i sleep at 12 AM or 1 AM, because the Subuh time is around 6 AM. So i still get 6 hours of sleep, and it more, further more than enough! (Yes, you should agree with me. Six hours of sleep is kinda cool. You would love this amount of time if you are not in holiday). The 6 AM Subuh time is almost the same with another city around the world, for example Mecca.

And the most important part: i even not missing Subuh praying time, not even a single minute. Really different if i wake up at 6 in Indonesia. Nothing to do here, you could conclude that situation..

...

Nah, How about Indonesia?

So many people in Indonesia want to have a midnight life — it might doing homework, writing paper, creating code, or having some amusement; until the end of the night. Some people love to have a late sleep at 1, the other at 3. Unfortunately they must wake up at 4 or 5 Subuh time. It means not enough time to sleep.

So actually you can't have a late night sleep in Indonesia. If you want to sleep at 1 AM in Indonesia, it's not the same thing with you sleep at 1 AM in Singapore/Middle-East. They have a standard time of 7 AM or even 7.30 AM sunrise, while Indonesia has 6 AM standard time of sunrise.

Nah, akhirnya gue sadar gak bisa begadang lagi. Jam 12 itu udah waktunya tidur bro! Kalo di luar jam 12 lu masih bisa leha leha. Tapi kenapa yah di Indonesia banyak banget orang yang seneng begadang, ngerjain tugas, sampai larut..

Senin, Juni 11, 2012

InsyaAllah, Liburan ini, buku jQuery

InsyaAllah, penuh selama liburan ini, saya bertekad untuk menulis buku dengan tema berikut:

(Hampir) Membuat jQuery: Belajar Javascript Langsung dengan Praktik Terbaik!


Saya kecewa dengan buku-buku yang ada tentang Javascript saat ini. Karena:

  • tidak diajarkan tentang object oriented javascript. Buku yang saya lihat hanya mengajarkan tentang procedural javascript.
  • tidak menyangkut API terkait dengan DOM. Hanya prosedur tentang bagaimana melakukan logika yang umum seperti konversi suhu.
  • tidak disertai dengan best practice dan implementasi dalam dunia nyata. Hanya diberikan masalah-masalah yang abstrak.
Buku (Hampir) Membuat jQuery ini akan mengajarkan langsung Javascript langsung dari cara terbaik belajar jQuery. Saya akan membedah jQuery dan mencoba mengkloning, membuat jQuery dari awal.

Secara umum buku ini akan membahas:

  • Logik pemrograman secara umum
  • Kaitan DOM dan Javascript (dan benar sekali, jangan heran bagian ini yang paling tricky)
  • Menguji AJAX dengan Node.js dan Express
  • Aplikasi Chrome dan Javascript
Saya mohon doanya dari teman-teman semua agar saya tetapi istiqomah/konsisten dalam usaha saya ini. Harapan Saya, akan banyak orang dapat memahami Javascript at glance dengan buku dalam bahasa Indonesia ini.

Kritik dan saran sangat saya harapkan dari teman-teman semua.

Salam, let's start fighting for the great web!

Kamis, April 05, 2012

Code in the Morning, then Sleep

Seems writing code in the early morning is very fun, a lot of fun. Is there any research about it? Research over google give me nothing with this keyword except this is one, but a little bit irrelevant.

Morning & Fisherman

However, to write code in the morning isn't about "your brain still fresh". To reactivate the brain when you just have woke up from your sleep isn't that hard for the first time. It's more like habitual activity.

So actually, i'm currently in a faculty's project, working together to make a great event. So i must manage my time to study and to write code (for this project).

Let start a calculation about sleep. I must cut off my sleep duration so i have more time to do this work without disturbing my study. This is not actual scientific calculation, but in 5 rems sleep, you got 16 hours from your wake up time until you fall asleep. If you sleep in 7 hours, you got 4-5 rems sleep. If you sleep in 3-4 hours, you got 2-3 rems sleep. You may add rem sleep by taking a nap.

As in college you've so much time to manage yourself, this is the good part: you can sleep anytime you want, but sleep itself need yourself to be in relax condition. You will never fall asleep if you're not usual sleep in bright area and noisy area (as the situation that'll always happen in college).

OK, we will try.

Sabtu, Maret 31, 2012

No Spirit Writing

Today i feel no spirit to write about tech again. Especially when it talks about methodology, or the way to complete a problem.


motivation

No, it's not the end of this blog. I mean, what i have written here is just simply too much general. There're plenty of tech trick blog when we search on Google, but so much of them don't make people who read into interested and in writing to make reader interested to our reading is very important thing. So that it's actually talking about how is the reader, not focusing on writer's ego.

Sometimes in free time i read overseas programmers blog and they're talking about their experience with tech. It's really great because their experience isn't actually what we will see in daily life (for example, playing with cluster server, but not talking about how to make the cluster server; talking about what is cluster server and problem over it) so it makes readers (even they're not programmer) interested in that topic.

See you on my next writing.

Minggu, Maret 25, 2012

About Education, Again

Seems myself isn't compatible with Indonesia curriculum. This judgment is too much general, but it's clear enough to release overloaded things on my mind.

In High School, i was only relying my study material to teacher in NF. At that time, i boosted my understanding only at NF. Almost all the time i never take care to the teacher in school. This is why:

  • The situation wasn't condusive. I don't know why, i just don't click with the environment. (It might dust, but it might not)
  • Some teacher taught well, and i'd to do extra mile for some other.
  • I could reach the teacher if i don't understand a lesson, but this would be so hard. What appointment you'll do to the teacher if you only have time below 7 and late 15? And school has it own policy to stop all activities more than 18? (It's far different with campus, though).
Yet, Alhamdulillah, friends there (and here) is very cooperative, and they're not bad guy. OK, we're not talking about this, we're going to talk about,

yeah, the curriculum and teaching method.


Seems myself isn't compatible with Indonesia curriculum. Assignment drilling, a uninnovative way of learning, stuck in old method, too much restriction in science. Oftenly, i will search for another learning way, for example in Youtube, or KhanAcademy. Fortunately, when i was in NF, teacher there taught with some unique ways (the bad news: some teacher there (also in NF) isn't that good), so alhamdulilalh i could easily understand the materials.


The video above is video i love about NFA. I don't know whether i usually late in this class (so i get more distraction to see the slide and lecturer's voice by not getting sit in front of my class), but this is is hard to understand before. I did a lot of research over Google and alhamdulillah i found this one.

Video tutorial is one of my favorite way to learn. With video tutorial, you've some expectation:
  • Prepare yourself (make sure you've got meal, or maybe take a shower, or anything that make your mind fresh enough)
  • Download the video tutorial (or buffer it).
  • If it have fully buffered, you can make expectation you will fully understand about that material  soon after you watched the entire video.
  • Another expectation: you should understand 100% after you watched video, without any replay.
The best part is, if you forgotten the material, just watch it again. The bad part is you should prepare the device (monitor, tablets, etc.) and the time. It's really different if you read text book, you can do it everywhere and everytime. But we talk the effectiveness here.

Yeah, this is my way, but unfortunately not all materials covered by video tutorial.

OOT:

And yeah, at the end, you will find mark is deciding almost all things. Even you say, "don't get best mark; pursue the knowledge." If so, why don't you get out from your academic now and freely learn everything by yourself? I think we can't make an escape at this moment, if you really want what Prof. Rhenald Kasali said about education.

I still don't get it, why so much people only fight for mark, and why the other get the knowledge because of their desire. I can't talk about it. I still don't understand this phenomenon.


Senin, Januari 23, 2012

Quick Tip: Regex Match Entire String

(for Bahasa Indonesia, see below.)

This is the scenario:

All right, today i'm going to find out how to match a pattern within entire string with regex. What i mean is when i try to check a string, they must have exactly 1 numeric character in the beginning, and unlimited alpha character after. This is what i mean:

  • 0432 should return false
  • 0yep should return true
  • dada 0yep should return false
  • 0yep                                                      should return false
  •                     0yep should return false

so i use this regex:

preg_match('/[0-9][a-z]+/i');

Unfortunately, it also match the third, fourth, and five. After some research, i found there's ^ pattern that means "this pattern should beginning with..". So i changed it to

preg_match('/^[0-9][a-z]+/i');

and it doesn't match the third test case and the fifth case. Unfortunately, it still match the fourth. Again, after some research i found there's $ pattern that means "this pattern should end with..". So i change it to:

preg_match('/^[0-9][a-z]$+/i');

and everything work as expected.

Jumat, Januari 13, 2012

Talkin' Online Business

Sekarang banyak orang yang menggembar-gemborkan bisnis online (baiklah, di sini tidak saya terjemahkan sebagai daring). Tentu saja, kita semua masih ingat bagaimana Bhinneka.com meluncurkan penjualan komputer (dan partnya) secara online pada masa tersulit, krismon. Dan, berhasil. Anda juga pasti tahu banyak penjual yang hanya meraup untung dari FJB Kaskus. Serta cerita lainnya.

Rabu, Januari 11, 2012

Cut The Rope Chrome

Mau Anda sebut chrome, FF, Opera, IE, yang Saya lihat ini salah satu bentuk promosi Microsoft terhadap HTML5 Metro Apps atau IE9. Tetapi yang pasti, apps ini berjalan mulus di peramban Chrome 15 yang Saya coba.

Luar biasa. Ini hanya dengan canvas dan Javascript. Saya penasaran dengan rumus matematis yang mereka pakai. Iya, dari dulu saya sangat pensaran dengan permainan Physics, apalagi yang melibatkan collision dan fluids (dalam hal ini, tali).

Coba deh :D

(video dari Youtube)

Kamis, Desember 15, 2011

SVN Rename



Saya menemukan masalah saat mengcommit repositori SVN yang di dalamnya terdapat folder yang telah Saya re-name. Katanya, foldernya tidak ditemukan. Padahal jelas-jelas ada!

.. Ternyata masalahnya adalah karena di dalamnya ada informasi subversion. Jadi di dalam setiap folder di repositori SVN, terdapat folder hidden .svn yang menyimpan asosiasi folder dan file kita dengan server.



Jadi solusinya? Hapus saja semua folder .svn dari folder yang ingin di-rename (jangan menghapus keseluruhan .svn, karena nanti harus checkout ulang), kemudian add, dan checkout. Sebuah beres semua bahagia.

Meski, me-rename bukanlah solusi. Untuk project besar, jangan coba-coba lakukan ini di tengah jalan. Karena ini sebenarnya bukan rename, tapi delete dan add new. Jadi modifikasi tidak akan dicek. SVN akan menganggap ada penghapusan keseluruhan suatu direktori dan ada penambahan masif.

Selasa, November 29, 2011

Gaya Khusus Peramban (Browser Specific CSS Attribute)

Misalnya:

-webkit-box-shadow: 0 0 5px black;

akan membuat efek bayangan di sekitar target. Tetapi, apa bedanya sama:

box-shadow: 0 0 5px black;

Apa bedanya? Kayanya sama aja tuh. Beda. Coba buka di Firefox (4 ke atas) dan di Chrome. Di chrome berjalan mulus untuk kode paling atas. Tapi di firefox hanya berjalan kode yang bawah. Kenapa bisa begini?

karena -n-m (dengan n adalah nama browser/engine dan m adalah nama atribut) sebenarnya adalah atribut css eksperimental yang belum secara resmi didukung oleh W3C. Dan ini browser specific. Sebut saja CSS transformation. Atribut ini membolehkan kita untuk menampilkan objek dengan styling yang aneh sedikit. Misalnya skew, rotate, scale. Secara resmi, ini belum didukung penuh oleh W3C (masih eksperimental/dalam draft). Maka dari itu harus memakai atribut -moz-transition dan/atau -webkit-transition.

Tertarik memakai fitur eksperimental ini? Coba lihat-lihat tentang CSS3 (lihat bagian CSSnya, abaikan html). Perhatikan bahwa di sana banyak atribut CSS dengan awal -webkit- yang menunjukkan bahwa hingga saat ini atribut tersebut hanya didukung oleh webkit (engine yang digunakan Chrome sebagai renderernya)

Rabu, November 16, 2011

Kalah Sama Feed

Saya gak yakin bahwa kita bisa kalah dengan Feed.

Anda pasti sangat mengetahui, di Twitter, meskipun banyak orang yang memfollow kita dan kita sering mengupdate twitter kita, sangat tidak mungkin tweet 2 tahun yang lalu muncul di lini waktu. Artinya, Anda kalah dengan feed. Anda kalah `waktu` dengan tweet yang lain. Karena sistemnya, siapa yang nge-post paling akhir, dia yang muncul paling pertama.

Sistem ini gak terlalu baik untuk menampilkan lebih dari 1000 post per menitnya. Yang ada Anda akan pusing melihat feed itu terlalu cepat bergerak.

Facebook memilih pendekatan yang lebih baik. Dengan algoritma khusus yang dia miliki, dia dapat menampilkan post yang hanya memiliki relevansi tinggi dengan kita, dan itu bukan berarti post yang baru. Post yang lama pun termasuk. Meski sistem ini lebih baik, bagaimanapun, dia tidak memunculkan post 2 tahun yang lalu. Karena `relevansi tinggi` itu hanya untuk post yang sering didiskusikan saja (baca: aktivitas di post itu tinggi, misal commentnya/viewnya/likenya banyak).

Facebook merubah pendekatan ini dengan "On This Day in 2009/2010". Facebook akan menampilkan status kita di tahun sebelumnya (jika ada) di tanggal yang sama. Oke berarti probabilitas kita melihat post kita 2 tahun yang lalu lebih besar.


Sekarang, kita gak kalah sama feed lagi.

Sabtu, November 12, 2011

Minggu, Oktober 30, 2011

Freebie: Sertifikat

Jadi ceritanya tadi Saya ada senior Saya yang minta desain sertifikat. Saya pernah membuatnya,, tetapi Saya khawatir masalah hak cipta, maka dari itu Saya buat saja yang baru.

Terima kasih kepada pembuat Blue Orb juga, Saya gunakan artwork beliau di sertifikat ini. Aslinya, gambar Blue Orb ini dilisensikan dalam CC-NC-SA

http://www.mediafire.com/?m8soepg2csa018q

Sabtu, Oktober 29, 2011

WHAT?! Decoder H.264 via Javascript?

Tautan asli: http://badassjs.com/post/12035631618/broadway-an-h-264-decoder-in-javascript-running-at


Broadway: An H.264 Decoder in JavaScript Running at 30fps
image
I’ve been seeking an H.264 decoder in JavaScript for some time now, and my wish has finally come true.  We’ve seen lots of other formats be implemented in JS, including PDFMP3MP2PNGJPGBMP and more, but the real test of whether JS is really up for the task in terms of performance would be decoding a video codec and displaying it at a reasonable frame rate.  We aren’t quite there yet as this demo really requires Firefox Nightly with Type Inference turned on (very cool btw) to get even decent frame rates, but it is a start.
Broadway, by Michael Bebenita is a demo of Android’s open source C++ H.264 decoder compiled to JavaScript with Emscripten, and then optimized with Google Closure compiler.  It is not hardware accelerated in any way, so it will probably use a good deal of CPU, especially in non Type Inference’d environments.  They are also currently working on an hand-rolled JS implementation which is not yet complete.
I have put up the demo for you to check out.  Please make sure you are running Firefox Nightly, otherwise you will probably be very disappointed. If you aren’t running the nightly and don’t feel like downloading it, just to prove that 30 fps video decoding in JS is possible, here is a video of Brendan Eich showing off the decoder in a presentation.
image
Some of you might be asking why?  Why would you want to implement formats like this that should be implemented in hardware in JavaScript of all places?  Well, unfortunately there are browsers like Firefox that refuse to implement the defacto-standard in video codecs in their browsers.  Whether or not it would cost them money, it is against their morals to include anything patented in their software.  OK.  So what’s the next best course of action?  Well, you can either encode your videos in three different codecs to cover all your bases, or just in H.264 and use the JavaScript implementation to play it.  And plus, it is an extremely cool demo showing that JavaScript doesn’t have to be a slow language like some say it is.
Mozillian Mike Shaver is totally jazzed about this work, not because of H.264 itself necessarily, but because it shows that JS can be really fast and that “people should be very skeptical of claims that we need to replace JS (Dart, NaCl) to go fast,” as he told me on Twitter.
This is very cool work!  Let’s all thank the browser JS engine developers who make our code go fast.  As you can see from this demo, there is still much to come!

Sabtu, Oktober 22, 2011

Jatuh Cintrong dengan sessi

Sassy (atau dibahasaIndonesiakan disebut sessi?) adalah sebuah ruby gem yang memungkinkan kita "editing style with more style". Saya melihat Sassy dapat memudahkan kita dalam membuat css yang lebih terstruktur.

Ceritanya, saya belum punya Ruby. Akhirnya install dulu. Ternyata mudah! Sama mudahnya dengan mengunduh dan mengompile node.js (Ya, entah kenapa Saya sekarang suka apps apps yang "compile by yourself" :p gak terlalu sulit juga, meski ruby untuk windows bisa gak install sendiri).

Dann.. Yay, dengan gem install sass, tunggu sebentar (awalnya sempet ragu karena cmd hanya hitam saj), tahu-tahu langsung 1 gem installed. Oke, it's sassy time!



Yang paling saya suka adalah karena kita bisa menyisipkan fungsi dan variabel di dalam sass. Juga, kita bisa membuat cssnya nesting! Coba lihat kode sumber berikut:

// tes.scss <-- i love this! C style commenting!
.gakpakemargin { margin: 0; padding: 0 }
body {@extend .gakpakemargin; font-family: Segoe UI}
nav { ul, ol, li { /* semua ul dan ol di dalam nav gak pake margin dan list style nya gak ada */ @extend .gakpakemargin; list-style: none; } }

Oh iya, itu baru penggunaan extend dan nesting. Masih banyak fungsi sass lainnya.

Menarik sekali!

Unknown Identifier: '/'

PHP lagi! Jadi ceritanya, saya mau targeting teks antara $sesuatu dan /$sesuatu

Semuanya berjalan mulus di regexr dengan bentuk

(\$)([A-Za-z0-9]+)(.+)(/\$)([A-Za-z0-9]+)

dan sama sekali tidak berjalan dengan lancar di PHP untuk kode:

preg_match_all("/(\$)([A-Za-z0-9]+)(.+)(/\$)([A-Za-z0-9]+)/s", $datamentah, $array_multiple);

Setelah searching di Google, ternyata hal ini disebabkan Saya memakai identifier yang sama untuk penanda awal bentuk dan akhir bentuk. Solusinya, ubah saja penandanya. Di sini saya memakai persen:

preg_match_all("%(\$)([A-Za-z0-9]+)(.+)(/\$)([A-Za-z0-9]+%s)", $datamentah, $array_multiple);