Codeminer42 Dev Weekly #16

HELLO EVERYONE!!! It’s June 21, 2024, and you are reading the 16th Codeminer42 tech news report. Let’s check out what the tech world showed us this week!

How React 19 (Almost) Made the Internet Slower – by Henrique Yuji

This critical article from our blog shook the tech bubble, trending on Hacker News and Reddit. Our teammate, Henrique Yuji, shows the potential impact of highly anticipated React 19 on website performance due to a change that disables parallel rendering of siblings within the same Suspense boundary. This change could lead to data fetching waterfalls and affect websites relying on React. The rationale behind the change is to improve performance, but it may have drawbacks in terms of developer experience. After public pushback, the React team decided to hold off on the change for now.

Announcing TypeScript 5.5 – by Daniel Rosenwasser and the TypeScript Team

TypeScript 5.5 has been released with several new features and improvements. Some of the key highlights include inferred type predicates, control flow narrowing for constant indexed accesses, the JSDoc @import tag, regular expression syntax checking, support for new ECMAScript Set methods, isolated declarations, editor and watch-mode reliability improvements, performance and size optimizations, and much more.

Understanding Observers in Ruby on Rails – by Afaq Shahid Khan

This post talks about the interesting concept of observers in the famous Ruby on Rails. Observers are a feature in Rails that allows you to extract responsibilities from models and encapsulate them in separate classes. They listen for changes to an object and respond to those changes without the object needing to explicitly notify the observer. Take an observation 😅!

Bun v1.1.14 – by Dave Caruso

Bun v1.1.14 has been released, fixing 63 bugs and introducing new features like ORM-less object mapping in bun:sqlite, and logging fetch() calls as curl commands. The release also includes Node.js compatibility improvements, bug fixes, and new features like simpler query bindings and tracking changes with query.run(). The release also addresses various issues with bun install reliability, WebSocket server crashes, and memory leaks.

In depth Ruby memory optimisation: true, false and nil – by Mathieu Eustachy

The text discusses memory optimization in Ruby, focusing on the efficient use of true, false, and nil objects. These objects are singleton instances that do not require additional memory allocation, resulting in better performance. The text provides code examples and benchmarks to demonstrate the impact of using these objects.

How to Perform Data Validation in Node.js – by Antonello Zanini

Our friend Antonello, explains the importance of data validation in Node.js to prevent errors and improve security. He provides a tutorial on implementing data validation in Express using the express-validator library. The tutorial covers validating incoming requests, such as route parameters, query parameters, and body data. Antonello also talks about the benefits of data validation, such as enhancing security, improving reliability, and maintaining compliance.

Using a Body With an HTTP Get Method Is Still a Bad Idea – by Danny Logsdon

The article discusses the use of a body with an HTTP GET method. While it is technically possible to send a body with a GET request, it is generally not recommended. The GET method is designed to retrieve data from a server without causing any side effects, and sending a body with a GET request can lead to various problems. Check it out!

How UI/UX Can Influence User Behavior and Drive Engagement – by Purnima Shrestha

UI/UX design is crucial in shaping user behavior and driving engagement in the digital landscape. Understanding the nuances of UI/UX is important for businesses to create compelling digital experiences. UI focuses on visual elements, while UX focuses on overall user experience. Well-designed UI/UX can enhance usability, satisfaction, and engagement, while poor design can lead to frustration and loss of customers.

Unrestricted Resource Consumption in a Password Reset — Web API Security Champion Part IV – by Krzysztof Pranczk

Our friend Krzysztof talks about the vulnerability of unrestricted resource consumption in web APIs. He explains that this vulnerability occurs when an API endpoint allows the consumption of system resources without proper limitations, which can lead to denial-of-service attacks. The impact of this vulnerability includes application slowdown, data corruption, increased costs, and reputational damage. The article presents a case study using the Damn Vulnerable Restaurant API. It identifies a rate-limiting issue in the password reset feature and suggests some good solutions. Check it out!

A Complete Guide To Writing Tests in Coding Interviews – by Kevin Jin

The article discusses the importance of writing tests in coding interviews and provides a framework for effectively planning and writing tests. The author emphasizes the need to approach tests as a way to identify problems and shortcomings in code rather than just validating it. The article outlines two stages of test writing: planning tests and writing tests. Our friend Kevin also emphasizes the importance of achieving 100% code coverage and testing ambiguous code paths.

BEM Modifiers in Pure CSS Nesting – by Vladyslav Zubko

The author talks about his experience with using preprocessors in web development and their dislike for them. They explain how they initially used preprocessors like SCSS but eventually started using pure CSS in their personal projects. They mention their struggle with creating BEM modifiers in pure CSS and how they found a solution using native CSS nesting and attribute selectors.

System Design: Chat applications like WhatsApp and Facebook messenger – by Sonika

This interesting article describes the system design of chat applications like WhatsApp and Telegram. It outlines the key components, databases, and functionalities required for these applications. The workflow involves user interaction, message routing, data storage, media handling, real-time events, and analytics. Maybe after reading this article, you can try to create your own Telegram.

Write Less, Fix Never: The Art of Highly Reliable Code – by Dhruv Agarwal

The author talks about the importance of writing highly reliable code to avoid errors in past work that can hinder productivity. He provides five useful strategies for developers to follow. By implementing these strategies, developers can reduce the time spent fixing past errors and focus on innovating and delivering new features. Check it out!

The Right Way to Clone Nested Object/Array (Deep Clone) in Javascript – by Muhammad Syakirurohman

The article talks about the issue of cloning nested objects and arrays in JavaScript due to pass-by-reference behavior. It explains how using Object.assign() or the spread operator ({...}) may not work for complex nested objects. The text then introduces modern methods for deep cloning, providing examples, pros, and cons of each method.

*This post was originally published at https://devaradise.com/deep-clone-nested-object-array-in-javascript

How to create software quality – by Will Larson

The article discusses the importance of creating software quality in a context-specific manner. It emphasizes the need to consider essential domain complexity, scaling complexity, and accidental complexity when developing quality software.

Measuring Ruby Garbage Collector – by RoRvsWild

The article talks about the impact of garbage collection on Ruby applications and how to measure its effects. It explains that garbage collection can slow down response times and provides a method to observe the impact of garbage collection on response time. The article also mentions the inconsistency in measuring GC timing for different Ruby versions and provides a solution to handle this inconsistency.

And that’s all for this week! Wish you all a great weekend and happy coding!

We want to work with you. Check out our "What We Do" section!