Apr 07 2019

Is Spring still relevant?

Category: English posts,TechnicalIuliana @ 13:39

This Friday I’ve had a debate at the company with a colleague of mine which is known to be a straight up genius about the topic in the title. Obviously, I was arguing that Spring is still relevant, and my colleagues was arguing that it is not. How did I end up in this position? Well, since I’ve written so many books about Spring, why not? I’ve written books about how it can be used, explained its under-the-hood internals to others, I could talk to others about it, right? Well, turns out… not really. I am really bad at debates with geniuses, that happened to study computer science. Because I’m an engineer, I’m practical, I get down in the dirt to make sense of things and fix them up. I build things from scratch, and although I do overthink and design things, my overall direction is practicality. And this is what being relevant is for me. Can it make my work easier, faster, stable and can in the end produce revenue? Then it is relevant. So yeah, for me being needed and being useful means being relevant.

For him, being relevant, means change, means driving the domains toward innovation.

And because, our definition of relevant was different, the debate was a cluster-fuck. Funny as hell, but a cluster-fuck nonetheless.

Here is my take on this.

Continue reading “Is Spring still relevant?”

Tags: ,

Oct 16 2018

Technical issues

Category: TechnicalIuliana @ 15:07

A few days ago the blog started having hiccups again. And since I’ve lost most of my morning trying out Apache settings and then monitoring it and making sure it stays up. I’ve read the documentation, I’ve consulted stackoverflow and it makes sense why my configurations were wrong, but I cannot understand for the life of me why had the blog been working like this for almost 2 years.

To keep it short, my Apache was configured like this:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000

<IfModule worker.c>
StartServers 8
MaxClients 256
MinSpareThreads 10
MaxSpareThreads 50
ThreadsPerChild 10
MaxRequestsPerChild 4000

Not sure if these settings are default, or where have I got them from, but apparently these settings are a little too generous for an AWS micro machine. Because, yes, this is the machine this blog is being hosted on.This means, in case you had doubts: 10 GB HDD and 1 GB or RAM, that MySQL and Apache are fighting over. And apaprently lately Apache is winning.
Anyway, I’ve toned down the following values.
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 14
MaxClients 14
MaxRequestsPerChild 500

<IfModule worker.c>
StartServers 5
MaxClients 14
MinSpareThreads 10
MaxSpareThreads 50
ThreadsPerChild 10
MaxRequestsPerChild 500

And the blog has been up all morning. Let’s hope I’ve fixed it, otherwise, I might be forced to upgrade. And I really do not want to do that. I mean, this blog is just a personal project that allows me to practice typing and expressing my ideas in a way other people (maybe!?) can understand. It does not make money, so I’m reluctant to spend too much on keeping it up.  I’ll get into details in a future post, about the costs, advantages, and disadvantages of hosting a site on a virtual machine.

I don’t have many readers, but to the ones that read me, I am really sorry for the blog being down and please bear with it being a little bit slow until I find a solution.

Tags: , ,

Jan 04 2018

10 Commandments Of A Career

Category: English posts,TechnicalIuliana @ 23:18

I don’t know if 11 years of experience in programming and three published books can be considered a career, but in this 11 years I got promotions I did not chase or even wanted so this must count for something. I do not know if I did anything different than others that try to succeed, but my attitude and hard work got me from a low place to a place higher than I even dared to dream so I thought it might be useful for others.

So here there are, the 10 commandments of my career.

1. Do your best. Sounds easy, sounds simple, but it is difficult to do your best. Especially on your bad days. The truth is you will spend at least 8 hours at work, you might as well use it properly, to deliver quality products and acquire quality knowledge.

2. If you do not like it, change it. Nothing is perfect in this world, thus companies are not either. You will get defective management, defective products to work on, defective people to work with. But nothing changes its state without interference and stimuli. So do your part: speak up and act. You would be amazed how much much you can change. A strong warrior is forged in battle so be thankful for the battles you have to take part of.

