Solar's Law on Kernel Space
Solar's Law on Kernel Space
Yes, the topic is a bit cavalier, but I got your attention, didn't I?
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?
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?
Every good solution is obvious once you've found it.
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
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.
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.
Learning a lot these days THANKS to OSdev users
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...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.
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Hi Solar
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
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
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.
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.
Every good solution is obvious once you've found it.
Re: Solar's Law on Kernel Space
Hi,
Ahem, well you get the idea...
Cheers,
Brendan
If one sentence is too small then how about something larger, like a haiku or a limerick?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?
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".
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: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.
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!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.
Ahem, well you get the idea...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Solar's Law on Kernel Space
You don't know how well I do.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...
Every good solution is obvious once you've found 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:
My attempt at a one-liner:
or if you like:The amount of kernel panics is inversely proportional to the amount of bugs you have fixed on your own.
_________________The chance that you don't belong here is inversely proportional to the amount of bugs you have fixed on your own.
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.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 ....
<unlurk>Combuster wrote:My attempt at a one-liner:or if you like:The amount of kernel panics is inversely proportional to the amount of bugs you have fixed on your own.The chance that you don't belong here is inversely proportional to the amount of bugs you have fixed on your own.
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.
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).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...
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.
Code: Select all
/* world's last mistake in C */
if(code = CODE_RED) {
launch_missles();
}
A warm welcome! And one of the best first postings I've seen so far on any forum!Emil wrote:<unlurk>
Hurr, hurr...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.
I like the idea of "inversely proportional", though. I'll let that simmer on the stove of creativity...
Every good solution is obvious once you've found it.
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.Solar wrote:A warm welcome! And one of the best first postings I've seen so far on any forum!Emil wrote:<unlurk>
Code: Select all
/* world's last mistake in C */
if(code = CODE_RED) {
launch_missles();
}
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?!?Solar wrote:should know at least 75% of your compiler's options
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
Melvin Conway
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
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!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).
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.Wave wrote: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?!?Solar wrote:should know at least 75% of your compiler's options
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am