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 ]

Introduction to AWS Well-Architected Framework

Categories

Tags programming serverless aws software-architecture

An interesting article on devopedia about Amazon Web Services’ Weell-Architected framework (WAFR). Cloud platforms offer a number of services. A typical application can use one or more of these services, each of which can be configured in a number of different ways. AWS Well-Architected Framework (WAFR) offers a set of guidelines and best practices to help practitioners migrate, manage and optimize their applications and their operations on the AWS cloud.

The framework is made of pillars, design principles and questions.

You will learn what the five pillars of the framework:

  • Operational excellence
  • Security
  • Reliability
  • Performance efficiency
  • Cost optimization

It then goes and provides information on AWS services which can help in implementing WAFR? It also helps with design principles and best practices. Plenty of references and resources for further reading available. Well written!

[Read More]

The Right Way™ to do Serverless in Python

Categories

Tags programming serverless python

Michael Lavers published this interesting piece about serverless in Python. In this blog post author takes a brief tour of serverless as it applies to Python as well as some handy tips and tricks to help you get your footing in serverless domain.

In the article you will get help with following:

  • Is my app/workload right for serverless?
  • Python 2 or 3?
  • Web API or Worker?
  • Serverless framework

The article then goes and explains how to set up AWS for simple Lambda functions, how to use serverless framework and an API Gateway. The example code is included together with instructions how to clean up afterwards. There is a plan for a second article which will describe more frameworks and how they work for you to experiment. Nice!

[Read More]

The five stages of JSON decoding in Elm

Categories

Tags programming javascript web-development

Older article by Matthew Buscemi in which he focuses on his 6 month experience with Elm language and translation of object-oriented patterns for scalable, maintainable architecture to Elm’s paradigm. For communicating between Atom editor and his Elm application, he needed ports, and in order to work with Elm Test output, he needed JSON decoders.

JSON decoders are a notorious pain point for newcomers to Elm.

Stages explained in the article:

  • Everything’s a record!
  • Dealing with variant/missing fields
  • Trying multiple variants with oneOf
  • Introducing the value type
  • JSON value/elm type independencevalue/elm type independence

Exhaustive list of code examples included. JSON became truly a transport mechanism for the web. If you find yourself struggling with JSON decoders, try to start with the simplest thing that could work. Link to further reading provided, too. Good read!

[Read More]

Software testing anti-patterns

Categories

Tags programming tdd agile

Article by Kostis Kapelonis in which he wants to catalog some high-level testing anti-patterns that are technology agnostic. Hopefully you will recognize some of these patterns regardless of your favorite programming language.

Unfortunately, testing terminology has not reached a common consensus yet. If you ask 100 developers what is the difference between an integration test, a component test and an end-to-end test you might get 100 different answers.

The anti-patterns in the article:

  • Having unit tests without integration tests
  • Having the wrong kind of tests
  • Testing the wrong functionality
  • Testing internal implementation
  • Paying excessive attention to test coverage
  • Having flaky or slow tests
  • Running tests manually
  • Treating test code as a second class citizen
  • Not converting production bugs to tests
  • Treating TDD as a religion
  • Writing tests without reading documentation first
  • Giving testing a bad reputation out of ignorance

This is long article with detailed explanation and examples for each anti-pattern. Excellent read!

[Read More]

Why is the human brain so efficient?

Categories

Tags data-science big-data

Liqun Luo, professor in the School of Humanities and Sciences, and professor, by courtesy, of neurobiology, at Stanford University, published this interesting essay about human brain efficiency and how massive parallelism lifts the brain’s performance above that of AI. The brain is complex; in humans it consists of about 100 billion neurons, making on the order of 100 trillion connections.

Both the brain and the computer contain a large number of elementary units – neurons and transistors, respectively – that are wired into complex circuits to process information conveyed by electrical signals

The highest frequency of neuronal firing is about 1,000 spikes per second. The fastest synaptic transmission takes about 1 millisecond. Thus, both in terms of spikes and synaptic transmission, the brain can perform at most about a thousand basic operations per second, or 10 million times slower than the computer.

A pro tennis player can follow the trajectory of a ball served at a speed up to 160 mph. The calculations performed by the brain, however, are neither slow nor imprecise.

Read to learn more interesting facts about human brain and how engineers have taken inspiration from the brain to improve computer design. Top notch!

