- Python – Functions
Defining and calling functions, positional and keyword arguments, defaults, *args and **kwargs, returning values, docstrings, and the mutable-default-argument bug that is still the most common Python gotcha there is.
- Java 11 Running Java Files Directly
Since Java 11 you can run a .java file directly, with no separate compile step and no .class file left behind. It sounds like a convenience for beginners, and it is, but it also makes Java usable for the kind of quick script you would otherwise have written in Python. The change Note the difference…
- Java 11 HttpClient API
Java 11 shipped a real HTTP client in the JDK. Before it, making an HTTP call meant either HttpURLConnection — an API from 1997 that nobody enjoyed — or adding Apache HttpClient or OkHttp as a dependency. Now a simple GET is four lines with nothing on the classpath. Three objects The whole API is a…
- Queues
First in, first out. Written as a circular buffer, because the obvious version — shift everything down on dequeue — is O(n) and is the standard way a hand-rolled queue goes wrong. Plus the growth bug that only appears after the buffer has wrapped.
- Spring Boot – Lombok
The annotations worth using — @Getter, @Setter, @RequiredArgsConstructor, @Builder, @Slf4j — and the two to be careful with: @Data on a JPA entity generates an equals and hashCode that break the moment the entity is in a HashSet, and @ToString will happily log a password field.