Fun to Program – Opening

Date: 2013/08/01 (initial publish), 2021/08/02 (last update)

Source: en/fun2-00001.md

*** Top Next Post

TOC

This was originally written and created around 2013 and may require to be updated. (2021)

This “Fun to Program” was originally created around 2013 when I was learning programming on Debian system and was published to http://people.debian.org/~osamu/fun2prog.html .

Since this has been neglected and I thought it is good idea to go through this content again. I moved this content to the currently maintained site https://osamuaoki.github.io/ in 2021.

Script examples were created in 2013. So they may not be applicable for current system.

In order to make it easy to trace, I am tagging all related pages under fun2prog.

Initial publish dates of fun2prog are approximate ones in correct order.

All contents are licensed as

(Pick any one of the licenses as you need if you take any parts of this. This is intended to be used for any purposes with least conflicts.)

Please note that the quoted part from the ioputs.c source remains in just LGPL (GNU Lesser General Public License).

What this is

Please consider this as a note of a self-study student.

This is not mean to be a tutorial document to explain how to program nor authoritative document by an expert.

I recorded how I tried to learn programing basics of the modern large software packages written in mixed languages using various complicated libraries. I provide the followings:

I hope this information is useful to others.

If the tailing parts of terminal example lines are dropped to fit within 80 character/line, they are indicated by ... at the end of the line. (Or, I forced them to fit using fold command.)

My local user name on this machine is osamu. You may need to replace it with your user name.

Please be careful about the publication date of reference documents since the software infrastructure is a moving target and such documentations may be obsoleted when you read this document.

TIP: If you find any questionable contents in this document, doubt them. If you find errors, let me know.

Background

To be a Debian developer, I encounter situations to deal with large software packages written in a combination of languages such as C, C++, Vala, Python, Perl, Shell, LaTex, DocBook, … with specialty cross platform build script generators such as autotools and cmake. Their build tools invoke commands such as ./configure, make, gcc, and g++. These software packages tend to be linked to many libraries which make them even more complex.

For example:

Even with all these complexities, using these software package just for backporting is not usually out-of-reach for me as a novice programmer with the help of well designed packaging tools such as debhelper. The package build script can be deceptively simple as the following.

%:
	dh $@

But when I need to tweak something, I get overwhelmed with the complexity. I felt I have to practice program building and packaging with simpler case to understand its fundamentals and to become a better Debian developer.

Also, being a maintainer, it is essential to know how debugger works to use it effectively.

There are new major technical challenges such as multitarch and fortify of binary packages which I did not deal in “Debian New Maintainers’ Guide”. These needed to be addressed for newer packages, too.

Prerequisites

I expect readers of this to read the followings first.

I have browsed through tutorial contents of these documents … so I expect you to do the same.

Also, I recently found on-line textbooks from Green Tea Press. They are very informative.

Here are extra sources of information …

TIP: Install all dependency packages of devscripts, vim, lua, python, python3, perl, vala, swig, git, manpages-dev, devhelp, …

*** Top Next Post