How many CPUs does your computer have? If we go way back, we will discover that some time ago there were already ancillary CPUs in our computers. The floppy disk drive of the C64 had a CPU very similar to the one in the computer itself, but very little memory and it was hard, though …
Kategorie-Archive: English
When to use Scala and Ruby
There are many interesting languages that have their sweet spots and of course a larger set of languages than just two should be considered for new projects. But Ruby and Scala are both very interesting languages that did not just pick up and sell concepts that were already known, but brought them to a new …
Carry Bit, Overflow Bit and Signed Integers
It has already been explained how the Carry Bit works for addition. Now there was interest in a comment about how it would work for negative numbers. The point is, that the calculation of the carry bit does not have any dependency on the sign. The nature of the carry bit is that it is …
Source Code of Apple-iOS leaked
It seems that the parts of the source code of Apple’s iOS 9 have leaked via github. They might have been removed from there, while you are reading this, but probably they will be passed around in the internet anyway. Some sources say that this is a risk to security. It might be, but in …
Java Properties Files and UTF-8
Java uses a nice pragmatic file format for simple configuration tasks and for internationalization of applications. It is called Java properties file or simply „.properties file“. It contains simple key value pairs. For most configuration task this is useful and easy to read and edit. Nested configurations can be expressed by simple using dots („.“) …
PostgreSQL
Almost every non trivial application uses in some way a database. For many years this has been anyway Oracle, DB2 or MS-SQL-Server, depending mostly on the habits and on the religious orientation of the organization that developed or ran the application. These days all three are available for Linux and MS-Windows. DB2 is also available …
The magic trailing space
When comparing string, of course spaces count as well and they should count. To ignore them, we can normalize strings. Typical white space normalization includes the following (Perl regular expressions): /[ \t]+/ /g replace any sequence of tabs and spaces used to separate content by one space. /\r\n/\n/g replace carriage return + linefeed by linefeed …
Christmas — Weihnachten — Рождество 2017
Bon nadal! — Priecîgus Ziemassvçtkus — З Рiздвом Христовим — Buon Natale — Bella Festas daz Nadal! — С Рождеством — Срећан Божић — καλά Χριστούγεννα — God Jul! — Feliĉan Kristnaskon — ميلاد مجيد — Feliz Navidad — Glædelig Jul — Fröhliche Weihnachten — Joyeux Noël — Hyvää Joulua! — クリスマスおめでとう ; メリークリスマス — …
Scala Exchange 2017
I have visited Scala Exchange („#ScalaX“) in London on 2017-12-14 and 2017-12-15. It was great, better than 2015 in my opinion. In 2016 I missed Scala Exchange in favor of Clojure Exchange. This time there were really many talks about category theory and of course its application to Scala. Spark, Big Data and Slick were …
Collection Initializiation in Java
There is this so called „double brace“ pattern for initializing collection. We will see if it should be a pattern or an anti-pattern later on… The idea is that we should consider the whole initializion of a collection one big operation. In other languages we write something like [element1 element2 element3] or [element1, element2, element3] …