New Articles (Page 347)
To stay up to date you can also follow on Mastodon.
π Rule of Three (Computer Programming)
Rule of three ("Three strikes and you refactor") is a code refactoring rule of thumb to decide when similar pieces of code should be refactored to avoid duplication. It states that two instances of similar code don't require refactoring, but when similar code is used three times, it should be extracted into a new procedure. The rule was popularised by Martin Fowler in Refactoring and attributed to Don Roberts.
Duplication is considered a bad practice in programming because it makes the code harder to maintain. When the rule encoded in a replicated piece of code changes, whoever maintains the code will have to change it in all places correctly.
However, choosing an appropriate design to avoid duplication might benefit from more examples to see patterns in. Attempting premature refactoring risks selecting a wrong abstraction, which can result in worse code as new requirements emerge and will eventually need to be refactored again.
The rule implies that the cost of maintenance certainly outweighs the cost of refactoring and potential bad design when there are three copies, and may or may not if there are only two copies.
Discussed on
- "Rule of Three" | 2023-08-30 | 19 Upvotes 22 Comments
- "Rule of Three (Computer Programming)" | 2020-02-02 | 20 Upvotes 10 Comments
π Sverdlovsk Anthrax Leak
On 2 April 1979, spores of anthrax were accidentally released from a Soviet military research facility near the city of Sverdlovsk, Russia (now Yekaterinburg). The ensuing outbreak of the disease resulted in approximately 100 deaths, although the exact number of victims remains unknown. The cause of the outbreak was denied for years by the Soviet authorities, which blamed the deaths on consumption of tainted meat from the area, and subcutaneous exposure due to butchers handling the tainted meat. All medical records of the victims were removed to hide serious violations of the Biological Weapons Convention. The accident is sometimes referred to as "biological Chernobyl".
Discussed on
- "Sverdlovsk Anthrax Leak" | 2020-02-01 | 19 Upvotes 2 Comments
π V-Mail
V-mail, short for Victory Mail, was a hybrid mail process used by the United States during the Second World War as the primary and secure method to correspond with soldiers stationed abroad. To reduce the cost of transferring an original letter through the military postal system, a V-mail letter would be censored, copied to film, and printed back to paper upon arrival at its destination. The V-mail process is based on the earlier British Airgraph process.
Discussed on
- "V-Mail" | 2019-11-11 | 110 Upvotes 7 Comments
π M65 Atomic Cannon
The M65 atomic cannon, often called "Atomic Annie", was an artillery piece built by the United States and capable of firing a nuclear device. It was developed in the early 1950s, at the beginning of the Cold War, and fielded, between April 1955 and December 1962, in West Germany, South Korea and on Okinawa.
Discussed on
- "M65 Atomic Cannon" | 2019-11-10 | 47 Upvotes 49 Comments
π Stellar Sonata
SONATA VI are two paintings, Stellar sonata. Allegro and Stellar sonata. Andante, of Mikalojus Konstantinas Δiurlionis from 1908.
Discussed on
- "Stellar Sonata" | 2019-11-09 | 68 Upvotes 7 Comments
π List of Assassination Attempts on Adolf Hitler
This is an incomplete list of documented attempts to assassinate Adolf Hitler.
All attempts occurred in the German Reich, except where noted. All attempts involved citizens of the German Reich, except where noted. No fewer than 42 plots have been uncovered by historians. However, the true numbers cannot be accurately determined due to an unknown number of undocumented cases.
Discussed on
- "List of Assassination Attempts on Adolf Hitler" | 2019-11-06 | 55 Upvotes 30 Comments
π AGPL License
The Affero General Public License (Affero GPL and informally Affero License) is a free software license. The first version of the Affero General Public License (AGPLv1), was published by Affero, Inc. in March 2002, and based on the GNU General Public License, version 2 (GPLv2). The second version (AGPLv2) was published in November 2007, as a transitional license to allow an upgrade path from AGPLv1 to the GNU Affero General Public License (a variant of the original Affero GPL license that is compatible with GPLv3).
Both versions of the Affero GPL were designed to close a perceived application service provider (ASP) loophole in the ordinary GPL, where, by using but not distributing the software, the copyleft provisions are not triggered. Each version differs from the version of the GNU GPL on which it is based in having an added provision addressing use of software over a computer network. This provision requires that the full source code be made available to any network user of the AGPL-licensed work, typically a web application.
Discussed on
- "AGPL License" | 2020-01-31 | 91 Upvotes 106 Comments
π List of Nuclear Close Calls
A nuclear close call is an incident that could lead to, or could have led to at least one unintended nuclear detonation/explosion. These incidents typically involve a perceived imminent threat to a nuclear-armed country which could lead to retaliatory strikes against the perceived aggressor. The damage caused by international nuclear exchange is not necessarily limited to the participating countries, as the hypothesized rapid climate change associated with even small-scale regional nuclear war could threaten food production worldwideβa scenario known as nuclear famine.
Despite a reduction in global nuclear tensions and major nuclear arms reductions after the end of the Cold War (in 1989), estimated nuclear warhead stockpiles total roughly 15,000 worldwide, with the United States and Russia holding 90% of the total.
Though exact details on many nuclear close calls are hard to come by, the analysis of particular cases has highlighted the importance of a variety of factors in preventing accidents. At an international level, this includes the importance of context and outside mediation; at the national level, effectiveness in government communications, and involvement of key decision-makers; and, at the individual level, the decisive role of individuals in following intuition and prudent decision-making, often in violation of protocol.
Discussed on
- "List of Nuclear Close Calls" | 2020-01-30 | 22 Upvotes 3 Comments
π Satellaview
The Satellaview is a satellite modem peripheral produced by Nintendo for the Super Famicom in 1995. Containing 1 megabit of ROM space and an additional 512K of RAM, Satellaview allowed players to download games, magazines and other forms of content through satellite broadcasts provided by Japanese company St.GIGA. To use Satellaview, players had to purchase a special broadcast satellite (BS) tuner directly from St.GIGA or rent one for a six-month fee, and to pay monthly maintenance fees to both St.GIGA and Nintendo. It was attached to the bottom of the Super Famicom via the system's expansion port. It featured heavy support from third-party developers, including Squaresoft, Taito, Konami, Capcom and Seta.
Satellaview was the result of a collaboration between Nintendo and St.GIGA, the latter being known in Japan for its "Tide of Sound" nature sound music. By 1994, St.GIGA was struggling financially due to the Japanese Recession affecting the demand for its music; Nintendo initiated a "rescue" plan by purchasing a stake in the company. Satellaview was produced by Nintendo Research & Development 2, the same team that designed the Super Famicom itself, and was made to cater towards a more adult-oriented market. By 1998, Nintendo's relationship with St.GIGA was beginning to collapse due to the company refusing to go forward with a debt-management plan and failing to secure a government broadcasting license. Nintendo withdrew support for Satellaview in March 1999, with St.GIGA continuing to supply content until June 30, 2000, when it was ultimately discontinued.
The rise of technologically-superior consoles such as the Sega Saturn and PlayStation and its high cost made consumers reluctant to purchase Satellaview, especially due to it only being sold via mail order, or through specific electronic store chains. Despite this, St.GIGA reported seeing over 100,000 subscribers by March 1997. Retrospectively, Satellaview has been praised by critics for its technological accomplishments and the overall quality of its games, particularly those from the Legend of Zelda series. In recent years, it has gained a strong cult following due to much of its content being deemed lost, with video game preservation groups being formed to dump and preserve its games and other services online.
Discussed on
- "Satellaview" | 2020-01-30 | 69 Upvotes 15 Comments
π Boeing MQ-25 Stingray
The Boeing MQ-25 Stingray is an aerial refueling drone that resulted from the Carrier-Based Aerial-Refueling System (CBARS) program, which grew out of the earlier Unmanned Carrier-Launched Airborne Surveillance and Strike (UCLASS) program. The MQ-25 first flew on 19 September 2019.
Discussed on
- "Boeing MQ-25 Stingray" | 2019-11-01 | 41 Upvotes 65 Comments