Reality is complex: please note that in the previous sentence complex has a very specific meaning; let’s just investigate a little more about it.

Image for post
Image for post
Photo by H Shaw on Unsplash

Complexity

Complexity theory has been inspired by some famous problems that come to the attention of the scientific community in the final decades of ‘800. One famous instance of such a family of problems is the Three-body problem: let pick three bodies in space (planets, satellites, etc…); we know that they are subject to the gravitational laws; to simplify things let consider them far away from each other object, so we can suppose that gravitational laws are applied just to them three; given the initial positions and velocities of such bodies we want calculate their positions in any successive moment in time. …


A look at the SafeMath library from OpenZeppelin

Crystals
Crystals
Photo by Michael Dziedzic on Unsplash.

In Solidity, there are plenty of different alternatives to things you take for granted in other languages. Strings and math are two examples.

“Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows.

Using this library instead of the unchecked operations eliminates an entire class of bugs, so it’s recommended to use it always.” — OpenZeppelin docs

“Operations in Solidity wrap on overflow” refers to a specific thing bound to the way numbers are represented in computers and in Solidity, in particular. …


Getting started with Solidity

The word “WORLD” spelled in LED lights in a dark room.
The word “WORLD” spelled in LED lights in a dark room.
Photo by Martim Braz on Unsplash.

Strings of characters represent the very heart of every programming language because, you know, computers often interact with humans. For this reason, handling strings is one of the first functionalities developed in any language. Furthermore, the first test traditionally prints the string “Hello, world!”

Solidity is not an exception. It has native support for strings, but still, their use is not complete like in high-level languages such as JavaScript, Python, or Java. For instance, out of the box, Solidity does not offer a native way of comparing or concatenating strings. However, the documentation offers a valid solution for both functions that rely on abi.encodePacked()


How ‘selfdestruct’ works in Solidity and how it affects the life of the freshly self-destructed smart contract

Image for post
Image for post
Photo by Harrison Kugler on Unsplash

For the purpose of this article, I have read some good sources, starting with “Why Do Smart Contracts Self-Destruct? Investigating the Selfdestruct Function on Ethereum,” a recent publication that really digs into self-destruct mechanisms. The selfdestruct command stands out in the general immutability of the blockchain: selfdestruct renders inoperable a smart contract. A motivating example of why an immutable blockchain needs such a powerful command is reported in this paper:

“The DAO attack continued for several days and the organization even noticed that their contract had been attacked at that time. However, they could not stop the attack or transfer the Ethers because of the immutability feature of smart contracts. …


In this short tutorial I will try to summarize few simple steps to configure Logstash to emit data to Azure Event Hubs Before starting just few words to describe the two components we will work on:

Image for post
Image for post
“brown tree log lot” by Dimitri Tyan on Unsplash

Logstash — it’s a data processing pipeline that ingests, as rapidly as it can, data from a multitude of sources simultaneously, (slightly) transforms it, and then sends it to your favorite “stash”. It is designed to read logs, wherever they are hosted, and send them over, as fast it is possible, to the broker that will memorize, manipulate, display them. The general advice is to keep the pipeline as light is possible (i.e. coarse grain filtering, clean up date format etc…) by delegating heavy lift (i.e. …


My current job is in a large company with a lot of different business: it’s a bank, a national postal service, a large insurance company, it even has airplanes and a huge logistic network.

Image for post
Image for post
By Mike Beauregard from Nunavut, Canada (Stripes) [CC BY 2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons

Giving in a single glimpse into the IT infrastructure of the company is like looking at sedimentary rocks: the result of tens of years of deposition of the remains of design decisions that have been cutting edge when they have been took and that nobody cared to actually remove when they were not anymore efficient or effective.

In this short post I will summarize what I’ve learned in about five years of designing and implementing pieces of software within such infrastructure. Most of the lessons are something that you can hardly find in university courses. …

About

Rosario De Chiara

Data Masseur, Distributed Systems Sculptor, and Scalability Evangelist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store