Socrates says But that’s not actually easy for human to do because our brains want us to think that we are awesome. In 1995 McArthur Wheeler walked into a bank in Pittsburgh ready to rob it. He didn’t wear mask, he didn’t wear fake mustache, he was just there robbing a bank in full view of eveyone. He even smiled at the security cameras before leaving and going to a second bank to rob that one too.
Prerequisites Ensure your machine have the required library and tools. I tested on Ubuntu 18. sudo apt update sudo apt install libtool-bin build-essential libfuse-dev libcurl4-openssl-dev libxml2-dev mime-support automake libtool pkg-config autoconf Download Jansson C library source code from here then: $ tar -xvf jansson-2.12.tar.gz $ cd jansson-2.12/ $ ./configure $ make $ sudo make install $ cd .. We need JWT C Library. Make sure autoreconf command is installed: $ git clone https://github.
Introduction Whenever a developer or system admin faces an issue with the system, the first instinct is to look at the logs. For a long time, we have relied on basic tools like grep, awk, or perl to perform log analysis. However, with changing times and cloud-scale applications, the earlier techniques no longer suffice. Imagine a system with tens, hundreds, or thousands of hosts. There are multiple instances of different applications running on all these hosts.
Introduction Understanding the performance of mission critical API is crucial. Before you deploy your API, probably you want to know, how your API behaves under heavy loads. Most API nowadays are HTTP-based, and that’s why there are numerous HTTP load testing tools available. Here is just a few: wrk wrk2 vegeta locust hey Apache Benchmark Problem Most of them designed to generate load on the static url, like:
This is the digest of Reactive Programming versus Reactive Systems by Jonas Bonér and Viktor Klang. This is for anyone who does not have enough time to study the original white paper. It is the shortest version without sacrificing important stuff. Reactive - A Set Of Design Principles “Reactive” is a set of design principlesfor creating cohesive systems. In a Reactive System, it’s the interaction between the individual parts that makes all the difference, which is the ability to operate individually yet act in concert to achieve their intended result.
In this post, I ‘m going to introduce you some useful aspects of Cats library, mostly code snippets and I ‘m not going to delve into any theory or mathematics. Hopefully you will use them in your daily codes, resulting in much more simpler and readable code. map using Functor You are already familiar with the prominent map method in Scala. Informally, a functor is any context with a map method.
As a software engineer, I always enjoy solving problems and that’s why I sometimes go to the coding challenge websites like hackerrank and pick one problem to solve. This time I searched in functional programming category and crosswords-101 caught my eye and I decided to solve it in Scala in a very clean and understandable way and not in a contest style way of programming! This article is going to reveal how I solved this puzzle.
Problem You want to insert a new row to a table which has auto increment primary key; Also some additional information must be persist in other tables. At the end you also want to return the inserted generated ID. Imaging you are developing a new web application, and you are working on user registration code. Each time a new user signs up, you want to store his credential in users table and all of his roles in userRoles table.
As a Java developer, I ‘ve always had argument with my colleagues to use Scala instead Java. They complained that Scala is a complex language and Java is a more readable and simple one so I never had the opportunity to use Scala well. Fortunately, recently I ‘ve just joined to the startup company called snapptrip.com, and we use Scala for all the backend services. A few days ago, I was working on a peace of code in Scala to register a new user into the database.
Definition of DSL A DSL is a computer language, specialized for a specific domain. A DSL is essentially the opposite of a general programming languages(GPL), I mean every language that can be used to develop something. For example, Java, C#, and Scala are all GPL languages. With a DSL, we want only to solve a specific domain problem, so we design the language specifically for the domain. A DSL can’t be used outside of the domain, because it is not designed for flexibility.