Bookmarks are Rotten

Does this question sound stupid to you? Any Internet user knows that every browser has the Bookmarks or Favorites menu that people should use to bookmark the Web pages they are interested in. Your Web browser even has a Bookmark Manager that allows you to build large and sophisticated trees of bookmarked grouped by categories. There used to be a service called del.icio.us, and millions users were storing their bookmarks there. Maybe they still do (now it’s not del.icio.us, but simply delicious.com). But I don’t.

I don’t even use bookmarks with the exception of a dozen of them that fit on the browser’s Bookmarks toolbar. Yep, under the menu. Every morning I go through the same ritual – I click on 4-5 links saved on my bookmarks toolbar. During the day I repeat this ritual several times. OK, I keep another 4-5 bookmarks on this toolbar, which I use once a month or so. That’s all I need. I even have a rule – if I believe that a particular page have to be bookmarked, I find the least used bookmark on my browser’s toolbar and replace it.

Google is so fast these days, that it’s faster to do a quick search on Google than trying to find the bookmark that you saved last year. And what’s more important, the content ages so quickly that visiting the last year’s bookmark will almost for sure will give you an outdated or even misleading information.

This is definitely true for any IT-related information. Being a technical book author, I’d automatically bookmarked an interesting technical article, or blog. I might need it while doing my research for the next book! Wrong! I don’t need it cause it becomes old as soon as you bookmark it. It’s faster to find the fresh content.

Let alone bookmarks. I don’t even use the Help feature that comes with all these software products installed on my computer. Finding things using Help is slow and produces the outdated info (I know how the technical writers work, trust me). Use Google – it’s faster and fresher.

Are there any exceptions that would make bookmarks useful? Maybe, travel sites? Paris is still there, right? Wrong! What do you need in Paris? A good place to eat, to sleep, and things to do. This information gets old too. You’ve stayed in that hotel 3 years ago and it was great? Go to TripAdvisor and do a quick search to see what people who stayed there last week have to say. Ouch, they started the renovation last month, there is scaffolding in foyer and the construction workers are all over the place.

Anyway, bookmarks proved to be useless, at least for me. I have a supermarket called “A & P” in the area. I don’t go there, but I like the motto on their sign: “A & P. Obsessed with freshness”. Let’s be obsessed with freshness too. Get a fresh piece. Don’t use these rotten bookmarked products.

Run Away From Information!

In the past people would go to professionals because of the lack of information. Now they go to profies because of its abundance. This happens everywhere. If 20 years ago you had stomachache, you’d go to a doctor. Today, you go to Google to find out what helped other people when they had stomachache. After spending several hours trying to narrow down the symptoms so they’d match yours, you’d give up and go to the doctor. OK, I can understand such a pattern.

But people don’t stop there. This is how it works more often than not:

1. Got stomachache.
2. Go to Google.com and enter “I got stomachache”.
3. Several hours later, call your doctor and make an appointment.
4. Visit your doctor and get the prescription for XYZin to be taken twice a day.
5. Go to Google.com and enter “XYZin”. Confirm that it helped to most of the people with stomachache. Pretend that you haven’t even seen those two nasty posts about a cousin Vinnie why died from XYZin and about the little Mary who’s still in coma after taking three pills of this medicine.
6. Go to the pharmacy, get XYZin and take it once a day – people on Google say it’s good enough.

Am I right or am I right, honestly?

Yesterday, I started teaching my online Java class. There are tons and tons of free online Java tutorials, videos, blog posts, and inexpensive books. But still, thirty people from around the world decided to pay $500+ each so I’d be leading them through this humongous waterfall of the information so they could get from zero to hero the most efficient way. Needless to say, that before enrolling into my class all these people spend hours studying my credentials before parting with their hard earned money. Fine. I can respect this.

For each of my groups I create and online forum so students can communicate and help each other. One of the first messages posted in this forum was a list of links to various online tutorials and videos of other Java lecturers. Some of the people also asked me to review those links and provide my opinion if they are useful or not.

Dear students, during the last 15 years I’ve read, watched, analyzed, wrote, commented, responded to comments, presented on anything and everything related to Java. I’ve sifted through all this information, squeezed it out and created my own concentrated and healthy Java juice. I successfully tought Java to a couple of thousand of people. Please take my XYZin. You won’t be disappointed.

