Bright Inventions

Request timeouts in Spring MVC

As we saw previously, we only have limited options to configure maximum time a request processing can take in Spring MVC. In this post I will show how to enforce such timeout through a custom Servlet Filter.

Children and programming

Recently, when I was waiting for my nephew at school, I was looking at the advertisements around not to get too bored. To my surprise there were as many advertisements about lessons of programming as about some sport classes. They all aimed at the youngest children - the first grades of primary school. I was sitting there and wondering how it is possible to teach children how to write a code in any programming language when they cannot write in Polish yet. Hey, they can barely read!

IOTA Hackathon

One may ask if it is a real fun spending two days in front of computer with a bunch of strangers. The example of IOTA Hackathon shows that it is indeed.

Request timeouts in Spring MVC

Last time we reviewed how to configure HTTP client timeouts. This time let us focus on the other side of the HTTP request i.e. server. There is pretty much always a thread pool involved when we write a Spring MVC application. The thread pool configuration will vary depending on particular servlet container (Tomcat, Undertow, Jetty) so we have to watch out for subtle differences. However, most if not all of them will use a thread pool with fixed maximum size. As we already know, a pool of resources might get exhausted. In particular, a thread pool is more likely to get exhausted if we do not control timeouts diligently.

How not to get crazy?

We live in XXI century, our lives have become easier thanks to lots of inventions. But have you ever thought about our addiction to technology? It has got to every part of my life and I haven’t even realized that. I wake up thanks to an alarm clock on my mobile phone, during breakfast I check the news on my notebook and all the time I look at my electronic clock to check the time. At university I use PC in laboratories, lecturers show us what they do on their own computers using projectors. I am a programmer, so at work I write new code or read the old one - all using the computer and staring at the display. At the weekends in the evenings it’s all the same because my life revolves around computers.

Design Patterns with Swift: Facade pattern

Facade pattern is one of the Structural Patterns. The main aim of it is to hide the complexity of system, class or logic and provide a simple interface - use your system easier.

Putting native in React Native on Android

Using custom native components in React Native is a common thing, so sooner or later you may have to write some functionality in a native language and use it in your application. Let me show you a simple example how to do that.

Your first unit tested Ethereum Smart Contract

The goal of that blog post is to provide you with the exact steps how to start creating your first unit tested smart contract.

Important: do not overuse !important

You have created your CSS rule and found out that it didn’t take a desired effect. You checked the CSS selector and HTML code again to check if they correspond. Or you just opened the developer console in your browser, inspected the element and checked if your CSS rule was present in the styles list. It turns out that it is there, but the declarations are strikethrough. This means you have just encountered some kind of CSS specificity issue. You could just add the !important flag to your declarations and have it done. Is it a good solution? Never. I do not say you should never use !important though. What I really want to say is that you should never use !important if you are not aware of the consequences.

HTTP request logging in Node.JS

One of the most basic kind of logging every backend application should have is a trace logging of all incoming HTTP requests. Yet it's not easy to make it right and useful. Let me show you what we have learned and what we do to ensure our logs are meaningful and useful.