Mario Casari's Avatar

Mario Casari

@mcasari.bsky.social

Software developer and blogger. Loves Science, Art, Literature, Cinema. https://linktr.ee/mcasari Web site: https://codingstrain.com

20 Followers  |  19 Following  |  17 Posts  |  Joined: 21.03.2025  |  1.8552

Latest posts by mcasari.bsky.social on Bluesky

Using AI in your work highlights its ability to assist with many tasks, but it remains far from replacing your role as a programmer. I enjoy using it because, honestly, at least 80% of a developer's job involves repetitive, alienating tasks suited for machines. #AI #Programming

09.08.2025 20:30 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
The Future of the Internet is Community Driven

Discover how the decentralized internet puts power back in users' handsβ€”boosting privacy, cutting out middlemen, and redefining the digital future. #decentralizedinternet

07.07.2025 11:25 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

If AI is intelligence, then intelligence must be highly overrated. #AI #Intelligence

06.07.2025 22:34 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

Now I have to have one of these decanters.

01.07.2025 12:42 β€” πŸ‘ 2249    πŸ” 238    πŸ’¬ 124    πŸ“Œ 40

🟩Example:

public class MainClass {
private HeavyClass heavyObj;

//instead of creating it in the constructor
public HeavyClass getHeavyObj() {
if (heavyObj == null) {
heavyObj = new HeavyClass();
}
return heavyObj;
}
}
#Java #Performance

30.06.2025 18:50 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Java Tip πŸ’‘: To improve your application's responsiveness, avoid initializing heavy objects that may never be used.

Consider Lazy-loading them at the appropriate time to rationalize memory usage and improve response time.

#Java #Performance

30.06.2025 18:50 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Video thumbnail
29.06.2025 10:08 β€” πŸ‘ 6172    πŸ” 1077    πŸ’¬ 200    πŸ“Œ 145
Preview
Why the Future of Coding Might Look Like a Virtual City Tour

Collaborative code cities in VS Code boost comprehension and usability, with user feedback guiding next steps in software visualization research. #softwarevisualization

16.06.2025 02:15 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Post image 14.06.2025 17:16 β€” πŸ‘ 9    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
Claude Code Makes Every Other AI Coding Tool Look Amateur

Claude Code just launched on the $20 Pro planβ€”finally accessible AI that refactors legacy code, writes tests, and beats Cursor in real-world dev tasks. #ai

13.06.2025 19:00 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

For example:

public class Config {
...
public static String getConfigPath() {
return configPath;
}
}

The configuration path is shared globally, and changing it in one place could affect others.

#Java

14.06.2025 16:04 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Java Tip πŸ’‘: Try to avoid static variables unless they store truly global values.

β€’ They hinder testing by making it harder to isolate classes due to shared state.
β€’ They reduce code reusability.

#Java

14.06.2025 16:04 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Post image

A singular act of defiance that will never go out of style.

11.06.2025 00:22 β€” πŸ‘ 84    πŸ” 9    πŸ’¬ 2    πŸ“Œ 0
difficult to read text on glass in the Music app

difficult to read text on glass in the Music app

Glassy Safari controls overlaid on a photographic website, also somewhat illegible

Glassy Safari controls overlaid on a photographic website, also somewhat illegible

These ultra-translucent interfaces rarely work well as a system, because the transparency introduces way more problems than it solves. It’s form over function.

I’d bet that a lot of this liquid glass stuff will end up more like semi-opaque-frosted-glass in the end. But it looks cool as a demo!

09.06.2025 23:08 β€” πŸ‘ 64    πŸ” 8    πŸ’¬ 8    πŸ“Œ 0
Preview
Why Legacy Code Still Runs the World

Most of the world still runs on legacy code. Here’s how smart teams safely refactor, test, and modernize without breaking what already works. #softwaremodernization

10.06.2025 20:44 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Many layers and pillars of semi-opaque gas and dust overlay one another. These regions appear light blue and dark gray-blue. The first pillar starts at the bottom left and extends to the top right. There is one prominent red star, with tiny spikes at its tip. Lower on this pillar, there are several darker areas of dust that jut out, many with bright red stars that appear as small red dots at their ends. Below the top pillar are two slightly smaller pillars, both ending in dark gray-blue regions. The second pillar has a dark arch that looks like an upside-down L halfway down. The background of this scene is washed in shades of red. Toward the top center is a V shape. At its lowest point, the V is a brilliant red. There are only several dozen tiny bright white and blue stars in this overall scene. Larger stars appear redder and are embedded in the pillars.

Many layers and pillars of semi-opaque gas and dust overlay one another. These regions appear light blue and dark gray-blue. The first pillar starts at the bottom left and extends to the top right. There is one prominent red star, with tiny spikes at its tip. Lower on this pillar, there are several darker areas of dust that jut out, many with bright red stars that appear as small red dots at their ends. Below the top pillar are two slightly smaller pillars, both ending in dark gray-blue regions. The second pillar has a dark arch that looks like an upside-down L halfway down. The background of this scene is washed in shades of red. Toward the top center is a V shape. At its lowest point, the V is a brilliant red. There are only several dozen tiny bright white and blue stars in this overall scene. Larger stars appear redder and are embedded in the pillars.

The Pillars of Creation, seen here in mid-infrared by #NASAWebb, adds to decades of research about star formation by helping astronomers analyze the densest dusts and gases of the region, and improving the precision of their star-formation models: bit.ly/45ayCYi πŸ”­ πŸ§ͺ

09.06.2025 14:17 β€” πŸ‘ 4043    πŸ” 561    πŸ’¬ 71    πŸ“Œ 28
Preview
Monolith vs Microservices vs Modulith: The Evolution of Software Architecture

