For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2007 > Pet Peeves (WAS: modification)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pet Peeves (WAS: modification)
Mr. Shawn H. Corey

2007-08-20, 10:01 pm

Ken Foskey wrote:
> I always make that mistake 'if( $a = 10 ) {' that is why I always 'use
> warnings' and, most importantly, correct the code. Pet peeve is 'use
> warnings' and then not cleaning them up.
>


That's because way back in grade school, you were taught that 'a = 10' (make a equal to ten) and 'a = 10' (a may be equal to ten) are the same thing. Computers are stupid; you have to tell them the difference. Not your fault; blame it on your teachers.


Pet Peeve #1: people who post code that does not compile.

Pet Peeve #2: people who comment on code when they have no experience.

Minor irritation: people who ask for help but post no code.


--
Just my 0.00000002 million dollars worth,
Shawn

"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
Jenda Krynicky

2007-08-27, 7:24 pm

From: "Mr. Shawn H. Corey" <shawnhcorey@magma.ca>
> Ken Foskey wrote:
>
> That's because way back in grade school, you were taught that 'a = 10'
> (make a equal to ten) and 'a = 10' (a may be equal to ten) are the
> same thing. Computers are stupid; you have to tell them the
> difference. Not your fault; blame it on your teachers.


I don't think so. There are "programming languages" that use the same
operator (or rather the same syntax) for both and decide which one
you wanted based on context. Thus restricting what you can do. And
confusing their users.

Eg. in Visual Basic you write

a = 10 ' Let a be equal to 10. Yeah, comments start with '. Silly.
if a = 14 then ' If a happens to be equal to 14

and even

bool = a = 10 ' Let bool be true if a happens to be 10 and false
otherwise

(Why do I keep using "let" instead of saying "Set a to 10"? Well,
because there is a Set statement and a Let statement and the equals
are equivalent to the Let one. The difference between

Set a = b
and
Let a = b

is ... erm ... very well thought out. That is if you are crazy.)

Jenda
P.S.: Sorry, I felt like venting.
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com