9/27/2018

Plan before coding (why software design is needed?)


Introduction

I’m quite often facing with the situation that developers are starting directly with coding when they are getting a new task. Beginners as well as developers with long years experience, even at well-known, famous companies. And to be honest it is pretty strange for me, I think it is very unprofessional and risky. Let’s see why!

Advantages of creating software design

I really like the parallelism between building a house and writing a software, because both of them is the result of a complex engineering work. At a house you need to take care about a lot of things: choosing the correct walls, the correct size of rooms the correct roof, correct electricity and water system etc. In case of a complex software you need to pay attention on several things as well: runtime, memory usage, ergonomy, security, scalability, modularity, compatibility etc.
It is physically possible to build a house without a planning phase, but only in simple cases and most likely it will have poor quality, it can collapse anytime. But I have never heard about any bigger building which has been built without planning. And in fact: would you like to live in such a house? I don’t think so.
Then why would you use such a software? Of course it is possible to implement a software without planning, but only in non-complex cases and for sure it will have a poor quality. Simple you won’t be able to take care about all the points without a design.
An other advantage is: during the design phase you can identify a lot of possible problems which can come up in the future. So you can avoid making code which will be never used and you can save a lot of time with that.
The other important point is the life cycle of the software: most of the programmes have multiple versions. That means: someone did something. Later on new needs came into the picture, so new implementation was done, quite often by different developers. Then bugs are appearing in the code, someone needs to fix them urgently. In practise that means if there is no design document and all the developers needs to figure out on their own how it is working and what was the concept of the previous developers they will loose a lot of time, they will repeat the same mistakes what the others already did and they will miss-interpret the concept, so they will follow an other way at the new implementations and after some iterations it will be a big chaos. So the number of bugs will be higher and the duration of fixing each of them is getting higher and higher as well.
That means: at the beginning you are saving some time by missing the design phase, but later you will loose much more time because of the lack of design.

What is the write level of design?

Of course it makes no sense to design every small function and small detail for each simple software. You need to find the write level of design to find the most effective way of working and you need to find the right toolset. And it is always up to the project. The following questions are always important: Is it a team-work or a one man show? Is it a software with long term support? Is the software part of a bigger framework or it is stand alone? Is the functionality safety relevant? Would we like to support multiple running environments? Do we have limited resources? Who will use the software? After answering these questions you can write choose the right method of design. If it is a small one-man project, only for internal usage a paper and a pen can be the right tool. But even in this case, do a design! Think about the architecture and main components, main interfaces, main functionality, corner cases etc. and draw some diagrams, write some notes. Of course if you are preparing a safety critical application for serial production then you need to create a really detailed design with static and dynamic software plan, diagrams, well-formulated requirements, use case analysis etc and you need to use some really proper tools. So this is really up to the situation. As you are getting more experience you can always figure out easier the right level of design. But what I think as the most important points: even in case of a minimal design specify your main components and the main interfaces between them. Assign main responsibilities to you components and describe the interfaces with some sentences. You should describe the main use cases with you own worlds in some sentences as well. I think this is the minimum level of design in case of a team work. And as your software getting more complex your design needs to get more detailed and more formular. You can use tools like UML as well.

Summary

So to not loose time with unnecessary rounds you need to create design, but the right level of design is always up to the situation. In the future I plan to write a post about “How is a good software architecture?” But in the meanwhile you can share with us your habits regarding software designs!

Best regards,
RelaxedProgrammer

9/20/2018

9 websites you should know as a software developer

After showing you which books I really like I prepared several webpages which are good to know as a programmer. Here they are:

  1. Tutorials point - https://www.tutorialspoint.com/
    You can find here tutorials for all programming language, technics, algorithmic topic and basicaly for everything what you can need. Next to programming topics there are several other topics as well (like marketing, communication etc.). This tutorials are usualy really good start points.
  2. Code project - https://www.codeproject.com/
    A nice page, collection of articles in technical topics regarding programming. There are a lot of good articles, it’s having frequent updates.
  1. Stack overflow - https://stackoverflow.com
    I think everyone know stack overflow. Any programming issue you have the chance is here the highest to find a solution.
  1. DEV Community - https://dev.to/
    This is a quite cool developer community with a lot of interesting arcticles and a lot of good comments. You are free to write articles and pop up any topic.
  2. Exercism - https://exercism.io/ On this page you can develop your coding skills by solving tasks. Your solutions will be reviewed by the mentor team and you are getting a lot of useful advices. If you feel yourself advanced enough you can join the mentor team as well for specific programming languages and you can support the learning period of others.
  1. Simple Programmer - https://simpleprogrammer.com/ This is a nice blog with a lot of high quality posts. Technical topics, career development and soft skills are envolved as well.
  1. The dev coach - https://www.thedevcoach.co.uk/
    An other blog focusing mainly on the necessary soft skill set of programmers.
  2. LinkedIn - https://www.linkedin.com/
    This is the other page which is most likely known by everyone. This the best place for networking. The best place to start if you are searching for a new job, but you can get informed from here about conferences and other events as well. You can get good connections if you wanna start your own buisness. If you are filling your profile you will get a lot of relevant message quite soon.
  3. Meetup - https://www.meetup.com/
    If it is not enough for you to build your connections online join the meetup.com, find the next events which are happening at your place and has an interesting topic, attend them for free and get familiar with other developers who are living and working in the nearby.

