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 ]

C# Delegates with IoC containers and Dependency Injection

Categories

Tags software-engineering architecture-and-apis

Developers are usually encouraged to do dependency injection with interfaces. Some developers don’t know that they can do dependency injection with delegates, and there are good reasons to do this. By Christian Findlay.

Moreover, developers can use delegates with modern IoC containers like ASP.NET Core’s IoC container, mock delegates, and verify calls. It is good practice and should be encouraged. Let’s have a look at why.

Firstly, let’s focus on the interface segregation principle. It’s one of the SOLID principles. It essentially means that you should minimize the number of members on an interface. It sometimes leads to an interesting situation where interfaces end up with only one method.

The article then dives into:

  • Why use Delegates instead of Interfaces?
  • Dependency Injection with Delegates
  • Mocking Delegates with Moq
  • Delegates with IoC Containers
  • What if the delegate code needs extra dependencies?
  • Drawbacks Of Delegates

At their heart, IoC containers are collections keyed by type. We normally key the collection by interface types, but delegates are also types, and we can key the collection with delegates instead of interfaces.

All source code for this article can be found in GitHub repository. But, be careful of scenarios with generic types. You shouldn’t alter the fundamental design of your code to fit delegates. Rather delegates should be a compliment to your existing code design. Nice one!

[Read More]

MVVM Architecture -- Android tutorial for beginners, step by step guide

Categories

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

Amit Shekhar put together this interesting tutorial in which you are going to learn about the MVVM architecture in Android and then you will build a project with MVVM architecture. MVVM architecture is a Model-View-ViewModel architecture that removes the tight coupling between each component.

MVVM architecture

Source: https://blog.mindorks.com

The tutorial covers the following topics:

  • What is MVVM architecture?
  • Set up a new project with Kotlin and other dependencies required.
  • Project Structure.
  • Set up the utils package.
  • Set up the data layer.
  • Set up UI layer, build and run the project.
  • Project Source Code and What Next?

Importantly, in MVVM architecture, the children don’t have the direct reference to the parent, they only have the reference by observables. The author will walk you through explanation based on a new project written in Kotlin. You will also get project code in GitHub repository so you can follow tutorial. Good read!

[Read More]

WEF will now read you your (blockchain) rights

Categories

Tags business-and-emerging-tech

The World Economic Forum finalized a “blockchain bill of rights.” ConsenSys, Andreessen Horowitz, and Colombia have already signed on. By Jeff Benson. The World Economic Forum is an international organization committed to creating public-private partnerships. Its Global Blockchain Council has been developing this voluntary framework since it first convened in 2019.

“This highly opinionated group came together and agreed that the blockchain community needed the foundational principles we are presenting today,” said Sheila Warren, WEF’s head of blockchain and data policy. “Agreement from across Council members, despite their divergent perspectives, indicates the critical need for a values-based document like this in order to ensure that the technology remains true to its roots as the application layer starts to scale.”

The article describes following:

  • The WEF’s Global Blockchain Council developed a voluntary framework for protecting blockchain users
  • Fifteen institutional signatories have signed the Presidio Principles, including governments, international aid groups, and blockchain-based businesses
  • The next step is to create guidelines for translating the principles into action

The group placed a draft version on GitHub for public comment from April 10 through May 5 before releasing the finalized document on May 22, 2020. The next step is to issue guidelines for different industries on how to incorporate the principles. Good news!

[Read More]

Healthcare analytics platform reference architecture

Categories

Tags cloud-and-infrastructure architecture-and-apis security-and-privacy devops-and-ci-cd

This document explains the architecture of the healthcare analytics platform—a set of tools on Google Cloud that helps you process clinical and operational healthcare data—to researchers, data scientists, IT teams, and business analysts. By cloud.google.com.

