Asynchronous Driver
by ksetyadi on April 5, 2011
I’ve been driving for years and I found that driving in Jakarta nowadays needs a little more of everything to be done. More skills, more patience, and more time. As the traffic jam always hit everywhere in the town, I should not expect more than 60 kph to move on the road. That’s extremely too fast.
While I’m sitting in the cockpit (seriously, I like to call it ‘cockpit’), I thought of some programming method that can be implemented to reduce the stress.
private class DrivingTask extends AsyncTask<Void, Void, Void> {
@Override
protected void doInBackground(Void... params) {
doDriving();
return null;
}
}
public void doDriving() {
playMusic();
moveTheCar();
}
I just ignite the engine and start executing these codes:
DrivingTask drive = new DrivingTask();
drive.execute();
Simple.
(Suddenly, the car behind me start to honk the horn. Dammit!)
4 comments
Geek!
by iyay on April 6, 2011 at 12:02 am. #
Designer!
by ksetyadi on October 11, 2011 at 4:04 pm. #
I driving motorcycle -in jogjakarta. I think i dont need that playMusic() part. Hehehe.
Btw, hei, i know u, when u’re still in mipa! i’m with linggar :D
by Fajr on April 6, 2011 at 3:27 pm. #
In the future, it’s possible though.
by Kristiono Setyadi on April 7, 2011 at 2:38 pm. #