GG development team coding philosophy?
by Ivan Lazarte · in Torque Game Engine · 05/06/2005 (12:24 am) · 44 replies
I've started looking through the TGE source in depth and I'm pretty blown away. Despite only coding for maybe 2 or so years, I've seen lots of different projects through many languages through my consulting and job list, DHTML and all related, Actionscript, Perl, TCL, Java, and now C++, I have to say this is the cleaning looking source of anything I've come across. Very nice job.
I was wondering if the garagegames team has any advice or philosophies towards coding that they would be willing to share. I definitely see the "if your subprocess is greater than 20 lines, you're doing something wrong" rule for example.
I was wondering if the garagegames team has any advice or philosophies towards coding that they would be willing to share. I definitely see the "if your subprocess is greater than 20 lines, you're doing something wrong" rule for example.
About the author
#43
05/16/2005 (2:40 pm)
My RegEx-Fu stinks, but I don't think that'll be confused by quoted strings when there are escaped quotes in the string itself.
#44
This one's regex-fu is weak.
{1} is the automatic way to do something unless you otherwise state [obviously].
[] should contain a list, you don't need the |. [^'"] would do. You'll probably need some escapes in there.
It will break with newlines or escaped quotes.
It'll replace the WHOLE thing you found with a tab.
Is a better starting point, since perl saves you buckets of work on that front.
Gary (-;
05/16/2005 (3:25 pm)
Quote:%sed -e s/[^"|']{1}\S*\s{3}\S*[^"|']{1}/\t/g
This one's regex-fu is weak.
{1} is the automatic way to do something unless you otherwise state [obviously].
[] should contain a list, you don't need the |. [^'"] would do. You'll probably need some escapes in there.
It will break with newlines or escaped quotes.
It'll replace the WHOLE thing you found with a tab.
perl -pei ".orig" '1 while(s/^(\t*)\s{3}/\t/g);' *.cc *.hIs a better starting point, since perl saves you buckets of work on that front.
Gary (-;
Torque Owner Clark Fagot