95% off

Last Summer I wrote about a weird 96% Off deal. This morning I got an email with even stranger proposition. The want to suck my extra fat off for 5% of the cost of this pleasant procedure. Actually, it’s up to 95% off. For a lousy $99 they promise me this:

lipo

I’m not going to lie to you. I like tis photo. I really do. And the panties look nice and inviting.

“20- to 40-minute noninvasive treatments employ ultrasonic waves to reduce fat in areas such as the abdomen, thighs, and upper arms.”

Nice. But why 95% off? Do they assume that after attending this establishment I’ll fall in love with these ultrasonic waves and will create a new ritual of attending this liposuction place on a monthly basis for $1.5 grand a pop? Does it means that liposuction procedure works for a short time and then you are hooked on waves?

Nay, I’m not buying this deal. I’d rather save these $99 too and will finally start this 200-pushups program, which is 100% free. But let me tell you, I like this photo!

Me no talk English? Me no good programmer.

Our company, Farata Systems, hires lots of offshore developers who work for us and our clients from the Eastern Europe, which has plenty of good developers. Ten years ago, Indian developers were more competitive comparing to Russian-speaking programmers for only reason: their English was better. You may not believe me, but not only they could read, but all of them could even speak English!

The situation is slowly changing and more and more developers working from behind the iron curtain (btw, is the cold war over yet?) can speak English. While interviewing developers living in the Warsaw Pact countries, I speak Russian for the most part, but always switch to English for five minutes or so.

Why do I want them to speak English? Of course, some projects require direct communication with our clients from the USA. But we also run internal projects where no communication in English is needed – the entire team can speak Russian. We still want them to know English, and for a different reason. In today’s IT world, almost 100% of the latest and greatest information is being published in English: books, blogs, screencasts, videos, conferences, Stack Overflow, and other forums. Sure, some of the books will be translated into other languages… in several years. It’s a bit too late. Google Translate might somewhat help, but it’s a stretch.

If a software developer does not know English – s/he doesn’t belong to our profession. S/he doesn’t care to master the latest and techniques and technologies fresh from the oven. Your English doesn’t have to be perfect (I’m sure some of the native speakers will find poor grammar in this blog too), but you must know and use English to be better programmer.

Last year, someone asked Douglas Crockford, a JavaScript guru, if junior developers have something in common. He gave a very good answer, “Lack of curiosity”. I’d add, ” and poor English”.

The Code Review Day

No, it’s not about the peer code review. Colleagues go easy on each other. They get lazy. They can’t be held accountable if a low quality code will sneak into the final product. Ain’t broke, don’t fix. I know about code coverage tooling too. They can help to some extent. But nothing beats the code review performed by a team lead. You can’t even imagine what can you find in people’s code.

First of all it’s like “Lost and Found”. The amount of the dead code is substantial (I know, some code quality tools can find it automatically). But morst importantly, people write poorly structured and inefficient code that can be easily identified by an experienced eye.

– Why did you write three loops, couldn’t you do it in one?
– Yes, I meant to change it later, but just forgot about it.
– We’ve agreed on using a fluid grid on this screen, where is the CSS?
– Sorry, I decided to cut corners cause the proper CSS was not obvious in the first place – I’ll change it now.
– What was the point of modularizing the application if you load all the modules on the application startup?
– Oops, no worries, give me a couple of hours and I’ll fix it.
– Why is this variable static? Do you really need to share it between all instances?
– C’mon, don’t be anal picky. You know how it works. Ok, give me an hour.

Let’s announce the first working day of the month
“A Code Review Day”.

During this day the most senior person in your team does nothing but reviewing the code of more junior colleagues. It’s not likely that you have more than 4-5 developers per team lead. Allocate two hours per person, and you’ll be surprised. You won’t believe your eyes. You’ll start pulling your hair out. You’ll be laughing and crying. Yes, people can write such code. They are not bad people, and you can keep going for a beer with them. They just don’t care. Sometimes. Ain’t broke, don’t fix.

Don’t get frustrated. Don’t report your findings to your manager. Just quietly and politely ask people to f#@ing clean this mess! The next month do it again.

Now, when can you say that the code is written well? I’ll tell you the secret. I’ve learned it while writing programming books. Here the rule:

“The code is good if it can published in a book”.


The readers are mean. They are not forgiving any little mistake. Most of them would never survive a book writing project, but they are happy to point at every little problem in your code samples. If you are a team lead, use the same tactics – read and ask to explain each questionable line of code, but be nicer than the readers.

Agreed? Propose “The Code Review Day” during the next team meeting. If your developers are standing during such meetings ask them to sit down, cause some may faint when they hear this.

That’s all there is to it. Please share your success story if you’ll manage to implement this practice in your organization – just add a comment to this blog.

HTML5 or Flex Framework

More than a year passed since Adobe decided to stop supporting Flex framework and gave it away to Apache Foundation. This writeup is based on the conversation I had with my colleague Anatole Tartakovsky in January of 2013. In this conversation I’ve been representing the HTML5 community while Anatole fought for Flex framework. I’m trying to find arguments against using FLex framework even though I believe that it remains the best and the most production way for developing Web applications. I’ll be just playing devil’s advocate here. Anatolepoor and ill also believes that Flex is the best framework available today, but in our company we often argue about the tools to use for various projects. We hope that Web developers find this conversation useful and thought provoking.

Yakov. If you read this blog, most likely you know about our company, Farata Systems. Our engineers work on both consulting projects and develop a product for our sister company SuranceBay that creates software for insurance industry. Technology-wise, we have three practices:

1. Rich Internet Applications using Apache Flex and Adobe AIR
2. Web application with HTML/JavaScript/CSS
3. eCommerce applications (we have about 20 Hybris developers)

On the server side we use nothing but Java. We’re hiring people, but noticed that it’s getting a lot more difficult to find experienced Flex developers. Last week we made an offer to a Flex developer, but before accepting it, he asked me to share my opinion about the future of Flex. He knows about our company and is glad that he’ll be joining our team, but at the same time he’s worried that Flex skills won’t be a useful asset on his resume. I can read his mind, “I’ll waste a couple of years doing Flex, but my classmates, colleagues and the rest of the progressive mankind will be studying HTML5. Is it worth it?” I did my job defending Flex, now it’s your turn, Anatole, and I’ll try to prove you wrong.

Anatole. As I just learned, I’ve been working with useless technologies for 30+ years, and every technology I liked is not in use anymore. In my opinion, Flex framework has no future.

Y. What a nice way to defend Flex! Do you want to say that your programmer’s life was wasted?

A. I want to say that it was extremely interesting, but Flex has no future.

Y. Was this by M.Zhvanetsky who said, “Who cares about the soup if so much is going on in the kitchen“?

A. I’d rather say that Flex has no future, but it has the present. HTML5 has the future, but the present is dark and foggy. First, we need to decide if we live in the present or in the future. Second, it’s very difficult to properly guess the technology worth studying and using. Of course, the tools that are popular on the market will win, but they will also lose by attracting legions of low paid developers. Besides, being unproductive these tools won’t allow timely releases of high quality software. This leads to further degrading of software projects and programmers’ pay. There is a high end market, where more expensive and rare tools are being used by well rounded developers. And there is mainstream that uses various versions of HTML, Visual Basic and the like. These tools were never highly productive, but their better competitors could not attract even a one tenth of the developers community. At some point the psychiatric situation on the market causes people to not pay attention to the good tools, but rather go with the flow.

Y. Our company is not a typical one – each of the owners remains highly technical, and we don’t have any political reasons to select or reject any technology. Sure enough, we are very carefully monitoring the latest trends in the industry to be able to offer help in IT consulting. But we are down to earth people who want to deliver our own software as fast as possible without jeopardizing the quality of the product. You may be surprised, but new Flex projects are being started and the Flex-to-Flex redesigns are happening on the Wall Street – we continue getting requests for help. Such projects are typically run by smart and technically savvy managers who are not afraid to voice an opinion that may differ from the general software policy in their organiation. But an average manager does not want to take a risk and use a non-popular technology with a literally non-existent talent pool. Anatole is running the project where all developers know Flex and Java, and he’s not planning to switch to a different set of technologies any time soon. Why do you prefer Flex and AIR.

A. I’m planning to switch and will do so, when I’ll see a better than FLex technology that meets our needs. I agree to switch, but it’s like “Tomorrow I’ll marry the Queen of England. Half of this plan is accomplished – I agree“. The problem is to find a replacement. IMO, technologies like HTML5 will change the style of programming and the resulting product too.

