schmonz.com is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Search results for tag #refactoring

#refactoring boosted

[?]Hack a Day (unofficial) » 🤖
@hackaday@www.urbanmind.net

“We should refactor the whole thing…”


I've heard this line more times than I can count — and honestly, most of those refactors failed.

Not because refactoring is a bad idea. But because they were done wrong.

📉 Why They Fail


Here are the top reasons I’ve seen (and experienced):

  • No clear target architecture

    “We just want it cleaner” is not a plan.

  • Lack of test coverage

    If you don’t have a safety net, every change is a risk.

  • Big-bang rewrites

    Trying to change everything at once = chaos.

  • Team misalignment

    If everyone has a different definition of “clean,” good luck.


✅ How to Do It Right


If you want your refactor to succeed, start with these:

  • Define the end goal

    What will the architecture look like after refactoring?

  • Refactor incrementally

    Small, focused changes are easier to test, review, and roll back.

  • Write tests first

    Ensure you’re not breaking things while cleaning things up.

  • Align the team on standards

    Agree on patterns, formatting, naming — everything.


💡 My Take


The best refactors I’ve seen had these 3 things:

  1. A clear vision
  2. A solid test suite
  3. A well-communicated plan

Refactoring without those? You’re just rewriting code and hoping for the best.

🙋 Your Turn


Have you ever done a big refactor?

  • Was it painful or satisfying?
  • Did you have the plan and tests?
  • Or was it more like “rip it out and hope”?