[Read More]

Do we really need swap on modern systems?

Categories

Tags programming servers

Christian Horn from Red Hat Advanced Mission Critical program published this interesting blog. It is a short and straight to the point article describing how is swap used and how much of it is recommended today.

Virtual Memory Management (VMM) is code in the kernel which, among other things, helps us to present each process with its own virtual address space.

Overcommitment means that processes can request more memory from the kernel than we have available physically and as swap.

Article then goes in detail into:

  • Overview: When is swap used?
  • The details: How is swap used?
  • How much swap is recommended nowadays?
  • Can I run without swap? Is further tuning possible?

Great refresher for any Linux enthusiast.

[Read More]

Using unit tests to identify and avoid memory leaks in Swift

Categories

Tags programming swiftlang tdd

John Sundell blog post about memory leaks in Swiflang. In it he discusses managing memory and avoiding leaks and how it is a crucial part of building any kind of program. According to author Swift makes this relatively easy in most situations – thanks to Automatic Reference Counting (or ARC for short).

Memory leaks in Swift are often the product of a retain cycle, when one object will hold a strong reference to an object that also strongly references the original object. So A retains B and B retains A.

He then guides you through setting up of unit tests to both help us identify memory leaks and also make it easier to avoid common mistakes that could end up causing leaks in the future.

For a purpose of common memory leaks sources, following patterns are mentioned:

  • Delegate pattern
  • Observer pattern
  • Closures – closure-based API

The usage of these in unit tests is explained in detail plus code examples. Even though tests like presented in the article won’t completely protect you against memory leaks, they can potentially reduce the amount of time you’ll have to spend hunting down the cause of memory related issues in the future. Good read!

[Read More]

Let's code a web server from scratch with NodeJS Streams!

Categories

Tags javascript programming nodejs servers

Ziad Saab tutorial exploring new technologies abound. In it you will go back to the basics and build a simple web server from scratch with NodeJS. You will review the structure of HTTP requests and responses and get an introduction to Node’s Stream API.

Author explores a simple HTTP server built in NodeJS. This server allows us to listen on an arbitrary port and provide a callback function that will be invoked on every incoming request.

Main points described in detail:

  • Dissecting HTTP
  • Receiving and parsing an HTTP request

By using some lower-level building blocks such as net, Stream, and Buffer, author was able to create a rudimentary HTTP server based on a TCP server and some parsing logic. In the process, you will learn a bit about how HTTP requests and responses work, as well as the basics of readable and writable streams and buffers.

Plenty of code examples. Good read!

[Read More]

How to use Decorators with Factory Functions

Categories

Tags javascript programming nodejs

Cristi Salcescu detailed post on Decorators. Method decorators are a tool for reusing common logic. They are complementary to Object Oriented Programming. Decorators encapsulate responsibility shared by different objects.

A function decorator is a higher-order function that takes one function as an argument and returns another function, and the returned function is a variation of the argument function.

The blog post then walks through some common use cases for Decorators:

  • Log duration
  • Authorization
  • compose() – apply multiple decorators the new composed decorator to the original function
  • Order, when execution order of decorators matter

Author then explains what are Factory Functions and how to decorate the Factory Function. He favors factory functions over classes for the flowing reasons:

  • Encapsulation. Members are private by default.
  • There are no issues with this losing context.
  • Objects have a better security. The internal state is encapsulated and the API is immutable.

Further resources to extend your knowledge with links to external resources are also provided. Good read for any JavaScript fun!

[Read More]

Building a simple Keras + deep learning REST API

Categories

Tags big-data data-science programming

Adrian Rosebrock tutorial in which he will present a simple method to take a Keras model and deploy it as a REST API. The examples covered in this post will serve as a template/starting point for building your own deep learning APIs.

The Keras library is an amazing tool that allows us to launch deep learning models with relative ease. This Python’s high-level package can be used on top of a GPU installation of either TensorFlow or Theano.

The post’s focus is on:

  • How to (and how not to) load a Keras model into memory so it can be efficiently used for inference
  • How to use the Flask web framework to create an endpoint for our API
  • How to make predictions using our model, JSON-ify them, and return the results to the client
  • How to call our Keras REST API using both cURL and Python

Detailed code is provided in the repository with explanation and charts. It is meant to be used as a template for your own Keras REST API. ßGood read!

[Read More]