Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

As a Java programmer, I\'m looking to learn either C or C++ by writing a databas

ID: 642473 • Letter: A

Question

As a Java programmer, I'm looking to learn either C or C++ by writing a database manager. Obviously, Java shares many idioms with C and C++, but yet both bring vastly different program design challenges. I'm looking to for a way to make this exercise as educational as possible. What aspects of taking on this project in C or C++ can help me make a decision about which approach will teach me the most, as a Java programmer?

One particular target of this exercise would be at least a subset of the spatial extensions in PostgreSQL.

Obvious issues to consider would be goodness of fit of C vs. C++ for:

modeling concepts of databases in general.
modeling spatial modeling in particular
Another major point would be the degree of expected difference from Java. Would a good, idiomatic design in C++ be enough different from a design in Java to teach new, different concepts, or would it mostly be the same concepts with slightly different syntax? Would a good design in C contain more concepts that were new or different than one in C++?

Explanation / Answer

First, don't take C and C++ as the same beast, they are different too.

Second, from Java, you could go to one or the other. C is simpler to understand, it's almost only functions.

C++ on the other side, is widely alien if you've worked only with Java or .Net. But it might be the most interesting for you.

I recommand to get familiar with what we call the RAII (badly named) idiom as it is central to the way you manage object lifetime in C++. It's about destructors and their benefic impact on memory management. There are a lot more to learn but that might be the most interesting part.

In fact, If I was you, for any new language I want to learn, I would just assume I'm a total newbie and go for basic tutorials. Never assume you know "a lot" of C++ in the first weeks. You'll be (badly) surprised later otherwise. Try reading Accelerated C++ or/and Thinking C++ (that is meant to explain C++ from the point of view of C or Java programmer) then pass to Effective C++ books and Effective STL books.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote