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 this presentation are here.
Modern Web Development for Java Programmers
We’ve just started to work on the curriculum of the new online training titled “Modern Web Development for Java Programmers”. This course will be taught by practitioners from our company, Farata Systems. The initial desription is here: https://github.com/yfain/WebDevForJavaProgrammers.
Your feedback is appreciated.
Preventing Sublime Text leaks in Git
During the last year I’ve been using Sublime Text editor for all of my new text-writing activities.
During the last year I’ve been actively using the version control system Git for our O’Reilly book project.
During the last I’ve been using GitHub hosting for my public projects.
Here’s the problem. Say, you’re a like me – a technical person producing IT content in Sublime Text publishing it on Github. Now imagine, you’re not like me – you have a mistress, and one day you wrote her a love letter using Sublime Text editor. Do you want the content of this letter to become publicly available on GitHub? If you do, stop reading. Now.
Here’s the privacy hole. Sublime Text editor creates a file with the name extension .sublime-workspace. I don’t know all details about what Sublime creators were planning to store there, but it stores unsaved buffers, and I was surprised to see there some texts that were not meant to be public. But it was available to the entire world on GitHub along with my other stuff! Open your .sublime-workspace and let me know if found some surprises there.
To fix this, you need to do the following steps (to the best of my knowledge).
1. Add the line *.sublime-workspace to the .gitignore file in your git repository. The .gitignore is a hidden file, where you can list all the files that should be ignored by Git in future commits.
2. Remove the existing sublime-workspaces file from your Git repository by issuing the following command:
git rm –cached YourFileName.sublime-workspace.
3. Run git filter-branch to remove this file from the history of all branches as described here.
3. Commit and push the changes to Github as usual.
If you’re new to Git and GitHub, you can watch our Introduction to Git video.
Here comes the bad news. Since Git is a distributed version control system, people who forked or cloned your Github repo can enjoy (and sell to the yellow press) that bloody letter you wrote to the mistress. Back to CVS!
Why Ozon.ru loses business
Yesterday I decided to purchase some audio books in Russian language. Buying paper books is a nuicance, and what can be easier that downloading an mp3 file right after you pay for it?
Ozon.ru is the #1 Russian e-Commerce portal (they call themselves “Online Megamarket #1”). It’s almost like amazon.com here in the US. Kinda. So I found the audio I wanted, added it to the shopping cart and was ready to pull out my wallet, but got this message:

In English it means the following:
“Yakov, You’re planning to order a shipment of an item, which is not a printed book. Unfortunately, it’s not possible. To continue, please remove the items, which are not books. Currently we’re working on increasing our inventory avalable for the international shipments. We hope to offer you better inventory and service in the future.”
I was surprised to say the least. International delivery of the audio files shouldn’t be overly complicated for the #1 online store in Russia.
The story was not over. Next morning I got the following email from ozon.ru:

