Travelling to this years Devoxx conferences is worth its own short article, even though it is not very IT oriented material… On the last weekend in October I brought a bicycle to a place near Frankfurt, let’s call it FrankfurtE. I took the train to Karlruhe and then back from FrankfurtE, but cycled from Karlsruhe …
Autor-Archive: bk1
Company „Skillsmatter“ stops operations
The company Skillsmatter in London has been put „under administration“ and basically stopped its operations. The web site seems to suggest, that everything is still ok, but that is not the case and I have heard so from several sources. The owner Wendy Devolder writes on Twitter and on Linkedin. Or here are some more …
Checked Exceptions in Java
In Java it is possible to declare a method with a „throws“-clause. For certain exceptions, that are not extending „RuntimeException“ or „Error“, this is actually required. What looked like a good idea 25 years ago has proven to be a dead end. I do not know of any other major programming language that opts for …
How to recover the Borrow Bit
In a similar way as the carry bit for addition it is possible to recover the borrow bit for substraction, just based on the highest bits of three numbers that we deal with during the operation. With this program, a subtraction operation of an 8-bit CPU can be simulated exhaustively #!/usr/bin/perl my $x, $x, $bi; my %tab = (); for ($bi = 0; $bi 7; my $zs = $z >> 7; …
Exceptions to implement Program Logic
Sometimes it is conveniant to use exceptions for implementing the regular program logic. Assuming we want to find some data and then process them. When no data is found, this step can be skipped, because there is nothing to do. So we could program something like this: public Data readData(Param param) { Data data = db.read(param); if (data.isEmpty()) { throw new NotFoundException(„nothing found“); } return data; } public ProcessedData doWork(Param param) { …
How to use $ in Articles using WP QuickLaTeX
I use WP QuickLaTeX by Pavel Holoborodko in some of my articles to include mathematical formulas. Now it can be an issue that the „$“-sign, that marks the beginning of a formula, is used as dollar sign. This can be achieved by using [latexpage] in the beginning of the page. Sometimes it is desirable, to …
Borrow and Carry Bit for Subtraction
Similar to the usage of the carry bit when adding there are mechanisms for subtracting that allow to integrate the result of subtraction of the lower bits into the subtraction of the next higher block of bits, where necessary. There are two ways to do this, that are trivially equivalent by a simple not operation: …
Poor mans profiling with LOGs
We have professional profiling tools and we should use them.. They give really useful and extensive information. So why bother about doing „poor man’s profiling“? About ten years ago, running profilers was kind of constrained to very small examples and computers with really huge memory. We have this huge memory now on every development machine. …
Rounding to Rational Numbers
Usually we think of rounding as a way of approximately expressing numbers with many decimal places by numbers with fewer decimal places. Regular readers of this blog have already encountered, that this concept can be extended and generalized, as is mentioned in the article about Geometric and Harmonic Rounding and Residue Class Rounding or Rounding …
Accident Languages
Some commonly used languages have been quite well designed or at least would have been considered so at the time when they appeared. Even if they have their weaknesses, they should be good for some purposes. Now beauty of programming languages is highly subjective. So I do not claim any universal truth to this. But …