PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

New PocketFrog torch-bearer

It sounds like Thierry will not be doing much in the way of PocketFrog work, at least not earlier versions (see the thread in this forum entitled "PocketFrogPlus 0.2.1 released!"). I don't want to paraphrase what he wrote, lest I give a false impression of what he said, so please read that thread before continuing on this one.

As per his comments there, I think it will do us all good to find out who will step up and take over PocketFrog in terms of new releases.

I would offer myself up for the job, but I frankly don't know if I'm really up to it. I think it's clear that there are others more qualified in terms of familiarity with the library and general C/C++ skills than I, so although I don't mind doing it, I think there are better choices to explore first.

Gersen would be my first choice, since he is already putting out PocketFrogPlus on a fairly regular basis.

Are there others that might want the job? I know that for my own sanity and the sake of the projects I'm working on and plan on working on, I need to know what will happen in the future with the library. It's in good shape now as near as I can tell, but I don't want to see development stagnate either, as I'm sure no one else does.

So, discussion anyone??
Hmm... we also probably should discuss PocketFrogPlus and what its relationship with PocketFrog should be. Does it make sense to have two different libraries, one which is a shadow of the other with extra features put in?

Also, what does need to be improved in PocketFrog as of now? Maybe a clear development path should be established.
You raise good points Damian, but I think it's probably too early for those discussions. I think whoever picks up and runs with it will be the one to make those decisions anyway. I would certainly hope they would take our comments into consideration, but I don't think it would be up to the general community so to speak.

My OPINION though is that PocketFrogPlus should be seen as THE PocketFrog release at this point, assuming Gersen where to want to maintain it. There are a number of functions that have been posted recently that could be rolled in, and I'm sure there are suggestions about what to do to improve the core library, but I agree, two relatively similar code branches probably isn't the right answer.
Sure Gersen is THE MAN! 8)

but first.. we need to see what he thinks about this :?
I agree. Gersen seems to be the right choice to me.

For what it's worth...
jbella · 21 Feb 2003, 10:46 UTC — Sounds like a good idea
I also think that it sounds like a good idea if gersen would like to take charge over PF, but it would also be nice if we all could contribute more to the project(including myself)

Stuff I would like to see in future PF:
:arrow: The sound lib with English comments, my Italian is nonexistant :wink:
:arrow: Load module and sfx from file (I will provide the snippets for this)
:arrow: A fix-point class
:arrow: Be able to set screen size on Win32 version (this is since i develop for SmartPhone with a different screen size)
I have read the post with interest, and I'm happy that someone has suggested me as the new maintainer of the library, but unfortunately I can't accept. I don't use pocketfrog in my projects anymore and as I wrote in a past message I have started to develop a new library for my games.
This library will allow the development on pocketpc, zaurus and series60 (nokia 7650 and compatible ones). In one or two weeks the library will be available for pocketpc, later on I will add the support for the other platforms.
The licence will be similar to the one for PocketFrog, or at worst I'll use the LGPL, however it will be possible to use it in own projects with no particular restriction.

Just a few lines about PocketFrogPlus: I decided to create this library mainly to test my sound classes on the more ppc I could. For some time I have used PF and I have decided to contribute in some way, but nothing else. Once my library will be published I don't think I'll have much time to dedicate to PFP.

By now the sound engine is stable and can be used without problems; if some critical bug occurs I'll be happy to correct it, but I don't think I'll add much more functions, that will be added to the new library instead.

I know you love PF and I hope you will find a suitable person for this important role. Besides, I also hope you'll have a look at my new library once published :) . I hope to manage to open a forum here on pocketmatrix in order to launch the library, I will keep you informed anyway.
Hmm... certainly sad to hear you won't accept the job Gersen, but I think we all understand where your coming from.

One question: do you have any objection if your latest PFP 0.2.3 release is from this point on considered the official PocketFrog release, and is simply called PocketFrog, and maybe is reversioned as v1.0 and is LGPL'd? That would give us a solid starting point, whoever takes over.

On that subject, is there anyone else that might want to take on this role, or that you guys want to suggest?

I'm still available as an option, but as before I'd like to explore any better possibilities before I do it. I'm sure I could do it ultimately, and I suppose if no one steps up I might wind up doing it by default, but I'd rather whoever takes over has the full support of the community, so I certainly don't want to default my way to the top, so to speak :)

