Enter IT: The Long Road to Java

    Friends, we are pleased to present an article from the "Enter IT" series, which has been published in our corporate blog for a long time. These are not “serious” technical articles (there will also be such), but the stories of our signors about their formation in IT. After all, sometimes you just want to look at the industry through the eyes of colleagues and understand exactly how world-class experts are obtained from young trainees and “green” juniors. Well, we give the floor to one of our heroes.


    Hello! My name is Rodion Gorkovenko, and I ... no, not what you thought. I am Senior Java Developer at DataArt. I want to share the story of how I came to such a life and, perhaps, tell a little young specialists how to survive in the ruthless Java jungle and become a full-fledged digital predator.

    Introduction (beautiful screensaver)

    At first I programmed in C. There were other languages, but most of the time (several years) I wrote in C. That is why my career in IT began with this language. However, its scope is limited by relatively low-level software - I wrote on ntv for microcontrollers when I developed electronics, and later on for POS terminals.

    The answer to the question “where to go next?” Was not very clear to me. Of course, it was possible to deepen the study of C ++, but a little experience working in a team in C / C ++ left a somewhat negative impression. The alternative was Java. I knew almost nothing about it, except that I wrote a couple of test applications for mobile phones with JavaME at the institute - of course, not understanding in detail the nuances of the language.

    Well, during the year devoted to POS-terminals, I had some free time before and after work. Googling suggested that you need to download the Java Development Kit (JDK) from the Sun site (now java.oracle.com ) and, in general, you can start.

    Learning JavaSE (first level, simple monsters)

    Here I note that the experience in programming is very useful for learning Java. Learning it as a first language is a bad idea. Java immediately throws a beginner into the abyss of a whole series of obscure words (packages, classes, methods, static, abstract, reference types, collections - who are all these people?), In which it is not very easy to find the way if you are not familiar with analogues from other languages.

    Therefore, for beginners only, I propose to spend a month or two in Python, for example. The simplest program on it will consist of one line instead of a dozen, and at the same time, you will gradually get acquainted with all the relevant concepts that are present in Java.

    So. Having already some experience and installed JDK, you can sit down and try. Yes, you can still download one of the popular IDEs - development environments, in particular, NetBeans, Eclipse or IntelliJ IDEA. However, experts recommend that the first programs be written “in notepad”, that is, in the built-in editor Far Manager or Midnight Commander, in Notepad ++ or gedit, and compiled and run directly from the command line. This is a very good recommendation for those who really want to achieve something, and not just want to pass the program to the evil teacher at the institute / school and get rid of it.

    For a novice programmer, a good IDE is like a reusable diaper on steroids, with heating, a radio tape recorder, etc. Unfortunately, they don’t take diapers to work ...

    What exactly to write to the beginner? Hundreds of small and useless programs. Our goal during this period is to master the syntax, to understand the meaning of classes, methods, fields - to learn how to work with collections, arrays, strings, etc. Moreover, to understand so that part of this knowledge from the head migrates to the fingertips.
    Where can I get the ideas of these "small and useless programs"? I went in two ways: I

    registered on the javatalks.ru forum - I thought I would ask questions, but in fact I tried to answer more strangers (it turns out to be great for pumping skills and also letting me keep abreast of important events of the J-world).

    He began to participate in mini-competitions on codeforces.ru- the tasks of the two lowest levels (Div2 A and B) here are quite accessible to “ordinary” programmers who do not suffer from insomnia from the phrase “sports programming”, although in general such sites are more likely to be taught to write quickly and ugly ... but the undoubted benefit is precisely in the sense of learning "the work of collections, arrays, strings, type conversions" and learning hundreds of nice nuances where you can make stupid mistakes.

    At the same time, I was content from the materials mainly with the description of the API of the standard library (it usually pops up in Google using the combination “java Name of the Interesting Class”) and the language specification(), which courageously read in the subway on the way to work and back. Of course, soulful examples from the Internet on various topics are also always helpful. It should only be noted that with the information in Russian, everything is not very rosy, so you need to tighten the English. The good news, however, is that English for the needs of a programmer is a couple of hundred words and general ideas about the basics of school grammar: two real tenses and a passive voice. You can be inspired, for example, by this article .

    You can also read books. For example, Horstmann or others. Of those that are almost must-have for a beginner, I dare to name two (these are not tutorials or manuals, but simply very useful, but not obvious things):

    • Joshua Bloch "Effective Java" (she is thin).
    • Robert Martin “Clean Code” (you can read the first third and quit).

    So, after 6 - 9 months I wrote a lot of unnecessary utilities, simple toys and other applications of interest only to the author. To the question “Do you know JavaSE?” I can confidently answer “good” (the exception is usually, except perhaps, competition). Is this enough for employment?

    Learning JavaEE / Web (advanced, like daemons, cyberdemons)


    More often than not. Most industrial Java projects are corporate or web applications based on a dozen or more popular technologies for working with web muzzles, web resources, databases, etc. In terms of volume, all this is done at least ten times more than that, what we currently have time to study.

    Since almost all industrial applications provide the user with a web interface, you need to get (if they are not) knowledge of such things as HTML, HTTP, CSS, possibly JS - moreover, you need to train with them. This is uncomplicated, and there are more than enough manuals. The main thing is to create a clear view.

    Java is used in web applications to create new HTML pages on the fly and process HTTP requests coming from them. It’s difficult for a beginner to understand this life cycle ... well, for sure it was difficult for me. Fortunately, not long before that, I had to learn the basics of PHP. It was quite convenient: after spending several days and writing dozens of scripts, I made an idea of ​​how the web works - much more holistic than in all previous years. The easiest way is to get experience with both PHP and MySQL by installing, for example, XAMPP , which includes both the Apache httpd server and the PHP interpreter and database server, etc. - and having studied some tutorial (in my case, www.softtime.ru /bookphp/gl1_1.php ).

    Now, switching to Java, I was able to take it much easier: yeah, here Tomcat is a server that provides pages and processes requests. Here are the JSP pages - well, this is very similar to PHP. Servlets go to them in pairs, this is not very similar, but also understandable. Communication with the database - after experience with PHP and SQL, this is not difficult, since there are enough examples. It was convenient to use an embedded Java database called H2 .

    This is not to say that I penetrated far into Java EE / web at this level, but, since the study was hard, I began to look for a place for a Java developer. In most companies they did not answer me, in a few they invited me to talk. The main thing here is not to despair.

    By the way, at this stage you will probably already be working in the IDE, but it is very, very important to master the automated assembly tools - at least Ant, and preferably Maven. Also, the lines about getting to know version control systems (SVN, Git for example) will make your resume more attractive for the employer (he will say: “Ugh, at least you don't need to learn this”).

    So, I sent out resumes and sometimes went for interviews. In two places, they offered to perform a test task.

    The test task is this: it allows you to understand what technologies and tasks they work with, and they can see how you write code, etc. Unfortunately, they rarely give it. Out of about 30 interviews I have completed in recent years, assignments have gone somewhere in five.

    In the appendix to this article I will give an example of a test task for those who are unlucky on them.

    The first task was to write a web application with several pages to display data from several tables and demanded "use JSF and Hibernate" - a cold sweat broke through me, since none of these abbreviations were familiar to me. Nevertheless, having asked for two weeks to complete, I coped with the task (now I would have written in 3-5 hours, I think). The second assignment introduced me to using Java Mail, which was good too.

    I received an invitation to both companies - here, perhaps, I was lucky that shortly before that I read about Java Code Conventions and taught myself to design the code approximately “like everyone else”, so as not to frighten potential employers.

    In principle, here we can finish our story - further my colleagues (and the need) told me what to study, what to read.
    The first project I did was on JSF and Hibernate. Already here I learned the basics of Spring. Well, then more. Of course, the first project is now scary to remember - uh, and I got it in it ...

    The main thing is not to forget when you get to work in the company that you need to learn further and more. Java has many incredible and obscure technologies. And besides Java, there are other languages, and all sorts of different concepts, approaches, architectural solutions, etc. Perhaps I would be happy if I knew "all-all-all" at least 10% ...

    Application (level editor)

    Many Java Junior positioning tests come down to writing a small web application. Be prepared that it will take you days, especially if you are not familiar with any technologies, etc.

    I will not copy-paste any task I know - let this remain the secret of the companies offering them. Instead, here, I’ll think up a fresh one.

    Write a web application that acts as a bank. Let it be a bank in a town in the Wild West with 53 inhabitants and continuing to grow.

    It is necessary to store data about:
    • Bank customers (identifier, name - address, age at will);
    • accounts (identifier, owner identifier, amount of money);
    • transactions - transfers of money between accounts or their receipts / charges.

    The minimum application should contain three pages:
    • list of bank customers, clicking on the name opens the account of the selected client (plus the form below to add a new client);
    • a list of accounts of a given client (plus the form below to add a new account);
    • a form for transferring money between accounts (and for replenishing / writing off money: costs, purchases - m., these are separate forms, to your taste);
    • a page with a list of transactions (the filter form is on top so that you can select for a period and / or by a given user);
    • all sorts of additions - to your taste, for example, in the list of clients you can withdraw the amount on all accounts of each, etc.

    The assignment often contains a list of technologies that should be applied. Typical kits may contain, for example:
    • JSP (Spirng-MVC), Spring, Spring-jdbc and JQuery + UI to decorate the frontend;
    • JSF, Spring and Hibernate;
    • JSF, EJB, GlassFish.

    The database can be Postgres or MySQL, however, try to make it possible to work with two (for example, MySQL and H2), that is, so that the application can be run with the built-in database.

    Etc. Explore Google and forums - you will surely find examples of tasks. Try not to forget to use Maven and plugins like maven-jetty-plugin in it, so that the application can be demonstrated as easily as possible if asked. I highly recommend it. Do not forget to accompany the test items with explanatory notes. Be literate or use a spell-checker.

    Good luck!

    Also popular now: