2coffee.dev

Lastest posts for you

Musings about the debugger – What is DAP?

Over the past few days, I’ve switched from VSCode to using Zed for a few reasons. Zed is a code editor written in Rust, very lightweight, and its interface is similar to VSCode in many aspects. However, Zed still has its own differences and follows its own philosophy. Personally, I’ve used Zed since its early days; my first impression was that it was very fast and smooth. That said, many features I was used to in VSCode were missing in Zed, so I only stopped at the level of experimentation.

One feature I use very frequently is debugging with breakpoints: selecting positions and observing the data flow in the system. VSCode is a popular editor, so enabling debugging is much easier. It usually takes only a few steps, and especially if you use a framework, you can easily find guides online. In general, VSCode does a very good job of simplifying things for users.

Therefore, after switching to Zed,... Read more

Comment

Anonymous
Anonymous

Tôi bình luận

Series

MCP – Prompts & Resources

This may be the last post in the basic MCP series on the blog. Originally I had planned not to write any more because the documentation for Prompts & Resources in MCP is very limited, but since these two topics are interesting I decided to introduce them to readers.

I have read and studied the material about these two items on the MCP main site. After understanding the principles and use‑cases, I looked for projects that have integrated them and intended to add examples to this article, but it turned out that very few projects actually implement these two components. Why is that?

In my opinion, a few... Read more

Comment

When programmers... practice writing essays

Writing

Do you like writing documentation? Or do you prefer writing code? When given a request, do you immediately think of solutions, imagining how you'll do it, writing it like this, with each line of if...else naturally appearing in your mind? Or do you think about the business logic, related parts, or what changes might impact the existing system?

When I first learned programming, I had no concept of writing documentation, not even reading it. All I did was read articles from others, follow their step-by-step instructions, and just replicate what they did. If I encountered difficulties, searching online didn’t take too much time. In short, I only did what was sufficient, nothing extra, leaving the rest to time and accumulated experience.

That habit stayed with me... Read more

Comment

Mediator - The Mediator

Design Pattern

Mediator is a system design pattern that helps minimize chaotic dependencies between objects by restricting direct communication between them, forcing them to interact through an intermediary object.

Initially, when I was unaware of this concept, I used to write "chaotic" code in both Front-end and Back-end. The components in the system sometimes do not operate independently but interact with each other. This interaction causes many difficulties in debugging and maintenance. Let me give examples one by one for easier visualization.

First, on the server side,... Read more

Comment

Small talk: The Recent Attack on npmjs Packages

The recent series of attacks on npm packages has significantly impacted the community, making us question the security of the libraries we use, whether in development or production environments.

From the very first day I learned about Node.js, npmjs... I noticed that every time I ran npm install, a node_modules folder and a package-lock.json file would appear. Out of curiosity, I opened them and—oh my!—why are there so many folders in there, while the package.json file shows that I only installed the express library? 🤔 This means that installing express automatically installs a bunch of other packages. In other words, express depends on other packages, which in turn depend on even more packages, leading to a "dependency hell." This explains why installing just one library brings in dozens of libraries you've probably never even heard of.

What's quite interesting is that... Read more

Comment

How to Share Environment Variables (.env)

Tips

The other day while browsing social media, I saw someone asking how to share a .env file with others. At that time, the post was still new and only had a few comments. Clicking to read, I saw someone reply, "just copy it" and send it to the other person. I don't know how it is at your workplace, but at mine, people still often send .env files to each other via messaging. But not through Messenger, Telegram, or Slack... instead, we use an internal messaging app based on Mattermost.... Read more

Comment

5 Basic Principles for Beginners in Writing

Writing

Hello readers of 2coffee.dev. Writing is a skill that can be honed day by day. Learning to write is not difficult, but it requires a certain level of perseverance. If someone claims they are good at writing from the very first attempt, it could only be due to innate talent or the result of undergoing the 10,000-hour formula—emphasizing that the best, even geniuses, must go through a relentless practice process.

Before writing blogs, I had no idea how to write. I believed I lacked the ability to write because I couldn’t write like the articles I had read. But because of my immense passion for sharing, I decided to put pen to paper, regardless of whether it turned out good or bad. Initially, writing was very challenging because I couldn’t control my sentences; even when I had many ideas in mind, the output was far from what I imagined. At times, I felt like giving up, but fortunately, I discovered some principles that helped me improve my writing skills.

Below are 5 lessons drawn... Read more

Comment

Xuân Hoài Tống
Xuân Hoài Tống

Absolutely agree, practice every day until it becomes a habit.

Introducing our weekly featured article for you

Hello

Hello to all readers of 2coffee.dev, today I bring to you a new section called "Posts" - Weekly articles for you. Why?

As mentioned many times in previous articles, the blog is currently facing a large migration from user habits, they no longer search on Google but instead use other tools such as AI Agents or chat directly with AI. Therefore, I am forced to change direction.

As you know, the blog... Read more

Comment