google "top coder" contest = stacked against C++ coders

google "top coder" contest = stacked against C++ coders

Post by ziliat » Fri, 17 Sep 2004 11:32:18


I recently tried out the Google "top coder" contest, as a C++
coder. I noticed immediately that they expected me to know STL.
To which I say, what the *** ?!

I may be missing something, but at what point when learning C++
was I supposed to have picked up STL? I ask because at every
job I've had, and every job interview for that matter, whenever
STL comes up it's not I, but a manager who says effectively
yuck, we don't use that crap.

To which I say good, I never learned that crap.

Not that I haven't tried using it. The error messages that any
newbie-to-STL is bound to get were 100+ lines long. Really useful!

Google clearly has stacked their contest against C++ programmers,
which means that it is not about "top coders" after all.
 
 
 

google "top coder" contest = stacked against C++ coders

Post by who » Fri, 17 Sep 2004 12:18:07

The STL is part of the standard C++ language right? Then that's part of C++
isn't it? So, if an exam of some type contains a series of questions
regarding C++ programming it will have questions relating to the language
right?

The STL is taught at any introductory university course on C++ programming.
Pickup an introductory C++ book these days and you'll be hard pressed to
find one without details of it. It greatly simpilfies certain things in the
language, but can be complex to some beginners. I'd rather be coding apps
and libraries using the STL rather than reimplementing a hell of a lot of
code that it already offers. It's not difficult to understand the basics.

There are many companies where programmers use the STL, just because you
haven't worked in one doesn't mean that they don't exist - right? =:-)

Regards,

M

 
 
 

google "top coder" contest = stacked against C++ coders

Post by Dave Rahar » Fri, 17 Sep 2004 12:28:45


The standard library included with any language is as valuable as the
language itself. You can say that the C library is not technically part
of the C language, so you needn't learn all that printf stuff, but you'd
just be fooling yourself.

I've learned to love the STL, and I use it occasionally, when the
appropriate opportunity arises. But if you never learn it, you'd never
know when it'll come in handy!
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Aguilar, J » Fri, 17 Sep 2004 12:45:50


Most C++ programmers know the STL. The contest is not stacked against C++
programmers (as your misleading title says), but against any programmer that
does not know the basics of the system library of the language they will be
using.

The probable reason for this is that you are not allowed to include any
nonstandard headers. Should you be surprised? With non-standard headers,
you can gain an advantage that others don't have. To prevent this, they
level the playing field. You can try it without the STL, but good luck on
actually doing anything productive. How are you even going to get input
from the user?

James
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Jonathan T » Fri, 17 Sep 2004 13:18:06


I don't get it .... OH! you mean WTF. I've never seen it spelled out fully.


I guess you don't care about extensibility, reusability or genericity, and
neither do any of your managers. Maybe you should get a new job.

Jonathan
 
 
 

google "top coder" contest = stacked against C++ coders

Post by David Whit » Fri, 17 Sep 2004 13:27:58


Er, why? The STL is a part of C++.


Preferably in Lesson 1.


That's a bit difficult to understand, since the STL makes it very easy to do
many useful things. Perhaps those managers would have been more truthful if
they'd said, "We could never be bothered learning that crap, so we really
wouldn't have a clue if it's *** or not." I suggest that the most competent
C++ programmers would be less than impressed with such an attitude from a
manager, and look elsewhere. Besides, you should never let managers near
your code. :-)


Then you missed a very important part of C++ when you learned it.


Yes, error message technology has fallen behind compiler technology, but
with a bit of experimentation you can usually figure out what's wrong.


Sounds to me like they've stacked their contest in _favour_ of C++
programmers.

DW
 
 
 

google "top coder" contest = stacked against C++ coders

Post by assaarp » Fri, 17 Sep 2004 13:31:49

> I guess you don't care about extensibility, reusability or genericity, and

A common misconception.

First, I acknowledge that the c++ does not know about dll's or Windows - but
the Real World does! Use std containers to pass objects across dll
boundaries and you crash and burn so beautifully.

The work around is not to pass std containers across dll boundaries, and
guess what? That means the reusability and genericity is thrown right out
the door, you cannot just take c++ code someone written using std containers
and plug it in (=reuse). Nope. What you have to do is fix this c++ God's
mistakes and with that HE had taken that new job..
 
 
 

google "top coder" contest = stacked against C++ coders

Post by David Hils » Fri, 17 Sep 2004 13:55:26


and
but
containers
<snip>

