StepChild OSX.

Discussion about: tracktion.com
RELATED
PRODUCTS

Post

A word of the wise to everyone who ever coded anything:

Aesthetics in code is important, and only marginally less important than actual functionality.

Why? Because beautiful code is more enjoyable to write, read and understand. The number of times I've spotted a subtle bug because I'd expected two operators or operands to line up but they didn't are too many to count. Furthermore, when code is beautiful, I take the time to read over it, and ususally spot a problem or two in the process. This is one of the reasons why people who say case-sensitive languages are unnecessarily restrictive are full of it.

So: Have consistent naming styles. One of the great things about Java is that *everybody* uses the same style. Classes have CapitalNames, methods and variables camelCaseNames, etc. It makes it *so* much easier to interoperate with other programmers and code. When I code C#, I have a different style altogether, simply because of the culture of the language. Also, use whitespace consistently. I personally use a whitespace before each open bracket and whitespace around each operator religiously.

Trust me - the extra 2% of effort (once you've gotten used to it) will repay itself a thousand times over when it comes to debugging, extending and understanding your code.

The other thing which all programmers must write on a large piece of paper and hang above their bed (and hope that the girl/guy they take home is too drunk to notice or ask) is this:

Code that is undocumented is incomplete and potentially useless!.

In Java, use JavaDoc comments for *every* method and class. In Python, use pydoc. In C#, use DocComments. In Pascal, at least have a convention. I write the comments describing a method or class before I write any code in the class. In fact, I make a skeletal program with all my classes and most of their methods with nothing but comments as part of the design phase of the development. This makes the entire experience so much easier and more enjoyable, because I don't find myself writing new code that is inconsistent with old code.

/end rant

Martin
"Life is both a major and a minor key"
-- Travis, Side

Post

very methodical...

I use a mixture of things... my approach to coding is somewhat like art. For example, I like lining up the ':=' in delphi, but not because it's proper... but because it feels right [edit]. Purely selfish. I tend to capitalize my constants now, but beyond that who knows... :oops: I'm somewhat of a chaotic person... so I'm kinda all over the place when it comes down to it. If people where to rate my form, I'd surely get an F. I do tend to comment my code tho, and now group my routines based on their function. I've had to completely rearrage Toby's template, so that common routines are grouped together. Then I put a huge comment at the ehad of that entire section. It helps me stay organized :roll: (or so I like to think). In the end I just try to get it to work... and once it does, my brain starts thinking of more ideas and the old concept is left on the shelf to collect dust. :roll: I can kinda relate to how someone like arguru used to just abandon projects then fire up a new one. I dunno if it's for the same reasons, but I feel I learn a lot more... at which points it's not the code that matters but the execution of the concept. Hmmmm, I've never really thought about this... interesting stuff... :wink:

BTW Karbon, did you really email me? cos if you did I never got a thing. You can email me at: modulratsubminimaldotorg
ModuLR / Radio

Post

ModuLR wrote:... my approach to coding is somewhat like art.
mine too.

though I'm more of an abstract expressionist like Jackson Pollock.

:D

only today i had to quickly reformat someones data, didn't have time to "do it properly" so imported it to Excel and wrote the most horrific, hacky bit of Visual Basic ever to grace a spreadsheet...

worked though.

can VSTs be written in VB?

;)

.g

Post

That's all very well chaps.

Take this hypothetical piece of Delphi...

iccyiccyftangftang := nurdle;

Now without any form of disciplined coding eh... code? Style or whatever. We can see that iccyiccyftangftang is a variable of SOME kind because it's being assigned to.

What's nurdle? A constant? a function? a variable? What sort of variable? I don't have delphi so I can't hover the mouse for an explaination. Time to scroll and search!

You have to look at the definitions then search-and-replace them into recognisability. Which is itself frought with danger.
.................................
"Hell is other People" J.P.Sartre
.................................

Post

Karbon L. Forms wrote: What's nurdle? A constant? a function? a variable? What sort of variable? I don't have delphi so I can't hover the mouse for an explaination. Time to scroll and search!
Tags are your friends!
http://ctags.sourceforge.net/

Exuberant ctags supports Pascal so maybe it would work on Delphi as well.
This signature is untrue

Post

n8gray wrote:
Tags are your friends!
http://ctags.sourceforge.net/
Hmm intereshting. Very intereshting. Never heard of she-tagsh before mish moneypenny. Though upon invetstigashun, my tecsht editor shupportsh sheep-lush-plush she-tagsh.

