Bad standups degrade your developer experience. Still, we’re agile, we need daily standups.
Do you despise standups? Do you give an update or a diary? Do you refine tasks on your standups?
Don’t use standups as tech journals. Don’t give updates on all your tasks.
Here’s how you can improve your standups.
Team leader explaining developer’s tasks shouldn’t happen.
Leaders don’t know what the whole team is doing. When they do, to keep updates short, they give a vague update on the team’s progress.
You would have a pre-daily to update the leader. I had these and you need to…
Quarkus is a framework for creating cloud-native projects. The main feature of the framework is the possibility of using GraalVM.
Quarkus promises fast startup, low memory footprint, and good developer experience.
An AWS Lambda with Quarkus.
Lambda should call two endpoints in sequence. Both endpoints have the same custom headers. Headers hold the authorization and additional metadata. Headers metadata is coming as input of lambda.
One endpoint fails — Lambda fails. Lambda fails — generate error information. One of the endpoints can fail, and failure reasons should be returned.
Endpoints are secured with SSL. Lambda needs custom CA certificates. …
Easier said than done. Mocks are everywhere. You can’t test without mocks.
What are the alternatives? Why mocks aren’t “one-size-fits-all”? How to use other test doubles?
Only mocks exist. Mocks are enough.
Let’s look at the following code example.
What’s wrong with the example?
engine. This shouldn’t be mocked. There’s no usage of
engine in the test. Mock adds more boilerplate and doesn’t serve the purpose.
Let’s look at another example.
This tests the behavior of
notificationService. Service mock is used for behavior tests. How would you test the state…
Logs in unit tests are bad practice.
Insignificant, pointless, and clog the console output. Unit test logs slow your build, delivery, and development.
Here’s why you shouldn’t log in unit tests.
You use logs. Logs in the code. What about tests?
Logs in tests increase the test size. Logs add more code, more liability, and more confusion. Logs do harm to your tests.
Will the message help others? No. Will the message stay forever? Yes.
Bigger classes — bigger tests. Working with Java I find this true. Logs add more code, serve little purpose, and are insignificant.
Most Java projects…
You don’t like to hear these. You should accept the truth instead.
“As an E-type system evolves, its complexity increases unless work is done to maintain or reduce it.” ¹
Address the issues in code early. Use good code metrics to find low-quality code.
Here’s how experienced developers find low-quality code.
Cyclomatic complexity is a code complexity metric. Most static analysis tools use it nowadays, to predict complex code.
More branching — complex code. High metric — complex code. Higher…
“This should take a couple of hours.” “This is a straightforward task.” “Should be a two-pointer!”
You hear these on every sprint refinement. Most are false promises. The task spirals into days of work.
Here’s why estimates are off by a factor of two. Here’s how you make better estimates.
Some tasks are terra incognita. Most enterprise tasks are to re-use existing features. These are easier to estimate. Look for the original task estimates. For uncertain tasks, it’s terra incognita.
Michael Wolfe on estimates, and analogy with terra incognita:
Let’s take a hike on the coast from San Francisco to…
Do you use random? Do you work with exceptions? Do you search for null values?
If you do, you should see these hideous snippets. You will see how far stupidity can go.
Here are the 5 hideous Java snippets, and their good alternatives.
The longer you look, the worse it gets. There’s a range wrapped inside an infinite loop. Code loops until the correct number is generated.
How is the range generated? The range can be
1_000_000 , or even more. The range won’t exist for negative
CODE_LENGTH. The infinite loop could run indefinitely and halt the execution.
How did you represent absent values before
Optional? Yes, you used
null. The code would look something like this:
Optional solves is the absence of value. Look at the following example.
The first line will cause
NullPointerException on the caller. Line using
Optional on the contrary won’t. You need to unwrap the
Optional and handle the absence.
Employer: “Milos, you will get paid 500€.”
Me thinking: “I wanted to work for free to gain experience.”
Getting the first job is always a pain. You send CVs, but no response back. You even get to interviews sometimes. The interviewer ends the interview with: “We’ll get back to you!”
How you can get a paying job without a resume? How I created software for money without any experience?
I was a young, ambitious student at college. In my third year of college, learning computer science. …
Do you have bad code before release? Do you have impatient stakeholders? Do you need revenue as soon as possible?
Stakeholders care about the costs, releases, and revenue. You care about high-quality code, good software, and no late-night calls.
How do deadlines affect code? Do deadlines really matter?
Manager: “This is an existing functionality with a simple difference.”. You: “It’s a new feature, which will take several weeks to implement!”
Manager: “You have three weeks to deliver!”. You: “This will take at least 2 months!”
Manager: “Let’s add more people to the project.”. …