Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Annotated version of the Linux Kernel summit 2007 group photo

The Linux kernel developer summit was held at Cambridge U.K for the seventh year. It was a two day event (September 4-6 2007) and brought together the core of the Kernel development team to plan the next phase of Linux Kernel development. Here is an annotated version of the Linux kernel summit 2007 group photo published by LWN.net. Get to know all the kernel developers who are responsible for developing the Linux kernel.


Linus Torvalds is standing in the middle row wearing a black t-shirt.

A timeline of the history of programming languages

Which was the first ever programming language created ? Well for your information, it is not C or Pascal but Fortran. Of course, before Fortran, there were a number of other languages such as the assembly language. But Fortran is considered the first major procedural language. In fact, Fortran was created way back in 1954. And till now I thought C was a relatively old language - silly me.

C language or rather the Brian Kernighan and Dennis Ritchie (K&R) C which we learn today is quite new in relation to the history of programming languages and was born in the year 1978 - over 20 years after Fortran and 8 years after Pascal. Btw, did you know that the Linux kernel itself is almost entirely coded in C ?

Fig: A slice of the timeline of programming languages

I came across this awesome timeline of programming languages which tracks the most important computer languages, that gives a fascinating insight into their roots and their development roadmap. The timeline is itself the work of Éric Lévénez which I have covered on this blog some time back. This timeline is by no means complete as it just includes 50 of the more than 2500 documented programming languages but these 50 languages can be considered to be the most important of them.

A collection of best rated videos on C++

Here is a collection of best rated videos on C++. These videos have been collected from a variety of sources such as Stanford university, reconnectworks and even a lecture by Dr. Bjarne Stroustrup the creator of C++.

The Stanford University lectures are very clear and start with the basics in an attempt to teach C++. Each lecture is about an hour and a half long.

It starts with the very basics and ends with sophisticated example of tracking code. The content of each lecture is roughly the following…
  1. session 1: basic declarations, conditional structure, operators.
  2. session 2: pointers and functions.
  3. session 3: introduction to classes including operator overloading using 3-Vector from CLHEP (class library for high energy physics) as an example.
  4. session 4; more on classes with arrays and lists and including templates.
  5. session 5: introduction to inheritance and some thoughts on class design and dealing with legacy code.
  6. session 6: polymorphic inheritance with a large example taken from a simulation code.
These series of lectures are not a "hands-on" style ones. Only few practical exercises are suggested in the lectures. The students are expected to take their own initiatives in getting started.

By the end of the course, one should be able to read most C++ code written by others and be on their way to using C++ in their own work.

Link to the video lectures

The future of C++ as seen by Dr. Bjarne Stroustrup

Dr. Bjarne Stroustrup is credited with creating the ever popular C++ programming language. While there are pure object oriented programming languages such as 'smalltalk' for instance, it was C++ which shot the object oriented programming paradigm to popularity.

In this video interview, Dr. Bjarne Stroustrup answers a number of questions such as the following ....
  • Do you think you'll ever design a new language from scratch?
  • How long after the standard is out do you expect to see a production compiler?
  • Is it possible to do garbage collection cleanly and efficiently in C++?
  • How soon after you created C++ did you see it start to take over the industry?
  • Is there any particular naming convention you subscribe to?
  • What's your opinion about the Microsoft implementation of C++?
Very interesting questions indeed... which ask for equally interesting answers from Dr Bjarne Stroustrup. Watch the video.

Book Review : The Linux Programmer's Toolbox

What does it take to start writing programs for Linux ? Most people will guess a text editor, knowledge of a programming language and the compiler and libraries of that language would suffice. But ask a professional programmer who has been writing code for Linux and he will differ with you and insist that while the three things stated above can very well help kick start ones programs, other things also come into play in writing efficient programs such as a debugger, memory profiler tools and above all a good understanding of the inner working of Linux kernel and its processes.

The book titled "The Linux Programmer's Toolbox" authored by John Fusco is a book which is a store house of knowledge which aims to make the average Linux/Windows programmer aware of the tools at his disposal which can help him write better programs for Linux.

The book is divided into 10 distinct chapters with the first 4 chapters describing various ways of boosting ones productivity while embarking on writing code for Linux as well as getting to know the various tools at ones disposal.

In the very first chapter titled "Downloading and Installing Open source tools", he talks about the different archive formats commonly used in Linux, various package managers such as Debian's own apt-get, Red Hat's Yum and how to properly authenticate the packages you download to ensure that they are not tampered.

The second chapter deals with building tools from source. Here apart from describing the actual steps involved in compiling the sources, the author also delves into explaining the concept behind the MakeFile, the common variables used in implicit rules and so on. In this chapter one also gets to acquire an understanding of the tools used to create projects as well as examine how these tools work together in the build process.

The book has a chapter exclusively devoted to explaining ways of ambulating through the myriad of documents; tools such as man, info, as well as some of the not so obvious ones. One thing I like about this particular chapter is how the author has provided tables which list a number of recommended manual pages with a short description of each of them.

Linux doesn't have a comprehensive IDE on the lines of Microsoft Visual Studio to develop programs - at least not yet. Most Linux programming gurus are perfectly at home with coding using their favorite text editor. And any book of this stature will be incomplete without a mention of the different editors available for coding in Linux and their pros and cons. The 4th chapter of this book introduces the different editors including Vim and Emacs and discusses their pros and cons. There are numerous tips in this chapter which aims to make writing code much more efficient, productive and a pleasant experience for the average Linux programmer. As a Vi enthusiast, I couldn't help but admire how one can convert Vim editor to work as a code browser with the help of Ctags which is explained in detail.

The fifth chapter titled "What every developer should know about the kernel" is a turning point in the book and gives a comprehensive understanding of the working of the Linux kernel. It is by far the largest chapter - with nearly 100 pages devoted to this topic - in this book. In this chapter the author talks in lucid detail about the different modes in Linux, the process scheduler, device drivers, the I/O scheduler and the memory management in user space, understanding all of which is instrumental in writing better programs for Linux.

The next two chapters deal with Linux processes and the communication between processes. Here one gets to know more about the technical vagaries related to processes such as forking, cloning, process synchronization and the basics of inter process communication. The author has introduced several APIs and basic examples of each.

In the 8th chapter, the author introduces many tools which are installed by default in most Linux distributions which aid in debugging communication between processes. The tools include (but are not limited to) lsof, fuser, stat, hexdump, strace and so on. And each tool is accompanied by its usage and its output with a short discussion of the output.

In the 9th chapter titled "Performance Tuning", one gets to know more about fine tuning ones Linux program. Here the author explains the factors affecting system performance as well as the tools for finding system performance issues.

Finally, the last chapter of this book explores some of the most common debugging tools and techniques for Linux. More specifically, I found the discussion on the use of GNU debugger quite informative.

At the end of each of the 10 chapters in the book, the author has provided a short synopsis of the tools that are used. Also many additional online resources have also been listed where one can acquire more knowledge about the topic being covered. Through out the book, noteworthy sections have been highlighted in dark background which makes it quite eye catching and also easy for quick reference.

The book is written with a slant towards the C language especially when depicting the examples in the latter half of the book. But that is something which can be understood considering that the bulk of the Linux kernel has been written using C language.

Book Specifications

Name : The Linux Programmer's Toolbox
ISBN No: 0-13-219857-8
Author : John Fusco
Publisher : Prentice Hall
No of Pages : 600
Price : Check the latest price at Amazon.com
Verdict : An excellent resource for those who are interested in improving their productivity as a Linux programmer.

Most programmers with Windows background will be forced to make a paradigm shift while embarking to program for Linux. While the Windows programmers could take deceptive comfort within the cozy confines of a Visual IDE, when they make the shift to write Linux programs, they are suddenly faced with the hard facts of programming as it really is. And this book could be an ideal companion for this set of programmers who wish to lessen their learning curve and make programming for Linux a much more pleasurable experience.

Having said that, I found this book to be an ideal companion for any programmer (not necessarily only of Windows background) who wish to develop programs for Linux.

Create a Linux Desktop application In 14 minutes flat using QDevelop and Qt

Who said creating gui applications for Linux were difficult, tedious and mind numbing ? Ok, perhaps this was true 10 years back or so. But now Linux has a plethora of tools which make it possible to create GUI applications - I dare say as easily as programming in Visual Basic for Windows.

You can literally drag'n'drop, move and resize all the widgets such as buttons, text areas, radio buttons and so on and design a very good GUI in minutes. And in the forefront of ease of use is QDevelop which acts as a visual integrated development environment (IDE) for developing Qt applications for Linux.

Clive a 54 year old programmer who has over 25 years of developing experience walks one through the nuts and bolts of creating a GUI application from scratch. What is really interesting is that he uses QDevelop to design the application and also walks one through the steps involved in installing Qt & QDevelop, the different layouts in Qt as well as the final finished product. A very informative tutorial targeted at beginners.

FFmpeg tutorial - Develop a video application in less than 1000 lines of code

FFmpeg is a library which can be used to build applications that record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows.

The FFmpeg toolkit consists of a number of programs them being :
  • ffmpeg - which can be used to convert one video format to another. Say you want to convert a YouTube video in flv format to mpeg format, this tool will help you convert it.
  • ffserver - This is a HTTP server which can be used to stream audio and video across the web.
  • ffplay - is a simple media player based on SDL and on the FFmpeg libraries.
  • libavcodec - a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability and ...
  • libavformat - which is a library containing parsers and generators for all common audio/video formats.
I came across this excellent tutorial on Ffmpeg where the author demonstrates how to develop a video player in less than 1000 lines of code. Just so you know, one of the prerequisites of understanding the tutorial is some knowledge of the C language.

While on the subject of videos, you may also be interested in the different ways of creating screencasts in Linux.

A Device Driver Development Kit for Linux

A driver development kit provides a build environment, tools, driver samples, and documentation to support driver development for a particular operating system. Linux had always lacked a proper driver development kit. And anybody who intended to write a device driver had to do with sifting through tons of documentation and example source code that other operating systems provide for their developers.

Greg KH has posted at LKML (Linux Kernel Mailing List) that a device driver kit has indeed been released for Linux which contain everything that a Linux driver author would need to create Linux drivers. Additionally, it also contain a copy of the O'Reilly book "Linux Device Drivers". The device driver kit for Linux can be freely downloaded as an ISO image here (92 MB).

 
 
 
 
Copyright © Sun solaris admin