Translate

середа, 31 грудня 2014 р.

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 = LocalDate.parse(date);
     }
     catch (DateTimeParseException e) {
       throw new IllegalArgumentException("Invalid format for date", e);
     }
     if (parsedDate.isBefore(LocalDate.now())) throw new IllegalArgumentException("date cannot be before today");
     if (numberOfSeats == null) throw new IllegalArgumentException("number of seats cannot be null");
     if (numberOfSeats < 1) throw new IllegalArgumentException("number of seats must be positive");
   }


на


class BookingRequest…
  private void validateNumberOfSeats(Notification note) {
    if (numberOfSeats == null) {
      note.addError("number of seats cannot be null");
      return;
    }
    if (numberOfSeats < 1) note.addError("number of seats must be positive");
  }
Оскільки в моєму поточному проекті багато перевірок, думаю варто спробувати такий підхід

середа, 24 грудня 2014 р.

Oracle Confirms New Java 9 Features


The new set of JCPs announced are:
  1. JEP 158: Unified JVM Logging — Introduces a common component logging system.
  2. JEP 165: Compiler Control — Improves control of JVM compiles through a new set of options.
  3. JEP 214: Remove GC Combinations Deprecated in JDK 8 — Maybe self-explanatory: it removes GC combinations from JDK8. 
  4. JEP 213: Milling Project Coin — Addresses some language changes in Project Coin to "smooth out the edges."
  5. JEP 219: Datagram Transport Layer Security (DTLS) — DTLS will be supported in Java 9.
  6. JEP 224: HTML5 Javadoc — Java 9 includes the javadoc tool for outputting HTML5.


субота, 20 грудня 2014 р.

пʼятниця, 5 грудня 2014 р.

JUG- 24 AKKurate AKKA


Наступного четверга 11 грудня о 19-00 відбудеться 24-тя зустріч Java User Group Lviv
Тема:  AKKurate AKKA
Доповідач: java/scala розробник компанії Eleks – Юрій Остапчук
Презентація торкнеться наступних питань:
- SCALAbility problem, Actor System / Java&Scala Actors
- Load-balancing, Supervision & Fault- Tolerance. Networking
- Some Patterns & Best Practices
- Note on 'reactiveness'











Вхід Вільний.
Щоб уникнути stack overflow, прошу зареєструватися ось тут.
Зустріч відбудеться у тренінг центрі компанії Eleks - за адресою  Наукова 7г (1-ий поверх) 



пʼятниця, 28 листопада 2014 р.

четвер, 27 листопада 2014 р.

понеділок, 10 листопада 2014 р.

10 Things You Didn’t Know About Java


10 Things You Didn’t Know About Java

So, you’ve been working with Java since the very beginning? Remember the days when it was called “Oak”, when OO was still a hot topic, when C++ folks thought that Java had no chance, when Applets were still a thing?
I bet that you didn’t know at least half of the following things. Let’s start this week with some great surprises about the inner workings of Java.

1. There is no such thing as a checked exception

That’s right! The JVM doesn’t know any such thing, only the Java language does.
Today, everyone agrees that checked exceptions were a mistake. As Bruce Eckel said on his closing keynote at GeeCON, Prague, no other language after Java has engaged in using checked exceptions, and even Java 8 does no longer embrace them in the new Streams API (which can actually be a bit of a pain, when your lambdas use IO or JDBC).


пʼятниця, 7 листопада 2014 р.

Java Concurrent Animated


Цікава програмка, яка графічно описує як працює Concurrency в Java:
http://sourceforge.net/projects/javaconcurrenta/?source=directory




четвер, 6 листопада 2014 р.

понеділок, 27 жовтня 2014 р.

Мрієш стати Hadoop інженером? Мрії збуваються!




Мрієш стати Hadoop інженером? Мріє збуваються!
Унікальна пропозиція від львівського Epam



