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

Home Posts Topics Members FAQ

How to improve C skill?

Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way? If so, what type of codes are suitable for novice? The
ones in fsf freed software directory? I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Thanks in advance.

May 10 '07 #1
16 3075
we********@gmai l.com wrote:
Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice?
Plenty!
Is reading others' codes
the best way? If so, what type of codes are suitable for novice?
Code in this context is singular ("code" rather than "codes"). Just
reading code probably isn't a good idea. Reading source to see how
something you know works is more effective.

Try the exercises in K&R, there have been plenty of solutions posted
here to look through if you get stuck.
I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Start simple!

--
Ian Collins.
May 10 '07 #2

<we********@gma il.comwrote in message
news:11******** *************@o 5g2000hsb.googl egroups.com...
Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way? If so, what type of codes are suitable for novice? The
ones in fsf freed software directory? I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Thanks in advance.
Try writing "asteroids" .
This is a game in which you manoevre a spacship between lines of asterisks,
which scroll down the console. You will need curses / conio or other
non-standard header to treat the console correctly.
It is very easy to write and will give you a sense of achievement. It you
put in levels and scores you can make quite a sophisticated game.
Start by making sure you can use your console library to position characters
at will.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

May 10 '07 #3
we********@gmai l.com said:
Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way?
Crank up the warning level of your compiler as high as it will go, and
write lots and lots of programs. Remember that much of what your
tutorials taught you is likely to be wrong. Most C tutorials are
written by people who don't know C. Come to think of it, so is most C
code. So, whilst "reading others' code" can be helpful, get into the
habit of thinking "why is this code bad? What don't I like about it?
What diagnostic messages does it cause my compiler to emit? Do I
understand those messages? What don't I understand about the code
itself? *WHY* is the author doing such-and-such?"
I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent.
Honesty will get you everywhere! :-) Seriously, true competence (in
*any* field worth pursuing) takes about ten years of diligent study and
*practice*. Ten years to be a competent doctor, lawyer, programmer,
whatever.

Devise a project of your very own - e.g. a simple text processor - and
define N things you'd like it to do (where N is initially at least 4).
Implement those features, one at a time, learning all about diagnostic
messages as you go! When you've implemented all N features, think up
another N/4 features (rounded down), and notice how awkward it is to
fit them in. Re-factor the code to make adding the new features much
more pleasant, and now you're starting to learn about programming. Once
all 5N/4 features are implemented, let N = 5N/4 and go round again,
until you start to hit practical limits. This is feature creep with a
vengeance! But it will introduce you gently to large programs.
What should I do?
Write C programs.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 10 '07 #4
On 9 May 2007 19:57:02 -0700, "we********@gma il.com"
<we********@gma il.comwrote:
>Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way? If so, what type of codes are suitable for novice? The
ones in fsf freed software directory? I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Thanks in advance.
Buy the book "C Programming FAQs: Frequently Asked Questions", and
read it cover to cover. This book is written by Steve Summit, who
wrote the FAQ for this newsgroup. The book is available on amazon.com:

http://www.amazon.com/Programming-FA.../dp/0201845199

Additionally, continue to read this newsgroup. There are some really
sharp people who post here, and if you lurk around here for a
reasonable amount of time, you should be able to determine who these
people are, and learn a lot from them.

Also, get yourself a cheap PC ($100 U.S.) at a garage sell or on your
local classifieds and install a free Linux distribution like Ubuntu:

http://www.ubuntu.com/

Linux distributions will provide you with the gcc compiler, which is
arguably one of the best available, free or not. Just make sure to
write a lot of programs and crank up the compiler warning level. For
example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic

Finally, if you have any questions about standard C, don't hesitate to
ask in this newsgroup.

Best regards
--
jay
May 10 '07 #5
jaysome wrote:
On 9 May 2007 19:57:02 -0700, "we********@gma il.com"
<we********@gma il.comwrote:
>Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way? If so, what type of codes are suitable for novice? The
ones in fsf freed software directory? I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Thanks in advance.

Buy the book "C Programming FAQs: Frequently Asked Questions", and
read it cover to cover. This book is written by Steve Summit, who
wrote the FAQ for this newsgroup. The book is available on amazon.com:

http://www.amazon.com/Programming-FA.../dp/0201845199

Additionally, continue to read this newsgroup. There are some really
sharp people who post here, and if you lurk around here for a
reasonable amount of time, you should be able to determine who these
people are, and learn a lot from them.

Also, get yourself a cheap PC ($100 U.S.) at a garage sell or on your
local classifieds and install a free Linux distribution like Ubuntu:

http://www.ubuntu.com/

Linux distributions will provide you with the gcc compiler, which is
arguably one of the best available, free or not. Just make sure to
write a lot of programs and crank up the compiler warning level. For
example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic
Since beginners are often satisfied when the compilation ends without
errors but with many warnings, I would add -Werror ;-)

a+, ld.
May 10 '07 #6
jaysome wrote:
On 9 May 2007 19:57:02 -0700, "we********@gma il.com"
<we********@gma il.comwrote:
>Hi,

I have just finished reading some tutorials on C, I am wondering how I
could improve my skill. Is there any advice? Is reading others' codes
the best way? If so, what type of codes are suitable for novice? The
ones in fsf freed software directory? I have been reading quite a few
books on the programming language C, but when I tried to start a
project of my own, I find myself to be incompetent. What should I do?
Thanks in advance.

