Skip to content

Mohcin Bounouara

Thoughts about software engineering and life

Handling Date Fields. A Common Pitfall

In my Laravel hobby project, I had a field called date_covered defined as a date type, with now() as the default value. However, when I needed to manipulate this field, for example, displaying a range like 02.12.2023 – 02.11.2024—it became clear that a single date column wasn’t ideal. Using date works fine when storing a Continue reading “Handling Date Fields. A Common Pitfall”

Passion.. And passion in software development.

One of the most powerful drugs used by followers of motivational speeches, speakers, and human development nonsense is the phrase “follow your passion“. Even in the field of software engineering, this phrase gets thrown around too easily. But it’s not about following your passion at all. Passion means doing what you love and what you Continue reading “Passion.. And passion in software development.”

Use site.local Instead of localhost/mysite on apache without using docker or DDEV

Let’s suppose you’re using Apache on your local machine and you want to visit your PHP project using something like http://site.local instead of http://localhost/mysite. You’re not using Docker, DDEV, or any container tools, just plain XAMPP or Apache on Linux. Here’s how to set it up: Map your custom domain locall Edit your /etc/hosts file: Continue reading “Use site.local Instead of localhost/mysite on apache without using docker or DDEV”

Building a reply system for comments in Laravel -Without a Subcomments Table-

Many developers, when adding a “reply to comment” feature in a Laravel app, often consider creating a separate sub_comments table (I was one of them, based on my lack of experience, I know this later). It sounds intuitive, because a reply is different from a comment, right? logic thinking But there’s a cleaner, more strict Continue reading “Building a reply system for comments in Laravel -Without a Subcomments Table-“

About ia news in software development

Advice, take it or leave it:Drop any negative news about the impact of ai on your career as a software developer or engineer. Yes, ai tools are powerful. Yes, they are pushing the boundaries of the internet and how we work. But: The answer to all of these is a big “NO”. Instead, acknowledge that Continue reading “About ia news in software development”

Not necessary to build things from scratch

I used to believe that building everything from scratch was the mark of a good developer. However, I understand later that this mindset reflects a lack of experience and problem-solving skills. In the real world, developers often rely on prebuilt solutions rather than creating everything themselves. While we might not always understand the inner workings Continue reading “Not necessary to build things from scratch”

Synchronous and Asynchronous code by simple examples

In software development, there are two important concepts: synchronous and asynchronous behavior. JavaScript developers, especially those who use vanilla JavaScript, know these well because of how promises work. I like to explain things in a simple way, so it’s easier for me and others to understand new topics. Synchronous Programming Let’s imagine you went to Continue reading “Synchronous and Asynchronous code by simple examples”

It’s ok to feel afraid when working to fill your knowledge gaps as a developer

I have been dealing with this feeling for years, and I still do. In the beginning, it was really frustrating for me, day by day, step by step, I learned to “TRY DEALING WITH IT”, not fully “DEALING WITH IT” yet, because I’m not at that level. Let me share a story that might be Continue reading “It’s ok to feel afraid when working to fill your knowledge gaps as a developer”

Take a breath before continue

When I sense that my motivation to publish is driven by the desire to share for the sake of just sharing or to impress others, I take a break from posting to realign myself and my goal from the whole thing. Impressing people was never and will never be the reason I began sharing, but Continue reading “Take a breath before continue”