A C program

G

Greg Martin

Using yourself as an example is wrong unless you consider yourself just
about the least talented programmer who ever benefited from studying
programing. I suspect you had an average or above average talent for
programming, which means that there are thousands and thousands of less
talented programmers who, every year, study programming a benefited form
it.

This guy isn't creating a complicated data compression scheme or
writing a schedule for a pre-emptive OS. It's converting binary to
decimal. It's about as basic as it gets. If this sort of problem
challenges him/her so much that they can't even post their [failed]
attempt at solving it ... they really need to think hard about the
industry they're in.

Worse, if the guy didn't even bother trying and is just looking for a
free ride they should do everyone a favour and step down. Leave room
in the programme for people who actually want to try.

The problem with judgements made on a limited sample of data is that
they are frequently informed by bias. The OP may be as you suggest,
though one doesn't have to think to hard to come up with other
possibilities.

We don't know that he didn't try, only that he didn't post an attempt.
 
B

Ben Bacarisse

tom st denis said:
Yes it is.  I don't see how that relates to my message.

Even if the problem were challenging [which I maintain it is not] the
very lack of effort on their part should be a sufficient strike
against their character.

Not relevant to my point. You did read my message? I was just asking
how you know they are studying at a level where asking this means they
should drop out now. They may be 8 and only just less talented than
your were at 8. They may be 53 and studying programing after decades
of being a simultaneous translator at the UN. They may know a method
but be at a loss how to start doing it in C. There are countless
mitigating circumstances that would mean that it's inappropriate to
swear at them and tell them to drop out now.

Anyway, I was only asking what else you maybe knew that might justify
your extreme position.
 
J

James Kuyper

"tom st denis" <[email protected]> wrote in messagenews:8b079e76-7530-46bd-ad32-e03deb4310fe@h15g2000yqe.googlegroups.com...
This is the equivalent of a math major asking us to help
them solve the matrix
[ 2 1 ]
[ 1 1 ]
What's the answer?
R1-R2 and then R2-R1.

You haven't defined what R1 and R2 refer to, nor what those expressions
mean.

Row 1 and Row 2 ... are you really this dense?
Nor have you defined what x and y refer to.

[2x 1y][3]
[1x 1y][2]

Whatever, you're missing the point.

No - I understand precisely the point you were trying to make. I'm
pointing out that you expressed it badly.
... Usually if I say "produce a
solution for this matrix" it means the program [or steps] required to
reduce it to REF.

Well, no, it doesn't - that's my point. It doesn't actually mean
anything. A matrix doesn't have a solution.

An equation containing a matrix might (or might not) have a solution. If
you have A*x=b, and A is a scalar, such as 5, you can say "solve for x
in terms of b, and that's meaningful (unless A==0). You can also say
"solve A", but that's not meaningful. If A is a matrix, like the one you
gave above, and x and b are column vectors, you can also solve for x in
terms of b (unless det(A)==0), but it's meaningless to ask someone to
say "solve A", for exactly the same reason that it's meaningless to ask
them to "solve A" when A == 5.
You can ask them to invert A; if A is 5, that's just 1/5. If A is a
matrix, that's more complicated; but that's not the same as asking them
to "solve A".
 
T

tom st denis

On 10/30/2012 12:38 PM, tom st denis wrote:
This is the equivalent of a math major asking us to help
them solve the matrix
[ 2 1 ]
[ 1 1 ]
What's the answer?
R1-R2 and then R2-R1.
You haven't defined what R1 and R2 refer to, nor what those expressions
mean.
Row 1 and Row 2 ... are you really this dense?
[2x 1y][3]
[1x 1y][2]
Whatever, you're missing the point.

No - I understand precisely the point you were trying to make. I'm
pointing out that you expressed it badly.
...  Usually if I say "produce a
solution for this matrix" it means the program [or steps] required to
reduce it to REF.

Well, no, it doesn't - that's my point. It doesn't actually mean
anything. A matrix doesn't have a solution.

An equation containing a matrix might (or might not) have a solution. If
you have A*x=b, and A is a scalar, such as 5, you can say "solve for x
in terms of b, and that's meaningful (unless A==0). You can also say
"solve A", but that's not meaningful. If A is a matrix, like the one you
gave above, and x and b are column vectors, you can also solve for x in
terms of b (unless det(A)==0), but it's meaningless to ask someone to
say "solve A", for exactly the same reason that it's meaningless to ask
them to "solve A" when A == 5.
You can ask them to invert A; if A is 5, that's just 1/5. If A is a
matrix, that's more complicated; but that's not the same as asking them
to "solve A".

If you're going to ignore what I write why did you reply?

I gave a perfectly good example of using that terminology [static
matrices] which you ignored to drone on about some off-topic math
related quibble.

Tom
 
J

James Kuyper

If you're going to ignore what I write why did you reply?

I only ignored the parts that were irrelevant to the point of my reply,
such as the details of how to solve the equations that you didn't
actually specify should be solved. My comments were not about the
techniques for solving such equations, which I'm quite familiar with,
but with your failure to correctly describe an equation in need of solution.

