Tag Archives: Programming

Parallel asynchronous functions with NodeJS promise

Long time since I last wrote a post. So recently I’ve been doing NodeJS and meets a cool feature: Promise. Promise is a way to make asynchronous callback look like serial, so instead of writing doSomething(function(err,obj){ if (err) … … … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

[ios] Drawing unicode string in CGContext

There’s one big, big defect in CGContextShowText function. It only works for ASCII characters. There’s actually another way to draw in CGContext using NSString drawInRect: method, but it doesn’t work in my case because I need to calculate all the … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

[iOS] Automatic Reference Counting and cross reference

Even with Automatic Reference Counting (ARC) feature in iOS 5, cross reference between objects should still be treated with care. A cross reference is where 2 or more objects are referencing each other, making circular reference. In which case, the … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Easy comment-uncomment with 1 character

This is commented. /* do_something(); //*/ This is not. //* do_something(); //*/ Got this from a friend who got this from a friend who got this from a friend who…

Posted in Programming, Tips | Tagged , , | Leave a comment

[AS3] Nested function and asynchronous model

In early days I’m used to synchronous programming model, everything can be called sequentially so I don’t have to deal with callback, I can write the code very neatly. When I meet AS3, I learn much about asynchronous functions, callbacks … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Cara Sederhana Membedakan Script PHP untuk Development/Deployment

Saat sedang kodang-koding di kantor, tiba-tiba saya menemukan penggunaan require_once pada php yang agak menarik. Seperti yang kita tahu, require_once memasukkan sebuah script hanya pertama kali dipanggil. Jika script yang sama dimasukkan 2 kali, pemasukan kedua tidak dilakukan. Masalah yang … Continue reading

Posted in Programming | Tagged , , | Leave a comment

C++ vector iterator: a foolish amateur mistake by me

I write this so other people won’t make the same mistake like me.. well no, just to babble about my bad day. I wrote a code and tried to debug hours without result, my program keeps crashing. I thought my … Continue reading

Posted in Curahan Hati, Programming | Tagged , , , , | 5 Comments