Page 1 of 3

Solar's Law on Kernel Space

Posted: Tue Feb 26, 2008 1:41 am
by Solar
Yes, the topic is a bit cavalier, but I got your attention, didn't I? 8)

A recurring problem on this board is that some who start out to work on their "pet OS" don't have enough coding experience to begin with, and get tangled up by pretty basic problems: pointers, compiler options, what a linker does, that kind of things.

I feel that it is a shame to have these rookie programmers get frustrated simply because they tackled something that is well over their head. Dealing with these cases here time and again isn't that much fun either, and - at least to my feeling - has dulled the overall quality of the board noticeably over the years as veterans turn away from too much repetitive beginner's questions and too few advanced topics.

I'd like to come up with a snappy, one-sentence advice that could become "Solar's Law on Kernel Space", or "The OSDev Mantra for Beginners" if you like, or "Candy's Candy for Computer Kids" or whatever, something that would fit into an e-mail or forum signature. Something that could help pointing out to rookies that you need a full set of skills to navigate kernel space unharmed, while at the same time pointing out that gathering experience in userspace first can be fun and rewarding, too.

However, anything I could conjure up so far is too long and doesn't quite capture the point.

Any help? Thoughts on the issue?

Posted: Tue Feb 26, 2008 2:20 am
by naiksidd_85
hi solar You have said it rightly that the new people on the forum (like me),
have really dumb query's.
and this must be taking lot of your time.
but hey we are here because we know we have really veteran programmers like you who can figure out the problem where we struggle a lot.
:roll:

Posted: Tue Feb 26, 2008 2:25 am
by JamesM
naiksidd_85 wrote:hi solar You have said it rightly that the new people on the forum (like me),
have really dumb query's.
and this must be taking lot of your time.
but hey we are here because we know we have really veteran programmers like you who can figure out the problem where we struggle a lot.
:roll:
Ah yes, but the thing is we really *don't* mind answering dumb queries about OSDev - it's when I try to answer questions and recieve the answer "How do I run this through a preprocessor, then?" or "what is a linker?" That I start to get annoyed. OSDev is *not* an easy subject, and too many people seem to be attempting it with only a knowledge of VB.NET or some similar language and then (and this is the part I take exception to) posting every little problem they come across in this forum. I could mention examples but all you need to do is take a look at the first page on the "OS Development" and "General Programming" sections...

Posted: Tue Feb 26, 2008 2:33 am
by naiksidd_85
hi james,

first of all thanks for the great tutorial you have put up.

and yes before posting any query I do try to find the answere on wiki or Google.
will try to do the HOME WORK first and then ask help
hope all the new people do the same

Hi Solar

Posted: Tue Feb 26, 2008 3:01 am
by DeletedAccount
Hi ,
Solar is correct ... Although i have asked many idiotic questions i have received answers .. Almost everyone here in osdev is very helpful ...
But i just want to state that the prerequisites which you stated are
needed for any non-trivial project ... not just os development ....

I was considered a nerd in my old school because i could compile
programs without the Turbo C++ blue screen .. ie the Turbo C++
IDE .... Also i found many questions like "can i write an OS in
Visual Basic " ? .. i also found someone trying to use bios interrupts
for writing drivers in protected mode ..

Regards
Sandeep Mathew

Posted: Tue Feb 26, 2008 3:03 am
by Solar
The point of this "Solar's Law" is not that you should google before you post. You should always do that.

The point is that you should know what pointers are all about, should know at least 75% of your compiler's options, should know about what a linker does, should know about how to "marry" ASM and C code, should know about project management, version control and debugging, before you start thinking about writing a bootloader or a kernel.

To put it differently, "my own OS" is the poorest possible choice as a first programming project.

Re: Solar's Law on Kernel Space

Posted: Tue Feb 26, 2008 3:44 am
by Brendan
Hi,
Solar wrote:I'd like to come up with a snappy, one-sentence advice that could become "Solar's Law on Kernel Space", or "The OSDev Mantra for Beginners" if you like, or "Candy's Candy for Computer Kids" or whatever, something that would fit into an e-mail or forum signature. Something that could help pointing out to rookies that you need a full set of skills to navigate kernel space unharmed, while at the same time pointing out that gathering experience in userspace first can be fun and rewarding, too.

However, anything I could conjure up so far is too long and doesn't quite capture the point.

Any help? Thoughts on the issue?
If one sentence is too small then how about something larger, like a haiku or a limerick?

Code: Select all

There once was a guy from Nantucket
Who tried writing a great "bit bucket"
He struggled in vain
All he got was pain
And after years he said "Ah fluck it".
Solar wrote:A recurring problem on this board is that some who start out to work on their "pet OS" don't have enough coding experience to begin with, and get tangled up by pretty basic problems: pointers, compiler options, what a linker does, that kind of things.

I feel that it is a shame to have these rookie programmers get frustrated simply because they tackled something that is well over their head.
In theory, there's probably enough information in the wiki and enough intermediate developers around to answer beginner's questions, and because the intermediate developers (as a group) have diverse knowledge they can often help each other - veterans would only really need to worry about the occasional question from intermediate developers.
Solar wrote:Dealing with these cases here time and again isn't that much fun either, and - at least to my feeling - has dulled the overall quality of the board noticeably over the years as veterans turn away from too much repetitive beginner's questions and too few advanced topics.
IMHO veterans have much larger problems: by the time they become veterans they've used up their "college days", and "real life" bites a huge chunk out of their butt. I'm talking about the job, bills, mortgage, spouse, kids, tax, the lawn, the car, the sleep deprivation, the birthdays and funerals and barbeques in the park, the freaking mobile phone salesman that wastes an hour of your Friday afternoon, the mechanic that says your car won't be fixed until next week. Your parents ring and say they're visiting for the weekend - rip 2 days out of your calander and throw them in the fire. Your work sends you away for 2 weeks of "how to waste an employees life" training. For *$%*# sake, I'm trying to write an OS here dammit!

