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 ]

Option/Maybe, Either, and Future Monads in JavaScript, Python, Ruby, Swift, and Scala

Categories

Tags swiftlang programming javascript scala code-refactoring

The comparison done by Alexey Karasev focusing on Monads in different programming languages. It gives a brief explanation of monads and shows how to implement the most useful Monads in five different programming languages.

A monad is an abstract interface that defines “pure” and “flatMap” functions. Pure lets you convert an ordinary value to monadic value. FlatMap allows functions with ordinary arguments to be applied to monadic arguments.

Using these monads you will get rid of a series of bugs like null-pointer exceptions, unhandled exceptions, and race conditions. This is what the article covers:

  • An introduction into Category Theory
  • The definition of a Monad
  • Implementations of the Option (“Maybe”) monad, Either monad, and Future monad, plus a sample program leveraging them, in JavaScript, Python, Ruby, Swift, and Scala

Category theory is a mathematical field that was actively developed in the middle of the 20th century. Now it is the basis of many functional programming concepts including the monad. The article provides a quick look into some category theory concepts, tuned for software development terminology.

Further reading and detailed code examples for 5 languages included. Nice one!

[Read More]

Design patterns in Node.js: a practical guide

Categories

Tags nodejs javascript software-architecture code-refactoring

Fernando Doglio, Technical Manager @Globant, wrote this piece about design patterns in Node.js. Design patterns are part of the day to day of any software developer, whether they realize it or not.

In this article, he will look at how to identify these patterns out in the wild and look at how you can start using them in your own projects.

Design patterns, simply put, are a way for you to structure your solution’s code in a way that allows you to gain some kind of benefit. Such as faster development speed, code reusability, and so on.

Sections available in the article:

  • What are design patterns?
  • Immediately Invoked Function Expressions (IIFE)
  • Factory method pattern
  • Singleton pattern
  • Observer pattern
  • Chain of responsibility

Code examples and links to further reading also included. Hopefully, this article will shed some light on this subject and helps you improve your coding-foo faster than ever. Nice one!

[Read More]

Tool up your API integration testing with OpenAPI

Categories

Tags agile tdd apis web-development

Vinod Chandru, Chief Technical Officer and Co-Founder, Kloudless wrote this long post about integartiomn testing for your API. The modern web application is no longer a self-contained hub for the distribution of its own data. Uniformity in how APIs operate and what they return has become an increasingly important goal for engineers who build and maintain the APIs.

Unified APIs present other interesting possibilities. A unified API is essentially an abstraction layer that consolidates multiple third-party APIs into a single set of data models accessed through common API endpoints.

Article pays attention to:

  • What is the OpenAPI Spec?
  • Contract testing
  • Mock APIs
  • The future of testing with OpenAPI
  • Unified APIs

It’s clear the OpenAPI Specification is here to stay. The standardization of a way to describe RESTful APIs has proved to be of immense value to both those designing interfaces and those consuming them. Good guide!

[Read More]

Finding CRAN packages right from the R console

Categories

Tags programming big-data data-science

The article from Joachim Zuckarelli about working woth Rlang. Currently, there are more than 14,000 R package contributions on CRAN providing R with an unparalleled wealth of features. The downside of the large and increasing amount of packages is that it becomes increasingly difficult to find the right tools to tackle a specific problem.

The information is split into:

  • What is packagefinder? How does it benefit me?
  • Working with packagefinder: Search indices
  • Searching CRAN for packages
  • Discovering the latest packages
  • Getting details on packages

Despite that CRAN does not provide any good search functionality packagefinder is designed to search for CRAN packages right from the R console. Certainly helpful for anybody using R language for big data.

[Read More]

Lessons learned while writing a Haskell application

Categories

Tags programming software functional-programming akka scala

Gabriel Volpe in this article writes about his experience with Haskell. He introduced Haskell at his last job and wanted to put into practice all the stuff he learned: take the good, leave the bad.

Note: if you write Scala, many of the tips will also be useful for you.

The article covers:

  • Configuration
  • Production-ready effect: RIO (influenced by Michael Snoyman’s articles The ReaderT design pattern and The RIO Monad)
  • Polymorphic record of functions
  • Smart constructors
  • Parametric reasoning
  • Web server

… Web server is written using servant and it’s a pleasure to use. It also allows you to generate documentation from the API definition using swagger. Servant is a set of Haskell libraries for writing type-safe web applications but also deriving clients (in Haskell and other languages) or generating documentation for them, and more.

Parametric reasoning matters: ideally we should be able to tell what a function does by just looking at its type signature. Great read for anybody into functional programming or web development!

[Read More]

Java theory and practice: Explore new Java SE 11 and 12 APIs and language features

Categories

Tags java programming frameworks ibm

