Most of time this issue struck my brain during my coding. Should i make it work first? Or should i optimized along the way?
It is easy to think that everything should be made to worked first, then optimized. It's normal (and thinkable, of course). We have to, since anything that we do is because we want to see it work. Otherwise it'll not be useful at all.
But do not forget that programming/coding involved a lot of works. Normally we are not writing 2-10 lines of codes but hundreds. Or maybe thousands (millions? are you writing another Vista?). So to review all these codes for optimization might take us several hours or days. And this if our working code can go along the optimization process.
But what if they not? What if we are writing the code using algorithm A, and suddenly we found that the optimization require algorithm B?! Isn't that would be burdening, redundant work, since we have to make it using B, make it work, and then optimize?
So these thing make my head spin fast, trying to solve these work-or-optimize issue ...
hmmmm.... but for now i just simply make it worked first (since i'm an ordinary programmer)...
Selamat datang. Blog ini mengandungi penulisan dan bahan rujukan berkaitan pengaturcaraan dan penyelidikan yang ingin saya kongsi dengan anda. Semoga bermanfaat. (Nota: Selain teks rumi, blog ini turut mengandungi teks jawi bahasa Melayu)
Subscribe to:
Post Comments (Atom)
-
Sebelum ini saya pernah menulis tentang kenapa kita (masyarakat) perlu menulis bahan-bahan bertulis / rujukan ilmiah ( Rujuk Sini ). Namun d...
-
Sumber : PRPM DBP - Kamus Dewan Edisi Empat Muat turun - (Komp) tindakan memindahkan fail dr stesen komputer utama ke stesen komputer pe...
Bro, orang industri macam saya boleh kata, the keys of software developer, incremental , agile and simple, mudah nak faham of course OO.
ReplyDelete$person->getHead()->getHair();
easy kan?
Ko tgh guna framework apa? Made your work easy with a framework. Don't waste your time untuk benda2 simple.
Kalau functional, best practice kalau disertakan sekali unit test. Kalau tak, testing part akan jadi serabut. Ko akan lupa function tu sebenarnya berfungsi untuk hasilkan output yang macamana. Bila nak refactoring code pun taak risau dah.
Bole tengok soalan yang macam bubble sort. Soalan ni fames kalau interview dengan microsoft. The thing is, aku pernah cuba buat soalan ni.. code aku panjang menampakkan logic iq aku ni rendah. So it does not a matter kalau ianya tetap berfungsi sama seperti yang the simplest one. May be one day kita rasa nak improve kod tu sebab ko expected ia ambik resource tinggi, boleh la buang mana2 yang nampak messy tu.. tapi sebenarnya aku tak suka cara mcm tu.. nampak sangat bazir masa. The key aku develop ialah functional mesti ada unit test. Kalau tak haru biru nanti. Baru test-driven!
http://en.wikipedia.org/wiki/Bubble_sort
OO erk? btul. bukn stkat industri je. Academician Soft Eng. pun galakkan.
ReplyDeletetp realitinya ada part OO lembap/less advantage berbanding functional. kalau tak apsal orang masih guna C...
test? mmg betul. tp ni yg orang selalu lupa, mcm aku la. sbb lepas aku test, aku delete test code tu hahaha (patut archive/rekodkan.). thanx for the comment.