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
I was experimenting with Java HashSet, which is a pretty expensive collection to create, but it has a benefit of the O(1) performance on the retrieval of elements from this collection. Based on my experiments performance of HashSet is improved over the last year. I’ve written a small ...
I’ve received an email from an enterprise Flex developer who’s looking to converting a number of applications to JavaScript. He asked a number of questions, and I decided to write a brief blog with the answers. His email stared like this: “We have a bunch of existing ...
Say you need to hire a Web developer experienced with Angular. What would you expect the developer to know? Well, he or she needs to know how to create Angular components, what’s data binding, dependency injection, routing et al. But this is just the tip of the iceberg. Below is ...
TypeScript includes the keywords public and private to control access to the members of a class such as properties or methods. But being a superset of JavaScript, which doesn’t support the private keyword, using private members in TypeScript is not what you may expect. Let’...
So you’re an expert programmer and decided to write a technical book? Think twice. Why do you want to write it? These are possible answers: 1. All these years I’ve been using the IT knowledge so generously shared by other people, and it’s time to give back to the comm...
ECMAScript 6 standardizes the syntax of modules. A module is simply a Javascript file that you can load either on the application startup or lazily on the as-needed basis. ES6 modules give you complete control on what code to export to the external scripts and what to keep private to t...
Over the past three years my colleagues and I prepared and delivered multiple trainings “Modern Web Development with AngularJS and Java“.  We felt pretty comfortable with the framework, and the training  was structured around building a sample Online Auction app with Angula...
These days people are accustomed to logging in to various Web sites using third-party authorization services. Do you want to login using your Facebook or Twitter account? In technical terms, this means that you are being offered to delegate the process of authorization to a third-party...
I was preparing code samples for my ECMAScript 6 (ES6) workshop. ES6 has tons of new language features and programming in the next version of JavaScript is a lot of fun. In particular, ES6 supports block-level functions, so the following code should produce the error “doSomething...
The second edition of my Java tutorial went on sale. While this is not my first book, it’s special, because it’s a second edition. When you see a second edition of any book, it means that the first one was successful (i.e. was profitable for the publisher). I don’t re...
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...