Translate

вівторок, 13 січня 2015 р.

VirtualJUG: meetup with James Gosling


Java and the Wave Glider with James Gosling

  •  to 
  • Needs a location

  • This is a virtual Meetup occuring at 5PM UK time. For help with your timezone calculation, refer to this.
    You can tune in to the session at http://virtualJUG.com
    If all fails, you can still access YouTube and IRC via previous means:
    1) Join the IRC channel - Ask questions, chat, discuss 

    2) View the live stream on YouTube
    Java and the Wave Glider with James Gosling
    Abstract tba
    Speaker: James Gosling
    James Gosling is the founder of Java and CTO at Liquid Robotics. 


#tip #mongo #limit


Interesting thing with mongo quering
Do you know result of db.myCollection.find().limit(0)?
It will be the same to db.myCollection.find() and return everything from collection
What 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)

пʼятниця, 9 січня 2015 р.

#tip #java


If you are not 100% sure prefer String.valueOf(value) over new String(value).

Inside valueOf method we have check on null so that you'll never get NPE



середа, 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» чувствует себя довольно таки неплохо.