Page 1 of 1
Error Checking List for each language
Posted: Wed Mar 28, 2012 9:20 pm
by VolTeK
Hello, lately i have been deciding whether it would be a good idea to start a thread about a checklist in programming.
I have been working on this small draft on assembler, when a program goes wrong, a list to go through to check for errors pertaining to coding errors that may happen if we we're tired at the time, or have just forgotten about certain parts we for got to implement. For example, checking if the pushes are popped. What do you think about this? Maybe we can start one for each language? Probably a waste of time as every programmer with experience should have his/her own small in-mind list, but maybe for beginners to catch on and memorize as well.
Edit: Not sure if this would be apart of
http://wiki.osdev.org/Troubleshooting or be related. Both give directions on software problem solving in some way.
Re: Error Checking List for each language
Posted: Wed Mar 28, 2012 11:24 pm
by Solar
VolTeK wrote:Probably a waste of time as every programmer with experience should have his/her own small in-mind list, but maybe for beginners to catch on and memorize as well.
The things to check for is
extremly dependent on the error observed as well as the code that's running. It's the hallmark of an experienced programmer to take
many shortcuts on his way towards locating the bug. Knowing the code structure, being able to picture in his head what's going on, "having a hunch" about the cause of the error, things like that.
Hence, for
experienced programmers, such a checklist would be useless.
And for beginners... let's say (again) that OSDev.org isn't a place for beginners to hang out. They really shouldn't.
Re: Error Checking List for each language
Posted: Thu Mar 29, 2012 8:52 am
by gravaera
Yo:
Kernel development is an advanced undertaking. If you don't know C/C++ well, you will not get anywhere. Therefore, compiling a list of supposed "common errors" is redundant because to anyone doing kernel development, those should be "obvious errors", and the need for an online checklist is moot.
--Peace out
gravaera
Re: Error Checking List for each language
Posted: Thu Mar 29, 2012 9:55 am
by Combuster
Solar wrote:It's the hallmark of an experienced programmer to take many shortcuts on his way towards locating the bug. Knowing the code structure, being able to picture in his head what's going on, "having a hunch" about the cause of the error, things like that.
I would add "knowing the person who wrote the code" to that list. Turns out to be a rather important factor at times.
a thread about a checklist in programming
About programming in general, don't. About OS-specific topics, yes there is a list of typical things that go wrong. The easiest ones to find is in "my bootloader doesn't work" threads. They are however all very subject-specific.
On that note, bootblocks might be the only place for which programming is so fundamentally
different to any standard use of the language that such a checklist is actually appropriate here.
Re: Error Checking List for each language
Posted: Thu Mar 29, 2012 11:16 am
by Snake
It is kinda hard to make such a list for operating system development. If you are working on normal applications you have all sorts of tools to help you like debuggers and core dumps, which you will not have access to when working on the kernel. Strange intermittent bugs also seem to be more common.
I'll leave you this quote:
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
Re: Error Checking List for each language
Posted: Thu Mar 29, 2012 12:22 pm
by bluemoon
We can use debugger for osdev...
for example, bochs(compile with built-in debugger), qemu+gdb; they are just a bit different from working with normal application development.
Re: Error Checking List for each language
Posted: Thu Mar 29, 2012 2:28 pm
by VolTeK
gravaera wrote:If you don't know C/C++ well
I have used it for quite a while developing a graphics engine, but do not agree with what i believe was your point. I have gotten far (In my current project) using assembler, and have not needed C/C++. As for other projects i prefer C/C++ (referring to projects other then operating system development).
Thank you all for your responses.