3. Ask. Do not expect people to know or care, what you want or need. If you do not ask, people will rarely know what you need and give it to you. There are also people who are shy and can’t say no, even if they don’t really want to give you something. So ask and insist when necessary.

4. Read your contract, know your rights. This should be obvious, but many people skip this part. You have more rights than you think. There are rules put in place to protect you from bullies that are high up the corporate ladder, because with great power sometimes it’s not the great responsibility that comes, but great assholeness. So know them and invoke them when necessary.

5. Never stop improving. This should also be obvious, but some people get cozy at their jobs and get complacent. The only constant in this universe is change. So ride the change like a surfer rides the ocean. Keep your mind fresh and open and enjoy all the wonders of changing time. People who are reluctant to change fade into the background of the company, those who welcome it shine like the sun.

6. Speak up.Do not be afraid to voice your concerns and make proposals. Be open. Be creative. Even in companies that are known to have rigid hierarchy and fixed processes, exceptions can happen when good ideas are strongly voiced. Provide feedback whether is positive or negative. People like being complimented for their good work and even if uncomfortable, people accept that they have to improve. Those that do not want to improve, will most likely quit at some point anyway.

7. Establish boundaries. Be explicit about your do’s and dont’s. For example, it’s ok to state upfront that you do not like overtime, or working in shifts. Preferably do this at the interview, but if you were ok with this at first and then later some changes in your life  make you incompatible with this sort of activities, do not be afraid to communicate it. Contracts are not always explicit about your responsibilities and anything you are asked to do that is not in there, you can be negotiated upon.

8. Work with friends, not colleagues. We are humans, not robots. We make mistakes, we change, we have good days and we have bad days. Know your colleagues. The key to a productive team is to figure out when people are having a bad day and not pushing them and to figure out when they have good ones to challenge them. Also, building trust and friendship with your colleagues leads to a more comfortable working environment, that ultimately… does not feel like work. The truth is, for at least 8 hours a day we share the same space, breathe the same air with a select group of people. The key to a good collaboration is to know their strengths and weaknesses, and harness any of them to build a quality product.

9. Learn from the best. Learn from the worst. Learn from mistakes. And teach others. We are humans, we have genius epiphanies and brain farts. We have cheerful moments and we have low ones. Every experience is learning experience. From the best, copy behaviours that will make you the best. From the worst you can learn what not to do. From mistakes you can learn what was tried and failed, so you will know what not to try. And yeah, preferably learn form mistakes done by others. And teach others. We all die not knowing a lot of things. But be generous with your knowledge, share it so we all die knowing more things. ;)

10. Keep it simple. To make things complicated is easy. You don’t even have to try too much, just take something that you know and build it in your own personal way, thinking that you will never share it with anyone. To people that do not know what you tried to build and how, it will look complicated. The hard part in any domain is to build complex things in a simple way, so that others can understand it and contribute to it. So keep things simple. Implement complicated things in simple ways. Simple is the most practical way after all.

I know some ideas in the above paragraphs might related or even repeated. But, as Aristotle says: “We are what we repeatedly do; thus excellence is not an act, but a habit.”

Stay safe, stay happy!

Oct 15 2017

Spring Stereotype Annotations

Category: English posts,TechnicalIuliana @ 21:18

Yes, finally a technical post. ;)

Having finished writing my third  Spring book, it was about time I should start writing technical posts as well. Being an accessible online person, quite a few people that read my books find mistakes or have interesting questions. I am really happy when people find mistakes, this means that they are actually reading the books, taking them seriously, including reading the references to the official documentation, which is more on point and more detailed than a book written by an “external” will ever be.

And I am happier when questions that question my own understanding of the framework are risen as well. Because this motivates me to dig deep into the documentation, to ask other technical people I know what their opinion is. It is an opportunity for communication and debate.

The last question I had from a reader was about the @Configuration annotation. He asked why is this annotation not mentioned as being a stereotype annotation in the book and if this is not a mistake on my part. He gave me some links to some official documentation and his opinion about the matter. After I queried  multiple resources, including my technical reviewer, who is a Spring  trainer for Pivotal this is the answer I came up with.
Continue reading “Spring Stereotype Annotations”