First, let me point out that DLLs are platform-specific and off-topic. Now,
having said that, I doubt that standard containers cause a huge headache
when it comes to DLL boundaries. In the worst case (which I guess happens
when a container cannot be passed across any interface for some odd reason),
I would expect that there might be a need to convert the container into
another type and then later convert it back into the container. That means
that you have to write a function that transforms the container into
something like an array or a linked list, and then you have to write a
function that transforms it back. That's no big deal. Granted, if there is
an issue, it helps to be aware of it before encountering it, but that's true
of any problem. I don't think that means that reusability is "thrown right
out the door."

--
David Hilsee
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Jonathan T » Fri, 17 Sep 2004 14:02:35


Passing objects between dll's is a general problem which doesn't have anything
to do with STL.

Jonathan
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Thorsten O » Fri, 17 Sep 2004 15:03:55


| I recently tried out the Google "top coder" contest, as a C++
| coder. I noticed immediately that they expected me to know STL.
| To which I say, what the *** ?!

after all, this must be the biggest breakthrough in programming of the
previsous decade.

| I may be missing something, but at what point when learning C++
| was I supposed to have picked up STL? I ask because at every
| job I've had, and every job interview for that matter, whenever
| STL comes up it's not I, but a manager who says effectively
| yuck, we don't use that crap.

clearly someone who didn't learned it either.

| To which I say good, I never learned that crap.

he he, bad for you. If you can't even use std::sort(), I guess you're in
truoble.

| Not that I haven't tried using it. The error messages that any
| newbie-to-STL is bound to get were 100+ lines long. Really useful!

This is often a mixture of compiler QoI and STL implementation. You also
want to use an IDE that jumps to the line where the error is detected. And
then
you might want to check out STLfilt: http://www.yqcomputer.com/

| Google clearly has stacked their contest against C++ programmers,
| which means that it is not about "top coders" after all.

most programmers learn both languages and quickly discovers that Java is for
toy programs.

br

Thorsten
 
 
 

google "top coder" contest = stacked against C++ coders

Post by tabrez19_ » Fri, 17 Sep 2004 15:43:48


i don't think STL part of the Standard C++ is such a beast which
should be avoided as long as possible. In fact you are much better
startinf using it from your very first programs. Look what Stroustrup
suggests as a sample program:

http://www.yqcomputer.com/ ~bs/bs_faq2.html#simple-program

it uses both containers and algorithms.

the people who say that they never learned the "crap" are using a very
outdated version of C++ and run the risk of soon becoming "out-dated"
themselves. You better follow other examples. I wonder which book(s)
you followed while learning C++.

tabrez
 
 
 

google "top coder" contest = stacked against C++ coders

Post by JKop » Fri, 17 Sep 2004 17:08:46

ziliath posted:

C++
know STL.
learning C++
every
whenever
effectively
that any
Really useful!
programmers,

The STL is dead handy.

Would you prefer spending an hour or so messing with
strings, or just do:

std::string blah = "hello" + something + " -" + otherstuff;

I always use the STL in conjunction with Win32API.

When I'm done messing with the string I simply:

FindFirstFileEx( blah.c_str() );


-JKop
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Gernot Fri » Fri, 17 Sep 2004 17:45:14


Unfortunately I jumped into C++ programming using MFC. Now my code is
full of CArray, CString and CFile. Great, MS. Now I have to rewrite
piece by piece if I want to have it portable one day. Did you know
that none of the MFC container classes has an = operator? It was the
worst idea not to use STL by MS, and I got trapped. Don't do the same.
Use the STL, it's really really a great thing.
 
 
 

google "top coder" contest = stacked against C++ coders

Post by oldwol » Fri, 17 Sep 2004 17:49:56


You seem to be a bit out of touch. This is akin to saying
"I went for a programming interview for a C job and they
expected me to know pointers. What the *** ?"


The first day, I would hope.


The 1980s called, they want their C-with-classes back.


A poor workman blames his tools. Why don't you try learning
from a book or a tutor, rather than "trial-and-error" self-teaching?
How about if I said that foreign (spoken) languages were stupid
because when I try them out I get error messages I can't understand?
 
 
 

google "top coder" contest = stacked against C++ coders

Post by Peter van » Fri, 17 Sep 2004 18:18:42


MFC is older than the STL. When the first version of MFC was released
there was no standard library and at the time it had to be compiled on
compilers that supported little more than "C with classes". Visual C++
1.0 had no support for templates, exceptions, RTTI...etc, in fact it had
little in common with what we today consider to be C++. If you turn the
clock twelve years back, many of the choices the MFC developers made are
understandable. But from todays point of view MFC is a load of obsolete
crap.


Agreed, having been in a situation where I couldn't use the standard
library and having been forced to use alternatives solutions I can tell
that the standard library (often) makes life so much easier and more
productive.

--
Peter van Merkerk
peter.van.merkerk(at)dse.nl