critic this please

Roman Suzi rnd at onego.ru
Thu Jun 21 12:24:33 EDT 2001


On Thu, 21 Jun 2001, NJM wrote:

>I've just wrote this small program that calculates the length of a rafter
>for you(I'm a carpenter), but I didn't write it "properly".  I can't seem to
>wrap my head around using classes.  Does anyone have any input.

(I must admit that being a son of architect, I can't
distinguish a rafter from other wood objects up there,
so probably I have no moral right to critisize.)

For a program it is easy and simple and it solves what you want.
(though I can't think in inches/feet, m/cm/mm please)

But if it was a programmers' program, it' would be much shorter:
programmers are too lazy to write much!

Instead of

plane(rafter1, 1)
plane(rafter1, 2)
...
plane(rafterN, M)

(I am too lazy to even write it properly...)

they will most certainly write something like:

for reafter in rafters:  # for each rafter
  for i in range(M):       # M times
    plane(rafter, i)         # plane that rafter

I think, you've got an idea.

Instead of

8*x + 8*y + 8*z

it is possible to write:

8*(x+y+z)



Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Thursday, June 21, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Useless Invention: Motorcycle seat-belts." _/






More information about the Python-list mailing list