Editing 1275: int(pi)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 18: | Line 18: | ||
The joke here plays on the fact that basic rules of programming are confusing and novice programmers are often told to simply not do certain things without any explanation (see [[292: goto]]). This includes, in particular, a general proscription against "{{w|Magic number (programming)#Unnamed numerical constants|magic numbers}}" in the code. Replacing all significant magic numbers with named constants makes programs easier to read, understand and maintain. Randall takes this to an extreme by suggesting that certain numbers could be inherently problematic, but the general idea is perfectly believable. | The joke here plays on the fact that basic rules of programming are confusing and novice programmers are often told to simply not do certain things without any explanation (see [[292: goto]]). This includes, in particular, a general proscription against "{{w|Magic number (programming)#Unnamed numerical constants|magic numbers}}" in the code. Replacing all significant magic numbers with named constants makes programs easier to read, understand and maintain. Randall takes this to an extreme by suggesting that certain numbers could be inherently problematic, but the general idea is perfectly believable. | ||
− | [https:// | + | [https://www.youtube.com/watch?v=1WsDtn-feuI ''Mmm... Floor pie.''] is a reference to Homer Simpson. |
See also {{w|Cargo cult programming}}. | See also {{w|Cargo cult programming}}. | ||
==Transcript== | ==Transcript== | ||
− | |||
:volume(r) = (4/int(pi))*pi*r^int(pi) | :volume(r) = (4/int(pi))*pi*r^int(pi) | ||
− | |||
− | |||
:Programming Tip: The number "3" is cursed. Avoid it. | :Programming Tip: The number "3" is cursed. Avoid it. | ||
{{comic discussion}} | {{comic discussion}} | ||
[[Category:Programming]] | [[Category:Programming]] | ||
− | [[Category: | + | [[Category:Math]] |
− |