Climate Change, a Small Footprint

December 7th, 2007 by gin2

Long ago when i was on the way to my elementary school, i and some friends had to wear a bold jacket to avoid the cold weather. The fog also surrounded us tightly, a very beautiful nature! But now, you see, especially, whom has visited my Bandung exactly ever faced an extremely weather change as well as temperature raising. Why? I don’t know exactly but one thing for sure, years after (and now), thousand houses have been erecting in the northern area while cutting many trees despite such area as the pollution absorber.

Finn de Bailar

October 19th, 2007 by gin2

Apologize to someone who missed this composition. I deleted it with no intention, just an accident. So, here it goes again "Finn de Bailar", means "Last Dance", a piano composition i wrote months ago. But, obviously this work is far from imperfection not only in concept neither aesthetic course. I do welcome critics.

90% Ragu, 90% Ditonton, 90% Amburasut

October 14th, 2007 by gin2

Menonton film horor Indonesia memang penuh debar. Debar saat menebak filmnya akan bagus atau tidak. Namun, selalu saja ditonton, hehehe. Dan, tulisan ini dibuat tepat 2 jam sesudah saya ‘ditakut-takuti’ Pocong 3.

Pocong memang memiliki tempat tersendiri dalam sisi pengecut masyarakat kita, termasuk saya. Pocong memiliki kedekatan spiritual dengan dunia kematian, khususnya kaum Muslim. Bergentayangan dengan pakaian tersebut jelas mengingatkan kita pada seseorang yang baru saja dikubur dengan tradisi Islam. Walaupun dalam konteks sejarah, stigma Pocong dibangun oleh pembantaian para penganut sekte yang dianggap sesat oleh penguuasa Demak pada abad 14.  Mayat mereka dijajarkan di pantai Parang Kusumo, Jogjakarta, dengan pakaian seperti itu, tentu saja, dengan berbagai tebaran ancaman pada pengikut yang masih belum tertangkap serta simpatisan. Ancaman ini mungkin terus dihembuskan dalam mitos dan relung-relung budaya Jawa.

Kembali ke film Pocong 3. Saya berharap sequel ini akan memahami rasio sebuah film, meyakinkan penonton. Film selalu memiliki struktur dan ‘logikalisasi’ yang perlu diadopsi penonton. Sayang, Pocong 3 tidak memberikan itu. Dramatisasi pergi ke antah-berantah. Setiap ‘realita’ selalu disodorkan tidak secara utuh. Penonton dipaksa menghubungkan dan menebak patahan-patahan cerita yang sebenarnya saya yakin penulis skenario maupun sutradara tak berniat untuk menyiksa penonton dengaan cara seperti itu.

Intro sudah cukup meyakinkan saya bahwa film akan dibawa ke ritme yang stabil, namun saya salah. Film malah menebar banyak titik yang sulit dihubungkan dan memecah perhatian untuk hal yang tidak perlu. Siapa si Merah? Kenapa membahas ilmu kebal? Tujuan mengisi cerita dengan perselingkulan? Kenapa Garry Iskak harus selalu jadi bencong, apa fungsi Ringgo? Kenapa setelah berhadapan muka dengan Pocong sejarak 5 Cm masih mengatakan hal ghaib itu jangan dipercaya?

Satu hal lagi, saya ingin bertanya apakah film ini akan bercerita soal Pocong atau DJ? Karena tema DJ terlalu berlebihan diekspos.

Ending? Jangan tanya. Teu puguh!!

Mac do Windows Many Times

October 8th, 2007 by gin2

Mac do WindowsYeah, finally i got one software named Parallel Desktop 3.0, a virtual machine to run Bill Gates’s proud, Windows, on Mac. Installation took really easy, it almost took only 15 minutes to finish and bang! This software also give me a lot of parameter to adjust everything regarding the computing resource needed. I run Windows XP SP2 on my Mac Book Pro, and, i think, it’s running smoothly. Parallel Desktop can also run Windows on full screen mode so we will feel like in trully Windows environment. We also do not lose any default commands of Windows. This software is not the only one, we can use BootCamp which is directly endorsed by Apple itself, but, you should have a large storage and bandwidth either. BootCamp almost takes 347 MB and will occupy your at least 10 GB of your storage after installation. But, BootCamp is a little bit different with Paralle Desktop because BootCamp will be installed in different partition of Mac and considered not much Virtual and the addition is BootCamp provides you all stuffs to run Windows with no hassle like drivers and so on.

Sekali Lagi, Virgina Tech

April 17th, 2007 by gin2

