B
-
Categories
-
Platforms
-
Content
Man, you young'uns must think CPU cycles are free or something.
bool IsPowerOf2(unsigned val)
{
return !(val & (val-1));
}
-- jm
Ignoramus10397 said:As a computer programmer, I am used to programming without drawing
"design diagrams", "flow charts" and other bullshit. I just start
coding and try to make sure that I have some working prototype most of
the time, and that I do things nicely. Usually things work out okay
[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
Bob said:[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
How many times have you had to write a routine like this in your coding
career? I'll answer: only when asked to by some clown on an interview.
[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
How many times have you had to write a routine like this in your coding
career? I'll answer: only when asked to by some clown on an interview.
I've always found it enjoyable to torture prospective employees, but it
never helps in determining if they are going to be productive. Often, the
smartest people get nothing done, and even become a drag on the
organization by bullying and posturing in meetings. It's the quiet, less
'clever' people with the good work ethic that end up doing most of the
work.
Ignoramus16420 said:[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
How many times have you had to write a routine like this in your coding
career? I'll answer: only when asked to by some clown on an interview.
Doing things of similar nature, many times.
I've always found it enjoyable to torture prospective employees, but it
never helps in determining if they are going to be productive. Often, the
smartest people get nothing done, and even become a drag on the
organization by bullying and posturing in meetings. It's the quiet, less
'clever' people with the good work ethic that end up doing most of the
work.
I think that it would be stupid to hire people based only on being
able to write a little routine. We agree on that. But it would be
stupid to hire people who cannot program computers, to program
computers.
Bob Monsen said:When I got out of college, an interviewer from Microsoft asked
me if I could figure out a way to create a doubly linked list using a
single pointer field per element. (hint: if A xor B = C, then A xor C =
B). No wonder their software is so horrible. They hire people who would
actually consider doing this.
Dirk Bruere at Neopax said:Hiring a coding monkey over someone who can actually understand the entire
project, including h/w design, is IMO false economy. My job is solving
engineering problems.
The first version of BASIC for the (long defunct) Commodore Amiga computer was
provided by Microsoft. They used 32 bit words to keep track of addresses
(pointers) but, being 'clever,' used the uppermost byte for various flags
since (I believe this is the correct reason, someone correct me if I'm wrong)
the original Amiga 1000 used a Motorola 68000 that could only address 16MB (24
bits) anyway.
This came back to bite them when the Amiga 2000 was released with 68020, which
could address over 16MB.
Oops!
On the other hand, it can be a non-trivial choice as to how to optimize a
design -- PCs are so fast and have so much memory these days that no one
should think they're being clever by packing bits into the top-end of a DWORD
or building doubly-linked lists as you describe, yet people working on
embedded systems with little 8 bit CPUs can arguably make good use of such
techniques.
Hmm... thinking about it, I'd admit to not being able to implement a
doubly-linked list using a single pointer field. Say the addresses and
(pointer) contents of of element are:
0x0123: Magic number 1
0x0345: Magic number 2
0x0678: Magic number 3
0x09ab: Magic number 4
...etc...
I don't see how any single magic number (16 bits) that you place at 0x0345
that'll let you navigate to both 0x0123 and 0x0678?
---Joel
Asking that string reversal problem isn't, in my opinion, such a badDirk said:Ignoramus16420 said:On Wed, 21 Dec 2005 19:45:51 +0000, Ignoramus32515 wrote:
On Wed, 21 Dec 2005 19:31:08 GMT, Rich Grise, but drunk
[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
How many times have you had to write a routine like this in your coding
career? I'll answer: only when asked to by some clown on an interview.
Doing things of similar nature, many times.
I've always found it enjoyable to torture prospective employees, but it
never helps in determining if they are going to be productive. Often,
the
smartest people get nothing done, and even become a drag on the
organization by bullying and posturing in meetings. It's the quiet, less
'clever' people with the good work ethic that end up doing most of the
work.
I think that it would be stupid to hire people based only on being
able to write a little routine. We agree on that. But it would be
stupid to hire people who cannot program computers, to program
computers.
Depends.
Some people learn fast.
I have often come across job requirements for knowledge of a particular
8 bit micro. I used to say that it would take me about half a day to get
up to speed by reading the data book. Not good enough. Now I bullshit,
and if I get the job spend half a day getting up to speed...
Ditto programming languages. Originally it took me a couple of weeks to
learn to program reasonably well in C, then some years later another two
weeks to add the ++. Then I didn't use it for about 4 yrs and so have
had to relearn again for my current job. Not a hope in hell of getting
the job if the guy had set me some poxy C++ test at the 'interview'.
Hiring a coding monkey over someone who can actually understand the
entire project, including h/w design, is IMO false economy. My job is
solving engineering problems.
Mike said:How well does that fly? Have you come across any disbelievers?
Dirk said:Not amongst my customers.
Obviously I tend to work for smallish companies without all that formal
HR crap.
They prefer Jack Of All Trades who can understand the whole project in
all its phases from idea to production. The fact I spend an extra couple
of weeks learning specifics is of far less importance than being able to
pick up h/w, s/w, standards, EMI and productionisation problems before
it's too late.
I have worked for big companies, and the compartmentalised mindset is
vastly counterproductive. Sure the coding monkeys can write faster than
me, but when it doesn't work and the h/w and s/w guys are blaming each
other that's not much of an advantage.
The last small company I worked for had a team of 4 of us in R&D. We
could get a product from idea to mass production and in the customer's
hand in 6 weeks.
Hmm... thinking about it, I'd admit to not being able to implement a
doubly-linked list using a single pointer field. Say the addresses and
(pointer) contents of of element are:
0x0123: Magic number 1
0x0345: Magic number 2
0x0678: Magic number 3
0x09ab: Magic number 4
...etc...
I don't see how any single magic number (16 bits) that you place at 0x0345
that'll let you navigate to both 0x0123 and 0x0678?
Ignoramus16420 said:On Wed, 21 Dec 2005 19:45:51 +0000, Ignoramus32515 wrote:
[quoted text muted]
Sorry, nothing that I can think of, of the sort.
Somewhat tangentially...
We are interviewing people for computer programmer positions. We are
looking for those who can actually "do stuff" without too much
babysitting.
Lots of people come in with impressive resumes. When I talk to them, I
know that some peope are very good at bullshitting, so I give them a
couple of actual tasks to do. Very small simple things. One is to
write a nice function that reverses a string in place. For example,
"Rich" would become "hciR".
Almost no one can actually do this without making mistakes, many
people give up completely.
Very frustrating. I consider it the most basic capability of a
programmer.
How many times have you had to write a routine like this in your coding
career? I'll answer: only when asked to by some clown on an interview.
Doing things of similar nature, many times.
I've always found it enjoyable to torture prospective employees, but it
never helps in determining if they are going to be productive. Often, the
smartest people get nothing done, and even become a drag on the
organization by bullying and posturing in meetings. It's the quiet, less
'clever' people with the good work ethic that end up doing most of the
work.
I think that it would be stupid to hire people based only on being
able to write a little routine. We agree on that. But it would be
stupid to hire people who cannot program computers, to program
computers.
Depends.
Some people learn fast.
I have often come across job requirements for knowledge of a particular 8 bit
micro. I used to say that it would take me about half a day to get up to speed
by reading the data book. Not good enough. Now I bullshit, and if I get the job
spend half a day getting up to speed...
Ditto programming languages. Originally it took me a couple of weeks to learn to
program reasonably well in C, then some years later another two weeks to add the
++. Then I didn't use it for about 4 yrs and so have had to relearn again for my
current job. Not a hope in hell of getting the job if the guy had set me some
poxy C++ test at the 'interview'.
Hiring a coding monkey over someone who can actually understand the entire
project, including h/w design, is IMO false economy. My job is solving
engineering problems.
There are many reasons why and why not, and even when not or how not. The
most direct answer is that below some level of detail, the program code is a
better, more effective, and more efficient descriptive tool than any design
language.
John Larkin said:Most "modern" programming languages deserve the title "code"; they
must be painstakingly deceiphered to try to figure out what's going
on. The proper documentation of code is comments, which are rare these
days.
I guess that's why I prefer assmebler, PL/I, or VHDL. AssemblerMost "modern" programming languages deserve the title "code"; they
must be painstakingly deceiphered to try to figure out what's going
on. The proper documentation of code is comments, which are rare these
days.
I guess that's why I prefer assmebler, PL/I, or VHDL. Assembler
forces comments to be able to figure out what you did next week.
The others are verbose enough to get by with fewer comments (a
high-level diagram would be nice). C/C++ are unreadable, IMO.
I like assembly too. My comment/code ratio is about 3:1, and I include
the occasional soliloquy, math derivation, protocol description, and
ascii-art diagram.
Why am I not surprised. "If it was hard to write it _should_ beI saw some Windows source code a while back: a
simple API wound up being a score of source files, many doing nothing
but passing stuff off to others under assumed names. Each did have the
Microsoft-mandatory comment header. Under "Description of function:"
people had filled in useful things like "what it says."