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 ]

Interview: Haskell in production @Channable

Categories

Tags software-engineering product-and-design

Interview with Fabian Thorand @Channable. They use Haskell for a variety of backend services. The biggest one by far is their data processing system, which powers the import from our customers, manages the data storage, and applies the user-defined rules to the data before streaming it to other components in our backend which handle the actual connections to the third-party platforms. By Liam Mooney.

Haskell was first introduced as an experiment rewriting a component that was hitting the limits of what was possible in Python and the existing architecture (the full story is on our tech blog).

The main selling point is Haskell’s strong type system. It eliminates many types of runtime errors that we regularly see crop up in our Python code base (though it has gotten better since we use types in Python as well – via mypy). Additionally, it makes refactoring existing code a breeze: one can be sure that almost all required changes are caught by the compiler.

One big downside of Haskell that is noticeable in the daily development workflow is the lack of tooling. Fortunately, at least the “IDE” side of it improved quite a bit with the haskell-language-server project, which was a game-changer in terms of development convenience.

An underappreciated advantage of Haskell is also its great runtime system. It makes it very easy to add both concurrency and parallelism to your programs using lightweight threads. Something that is usually a lot harder to do in other programming languages if you didn’t design for it from the start. Good read!

[Read More]

Understanding the stack and heap in C#

Categories

Tags software-engineering product-and-design

Based on my reading, “the stack” and “the heap” are clearly important concepts for understanding how memory is managed in C# programs, however until recently I had only a superficial understanding of them and their role. By Liam Mooney.

This is a basic class with two fields that are being initialised by a constructor

Source: https://endjin.com/blog/2022/07/understanding-the-stack-and-heap-in-csharp-dotnet.html

The article makes a good job explaining:

  • What is “the stack”?
  • What is “the heap”?
  • Thinking about variables and program memory
  • Value types vs reference types
  • So where do C# variables get stored?
  • There are exceptions

The defining property of stacks is that they’re last-in, first-out, meaning the last item added to the stack is the first item to be removed. In other words, to place a new item onto a stack it has to go on the top, and only the item currently at the top can be removed, therefore if you wanted to remove an item from the middle of a stack, say, the third item down from the top, you would first have to remove the top two items.

Excellent read with plenty of code examples and charts helping you to understand the concepts better!

[Read More]

Pair programming approach for engaging girls in the computing classroom: Study results

Categories

Tags miscellaneous software-engineering leadership-and-career

Authors share the second report in our series of findings from the Gender Balance in Computing research programme, which they’ve been running as part of the National Centre for Computing Education and with various partners. By Katharine Childs.

In this research programme, funded by the Department for Education in England, we aim to identify ways to encourage more female learners to engage with Computing and choose to study it further.

The study main points are:

  • Computing education through a collaborative lens
  • Researching collaborative learning in the primary computing classroom
  • What can we learn about pair programming from the study?
  • Find out more about pair programming
  • Collaboration in our research

The evaluators also gathered qualitative data by running teacher and learner interviews and conducting lesson observations, and they were pleased that this data provided some rich insights into the benefits of using a pair programming approach in the primary classroom, and gave some promising indications of possible benefits for female learners in particular. Good read!

[Read More]

Lessons from writing a compiler

Categories

Tags miscellaneous software-engineering product-and-design data-and-analytics

The standard academic literature is most useful for the extreme frontend (parsing) and the extreme backend (SSA, instruction selection and code generation), but the middle-end is ignored. This is fine if you want to learn how to build, e.g., the next LLVM: a fat backend with a very thin frontend. By Fernando Borretti.

Imagine a compiler as a 2D grid. The rows are the stages of compilation: from parsing, through the middleend, to the backend. The columns are the different facets of the programming language being implemented. For a smaller language like C, the different facets are: global variable declarations, enum declarations, type declarations, function declarations, and nothing else. More featureful languages add extra facets: interface and class definitions in C++, trait and impl definition in Rust, etc.

This article contains some of the lessons I learned writing the compiler for Austral, a new systems programming language with linear types that I’ve been working on for a while. The first few sections are high-level, the rest most specific to using OCaml to write a compiler.

The article then dives into:

  • Implementation strategies
  • Just use OCaml
  • Just use Menhir
  • What tests are useful
  • Compilation model
  • Code organization
  • Bootstrapping issues
  • The environment
  • Identifying declarations
  • Errors
  • Remarks

There are, broadly, two ways to implement a compiler. In the waterfall strategy, each stage is implemented one after the other: the complete parser, then the complete semantic analysis pass, then the complete type checking pass, and on to the backend stages. Excellent read!

[Read More]

Working with a JSONB array of objects in PostgreSQL

Categories

Tags backend-development data-and-analytics product-and-design

Get, add and remove JSON objects from an array. By Rob Tomlin.

CREATE INDEX idx_purchases_name
 ON public.purchases
 ((items_purchased ->> 'name'));