So... who else?!? :)
I sure want to test the Gersen´s new library :)
There doewsn't seem to be anyone else... I guess you can go :)
I'll give it a few more days. I need to get answers to the above questions from gersen first. If no one else wants the job, it looks like it'll be me (that's not the worst thing that could happen! :) )
Dave Johnston · 24 Feb 2003, 11:02 UTC — Sounds like a good idea
jbella wrote:
Stuff I would like to see in future PF:
:arrow: The sound lib with English comments, my Italian is nonexistant :wink:
:arrow: Load module and sfx from file (I will provide the snippets for this)
:arrow: A fix-point class
:arrow: Be able to set screen size on Win32 version (this is since i develop for SmartPhone with a different screen size)


Perhaps it would be handy to work out where PF needs to improve, how and when before assigning any one person to the job? I mean, the person assigned doesn't necessarily have to be the one making the improvements. I assume PF will improve with contributions from various people - so PF, at a bare level, just needs a maintainer to keep all the improvements in check (at this point 'CVS' pops into my head, but let's ignore that).

Having said that, I vote for fzammetti :)
fzammetti wrote:
One question: do you have any objection if your latest PFP 0.2.3 release is from this point on considered the official PocketFrog release, and is simply called PocketFrog, and maybe is reversioned as v1.0 and is LGPL'd? That would give us a solid starting point, whoever takes over.


I don't have any objection. I have added support for loading mod and sfx from file and I'm trying to translate some italian comments to english. Version 0.2.4 will be the last PFP release. All I want is that the new maintainer put my name somewhere on the new lib... :)

Goog working!
Yes, I agree Dave, assuming for the moment that I'm the guy, I don't intend for me to be the only one making changes. My thinking is that I would mostly serve as the single point of release, i.e., for the most part others more capable than I make the changes, I package them up and put out a new version. In some cases maybe that means I'll be the one integrating changes, in other instances it won't.

I also agree, mapping out a plan is a good idea. If nothing else I think this needs to be a list of the changes we all want to see incorporated. Once I have such a list, I can flesh out the details of when various changes would be incorporated. I'll start a new thread for that purpose in a few days (I'm still trying to not assume the position).

Gersen, thank you for the extra work your doing now for 0.2.4. Once it's ready, I'll grab a copy and use that as the starting point. Your name will of course be present in a number of places, I think the license requires that, but it would be in there even if it didn't. Thierry should of course be listed first, followed by you, and anyone else that contributes would also be listed, that seems only fair, licenses aside.
fzammetti wrote:
Yes, I agree Dave, assuming for the moment that I'm the guy, I don't intend for me to be the only one making changes.


Some comments. Decide on a coding standard, and then any additions should fit nicely within this so that the library as a whole remains consistent. Which is important for a number or reasons, but chief among them is documentation and ease of use.

I don't agree with making the plus version standard, as that would require anyone that is not using gersen's sound code either extra code that isn't used, or a removal process. For at the minimum there will be some name space pollution. I see no reason why a sound library would be coupled with the pf lib, it may depend on the lib, but that should only be a one way dependency. I think this should be the case for any addon package.

So something like a sound engine or sprite engine should be extra pieces you can choose to add in.

As for coding standards, I think the most important to me is that tabs should be used since they are portable, and people use different sizes for tabs. I noticed the pf lib uses 4 spaces for indenting so I am about to replace all of that. (One because I use tabs, and two because I use 8 column tabs.) I would prefer not having to do this with every release.
I agree that the ideal is to separate the sound library from the "base" PF library itself. As I've said before, I haven't personally looked at the code yet to see about decoupling it, although Gersen has told me they currently do have to be melded. Someone here (sorry, I forget who, and I'm being lazy at the moment :) ) has offered to look into doing this when Gersen delivers 0.2.4. If it's possible, great, I completely agree that's better.

But if they can't be decoupled for some reason, then the choice is to include Gersen's sound code or not obviously. Since he won't be maintaing it further as he's said, it comes down to whether to maintain two code bases or not, one with sound functionality and one without.

Simply put, I am not willing to maintain two branches. It'll be enough work to just maintain one :)

In that case, I think the consensus here has been that Gersen's sound additions are well worth including. Yes, there would be a removal process if you didn't want it, or some unused code hanging around... But when the choice is between that and trying to maintain two branches, I come down on the side of including the sound stuff.

An alternative might be a simple compile-time switch to not include sound functionality. At least that would save you the removal effort each time.

But, let's wait and see if we can get them separated in the first place. That will render this discussion moot, which is what I'm hoping for! :)

