473,414 Members | 1,711 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,414 software developers and data experts.

how can i be a good programmer in c and c++?

How should i learn programming and what is the best way of learning c and c++? which is the best book of c and c++ programming language?

I have been studying from the book " the complete c++ reference" written by "Mr. Herbert Schildt".
May 10 '10 #1
9 12788
Frinavale
9,735 Expert Mod 8TB
Go to school and become a software developer.
There are a lot of things that you can learn from a book but school will give you a more hands on approach.

PS arrays are just blocks of memory that is accessible in sequence...there's not much logic to them.
May 13 '10 #2
Meetee
931 Expert Mod 512MB
To become a good programmer, I think various aspects should be taken care of:

1. One should be strong logically. Start with small small code snippets and understand the logic behind them.
2. Run the same code under various input and identify the reasons behind the outputs.
3. Write a code with proper coding convention, so you yourself don't get confused and code program quality improves.
4. Write a code with minimum bugs. Take care of memory allocation and exception handling while using pointers in C/C++.
5. There are various sites discussing technology interview puzzles. Solve them.
6. Do continuous practice.

Complete c++ reference is a good book to start with. Arrays are very well explained in there. Ask if you don't understand anything in our C/C++ forum.
May 31 '10 #3
I'm quite sure of your skill level, purpose for learning and age but here's my best advice:

1) Write your code knowing someone else will read it. This means using comments to explain what you want your code to do so they can understand your though process. Even if no one else reads it, if you need to come back to it and if you've forgotten, your comments will save you. Write your code like an english paper. A little known secret is that english majors actually make the best coders. They understand the importance of formatting, style and readability. Understanding code is more important that just getting it to work.

2) Don't code without a plan or design. Use flowcharts and block diagrams before you start coding. Write a document that describes what you plan on doing. Write pseudo code in your .c or .cpp files to provide an outline of sorts. This will keep your code on track and prevent your code/functions from doing too much.

3) Write modular code. Modular code is efficient, small and easy to implement. It also helps you follow your design by abstracting/separating features and functions.

4) Know your target. For a PC, memory is abundant and CPU power is 'infinite'. You should still be aware of memory leaks (malloc/free, new/delete) but it's not completely critical. For an embedded system, ie, Atmel, MSP430, etc. you REALLY need to pay attention to your array sizes, heap, etc.

5) Learn from the masters. Anyone who codes well in C knows about K&R (http://en.wikipedia.org/wiki/The_C_P...Language_(book)) Buy it. Seriously. Anyone who codes well in C++ knows about the gang of four (http://en.wikipedia.org/wiki/Gang_of_Four_(software)) and Scott Meyers' Effective C++. Again, seriously. Buy these books. If you're trying to become a professional SW engineer, try to get a job at a telecom company. They are known for their coding prowess, process, standards, etc. Remember C and C++ were both created by engineers at Bell Labs (now Lucent/Alcatel). Personally, I'd stay away from learning from open-source code, ie, Linux and they underlying frameworks. Community projects typically don't have people that are as invested as you'll find at private organizations. Also, if you're thinking about the embedded route, Jack Ganssle always has helpful tips. Or you can contact me as well :)

6) Constant learning. Formal education helps, but writing code on your own is the best teacher. Also read coding magazines such as Dr. Dobbs Journal. A little bit about myself: I have a degree in Electrical Engineering but my SW experience started 20 yrs ago when I learned BASIC, Forth, Pascal, then C. I work professionally, predominantly in C and C++, but have dabbled in Java, C#, html and so on. I subscribe to many industry journals, attend seminars and webinars and trade shows to stay fresh.

Personally, I believe C and C++ are the best languages to learn. C#, ruby, python, VB (ugh) and the scores of scripting languages and object-oriented languages may not last 10-15 years from now, but C and C++ will. They are the closest to human readable microcode you can get and virtually every single intelligent electronic device was developed in C. They have matured well and there are plenty of frameworks out there that keep them viable.

Good luck on your journeys!!
Jul 8 '10 #4
Oralloy
988 Expert 512MB
First, ask your self what you want to do with your life.

Then, go study under the masters in the field.

C and C++ are great languages, with a rich history behind them. I started with Basic on a Data General system 35 years ago. I learned C in college, and picked up C++ as the language was developing. I also program in a dozen other languages, depending on the task I have to accomplish. Still, C++ with in-line assembly code is probably my favorite for embedded systems, which is my favorite domain.

I've read a lot of good code over the years, and a lot more junk code. The masters still amaze me with their expressional prowess. Still, the reason I get to read junk code is because I'm often called to form it into a robust product after someone beats a prototype together.

But ... back to my first thought ... what do you want to do? Embedded systems? Image processing? Database? Web sites?

Each programming domain has evolved its own use of C/C++, and its own idioms to solve problems. Pick a domain, go have fun writing programs and read lots of other folks' code. You'll pretty quickly learn to recognize the work of the masters. Study what they do, learn why they do things a particular way, and then apply that knowledge to your own programs.

Godspeed.
Jul 8 '10 #5
Niheel
2,460 Expert Mod 2GB
Another good approach to learn is intern with an experienced development team. You will learn hands on, in the field skills that even schools or books won't teach you.

If you can't intern, start out volunteering with a good open source project with experienced developers. You can probably find some good local ones so that you get some face to face time.
Jul 13 '10 #6
Jyoti Ballabh
115 100+
if you don't want to attend schools as such go through some text books on C. The best book for you would be the one which makes you most comfortable and learning an interesting experience instead of a mundane task. You could also go through MIT's open courseware which is free and very informative. At the end of the session you could take quizzes and work on codes.
Jul 23 '10 #7
Jyoti Ballabh
115 100+
@zodilla58
@zodilla58 - what do you have to do to get that "expert" written under your username?
Jul 23 '10 #8
Ah,learning it...
Jul 25 '10 #9
iohos
45
C++ is d stepping stone to d wide world of coding
Jul 25 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

45
by: Market Mutant | last post by:
I just wonder job selections, job openings and salary level of PHP programer or Perl programmer comparing to Java programmers. Is Java programmer's salary has a minimal of 60K in US? Are there...
15
by: Randall Smith | last post by:
I've been programming in Python for about 2 years. I think it offers the best combination of simplicity and power of any language I have explored. As I write more and larger and complex programs,...
29
by: RAY | last post by:
Hi , my boss has asked I sit in on an interview this afternoon and that I create some interview questions on the person's experience. What is C++ used for and why would a company benefit from...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
20
by: filox | last post by:
can anyone recommend any good editors for C++ (having in mind that i don't want to use MS visual studio)? you know, something that has syntax highlighting, and preferably something like...
24
by: Diwa | last post by:
Hi All, This is not a C++ technical question, hence this is an off-topic post. But it is C++ related and posted only to this group. Suppose, today a building like Empire State building or...
20
by: Sebouh | last post by:
Ok, i was thinking about this the other day, and i thought i'd ask here. I'm still a newbie programmer cause i only know a little JAVA and C. But i don't only learn programming languages, i learn...
1
by: joseken | last post by:
hello Sir. I know you know how to make this web site, hi! if it's okey I need to know the steps to do this even a simple one, I hope for you'r reply as soon as posible if yo can thank's. from phil..
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.