Recent Articles
Python
An Introduction to Python's Dataclass Decorator
Python's @dataclass (introduced in Python 3.7) is a decorator that automatically generates boilerplate methods for classes that primarily store data. It simplifies class creation; no need to manually write `__init__`, `__repr__`, etc.
Read more →
Python
Python JSON Tips, Tricks, and Pitfalls
Working with JSON in Python seems straightforward — the built‑in json module can load data from a file and dump Python objects back to disk. Many new developers, however, run into confusing errors, odd behaviour or inefficient patterns when handling real‑world JSON.
Read more →
Java
Why Can't Java Find My Resource File?
There are several common reasons why Java applications cannot find resource files, including incorrect file paths, classpath issues, and packaging problems. Java uses the classpath to locate resources, so ensuring that resource files are correctly placed and referenced is crucial for successful access.
Read more →
Python
What is the __pycache__ folder in Python?
The __pycache__ folder in Python is where the interpreter stores compiled bytecode files to optimize program execution. But what exactly does that mean, and why is it important?
Read more →
Python
Why Do Python Scripts Use if __name__ == "__main__"?
Have you ever written a Python script, run it successfully, and then imported it into another program only to watch it behave strangely? Maybe it printed a prompt you didn’t expect or started an expensive computation as soon as you imported it.
Read more →
Java
Why Do Java Methods Modify Objects but Not Primitives?
Many new Java developers are surprised when a method quietly modifies an object but leaves a primitive variable untouched. Java parameter passing is always by value, but understanding how that works with objects versus primitives will help you avoid unexpected behavior.
Read more →
Java
3 Annotations to Speed Up Spring Bean Startup
Without having to radically change the Beans in your Spring Boot application, you can significantly speed up Spring bean startup times, just by using Annotations such as @Lazy, @Async, and @Profile.
Read more →
Python
Understanding the LEGB Rule for Variable Scope in Python
Python variables have different scopes: local, enclosing, global, and built-in, organized by the LEGB rule. Use globals() and locals() to inspect variable scope, and follow best practices to avoid naming conflicts
Read more →
Python
Use Cases for Partials in Python That You Should Know
Partials in Python is a function that behaves like an existing function but with some arguments already filled in. It is created using the functools.partial function from the functools module
Read more →
Python
Pythons three division operators, tips and gotchas
Python has three division operators: /, //, and %. The / operator performs true division, // performs floor division, and % gives the modulus.
Read more →