Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

Finding the cheapest flights for a multi-leg trip with Amadeus API and Python

Categories

Tags backend-development ai-and-machine-learning software-engineering

Vladimir Iakovlev is the author of this tutorial about finding cheapest flights for a multi-leg trip with Amadeus API and Python. Amadeus Travel APIs connect you to the richest information in the travel industry.

The tutorial is split into:

  • Restrictions
  • Airports
  • Prices and dates
  • Itinerary

To understand the complexity of the problem better author draw a graph of possible flights routes.

To find out how author was able to get cheapest flights with the minimal duration and the resulting prices were almost the same as on Google Flights click on the link to original source. Jupyter notebook is also available with the whole adventure. Well done!

[Read More]

Small & fast Docker images using GraalVM's native-image

Categories

Tags backend-development devops-and-ci-cd software-engineering

An article by Adam Warski focusing on optimization of deployment images. The JVM ecosystem has a lot of great traits, but small, cloud-deployment-friendly Docker images is not one of them.

Dockerizing even a simple application will result in an image that has hundreds of megabytes, as it needs to contain all dependencies (jars) and the whole JVM. Can we do anything about it?

The article then dives into:

  • GraalVM and native-image utility
  • Compile the Scala (Java/Kotlin/…) application to .jar files
  • Use native-image to generate a native binary
  • Create a docker image with the generated native binary
  • An example using Scala + sbt

The author reduced the size of the docker image from 647MB to 26.5MB. Example code is also included. Great guide!

[Read More]

Indexes bad practices

Categories

Tags data-and-analytics backend-development miscellaneous cloud-and-infrastructure

In this article author will discuss secondary indexes common mistakes and bad practices. While the article is focused on MySQL and the InnoDB storage engine, most of this information applies to any DBMS. Published by Federico Razzoli.

An index is an ordered data structure.

Common mistakes and bad practices

  • Duplicate indexes
  • Indexes and the primary key
  • Expecting the impossible
  • Columns order
  • UNIQUE indexes
  • Index names

Indexes are essential for query performance. And fast queries are essential for application performance. Interesting read!

[Read More]

Exposing MyRocks internals via system variables: data writing

Categories

Tags data-and-analytics backend-development miscellaneous

Peter Sylvester wrote this blog post about new storage engine for MySQL that’s rising in popularity. MyRocks, the log-structured merge-driven RocksDB engine in MySQL.

The content is split into:

  • Rows vs. key-value
  • Column families
  • System variables vs. column family options
  • In-Memory data writes
  • Variables and CF_OPTIONS
  • Associated Metrics

In this post, you get column families explained, the differences between server variables and column family options, how data gets written into memory space, the associated logging, and different conditions that designate when that data will be flushed to disk. Good read!

[Read More]

How to remove unused CSS from your website

Categories

Tags how-to frontend-and-mobile software-engineering

An article by Dan Englishby describing how to go about clearing CSS files. A cascading style sheet can gradually build up into a bulky file over time. This means two things, your CSS file is messy, and it’s unnecessarily bigger.

A bigger CSS file indicates more significant download times, and we don’t want that if it’s not necessary!

The article contains:

  • Prerequisites
  • Understanding how PurifyCSS works
  • Installing PurifyCSS
  • Prepping our files
  • Creating the JS Purifier Script
  • Purifying

In this article the author used PurifyCSS to shed 13kb from example CSS file, which was a 70% reduction. Nice work!

[Read More]

Using JaCoCo as code coverage tool for Scala

Categories

Tags architecture-and-apis backend-development software-engineering

Straight to the point guide by Miles Buckley focusing on open source coverage tool for Java.

Code Coverage is a metric that measures what percentage of your code has been executed during unit and integration tests.

JaCoCo is a great open-source toolkit for code coverage measurements. JaCoCo was originally written for Java and runs on the JVM, but because it’s bytecode-based it works for Scala too. It also includes reports which can be extremely helpful when working with complex projects.

The guide explains how JaCoCo works to measure code coverage. How JaCoCo works to measure code coverage:

  • Instructions
  • Branches type
  • Cyclomatic Complexity metric
  • Lines
  • Methods type
  • Classes metric

