- taken from Christopher Cowden’s hard work.
Lubbock LUG Special Interest Group focused on creating Open Source Software
This is a broad topic of interest which can be logically broken down into more refined sub-topics. A primary division can separate this SIG into two main branches. The first of which, let’s call Free and Open Source Software (FOSS) development. The specific topics related in this arena include things like package management, organizations, licences, cross-platform development, etc. On the other hand, topics specifically related to development of software on and for Linux fall into the second category. Topics in this branch include things such as Linux programming (processes, multi-threading, pipes, etc.), tools (debuggers, compilers, profilers), Linux device drivers and kernel patches.
This categorizaion may not be definitive nor is it exhaustive, but it should provide some preliminary thoughts to help this SIG in forming. From the lists above, some decently defined topics for presentations to the wider group seem to appear. It would be good to consider either starting a new project or joining an already existing project in which to cut our teeth and hone our skills. Having some product to show for this effort would be very attractive.
Contents
- Projects
- Programming
2.1 Programming Languages
2.2 Tools
2.3 Libraries
2.4 Programming Techniques
2.4.1 Version Control
2.4.2 Git
2.4.3 Debugging
2.4.4 Performance Tuning
2.4.5 Memory Profiling - Linux Concepts
3.1 Processes and Threads
3.2 Interprocess Communication (IPC)
3.3 Linux System Calls
3.4 Devices
3.4.1 Block Devices
3.4.2 Character Devices
3.5 Signals
3.6 Scheduling
3.7 Memory Management
Projects
On to the real projects!!!
Perhaps people prefer to work alone or in groups, but a new page for each project. It may be that some people focus on one project, while others help out and contribute to several. It will be important to document developing projects well in order to allow for such flexiblity.
BASTAS
Programming
Under this section, are a few subsections describing some general topics for programming, software development, and FOSS project organizations. This is meant to be a reference slowly built by LUG members contributing their knowledge in these areas we learn or have time to contribute.
Programming Languages
In this section a small primer and links to more thorough resources for some of the various programming and scripting languages discussed and used in our projects is to be added. The main purpose of this section is to help everyone get to the same page. Here is a list to get started:
- C/C++
- python
- bash/sh
- haskell? (This is needed for xmonad, if anyone is interested).
- Javascript
- TypeScript
- C#
Tools
Useful tools to discuss in no particular order:
-
Debuggers
-
Performance Tools
-
Documentation
-
Build tools
-
Compilers
** ??? -
Libraries
-
Why reinvent the wheel. Let’s use tools and APIs available to us.
** Gui Libriaries (Qt,Tk,Gtk,etc.)
** Qt tutorial
** Graphics (OpenGL, Cairo, etc.)
** etc.
Programming Techniques
- Version Control
- git link (There is even a free book)
- subversion (svn)
- cvs
- etc.
Git
Git is a distributed version control. So unlike CVS, for example, every commit is not a client server transaction. Working with Git is a process of cloning, fetching, merging, branching, committing to/from various repositories. In this section are a few examples of working with git.
When starting a project, one must initialize a new repository. git init myProject
Then one goes about creating directories and files. At some point, it’s time to make an initial commit of the new files. git add * git commit -m “my initial commit”
Now, the project can continue development by editing files then git add editedFile git commit -m “my commit message”
So far this is fairly straight forward. Now comes the distributed bit of distributed version control. Take this scenario, person A has started a project which person B would like to work on as well. Person B, then, can clone person A’s git repository and start working. This is done as follows: git clone personAProject
At some point person A and B would like to merge their work. This can go one of two ways. Person A (or B) can pull changes from the others repository, or Person A (or B) can push their changes onto the other’s repository. These methods do depend on access rights and so on, so in most cases it will be the former option. Pushing changes to a
repository, is a common procedure when there is a repository hosted GitHub or some other server.
Finally, git makes branching for new feature development within a project very easy. Suppose one would like to create a branch to experiment with some new feature so that the working version of the project is not affected. git checkout -b newBranch
This operation will create a new branch called “newBranch”. Then all changes will be made on to this new branch. Perhaps if the new feature seems reasonable, the branch “newBranch” can be merged back to the master branch. Assuming the master branch is the current branch, the following will merge the new feature to it: git merge newBranch
In summary, git is a very powerful tool for developers. There are also free services, such as GitHub mentioned earlier, where developers can develop and share projects. Also, git is documented fairly extensively. Each git command has it’s own man page for quick reference, and for a much better introduction to git there is this free book link.
Debugging
Debugging programs can be a challenging process, and it usually requires good knowledge of the application, the programming language, and sometimes the operating system. Going through some exercises with gdb is actually quite interesting to see how a program works.
Performance Tuning
It’s useful in some applications to find where a program is spending most of its time. Here is a list of tools link.
Memory Profiling
There is such a thing as memory leaks. Don’t let it happen to you.
valgrind
Linux Concepts
There are many excellent books, blogs, websites, etc. on these topics. These topics are included here to be point of reference to better and deeper resources. Here are some food resources:
- Advanced Linux Programming (the full text of the book is available free in pdf)
** info pages
** man pages
** kernel.org
Most of this information does not constitute a prerequisite to writing programs on Linux. IPC, signal handling, and threading are useful concepts to learn when developing large resource hungry programs. The sections on devices and memory management may be useful to RPi or embedding systems developers amongst us.
Processes and Threads
- Interprocess Communication (IPC)
- Linux System Calls
- Devices
- Block Devices
- Character Devices
- Signals
- http://en.m.wikipedia.org/wiki/Unix_signal
- man signal
- Scheduling
- Memory Management