It reads, “Hello Yakov, Sometime ago you’ve added goods to your shopping cart, but didn’t complete the order. You can return to these goods at any moment, but remember that our stock is limited, and you can reserve these goods only after the order is complete.
I’m a subscriber of Amazon’s service Audible.com and buy audio books from them all the time – it’s great and easy to use service. I guess, Audible spoiled me.
My first thought was that ozon.ru has only a CD version of this mp3 file. But if this is the case, they simply loose business by not offering direct downloads. Does it mean that they don’t know how to run business?
Then I applied Sherlock Holmes’ science of deduction and figured out that most likely ozon.ru decided to sell only a CD version of the the mp3 just to have a tangible item to ship. Otherwise they’d need to create an infrustructure for the digital right management, which is mission impossible in Russia.
No hard feelings, ozon.ru. I know, you have to operate in a tough environment. Let’s wait for the better times.
Update. After I published this blog one of my readers suggested to try this service: http://www.imobilco.ru/music/audiobooks. I tried. Very little variety, but when I found the audio book I wanted to buy it displayed me a message “Currently not in stock”. The mp3 file is not in stock? God bless America! Happy Thanksgiving!
Starting new Web project
We had a project kickoff meeting this morning to discuss tools to be used. This is a consumer-facing single-page Web application (SPA) that will also have a back-office part to be used by the business owners. During this meeting our engineers suggested a list of software. This list will grow, but I thought you might be interested to see it as it is now.
1. Web designer uses Balsamiq Mockups for prototyping and Twitter’s Bootstrap framework for styled components. We’ll use responsive design principles, so the app will look good on the mobile devices too.
2. Build tool: Gradle
3. Continuous Integration: Team City (JetBrains). We’ll configure automatic builds, unit tests, code coverage findbug.
4. Version control system: Git. The hosting site: Bitbucket. We’ll also use Bitbucket’s Wiki for doc, and Issue tracking feature for bugs.
5. Java Spring 4 framework. The version 4 is still a release candidate, but our engineers are convinced that it’s safe. IMO it’s a little too risky given the fact that the application should go live in 3 months, but we can always fallback to the earlier release. In particular, we’ll be using the following Spring modules: Core, MVC, Data (maybe), Boot, and Security.
6. Consumer-facing front end will be developed in HTML5 using AngularJS and Bootstrap frameworks.
7. The Back-office UI: HTML5 ExtJS framework.
8. Data persistence: MySQL 5.6
9. ORM: either none or MyBatis
10. Code Generators: Apache CXF for WSDL schema, our home grown Clear Data Builder for back office Ext JS-Java CRUD generation
11. Full text search: Apache Solr
12. Web Servers: Nginx server plus servlet container Apache Tomcat 7
13. Deployment – one self-executable Jar with embedded servlet container (Apache Tomcat)
14. Exploring monitoring of servers with Newrelic and Takipi.
15. IDE: One developer uses IntelliJ Idea, another – Eclipse IDE
The client and the project manager (yours truly) are based in New York, the back-end developer is from Toronto, Canada, Web designer and Web Developer/Team lead work from Russia, the sys-admin works from Ukraine. For deployments we’ll be using our data centers – one in Florida and another one in New York.
This is it for now.
Java Swing Has to be Deprecated
Every time I start teaching my new Java class I’m looking at the Swing units in the manual asking myself, “Why my students need to know Swing framework?” Well, I need to teach them how to program GUI, event listeners, asynchronous worker threads and event loop that are pretty much the same in every programming language that deals with UI. My students create applets and test them in appletviewer, then they are going through hard times trying to run them in Web browsers… In the end, I tell them that they won’t be going doing Swing programming in the real world projects. I also tell them that if Amazon.com would decide to re-write their UI in Java they’d be out of business in no time.
If not with Swing framework, how should my Java students learn GUI programming? There is another Oracle product called JavaFX. It’s a better looking wrapper for Swing. It still runs on JVM, so Amazon would go out of business as quickly as with Swing, but at least with a better looking UI.
Java developers look down at the HTML/JavaScript crowd. Yes, programming in JavaScript is not as productive as in Java, but HTML5 applications usually look nice. HTML5 developers know that having a Web designer producing professionally looking CSS is a must. Whereas Swing components are ugly by default. They are so last century.
Recently I was attending a presentation on a particular Eclipse plugin that could produce Web reports. The speaker was using Twitter API to demonstrate how easy it was to generate a report finding tweets based on a certain hashtag. Tada….Report is generated, the Web browser opens the report’s URL and pops up the modal dialog asking to enter the search parameter. What an ugly dialog box that was! Eclipse grey style, 90% of its real estate was empty with an input field on top prompting to enter the parameter’s value. No one in the audience (all Java developers) seemed to care. They are all used to ugly GUI in enterprise applications. OK, this product was using RCP UI components, but the Swing ones are definitely not better.
The sooner Swing is deprecated the better. Even if JavaFX has no future in the Web or mobile applications, it has to become a mandatory replacement for Swing. Just because it promotes a better looking UI. Just because it promotes better taste among Java developers, who live in two different realities: the ugly depressive GUI at work and the eye candy world of iOS or Android applications. Let’s make a first step toward merging these worlds by killing Java Swing framework.
Intro to working with Git and GitHub
In October of 2013 My colleague Victor Gamov and I ran a presentation “Intro to working with GIT and GitHub” for the Princeton Java Users Group.

Then we’ve received a number of requests asking if a recording of this session was available. We didn’t record this session back then and promised to find time and record it, which we did. The recording is here. Please note the Full Screen button on the top toolbar of the recording.
Analytical Thinking for Dummies
Some people believe that only good math students can become computer programmers. Nothing can be farther from the truth. To be a successful programmer, a person needs two talents:
- Logic
- Analytical Thinking
Logic is needed because the majority of programming in the enterprise world is about writing if-statements. If this happens do this, otherwise do that.
Analytical Thinking is an ability to take what seems to be a complex problem and turn it into a set of simple steps. I’d like to share with you a simple expample illustrating what is analytical thinking.
On Wednesday evening I was walking along Broadway in New York City. While passing a Citibank branch, I noticed a girl who was standing there exchanging text messages with someone. Clearly, her phone was out of juice, but I’ve been wondering how she managed to reach the electric outlet conveniently placed this high?
Somehow the metrics didn’t work out, I took a photo and published it on my Instagram and Twitter accounts with the title “Girls Can Jump”, and one of my followers posted a funny comment, “It’s not the worst thing to expect from Android”. But I was trying to recreate the situation with the outlet, and decided that she asked some tall guy to insert the plug. I was still wondering, how she’d unplug the wire? Would a simple jerk motion do the job?
Yesterday, I’ve published my regular audio podcast about America (it’s in Russian) and asked the audience to offer their version of this puzzle. One of my listeners goes under the nick CoderA – he’s a software developer from Moscow. He answered with a picture that’s worth a thousand words:
And this is a great illustration of what analytical thinking is. Taking a complex task (“Just figure out how she did it?”) and turning it into several simple ones:
- What’s the distance between the electric outlet and the floor?
- What’s the hight of her shoulder?
- Whats the length of her arm?
- What’s the length of her forearm?
- How standing on her toes could extend her reachability?
After adding all these numbers together (the sizes are in pixels), it’s clear that this girl could have plugged it in by herself!
You can start arguing that the numbers may be wrong, but it’s beside the point. What’s a lot more important that CoderA has analytical skills and being a sofwate developer is the right profession for him. When during technical interview at Google they ask candidates “How many piano tuners live in San Francisco?”, they don’t expect to hear the exact number. They want to see the job applicant would try to find out this number!
If anyone from Google reads this post, consider extending a job offer to CoderA. We all know that knowing the syntax of the if-statement in a particular programming language is an easily obtained knowledge. But figuring out how she reached the electric outlet is not a trivial task. It requires analytical thinking.
How Many People do you Follow on Twitter?
I like Twitter. It’s a telegraph of the 21st Century. It’s quick, messages are short and up to the point. But I’m trying to keep short the list of accounts I follow. As of today I’m following 52 accounts, and this is a reasonable number. I mean, I am actually reading about a half of the posted messages.
When I see that someone is following more than a thousand accounts, it’s clear to me that he used one of these programs that can bump the number of your followers to thousands or tens of thousands. They work on a simple principle – if I’ll start following you, many people would follow you back just to be nice. Twitter API is simple, and any junior programmer can write a program that will automatically start browsing random accounts using as long as someone entered valid Twitter login credentials. Run this program for a day and the number of the accounts you follow will go over a thousand, and the number of your followers will substantially increase too. By doing this, you agree to manually sift through the thousands of messages to weed out only those that were published by accounts you really interested in.
This technique is being abused by people who are selling their “online marketing or search optimization services” to people who may even have no idea of what Twitter is. I’ll show you an example. Today, my Twitter account reported that I got three new followers. I usually take a quick look at each of my new followers. Let’s do it together. One of my new “followers” was Denise Landis.
Let me assure you that this smiling lady has no idea of who I am. She “follows” more than 300K accounts and is being “followed” by more than 300K accounts. In reality, most likely she has a very slight idea of what Twitter is. Let’s apply the method of deduction to recreate the crime scene as Sherlock Holmes would have done.
One day, Denise, who runs the Web site “The Cooks Cook” got an email from an a company Marketing Spammers promising to increase the traffic to her site for a nominal fee. She has agreed. Then these marketing guys have created a Twitter account for her (she didn’t even know this word at the time), bumped up the number of her followers to over 300 thousands, and showed her how to poblish cooking related posts on twiter once in a while.
Web Analytics tools proved to Denise a substantial increase of the traffic to her cooking Web page, because many of these followers (myself included) clicked on that link in her Twitter profile out of curiosity (I did it just for the sake of this blog). Denise is happy. Marketing Spammers are happy. Denise has no idea that the vast majority of the followers will never go to her Web site again. Some anal people (like me) will take the time and block her account. I’m not going to bother reporting it as spam, cause Denise has no idea of what’s going on. Once in a while Denise cuts a new check to Marketin Spammers and they run their program again. A short term traffic increase is clearly shown on the Google analytics reports.
It’s elementary, Watson! Next month Twitter will become a public company valued between $10 and $12B. I’ll buy some shares in a couple of weeks ofter the IPO.
Congrats to Twitter and best of luck to Denise with her cooking business!
Healthcare.gov: Who Crafted the Suit?
I’m sure every person who is involved with development of commercial Web application knows about this huge failure – release of the healthcare.gov. I’ve been following this story too, because it’s about the software development – my bread and butter.
I don’t have experience of building Web applications that have to serve tens of millions of customers. I’m just a co-founder of two IT companies: one created software product that’s by more than 100K insurance agents, and the other one is an IT consultancy that helps customers in creating large online stores. But when it was reported that people can’t even login to the system, it was clear to me that the application would require some serious redesign. It’s not just about applying some patches here and there.
People who developed this site made their mistakes, but let’s not simply badmouth them – based on bits and pieces of information we’re getting, the roots of the problem are in the product owner – the government. The product requirements kept changing as recent as six months ago. Initially, the healthcare.gov was supposed to allow browsing insurance marketplace anonymously. WSJ wrote that the requirement to force people login just to enter the application was given only a month(!) ago, which required a very serious change in the application architecture. Now the IT contractors were tasked to introduce the infrastructure of authentication servers capable of processing millions of people.
The fact that this was a pet project of Barak Obama put tremendous pressure on people who were building this system. All these fanfares about October 1st opening were not credible as many other speeches by the President of the USA. CNN reports that the Web site was crushing during the tests with several hundred users, but the administration decided to go live anyway. WAT? Did they expect a miracle? A couple of years ago a prospective client called us for help stating that they’ve developed an online casino, which was supposed to go live in a month, but worked fine only if… there was a single user.
The statement that “our team is bringing some the best” and the brightest minds to fix the issue is promising, but it’ll take time to not fix, but redesign the system. I’m not the best and brightest mind, but I know how the best and brightest started working on this issue. They need time to learn the current version of the system, which some people say is a half-million lines of code. Three weeks after healthcare.gov went live it’s still not working. If a system can’t be fixed in three weeks, it has very serious design flaws. Sending navy seals won’t help here.
It’s funny to hear from people who were developing different component of the system statements like “We’ve developed only the UI portion of the system. After the user hits the button Apply Now, it’s not our code”. Other people happily report that the data hub is operational.

