The lecture notes were supported by the TÁMOP-4.1.2.A/1-11/1-2011-0103 project. The project has been supported by the European Union, co-financed by the European Social Fund.
The author endeavors to maintain and to keep the author's editions of this book, and the others in the series up-to-date. These author's editions can be found at the page http://www.inf.unideb.hu/~nbatfai/konyvek/.
This book is dedicated to my acquaintances on social networks.
2.1. Number of processes Error: Reference source not found
2.2. The size of the PCB Error: Reference source not found
2.3. Non-empty slots Error: Reference source not found
3.1. The contents of the PCB Error: Reference source not found
3.2. Playing the game with the current macro Error: Reference source not found
3.3. Drawing a memory map Error: Reference source not found
4.1. 30 processes, with using a paper and pen Error: Reference source not found
5.1. Placing a player beside a goalpost Error: Reference source not found
5.2. Free kicks Error: Reference source not found
5.3. Do not pass backward Error: Reference source not found
5.4. A good starting Error: Reference source not found
5.5. Create the your own XPM team logo Error: Reference source not found
6.1. Running the Seventh Eye on a real mobile phone Error: Reference source not found
6.2. The client side of the „Community consciousness net” Error: Reference source not found
6.3. The server side of the „Community consciousness net” Error: Reference source not found
6.4. A community-based exercise Error: Reference source not found
6.5. A community portal based on the mental fingerprints Error: Reference source not found
7.1. Kálmán Könyves on IRC using the Program W Error: Reference source not found
7.2. Kálmán Könyves on the web using the Program D Error: Reference source not found
7.3. Create your own chatterbot Error: Reference source not found
8.1. Weaving this aspect into ALICE Error: Reference source not found
8.2. Try this AspectJ aspect yourself Error: Reference source not found
This book is written in the framework of the project TÁMOP-4.1.2.A/1-11/1-2011-0063.
The book that the dear reader is holding in his hands shows seven more or less well designed greater or smaller programming case studies. The level of elaboration of the examples also depends on the course in which the given example is taught. In the case of the subjects of the first three semesters of BSc studies, for example, for the course High level programming languages 1-2, the case studies are highly developed. In contrast, in the case of the latter subjects, such as C, C++ Case Studies, Programming in GNU/Linux environment, Java Case Studies and Mobile Programming only the specification of the tasks is dominant. Topics of the case studies are scattered in a broad spectrum, because C, C++, Java, Python and AspectJ examples will be shown. Even for this reason alone these lecture notes are not regarded as a programmed introduction to a given particular field of information technology.
Let's see the first case study about MINIX. For the understanding of this, the reader must be familiar with the textbook [OS]. The MINIX case study and this Tannenbaum book are very closely linked, because the case study itself is a solution of an exercise of the book [OS].
In other cases the link between the special literature and our lecture notes is not so close. However, even in these cases, close relations can be found in the environment of these notes. For example, here we only briefly outline the structure of the famous RCSS team Agent2D [HELIOS], because the detailed introduction can be found in the book entitled Mesterséges intelligencia a gyakorlatban: bevezetés a robotfoci programozásba, http://www.inf.unideb.hu/~nbatfai/konyvek/MIRC/mirc.book.xml.pdf, [MIRC]. But, we attach great importance to developing an our own RCSS team, which has been started from the sampleclient of rcssserver, therefore this example is well-developed here.
We can also find such example that was developed mainly in the environment of these notes. For example, the developing the Sevent Eye case study can be found in the book Mobil programozás, Nehogy már megint a mobilod nyomkodjon Téged!http://www.inf.unideb.hu/~nbatfai/konyvek/MOBP/mobp.book.xml.pdf, [MOBP].
Finally, it may be noted that this work can be regarded as a continuation and an extension of the lecture notes Programozó Páternoszter[PP].
Chapter 1. Introduction
We are not in a difficult situation when we need to write the introduction to this book, because the „original” Paternoster of Programmers can be a good muse for this, where in a minimalist style, the Éric Lévénez's timelines were mentioned. Now, we will try to give a more pathetic one.
„Facebook is not your friend.”
—Richard Stallman stallman.org/facebook.html
1. The Paternoster of Programmers
„A lot of people misinterpret that, as if I don't care about revenue or profit or any of those things. But what not being just a company means to me is not being just that — building something that actually makes a really big change in the world.”
—Mark Zuckerberg [FBB] David Kirkpatrick: The Facebook Effect: The Inside Story of the Company That Is Connecting the World
On the one hand, the background to the name Paternoster is the metaphor that anybody can travel some floors. It means exactly that the reader can choose an arbitrary task of current interest from the wide spectrum of the tasks of the book and is able to reproduce the solution that is also fully explained in the book Paternoster. On the other hand, the Latin name Pater noster has distinctly religious overtone, because it means the Lord's Prayer. This direction is also confirmed by the fun question asked in the lab sessions „Who can celebrate the source code”. The basic message of the usage of the name paternoster is that programmers must program every day.
But also there is one other motivation... The great ones of science give meaning to intuitive notions such as
The programming also has its own legendary hackers like Richard Stallman, Mark Zuckerberg or Linus Torvalds. But who will be the next genius who is able to give meaning to the following exciting notion standing on the shoulders of the giants. And what will be the next concept? The intuitive notion of love was reinterpreted by Jesus in the New Testament, but it has not still been developed deductively, in sense that it has no mathematical background. I believe, the most promising candidates are imagination and reality. This was the reason why the Penrose-Hameroff „Orch OR” model of consciousness was mentioned in the „original” Paternoster of Programmers [PP] as part of the introduction to quantum informatics.
Many programmers know the feeling that we really ought to write a good computer program. The root of this is that the programmers can create whole worlds in their programs. In this sense, beginner programmers have already participated in a sort of a genesis. It may be actually true for only a few professions. Programming something is a very constructive process, as Chaitin said in [METAMATH] „you understand something only if you can program it”. Based on Turing's work on computing machinery, in my humble opinion, programmers may do the next scientific conceptual breakthrough. For example, to define random infinite sequences of 0 and 1 is a hard mathematical statistical issue, but the same result is achieved, relatively easily, by using the algorithmically complexity.
When reading this book, it is important for dear readers to keep in mind that neither this book nor other books can give the excitement of writing programs. This book can be only the preliminary step in knowing the real nature of programming. First, try the examples in the book, then write your own modifications to these examples. Certainly you must work on real computers from the start of reading the book.
2. About these lecture notes
2.1. The environment of this book
This book has been continuously improved together with other books in the following series
Bátfai Norbert: Programozó Páternoszter újratöltve: C, C++, Java, Python és AspectJ esettanulmányokhttp://www.inf.unideb.hu/~nbatfai/konyvek/PROP/prop.book.xml.pdf (ez a jelen könyv).
Bátfai Norbert et al.: The Yearbook of the Programmers of University of Debrecenhttp://sourceforge.net/projects/udprog/, [UDPROG] (http://youtu.be/Xkdbly0ySJ8,
All these (only Hungarian language) books in this series try to support each other with background information and know-how. It is not too hard to organize because these books contain many common programming themes. Moreover, in many cases, it occurs that an example of one book is further developed in another one.
In this section, we briefly introduce the courses that are based on using this book.
2.2.1. High-Level Programming Languages 1
This is a fundamental and the first hard core Programming class on the software engineering B.Sc. at University of Debrecen. The programming tasks for this course can be found in an exercise workbook entitled The Yearbook of the Programmers of University of Debrecen. It can be found on Sourceforge under the project name udprog that contains the book itself in DocBook 5.1 and a git repository to maintain the source codes of solutions of exercises. But some of the exercises of udprog are developed in details here, in the present lecture notes.
Availability of the source codes and the book itself
In the spirit of „Release Early, Release Often” [KATEDRALIS], these lecture notes have already been downloadable since the beginning of its writing. It can be downloaded in DocBook XML 4.4 source format and in some other formats such as PDF and EPUB as well from the author's homepage.
The source codes were copied from this book itself for testing, so all programs will work properly, at least in theory. In addition, the usage of the source codes is shown in detail for all examples.
The evolution of the lecture notes
This book is an informatics one so its basic nature is changing. Therefore we are continuously maintaining it as an author's edition at the page http://www.inf.unideb.hu/~nbatfai/konyvek/.
2.2.2. Other courses
The examples of these lecture notes can be naturally used in other courses. For example, in the author's (only Hungarian language) courses, by the following breakdowns of exercises:
C, C++ esettanulmányok (Case studies in C and C++; PTI, GI M.Sc. lab), MINIX kernel IPC exercise, Linux kernel module exercise.
Programozás GNU/Linux környezetben (Programming in GNU/Linux environment; PTI, GI M.Sc. lecture and lab), Linux kernel module exercise, Berkeley socket API, Sys V IPC and I/O multiplexing.
Java esettanulmányok (Java case studies; PTI, GI B.Sc. lab), Seventh Eye, A robot soccer weaving.
XML, HTML (PTI B.Sc. lab), A virtual librarian.
Mobil programozás (Mobile programming; PTI, GI B.Sc. lab), Seventh Eye.
Magas szintű programozási nyelvek 2 (High-Level Programming Languages 2; PTI, MI, GI B.Sc. lecture and lab), A robot soccer weaving.
2.3. About the author
Norbert Bátfai is working as an assistant professor in the Faculty of Informatics at the University of Debrecen, Hungary. He received his M.Sc. (summa cum laude) in Computer Science in 1998 at the Kossuth Lajos University (KLTE), Debrecen, Hungary. In 1999, he won the first prize in the Java Programming Contest organized by Hungarian Java Alliance: Sun, IBM, Oracle, Novell and IQSoft. In 2004, his company won the first prize in the Hungarian Mobile Java Developer Contest organized by Sun Hungary and Nokia Hungary. In 2008, the Hungarian Chief Information Officers' Association selected him as an IT trainer of the year. He received the Ph.D. degree in 2011. He won the Pollák-Virág award from Scientific Association for Infocommunications Hungary in 2012.
2.4. About the peer reviewers
András Keszthelyi, PhD., email@example.com, Óbuda University.