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.

Administered by:

Server stats:

9.8K
active users

#refactoring

6 posts5 participants1 post today

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.

You can listen here (subtitles on screen): youtu.be/ZcEz8cA017M?si=tYhdCb

Replied in thread

@GeePawHill

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.

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 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...)

[1] mastodon.thi.ng/@toxi/11429644

thi.ng/vectorsOptimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

Level up your refactoring with these 9 articles!

Refactoring is a critical skill in software engineering. Here are some articles to help you level up:
devleader.ca/category/software

Refactoring Techniques:
devleader.ca/2023/11/14/top-10

Remove Control Flags:
devleader.ca/2023/11/19/remove

What & Why For Refactoring:
devleader.ca/2023/11/21/what-i

When to Refactor:
devleader.ca/2023/11/24/when-t
devleader.ca/2023/12/27/when-s

Rewrite vs Refactor:
devleader.ca/2023/11/26/rewrit

Legacy Code:
devleader.ca/2023/11/27/refact

What is Refactoring:
devleader.ca/2023/11/28/what-d

Simplified Refactoring:
devleader.ca/2023/12/04/how-to

Testing With Legacy Code:
devleader.ca/2023/12/20/dealin

I'm also happy to announce that I have an awesome course on all things refactoring, which you can check out here:
dometrain.com/course/from-zero

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!

Код пишется, а не рождается: борьба с идеей “идеального старта” проекта

Любой программист, вне зависимости от уровня, когда-то сталкивался с этим. Ты садишься за проект, полный планов и идей, предвкушаешь, как создашь нечто совершенное, но... проходит час, второй, а на экране только десяток папок, пара заглушек и файл README.md. И вот уже начинаешь возвращаться к документации в поисках “правильной” структуры проекта или подсматриваешь, как сделали другие. Примерно то же самое происходит, когда ты работаешь в команде: собрания перетекают в бесконечное обсуждение архитектуры, абстракций и фреймворков. Идеи летят кометами, все соглашаются, что “всё должно быть как надо”, но реальная работа — застопорилась. Потому что команда вместе с тобой подсознательно ждет чего-то: идеального старта . Синдром идеального старта — не просто миф, а настоящая преграда для продуктивной разработки. В этой статье мы поговорим о том, почему ждать "идеальности" — значит тормозить, как такой подход мешает развитию, и что с этим можно сделать. Зачем мы ждём идеального старта? Давайте начистоту. Инженерный подход прививает большинству программистов стремление к "чистоте" и "вечному". Важно, чтобы проект был построен на устойчивом фундаменте, который можно будет развивать много лет. Но эта стремительность к "безупречности" часто оборачивается довольно токсичной привычкой откладывать реальные действия, пока не будет найдено "идеальное решение" . Проблема в том, что идеальное, как правило, недостижимо. Вот почему:

habr.com/ru/articles/897468/

ХабрКод пишется, а не рождается: борьба с идеей “идеального старта” проектаЛюбой программист, вне зависимости от уровня, когда-то сталкивался с этим. Ты садишься за проект, полный планов и идей, предвкушаешь, как создашь нечто совершенное, но... проходит час, второй, а на...

👀👀 Here are 12 videos you have to check out!

Here's a collection of some of my more popular videos on YouTube:

youtu.be/Zf0YWgNbKnQ
In this video, I discuss the Reddit post about Rust replacing all of the C# at Microsoft.

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.

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!

youtu.be/Wa3sdKGp3wE
This video explains how you can use BenchmarkDotNet like all of the performance examples you see across the web!

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.

youtu.be/_v9k74gWJtE
A step by step guide on setting up watches for debugging in Visual Studio.

youtu.be/yg-qZXPBlKM
If you're interested in getting started with Autofac, this video is a perfect starting point!

youtu.be/GE-phyI6lEM
What's faster? Task.WhenAll or Parallel.ForEach? Only one way to find out!

youtu.be/iEfuyxwKQCE
A fun look at composition (compared to inheritence). No experience required for this one!

youtu.be/rohq-Wqj0yI
Getting setup with xUnit for writing unit tests!

youtu.be/Mk8bwXIZTXg
This is a fun video on how to make your own ASCII art generator!

youtu.be/xsY9tyRbCVk
How to switch up your code to move away from Enums by refactoring them out!

----
📨 Sign up for my email newsletter!
🗣️ Share with your network!

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.

16elt.com/2024/09/07/future-pr