News for hackers. Stuff that matters.
Re:“I would like to maintain the floppy driver” by iforgotpassword on Friday August 02, 2019 @02:09PM (#20595203)
It's amazing how some parts of the kernel barely get maintained explicitly. A year or two ago I was digging through the block driver subsystem and at some point took a look at the loop device as a simple reference. I learned that it supports encryption, because that was actually the only way to implement encrypted volumes about 15 years ago. Dmcrypt didn't exist yet. I would be surprised if anyone still uses that feature, yet nobody bothered removing it. Loop is mostly ever touched if anything changes in the block layer. It was the first block device to be switched over to multi queue though, most likely due to its simplicity. Which is most likely also the reason nobody bothers becoming the official maintainer.
Re:“I would like to maintain the floppy driver” by dev_dull on Friday August 02, 2019 @02:18PM (#20595273)
This is actually not unusual in nature. Complex systems become more complex over time and resist becoming simpler. One day they instantly become simple again (collapse).
Re:“I would like to maintain the floppy driver” by marcus_holmes on Friday August 02, 2019 @05:22PM (#20596760)
I just spent two weeks removing an unused feature from my product. It's amazing how, despite being unused, it affected such a huge amount of the rest of the system (well, either that or my code is not separated properly).

I can understand how a truly complex system becomes "don't touch it except to add things, you have no idea what depends on that chunk of code"

Re:“I would like to maintain the floppy driver” by abraae on Friday August 02, 2019 @05:46PM (#20596909)
I like leaving old code littered around, either commented out or disabled by feature flags. Then, when my energy/concentration levels are too low for real work, it's a strangely satisfying task going back and cleaning up and finally deleting that stuff.
Re:“I would like to maintain the floppy driver” by sjf on Friday August 02, 2019 @07:02PM (#20597383)
While this may be fine for you, it sucks for people reading the coding and searching it. Reading code is already a high concentration task, having to purposely ignore blocks of non-functional code makes it harder than it has to be. Also, now I can't just grep the codebase, I need to see the surrounding code as well to see if the search results are valid.
Re:“I would like to maintain the floppy driver” by abraae on Friday August 02, 2019 @07:18PM (#20597468)
That is totally true when the code is behind a feature flag, rather than commented out. Most people can skip commented code just fine, since it looks like... commented out code, rather than comments intended to be read.

But even in the feature flag case, it serves a purpose by allowing old code to be removed in 2 stages rather than 1 (divide and conquer).

It means the old code still compiles, just in case it needs to be reinstated in a hurry.

Re:“I would like to maintain the floppy driver” by mikekchar on Friday August 02, 2019 @08:50PM (#20597899)
Like others have said, you may be surprised! Normally commented out code is at least highlighted differently in more editors. However, it is not unusual for people to complain to me that "if (blah)" is unreadable and must be formatted "if(blah)" (which honestly blows my mind -- you'd think it would be the other way around, if anything!)

One of the biggest thing that catches me out with commented out code is wondering why it is commented out. Is it desirable, but not working for some reason? Is it undesirable, but not deleted for some reason? Is the new code an experiment? Is the old code an experiment? If it's an experiment, am I sure the previous person reinstated the correct code?

Even if you say it can be reinstated in a hurry, why would it need to be? When I'm reading the code, that's one of the questions I'll be thinking about. If I see commented out code, I'll start walking back in history and seeing why the code was replaced. Then I'll be wondering if there is some work flow that perhaps we need to retain for some reason.

All of this takes time. If you really want the code to be gone, it's better for me if you remove it. Then I don't have to wonder why it is there.

Re:“I would like to maintain the floppy driver” by dharmab on Friday August 02, 2019 @07:26PM (#20597522)
I lead a crusade against commented out code and refuse to accept any PRs at work with commented out code. It makes most code search tools useless and adds tons of visual clutter (especially for our colleagues with ADD/ADHD)
Re:“I would like to maintain the floppy driver” by IgorPartola on Friday August 02, 2019 @11:59PM (#20598589)
Leaving commenter it code is like leaving full trash bags on your kitchen floor. Why are they there? Could the be necessary at some point? Is there a specific time we need to get rid of them?

I agree with you, commented out code is not ok, unless it is an example or pseudo code. The rest is trash and has no place in any reasonable codebase. If you want to see what the code was like six months ago, use git.

Re:“I would like to maintain the floppy driver” by Figs on Friday August 02, 2019 @08:04PM (#20597695)
> Most people can skip commented code just fine, since it looks like... commented out code

Line comments, yes, but not for block comments or #if 0 disabled sections -- if your search result comes from the middle of one of those, it does not look like a comment without the context, and can mislead you.

Re:“I would like to maintain the floppy driver” by elijahparker on Friday August 02, 2019 @10:07PM (#20598191)
Reading this makes me realize programming editors should have an optional search flag to skip comments. It shouldn’t be that difficult.
Re:“I would like to maintain the floppy driver” by throwaway6734 on Friday August 02, 2019 @06:35PM (#20597217)
I am going to give this a shot.

Thank you!

Re:“I would like to maintain the floppy driver” by masukomi on Sunday August 04, 2019 @12:05PM (#20607321)
> "don't touch it except to add things, you have no idea what depends on that chunk of code"

To me that's just a symptom of a system that lacks good test coverage. Being able to remove things that you believe to be unused and seeing if it's safe or not is one of the biggest benefits of test coverage. That and, of course, knowing if your "fix" doesn't break things far away that depend on it.

Re:“I would like to maintain the floppy driver” by BRAlNlAC on Friday August 02, 2019 @03:40PM (#20595950)
I like this, I even wish it had a name because I have observed it frequently, but upon some reflection it really only seems to be the product of certain organized situations and perhaps even just an artifact of our own pattern recognition. Are these new collapsed systems really less complex or just easier for our brains to think about? Natural(chaotic) systems certainly don’t seem to follow that logic unless I’m mistaken. Thinking of a river system, it seems that it is just in a state of flux, making little wins across the system all the time, but also becoming more complex due to inputs. If we consider a star system I have trouble identifying how the system doesn’t become permanently less complex as energy is radiated away over time. (Although I’m clueless on how to actually model either sort of complexity appropriately)

That said, it appears to me that as soon as we start to tread against entropy we might notice this phenomenon cropping up. Life seems to “collapse” on new designs and human understanding too seems to collapse, but in both cases it seems that only the system complexity collapses, not the entity complexity. I think that the collapse of the complexity of the surrounding system is the result of outside stimulus causing additional entity complexity to be added to the total complexity. In a stable, complex, system this has the potential for massive system destabilization, but it is not certain and it doesn’t seem to be the nature of complex system themselves to inherently collapse on less complex states, rather it is the result of stimulus. Moreover, if we look at total complexity, does it really become less complex or does the complexity just shift from the system to the entity?

Re:“I would like to maintain the floppy driver” by cpeterso on Friday August 02, 2019 @06:22PM (#20597124)
Hyrum's Law: "With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody."

http://www.hyrumslaw.com/

Re:“I would like to maintain the floppy driver” by Too on Saturday August 03, 2019 @04:00AM (#20599210)
Re:“I would like to maintain the floppy driver” by specialist on Friday August 02, 2019 @04:38PM (#20596428)
"...wish it had a name..."

IIRC, I think first read the phrase "complexity catastrophe" in the book Design Rules: The Power of Modularity. Per the authors, it's when a system becomes so complex (interdependent) that the cost of any further changes far outweigh the expected benefit.

https://www.amazon.com/Design-Rules-Vol-Power-Modularity/dp/...

Re:“I would like to maintain the floppy driver” by Razengan on Friday August 02, 2019 @05:37PM (#20596860)
> wish it had a name because I have observed it frequently, but upon some reflection it really only seems to be the product of certain organized situations and perhaps even just an artifact of our own pattern recognition.

In The Matrix movies that is sort of a key premise of their world setting. There are words like reset, reboot, reload for it.

But I don't think it's a given, not all complex systems are prone to collapse; some systems, once past a given point, may even perpetuate their complexity practically indefinitely.

Consider life on Earth: even if a cataclysm occurs that results in mass extinctions, new life will eventually take over, in millions if not "mere" thousands or hundreds of years.

Until Earth itself no longer exists that is. Same goes for galaxies and the Universe at large.

Re:“I would like to maintain the floppy driver” by setr on Friday August 02, 2019 @05:12PM (#20596690)
>I even wish it had a name because I have observed it frequently

At least trend-wise, it’d probably look similiar to a malthusian catastrophe (population reaches environment carrying capacity at time n, and then (greatly) overshoots it at time n+1, resulting in mass die off due to starvation, taking the population well below carrying capacity)

Re:“I would like to maintain the floppy driver” by elbasti on Friday August 02, 2019 @06:48PM (#20597307)
This is a minor plot point in the sci fi novel "A deepness in the sky", where a spacefaring culture has their systems built on top of so many, ancestral layers of software, that there is a career called "code archeologist" that dives deep into the bowels of systems to find undocumented functionality.
Re:“I would like to maintain the floppy driver” by Tsiklon on Saturday August 03, 2019 @11:49AM (#20600979)
This is also a point in the Warhammer 40,000 Lore. some 18,000 years from now, Humanity advanced science and technology to nearly godlike extremes, and suffered a fully regressive collapse lasting close to another 10,000 years.

The fallout of this means that all 'modern' technology is operated upon by tech-priests, who blindly perform rituals upon equipment to ensure it's 'machine spirit' is satisfied. This ensures that the equipment will properly function. All knowledge as to how the most advanced equipment operates is lost - all that's left is how to produce some of the lesser pieces.

Caches of templates to produce standardised equipment are highly treasured. These ancient and supremely advanced caches produce extremely detailed designs for the entire supply chain required to build a single item. A template to provide for a slightly sharper knife is as desirable to the Imperium as another template to provide for a 55 Meters tall armoured war machine.

Re:“I would like to maintain the floppy driver” by iforgotpassword on Saturday August 03, 2019 @05:56AM (#20599562)
I totally can imagine how in the future there are these archeologists among all those JavaScript devs working for them trying to understand that weird language that Chrome was once written in, still in use decades after the company that built it went away.

Countless attempts to improve anything in that ancient code base failed since by that point, every little quirk that browser exposed was depended on by some essential system running a power plant, hospital or internet core infrastructure.

So the archeologists rather try to find even more quirks that can be abused for performance.

Re:“I would like to maintain the floppy driver” by awalton on Friday August 02, 2019 @09:00PM (#20597937)
> Complex systems become more complex over time and resist becoming simpler.

Deserves repeating.

At my job, it's repeatedly discussed as a feature to be an engineer who removes the most code. Most engineers are net positive, the few are break even... but the true greats are the ones who're able to go negative.

Pink diffs are the best diffs.

Re:“I would like to maintain the floppy driver” by iforgotpassword on Saturday August 03, 2019 @06:09AM (#20599591)
This is true. We hacked our internal web front end to show a big thumbs up next to commits that are net negative as a little motivator. It was mostly meant as a joke but sometimes it is satisfying to see that after a long refactoring session.
Re:“I would like to maintain the floppy driver” by umvi on Friday August 02, 2019 @05:16PM (#20596716)
> Complex systems become more complex over time and resist becoming simpler. One day they instantly become simple again (collapse).

I bet this is true of governments as well, since governments are systems.

Re:“I would like to maintain the floppy driver” by balnaphone on Saturday August 03, 2019 @12:40AM (#20598708)
See also Joseph Tainter's "The Collapse of Complex Societies" (1988).

https://en.wikipedia.org/wiki/Joseph_Tainter

Re:“I would like to maintain the floppy driver” by dev_dull on Friday August 02, 2019 @06:23PM (#20597134)
The idea is actually from Jared Diamond’s “Collapse: How Societies Choose to Fail or Succeed”.
Re:“I would like to maintain the floppy driver” by lukeschlather on Friday August 02, 2019 @02:45PM (#20595504)
I tried getting the Dell XPS 13 Ubuntu edition for work but couldn't enable full-disk encryption due to NVME not being supported at the time. The only thing to do was homedir encryption, which I believe are mounted as loop, at least in the standard Ubuntu config. So there are still circumstances today in which it's the only way to get encryption. (Incidentally, I gave up on that laptop because an ecryptfs mounted homedir broke inotify integration with a vagrant guest VM.)
Re:“I would like to maintain the floppy driver” by blattimwind on Friday August 02, 2019 @03:02PM (#20595636)
ecryptfs doesn't use loop, rather it acts like a (windows term) file system filter, encrypting every file separately and storing it as a separate file in the underlying FS.
Re:“I would like to maintain the floppy driver” by tptacek on Friday August 02, 2019 @05:17PM (#20596725)
Ironically, at least as a design (I'm unfamiliar with the implementation), this is probably more secure.
Re:“I would like to maintain the floppy driver” by unilynx on Friday August 02, 2019 @05:53PM (#20596943)
Probably not... any form of partial encryption (ie not the full block device) needs to make sure no sensitive data leaks outside the encrypted parts (/tmp and swap? /var if you only encrypt /home?)

Depending on the implementation the filesystem metadata may also reveal more data than needed. The attacker can probably ignore that 4GB file that wasn't modified for a year (a downloaded ISO image?) but that 20KB file that was recently modified might be that passwords.txt he was looking for..

Re:“I would like to maintain the floppy driver” by tptacek on Friday August 02, 2019 @06:38PM (#20597238)
It depends on what your biggest concern is. Large scale metadata analysis is a concern that block-level encryption does a better job of than "file filter encryption" does. Authenticated encryption, which prevents people from bitflipping your init scripts into bindshells if you lose access to your laptop for a few minutes, is something that file encryption addresses and block encryption basically doesn't.

The important thing is that you don't really have to choose; a true encrypted filesystem can give you both things. Block-level encryption can't.

Re:“I would like to maintain the floppy driver” by blattimwind on Friday August 02, 2019 @05:33PM (#20596840)
Proper AEAD becomes a lot simpler, on the other hand a lot of structural information is just plain there.
Re:“I would like to maintain the floppy driver” by tptacek on Friday August 02, 2019 @05:50PM (#20596933)
That's a fair point; you'd do better than either design with a true encrypted filesystem.
Re:“I would like to maintain the floppy driver” by Hello71 on Friday August 02, 2019 @05:39PM (#20596872)
assuming you don't care about metadata.