Y. After making such strong statements, you need to say something to improve your credibility. Please tell the audience what did you work on in the beginning of this century.

A. There were no alternatives to HTML/JavaScript before the Flex framework was created. We had DHTML, HttpRequest and XMLHttpRequest, which was later branded as AJAX. The CSS capabilities were limited, but it was not that important because there was only one enterprise browser back then, and styling just worked without the need to worry about the incompatibility issues. We’ve been creating libraries having the functionality similar to ExtJS. They were not as polished, tested, and documented as ExtJS, but productivity-wise they were at least as good as today’s HTML5/JavaScript mainstream libraries. I was leading a team of 5 developers that were working on this library (XMLSP) from 1999 till 2004. But to create a product as good as Flex, the community would need to create 6-7 products that would comprise a platform that would include the following:

– a much more mature JSON that would support the skeleton generation on both sides
– a compiled JavaScript-like programming language (expecting to see it soon)
– an ability for creation of the finite state machine and CSS (give it another 2-3 years to appear)

Unfortunately, during the last seven years Flex didn’t have competitors. HTML is the future, but it’s a remote one. I don’t see it real in the enterprise applications for at least two years, but more likely till 2016.

Y. You’re talking about enterprise Web, not about small Web sites that can be easily developed in HTML5. All evangelists are happy to demo simple applications like Contact List to prove that HTML5 and their JavaScript framework is here to stay and is THE Framework to use. The rookie developers are often impressed by a demo of an HTML5 game moving objects using an HTML SVG element. To get cheap applauses at a Web conference you need to proclaim, “No more plugins like Flash or Silverlight. RIP!”. It’s even more effective than making fun of Internet Explorer.

A. True. If you want to write HTML5 application you need to seriously reevaluate what your application should be able to do. You’ll need to simplify it. A typical enterprise Web application serves the consumers that don’t use it anyway, and it also serves the professional business users that help consumers.

Y. Please don’t just make such ungrounded statements. Explain, what this means.

A. This means that consumers spend very little time using these Web applications – they they don’t use such applications from 9 to 5. These applications are being used on a weekly or monthly basis. The requirements for such applications are a lot simpler than for heavily used applications for professionals. The back office applications must increase productivity of business users and support a lot more functions. If you need to support wide variety of users, you’ll need environments allowing configurable applications that can be compiled and support quick refactoring for the new class of users or when the business requirements change.

Y. I agree that refactoring in Flex is more advanced than in JavaScript, but what are the problems with configurable applications?

A. By configurable applications I mean the ability to quickly customize the application with the same code base to support more complex or more simple interface and security. It’s not so easy to do with JavaScript, because it HTTP requests can be disassembled, you’ll have to deal with security problems, the code becomes more difficult to understand without having the compiler’s support.

Y. As far as I remember, Flash Player was also blamed for security holes, wasn’t it? Besides, since HTML5 is a mainstream, all major browsers treat security issues very seriously and all security holes will be closed a lot faster than any single vendor like Adobe, Microsoft, or Oracle would do.

A. The roots of Adobe’s security holes are in attempts to merge two incompatible security models of Acrobat and Flash Player. Now you can run Flash code inside PDF, which revealed security holes originated in incompatibility of the sandboxes. Most of these holes can be plugged by changing security settings of Acrobat and not by fixing Flash Player’s errors. But overall, Flash Player has less security issues than infamous cross-scripting of Web browsers and the likes. We are able to create secure Flash applications that would certainly had security issues should they be written in HTML5. What I really miss in Flash Player is the ability to integrate with telephony and work with peripherals that exist in natural environments. Unfortunately, Flash Player is not evolving fast enough to support new technologies for input/output and the voice interface. The main problem of Flash Player is that it was literary frozen since 2008. During the last four years Adobe didn’t do much to bring it up to date.

Y. It’s been more than a year since Adobe announced that their main interests for Flash are games and videos. You can’t expect any improvements in Flash for enterprise applications. Don’t forger that Adobe remains the owner of Flash Player, and no matter how great the Apache Flex contributors are, their hands are tied – the runtime is out of their control. I don’t like the way Adobe handled open sourcing of Flex, but they have business to run, and if they make money elsewhere, no one can force them to allocate proper resources to implement Flex and Flash Player improvements. Do you have any reasons to believe that Flex won’t lag more and more behind HTML5 technically?

