Images are usually some obscure binary files. Their most common formats, PNG, SVG, JPEG and GIF are well documented and supported by many software tools. Libraries and APIs exist for accessing these formats, but also a phantastic free interactive software like Gimp. The compression rate that can reasonably be achieved when using these format is …
Kategorie-Archive: Programming Languages
System Programming on Linux and MS-Windows
Quite honestly I admit that I really love the Posix-APIs for system programming and even some Linux specific extensions to it. I/O, Locking, Semaphores, Shared Memory, Message Queues, Signals, named and anonymous pipes, Unix Domain Sockets, TCP/IP programming, Terminal I/O, pthreads and a lot more are very powerful and fun to program. I do discover …
Scala Days 2015
I have visited Scala Days 2015 in Amsterdam. As usual, I took the night train to get there and back. Creative Scala Prior to the conference we did a training session for Scala beginners together with underscore. Some volunteers, including myself, joined the effort and so we were actually more teachers than students. It was …
Find the next entry in a sequence
In Facebook, Xing, Google+, Vk.com, Linkedin and other of these social media networks we are often encountered with a trivial question like this: 1->2 2->8 3->18 4->32 5->50 6->72 7->? There are some easy patterns. Either it is some polynomial formula or some trick with the digits. But the point is, that any such sequence …
Thread local variables
The idea of threads is to share almost all information between the threads of the same process. This implies more effort to avoid creating inconsistencies by simultaneous access to the same data. But sometimes it is necessary to have data private to one thread. This is usually easily accomplished by just using local variables and …
How to multiply long numbers
Assuming we have a multiplication of n-bit-numbers already available. Other than typical compiled languages, which assume that the multiplication result fits into the same size as the two factors, we should take a closer look. Unsigned n-bit-numbers as factors and fullfill So we have for the product So we …
Testing Java- and C-programs with Ruby and Perl
It is very important to write good unit tests for software that is non-trivial and that is relied on by other pieces of software. Often the logic of the software can easily be covered by the native testing facilities of the programming language, like JUnit for Java or, much less well known but available, CUnit …
„Testing Java- and C-programs with Ruby and Perl“ weiterlesen
How to recover the Carry Bit
As frequent readers might have observed, I like the concept of the Carry Bit as it allows for efficient implementations of long integer arithmetic, which I would like to use as default integer type for most application development. And unfortunately such facilities are not available in high level languages like C and Java. But it …
Binary Data
Having discussed to some extent about strings and text data, it is time to look at the other case, binary data. Usually we think of arrays of bytes or sequences of bytes stored in some media. Why bytes? The 8-bit-computers are no longer so common, but the byte as a typical unit of binary data …
Why I still like Ruby
Some years ago Ruby in conjunction with rails was an absolute hype. In the Rails User Group in Zürich we had meetups with 30 people every two weeks. The meetings every two weeks have been retained, but often we are just five to ten people now. Is the great time of Ruby over or is …