Welcome!

From the Trenches of the Enterprise Software

Yakov Fain

Subscribe to Yakov Fain: eMailAlertsEmail Alerts
Get Yakov Fain via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Latest Blogs from Yakov Fain
Recently I wrote a blog showing how to use the WebSocket protocol to push the data from a Java server to a JavaScript client. This time I’ll keep the same code on the server, but the client will be written in Dart. For this example I was using GlassFish 4.1 server, and IntelliJ IDEA 14...
Then I’ve received an LinkedIn email from this woman stating that she had a business proposition for me, and if I was interested, she was ready to explain. She also provided her email that ended in outlook.com. I checked her LinkedIn profile again. Looked legit. She even had a Twitter ...
I’m wondering if these developers do this on purpose or they are just random people in our profession? I was trying to sign up at this Web site. Had to enter my email and pick a password, which I did. Nobody warned me that the password had to be 8 characters until I pressed the [...
This morning I got the following email from a Java developer: “It seems you are doing less Java and more web development every year.” This got me thinking, and I decided to write this blog. Am I still a Java developer after 17 years of using this language? I certainly am. But in today...
I ran into an interesting problems with JavaFX. When the GUI is done in FXML it seems that if a scene has only shapes (e.g., Rectangle, Circle, etc.) the handler method doesn’t receive keyboard events. And the problem seems to be that there is no way (at least I don’t see it) to give a...
The next decision to make is how to communicate with the Java backend. Forget about JSP, servlets, and JSFs. Preparing HTML in your Java code is out of fashion. A Java server exchanges the JSON-formatted data with a single-page HTML/JavaScript front end, which use either AJAX technique...
This year I’m planning to run a one day workshop at a couple of software development conferences and privately for IT shops. The goal is to introduce JavaScript and related technologies to developers that are accustomed to developing in classical object-oriented languages like Java, C+...
On the server side we always use Java and have no plans to switch to any other technology. After spending many years developing the front end with Adobe Flex framework and ActionScript programming language we got spoiled by this super-productive environment. After the mankind led by Ap...
Finished writing the WebSocket chapter for the second edition of my Java 24 Hour Trainer. In this blog I’ll show you one of the code samples from lesson 28. Pretty often you need to write a program that publishes the same message to all connected clients. For example, multiple cl...
Finished writing the JavaFX chapters for the second edition of my Java 24 Hour Trainer. It included a sample code of the Tic-Tac-Toe game. The front end is done in FXML and the application logic is written in Java. Using FXML allows to substantially minimize the amount of Java code. Th...
Attention span is getting shorter and shorter. At least mine. I can’t do the same thing for 50 minutes straight, can you? Books became thinner. In the past getting a 1500-page book on programming for $40 would be considered a good deal. Now people don’t want to buy books th...
Not sure how IT book publishers can survive these days. People are intoxicated with free content. During American Civil War soldiers were bringing liquor to the camps by hiding it in their boots (a.k.a. boot-legging). But this is the ancient history of America. With soft media, there i...
Here’s  is a quote from the About page  of the Web site ehow.com: “eHow is your one-stop online resource for life’s challenges. Professionals in every field come together to offer expert advice, backed by the additional support of a can-do eHow community.“ Exper...
Yesterday I’ve been updating code examples for the messaging chapter for the 2nd edition of my Java book. While doing this, I ran into an issue, then fixed it, but the cause and the solution illustrate the situation that we call “Ear-Eye”, which comes from and old jok...
Seasoned Java programmers are programming to interfaces. What does it means? Let’s consider a simple example. Let’s say I’ve declared a variable customers of type ArrayList: ArrayList<Customer> customers = new ArrayList<>(3); While this code is correct...
Java has a pretty powerful mechanism of error handling. But sometime programmers ignore it. Recently I’ve seen the following post in one of the production support chat rooms: Developers, please don’t do this: } catch (IOException e) { //do nothing, just ignore it } finally ...
Typically, the conversations that involve Google’s hiring process revolve around the cool questions during technical interviews. Something like, “How many piano tuners are in San Francisco?” Business Insider even published and article titled “15 of Google Interv...
I spent the last week in the beautiful island of Crete. It was my second JCrete unconference. Last year I was blogging each day and you can see all these blogs here. This year JCrete was as good as always. Geertjan Wielenga wrote a detailed report here. Stephen Chin’s took an awe...
Probably the most popular question during Java technical interviews is “What’s the difference between abstract classes and interfaces”. In my own three year old book I’ve offered the following answer: “An abstract class may contain code in method bodies, which is not allowed in an in...
Some time ago I blogged that Java Swing should be deprecated and replaced with JavaFX. In this blog I’ll show a piece of JavaFX namely event handlers and binding. I’ve created a simple Sign In window with a GridPane layout (it’s JavaFX equivalent of Swing’s GridBagLayout). I’m not goin...
During my training classes on Web development with Java I used to ask students this question, “Do you think it would be a smart move if Amazon.com would create their online store using Java Applets?” The right answer is “Yes, if their goal is to go out of business....
While working on the second edition for my Java 24-hour Trainer book I’m re-writing some of the code samples to use lambda expressions. Today I was re-writing an example for wait/notify for the chapter on multi-threading. Beside illustrating the wait/notify, I used a closure in this ex...
In 2011 Wiley (Wrox) published my book “Java Programming. 24-Hour Trainer“. To be honest, I don’t like the title because it misleads people as if this book promises that the reader can learn Java within 24 hours. But creators of this series (many titles were published under this umbrel...
Yesterday, I decided to re-write with lambdas one of the example I use while explaining polymorphism during my Java trainings. I realize that lambdas promote functional style of programming, while polymorphism is one of the crucial object-oriented features. Still, I decided to try mixi...
If there is one thing I hate about the Internet it’s the damaging effect that social networks like Facebook have on people’s minds.  Some of the younger minds are getting complete out of touch with the real world. They create their image to be seen online as super heros, ba...
Here’s a simple Java program that I wrote to test Swing GUI in Java 8 (I use JDK 1.8.0_05-b13):   import javax.swing.JFrame; import javax.swing.JButton; public class HelloWorld extends JFrame { public static void main(String[] args) { JFrame myWindow = new HelloWorld(); // C...
Last week I was participating in JEEConf – a Java conference in Kiev, Ukraine. It was the fourth annual conference attended by 700 people despite of the unrest on some of the Ukrainian regions. Kiev was quiet, peaceful and nice looking though. A day before the conference I’...
This will be the easiest blog to write because I’ll just copy/paste one of the today’s email threads. I swear, I have not changed a word. X. Modern Web Application development for Java Programmers: 1) Is this the first iteration of this course? 2) If no, do you have any tes...
While testing the new JMS 2.0 API, I wanted to see an example of the remote client connecting to a messaging server. I decided to start with the HornetQ messaging server that’s embedded into JBoss Wildfly 8. Folks from JBoss sent me a link to the the GitHub project Wildfly/Quicks...
First, there was no GMail.  There were Yahoo!, hotmail, aol, and other OK email services.  At work, we were forced to use Microsoft Outlook. I happened to select Yahoo!. It had simple to use interface and it worked. Then Google created an exemplary GMail single-page Web client plus sma...
I’m sure you like the music by Leonard Cohen. One of his hit-songs  has the words “First we take Manhattan, then we take Berlin“. The Russian authorities sing it differently: “First we take Crimea, then the Internet”. Yesterday, Russian authorities started...
I spend a large portion of my time preparing courseware materials, writing books and technical documentation. These documents include hyperlinks, and some of them can be a 100+ character long. Do you include the long URLs in your docs? The immediate answer is to use one of the services...
Recently I decided to stop running my traditional online trainings Intro to Java and focus on offering more advanced training programs. Over the years I had lots of Java training materials and decided to record and publish 18 video lessons covering Intro to Java and Java EE. I started ...
In June a large expo and a conference Cloud Computing comes back Javits Center in Manhattan. This year it includes a new track Internet of Things, which promises to be “The Next Big Thing”. In our company we have enough of early adopters of anything related to software deve...
After the Berlin Wall collapsed, the world population started to see Russians up close and personal. The world got to learn that Russians are not always walking with balalaika and vodka while being chained to a bear. European cities are filled with Russian-speaking tourists. They look ...
I enjoy the process of developing software, which includes many various activities. But learning and teaching new software are the two activities I enjoy the most. During my 30-year career I’ve been working as an independent contractor, taught countless training classes, prepared...
I like Groupons. I really do. Groupon already saved me lots of money.It introduced me to lots of new places. It can bring a real value to me, the consumer. Groupon does it perfectly when there is a match between what I need and what’s offered. This happened to me twice so far, an...
After years of running traditional in-classroom and online trainings “Intro to Java and Java EE” I decided to try something different: I’ll record training videos and will be publishing them once a week for free. These lessons will have references to my powerpoints, a...
Recently a bunch of workers from our company went to a restaurant. One of our guys asked if he could bring a friend who was in town. Sure, why not. The dinner went well, we were talking about various things from the quality of honey pepper vodka to what dependency injection brings (doe...
Recently I made a presentation at the CTO School in Manhattan about running a virtual company, where people work remotely from different countries. Actually, I’m a co-founder of two startups (consulting and product) where majority of the people working remotely. The slides of thi...