The Community and Development Lab is a traditional yearly ROSEdu project where we teach students how to start contributing to open source software. This year we had 117 applicants and had to select only 19 of them. To do this, we gave them an algorithms problem to filter 60 potential candidates which were invited to an interview.
In every programmer’s life there comes a time when he has to leave the realm of integers and tread into the dangerous land of rational numbers. He/she might do some scientific computation, or work on a financial application or a game rendering pipeline or even in some artificial intelligence or data-mining algorithm – in all of these cases and many others, restricting oneself to using only integers is no longer feasible.
And, as soon as one starts using floating point a lot of interesting things happen, starting from results which don’t show up nicely and bad equality testing and going towards subtler and subtler bugs.
Even experts and common-sense is at fault in this realm. For example, did you know that always comparing two floating points like in the following code is bad?
if (fabs(a - b) < 0.0001)
do_something_with_equal_numbers(a);
Without being a complete guide, this article shows some of the beauties and dangers of the floating-point realm.
A special category of processes in Linux is that formed by daemon processes.
The purpose of this article is to generally present the utilities Autoconf, Automake and Libtool, which ease very much the process of installation from sources of software packages or libraries, from the point of view of users. It is assumed that the user uses any Unix/Unix-like system, and the purpose of the developer, who chooses to use these GNU tools, is to make the installation, on the user’s system, as easy as possible.
Haskell uses lazy evaluation by default, but what does that mean exactly?
We’re going to state the abstract definition of laziness, behold its nonsensical beauty for a few seconds, and then conclude that a concrete example is necessary in order to understand the concept:
Laziness is the separation of equation from execution.
The purpose of this article is to present in a general way the Unix standards and how can we write portable code on Unix systems, not only on Linux ones.
The C++ 2011 standard introduced the lambda expression syntax element causing some people ask why it was needed. In reality, it was not a new use case, people have been using this under different names since C was created. You had functors (C++ terminology) and pointer to functions for example. A basic use case was in applying the same transform over all elements of a collection (the functor’s widely shared example) or sorting elements of a vector (via qsort
in C). But, in reality, all of these cases can be reduced to using higher-order functions.
Two years ago this blog had a series of articles on debugging tools. We have presented tools like Valgrind and GDB and we stopped with an introduction to strace. At the end of that article we mentioned that there are other tools useful for debugging beyond these three already mentioned. After two years of silence, the debugging series is on with an article on ltrace
.
This series of blog posts is aimed at experienced programmers who have heard that Haskell is an interesting programming language, but have not had the chance to invest any time in researching it.
In this series I am going to highlight a few remarkable things at a high level, while glossing over some implementation details that would take too long to explain properly. Therefore, expect a lot of “here’s a practical application of Haskell and here’s some sample code, but don’t ask to see the gory details” hand-waving.
For the purposes of this series, I will simply assume that it’s easy for the experienced reader to jump into a new imperative programming language after a few hours or days of becoming familiar with its syntax. And I’ll start with an example that illustrates how you have to adopt a completely different mindset when you start learning Haskell.
Part 1 of this series covers:
- Mutability
- Upside Down Maps
- Tokenizing Kernel Code
3:30PM
Ladies and gentlemen, fast hackers and coder perfectionists, web developers and mobile app creators, we present you the first edition of the Facebook hackathon in Romania. Organized by your favorite open-source community ROSEdu, the volunteers have been busy all morning preparing the workspace for the 15 participating teams. We have pizza, beer and a mountain of bean bags for people who move fast and break things.
Here are are some small things you might find useful when you need to deal with text files. In the Linux/Unix world, a lot of things are text files, so you need to know how to efficiently handle them. If you are a sysadmin, you need to look at log files for most of your work time and the following might come in handy.
Finally, the third article on advanced git topics will focus on things that many will use only in some very special cases.
The second article on advanced git topics is focused on cases where multiple branches are involved.
We focus again on git. This time, we will present some real-world scenarios where knoweldge of advance git topics helps. In order to keep down the length of the article, our presentation is divided in 3 parts, this being the first one of these.
Introduction
This is a write-up for Pwnable 250 level from Ghost in the Shellcode capture the flag competition. Basically a return-to-libc attack will be described; we will also describe the steps for solving the mentioned CTF level using the original binary from the competition.
Note: This article focuses on Debian based Linux distributions.
Grub2 is the next generation Linux bootloader that is trying to replace the “Legacy” Grub version. It is a complete rewrite of Grub 1 and only lately becoming fully featured compared to the old version and even comes with some new interesting features.
Rather than relying on dry explanations of mathematical set theory, this tutorial is organized as a survey of SQL statements and techniques. It is designed to let you infer from examples what SQL is all about as well as the kinds of problems it can help you solve.
This guide is designed to explain why you need to hide information and how can you do this when you do not trust the channel through which messages are conveyed. We will discuss about cryptographic system, encryption, decryption, one-way function, asymmetric keys and more. You may think of cryptography as the thing that keeps you untouchable inside of a soap bubble travelling by air around the world.
Do you think it is safer by plane?
This is an article aiming to familiarize the reader with the features and benefits of using Secure Shell (SSH), particularly with the OpenSSH implementation. SSH is an application level protocol used for secure data communication, whether that means remote shell access, command execution, file transfer and some other aspects described in this article. It was meant to be a replacement for existing insecure remote shell protocols such as telnet
, rsh
and rexec
which send information in plaintext, including usernames and passwords.
After talking about Valgrind and GDB, it is time to present another useful program for developers and system administrators.
Often-overlooked, though common on most of the GNU/Linux systems, strace
is a tool which traces system calls done by a process during its execution. However, this is only a simplistic point of view: using strace
, you can filter by a group of system calls, you can profile your application from the syscalls point of view and you can trace signals sent to a process.
Let us start from a common mistake made by programmers learning simple data structures in C. The following code is an implementation for simple linked lists of integers in C.
This is the third article about git on this blog. It is highly recommended to read the other two as well: there is one about some good practices in using git and another one about some aliases which will speed up your interaction with the commit history.
The series of articles about git continues with a short presentation about two other aliases and the reason why they should be used in order to create better commits.
In working with large projects it is necessary to compile from multiple sources. Since this is quite difficult, different tools have been developed to make this task easier. One such tool is GNU Make and the associated executable is make
. Make solves compilation from multiple sources problem using the dependency relationships between them, described in a special file usually called Makefile
.
Most Linux users prefer to use the CLI because of its efficiency. But the days of the single terminal in which you had your shell are long gone. Users take advantage of the GUI and use graphical terminals like gnome-terminal
, konsole
or similar utilities, to start several shell instances. For example if you are a programmer, you might want to have one instance for the editor (with the code you are working on), another one to test and debug the compiled executable and – maybe – another for the documentation (man
pages). If you are a system administrator you might have a shell with the configuration file of a service, one you use to test the running service, and maybe one shell connected to another server. But, having a lot of windows (or tabs) can get confusing.