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

Z

ziliath

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.
 
W

who

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
 
D

Dave Rahardja

ziliath said:
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.

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!
 
A

Aguilar, James

ziliath said:

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
 
J

Jonathan Turkanis

ziliath said:
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 don't get it .... OH! you mean WTF. I've never seen it spelled out fully.
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!

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
 
D

David White

ziliath said:
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 ****?!

Er, why? The STL is a part of C++.
I may be missing something, but at what point when learning C++
was I supposed to have picked up STL?

Preferably in Lesson 1.
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.

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 crap 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. :)
To which I say good, I never learned that crap.

Then you missed a very important part of C++ when you learned it.
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!

Yes, error message technology has fallen behind compiler technology, but
with a bit of experimentation you can usually figure out what's wrong.
Google clearly has stacked their contest against C++ programmers,
which means that it is not about "top coders" after all.

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

DW
 
A

assaarpa

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.

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..
 
D

David Hilsee

assaarpa said:
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..
<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."
 
J

Jonathan Turkanis

assaarpa said:
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.

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

Jonathan
 
T

Thorsten Ottosen

| 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.bdsoft.com/tools/stlfilt.html

| 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
 
T

Tabrez Iqbal

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.

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.research.att.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
 
J

JKop

ziliath posted:
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.

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
 
G

Gernot Frisch

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() );

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.
 
O

Old Wolf

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 ****?!

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 ****?"
I may be missing something, but at what point when learning C++
was I supposed to have picked up STL?

The first day, I would hope.
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.

The 1980s called, they want their C-with-classes back.
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!

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?
 
P

Peter van Merkerk

Gernot said:
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.

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.
Don't do the same.
Use the STL, it's really really a great thing.

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.
 
F

Francis Glassborow

who said:
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? =:)

And with the attitude he has, he is unlikely to work for a company that
uses the Standard C++ Library.
 
A

assaarpa

First, let me point out that DLLs are platform-specific and off-topic.
Now,

<snip> Let me remind that saying that someone should get a new job, because
he works in the real world and not the fantasy world here, is also
off-topic. Nuff said.

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."

Yes, it is.

std::string foo();

If you call that method across dll boundary, you crash and burn. Bye bye
reusability. QED.
 
A

assaarpa

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

If you write "reusable" code with STL, it won't be reusable in that domain
but will crash and if you don't know your trade but just blindly trust the
STL to work correctly (hey, according to the standard it is valid code) it
WILL fail, so much for reusability. This means you cannot just take code
some top gun c++ programmer wrote and reuse it. Something the standard
library just isn't very good for, sorry to break the news but it isn't
perfect for everything.
 
P

Peter van Merkerk

assaarpa said:
Yes, it is.

std::string foo();

If you call that method across dll boundary, you crash and burn. Bye bye
reusability. QED.

Funny, I'm working large scale project which does exactly that, and a
lot. It doesn't crash and burn. But I admit you do have know what you
are doing (or to be more precise what happens under the hood) to get it
right.

Anyway this problem is not related to the STL. Passing C++ objects
(including homebrew ones) across DLL boundaries is always tricky
business. And if you compile the .exe and .dll with different compilers
you can forget it, because there is no standardized ABI for C++.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top