coding

Beyond Stream.distinct()

Beyond Stream.distinct()

A Stream of objects Starting with Java 8, you can use a Stream to process elements from a Collection (mostly classes derived from List or Set will be used for this) in an iterating way, defining filtering and mapping lazily, and then "consume" the Stream. You can transform the elements in a Stream for further processing by extracting values from objects (e.g. getting the city name from a person or calculating the length of a string) and filter elements (e.g. only persons older than x years or cities starting with "D") before consuming the resulting Stream of elements. What defines…
Read More
The Art of Loading States: Reimagining Loading Experiences at Scale

The Art of Loading States: Reimagining Loading Experiences at Scale

A deep dive into how I transformed our product's loading patterns from basic spinners into meaningful, engaging moments of anticipation. The Spark: I've always been bothered by loading states. Most implementations, including our own, defaulted to the ubiquitous spinning circle – a universal symbol of "wait and do nothing." During a late-night coding session, watching yet another spinner, I realized: we were wasting precious moments of user attention and breaking the illusion of seamless interaction. The Challenge Landscape: Our application, a collaborative design system platform used by 10+ internal teams, had grown to handle complex data relationships. Each page load…
Read More
Bring Data to Life: How to Install Grafana on Ubuntu 22.04

Bring Data to Life: How to Install Grafana on Ubuntu 22.04

Monitoring and visualizing real-time data has become crucial for businesses to make data-driven decisions. Several tools exist to achieve this goal, including paid ones. Grafana is one such tool; however, it's free and open-source. It stands out from other analytics tools with its flexibility to connect to a wide range of data sources and its highly customizable, interactive dashboards. Unlike many paid tools, Grafana's open-source model provides powerful visualization at no cost, making it a scalable choice for teams of all sizes. In this guide, we'll cover the step-by-step installation process of Grafana using the official Grafana APT repository. Let's…
Read More
You should avoid Zed editor.

You should avoid Zed editor.

The Zed editor team openly promotes the violation of licenses between open-source and closed-source software. Even when faced with evidence (and their demonstrated incompetence), they shamelessly claim they have the power to decide and interpret licenses as they see fit, completely disregarding the actual text of those licenses. Furthermore, they show no concern for the harm caused to companies despite their position. It is clearly a corrupt system to its core, likely run by inexperienced individuals who have no respect for others' work — the kind of people who think open-source means "I do whatever I want." This industry is…
Read More
Day 8 – Modules

Day 8 – Modules

Modules: In Python, a module is a file containing Python definitions and statements. Modules allow you to organize your code into reusable pieces and help with maintaining and structuring your programs. A module is essentially a Python file (.py) Python provides built-in modules (like math, os, etc.). You can create your own custom modules. Modules have special variables: __name__: The name of the module. __file__: The file path of the module. __doc__ : The documentation string of a module. Enter fullscreen mode Exit fullscreen mode In Python, identifiers starting and ending with double underscores (like name, doc, etc.) are called…
Read More
Why I Left Consultancy (and Don’t Intend To Go Back)

Why I Left Consultancy (and Don’t Intend To Go Back)

I feel like I was only truly recognized when I had a technical leadership in place. Once they were replaced by managers with no understanding of software engineering, I started facing significant challenges in explaining why certain things needed to be done a certain way. Nowadays, I understand why Zuckerberg has consistently hired technical people, even for management roles. It's easier to foster an environment where long-term quality isn't sacrificed for the sake of immediate delivery. Managers who have never written a line of code often don’t understand why delivering a feature might "take too long." Their focus is purely…
Read More
Decoding URL Encoding: Unveiling the Mystery Behind % Symbols

Decoding URL Encoding: Unveiling the Mystery Behind % Symbols

In the vast and intricate web of modern development, URLs (Uniform Resource Locators) aren't just simple web addresses—they're like the postal addresses of the internet, guiding data to its destination. But URLs can't just be a jumble of any characters. They follow strict rules to ensure that nothing goes awry. When certain characters get in the way, that's where URL encoding steps in as our unsung hero. Today, we're pulling back the curtain on common encoded symbols like %3A, %2F, and %23, and exploring why they're crucial for smooth, secure, and functional URLs. What is URL Encoding? Imagine you're trying…
Read More
Mastering ENUMs in Go

Mastering ENUMs in Go

Often, within the systems we develop, we encounter constant values. One example of these values could be the representation of a registration status. In this case, consider a status that includes more variations beyond active and inactive. If these statuses are defined as strings, their validation within the system could become a major headache. Additionally, this approach might “inflate” the binary, as each validation would involve two strings (the expected value and the value being validated). To avoid these problems, we can use the well-known enum type. If you’re unfamiliar with this type, it is essentially a fixed or limited-size…
Read More
Item 72: Priorize o uso das exceções padrões

Item 72: Priorize o uso das exceções padrões

1. Importância da reutilização de exceções padrão Exceções padrão tornam o código mais fácil de entender e familiar para outros programadores. Melhoram a leitura e o aprendizado da API. Reduzem o consumo de memória e o tempo de carregamento de classes. 2. Exceções padrão mais reutilizadas e seus usos típicos IllegalArgumentException: Usada quando um parâmetro possui um valor inadequado. Exemplo: public void setRepeatCount(int count) { if (count < 0) { throw new IllegalArgumentException("Count cannot be negative"); } this.count = count; } Enter fullscreen mode Exit fullscreen mode IllegalStateException: Lançada quando o estado do objeto não permite a operação. Exemplo: public…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.