Amerika memang menyimpan sesuatu yang aneh dengan lembaga pendidikannya, sering terjadi pembunuhan besar. Lihat di sini. Kali ini menimpa Virginia Tech, sebuah perguruan tinggi cukup prestisius.

Mengapa Seseorang Sanggup Membantai?

Tak ada penjelasan ilmiah. Seorang murid bisa saja bangun pagi-pagi, mengangkat senjata dan menghamburkan peluru ke arah teman-temannya di sekolah.

Selamat Jalan Chrisye

March 30th, 2007 by gin2

Aku merasa kehilangan salah satu sahabat remajaku, seorang pria dengan suara tipis menyanyikan berbagai lagu indah. Teringat akan “Anak Jalanan”, “Angin Malam”, “Badai Pasti Berlalu”, “Pagi yang Cerah”, “Lilin Kecil”, yang ikut membantu melintasi masa remaja, masa yang pasti cukup sulit bagi semua orang.

Masih kucari dimanakah bisa kudapatkan “Guruh Gipsy”, dimana kau sempat singgah. Walaupun kau pergi tetap senandungmu adalah bagian dari senandungku juga. Setelah kau pergi, entah kepada siapa kita percayakan sebuah lagu ditembangkan . Selamat jalan, Chrisye. Badai sudah berlalu, semoga saat ini dalam damai dan menyanyilah di surga.

Make a RSS Feeder for Your Site

March 29th, 2007 by gin2

In this time, i’d like to show you how to make a RSS enabled site. Firstly, we have to clear things about RSS itself.

RSS: How the content flies everywhere

RSS (Really Simple Syndication, or elses) technology enables content to read not only where it located. How can it be? simple. RSS just a bunch of text file which standardized in formatting. Because of W3C (WWW Consortium) has been pointing XML as a universal data formatting to be exchanged among applications, XML is becoming the foundation of RSS itself.

The Structure of RSS File

RSS file contains some standard tags to be used. Look a sample below:

<?xml version=”1.0″ encoding=”utf-8″?>
<rss version=”2.0″>
<channel>
<title>JCO Donuts and Coffee News</title>
<description>You can syndicate our content freely</description>
<language>en-us</language>
<docs>
http://backend.userland.com/rss</docs>
<generator>PHP/</generator>
<item>
<title>Technology Update</title>
<link>
http://localhost/jco_ok/index2.php?page=read_news&id=10</link>
<description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tatio</description>
<pubDate>Thu, 08 Mar 2007 10:14:55 +0700</pubDate>
<guid isPermaLink=”false”>
http://localhost/jco_ok/index2.php?page=read_news&id=10</guid>
</item>
<item>
<title>Kongkalikong Jeger</title>
<link>
http://localhost/jco_ok/index2.php?page=read_news&id=9</link>
<description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tatio</description>
<pubDate>Thu, 08 Mar 2007 09:44:42 +0700</pubDate>
<guid isPermaLink=”false”>
http://localhost/jco_ok/index2.php?page=read_news&id=9</guid>
</item>
</channel>
</rss>

Detailed explanation:

<?xml version=”1.0″ encoding=”utf-8″?>

The first line XML above means the file must be consider as a XML entity (technically, force browser or any content readers read the file as XML file ).

<rss version=”2.0″>

The second line states itself as RSS 2.0, means, the readers must be able to adopt RSS 2.0 (newest version).

<channel>

The channel opening tag is notice the reader to start fetching the whole body of content. 

<title>JCO Donuts and Coffee News</title>
<description>You can syndicate our content freely</description>
<language>en-us</language>
<docs>
http://backend.userland.com/rss</docs>
<generator>PHP/</generator>

Above part commonly called as meta of RSS containing the title of feed publisher, description and what language that used and how to get the documentation of RSS technology. Also, what programming language used to output the file.

<item>
<title>Technology Update</title>
<link>
http://localhost/jco_ok/index2.php?page=read_news&id=10</link>
<description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tatio</description>
<pubDate>Thu, 08 Mar 2007 10:14:55 +0700</pubDate>
<guid isPermaLink=”false”>
http://localhost/jco_ok/index2.php?page=read_news&id=10</guid>
</item>

Here we go, we are in the most important of the feed. Firstly, browse above bunch of code. The most top line is <item> and the lowest one is </item>. Those tags mark the start and end of data which will be displayed on the reader. The amount of item is simply similiar of how many this part is repeated, ofcourse with a different data inside.

Ok, let’s make an analogy with a news in an ordinary newspaper. Text between <title></title> is relating to news title. <link></link> is similiar with the page you should go for the full text of news. <description></description> means the body of news. <pubDate></pubDate> means when the news is published. <guid></guid> means a string that uniquely identifies the item itself, some kind of indexing. Permalink, common term in blogging context, is a URL that points to a specific entry even it has passed from the front page. Permalink is a portmanteau word made from permanent link and is often simply stated so as to be human-readable.

</channel>
</rss>

Absolutely, the closing tags and define the end of RSS statement. Remember, you must make the RSS file in well-formatted condition or your content will not readable! Go to http://validator.w3.org/ to check your file validity.

Ok, Feed Doesn’t Always a *.xml File

Feed also can be a PHP file, means? It means you can output dynamic data without involving physically file writing mechanism which eat the server resources. Here is the sample script (you will need a MySQL server and database):

 

<?php

include(”config/config.php”);
include(”lib/class/class_database.php”);
$db = new Database($db['host'], $db['user'], $db['pwd'], $db['name']);
$db->Connect();

$q = “SELECT * FROM news WHERE active = 1 ORDER BY idnews DESC”
$q = new Query($q);
$q->Fetch();

/**********************************************************************************
* rss.php
* Version: 1.00
* Author: Gins
* Date: 05/21/2004
*
http://gin2.info/
*
**********************************************************************************
header(”Content-Type: text/xml;charset=utf-8″);
// prepare HTML text for use as UTF-8 character data in XML
function cleanText($intext) {
return utf8_encode(
htmlspecialchars(
stripslashes($intext)));
}

ECHO <<<END
<?xml version=”1.0″ encoding=”utf-8″?>
<rss version=”2.0″>
<channel>
<title>JCO Donuts and Coffee News</title>
<link>
http://localhost/jco_ok/feed.php</link>
<description>You can syndicate our content freely</description>
<language>en-us</language>
<docs>
http://backend.userland.com/rss</docs>
<generator>PHP/$phpversion</generator>
END;

// loop through the array pulling database fields for each item
do {
//$title = date(”r”, strtotime($q->Fetch["date"]));
$title = cleanText($q->Fetch["title"]);
$image = $site_url.”module/mod_news/image/”.$q->Fetch["image"];
$link = $site_url.”index2.php?page=read_news&id=”.$q->Fetch["idnews"];
$guid = $site_url.”index2.php?page=read_news&id=”.$q->Fetch["idnews"];
$description = cleanText($q->Fetch["body"]);
if(strlen($description) > 200){
$description = substr($description, 0, 200);
$description .= ” <a href=$guid>[more]</a>”
}
$pubDate = date(”r”, strtotime($q->Fetch["date"]));

// display an item
ECHO <<<END

<item>
<title>$title</title>
<image>$image</image>
<link>$link</link>
<description>$description</description>
<pubDate>$pubDate</pubDate>
<guid isPermaLink=”false”>$guid</guid>
</item>
END;

} while ($q->Fetch());

ECHO <<<END

</channel>
</rss>
END;

?>

You will need this like SQL script:

CREATE TABLE news (
idnews INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
idnews_category INTEGER(10) UNSIGNED NOT NULL,
iduser INTEGER(10) UNSIGNED NOT NULL,
date DATETIME NOT NULL,
title VARCHAR(200) NOT NULL,
body TEXT NOT NULL,
image VARCHAR(255) NULL,
active TINYINT(1) NOT NULL,
PRIMARY KEY(idnews)
);

Inform Firefox to show RSS icon at Address Bar

After all creating process is done let’s go the next step. How can visitors know that a web page contain a feed? One of solutions from Firefox is showing a RSS icon at the adress bar. You can order Firefox to this by inserting below code between <head></head> of your index file. I.e:

<head>

….

<LINK REL=”alternate” TITLE=”JCO Donut & Coffee | RSS” HREF=”feed.php” TYPE=”application/rss+xml” />

</head>

 

Good luck!

Classical Snippet: Finn De Bailar

March 27th, 2007 by gin2

I’d love to share my short composition which planned to be the first movement of a sequential works based on an unfinished textual scenario. I do welcome any critics. This snippet entitled: Finn De Bailar (Last Dance). You can download here

John Lennon on My Piano

March 24th, 2007 by gin2

Just wanna share my tribute to John Lennon. I please you to download my poor piano play. The song is entitled “Jealous Guy”, the most intimate song of John Lennon after his golden time with The Beatles. You can download here.

The Danger of PHP Nude Code

March 20th, 2007 by gin2

Dear Developers,

I do suggest you to not write any critical codes especially referred to your site configuration with no encoding. Just use maximum encoding to reduce the risks. Download or buy dedicated softwares such as Ioncube or PHTML Encoder. Many accidents occured that server force PHP files to be downloaded by client instead rather than executed by.