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 ]

Kotlin: An illustrated guide to conditionals When and If

Categories

Tags kotlin android app-development programming career

In real life, we do different things depending on the circumstances. For example, if it’s raining outside, I’ll probably grab an umbrella. If it’s sunny outside, I’ll grab my sunglasses. I do different things depending on the weather. By Dave Leeds.

In this chapter, you will learn all about conditionals in Kotlin, which will allow us to change the way the code runs depending on circumstances! This is chapter 3 of animated tutorial series helping you to learn Kotlin programming language.

We can write Kotlin code that will tell us which of these three things Goldilocks will say, based on the temperature of the porridge. In programming terms, the three different cases above – that is, the three different rows of the table – are called branches. If it helps, you can visualize the branches like you’d see on a tree …

It is an excellent educational material for young learners or beginners to coding with great illustrations and excellent code explanations teaching the basics of programming. The chapter teaches conditionals around the fairy tale of Goldilocks and the Three Bears with mappings, code examples and visualisations. Recommended!

[Read More]

How to refactor code that has no tests using the Golden Master technique

Categories

Tags code-refactoring software-architecture web-development

The number one rule when refactoring is to always have tests in place before you start refactoring. Without tests, refactoring becomes a risky endeavor. Written by Mak.

Code that doesn’t have tests is often not designed to be testable. In order to make the code testable, you have to refactor it. See how this seems like an impossible task? The Golden Master test paves the way for being able to safely begin refactoring.

The Golden Master is a saved copy of the output a program generates.

The article reads about:

  • What is a Golden Master?
  • The untested code
  • Hardcode the input
  • Capture the output
  • Add the output as a variable in the test class

Plenty of code examples written in C# with good explanation for each example. Sweet!

[Read More]

How to build stateful, cloud-native services with Akka and Kubernetes

Categories

Tags akka programming scala containers

In this white paper by Jonas Bonér, CTO and co-founder of Lightbend, Inc you will learn few tips for running your stateful services as if they are stateless. The next frontier of competitive advantage is the speed with which you can extract value from data.

Speed counts: managing a firehose of never-ending data streams requires Reactive, data-driven services that can operate in near-real-time. This forces us to shift from a traditional stateless approach to data where a database somewhere is constantly being hit with requests each time information is needed to a stateful data-driven approach, where data is owned and accessed locally, with low latency and high-availability.

This long article then deals with:

  • The rise of containers
  • Managing containers at scale
  • Towards a holistic view on system design
  • The unfortunate trend of stateless protocols in cloud-native apps
  • Finding success with data-driven stateful services
  • The challenges of orchestrating stateful services

… and much more. Akka lets you run stateful services on Kubernetes as if they are stateless. No fuzz, no StatefulSets, no Operators, no messing around with remotely mounted disks, just using the infrastructure and guarantees that Kubernetes gives stateless services.

Apart from white paper in PDF form you will also get links to further resources and reading. Very informative article!

[Read More]

Word search Kata in F#

Categories

Tags functional-programming programming how-to

An article by Paweł Zelmański about his journey with a first bigger kata programmed in F#. The term ‘Kata’ means a structured way of doing things or practice. It has its roots in Japanese martial arts where learners spend much of their time practicing drills to improve specific moves.

The whole exercise took author about 20 hours, distributed over about two weeks. Repository with code can be found on the GitHub.

The article then describes the steps of his journey while learning F# language:

  • About Kata
  • Example test cases provided by Kata
  • Overview of the solution – Interpreter, Specification, Tests
  • Types
  • Domain driven design
    • Wrapping simple types into domain types
    • Creating complex types
  • Test driven development
    • Using TDD to incrementally build the application
  • Surprises of F# from C# point of view

… and more. We liked: F# heavily depends on pipe operator |>. This operator passes a value from a previous function or variable into another function. This is in depth article which will be very useful to anybody learning F#. With opr without the previous coding experience. Nice one!

[Read More]

Agile and Intelligent Locomotion via Deep Reinforcement Learning

Categories

Tags machine-learning app-development big-data data-science

Recent advancements in deep reinforcement learning (deep RL) has enabled legged robots to learn many agile skills through automated environment interactions. In the past few years, researchers have greatly improved sample efficiency by using off-policy data, imitating animal behaviors, or performing meta learning. Posted by Yuxiang Yang and Deepali Jain, AI Residents, Robotics at Google.

However, sample efficiency remains a bottleneck for most deep reinforcement learning algorithms, especially in the legged locomotion domain.

The authors present two projects that aim to address the above problems and help close the perception-actuation loop for legged robots.

Reinforcement learning poses a promising future for robotics by automating the controller design process. With model-based RL, we enabled efficient learning of generalizable locomotion behaviors directly on the real robot. With hierarchical RL, the robot learned to coordinate policies at different levels to achieve more complex tasks. In the future, we plan to bring perception into the loop, so that robots can operate truly autonomously in the real world.

Follow the link to full article to learn more. Very exciting!

[Read More]

10000 nodes and beyond with Akka Cluster and Rapid

Categories

Tags scala java programming akka devops performance software-architecture

At the foundation of clustered systems are so-called membership protocols. The job of a membership protocol is to keep clustered applications up-to-date with the list of nodes that are part of the cluster, allowing all the individual nodes to act as one system. By Manuel Bernhardt.

