jugLviv

Meta


Recent Posts


Categories


Tags


Archives



#tip #mongo #limit

Interesting thing with mongo queringDo you know result of db.myCollection.find().limit(0)?It will be the same to db.myCollection.find() and return everything from collectionWhat about such thing db.myCollection.find().limit(-12)? Will it work at all?Yes It will return the same to db.myCollection.find().limit(+12)

JUG LvivJUG Lviv

Replacing Throwing Exceptions with Notification in Validations

Martin Fowler виклав цікаву (принаймні для мене) статтю.Ідея така що коли пишеш валідатори потрібно не викидати ексепшини, а робити список повідомлень.Тобто замінити ось такий код class BookingRequest… public void check() { if (date == null) throw new IllegalArgumentException("date is missing"); LocalDate parsedDate; try { parsedDate = [...]

JUG LvivJUG Lviv

Oracle Confirms New Java 9 Features

The new set of JCPs announced are: JEP 158: Unified JVM Logging — Introduces a common component logging system. JEP 165: Compiler Control — Improves control of JVM compiles through a new set of options. JEP 214: Remove GC Combinations Deprecated in JDK 8 — Maybe self-explanatory: it removes GC combinations from JDK8.  JEP 213: [...]

juglvivjuglviv