‘Idulfitri 1426

Posted by Ikhwan on October 28, 2005

Selamat Hari Raya dan Maaf Zahir Batin
kepada anda semua pembaca blog ku yg budiman.
Aku minta ampun kalau ada tersalah silap, terkasar bahasa, tersakit hati, terbenci meluat, terdendam kesumat, terpekik terlolong, terhantuk dinding, dan terbang melayang.
Semoga berbahagia di samping org2 tersayang di hari lebaran ini.

(Bayangkan ada kad raya yg cantik warna biru kat sini. Ada gambar masjid, ada ketupat sikit kat depan.)

General Network Error, Data Wipe-Out, and Bad Rice

Posted by Ikhwan on October 24, 2005

Today I encountered a really weird SQL error. When I run this one stored proc in the Query Analyzer, I got something like this:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

Just like that. What the heck happened? This thing messed up almost half my day. After further investigating, I found out there’s this one table that cannot be opened. Not even using ordinary SELECT. Somehow, I end up with this SQL command called DBCC CHECKDB. It checks of index errors or something. I run it against that table, and it spit out this:

CHECKTABLE found 0 allocation errors and
1 consistency errors in table 'wcFWNPProposal,
System table mismatch: Table 'wcFWNPProposal',
object ID 205295841 has index ID 1 in sysindexes
but the status in sysobjects does not have the clustered bit set.
The table will be checked as a heap

Bleeh, what the heck is this. But as a clever programmer like you guys out there, I just knew that google can save the day once more. And finally found this MSDN page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_reslsyserr_2_014l.asp

Another bleeh. What the heck. I maybe am a clever programmer, but I’m no DB admin. Luckily I have a backup that I exported to Excel earlier this morning. Errr, actually this is the cause of all this mayhem. Okay, I’ll tell that after this, I wanna tell the solution first. Okay, using my kindergarten level DB skills, I just drop the table, create it back, and import the data. All done. Owh yeah. We can go recess and eat our kindergartenian sandwich now.

Uhuh, now we go to the cause of the mayhem. I intend to export some table to another DB. I scripted all the table structure, but I mistakenly run the script on the same DB. The script contains DROP before each CREATE, so it wiped-out all the data. My colleagues got a bit freaked out. Hihi, sorry guys :P I really hate it when I forget to select that DB dropdown list on the top of the Query Analyzer. Yuck. So the moral of the story is:

1) Don’t include DROP commands when exporting table structure. Very dangerous in the hand of the idle minded.
2) Remember to select that freakin’ DB dropdown list.
3) Remember to include PRIMARY KEY, INDEX, and CONSTRAINT declaration too.
4) If that last night’s rice still looks and smells okay, but beware, maybe it doesn’t taste okay. But you can make fried rice out of it, then it’s edible. But actually if you can, please avoid eating bad food, not really good for your health. I wonder if this is a part this chaos today? Owh?

Everything’s Gone Paperless Nowadays

Posted by Ikhwan on October 24, 2005

Undefinable Hollow

Posted by Ikhwan on October 24, 2005

For this few month, I feel that something is not quite right. I just felt empty. Undefinable hollow. In this few month timespan, I had probably the busiest time at office this year, had some things to do almost every weekends, met some old friends I haven’t seen for 5 years, and even help this friend with a very important thing. Seems like a lot happened didn’t it? But I just felt empty. Seems like all those things just fly by, blewn away by the wind of time. Or is it always like this? Only just now that I realize it?

Oh, btw, ASP.NET 2.0 is gonna be official real soon. Gotta find a book about it. Don’t wanna be late to jump on the bandwagon.

Mahu Jadi Dulu

Posted by Ikhwan on October 24, 2005

Aku ingin jadi gila. Seperti waktu dulu.

Some XAML Stuff

Posted by Ikhwan on October 19, 2005

YAGNI

Posted by Ikhwan on October 19, 2005

YAGNI adalah akronim You Aren’t Gonna Need It. Ia sebenarnya satu praktis dlm Extreme Programming yg maksudnya:

“Always implement things when you actually need them, never when you just foresee that you need them”

Aku cuba gunakan cara ni sekarang dlm kehidupan development seharian. Nampaknya ada kesan positif. Sebelum ni aku terlalu risau pasal future requirement. Kalau boleh nak cater semua keadaan, dgn harapan kerja akan lebih mudah nanti. Rupanya cara ni tak betul. Apa yg aku rasa aku perlukan nanti tu kadang2 tak diperlukan pun. Jadi masa terbazir utk sesuatu yg tak perlu.

Hidup pun lebih gembira. Tak adalah fikir banyak sangat. Tapi hati2 juga. Kena pastikan code kita masih flexible, dan tak terlalu susah utk diubah nanti. Dulu aku takut dgn perubahan. Sekarang aku faham perubahan akan tetap muncul. Yang penting minimakan kesusahan utk laksanakan perubahan tu.

Sikit demi sikit aku tengah kutip ilmu Agile methodologies ni. Setakat ni aku nampak byk benda yg mengujakan.

Dan yang menariknya, rupa2nya konsep YAGNI ni juga boleh diamalkan di tempat lain. Contoh, dulu kalau aku beli sampul surat aku akan beli lebih. Takut kalau2 nak pakai nanti senang. Tapi sekarang, kalau ada perasaan mcm tu aku akan menjerit, “Hey, YAGNI!” secara mendadak. Dan aku pun berlalu dgn syiling lebih di poketku. Lagipun kalau betul aku nak guna nanti bukan susah pun. Dgn motor aku yg hebat tu aku dpt rempit dgn sekelip mata je (tutup lama sikit) ke pasar raya berhampiran.