One of the motivations for Rapid was to be faster at scale than existing consensus protocols. The Rapid paper shows that Rapid can form a 2000 node cluster 2-5.8 times faster than Memberlist (Hashicor’s Lifeguard implementation) and Zookeeper. One of the problems with membership services that rely entirely on random gossip is that random gossip leads to higher tail latencies for convergence.

Rapid is designed around the central idea that a scalable membership service needs to have high confidence in failures before acting on them and that membership change decisions affecting multiple nodes should be grouped as opposed to happen on a per-case basis. Dissemination of membership information in Rapid happens via broadcast.

The article then guides you through:

  • The Rapid membership service
  • Dissemination
  • Consensus
  • Failure detection
  • Joining the cluster
  • What Rapid brings to the table

Another one of the big contrasts that in author’s opinion sets Rapid ahead of other membership protocols is the strong stability provided by the multi-node cut detector. A flaky node can be quite problematic in protocols where the failure detection mechanism doesn’t provide this type of confidence. Super interesting read!

[Read More]

Angular platforms in depth. Rendering Angular applications in terminal

Categories

Tags angular nodejs javascript web-development

The Angular framework was designed with flexibility in mind. That approach allows Angular applications to be executed across different environments — browser, server, web-worker, and even mobile devices are possible. Written by Nikita Poltoratsky, a Solution Architect at Akveo, open-source contributor and tech author.

In this series of articles, author reveals to you how does it even possible – execute Angular applications across different environments. Also, we will learn how to build custom Angular platform which renders applications inside the system’s terminal using ASCII graphics.

The article is split into these parts:

  • Renderer
  • Sanitizer
  • Error handling
  • Terminal module
  • Platform terminal
  • Building terminal application

You will get a custom platform creation process overview and learn about crucial Angular services and modules. Finally, you will build custom platform which renders Angular applications inside the system’s terminal using ASCII graphics!

And also yoou will get access to the repository with all the source files related to the Terminal platform.. Nice one!

[Read More]

Utilising hashes in Hiera to reduce code complexity

Categories

Tags devops cloud cicd web-development

Darren Gipson wrote this piece about their effort to standardize the Puppet code design. They have moved as much of the data layer as possible to Hiera. Hiera is a built-in key-value configuration data lookup system, used for separating data from Puppet code.

Moving the data layer to Hiera means that we only have to understand a simple yaml file when building a new environment. This allows for great code reuse and helps explain to others not familiar with our Puppet code where the settings are.

Hiera was the clear solution for their problem because it provides you with an entry point to store data that you can then read with Puppet code.

The article discusses:

  • Business problem – migration to cloud-based services,
  • Solution
  • Complex examples

Using hashes in Hiera in certain way allows your Puppet code to be very data-driven, preventing the need to write the same code twice and providing flexibility for different configurations across environments. For details and code example follow the link to full article. Very good!

[Read More]

What's in a name?

Categories

Tags web-development ux software css frontend

Often when we talk about accessibility problems, we end up talking about a number of different errors that all boil down to a missing accessible name: form fields without labels, images without alts, icon buttons without readable text, and many more. Written by Sarah Higley.

A missing or incorrect accessible name in some form or other is right up there with poor color contrast in the list of most common accessibility errors across the web.

More recently, a greater awareness of accessibility and an increase in the use of ARIA attributes has resulted in a sort of reverse naming problem, where elements that cannot or should not be named get artificial names through ARIA. While an improperly added name is a step up from a missing one, it will often give the illusion of accessibility while masking an underlying problem that remains unaddressed.

Here’s a non-comprehensive list of terms and concepts that all boil down to talking about names:

  • labels, the element, and associating labels with form fields
  • table captions
  • image alt text
  • the element
  • an SVG element
  • aria-label and aria-labelledby

Not every element can support an accessible name, and even among those that can, not every one should. To learn about few general categories of elements that should always be named read the article in full. Excellent!

[Read More]

How open-source medicine could prepare us for the next pandemic

Categories

Tags miscellaneous cio agile cloud data-science

The old drug discovery system was built to benefit shareholders, not patients. But a new, Linux-like platform could transform the way medicine is developed—and energize the race against COVID-19. By Ruth Reader, writer for Fast Company.

The response to COVID-19 has been more open-source than any drug effort in modern memory. On January 11, less than two weeks after the virus was reported to the World Health Organization, Chinese researchers published a draft of the virus’s genetic sequence. The information enabled scientists across the globe to begin developing tests, treatments, and vaccines. Pharmaceutical companies searched their archives for drugs that might be repurposed as treatments for COVID-19 and formed consortiums to combine resources and expedite the process. These efforts have yielded some 90 vaccine candidates, seven of which are in Phase I trials and three of which are advancing to Phase II. There are nearly 1,000 clinical trials listed with the Centers for Disease Control and Prevention related to COVID-19.

In recent history, pharmaceutical companies have failed to deliver treatments for devastating illnesses because they cannot easily profit from them. While they may investigate diseases for which there is no treatment or cure and even find compelling insights, they won’t necessarily turn those findings into medicine.

A human rights lawyer named Jaykumar Menon is now building out a platform where scientists and researchers can freely access technological tools for researching disease, share their discoveries, launch investigations into molecules or potential drugs, and find entities to turn that research into medicine. If the platform succeeds, it would allow drugs to succeed on their merit and need, rather than their ability to be profitable.

Super interesting reading. Highly recommended!

[Read More]