YO! GUYS!! Anyone got Delphi? They don't seem to be giving it away anymore :cry:
Anyone got an old PCPLUS coverdisk with it on sitting about? I'm not adverse to a little electronic transfer (via messenger or somewhat)
Obviously staying within lisence stuff! :wink:
It would speed up my porting no end.
.................................
"Hell is other People" J.P.Sartre
.................................

Post

Delphi 6 PE is still available all over the net (legally!), check this thread:
http://www.kvr-vst.com/forum/viewtopic.php?t=42818

Cheers

Toby

www.tobybear.de

Post

Ya fookin dancer!
.................................
"Hell is other People" J.P.Sartre
.................................

Post

Karbon L. Forms wrote:That's all very well chaps.

Take this hypothetical piece of Delphi...

iccyiccyftangftang := nurdle;
Uhuh. That's why I use my own f**ked up version of Polish. It is clear as day for me, and incomprehensible for everyone else. ;)

And if you wanna bitch about bad variable names, try deciphering some of the fortran code floating around my place of work. One of my favourites has a quad nested loop with variables i, ii, iii, mr, xi, xmr, yiii, xyi, and xyiii. :o
Someone shot the food. Remember: don't shoot food!

Post

C++ code is often way more f*cked up then Delphi/Pascal, or at least it is harder to decypher when there are no comments.

Here are two programs I submitted at the first semester of my university studies in a C++ course:

Converting Roman numerals to numbers:
#define V C+=M[I-1]==
main(){char M[50];int I,D,C,X=0;cin>>M;
strupr(M);for(I=strlen(M);I;I--)
{C=0;V'M'?1000:0;V'D'?500:0;V'C'?100:0;
V'L'?50:0;V'X'?10:0;V'V'?5:0;V'I'?1:0;
X+=C<D?-C:C;D=C;}cout<<X;}
A little ball bouncing off the window edges like
on a pool table:
#define z ?-1:1
int u=3,v=u,o=400,b=o,y=20,w=700,h=500;
main(){long T=OpenWindow(1,1,w,h,"");
for(;;){o+=u;b-=v;DrawCircle(T,o,b,y);
v*=(b<y||b>h-y)z;u*=(o<y||o>w-y)z;
ClearWindow(T);}}
But hey, I passed... :-) :-) :-)

Cheers

Toby

www.tobybear.de

Post

tobybear wrote:C++ code is often way more f*cked up then Delphi/Pascal, or at least it is harder to decypher when there are no comments.
I couldn't agree more! :D I wish delphi was cross platform, because I really like it infinately better than C++. Much easier on the brain, and much easier to read.
ModuLR / Radio

Post

ModuLR wrote:
tobybear wrote:C++ code is often way more f*cked up then Delphi/Pascal, or at least it is harder to decypher when there are no comments.
I couldn't agree more! :D I wish delphi was cross platform, because I really like it infinately better than C++. Much easier on the brain, and much easier to read.
Depends who's writing it. :D
.................................
"Hell is other People" J.P.Sartre
.................................

Post

Well, Delphi actually *is* cross-platform, if you consider Windows and Linux systems.

But maybe the new FreePascal 2.0 (that will hopefully soon be out) allows compiling Delphi units on the Mac?
Here is some info:
FP for Mac:
http://www.freepascal.org/fpcmac.html

FP in general:
http://www.freepascal.org/

Delphi-clone for FP:
http://www.lazarus.freepascal.org/

Cheers

Toby

www.tobybear.de

Post

tobybear wrote:Well, Delphi actually *is* cross-platform, if you consider Windows and Linux systems.

But maybe the new FreePascal 2.0 (that will hopefully soon be out) allows compiling Delphi units on the Mac?
Here is some info:
FP for Mac:
http://www.freepascal.org/fpcmac.html

FP in general:
http://www.freepascal.org/

Delphi-clone for FP:
http://www.lazarus.freepascal.org/

Cheers

Toby

www.tobybear.de
So would StepChild compile on Linux?
.................................
"Hell is other People" J.P.Sartre
.................................

Post

Borland Kylix is the Delphi version for Linux, it does however not compile to machine code executable on PPC CPUs.
So would StepChild compile on Linux?
Depends on what additional components have been used. If all additional units are available as source code and do not call any Windows specific functions (COM-objects, WinAPI, ...), it should work with a bit of conversion work.

Cheers

Toby

www.tobybear.de

Post Reply

Return to “Tracktion”