OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Sep 16, 2019 10:50 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: function/code test area?
PostPosted: Sun Jan 11, 2009 3:19 am 
Offline
Member
Member
User avatar

Joined: Fri Jun 22, 2007 12:47 pm
Posts: 1598
Location: New Hampshire, USA
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?

_________________
Website: https://Joscor.com


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Sun Jan 11, 2009 3:33 am 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
I could go for that.


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Sun Jan 11, 2009 6:46 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2097
Location: Bucharest, Romania
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.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Sun Jan 11, 2009 7:03 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 12, 2008 4:04 pm
Posts: 173
[$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]

_________________
Website


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 3:12 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2631
Location: Devon, UK
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


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 11:20 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2097
Location: Bucharest, Romania
Perhaps creating a sticky topic in one of the sub-forums?

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 11:45 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
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.

_________________
"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 ]


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 3:09 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 22, 2007 12:47 pm
Posts: 1598
Location: New Hampshire, USA
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.

_________________
Website: https://Joscor.com


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 4:33 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2097
Location: Bucharest, Romania
Heh; here's Troy Martin's chance to get that FAT12 driver going... :wink:

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 7:23 pm 
Offline
Member
Member
User avatar

Joined: Fri Apr 18, 2008 4:40 pm
Posts: 1686
Location: Langley, Vancouver, BC, Canada
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

_________________
Image
Image
Solar wrote:
It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.

I wish I could add more tex


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 9:18 pm 
Offline
Member
Member
User avatar

Joined: Tue Apr 10, 2007 4:42 pm
Posts: 224
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?

_________________
"Sufficiently advanced stupidity is indistinguishable from malice."


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Mon Jan 12, 2009 9:56 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 22, 2007 12:47 pm
Posts: 1598
Location: New Hampshire, USA
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.

_________________
Website: https://Joscor.com


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Tue Jan 13, 2009 3:44 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
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.

_________________
"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 ]


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Tue Jan 13, 2009 3:47 am 
Offline
Member
Member
User avatar

Joined: Thu Dec 21, 2006 3:03 am
Posts: 1029
Location: Hobart, Australia
Yeah, I mean, just look at either the Windows or Linux kernels. :P

_________________
My Personal Blog | My Software Company - Loop Foundry | My Github Page


Top
 Profile  
 
 Post subject: Re: function/code test area?
PostPosted: Tue Jan 13, 2009 4:31 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7412
Location: Germany
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. ;-) )

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group