As for the tab stuff... let me say that I 100% agree with a coding standard. I personally am very anal about things like this. I use spaces for tabs and I use two spaces. These types of things always get into near religious battles... I always put my opening braces on the same line as the line that starts a code block, many people absolutely hate that and put the braces on their own lines. Who's right? Damned if I know! :)

My point though is that when you have a library, the idea is that you generally shouldn't care what the code looks like. It should be a black box that you slap into your project and it just works. For instance, nobody cares what coding standards were used in DirectX I think... The same should be true of PF in my mind.

It should be the external interface that is important, not how the library is coded.

Now, in this case it's a little different because of course you get the source and can do what you want with it. So, it's not so much a question of what coding standards are employed but just that there ARE standards employed!

What I suspect I'll do is fight my own habits and follow the standards Thierry has used throughout. The alternative is to go through all the code and convert it to use my own standards, and that seems like a pointless exercise. So long as it's consistent, I don't think it will matter.

Of course, if it really bothers you with every release, I suspect you will have to change it all as your doing now. I am sorry for that, but the alternative is trying to get everyone to agree on a set of coding standards, and simply put, that just ain't gonna happen in this space-time continuum ! :)
fzammetti wrote:
As for the tab stuff... let me say that I 100% agree with a coding standard. I personally am very anal about things like this. I use spaces for tabs and I use two spaces.


How unfortunate. I tend to move around my code often and scrolling right twice, four times or more becomes a big annoyance. Hence my use of a tab, one move and I'm at the beginning of the code. Of note is that most or all modern editors allow you to set the width of tabs to whatever you choose, 8, 2 whatever. This is what I meant by portable, if you use anything *but* tabs then you either don't have a tab key or are just conditioned.


These types of things always get into near religious battles...


I agree but standards exist for a reason. Just because you can't make everyone happy is no reason to make no one happy.

It should go without saying that a lot of these sorts of issues potentially inpact on productivity and quality of code, hence a great many of them have been studied and quantified.


Its not a large problem to change the spaces to tabs, but it defeats some of the features of source control by touching every file. But because it is hard to read and bug prone I increase the tab size (or in this case convert to tabs). As to your point above, you can make everyone happy with tabs since you can then use your 2 space indent, others can use their 4 space indent etc. The problem with spaces is that everyone is forced to read the code the same way which is of no benefit.

Also note its not that I can't read it, but for the same reason I don't use 4pt fonts it causes more strain and I am not as productive.



It should be a black box that you slap into your project and it just works. For instance, nobody cares what coding standards were used in DirectX I think... The same should be true of PF in my mind.


This is true also for libraries like GapiDraw, but thats only because I do treat it as a blackbox, however open source is a different animal. I wouldn't even be mentioning this if I had no intention of modifing the code.



It should be the external interface that is important, not how the library is coded.


Thats important too, I simply didn't go into it much. For the most part its in good shape, with the exception of the sound code (which I haven't looked at but only noticed that the same file convention wasn't used). And everything is in a namespace, so its clean.



What I suspect I'll do is fight my own habits and follow the standards Thierry has used throughout. The alternative is to go through all the code and convert it to use my own standards, and that seems like a pointless exercise. So long as it's consistent, I don't think it will matter.


I agree, but if all the comments were written in german, I'm not going to go and learn german. I'd split the base and get english translations. And then make english the standard for commenting.



alternative is trying to get everyone to agree on a set of coding standards, and simply put, that just ain't gonna happen in this space-time continuum ! :)


They don't gotta agree, there are plenty of coding standards that have been used and are still used with very large projects that have been thought out and solve the main problems, that of consistent interface and readability. Agree by majority, and make the most people happy.
jbella · 14 Mar 2003, 09:12 UTC — Waste of time
Thierry here, sorry bout that.

Your administrator completely fuc*ed up and hit "modify message" instead of "quote message".

End result, I overwrote the original message.
adde · 14 Mar 2003, 14:39 UTC — Waste of time
jbella wrote:
I'd say that it's just a waste of time changing the code standard ... i think that PF's is not that bad ...