In this article, author will work with a jsonb column containing an array of objects and explore how to:

  • Get all objects in the array
  • Get a specific object from the array by position in the array. When the position is known and when we have to discover it
  • Add a json object to the array
  • Remove a specific object from the array
  • Indexing including indexing a key in the JSONB column

PostgreSQL has many functions and operators for JSON data. Links to further reading also provided in the article. Nice one!

[Read More]

6 best practices to improve Node.js security

Categories

Tags security-and-privacy product-and-design frontend-and-mobile backend-development

Today, Node.js is widely used in web and mobile applications, for it fills the gap between front-end and back-end applications. Unfortunately, increased usage of Node.js has opened new doors for attackers to exploit misconfigurations and vulnerabilities. By Lahiru Hewawasam.

The article main content is split into:

  • Validate user inputs
  • Using a reverse proxy to add a layer of security
  • Managing application secrets
  • Using HTTP response headers
  • Server-side logging and monitoring
  • Using security linters that capture vulnerabilities in code

Code linters help developers identify various issues in the code before compiling. They can detect the most common issues and force developers to follow best practices.Good read!

[Read More]

How to abort API requests in JavaScript

Categories

Tags product-and-design frontend-and-mobile backend-development

Did you know that you can abort an API request in JavaScript? By aborting, I mean canceling a request before it is completed (before you get a response or before the request gets to the server). By Dillion Megida.

There are many reasons why you may want to do this. One of them is to prevent a request from being sent to the server if the user has already navigated away from the page the request was made.

The article the focuses on:

  • The AbortController interface
  • Aborting API requests in fetch
  • Aborting API requests in axios

Even for new methods of making API requests, by accepting a signal property in their request options object, you can abort requests using the abort() method. Good read!

[Read More]

Separate stateful infrastructure with Serverless Compose

Categories

Tags product-and-design architecture-and-apis frontend-and-mobile leadership-and-career devops-and-ci-cd

One of the most significant benefits of serverless is that the development teams can fully own and manage all of their infrastructure themself. Keeping all of that infrastructure in the same CloudFormation stack can sometimes be troublesome however, and there are many reasons why you might consider having parts of it in a separate stack. By Sebastian Bille.

services:
  infrastructure:
    path: infrastructure

  application:
    path: application

A common approach is to keep stateful infrastructure, such as your DynamoDB tables or S3 buckets, in one stack, and stateless infrastructure, such as your Lambda functions or API gateways, in another.

This post will show you how you can use Serverless Compose to easily separate your stateful infrastructure into a separate stack and deploy it without the hassle! Serverless Compose is a feature of the Serverless Framework that simplifies orchestration and configuration when you have multiple related CloudFormation stacks. Apart from providing a simple configuration format for orchestrating and defining the services and their respective dependencies, it also provides CLI tooling to interact with those services once deployed, for example to stream the logs of those services directly to your stdout at the same time. Good read!

[Read More]

Guide to Reinforcement Learning with Python and TensorFlow

Categories

Tags leadership-and-career data-and-analytics backend-development

In reinforcement learning, self-learning agent learns how to interact with the environment and solve a problem within it. In this article, we present complete guide to reinforcemen learning and one type of it Q-Learning (which with the help of deep learning become Deep Q-Learning). We learn about the inspiration behind this type of learning and implement it with Python, TensorFlow and TensorFlow Agents. By Nikola M. Zivkovic.

In supervised learning, an agent learns how to map certain inputs to some output. The agent learns how to do that because during the learning process it is provided with training inputs and labeled expected outputs for those inputs. Using this approach we are able to solve many types of problems, mostly the ones which are classification and regression problems in nature. This is an important type of learning and it is mostly used commercial approach today.

Here are the topics that author covers in this article:

  • Introduction to Reinforcement Learning
  • Q-Learning Intuition
  • Q-Learning implementation with Python
  • Deep-Q Learning Intuition
  • Deep-Q Learning implementation with TensorFlow

In this article we explored Deep Q-Learning. This is the first type of reinforcement learning that utilize neural networks. Plenty of code examples in Python in the article. Good read!

[Read More]

5 tips for managing high-performing teams (remotely!)

Categories

Tags leadership-and-career

Today’s workplace is more digitized than ever before – especially in tech. Work-from-home adjustments and nearshore outsourcing has surged in the last two years, requiring the modern manager to adapt quickly. By Steve Taplin.

Working remotely hasn’t changed the core of good management practice but has inspired reevaluating priorities and updating traditional methods. These 5 top tips will help you navigate this new digital workspace with grace and poise:

  • Focus on the destination
  • Preserve the workday
  • Keep it personal (within reason)
  • Follow up consistently
  • Build a culture of innovation

Modern hybrid workspaces and digital offices offer opportunities never before seen in business. With skill, the right team can deliver exceptional project results from traditional offices, homes and nearshore without compromising the standard workday. Good read!

[Read More]