Why Learning to Code is So Hard

Thread Starter

King2

Joined Jul 17, 2022
163
I am learning c programming language but i find it very difficult.

What every beginner should know about the journey ahead?

Why Learning to Code is So Hard?
 

Papabravo

Joined Feb 24, 2006
22,082
I am learning c programming language but i find it very difficult.

What every beginner should know about the journey ahead?

Why Learning to Code is So Hard?
I have no idea what you are talking about. Maybe that is because I started with assembly language for the IBM 7090 (ca. 1962). Everything after that was like rolling off a log.
 

MrChips

Joined Oct 2, 2009
34,812
Why is learning to read so hard?
Why is learning to play a musical instrument so hard?
Why is learning to cook so hard?
Why is learning to ski so hard?
Why is learning a new language so hard?

That is the perception of the learner. Some people are predisposed to easily acquiring a new skill.
With the right background, attitude, and approach, a new skill can be acquired while overcoming underlying challenges and deficiencies.

For learning to program in a computer language, there are other approaches used besides writing procedural code. Some use flow charts and graphical input. It helps if one has a strong interest and foundation in mathematics and sciences.
 

ronsimpson

Joined Oct 7, 2019
4,693
I go to youtube.com and watch videos of people showing how to code. You can stop the video and backup or stop the video while you type in the same code.
 

dl324

Joined Mar 30, 2015
18,327
I am learning c programming language but i find it very difficult.
[snip]
Why Learning to Code is So Hard?
It depends on the individual.

There's a difference between learning a language and coding. I found the former to be relatively easy and the latter much more difficult.

I learned the bulk of the C language in a week (about 40 years ago). I learned how to program in high school and supplemented what I learned through decades of practical applications and studying algorithms developed by others.
 

KeithWalker

Joined Jul 10, 2017
3,607
I am learning c programming language but i find it very difficult.

What every beginner should know about the journey ahead?

Why Learning to Code is So Hard?
"C" was not designed to be a user friendly computer language. It was developed over a period of time in the 70s as a tool to create utilities for new, developing hardware platforms. It evolved as the hardware became more versatile.
If you are serious about learning "C" I recommend that you read the very interesting article in Wikipedia which explains its origins, development and structure.
https://en.wikipedia.org/wiki/C_(programming_language)
 
Last edited:

MrChips

Joined Oct 2, 2009
34,812

crutschow

Joined Mar 14, 2008
38,506
I am learning c programming language but i find it very difficult.
I can sympathize with that.
I'm not a programmer, but years ago I had to learn enough C to modify a C program for some equipment at my work.
The only language I had used previously was Basic which was relatively easy to learn, whereas I found the C syntax rather arcane and difficult.
I learned enough C to do the task, but a few months later, my C knowledge had drifted back towards zero.

If you haven't already, you should also study how to write algorithms to do a task with a computer and perhaps, how to write pseudo-code for the algorithm which, in turn, is then converted to C.
 

nsaspook

Joined Aug 27, 2009
16,322
I am learning c programming language but i find it very difficult.

What every beginner should know about the journey ahead?

Why Learning to Code is So Hard?
Learning to CODE in X language is the easy part as that's the applied side of understanding computer science. That said, I don't think C is a good first computer language because it's like handing the keys to a F1 racer to a random uber driver to make deliveries.

The simplicity and raw power of C really demands a more formal structured programming background to make the C abstract machine easier to program properly in embedded systems.
https://phoenix.labs.vu.nl/sysprog/cabs.pdf
https://en.wikipedia.org/wiki/Abstract_machine
The term "machine" refers to a computing machine, which is a physical machine that executes algorithms that have been sufficiently formalised for the machine to "understand". An abstract machine is, intuitively, nothing more than an abstraction of the idea of a physical computer.[13] For actual execution, algorithms must be properly formalised using the constructs offered by a programming language. This implies that the algorithms to be executed must be expressed using programming language instructions.[3] The syntax of a programming language enables the construction of programs using a finite set of constructs known as instructions. Most abstract machines share a program store and a state, which often includes a stack and registers.[9][14] In digital computers, the stack is simply a memory unit with an address register that can count only positive integers (after an initial value is loaded into it). The address register for the stack is known as a stack pointer because its value always refers to the top item on the stack.[15] The program consists of a series of instructions, with a stack pointer indicating the next instruction to be performed. When the instruction is completed, a stack pointer is advanced. This fundamental control mechanism of an abstract machine is also known as its execution loop.[3] Thus, an abstract machine for programming language is any collection of data structures and algorithms capable of storing and running programs written in the programming language. It bridges the gap between the high level of a programming language and the low level of an actual machine by providing an intermediate language step for compilation. An abstract machine's instructions are adapted to the unique operations necessary to implement operations of a certain source language or set of source languages.[9]
 
Last edited:

DickCappels

Joined Aug 21, 2008
10,661
I recommend starting with a short but complete introductory course and follow through with it. Though I don't really think about this much but I rely a lot on basic structures and methods I learned in my first Fortran course about 50 years ago. The basics don't change, though the tools and "targets" do change.
 

nsaspook

Joined Aug 27, 2009
16,322
I recommend starting with a short but complete introductory course and follow through with it. Though I don't really think about this much but I rely a lot on basic structures and methods I learned in my first Fortran course about 50 years ago. The basics don't change, though the tools and "targets" do change.
Exactly, I used Fortran early. It's easy to tell if you still default use i, j, k, etc... integer variable names in modern programs.

Variables starting with I through Q were integer by default, the others were real in Fortran and usage of 'i' pre-dates Fortran, i,j,k designate integers in algebra (subscripts, series, summations etc) .
https://en.wikipedia.org/wiki/Summation
 

ApacheKid

Joined Jan 12, 2015
1,762
I am learning c programming language but i find it very difficult.

What every beginner should know about the journey ahead?

Why Learning to Code is So Hard?
Usually because there's a huge amount to take in and it can be overwhelming, especially if new to programming. Tackle simple problems, real problems but not too complex at first. There's also a lot of poorly written C out there, be prudent as to what you look at as examples!
 

MrSalts

Joined Apr 2, 2020
2,767
I think c is a perfectly fine first language to learn. It really depends what your goal is. Are you learning c to handle video images or are you looking at programming a microcontroller. I don't recommend writing your own code in c to process video images in real time. It all depends what your goal is and why you want to learn code. On a given day, I'd say less than 5% (maybe less) of all lines of code written in the world are in c. Most is going to be a JavaScript incarnation for web apps, Python is used for lots of text and graphic analysis and manipulation or stats. I was surprised to hear how much code is written inside of Google using Python. If an admin has an idea to improve a project, someone helps him/her learn Python and the admin ultimately writes the code if he/she wants to.
 

djsfantasi

Joined Apr 11, 2010
9,237
There are two important areas which you need to learn when learning programming. Most “How To Program” resources unintentionally address one area poorly.

The first area is syntax of the programming area, which Mr. Chips mentions. IMHO, this is not the first area with which you should be concerned. That is because modern IDEs (Integrated Development Environments) hand-hold you through correct syntax. Sometimes even providing statements for you in the correct syntax

Learning a computer programming language is all about learning the syntax of the language.
I disagree

IMHO, where most beginners stumble is in the second area: algorithms. An algorithm is the logic behind any code you write. Once you’ve gotten some experience, you will notice that you are using the same code structure over and over again! But how do you get the experience in the first place. Fortunately, since algorithms are so common, a lot has been written about common algorithms.

There are books and web pages devoted to algorithms. Here are some examples:
https://u.osu.edu/cstutorials/2016/...d-data-structures-every-programmer-must-know/

Crutschow mentioned the importance of algorithms.
If you haven't already, you should also study how to write algorithms to do a task with a computer and perhaps, how to write pseudo-code for the algorithm which, in turn, is then converted to C.
And again, I disagree.

Both members are correct. Both members are wrong. Because neither approach alone will simplify learning how to code.
 

nsaspook

Joined Aug 27, 2009
16,322
I agree, it's Computer Semantics ( meaning ) that's hard. The conversion of human thought into a computer compatible form of algorithm and data. This is mainly independent of the concept of computer language syntax. You learn to 'think' like a computer when you analyze problems that need to be solved by a computer. For many people this is not a natural way of thinking, it takes time and practice for it to be come instinctual.
 
Last edited:
Top