Means To an End

It has been quite a while since my first Hello World in BASIC and I have since absorbed a few more languages to my liking. Back in college, C and C++ were 2 of the primary languages taught which is fine. But then, there’s this junior who asked me: “Why do I have to learn something nobody can see?”. That guy asked a very valid question. For some, crunching codes into you favorite editor with only you and the machine communicating is of the utmost fun but for others, it’s not as fun. So with this particular question, one can conclude that either you’re gonna code more in backend or frontend is pretty much answered, but that’s topic for another day. ...

June 21, 2013 · Batista Harahap

chuck-norris-php

It is what is - A PHP client to get Chuck Norris from The Internet Chuck Norris Database: icndb.com. Codes at the usual - https://github.com/tistaharahap/chuck-norris-php Chuck will come after you…you have been warned!

November 9, 2012 · Batista Harahap

Naive Bayes Classifier - Revisited

During the last week, I’ve been following up work with a side project to do machine learning with Urbanesia’s comprehensive data. A lot of late night reading and fiddling with foreign codes were the highlights of my last week. Wanted to elaborate my implementations and how several kinds of technologies affect benchmarks particularly with classification performance. The repo for the codes is at Github here. During time span of the first batch of codes until now, I have made lots of changes to the codes and also the data store. I wasn’t sure at first, which database will bring the best performance. I’m testing on a fairly low spec hardware which is a Macbook Air Late 2011 with 4 GB DDR3, SSD and Intel Core i5 1.7GHz, this is nothing compared to a real server relatively. By the way, although relatively low spec, she’s got a name, it’s Claire. ...

October 16, 2012 · Batista Harahap

Urbanesia - Open Source & Microsoft

Today I was a speaker at Microsoft’s SQL on PHP event and I’m displaying the slides for the presentation below. It was a fun moment of sharing experiences, laughters and geekdom. Urbanesia - Open Source & MicrosoftView more presentations from Batista Harahap.

July 7, 2012 · Batista Harahap

Simple Naive Bayes Classifier for PHP

Recently Hacker News is flooded with numerous articles discussing or at least mentioning Naive Bayes Classifier algorithm. It’s a basic algorithm to classify a set of words into a certain category (set) based on prior learning of words and its probabilities. It sounds simple enough but without actual technical guide book, it’s quite trivial since most of the information out there regarding it is too messy for newbies like myself. ...

February 27, 2012 · Batista Harahap

OAUTHnesia for PHP

It’s 2012 now and Urbanesia is publishing a new OAUTHnesia client for Urbanesia’s API. This time it’s for PHP. Why it took so long to actually finish a PHP version is because we gave up on a third party library that is too complicated to do simple things. So without further ado, the codes are available below.

January 9, 2012 · Batista Harahap

Tweeting #JustForFun

Java is an interesting fat lady if ur into BBW PHP is a supermodel still figuring out her identity JavaScript is a transvestite in Thailand: sexy, hot but not a woman still C is the girl that got away Objective C is someone you'd marry if you just spend more time understanding her Ruby is a definitely the best one night stand ever Bash is ugly but always there when you need her SQL can handle anything, works best on a threesome with NoSQL NoSQL is marriage material if only she understood me better Basic is the one we all shagged :p Virginity is a luxury lost over n over with developers alike with each new Hello World Python is muscular like her name but will u date muscular all the time? Your call lol Perl is autistic in her own space, mysterious and ur still finding reasons to get close to her Cassandra is sweet, exotic but doesn't speak english, but I guess love is universal :p

August 4, 2011 · Batista Harahap

Google Analytics JS - Here's a Non JS Fix

This will be the second time I once again dissect what is really happening with Urbanesia’s analytic results. The first time I dealt with it, we ended up breaking our own sacred oath not putting any inline Javascript with our HTML. Well now, we ended up not using any Javascript (in the future). These past few weeks our servers recorded an increase compared with previous months and somehow Google Analytics is not showing anything unusual. Our requests/second increased significantly with our application and CDN servers, this is a clear example of true users accessing our website. ...

June 9, 2011 · Batista Harahap

Android - AsyncTask Is A Beauty - Part 2

Here goes the second part of a short tutorial of how beautiful AsyncTask is, the first tutorial is here. Now that we’re moving up to our second activity which is Hacktivate, a brief description about it is that this activity essentially puts all the data retrieved previously and populate a custom layout ListView. To make reading and understanding easier, here are the codes first before anything else. package com.bango.acerid; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.jsoup.Jsoup; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.AdapterView.OnItemClickListener; public class Hacktivate extends Activity { private String jsonStr = ""; private JSONObject json; private List images = new ArrayList(); private List titles = new ArrayList(); private List writers = new ArrayList(); private List dates = new ArrayList(); private List links = new ArrayList(); private List body = new ArrayList(); private List description = new ArrayList(); private ArticleAdapter adapter = new ArticleAdapter(); private List l = new ArrayList(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.hacktivate); Bundle the = getIntent().getExtras(); jsonStr = (the != null) ? the.getString("listData") : ""; parseJson(jsonStr); ListView articleList = (ListView) findViewById(R.id.list); articleList.setAdapter(adapter); final Intent i = new Intent(this, PostViewer.class); articleList.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { i.putExtra("wvUrl", links.get(position)); i.putExtra("wvBody", body.get(position)); Hacktivate.this.startActivity(i); } }); } private void parseJson(String j) { try { json = new JSONObject(j); JSONArray rss = json.getJSONArray("rss"); int max = rss.length(); for(int i=0; i...

May 26, 2011 · Batista Harahap

Android - AsyncTask Is A Beauty - Part 1

Since last weekend, I’ve been coding more on Android and although the topic about AsyncTask is nothing new, I just wanna bring it up again to appreciate its simplicity and more importantly in real world usable best practice. So I decided to create an RSS client from FeedBurner and this time to get feeds from AcerID.com. The application basically loads all the feeds with its first Activity, show it with the second activity and another helper Activity to send direct emails for questions related with Acer products. Do mind the layout, it’s quite plain but it’s usable nonetheless. So before going on with the tutorial, I’m gonna show some screenshots from and MDPI emulator running Eclair and XHDPI emulator running HoneyComb. ...

May 26, 2011 · Batista Harahap