Forty years there was a popular Russian-speaking comedian Arkady Raikin. He had a sketch appearing in a very poorly crafted suit. He came to this made-to-measure suit store asking, “Who crafted this suit?” One of the craftsmen shows up asking “Do you have problems with the buttons?” “No, the buttons are sewn really well, but who crafted this suit?”
Computer World magazine wrote an article stating that healthcare.gov “didn’t have a chance in hell“. 94% of projects that cost $10M or more fail(!). The author of this article writes, “The healthcare.gov contractor was initially awarded more than $93 million for the project, but costs have been soaring above that.” OK. Was this a typical situation when the salesman of this IT firm was tasked to win this project at any cost, and later on “our guys would figure out how to deliver”? Or the IT firm signed off on a project scope that was substantially increased later on? This is a super high-visibility project, so there is a hope that we’ll find out who did the initial estimate of the job, and who changed the scope. Interestingly enough, at this point nobody remembers who and when introduced the requirement to force people to create an account first and then browse the insurance marketplace? Was it even in writing? Maybe an email? No? Nada? Nyet?
Recently Barak Obama said that the good part of being a president is that people always return your phone calls. There is another advantage of being president. When your subordinates deliver really bad software, you get to simply say “Nobody’s madder than me about the website not working as well as it should”. What do you thing would happen if I’d deliver to the client a non-working Web application and said, “Nobody’s madder than me?” Who am I. Definitely not the president of the USA. Sometime people don’t return my calls too. Oh well.
Actually it’s not that bad. You need to give credit to the administration that was able to quickly put together a team of people who take people’s insurance applications over the phone, and the wait time is not more than one minute. Another help is on the way too. According to a reputable online publication The Onion, the new and improved Obamacare program released on 35 floppy disks.
Something’s gotta give. But what’s going to happen with this nice looking girl from the Web site? Is she even married?
Update. I was trying to give a benefit of a doubt to the team developed healtcare.gov site, but when a congressman said this morning that he couldn’t enter the date because the Web site was constantly complaining about the wrong date format, it clearly shows me that healthcare.gov was developed by a bunch of rookies that either have no clue (or don’t care) about how to do a basic validation. In this case the Web site should be redesigned from scratch.