I agree with my Swedish colleague 100%. Thierry has been consistent throughout the whole PF library and now it's up to us to be consistent with the library.

This means that the comments should be written in english for example.

And I don't think the 4 space increment is hard to read or especially bug/error prone. The 4 space increment (or tab indent) is more or less standard. And as for using spaces instead of tabs I think it's better because then you know it will look the same even if you chance to another browser or export to another program. I have my editor set up to save all tabs as spaces on exit so this enables me to use the tabs if I want to indent code. AND if you use the home key, you get to the beginning of the code.

Bla bla bla bla bla.

Jbella wrote:By the way, in future releases of PF i'd like to see handling of WM_HIBERNATE and that WM_ACTIVATE is handled in the same way as WM_KEYDOWN etc (calls a virtual function, so that you can write your own handling of the events)


Yes.. This is very easy to implement and should be done. This is in fact what needs to be done in order to decouple Gersens sound lib from the Plus library.

B.t.w. It was I, who volunteered to decouple the sound once the 0.2.4 version is released.
German? Heh, I always thought gersen's sound code comments were written in Italian.
Sorry about that adde :) It was late and the thought of actually moving a mouse and scrolling a window was more than I could bare :) (Damn, which form of the word bear/bare is correct there anyway?!?)
bear: to handle, to hold, whatever
bare: naked
beer..mmm :wink:
Ok... I meant BARE then ;)
Damian wrote:
German? Heh, I always thought gersen's sound code comments were written in Italian.


Yes all comments are in italian... good italian but I know that it isn't so good for english people.
I don't have much time in this days but I'm trying to translate sound's code comments in arabic... ehm english :)

The sound lib can easily removed from basic code and readded on a framework that have function that handle events like "suspend" and "resume". The lib needs only to know when it have to open, close and suspend/resume its output so it is very simple to add in a project. I have add it in that way on ppf only to provide a easy to use way for adding sound on an already started project written with pf 0.6.0.
jbella wrote:
Well there is ofcourse totally crappy code standards, but i think that PF's is not that bad, it's not how i would have written it, but i have know problems with it.


Wow! It's the first time someone says something like that about my coding standard. Don't get me wrong, I am not insulted at all. On the contrary. I always strive to come with a coding standard that pleases most people. Of course, this is impossible. Could you elaborate what you don't like about it? (Aside from tabs). That would help me improve it even more.

Thanks,
Thierry
Hum.. Don't have the PF code available right now, but lets see what i remember.. humm.. Basicly it has to do with spaces next to '(' and ')', for example:

Code:
if ( a < b )


I prefer:
Code:
if(a < b)


