Page 2 of 2

Posted: Thu Mar 02, 2006 7:39 am
by Rescator
Either this is a trick question, or I misinterpreted the question.

I however answered the poll as if the question was,
how many lines of bug free code consecutively (sp?) do I on average code during 1 hour of work.
Which is between 10 and 50 lines and I mess up a line or two, then another 10-50 lines before next bug.

If however it asks how many lines of bug free code total in one hour of coding, then I got no clue really.

I have written full programs in a hour before, which had no bugged code.
And I have also managed to write a single and bugged line of code only, in a full hour. A very ambigious question in this case.

If this is a trick question, then I'm not really sure what it's hinting at.
Typing speed, typing speed of bugs, or what?

Posted: Thu Mar 02, 2006 1:46 pm
by blueznl
i based my number upon some code that i wrote in the past, some of them over 6000..10000 lines long, and compared that with the time needed to wrote and debug them, so yes, i interpreted as 'bugfree code' not bugfree lines...

Posted: Thu Mar 02, 2006 3:22 pm
by techjunkie
Am I too old for this forum?!? :lol:

Lines of bugfree code in an hour, was a "common" measurement to explain quality, complexity, speed or difficulty of, for example a project, for 10 - 20 years ago.

It was said that 6 - 10 bugfree lines of code per hour (or was it DAY?!?! :lol: ) was average for a good programmer.

Posted: Mon May 08, 2006 8:25 pm
by Kale
I've just coded a completely cross platform flexographic utility for PC and Mac which automatically draws CAD keylines. It contains 2000+ lines of (bug free) code and took me about 18 hours. 111 lines per hour if i'm not mistaken. Try that in C++! :lol: i love PB! :D

Posted: Mon May 08, 2006 8:49 pm
by josku_x
I can get more than 400 lines of code in an hour without bugs, copy paste or VD. It's the design which takes many lines of code. I also use a lot of API.. and nearly all my sources are uncommented.

Posted: Mon May 08, 2006 11:05 pm
by Joakim Christiansen
But anyway... it's the result that matter! :wink:

Posted: Tue May 09, 2006 12:58 am
by Guimauve
Ok let me try :

89 lines of bug free code in 0.0016 seconds

89/0.0016=x/3600

x = 200 250 000 lines of bug free code per hour

A small code snippet ...

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure >>>>>

Structure Vector3D

   i.f
   j.f
   k.f

EndStructure

; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs >>>>>

Macro SetVector3Di(ObjetA, P_i)

   ObjetA\i = P_i

EndMacro

Macro SetVector3Dj(ObjetA, P_j)

   ObjetA\j = P_j

EndMacro

Macro SetVector3Dk(ObjetA, P_k)

   ObjetA\k = P_k

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les Observateurs >>>>>

Macro GetVector3Di(ObjetA)

   ObjetA\i

EndMacro

Macro GetVector3Dj(ObjetA)

   ObjetA\j

EndMacro

Macro GetVector3Dk(ObjetA)

   ObjetA\k

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Le Mutateur Update simple >>>>>

Macro UpdateVector3D(ObjetA, P_i, P_j, P_k)

   SetVector3Di(ObjetA, P_i)
   SetVector3Dj(ObjetA, P_j)
   SetVector3Dk(ObjetA, P_k)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'Opérateur Plus >>>>>

Macro PlusVector3D(ObjetA, ObjetB, ObjetR)

   SetVector3Di(ObjetR, GetVector3Di(ObjetA) + GetVector3Di(ObjetB))
   SetVector3Dj(ObjetR, GetVector3Dj(ObjetA) + GetVector3Dj(ObjetB))
   SetVector3Dk(ObjetR, GetVector3Dk(ObjetA) + GetVector3Dk(ObjetB))

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'Opérateur Minus >>>>>

Macro MinusVector3D(ObjetA, ObjetB, ObjetR)

   SetVector3Di(ObjetR, GetVector3Di(ObjetA) - GetVector3Di(ObjetB))
   SetVector3Dj(ObjetR, GetVector3Dj(ObjetA) - GetVector3Dj(ObjetB))
   SetVector3Dk(ObjetR, GetVector3Dk(ObjetA) - GetVector3Dk(ObjetB))

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code généré en : 16 ms <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Or a small variant ...

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure >>>>>

Structure Vector3D

   i.f
   j.f
   k.f

EndStructure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les Macros d'accès direct >>>>>

Macro Vector3Di(ObjetA)

   ObjetA\i

EndMacro

Macro Vector3Dj(ObjetA)

   ObjetA\j

EndMacro

Macro Vector3Dk(ObjetA)

   ObjetA\k

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Le Mutateur Update simple >>>>>

Macro UpdateVector3D(ObjetA, P_i, P_j, P_k)

   Vector3Di(ObjetA) = P_i
   Vector3Dj(ObjetA) = P_j
   Vector3Dk(ObjetA) = P_k

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'Opérateur Plus >>>>>

Macro PlusVector3D(ObjetA, ObjetB, ObjetR)

   Vector3Di(ObjetR) = Vector3Di(ObjetA) + Vector3Di(ObjetB)
   Vector3Dj(ObjetR) = Vector3Dj(ObjetA) + Vector3Dj(ObjetB)
   Vector3Dk(ObjetR) = Vector3Dk(ObjetA) + Vector3Dk(ObjetB)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'Opérateur Minus >>>>>

Macro MinusVector3D(ObjetA, ObjetB, ObjetR)

   Vector3Di(ObjetR) = Vector3Di(ObjetA) - Vector3Di(ObjetB)
   Vector3Dj(ObjetR) = Vector3Dj(ObjetA) - Vector3Dj(ObjetB)
   Vector3Dk(ObjetR) = Vector3Dk(ObjetA) - Vector3Dk(ObjetB)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code généré en : 15 ms <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
With a small tool I currently develop named Macro WorkShop.

Regards

Guimauve

Posted: Tue May 09, 2006 6:43 am
by josku_x
Guimauve wrote:89 lines of bug free code in 0.0016 seconds
WOW! THat sounds just too impossible! Are you a Matrix guy? :)

Posted: Tue May 09, 2006 8:00 am
by Anden
There is no such thing like "BUG FREE Code" :cry: :cry:

Posted: Tue May 09, 2006 1:34 pm
by josku_x
Yes, you are correct every code IS a BUG. But a BAD BUG is code which for example freezes the OS even if it's not attempted to do that.

Posted: Tue May 09, 2006 1:35 pm
by Guimauve
josku_x wrote:
Guimauve wrote:89 lines of bug free code in 0.0016 seconds
WOW! THat sounds just too impossible! Are you a Matrix guy? :)
No ! As I said before. I have programmed a small tool capable to write some code for me. It's extremelly fast and bug free code.

Regards
Guimauve

Posted: Tue May 09, 2006 1:53 pm
by josku_x
WRONG! As I said above every code is a BUG-. :D