A. I don’t have any hopes that Flex won’t lag behind. So far Flex and Flash player is still far ahead – we still live in the future comparing to HTML5. Yes, HTML5 has some features that make it appealing for enterprise and mobile development, and it would be great if Flash Player would continue evolving in these directions too. The main reason why Flash Player is dying is that ten years ago Adobe rejected Apple’s requests to create tools for their platform. Adobe considered this platform unproductive, and Apple had to recreate equivalents for all Adobe’s products themselves. After that, Apple stopped allowing Adobe’s products on their market. You can call it politics or personal vendetta, but unfortunately there is nothing you can do about it. Without Apple’s support Adobe’s tools will always have hard times. Will it change in the next couple of years? Not likely, unless the structure of both Adobe and Apple’s management will change.

Y. Based on what I see, Adobe won’t be willing to make steps toward Apple. Adobe prefers selling expensive and profitable software to corporations, and it’s not likely that they’ll return to Web browser’s plugins that are not welcomed by majority of the developers.

A. This is true for the most part. But historically, there were precedents when spin-offs were created to purchase some of the software products from large companies. Adobe is not the first company specializing in milking old cows (making money from old products). I.e they don’t improve some of their products, but purchase established third party companies and invest in cross-integration with their products charging the newly acquired customers for the new functionality. The chances are that non-profitable Flash platform can become a candidate for such a spin-off. Adobe might sell the Flash Player for a small chunk of cash to people who are interested in improving this technology. Unless this happens, Apache Flex is a still baby. I’ve attended several meetings in Apache Flex community, but I’ve yet to see people who can lead this community.

Y. There are lots of excellent Flex software developers in the world who could do it, but they simply can’t afford it. As I said, there is not many companies that can continue using a technology based on its merits. Flex experts need to make a living and feed their families. They can’t spread themselves thin doing both Flex and HTML5. They either work as independent contractors and want to keep their hourly rates high, or work as enterprise employees and don’t want to go against corporate IT policies. Many of them prefer to stay focused on one major technology to keep their skills in demand.

Our company is in minority, but we are not afraid to become known as one of the last Flex shops. We believe in hiring well rounded developers that are open to adding Flex to their skill set understanding that in a couple of years they may need to learn something else. By the way, some of the people are still doing Cobol and dine in Michelin-starred restaurants on a regular basis. The if-statement exists in every programming language. In some cases you’ll need to put a curly brace after if, and in some languages you need to write elseif as one word. Some languages support classical inheritance, and some – prototypal. This doesn’t scare me, but it seems that lots of people are reluctant to accept that learning something new is a way of life of professional software developers.

A. Of course, people have to take care of themselves, but if I were a young software developer, I wouldn’t worry that much about any particular technology. Let’s go back to the year of 2008, when Flash Player’s penetration on desktops was about 99% and no one could even imagine that this bulldozer could be stopped. Adobe offered to use ActionScript 3 as the ECMAScript standard arguing that they have a compiled and extended version of JavaScript, and Flash Player can be used as a virtual machine for the code produced by this language. Web browsers would simply need to recognize in HTML documents, which is an easy part.

Y. In the 90th, some people would even do language=”VBScript” for Visual Basic Script.Today, you don’t even have to specify that your scripting language is JavaScript – it’s a default in all browsers, and the language property is deprecated. Actually, you should be using the type property instead of language, and if it’s missed – JavaScript is assumed.

A. But browsers can support other languages, but there is no standard language. Sooner or later Microsoft and other companies that decided to deny ActionScript as a standard compiled language and solve the problems of performance and refactoring of JavaScript will need to solve these problems. And the future HTML6 or 7 will include a compiled language that will look very much similar to today’s ActionScript. Yes, it may have different keywords, support even more dynamic constructs and do a better job with eval, but the young developers doing ActionScript will be better positioned in three years than those who develop in JavaScript. Most likely, the ActionScript code developed today will be converted one-to-one to this new language of the future.

Y. Did you have a chance to get familiar with the Microsoft’s language TypeScript?

A. I haven’t. But when we were developing our own browser, when JavaScript would pass the first version of p-code we would create and cache automated objects to avoid recompilation of JavaScript.

