coming back to C++ for a job (C++ and Java)

D

Digital Puer

I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.
 
P

Peter van Merkerk

I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Just to satisfy my curiosity, why do you consider switching to C++?
Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++?

Depends on the job I guess.
or would a strong, generalised
knowledge of object-oriented programming be more important?

C++ is a multiparadigm language, having strong knowledge of OOP is good
but addresses only one aspect of the language. I.e. it isn't the only
thing you need to know. If I would be hiring a C++ programmer I would
expect him or her to know the standard library and idioms commonly used
in C++ (like RAII) as well.

Having much experience with Java and C can be, but not necessarilly is,
a good thing. The most important thing to realize is that C++ is a
really different language and should be treated as such. A common
mistake made by many former C and Java programmers is that they are
trying to reapply the things they learned from those languages in C++.
Even though that might work, it rarely results in optimal C++ code. I
think one of the things that makes the transition from Java to C++
(unnecessarily) hard is that they have similar syntax but different
semantics.
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.

It is difficult to tell if your assessment is valid or not without
knowing your current level of C++ knowledge. Chances are that you might
underestimate it. I learned C++ as part of my study 11 years ago, at the
time it didn't cover things like RTTI, exceptions, templates and the
standard library. Consequently what I learned back then would be of
little use today if I hadn't bothered to keep up with the C++
developments over the years.

Eventually it all depends on the job; some jobs may require only
rudimentary knowledge of C++, other jobs may require you to be able to
comprehent the most advanced template techniques.

HTH
 
A

Agent Mulder

<Digital Puer>
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.
</Digital Puer>

You already programmed in C++ and then started Java. Now
you come back to C++. Nice. Your years on Java are not
wasted, at least you won't have the "object scare" that many
C++ programmers have. They treat objects like slimy creatures
from the pond, you know that you must take a firm grip on them
just above the tail.

You will miss some Java features, especially

-trace back on exception
-multiple entry points (each class its own main!)
-declaration and definition in one place

You can come away with the last point, though, but many C++
programmers find that extremely bad style.

The most important part for you to learn is without doubt
the STL. You need to understand templates, vectors, iterators,
and generic programming. Best to buy some good books
and burry yourself in study.

-X
 
P

Phlip

Digital said:
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.

I usually tell the "get a job" threads that the work is in maintenance these
days - that goes double for C++. Whether companies survived the last few
years, sadly, did not depend on the quality of their code. Usually it was
written in a rush with terrible quality.

Learn to retrofit unit tests on it, then for each bug report prove you can
write a test reproducing the bug before fixing it. Then run the tests over
and over again.
 
B

brougham3

My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

In other words, you have no commercial C++ experience.

While your knowledge of OO will help, C++ is complex enough that there is a
steep learning curve.

C++ is similar to C and to Java. If I were your potential employer, I'd
grill you on items specific to C++. So if I were in your position, I'd make
sure that I knew the nuances of C++ that are completely different from C and
Java. Then, take charge and don't wait to be asked. "Yes, I know that C++
is different in many ways." Demonstrate your knowledge and your experience.
 
J

jeffc

Digital Puer said:
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?

If I were the hiring manager, then the latter. But in this job market, it
seems to be the former.
 
D

Drew Volpe

Last time we met said:
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.


I know that I would be very rusty in C++ if I had never known
very well and hadn't used it at all in over 5 years.

If I were you, I would find an open source project in C++ that
sounded interesting and needed help. Download its code and
start tinkering. Nothing refreshes one's memory like working on
an actual project. After you've made some contributions, you
will be able to tell employers that you're actively using C++
and have some code samples to show them.


Why do you want to switch to C++ ? ime, there are more and better
jobs working in Java than in C++.

And have you considered C# ? There are starting to be a lot of
C# jobs and the switch to it from Java isn't as big a leap as
to C++. C# and Java are very similar and, unlike C++, no one
has been programming in C# for more than a few years because it's
only been around a few years.




dv

--
--------------------------------------------------------------------------
The geographical center of Boston is in Roxbury. Due north of the
center we find the South End. This is not to be confused with South
Boston which lies directly east from the South End. North of the South
End is East Boston and southwest of East Boston is the North End.

Drew Volpe, mylastname at hcs o harvard o edu
 
W

William

Digital Puer said:
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?

I my opinion, that's going to depend on the nature of the job, and
the person who's interviewing you. (I've repeatedly gotten jobs
requiring skills I didn't have at all, but which the person I
interviewed with figured I come up to speed on based on my
track record and experience.)