These were my suggestions, feel free to extend it in the comments section!

All the best,
Relaxed programmer

9/13/2018

5 points to do and 5 points not to do if you are asking for a higher salary

It is always difficult to ensure your boss to increase your salary, for some people it means so much stress that they are rather not asking for that at all. I collected some points to do and some points to avoid at asking for a higher salary.
To do:
  1. Find the right time slot

You need to find the best time and place for that. Always be between four eyes with your boss, don’t mention such needs at a party or in front of other colleagues. Only start to talk about that if your boss looks happy and relaxed, make sure that your boss has free time and is not in a hurry. The best strategy is to ask your boss for a feedback session or if you have a regular one mention your needs there. At some companies there’s a yearly feedback meeting, at such companies use that meeting for such reasons. Do not start your discussion with this topic, let your boss finish first all other topics, leave it to the end of your meeting.

  1. Ask for a feedback and use the words of your boss

First figure out what is the opinion of your boss about your work. Don’t tell as reason that you are working well if his opinion is totally different, it won’t work. It is a good strategy to ask your boss to a feedback about your work. Most likely there will be positive and negative points as well. If there are only negative ones than sorry, you have a low chance for a higher salary. First always reflect on the negative ones, ensure your boss that you are trying to change them. After that you can tell something like this: “As you mentioned you satisfied with my work, because …, I’m glad to hear it, because I like to work here as well, I have only one problem, I’m not feeling comfortable with my current salary”. Your boss can not really give a negative answer for this sentence. The only thing how he can regret your request is to tell that “the company has a hard financial situation”, but that’s all. One more thing: ask for a feedback session even if you don’t wanna request for higher salary, because on long-term it is bad if your boss knows after your first question that it is all about your salary.
  1. Mention all the success of your projects

    The most important counter for a team manager is the success of the projects in his team, that’s what is making all the benefits for the team. So if your project is running well (meeting the due dates, customer is satisfied etc.) then it is a good point to mention. Don’t mention your projects if they are not running well.
  2. Mention all the extra efforts you did

Mention everything what you did in the previous period over your project work, like: you supported new colleagues, you wrote a good training material for the team, you developed a tool which is helping the daily work, you were representing the team at some events. These are always good points to mention. If you wanna reach a higher salary it is a good idea to do something like this before asking for a higher salary.
  1. Mention all you responsibility you are having

    Next to the things what you have really done mention the points you are responsible for: you are taking responsibility over a software component, over functional tests, over a subproject, you are organizing a meeting session, you are responsible for a student at the company: mention it, even if you didn’t need to do anything with that. Do not mention it if something went wrong with the topic in the previous months.

Not to do:
  1. Do no compare yourself to others

    It is never a good reason that “I’m working harder than XY”. Maybe you are mentioning the favorite team member of your boss and no one likes if someone is speaking against their favourites. Or if your boss is not satisfied with the one, then he will simply think: “it is not so difficult to be better than that guy”. Always concentrate only on yourself.
  2. Do not mention concurrent companies (or use it only as your last weapon)

    I don’t see it as a good idea to tell that at the neighbour company your could have a higher salary, even if it is true. Your boss will think you are not loyal enough and won’t trust you anymore. Mention this point only as your last weapon before resigning.
  3. Do not use your personal situation as a reason Do not mention things like, “I have a big family, it costs a lot” or “I need to pay back my bank credit”. First of all it is your private thing. On the other hand it makes the feeling that you are weak. You are paid after your performance and not after your private situation.

  1. Do not mention your weaknesses It is good if you know what are your weaknesses, but it is not time to mention them. Here you need to show that you are the best employee ever, even if it’s not true.
  2. Don't be impatient Most likely your boss won’t give you a direct answer, be always patient, don’t ask it again every day, let him have the time to make the decision!


