~/talk

How to Write Bad Java Code

Talkat Voxxed Days Amsterdam 2026 · 2026-04-01..04-02· [java]
slides:none on file

Shows concrete bad-Java patterns and concrete fixes: using string concatenation in a loop creates O(n^2) allocations—use StringBuilder; boxing/unboxing in hot loops wastes objects, prefer primitives; compiling regex inside a loop is slow—compile regex once; method calls can be inlined by the JIT but avoid hot-path indirection; ArrayList random access is orders of magnitude faster than LinkedList; AI pitfalls include missing equals/hashCode keys causing OOM, hallucinated libraries, and SQL with no LIMIT causing million-row queries; recommends multi-model checks and strict prompts like “no third-party libs outside Spring Boot.”

AI-written summary · about

  1. 0:00Introduction and AI in coding
  2. 1:26Inefficient string concatenation
  3. 5:18Pyramid of doom with null checks
  4. 8:08Boxing and unboxing overhead
  5. 10:36Regex compilation in loops
  6. 12:00Method call overhead in loops
  7. 15:29Invariant code in loops
  8. 16:52ArrayList vs LinkedList performance
  9. 21:07AI-generated optimizations
  10. 26:07Exception-driven flow control
  11. 28:13Missing equals and hashCode
  12. 32:08Unlimited SQL query results
  13. 35:00AI hallucinated libraries
  14. 36:47Synchronization pitfalls
  15. 38:12Virtual threads and locks
  16. 39:35AI confidence and pitfalls
  17. 42:22Prompt engineering for AI
  18. 45:11Q&A and closing
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.