Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I want to improve my programming level

Status
Not open for further replies.

lhaolongli

Newbie level 5
Joined
Jul 25, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,328
There was a time, find my programming level do not have too great improve, seem to meet the bottleneck. Hope to have experience more give some advices of predecessors, thanks in advance.
 

Which programming language are you talking about ?

Build no. of small concepts with different different methods, using different functions.
Like if you're talking about controllers then take one basic controller,
and do the same logic with using hardware interrupt then do the same using timer interrupt then using counter delay, 16 bit operations in 8 bit controllers etc etc...

In short to improve the level you need to know how many ways are there to do the same thing and you should know which is better to choose.
Then go for higher and bigger programs and try to make algorithm and flowchart (on theory) for all methods you're aware of to complete the task, then try to find shortest way using all those theoretical concepts and Try to build simplest and shortest flowchart/algorithm for the application, and then go for the programming.

Need to remember that : In programming that's not necessary what you've done rather than how you've done.

A single application can be fulfilled by no. of ways, the simplest and shortest should be your choice.

All the best.
 

Many times I've hit a wall. The output didn't do what I wanted it to. I did everything right.

Many times I've added a line of code, commanding that the pertinent data be printed to screen, then to wait until I would press a button (or click the mouse).

Many times I've watched data go past. I was looking for the one variable that told me why things weren't right.

It might take a while. I was confident I could solve it. I had to persevere in order to reach the goal.

When I did solve it, it was often something that should have been obvious. Say, dimensioning a variable as an integer rather than as floating point.

Other times, it was something wrong with my syntax. Maybe the instruction manual didn't call attention to the effect of anything but the exact correct syntax. Etc.

If your project gets big enough, there will be a point where things are just a little bit beyond you.

There will always be bugs which you want to work out. Always a new feature you want to add.

You eliminate one bug, but it creates another.

You add a line or two of code to solve a bug. It works but you're not sure why. You leave it that way even though it's not elegant or efficient.

--------------

Tips:

Add remarks as an explanation to yourself later why you did something.

REM the old lines of code, in case you need portions to supplement the new method.

Divide your program into subroutines (functions). It's easier to work on a subroutine if it's short enough that you can see it all at once.

Make your program give verbose output. Get it to tell you what operation it is beginning, and when it succeeds.

Permit no undimensioned variables. Dimension every variable. This prevents a misspelled variable from gumming up the works.

Perform experimental programs if you find you need to explore the workings of program keywords.

Save your experimental routines.
 
Yes you are right Brad, but i am curious to know which organization(or institute) is best who can provide training on C and C++?
 

Thank you very much, I say is the C programming, mainly is aims at the micro controller, for example: 51 SCM, AVR microcontroller, STM32, FPGA. But these things, I'm most familiar or 51 SCM.
 

The majority of coding in the embedded world is done in C rather than C++, minimizing code storage requirements and compiler complexity are just two issues for the lack of C++ support in the embedded environment.

You might benefit by taking a look at the following group:

Embedded C/C++ Programming

The following websites offer good tutorials, tips and pointers:

Cplusplus

C Programming and C++ Programming


The following books are excellent resources concerning the C language:

C Primer Plus

Pointers on C

Advanced C Programming by Example - A real treasure trove of C related gems, unfortunately it is out-of-print, if you find a copy buy it.


There are numerous texts concerning C++, far too many to list here. If you have particular areas of interest, let me know and I'm sure I can recommend a few.



BigDog
 

There are numerous texts concerning C++, far too many to list here. If you have particular areas of interest, let me know and I'm sure I can recommend a few.



BigDog


Hello BigDogGuru,

Thanks for the recommendations.
I am highly interested to know that.

And also about other programming languages related to Embedded Systems, Even PC based programs are also field of my taste, Like Visual Basic (I know VB 6 only) , Java (specially to develop Android Apps) & other Programming languages which enables me to make a tool through which I can communicate with PC Ports...
 

The majority of coding in the embedded world is done in C rather than C++, minimizing code storage requirements and compiler complexity are just two issues for the lack of C++ support in the embedded environment.

You might benefit by taking a look at the following group:

Embedded C/C++ Programming

The following websites offer good tutorials, tips and pointers:

Cplusplus

C Programming and C++ Programming


The following books are excellent resources concerning the C language:

C Primer Plus

Pointers on C

Advanced C Programming by Example - A real treasure trove of C related gems, unfortunately it is out-of-print, if you find a copy buy it.


There are numerous texts concerning C++, far too many to list here. If you have particular areas of interest, let me know and I'm sure I can recommend a few.



BigDog
Thank you very much BigDog!
 

the best way to improve programming is to get to the action. even doing 'stupid' things will help.
you're not gonna read a tutorial and become a better programmer all sudden
each one has its own way to program, organize, that fits better
 

Until you're confident with C, maybe it's best to wait before trying C++. It's hard to say, I'm not sure - I suppose others have started with C++.
Anyway, it is not common for microcontrollers. It is more common for application programming. I have not done any embedded work with C++.

For C++, there is a classic work by the author Stroustrup, although it can be hard to follow, it is comprehensive and an important reference. It shouldn't be the only C++ book that you use - unfortunately you will most likely need several books. Others may have different choices, personally I'd suggest also a book on design patterns, so that you can build on proven designs for doing 'common' things in a reliable manner. Also, a book on templates would be useful, since you can do some awesome stuff with them.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top