Do you have any other idea?




All the best:

Relaxed Programmer

9/05/2018

Why are companies not making more effort for keeping good developers?

This today article will be a bit different from the earlier ones. In the previous articles I always try to give some suggestions to solve some problems, but now I would like write about something what I never understood why? Of course I have some ideas how can you as a developer handle the situation but I will write about that an article later.

During my working years I understood a lot of mysterious things how they are working, even if I really did not understand them at the beginning, but there is something what I couldn’t understand and that is the following: why are companies letting to have such a big fluctuation in their teams?

There are many reasons for changing company: no more technical challenges, boring projects, bad working environment, bad connection with the team or with your boss, but there is one reason which is coming up almost always when someone is changing company: the salary. Most of the developers are changing their job to reach a higher salary, but of course in most of the cases it is not the official reason, but it is almost always in the background.

Nowadays there’s a high competition on the market of software developers. Most of the developers has already a salary above the average, but most of the developers are still not satisfied with their salary. At most of the companies you can reach around 4-8% increment per year up to country and company. But if you are changing company you can reach much more. When I left my first company I got more than 50% more at second one. I think no one would tell no for this opportunity. In my view that’s one of the biggest reason for developers are changing companies often.

On the other hand I can see that loosing a developer is a big loose for the company even from financial point of view. The developer will need a replacement, who has similar skills and knowledge. That means normally months of recruitment and interviews with multiple candidates. After finding the right candidate it takes weeks/months to do a rump up for the projects. At this phase support of other colleagues will be needed for sure and sometimes external trainings are necessary as well. And after several months they have a developer who has still less knowledge/experience with the project, but already can work on that.

Let’s make an example:

George is Java developer, with 3 years experience of bank security, he is working since two years on the project and has already a good knowledge base. George is asking his boss to increase his salary by 20%. Based on the salary rules of the company his boss can only give him 8% in that year. After this decision Georg is deciding to change to an other company where he will work on a similar project for a higher salary and resigns from his current company.

The company needs a replacement of George, so they start to recruit someone with similar skills and for the same salary as George had. They are paying the amount of 2 months salary for the recruitment company and George boss himself is taking part on 3 interviews to find the right person. After 2 months they are finding John who is a Java developer with 2 years of experience, but he is having much less experience with bank security. He is joining the company for 10% more as George’s previous year salary was. Since John has a notice period at his earlier company he can start only 2 months later. During his first working months he needs to take part on a bank security training, it costs a half month salary. Additionally he need to do a ramp up for the project, it costs him time and the senior developers who are working on the project needs to support him. John is doing well, after one month he can overtake tasks from the project, but of course he has still less experience than George had, so he needs frequent support from the others.

Let’s see the numbers:

To get a replacement for George, who can overtake his tasks took 5 months (2 month of recruiting, 2 month of waiting for his notice period, 1 months ramp up). That’s causing a late delivery of the project.

The costs during these 5 months where the following:

  • 2 months salary for the recruitment company
  • 0,5 month salary for the bank security training
  • 1,1 month salary: John’s salary for the ramp up month (he’s salary is 10% more than George’s last year salary)
  • Ca. 0,5 month salary: The time of the boss to take part on the 3 interviews and to deal with the recruiting company, the time of the senior developers on the project to support John’s ramp up, time of the HR department for administration, time of the IT for installing John’s new computer with the working environment

That’s altogether costs: 4,1 month salary and the company is getting no added value from that (no work on the project).

The costs for John for his first project year is (12*1,1+4,1)= 17,3 times George’s last year salary.

If George would get his requested 20% of salary increment there would have been no need for John, for the next one year it would have cost (12*1,2)=14,4 times George’s last year salary.

That means with the decision of not increasing George’s salary by 20% the company paid 2,9 month salary more in that year. Did it really worth to the company? I don’t think so…

And now you could tell that it worth on long-term, but after one year John is requesting for a higher salary and the story is starting from the beginning... And I think it was still a lucky situation where the company found a correct replacement quite fast. And it could be even worse: the new colleague is leaving the company after 2 month, because it’s not meeting with his expectations, our simply he can not take over the tasks.

I know, some parts of the example is simplified, but I think it is representing the situation well. Why are companies doing it? I don’t understand. Do you have any idea?

Next week I’m collecting you some tips how to make sure your boss about increasing your salary!

All the best!

RelaxedProgrammer

8/31/2018

How to manage your holidays?

Let’s take an easy, but great topic today: the topic of holidays.
I think holidays are very important for programmers, that’s the time when you are really leaving your life, except is your work is your life.
The amount of your holiday is pending on the country where you are leaving and your company, but the big question is: how to use your holidays exactly when you need it?
At most of the companies there are critical periods from holiday point of view: the periods when all the colleagues would like to have holidays (summer holiday, christmas holiday etc.) and the periods which are critical from project point of view. The first ones are quite predictable, the second category is unpredictable.
At the beginning of my carrier I made the mistake: I thought that it is enough to request for my holidays two weeks earlier. So in the mid of the summer I just decided to visit a festival, I requested my holidays and the answer was: “sorry it is a critical period right now in the project, you can’t have holiday now”. Ok, shit happened. For the next year I set up a strategy regarding holidays which is working well. This is the following:
Plan your year in the beginning of January and request for holidays. Plan holidays for the fix yearly programs and try to predict when be enough from work (it is good to plan some day in every third month based on my experience). That means you are the first one who is requesting for a holidays for the critical periods, you are the winner. And in January nobody knows when are the critical project periods, so it can’t be a reason for rejecting. Later on if someone is telling that there’s a critical period during your holiday and you should cancel your holiday, you can simply tell, that you already reserved something for that period.
If your plans are changing in the meanwhile you can still reschedule your holidays, your chances are still not worse than without planning.
This is easy and nothing special.
And just a short suggestion: never cancel any planned holiday because of work pressure!
All the best!

RelaxedProgrammer

8/23/2018

How to handle projects with bad code quality?

The today article is a bit more technical as the previous ones. I think all the programmers have some experience with bad code quality. The first rule of “shity code” is that it was always done by someone else, but not by yourself… At least that’s what I’m always hearing. So I don’t know where are the guys, who are writing the bad code, but once I would be glad to drink a beer with them. The second rule is: the code quality of the project you are working on is always the worst code you have ever seen.

First of all there are a lot of books about how to write nice code. The Bible of this topic is the book “Clean code” from Robert C Martin. But it’s only mentioning how to write a nice code from scratch and not mentioning how to deal with an already existing bad code.

One solution is for sure to refactor the code base, in a lot of situation is means rewriting in fact. But at most of the projects there’s no time or budget for that, so your manager will say a clear “No”.

That means you need to live together with the bad code: stupid naming, monster functions, shared variables, super classes which are responsible for thousands of things and stupid comments. Let’s see how to survive in such an environment.

If you need to understand what the code is doing the best way to do is to go through the code first and after that try to debug it. It is complicated and time-consuming, but that’s the best what you can do in such a situation.

But how to deal with code extensions? If someone needs to add some small functionality or change the current one quite often I see the following solution: “this code is already a big chaos, so let’s just put some new lines to the existing functions or comment out some of them and we are done”. This is the worst what you can do. You are simple encreasing the chaos and the code will be always just worse and worse. First of all: never comment out any line of code, if you don’t need simple delete it. On the other hand: if you need to add something new to such a code always try to add it as seperated as possible: try to create your own class or function which is well designed, has a clear interface, clear responsibility and good code quality. And now the only thing what you need to do is to call your new functionality from the old code. You are not decreasing the quality of the existing code and you are doing your work with a good quality.

If you are more motivated you can separate some part of the old code as well every time when you are adding new functionality. That means you are not only separating your new code the a new class, but you are also separating some code from the class where you are calling your class. And at separation you can do some small corrections as well: better naming etc.

With this method sometimes you need to code a bit more, you need to think a bit more, but your code will be always just better and better instead of being worse and worse.

In my view dealing with code quality is something what is there during the project lifetime: from the very first design plan until the last bugfix.

Do you have different experiences?


See you next week!

RelaxedProgrammer

8/16/2018

How to deal with stress?


