<!--lint disable awesome-heading-->
<p align="center">
<a href="https://github.com/kdeldycke/awesome-falsehood/">
<img src="https://github.com/kdeldycke/awesome-falsehood/raw/main/assets/awesome-falsehood-header.jpg" alt="Awesome Falsehood header image">
</a>
</p>
<p align="center">
<a href="https://github.com/sponsors/kdeldycke">
<strong>Yᴏᴜʀ Pʀᴏᴅᴜᴄᴛ ʜᴇʀᴇ!</strong>
<br/>
<sup>Add a link to your company or project here: purchase a GitHub sponsorship.</sup>
</a>
</p>
<p align="center">
<i>The logic of the world is prior to all truth and falsehood.</i><br>
— Ludwig Wittgenstein<sup id="intro-quote-ref"><a href="#intro-quote-def">[1]</a></sup>
</p>
A curated
list of falsehoods programmers believe in. A falsehood is an idea that you initially believed was true, but in reality, it is proven to be false.
E.g. of an idea: valid email address exactly has one @ character. So, you will use this rule to implement your email-field validation logic. Right? Wrong! The reality is: emails can have multiple @ chars. Therefore your implementation should allow this. The initial idea is a falsehood you believed in.
The falsehood articles listed below will have a comprehensive list of those false-beliefs that you should be aware of, to help you become a better programmer.
Contents
<!-- mdformat-toc start --slug=github --no-anchors --maxlevel=6 --minlevel=2 -->
<!-- mdformat-toc end -->
Meta
Arts
Business
- Falsehoods about Online Shopping - Covers prices, currencies and inventory.
- Falsehoods about Prices - Covers currencies, amounts and localization.
- Falsehoods about IBANs - International Bank Account Numbers are not international.
- Falsehoods about Economics - Economics are not simple or rational.
- Decimal Point Error in Etsy's Accounting System - The importance of types in accounting software: missing the decimal point ends up with 100x over-charges.
- Twenty five thousand dollars of funny money - Same error as above at Google Ads, or the danger of separating your pennies from your dollars, where $250 internal coupons turned into $25,000. My advice: get rid of integers and floats for monetary values. Use decimals. Or fallback to strings and parse them, don't validate.
- Characters
< and > in company names lead to XSS attacks - Because UK allows companies to be registered with special characters, a hacker leveraged them to register \"><SCRIPT SRC=MJT.XSS.HT></SCRIPT> LTD, but also ; DROP TABLE "COMPANIES";-- LTD, BETTS & TWINE LTD and SAFDASD & SFSAF \' SFDAASF\" LTD.
- Minutiae of company names - How the rules of the State of Delaware and the IRS does not intersects.
- CLDR currency definitions - Currency validity date ranges overlap due to revolts, invasions, new constitutions, and slow planned adoption.
tax - A PHP 5.4+ tax management library.
Cryptocurrency
Dates and Time
- Falsehoods about Time - Seminal article on dates and time.
- More Falsehoods about Time - Part. 2 of the article above.
- Falsehoods about Time and Time Zones - Another takes on time-related falsehoods, with an emphasis on time zones.
- Critique of Falsehoods about Time - Takes on the first article above and provides an explanation of each falsehood, with more context and external resources.
- Falsehoods about Unix Time - Mind the leap second!
- Falsehoods about Time Zones - Has some nice points regarding the edge-cases of DST transitions.
- Your Calendrical Fallacy Is Thinking… - List covering intercalation and cultural influence, made by a community of iOS and macOS developers.
- Time Zone Database - Code and data that represent the history of local time for many representative locations around the globe.
- The Long, Painful History of Time - Most of the idiosyncrasies in timekeeping can find an explanation in history.
- You Advocate a Calendar Reform - Your idea will not work. This article tells you why.
- So You Want to Abolish Time Zones - Abolishing timezones may sound like a good idea, but there are quite a few complications that make it not quite so.
- The Problem with Time & Timezones - A video about why you should never, ever deal with timezones if you can help it.
- $26,000 Overcollection by Labor Department - The consequence of wrong calendar accounting.
- RFC-3339 vs ISO-8601 - An giant list of formats from the two standards, how they overlaps, and live examples.
- ISO-8601,
YYYY, yyyy, and why your year may be wrong - String formatting of date is hard.
- UTC is Enough for everyone, right? - There are edge cases about dates and time (specifically UTC) that you probably haven't thought of.
- Storing UTC is not a silver bullet - “Just store dates in UTC” is not always the right approach.
- How to choose between UT1, TAI and UTC - Depends on your priorities between SI seconds, earth rotation sync, leap seconds avoidance.
- Why is subtracting these two times (in 1927) giving a strange result? - Infamous Stack Overflow answer about both complicated historical timezones, and how historical dates can be re-interpreted by newer versions of software.
- Critical and Significant Dates - From Y2K to the overflow of 32-bit seconds from Unix epoch, a list of special date to watch for depending on the system.
- “I'm going to a commune in Vermont and will deal with no unit of time shorter than a season.” - Is the note left on his terminal by a quitting engineer in the 70s, after too much effort toiling away on sub-second timing concerns. Source: The Soul of a New Machine.
Education
Emails
Geography
Human Identity
Internationalization
On character encoding, string formatting, unicode and internationalization.