eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

228
active users

#refactoring

1 post1 participant0 posts today

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

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

youtu.be- YouTubeEnjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
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

I started a probably-needless #software #refactoring on Friday and I have absolutely no idea where I am now.

I remember I wanted to add...something to it and I couldn't because of how it was organized. But I didn't have a clear idea then of how it SHOULD be organized and I have even less of an idea now.

But I'm stuck #wfh for 3 days this week, so maybe I can puzzle it out.

One thing for my job I’m looking forward to about #AI: Refactoring large systems

Doing a refactoring that involves hundreds of classes and multiple changes of infrastructure has been a thing that can take weeks, even months.

However, if you have good test coverage, you can let an LLM can do the drudge work for you and just verify it did what it said it did.

TTD is a must anyway, if you use LLM’s for helping you werite code.
#programming #refactoring #unittests