473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Intermediate to Elite: Making the jump

TTA
I'm an intermediate C++ programmer. My skills are good but they need
to be fine-tuned and my software methodologies in theory are good but
I need more practical experience . I am still in university pursuing
my bachelors in Comp Sci.

My old (and favorite) prof used to tell us the best way to learn a
language is to write a compiler. I know it's a big project, but the
guy did have a point. If you write a C++ compiler, you will have
awesome insight into the language.
The more and more I learn C++, the more I realize that greater
knowledge of what the compiler is trying to do must be obtained. This
will lead (IMO) to better programming.
All the books I can find on compilers usually too theoretical or the
opposite something like "Let's build a compiler". I am not interested
in a toolkit. Is there a good book or resource that tells me exactly
what's happening "behind the scenes"? I am interested in C++ solely.

The only thing that comes close to this is "Effective C++" by Meyers.
It's an excellent book but limits itself to 50 specific topics. Does
such a resource even exist or do I just need experience? I'd
appreciate some guidance.

Thanks
TTA
Jul 22 '05 #1
7 1525

"TTA" <ta*******@msn.com> wrote in message
news:b5**************************@posting.google.c om...
I'm an intermediate C++ programmer. My skills are good but they need
to be fine-tuned and my software methodologies in theory are good but
I need more practical experience . I am still in university pursuing
my bachelors in Comp Sci.

My old (and favorite) prof used to tell us the best way to learn a
language is to write a compiler. I know it's a big project, but the
guy did have a point. If you write a C++ compiler, you will have
awesome insight into the language.
Its good advice, but you don't have to write a C++ compiler, in fact that
seems a near impossible task for one programmer who by his own admission is
at intermediate level. Try a simpler language instead (maybe even one which
would be useful to you, rather than
The more and more I learn C++, the more I realize that greater
knowledge of what the compiler is trying to do must be obtained. This
will lead (IMO) to better programming.
Possibly.
All the books I can find on compilers usually too theoretical or the
opposite something like "Let's build a compiler". I am not interested
in a toolkit. Is there a good book or resource that tells me exactly
what's happening "behind the scenes"? I am interested in C++ solely.
Stanley Lippman's Inside the C++ Object Model. It's a bit dated but still
apparently useful, (I haven't read it, but it always seems to be recommended
when this sort of question comes up).

The only thing that comes close to this is "Effective C++" by Meyers.
It's an excellent book but limits itself to 50 specific topics. Does
such a resource even exist or do I just need experience? I'd
appreciate some guidance.


Well you could do worse than More Effective C++ by Scott Meyers, which is
quite a bit more advanced than the one you have read. I don't see what
either has specifically to do with writing a compiler however.

For a thorough treatment templates (including how compilers have to deal
with them) I would also recommend C++ Templates by Vandevoorde and Josuttis.
If nothing else this book will show you what an ambitious task you've set
yourself in writing a C++ compiler.

John
Jul 22 '05 #2
"TTA" <ta*******@msn.com> wrote
I'm an intermediate C++ programmer. My skills are good but they need
to be fine-tuned and my software methodologies in theory are good but
I need more practical experience . I am still in university pursuing
my bachelors in Comp Sci.

My old (and favorite) prof used to tell us the best way to learn a
language is to write a compiler. I know it's a big project, but the
guy did have a point. If you write a C++ compiler, you will have
awesome insight into the language.
The more and more I learn C++, the more I realize that greater
knowledge of what the compiler is trying to do must be obtained. This
will lead (IMO) to better programming.
All the books I can find on compilers usually too theoretical or the
opposite something like "Let's build a compiler". I am not interested
in a toolkit. Is there a good book or resource that tells me exactly
what's happening "behind the scenes"? I am interested in C++ solely.

The only thing that comes close to this is "Effective C++" by Meyers.
It's an excellent book but limits itself to 50 specific topics. Does
such a resource even exist or do I just need experience? I'd
appreciate some guidance.


I'm assuming that you already have Stroustrup's "The C++ Programming Language":
http://search.barnesandnoble.com/tex...sbn=0201700735

The following books aren't all recent, but they should give you plenty to work
with:

"The C++ Standard" is the place to start:
http://search.barnesandnoble.com/boo...sbn=0470846747. If
you're not implementing Standard C++, you're just implementing something else.

"The Annotated C++ Reference Manual" by Stroustrup and Ellis will give you
insights and rationales on the language that, to this day, you won't find
elsewhere:
http://search.barnesandnoble.com/tex...sbn=0201514591

Stroustrup's "The Design and Evolution of C++" will give you still more insights
into why things are as they are:
http://search.barnesandnoble.com/tex...sbn=0201543303

Lippman's "Inside the C++ Object Model" will give you some ideas of how to
implement various aspects of the language:
http://search.barnesandnoble.com/tex...sbn=0201834545

For compiler texts, if you're not making the bridge between theory and practice
from the canons like the Aho and Ullman books, you can dive into practical
compiler writing with these books:

"Compiler Design in C" by Allen Holub:
http://search.barnesandnoble.com/tex...sbn=0131550454

"A Retargetable C Compiler: Design and Implementation" by the Hans*n bunch:
http://search.barnesandnoble.com/tex...sbn=0805316701

The advantage of the latter is that the compiler described is available and
supported at http://www.cs.princeton.edu/software/lcc/.

Both of these implement C compilers, but the goal is to allow you to see how the
theory is applied (if all you wanted was to see an existing C++ compiler, you'd
just download the G++ or OpenWatcom source). You should be able to extrapolate
that into what's needed to write a C++ compiler, especially since a subset of the
language is already represented.

And just in passing, you might want to use the term "advanced" instead of
"elite". Aside from the term having pompous connotations (I'm sure that's not how
you meant it), it's now also sullied by the teeny-bopper-wannabe-hacker use of
"leet". There are few programmers in the world who could call themselves "elite"
without drawing gales of laughter from everyone in the vicinity. :-)

Claudio Puviani
Jul 22 '05 #3
I agree, building a compiler is a multi-man year project, there are
surely more efficient ways to improve your C++ programming and software
skills. Besides, the code I've seen in some compilers has been pretty
awful!

I'd recommend some of the Addison Wesley books in the same series,
Herb Sutter's books on Exceptional C++, Modern C++ Design - although
I could never get the examples to even compile on VC++, there are some
interesting ideas in there. There's another one, Applied C++, I didn't
think
it was up to the same level as the others, but if you want to see how things
are done in the real world, they have a some good coverage. Not language
specific but very useful in OOP, is Object Design Heuristics, lots of C++
snippets. Of course if you really want to make it as a C++ "elite", gotta
know Design Patterns by Gamma Et all.

Good luck.

dave
"TTA" <ta*******@msn.com> wrote in message
news:b5**************************@posting.google.c om...
I'm an intermediate C++ programmer. My skills are good but they need
to be fine-tuned and my software methodologies in theory are good but
I need more practical experience . I am still in university pursuing
my bachelors in Comp Sci.

My old (and favorite) prof used to tell us the best way to learn a
language is to write a compiler. I know it's a big project, but the
guy did have a point. If you write a C++ compiler, you will have
awesome insight into the language.
The more and more I learn C++, the more I realize that greater
knowledge of what the compiler is trying to do must be obtained. This
will lead (IMO) to better programming.
All the books I can find on compilers usually too theoretical or the
opposite something like "Let's build a compiler". I am not interested
in a toolkit. Is there a good book or resource that tells me exactly
what's happening "behind the scenes"? I am interested in C++ solely.

The only thing that comes close to this is "Effective C++" by Meyers.
It's an excellent book but limits itself to 50 specific topics. Does
such a resource even exist or do I just need experience? I'd
appreciate some guidance.

Thanks
TTA

Jul 22 '05 #4
TTA wrote:
I'm an intermediate C++ programmer. My skills are good but they need
to be fine-tuned and my software methodologies in theory are good but
I need more practical experience . I am still in university pursuing
my bachelors in Comp Sci.

My old (and favorite) prof used to tell us the best way to learn a
language is to write a compiler. I know it's a big project, but the
guy did have a point. If you write a C++ compiler, you will have
awesome insight into the language.
The more and more I learn C++, the more I realize that greater
knowledge of what the compiler is trying to do must be obtained. This
will lead (IMO) to better programming.
All the books I can find on compilers usually too theoretical or the
opposite something like "Let's build a compiler". I am not interested
in a toolkit. Is there a good book or resource that tells me exactly
what's happening "behind the scenes"? I am interested in C++ solely.

The only thing that comes close to this is "Effective C++" by Meyers.
It's an excellent book but limits itself to 50 specific topics. Does
such a resource even exist or do I just need experience? I'd
appreciate some guidance.


This seems somewhat like trying to become a better driver by building a
car. I'm not convinced it will work, and the time investment will be
enormous, especially if you're not interested in starting from a kit.
Jul 22 '05 #5
John Harrison wrote:

Well you could do worse than More Effective C++ by Scott Meyers, which is
quite a bit more advanced than the one you have read. I don't see what
either has specifically to do with writing a compiler however.


True... anything by shildt immediately comes to mind. Stroustrup is also
a good reference.

Joe
--
#----------------------------------------------------------#
# "Don't fear the penguin!" #
#----------------------------------------------------------#
# Registered Linux user: #309247 http://counter.li.org #
#----------------------------------------------------------#
Jul 22 '05 #6
TTA
Jeff Schwab <je******@comcast.net> wrote in message news:<LJ********************@comcast.com>...
This seems somewhat like trying to become a better driver by building a
car. I'm not convinced it will work, and the time investment will be
enormous, especially if you're not interested in starting from a kit.


Thank you all for the great response. A couple of you pointed out that
this is not a "one-man" project. If the project becomes serious, then
I will definitely have a team. But the whole point is to hone *my*
skills. I've participated in many group programming assignments
throughout college and while I realize that a group is pretty much
required to produce anything non-trivial (some might disagree), I will
see how far I can go.
The analogy of becoming a better driver while building a car to
building a compiler to learn the language does not hold very well.
You're writing a compiler FOR the language IN the language. I'm
confused...how does that not teach you better C++? You may still need
to learn some software methodologies for different types of projects,
but you'd know the language inside-out. But I do understand your
point.
Jul 22 '05 #7
ta*******@msn.com (TTA) wrote in message news:<b5**************************@posting.google. com>...

[ ... ]
The analogy of becoming a better driver while building a car to
building a compiler to learn the language does not hold very well.
You're writing a compiler FOR the language IN the language. I'm
confused...how does that not teach you better C++?
Almost any major project (and a C++ compiler certainly qualifies) will
be educational, but learning C++ by writing a C++ compiler is a bit
like trying to read books under a microscope -- you miss the forest
for the trees.
You may still need to learn some software methodologies for different
types of projects, but you'd know the language inside-out. But I do
understand your point.


The relationship is not nearly as close as you seem to think -- I've
written compilers (and interpreters) for languages without ever
knowing those languages particularly well. I've also learned some
languages quite well without ever writing a compiler for them.

At least in my experience, your first two translators are more or less
throwaways. In the first, you're so caught up in learning the basics:
parsing, code-generation, etc., that those are really about all you
can learn at that stage. Intentionally or not, the second is largely
a rewrite of the first, using techniques you learned too late in the
first to apply them where you wanted to, and so on -- even when
they're really inappropriate to the project at hand.

The third translator is the first one in which you can start to step
back and look at things more systematically. Chances are that by
then, however, you'll have started to look at most languages as
variations on a couple of themes, and instead of really wanting to
know every detail of a particular language, you start to wish they
(the languages) were more consistent and had fewer of those ugly
details to deal with.

That usually leads to designing and implementing a few languages of
your own. Chances are they'll have some improvements over their
direct predecessors, but also that they'll never be used by anybody
but you and perhaps a few of your close friends.

After that, if you're a programmer who designed a few languages,
you'll do other programming, and occassionally when you look at a
language spec, you'll cringe and think "I'm sure glad I don't have to
write a compiler for that!".

OTOH, if you're really a language designer who happens to porgram,
you'll apparently continue trying to invent a better programming
language. If you're good (and a bit lucky) you might become the next
Dennis Ritchie, Bjarne Stroustrup, Niklaus Wirth, etc. (I can only
speak about this from observation though -- I'm clearly in the
category of a programmer who's designed a few languages).

Of course, there are other choices at each stage: just for example,
there are a few people who really do just write compilers and never
seem to have designed their own languages. For a long time, Walter
Bright seemed to be in that category, but now he's designed a language
of his own too (and it's better than most, I might add).

In the end, I'd say this: a particular language is nothing more than a
particular notation for expressing solutions to problems. Learning a
particular language in exceptional detail only helps you (possibly) do
a (slightly) better job of expressing the solution -- the real task is
in programming is the solution itself. Problem solving transcends
language.
--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marion Elledge | last post by:
Microsoft Signs On as Elite Sponsor of XML 2004; Expanded Conference Program Announced Presentations Added from Adobe, Justsystem, Lockheed Martin, Microsoft, W3C Alexandria, Va. – Nov. 10,...
85
by: masood.iqbal | last post by:
I know that this topic may inflame the "C language Taleban", but is there any prospect of some of the neat features of C++ getting incorporated in C? No I am not talking out the OO stuff. I am...
0
by: NotGiven | last post by:
Hi: I am a notes programmer where I used a subset of VB, called lotus script, to write code. I have written classes and have had Java training - been a while though. I bought a good book by...
0
by: VMI | last post by:
If I'm in a multi-line textbox and I'm writing a postal address (ie. write ist line and press <Enter>, write 2nd line and press <Enter>, etc...) how can I make sure that the Enter key will always...
4
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation...
6
by: Todd A. Anderson | last post by:
I have a function foo of which I need to get the address. The problem is that when you say "&foo" (or just foo for that matter), you get the address of this function's entry in a jump table and...
1
by: =?Utf-8?B?SmVhbmxvdQ==?= | last post by:
Hello, On a new Asus motherboard, (two Xeon dual core 5050), following the usual procedure to install the hardware (including the "Wireless Intellimouse Explorer 2) I did not succeed to make the...
0
by: makarand | last post by:
Accelerated PMP® LIVE Virtual PROJECT MANAGEMENT Training PMSOFT Consultancy Pvt. Ltd. PMI REP, Global Contact: pmsoftglobal@gmail.com Tel: +91-20-25465039, 32909325, 9372150556 Attend the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.