Back to the nature of the job: what happens if you come
upon a job that's heavily C++, but light on OOP? Say, they call
it C++, but it's really C with // comments, classes substituting
directly for structures, and a little function overloading? Then
your C skills mean more than your java. (This pretty much
describes my first C++ job.)

I wouldn't count on that situation. I think your experience will
count for a lot, but it's probably time to start brushing up with
at least the most popular state-of-the-art in C++. I find reading
language-specific newsgroups a painless way to pick up the
oft-overlooked details of a language, once you figure out who
the knowledgeable posters are, anyway :) -Wm
 
M

Malcolm

Digital Puer said:
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.
It depends on the job. Generally a more intellectual, and probably
better-paid job will expect some general knowledge of programming, combined
with either specialist knowledge of the application area (3d graphics,
derivatives trading, or whatever it is they do) or the general intelligence
to pick it up.
On the other hand, if the company is basically bashing out Windows GUI code,
and they're looking for a senior programmer to supervise a couple of
juniors, then they would probably demand knowledge of MS Visual C++
specifically.
 
D

Digital Puer

Thanks everyone for your input. I really appreciate your feedback.

To answer various responses, I'm looking at C++ largely because
the particular jobs I'm looking for happen to require C++, not
because I don't like Java anymore. Also, I'll start working with
C# the day they pry my cold, dead hands away from my Sun UltraSPARC
keyboard.

I actually took a step forward a few months ago to review my C++.
I bought a book called Accelerated C++, and it was quite a
revelation. So much has changed since I last studied C++ back
in 1994. e.g. #include <map> instead of #include <map.h>,
namespaces, the use of templates, the STL, etc.

I am glad I already had a strong background in Java's Collections
classes, or else I would have had a hard time learning about STL's
containers with parameterised types. At the very least, "vector"
and "string" are familiar buddies. :)

I still don't understand what the hell RTTI does, what a virtual
destructor is, and how to resolve circular inheritence (something
Java doesn't have), but that just means I have more to read.


Again, thanks.
 
D

Dave Glasser

(e-mail address removed) (Digital Puer) wrote on 30 Aug 2003 13:40:20
-0700 in comp.lang.java.programmer:
Thanks everyone for your input. I really appreciate your feedback.

To answer various responses, I'm looking at C++ largely because
the particular jobs I'm looking for happen to require C++, not
because I don't like Java anymore. Also, I'll start working with
C# the day they pry my cold, dead hands away from my Sun UltraSPARC
keyboard.

I actually took a step forward a few months ago to review my C++.
I bought a book called Accelerated C++, and it was quite a
revelation. So much has changed since I last studied C++ back
in 1994. e.g. #include <map> instead of #include <map.h>,
namespaces, the use of templates, the STL, etc.

I am glad I already had a strong background in Java's Collections
classes, or else I would have had a hard time learning about STL's
containers with parameterised types. At the very least, "vector"
and "string" are familiar buddies. :)

I still don't understand what the hell RTTI does, what a virtual
destructor is, and how to resolve circular inheritence (something
Java doesn't have), but that just means I have more to read.

If you happen to get hired into a C++ shop, you might find that the
majority of your fellow coders don't understand or use those things
either.

Don't be intimidated. What do you have to lose by interviewing, except
a few hours of your time?

DeMarco and Lister's _Peopleware_ says that beyond 6 months, the
amount of experience someone has with a language is not a reliable
indicator of how well they'll perform with it. In other words, an
extremely talented programmer who's been coding in C++ for 1 year
could easily be programming rings around some schlep who's been doing
it for 10 years. I've seen that borne out in the real world time and
again.

In the past, when I've interviewed prospective Java programmers,
relevant experience was always a major factor but certainly not the
only one. Given the choice between someone who was, say, a top-notch
C++ programmer looking to get into Java, with little RW experience but
a lot of enthusiam and IQ points, and a 2 year Java developer who
could fumble through the technical interview but lacked that certain
je ne sais quoi, I'd pick the former in a heartbeat.

Of course, as someone said, getting some fresh C++ experience on an
actual project is a good idea, and it will show prospective employers
you're serious about the language. If I were interviewing a
prospective developer and I discovered that he/she had no compilers or
code editors of any kind installed on his/her home PC, and never wrote
a line of code outside their workplace, that would very likely be the
kiss of death.

Plus, get some books and learn the various arcana of C++, like RTTI,
so you can knock those questions out of the park in a technical
interview.
 
L

llewelly

[comp.lang.java.programmer, comp.programming removed]

Thanks everyone for your input. I really appreciate your feedback.

To answer various responses, I'm looking at C++ largely because
the particular jobs I'm looking for happen to require C++, not
because I don't like Java anymore. Also, I'll start working with
C# the day they pry my cold, dead hands away from my Sun UltraSPARC
keyboard.

I actually took a step forward a few months ago to review my C++.
I bought a book called Accelerated C++, and it was quite a
revelation. So much has changed since I last studied C++ back
in 1994. e.g. #include <map> instead of #include <map.h>,
namespaces, the use of templates, the STL, etc.

I am glad I already had a strong background in Java's Collections
classes, or else I would have had a hard time learning about STL's
containers with parameterised types. At the very least, "vector"
and "string" are familiar buddies. :)