Let’s share some refactor war stories in the comments. 👇
🔧 Why Most Refactors Fail — And How to Fix Them

    dtanzer boosted

    [?]David Tanzer »
    @dtanzer@videos.devteams.at

    Code is a Liability

    "Code is a liability, not an asset" - Have you heard this before? What does that even mean - without code, there would not be any software?! Just like without branches, there would not be any trees...
    While that's true, if you only treat code as an asset, that can lead to bad behavior. In this video, I explain why and how that can happen...

    Find me on Mastodon: https://social.devteams.at/@dtanzer
    Find me on Bluesky: https://bsky.app/profile/dtanzer.bsky.social
    Find me on the web: https://www.davidtanzer.net or: https://www.devteams.at

    Alt...---

      #refactoring boosted

      [?]DevTo VN Bot » 🤖
      @devto_vn_bot@mastodon.maobui.com

      Tái cấu trúc mã lộn xộn: Tăng tính liên kết, giảm tính phụ thuộc. Phân tách rõ ràng các class, sử dụng interface và injection để code dễ bảo trì, dễ test.

      dev.to/abhinawkr/refactoring-m

      #refactoring boosted

      [?]Judith van Stegeren »
      @jd7h@fosstodon.org

      #refactoring boosted

      [?]InfoQ »
      @infoq@techhub.social

      💡 This is the story of how built a type checker to make developers happier, and how they're building a Ruby package system to introduce modularity.

      This video shares high-level strategies for any team that wants to run a migration in a large, stubborn codebase.

      🎥 Watch now: bit.ly/45en6uJ

      📄 included

        #refactoring boosted

        [?]HackerNoon »
        @hackernoon@mas.to

        Replace vague error messages with specific, actionable feedback that helps users solve problems. hackernoon.com/refactoring-031

          #refactoring boosted

          [?]Habr » 🤖
          @habr@zhub.link

          RUG — малоизвестный, но фундаментальный принцип Clean Code

          Многие разработчики при обсуждении основ Clean Code называют одни и те же принципы — чаще всего упоминаются DRY , KISS и YAGNI . Эти концепции прочно закрепились в профессиональном сообществе и воспринимаются как обязательная часть хорошего кода. Принцип RUG упоминается значительно реже. Чаще всего о нём узнают с опытом, а многие применяют его интуитивно, даже не подозревая, что для этого подхода существует отдельное название и формулировка. Сегодня я хочу поговорить о принципе RUG и о том, какие рекомендации он даёт по написанию программного обеспечения. RUG ( Repeat Until Good ) — это принцип, который говорит: можно повторять один и тот же код, пока это разумно. На ранних этапах разработки важнее просто реализовать логику, исходя из текущих требований, чем пытаться сразу создать «идеальную» абстракцию. В этот момент задача — как можно быстрее получить рабочее решение, которое отражает текущие знания о системе. Но со временем, когда одна и та же логика начинает встречаться всё чаще, становится очевидно, что её удобнее и правильнее выделить в отдельную, чётко оформленную абстракцию, чтобы избежать дублирования и упростить дальнейшую поддержку. Мы используем этот принцип каждый раз, когда пишем код. Ведь практически любую логику можно сделать более абстрактной и масштабируемой — вопрос лишь в том, когда наступает подходящий момент для этого. Я буду использовать TypeScript , так как этот язык знаком большинству разработчиков. 😁

          habr.com/ru/articles/934986/

            Stefan Roock boosted

            [?]Programming Quotes » 🤖
            @programming_quotes@mastodon.social

            DRY Don't Repeat Yourself Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            — Dave Thomas, Andy Hunt

              #refactoring boosted

              [?]Volker Stolz »
              @fm_volker@mastodon.social

              “This was done by an LLM, and then reviewed by a human. [..] The break became a continue, turning errors into infinite loops. [..] small enough change in a larger code movement that we didn’t notice it during code review.”

              Queue the LLM-apologists and something about “thou shalt have test cases” in 3..2..

              (Though I feel I should put that tag into scare-quotes)

              From: @nixCraft
              mastodon.social/@nixCraft/1149

                #refactoring boosted

                [?]DevTo VN Bot » 🤖
                @devto_vn_bot@mastodon.maobui.com

                Bài viết về Refactoring ASP.NET: Ánh xạ kết quả miền vào phản hồi HTTP. Tác giả đề xuất cách làm sạch mã điểm cuối API, dễ bảo trì hơn bằng cách dùng Result pattern và filter.

                dev.to/alexdevfx/aspnet-refact

                  #refactoring boosted

                  [?]GNOME »
                  @gnome@floss.social

                  🧪 "Have a GTK app with no tests? No problem!"
                  with Federico Mena Quintero at
                  📅 25 July 🕒 14:20 CEST 📍 Brescia

                  🛠️ Federico shows how to refactor messy GTK codebases so you can finally test them—without rewriting from scratch.

                  🔗 events.gnome.org/event/259/con

                  The image shows graphically what's announced in the post. It contains the GNOME logo, the name of the speaker, the photo of the speaker and the title of the talk. It moreover contains a graphical rappresentation of the city of the conference, Brescia, and the dates of the conference.

                  Alt...The image shows graphically what's announced in the post. It contains the GNOME logo, the name of the speaker, the photo of the speaker and the title of the talk. It moreover contains a graphical rappresentation of the city of the conference, Brescia, and the dates of the conference.

                    #refactoring boosted

                    [?]DevTo VN Bot » 🤖
                    @devto_vn_bot@mastodon.maobui.com

                    Cải thiện code .NET của bạn với Code Metrics và Refactoring Controller! Bài viết hướng dẫn cách sử dụng các chỉ số để xác định và sửa code "spaghetti", giúp code dễ bảo trì, dễ đọc và dễ kiểm thử hơn.

                    dev.to/rupinder_kaur_6730d267d

                      #refactoring boosted

                      [?]Leanpub »
                      @leanpub@mastodon.social

                      Static Analysis and Automated Refactoring leanpub.com/b/static-analysis- by Matthias Noback matthiasnoback@mastodon.social and Tomas Votruba is the featured bundle of ebooks 📚 on the Leanpub homepage! leanpub.com

                        #refactoring boosted

                        [?]Sébastien Roccaserra 🐿️ »
                        @sroccaserra@mastodon.social

                        The ranged W command was great to perform a Move Method to another class.

                        W appends a selected block from the current file to another file. Then you can edit the other file and move the appended block to its correct position with the m command. A few substitutions later, and the Move Method was done without leaving ed.

                          #refactoring boosted

                          [?]Leanpub »
                          @leanpub@mastodon.social

                          Leanpub book LAUNCH 🚀 Build a Database Server: Learn how real databases work by following this practical guide to building your own by Chris Zetter

                          Watch here:

                          youtu.be/LvZ_ZXwbJP4

                            #refactoring boosted

                            [?]Jon Reid »
                            @qcoding@iosdev.space

                            Do you ever skip trying to use automated refactoring because it's too annoying in Xcode? qualitycoding.org/xcode-key-bi

                            iOS Dev Tools & Techniques

Xcode Key Bindings to Make Refactoring Less Painful

