The Pragmatic Programmer

Tulisan iseng kalo ada waktu.
See also: Other Geeks@INDC

May 2009 - Posts

Tantangan Pemrograman - 7

Sekarang di website geeks.netindonesia.net.blogs ada gangguan kecil yaitu munculnya pesan untuk menginstal IE. Pesan ini hanya muncul jika kita menggunakan FF. Nah, tantangan kali ini menguji daya berfikir di luar kotak anda. Coba cari tahu bagaimana caranya untuk tetap menggunakan FF untuk melihat website tersebut namun tanpa ada gangguan pesan untuk menginstall IE.

 

Share this post: | | | |
Ada yang bisa menjelaskan?

Ruby Foundations
This book relies heavily on a firm understanding of Ruby. This section will
explain some aspects of Ruby that are often confusing or misunderstood. Some of
this may be familiar, but these are important concepts that form the basis for the
metaprogramming techniques covered later in this chapter.
Classes and Modules
Classes and modules are the foundation of object-oriented programming in Ruby.
Classes facilitate encapsulation and separation of concerns. Modules can be used as
mixins—bundles of functionality that are added onto a class to add behaviors in lieu
of multiple inheritance. Modules are also used to separate classes into namespaces.
In Ruby, every class name is a constant. This is why Ruby requires class names to
begin with an uppercase letter. The constant evaluates to the class object, which is an
object of the class Class. This is distinct from the Class object, which represents the
actual class Class.* When we refer to a “class object” (with a lowercase C), we mean
any object that represents a class (including Class itself). When we refer to the “Class
object” (uppercase C), we mean the class Class, which is the superclass of all class
objects.
* If that weren’t confusing enough, the Class object has class Class as well.

Share this post: | | | |
Tantangan Pemrograman - 6

Coba buat viewport untuk menampilkan gambar dengan behavior seperti yang ada di google map android (http://www.youtube.com/watch?v=_YFw9p0TjT8) dimana user bisa men-drag gambar dan ketika melepaskan jarinya dari layar maka gambar akan tetap terseret kemudian berhenti sendiri. Kita juga bisa menentukan overlay (icon) di gambar tersebut dengan memberikan koordinatnya dan user bisa mengklik overlay. Misalkan gambarnya adalah peta lapangan bola, maka kita bisa menaruh overlay seperti icon gawang yang begitu diklik akan menampilkan informasi gawang atau lainnya. Akan lebih baik lagi bila kita bisa menggunakan latitude dan longitude sebagai koordinat.

Share this post: | | | |