- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Twenty Frist!
Admin
I guess no-one read the falsehoods programmers believe about addresses:
https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/
Admin
Since this code simply produces a large and complicated constant (via a WTFy process), one wonders if those "add1", etc., entries are the submitter's idea of anonymization? Or maybe the whole thing is part of a test harness that is used to validate that what goes in one end of the plumbing comes out ungarbled at the other end with no concern about what the ungarbled contents actually are.
Or ???
Admin
Well that's not very good. Where's "the same memory location is always referenced by a single unique address"?
Admin
This example is odd. Isn't the point of the factory pattern to have another independent class so you can create an instance of a builder that returns you the constructed object? So you can replace the factory with a fake/mock for testing? Why is builder a property of AddressDTO itself?
I think this was written by some sort of intern.
Admin
That would be below the processor's paging system below the hypervisor below the OS's paging system, assuming that there are no copy-on-writes in the way at any of those levels to share the unchanged memory.
Admin
That would be below the processor's paging system below the hypervisor below the OS's paging system, assuming that there are no copy-on-writes in the way at any of those levels to share the unchanged memory.
Admin
JavaScript damages your mind. Here I am, looking at that return statement, and fearing that the semicolon-inserter is going to add a semicolon right after AddressDTO.builder(). But no, sensible languages make you add your own semicolons and don't get "bright" ideas about where they should be.
Admin
Or it would be be because the processor uses segmentation and it is possible for two segments to overlap, thus introducing two ways to reach any memory in the overlapping area:
segment1:offset1
andsegment2:offset2
.As one might find in processors that nobody's heard of, like the 8088, 80286, 80386, 80486, and Pentium. And, frankly, even your modern i9 or Ryzen can do the same thing.
Admin
That reminded me of a guy I knew a long while back who got used to doing the equivalent of
snprintf(some_buffer, sizeof(some_buffer), "Some text here: %d", intvar);
in JavaScript by simplynewstring = "Some text here: "+intvar;
.It ended badly when he brought that habit back to C and C++, and got bitten by the fact that
"Some text here: " + intvar
does something very different in C and C++ compared to what it does in JavaScript.Admin
That reminded me of a server that suffered from file corruption whenever it got busy. Turned out that the end of the swap partition overlapped with the start of the root partition.
Admin
I guess a 20-line address is the IPv6 of the physical address space - it has capacity for future multi-dimensional addressing.
Maybe we will need something like room number, apartment number, floor number, building number, residential complex name, street, village, city, state, zip code, country, planet, solar system, galaxy, universe, timeline, continuum, variant, licensee, origin.
How else can Peter Parker in Earth 1 get a package delivered to Miles Morales in Earth 1610, with a copy of the letter that he himself received from Clark Kent over in the DC license?
Admin
Admin
Isn't transmitting 20 values via global variables rather than method parameters another WTF?