Mensur Duraković

A blog for software engineers, sharing tips, tricks, and best practices for writing clean, maintainable code and building great software while also honing essential soft skills
https://www.mensurdurakovic.com/ (RSS)
visit blog
Why is typeof null === 'object' in JavaScript?
6 Nov 2024 | original ↗

In the mid-1990s, the web rapidly evolved, and the need for a more dynamic and interactive browsing experience became increasingly apparent. Netscape, the company behind the popular Mosaic web browser, recognized this shift and wanted to stay ahead of the curve.Brendan Eich was then a young programmer with a

Tailwind: Because Life's Too Short for !important
23 Oct 2024 | original ↗

CSS frameworks have become a hot topic in front-end development in recent years. Tailwind CSS has emerged as a noteworthy contender, separating the developer community from either love or hate for Tailwind.In this article, I will talk about the advantages of Tailwind CSS compared to traditional CSS, focusing on

Conquering the Digital FOMO
9 Oct 2024 | original ↗

Back in ancient Greece, a well-known philosopher named Heraclitus said something that still rings true today:"The only constant in life is change."Numerous software engineers find this statement deeply relatable.Imagine you're a software engineer. You've just gotten comfortable with a particular set

From Stylish to Sluggish: The Hidden Costs of CSS-in-JS
26 Sept 2024 | original ↗

If you've used modern web frameworks like React, Angular, or Vue, you've probably encountered CSS-in-JS tools like Styled Components, Emotion CSS, or JSS. These tools let you write CSS using JavaScript, which can be handy. However, CSS-in-JS has a big drawback: it's slower than

JSX Evolved: The React Server Components
11 Sept 2024 | original ↗

React's journey over the last ten years has been nothing short of revolutionary. This popular library has been in a constant state of growth, with each new version bringing fresh ideas and performance boosts. Some updates have even changed how we think about building web applications.The latest

Beyond the Hype: My Honest Reflections on Gen AI
29 Aug 2024 | original ↗

It's been more than a year since the AI crazy hype and now that the dust has settled, we are seeing some clear signs where AI is. We witnessed smart chat platforms like ChatGPT and Claude, services for generating images and videos like DALL-E and Midjourney, GitHub Copilot,

All About Events - Event Bubbling, Propagation and Delegation
14 Aug 2024 | original ↗

In the world of programming, events serve as catalysts for action. Like many languages, JavaScript leverages this concept to execute code in response to specific triggers. Whether a user interaction or a system occurrence, events provide a mechanism to initiate predetermined processes.While the implementation may differ between client-side and

The Senior Engineer Illusion: What I Thought vs. What I Learned
31 Jul 2024 | original ↗

As a junior engineer, I had some wild ideas about senior engineers. I thought they were like coding superheroes - able to debug any issue, always knowing the next step, and walking tech encyclopedias. I used to think that leveling up your career to senior would grant you unlimited knowledge

What Are JavaScript Generators?
17 Jul 2024 | original ↗

One of the less-known, but cool JavaScript features are generators. Added in ES6, generators provide a different method for handling loops and asynchronous tasks. You can think of generators as functions with a pause button. They yield values on demand, unlike the normal functions that run to completion. This unique

3 ways to optimize conditional rendering in React
3 Jul 2024 | original ↗

In this short article, we will talk about optimizing conditional rendering code in React and some general good practices.Through the years I have seen some bad examples that make your code buggy, but also unreadable.So we can start with first good practice.Avoid unnecessary ternary operatorsLet'

What Is Debouncing?
19 Jun 2024 | original ↗

Let me tell you a story. Years ago, I was holding an exam for my students. The exam was a task in JavaScript where they needed to implement a search input that would display songs returned from Apple's iTunes API endpoint. I prepared everything for them and they

Git guide I wish I had when I was a student
5 Jun 2024 | original ↗

When I was a student, we learned nothing about Git in college. Instead, we uploaded our coding practices to Moodle. Back in the days of my first job as a junior software engineer, I didn't know a single Git command or how it worked. I had to learn

React coupling, decoupling and composition explained
22 May 2024 | original ↗

When working in React, you want to separate logic from your components, reuse those components as much as possible, and do that by writing as little code as possible. This is easier said than done, but knowing how to separate business logic code from your presentation code is extremely important.

Clean code - React API calls
8 May 2024 | original ↗

React is a library that is easy to use but hard to master. It offers flexibility to software engineers to structure their projects in any way they want. This can sometimes be a double-edged sword.In almost every React project you need to make some API calls to fetch data

Step-by-Step Guide: Creating Selectable Image Sections in React
25 Apr 2024 | original ↗

Knowledge of basic image editing is one of the best nice-to-have skills as a software engineer, especially in the frontend domain. In specific situations, you will work with vectors and other image types where this knowledge pays off.A couple of weeks ago I had to implement a React component

How to scale Node.js applications?
10 Apr 2024 | original ↗

To understand the scaling of Node.js applications, we first need to understand what problem scaling is solving.You know that Node.js is single-threaded, it has its main thread. So instead of serving every incoming request to the server on a separate thread, it serves every request through the

What is hydration and why it's important?
28 Mar 2024 | original ↗

Staying well-hydrated is super important for your body. Drinking lots of water keeps your body running smoothly and helps it do its job properly.Water in our bodies is crucial for lots of important stuff. It helps our blood carry important stuff like glucose and oxygen to our cells. It

How to detect clicks on any element on the React page?
7 Mar 2024 | original ↗

React is very flexible with event listeners. You can use: clicks events when a mouse click event occurs, mouse over events when the mouse pointer moves over an element.scroll events when the user scrolls in an element, keydown events when a keyboard key is pressed.,change events when the

What is CDN and how does it work?
21 Feb 2024 | original ↗

CDN (Content Delivery Network) is a network of servers. Those servers are spread across different geographical locations.CDN servers act as a middleman between the origin server, where your application is hosted, and the clients who send requests to your server.Imagine clients are sending requests to your server hosted

Easy Peasy? When Easy Becomes Complex and How to Tackle It
7 Feb 2024 | original ↗

Have you ever been in a situation where you thought that task would be easy peasy but it turned out different?I remember once I got the task to fix some warning messages in our React Native app. It was a warning caused by the web view library we used.

What is CORS? 5-minute explanation
24 Jan 2024 | original ↗

You coded a backend and now you want to connect your frontend app to your backend, but then you get this weird error:What the hell is CORS?CORS is an abbreviation for "Cross-Origin Resource Sharing". This is a mechanism enabling a website at one URL to request

↑ these items are from RSS. Visit the blog itself at https://www.mensurdurakovic.com/ to find other articles and to appreciate the author's digital home.