Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > programming style: while(TRUE), for(;;), ...?

Reply
Thread Tools

programming style: while(TRUE), for(;;), ...?

 
 
Guillaume
Guest
Posts: n/a
 
      07-08-2005
Chris Croughton wrote:
> No more so than seeing the mathematically ridiculous statement x = x+1;


Absolutely.

> If anyone says thatthey "know C" and doesn't recognise for (; as being
> a loop without a condition then they deserve to be fired because they
> are misrepresenting themself.


Agree. Well, the guy was talking about someone that "may well be a
statistician with limited programming experience", though.
But that's not a valid point in my opinion. Would you submit a report
written in english to some person, maybe skilled in the field that's
dealt with in the report, but that doesn't understand half of the
english idioms? I wouldn't. Too many possibilities of misunderstandings.
So my take at this is: don't show C code to someone that doesn't know C.
That's useless. If you are going to work with someone that has "limited
programming experience", just give them the formulas and algorithms
written in natural/math language, not in C.

> (Yes, I have seen people come for interview who say that they are
> "experienced C programmers" and don't recognise common idioms like that.
> They don't get the job. I don't know who does employ them, possibly
> Microsoft or the government...)


Well, I have interviewed at Microsoft once (what was I thinking? ).
The technical interviews were actually pretty difficult; at least,
you had to solve some tricky stuff in like 40 minutes..., which, under
pressure, was too fast for me. I do remember one of the guys stating
something really stupid as to the C standard though...

(If I remember correctly, he was claiming that 'sizeof(char)'
may yield something else than 1 on some platforms. Seems to me
like 'sizeof(char) == 1' is in the standard, isn't it actually the
very definition of sizeof?.

My copy of the standard says:
"When applied to an operand that has type char, unsigned char, or signed
char, (or a qualified version thereof) the result is 1."

Oh well...)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C (functional programming) VS C++ (object oriented programming) Joe Mayo C Programming 168 10-22-2007 01:00 AM
Can Your Programming Language Do This? Joel on functional programming and briefly on anonymous functions! Casey Hawthorne Python 4 08-04-2006 05:23 AM
Wireless PEAP/MSCHAPV2 client programming question Jim Howard Wireless Networking 6 07-02-2005 11:53 AM
systems programming versus application programming Matt Java 35 07-22-2004 08:10 AM
XSLT programming cameron Firefox 0 01-04-2004 10:51 PM



Advertisments