Mohamed Taman from IBM wrote this guide focusing on what is new in Java. New classes, security features, HTTP Client, and a no-compile code launch technique that every developer should know.

The article focuses on tracking the evolution from Java SE 9 to version 12. It is split into features that are visible to all developers (which are so useful, you’ll wonder how you coded without them) and everything else (the “under the hood” features).

New features visible to developers:

  • APIs and methods
  • Utility classes
  • Language features
  • Under the hood features
    • Nest-based access control
    • Flight Recorder
    • Transport Layer Security 1.3 (TLS)
    • Unicode 10
  • Deprecated modules and methods
  • What happened to JavaFX?

Starting with Java SE 11 and for the first time in Java history, you can execute a script containing Java code directly without compilation. The Java 11 source execution feature makes it possible to write scripts in Java and execute them directly from the command line.

Click for link to detailed list of methods and features. Good overview of new Java!

[Read More]

Things I learnt the hard way (in 30 years of software development)

Categories

Tags agile programming career how-to code-refactoring frameworks

This is a cynical, clinical collection of things Julio Biason learnt in 30 years working with software development.

“Without requirements or design, programming is the art of adding bugs to an empty text file.” – Louis Srygley

Sometimes, even an “elevator pitch” – up to two paragraphs that describe what the application does – is enough.

If you have no idea how to start, describe the flow of the application in high level, pure English/your language first. Then fill the spaces between comments with the code.

Very interesting list contains items like:

  • Spec first, then code
  • Write steps as comments
  • Gherkin is your friend to understand expectations
  • Unit tests are good, integration tests are better
  • Tests make better APIs
  • Make tests that you know how to run on the command line
  • Be ready to throw your code away
  • Future thinking is future trashing
  • Don’t use Booleans as parameters
  • Beware of interface changes
  • If you know how to handle the issue, handle it
  • Types say what you data is

… and much more.

When developers try to solve a problem, they sometimes try to find a way that will solve all the problems, including the ones that may appear in the future.

But here is the thing: The problems from the future will never come and you’ll end up either having to maintain a huge behemoth of code that will never be fully used or you’ll end up rewriting the whole thing ‘cause there is a shitton of unused stuff. Great advice!

[Read More]

Understanding fake Agile

Categories

Tags agile management miscellaneous how-to

Steve Denning is author of this article explaining what fake Agile is, how to identify it and how to deal with it. With the growing recognition that “Agile is eating the world,” surveys by Deloitte and McKinsey show that more than 90% of senior executives give high priority to becoming agile.

A particularly unfortunate form of “branded Agile” concerns scaling frameworks. These are schemes aimed at helping firms that have some teams implementing Agile practices and want to resolve the tension between the Agile teams and the back-office systems of the organization (such as strategy, planning, budget, HR, Finance) which are typically monolithic and bureaucratic.

The article covers:

  • Agile defined
  • The three laws of Agile
    • Law of the Customer
    • Law of the Small Team
    • Law of the Network
  • Agile without the label
  • Early-stage Agile
  • Agile in name only
  • Agile for software only
  • Stalled agile journeys

… and more patterns in the article. Really insightful!

[Read More]

Exploring container security: Encrypting Kubernetes secrets with Cloud KMS

Categories

Tags cloud servers google infosec

At Google Cloud, they care deeply about protecting your data. That’s why Google encrypts data at rest by default, including data in Google Kubernetes Engine (GKE). Guide focusing on containers security directly from Google.

In a default Kubernetes installation, Kubernetes secrets are stored in etcd in plaintext. In GKE, this is managed for you: GKE encrypts these secrets on disk, and monitors this data for insider access. But this might not be enough to protect those secrets from a potentially malicious insider, or a malicious application in your environment.

The article then describes how Using Cloud KMS can protect secrets in Kubernetes. Their approach provides flexibility in your security model, to meet specific requirements you may have:

  • Root of trust
  • Key rotation
  • Separation of duties
  • Centralized auditing
  • Example to get you started

Now encrypt those secrets! Very useful.

[Read More]

Getting started with OpenSSL: Cryptography basics

Categories

Tags infosec cloud servers

Good primer on the cryptography topic. Aimed at anybody in need of a primer on cryptography basics, especially regarding OpenSSL. By Marty Kalin.

OpenSSL is a production-grade library and toolkit popular on Linux and other systems. OpenSSL utilities are available at the command line, and programs can call functions from the OpenSSL libraries.

The article then provides:

  • A quick history of OpenSSL and OpenSSL
  • An HTTPS client program in C
  • The hidden security pieces in the client program
  • OpenSSL from the command line

The dominant layout standard for a digital certificate is X509, and a production-grade certificate is issued by a certificate authority (CA). To learn more follow link to the original article. Nice work!

[Read More]