Buy the book "C Programming FAQs: Frequently Asked Questions", and
read it cover to cover. This book is written by Steve Summit, who
wrote the FAQ for this newsgroup. The book is available on amazon.com:

http://www.amazon.com/Programming-FA.../dp/0201845199

Additionally, continue to read this newsgroup. There are some really
sharp people who post here, and if you lurk around here for a
reasonable amount of time, you should be able to determine who these
people are, and learn a lot from them.

Also, get yourself a cheap PC ($100 U.S.) at a garage sell or on your
local classifieds and install a free Linux distribution like Ubuntu:

http://www.ubuntu.com/

Linux distributions will provide you with the gcc compiler, which is
arguably one of the best available, free or not. Just make sure to
write a lot of programs and crank up the compiler warning level. For
example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic
Why would you use -ansi instead of -c99?
>
Finally, if you have any questions about standard C, don't hesitate to
ask in this newsgroup.

Best regards

--
Pietro Cerutti

PGP Public Key ID:
http://gahr.ch/pgp
May 10 '07 #7
Pietro Cerutti said:
jaysome wrote:
<snip>
>Just make sure to
write a lot of programs and crank up the compiler warning level. For
example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic
Why would you use -ansi instead of -c99?
Most compilers don't conform to C99 (including gcc, despite the switch).

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 10 '07 #8
Richard Heathfield wrote:
Pietro Cerutti said:
>jaysome wrote:

<snip>
>>Just make sure to
write a lot of programs and crank up the compiler warning level. For
example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic
Why would you use -ansi instead of -c99?

Most compilers don't conform to C99 (including gcc, despite the switch).
Yes, I know. But still, I don't see the point to completely avoid C99
features just because some of them are not implemented (yet).
The "Status of C99 features in GCC" [1] explicitly says what you can use
safely and what you can't.
So why not start using the useful features which we have at disposal
now, and wait for the remaining ones to come, instead of just snobbing
the whole C99 set of changes?

[1] http://gcc.gnu.org/c99status.html

--
Pietro Cerutti

PGP Public Key ID:
http://gahr.ch/pgp
May 10 '07 #9
Pietro Cerutti said:
Richard Heathfield wrote:
>Pietro Cerutti said:
>>jaysome wrote:

<snip>
>>>Just make sure to
write a lot of programs and crank up the compiler warning level.
For example, with gcc, this is a good start:

gcc -Wall -W -ansi -pedantic
Why would you use -ansi instead of -c99?

Most compilers don't conform to C99 (including gcc, despite the
switch).

Yes, I know. But still, I don't see the point to completely avoid C99
features just because some of them are not implemented (yet).
It depends on your requirements.

If you are only using one compiler, ever, and don't need your code to
work with any other compiler, there is no point even in sticking to
C99. You can use any feature of the implementation that you like!

But if your code has to work with many implementations (i.e. more than
one), it may be necessary to restrict yourself to the features that are
available in all your implementations . And, in some cases, you do not
know at the time of writing the code which implementation( s) it will
eventually be required to work with. In such cases, it makes sense to
write code that conforms to the common subset of C90 and C99.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 10 '07 #10

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

Similar topics

2
1493
by: NickName | last post by:
I'm wondering if someone has thought about this, one desires to enhance his/her sql skills proactively vs. skills gained over a period of time merely because of work experience. SQL skill here refers to mainly MS SQL Server related skill. What could be reasonably effective ways to go for the proactive approach? Off head, I'm thinking of the following: *) read up and re-read on a few selected books such as sql for smartie
3
3031
by: Anand | last post by:
Hi Iam keen interested to improve my skills in c programming. Now Iam familiar with all the syntax and concepts. My main idea is to know how entire c compiler behaves in all circumstances(i.e for all kind of programs). Also I want the "Tips and Tracks" of C. With this current knowledge how can I improve my skills. Is there any speical book to develop these attitudes? Can anyone help me ! Regards, Anand.
32
2265
by: Fresh Air Rider | last post by:
Hi I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by 70%. Surely this is going to de-skill or dumb down the developer's task and open up the task of web development to less qualified and trained staff. Tell me if I'm wrong.
10
1668
by: sivashankar21 | last post by:
how i can improve my programming skill in pointer using c++
1
2155
by: google1 | last post by:
Has anyone written this one? Seen such a thing? Please send me a link: Skill Testing Question Exploder --------------------------------------------- Basically the plan is to create the javascript powered form one can surf to to bypass cheating via Window calculator for Skill Testing Question tests. One simply copys the Skill Testing Question from the Contest Webpage
0
1278
by: Jeff Rush | last post by:
(inspired by a thread on the psf-members list about Python certification) Those who know me know I am no fan of the programmer certification industry and I agree that your typical certificate arrangement, e.g. to show HR to get that box checked in your candidate file, so a company can skip responsibility in vetting a candidate, is un-Pythonic. However, I do think we need a good answer to the engineering manager or team leader who asks,...
18
1915
by: Linny | last post by:
Hi, Came across this article in the ComputerWorld website which has included C in the top ten dying languages. The top 10 dead (or dying) computer skills http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9020942 To quote from the article <snip>
2
1087
by: CreativeMind | last post by:
hi, actually i m working on a project which has poor designed database. this is due to cliet's continuous changes.unfortunately i have not any experience to optimize existing database. but i want to improve my skill in db creation and manipulation,etc. how can i do that? thx
0
9431
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
9255
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,...
1
9819
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7226
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
6514
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
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...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
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
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.