Y. The syntax of Typescript extends JavaScript, but it supports static types, classes, and modules, and can be compiled into JavaScript, i.e. will require nothing, but JavaScript engine. On the other hand, Google’s Dart expect a browser to have a VM in addition to JavaScript engine.

A. No matter what language will win, the conversion from ActionScript will be mechanical more or less. It all comes down to your way of thinking and to the level of complexity you can afford in a compiled environment vs interpreted one. There is a major difference in approaches to programming in ActionScript
and in JavaScript. After spending some time designing and writing the ActionScript code you fix most of the syntax and refactoring issues during the compilation and linking stages . In JavaScript you can immediately test your code without getting error messages even if your code has the wrong syntax or linking problems. The time that Flex developers spend beatifying the code while writing it, JavaScript developers spend debugging their code in runtime. Programming in dynamic and static languages requires a big cultural shift. Developing complex projects in JavaScript is extremely difficult. If application developers have no prior experience in developing frameworks in JavaScript, they can only deliver Web applications with a set of relatively simple Web pages with limited functionality. Regular programmers who don’t remember what they have written yesterday, will have hard times debugging their own code. I’m not trying to insult people, but unless you can keep in your head all your code, the chances of producing well functioning large JavaScript application are very limited. I recommend to spend the next several years in a comfortable environment waiting till HTML6 or 7 will include a compiled language. In my opinion, when it happens, you’ll need to forget most of what you’ve learned about HTML5.

Y. I don’t agree with you. We didn’t talk about the development for mobile devices. You are talking about programming in a comfortable ActionScript environment, but why not spend a couple of years learning HTML5 methodologies and tools that would allow today’s Web developer digest the Mobile First concept, learn how to properly modularize JavaScript code, which frameworks to use in both desktop and mobile devices, what Responsive Design is about, is it possible to live with one code base for all devices or it’s better go hybrid or even native, and on, and on, and on. This takes a lot of time, and, putting yourself in the shoes of that young developer, spending these couple of years in learning all this new world won’t be a waste of time. By the way, in the book “The Enterprise Web Development” we show how to develop a Web application that will work in all devices from the same code. So I don’t believe that developing in Flex for a couple of years will allow this guy just to change the hat and start writing HTML/XYZScript/CSS code. I’m sure that just working in your team would make him or her a well rounded developer, but it’s not as obvious for other people.

A. If this developer would work in my team since 2006, he’d skip lots of frameworks like Mate or Parsley without losing much. People who say that their frameworks help in programming are the same that were promoting the Axe Soup before. One way or the other – good people is the solution. Frameworks rarely help. Tools do. HTML has a number of tools to test UI on different platforms. Similar tools were created for Flex and cross-platform CSS and skinning. But I don’t believe in miracles. I haven’t seen a single-code-base applications that work well on Android, iPhone, and desktop browsers.

Y. We need to compromise. In Flash Player applications you can choose pixel-perfect design: the user must have a 1024×768 viewport minus chrome and margins – my way or highway. But if you’ll need to make this application work on highly fragmented Android market, on iOS, Blackbery, desktops, and other devices, ask yourself a simple question, “Do we have money to hire two-three teams for developing and supporting several versions of the application for different devices or we’d rather compromise, and push the HTML5-based product out the door?” Money talks in the enterprise unless your project has unlimited budget. But if you’ll agree to compromise and move away from the pixel-perfect world accepting the fact that the Donate button will look a little bit different on different devices, go with the responsive design principles and have one code base. You’ll provide different CSS sections that will automatically apply different layouts based on the screen (a.k.a. viewport) size, but the HTML and JavaScript will be the same. I know, this approach has drawbacks cause some portions of CSS will be loaded for nothing to any particular device, but it can be a practical business solution.

A. People who promote the same design for different platforms usually talk about publishing information and not about interactive applications. If you need to publish the information using different layout managers, responsive design will help. But enterprise applications often have more than one target audiences. Consumers need an easily downloadable application and Web browser works fine here. Mobile applications should be compiled either into the native code or into some byte code that performs close to the native one. But UI must be different based on the available screen real estate and use touch interface.
If you’ll take any framework that works on both desktop and mobile devices you’ll get two sets of controls and the need to maintain two different source code.

Y. Nobody forces you to use any framework – just stick to JavaScript and, maybe, non-intrusive jQuery components and plugins.

