Commit Graph

  • f8c9e244a3 bufferedreader: read a file line by line module (BufferedReader vs Scanner vs Files.lines vs readAllLines on a 1 GB file; heap at -Xmx64m, timings, read-call counts, one-huge-line OOM, charset/BOM/line-terminator pitfalls, Scanner swallowing IOException), 10 contract tests main Claude 2026-11-15 01:20:37 +05:30
  • 5faa57bb2d datetimeformatter: DateTimeFormatter cheat sheet module (pattern letters incl. the four hour letters, yyyy vs YYYY week-year bug and WeekFields, en_IN locales and the U+202F AM/PM trap with parseLenient fix, SMART/STRICT/LENIENT parsing, ISO constants, SimpleDateFormat thread safety), 18 contract tests Claude 2026-11-14 01:22:11 +05:30
  • c8588ae520 copying: fold in graph copying (shared nodes, cycles, identity-map fix), serialization rules (constructors, record canonical constructor, ObjectInputFilter), record array components, clone() as a defensive copy, two more compile-error exhibits; 24 tests asmhatreandClaude Sonnet 5.5 2026-11-12 20:29:58 +05:30
  • 38fbd513c9 copying: deep vs shallow copy module (clone() traps, copy constructors, serialization copy, records, defensive copies, collection copies), 17 contract tests asmhatre 2026-11-12 20:18:06 +05:30
  • 682b7b067c equals-hashcode: equals/hashCode contract demos, missing hashCode and constant-hash costs, mutable keys, records, JPA entity id trap, 13 contract tests Claude 2026-11-12 20:08:35 +05:30
  • 319697c345 string-format: String.format/formatted/printf cheat sheet module (specifier anatomy, rounding vs C printf, locales, Indian lakh/crore grouping Formatter cannot do, format exceptions, %t dates, concat cost), 11 contract tests Claude 2026-11-12 10:51:24 +05:30
  • db129fb1ce jmh-basics: JMH tutorial module (dead-code elimination, Blackhole, constant folding, warmup/forks, state scopes, -prof gc) asmhatreandClaude Sonnet 5.5 2026-11-08 18:30:47 +00:00
  • f6237d4117 reflection: Method/Field/MethodHandle/VarHandle demos, module and final-field rules (JEP 500 on JDK 26), JMH call-cost numbers, contract tests asmhatreandClaude Sonnet 5.5 2026-11-08 18:14:04 +00:00
  • d7d5689f05 New posts asmhatre 2026-11-06 21:43:25 +05:30
  • dfd3a830cd sorting: Comparable vs Comparator from first principles, comparing/thenComparing/nullsFirst chaining, records as sort keys (and the record/equals compareTo trap), and a real reproduction of the int-subtraction-overflow comparator bug Claude 2026-10-01 16:19:14 +00:00
  • 8eb601aa0e cow: fix stale output/06 reference in WriteThroughputBenchmark comment after output file renumbering Claude 2026-10-01 12:20:08 +00:00
  • 6520e7aabd cow: add committed javap evidence for the internal lock field, renumber the preserved race-condition output to make room for it Claude 2026-10-01 12:19:08 +00:00
  • 434054f246 cow: CopyOnWriteArrayList - deterministic iterator-snapshot and synchronizedList CME demos, JMH read/write throughput, and the addLast/removeFirst fix for a real concurrent-writer race Claude 2026-10-01 12:09:44 +00:00
  • 2eaa464bad immutable: List.of vs unmodifiableList vs copyOf - null handling, views vs copies, JMH wrap/copy overhead, a Guava comparison, and the record defensive-copy trap asmhatre 2026-10-01 11:32:13 +00:00
  • 64de44fa65 sequenced: JEP 431 Sequenced Collections across List/Deque/LinkedHashSet/LinkedHashMap/TreeMap, and the getLast() replacement for the Set find-last stream tricks Claude 2026-10-01 04:39:39 +00:00
  • 9059df4ad2 list-benchmarks: ArrayList vs LinkedList JMH benchmarks (add/get/iterate/remove) and when ArrayDeque fits instead of either Claude 2026-10-01 04:30:17 +00:00
  • 1ac2f6077a nio2: NIO.2 file API companion code (streaming 5 GB at -Xmx64m, handle leaks, WatchService, mmap) asmhatreandClaude Sonnet 5.5 2026-09-30 19:14:10 +00:00
  • f4b732799d collections: SequencedDemo put through the reversed view now actually breaks the order (zed=60) Claude 2026-09-30 19:12:32 +00:00
  • 381f119308 collections: companion code for the How to Sort a HashMap by Value (and Key) post Claude 2026-09-30 19:10:01 +00:00
  • 366579f478 strings: Java Strings deep dive companion code (pool/intern, indy concat vs StringBuilder JMH, text blocks, string templates) Claude 2026-09-30 19:06:23 +00:00
  • 97e7352f45 serialization: Java serialization companion code (UID drift, JEP 290/415 filters, records, JSON/Protobuf comparison) Claude 2026-09-30 19:03:28 +00:00
  • b31c6716a3 regex: java.util.regex companion code (groups, lookarounds, replaceAll lambdas, ReDoS and timeouts) asmhatreandClaude Sonnet 5.5 2026-09-30 19:00:39 +00:00
  • bfa7f97432 exceptions: Java exception handling companion code (suppression, chaining, cost) asmhatreandClaude Sonnet 5.5 2026-09-30 18:45:53 +00:00
  • 4a74153d87 hashmap-concurrenthashmap: companion code for the HashMap vs ConcurrentHashMap interview guide asmhatreandClaude Sonnet 5 2026-09-30 09:29:06 +00:00
  • af615cc17c arithmetic: companion code for the Add Two Numbers Without Overflow post asmhatreandClaude Sonnet 5 2026-09-30 09:16:49 +00:00
  • 202f2f18a5 concurrency-interview: companion code for the Top 40 interview post asmhatreandClaude Sonnet 5 2026-09-30 07:25:12 +00:00
  • bc5153d2a5 executors: ExecutorService lifecycle companion code asmhatreandClaude Sonnet 5 2026-09-30 06:54:17 +00:00
  • 55ee850a75 synchronizers: CountDownLatch vs CyclicBarrier vs Phaser vs Semaphore asmhatreandClaude Sonnet 5 2026-09-30 06:43:52 +00:00
  • 0819993c51 vt-pinning: diagnosing virtual thread pinning companion code asmhatreandClaude Sonnet 5 2026-09-30 06:35:35 +00:00
  • ff183da163 atomics: Java Atomics and VarHandle companion code asmhatreandClaude Sonnet 5 2026-09-30 06:23:03 +00:00
  • 32b8067ecf locks: synchronized vs ReentrantLock vs StampedLock companion code asmhatre 2026-09-30 06:04:50 +00:00
  • f548d9eeb5 jmm: Java Memory Model companion code (volatile, happens-before, DCL) asmhatre 2026-09-30 05:31:29 +00:00