1.8.08

Better Memory Management With Vista

Today, i just found out that Vista handles segfault much better than XP. I have reproduced the problem as you can see at the picture below.

 

nasty_small

 

While XP insanely kept ignoring this until it finally went to a boom boom (i can tell you it was horrible!), Vista treated it much better.

You see at the picture above, Vista just "localized" the problem.

I'm gonna find out more about this. But right now, all i can think of is how process in XP could easily pollute user space.

Incremental Link

I saw someone at dotnet forum asking for a help on building a very simple application.

He said that when he built the project, he encountered an error on something that has to be related with msvcr90d.dll.

And then the story continues to Incremental Link...

 

I think it's better for me to explain a bit about incremental link (/INCREMENTAL).

This option has nothing to do with the run-time library. It's just a smart mechanism to aid us as a programmer.

Before that it's also important to know the "flow" in order to produce the EXE. Basically there're 2 steps, compiling and linking.

When you compile a source file (C source file for example), you're going to generate an object file. That object file(s) will be linked together, and voila.. you have your EXE.

You see, compile -> link -> exe.

Imagine you have a huge project (ballistic missile control project) that contains hundreds (or maybe thousand) of source file. When you change 1 source file you have to build the whole project. Compiling and then linking those hundreds object files. What this means?

Total waste of time.

 

And this is how incremental link works. You don't have to build the whole project, and waste your precious time.

When you activate this option, you'll see an ilk file. I would say this is a database which contains information about your project. For example timestamps of every object file you generated before. So when you change one file, and you generate object file, that (only) changed object file will be "patched" to a previously exe.

 

Let's experiment this, and compare the time needed to build the project. See the difference?

But, yes there's a but :)

1. Your application will be fatter (in my case 1.78 MB vs 1.43 MB)

2. May contain jump thunks*

 

Also, there's an important note from the MSDN:

To ensure that your final release build does not contain padding or thunks, link your program nonincrementally.

 

If you want to know more about code and data padding or thunks, check this website:

http://msdn.microsoft.com/en-us/library/4khtbfyf(VS.80).aspx

or this:

http://docs.sun.com/source/806-3567/ild.html

 

Back to the problem with our very simple application problem. I would say the problem is in the run-time library. He needs to make sure which library he wants to link. When he said there's an error with msvcr90d.dll. He must have linked the application with msvcrtd.lib. And this is the multithreaded and dynamic link (debug) version.

Make sure this with project's settings.

1.  C/C++ -> Code Generation -> Runtime Library

2. Linker -> Input

28.7.08

(kinda) Addicted to Andrew

I don't know why, but i guess i'm kind of addicted to this shoes.
In fact yesterday was the 3rd buy.
My first impression with this shoes (as i wrote down on their customer satisfaction survey form) is comfort. I gotta admit their shoes is (until now) the most comfortable shoes i have ever owned.
Not to mention its durability. (this shoes has helped me a lot during Jakarta's yearly flood)

They used to give goodies for every purchase (i have a mug and an umbrella), but sadly they just stop this giveaway. Yesterday they gave me a 100k voucher. (but, yes it's a but) You can only use that voucher to buy kids shoes, and not only that.. the voucher itself, will be expired this august. Sad.

21.7.08

Win32 Programming Training

Hari sabtu kemarin, saya bawakan materi Basic of Win32 Programming (part of C++/Win32 at MIC University of Indonesia event)
Materinya sendiri masih seputar how Windows application works, how Windows interacts with our application, etc

Untuk beberapa orang, programming dengan mengakses langsung Win32 API dengan language seperti C akan sangat mengerikan. Ambil contoh saja untuk menampilkan Hello World's window dibutuhkan sampai lebih dari 50 baris kode!
Untuk apa menyusahkan diri?
Jawaban.

Semoga tidak membuat patah semangat para peserta training ini. Semoga :)

9.7.08

Setelah Sekian Lama "Idle"

Memang 2 bulan ini campur aduk aktifitas. Banyak waktu habis di jalan juga.
Tapi senang juga, karena berada dalam tempo yang tinggi.
Persiapan menuju "big day" lumayan juga. Mungkin tinggal beberapa hal - hal kecil.
Yang terpenting malah persiapan mental.
Kadang aneh juga lihat orang yang seluruh perhatiannya ditumpahkan "hanya" untuk 1 hari itu. Sepenting itukah 1 hari itu? (Ya, memang orang bisa ber-argumentasi itu khan once in a lifetime)
Bahkan semua yang kita lakukan prinsipnya "once in a lifetime". Consider this.
Makanya saya mau menjalani hidup saya seperti besok saya akan mati.
Ya, sesuai banget dengan kata - kata manis dari papan kayu nisan di rawaseneng.
Me today, you tomorrow. (Saya benar - benar mengagumi kedalaman kata - kata ini)

Anyway, saya coba manfaatkan waktu saya yang campur aduk tadi untuk membuat software baru. (Masih berurusan dengan SMS, lha wong saya cuma ngerti ini :) )
Tantangan terbesar bagi saya untuk membuat software ini adalah masalah kompatibilitas dengan Vista. Contoh kecil: fungsi fopen vs fopen_s, masalah UNICODE, dst..