I'm in rough agreement with your assessment of the inappropriateness of
the original question - I just wish you'd taken the trouble to state
your example in a way that actually made sense. However, I do think
you've overreacted. It's possible that he's too lazy to make any attempt
to solve it himself, but it's also possible that he has no clue how to
even get started on it. That could be because he's not competent to
pursue a career in computer programming; but it could also be that he
just hasn't had a couple of key insights yet, that will seem blindingly
obvious in retrospect when he reaches the same point in his career that
you've reached in yours. They might even seem so obvious that he might
not even remember not understanding them, just as you don't remember
being unable to understand them. You don't have enough information to
justify ruling out that possibility.

I used to tutor for a living, and I found that students each have their
own strengths and weaknesses; you can't just say "this is simpler than
that, so anyone who has trouble understanding this could never
understand that". It's just not that simple. For example, in your case,
solving linear equations is simple, but apparently you've not yet
mastered even the very basics of stating a problem that requires the use
of those skill to solve. That requires skill with English at least as
much as it does with mathematics.
I gave a perfectly good example of using that terminology [static
matrices].

More accurately, you gave an imperfect example of misusing that terminology.
 
R

Rui Maciel

tom said:
Drop out of whatever program you are in now. If this sort of program
stumps you you have no business studying computer science nor software
development.

C is taught in courses other than CS or anything related to software
development. I wouldn't be surprised if nowadays there were more C courses
being taught in non-CS degrees than in CS ones.


Rui Maciel
 
R

Rui Maciel

tom said:
This guy isn't creating a complicated data compression scheme or
writing a schedule for a pre-emptive OS.

Irrelevant. You are esssentially complaining that someone who has just
started learning how to walk can't run a marathon or the 100 meter dash. In
fact, your own complaint shows off some ignorance, because there is a
significant difference between learning a language and expressing ideas in
it.

So, try not to bite the newcomers.


Rui Maciel
 
R

Rui Maciel

tom said:
Whatever, you're missing the point.

I don't believe James Kuyper missed the point. You, on the other hand,
failed to catch the irony of your own complaint.


Rui Maciel
 
B

Bill Cunningham

tom st denis wrote:

[snip
I could have solved this problem when I was 8 years old. So in
effect, this guy has less intuition about software and computer
science than a C average 8 year old from a small town in Ontario
Canada. That's not saying much for their worth as a student let alone
an eventual professional.

Yes but no one is as perfect as you. All you ever do is show up to
complain. Why don't you make some good use of yourself and help someone or
shut the hell up. It's always about you isn't it.
 
B

Bill Cunningham

Ben said:
Not relevant to my point. You did read my message? I was just asking
how you know they are studying at a level where asking this means they
should drop out now. They may be 8 and only just less talented than
your were at 8. They may be 53 and studying programing after decades
of being a simultaneous translator at the UN. They may know a method
but be at a loss how to start doing it in C. There are countless
mitigating circumstances that would mean that it's inappropriate to
swear at them and tell them to drop out now.

Anyway, I was only asking what else you maybe knew that might justify
your extreme position.

Don't feed the trolls
 
K

Keith Thompson

Bill Cunningham said:
Don't feed the trolls

Bill, you're replying to a message from nearly a week ago,
and providing zero context, to tell us not to feed the trolls.
This thing has already died out; you're the only one still posting
about it. Just drop it and move on.
 
B

BartC

Keith Thompson said:
Bill, you're replying to a message from nearly a week ago,
and providing zero context, to tell us not to feed the trolls.
This thing has already died out; you're the only one still posting
about it. Just drop it and move on.

I don't think it's the same Bill.
 
M

Malcolm McLean

This strikes me as too harsh. This is the sort of thing that will
challenge a freshman (and maybe even a sophomore) the first time they
see it; he does need to be told to do his own homework (and has been);
he only needs to change majors if he doesn't get better.
You've got to understand argv and argc, you've got to write a routine that
checks a string is a valid binary number, you've got to detect arithmetic
overflow (or, for the class prize, implement an arbitrary-length routine).

It's not that easy to get full marks.
 
J

James Kuyper

You've got to understand argv and argc, you've got to write a routine that
checks a string is a valid binary number, you've got to detect arithmetic
overflow (or, for the class prize, implement an arbitrary-length routine).

It's not that easy to get full marks.

A key stumbling block for many newbies assigned such a problem is
confusion between the use of "binary" to describe the digits in a
character string, and the use of "binary" to describe the internal
representation of integer types in C. The OP's message is consistent
with either possibility as the input to the routine, though the
character string seems more reasonable.
Being confused about such issues as a newbie is not a good predictor of
whether you might be a successful computer scientist or computer
programmer, tom st denis' comments to the contrary notwithstanding.

If someone were still confused by such issues after spending more than a
decade "learning" C, then I would think it's long past time for them to
give up - but that's a different issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top