Author Topic: Why is Autolisp variable naming so terrible?  (Read 6886 times)

0 Members and 1 Guest are viewing this topic.

nivuahc

  • Guest
Re: Why is Autolisp variable naming so terrible?
« Reply #30 on: November 22, 2011, 09:10:59 AM »
I've been using PascalCase naming for my variable for the past few years for one reason; I'm getting old. I've wasted more time looking through older snippets of code that I'd written, trying to parse in my head what it was doing, that could have been cleared up had I used better variable (and function) naming.

I once had a job where I was tasked with updating all of a companies internal routines to work in R14 (from R13 running on Unix). The previous programmer named a lot of his functions things like doit and dothis and all of his variables were single letter with the occasional numeral (i.e. a1 a2 p1 p2).

And did I mention that the previous programmer was allergic to commenting?

It became easier in the end to run his code, see what it was supposed to do, and just re-write a lot of it from scratch.

Using PascalCased or camelCased names, as already mentioned, almost makes the code self-commenting.

Dashmonkey

  • Newt
  • Posts: 29
  • (defun sleep nil nil)
Re: Why is Autolisp variable naming so terrible?
« Reply #31 on: November 22, 2011, 03:30:17 PM »
and then there are times when I will write obfuscated code just for the heck of it.

That's just F/M/L soup!

Really though, I had a good chuckle when I read that code. I think my co-workers think I'm a little crazy :ugly:
I didn't break it, I swear! ...ok, I broke it.

nivuahc

  • Guest
Re: Why is Autolisp variable naming so terrible?
« Reply #32 on: November 22, 2011, 03:46:38 PM »
That made my brain hurt  :cry:

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Why is Autolisp variable naming so terrible?
« Reply #33 on: November 22, 2011, 05:56:57 PM »
and then there are times when I will write obfuscated code just for the heck of it.

That's just F/M/L soup!

Really though, I had a good chuckle when I read that code. I think my co-workers think I'm a little crazy :ugly:

That made my brain hurt  :cry:

 :-)