A. Without frameworks I’ll have less UI controls to chose from. Frameworks may address the need in controls and convenience of UI.

Y. and browsers incompatibilities

A. Maybe. But when I hear that someone has the same codebase for the desktop browser and other devices, I want to see it and make suer that it doesn’t falls into the publishing realm.

Y. Of course, the Boston Globe site is a classical example of responsive design in publishing. But we can even take an application that we use in our book – Save Sick Child http://enterprisewebbook.com/#_responsive_design_one_site_fits_all. We have five areas (div’s) that include forms (a donation form or an online auction), each form is a separately loadable module, and if on the wide screen we could display three of these div’s horizontally and two underneath, on the narrow screen each of these sections will be scaled down and displayed one under another. And this is not just a publishing application.

A. When I’m porting an application to a tablet 800×600 with UI having large controls and fonts, I need to think about this application as a service to minimize the need of data entry. Don’t forget that half of the screen will be taken by a virtual keyboard, and if you ignore this, the user will have to work with your UI via a keyhole, and even these five separate div’s may not fit. So I’ll need to modify the UI and use the set of controls that will require minimal data entry. I don’t want to give the same UI to the consumers and back-office users.

Y. I keep trying to bring the money into our conversation, but you are avoiding this subject. Sure, it’s better to be healthy and wealthy, than poor and ill. But most of the enterprise projects are poor and ill, i.e. have limited budget and developers are not overqualified. Why a modern enterprise employs many low-qualified people is a subject of different conversation – let’s not go there.

Coming back to my five div’s, we can use CSS to hide what has to be hidden in certain devices, fonts can become larger, and we can use so called fluid grids to have our layout float. It may not be perfect, but it’s a compromise.

A. You can’t turn a truck into a car and then into a bike just using styling. I’m for complete redesign to use the features of a particular platform to its fullest. And the reason why IT has so many low qualified people is because these people allowed non-technical people to lower their qualification. We can help them to improve their qualification.

Y. Most people don’t want it. They live comfortably with what they know.

A. You and I are sitting now in a lobby of a fancy hotel that differs from a motel, right? Why? Because we’ve decided that the service has to be well compensated. And people working in this hotel do their job well. There is always market for the high-end things, which were produced better then others of the same type. If you’ll be producing low quality software, you’ll hate your job, which will shorten your life. Why?

Y. I hear you, but don’t agree with you. It’s great that you and I can afford now (it may change) to work only with interesting projects. But many young programmers have a long way to go before they will establish themselves to pick what they really want to do. Id your message “Just do what you like and the day will come”?

A. If you need to work hard to establish yourself, why doing it where the crowd is? Do it in the unpopular areas.

Y. Most of the people prefer to walk on the paved roads. It’s a reality.

A. Compare software and automotive industries. Some time ago you could have selected any car as long as it was black Ford of a certain model. Then General Motors started mass production of cars where people could select different models of different colors. By dong this they pushed Ford back. The software industry will go through the process of customization. We already reached the point when the software created for a certain enterprise is being replaced by a software-as-a-service (SAAS). The next task is not to create several versions of the same page with CSS, but understand what the user is doing with this page and to make it as convenient for the user as possible. If this will be happening, then software developers will transform into people who belong to service industries.

Y. I may disappoint you, but there were many attempts to cultivate a new creature – a cross of the user experience (UX) specialist and a software developer – it didn’t happen. These are different people with different mindsets.

A. in the end the winning applications will be not the ones that will have nice looking design, but those that will do what the user needs and will do it conveniently.

I have to finish this rather large transcript although our conversation didn’t stop here. Thank you for reading this far. I’m not going to give you a summary with recommendations or predictions of what tool or programming language is the best bet in today’s development of the cross-platform UI. Pick what you like, dig deep, and enjoy your work. It’ll pay off sooner or later.

Four chapters submitted to O’Reilly

We have submitted the drafts of four chapters of the book “Enterprise Web Development: from Desktop to Mobile” to O’Reilly for review and editing. This is a pretty hands-on book as we are developing an application Save Sick Child while explaining various techniques and technologies. The readers will get a new independent working application every time we add a new piece of functionality (e.g. login, donation form, video, Google maps, charts, auction, etc.). These projects will be published on the dedicated Web site savesickchild.org. For example, this is a sample application illustrating modularization of the JavaScript-based UI.

