I specifically wanted to learn more details of the memory allocation and so on because nobody seems to teach that with Javascript. This C course does a fine job as I expected. When the program declairs the variable (identiifer), the instructor creates a box labled with the name of the variable leaving some space to fill out for the value assigned later.
I also like seeing that when a function is called, they create a box for the function with the function name and destorys it when it returns, indicating that the meomory allocated for this function is cleared.
The problem is that it goes slow, verbose. I use 1.5x for all the videos, but the small snippe of readings slows down the progress.
This programming course is a series of three courses in Coursera provided by Duke University. I am trying to go through the first one Programming Fundamentals as quckliy as possible by increasing the video speed by 1.5x or so. This series starts the C programming in the 2nd course, but it’s interesting to learn how they are taeachng coding with the emphasis of planning out the algorithems first. They have a 7 steps to write a code, basically consisting of planning before getting down to the coding.
Coursera doesn’t embed the video control by default. You need to enable it to move in the sequence of the video by the right click. I don’t think it has a built-in video speed control, so you will have to install one of the Chrome extensions that does it, which is not a big deal though.
I actually used to learn C back in the days when I thought I needed to run a lot of simulatinos on the local computer(s), which is difficult to do with Matlab. I am doing it through Coursera and the course is provided by Duke University. I am also taking Introduction to C++ through EdX Microsoft. The C++ course runs faster as they target students who already know some programming.
I like the fact that the Coursera course use gcc to compile and emacs for the editor. I will use the same enviornment for the C++ course while they of course use Visual Studio in the video lessons. Not only it would be good to use those simplest tools to learn programming to get to become familar with the process of transitioning the code you write to the executable, but also that’s the exact development environment I used back in the days when those fancy IDEs like Xcode wasn’t avaiable and the Visual Studio was difficlt to figure out how to use with the limited resources freely available and without being in the coding community.
Given you wrote a .c program (source code) in Emacs, say hello.c, you go back to the terminal by suspending Emacs with ctr
+ z
, and there type
gcc hello.c
This command produces a.out
which is actually executable by typing ./a.out
where ./
indicates to run the executable located in the current directory. I believe the common mistake is to type a.out
. Don’t ask me why the system doesn’t let it work.
You can name the executable file and do some fancy things that the gcc complier provides by giving some options in the commond line:
gcc -Wall -o hello hello.c
where -o hello
indicates that the [o]utput is named hello
instead of the default name a.out
. -Wall
option has something to do with warnings that the complier may or may not issue. Its detail of what it helps you is relegated to some google search. You can run the program by typing ./hello
on the terminal.
The course suggests to use more optional arguments as
gcc -o hello -Wall -Werror -pedantic -std=gnu99 hello.c
At this moment, I don’t worry about thoes extra options.
Now, I make a note of Emacs tutorials.
What you want | Command |
---|---|
save file | ctr + x and s |
suspend emacs to come back to the console | ctr + z |
get back to emasc where you were | fg in the terminal |
first article content
The article for alpaca DS
first article about mermaid. Did you know…