📜 ⬆️ ⬇️

Log in to IT: Long road to Java

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

image

Hello! My name is Rodion Gorkovenko, and I ... no, not what you thought. I am a Senior Java Developer at DataArt. I want to share a story about how I came to life like this and, perhaps, a little help for young professionals how to survive in the merciless jungle of Java 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 exactly in C. Therefore, my IT career began with this language. However, its scope is limited to relatively low-level software - I wrote on NTV for microcontrollers, when I developed electronics, and later - 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 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 mobiles with JavaME at the institute - of course, without understanding in detail the nuances of the language.

Well, during the year dedicated to POS terminals, I had some free time before and after work. Googling prompted you to download Java Development Kit (JDK) from Sun (now java.oracle.com ) and, in general, you can begin.

Learning JavaSE (first level, uncomplicated monsters)

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

Therefore, only beginners to program will offer to spend a month or two on 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 become familiar with all relevant concepts that are present in Java.

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

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

What exactly is a newbie to write? Hundreds of small and useless programs. Our goal in 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, understand so that some of this knowledge migrates from the head to the finger tips.
Where to 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 to others (this, it turns out, is pumping my skills and also being aware 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) are quite accessible to “ordinary” programmers who are not suffering from insomnia from the phrase “sports programming,” although in general such sites are more likely to be taught to write quickly and ugly ... but undoubted benefit - precisely in the sense of studying the "work of collections, arrays, strings, type conversions" and the knowledge of hundreds of pleasant nuances where you can make stupid mistakes.

At the same time, I was content 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 I courageously read on the subway on the way to work and back. Of course, soul-saving examples from the Internet on various topics are also always helpful. It is worth noting that with the information in Russian, everything is not very rosy, so you need to pull up 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 times 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 who 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):


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

Learning JavaEE / Web (advanced level, cacodaemon, cyberdemon)

image

Most often - no. Most industrial Java projects are corporate or web applications based on a dozen or so popular technologies for working with web snouts, web resources, databases, etc. In terms of volume, all this is at least ten times more, that 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, perhaps JS - moreover, you need to practice with them. It's easy, and there are plenty of 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 from them. To understand this life cycle for a newbie is difficult ... well, I definitely found it difficult. Fortunately, shortly before that, I had to learn the basics of PHP. It was quite convenient: having spent several days and having written some dozens of scripts, made up a presentation on how the web works - much more complete than in all previous years. The easiest way to get experience with both PHP and MySQL is to install, for example, XAMPP , which includes both the Apache httpd server and the PHP interpreter and the database server, etc. - and having studied some tutorial (in my case www.softtime.ru /bookphp/gl1_1.php ).

Now, having switched to Java, I was able to perceive much more easily: aha, here is Tomcat, this is a server that renders pages and processes requests. Here are JSP pages - well, this is very similar to PHP. Servlets are paired with them; this is no longer very similar, but also understandable. Communication with the database - after the experience with PHP and SQL, this is not difficult, since there are plenty of examples. It was convenient to use an embedded Java database called H2 .

It’s impossible to say that I’ve got far into Java EE / web at this level, but since the study was going hard, I began to look for a place for a Java developer. In most companies they did not answer me, they called me in to a few. The main thing here is not to despair.

By the way, at this stage you will probably already work in the IDE, but it is very, very important to master the tools of automated assembly - at least Ant, and better than Maven. Also, the lines about acquaintance with version control systems (SVN, Git for example) will make your resume more attractive to an employer (he will say: “Phew, although you don’t need to learn this”).

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

The test task is this: it allows you to understand what technologies and tasks are working with, and for them to see how you write code, etc. Unfortunately, they rarely give it. Of about 30 interviews that I have completed in recent years, assignments have got somewhere in five.

In the annex to this article, I will give an example of a test task for those who are not lucky with them.

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

Received an invitation to both companies - here, perhaps, I was lucky that shortly before that I read about the Java Code Conventions and taught myself to draw up a code like “everything”, so as not to frighten potential employers.

In principle, here you can finish our story - then my colleagues suggested to me (and the need) - what to learn, what to read.
I did the first project on JSF and Hibernate. Already here learned the basics of Spring. Well, then - more. Of course, the first project is now scary to remember - oh, and I started thinking about it ...

The main thing is not to forget, having got to work in a company, that it is necessary to study further and more. In Java, a lot of incredible and incomprehensible technology. And besides Java, there are other languages, and all sorts of different concepts, approaches, architectural solutions, etc. I would probably be happy if I knew “everything, everything, everything” by at least 10% ...

Application (level editor)

Many test tasks for the position of Java Junior come down to writing a small web application. Be prepared that it will take you days, especially if you are not familiar with some technology, etc.

I will not copy-paste any task known to me - let it remain the secret of the companies that offered them. Instead, here, I'll invent something fresh.

Write a web application that performs the functions of the bank. Let it be a bank in a town in the Wild West with 53 residents and continuing to grow.

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


The minimum application should contain three pages:
  • the list of bank customers, when clicking on a name, accounts of the selected customer are opened (plus the form for adding a new customer at the bottom)
  • list of accounts of a given client (plus the form for adding a new account below);
  • a form for transferring money between accounts (and for depositing / debiting money: costs, purchases - m. b, these are separate forms for your taste);
  • page with a list of transactions (on top of the filter form, so that you can choose for the period and / or for a given user);
  • any add-ons - to your taste, for example, in the list of clients, you can display the amount on all accounts of each, etc.


The assignment often contains a list of technologies that should be applied. Typical sets 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, with MySQL and H2), i.e., so that the application can be started with an embedded database.

And so on. Explore Google and forums - you will definitely find examples of tasks. Try not to forget to use Maven and in it - plug-ins like maven-jetty-plugin, so that the application can be demonstrated as easily as possible if asked. Highly recommend. Do not forget to accompany the test tasks with explanatory notes. Be literate or use spell-checker.


Successes!

Source: https://habr.com/ru/post/234003/


All Articles