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.
Error Checking List for each language
Re: Error Checking List for each language
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.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.
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.
Every good solution is obvious once you've found it.
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Error Checking List for each language
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
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
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Error Checking List for each language
I would add "knowing the person who wrote the code" to that list. Turns out to be a rather important factor at times.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.
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.a thread about a checklist in programming
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
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:
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
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.
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
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).gravaera wrote:If you don't know C/C++ well
Thank you all for your responses.