Improve the code by removing it
Nov 02, 2024
advice
yagni
system
code
requirements
client
tip
2 min read
Less is more. It’s a clichéd short maxim, but sometimes it’s really true.
Over the past few weeks, among the improvements I made to our code was the removal of some of its fragments.
We were developing the project following the principles of extreme programming, including YAGNI (You Aren’t Gonna Need It). But human nature is imperfect, and in some places we made mistakes.
I noticed that our product took an unjustifiably long time to perform certain tasks—simple tasks that should have been completed almost instantly. This was all because we overcomplicated their implementation—with all sorts of trinkets and bows that were actually unnecessary but seemed useful at some point.
So, I simplified the code, improved the product’s performance, and reduced the overall code entropy, all thanks to removing unnecessary functions from the project code.
...
➦ Write code as if you will be maintaining it for the rest of your life
Oct 26, 2024
code
start
career
life
rest
2 min read
You can ask 100 different people what any programmer should know and be able to do, and get 100 different answers. This can be both overwhelming and frightening. All advice is good, all principles are sound, all stories are convincing, but where to start? And, more importantly, once you start applying best practices, how do you maintain the right level and make them an integral part of your programming practice?
I think the answer lies in your mindset or simply in your approach. If you are indifferent to your fellow developers, testers, managers, sales and marketing staff, as well as end users, you will not feel the urge to, for example, conduct test-driven development or write clear comments in the code. I think there is a simple way to change your attitude and develop a desire to release products of the highest quality:
...
➦ Try before you decide
Oct 22, 2024
in •
JAVASCRIPT
mary
tom poppendieck
javascript
architect
decision
team
solution
information
3 min read
Many choices must be taken during the attachment-forming process. Some may be related to the library or infrastructure selection, while others may be related to the application of particular design patterns.In any event, the architect is often in charge of making the choice. The architect gathers all available data, considers it for a period, and then specifies the guidelines that the developers must follow. The fact that there is an improved method won’t surprise you.
The decision-making process is described by Mary and Tom Poppendieck in their work on lean development. They think that the ultimate choice should wait until the most crucial moment, when the team’s inaction will have permanent (or difficult to reverse) repercussions and a decision will be made on its behalf if no decision is made.
...
➦ Perspective as seen from 300 meters
Oct 08, 2024
whenever
view
infoviz
code
quality
representations
metrics
program
software
3 min read
We architects are interested in learning how good the software we are developing is.There is a more subtle internal component to program quality that has to do with the design’s clarity, or how simple it is for us to comprehend, support, and grow the software product. The exterior component of program quality is evident: the program must be valuable to the user. Whenever we push for a definition of quality, we ultimately say, “I’ll know when I see it.” So, what do you think quality is?
Architectural charts use small squares to represent entire systems, and the lines that connect them can indicate any number of things, including shared resources (like a train) or dependencies. These diagrams show the system at a 10-kilometer altitude, which is roughly equivalent to how an airplane views the terrain.
...
➦ Your clients mean something different than what they say
Oct 06, 2024
start
clients
need
client
task
project
3 min read
I have yet to meet a client who wouldn’t be happy to tell me what they need – usually down to the smallest details. The problem is that clients don’t always tell the whole truth. Overall, clients don’t lie, but they speak in their own client language, not in the language of developers. They have their own vocabulary and their own context. They leave out important details. They talk as if you have also worked in their company for twenty years. And it is all complicated by the fact that, in reality, clients often don’t know what they need! Some have an understanding of the big picture, but they are rarely able to articulate their vision clearly. For others, the overall picture may be less vivid, but they know what they don’t need.
...
➦ The importance of code formatting
Oct 05, 2024
in •
COBOL
cobol
code
first
kevin mcguire
line
screen
work
poetry
3 min read
In ancient times, I worked on a COBOL project where all participants were forbidden to change the indentation size unless it was necessary to modify the code. All because one day someone broke something – a line of code crept onto the next one and ended up in special columns at the beginning of the line. The ban was in effect even if the code formatting was misleading—which happened—so one had to read the code very carefully, as it couldn’t be trusted. I’m sure the losses from this policy were enormous because it slowed down the work of programmers.
Researchers have shown that a programmer spends more time navigating and reading code (to find the part that needs to be changed) than actually writing code, so it is advisable to optimize these operations.
...
➦ When programmers and testers collaborate
Oct 03, 2024
in •
FIT
интеграционный
tests
programmers
code
testers
time
3 min read
When testers and programmers start collaborating, miracles happen. Less time is spent playing ping-pong with defects in the defect tracking system. Less time is spent discussing whether the behavior is a bug or a new feature, and more time is spent on developing quality. software that meets customer expectations. There is many opportunities to establish collaboration even before the coding begins.
Testers can help clients write acceptance tests in the language their subject area using tools such as Fit (Framework for Integration test). If these tests are given to the programmers before they start writing code, they will be able to apply the practice of acceptance test-driven development (ATDD). Programmers write frameworks to run the tests, and then code to ensure they pass. these tests.
...
➦ Tests are written for people
Oct 01, 2024
tests
code
test
method
check
3 min read
You cover all the finished code or its fragments with automated tests. Congratulations! Do you write tests first and then code? Even better! Just because of this, you can be considered a programmer practicing advanced approaches in software development. But are your tests good? How can you determine that? One way is to ask yourself: “Who am I writing for?” these tests?». If the answer is “I write them for myself to reduce costs for debugging” or “for the compiler to execute them,” then it’s quite possible that you are not writing the best tests. So, for whom Why write tests? For those who will try to understand your code.
Good tests serve as documentation for the code they are testing. They describe how the code works.
...
➦ Professional programmer
Sep 22, 2024
systems
code
professionals
work
responsibility
defect
3 min read
Who can be considered a professional programmer? The most important trait of a professional programmer is personal responsibility. Professional programmers are responsible for their careers, their evaluations, their deadlines, their mistakes, and their expertise. A professional programmer does not shift this responsibility onto others.
A professional is responsible for their own career. Reading and learning are your responsibilities. Staying up-to-date with the latest industry advancements and technologies is your responsibility. Too often, programmers believe that their education is the employer’s job. Sorry, that is completely incorrect. Do you think doctors believe that too? Lawyers? No, they study in their free time and at their own expense. They spend a significant amount of their free time reading journals and court rulings. They maintain their professional level.
...
➦ Do not repeat your code
Sep 07, 2024
in •
DRY
•
METHOD
code
repetition
abstract
strategy
dry
open
closed principle
srp
principle
software
logic
duplication
3 min read
“Don’t Repeat Yourself (DRY)” is probably one of the most important principles of programming, and it underlies many other well-known correct approaches and design patterns in software development. A developer who has learned to recognize duplication and can eliminate it using appropriate techniques and suitable abstraction is capable of writing much clearer code than one who constantly clutters the application with unnecessary repetitions.
Code duplication is ballast Every line of application code requires maintenance, and it serves as a source of potential errors in the future. Duplication leads to unnecessary increased code volume, which raises the likelihood of errors and makes the system overly complex. Increased system volume due to duplication, firstly, it prevents developers from fully understanding the system, and secondly, it does not guarantee that changes made in one place do not It will be necessary to repeat it in other places where this logic is duplicated.
...
➦