Healthcare organizations often exist in a siloed data world that includes multiple systems, data types, and modalities. You can modernize your infrastructure by moving healthcare data from multiple on-premises sources into an analytics platform on Google Cloud, which lets you harmonize data, monitor data pipelines, run analytics, and create visualizations for provider insights and data-driven decision-making.

This document is the first part of a series about building and deploying your healthcare analytics platform on Google Cloud:

  • Architecture: HIPAA-aligned Cloud Healthcare
  • Ingesting clinical and operational data with Cloud Data Fusion
  • Transforming and harmonizing healthcare data for BigQuery
  • Storing healthcare data in BigQuery
  • Analyzing FHIR data in BigQuery
  • Tracking provenance and lineage metadata for healthcare data
  • Managing healthcare data access in BigQuery

Highly informative reference Google. Please bookmark for later reference!

[Read More]

Pymp, OpenMP-like Python programming

Categories

Tags backend-development product-and-design software-engineering

Ever since Python was created, users have been looking for ways to achieve multiprocessing with threads, which the Python global interpreter lock (GIL) prevents.By Jeff Layton.

One common approach to getting around the GIL is to run computationally intensive code outside of Python with tools such as Cython and ctypes. You can even use F2PY with compiled C functions.

All of the previously mentioned tools “bypass” Python and rely on a compiled language to provide threaded multiprocessing elements with an interface to Python. What is really needed is either a way to perform threaded processing or a form of multiprocessing in Python itself. A very interesting tool for this purpose is Pymp, a Python-based method of providing OpenMP-like functionality.

OpenMP programming model

OpenMP employs a few principles in its programming model. The first is that everything takes place in threads. The second is the fork-join model, which comprises parallel regions in which one or more threads can be used (Figure 1).

Because the goal of Pymp is to bring OpenMP-like functionality to Python, Pymp and Python should naturally share some concepts. A single master thread forks into multiple threads, sharing data and then synchronizing (joining) and destroying the threads. Read the rest to learn more about parallelism in Python.

[Read More]

Lottie for Android primer

Categories

Tags frontend-and-mobile product-and-design

Visual design is quite important for an app. The quality of apps has been steadily increased over the years, and the aesthetic part is the area with the biggest improvement in my opinion. By Bevan Steele.

Lottie is a multi-platform open-source library, initially made by Airbnb, for quickly and easily showing smooth animations. These animations are made in Adobe After Effects and they are vector-based (i.e. they can scale without pixelating). But you don’t need to worry about this and you don’t need to make them because there are plenty of such short and cute animations all over the internet (e.g. LordIcons, LottieFiles).

Lottie - library for Android, iOS, Web, and Windows that parses Adobe After Effects animations

Source: https://www.rockandnull.com/lottie-android/

The actual animation is a JSON file that describes the path, color, etc. After acquiring that file, you would need to place it in the Assets directory of your Android project. This is a different directory from your Resources directory where drawables are placed. You would probably need to create it, by right-clicking in the Project Explorer in Android Studio, New -> Folder -> Assets Folder. Place your JSON file in the /app/assets/ folder that has been created.

To get the rest of instructions please read article in full. Cute!

[Read More]

How to exclude URL query parameters in Google Analytics

Categories

Tags cloud-and-infrastructure data-and-analytics miscellaneous business-and-emerging-tech

Query parameters can sometimes store useful pieces of information in our URLs, but they can cause problems in our Google Analytics data. Query parameters can break apart our pages and make them hard to analyze in our All Pages report. By Amanda Geisler.

An important note before we get started: Personally Identifiable Information (PII) can not be removed with View Settings or filters. Data is collected at the property level, so the View Settings and filters do not stop the data from being collected and violates Google’s Terms of Service.

Query parameter removal with App + Web is a bit different because of the automatic pageview tracking. If you need to remove parameters from your page paths, you can use the page_location field in your Configuration tag in GTM.

– Amanda Geislerr

