KKN etc
Real and integer - 7:12 PM 7/9/2006
In C, there is the data type “int” and “float”. When I met Pascal in university, I realized that the same data types are named “integer” and “real”, respectively. I hated those names because “integer” couldn’t actually represent all integers and “real” couldn’t actually cover all real numbers.
But that’s all just nitpicking, because then I couldn’t use the name Complex to model complex numbers, Point to model points in a plane, etc.
PHP 5 number parsing inconsistency - 7:08 PM 7/9/2006
Try entering a very large number in decimal (for example a hell lot of 9s). The number will be float(INF) (infinity).
However if you enter a very large number in hex (for example 0x followed by a hell lot of 9s) the number will be int(2147483647) which is the largest possible integer in PHP.
PHP 5 integer limit quirk - 6:55 PM 7/9/2006
In my machine’s PHP 5, the statement
<?php var_dump(0x7fffffff) ?>
outputs
int(2147483647)
while the statement
<?php var_dump(0x80000000) ?>
outputs
float(2147483648)
This hints that integers in PHP is 32 bit so the lower limit should be -0×80000000 or -2147483648. The silly thing is that
<?php var_dump(-0x7fffffff - 1) ?>
outputs
int(-2147483648)
as expected. However
<?php var_dump(-0x80000000) ?>
outputs
float(-2147483648)
which is pretty funny, since the previous output shows that technically the number fits into an integer. This is probably an intended feature to make the parsing quicker.
KKN - 8:43 PM 7/8/2006
So, what’s KKN like?
In regular KKN, we are assigned a random team and place. I’m taking thematic KKN, so the team and place is designed by the participants.
My KKN’s theme is something along the lines of “Optimalisasi Penggunaan TI” and the place is at Keparakan. I’m on the developer team (the others are “maintenance” and “socialization & migration”), and the main program is to make a disaster management system.
My workplace is at BID (Badan Informasi Daerah, Regional Information Office). Typically, I bike with Dimaz and Toni to get there and to get home. We leave around 8:30, arrive around 9:00, and get back home around 15:00. A nice activity to balance my lack of physical exercise.
There are currently 6 computers on the developer’s room. Because there are 6 developers, most of the time the leftovers aren’t doing something productive. There’s a plan to relocate 5 of the developers to another office (LTI) which has 5 spare computers.
We’re going to build the system using CakePHP, a web development framework using (guess..) PHP.










