unixworks
@unixworks
Thoughts on unix-like working environments (BSD). Helpful guides.
Do you want to support it?
buymeacoffee.com/n0madcoder
23 posts

C programming | Working with threads

When we run a program inside the OS, a process is asked to handle the task. If our code isn't designed in a concurrent way, then the process uses only one thread to run the main function. This makes the program to perform its actions sequentially, but we can take advantage of threads to perform more than one thing at a time if needed.

C programming | Working with files II

There are two main types of data we can store in a file: ASCII or text data, and binary data. Binary serialization involves taking some arbitrary set of structured data and transform that data into a consistent stream of bytes.

C programming | Working with files

At some point when developing software no matter how big o small the program is going to be, we need to store some data in the computer, and read from other sources too. Let's take a look at how to work with external files in C.

C programming | Working with pointers

Accessing memory locations is one of the greatest features of the C programming language, although it requires some responsibility. The word pointer often scares programmers away, but it shouldn't.

C programming | Working with memory

We need memory to perform processes and store values. C programs usually get their memory by calling the function malloc() and release that used memory calling the function free() when they're done.

C programming | Working with headers

Eventually at a certain point in our development, we'll have a big single source file or we'll need to reuse code from a source file in another source. Header files are just source C files with a .h extension that have C code inside. They are designed to store function declarations and macros.

C programming | Beyond basis

Programming in C is something that is often considered old-fashioned or complicated. The C programming language was created to be used in Unix systems as a high-level language. It's been almost fifty years since the creation of the Unix operating system, and the C programming language still plays a rock-solid role nowadays.

Makefiles | The power to build

Working with languages like C/C++ requires running a process to compile our project. That process can look like a black box where magic happens, but it's not that complicated. Let's see how Makefiles work and how to write practical ones for your everyday hacks and projects.

Command-line Git | Quick guide

There are a lot of graphical interfaces to interact with Git with cozy buttons and windows. There's also a fast and powerful alternative: using Git directly from the command line.

Shell scripts | Awk & Sed

Shell scripting covers almost every essential need to create automated command-line programs. But what about going beyond the standards and extending our arsenal with some external tools? Let's dive a bit inside awk and sed.