OSDev.org
https://forum.osdev.org/

function/code test area?
https://forum.osdev.org/viewtopic.php?f=6&t=18858
Page 1 of 2

Author:  01000101 [ Sun Jan 11, 2009 3:19 am ]
Post subject:  function/code test area?

hey, I was thinking of adding a forum/subforum that can be dedicated to posting small functions of code that needs the public's eye for examination. I know we have the "test" forum, but that's for full releases and beta testing, not small pieces that need to be checked out and ridiculed by the community before actually be used as a 'stable' piece.

Either that, or direct me to the area where I can post my locking code just to be looked at and ripped apart until it's 100%. I have code that works, but I think it would be good for this place to have some sort of public inspection area where the community can look at snippets of other people's code that they post, just to make correction or give reason for change.

Good idea?
Bad idea?

Author:  JohnnyTheDon [ Sun Jan 11, 2009 3:33 am ]
Post subject:  Re: function/code test area?

I could go for that.

Author:  Love4Boobies [ Sun Jan 11, 2009 6:46 am ]
Post subject:  Re: function/code test area?

Generally speaking, it's a nice idea. But I think in the case of this forum it would be flooded by all sorts of code from everyone and most of it would never get examined anyway.

Author:  xDDunce [ Sun Jan 11, 2009 7:03 am ]
Post subject:  Re: function/code test area?

[$0.02]
i agree with both points of view...

i agree it will help alot if we had that section, but it could get a bit bogged down with trolls posting printf() functions that take 10 minutes to execute :lol:

but i think it could work, IF the right rules were applied.
[/$0.02]

Author:  AJ [ Mon Jan 12, 2009 3:12 am ]
Post subject:  Re: function/code test area?

Hi,

I think it's a good idea, but generally I am quite strongly against new forum creation. I personally like a decluttered main forum page and am put off sites that have 20+ forums - I tend not to bother registering / posting (could just be general laziness on my part!).

Having send all that, it was, with hindsight a good thing splitting off the OS Design forum from the OS Development forum. Perhaps for now, you could just post in "Test Requests", despite the lack of precedent. If it happens a lot and works well, we could then ask Chase to create a new sub forum.

Cheers,
Adam

Author:  Love4Boobies [ Mon Jan 12, 2009 11:20 am ]
Post subject:  Re: function/code test area?

Perhaps creating a sticky topic in one of the sub-forums?

Author:  Combuster [ Mon Jan 12, 2009 11:45 am ]
Post subject:  Re: function/code test area?

Let us first see that you are actually doing that before asking us to create a subforum, sticky a thread, etc etc, so that we actually see the real need for that.

Author:  01000101 [ Mon Jan 12, 2009 3:09 pm ]
Post subject:  Re: function/code test area?

Then can we add a small sentence or something to the description of Announcements saying that it's ok to post code snippets for review?

I agree, a test-run would be the safest option.

Author:  Love4Boobies [ Mon Jan 12, 2009 4:33 pm ]
Post subject:  Re: function/code test area?

Heh; here's Troy Martin's chance to get that FAT12 driver going... :wink:

Author:  Troy Martin [ Mon Jan 12, 2009 7:23 pm ]
Post subject:  Re: function/code test area?

Hmmmm...

I'll post whatever real mode routines anyone ever need or wouldn't even think of needing, you can count on that for sure! :D

Author:  Zenith [ Mon Jan 12, 2009 9:18 pm ]
Post subject:  Re: function/code test area?

Troy: Yeah... Now that you mention it, I was wondering if you had decent FAT12 driver routines for real mode? :twisted:

On-topic: Usually, people don't ask for review of their code before putting it into their kernel, but only post their code when they run into problems. Hence the OS Development forum...

It's typically good practice to ask other people's opinion about your code, but does/will anyone actually submit their code for public display?

Author:  01000101 [ Mon Jan 12, 2009 9:56 pm ]
Post subject:  Re: function/code test area?

I will.

And I think it would be a lot better to post sketchy code, get it hammered out by the public, and then implement it... instead of implementing the sketchy code, running into problems a few days/weeks/months later, then posting it and trying to figure it out.

Also, if some things like printf() and malloc() get put up, maybe the new guys can see what certain approaches are better than others and such.

Author:  Combuster [ Tue Jan 13, 2009 3:44 am ]
Post subject:  Re: function/code test area?

Things that are just as interesting to put up are definitions/descriptions of kernel interfaces. While a bug may prove nasty, design flaws are, from experience, really bad and can keep haunting you forever.

Author:  JackScott [ Tue Jan 13, 2009 3:47 am ]
Post subject:  Re: function/code test area?

Yeah, I mean, just look at either the Windows or Linux kernels. :P

Author:  Solar [ Tue Jan 13, 2009 4:31 am ]
Post subject:  Re: function/code test area?

My 0.02$ worth:

Hammering your own code into submission by a series of test cases and szenarios is half the fun of programming, why offload it to some other dudes?

And, if you have those test cases and szenarios, script-driven by preference, you can repeat them whenever you changed something in the code, to see if it still works...

Unit tests / scenarios are a most valuable part of a software project, and peer review by mayhaps a dozen people from this board is a very poor second to that...

But go ahead, post your code in the test forum, and we'll see how much feedback it gets. (I excuse myself right here - going over other people's code is my daytime job, so I usually got my fill at work already. ;-) )

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/