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 ]

Extending SQLite with Rust to support Excel files as virtual tables

Categories

Tags performance app-development programming functional-programming

This article explains how SQLite can be extended with Rust. In particular, it will outline SQLite’s mechanism called virtual tables and showcase how we can use it from Rust programming language. By Sergey Khabibullin.

We will be dealing with some amount of unsafe Rust code. There are frameworks that can be used to abstract away some unsafe code, but we’ll not use them because rust-bindgen will take care of generating the bindings for us, and we will only use unsafe in the relatively thin layer of code that connects SQLite and Rust.

The article main points are:

  • Objectives
  • Project structure
  • Entry point and modules
  • Virtual table
  • Cursor

Needless to say, this article is not a complete guide on extending SQLite. I tried to cover parts that appeared essential and interesting. It’s always a trade-off when you write technical articles: you want to cover more and in more detail but you have to set some boundaries otherwise the article will be infinite in size and complexity. Good read!

[Read More]

Can SVG symbols affect web performance?

Categories

Tags frontend web-development app-development javascript css

SVG Symbol is an unvisited technique for reusing inlined SVGs elements. They seem redundant while using popular component-based frameworks/libraries like React, Vue, Svelte, hence you don’t see it a lot on the web. By @Bart.

The whole idea builds around declaring your SVG element ONCE (per page), and reusing it as many times as you want without losing any performance. Every website has some kind of SVGs, some of them are most likely inlined (to prevent flicking) and some are not. But the point is, you will find a lot of occurrences that are repeatable, once, twice, three times, or even one hundred times.

When it comes to repeatable SVGs, most people would create a component and reuse it anywhere they want. It is a valid solution. But there’s a high chance, that you would be missing some performance freebies. If you’re striving for that bang-for-the-buck kind of performance, this article might be interesting for you.

The more fancy looking, the more complex your SVG is. And so, it increases the size of your HTML document and the number of elements the browser will have to parse and put in DOM. What we can observe is the fact that the bigger the document, the more benefits we get from using symbols. In this case, we improved our FCP score by approximately 60ms. Interesting read!

[Read More]

Handling errors encountered when using Firebase email and password authentication (Kotlin)

Categories

Tags web-development app-development infosec kotlin

Firebase is a solution to enable developers to focus more on building the applications without the need of worrying about managing the backend. Features like user authentication, database, file storage, notifications, and more can be handled by Firebase. By Atanda Oluchi Aminat.

In this post, we’ll focus on learning how to implement user authentication using Firebase Email and the password sign-in method in Kotlin. In addition to that, we’ll take a look at some potential errors developers encounter during this process and how to resolve them.

The article then explains following steps:

  • Creating an Android project
  • Create a Firebase project
  • Adding user authentication screens to app

In the article we’ve learned some of the features that Firebase has to offer. We dived deep into user authentication using email and password. We also learnt how to handle or prevent some major errors while doing this process. Good read!

[Read More]

Using design patterns in JavaScript - Ultimate guide

Categories

Tags programming web-development app-development javascript

Design patterns are reusable, advanced, object-oriented solutions that we can use to address similar instances of everyday problems in software design. They are like blueprints for solving certain kinds of problems. By Nishani Dissanayake.

This article will discuss the benefits of using design patterns and introduce some of the most-used design patterns in JavaScript:

  • Benefits of using design patterns
  • Design patterns in JavaScript
  • Constructor pattern
  • Factory pattern
  • Module pattern
  • Singleton pattern
  • Prototype pattern

Although these design patterns help developers in many ways, we must only use them after going through the specs of an applications and making sure the design pattern suits those. Good read!

[Read More]

Spinning with Swift

Categories

Tags swiftlang programming web-development app-development javascript

Swift is a great language for creating Spin applications. This tutorial walks through the process of installing SwiftWasm, building a simple Wagi app, and then running it in Spin. Spin is a framework for building and running event-driven microservice applications with WebAssembly (Wasm) components. With Spin, we’re trying to make it easier to get started with using WebAssembly on the server so that we can all take advantage of the security, portability, and speed WebAssembly provides when it comes to running microservices. By Matt Butcher.

The article then describes in some detail:

  • Setting up Swift for WebAssembly
  • Creating a new Swift program
  • The getEnvVar function
  • The top-level code
  • Running the code
  • The getName function
  • Calling our functions
  • Compiling and running our code

… and more. Thanks to the hard work of the SwiftWasm community, Swift is turning out to be an excellent language for WebAssembly development. In this article, we’ve created a simple Spin application in Swift, compiled it to WebAssembly with WASI, and then executed it as a Swift Wagi application. Nice one!

[Read More]

Fewer working hours, more productivity

Categories

Tags miscellaneous performance app-development software

It seems like a counterintuitive question: how can employees get more done in less time? Surely, if we want employees to be productive, we need to give them more time to work, not less? But recent studies have shown that shorter working hours can lead to increased productivity. By @quire.io.

In one study, Microsoft found that when they reduced their employees’ working week from five days to four, they saw a 40% increase in productivity.

The article then focuses on the following:

  • Why working fewer hours makes employees more productive
  • The UK trialing a 4-day work week
  • How to be more productive with fewer working hours
  • Tips to help employees successfully work fewer hours and be more productive
  • Fewer working hours, more productive

… and more. When you take a break, it gives your mind a chance to rest and rejuvenate. This can help you come back to your work with fresh energy and new ideas. Try to take a break at least once every hour, even if it’s just for a few minutes. Get up and stretch, take a walk, or grab a quick snack. Good read!

[Read More]

How I use stories to share data at meetings

Categories

Tags miscellaneous cio agile data-science management

Want to keep people awake at data presentations? Try sharing your findings backwards. You’ve worked it. Now put your chart down, flip it and reverse it. By Ryan Estrellado.

The article main sections:

  • Sequence well or risk slumber
  • The analysis: Start with the data points
  • Look at all the data points
  • Note interesting details
  • Categorize details into interesting themes
  • The presentation: start with the story
  • Point out interesting themes

… and more. Starting with the data points and ending with the story doesn’t set the tone for a compelling discussion. It’s like inviting your friends over for dinner, then showing them your timeshare presentation before bringing out the food. They were there for the shrimp cocktail and gossip. That needs to come first if you want to keep them happy. Good reading!

[Read More]

Scaling up and load balancing your PostgreSQL Cluster using Pgpool-II

Categories

Tags database performance software-architecture sql

PostgreSQL’s speed, robustness and security makes it suitable for 99% of the new-age applications. Today, let’s deep dive into how you can enable scalability and load balancing of your PostgreSQL cluster using Pgpool-II. By Azman Agung Nugraha.

Pgpool-II is a middleware that works between PostgreSQL servers and a PostgreSQL database client. It is distributed under a license similar to BSD and MIT. Let’s take a look at the main features of the article:

  • What is PGPOOL-II?
  • How load balancing works within the PGPOOL-II
  • Load balancing mode in Pgpool-II
  • Best architecture to deploy Pgpool-II
  • Pgpool-II parameter that you should looking out

Generally, you would not install Pgpool-II on the backend servers. What you see in recent picture is the most common configuration. Pgpool-II is a standalone server which essentially sits in front of the databases. The two Postgres servers are often configured with streaming replication with one being the Primary DB and the other the Standby DB. Good read!

[Read More]

Interview: Haskell in production @Channable

Categories

Tags programming performance app-development functional-programming

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 programming performance app-development code-refactoring

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]