JavaRush /Java Blog /Random EN /One day in the life of a Java developer. Part 1
alex8894
Level 34
Санкт-Петербург

One day in the life of a Java developer. Part 1

Published in the Random EN group
Greetings, dear colleagues! After the publication of " 20+ Years Later ", some readers asked for a continuation of the story. What else could I talk about? It seems that I have fully covered the topic of turning a “bearded enikey” into a Java developer. It will be possible to draw some conclusions no earlier than after a year of work. And then I decided to simply describe how my typical working day goes. Under the cut “One day in the life of a Java developer.” When I was young, I loved to sleep. When I was an enikey, it happened that I slept until noon and came to work at three, or even half past three. Every time I responded to management’s periodic demands to “come like everyone else,” that is, by 9 a.m., the same way every time—they say, I need to work on computers when I’m not disturbing anyone. It rolled. But with age, apparently, something has changed in the body, and now I am more of a “lark” than a “night owl”. That's why now I come to work first (or one of the first). Today I am the first, and I have half an hour or an hour of silence until other, less “early birds” catch up. It's time to plan today. I develop under Linux Mint. I like the Start button, modest and elegant, not like these tiles. The Cinnamon desktop manager is not overloaded with visual effects, but in terms of polish it is slightly inferior to MacOS, which is, of course, the standard in this matter. It’s easy to compare, there’s a Mac on the next table, a UX designer is working behind it. I also have almost no complaints about the OS itself: it works quickly and very stable, I only rebooted it three times during this time - when I turned off the computer during the long holidays. Actually, it also loads almost instantly, even the splash screen doesn’t have time to appear, because all the developers’ computers are equipped with SSD drives. First of all, I open the Thunderbird email client, letters come there with information about changes to the pages that interest me in the wiki (there are settings and specifications), but the main thing is notifications from the tracker. What interesting thing happened to us? Oh, they returned from testing a feature that I finished yesterday, it looks like they found a bug. Well, yes, it is. I need to fix it as soon as possible, maybe I’ll have time before the tester arrives and he will immediately look at the corrections before he gets into some “unfinished construction” yet. That's the first thing for today. So, this is about my “unfinished construction”, which I wrote throughout the last sprint. It seems that this time he successfully withstood all the circles of hellstages of testing and today, probably, it will need to be merged into the main branch of the project. But that will come later, after lunch. Even today we will have to work in devops and update the stand from the branch in which development is currently underway, we need to show new functionality. “With great power comes great responsibility,” the sudo command displays a warning before granting root privileges. In my somewhat loose translation, this phrase sounds like “the more you can do, the more you will have to do.” It is not surprising, therefore, that I, who have been marked with the “administrator’s seal,” often receive such “borderline” tasks. Well, let's get started. Yesterday I was working on another feature, and now I need to go back to the branch where the bug is. Windows users usually love all sorts of graphical shells and use Turtle (TortoiseGit), but for me it’s easier and more familiar through the command line. In general, the command line in Linux is a small masterpiece, incredibly thoughtful and powerful, especially in combination with Midnight Commander. We switched, now we need to rebuild the project. I type the command gradle clean ass. I don’t know whether this command was originally intended by the gradle authors or was created by chance, but it simply cleans and rebuilds the project (ass is short for assemble, and not what first comes to mind). On javarush, gradle is mentioned only briefly, as “and other build systems.” Yes, gradle has no advantages over maven for assembling educational projects. Most tutorials and how-tos on the internet also use maven. The emergence and growing popularity of gradle is likely due to the rapid increase in the complexity of building modern projects. The project in which I am involved consists of several dozen components, where the backend is written in Java, the frontend in Javascript, and the tests in Python. By the way, nowadays, assembling a Javascript project is a separate and completely complicated process, which even has a name - Web Workflow, and the dependency tree there is almost as sprawling as in Java. Well, at least you don’t need to assemble Python components, well, almost no need... After assembly and launch (which is also non-trivial), you need to raise and initialize with test data an entire environment with a relational and NoSql database, a message queue and an in-memory cache . Then all this needs to be assembled again and run on the CI server, and then deployed using ansible. At the same time, development is mainly carried out under Windows, and “combat”, demo, test and other pre-prod servers are, naturally, under Linux. I don’t really imagine how it’s possible to implement such things in maven, but quite well in gradle. The fact is that the gradle build file is written in Groovy. It’s a very funny language, they say it’s a cross between Java and Ruby, but I don’t know Ruby, but I know a little Javascript, and many constructs from it also work. The creators of gradle have implemented such an API that in simple cases the build file looks quite declarative (and, by the way, in my opinion, it’s even easier to read than Maven’s pom.xml), but if you need something more complex, all this declarativeness is discarded, variables, functions, classes appear - in a word, all the features of Groovy, which, by the way, can be compiled and executed on the same JVM as the Java code. The assembly itself, as I already mentioned, is cross-platform, but it interacts with the environment, so it needs to be checked under Windows too. To do this, I have Windows installed on a virtual machine. KVM is advancing by leaps and bounds, and if the guest system is configured correctly, virtualization is almost invisible. Yes, spice now supports two monitors, screen resolutions are adjusted automatically, and paravirtualized device drivers cause almost no performance loss. I sometimes find myself thinking that I don’t feel much difference between the two platforms. Still, Java is an amazing tool that has brought two completely different and, at times, even hostile worlds closer together - the world of proprietary software, cracks, keygens and serials,epitomized by Windows and the world of open systems Linux. So, the project is assembled, we launch it (of course, also through gradle) and take a look. Well, yes, shame on my gray beard, I didn’t implement one of the requirements of the production, here it is, written in black and white on the wiki. At my previous job, I encountered this situation regularly and was always perplexed by how the developer could have missed an entire paragraph from the specification. Yes, easily! I thought about it, focused on another problem - and there was a bug. Only here, thanks to several stages of testing, will she be caught, but in the previous place - well, whatever happened. Fortunately, the work here won't last long. I’m launching Idea Ultimate, which by the way is one of the few paid products used in development. In principle, you can get by with the Community Edition, but you quickly get used to the good stuff, for example, integration with Spring. You also need a couple of terminals for logs, a browser for the frontend and a wiki, another terminal with a command line, everything moves, blinks... In general, the picture on the screens of two monitors begins to take on a frightening appearance, like what is shown in low-budget films, depicting hard work of a hacker. But these are still minor things, but I remember when I had to raise and configure a failover cluster - seven terminal windows, something else in the corner of the screen, in all the windows - some numbers and pictures from ascii graphics... But I digress a little from work, and time goes by. ... Phew, well, it seems like I did everything I needed and, it seems, I didn’t break anything I’d done earlier. I add a comment to the feature and send the thread for testing. I try to write in more detail what exactly I did or changed to simplify the tester’s work. At my previous job, I really missed such explanations when I had to check improvements received from developers. Meanwhile, the morning smoothly turned into day, the people gradually pulled up. Soon there will be a stand up meeting, or in our opinion, a stand-up. In fact, the working day should begin with it, and for most “night owls” this is almost the case. Stand-up acts as a boundary for arriving at work as late as possible; being late for it is strongly discouraged. Well, for me it’s like a break. So, let's all stand up. At a stand-up, as usual, the developers tell what they did yesterday and what they plan to do today, the testers tell us what they tested and with what results, and the bosses, it’s clear, what they plan to do next, what problems arose and what needs to be paid special attention to. Our team is geographically distributed, and its full complement can only be seen at stand-up (on TV, of course), and also, perhaps, at a general corporate event a couple of times a year. During stand-up, I often have the thought that it was actually invented to keep developers from relaxing. When every day you need to show progress in your work, and not in a paper report that only your boss will read, but in front of your colleagues, willy-nilly you will try to do more, to have something to talk about. There are, of course, “long-term construction projects”, about which for several days in a row you repeat “yesterday I did this, and today I will continue to do it,” but even in them some small urgent tasks are constantly wedged in. In short, real A cowboy developer always has something to say to his colleagues. At the stand-up I was asked to quickly update my stand, so now I’ll do that. When the main branch of the project is published, the update is made by the admins, but now we need to publish a feature that is not yet finished, and at the same time some problems will inevitably arise that the admins cannot solve. The stand is located in a data center, access to it is possible only via ssh, there is, of course, no graphical shell there - so only the command line, only hardcore! The update itself is automated and went smoothly, but after the update one of the components does not start. I look at the logs with the less command; by the way, it has a very convenient function: if you press Shift-F, it will constantly display the current contents of the file, which is perfect for logs. And what is this... strange thing? Full screen of question marks separated by commas. Second screen, third, tenth... How many of them are there? Oh, it’s over, it turned out to be quite a stacktrace. Someone wrote an SQL query with the IN operator to select the desired records from a list, and created a parameter for each element of the list. Everything worked until the list contained more than 32767 elements, after which the SQL server finally ran out of patience. You will need to write a bug report about this, but this has nothing to do with the problem with a non-working component. Let's look further. Now it’s clear that the migration of the database structure to the new version did not go through, it seems that the author of the feature changed something in the migration, and here, at the stand, there was its previous version. You will have to roll back structure changes manually, through the SQL server console utility. How can I write a command in DML to delete a field? index? tables? Look like that's it. I restarted the component, the migration went fine... everything is fine. It's time to go have lunch, the weather is great today, by the way. “The bright yellow ball hanging motionless in the sky and so frightening the townspeople turned out to be the Sun.” Almost the first sunny day of the year. I don’t even want to leave the street, but I have to - the time for merging is approaching. To be continued
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION