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 …
Autor-Archive: bk1
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 …
O’Reilly schließt Aktivitäten in Deutschland
This article is of minor relevance to English speaking readers, because it concerns the German O’Reilly books, while the English O’Reilly books continue to be available. So I will write in German. Der O’Reilly-Verlag hatte jahrelang eine deutsche Niederlassung in Köln, wo deutschsprachige Versionen der beliebten Informatik-Fachbücher herausgegeben wurden. Dies waren oft Übersetzungen, aber in …
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 …
Microsoft dropping Windows-Support
Microsoft’s CEO Satya Nadella announced that Microsoft is withdrawing its support for the MS-Windows platform and concentrating on its core business, which is „services – services – services“. For a transition period of a few months, support for MS-Windows can still be obtained at an increased rate from Microsoft, but development and support have become …
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 …
PI-Day
When using an arguable stupid American date format, today’s date looks like „03/14/15“ instead of 2015-03-14, which are the first few digits of . Now we all know how to calculate , we just use the Taylor series of or , which unfortunately does not converge too well when used naïvely, but there are tricks …
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 …