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 / 14416
14415  |  14417
Subject: 
Re: What are all those lego companies?
Newsgroups: 
lugnet.robotics
Date: 
Fri, 16 Feb 2001 15:45:01 GMT
Original-From: 
Steve Baker <SJBAKER1@AIRMAILnomorespam.NET>
Reply-To: 
sjbaker1@airmail*AvoidSpam*.net
Viewed: 
804 times
  
Malcolm S Powell wrote:

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.

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.

...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!

Woaahh.  What I *said* is absolutely true.  You may not happen to *like* this newer
'style' and your personal preference may well be to_use_underscores_in_names.  I can
understand your preference - I don't happen to follow it (although I did ~10 years
ago) - but I'm afraid that the 'trendy' style is MixedCaseButNoUnderscores.

The Windoze API's are all like that - *modern* UNIX API's also (think about OpenGL
with
things like glMultMatrix, glGetConvolutionParameter.  Older API's tended to use underscores.
(think about 'curses' that has things like 'assume_default_colors' and 'use_extended_names'),
yet older ones use horrible abbreviated names (eg the C standard library has 'sscanf',
'fgetc', etc)...before that, we tended to use single or two character variables (eg in BASIC
and Fortran circa 1970).

HOWEVER, this person asked why things are like this - and what I say is absolutely true,
so please don't kill the messenger!

I didn't say this was the best possible way to do it - but THAT'S HOW IT IS (circa 2001AD).
It may change again in a few years - who knows?

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.

So shoot me.  That *used* to be what people did - but over the past 5 to 10 years, the
MixedCaseWithoutSpaces method has become *by far* the most common style.

(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?

Well, yes - sometimes I spend a week thinking and at the end of it, I *delete* 20 lines of
code - or perhaps add just one line.  Other times though I'll add 5,000 lines of code in
a single uninterrupted 8 hour session.  It depends on the complexity of the code you write.

When you need to bash in a ton of text, cutting down on the typing *does* help a little...
but it's certainly not a major consideration.  I can't come up with any other explanation
for the MixedCaseButNoUnderscores style...people are certainly using that style more and
more - if you have a better explanation as to why they do that, let's hear it!

But *please* don't argue about style.  Wars have been started over this.  The guy asked
a fair question and I answered it truthfully.

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.

Whatever - it's just a word (and 'code' and 'coding' are *NOT* modern terms.  Ada Lovelace
- who was the first ever programmer - called it 'code').

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.

Ah!  Well, if I included code re-use, my personal lines-of-code per year would be MUCH
larger.
I don't count those because in well designed code, you don't regenerate the text by cutting
and pasting - you pull in pre-existing 'building block' libraries.  If you have to change
those then you have failed in their design.

If you analyse what you do, you find that there are very few original structures
in any piece of software.

Well yes - but much of what I do is horribly mathematical in nature.

--
Steve Baker   HomeEmail: <sjbaker1@airmail.net>
              WorkEmail: <sjbaker@link.com>
              HomePage : http://web2.airmail.net/sjbaker1
              Projects : http://plib.sourceforge.net
                         http://tuxaqfh.sourceforge.net
                         http://tuxkart.sourceforge.net
                         http://prettypoly.sourceforge.net
                         http://freeglut.sourceforge.net



Message has 1 Reply:
  Re: What are all those lego companies?
 
Steve Baker wrote: When you need to bash in a ton of text, cutting down on the typing *does* help a little... but it's certainly not a major consideration. I can't come up with any other explanation for the MixedCaseButNoUnderscores style...people (...) (24 years ago, 16-Feb-01, to lugnet.robotics)

Message is in Reply To:
  Re: What are all those lego companies?
 
(...) Tick. VG. (...) 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 (...) (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