Semoga sebelum "big day" itu, saya sempat release software ini.
Semoga.

Win32 (Works with Windows Vista)

30.4.08

Membelah Macet Demi Rupiah



Hidup adalah perjuangan tanpa henti, Yeah! :)
Btw, saran dari pak Krishnamurti benar - benar mujarab untuk memerangi stress di jalan. Thanks a lot pak!

25.4.08

Kiriman Dari Microsoft

Kemarin dapat kejutan :)
Pulang dari kantor ada seonggok paket, ternyata dari Microsoft.
Isinya benar - benar berharga, harta karun!
Terima kasih Microsoft!


* i'm still thinking about VS6

21.4.08

Aston Villa.. Another Outstanding Performance

BIRMINGHAM, MINGGU - Aston Villa tampil luar biasa dalam derby lawan Birmingham City, Minggu (20/4). Ashley Young menjadi inspirator tim yang membawa Villa menang besar, 5-1, sekaligus membenamkan Birmingham di zona degradasi.

Dengan kemenangan itu, untuk sementara Aston Villa naik setingkat ke urutan 6, menggeser Portsmouth. Sebaliknya, Birmingham harus menerima kenyataan berada di zona degradasi.

Derby Birmingham ke-115 ini tak seperti yang diharapkan. Villa terlalu dominan, sebaliknya Birmingham terkesan kesulitan mengembangkan permainannya.

Disaksikan pelatih timnas Inggris, Fabio Capello, Ashley Young bermain keranjingan. Dia seolah ingin menunjukkan bahwa dirinya pantas menghuni skuad Three Lions. Sejak awal, dia terus merepotkan pertahanan Birmingham, bahkan membuat serangan Villa terasa begitu mudah.

Dia pula yang membuka kemenangan Villa pada menit ke-28. Dia juga mencetak gol kedua pada menit ke-63. Sementara striker asal Norwegia, John Carew juga membukukan dua gol pada menit ke-42 dan 53. Satu gol lagi disumbangkan Agbonlahor menit ke-78. Satu-satunya gol Birmingham dibuat Mikael Foresell menit ke-67.

Ashley Younglah bintang pertandingan itu. Selain mencetak dua gol, dia juga ikut membidani gol John Carew dan Agbonlahor.

Hasil itu menegaskan permainan Birmingham memang memburuk. Dalam 10 pertandingan terakhir, mereka hanya mampu mendulang dua poin. Sebaliknya, Villa menunjukkan diri semakin memesona. Mereka mampu mencetak 14 gol dalam tiga kemenangan terakhir.

Ini membuat keyakinan diri Villa semakin membesar untuk menghadapi Everton di pekan mendatang. Partai itu bakal ketat dan panas, karena bakal menentukan siapa yang layak berada di urutan kelima. Villa hanya tertinggal tiga poin dari Everton yang sementara menduduki urutan kelima. (BBC)

Taken from http://www.kompas.co.id/bola.php/read/xml/2008/04/20/20560344/villa.benamkan.birmingham.5-1