Tags: ,

Sep 08 2017

So I read the Google manifesto…

Category: English posts,TechnicalIuliana @ 12:12

Before going on vacation the Google scandal of the 10-page “Google’s Ideological Echo Chamber” document was just starting. A guy at Google created this document in which he criticised the politically correct Google environment and the discrimination happening in the name of the political correctness. And that manifesto made it to the internet. I was preparing for a vacation like no other, in which I was to detach myself completely from my working environment and from the passion that I dedicated myself to for the last 16 years of my life. So I postponed reading the Google manifesto until getting back.

I read the document on the plane on my way back and I realised there is a lot of blogging material in there. Because here we are in the time where political correctness dictates which people are allowed to speak their minds out loud and which are not, unless they want to risk being fired.
Continue reading “So I read the Google manifesto…”

Tags: , , ,

Sep 05 2017

I love writing technical books…

Category: TechnicalIuliana @ 23:23

… and messages like the ones below make all the effort worth it.

Tags: ,

Apr 08 2017

git unpack failed: error Missing tree solution

Category: English posts,TechnicalIuliana @ 19:18

More than a year ago, I convinced the company that I work for to switch from CVS to Git. This was not done as I wanted it, because … management… and thus a lot of stupid issues appeared. I did Git support for more than a year, and all this time 80% was Eclipse support, because the EGit Eclipse plugin is … a mess.  Now after more than a year later, a new problem appeared. When people tried to push their changes, a nasty pop-up appears:

And after you get this pop-up, doing it from the command line, doesn’t do it either:

C:\work>git push -v
Pushing to ssh://gigi.pedala@git:29418/gmp-parent
Counting objects: 91, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (85/85), done.
Writing objects: 100% (91/91), 44.68 KiB | 0 bytes/s, done.
Total 91 (delta 41), reused 0 (delta 0)
remote: Resolving deltas: 100% (41/41)
fatal: Cannot receive pack: error: unpack failed: error Missing tree 07b3431321048e15dccc9e022e258b93252894ef
To ssh://gigi.pedala@git:29418/gmp-parent
! [remote rejected] HEAD -> hotfix/H5.14.0.XX_ADV_XMW_branch (n/a (unpacker error))
error: failed to push some refs to ‘ssh://gigi.pedala@git:29418/gmp-parent’

If you search for a solution on the internet for this, you will most probably be told that your repository is corrupted and that the only solution is to re-clone it. Or you will be required to execute a lot of commands… that might do nothing for you.

Two days ago a colleague of mine from Frankfurt had it. As I was in the office I took the other Git expert in the company with me and went to his computer to dissect his repo. And being the nice person that I am, I will share the solution with you. We ran a git gc

git gc
Runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase performance) and removing unreachable objects which may have been created from prior invocations of git add.

Basically, when you do a push, git packages the information and tries to send it to the remote. Problem is that, whatever is sent to the remote in this case, cannot be unpacked because a git tree is missing for some reason. If you try to do a git show on the tree with the SHA1 code mentioned in the error, all the information is there. So what is happening? Well, git gc will help you here, because when trying to repack the information, you will get a set of errors like these:

cannot unlink file .git/objects/pack…”

Apparently Eclipse, or any other program, or even Windows holds a lock on the repository files, which prevents packing, and obviously incomplete information is send to the remote which cannot unpack it, thus the upacker error problem. I mentioned Windows here, because I haven’t heard anybody having this problem on a Unix system yet.

The solution for my colleague was to restart his computer(we closed Eclipse, but some java processes were still hanging and keeping the files locked so we took the easy way out) and before opening any other program execute git gc. The operation executed without any errors and he was able to continue his work, and do any remote operations he needed.

So this is the easiest solution: restart the computer, do a git gc and go about your work as usual.

Tags: , ,