I know it's a (very) minor thing and the example wasn't that good it gets more obvious when there are more '(' and ')' on the same line. Other than that and the tabs (i prefer 4 spaces instead of 3, thats what's used in PF if i remember correct) i dont remember anything that i didn't like in PF's code standard. But as i said, i have no problems with the code standard as it is.

What i absolutly doesn't like is when you put the '{' on the same line as the method(or if, for etc..):
Code:
void VeryBadMethod() {
if(a < b) {
blabla..
}
}

// This is how i should look:
void VeryGoodMethod()
{
if(a < b)
{
blabla..
}
}


The reason for this is that it's much easier to match the brackets when they are aligned. (Though this is not a problem in PF, since it written "correct", but i though i'd mention it anyway to piss someone of.. :D )

PS. I'll have a look in the PF source as soon as i can and try to find more grave misdeeds by mr Thierry. :wink:
Just wanted to clarify that my comment about german was in no way related to gersen's comments. Its just an obvious difference, that you can very readily understand about readibility. I don't read german or italian, so the readability for any comments in either language is 0% to me.


I've read studies where it was found that 2 space differences are not noticable by the average human, so two space indenting is on the very low end of readable, that is if you gleem any information from indented code which I assume most of us do.


I used to create bugs related to indenting levels and the { behind the if statement. I've since put all brackets on their own lines and use 8 column tab indenting and I don't recall the last time I created one of those bugs. Also of note is that I don't subscribe to the always-bracket camp so I use the risky:
Code:

if(something)
do something;


In addition I agree with the very general statement that if you go deeper than 3 levels of indenting you need to redesign the code, using a larger indent makes that readily apparent. One thing though, I do not code in vc or evc, I use a separate editor, so there is no shortage of horizontal screen space in my case.
It should be noted that this is all minor stuff that is in no way the focus of this entire thread.

However, the thing about the braces is always a contentious issue, and has been for a great many years.

I always disagree with the braces on their own lines because that unnecasserily makes the code longer than it is. You then have to scroll through an extra screen or two of code to understand what's going on, when most of what your scrolling through is essentially whitespace.

With modern code editors (or even most plain text editors it seems) you can do brace matching, which further invalidates the technique.

I do happen to agree with the parens thing... in the same vein as the braces, more whitespace I feel makes the code actually harder to read in the long-run.

But again, this is not the focus of what I'll be doing with PF. Things like this can be argued for an enternity and you still won't get agreement of a large group! As I said before, I'm going to fight my own habits and follow what Thierry has done all along (and I'll ask anyone that contributes "official" code to PF to do the same). I see no need to "fix up" the entire code base for what are relatively minor things like these that we'll all be arguing over until the cows come home anyway.
fzammetti wrote:
With modern code editors (or even most plain text editors it seems) you can do brace matching, which further invalidates the technique.


True enough, but my eyes don't do brace matching as skillfully. And if I had to actually try to match the braces in that manner then thats a personal clue to rewrite it. I do this often with parens which are more difficult to denote, and would certainly be overkill to put them in their own lines. What I would like to see someday, is the methods that mathmaticians use, ie:
Code:

if([this = that] || [(x * y) / z] != 0 && ([{x & 31} + 1] / 2) == 8)
baz;


That to me would be fantastic, and solve all such paren problems. Some fonts designed for programmers would also be helpful, that is variable width ones.
Dave Johnston · 16 Mar 2003, 18:36 UTC
If you hate matching braces and brackets and so on, please don't ever try programming in Lisp/Scheme - it WILL kill you.

Personally, I now stick opening braces on the ends of lines, and closing braces on their own line. If a method is only a single line long (getXXX for example), I often put the whole method all on one line. Furthermore, I seem to have adopted the 'm_iVariableName'/'m_Thing'-type notation... I think that's a Microsoft style. Works though.

But this is no time to be discussing styles. I personally find the PF code easy to read and understand, often far easier than other libraries. Provided everything reasonably complex is documented well, and some very basic guidelines are followed, style shouldn't be a problem. Even so, taking code from one style to another (usually) isn't a too difficult challenge.
I compeletly agree, there is no point in arguing over code standard. My suggestion is this, and i havn't heard anyone saying other ways, skip this code standard debate, work with what we got and develop PF into something even better!
That was me speaking, just missed to login..
I just think that anyone should think again before calling PF "not that bad" or thinking that it may be "near crappy"
Gapidraw is way more popular, if anyone here don´t like the source from PocketFrog ( the heart from this discussion group )there are other discussion groups to go, and there are always the possibility to write your own game library. And in a third option, one can help enhance PF by giving constructive criticism.

But.. braces? parenthesis? spaces?
GIVE ME A BREAK! :evil:
The only reason i brought it up were because Thierry asked for some input concerning his code standard. As i said before, lets keep the code standard as it is and fokus on develop PF with new features, optimizations etc..

And HTK, braces, spaces etc.. doesn't matter at all, you are completly right!
Well, it does matter, because it affects the readability.

It should not be discussed under this thread though, as FZammetti pointed out earlier.

For those of you who like to read more about coding standards, I think you'll find these three documents usefull. My own coding standard is based on a mixture of these three and some stuff I find agree more to my own sence of logic and experience with programming. I havn't been so bored yet that I would write it down on paper. It's all in my head =)

http://www.possibility.com/Cpp/CppCodingStandard.html
http://atlas.web.cern.ch/Atlas/GROUPS/S ... S1_1_2.pdf
http://www.rightmark3d.org/docs/RM002-004.pdf

There could also be wise to visit Doxygen and learn how to comment the code so that one could use Doxygen to autogenerate manuals and documentation later on. This is highly recommended.

http://www.doxygen.org

And finally I would like to say that Thierry used almost the same coding standard as mine so I have no problem what so ever with continuing with that.

I could elaborate the topic further on a different thread if someone dares to start one =)

Ps. Although I'm not the Grand Master of coding standards and documentation, maybee someone is interested in how I write my code and how nice it could look after it's been processed by Doxygen.

http://www.nada.kth.se/~t98_hes/cas/gui/html/