Oh!! Haha I didn’t realize that until I read it again 😅 That’s a confusing sentence if you read it the other way. I wonder if there’s a name for sentences that change meaning as you read/hear the later part of the sentence.
I get it, haha. I know this is a programmer community, but it’s funny to me to think of programming as a progression beyond traditional engineering disciplines, rather than along side them.
I’m in engineering school and the ethos definitely is “engineers write bad code but it’s for simple tasks involving complex math.” As the world of engineering steers more and more towards coding we’re definitely going to be expected to write applications instead of simple Matlab scripts and there’s no way it’s going to be pleasant.
I believe that if an Electrical Engineer has qualification as a programmer then the two fields become the higher discipline “Computer Engineer.” At least most universities arrange their classifications as such.
Comp Sci is not engineering. Programming is not engineering. I don’t mean this in an elitist way, it just flat-out doesn’t fit with other engineering fields. It’s firmly in the T area of STEM, not the E.
Computer engineering is the hardware level of designing and building computers, it might involve firmware depending on the job and the area but it’s way closer to electrical engineering than software engineering. Software engineering is also very different than computer science.
Software engineering is called that because it is the equivalent of engineering in software. You are engineering and designing a product/system. Computer science is more of the theoretical side, more detailed study of algorithms and math, etc.
What do you think of electrical engineers? Is that “real” enough to be called engineering?
Computer Engineering is hardware engineering for Computers, with some programming. It’s a child of Electrical Engineering, just like Electrical Engineering is sort of a child of Mechanical Engineering.
The part where you have to fundamentally understand how hardware actually works, ie how transistors, integrated circuits, and logic gates actually work on a physical level.
You’re thinking of Software Engineering, and even then you’d still be off.
The point where I was using my master’s in computer engineering to design physical chips? You know, using my fundamental understanding of electricity, magnetism, and the physics that come along with it.
I don’t think it would be readable. Too much going on. You’d need an outer iter over lines, an inner over words, a check for number and a conversion. And there would be zero error handling.
It is simpler to bang out a [int(num) for num in text.splitlines()[0].split(’ ')[1:]] in Python, but that just shows the happy path with no error handling, and does a bunch of allocations that the Rust version doesn’t. You can also get slightly fancier in the Rust version by collecting into a Result for more succinct error handling if you’d like.
EDIT: Here’s also a version using anyhow for error handling, and the aforementioned Result collecting:
Yeah I was trying to do something like reading the first line by getting an iterator and just looping through the other lines normally, since first line was kind of a special case but it got messy quick. I realized halfway that my collects were redundant but couldn’t really simplify it. Thanks
Rust borrows a lot of it’s design from functional programming languages like Haskell, which has its good and bad. You could also choose to implement this behavior iteratively like typical C programs, but that tends to be ugly in other ways.
Personally, I’ve grown fond of the functional style. You see it in other places too, like the higher order functions in JavaScript. What’s good about them in Rust is you still get amazing performance due to zero-cost abstraction. Trying to implement it yourself would likely be slower, so use them any chance you get.
When I had a ceph cluster setup with a star network of routed gigabit connections between servers I was giddy with excitement watching the throughput, and even more excited when I spotted one of the cables was bad and only able to pass traffic in one direction but the routing protocol still used the available bandwidth and work around the bad link in the opposite direction.
programmer_humor
Hot
This magazine is from a federated server and may be incomplete. Browse more on the original instance.