ssc15

The following chapters are submitted to the publisher, but the raw texts are available for you to read now on the github at https://github.com/Farata/EnterpriseWebBook:

Chapter 2. Advanced Intro to JavaScript
Chapter 3. Mocking up Save Sick Child
Chapter 4. Using AJAX and JSON
Chapter 9. Replacing HTTP with WebSockets

Currently we are working on the chapters on responsive design, test-driven development and modularization of the JavaScript applications. We’re making these unpolished chapters available for you to read hoping to get valuable technical feedback from you. Please do let us know if you see some bugs or inefficient solutions in the code samples. We really really appreciate it.

Man, where is this customer service phone number?

Yesterday, I had to contact my bank (one the three largest in the USA). As every environment-friendly citizen, I’m not using paper statements – everything’s online. Logged into my bank account and followied the link Contact Us. Even before clicking on this link I knew that it’d take time to find the phone of the customer support to I could talk to a real person and not to this stupid and useless chat “Hi, I’m Alex. What can I help you with today”. Nothing, really, Alex. Sending me a link with FAQ won’t help in most cases (is F still for “Frequently”?).

Needless to say, the first two minutes of browsing in the customer services pages didn’t yield any results. It seems that the content providers for these pages get paid by the time they can keep a customer engaged into this hide-and-seek game. And, let me tell you, they are getting better and better over the years. They are winning.

I gave up, and decided to download my monthly statement hoping to find the customer support number there. I’m genius! The phone number was there, yay!  I was still a little irritated, and to let the steam out, had twitted about it.

The helpful advice came right away from my follower @slavkous. Thank you, Slava! He sent me two links – apparently, these kind people went to this frustrated experience too, and created simple lookup services to find those bloody numbers (I’m trying to sound British here). These are the life savers:

1. Get Human: http://gethuman.com/

2. Contact Help http://contacthelp.com (love this image on their home page, btw).

custserv

Bookmark these sites. Write these links on a small piece of paper and put them in your wallet. Had these link tattooed on your arm. Don’t leave home without them. Next time your wallet with all your credit cards is stolen, these links will be priceless for canceling all your CC accounts.

It’s time to work. Gotta run.

Entering Japan

This morning I needed to meet a friend at the Miami airport, which has the MIA code.  Went to Google maps to get driving directions,  typend MIA, but selected the wrong line from the autocompletetion dropdown – it was ” Mie Prefecture, Japan”.

Google Maps obediently offered me these funny directions below. I had to cross the USA, then sail to Japan. Especially I like the part “Entering Japan, Turn left”. After that I should  ” Turn left at 県道263号線” whatever it means.   It takes only  90 easy steps from where I am to Japan.

Happy New Year, everyone!japan

JSON and Condoms

This morning I was discussing the JSON data format with the co-authors of our upcoming book Enterprise Web Development (you can read its draft at http://enterprisewebbook.com/). We were discussing pros and cons of using the JSON format in the Web and the role of the JavaScript eval() function in the history of the Web development. As a result of this discussion, some of the new content can be added to the book section on JSON, for example:

“Usually, JSON-related articles and blogs are quick to remind you about the evil nature of the JavaScript function eval() that can take any JavaScript and execute it. The JSON.parse() is pictured as a protection against the malicious JavaScript that can be injected into your appplication’s code and then executed by eval() by your Web browser. The main argument is that JSON.parse() will not be processing the incoming code unless it contains valid JSON data.”

 But our discussion had a part that won’t make it into the book (O’Reilly’s editors are pretty strict), but can be shared with you in this blog. Protecting your application’s fragile body from being infected by means of eval() can and should be done outside of your application code by using HTTPS protocol and eliminating the cross-origin scripting by routing all requests to third-party data sources via proxying such requests through your own hosts. If the previous statement seems to be to complicated for understanding, I’ll give you another explanation that any adult software developer will understand.

If a man puts on a condom before having sex with a woman domestic partner, it’s like calling JSON.parse() – both are guaranteed that no malicious stuff will be injected. But if a man approaches a woman domestic partner without a condom, but holding a piece of paper signed by a venereologist certifying that this man is healthy – it’s like allowing using eval(), but providing protection at the security layer of your Web application.

Got it?