Ahem, well you get the idea... :oops:


Cheers,

Brendan

Re: Solar's Law on Kernel Space

Posted: Tue Feb 26, 2008 3:56 am
by Solar
Brendan wrote:IMHO veterans have much larger problems: by the time they become veterans they've used up their "college days", and "real life" bites a huge chunk out of their butt. I'm talking about the job, bills, mortgage, spouse, kids, tax, the lawn, the car, the sleep deprivation, the birthdays and funerals and barbeques in the park, the freaking mobile phone salesman that wastes an hour of your Friday afternoon, the mechanic that says your car won't be fixed until next week. Your parents ring and say they're visiting for the weekend - rip 2 days out of your calander and throw them in the fire. Your work sends you away for 2 weeks of "how to waste an employees life" training. For *$%*# sake, I'm trying to write an OS here dammit!

Ahem, well you get the idea... :oops:
You don't know how well I do. :shock: :? 8)

Posted: Tue Feb 26, 2008 6:21 am
by Combuster
My attempt at a one-liner:
The amount of kernel panics is inversely proportional to the amount of bugs you have fixed on your own.
or if you like:
The chance that you don't belong here is inversely proportional to the amount of bugs you have fixed on your own.
_________________
SandeepMathew wrote:But i just want to state that the prerequisites which you stated are
needed for any non-trivial project ... not just os development ....
Not quite. For any userspace project of sufficient size you do need al the knowledge of how your code gets executed. What you generally do not know, and in fact not need, is how your processor works, how a line of code gets translated to assembly, how linking is done exactly, what name mangling is, etc etc. You will need these things if you want to make a decent OS, but not for your regular userspace app.

Posted: Tue Feb 26, 2008 7:04 am
by Emil
Combuster wrote:My attempt at a one-liner:
The amount of kernel panics is inversely proportional to the amount of bugs you have fixed on your own.
or if you like:
The chance that you don't belong here is inversely proportional to the amount of bugs you have fixed on your own.
<unlurk>
This is possibly too complicated for some of our more "simple" people and people that insist that they know how to read and write English when they obviously don't. And those seem to be often the most persistent incompetent newbies.
Brendan wrote:IMHO veterans have much larger problems: by the time they become veterans they've used up their "college days", and "real life" bites a huge chunk out of their butt. I'm talking about the job, bills, mortgage, spouse, kids, tax, the lawn, the car, the sleep deprivation, the birthdays and funerals and barbeques in the park, the freaking mobile phone salesman that wastes an hour of your Friday afternoon, the mechanic that says your car won't be fixed until next week. Your parents ring and say they're visiting for the weekend - rip 2 days out of your calander and throw them in the fire. Your work sends you away for 2 weeks of "how to waste an employees life" training. For *$%*# sake, I'm trying to write an OS here dammit!

Ahem, well you get the idea... :oops:
My [Generic Deity]... This is just what is slowing down my OS development and learning... When you have a family and a day job, the only time you have for yourself is when everyone else is asleep(and I should be asleep).
I'm not saying I'm a veteran though, I've only recently started looking into OSdeving again since I last tried it(and failed) as a teenager.

Posted: Tue Feb 26, 2008 7:28 am
by Solar
Emil wrote:<unlurk>
A warm welcome! And one of the best first postings I've seen so far on any forum! :o
This is possibly too complicated for some of our more "simple" people and people that insist that they know how to read and write English when they obviously don't. And those seem to be often the most persistent incompetent newbies.
Hurr, hurr... 8)

I like the idea of "inversely proportional", though. I'll let that simmer on the stove of creativity...

Posted: Tue Feb 26, 2008 7:51 am
by Emil
Solar wrote:
Emil wrote:<unlurk>
A warm welcome! And one of the best first postings I've seen so far on any forum! :o
Thank you, that's very kind. I try not to post unless I have something to contribute and that leads to a lot of lurking on forums and very little posting.

Posted: Tue Feb 26, 2008 10:48 am
by Wave
Solar wrote:should know at least 75% of your compiler's options
Last I counted GCC had about 330 command line options excluding machine dependent options (including: 1100). Do you really want me to know 75% of those?!?

Posted: Tue Feb 26, 2008 11:03 am
by Colonel Kernel
My [Generic Deity]... This is just what is slowing down my OS development and learning... When you have a family and a day job, the only time you have for yourself is when everyone else is asleep(and I should be asleep).
So true! The kicker is, I'm sleep deprived and I still haven't had time to work on my OS in almost 2 years! :P
Wave wrote:
Solar wrote:should know at least 75% of your compiler's options
Last I counted GCC had about 330 command line options excluding machine dependent options (including: 1100). Do you really want me to know 75% of those?!?
If you can read up on them and understand them quickly without outside help, then you have a lot of the necessary background for OS dev. Memorizing them is not necessary IMO.

Posted: Tue Feb 26, 2008 11:53 am
by DeletedAccount
Hi ,
Combuster ... I may be wrong ...as always ... I am .

A good workman knows his tools well !