Learn how Modulith architecture offers a balanced approach to building scalable appsβ€”between the simplicity of monoliths and the flexibility of microservices. #microservices

09.06.2025 13:53 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Is it North Corea?

08.06.2025 13:36 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Sen Bernie Sanders (I-VA) just now on CNN:

"We have a President moving this country rapidly into authoritarianism. He's suing media who criticize him. He's going after law firms that have clients who were against him. He's suing universities who teach courses he doesn't like"

08.06.2025 13:12 β€” πŸ‘ 12384    πŸ” 3369    πŸ’¬ 405    πŸ“Œ 136

🧡2/2 If, for instance, we define a static list somewhere:

private static final List<byte[]> byteList = new ArrayList<>();

Some parts of the code may keep adding elements without removing them, eventually leading to memory exhaustion.

#Java #MemoryManagement

08.06.2025 13:33 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Java tipπŸ’‘: Don’t rely on Garbage Collection blindly, memory leaks are still possible.

#Java #MemoryManagement

🧡1/2

08.06.2025 13:33 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 1    πŸ“Œ 1
@ParameterizedClass
@ValueSource(strings = {"foo", "bar"})
class SomeTests {
    @Parameter String value;
    
    @Test
    void shouldNotBeNull() {
        assertNotNull(value);
    }
    @Test
    void lengthShouldBeThree() {
        assertEquals(3, value.length());
    }
}

@ParameterizedClass @ValueSource(strings = {"foo", "bar"}) class SomeTests { @Parameter String value; @Test void shouldNotBeNull() { assertNotNull(value); } @Test void lengthShouldBeThree() { assertEquals(3, value.length()); } }

✨ New blog post: "STF Milestone 4: Parameterized test classes"

JUnit 5.13 introduced parameterized test classes (in addition to methods). They are a powerful testing tool that has long been missing from JUnit Jupiter...

πŸ‘‰ marcphilipp.de/blog/2025/06...

07.06.2025 11:52 β€” πŸ‘ 31    πŸ” 11    πŸ’¬ 0    πŸ“Œ 0

It looks like a painting

07.06.2025 17:39 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
The image features the Raspberry Nebula (LBN 867), located in the constellation of Orion. Imagine a vast cosmic cloud stretching into space, with a complex structure that resembles an onion due to its multiple layers. At its center shines a bright star, HD 34989, which emits an intense light, similar in brightness to the planet Uranus as seen from Earth, creating a bright focal point in the heart of the nebula. The nebula itself has a vivid red glow, like a scarlet bloom, due to the ionization of hydrogen gas glowing under the influence of the central star. Around HD 34989, a thin halo of blue-white light can be seen, a delicate reflection of starlight on interstellar dust, forming the reflection nebula vdB 38. This bluish halo contrasts with the dominant red, adding a cooler, more nuanced touch of color. The overall image is a mix of bright red hues and hints of pale blue, with the central star standing out like a bright beacon in a sea of ​​cosmic clouds.

The image features the Raspberry Nebula (LBN 867), located in the constellation of Orion. Imagine a vast cosmic cloud stretching into space, with a complex structure that resembles an onion due to its multiple layers. At its center shines a bright star, HD 34989, which emits an intense light, similar in brightness to the planet Uranus as seen from Earth, creating a bright focal point in the heart of the nebula. The nebula itself has a vivid red glow, like a scarlet bloom, due to the ionization of hydrogen gas glowing under the influence of the central star. Around HD 34989, a thin halo of blue-white light can be seen, a delicate reflection of starlight on interstellar dust, forming the reflection nebula vdB 38. This bluish halo contrasts with the dominant red, adding a cooler, more nuanced touch of color. The overall image is a mix of bright red hues and hints of pale blue, with the central star standing out like a bright beacon in a sea of ​​cosmic clouds.

🧡
Here is a cosmic delight: LBN 867, dubbed the Raspberry Nebula although its overall structure is more like an onion!

In fact, this fascinating H II region, located in the constellation Orion, contains three different objects within its structure!

➑️ noirlab.edu/public/image...

πŸ”­ πŸ§ͺ #science

06.06.2025 22:41 β€” πŸ‘ 281    πŸ” 54    πŸ’¬ 4    πŸ“Œ 3
Preview
OpenFeign vs WebClient: How to Choose a REST Client for Your Spring Boot Project When building microservices with Spring Boot, you’ll have to decide how the services will communicate with one another. The basic choices in terms of protocols are Messaging and REST. In this article ...

A quick comparison of two possible options for implementing microservices communication in a Spring Boot project. #Java #SpringBoot #Microservices

www.freecodecamp.org/news/best-ch...

07.06.2025 12:02 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

In a later time you can think of optimizing it using StringBuilder:

StringBuilder sb = new StringBuilder();
sb.append("Hello ");
sb.append("there");
sb.append("!");
System.out.println(sb.toString());

07.06.2025 11:24 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

A very trivial example could be:

String helloThere = "Hello " + "there" + "!";
System.out.println(helloThere);

The above line of code is clear and works as intended.

🧡2/3

07.06.2025 11:24 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Java tipπŸ’‘: Avoid premature optimization. Write clean, working code first and focus on functional requirements. #Java #BestPractices

🧡1/3

07.06.2025 11:24 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

We are building The New Web..
The Decentralized Web.

31.05.2025 19:24 β€” πŸ‘ 13    πŸ” 5    πŸ’¬ 0    πŸ“Œ 0
Post image 24.05.2025 01:31 β€” πŸ‘ 89    πŸ” 18    πŸ’¬ 1    πŸ“Œ 1

@mcasari is following 18 prominent accounts