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 ]

A sysadmin's guide to Ansible: How to simplify tasks

Categories

Tags cicd ansible devops

Jonathan Lozada De La Matta from RedHat wrote this article about sysadmin tasks automation. There are many ways to automate common sysadmin tasks with Ansible. In this article you will find several of them.

Author gives some advice how to better approach Ansible learning when you are new to it. He also creates list and code with examples of managing basic tasks for cloud infrastructure:

  • Managing accounts in systems
  • Maintaining lists of required packages
  • Configuring systems and applications
  • Provisioning a VM in the cloud
  • Doing other things

As mentioned code examples for various approaches to tasks done in Ansible in different ways included. Short, straight to the point Ansible intro. Great starting point for any sysadmin!

[Read More]

Reduce JavaScript payloads with tree shaking

Categories

Tags performance javascript frontend

Jeremy Wagner neat article about reducing the JavaScript in modern web applications. JavaScript is often compressed when sent over the network, meaning that the actual amount of JavaScript is quite a bit more after the browser decompresses it.

As of mid-2018, HTTP Archive puts the median transfer size of JavaScript on mobile devices at approximately 350 KB.

As far as resource processing is concerned, compression is irrelevant. 900 KB of decompressed JavaScript is still 900 KB to the parser and compiler, even though it may be ~300 KB when compressed.

JavaScript is an expensive resource to process. Unlike images which only incur relatively trivial decode time once downloaded, JavaScript must be parsed, compiled, and then finally executed. Byte for byte, this makes JavaScript more expensive than other types of resources.

Tree shaking is a form of dead code elimination.

Author explains:

  • What is tree shaking
  • How to find opportunities to shake a tree
  • How to use webpack to implement tree shaking in sample app
  • How to keep Babel from transpiling ES6 modules to CommonJS modules
  • About keeping side effects in mind
  • And how to import only what we need

And of course example code is included. Excellent read!

[Read More]

Scalaz 8 IO vs Akka (typed) actors vs Monix

Categories

Tags akka scala functional-programming

There’s a couple of hot development areas in the Scala ecosystem, and the competition between the various side-effect wrappers is one of the most interesting. Adam Warski article comparing various options and trying to find the answer to the question: Can you really replace an Actor with an IO or Task?

Akka is much more than just actors; there’s streaming, persistence and clustering, just to name the three most popular modules.

An actor encapsulates and manages state. Access to the state is guaranteed to be serialized, so that the state is always accessed and changed by a single thread.

Article then compares all three libraries and provides test code for you so you can try yourself. To be precise it copares: akka-actor (just the base module, concurrency), monix-task and scalaz-zio.

Monix is a smaller library, but apart from the core concurrency library it also provides a reactive streaming implementation.

ZIO (Scalaz 8 IO), on the other hand, as well as cats-effect, is clearly focused only on encapsulating side effects and providing a concurrency library.

Good, in depth article. Author concludes that Monix / ZIO is definitely a viable alternative for the “traditional” and “typed” Akka flavors. Great!

[Read More]

React Native -- how to setup your first app

Categories

Tags web-development app-development react

Aman Mittal’s article about first steps with React Native. React Native is a framework for building mobile applications with JavaScript and leveraging Reactjs. It uses native UI components. In React Native, there is no DOM rather than Native Components which are provided by platforms such iOS and Android.

React Native uses RCTBridgeModule to make a connection between native code and JavaScript code.

The article explains:

  • Difference between React Native and Reactjs
  • Platform specific designing
  • Developer Environment for React Native
  • Hello world with React Native

It will help you successfully setup your first React Native application. You can also find links to author’s other articles on React Native and mobile development in the article. And of course example code is provided. Good intorduction to React Native!

[Read More]

Stubbing and mocking in Java with the Spock testing framework

Categories

Tags programming java tdd

Kostis Kapelonis wrote this piece on importance of stubbing and mocking. When it comes to true unit tests, having a mocking framework such as Spock for Java is essential. Using a mocking framework ensures that your unit tests are fast, self-contained and deterministic.

A mocking framework can help you fake external systems, pre-program your classes with expected responses, and test hard-to-replicate error conditions.

Tutorial covers:

  • Downloading and setting up Spock via Maven
  • Some very brief theory on the goals of Spock
  • Stubbing return data from methods
  • Verifying interactions
  • Capturing arguments
  • Returning custom mocked responses

Also, explains how to use the external project of Spock reports. Excellent tutorial with example code included.

[Read More]

Introducing QALM, Uber's QoS load management framework

Categories

Tags programming agile software-architecture

Article by Scott Yao and Ping Jin from Uber engineering team. It is about their experience how they proactively manage Uber’s traffic loads based on the criticality of requests, they built QoS Aware Load Management (QALM), a dynamic load shedding framework for incoming requests based on criticality.

Uber platform team owns four services with thousands of hosts, serving peak traffic up to 300,000 requests per second, with more than 450 internal services. Any system of this complexity is likely to experience outages, especially one that has grown so quickly.

Analyzing outages that occurred over a six-month period, we found that 28 percent could have been mitigated or avoided through graceful degradation.

The three most frequent types of failures QoS team observed were due to:

  • Inbound request pattern changes, including overload and bad actors
  • Resource exhaustion such as CPU, memory, io_loop, or networking resources
  • Dependency failures, including infrastructure, data store, and downstream services

You will find the QUALM architecture explained with accompanying charts, load test experiments and more. Well written!

[Read More]

Peer reviews either sandbag or propel Agile development

Categories

Tags programming agile teams

Patrick Londa posted interesting article on topic of peer review process and its impact on Agile success. Working on a fast-moving Agile team, one needs to continually build consensus so that there is not a communication backlog.

In Agile environment software releases are becoming more frequent. If you are not able to speed up your peer review cycles in tandem, you may start to sacrifice quality to hit deadlines.

Your key takeaways from this article:

  • A team’s peer review process is critical to their agile success
  • There are three attributes at the heart of a structured peer review process
  • Review transparency is crucial in bringing agile to the organization-level
  • How to establish clear and living communication expectations
  • How to select review metrics that enable meaningful process improvement

If you add rigor and structure to your process, your team will, to some degree, adopt the behaviors that you are emphasizing. Insightful article, with some great advice. Recommended!

[Read More]

How to escape async/await hell

Categories

Tags javascript programming nodejs

Javascript developer Aditya Agarwal published this interesting article about perils of asynchronous Javascript. While working with Asynchronous JavaScript, people often write multiple statements one after the other and slap an await before a function call.

This causes performance issues, as many times one statement doesn’t depend on the previous one – but you still have to wait for the previous one to complete.

async/await freed us from callback hell, but people have started abusing it – leading to the birth of async/await hell

The article then gives you:

  • Few examples of async await hell
  • Detailed explanation what is wrong in the example
  • Advice on how to get out of async / await hell
  • Example code with fixes

One interesting property of promises is that you can get a promise in one line and wait for it to resolve in another. Sweet and to the point article, with great code examples!

[Read More]

An Introduction to Q#

Categories

Tags programming data-science big-data machine-learning

Ankit Sharma article focusing on Q# language. Q# is an accessible language for quantum computing. Q# is the new programming language introduced by Microsoft for quantum computing. Author goes over the data types, expressions, and statements of Q# with the help of code snippets.

According to Microsoft, Q# is a scalable, multi-paradigm, domain-specific programming language for quantum computing.

The article guides you through:

  • Installing the Quantum Development Kit
  • Explaining the Q# type model, including (amongst others):
    • Qubit – represents the Quantum bit
    • Pauli
    • Result
    • Range
  • Q# expressions
  • Q# statements

Good intro into Q# language. You will get links to further resources explaining quantum computing. Nice!

[Read More]

Why Python devs should use Pipenv

Categories

Tags python programming

Lacey Williams Henschel article about Pipenv which has become the official Python-recommended resource for managing package dependencies. Pipenv, the “Python Development Workflow for Humans” created by Kenneth Reitz. But there is still confusion about what problems it solves and how it’s more useful than the standard workflow using pip and a requirements.txt file.

Pipenv aims to solve several problems. First, the problem of needing the pip library for package installation, plus a library for creating a virtual environment, plus a library for managing virtual environments, plus all the commands associated with those libraries.

There are other benefits to using Pipenv: It has better security features, graphs your dependencies in an easier-to-understand format, seamlessly handles .env files, and can automatically handle differing dependencies for development versus production environments in one file.

The article has 3 sections:

  • A brief history of Python package installation
  • The new kid: Pipenv
  • Pipenv in action

You will find plenty of links to further resources and reading, including to the basics of using Pipenv. Good read!

[Read More]