My Perspective On "Go is Not Java" Article

Search for a command to run...

No comments yet. Be the first to comment.
In this series, I will share code that is useful for solving problems. Talk code and dream code.
Sometime I need to test how an application response to certain HTTP status code. Testing handling of non-200 status is quite important for API integration. I came across a handy tool at https://httpstatus.io/mocking-data. Unfortunately it does not su...
Most AI agents that support scheduled tasks have two sources of instruction when a cron job fires: The cron prompt — the task-specific instructions you wrote when scheduling the job The skill — a re

TL;DR Scarp draw result, host on GitHub, retrieve it like API at damacai.hongineer.com. Data Scraping I have previously shared a technique for scraping Da Ma Cai draw result. Now I finally have time t

This is a Bash script that check if the replica (slave) health status. If there is an issue, it will exist with non-zero status. This is useful when used with monitoring tools like [Monit](https://mmo

chmod is a command-line utility used to change the access permissions of file system objects such as files and directories. It allows you to control who can read, write, and execute those objects. Changing Permissions Using Octal Notation Example Usa...
chown changes the ownership of files and directories. This involves modifying the user and/or group associated with a file, determining who has access and permissions. Changing File Ownership to a Specific User Example Usage: chown user file.txt What...
I came across this article "Go Is Not Java". Here are my thoughts.
For programmers using objected-oriented languages, I would recommend all to learn Design Patterns. Refactoring Guru is a good place to start. Of course Design Patterns: Elements of Reusable Object-Oriented Software is a book worth keeping.
It is important to know when to apply the patterns, and equally important to know when it is not applicable.
Design Patterns are not a sliver bullets, it will not solve all your problems. But for the right problems, they provide elegant solution keeping your code adaptable to future changes.
Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.
- https://bit.ly/3xZ74Xn
Design pattern is not just for object-oriented languages. You can create patterns for non object-oriented languages too. Of course the patterns by GoF (Gang of Four) is mainly targeted at object-oriented languages.
Go is not an object oriented language. It is flexible enough to allow you to use it like one but it is not design to be an objected oriented language.
Go has its way of doing things. Some people, in the name of Design Patterns, try to turn Go into Java/C#. If Go can solve a problem elegantly, there is no need to force Java-style Design Patterns on Go.
Object Oriented programming is actually not even about the Objects it is about message passing.
Originally, the core principle of OOP is messaging passing. But this is rarely taught in school, and long forgotten. Nowadays, people tend to focus on "object" part of OOP.