Live data from Hacker News

Leaky Abstractions

textslashplain.com

101–110 of 119 posts

Re: Leaky Abstractions

#101
post #65

Earlier quoted context omitted.

TCP won’t give you a reliable connection if you tunnel TCP over TCP, paradoxically, but you can tunnel TCP over UDP, UDP over TCP, or UDP over UDP. Leaky!

Not "leaky", the conditions that a TCP connection needs its underlying transport to satisfy are explicitly documented, and TCP doesn't conform to them.

If you're going into the details of what conditions a TCP connection needs, you're no longer talking about an abstraction.

Re: Leaky Abstractions

#102
post #50
post #38

Earlier quoted context omitted.

This is the kind of stuff I expected to study in my CS degree

The problem is that computer science ≠ software engineering, especially in academic contexts.

Unfortunately, at my University the SE program was mostly building UML and ER diagrams and memorizing agile terms. Software design was a minor part of it.

I was CS, but had a lot of SE friends, and we all agree that the best SE course was the one that was mandatory for all computing majors. It covered version control and branching, testing, design process, abstraction design, etc. That class was probably one of the most daily applicable things I learned, I took it in my third semester. If my university offered more courses of that caliber, that didn't rehash and force memorization of buzzwords, then that program would've been incredible.

Re: Leaky Abstractions

#103
post #89
post #23

Earlier quoted context omitted.

copy + delete one at a time makes a lot of sense if you're working on a filesystem without a way to move without copying (I don't think you can actually move a file in fat32), because copy all could require more space than is available. The same could be true here where you're moving from a zip file to probably the same filesystem the zip files is in; if removing a file from the zip file is actually an in-place move…

> copy + delete [...] I don't think you can actually move a file in fat32 Wait, does that mean that a file which is larger than half of the partition in fat32 cannot be moved? Or not even be renamed?

Fat32 supports rename in the same directory as a simple operation. Moving a file though, I don't think so (and nobody corrected me, so I might be right).

Re: Leaky Abstractions

#104
post #50

Earlier quoted context omitted.

The problem is that computer science ≠ software engineering, especially in academic contexts.

I've seen this a lot on here combined with cs degrees being frequently mentioned and software engineering degrees rarely mentioned. Are people widely choosing computer science over software engineering and then being surprised they aren't studying software engineering or is it rare for institutions to offer software engineering as an option?

In the end, a good engineer rarely becomes a professor. This is both because the industry pays better, and the universities don’t value engineering expertise. The best SE courses in my university were offered by “guest” teachers from big software companies. (Which were very rare.)

Re: Leaky Abstractions

#105
post #48

Earlier quoted context omitted.

Another common leaky abstraction: floating-point numbers as an abstraction of the real numbers. It works nearly all the time, until you have to really know about numerical precision, or where a NaN came from. https://www.johndcook.com/blog/2009/04/06/numbers-are-a-leak...

i wouldn't call floating point numbers an abstraction on real numbers. It's a representation - like char[] is a representation of strings, which is itself an abstraction used to manipulate human readable text!

Read the link above about FP as a leaky abstraction of the reals; it explains it better than I can. FP is not really a representation of reals, because you can't represent the entire number line with a finite number of bits. It is a representation of a cleverly chosen subset of the reals, so well-designed that many people forget that they're not dealing with real numbers. That intelligent people can write code with FP values, operating on them thinking they are real numbers, and not knowing how FP works, and get programs that often do nearly the right thing, speaks to the success of FP as an abstraction. Understanding how things can go wrong is the leaks (like, non-associativity). I don't think people manipulating char[] representations of strings are ever at risk of forgetting that it's just an array of chars (they program with full awareness of the implementation), so it doesn't feel like there's much abstraction happening there. Other higher-level data structures for text manipulation probably do implement some useful abstractions; I haven't worked with those.

Re: Leaky Abstractions

#106
post #39

Earlier quoted context omitted.

Another common leaky abstraction: floating-point numbers as an abstraction of the real numbers. It works nearly all the time, until you have to really know about numerical precision, or where a NaN came from. https://www.johndcook.com/blog/2009/04/06/numbers-are-a-leak...

Relevant: the list of integers you can convert to float, invert twice, and don't get the same number back. https://oeis.org/A275419

This is a treasure; thank you!

Re: Leaky Abstractions

#107
post #65

Earlier quoted context omitted.

Not "leaky", the conditions that a TCP connection needs its underlying transport to satisfy are explicitly documented, and TCP doesn't conform to them.

If you're going into the details of what conditions a TCP connection needs, you're no longer talking about an abstraction.

An abstraction doesn't mean you can close your eyes and everything will work by magic. They're extremely useful tools, but like I said: garbage in, garbage out.

Re: Leaky Abstractions

#108
post #17

Earlier quoted context omitted.

> doing similar operations to a connected android phone MTP is terrible[1]. [1]: https://en.wikipedia.org/wiki/Media_Transfer_Protocol#Perfor...

Oh boy. I was thinking USB 2.0 is main reason for Android Windows copying of photos to suck so much, but the rabbit hole is much deeper. It's sad that with cloud being the solution for everything those days, this will probably never be improved within next decade.

I'm using Resilio's Sync (before known as BitTorrent) for this. I guess that technically, it's a kind of cloud, except I'm running it on my intranet ?

Re: Leaky Abstractions

#109
post #103
post #89

Earlier quoted context omitted.

> copy + delete [...] I don't think you can actually move a file in fat32 Wait, does that mean that a file which is larger than half of the partition in fat32 cannot be moved? Or not even be renamed?

Fat32 supports rename in the same directory as a simple operation. Moving a file though, I don't think so (and nobody corrected me, so I might be right).

Ok, well I just tried this on a full fat32 partition, I'm able to move a large file no problems reported, so I was wrong.

Re: Leaky Abstractions

#110
post #62

Earlier quoted context omitted.

I am not aware of anyone with a software engineering degree. Is that really a thing?

The Computer Science college at Oregon State University offered both CS and Software Engineer degrees. The CS degree focused more on theory and technology, SWE more on management strategies (Agile, etc) and project architecture. I was really frustrated hitting the workforce and not knowing much about the "flow" of large team software projects. It was interesting seeing what the EE's and ME's were learning about, stan…

At the Oregon Institute of Technology we start with three terms of C++ for Software Engineering and code all four years in several languages. We might not go as deep into the theory, but we can safely use a pointer and understand what the NullPointerException actually is in managed languages. By the time we graduate we have worked on a lot of code and two large projects, one of which is with a team of other students.
Post reply on HN