Quality Coding with Jon Reid

                            Alt...iOS Dev Tools & Techniques Xcode Key Bindings to Make Refactoring Less Painful Quality Coding with Jon Reid

                              #refactoring boosted

                              [?]Sébastien Roccaserra 🐿️ »
                              @sroccaserra@mastodon.social

                              Example of scope, I currently want to invert the condition on the name here:

                              *34,40n
                              34 } else {
                              35 if (item.quality > 0) {
                              36 if (!item.name.equals("Sulfuras, Hand of Ragnaros")) {
                              37 item.quality = item.quality - 1;
                              38 }
                              39 }
                              40 }

                              This is fine if I do one thing at a time.

                              Also: ed edits could be a great format for toots 🤔

                                #refactoring boosted

                                [?]Sébastien Roccaserra 🐿️ »
                                @sroccaserra@mastodon.social

                                It's going well so far:

                                *!git log --oneline | cut -d' ' -f2- | tac
                                Starting point
                                Simplify for loop
                                Invert the first if
                                Split first if
                                Invert if on sulfuras
                                Permute ifs for sulfuras
                                Join first 'if else's

                                I think I can now say it's totally doable and even worth repeating this kata a few times.

                                  [?]Sébastien Roccaserra 🐿️ »
                                  @sroccaserra@mastodon.social

                                  Totally random thought: would I be able to do the Gilded Rose kata using only the ed text editor in a reasonable time?

                                  Goals:
                                  1) have fun,
                                  2) look like a fool,
                                  3) learn enough ed to later be able to script complex text changes across files,
                                  4) also level up in sed and vim

                                  Reason: ed(1) is the standard Unix text editor.

                                    #refactoring boosted

                                    [?]Jon Reid »
                                    @qcoding@iosdev.space

                                    Stop right-clicking to refactor in Xcode qualitycoding.org/xcode-key-bi

                                    Sloth working in DMV in Zootopia film

                                    Alt...Sloth working in DMV in Zootopia film

                                      #refactoring boosted

                                      [?]Programming Quotes » 🤖
                                      @programming_quotes@mastodon.social

                                      Refuctoring the process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone except yourself.

                                      — Jason Gorman

                                        #refactoring boosted

                                        [?]Leanpub »
                                        @leanpub@mastodon.social

                                        From the Leanpub Blog: Welcome to the Leanpub Launch video for Build a Database Server: Learn how real databases work by following this practical guide to building your own by Chris Zetter!

                                        leanpub.com/blog/leanpub-book-

                                          #refactoring boosted

                                          [?]Leanpub »
                                          @leanpub@mastodon.social

                                          Leanpub book LAUNCH 🚀 Build a Database Server: Learn how real databases work by following this practical guide to building your own by Chris Zetter

                                          Watch here:

                                          youtu.be/LvZ_ZXwbJP4

                                            #agile boosted

                                            [?]Habr » 🤖
                                            @habr@zhub.link

                                            TDD: разработка быстрее и качественнее

                                            Все мы стремимся создавать более качественное программное обеспечение и делать это быстрее. Я считаю, что разработка через тестирование предлагает нам путь к этой цели. Все еще боитесь использовать этот подход? Тогда я приглашаю вас обсудить советы и приемы помогающие раскрыть преимущества TDD!

                                            habr.com/ru/articles/925446/

                                              #refactoring boosted

                                              [?]João Esperancinha »
                                              @jesperancinha@masto.ai

                                              #refactoring boosted

                                              [?]Mark T. Tomczak »
                                              @mark@mastodon.fixermark.com

                                              Meeting with my project manager to explain why I've spent the week doing refactors instead of implementing feature requests.

                                              youtube.com/clip/UgkxOIdnojWnl

                                                #refactoring boosted

                                                [?]Test Double »
                                                @testdouble@mastodon.social

                                                Stop asking 'what tool should we use?' Start asking 'what specific outcome are we trying to achieve?' In this talk, Dave Mosher breaks down the difference between chasing shiny objects and solving real problems. link.testdouble.com/786585

                                                  #refactoring boosted

                                                  [?]Habr » 🤖
                                                  @habr@zhub.link

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

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

                                                  habr.com/ru/articles/917012/

                                                    #refactoring boosted

                                                    [?]Programming Quotes » 🤖
                                                    @programming_quotes@mastodon.social

                                                    Don't comment bad code rewrite it.

                                                    — P. J. Plaugher, Brian W. Kernighan

                                                      #refactoring boosted

                                                      [?]Programming Quotes » 🤖
                                                      @programming_quotes@mastodon.social

                                                      Don't comment bad code rewrite it.

                                                      — P. J. Plaugher, Brian W. Kernighan

                                                        Ted M. Young boosted

                                                        [?]Clare Sudbery »
                                                        @claresudbery@mastodon.social

                                                        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

                                                          Back to top - More...