W.r.t to vector, (and other stl containers) look out for C++'s
iterator invalidation rules. Every container operation in the
standard library has rules for when it invalidates iterators,
pointers, and references to its elements. Make sure you know them,
e.g., do not forget that:

vector<int> v(10);
vector<int>::iterator i= v.begin();
v.push_back(1); //push_back invalidates all iterators.
int j= *i; //Bad! Has undefined behavior.

has undefined behavior.
I still don't understand what the hell RTTI does,

You will seldom use RTTI directly. Java has RTTI (in fact it has
easier to use and more powerful RTTI than C++ does) ; how often
did you use it?

In any case, here are some rough equivalents w.r.t RTTI:

C++ virtual function => any non-private, non-static method in Java

In Java, all non-private non-static methods are
polymorphic. In C++, only member functions marked 'virtual'
are polymorphic, whether they are private or not. static
member functions cannot be virtual.

Note that many C++ types need no virtual functions
whatsoever.

virtual functions are not precisely RTTI, but they do make
indirect use of the same mechanism, and in C++, only types
that have virtual functions support RTTI.

The FAQ covers virtual functions:
http://www.parashift.com/c++-faq-lite/virtual-functions.html

So does Accelerated C++, see ch 13.

C++ dynamic_cast<T&>(u) => Java (T)u , where T is of polymorphic
class type, and u is a reference to a polymorphic object.

However, while Java's dynamicly typed collections require you to
use (T)u frenquently, C++'s stl containers are staticly typed
generics, and do not require use of dynamic_cast<>. You'll
seldom have reason to use dynamic_cast<>

(Some caution is in order here: C++ does have a notation like
(T)u for casts inherited from C, but there is seldom
reason to use it, and it is *very* different from what (T)u
does in Java. )

I don't see dynamic_cast<> in either the C++ FAQ Lite or
Accelerated C++. Perhaps I'm blind, or perhaps that's a
measure of how seldom it's used.

I can't recall Java's equivalent of typeid(), but it hardly
matters; there is seldom reason to use typeid.
what a virtual destructor is,

A destructor is a special member function which destroys an object. If
the base class destructor is virtual, when the object is destroyed
(by using 'delete', for example) the actual destructor called will
be selected at run time, according to the run-time type of the
object being destroyed (like any other virtual function.)

Accelerated C++ covers virtual destructors in 13.2.2 . The C++ FAQ
lite covers them at
http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.5
and how to resolve circular
inheritence

I would like to know what you are calling ' circular inheritence '. This:

struct Foo : Foo
{

};

is ill-formed in C++ .

[snip]
 
L

llewelly

Phlip said:
I usually tell the "get a job" threads that the work is in maintenance these
days - that goes double for C++. Whether companies survived the last few
years, sadly, did not depend on the quality of their code. Usually it was
written in a rush with terrible quality.

Learn to retrofit unit tests on it, then for each bug report prove you can
write a test reproducing the bug before fixing it. Then run the tests over
and over again.

And learn to review code you didn't write. Everywhere I've worked,
I've fixed thousands of bugs that way.
 
M

Marmagya

Hi group,
There are scores of books available on Java and C++. This group
comprises of experts in these two languages. Would anyone point out to a
few good reference books? Basically I am looking for books that target a
beginner in these languages.
Thanks a lot for your time and attention in advance.

Regards
Marmagya.
 
D

Darryl L. Pierce

Digital said:
I'm looking at some software development jobs whose listings
require C++ experience. My history is that I have a strong
C background, and a few years of C++ from undergrad classes.
I've been working with Java since 1997 and consider myself
a decent Java programmer.

Now, if I apply for C++ jobs, do you think it's important that
I know the fine details of C++? or would a strong, generalised
knowledge of object-oriented programming be more important?
I don't think there's anything major in C++ I wouldn't recall
if I had a few minutes to look it up in a book.

Have you maintained familiarity with generic programming as well as the
newer features of C++, such as namespaces (not a hard topic but a fine
entry point to ask)? I did C++ for years before I picked up Java and was
surprised last year at how much C++ had changed in the meantime. I read
two C++ starter books last year to reacquaint myself and have since read
a few other books, such as _Modern C++ Design_ and _Effective C++_.

I guess my point is, if you're looking at a C++ job, you definitely want
to have more than a passing or old acquaintance with the language.
Refamiliarize yourself with it and get your skills back up, because the
people you'll be working with are going to have a more in-depth
understanding and will likely be using more aspects than you're remembering.
 
A

Agent Mulder

<Marmagya>
There are scores of books available on Java and C++. This group
comprises of experts in these two languages. Would anyone point out to a
few good reference books? Basically I am looking for books that target a
beginner in these languages.
</Marmagya>

There is wide consensus over the quality of these two C++ books:

-Koenig,Moo;Accelerated C++;Addison-Wesly
-Stroustrup;The C++ Programming Language;Addison-Wesly

Two Java books that did it to me where:

-Niemeyer,Peck;Exploring Java;O'Reilly
-Chan,Lee;The Java Class Libraries Second
Edition,Volume2;Addison-Wesley

The last one is chock full of examples that you
can easily type in. After that, you wont fear any
GUI.

-X
 
T

TLOlczyk

Have you maintained familiarity with generic programming as well as the
newer features of C++, such as namespaces (not a hard topic but a fine
entry point to ask)? I did C++ for years before I picked up Java and was
surprised last year at how much C++ had changed in the meantime. I read
two C++ starter books last year to reacquaint myself and have since read
a few other books, such as _Modern C++ Design_ and _Effective C++_.
I would focus a bit on namespaces, more on STL. I would not focus on
generic programming for one simple reason: it violates Feynmans middle
cog rule-- when having to chose a cog with a fixed tooth to diameter
ratio, always choose a cog from the middle of your group. ( Reason the
cog on both ends of the group will always be marginal, if they could
make them smaller or bigger they would. Since they can't that suggests
that they were just barely able to make the ones on the end. )
 
D

Digital Puer

Agent said:
There is wide consensus over the quality of these two C++ books:

-Koenig,Moo;Accelerated C++;Addison-Wesly

I agree. This is the book I'm using to review my C++. I like this
book because it jumps right into use of the STL. If you want
a softer start and are already familiar with C, you can
try "C++: The Core Language" by Satir and Brown, but it
does not reach templates or the STL.



-Stroustrup;The C++ Programming Language;Addison-Wesly

This was a bit too hard-core for me.

Two Java books that did it to me where:

-Niemeyer,Peck;Exploring Java;O'Reilly
-Chan,Lee;The Java Class Libraries Second
Edition,Volume2;Addison-Wesley

The last one is chock full of examples that you
can easily type in. After that, you wont fear any
GUI.

If you already know C, then "Just Java" by van der Linden
is a great introduction to Java.
 
L

llewelly

[comp.lang.java.programmer, etc, removed]

Digital Puer said:
I agree. This is the book I'm using to review my C++. I like this
book because it jumps right into use of the STL. If you want
a softer start and are already familiar with C, you can
try "C++: The Core Language" by Satir and Brown, but it
does not reach templates or the STL.
[snip]

Accelerated C++ is excellent, but before you decide to read _C++: The Core
Language_, you should read:

http://www.accu.org/cgi-bin/accu/rvout.cgi?from=0au_b&file=cp002009a

I own that book, and I feel it is a very bad C++ book. I will not loan
to anyone, for fear they will be worse off for having read
it. This was big disappointment for me, after all the excellent
O'Reilly books I have read, to find one so awful.
 
A

Agent Mulder

There is wide consensus over the quality of these two C++ books:

-Koenig,Moo;Accelerated C++;Addison-Wesly
</Agent Mulder>

I agree. This is the book I'm using to review my C++. I like this
book because it jumps right into use of the STL. If you want
a softer start and are already familiar with C, you can
try "C++: The Core Language" by Satir and Brown, but it
does not reach templates or the STL.
</Digital Puer>

<llewelly>
I own that book, and I feel it is a very bad C++ book. I will not loan
to anyone, for fear they will be worse off for having read
it. This was big disappointment for me, after all the excellent
O'Reilly books I have read, to find one so awful.
</llewelly>

I have it, too. It shows a sniffling coatimundi on the cover, a South
American mammal of the Procyonid family. Never read it but I'll take
your word for it. Times are gone were you would buy an O'Reilly book
just because it was an O'Reilly book. I owe a completely useless Java
Language Reference by Mark Grand. But on the other hand,
Java in a Nutshell (David Flanagan) is very good, especially when you're
into C++.

-X
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top