You will also get information hor reports are generated and what metrics are available. Good work!

[Read More]

Progressive Enhancement: Respecting web browser preferences in a post ES6 world

Categories

Tags software-engineering frontend-and-mobile

Jaime Rios is an author of this intro into Progressive Enhancement (PE).

In a nutshell, Progressive Enhancement is a philosophy for developing web applications and this are the principles:

  • Basic content should be accessible to all web browsers
  • Basic functionality should be accessible to all web browsers
  • Sparse, semantic markup contains all content
  • Enhanced layout is provided by externally linked CSS
  • Enhanced behavior is provided by unobtrusive, externally linked JavaScript
  • End-user web browser preferences are respected

An alternative to PE is Graceful Degradation (GD). The difference is that PE goes from simple to complex while GD goes the other way around.

Even if you are not aware of it, the browser exposes information about the user preferences. To learn which ones, follow the link to original article. Job well done!

[Read More]

NGINX structural enhancements for HTTP/2 performance

Categories

Tags devops-and-ci-cd software-engineering frontend-and-mobile

The blog post from pen of Nick Jones published on cloudflare.com. It is about experience of his team which deals with features related to: TCP, QUIC, TLS and Secure Certificate management, HTTP/1 and HTTP/2. They were responsible for implementing the Enhanced HTTP/2 Prioritization product.

They had a number of interesting realisations about NGINX: the HTTP oriented server onto which Cloudflare currently deploys its software infrastructure. We quickly became certain that our Enhanced HTTP/2 Prioritization project could not achieve even moderate success if the internal workings of NGINX were not changed.

Enhanced HTTP/2 Prioritization aims to do one thing to web traffic flowing between a client and a server: it provides a means to shape the many HTTP/2 streams as they flow from upstream (server or origin side) into a single HTTP/2 connection that flows downstream (client side).

Write queue construction in NGINX Source: https://blog.cloudflare.com/nginx-structural-enhancements-for-http-2-performance/

The article then dives in some detail into:

  • Identification of some key pain points in NGINX
  • HTTP/2 frame write queue reclamation
  • HTTP/2 frame write event re-ordering
  • Upstream buffer partial re-use
  • TLS layer Buffering

The team is eager to share cloudflare modifications to NGINX with the community, so they have opened this ticket, through which they will discuss upstreaming the event re-ordering change and the buffer partial re-use change with the NGINX team.

Good information please follow the link to original article to learn more!

[Read More]

Creating your own React validation library: the basics

Categories

Tags frontend-and-mobile software-engineering

Ever wondered how validation libraries work? This article by Kristofer Selbekk will tell you how to build your very own validation library for React step by step.

This is first part of series of articles which include: the basics, the features, the experience.

The content is split into:

  • Designing the API
  • Storing the form state
  • What’s a reducer?
  • Validating our form
  • How to pick validator functions

The code examples in CodeSandbox are provided with detailed explanation for each of above steps. You will be able to create a simple, usable and pretty cool validation library.

You will also get deeper understanding of how other libraries implement “the magic of validation”.

[Read More]

Why Ruby On Rails is a good choice in 2019?

Categories

Tags software-engineering miscellaneous how-to business-and-emerging-tech

Few thoughts by Błażej Kosmowski why he believes Ruby is doing great and still remains a good technology to choose in 2019.

There is no doubt that it is still a relevant language and it still attracts new followers and developers. Here is why:

  • GitHub’s top programming language
  • The community is active and supportive
  • Ruby constantly evolves
  • It really is great for startups… and for internal tools… and prototyping… and whatnot
  • Ruby has well-established code style recommendations
  • Developer happiness

But why is Ruby slowing down? There is no easy answer to that question, but we can theorise about it. It is likely that Ruby has matured enough and lost some momentum. however vast amount of libraries and resources for learning, helpful and active community, well established best practices and beautiful, readable syntax – all this makes ruby a programming language it is a pleasure to work with – a language oriented on developer happiness.

Last but not least, what should be kept in mind that there are no “bad” programming languages per se, there are only badly chosen languages for particular use cases. Good read!

[Read More]