DEV Community

What The Hell is "Monkey Patching"? + 11 Software Development Terms ⚡️🙌

Arjun Vijay Prakash on February 16, 2024

👇 Believe It Or Not! This list will prove to be helpful despite of whether you're new to the developer community or an experienced devel...
Collapse
 
thumbone profile image
Bernd Wechner • Edited

Thanks. Note that "magic number" can also be a very specific reference to the first bytes in a file that reveal its type. Essentially a file-internal version of the file extension (the part of the file name after the last decimal point or dot) that is used to convey the type to a casual observer (magic numbers are historically not used for text files but only binary files). That said since Unicode arrived in the scene, text files can have one too (a BOM). Typically where a magic number and file extension disagree the magic number is prioritised, especially for binary files. Try, for example renaming a .JPG file to .PNG, most software will read it, display it or let you edit it and treat it as a JPG file in spite of your having changed the extension.