Error Checking List for each language

Programming, for all ages and all languages.
Post Reply
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Error Checking List for each language

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Error Checking List for each language

Post 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.
Every good solution is obvious once you've found it.
User avatar
gravaera
Member
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

Post 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
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
User avatar
Combuster
Member
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

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Snake
Posts: 19
Joined: Wed Mar 21, 2012 7:38 pm

Re: Error Checking List for each language

Post 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
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Error Checking List for each language

Post 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.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Error Checking List for each language

Post 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.
Post Reply