The article then discusses the following:

  • View settings
  • Filters
  • Remove queries with Google Tag Manager
  • App + Web properties from Google Analytics
  • Better reporting on page performance

There are multiple ways to tackle query parameters in your URLs depending on your set up and implementation. If your queries do contain valuable information about your users or content, you may choose to store them as custom dimensions. Stripping query parameters from page paths can streamline reporting and help to mitigate (other) in your content reports. Nice one!

[Read More]

Change data capture with Debezium: A simple how-to

Categories

Tags architecture-and-apis data-and-analytics

Eric Deandrea wrote this piece about one question that always comes up as organizations moving towards being cloud-native, twelve-factor, and stateless: How do you get an organization’s data to these new applications?

There are many different patterns out there, but one pattern we will look in this artticle is change data capture. This post is a simple how-to on how to build out a change data capture solution using Debezium within an OpenShift environment. Future posts will also add to this and add additional capabilities.

Change data capture (CDC) is a pattern that enables database changes to be monitored and propagated to downstream systems. It is an effective way of enabling reliable microservices integration and solving typical challenges, such as gradually extracting microservices from existing monoliths.

– Sadhana Nandakumar

The article main chapters:

  • What is change data capture?
  • What is Debezium?
  • Application overview
  • Setting up the database
  • Create an OpenShift project
  • Create the MySQL configuration
  • Starting the application
  • Deploy AMQ Streams
  • Deploy Kafka Connect

… and more. This step by step detailed tutorial and if you want to automate the provisioning of everything, feel free to take a look at an Ansible Playbook that is capable of doing this. Excellent read!

[Read More]

Convolutional neural network implementation for car classification

Categories

Tags data-and-analytics cloud-and-infrastructure leadership-and-career

Convolutional Neural Networks (CNN) are state-of-the-art Neural Network architectures that are primarily used for computer vision tasks. CNN can be applied to a number of different tasks, such as image recognition, object localization, and change detection. By Dr. Evan Eames and Henning Kropp.

This article captures interesting challenge: Develop a Computer Vision application which could identify the car model in a given image. Considering that different car models can appear quite similar and any car can look very different depending on their surroundings and the angle at which they are photographed, such a task was, until quite recently, simply impossible.

The article is split into:

  • Setting up an Artificial Neural Network to Classify Images
  • Image Augmentation with Koalas
  • Coding a ResNet in Keras
  • Tracking Results with MLflow and Azure Machine Learning
  • Getting Started with CNN Image Classification

This article and notebooks demonstrate the main techniques used in setting up an end-to-end workflow training and deploying a Neural Network in production on Azure. The exercises of the linked notebook will walk you through the required steps of creating this inside your own Azure Databricks environment using tools like Keras, Databricks Koalas, MLflow, and Azure ML. Superb!

[Read More]

Under the hood of the Angular Compatability Compiler(ngcc)

Categories

Tags frontend-and-mobile backend-development

In this artice, we will explore how angular makes non Ivy libraries compatible with Ivy libraries using its compatability compiler ngcc. By Ajit Singh.

Angular compiles the code in the latest version(v9) but, not all code is compiled at the same time. There are libraries, npm modules, dependencies are precompiled and these may not work well with the way ngtsc compiles Angular code. This may cause failures at runtime, compile-time, etc. Fortunately, the Angular has already solved these problems for us using the Angular compatibility compiler ngcc.

One of the first problems that we face while transpiling non-Ivy code into Ivy compiled code is that we now have no decorator info in our files. To solve it ngcc uses the .metadata.json files in the Angular Package Format. These files contain information that was present in the Typescript source but was removed during transpilation to Javascript, and this information is sufficient to generate a patched JavaScript files which add the Ivy static properties to decorated classes.

The article is split into these detailed sections:

  • What is ngcc?
  • How ngcc works?
    • Metadata files from Angular Package Format
    • Overall ngcc architecture

Follow the link to original article to get the full overview. Well done!

[Read More]