realbasic-nug
[Top] [All Lists]

Re: Counting Lines of Code

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Counting Lines of Code
From: James Milne <james dot milne at mac dot com>
Date: Sat, 31 Jul 2004 21:27:44 +0100
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <EE4EAFE0-E2B9-11D8-8EF9-000A95A5E76E at freaksw dot com> <3B5B1DC7-E2C5-11D8-A2EC-003065DA9C96 at chipersoft dot com> <924E2BD9-E30B-11D8-8452-000393DB941A at mac dot com> <172C9A33-E317-11D8-B5A4-000A95A5E76E at freaksw dot com> <055A70A7-E31B-11D8-BF2F-000393DB941A at mac dot com> <25392276-E320-11D8-B10A-0003937B30CE at classonesoftware dot com> <445E3CB4-E32F-11D8-B9E1-003065DA9C96 at chipersoft dot com>

On 31 Jul, 2004, at 21:21, Jarvis Badgley wrote:

I haven't been at this (programming) that long, but I can remember when programmers would brag about who could code with the FEWEST lines. ;-)


ahh, but see that kinda goes out the window with RB because of the forced line structure. In languages like C and Java you can have massive if statements squeezed onto one line. In RB if you just want to have an else you're forced to have a minimum of 5 lines.

As I mentioned in my second posting, there is some fairly repetitive code in there. I say you could class a good 30k lines of code as being very similar. Ordinarily I would agree that you're staring a flaw in your design in the face when you're dealing with such repetitive code. I just haven't found an elegant solution to the problem yet.

I'm sure if I attacked the software from a different angle I could fold away a lot of that junk and simplify it. I'm not particularly keen on having to maintain 200k lines of code myself!

Where it counts, though, I use as few instructions as possible! RB isn't too hot at optimising, so hand crafting is still a skill of value here :-) But optimising follows the 80/20 rule, where 80% of your time is spent in about 20% of your code (the ratio is further apart in my case, perhaps 90/10). So it's only worth optimising part of your app, or worrying about how many lines of code it takes to write it.

--
Kind Regards,
James Milne

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>