Live data from Hacker News

Semantic compression (2014)

caseymuratori.com

1–10 of 33 posts

Re: Semantic compression (2014)

#4

How's this different from just refactoring? Why the fancy name?

There is a short mention of “refactoring” and how it is a bad name, I’m not sure why, just read the article in 3mins. TL;DR: start with the complex things, deduplicate code and use proper data structures once you have working code with multiple use cases.

Re: Semantic compression (2014)

#8
I think semantic compression is achieved by using a denser more expressive language, some languages can express the same activity in far fewer lines of code. Personally I find the denser code, harder to read, which I think also makes sense, since it contains more meaning in less space. If you are writing code, perhaps in python, and you keep following your editors instructions to refactor it, you end up with far fewer repeated lines of code, and lots of small reused functions, you are actually doing manual code compression. I have always wondered why, if editors are so smart, they don't have a 'compress this project' button, which does all that for you.

Re: Semantic compression (2014)

#9

How's this different from just refactoring? Why the fancy name?

The only thing the word “refactoring” tells me is that you’re rearranging code without changing functionality. It doesn’t tell me why you’re doing it. You could be doing it for all sorts of reasons: to extract part of the code into a separate library, to route around dead code so it can be excised later, to enable a performance optimisation, or to allow a new feature.

What’s going on in this article is refactoring towards a very specific goal. That goal is reaching an architectural style that could also have been achieved earlier in the development process, and it’s that style that is, AIUI, the point of the article.

Post reply on HN