To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 14411
14410  |  14412
Subject: 
Re: What are all those lego companies?
Newsgroups: 
lugnet.robotics
Date: 
Fri, 16 Feb 2001 08:32:11 GMT
Original-From: 
Malcolm S Powell <msp@umbra./stopspammers/co.uk>
Viewed: 
627 times
  
Steve Baker wrote:

When writing programs, it's important to be as clear as possible so that instead
of calling a variable just 'x' or 'a', it's nice if you can call it "the distance
the robot has driven so far" or whatever it actually represents.  That makes it
easier to *read* programs - especially if someone else wrote the code.

Tick. VG.

However, you can't have spaces in variable names...

This is only due to inertia in the programming language world. Given the speed of current
hardware, lexical efficiency is no longer as important as it used to be. It is quite
possible to design language implementations that allow spaces in identifiers.

...the 'trendy' style is to capitalise every word instead:
TheDistanceTheRobotHasDrivenSoFar ... which is less typing and still quite easy
to read.

IMHO this is the kind of nonsense which often goes under the heading of trendy. Could it
be that there is a group of programmers who leant to read at schools with books printed in
a special way that contained things like "JanitAndJohnWentUpTheHillToFetchAPaleOfWater". I
even find that difficult to type let alone to to read!

Most of us who use western scripts leant to read with breaks between the words and capital
letters only at the beginning of sentences and in acronyms. So that is the form we find
easiest to read. Even if we have to use underscores instead of white space to implement
the word breaks in programs we end up closer to what we are used to reading.

(I write about 100,000 lines of code a year - that's several MILLION
keystrokes...every little helps!)

The idea that programming is somehow limited by the speed at which you can type horrifies
me. Surely most of the time is spent thinking about what you are doing?

I guess that I double your output of 100,000 lines a year. I try not to call it "code"
(another trendy word) as my aim is not to encrypt anything. I call it "source text".
However, I don't do much typing. In between bouts of thinking I spend most of the time
cutting an pasting and dragging and dropping bits of previous classes and methods to make
new ones. If you analyse what you do, you find that there are very few original structures
in any piece of software.

Malcolm S Powell



Message has 3 Replies:
  Re: What are all those lego companies?
 
(...) speed of current (...) It is quite (...) identifiers. It might be quite possible but that would be terribly wrong, and would not be C anymore. It also would "quite possible" for a computer to understand natural language but AFAIK no such thing (...) (24 years ago, 16-Feb-01, to lugnet.robotics)
  Re: What are all those lego companies?
 
(...) Yes - that's true - but currently, I can't think of a single language that does that, so as a practical answer to the original (and very valid) question, this is an irrelevent comment. (...) Woaahh. What I *said* is absolutely true. You may (...) (24 years ago, 16-Feb-01, to lugnet.robotics)
  A code by any other name
 
(...) Your kidding?? The term "code" dates back (at least) to the "opcodes" used in machine language (ie. an even lower level than assembly). The term "opcode" refers to Operation Codes or "instructions" which may in many cases have required an (...) (24 years ago, 17-Feb-01, to lugnet.robotics)

Message is in Reply To:
  Re: What are all those lego companies?
 
(...) (Your English is *excellent* - no need to apologise) Well, this is something that programmers have 'grown up with' and are rarely forced to reflect upon...but since you ask. For people like me who have been writing C code for nearly 30 (...) (24 years ago, 16-Feb-01, to lugnet.robotics)

24 Messages in This Thread:









Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR