Website Hosting for Just 20 ForumCoin ~ Advertise on ForumCoin
52 Life Tips Banner
Talk hardware, software, computer gaming, mobile devices, the Internet, social networking and other technology

Learning C Programming?

Postby Fergal » 15 Apr 2017, 10:21

When learning programming and technology, I have often felt that I haven't made as much progress as I'd like, because I find it frustrating that I don't actually understand how computer code / software actually works on the computer. Someone has suggested learning C programming as a good way to understand how software works and as a strong foundation for learning other programming languages.

Have you ever learned C Programming? Would you recommend it?

Do you have any suggested resources, courses or books for learning it? One site that looks interesting is http://www.cprogramming.com/

Thanks!
  • 0

User avatar
Fergal
Site Admin
 
Posts: 14,807
Location: Ireland
ForumCoin: 15,287

Re: Learning C Programming?

Postby darkthorn » 15 Apr 2017, 20:20

I would suggest you this site Codeacademy, it teaches you how to code for free. To learn a computer language you do not need to know what is behind it, all you need to know is the specific set of rules of that language and to keep in mind that making a program is like giving instructions to children. The instructions must be precise and obey to certain rules for the computer to understand it.

You can also take a look at this website:

http://www.codeconquest.com/what-is-cod ... ding-work/

they explain how a computer language works.

Codeacademy:
www.codecademy.com
  • 1

User avatar
darkthorn
 
Posts: 3,255
Referrals: 1
ForumCoin: 342

Re: Learning C Programming?

Postby Sam » 15 Apr 2017, 21:03

I am learning C programming this semester at Uni (basic C programming) as part of understanding the foundation to computers i.e. we started with transistors --> logic gates --> memory & full adders --> machine language --> assembly language ---> higher level language (C).

If you want to understand how software works on the computer, that's the best path to take. We learned LC3 assembly to simplify things... but it's still difficult (should share my 30 bit adder which prints the result once the assignment marks are out -so much code....).

I don't think you need that level of understanding to be good with programming (because of abstraction) but you do if you want to become a great programmer.

I would recommend starting with Python because it's so versatile or Java because of speed and the way it forces you to format code. :)
  • 1

User avatar
Sam
 
Posts: 2,079
Location: New Zealand
Referrals: 16
ForumCoin: 229

Re: Learning C Programming?

Postby darrensurrey » 15 Apr 2017, 21:05

Yes, you're welcome to borrow my Kernighan and Ritchie book. ;)

TBH I struggle with more complicated stuff like Visual C++ and Java. I'm more a BBC BASIC kinda guy. Alright enough with the eye rolling.
  • 0

User avatar
darrensurrey
 
Posts: 2,482
ForumCoin: 108

Re: Learning C Programming?

Postby Fergal » 16 Apr 2017, 09:37

darkthorn wrote:I would suggest you this site Codeacademy

Thanks very much for the suggestions darkthorn, I have done some courses (Git, SQL, PHP, and HTML & CSS) on CodeAcademy and found them very helpful. Thanks also for the link to that article, it is informative, I especially like:

The source code is translated into assembly language.
The assembly code is translated into machine language.
The machine language is directly executed as binary code.


Sam wrote:we started with transistors --> logic gates --> memory & full adders --> machine language --> assembly language ---> higher level language (C).

That sounds fascinating and really demanding, well done you, having that strong of a foundation will be an excellent basis for doing anything you want with a computer. Do you have any suggestions as to resources for learning the first two parts, i.e. "transistors --> logic gates"?

Sam have you ever used something like Arduino or Raspberry Pi?

Sam wrote:I don't think you need that level of understanding to be good with programming (because of abstraction) but you do if you want to become a great programmer.

I fully agree with that, there are very good programmers who do not understand computers to that level of detail. People learn in different ways and I believe that something which has really inhibited my learning in the last few years, is a constant frustration that I don't understand what any code I am trying to learn is doing at the machine level. This is a bit of a burden for me, but it is the way I am.

Most sane people are probably content to write
Code: Select all
<h1>Welcome</h1>
to add that text to their website, personally I find it a little infuriating that I don't really know how and why that code works :(

I'm not in a huge hurry and expect it will take me maybe five years to get to where I want to be in terms of computer and programming knowledge.

Sam wrote:I would recommend starting with Python because it's so versatile or Java because of speed and the way it forces you to format code.

I learned some Java in the past as part of a course. I also have some small knowledge of HTML, CSS, SQL, Javascript, PHP and C#. My plan is to learn some hardware and C for the moment to act as a basis for better understanding higher level languages in the future.

darrensurrey wrote:you're welcome to borrow my Kernighan and Ritchie book

Thanks Darren, I've actually seen that book on Amazon, would you recommend it?

darrensurrey wrote:I'm more a BBC BASIC kinda guy

Good for you, what kind of stuff have you been doing with that?
  • 0

User avatar
Fergal
Site Admin
 
Posts: 14,807
Location: Ireland
ForumCoin: 15,287

Re: Learning C Programming?

Postby peachpurple » 16 Apr 2017, 23:31

I thought that c programming is not popular anymore. There used to have cobol, c++ but I could not understand them. Then I went to learn Foxpro, less complicated
  • 0

User avatar
peachpurple
 
Posts: 6,203
Location: Singapore
Referrals: 2
ForumCoin: 365

Re: Learning C Programming?

Postby Sam » 17 Apr 2017, 09:14

Fergal wrote:Sam have you ever used something like Arduino or Raspberry Pi?


I never completed the project but I did make a raspberry pi move wheels and take photos through Python code.

Fergal wrote: fully agree with that, there are very good programmers who do not understand computers to that level of detail. People learn in different ways and I believe that something which has really inhibited my learning in the last few years, is a constant frustration that I don't understand what any code I am trying to learn is doing at the machine level. This is a bit of a burden for me, but it is the way I am.

Most sane people are probably content to write
CODE: SELECT ALL
<h1>Welcome</h1>
to add that text to their website, personally I find it a little infuriating that I don't really know how and why that code works

I'm not in a huge hurry and expect it will take me maybe five years to get to where I want to be in terms of computer and programming knowledge.


Well... To fully understand how that html markup produces a large text with "Welcome" in your browser would require understanding of file formats, networking (HTTP protocols), higher level languages (assemblers and compilers), machine language, logic gates, transistors and the operating system with peripherals (the monitor) as well as some understanding of webservers.

The textbook we use is: http://highered.mheducation.com/sites/0 ... index.html.

I think there is a very important reason why we learn competency in programming (through Python at stage 1) before we learn to understand the basics: the ability to think in terms of higher level constructs. In assembly language programming, it's useful to write out code in a higher level language (i.e. write out the algorithm) before converting it to assembly. Assembly language also maintains "functions" - subroutines and it's important to know how best to use those.

https://www.edx.org/course/computation- ... 6-004-1x-0
https://www.edx.org/course/computation- ... x-6-004-2x
https://www.edx.org/course/computation- ... -004-3x-0#!
^ might be very useful on your journey.... but again, I would seriously encourage you to learn Python and use it. Set yourself a daily challenge or find some online. :)

As an aside: I thought of a good website idea based around this... a set of Python programming challenges to make you into a competent programmer. It wouldn't provide learning, just challenges and feedback.
  • 0

User avatar
Sam
 
Posts: 2,079
Location: New Zealand
Referrals: 16
ForumCoin: 229

Re: Learning C Programming?

Postby Fergal » 17 Apr 2017, 14:03

Sam wrote:Well... To fully understand how that html markup produces a large text with "Welcome" in your browser would require understanding of file formats, networking (HTTP protocols), higher level languages (assemblers and compilers), machine language, logic gates, transistors and the operating system with peripherals (the monitor) as well as some understanding of webservers.

Not much to it then, pretty basic and straight forward :) Seriously thanks for that, it is very informative.

Sam wrote:The textbook we use is: http://highered.mheducation.com/sites/0 ... index.html.

Looks like a very interesting book, would you recommend it?

Sam wrote:I think there is a very important reason why we learn competency in programming (through Python at stage 1) before we learn to understand the basics: the ability to think in terms of higher level constructs. In assembly language programming, it's useful to write out code in a higher level language (i.e. write out the algorithm) before converting it to assembly. Assembly language also maintains "functions" - subroutines and it's important to know how best to use those.

Sam that's a great way to look at it, I hadn't actually considered it from that perspective. I do have some knowledge of higher level languages (e.g. PHP, C#, Java) but I feel that I have come to a stage where I am stuck and finding it difficult to progress (anything above very basic OOP is proving very difficult), hence the interest in learning at a lower level.

Thanks also for the Edx course recommendations, I've bookmarked the first one and may try it soon.

Sam wrote:but again, I would seriously encourage you to learn Python and use it

I purchased the "Learn Python the Hard Way" course when it was on special (think it was Black Friday) and do plan on learning Python at some time. For the moment I plan on taking a little time to learn the basics of C, it is supposed to be a really useful foundation language for learning other languages. My plan is not to become great at C, just learn the basics in the hope that it helps me with other languages in the future. If learning C doesn't work out as planned, I will take a look at Python then.

Sam wrote:As an aside: I thought of a good website idea based around this... a set of Python programming challenges to make you into a competent programmer. It wouldn't provide learning, just challenges and feedback.

Sounds like an excellent idea, when learning a programming language it is often difficult to find exercises / programming challenges that teach you how to program. Something like that could be started off with really simple problems that progress to something much more difficult, e.g.
1. Print "Hello World"
2. Print "Hello " + $name - from a variable value
3. Print "Hello" + $name - from the user entering their own name.

Thanks again Sam, the insights you have shared really are very helpful.
  • 1

User avatar
Fergal
Site Admin
 
Posts: 14,807
Location: Ireland
ForumCoin: 15,287

Re: Learning C Programming?

Postby darackc » 17 Apr 2017, 15:12

I don't know, it's very very hard to learn, but once you master it you can get to better programming languages and
get some real skills. But I would suggest you to start with HTML or something like that :)

Peace
  • 0

User avatar
darackc
 
Posts: 47
ForumCoin: 107

Re: Learning C Programming?

Postby Fergal » 18 Apr 2017, 06:31

Thanks for your reply darackc, do you do any programming yourself? If so what languages do you use and how did you go about learning them?
  • 0

User avatar
Fergal
Site Admin
 
Posts: 14,807
Location: Ireland
ForumCoin: 15,287



Your Ad Here.

Return to CGT - Computers, Gaming & Technology



Who is online

Users browsing this forum: Claude [Bot] and 0 guests

Reputation System ©'