Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Printer's key (wikipedia.org)
66 points by senorgusto on Aug 6, 2015 | hide | past | favorite | 15 comments


In summary, what book printers used to do is have a line of numbers on the title page of the book, which they would erase one at a time with each printing run. The reason why is that they would be reusing the original plates in the printing press, and it was easy to erase a number (by destructively removing it from the plate) as opposed to recreating a whole new plate for the title page.

Flash memory works in a similar way. After a block is erased, which is a slow process, it starts with all ones. It's very fast to switch a cell from a 1 to a 0, but to turn a 0 back into a 1 you have to erase the whole block again. (Block sizes can vary considerably, as much as 512 KiB on SSDs.) Note that it's the erase cycle which reduces the lifetime of the flash, not the switch from a 1 to a 0.

USB flash devices and SSDs don't expose low-level access to the NAND flash so it's not possible to take advantage of this property, but if you could you'd be able to have a small counter with one bit per number. Perhaps in some circumstances a bitmask would also work well. A bloom filter could also be implemented efficiently this way.

I imagine that embedded programmers and the SSD firmware takes advantage of this property of flash memory for its own data structures, I'd love to hear if that's the case.


Flipping single bits from unprogrammed (conventionaly 1) to programmed (0) state is commonly used in both embedded systems and flash filesystems and translation layers.

Typical modern flash filesystem or FTL is copy-on-write and only marks old version of the block by either programming one bit (1-valid, 0-invalid) or programming address of new version into the old block.

Typical 80's/90's prepaid phone card is simple serial (E)EPROM that decrements count of remaining credit by programming successive bits. Modern smartcards also often have blocks that require separate access rights to be programmed and to be erased (although they also tend to implement normal binary counters that can be only decremented). Features of various programmable devices that relates to code security also tend to depend on this property of Flash/EEPROM (EEPROM and Flash differs mostly in the fact that for EEPROMs the size of write block is same as the size of erase block, typically one byte).

The convention that 1-unprogrammed and 0-programmed comes mostly from NMOS and TTL, where for both technologies, 0 is the strongly driven state (output strongly driven into ground) and 1 is essentially undriven.


I found it interesting that reusable printing plates are called stereotypes or clichés, both of which then made their way into general usage.


Does that mean that it's better to securely erase flash disks with FF's rather than 00's?


There is no difference from security point of view. To erase SSD you just TRIM[0] the whole device and wait some time while it erases underlying flash.

[0] https://en.wikipedia.org/wiki/Trim_(computing)


Other fun book facts: by looking at the length of the number that is the second to last digit in the ISBN, you can tell how many large an ISBN block the publisher bought, which often relates to the size of the publisher. If it's only two digits, they only bought a block of 100 ISBN's, so they're probably a very small publisher. https://en.wikipedia.org/wiki/International_Standard_Book_Nu...


I was watching this tv show about Horder's. The older gentleman collected books. His place needed some cleaning, but his domicile was definitely livable, and didn't look like a health hazard.

Well, his well meaning kids, and Ph.D, along with the army of helpers barged into his home, and gave dad the ultimatum, "Throw out this junk!". He caved in--I think he was tired too? The only thing I really remember from the show was one phrase from this man. He said, "But, a lot of these are first editions?".

The production crew seemed baffled when the dumpster filled with these books would magically empty itself overnight. I recall them saying someting like, 'There's so many Horder's out there? What a travesty?". And the melodramatic music played in the background.

I guess it resonated with me because I collect first edition books?


While we're on the subject, does anyone know why books don't usually start at page one? Even in the case of a novel, where there's no preface in roman numerals, the book will often start on page three or four.


Books tend to have blank pages at the beginning and/or end when the actual number of pages isn't a multiple of, say, 8, 16 or 32.

https://en.wikipedia.org/wiki/Intentionally_blank_page#Print...


I've found this to be fairly uncommon, but I usually notice since I eschew bookmarks in favor of remembering what page I'm on. I've never seen it not correspond to the physical number of page sides preceding the first numeral (occasionally not including a flap page against the cover). So the number is "correct", it's just that the preceding pages had no numbers printed.


Nice. Reminds me of the explanation why the code for DEL (delete) in ASCII is 127 (1111111) -- back in the days of punchcards, when a punched hole meant "one" and no hole meant "zero", you could convert any other code into 1111111 by overstriking it (similar to how in the days of typewriters you could overstrike any other letter with X to cross it out).


Close, but that only worked for punched paper tape (which had 7 positions for hole / not-hole per row, with a direct mapping to ASCII). Punch cards used Hollerith code, with 12 positions per column, with a peculiar mapping to EBCDIC, where there would be only one hole in rows 1 to 8, which more or less gave the bottom 3 bits of the character, and a combination of holes in the other 4 rows, giving the other 4 bits.


Thank you!


If you find this interesting, you'll love http://www.linotypefilm.com/. It was on Amazon Prime Video about a year ago.


Neat! Nice to see that there were hacky thinkers back in the day :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: