473,770 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1550

"TTA" <ta*******@msn. com> wrote in message
news:b5******** *************** ***@posting.goo gle.com...
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.goo gle.com...
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******@comca st.net> wrote in message news:<LJ******* *************@c omcast.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.c om (TTA) wrote in message news:<b5******* *************** ****@posting.go ogle.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
1359
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, 2004 – IDEAlliance, a leading trade association dedicated to fostering XML and other information technology standards, today announced that Microsoft Corporation (NASDAQ: MSFT) has
85
3295
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 talking about the non-OO stuff, that seems to be handled much more elegantly in C++, as compared to C. For example new & delete, references, consts, declaring variables just before use etc. I am asking this question with a vested interest. I...
0
1149
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 Amit Kalani but it rerquires a firm intro to C# which I do not have yet. I am looking for book recommendations that are short and sweet that will get me up to speed quickly on the language enough to jump into ASP.Net.
0
1298
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 make the cursor jump to the following line in the textbox? For some reason, and this happens everywhere except on my development PC (and it's not consistent), if a user's writing a line and presses the <Enter> key, the program interprets that as...
4
2012
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 is essentially to just copy the 'model' database and give it the name of the application with the extension ".tmp". Then code opens the temp database and links to the tables. This has always worked flawlessly until today. Today, I needed to...
6
5045
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 not the address of the function itself. Are there any BKMs for getting the real address or am I going to have to write a function that looks to see whether the address is a jump instruction and if so compute the real address from the jump target?...
1
2804
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 keyboard working ! The mouse is OK, The keybord seams to be recongnized as "Desktop Elite Keyboard" but don't work. Can anyone help me please ?
0
1580
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 LIVE Virtual PROJECT MANAGEMENT Training, STUDY BY BEING AT YOUR OWN HOME/OFFICE, WHEREVER YOU ARE ACROSS THE GLOBE.
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.