BigData is a new, fast-emerging trend in enterprise world. Just in 2014 we've started tens of POC/R&D projects for our enterprise clients willing to explore Big Data capabilities for their business. Since majority of them have proven to be successful, thus we do expect significant demand in Big Data enabled engineers in the beginning of 2015. Acknowledging that there is shortage of experienced Big Data resources on market, we (Epam) are willing to hire and train mid level, senior/lead and architect level engineers in this field.

As part of the team, you'll get intensive 1 month training under guidance of our experts and assigned to real projects in test mode in order to start gaining production experience.


Requirements:

  • 2+ years of programming experience
  • Desire to learn and specialize in modern big data technologies.
  • Profound knowledge of Java or Scala 
  • Strong SQL knowledge
  • you know the difference between O(n) and O(n2)
  • At least Intermediate English level
  • able to use linux command line 
  • Knowledge/Experience of BigData (Hadoop, Cassandra, MongoDb, Couchbase, etc) is a big plus.


Якщо Ви зацікавилися, прохання надсилати резюме на адресу tetiana_zabusyk@epam.com з темою Candidate for Hadoop/JUG





пʼятниця, 24 жовтня 2014 р.

Java навсегда! 12 причин длительного доминирования Java


Java foreverЛегко забыть значимость технологии, как только она пронесется кометой через коллективное сознание и погаснет огненной смертью за горизонтом. К примеру, Cobol — когда-то этот язык был культовым для целой эпохи, а сейчас его можно сравнить разве что с протухшей рыбой. В наши дни любой хипстер-программист вам отчеканит, что Cobol – это полный отстой, старый и бесполезный язык. Java может стать следующей жертвой «актуальных» суждений.

Пик продаж книг по Java – далеко в прошлом. Матерые Java-утилиты уже не достаточно сексуальны для обложек журналов. Java уже 19 лет, а прогрессивные разработчики увлечены такими моднейшими и актуальнейшими технологиями как Node.js, Objective-C, Dart, Go и т.д., удивляясь: «Java? Этот артефакт эпохи Web 1.0 еще жив?»

Беглый поиск на Dice.com показывает, что работы на Java — навалом. Если для iOS около — 2500 предложений, для Java — более 17000. Конечно, нельзя всецело полагаться на эти цифры. Но тот факт, что на Dice.com рынок работы на Java потенциально в семь раз больше, чем для моднейшей iOS, говорит о том, «старина Java» чувствует себя довольно таки неплохо.



пʼятниця, 26 вересня 2014 р.

Java EE 8 Takes Off!


A big day for Java EE - Java EE 8 is now officially launched as JSR 366 via the JCP process. As you might have expected the primary focus areas are HTTP 2/HTML 5 support, CDI/managed bean alignment, cloud support and Java SE alignment.
Here is some of the very high level content:
Web Standards
  • HTTP 2
  • Server-Sent Events (SSE)
  • JSON binding
  • Action oriented web framework to complement JSF
  • More support for Hypermedia
  • Enhancements to JSON-P, WebSocket and JAX-RS
Managed Bean/CDI Alignment


вівторок, 23 вересня 2014 р.

Java 9 – The Ultimate Feature List


Java 9 Telescope Java 9 The Ultimate Feature List
This post will be updated with new features targeted at the upcoming Java 9 release (last updated: 9/9/2014)
The OpenJDK development is picking up speed: after the Java 8 launch in March 2014, we’re expecting to enter a 2 year release cycle. Java 9 will reportedly be released in 2016, and an early list of JEPs (JDK Enhancement Proposals) that target the release has already been published. Moreover, some JSRs (Java Specification Requests) are already being worked on and we’ve also added a hint of other features that might be included.
The flagship features are the Jigsaw project, significant performance improvements and long awaited APIs including: Process API updates, JSON as part of java.util and a money handling API. For those of you who want to be on the bleeding edge, JDK 9 early access builds are already available here.
In this post we’ll keep updating around the main new features for Java 9 and what they’re all about. So stay tuned for additional updates!


вівторок, 19 серпня 2014 р.