In this article I won’t tell you any secret magic which counts down with all the stress during your work and I don’t wanna write like a “positive energy coach”, because I think it makes totally no sense without some more concrete points. But if I ask any of the good software developers about that what is the most difficult part of their work, some of the following expressions will be part of the answer for sure: pressure, stress, too much work. So I think it makes sense to talk about this topic.
The stress if there for everyone, the most common sources of stress are time pressure, technically difficulties, bugs and communication with colleagues and customers. Some of the developers can handle stress quite well, some of them have a worse stress handling skill. Usually the ones with better stress handling can reach better positions during their career, better work-life balance and all things considered they are happier.
When I was a beginner sometimes I had the feeling, that I’m the only one who is under stress and the more experienced colleagues are not under pressure. Later I realised that it was not true at all. They were stressed as well, but they could handle it. Later on during the years I learnt to handle it in a better way, but sometimes I’m still having difficult weeks. These are the most important points in my view:

  • Always know what is your motivation to work there, why you are doing it at all. For example my motivation is to bring the best life quality to my family what I can. For that I need a job with a good salary and with good work-life balance. Next to that it is making me fun the develop my technical skills. Find what is your real motivation and think about that in difficult situations. It’s giving you some energy.
  • Try to always do your best, but not more than that. So if you have a challenging task first of all try to understand before starting with that if you are able to achieve it in time and if you have the needed skills or not. If not ask for support in time. After that try to do your best during your working time. But if it is not enough to finish the task in time, don’t worry, always think that you did your best.
  • Always communicate in a clean way. If you are seeing in advance that you won’t be done in time, just tell it to your team and manager, avoid surprises. But of course always make sure them that you are doing your best. Unless doing it in this way the others will think that you are not motivated enough.
  • Don’t let yourself stuck in uncomfortable situations. If you’re feeling yourself uncomfortable, because of your tasks, colleagues etc. always let your team lead/manager know that you are feeling uncomfortable with the current situation. That is the way to give it a chance to change your situation. But you need to know, most likely it won’t change immediately, sometimes it needs some time.
  • Never communicate in an aggressive way with your colleagues and customers. If you are angry rather go down and walk a bit or drink a coffee before writing your e-mail or talking to your team mates. Always try to tell them your point in a calm way. Aggressive communication is just generating a stressful working environment.
  • Don’t think that other projects are running better. I was working at different companies on different projects, but one thing was common: the project was always behind the schedule. As I was talking with other programmers they had similar experiences. It’s so because that’s one way how managers are trying to let work done faster: if something is running on schedule let’s reschedule it and let the project have less time/workforce.
  • Never forget: if you are a good developer you will have a job even if your project or company is failing!
  • Go through on previous articles about How to manage your work time and How to estimate your tasks.
These were all of my points, but I hope you can extend them with some new ones!



All the best!

RelaxedProgrammer

8/09/2018

How to say no in a nice way to a meeting invitation?

Most of the software developers hates meetings. Especially if they have no additional value for the development.
Ok it is clear, some of them are boring, but still needed. On the other hand some of them makes totally no sense for the whole development team. Of course just to decline a meeting is really not nice. What else can you do?
First of all never attend any meeting which has no agenda in the invitation. If so, then send an answer and ask for the agenda. Once you have an agenda go through and check which points can be relevant for you. If there are no relevant points ask the organiser why he/she invited you and what he/she would like to discuss with you. If there’s no “good” answer, you can simple tell that you feel it unnecessary to attend the meeting and if it’s ok you won’t join.
If only a part of the points are relevant for you, then you can suggest to the organiser to organise the agenda in a way that all relevant points are after each other and you are only attending to that part and not to the other ones.
If most of the points are relevant, but you still don’t wanna attend then check who are the other invited ones. If there’s someone else who has more or less the same knowledge in the relevant topics as you (like a teammate) then tell it to the organizer that you think it would be more effective (effectivity, it is an important keyword if you wanna ensure a manager!) if only one of you would attend. Once the organizer said yes to that ask the colleague if he/she plans to attend the meeting. If the answer is yes you don't need to attend.
All things summarized never tell "no" directly. Try to show that it is not really necessary for you to join the meeting and try to show that participation on the meeting would decrease your effectivity.
That’s the way what is working for me, but if you have any better idea feel free to share with us!

RelaxedProgrammer

8/03/2018

How to estimate your tasks?

Effort estimation. That’s something what you need to do quite often if you are working as a developer. It depends on your company’s working structure and methodology how often and for how big tasks do you need to do it, but it is almost sure that you need to do it.
More and more companies are following some agile software development methodology, in this case you need to estimate only smaller tasks, or if a task would be too complex you should propose to split it into multiple tasks/subtasks.

If your project is following some classical methodology (V-model, Waterfall etc.) or you are a more experienced developer and you need to support new projects with some high level estimations, then it can happen that you need to estimate really big tasks (months/years of work).

Doing a proper estimation is not easy at all, but it is really important for the management, since they can plan the work after your estimation. So if your estimation is too low the management will still expect from you to done the work inside the estimated time. That means you will be really under pressure which is of course bad for you, so try to avoid it. Too high estimation is basically good for the developer (OK, it can be boring if you have nothing to do), but bad for the management, since they are even paying for the part of your time, which would not be really necessary for the task. That’s why managers always try to ask you to decrease your estimation. But how to do a proper estimation?

First of all try to split the task into subtasks: try to have subtasks, which are easier to estimate, like implementing one well specified functionality etc. At this step don’t forget about non-implementation tasks: technical planning (design), code review, testing (manual testing still takes some time), documentation etc.

As next step you need to estimate all the subtasks. Here always try to do it based on some similar tasks which you have already done in the past. Do not estimate your time in a way, that if you sit down and just concentrating on this then you may finish it in 4 hours, because usually it is not the case. Calculate it in the way how you are really working on a normal day: you are drinking a coffee, having a cigarette, doing some short talk with colleagues, checking your e-mails and in the meanwhile you are working on your task. Rather say: OK, I can do it in one day, with a comfortable velocity. Count always with possible bugs: maybe your first implementation won’t work as is shall and it takes some time to figure out the root cause. Or maybe you will have some issues with the version control system.
Especially if you have less experience with the task it is a good practise to do two estimations parallel by two developers, compare and discuss the results later.
One more trick: always try to work with some predefined possible estimations: like 1 hour, 2 hours, half day, one day etc., then it is easier to decide to which category does your task belong.
In the end you have a list of subtasks (to do list) with some estimations. So that if someone asks you why is it 1 week and if it could be decreased just refer to the to do list. If your manager would like to decrease the working time always propose to decrease the to do list as well, like: if I don’t implement 100% code coverage unit tests, just 50%, then I can save 2 hours on testing etc. But never decrease your estimation without changing the to do list, that looks unprofessional!

What are you tips and tricks for estimations?

I wish you a nice day and good luck at estimation!
RelaxedProgrammer

7/26/2018

How to manage your working time?

Most of the programming tasks have a due date for yesterday, but best case until end of the day. At quite a lot of companies it is a common practise to ask you to not to go home until your task is not done or asking you to cancel your holidays because of the current work situation.
On the other hand however people thinks that programmers have no life, most of the cases it is not true. Programmers have family, hobbies, friends and need for simple having rest.
And there is something what is called work-life balance by HR people, first it can sound as bullshit, but it is very important in fact, it is very important for you.
So normally you are working on a task which has a due date. And this due date is usually earlier than it should be. What can you do?
  • Do some over hours/work on the weekend or during your holiday and finish it in time
  • Being late with your task
  • Show to your manager before starting your task that it is not possible to finish your task in time before you’re starting it
What will happen in case of the first solution: you are working when you shouldn’t. You will achieve the due date. Your manager will be satisfied and will find your next task immediately. So you can continue to work on the next day and you are loosing the time to spend with friends, family or having rest. On long term if you are doing it frequently your manager will know that you can achieve the critical tasks in time and will assign all urgent tasks to you. And this situation will happen to you more and more often. On the other hand your boss will be satisfied with you, but to be honest at most of the companies it is not honoured enough.
In case of the second option your task will be done late. Of course your boss and manager will be unsatisfied. There won’t be any feeling of success from your side. And you can block your colleagues in their work as well, since they may are waiting for you or for your inputs. It is a loose-loose situation.
The third solution it the one I would suggest to follow. For that you need to be able to estimate your tasks as precise as possible. It’s up to the company and working model who is estimating your tasks. It’s either you or one of the most experienced colleagues of you. If it’s you then it is pretty easy. Otherwise always check the estimation/planned due date before start to work on the task and if it is unrealistic for you let your manager know about that. Always inform your manager about the followings: what if a realistic due date in your view and how did you calculated it (show him all subtasks you identified and their estimations). If there is a possibility to skip any of the subtasks to make it faster (not testing a part, less documentation, less nice solutions etc.) let always mention it with advantage and disadvantages. Then it should be clear to your manager that your task won’t be done until Tuesday, only until Thursday. He can adapt his plan and you won’t block the others. And you can finish the task until Thursday without doing overhours.
Of course there are situations when it is not possible to change the plans such way, but most of the cases it is possible.
This is the way of working which turned be best for me to be successful in my work and having time for my family and friends as well.

If you have any other idea feel free to share it with us in a comment!

All the best for you!
RelaxedProgrammer

How I prepared my first online course

Since long I didn't publish anything here. It's because I was busy with some other topics, but now it's time to share the result...