fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software.
If you wish to join, contact us for an invite.
What is refactoring, why is it important and how can you get really good at it? In this Making Tech Better podcast episode, I spoke to @emilybache about enhancing the skills and culture of your teams, to make your code easier to understand and cheaper to modify.
One danger of a too transparent box used for TDD is that tests get too coupled to a specific implementation and thus hinder refactoring and evolution. ie, taking the soft out of software.
Sure you are aware of that, but novices easily fall into that trap, when they not have learned enough about refactoring towards simpler code.
Taming Shotgun Surgery in Ruby: A Developer's Guide to Effective Refactoring
In the world of software development, the term 'shotgun surgery' describes the chaos of making a single logical change that ripples through multiple files and classes. This article delves into the con...
In recent years every spring seems to turn into a period of _massive_ refactoring & restructuring in #ThingUmbrella — maybe it's a form of spring cleaning, even though the reasons[1] are not seasonal... Currently spending my nights reworking the https://thi.ng/vectors package (likely one of the most comprehensive vector packages available for TS/JS) and trying out different splits/structures, testing their impact on package sizes and usability in existing downstream packages. Currently over 3000 source files with uncommitted changes... aaaarrrgghh!
Most functions (vector operations) in this package exist in multiple versions (many code generated, but now in need to be updated): Generic n-dimensional, loop-free, optimized 2D/3D/4D versions and strided versions for manipulating vectors views of larger nD data buffers (supporting all kinds of data layouts, incl. AOS, SOA, hybrid...)
You'll learn a host of refactoring techniques with real code examples to walk through. Understand how to approach refactoring and when you may want to consider a rewrite!
---- Sign up for my email newsletter! Share with your network!
I need to refactor the code as I put everything in the same view it was previously and some things are hardcoded. For example, collapsing one group collapses all of them. #Refactoring#CodingLife#Software#iOSDev
Код пишется, а не рождается: борьба с идеей “идеального старта” проекта
Любой программист, вне зависимости от уровня, когда-то сталкивался с этим. Ты садишься за проект, полный планов и идей, предвкушаешь, как создашь нечто совершенное, но... проходит час, второй, а на экране только десяток папок, пара заглушек и файл README.md. И вот уже начинаешь возвращаться к документации в поисках “правильной” структуры проекта или подсматриваешь, как сделали другие. Примерно то же самое происходит, когда ты работаешь в команде: собрания перетекают в бесконечное обсуждение архитектуры, абстракций и фреймворков. Идеи летят кометами, все соглашаются, что “всё должно быть как надо”, но реальная работа — застопорилась. Потому что команда вместе с тобой подсознательно ждет чего-то: идеального старта . Синдром идеального старта — не просто миф, а настоящая преграда для продуктивной разработки. В этой статье мы поговорим о том, почему ждать "идеальности" — значит тормозить, как такой подход мешает развитию, и что с этим можно сделать. Зачем мы ждём идеального старта? Давайте начистоту. Инженерный подход прививает большинству программистов стремление к "чистоте" и "вечному". Важно, чтобы проект был построен на устойчивом фундаменте, который можно будет развивать много лет. Но эта стремительность к "безупречности" часто оборачивается довольно токсичной привычкой откладывать реальные действия, пока не будет найдено "идеальное решение" . Проблема в том, что идеальное, как правило, недостижимо. Вот почему:
Here's a collection of some of my more popular videos on YouTube:
https://youtu.be/Zf0YWgNbKnQ In this video, I discuss the Reddit post about Rust replacing all of the C# at Microsoft.
https://youtu.be/5OKLiQM2y30 This video talks about using plugins within a vertical slice architecture. I walk through one of my solutions to show how I have set things up.
https://youtu.be/fTyubohxBGU This video is on plugin usage in Blazor! As someone that loves using plugins, I had to show the usage in Blazor as well!
https://youtu.be/Wa3sdKGp3wE This video explains how you can use BenchmarkDotNet like all of the performance examples you see across the web!
https://youtu.be/RR7Cq0iwNYo For the beginners out there for C#, this video details how IEnumerable works. While it doesn't do a super technical deep dive, it should help explain the behavior vs something like an Array or List.
Refactoring Challenge: Does your PHP code run multiple SQL queries inside a loop? Optimize it by fetching data in a single query. How would you improve it?
Over-engineering takeaways: Misjudging future requirements can lead to inappropriate abstractions. Avoiding over-engineering can be as impactful as achieving technical brilliance. Simplicity is key to maintainability. Avoid predicting needs that aren't certain. Create abstractions that align with current and reasonable future requirements.