#Refactoring

2025-06-24

#python #programming #refactoring

Reached the point where — after days of work — unit tests break again. In the same place as they did before the big rewrite.

(Checks notes)

Oh! Now the underlying data structures aren’t a horrible mess and I can actually apply the fix that all those rewrites enabled. I think.

Nested contexts of todo-lists are hard.

2025-06-24

Преодоление сложности в самом сердце Анемичной Модели

Доброго времени суток, Хабр! Сегодня хотел бы поговорить об анемичной модели — одном из самых дискуссионных топиков (особенно для приверженцев DDD) и о том, как, по моему мнению, правильно её готовить. Для кого-то анемичная модель — это антипаттерн, тогда как для других это единственный правильный способ реализации приложений. Многие использовали её годами и даже не знали, как она называется, и что кем-то она считается антипаттерном. Реальность же такова, что анемичная модель — это инструмент, который может подходить или не подходить в зависимости от ситуации, но при этом является очень популярным и, по факту, «стандартом де-факто» для многих программистов и организаций. Хотя в последние годы я и вижу тенденцию к тому, что DDD и, соответственно, богатая доменная модель становятся всё популярнее, пока что, по моему мнению, им далеко до популярности анемичной модели.

habr.com/ru/articles/917012/

#ddd #software_design #anemic_model #refactoring #architecture #java #oop #web_development #domain_driven_design #functional_programming

Trending Stocks 📈stonkz
2025-06-21

AI Models: Master of All - A Cheeky Pint with Greg Brockman

Jan Van Ryswyckjanvanryswyck
2025-06-19

A classroom of open-minded people, eagerly learning and practicing "Refactoring Legacy Code Guided By Approval Tests" at @amsterdam 2025. Thanks to all participants for joining and sharing your unique perspectives. Also a big thank you for all the great feedback.

Paul A. Jones, Jr.pauljonessoftware
2025-06-17

Today is all about tightening the screws — refactoring, optimizing, and getting the internals right before expanding any further. Clean code is a feature.

Programming Quotesprogramming_quotes
2025-06-17

Don't comment bad code rewrite it.

— P. J. Plaugher, Brian W. Kernighan

Programming Quotesprogramming_quotes
2025-06-14

Don't comment bad code rewrite it.

— P. J. Plaugher, Brian W. Kernighan

Clare Sudberyclaresudbery
2025-06-13

How can you use code coverage and mutation testing to add tests to legacy code? At @mendercon last year, I demonstrated this powerful technique step by step on the Gilded Rose kata, which is hosted by @emilybache on her GitHub account: github.com/emilybache/GildedRo

You can watch the talk here: youtube.com/watch?v=0qna5cuzDI0

Jan Van Ryswyckjanvanryswyck
2025-06-13

I'm speaking at this year's Amsterdam, happening next week June 18-20. I'll be hosting my workshop "Refactoring Legacy Code Guided By Approval Tests". So come join this fun event with me, and network with like minded people about and more. And to make things even better, use the voucher when buying your ticket for a 20% discount on the regular 2-day ticket.

devopsdays.org/events/2025-ams

Hope to see you there.

ENEP Linuxoidenep
2025-06-12

The class functionality of the class then drinks the squeaks of tests and the starting of the refactoring, bug fixes and the next tests until all tests will not begin to work correctly.

Programming Quotesprogramming_quotes
2025-06-12

Code smells.

— Martin Fowler

Sergiu din ITSergiuDinIT
2025-06-06

Ai luat un junior că e ieftin?
Nu te mira că faci refactoring de la zero.
Codul ieftin costă cel mai mult.

youtube.com/shorts/QlTod9Nfk_g

Mohammad E. Sepehrebrahimsepehr
2025-06-05

Typical developer conversation:
"This legacy code is hard to maintain. Let's just rewrite it from scratch."

Meanwhile, the old project: ...😮

Jürgenelbosso
2025-06-02

Also ich komme mit meinen (en) nur schleppend voran. Heute war wieder nur in der . Aber ich sehe zumindest Fortschritte. Morgen werde ich den Prototypen integrieren und sehen, was rauskommt...

2025-06-02

kitfucoda.medium.com/telegram-

My recent refactoring journey began with a take-home assignment's hidden pitfall: a hard-coded queue in settings.py. This seemingly small detail quickly grew into a global state headache, making testing and modularity a real challenge.

To tackle this, I focused on explicitly managing inter-process communication. The solution involved leveraging multiprocessing.Manager to centralize shared synchronization primitives, allowing for much cleaner dependency injection across parallel processes.

This refactoring delivered significant benefits. It drastically improved testability by eliminating the need for global patching. It also brought consistency and enhanced modularity, laying a robust foundation for future scalability.

It's been a valuable lesson, directly applicable to my own operational chatbot. While not a performance optimization, the structural clarity gained is immensely rewarding. I'm looking forward to diving deeper into the testing aspects of this setup soon!

#Python #Refactoring #Multiprocessing #CleanCode #SoftwareArchitecture #getfedihired #fedihire #OpenToWork

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst