Archive for the ‘Other’ Category


22.08.2018 Leave a comment

We’re witnessing our civilization undergo another significant revolution. We’re departing from extracting energy from fossil fuels in favor of harvesting energy from renewable sources. Majority of “clean energy” solutions rely on storing energy in batteries.

Car manufacturers are slowly transitioning to electric cars. Yet a few biggest ships create more pollution than all the cars in the world. To remedy this, Rolls-Royce (the engine company, not the luxury car company) announced a new battery system for ships. Eventually, in a few decades, we will produce a few orders of magnitude more batteries than today to store energy in cars, ships and houses.

The transition to electric engines and renewable energy is great for our planet, still one problems remains to be solved: batteries have limited lifetime. What is going to happen with all the mountains of batteries we will produce to replace dirty combustion engines?

One researcher developed a way to recycle used Li-Ion batteries. Reportedly around 97% of Li-Ion batteries end up piling up in landfills, which would become a huge problem in a few decades.

Should the cost of recycling batteries be included in the price of new products?

Categories: Other

Nanotechnology may be near

22.09.2017 Leave a comment

If you’ve heard the term “nanotechnology” you may have heard it used incorrectly as a marketing buzzword. The term leads back to K. Eric Drexler, who wrote in 1986 in his book “Engines of Creation” how nanotechnology will revolutionize our civilization by giving us the ability to construct materials and entire products molecule by molecule.

Scientists from The University of Manchester reportedly finally built a molecular robot which has such capability.

On the plus side, that may be the most profound breakthrough of the 21st century. Not only will it revolutionize our lives along with 3D printing and machine learning, but it may also help us better understand the nanoscale world leading to improvements in medicine and other areas.

Categories: Other

C type system strikes back

9.06.2016 Leave a comment

Today is one of those days when C++ surprises me. Here is a snippet:

#include <stdint.h>
#include <stdio.h>

int main()
    const int64_t a = 3;
    if (a < -0x80000000)
        printf("%lld is negative\n", a);
    return 0;

This time the surprise comes from the intricacies of the C type system.

Hint: -0x80000000 is mathematically INT_MIN.

In case you’re wondering, it is not about improving the above snippet. It is about actually seeing a piece of code like this in the wild. It looks correct. But it is incorrect.

Categories: Other

Learn Polish

1.02.2016 Leave a comment

If you have some spare time and want to learn another language, I recommend Polish. Polish is a lot of fun! For a start, here are a few words in Polish and their meaning in English:


Polish word Meaning in English
no yes
do to
to this
go him
pies dog
much flies
bat whip
paw peacock
but shoe
wanna bath tub
pan mister
baby women
was you (plural)
my we
we on (a day)
on he
one they (women)
ten this one
grab hornbeam
bark shoulder
jest is
fart luck


Categories: Other

New Year’s Resolution

4.01.2016 2 comments

One of my New Year’s resolutions is to keep this blog more active. While my activity has been low during the year 2015, I have not abandoned the blog. I was simply spending most of my free time working on my personal project. In the mean time I’ve gathered several ideas for new posts, it will be great if these posts finally see the daylight this year!

Hopefully my personal project will also reach a publishable state this year. Here’s an interesting detail about this project.

C++ has been the primary programming language for me in my professional career. Over the years, I’ve used many programming paradigms provided by this versatile language. However, to the surprise of many, my new project is currently written in pure C!

Why C? Out of admiration for a coworker, who writes programs in C, which are of high quality, and which are readable, maintainable and extensible. And also as a personal challenge. Writing *good* quality software in C requires more skills than in C++, because the language is much simpler and doesn’t have mechanisms provided by C++, which help avoid certain classes of bugs. To be fair, I’ve seen a lot of bad C++ source code which fails to use these mechanisms, but that’s another story.

So here are my impressions about going back to C so far. First of all, RAII, which is the cornerstone of C++, is not available. This makes cleanup more tedious. Again to be fair, C++98 without lambdas also makes cleanup more tedious by requiring you to write or use classes just for the purpose of cleanup, which makes the code scattered or complicated. Secondly, handling error conditions in C is more tedious. Exceptions in C++ can provide a great way of signaling exceptional errors, if used carefully(!), together with RAII, which makes returning from functions easier without the need to babysit allocated resources. Mildly missed are classes, which can help to logically organize functions, although in many C++ programs they are abused by implementing unnecessary OO designs, which lead to too much boiler plate code and eventually hamper readability. One of the most missed features are container templates, which greatly simplify memory management in C++.

On the bright side, some of the advantages include better portability due to unencumbered linkage. Because the language is so simple, it also leads to simpler code, which can in turn be easier to read, maintain and extend, contingent on the type of program and the way in which it is written, of course!

Surprisingly, it is possible to write readable code in C without drowning it in macros! Many C projects I’ve seen overflow with macros, which impact readability. But this can be said about C++ projects, too.

Now back to the editor. Let us see what the New Year brings!

Categories: Other

Interview question: Which browser do you use?

17.03.2015 Leave a comment

Big Data says, that employees who use a non-default browser, such as Firefox or Chrome, stay with the job 15% longer than those using a default browser, such as IE or Safari.

Well, if Big Data says it, it must be true!

(There – I finally said it. 😉

Categories: Other

Job interview question idea

30.09.2014 Leave a comment

I doubt that everybody realizes, that job interviews are for both the company trying to fill in an open position as well as the potential employee trying to find a job. A usually small, but important part of an interview is when the person being interviewed asks the questions.

This idea is for those who have the chance to speak to their potential future manager. How do you know if a particular manager will be right for you?

The question to ask your future manager is: Do you prefer cats or dogs?

The explanation follows.

Dogs are followers, they need their master to tell them want to do, to give them direction. Cats on the other hand are soloists. They do what they want, whenever they want. If they want to be tapped, they come to you.

Of course, this is an approximation, a generalization.

Similarly, there are two groups of employees. Ones which need to be told what to do, and the others, who don’t need and don’t like encouragement, but rather pursue tasks on their own. This is universal regardless of the job type. Obviously, the first kind can be compared to dogs, while the other to cats.

Before going to a job interview, you need to ask yourself honestly, whether you are a follower and need to be told exactly what to do, or whether you like taking complete control over what you are doing. This has nothing to do with whether to like cats or dogs, it is completely orthogonal.

If you are more like a dog, probably a manager who prefers dogs would be better for you. Similarly, if you are more like a cat, a cat-person would manage you better.

It’s just a theory. As silly as it sounds, I wonder if there exists any statistical data which would help test it.

Categories: Other