Quantcast
Channel: Hacker News
Viewing all 25817 articles
Browse latest View live

After governance breakdown, Node.js leaders fight for its survival

$
0
0

(Image: stock photo/wocintechchat.com)

After years of battling a string of systematic failures of governance and leadership, the Node.js community, one of the largest collectives of software developers on the internet, reached a breaking point.

Node.js steers the ship for the powerful open-source web technology. It's relied on by dozens of Fortune 500 companies, like Microsoft, Netflix, and PayPal, for their critical infrastructure and core operations.

Its stable governance isn't just necessary for the businesses that rely on it, but also the core community that develops and advanced the widely-used technology.

But Monday saw a stream of resignations, one after the other throughout the day from Node.js' technical steering committee (TSC), a group that manages the day-to-day governance for the Node.js project. A third of the committee had quit their positions by the end of the day, including its first woman member. Three of the resigned members said they will stay on the core technical committee (CTC), which oversees the project's core collaborators and code contributors. One person has left the project entirely.

The resignations followed a single event -- a vote that failed to remove a former director, a longstanding member of the community, from the leadership group. Many of the complaints, since removed from the committee's pages, document a litany of violations of the community's code of conduct.

The failure to have him removed from the position was seen as the embodiment of years of efforts to reform a pattern of harmful behaviors that was tearing the community apart.

"If someone were to look for a smoking gun of a comment or the obvious thing -- or something to do with race, or gender, or something you can point to the world -- then this would've been done and over with," said William Kapke, one of the two elected members of the Node.js board that oversees the three governing committees.

That inability to hold members of the leadership committee accountable was the spark that has led to a chain reaction of events poised shaking up the Node.js community, according to several people who spoke to ZDNet, some whom asked not to be named, for this story.

* * *

Those who spoke to us said the tumultuous events of this week were a long time coming.

Members of the TSC voted Monday by a slim majority to keep Rod Vagg, the committee's former director and Node.js board member, on the committee, despite a litany of complaints about Vagg's prior behavior. The board's executive director, Mark Hinkle, who, when reached did not comment for this story, said in a public statement that the board was "deeply concerned" by the resignations. The board asked the TSC to suspend Vagg until the process of handling the situation was resolved.

The board specifically called the TSC to "enforce its code of conduct equally amongst community members, collaborators, and leadership," the statement read, a sentiment echoed by several people who spoke to ZDNet.

"This isn't about a particular incident," said Ashley Williams, another elected board member. "It's about a long-standing pattern of insidious behavior that walks that line of violations."

"Rod's behavior was non-collaborative, consistent, and unapologetic," said Williams, who, like Kapke, was speaking in a personal capacity and not on behalf of the board.

"This was a systemic failure of leadership, and Rod was one of the most prominent examples," she said.

"Fundamentally, this situation is a failure of just the TSC to self-govern," she said. (The TSC holds the responsibility for moderating the committees, including its own -- a task it has failed to upkeep, many say.)

It was for that reason that news of the resignations didn't surprise the Node.js community.

The community's reliance on a code of conduct acts as the de facto HR department for the project, which lets participants and members contribute while treating others with respect. It's meant to ensure a workplace free from harassment and unacceptable behavior, while promoting sharing of ideas in a constructive way, and to foster community growth.

But that code of conduct, as Kapke pointed out, doesn't allow the stifling of free speech or marginalizing of people's views or opinions that might be disagreed with. It's designed to bring together a diverse range of people from different cultures, beliefs, genders, and backgrounds from across the world to work on a project and be treated fairly -- a core value of any global collaborative open source project.

"There's better value in having diversity than having some individual have the free speech that would work against others," he said.

That toxic culture in Node.js' governance has led to an inclusivity problem.

Williams' began an inclusivity group of about a dozen people, an initiative aimed at ensuring fairness for everyone who wants to contribute to the community. The group eventually disbanded, accusing the leadership of "continued derailment" and opposition to proposals that the group argued would make the community more cohesive.

All the women and non-binary people left the group, as did several men, following the disbandment last August. Many have decided to leave the Node.js community altogether.

"Driving away contributors can be fatal in the open source world where most developers are essentially using their free time and volunteering to contribute," said Rudolf Olah, a web developer, in a blog post. "It is already difficult enough to attract contributors to smaller projects, and larger projects, such as Node.js, need to be careful to make all contributors feel welcome," he said.

Myles Borins, a former TSC member who resigned Monday, also said in a blog post that complacency is "not acceptable."

"We cannot be complacent about our culture, we need to actively maintain the culture we want to see -- a culture that is diverse and inclusive, a culture that we can all be proud of," he said.

These aren't unrealistic complaints or desires in a community that many center their lives on -- many are employed by companies that are stakeholders in the Node.js community and contribute code to the project.

Some of those we spoke to, including a self-described "unabashed white man," who didn't want to be named, as they were not authorized to talk to the media, also spoke of unhealthy attitudes and unacceptable behaviors among Node.js' committee leadership.

Williams said that the public outcry "was just ever increasing."

When the TSC voted to keep Vagg on the committee, that was the straw that broke the camel's back.

Vagg's conduct is seen as a "red herring" for wider inappropriate conduct by leadership, echoed by others who left the community following the vote.

"A single person who is causing problems in and of itself isn't that big of a deal," said Bryan Hughes, a former TSC member, in a blog post. "This happens all the time in non-private social media. What matters is how those overseeing the space handle it," said Hughes. "The majority of Node.js TSC members have repeatedly shown that they do not want to handle the situation, with some going so far as to say they do not even think there is a problem."

The inability for members of the TSC to "look at the entire picture" of a person's behavior rather than each broken rule is where trust in the system broke down, Kapke said.

"Give them a rule and they will say 'yes' or 'no'," he said. Kapke added that the outside optics of the vote not to remove Vagg, despite a body of accusations levied against him, "didn't look good." (Vagg, when reached by email, would not comment on the record beyond a lengthy blog post in which he stated he will be "standing my ground.")

"I'm confident that the individuals who voted on this didn't quite realize how big of a thing this was going to be, and at this point realize that they see the trouble this was going to cause but didn't know then," he said.

"Maybe they would've decided differently at the time."

* * *

Moments after the failed leadership vote, Kat Marchán pushed the button that created Ayo.js, a new open-source project forked from Node.js.

Ayo.js -- a hat-tip to the Io.js (pronounced the same) project that forked from Node.js three years ago over a similar disenchantment over the software's stewardship under its founding company Joyent -- was born this week.

Days old, it's already got a dozen developers and over a hundred people involved on the project's chat platform, said Marchán.

"If the few people who hold a lot of power can stop the community from doing what the community needs to do, then they're no longer representing us," Marchán said. The project -- a carbon copy of Node.js from the point it was forked -- is still in its infancy, but it's already working on a new open governance model that aims to mitigate some of the troubles faced by those who've worked in the Node.js hierarchy.

Ayo.js is already seen as a reminder that open source technologies must be open and transparent. If the community doesn't feel represented or heard, it can create its own.

"Ayo.js is not about vilifying Node.js or killing Node.js," Williams said. "It's about making Node.js better."

"It's the idea that Node.js could be so much better, and looking at the failures of governance which have prevented many awesome people from joining this project," she said. (Williams is not involved with the project given her position on the Node.js board.)

"Human systems require a set of shared values. Values, in a technical ethical sense, are a means by which people make decisions about trade-offs," said a senior person in the Node.js community, who did not want to be named for this story. "Values are very rarely shared 100 percent between any group of people -- and in fact, even individuals frequently have internal conflicts about values, so it's not terribly uncommon for there to be irreconcilable differences between people working on a project."

Supporting the move, the person said about Ayo.js: "It's a very direct-action way to say, 'These are our values, we have not been heard, and we will leave if we are not satisfied'."

The idea of a project splitting in two has been jarring to many and left some feeling unsettled about the future of the Node.js project. But Marchán and others that ZDNet spoke to aren't concerned. The success of Ayo.js is seen as fundamentally the success of Node.js -- like Io.js, which rocketed to success before it was later merged back into Node.js. Open-source projects that fork can take existing work, develop the weaknesses and build on the technologies, and selectively bring the best back to the original project.

"In the long term, I think the community wins," Marchán said.

* * *

The question we asked everyone that we've spoken to is: "Now what?"

This deep-running acrimony in the community will not go away overnight, and the aftermath of one member's expulsion could lead to logistical issues moving the technology forward. And in any case, this isn't a situation where removing one person will fix the community, several people told ZDNet.

Several suggestions have been put forward to try to shuffle the governance structure in the hope that a clean slate will help rebalance the levels of power across the community.

How successful they will be remains to be seen.

James Snell, director of the TSC, has proposed merging the CTC and the TSC, "effectively dissolving" the CTC, and to hold new elections -- including a new chair and director position. Members would be limited by term limits, according to another proposal.

The board, which oversees both committees, has indicated that it will likely accept this proposal at an upcoming board meeting. (When reached, Mark Hinkle, executive director of the Node.js Foundation, would not comment beyond the board's statement, posted Thursday.)

Snell confirmed in an email to ZDNet that if the committees were to merge, he "will be stepping down as TSC director and will be calling for a new TSC director election," but he will remain a TSC member.

Williams said that merging the two committees will increase the diversity across the committees, and it will better help the ecosystem that's "fundamentally driven by the community."

Others are less than optimistic. Kapke said merging the committees would be at best a "band-aid solution," unless more can be done to ensure a better makeup of the committees, which won't ignore code of conduct indiscretions.

It's clear that an organizational shake-up is necessary, but the information and contributorship vacuum that's left in its wake could hobble the efforts of the Node.js project until a new wave of members can join. And while there will be times in the near future where there is valid uncertainty and concern at what comes next, the community holds an underlying hope that the short, sharp shock of these changes in the coming days and weeks will be for the better in the long run.

"A lot rides on the board and the current committee leaderships doing the right thing," Williams said. "If they don't, then there's going to be some hard questions to ask."

Contact me securely

Zack Whittaker can be reached securely on Signal and WhatsApp at 646-755–8849, and his PGP fingerprint for email is: 4D0E 92F2 E36A EC51 DAAE 5D97 CB8C 15FA EB6C EEA5.


Sound waves enhance deep sleep and memory

$
0
0

CHICAGO - Gentle sound stimulation — such as the rush of a waterfall — synchronized to the rhythm of brain waves significantly enhanced deep sleep in older adults and improved their ability to recall words, reports a new Northwestern Medicine study. 

Deep sleep is critical for memory consolidation. But beginning in middle age, deep sleep decreases substantially, which scientists believe contributes to memory loss in aging.  

The sound stimulation significantly enhanced deep sleep in participants and their scores on a memory test.

“This is an innovative, simple and safe non-medication approach that may help improve brain health,” said senior author Dr. Phyllis Zee, professor of neurology at Northwestern University Feinberg School of Medicine and a Northwestern Medicine sleep specialist. “This is a potential tool for enhancing memory in older populations and attenuating normal age-related memory decline.” 

The study was published March 8 in Frontiers in Human Neuroscience.

In the study, 13 participants 60 and older received one night of acoustic stimulation and one night of sham stimulation. The sham stimulation procedure was identical to the acoustic one, but participants did not hear any noise during sleep. For both the sham and acoustic stimulation sessions, the individuals took a memory test at night and again the next morning. Recall ability after the sham stimulation generally improved on the morning test by a few percent. However, the average improvement was three times larger after pink-noise stimulation. 

Note: Video advertisements are sponsored by the publisher and have no connection to Northwestern University.

The older adults were recruited from the Cognitive Neurology and Alzheimer’s Disease Center at Northwestern.

The degree of slow wave sleep enhancement was related to the degree of memory improvement, suggesting slow wave sleep remains important for memory, even in old age.

Although the Northwestern scientists have not yet studied the effect of repeated nights of stimulation, this method could be a viable intervention for longer-term use in the home, Zee said.

Previous research showed acoustic simulation played during deep sleep could improve memory consolidation in young people. But it has not been tested in older adults.

The new study targeted older individuals — who have much more to gain memory-wise from enhanced deep sleep — and used a novel sound system that increased the effectiveness of the sound stimulation in older populations.

The study used a new approach, which reads an individual’s brain waves in real time and locks in the gentle sound stimulation during a precise moment of neuron communication during deep sleep, which varies for each person.

During deep sleep, each brain wave or oscillation slows to about one per second compared to 10 oscillations per second during wakefulness.

Giovanni Santostasi, a study coauthor, developed an algorithm that delivers the sound during the rising portion of slow wave oscillations. This stimulation enhances synchronization of the neurons’ activity.

After the sound stimulation, the older participants’ slow waves increased during sleep.

Larger studies are needed to confirm the efficacy of this method and then “the idea is to be able to offer this for people to use at home,” said first author Nelly Papalambros, a Ph.D. student in neuroscience working in Zee’s lab. “We want to move this to long-term, at-home studies.”

Northwestern scientists, under the direction of Dr. Roneil Malkani, assistant professor of neurology at Feinberg and a Northwestern Medicine sleep specialist, are currently testing the acoustic stimulation in overnight sleep studies in patients with memory complaints. The goal is to determine whether acoustic stimulation can enhance memory in adults with mild cognitive impairment.  

Previous studies conducted in individuals with mild cognitive impairment in collaboration with Ken Paller, professor of psychology at the Weinberg College of Arts and Sciences at Northwestern, have demonstrated a possible link between their sleep and their memory impairments.

Other Northwestern authors on the study are Paller, Sandra Weintraub and Rosemary Braun.

Northwestern has a patent pending for the technology. Santostasi is a cofounder of DeepWave Technologies, Inc., which plans to commercialize the technology. 

Note: The original press release was published April 24, 2017.

1944 CIA guide to sabotage productivity (2015)

$
0
0
ossOSS personnel enjoy a break at their camp in Ceylon during WWII.U.S. National Archives and Records Administration/Wikimedia Commons

In 1944, the CIA's precursor, the Office of Strategic Services (OSS), distributed a secret pamphlet that was intended as a guidebook to citizens living in Axis nations who were sympathetic to the Allies.

The "Simple Sabotage Field Manual," declassified in 2008 and available on the CIA's website, provided instructions for how everyday people could help the Allies weaken their country by reducing production in factories, offices, and transportation lines.

"Some of the instructions seem outdated; others remain surprisingly relevant," reads the current introduction on the CIA's site. "Together they are a reminder of how easily productivity and order can be undermined."

We've collected below some of the timeless instructions on how to be a terrible employee. What's most amusing is that despite the dry language and specificity of the context, the productivity-crushing activities recommended are all-too-common behaviors in contemporary organizations everywhere.

See if any of those listed below — quoted but abridged — remind you of your boss, colleagues, or even yourself.

Organizations and Conferences

  • Insist on doing everything through "channels." Never permit short-cuts to be taken in order to expedite decisions.
  • Make "speeches." Talk as frequently as possible and at great length. Illustrate your "points" by long anecdotes and accounts of personal experiences.
  • When possible, refer all matters to committees, for "further study and consideration." Attempt to make the committee as large as possible — never less than five.
  • Bring up irrelevant issues as frequently as possible.
  • Haggle over precise wordings of communications, minutes, resolutions.
  • Refer back to matters decided upon at the last meeting and attempt to re-open the question of the advisability of that decision.
  • Advocate "caution." Be "reasonable" and urge your fellow-conferees to be "reasonable"and avoid haste which might result in embarrassments or difficulties later on.

Managers

  • In making work assignments, always sign out the unimportant jobs first. See that important jobs are assigned to inefficient workers.
  • Insist on perfect work in relatively unimportant products; send back for refinishing those which have the least flaw.
  • To lower morale and with it, production, be pleasant to inefficient workers; give them undeserved promotions.
  • Hold conferences when there is more critical work to be done.
  • Multiply the procedures and clearances involved in issuing instructions, pay checks, and so on. See that three people have to approve everything where one would do.

Employees

  • Work slowly.
  • Contrive as many interruptions to your work as you can.
  • Do your work poorly and blame it on bad tools, machinery, or equipment. Complain that these things are preventing you from doing your job right.
  • Never pass on your skill and experience to a new or less skillful worker.

You can read the full manual at the CIA's website »

Honda system confused by Alonso taking Pouhon flat

$
0
0

After receiving a tow from teammate Stoffel Vandoorne at the beginning of his final effort in Q2, Alonso had looked set to deliver a laptime that would have been good enough to get through to the final top 10 shootout.

But between Turn 11 (the exit of Double Gauche) and Turn 12 (the entry of the Fagnes Chicane), Alonso received no extra energy deployment from his Honda power unit.

With a full deployment of energy worth around 160hp, Alonso claimed on the radio that he had lost half a second at that moment – which was enough for him to abort his lap.

The lack of energy was not the result of a failure on the car, but was instead caused by Honda's system not deploying when it was automatically expected to.

Motorsport.com has learned that this failure to deliver the energy was the result of Honda's system getting confused about where it was on the track.

Honda's deployment algorithm is calculated through major throttle input, with it basing its calculations of which corner it is at by major throttle inputs.

So when there is a lift of the throttle, for example, the system takes this into account and works out it must have gone through a corner.

When Alonso took Pouhon flat out – rather than lifting as he had done previously over the weekend – Honda's system did not realise he had already gone through the corner.

Thinking Alonso was still on the run from the Liege downhill corner, rather than on the straight between Turn 11/12, it did not deploy any more energy.

Honda F1 engine chief Yusuke Hasegawa has confirmed that the issue was related to the control system.

"We set a segment to when we have the deployment, and normally that segment is divided by the throttle," he said when asked by Motorsport.com.

"Sometimes a driver is making a different operation, so that makes the system confused and we didn't have deployment at some certain area."

Hasegawa later said that Honda would likely need to change its procedures to ensure there is no repeat incident.

Maybe We All Need a Little Less Balance

$
0
0
Photo
Credit Getty Images

Ever since I can remember, I’ve been told to strive for balance. Yet I’ve noticed something interesting: The times in my life during which I’ve felt happiest and most alive are also the times that I’ve been the most unbalanced.

Falling in love. Writing a book. Trekking in the Himalayas. Training to set a personal record in a triathlon. During these bouts of full-on living I was completely consumed by my activity. Trying to be balanced — devoting equal proportions of time and energy to other areas of my life — would have detracted from the formative experiences.

It’s not just me. Nearly all of the great performers I’ve gotten to know — from athletes to artists to computer programmers to entrepreneurs — report a direct line between being happy, fulfilled and at their best and going all-in on something. Rich Roll, a top ultra-endurance athlete, told me that “the path to fulfillment in life, to emotional satisfaction, is to find what you really excites you and channel your all into it.” Dr. Michael Joyner, a top researcher at the Mayo Clinic, says “you’ve got to be a minimalist to be a maximalist; if you want to be really good, master and thoroughly enjoy one thing, you’ve got to say no to many others.” Nic Lamb, one of the best big-wave surfers on the planet, speaking of his relentless pursuit of excellence in the water, puts it like this: “The best way to find contentment is to give it your all.”

Perhaps we could all use a little more unbalance in our lives.

In the 1990s, the psychologist Mihaly Csikszentmihalyi introduced the term flow, a mental state during which people become wholly immersed in the activity they are doing and their perception of time and space is altered, their entire being filled with enjoyment. A telltale sign of these optimal experiences, of “being in the zone,” is that the outside world disappears. In such a state, flow and balance are irreconcilable. And compared to flow, balance seems, for lack of a better term, boring.

And yet there is still a cost of pursuing something full-on: all of the other things that you leave behind as a result. When you are wholly immersed in anything, it’s all too easy to let the inertia of the experience carry you forward without ever really evaluating what you’re sacrificing along the way; for example, time with friends and family, other hobbies, even simple pleasures like catching up on the latest episodes of “Game of Thrones.”

Continue reading the main story

“Holy Grail” Bugs in Emulation, Part 2

$
0
0

It’s been two months since first writing on Holy Grail bugs in emulation and while it did pique the interest of many emulator developers there has been little movement on solving the bugs. Lior did much more research on solving Pinball Fantasies and byuu dug up a forum post implying that there is in fact a three scanline delay when enabling background layers on the GBA. However, none of the issues have been conclusively resolved.

Of course, the previous article only covers two emulated platforms. There are far more than just two emulated systems out there and along with them a large share more incomprehensible issues.

Nintendo DS Bugs

With currently only two major contenders for mature DS emulators what counts as a Holy Grail bug in DS emulation is a bit more difficult to define. While development has slowed, DeSmuME is still the standout DS emulator for PCs. Seemingly contradictorily however, the oft-considered best DS emulator is DraStic: it’s much faster, more accurate and less buggy, but has the limitations of being closed source and solely for Android, making it hard to peer into its development process. DraStic’s developer Exophase provided some insight into its development, citing several problematic, bizarre behaviors including games that relied on reading unmapped memory, Art Academy relying race conditions involving waiting for IRQs, or worse: expecting proper behavior for accessing. VRAM that has overlapping mappings. Yes, is a thing that the DS can do and is well-defined.

There are several up-and-coming DS emulators however: melonDS from StapleButter, dasShiny from Cydrak, GBE+ from Shonumi, CorgiDS from PSISP, and medusa from myself. We’ve been collaborating some, but for the most part we’ve been doing independent research. As such, we’ve discovered many of the same bugs, which has led us to put our heads together to figure out some of the more insidious ones.

Pokémon Black/White

Pokémon Black and White versions are infamous for being difficult to emulate, and have historically been one of the most buggy games in DeSmuME. Or at least the buggiest games that people wanted to play. While the DeSmuME devs have been unwilling to put effort towards directly fixing these games there have been slow improvements to the point where the game is fairly playable. Meanwhile, DraStic also generally runs them quite well, but the newer DS emulators still struggle.

Pokémon White failing to boot Pokémon’s own “Blue Screen of Death”

There are three big issues that earlier phase DS emulators face with Pokémon Black and White: getting the game to boot in the first place, overcoming the anti-piracy mechanism that prevents EXP gain, and preventing seemingly random crashes. Of course, without being able to boot the game the anti-piracy issues are meaningless, so getting it to boot is the first and foremost issue.

Pokémon Black and White, along with a small handful of other DS games, use special cartridges with an IR sensor onboard. When booting the game using the typical save type detections and support, which apply to 99% of DS games, players are greeted by a nasty blue screen telling them that the save data cannot be accessed. The error cannot be dismissed and the game cannot be played. As it turns out, the IR port is accessed by using a slightly modified version of the protocol that the other 99% of DS games use to load and store save data. If this variant is not properly detected and supported, the game will present this error instead. Fortunately, the variation of the save protocol used in these games is fairly easy to detect and easy to implement (save for the IR communications themselves), which in turn makes overcoming this first hurdle fairly easy. The variant merely adds a 0 byte at the beginning of sending a command for the save protocol, and other values for this first byte entail that it’s an IR command instead.

Pokémon Black anti-piracy triggering

Although getting past the save error screen does resolve the biggest game breaking bug–not being able to play the game at all–it still does not resolve quite another gargantuan game breaking bug. When the game detects that it’s not running an official cartridge on an actual system it triggers a particularly evil anti-piracy measure: your Pokémon do not gain experience. Pokémon at its core is an RPG and experience is crucial to progression. While in theory it’s possible to power through the game without gaining experience, this is only feasible for the most masochistic hardcore of players; it prevents the game from being generally accessible to players of any skill level or penchant for self-flagellation.

While there are patches and Action Replay codes online to prevent the anti-piracy from failing there is no reason that the emulator should allow itself to be seen as a pirate platform. Unfortunately these unofficial game patches do not contain a description of what is being patched or how the patch works. Attempts to reverse engineer the patch have had middling results on my end. With enough research it seems that the issue actually pertains to the time it takes for the cart itself to respond with loaded data. This makes sense since the flash carts that this code is designed to protect against are designed to work with any and all cart types (in theory). As such they may not always present the same timing characteristics as other game carts. And while I’ve made strides in trying to correct this issue in medusa, it persisted.

Recently StapleButter uncovered another issue that would easily catch most flash carts. When starting a game it would poll the cartridge to see if the IR sensor was present. Since flash carts do not have IR sensors the reply it received was incorrect. Further, I had not implemented any semblance of IR support into medusa yet. Once I implemented a proper reply to the polling, despite the lack of any additional IR functionality, experience began working. The first two issues have now been flattened out in medusa, but only very recently.

The third issue is random game crashes. These are also theorized to stem from cart timing issues and indeed may be an extension of the anti-piracy measures. Although I have not encountered this issue myself, I have been told that it results in partially loaded maps and corrupted graphics before ultimately crashing. The crashes only occur after hours of gameplay, so saving often can help avoid lost time from crashes.

Final Fantasy III

Final Fantasy III intro getting stuck There’s actually a whole intro after this frame

Final Fantasy III for the DS is noteworthy for being the first official release of Final Fantasy III outside of Japan. While Final Fantasy I, IV and VI were released as I, II and III internationally, and II and V eventually got released as parts of various compilations, III was isolated to a Japan-only release for sixteen years. In 2006, Square Enix released a remake for the DS that featured 3D graphics and a pre-rendered intro cutscene. At least in theory.

In practice, the title screen presents issues for emulators. In DeSmuME, it locks up on a black screen unless you mash the buttons before the intro even starts. On older versions of medusa it would lock up after a few seconds, looping the last audio sample. Adjusting memory timings directly affected how long it took for the intro to freeze: the slower memory timings were, the longer it would play for. However, adjusting the memory timings also caused slowdown and other issues in other games. While the timings in medusa are currently a stand-in and very inaccurate, it was curious how adjusting the memory timings seemed to have the opposite effect in Final Fantasy III than in other games. Making things faster generally caused other games to run better due to not missing frame targets, but the intro movie would lock up sooner and sooner the faster I made memory timings. Meanwhile, if the memory timings were significantly slower the intro would work far better.

I talked with Cydrak who provided some insight into the issue. Sie had previously mentioned a game which require extremely tight synchronization between the two CPUs of the DS. Tighter synchronization between the CPUs leads to far better accuracy, but much, much slower emulation. Fearing that I’d need to tighten up the synchronization, I started to take a deeper look.

Medusa’s synchronization timings between the two CPUs are fixed at compile time. This means that while it can be adjusted, it cannot be adjusted without recompiling the project. The standard value is roughly 2000 cycles at 66 MHz, which amounts to about 30µs of emulated CPU time. Making the synchronization tighter, I found a lower bound at around 1500 cycles before games would refuse to run, and an upper bound of around 3000 cycles. However, adjusting the synchronization timing had no noticeable effect for me. As such, I left it alone and moved onto other issues.

While I did eventually find the proper fix to allow the entire intro to play flawlessly, it wasn’t until I had looked into fixing another game that I figured out what the issue was…

Tongari Boushi to Oshare na Mahou Tsukai

Tongari Boushi loading forever Even worse than the macOS beachball

It’s well known that DeSmuME is…a bit buggy. Most games work quite well with only smaller bugs, but there are a handful of games that just do not boot or get in-game. One such game is the obscure Japan-only title Tongari Boushi to Oshare na Mahou Tsukai (とんがりボウシとおしゃれな魔法使(まほうつか)い). When loaded in DeSmuME and development versions of other DS emulators it would get to a loading screen and…spin. Forever. Given that it’s an obscure Japan-only title there had probably not been much investigation into why it was broken, either.

Fast-forward to StapleButter doing research for melonDS. While looking into issues relating to cartridge timings he realized that the GBATEK documentation on cartridge timings omitted some important information. GBATEK is extremely good documentation for GBA (unsurprisingly) but does contain a few errata. Meanwhile, GBATEK’s DS documentation is far more lackluster: while it covers most topics relating to DS hardware, many of the sections contain underwhelming or flat-out wrong information. One such section was the DS cartridge section. It does contain mostly factual information and certainly enough information to cover more than just the basics. It mentions basic information about the cartridge timings as well, but it has one glaring omission.

The DS cartridge protocol supports a handful of modes, mostly corresponding to cartridge encryption. In addition to raw access mode, there are also KEY1 and KEY2, which are different encryption modes for ROM startup (as boot code can be put into a region known as the “secure area”) and general ROM data access. For the most part games only use KEY2 encryption after the initial boot process. Since the initial boot process is handled by the firmware before control is passed off to the ROM it is not critical to emulate KEY1 mode if firmware booting is not supported. As such emulator developers tend to ignore the KEY1-specific information in GBATEK, at least until far later in development. As it turns out, that’s where the glaring omission is. There is timing information pertaining to both KEY1 and KEY2 modes that is only marked as KEY1.

DS cartridge transfers take place in three parts. First, the game sends a command to the cartridge itself, telling it what address to read from, in which mode to operate, and various other parameters. Second, data is transferred from the cartridge back to the DS, visible from the software side as four bytes at a time. However, some processing is done on the cartridge side to prepare the data for transfer, which necessitating operations to be done in blocks. Thus, the third part is the delay taken for the processing in between blocks. There is also a delay taken from sending the initial command to the cartridge and data being available to be read from the cartridge. These timings are referred to by GBATEK as “gaps”. Notably, though, the gaps are not handled automatically by the hardware: these timings are not universal between all DS cartridges and as such games will set the timing parameters in software for the gaps before performing transfers.

GBATEK does document these settings but says they only apply to KEY1. There is no mention whatsoever of how gaps work for KEY2, or even a mention of their existence. But this doesn’t make sense: the data still needs to be buffered or otherwise processed before it can be transferred. Since cartridges have random access buffering must be able to be done at transfer start time. This in turn means that a startup gap must exist. Indeed, when using the parameters for KEY1 gaps for KEY2 accesses the infinite loading time of Tongari Boushi becomes finite, Final Fantasy III’s intro movie functions properly, and various other glitches just disappear. And again, it is important to remember that documentation, especially reverse-engineered documentation, is not infallible and must be subjected to scrutiny when seeming contradictions are present.

SNES Bugs

I personally have only worked on emulating three different platforms. Many other platforms are known for some of their emulation difficulties, so I’ve sought out seasoned accuracy-focused developers of other platforms, starting with the obvious choice: with his hyperfocus on accuracy and the SNES byuu had some stories to tell.

Speedy Gonzales: Los Gatos Bandidos

The infamous button Game over I guess?

Speed Gonzales for the SNES has a notorious bug that historically affected all emulators. In level 6-1, part one of the level Galactical Galaxies, there is a button to be pressed for the game to progress. A casual player would run up to the button, press it, and…the game would lock up. The music continues but the player can no longer do anything. The game has no save system, so that means quite a lot of play time down the drain. And until 2010, this affected every single SNES emulator. Fifteen years after the game came out. So what causes such an issue? In the interest of perfect accuracy, byuu dug into the details.

The basic premise of the bug is that the game hits a tight loop where it is perpetually reading a value from unmapped memory at $225C. The loop will only exit if this points to a memory address that contains a value meeting specific criteria. As discussed in my previous article on Holy Grail bugs some systems have open bus behavior, which means that reading from an unmapped address leads to reading back the last value that was passed on the bus. In this case, the value is the last byte of the load instruction, $18, which is read back twice from the bus—once for the low byte, once for the high—yielding the address $1818. The value at this memory address would never fulfill the exit condition so the loop would never exit. And in most emulators, the bus reads could never change, always yielding the same address. Another previous article, this time on the differences between cycle accuracy and other forms of accuracy, all but a cycle-accurate emulator would make it impossible for another value to be read. After all, if the instruction is uninterruptable no value could be loaded onto the bus between the last byte of the instruction and the load performed by the instruction.

Enter cycle accuracy. When you drop the assumption that instructions cannot be interrupted and allow other events to occur in the middle of an instruction a lot of things change. In this case, something interesting happens: suddenly the value on the bus can, in rare circumstances, change. After some false starts byuu realized that an HDMA—a specialized kind of hardware load that is performed in between scanlines—could trigger between the load of the instruction itself and the load performed by the execution. Thus, in the case where the HDMA fired at just the right time, the value read off the bus would not be $18. As it turns out if it read back a 0 the new address would contain a value that did let the loop exit. Indeed, this was the solution. After hundreds of person-hours of investigation, that was one Holy Grail bug down.

Magical Drop

Magical Drop "game over" You’re stuck here forever

So what happens when you have a bug in an emulator that…sometimes reproduces on hardware, but not always? Even worse, the probability of it occurring on hardware varies from unit to unit? It’s a difficult situation and it’s one that plagues the Japan-only game Magical Drop.

The Super Nintendo era had a wave of block-matching puzzle games like Panel de Pon (Tetris Attack in the US), Puyo Puyo, or Columns. In this same vein, Magical Drop features a slight variation on the match-3 formula. The game has several modes, including a versus mode and an endless mode. The game is also notable for having voice clips that play in some emulators but not others. Also in some emulators, endless mode really is endless.

Usually endless or marathon modes function by giving you a variant of the gameplay that does not have a set win condition. Rather, you keep playing until you max out the score counter (and you can keep playing after that too) or you hit a failure condition and get a game over. Like many match-3 games, the failure condition is when you can no longer fit blocks on your screen. The player character then exclaims in disappointment and you can enter your initials for the high score screen.

But in higan, and sometimes on consoles too, the game over screen never appears. The player character keeps hanging their head in shame, and the game softlocks. You can’t enter your initials. The words “Game Over” never appear. Buttons do nothing. So what triggers this softlock? Well, that remains partially unsolved, but investigation into the issue opened a whole can of worms.

Much like the issues with voice clips never playing the issue appears to be related to the SNES’s sound chip. The S-DSP handles processing audio samples into the final output audio. It allows for making various adjustments to the audio in the process, including pitch, echo, ADSR, and more. The game adjusts the state of S-DSP to tune how things are to be output.

So…what happens if a game fails to initialize the S-DSP before it uses it? Well, the current hypothesis is that…we don’t know. Or at least we don’t definitively know. A common failure case for older game consoles is that when hardware isn’t properly initialized its state is actually somewhatrandom. The exact details of this randomization vary from device to device, but this can and has led to games whose behavior will change dramatically based on some random state. Magical Drop happens to be one of those games. Though it’s not entirely clear which part of the S-DSP is causing the hang. A hypothesis is the state of the pitch adjustment, but this has yet to be properly confirmed.

One of the issues with fixing the S-DSP randomness is that much of the internal state is opaque beyond the S-DSP itself, making it difficult to tell what should be random and what shouldn’t be. Another issue is due to a lack of proper test cases to ensure nothing breaks. In fact, byuu attempted to randomize the entire S-DSP state, and sure enough, it broke things that previously worked. For example, King of Dragons would randomly drop sound effects and channels. Further, which ones were missing varied every boot. So clearly some things weren’t random…but some things are. The issue has not yet been fully investigated on hardware, but research is ongoing and will hopefully yield a further understanding as it continues. Until then, well, you’re resigned to using less accurate emulators for this specific game.

That’s four consoles down

So what’s next? Well I’ve only addressed Holy Grail bugs in four consoles so far. There are many consoles out there more complex and less well understood than the SNES or the GB, and with them their own sets of issues. We’ve barely even scratched the surface of older consoles, and newer ones not at all.

As you get newer they get far more difficult to understand. They have more moving parts and more complex rendering pipelines. Understanding such large systems as a whole is difficult enough, but understanding ways they can break is far worse. In part 3, I plan to interview emulator developers for newer systems their takes on the difficulties in emulation. I don’t know about you but I can’t wait to find out what horrors lie buried in the Sega Saturn.

Hangul to Chinse Character Conversion

$
0
0

README.md

Around 2/3 of Korean words are Sino-Korean. For that reason, although the official script of the Korean language is Hangul, Chinese characters are still widely used. Converting Chinese characters (Hanja in Korean) to Hangul is trivial because most Hanjas have a single equivalent of Hangul. However, the reverse is not. There has been a project, UTagger, for Hangul-to-Hanja conversion. I use neural networks to tackle the task.

Requirements

  • numpy >= 1.11.1
  • TensorFlow == 1.3
  • tqdm

Data

The KRV Bible is in the public domain. I have refined it to our purpose. Each line is separated by a tab. Sino Korean words in the first sentence is written in Hanja in the second sentence (See below). Check data/bible_ko.tsv.

나는 오늘 학교에 간다 [Tab] 나는 오늘 學校에 간다

Model Architecture

Bidirectional GRUs.

Training

  • Adjust hyperparameters in the hyperparams.py if necessary.
  • Run python train.py.

Results

After 10 epochs, I got the accuracy of 0.99 for validation data. Details are available in the eval.txt.

▌Input : 그 성곽을 척량하매 일백 사십 사 규빗이니 사람의 척량 곧 천사의 척량이라
▌Expected: 그 城廓을 尺量하매 一百 四十 四 규빗이니 사람의 尺量 곧 天使의 尺量이라
▌Got : 그 城廓을 尺量하매 一百 사십 四 규빗이니 사람의 尺量 곧 天使의 尺量이라

▌Input : 그 성곽은 벽옥으로 쌓였고 그 성은 정금인데 맑은 유리 같더라
▌Expected: 그 城廓은 碧玉으로 쌓였고 그 城은 精金인데 맑은 琉璃 같더라
▌Got : 그 城廓은 碧玉으로 쌓였고 그 城은 精金인데 맑은 유離 같더라

▌Input : 그 성의 성곽의 기초석은 각색 보석으로 꾸몄는데 첫째 기초석은 벽옥이요 둘째는 남보석이요 세째는 옥수요 네째는 녹보석이요
▌Expected: 그 城의 城廓의 基礎石은 各色 寶石으로 꾸몄는데 첫째 基礎石은 碧玉이요 둘째는 藍寶石이요 세째는 玉髓요 네째는 綠寶石이요
▌Got : 그 城의 城廓의 基礎石은 各色 寶石으로 꾸몄는데 첫째 基礎石은 壁玉이요 둘째는 藍寶石이요 세째는 玉數요 네째는 綠寶石이요

▌Input : 다섯째는 홍마노요 여섯째는 홍보석이요 일곱째는 황옥이요 여덟째는 녹옥이요 아홉째는 담황옥이요 열째는 비취옥이요 열 한째는 청옥이요 열 두째는 자정이라
▌Expected: 다섯째는 紅瑪瑙요 여섯째는 紅寶石이요 일곱째는 黃玉이요 여덟째는 綠玉이요 아홉째는 淡黃玉이요 열째는 翡翠玉이요 열 한째는 靑玉이요 열 두째는 紫晶이라
▌Got : 다섯째는 紅瑪瑙요 여섯째는 紅寶石이요 일곱째는 黃玉이요 여덟째는 綠玉이요 아홉째는 담黃玉이요 열째는 비醉옥이요 열 한째는 靑玉이요 열 두째는 自情이라

▌Input : 그 열 두 문은 열 두 진주니 문마다 한 진주요 성의 길은 맑은 유리 같은 정금이더라
▌Expected: 그 열 두 門은 열 두 眞珠니 門마다 한 眞珠요 城의 길은 맑은 琉璃 같은 精金이더라
▌Got : 그 열 두 門은 열 두 眞珠니 門마다 한 眞珠요 城의 길은 맑은 유리 같은 精金이더라

▌Input : 성안에 성전을 내가 보지 못하였으니 이는 주 하나님 곧 전능하신 이와 및 어린 양이 그 성전이심이라
▌Expected: 城안에 聖殿을 내가 보지 못하였으니 이는 主 하나님 곧 全能하신 이와 및 어린 羊이 그 聖殿이심이라
▌Got : 성안에 聖殿을 내가 보지 못하였으니 이는 主 하나님 곧 全能하신 이와 및 어린 羊이 그 聖殿이심이라

▌Input : 그 성은 해나 달의 비췸이 쓸데 없으니 이는 하나님의 영광이 비취고 어린 양이 그 등이 되심이라
▌Expected: 그 城은 해나 달의 비췸이 쓸데 없으니 이는 하나님의 榮光이 비취고 어린 羊이 그 燈이 되심이라
▌Got : 그 城은 해나 달의 비췸이 쓸데 없으니 이는 하나님의 榮光이 비취고 어린 羊이 그 등이 되심이라

▌Input : 만국이 그 빛 가운데로 다니고 땅의 왕들이 자기 영광을 가지고 그리로 들어오리라
▌Expected: 萬國이 그 빛 가운데로 다니고 땅의 王들이 自己 榮光을 가지고 그리로 들어오리라
▌Got : 萬國이 그 빛 가운데로 다니고 땅의 王들이 自己 榮光을 가지고 그리로 들어오리라

▌Input : 성문들을 낮에 도무지 닫지 아니하리니 거기는 밤이 없음이라
▌Expected: 城門들을 낮에 도무지 닫지 아니하리니 거기는 밤이 없음이라
▌Got : 城門들을 낮에 도무지 닫지 아니하리니 거기는 밤이 없음이라

▌Input : 사람들이 만국의 영광과 존귀를 가지고 그리로 들어오겠고
▌Expected: 사람들이 萬國의 榮光과 尊貴를 가지고 그리로 들어오겠고
▌Got : 사람들이 萬國의 榮光과 尊貴를 가지고 그리로 들어오겠고

▌Input : 무엇이든지 속된 것이나 가증한 일 또는 거짓말하는 자는 결코 그리로 들어오지 못하되 오직 어린 양의 생명책에 기록된 자들뿐이라
▌Expected: 무엇이든지 俗된 것이나 可憎한 일 또는 거짓말하는 자는 決코 그리로 들어오지 못하되 오직 어린 羊의 生命冊에 記錄된 자들뿐이라
▌Got : 무엇이든지 속된 것이나 可憎한 일 또는 거짓말하는 자는 決코 그리로 들어오지 못하되 오직 어린 羊의 生命冊에 記錄된 자들뿐이라

▌Input : 또 저가 수정같이 맑은 생명수의 강을 내게 보이니 하나님과 및 어린 양의 보좌로부터 나서
▌Expected: 또 저가 水晶같이 맑은 生命水의 江을 내게 보이니 하나님과 및 어린 羊의 寶座로부터 나서
▌Got : 또 저가 水晶같이 맑은 生命水의 江을 내게 보이니 하나님과 및 어린 羊의 寶座로부터 나서

▌Input : 길 가운데로 흐르더라 강 좌우에 생명 나무가 있어 열 두가지 실과를 맺히되 달마다 그 실과를 맺히고 그 나무 잎사귀들은 만국을 소성하기 위하여 있더라
▌Expected: 길 가운데로 흐르더라 江 左右에 生命 나무가 있어 열 두가지 實果를 맺히되 달마다 그 實果를 맺히고 그 나무 잎사귀들은 萬國을 蘇醒하기 爲하여 있더라
▌Got : 길 가운데로 흐르더라 江 左右에 生命 나무가 있어 열 두가지 實果를 맺히되 달마다 그 實果를 맺히고 그 나무 잎사귀들은 萬國을 蘇醒하기 爲하여 있더라

▌Input : 다시 저주가 없으며 하나님과 그 어린 양의 보좌가 그 가운데 있으리니 그의 종들이 그를 섬기며
▌Expected: 다시 詛呪가 없으며 하나님과 그 어린 羊의 寶座가 그 가운데 있으리니 그의 종들이 그를 섬기며
▌Got : 다시 詛呪가 없으며 하나님과 그 어린 羊의 寶座가 그 가운데 있으리니 그의 종들이 그를 섬기며

▌Input : 그의 얼굴을 볼터이요 그의 이름도 저희 이마에 있으리라
▌Expected: 그의 얼굴을 볼터이요 그의 이름도 저희 이마에 있으리라
▌Got : 그의 얼굴을 볼터이요 그의 이름도 저희 이마에 있으리라

▌Input : 다시 밤이 없겠고 등불과 햇빛이 쓸데 없으니 이는 주 하나님이 저희에게 비취심이라 저희가 세세토록 왕노릇하리로다
▌Expected: 다시 밤이 없겠고 燈불과 햇빛이 쓸데 없으니 이는 主 하나님이 저희에게 비취심이라 저희가 世世토록 王노릇하리로다
▌Got : 다시 밤이 없겠고 燈불과 햇빛이 쓸데 없으니 이는 主 하나님이 저희에게 비취심이라 저희가 世世토록 王노릇하리로다

▌Input : 또 그가 내게 말하기를 이 말은 신실하고 참된 자라 주 곧 선지자들의 영의 하나님이 그의 종들에게 결코 속히 될 일을 보이시려고 그의 천사를 보내셨도다
▌Expected: 또 그가 내게 말하기를 이 말은 信實하고 참된 자라 主 곧 先知자들의 靈의 하나님이 그의 종들에게 決코 速히 될 일을 보이시려고 그의 天使를 보내셨도다
▌Got : 또 그가 내게 말하기를 이 말은 信實하고 참된 자라 主 곧 先知자들의 靈의 하나님이 그의 종들에게 決코 速히 될 일을 보이시려고 그의 天使를 보내셨도다

▌Input : 보라 내가 속히 오리니 이 책의 예언의 말씀을 지키는 자가 복이 있으리라 하더라
▌Expected: 보라 내가 速히 오리니 이 冊의 豫言의 말씀을 지키는 자가 福이 있으리라 하더라
▌Got : 보라 내가 速히 오리니 이 冊의 豫言의 말씀을 지키는 자가 福이 있으리라 하더라

▌Input : 이것들을 보고 들은 자는 나 요한이니 내가 듣고 볼때에 이 일을 내게 보이던 천사의 발앞에 경배하려고 엎드렸더니
▌Expected: 이것들을 보고 들은 자는 나 요한이니 내가 듣고 볼때에 이 일을 내게 보이던 天使의 발앞에 敬拜하려고 엎드렸더니
▌Got : 이것들을 보고 들은 자는 나 요한이니 내가 듣고 볼때에 이 일을 내게 보이던 天使의 발앞에 敬拜하려고 엎드렸더니

▌Input : 저가 내게 말하기를 나는 너와 네 형제 선지자들과 또 이 책의 말을 지키는 자들과 함께된 종이니 그리하지 말고 오직 하나님께 경배하라 하더라
▌Expected: 저가 내게 말하기를 나는 너와 네 兄弟 先知자들과 또 이 冊의 말을 지키는 자들과 함께된 종이니 그리하지 말고 오직 하나님께 敬拜하라 하더라
▌Got : 저가 내게 말하기를 나는 너와 네 兄弟 先知자들과 또 이 冊의 말을 지키는 자들과 함께된 종이니 그리하지 말고 오직 하나님께 敬拜하라 하더라

▌Input : 또 내게 말하되 이 책의 예언의 말씀을 인봉하지 말라 때가 가까우니라
▌Expected: 또 내게 말하되 이 冊의 豫言의 말씀을 印封하지 말라 때가 가까우니라
▌Got : 또 내게 말하되 이 冊의 豫言의 말씀을 印封하지 말라 때가 가까우니라

▌Input : 불의를 하는 자는 그대로 불의를 하고 더러운 자는 그대로 더럽고 의로운 자는 그대로 의를 행하고 거룩한 자는 그대로 거룩되게 하라
▌Expected: 不義를 하는 자는 그대로 不義를 하고 더러운 자는 그대로 더럽고 義로운 자는 그대로 義를 行하고 거룩한 자는 그대로 거룩되게 하라
▌Got : 不義를 하는 자는 그대로 不義를 하고 더러운 자는 그대로 더럽고 義로운 자는 그대로 義를 行하고 거룩한 자는 그대로 거룩되게 하라

▌Input : 보라 내가 속히 오리니 내가 줄 상이 내게 있어 각 사람에게 그의 일한대로 갚아 주리라
▌Expected: 보라 내가 速히 오리니 내가 줄 賞이 내게 있어 各 사람에게 그의 일한대로 갚아 주리라
▌Got : 보라 내가 速히 오리니 내가 줄 賞이 내게 있어 各 사람에게 그의 일한대로 갚아 주리라

▌Input : 나는 알파와 오메가요 처음과 나중이요 시작과 끝이라
▌Expected: 나는 알파와 오메가요 처음과 나중이요 始作과 끝이라
▌Got : 나는 알파와 오메가요 처음과 나중이요 始作과 끝이라

▌Input : 그 두루마기를 빠는 자들은 복이 있으니 이는 저희가 생명 나무에 나아가며 문들을 통하여 성에 들어갈 권세를 얻으려 함이로다
▌Expected: 그 두루마기를 빠는 자들은 福이 있으니 이는 저희가 生命 나무에 나아가며 門들을 通하여 城에 들어갈 權勢를 얻으려 함이로다
▌Got : 그 두루마기를 빠는 자들은 福이 있으니 이는 저희가 生命 나무에 나아가며 門들을 通하여 城에 들어갈 權勢를 얻으려 함이로다

▌Input : 개들과 술객들과 행음자들과 살인자들과 우상 숭배자들과 및 거짓말을 좋아하며 지어내는 자마다 성밖에 있으리라
▌Expected: 개들과 術客들과 行淫자들과 殺人자들과 偶像 崇拜자들과 및 거짓말을 좋아하며 지어내는 자마다 城밖에 있으리라
▌Got : 개들과 術客들과 行淫자들과 殺人자들과 偶像 崇拜자들과 및 거짓말을 좋아하며 지어내는 자마다 城밖에 있으리라

▌Input : 나 예수는 교회들을 위하여 내 사자를 보내어 이것들을 너희에게 증거하게 하였노라 나는 다윗의 뿌리요 자손이니 곧 광명한 새벽별이라 하시더라
▌Expected: 나 예수는 敎會들을 爲하여 내 使자를 보내어 이것들을 너희에게 證據하게 하였노라 나는 다윗의 뿌리요 子孫이니 곧 光明한 새벽별이라 하시더라
▌Got : 나 예수는 敎會들을 爲하여 내 使자를 보내어 이것들을 너희에게 證據하게 하였노라 나는 다윗의 뿌리요 子孫이니 곧 光明한 새벽별이라 하시더라

▌Input : 성령과 신부가 말씀하시기를 오라 하시는도다 듣는 자도 오라 할 것이요 목마른 자도 올 것이요 또 원하는 자는 값없이 생명수를 받으라 하시더라
▌Expected: 聖靈과 新婦가 말씀하시기를 오라 하시는도다 듣는 자도 오라 할 것이요 목마른 자도 올 것이요 또 願하는 자는 값없이 生命水를 받으라 하시더라
▌Got : 聖靈과 新婦가 말씀하시기를 오라 하시는도다 듣는 자도 오라 할 것이요 목마른 자도 올 것이요 또 願하는 자는 값없이 生命水를 받으라 하시더라

▌Input : 내가 이 책의 예언의 말씀을 듣는 각인에게 증거하노니 만일 누구든지 이것들 외에 더하면 하나님이 이 책에 기록된 재앙들을 그에게 더하실 터이요
▌Expected: 내가 이 冊의 豫言의 말씀을 듣는 各人에게 證據하노니 萬一 누구든지 이것들 外에 더하면 하나님이 이 冊에 記錄된 災殃들을 그에게 더하실 터이요
▌Got : 내가 이 冊의 豫言의 말씀을 듣는 各人에게 證據하노니 萬一 누구든지 이것들 外에 더하면 하나님이 이 冊에 記錄된 災殃들을 그에게 더하실 터이요

▌Input : 만일 누구든지 이 책의 예언의 말씀에서 제하여 버리면 하나님이 이 책에 기록된 생명 나무와 및 거룩한 성에 참여함을 제하여 버리시리라
▌Expected: 萬一 누구든지 이 冊의 豫言의 말씀에서 除하여 버리면 하나님이 이 冊에 記錄된 生命 나무와 및 거룩한 城에 參與함을 除하여 버리시리라
▌Got : 萬一 누구든지 이 冊의 豫言의 말씀에서 除하여 버리면 하나님이 이 冊에 記錄된 生命 나무와 및 거룩한 城에 參與함을 除하여 버리시리라

▌Input : 이것들을 증거하신 이가 가라사대 내가 진실로 속히 오리라 하시거늘 아멘 주 예수여 오시옵소서
▌Expected: 이것들을 證據하신 이가 가라사대 내가 眞實로 速히 오리라 하시거늘 아멘 主 예수여 오시옵소서
▌Got : 이것들을 證據하신 이가 가라사대 내가 眞實로 速히 오리라 하시거늘 아멘 主 예수여 오시옵소서

▌Input : 주 예수의 은혜가 모든 자들에게 있을지어다 아멘
▌Expected: 主 예수의 恩惠가 모든 자들에게 있을지어다 아멘
▌Got : 主 예수의 恩惠가 모든 자들에게 있을지어다 아멘

accuracy = 0.9905450500556173-----------------

Veeder-Root Gasoline Pump Computer Service Manual

$
0
0

Veeder Root Service Manual

Click on image to see large detailed picture.Veeder Root Manual Veeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root ManualVeeder Root Manual


Google Issuing Refunds to Advertisers Over Fake Traffic, Plans New Safeguard

$
0
0

Google is issuing refunds for ads that ran on websites with fake traffic, people familiar with the situation said, as the web giant develops a tool to give marketers more transparency about the ads they buy through its platform.

In the past few weeks, the Alphabet Inc. unit has informed hundreds of marketers and ad agency partners about the issue with invalid traffic, known in the industry as “ad fraud.” The ads were bought using the company’s DoubleClick Bid Manager over the course of a few months this year, primarily in the second quarter.

Google’s refunds amount to only a fraction of the cost of the ads served to invalid traffic, which has left some advertising executives unsatisfied, the people familiar with the situation said. Google has offered to reimburse its “platform fee,” which ad buyers said typically ranges from about 7% to 10% of their total purchase.

The company says this is appropriate because it doesn’t control the rest of the money spent. Typically, advertisers use DoubleClick Bid Manager to target audiences across vast numbers of websites in seconds by connecting to dozens of online ad exchanges, marketplaces that connect buyers and publishers through real-time auctions.

The ad spending flows through to the exchanges. The problems arise when ads run on publisher sites with fraudulent traffic, including those where clicks are generated by software programs known as “bots” instead of humans. This is an issue of growing concern to marketers. It is difficult to recoup the money paid to those sites when the issue is discovered too late.

Advertisers often receive small credits from Google and their other ad-tech vendors when they detect discrepancies, but in this case, for some buyers, the instance of fraud discovered was larger than usual.

It’s the latest evidence of how the complexity of the digital advertising ecosystem—an industry where marketers and ad sellers are separated by layers of middlemen and automation—can cause tensions between Madison Avenue and big players like Google. Just a few months ago, some marketers suspended their campaigns from Google’s YouTube after revelations their ads appeared next to hateful or otherwise unsavory videos. YouTube has taken steps to assuage marketers’ concerns, and many brands have now returned to the platform. Ad agencies, too, have battled with Google to let them access more of its extensive data to help them improve how ads are targeted and measure whether they are effective.

Scott Spencer, director of product management for Google, acknowledged that refunds have been paid, but he declined to provide a dollar figure for the amount being returned. Some ad buyers said the refund amounts range from “less money than you would spend on a sandwich” to hundreds of thousands of dollars.

Some agencies and advertisers were affected more than others, depending on their level of spending during the period and the types of ads they bought.

“Today, we can’t disclose the information about third parties,” Mr. Spencer said. “So when we aren’t able to catch invalid traffic before it impacts our advertisers and we’re unable to refund their media spend, it hurts us, even if we’re not responsible.”

Google is working on a fix it hopes will provide some clarity over which technology providers in the ad-buying chain are responsible for issuing refunds. It is also working on technology to ensure advertisers automatically receive a full credit back from Google and its partners if incidents occur.

The company said it is entering discussions with the 100-plus exchanges, ad networks and publishers that DoubleClick Bid Manager plugs into, asking them to display to ad buyers whether they are willing to refund the entire media spend if ad-fraud instances occur. Buyers could then opt to filter out the sources of inventory that don’t have such a policy.

Mr. Spencer said Google expects “high rates of adoption” among exchanges, and that the ones it had spoken to so far had been “very supportive” of the effort.

Another point of contention among those receiving refunds is that they haven’t been given details about where their ads ended up or specific details about the exploits the fraudsters used, so that advertisers and agencies can apply their own safeguards in the future.

“We need to be very careful about commenting on or discussing specifics about bots or our detection,” Mr. Spencer said. “Often fraudsters will change their approaches and strategies based on our public comments.”

Of the billions of dollars of online advertising each year, a percentage is inadvertently placed on sites with fake traffic, with fraudsters siphoning off advertisers’ money.

The industry’s efforts to rein in fraud appear to have an impact. Some $6.5 billion in ad spending will be wasted this year to fraud, down 10% from 2016, according to a report released in May by the Association of National Advertisers and ad-fraud detection firm WhiteOps.

The methods the fraudsters use are highly sophisticated. Some infect unsuspecting consumers’ computers with malware to form a “botnet” that clicks on ads on bogus sites.

Fraudsters are often adept at covering their tracks, which can make their activity difficult to spot until after the event has occurred.

For years, Google has had teams dedicated to filtering out fraud before an advertiser makes a bid on an ad. Those teams can also prevent exchanges from being paid if an ad has already been bid on but invalid traffic is quickly detected. The teams also work to discover historical instances of fraud, which is what happened in this particular case.

In the recent cases Google discovered, the affected traffic involved video ads, which carry higher ad rates than typical display ads and are therefore an attractive target for fraudsters.

Google has also joined a number of industry initiatives, such as the “Ads.txt” project launched in May by the Interactive Advertising Bureau, an industry trade body. The tool lets premium publishers insert a text file on their web servers to list all the ad tech vendors authorized to sell their inventory so ad buyers can confirm which platforms are selling legitimate ads.

“When people talk about [ad fraud], there’s a big specter to it and a big concern about invalid traffic in digital,” said Mr. Spencer. “It’s not that large in terms of a percentage of what people are buying, but it can be a little bit scary to buyers, and our goal is to remove that to improve the trust overall in the ecosystem.”

Write to Lara O’Reilly at lara.o'reilly@wsj.com

People Are Using Old Laptop Batteries to Build Their Own Versions of Powerwall

$
0
0

In Brief
Consumers who can't afford commercially produced powerwalls are using recycled batteries to build their own. While companies like Tesla sell powerwalls, these DIY models allow people to save money — and potentially store more electricity.

An Affordable Alternative

Tesla’s Powerwall was intended to provide a convenient way for homeowners to store electricity for future use, such as when the power goes out. But with a $5,500 price tag, they haven’t been affordable for many consumers. Some who had been interested in the tech, however, decided to try to make their own. It turns out homemade powerwalls aren’t just more affordable, but often are capable of storing just as much power as the Tesla version.

Consumers have constructed their own powerwalls by utilizing old, recycled batteries from laptops. While they may seem useless or devoid of battery life at first glance, DIYers have capitalized on their own resourcefulness and the wastefulness of those around them. There are forums and numerous YouTube videos dedicated to helping people build their own powerwalls; one YouTuber, Joe Williams, explains that it all comes down to being able to trust something built yourself — as opposed to what a company says is right for you.

“The end result is being able to rely on something I not only built myself but understand the ins and outs of to power some or all of my electricity in my home. That is inspiring,” said Williams to Motherboard.

Tesla’s Powerwall is capable of storing up to 14 kWh, but that’s not due to the limits in technology, since others have been able to store much more. On the DIYPowerwalls forums, one user named Glubux claims his custom made powerwall can hold up to 28 kWh. Australian YouTube creator Peter Matthews built one that he claims can store 40 kWh, which it gathers from the 40 solar panels on his roof.

Long-Lasting Impact

18650 lithium-ion batteries are the most recommended batteries to use, and they’re easily identifiable by their colorful plastic. They can be found in more than just laptops, but collecting enough of them to create a powerwall can be time consuming. Foraging may be a more economical option, however,  since store prices for batteries can be more than $5 per battery.

Having less impact on one’s finances isn’t the only benefit to building your own powerwall. Since people often throw away their laptops without removing the batteries, they usually end up in a landfill. But DIY powerwall builders are recycling batteries and giving them a whole new purpose.

“Approximately 95 percent of consumer batteries sold in the US are not recycled and are ultimately thrown away,” said Call2Recycle CEO Carl E. Smith to Motherboard.

“Virtually all batteries can be recycled into valuable secondary products which is the biggest reason why they should not be landfilled and should be recycled instead.”

This trend is proof that people will create their own worthwhile hardware is companies aren’t providing what they want at prices they can afford. While there are some risks to building a powerwall if you don’t have the proper tools and resources, a little research, invested time, and a little ingenuity can go a long way.

The Hindu Temple as a Model of Fractal Cosmology

$
0
0

Indian Temple FractalsKandariya Mahadev Temple [Madhya Pradesh] (source unknown)

The self-similar, cascading architectural forms found in Hindu temple architecture appear to have been pieced together by a hyper-industrious Minecrafter hooked on Hofstadter. Jagged waves of blocky ornamentation, rhythmically repeating, create diminishing echo’s of the temple’s form; tiny versions of itself repeating towards a proposed infinity. Baroque three-dimensional Cellular Automata. Cantor Set masonry. Malevich’s Architectons upscaled and iterated to the nth degree, often smothered with a teeming mass of deities and denizens, each one competing for your retina.

Indian Temple FractalsKandariya Mahadev Temple [Madhya Pradesh] – RM Nunes

It’s not just that these temples appear to be algorithmically generated, the ancient Vastu Sustra texts provide procedural rules or recipes for their design, layout and build (including the positions of ornaments). The texts transmit recursive programs, by verbal instruction, to masons so that according to Kirti Trivedi, the Hindu Temple becomes a model of a fractal Universe. A model which represents ‘views of the cosmos to be holonomic and self-similar in nature’. The idea of fractal cosmology is no stranger to western academia. In 1987 the Italian physicist Luciano Pietronero argued, in his paper, that the Universe shows ‘a definite fractal aspect over a fairly wide range of scale’ based on correlations of galaxies and clusters, their spatial distribution and average mass density.

‘According to Hindu philosophy the cosmos can be visualised to be contained in a microscopic capsule, with the help of the concept of subtle element called ‘tammatras’. The whole cosmic principle replicates itself again and again in ever smaller scales’ – Kirti Trivedi

Indian Temple FractalsYellamma Temple [Karnataka] – Paul Prudence

Indian Temple FractalsArchitecton Series – Kazimir Malevich [1923]

Indian Temple FractalsTemple Plan for Barwasagar Temple [Uttar Pradesh] from Geometry Measure in India Temple Plans

The initial temple plan is based on a grid form known as the Vastu-Purusha Mandala. Tellingly Trivedi remarks in his paper that the Vastu-Purusha Mandala is ‘not a blueprint for a temple, but a ‘forecast’, a marking of the potential within which a wide range of possibilities are implied’. The significance here, should not be underestimated. A ‘potential for possibilities’ within a predefined rule-set predisposes architecture to be governed by a degree of emergence. While emergence in parametric architecture arrived, recently, with computers and algorithms, India has been enacting emergent masonry for thousands of years thanks to the open rules of the Vastus Sustra.

Indian Temple FractalsShweta Varahaswamy Temple [Karnataka] – Paul Prudence

Using a system of measurement called the ‘Tala’, dimensional relationships of proportions rather than exact structural specifications are defined. Initial decisions (why not call them algorithmic seeds?) combined with rule sets are used to define the final outcome of the building. The ‘Tala’ system is scale invariant, just like fractal mathematics, so that a building of any size can be created, and decorated without compromising the model of self containment. The temple, as a whole, is built by interweaving fractalization processes with repetition and superimposition. An example of a typical recursive instruction, verbalised, is:

The layer of prahara (projection) will be above the chadya (eave of the roof). This is to be repeated again and again on the spire over the spire. A fraction of the prahara is to be constructed and again the spires are to be constructed. Each of the upper spires will be sprouted out with a measurement equal to half the size of the lower spire – Ksirarnava, 7.113

Indian Temple FractalsSri Meenakshi Amman Temple [Tamil Nadu] – Paul Prudence

The Kandariya Mahadev, in Madhya Pradesh, is one of the best examples of recursive temple architecture in India. The rising towers (Shikhara) of this structure are said to mimic the forms of mountains which are themselves self-similar. Shikhara literally translates to the word mountain.

Inspiration by way of a recent trip (one of many) to Karatanka, Tamil Nadu and Kerala.

Further Reading:

The Hindu Temple is a Model of a Fractal Universe– Kirti Trivedi [1993]
Infinite Sequences in The Constructive Geometry of 10th Century Hindu Temple Superstructures– Sambit Datta [2010]

Related Posts:

Stanley Tigerman & G. T. Crabtree – The Formal Generators of Structure
Breed – Driessens & Verstappen: Evolutional Diffusion Lattices
Yuri Avvakumov – Agitarch Structures: Reconfiguring Utopia

Environmental impacts of food consumption by dogs and cats

$
0
0

Total energy consumed

Energy consumption was calculated as:(1) where is the total energy consumed annually, is the per-capital annual consumption, and N is the number of individuals. was calculated separately for humans, dogs, and cats.

The Census Bureau estimates that the total population of the US was 321 million in 2015, with roughly equal proportions of men and women [27] (Table 1). The USDA Agricultural Research Service estimates that on average, US males (age 2+) consume 10,330 ± 91 kJ d-1 (2,469 ± 81 kcal d-1) and US females (age 2+) consume 7,607 ± 64 kJ d-1 (1,817 ± 15 kcal d-1). Therefore, the average daily energy consumption for both males and females is 8,966 ± 155 kJ d-1 (2,143 ± 37 kcal d-1) [28]. Using Eq 1, these estimates result in a total human energy intake of 1,051 ± 9 PJ y-1.

The American Pet Products Association (APPA) estimates that there were 77.8 million dog and 85.6 million cats owned as pets in the United States in 2015 (Table 1) [8]. Dogs’ energy requirements are taken as ~544 kJ (kg BW)-0.75 d-1 [29]. Dogs’ body weight (BW) varies greatly by breed. To estimate the average BW of dogs, the average weight of the American Kennel Club (AKC)’s list of the 10 most popular dog breeds in the US was used [30]. Average breed weights were taken either from the AKC or other sources [31]. This resulted in an average US dog BW of 22 kg. The standard deviation of the average breed weights represents the variability among breeds, rather than uncertainty in the average dog weight and is therefore inappropriate for the uncertainty analysis done here. To estimate the uncertainty in the average dog weight, data from Meyer et al. [32] were taken for 10 breeds of different sizes. For each breed, Meyer et al. [32] reports the mass and standard deviation of the samples (n = 4 to 9). The standard deviation was regressed against the mass (r2 = 0.87) and standard deviation at 22 kg was estimated as 1.2 kg. Therefore, the estimated average US dog BW that will be used hereafter is 22 ± 1.2 kg giving an average energy requirement of 5,594 ± 443 kJ d-1 (1337 ± 106 kcal d-1). Multiplied by the estimated number of owned dogs in the US (Eq 1), this results in an estimate of 159 ± 13 PJ y-1 consumed by dogs [29].

Cats require ~544 kJ (kg BW)-0.67 d-1 energy [29]. The body weight of cats varies less than that of dogs, so the average and standard deviation of cat weight in Bermingham et al. [33] (4.2 ± 0.2 kg) were used to represent average cat weight, resulting in a total cat energy requirement of 1,426 ± 79 kJ d-1 (341 ± 19 kcal d-1). Multiplied by the estimated number of owned cats in the US (Eq 1), this results in an estimate of 45 ± 2.5 PJ y-1 consumed.

The proportion of the dietary energy in the US consumed by dogs and cats was calculated as the sum of the energy consumed by dogs and cats (203 ± 15 PJ y-1) divided by human energy intake (1051 ± 9 PJ y-1), with the result that dogs and cats consume about 19.4 ± 1.6% of the energy that humans in America do (Table 1).

Energy from animal sources

For humans, the fraction of energy that is derived from animal sources, FA, can be calculated as:(2) where EA,C is the energy consumed by humans from animal sources (subscript A). EA,C can be calculated from data available from the U.S. Department of Agriculture (USDA) (Table 2): the total amount of red meat (including beef, veal, pork, and lamb), poultry (including chicken and turkey) and fish (including fish and shellfish) eaten by each Americans is 59.6 kg yr-1. Given the energy density of each food used by the USDA (Table 2), and with the conservative assumption that this meat provides the only animal-derived energy consumed by Americans, it is calculated that Americans consume 206 PJ yr-1 from animal sources, which constitutes 20% of their total energy intake.

For dogs and cats, direct data on consumption is not available and therefore FA cannot be calculated directly using Eq 2. Instead, new calculations must be made based on available data: ingredient lists for dog and cat foods and the composition of these ingredients in terms of substrates which have well-known energy densities (i.e., Atwater factors for protein, carbohydrate, and fat).

To do this, the ingredient lists for individual pet foods were used. Individual ingredients were considered in terms of the content of energy-providing substrates, protein, fat, and carbohydrate and non-energy providing components like water, ash, and fiber. Compositional data analysis is required for these calculations because the substrate components must sum to unity [34]. For a particular pet food, m, the center (analogous to the arithmetic mean) dry mass fraction of substrate k (protein, fat, carbohydrate, other), expressed as average grams of k per gram of m, was calculated as the closed geometric mean:(3) where is the mass fraction of substrate k in one of the first five ingredients, i, in a particular food (i.e., grams of k per gram of i). For these calculations, the category ‘other’ was included to provide closure [35], that is, so that the fractions of all categories would sum to unity. was estimated for each ingredient by equating it with a general ingredient category for which substrate content is available (Table 3) [29, 36].

Similarly, the average dry mass fraction of animal-derived substrate k for a particular food (i.e., average grams of animal-derived k per gram of m) was calculated as the closed geometric mean:(4) where is the mass fraction of animal-derived substrate k in one of the first five ingredients, i, in a particular food (Table 3 asterisks indicate animal-derived). For these calculations, the same approach was used in calculation of , except non-animal derived protein, fat, and carbohydrates were added to the ‘other’ category to maintain closure. and are (geometric) average mass fractions and therefore explicitly assume that the first five ingredients in a food are present in equal proportions and that they constitute nearly all of the mass of pet food m. This assumption is wrong, but conservative, as explained below. Uncertainty in was calculated as the variance across all m for each substrate k [35].

The fraction of energy derived from animal products in a food m (animal-derived joules per total joules) was calculated as:(5) where Ek is the energy density of the substrates (i.e., Atwater factors: Eprotein = Ecarbohydrate = 4J/g, EFat = 9 J/g [29]). Eother was set to zero in for both total and animal-derived calculations. In the former case, water, ash, and fiber, which provide no dietary energy, comprised the ‘other’ category. In the latter, ‘other’ contained water, ash, and fiber as well as non-animal derived protein, fat, and carbohydrates, on the logic that these do not provide animal-derived dietary energy. The total animal-derived energy was calculated as (6) which is the weighted average fraction of animal-derived energy in four categories: premium dog food (n = 102), market-leading dog food (n = 9), premium cat food (n = 163), and market-leading cat food (n = 9). is the annual total energy consumed by dogs and is the annual total energy consumed by cats (Table 1) Px,y is the proportion of dog or cat owners and (x = Dog and Cat, respectively) who prefer premium or market-leading foods (y = P and N, respectively). Likewise, Mx,y is the number of foods considered here in each category. More premium foods were used in these calculations because there is more diversity in this market sector. For dry dog food, nine foods from just five manufacturers constitute 48% of the market [37]. For dry cat food, nine foods from just four manufacturers constitute 49% of the market share [38].

Dry foods were used for these calculations. For both dogs and cats, dry food sales dominate wet food sales (billions of US dollars in sales for various foods in 2012: 8.7 (dry dog food) vs 2.3 (wet dog food) [39], and 3.6 (dry cat food) vs. 2.4 (wet cat food) [40], and thus are more representative of the foods fed to cats, and especially, dogs. The dominance of dry food as the preferred form is especially true when the price per serving is taken into account. One market-leading wet cat food costs approximately $0.83 per serving while a dry food by the same manufacturer costs approximately $0.23 per serving. Using the this per-serving price ratio, dry cat food outsells wet cat food on a per-serving basis by a factor of about 3 to 1. Furthermore, dry food typically has lower animal content (as determined by the list of ingredients in descending order of mass contribution) than wet food. Thus, use of dry food for these calculations provides a conservative estimate of the greatest proportion of dog and cat food sales in the U.S.

USDA labeling rules require that pet food ingredients be labeled in descending order of weight contribution, as they do with foods intended for humans. Calculations were made on the assumptions that 1) each of the first five ingredients contributes, by mass, equally to the mass of the pet food and 2) collectively, these first five ingredients make up nearly all of the mass of the pet food (that is, there are no other ingredients that contribute substantially to the mass of the food). With regard to the former, for marketing purposes, animal-derived ingredients typically appear in in the top couple of places in the ingredient list. This is particularly true of premium foods, where 100% of both dog and cat foods examined here had animal-derived products as the first ingredient (Table 4). For all types of dry food examined here (market-leading v. premium dog and cat foods), animal-derived ingredients appear among the first two ingredients more commonly than among the third and fourth ingredients (Table 4). Thus, the calculations made here over-weight the later ingredients, which are less likely to be animal-derived, compared to the earlier ingredients, which are more likely to be animal derived. Although there is no way to know, in proprietary recipes, the exact proportions of ingredient, by weighting the first five ingredients equally, a minimum overall estimate of animal-derived energy in dog and cat food is produced.

With regard to the second assumption, that the first five ingredients make up nearly all of the mass of the pet food, ingredients appearing past the first five in the ingredient list are often nutrients (e.g., tocopherol) added in trace quantities. If ingredients past the fifth are not trace, then given the requirement that ingredients be listed in decreasing mass contribution, the sixth ingredient must contribute less than 16% of the mass of the food. In the case of seven substantive ingredients, the maximum fraction of the mass in the 6th and 7th places is 29%. Among the premium brands that were examined, the proportion of animal-derived product decreased as they occurred later in ingredient lists with only 21% of the sixth ingredients in dry dog food being animal-derived. Thus, even in the extreme case, a maximum of 3–6% (21% of 16% = 3.5%; 21% of 29% = 6%) of the animal-derived content may be missing in the foods examined here. Although the methodology use here cannot give exact amounts of animal-derived content from foods, the potential maximum exclusion of 3–6% of animal-derived products is sufficient to draw important conclusions about the amount of animal-derived energy consumed by dogs and cats.

The APPA’s annual pet-owners survey [8] provides data that can be used understand consumer preferences, thus providing information about ratio of premium vs. non-premium (market leading) foods consumed. Non-premium brands tend to have lower animal-derived content whereas premium brands tend to have higher animal-derived content. The premium brand category used here includes the 'premium' and 'gourmet' survey categories. For dogs of all sizes, the average percent of owners who usually feed these meat-rich dog foods is 38%. For cats, this number is 30% (Table 5).

The final market-wide estimates of the fraction of energy in dog and cat foods that is animal-derived are 34% ± 4% and 31% ± 4%, respectively (Table 5). In total, Eq 6 yields an estimate that animal-derived energy constitutes 33% ± 6% of the diets of dogs and cats in the US. This is significantly higher than the fraction of humans’ dietary energy that is animal-derived (19%). Because dogs and cats consume, together, 203 ± 15 PJ/year, it is estimated that dogs and cats consume a minimum of 67 ± 17 PJ/year in animal-derived energy, which is 33% ± 9% of the animal-derived energy consumed by humans in the US or 25% ± 6% of the total.

An important caveat for the calculations of the relative consumption of pets and humans is that the sources of the data, and mode of calculation, are dramatically different. As a result, their ratios may be systematically biased. Nonetheless, the calculations of absolute amounts (e.g., PJ/yr) are informative, and the relative amounts still provide important insight into the magnitude of pets’ consumption.

Relative environmental impact

I followed Reijnders and Soret [6] in determining the environmental impact of dogs’ and cats’ land animal meat consumption. Reijnders and Soret [6] used life cycle analysis to determine the relative impact of producing meat protein compared to producing plant (soy) protein in several categories. In separate calculations for pets and humans, the impact of animal production compared to plant production was calculated as:(8) where Ij is the impact of animal production in category j (land use, water use, fossil fuels, phosphates, biocides) and Wj is the relative impact of meat protein production (Table 6). The non-animal product energy consumed (i.e., ) was given an implicit value of unity. The resulting values can be used to determine the relative impacts of pets’ and people’s diets in a way that accounts for varying energetic needs of pets and people.

With regard to land use, water, and fossil fuel, the environmental impact of animal production (compared to a plant-protein substitute) used to feed dogs and cats is 25–30% of that used to feed humans (Table 6). For phosphate and biocide use, this proportion is 26–27% ± 5%. An important caveat in these calculations is that the animal-derived energy used includes fish. The approach of Reijnders and Soret [6] is strictly for land animals, which have clear land use, water, fossil fuel, phosphate, and biocide impacts. There is no clear way to determine the amount of fish-derived energy as a proportion of total animal-derived energy in animal feed. However, if the number is similar to that in food consumed by people in the US (~1%, [28]), then the proportional calculations are approximately correct. An additional caveat in the interpretation of these calculations is that they do not differentiate between different sources of animal protein, which can have distinctly different environmental footprints. We used the range/uncertainty provided by Reijnders and Soret and Pimentel and Pimentel [6, 7] to provide reasonable bounds on these results. Without market-wide knowledge of recipe and sales data, much of which is proprietary, a more detailed calculation is not possible. However, this does not mean that these calculations are not valuable to provide an estimate of the scale of the contribution of dogs and cats to these environmental impacts.

BuckleScript: An OCaml to JavaScript compiler

$
0
0

RECENTLY I've been paying attention to the BuckleScript compiler from OCaml to JavaScript (ES5, to be exact). I'm seeing some significant advances that it brings to the state of the art, and thought I would share.

A little background: I use Scala.js at work, and it is rock-solid. Once you're set up with a project, you are pretty much good to go. Bindings to significant JS libraries are high-quality; I use some of the biggest names in JS frontend dev libraries today, and all in a nice Scala-style object-functional layer.

That aside, I still periodically look around the ecosystem and try to evaluate the latest developments. I've been hearing about BuckleScript for a while, but only recently decided to try it out for a side project after trying and failing to understand how this works in JavaScript.

So, without further ceremony, let me present my findings.

BuckleScript's compiler is insanely fast, because Bob Zhang (the project lead) has taken to heart the OCaml obsession with performance and routinely tries to optimise away millisecond-level delays. Once you get a taste of that speed (entire project compiled faster than you can blink), you'll find it difficult to go back to something slower. It's like getting to use git after you've used svn all your life.

It compiles to idiomatic, readable ES5, with nice indentation, (almost) no name mangling, and a one-to-one mapping from OCaml modules to ES modules (whichever kind you prefer: Require, AMD, Google).

It targets and integrates with the existing npm ecosystem; it doesn't try to introduce yet another package manager. It makes writing bindings (types) for existing JS libraries reasonably easy, and the documentation (the manual especially) is fantastic at guiding you through that.

OCaml is a bit of an odd duck syntax-wise, even among the functional programming languages. There are nuances to get used to. But once you get used to them, it is a pleasure to program in. And if you just can't get used to them, you can always try out Facebook's Reason, which is an alternative, JavaScript-lookalike syntax for OCaml.

This focus on integration and ease of reuse of the JavaScript ecosystem means it's feasible to leverage the npm package collection in your pure OCaml project. You can deploy a backend server which performs core functions as a statically compiled, native binary (i.e. not nodejs); deploy ES5 nodejs services which take advantage of specialised npm packages for MSSQL querying, or SOAP clients, or what have you; and you can deploy ES5 in your frontend webapp scripts, all written in pure OCaml.

So, why OCaml specifically? After all, there are plenty of nice languages out there.

As it turns out, that OCaml obsession with speed and type-safety together serve it well here. It's a pragmatic, simple, and matter-of-fact language, and its runtime model maps very well to the JavaScript runtime model, while also preserving important compile-time safety guarantees.

I should emphasise that it's pragmatic: you're not forced to deal with the added mental load of monads and other type system rabbit holes--but they're all available if you need them! Personally, I feel that laziness, purity, and monads have driven away more people than they've attracted. I think that OCaml gets the balance right. Others obviously feel differently. But in concrete terms, BuckleScript is a significant contribution that shouldn't be missed.

If you've developed in a compiled language for any length of time and like type-safety guarantees, after trying BuckleScript you'll be asking yourself how much time you've wasted over the years waiting for your compiler to finish so you can continue your edit-compile cycle. Maybe it's best not to think too much about that.

A Whisper in an Age of Shouting

$
0
0

Many of Stover’s friends and colleagues — people like Jane Addams, Samuel Gompers and Jacob Riis — remain well known today, even as . Stover isn’t. That’s a shame, because his work touched the lives of countless individuals, rich and poor. An 18-year-old Eleanor Roosevelt, for example, volunteered as a dance instructor at the University Settlement House, and it was there that she opened her boyfriend Franklin’s eyes to the conditions of the poor. “Franklin looked around in surprise and horror,” she recalled years later in her memoir. “ ‘My God,’ he whispered, ‘I didn’t know people lived like that!’ ” That, too, is Stover’s legacy.

So why has Stover been forgotten? Although a prominent and influential figure, he did not seek fame or fortune. In a letter to a friend in 1927, he wrote, “My real preference is to be writ in water — just such complete obliteration as the poet Keats feared would be his fate.” He never married and kept no house of his own, preferring instead to live at University Settlement. He was a very private person, prone to bouts of depression, and was known to vanish occasionally with no explanation.

After he disappeared in 1913, a nationwide search paradoxically made him a celebrity; his image was shown in 10,000 movie theaters. When he came back after three months, he said only that he’d been visiting parks in the South, and then threw himself into work at University Settlement.

When Stover died in 1929, he left only a few books and papers, but his legacy went far beyond his possessions. He spent his time and money providing playgrounds, gardens, housing and other services for poor immigrant children and their families, all the while battling his depression.

One man who admired Stover and tried to keep his name alive was, in many ways, his polar opposite. Robert Moses was a brilliant, sharp-elbowed political operator who covered New York in grand public works that sometimes bore his name and made him incredibly famous in the process. But Moses had also been a reformer, and he had great respect for Stover. So in 1936, when Moses was parks commissioner, he dedicated the 20-foot curved granite bench that is situated on a rocky outcrop in Central Park’s Shakespeare Garden, a garden that Mr. Stover himself commissioned, to his friend.

It is the only monument to bear Stover’s name.

The bench is elegant but modest, just like Stover himself. But what makes it even more appropriate is a quirk of its design that allows a person to whisper into one rounded corner of the bench and be heard with perfect clarity by someone at the other end. I learned about this feature from an 8-year-old boy — just the sort of person Stover cared about — who was visiting the bench with his grandmother.

Stover believed — and his life proves — that it is possible to make a difference in the world without yelling. It is easy to get caught up in the shouting of politicians, or to want simply to walk away from it all. That is why it is more important than ever to listen to the stories of those around us.

I plan to go on looking for Stover, but his bench has already taught me an important lesson: Sometimes the most powerful words are the ones that are whispered.

Continue reading the main story

Lego EV3 and Android and OpenCV

$
0
0

Determining the direction to follow is based on the central point of a blue ball as recognized my the camera of the phone. For processing the image I used OpenCV.

OpenCV configuration

Installing OpenCV is a complex process in general. In case of Android development with OpenCV in Android Studio we need to follow a different path but it is still not simple. The main steps are the following:

  • Downloading OpenCV for Android
  • Importing OpenCV as a module to an existing application.
  • Adding OpenCV as a dependency.
  • A special step: Eliminating Camera2Renderer code and references because it uses Camera2 API introduced in Android 5.0 what is not supported by my phone.

Then it is up to the developer to decide whether to link all OpenCV code to the application or to use OpenCV Manager application to the dynamic OpenCV loading during the execution. In the former case it is necessary to copy the content of native OpenCV directory (/sdk/native/libs) to the project's OpenCVLibrary under src/main and then to rename the copy from libs to jniLibs. In the latter case OpenCV Manager downloads/refreshes every necessary OpenCV component on the fly. Furthermore if there are more than one installed OpenCV application then these components are stored in one copy only.

The application is much larger with statically linked OpenCV (~40 MB plus) and the build folder grows enormously, be prepared for gigabytes! On the other hand the application does not depend on other programs to be installed on the device.

Using OpenCV Manager is better in this case as the result is smaller and the build process is much quicker. However at this moment OpenCV Manager at Google Play is obsolete and contains OpenCV 3.0. As I use OpenCV 3.2.0 I need the latest OpenCV Manager that can be found in the OpenCV for Android package above. A drawback is that you have to choose the appropriate apk file that suits your device.

OpenCV usage

Either use OpenCV Manager or not both cases can be handled programmatically with the following code. The onResume method loads OpenCV either from the application or via OpenCVLoader. The LoaderCallbackInterface.SUCCESS branch of the onManagerConnected is where we can start using OpenCV functions.

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) { @Override public void onManagerConnected(int status) { switch(status) { case LoaderCallbackInterface.SUCCESS: Log.i(TAG,"OpenCV Manager Connected"); break; default: Log.i(TAG,"OpenCV Manager Install"); super.onManagerConnected(status); break; } } }; @Override protected void onResume() { super.onResume(); //initialize OpenCV manager if (!OpenCVLoader.initDebug()) { Log.d(TAG, "Internal OpenCV library not found. Using OpenCV Manager for initialization"); OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_2_0, this, mLoaderCallback); } else { Log.d(TAG, "OpenCV library found inside package. Using it!"); mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS); } }

After initializing OpenCV we can use it. For this task I wanted to find the center of mass of the pixels belonging to a blue ball on the image of the camera. I have based my code on the color blob detector sample included in the OpenCV for Android installation. The main part of the detection can be seen below. The rgbaImage is first downsampled with image pyramid and then converted to HSV color space. After that inRange detects the appropriate colored pixels based on the bound constants. Then findContours create a list of detected contour and contourArea finds the largest one. Finally getCenterOfMaxContour returns the center of mass of the maximal contour using moments.

Turning direction is then determined from the x coordinates of the center related to the central point of the image.

public void process(Mat rgbaImage) { Imgproc.pyrDown(rgbaImage, mPyrDownMat); Imgproc.pyrDown(mPyrDownMat, mPyrDownMat); Imgproc.cvtColor(mPyrDownMat, mHsvMat, Imgproc.COLOR_RGB2HSV_FULL); Core.inRange(mHsvMat, mLowerBound, mUpperBound, mMask); Imgproc.dilate(mMask, mDilatedMask, new Mat()); List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); Imgproc.findContours(mDilatedMask, contours, mHierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE); // Find max contour area maxContour = null; double maxArea = 0; Iterator<MatOfPoint> each = contours.iterator(); int i = 0; while (each.hasNext()) { MatOfPoint wrapper = each.next(); double area = Imgproc.contourArea(wrapper); if (area > maxArea) { maxArea = area; maxContour = wrapper; } } // Filter contours by area and resize to fit the original image size mContours.clear(); each = contours.iterator(); while (each.hasNext()) { MatOfPoint contour = each.next(); if (Imgproc.contourArea(contour) > mMinContourArea*maxArea) { Core.multiply(contour, new Scalar(4,4), contour); mContours.add(contour); } } } public Point getCenterOfMaxContour() { Point center = null; if( maxContour != null ) { Moments moments = Imgproc.moments(maxContour); center = new Point(moments.get_m10() / moments.get_m00(), moments.get_m01() / moments.get_m00()); } return center; }


Literably (IK12 W13) is hiring engineer #1 to help children learn to read

$
0
0
Literably (IK12 W13) is hiring engineer #1 to help children learn to read
1 hour ago | hide
Literably (https://literably.com) is an education technology company that provides early literacy assessment services to elementary schools. We're automating a time-consuming set of manual assessment procedures that have changed little since the 1970s, despite touching the majority of children in the U.S. Our early customers include some of America's largest school districts, and we're backed by top education investors, including Alan Louie, Mike Greenfield, WebAssign founder Brian Marks, and Higher One founder Miles Lasater.

We're looking for engineer #1. This position is located in San Francisco. We mostly work in Python/Django (though previous Python experience is unnecessary). You'll have huge levels of product ownership, highly competitive compensation, and the opportunity to positively affect outcomes for children.

If this appeals to you, we'd love to be in touch. Shoot us an email at jobs@literably.com.


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Uncovering Somalia's forgotten music of the 1970s

$
0
0

Hargeisa - In 1331, famed Moroccan explorer Ibn Battuta arrived in Mogadishu, on the Banaadiri coast, in what is today Somalia.

Battuta came across the richest, most powerful port in East Africa, at the fore of the Indian Ocean trade system, then the centrepiece of the global economy.

Anchored off the coast, he was greeted by "boatloads of young men … each carrying a covered platter of food to present to one of the merchants on board," writes Ross Dunn in The Adventures of Ibn Battuta: A Muslim Traveler of the Fourteenth Century.

Such renowned hospitality welcomed seafarers and merchants from across the Arabian peninsula, Persia, India, Southeast Asia, and even China.

Mogadishu derives from "Maq'ad-i-Shah", Farsi - one of the lingua francas of Indian Ocean merchants and traders - for "Seat of the King". Its local name, Xamar, was given by Arab traders, after the Arabic word "ahmar" for the red soil along Somalia's coastline.

The East African coast's role as multicultural crossroad imbued Somali culture with the traditions of its biggest trading partners, leaving an indelible mark on language, cuisine, dress, worldview, and, revealingly - its music. Indian scales, Yemeni chord progressions, Sumatran melodies, and the rhythms of Bantu peoples just to the south created a sound that reveals not only the intermingling of Somalia's past but of the world's.

That rich legacy could be heard in a newly recovered archive of more than 10,000 cassettes and master recordings we came across last year in Hargeisa, Somaliland. Radio operators hid this music, recorded in the 1970s, until 1987, to protect it during the bombardment ordered by Somalia's then military dictator.

Maize, sorghum flour, and other grains have been sold here since the colonial era [Janto Djassi/Picture Me Different] 

Saved recordings

Since Battuta's arrival, the subsequent sultanates, democratic republics, and collapsed states occupying continental Africa's longest coastline have suffered often at the hands of others - Portuguese warships, colonial dealmakers, great power games during the Cold War, Ethiopian and Kenyan armies, and the US' drones. As a result, Somali culture has registered little in the global imagination.

The two-decade civil war that began in 1991, preceded by heavy aerial bombardment of the north three years before, eviscerated Somalia's cultural revival of the 1970s. A prolific music scene, both live and recorded, and theatre were the forgotten casualties of the collapse.

WATCH: PEOPLE AND POWER - Rebuilding Somalia (24:59)

Yet, in recent years, as the region's situation has incrementally improved, there has been a concerted effort involving the national radio stations and cultural ministries in Hargeisa and Mogadishu, and the returning Somali diaspora to preserve and catalogue recordings, often uploaded on to YouTube or the Somali language corner of the internet.

Most recently, physical recordings that were buried by those who believed in the value of recorded music as cultural artifacts are being recovered and amassed.

Hargeisa, the capital of what is today the breakaway Republic of Somaliland (it declared independence in 1991), is now home to two precious archives. One of the world's largest collections of Somali music is at the Red Sea Foundation at the Hargeisa Cultural Center, and the other lies in Radio Hargeisa. 

The recordings reveal chapters of a vibrant Mogadishu of the 1970s, of music guided by political and economic forces, of women's empowerment, of a thriving Somalia.

Inside Hargeisa's only live music venue

Security is tight at one of Hargeisa's few nightlife venues. Religious hardliners have threatened attacks on the burgeoning capital's only live music establishment, operated by legendary local singer Sahra Halgan. The statuesque Halgan left Hargeisa in 1992 and returned after 23 years living in France.

Made to resemble a traditional nomadic Somali dwelling, Hiddo Dhawr is lined with animal hide. Different textiles add to the decorative gumbo. Shades of beige and red - the hues of the sand and earth of this arid region - scatter across the walls. A man strums an oud, filling the large space with melodies influenced by neighbouring Yemen.

With a relatively expensive $15 entrance fee, the city's elite - businessmen to television personalities - sit at round tables, dining on camel meat, and spaghetti, a more benign legacy of Italian colonial rule.

Tonight we're having dinner with a former import-export tycoon originally from Mogadishu, simply known by many as "Chief". 

A rotund man with a glint of relentless confidence in his eye, Chief fled to the United States during the war. He returned as part of a growing diasporan trend, given Somaliland's relative stability and growth, prefaced on a mass disarmament campaign in the early 1990s.

"First time in the Horn?" he asks.

A few slurps of spaghetti and he's ready to regale with stories of the former splendour of Mogadishu, long referred to as the "Pearl of the Indian Ocean".

"I used to import rice from Thailand, timber from Indonesia, electronics from Japan," Chief reminisces. "We would pair fine Italian wine with those sweet little lobsters [langoustines] on Lido beach."

Indeed, Somali territorial waters are home to some of the world's most prized catch, which also attracts foreign fishing - much of it illegal. Mogadishu's main fish market reveals an abundance of seafood, especially varieties of tuna coveted by European and Asian markets.

Returning to Mogadishu in the early 1970s as a university graduate from New Delhi, India, Chief expanded his father's business.

Chief's tales evoke images of what now exists in fading memories and collectible photography: A crisp, marbled city, where minarets, Italian colonial architecture and Arabic patterns seduced outsiders. Palm tree-lined wide roads bustled with Fiats, Indian rickshaws and cosmopolitan life. Stunning crescent beaches lined by the bright-teal Indian Ocean waters attracted a luxury tourist market of largely Italians and wealthy Europeans, drawn to the iconic ocean view of Al-Uruba and Juuba hotels; their bullet-ridden derelict ruins now haunting the city's coastline.

READ MORE: Somalis yearn for a musical renaissance

1970s Mogadishu: A thriving music scene

"If the decade of the 1960s is referred to as the swinging Sixties in London and Britain, due to the youth-led cultural revolution," says Maxamed Daahir Afrax, a Somali playwright and scholar, "an interesting parallel may be found in the Mogadishu of the Seventies."

After independence in 1960, the government that inherited power from Italian colonial rule was largely seen as illegitimate. In 1969, the commander of the army, General Mohammed Siad Barre, led a bloodless military coup.

"When we heard the news of regime change," says Afrax, "we took to the streets … chanting with slogans in support of the new regime."

Initially allied with the Soviet Union under Barre, Somalia, given its strategic port cities, was a key pawn in the games of Cold War rivalry in Africa.

An authoritarian government steeped in socialist ideology took hold over time, bringing universal education, healthcare and guaranteed employment, but also violent repression and unbridled nationalism.

Mogadishu was made the centre of political, cultural and economic power, forcing other major cities, such as Hargeisa, into its orbit. Migration from other cities, towns and rural areas to Mogadishu soared. Hargeisa, known at the time as the "hoyga sugaanta", the home of Somali music, lost its crown.

The arts, under the early years of a revivalist dictatorship, flourished. Theatre, the key dissemination medium for dance music, restoring a long tradition of playwriting in an oral culture, began to prosper. 

Listen to music from this era:

Literacy expanded from an estimated 5 to 24 percent. High schools functioned as de facto arts institutions, giving rise to revered bands such as Dur Dur, formed shortly after graduating in 1981.

"The idea was to globalise our culture," says Dur Dur's founder, Abdinur Daljir. The band was a rarity: "Other bands worked for the government, we were privately owned," Daljir says.

Unlike many of Somalia's neighbours where storied record labels - Munsophone in Sudan, Amha in Ethiopia, or Moto Moto in Kenya - thrived privately, Barre's regime effectively nationalised the music scene, with ministries and national radio controlling bands and production.

A great deal of Somali music was rarely distributed, confined to broadcast on state-run radios and the live performances in dance halls, theatres, and ballrooms of Mogadishu's hotels.

"All Somali music is very difficult to find, because it is not fully commercialised," Ahmed Ismail Samatar, a scholar at Macalester College in St Paul, Minnesota, home to the largest Somali diaspora in the United States, told Afropop Worldwide in 2014.

Even so, the strange bedfellows of a booming economy, a repressive government, and state control of the arts produced what many artists say was the most creative musical period in modern Somali history.

Reasserting Somali identity and women's empowerment

Barre's prioritising of a revival of Somali language and culture was consistent with the ideology of Africa's post-colonial leadership. The authenticite movements in Sekou Toure's Guinea or Francois Tombalbaye's Chad of the same era, used state power to galvanise the arts as an official means of purging foreign influence and achieving decolonisation.

Somali replaced Italian as the official language for teaching and administration.

"One enjoys when they can hear their own language and dance with it," says Mahmud Abdalla Hussein, nicknamed "Jerry", the former keyboard player for Iftiin, which became one of the most popular bands. He was speaking at a hotel lobby in Dubai, home to a sizable Somali community which produced music in the 1990s.

Centralising culture in Mogadishu created a focal point for Somali artists all across the Horn of Africa to innovate and collaborate. While Barre sought to control and censor what the government perceived as subversive music, often songs with non-Somali lyrics, poets and songwriters focused on themes of self-sufficiency and rebuilding the country. As such, some songs can perhaps be classified as propaganda music.

READ MORE: Between East and West - The Cold War's legacy in Africa

Barre's government implemented policies to promote gender equality, and opened a space for female talent. In the late 1950s, men were employed in theatre to play women. In the 1970s, female voices were soon likened to "broken dates" for their sweetness. In comparison to neighbouring countries with their own robust music industries, Somalia's was set apart for its prevalence of female singers.

Faadumo Qaasim, Khadra Dahir and Hibo Nuura, among many others, were often more prolific than their male counterparts.

"Women artists helped me a lot, women artists supported each other," says Khadra Dahir, a singer from Hargeisa who performed with the prestigious Waaberi theatre troupe in both her hometown and Mogadishu.

"We never heard top women artists in Ethiopia. Sudan did not have many women artists, but both the north and south of Somalia had many."

Dahir says: "Women became the pride and joy of the public ... Our role was praised."

The result of a more inclusive and supportive environment was a vast library of bands and singers which understood and drew from Somalia's unique position in history and its rich influences. Some bands were operated by the police, the army - even the national penitentiary.

Hussein's band Iftiin was operated by the Ministry of Education.

"We started playing old Qaraami [love] songs in an Afrobeat style and it became very successful. Iftiin were all students from the Ministry of Education - some read and wrote music, and some North Koreans trained them."

Qaraami music derives largely from the north of Somalia, inspired by the cultures of the Red Sea, while Mogadishu's Banaadiri music is based on Indian pentatonic scales, partly a legacy of Africa's love of Indian cinema.

"Weekly, Iftiin played four to five places all over Somalia in clubs and theatres," Hussein says. "Whoever was the best band got the gigs and we were very good back then, so we got most of the gigs."

Iftiin would fill up dance floors at the Jazira, Jubba or Al-Uruba hotels on Thursday nights.

After its heyday in the 1970s, music production continued until the late 1980s. Then "there was not enough income," Hussein says. "That's why I left for Dubai in 1986. We succeeded - but we left."

The music stops

The late 1980s saw a sharp downturn in Somalia's economic fortunes - a familiar story heard throughout Africa - forcing most musicians to migrate as opportunities and government salaries dried up. The economic crisis and a government increasingly paranoid about its grip on power repressed production, gradually laying waste to a creative environment. More musicians left by the time the civil war began in 1991.  

"There was a time when we were almost self-sufficient," Chief says. "We don't need aid. This country has got the biggest breadbasket. Sugar was ours. Bread was ours. No imports. You know when they started the sugar factory, we used to be one of the biggest importers of sugar. The sugar import duty was 211 percent - to protect local industry."

Before the IMF's prescriptions - austerity measures and the slashing of tariffs and subsidies, particularly on agriculture - arrived in much of sub-Saharan Africa in response to the 1980s debt crisis, the rate to the dollar, the former businessman recalled, was six Somali shillings. "When the IMF came, the valuation - from six it went … all the way to the thousands," he says.

Barre's 1977 military escapades in the Ogaden region of Ethiopia had cost him Soviet support, and a festering distaste for the junta's concentration of power in Mogadishu had began to fracture the country. 

By 1988, rebels in northern Somalia agitated for secession through fierce fighting. Barre responded with punishing air strikes on Hargeisa, in an all-out bombing campaign some refer to as "Africa's Dresden". 

READ MORE: Investigating genocide in Somaliland

Warplanes targeted Radio Hargeisa to prevent its use as a communications centre for the secessionist movement. Some radio operators carved a plan to save their collections and dispatched them to neighbouring countries such as Djibouti.

"We buried the tapes under the ground so the bombs won't hit," says an elderly journalist who was with the radio in the 1980s, at a meeting at the revived radio station. Several buried caches of music are still unaccounted for because their exact location has been forgotten.

The bombings and mass executions led to tens of thousands of deaths and propelled the country towards an all-out civil war, setting in motion the fall of Barre's regime three years later. The country factionalised. Resistance movements, some foreign-backed, emerged. A fragile central government diverted its resources from the arts to fighting, effectively ending a once vibrant music scene. 

Reviving a music culture

Shukri Ahmed is the vice minister of culture of Somaliland. Shukri, as she prefers to be called, tells me she was the first female journalist in Somalia. She now leads the effort to restore, organise and catalogue Radio Hargeisa's archive to a semblance of its former self, and begin the process of digitisation. She says that any kind of international aid rarely gets diverted towards cultural affairs or the national radio. Parched, delicate master tapes and reels lie on several floors and corners of the building.

These days, Shukri and her team are hard at work garnering international investment interest to digitise Radio Hargeisa's archives. Somaliland's lack of official international recognition is proving too strong an obstacle.

Hargeisa today, however, reveals a growing nation. There are an abundance of schools and universities. High-school graduates are gaining scholarships to Ivy League institutions. The strategic port of Berbera, where 30 percent of the world's oil supply transits, is a target of foreign, particularly Emirati , investment. There are Yemeni refugees, Gulf businessmen and a host of Western diplomats and UN officials.

Some of the musicians in exile believe they let Somalia down during the war by not using their talents and influence to keep Somali culture alive.

"We failed," says singer Hibo Nuura, "because we were not able to continue to produce art to bring [the diaspora] together or remind them of their motherland." Her 2002 song, translated as If the Artist Lets You Down, captures this frustration. Nuura, who won a Somali lifetime achievement award for her exploits as a young artist, lives in Minnesota.

Back at Hiddo Dhawr, as dinner finished and oud instrumentalists played their final numbers, a microphone was passed around for at least one person per table to sing a bit of their favourite song. Everyone contributed: Somali verses, poetry, hymns, and hummed melodies drew wide applause. One patron sang the opening verse of Buuraha U Dheer, translated as The Highest Mountains, a cherished Somali anthem from Djibouti, where the Somali language is widely spoken.

Amid Somalia's protracted civil war and ongoing security threats, in the confines of places such as Hiddo Dhawr, Somali music has a rare space for expression in which a hint of the 1970s can still be felt.

Additional reporting by Nicolas Sheikholeslami and Christina Woolner.

This is the story behind Ostinato Records latest compilation Sweet As Broken Dates: Lost Somali Tapes from the Horn of Africa, which highlights the vibrant music era of Somalia just before the civil war. 

Source: Al Jazeera

Collection of letters by Alan Turing found in filing cabinet

$
0
0

A lost collection of nearly 150 letters from the codebreaker Alan Turing has been uncovered in an old filing cabinet at the University of Manchester.

The correspondence, which has not seen the light of day for at least 30 years, contains very little about Turing’s tortured personal life. It does, however, give an intriguing insight into his views on America.

In response to an invitation to speak at a conference in the US in April 1953, Turing replied that he would rather not attend: “I would not like the journey, and I detest America.”

The letter, sent to Donald Mackay, a physicist at King’s College London, does not give any further explanation for Turing’s forthright views on America, nor do these views feature in any of the other 147 letters discovered earlier this year.

The correspondence, dating from early 1949 to Turing’s death in 1954, was found by chance when an academic cleared out an old filing cabinet in a storeroom at the University of Manchester. Turing was deputy director of the university’s computing laboratory from 1948, after his heroic wartime codebreaking at Bletchley Park.

Turing was a visionary mathematician and is regarded today as the father of modern computing who broke the Nazis’ second world war Enigma code. While his later life has been overshadowed by his conviction for gross indecency and his death aged 41 from cyanide poisoning, a posthumous pardon was granted by the Queen in 2013. His life was featured in the 2014 film the Imitation Game.

Prof Jim Miles, of the university’s school of computer science, said he was amazed to stumble upon the documents, contained in an ordinary-looking red paper file with “Alan Turing” scrawled on it.

“When I first found it I initially thought: ‘That can’t be what I think it is,’ but a quick inspection showed it was a file of old letters and correspondence by Alan Turing,” he said.

“I was astonished such a thing had remained hidden out of sight for so long. No one who now works in the school or at the university knew they even existed. It really was an exciting find and it is mystery as to why they had been filed away.”

The collection focuses mainly on Turing’s academic research, including his work on groundbreaking areas in AI, computing and mathematics, and invitations to lecture at some of America’s best-known universities including the Massachusetts Institute of Technology.

It contains a single letter from GCHQ, for whom Turing worked during the war, asking the mathematician in 1952 if he could supply a photograph of himself for an official history of Bletchley Park that was being compiled by the American cryptographer William Friedman. In his reply to Eric Jones, GCHQ’s then director, Turing said he would send a picture for the “American rogues gallery”.

The collection also contains a handwritten draft BBC radio programme on artificial intelligence, titled “Can machines think?” from July 1951. The documents were sorted, catalogued and stored by the University of Manchester archivist James Peters and are now available to search online.

Peters said: “This is a truly unique find. Archive material relating to Turing is extremely scarce, so having some of his academic correspondence is a welcome and important addition to our collection.

“There is very little in the way of personal correspondence, and no letters from Turing family members. But this still gives us an extremely interesting account and insight into his working practices and academic life whilst he was at the University of Manchester.”

He added: “The letters mostly confirm what is already known about Turing’s work at Manchester, but they do add an extra dimension to our understanding of the man himself and his research.

“As there is so little actual archive on this period of his life, this is a very important find in that context. There really is nothing else like it.”

Doomsday planning for less crazy folk

$
0
0
Doomsday prepping for less crazy folk

1. Introduction [link]

The prepper culture begs to be taken with a grain of salt. In a sense, it has all the makings of a doomsday cult: a tribe of unkempt misfits who hoard gold bullion, study herbalism, and preach about the imminent collapse of our society.

Today, we see such worries as absurd. It's not that life-altering disasters are rare: every year, we hear about millions of people displaced by wildfires, earthquakes, hurricanes, or floods. Heck, not a decade goes by without at least one first-class democracy lapsing into armed conflict or fiscal disarray. But having grown up in a period of unprecedented prosperity and calm, we take our way of life for granted - and find it difficult to believe that an episode of bad weather or a currency crisis could destroy almost everything we worked for to date.

I suspect that we dismiss such hazards not only because they seem surreal, but also because worrying about them makes us feel helpless and lost. What's more, we follow the same instincts to tune out far more pedestrian and avoidable risks; for example, most of us don't plan ahead for losing a job, for dealing with a week-long water outage, or for surviving the night if our home goes up in smoke.

For many, the singular strategy for dealing with such dangers is to pray for the government to bail us out. But no matter if our elected officials prefer to school us with passages fromMilton Friedman or fromThomas Piketty, the hard truth is that no state can provide a robust safety net for all of life's likely contingencies; in most places, government-run social programs are severely deficient in funding, in efficiency, and in scope. Large-scale disasters pit us against even worse odds; from New Orleans in 2005 to Fukushima in 2011, there are countless stories of people left behind due to political dysfunction, poorly allocated resources, or lost paperwork.

And so, the purpose of this guide is to combat the mindset of learned helplessness by promoting simple, level-headed, personal preparedness techniques that are easy to implement, don't cost much, and will probably help you cope with whatever life throws your way.

In contrast to most other docs of its kind, this page is pure, unadulterated labor of love; there are no affiliate links, paid product placements, or ads anywhere in the guide.

2. Mapping out the unknown [link]

Effective preparedness can be simple, but it has to be rooted in an honest and systematic review of the risks you are likely to face. Plenty of excited newcomers begin by shopping for ballistic vests and night vision goggles; they would be better served by grabbing a fire extinguisher, some bottled water, and then putting the rest of their money in a rainy-day fund.

To maintain sanity while trying to enumerate risks, I found that it's best to focus on broad outcomes instead of trying to track down every single way for things to go south. Say, it should not matter if you are laid off because of a downsizing, because your new boss hates you, or because they finally catch you stealing paperclips. The outcome is the same: you are out of a job and urgently need a way to pay your bills.

Another insidious distraction is the desire to immediately figure out how to respond to all the scenarios we end up dreaming of. Let's save that for later; by prematurely focusing on the second half of the problem, we may end up glossing over some of the less tractable scenarios - or make haphazard assumptions that will cloud our judgment in other ways.

I also found that to come up with a rational threat model, we need to think of "risk" as a product of both the probability and the consequences of a given event. By that metric, stubbed toes and zombie outbreaks are equally uninteresting; one of them has nearly zero significance, the other, nearly zero odds.

What else? Ah, right: the final piece of advice I have is to keep things uncomplicated. There are popular doomsday predictions that deal with cutting-edge particle physics, god-like computer hackers, vast government conspiracies, or extraterrestrial messages hidden in pop songs. I suppose we can't really rule that stuff out, but historical data suggests that there's a lot more merit in worrying about falling off a ladder or getting hit by a car.

All right! With these caveats in mind, let's go over some canonical scenarios that are worth thinking about.

2.1. Problem space #1: Small-scale events [link]

It's always fun to speculate about solar flares and supervolcanoes; it's far more mind-numbing to seriously evaluate the consequences of backed up sewage or burst water mains. But in reality, such unglamorous, small-scale incidents are far more likely to disrupt and reshape our lives.

Broadly speaking, disastrous outcomes of such humdrum contingencies can be divided into several groups:

  • Insolvency. If a person over the age of 40 tells you that they have never lost a job, they are pretty lucky (or lying). Yet, the risk is seldom taken seriously; many middle-class, single-income families would be in deep trouble if it ever took them more than 2-3 months to find a new, equally well-paying gig.

  • Disrupted access to water, food, energy, or transportation. Substantial and prolonged outages happen everywhere; many of us will experience at least one at some point in our lives. A week without electricity may be just inconvenient and scary, especially in a high-rise or in a seedy neighborhood; but even a single hot day without potable water is universally bad news.

  • Loss of shelter. Every year, there are over 350,000 house fires in the United States. Such accidents usually aren't deadly - but if you are unlucky, they can leave you stranded in the middle of the night in your PJs, with no documents or credit cards at hand.

  • Unintentional injury. Largely preventable and predictable incidents - such as falls, vehicle collisions, and poisonings - account for some 40 million ER visits annually. And lest you say people are simply too quick to rush to the hospital, said incidents also result in about 100,000 US deaths every year.

  • Intentionally inflicted harm. Violent crime is essentially normal almost everywhere in the world. In the US in the 90s, your lifetime likelihood of victimization was estimated to be around 80%; the odds of suffering criminal injury hovered at 40%. Today, the numbers are likely much better - but life-threatening encounters remain a very real risk.

  • Debilitating illness or death. It's going to get you; maybe next week, maybe in 50 years. We can't really predict the day, but we can understand and meaningfully manage the impact it will have on those who depend on us - say, our stay-at-home partners or young kids.

All in all, the risks discussed in this section have three defining characteristics: they are relatively likely to happen; are strikingly easy to mitigate (we'll get into that soon); and tend to be so unglamorous that they seldom make the cut in any "serious" guide to emergency preparedness.

2.2. Problem space #2: Mass calamities [link]

If an errant backhoe took out the utilities for your block, you would probably head to the grocery store to pick up bottled water (and use their restrooms, too). But if a once-in-a-century storm damaged major roads and left half the city without running water, your options wouldn't be as clear-cut.

That's why we have to look at larger-scale emergencies through somewhat different lens, taking into account their likely magnitude, duration, and the nature of the forces at play. Some of the plausible scenarios to think about include:

  • Natural disasters. Common examples include floods, hurricanes, earthquakes, wildfires, and heatwaves. In some regions, such events are very rare; in others, they are almost guaranteed every decade or two.

  • Industrial accidents. Many people live in the proximity of heavy industries - say, refineries, freight railroads, or power plants. Depending on the type of industrial facilities nearby, you may want to evaluate the potential consequences of upwind and upstream explosions or chemical spills.

  • Social unrest. Riots are a distinct risk in many urban and suburban areas around the world. When angry mobs take it to the streets, widespread arson and violent crime are not unheard of, sometimes going on for days or weeks.

  • Economic crises. All highly developed countries go through cyclic recessions and periods of high unemployment; the US had about ten big ones in the past 100 years alone. Sometimes, such events are accompanied by bank runs and collapses of financial institutions; other times, they involve hyperinflation, product rationing, and currency controls.

  • Pandemic. It's been a while since the highly developed world experienced a devastating outbreak, but it may be premature to flat out dismiss the risk. In 1918, an unusual strain of flu managed to kill 75 million people. We aren't necessarily better prepared for a similar event today.

  • Terrorism or conventional war. We think we would see it coming - but history shows that such events tend to catch nations off guard. These phenomena are noteworthy not only because of their immediate death toll, which can be relatively low - but because of the far-reaching and long-term socioeconomic disruption they can cause.

Most of us will probably not get tangled up in a large-scale disaster of any sort, but it is only wise to hedge your bets. There are countless examples to demonstrate that such events happen often and can strike close to home - say:

  • The EU debt crisis, from 2009 onward. A series of events that led to staggering unemployment rates in Greece, deposit confiscations in Cyprus, and uncertain prospects for the entire eurozone.

  • Hurricane Sandy in 2012. Damaged more than 300,000 homes in the US, left millions without power - some of them for up to two weeks.

  • California wildfires of 2007. The blaze destroyed thousands of homes and forced 1 million SoCal residents to seek improvised shelter at stadiums and schools.

  • Hurricanes Katrina and Rita in 2005. Put 80% of New Orleans under water, stranded countless motorists when 3 million people attempted to evacuate.

  • A decade of social unrest in France, from 2005 on. A series of widespread urban riots led to more than 13,000 cars being torched and hundreds of structures damaged or destroyed.

  • The European heatwave of 2003. A seemingly benign weather anomaly killed 70,000 - mostly in highly developed and wealthy countries, such as France and Spain.

  • The Los Angeles riots of 1992. An epic rampage that resulted in about 2,000 injuries, 4,500 structures being looted, and some 1,000 buildings set ablaze.

Preparing for such emergencies may seem exceedingly difficult, but much can be accomplished with very simple tools. For example, if you own a car, always keeping the tank at least half full, and having a small box of rudimentary supplies in your trunk, can go a long way. Again, we'll go over many other low-cost preparedness strategies soon.

2.3. Problem space #3: The zombie apocalypse [link]

Many of the best-known works of science fiction explore the possibility that one day, perhaps soon, the very fabric of our society may simply unravel - and that those who survive The Event would be forced to fend for themselves in a ravaged and hostile world.

To connect with the reader, the writers of such post-apocalyptic fiction skillfully play up contemporary fears, often implying that we may be on the verge of an extinction event or a fundamental societal shift. The usual literary themes include:

  • Uniquely virulent and deadly diseases (28 Days Later, The Stand),

  • Preposterously violent weather anomalies (The Day After Tomorrow, Snowpiercer),

  • Unimpeded emergence of totalitarian techno-dystopias (Blade Runner, Gatacca, The Hunger Games),

  • Global thermonuclear war (Alas Babylon, The Day After, Fallout),

  • Robots deciding to kill all humans (Battlestar Galactica, Terminator),

  • Impertinent extraterrestrials (Edge of Tomorrow, Independence Day),

  • Hand-wavy ecosystem collapses (Children of Men, The Road, Interstellar),

  • Cosmic collisions (Lucifer's Hammer),

  • Something with magnets (The Core, One Second After).

It's no wonder that all this vivid imagery keeps many preppers preoccupied with civilization-ending events. Some of their worries are based on patently absurd or exaggerated science; some are valid, but rather unlikely to materialize within the span of our lives; and many others boil down to interesting but somewhat idle speculation, devoid of quantifiable risk or historical precedent.

At least in theory, the recipe for surviving civilizational collapse is simple: you need to get away from other people and become self-sufficient. It's fairly clear that deprived of their industrial backbone, most of our cities and suburbs wouldn't be able to support even a tiny fraction of their current population densities - and would become horrid death traps. Living off the grid shields you from all but the worst doomsday events.

My advice? Heck yeah, if farming is your cup of tea, buy a plot of land in the countryside. But if you'd rather live the rest of your days without having to skin deer or plow a field, focus on better quantified and substantiated risks - and don't let asteroids or space zombies keep you up at night.

3. The prepared lifestyle [link]

Of course, there is no use in worrying about the hypotheticals if we're not going to actually tackle the risks. But it pays to be smart about it, too: when it comes to emergency preparedness, the right mindset can matter a lot more than a small fortune spent on ninja gear and canned cheese. So, before going on a shopping spree, let's talk about several simple, everyday principles that can shield you from harm.

As you will undoubtedly notice, much of the content in this section has little to do with hardcore prepping; some of the chapters touch on seemingly banal topics, such as financial planning, community building, or the prevention of burglaries and car wrecks. You have heard most of this advice before - but if you are serious about dealing with adversities and shielding yourself and your family from harm, you need to internalize these rules, understand where they are coming from, and actually live by them every day.

(Of course, before we dive in, let's make one thing clear: this guide is an opinion piece, not revealed truth. While I did my best to make it thoughtful and accurate, it comes with no guarantees - and you should do your own homework before taking life advice from people on the Internet.)

3.1. Prepper commandment #1: Save some money [link]

There are those who are born into familial wealth or who display supernatural business acumen. Then there is the rest of us, perhaps having robust and satisfying careers, but ultimately tiptoeing the line between middle-class prosperity and crushing poverty. It may be a matter of our employer going out of business, it may be a shift in the job market, an illness, or a legal dispute - but in all likelihood, it would not take much to send us over the edge. I have friends who lived paycheck-to-paycheck on cozy Silicon Valley salaries of $100k+ a year, only to lose their cars and homes in the midst of the 2007 financial crisis - having found out the hard way that unemployment benefits in the San Francisco Bay Area max out at $450 a week.

I can't claim to have good advice for people who are already in a tough spot: if your household earnings are well below median, you may simply have no disposable income to build a personal safety net. But for most other folks, the ability to prepare for the zero-income contingency is well within reach - and it would be unwise not to give it a go. Sure, even a lifetime of belt-tightening won't make the average middle-class family fabulously rich. But rainy-day funds work in a different way: their purpose is to get you through a rough spell, not to pay for a mansion or a fancy car. Since the amount needed is directly proportional to how much you currently make, it makes relatively little difference if your household brings in $70k or $140k a year. Either way, if you set aside 10% of every post-tax paycheck, you should have a 6-month financial safety net established within 3 years and a change.

Of course, this is easier said than done. We tend to scale up our living expenses in proportion to earned income, so even in the $100k+ bracket, people living paycheck-to-paycheck are not a rare sight. And it's usually not the big-ticket stuff that gets them: we're far more likely to overspend on all the smaller, habitual purchases, because their cumulative cost is less apparent - and potential savings are much easier to miss. The patterns to look for will depend on your lifestyle and on how much you make, but here are several suggestions for where to search for that 10%:

  • Groceries. Try to shop at less expensive grocery stores and try out lower-shelf brands - especially when it comes to commodities such as cooking oil, paper towels, milk, seltzer water, flour, sugar, or salt. Table salt tastes and works the same, whether you paid $1 at Walmart or $15 for a Sherpa-approved Himalayan variety at Whole Foods. Groceries eat up a good chunk of our monthly budgets, so even seemingly inconsequential savings tend to add up very fast.

  • Restaurants & taxis. Many young, urban-dwelling folks frequently dine at restaurants, go to clubs, or take cabs around town. If that sounds like you, don't give it up, but scale back slightly by designating several days a week strictly for public transport and home food. Contemporary frozen dinners can be surprisingly tasty, and Netflix has some good shows.

  • Gadget upgrades. If your older phone, laptop, or a TV set are still working fine, keep them for another year or two. Sure, it's fun to play with a new toy, but the excitement wears off quickly, and being a bit behind probably won't make your life feel hollow and pointless. All things considered, you are not impressing your friends that much by showing them that you had $500 or $1,000 to throw away.

  • Subscription services. Small monthly fees add up to gargantuan sums over the years. Do you really need cable TV, or can you watch most of the same shows online for less? Are you still paying for a landline or for that AOL account? How often are you using that gym membership? Can you try out lower speed for your Internet service? Or slightly increase the deductible on your car?

  • Home improvement. Even if you are renting, you can save big bucks by learning how to reupholster or refinish furniture, patch drywall, paint walls and trim, install tile and cabinets, fix or replace faucets, unclog drains, and take care of other simple DIY jobs. Home improvement can be incredibly rewarding, too.

  • Vacation. If you're itching to go to a popular destination like Vegas, Hawaii, or Disneyland - how about a camping trip? For kids and adults alike, sleeping in a tent and playing around a campfire can be more enjoyable and less stressful than waiting in line to meet a middle-aged dude dressed as Donald Duck.

  • Extra cash. If you ever get a bonus or a raise at work, don't squander it by reflexively spending more on mundane, everyday stuff. Put back that fancy bottle of barrel-aged olive oil, that pair of ergonomic toe socks, or that wi-fi enabled toaster. Smile, set the proceeds away, and go about your life as if nothing ever changed.

Somewhat counterintuitively, saving money is not just about cutting down expenses; seeing a higher balance on a checking account tends to instinctively make us less frugal, too. To counter this trend, I found it helpful to set up a small, daily transfer to a savings account, in an amount that blends in with daily purchases - say, $10 or so. This method takes much less planning and mental discipline than trying to make one big deposit every month. And hey - when you are comfortable with $10, you can painlessly test the limits by gently ramping the amount up.

Now, a word of caution: beware of debt. Many of us are taught that owing money is normal, even desirable; indeed, for middle-class folks, some forms of indebtedness may be difficult to avoid. But unnecessarily accrued debt cuts into your bottom line in two insidious ways. First of all, monthly installment payments limit your flexibility in an emergency - so if your income shrinks, your savings will be depleted at a merciless and non-negotiable rate. Secondly, high-interest loans, such as credit cards, amount to giving out a good chunk of your income without earning anything useful in return. They are akin to voluntarily accepting a pay cut.

As a matter of practicality, don't worry too much about your existing mortgages or student loans: they are difficult to repay early, tend to have very low interest, and confer special tax benefits. But use your initial savings to pay off credit card balances, and do it quick. Be careful with new obligations, too. Unless you already have a very generous safety net, a home loan that eats up more than 15% of your paycheck over the course of 30 years is a very risky deal; and going over 30% is almost certainly dumb, at least as far as financial continuity planning goes.

As for the optimal size of your emergency fund, there are no hard rules. Around six months' worth of post-tax earnings should provide a very comfortable cushion for short- and medium-term disasters of all sorts. Even in a deeper crisis, six months is plenty of time to scale down expenses, find a new line of work, or regroup in some other way.

Now, chances are, if you follow the advice contained in this section, you will not feel an urge to ramp up spending the moment you hit the 6-month mark. So, keep going; with the initial rainy-day fund established and good fiscal habits in place, you can start treating the extra funds with more flexibility - for example, "borrowing" against them to self-finance larger purchases, or aiming to retire a bit earlier and a bit more comfortably than the government expects you to. And by the time your savings are sufficient to get you through a full year of unemployment, I bet that your outlook on life, work, and personal finance will change in aninteresting way.

Oh, one more thing: when trying to reform your fiscal habits, it can be useful to think of money as a unit of debt owed to you by the society, awarded in exchange for your hard work. Despite the popular saying, when allocated wisely, that money can buy you safety, comfort, influence, or true friendship and happiness. It would be foolish to squander it on trinkets - just as it would be foolish to take it with you to the grave. My advice is simple: make every transaction count.

3.2. Prepper commandment #2: Don't lose what you saved [link]

If all goes well, your rainy-day fund will eventually grow big enough for you to face a wonderful and important question: how do I keep all that capital safe? Although it may seem like a remote concern, events such as bank collapses, market crashes, and currency devaluations happen all over the world with near-clockwork regularity - and there are few things more infuriating and disenfranchising than finding out that the fruits of many years of your labor have been wiped out by a market panic or an administrative decree.

The answer to the question of safeguarding your wealth lies in the solution to another riddle: the mechanism by which the society determines the worth of a piece of money to begin with. It's a puzzle central not only to everyday financial planning, but also to any attempts to decipher and meaningfully evaluate countless mainstream conspiracy theories and doomsday predictions related to the financial world.

So, let's start from the beginning! Throughout much of the recorded history, the monetary systems of the western world employed so-called commodity money, generally settling on coins minted out of silver or gold. The two metals were favored because of their nearly universal appeal, and because of their inherently constrained, labor-intensive supply. In this system, early prices likely reflected the worth of a particular good compared to the valuation of the coin as a non-monetary commodity. Over time, the exact "melt value" of the coins started to matter less, and the currency functioned as a more abstract medium of exchange - but its precious metal content stabilized the economy by ensuring that the coinage had an inherent and lasting value, even if the issuing state simply vanished from the map.

By the 19th century, many European countries moved on to a more flexible model where coins were made out of cheaper metals, and banknotes were printed on paper or cloth. To encourage the use of these new instruments and to establish their value, the governments promised to freely exchange such intrinsically worthless tokens for a predefined amount of gold. In other words, as long as people had faith in their rulers, the fundamental mechanics of this new representative currency remained roughly the same as before.

In theory, both of these systems looked simple and robust. But there was another, somethwat subversive force at play: in the 17th century, many European states have witnessed the emergence of fractional-reserve banks. These private ventures operated according to a simple scheme: they accepted people's money for safekeeping, promising to pay a premium on every deposit made. To meet these obligations and to make a profit, the banks then used the pooled deposits to make high-interest loans to other folks. The financiers figured out that under normal circumstances and when operating at a sufficient scale, they needed only a very modest reserve - well under 10% of all deposited money - to be able to service the usual volume and size of withdrawals requested by their customers. The rest could be loaned out.

The very curious consequence of fractional-reserve banking was that it pulled new money out of thin air. The funds were simultaneously accounted for in the statements shown to the depositor, evidently available for withdrawal or transfer at any time; and given to third-party borrowers, who could spend them on just about anything. Heck, the borrowers could deposit the proceeds in another bank, creating even more money along the way! Whatever they did, the sum of all funds in the monetary system now appeared much higher than the value of all coins and banknotes issued by the government.

Of course, no new money was being created in any physical sense: all that banks were doing was engaging in a bit of creative accounting - the sort of which would probably land you in jail if you attempted it in any other comparably vital field of enterprise. If too many depositors were to ask for their money back, or if too many loans were to go bad, the banking system would fold. Fortunes would evaporate in a puff of accounting smoke, and with the disappearance of vast quantities of quasi-fictitious ("broad") money, the wealth of the entire nation would shrink.

In the early 20th century, the world kept witnessing just that; a series of bank runs and economic contractions forced the governments around the globe to act. At that stage, outlawing fractional-reserve banking was no longer politically or economically tenable; a simpler alternative was to let go of gold and move to fiat money - a currency implemented as an abstract social construct with no predefined connection to the physical realm. A new breed of economists saw the role of the government not in trying to peg the value of money to an inflexible commodity, but in manipulating its supply to smooth out economic hiccups or to stimulate growth. Depending on who you ask today, contemporary monetary policies - especially in the era of bank bailouts and debt-fueled GDP boosting - are either a brilliant way to stabilize free markets and promote wealth, or a reckless charade that papers over systemic problems and sets us up for serious trouble in the coming years.

That question aside, the obvious peril of fiat money is that in the long haul, its value is determined strictly by people's willingness to accept a piece of paper in exchange for their trouble; that willingness, in turn, is conditioned solely on their belief that the same piece of paper would buy them something nice a week, a month, or a year from now. It follows that a simple crisis of confidence could make a currency nearly worthless overnight. A prolonged period of hyperinflation in Germany and Austria, with prices doubling every couple of days, was one of the precipitating factors that led to World War II. In more recent times, dramatic episodes of hyperinflation plagued the fiat currencies of Israel (1984), Mexico (1988), Poland (1990), Yugoslavia (1994), Bulgaria (1996), Turkey (2002), Zimbabwe (2009), Venezuela (2016), and several other nations around the globe.

For the United States, the switch to fiat money came relatively late, in 1971. To stop the dollar from plunging like a rock, the Nixon administration employed a clever trick: they ordered the freeze of wages and prices for the 90 days that immediately followed the move. People went on about their lives and paid the usual for eggs or milk - and by the time the freeze ended, they were accustomed to the idea that the "new", free-floating dollar is worth about the same as the old, gold-backed one. A robust economy and favorable geopolitics did the rest, and so far, the American adventure with fiat currency has been rather uneventful - perhaps except for the fact that the price of gold itself skyrocketed from $35 per troy ounce in 1971 to $850 in 1980 (or, from $210 to $2,500 in today's dollars).

Well, one thing did change: now better positioned to freely tamper with the supply of money, the regulators in virtually all the highly developed countries adopted a policy of creating it at a rate that slightly outstripped true economic growth. They did this to induce a small, steady degree of inflation, embracing a belief that doing so would discourage people from hoarding cash and force them to reinvest it for the betterment of the society. Of course, critics like to point out that such a policy functions as a "backdoor" tax on savings, conveniently aligning with government's far less noble interests. Still, either way: in the US and most other developed nations, the purchasing power of any money kept under a mattress will drop at a rate of somewhere between 2 to 10% a year.

All right. Financial systems are messy. Fiat money and fractional-reserve banking, although wildly successful, can fail in interesting and horrific ways. Foreign trade, neglected here but absolutely vital for most European countries, adds even more variables to the mix. So, let's talk about what can be done to protect your rainy-day funds against some of the most likely or most talked-about risks.

3.2.1. Fiscal challenge #1: Dealing with "normal" inflation [link]

At a rate of 4%, inflation will halve the purchasing power of your savings in about 17 years; at 6%, the process will take just 11 years and a change. While it's hardly a prepper-grade emergency, you need to tackle the problem sooner than later - or face huge and unnecessary losses down the road.

For our parents, the solution was simple: they had to take their money to a bank. The returns were sufficient to offset the loss, and since the value of their money already depended on the health of the financial system, they weren't facing that much added risk. But today, the trick no longer works: people are skittish about the state of the economy and are trying to play it safe, so banks already have more deposits than they can use - and offer near-zero interest rates across much of the developed world.

There are many other ways to get returns on your capital, but most are associated with limited liquidity or significant outlay costs. One well-known exception are publicly traded companies. Businesses usually go public because they want to expand their operations - say, build a new factory or hire more workers. Instead of getting an expensive loan, they put themselves up for sale, allowing people to purchase and trade fractional ownership in the company. The investors' willingness to pay for this privilege depends on two factors: the intrinsic value of the enterprise (its assets, debts, operating profits) and the "hype premium" - the faith in the company's long-term prospects and the health of the entire industry. For some companies, the intrinsic value is modest, and the premium is huge; their shares are usually subject to violent price swings on even seemingly minor macroeconomic news. For other, less exciting businesses, the situation may be the opposite.

The conundrum of owning stock is that it serves as a hedge against inflation only in an otherwise viable economy. At the first sight of serious economic trouble, the premiums paid on corporate stocks take a nosedive and not recover for months or years; in a genuine downturn, the intrinsic value of many companies will also shrink. Since a downturn is probably the time when you will need your rainy-day money the most, it's important to play it safe. Putting somewhere around 30-40% of your emergency stash into the stock market may be a good call. Going all in is a very risky bet, since in an economic crisis, it's not rare to see stock indices plunge 50%.

The fundamental rule is to not be greedy: within the scope of this guide, your goal should be to preserve capital, not to take crazy risks. If you are tempted to put your money into Tesla, Twitter, or some penny stock mentioned by your third cousin, you are not thinking straight. Pick about 10-20 boring companies that seem to be valued fairly, that are free of crippling debt, and that have robust prospects for the coming years. Stay clear of financial enterprises, of highly speculative sectors such as biotech or solar power, and of heavily regulated industries that lack the flexibility to deal with sudden economic shifts (say, airlines). Relatively safe picks can be found in no-frills domains: basic chemicals, staple electronic components, profitable freight railways, mechanical assembly manufacturing, home and office supplies, and so on.

It is worth noting that many personal finance experts advise against hand-picking your investments. Instead, they advocate a process known as "indexing": buying into an investment vehicle comprising hundreds of stocks, structured to represent the stock market as a whole. The proponents of indexing have a point: most people who try to pick individual winners in the stock market usually fare no better than an index fund. But in the context of prepping, I think this is advice is flawed. To remain calm in tumultuous times, it is important to maintain a firm grasp of the merits of your investments. One can convincingly reason about the financial condition, the valuation, or the long-term prospects of a paper mill; the same can't be said of an S&P 500 index fund - which, among other things, contains the shares of about a hundred global financial conglomerates.

3.2.2. Fiscal challenge #2: Having no access to your bank account [link]

Sooner or later, you may find yourself unable to access your bank deposits for a couple of days or weeks. It could be a matter of IT trouble at your bank, of a lost wallet, or of being a victim of identity theft. Heck, take Greece or Cyprus: when the confidence in the nation's financial institutions is shattered, it's easy to get caught up in government-imposed bank closures and withdrawal controls. (Folks in the United States may also recall the forced closure of Washington Mutual in 2008, or several state-level "bank holidays" imposed to combat bank runs during the savings & loan crisis back in the 80s.)

For short-term survival, simple solutions work best: just keep about 2-4 weeks' worth of cash somewhere at hand; have enough money on you to get you back home when traveling, too. Of course, be mindful of the risk of burglary, so if you're keeping the funds at home, pick an unobvious location for the stash; more about that soon.

As for the remainder of your money, I suggest splitting it across two largely unrelated financial institutions with different risk profiles - say, a big national bank and a local credit union. As long as the deposits are insured by the government (as they normally are in the US and in Europe, up to a per-account limit), this approach greatly increases the availability of your money, and probably doesn't expose you to any substantially new dangers. Keeping all your savings outside the banking system is an option, too, but it's not necessarily a smart choice. With fiat currencies, this move does not truly insulate you from that many longer-term risks, but adds the very real possibility of losing all your funds to fire or theft.

Perhaps of note: over the past 5 years, many European governments have moved to severely restrict the use of cash by imposing per-transaction or daily limits as low as $1,000. The stated reasons have to do with money laundering and tax evasion, but such measures also make it harder to store or use physical currency. Be mindful of that caveat.

3.2.3. Fiscal challenge #3: Dodging hyperinflation and "bail-ins" [link]

Ask a financial advisor about the possibility, and they will probably recommend keeping some of your funds overseas. But the odds aren't great of correctly picking a currency with more staying power than the one in which you get paid. Historically, the Swiss franc had a reputation for being an exceptionally safe choice, in part because of being the last major currency still quasi-pegged to gold; but Switzerland abolished this requirement in a referendum in 2000.

Another complication is that even if you make the right call, many governments impose onerous reporting requirements on foreign assets - and especially in times of economic hardship, they treat them with suspicion and contempt. Host countries are also more cavalier about confiscating foreign deposits, as evidenced by the Cypriot "bail-ins" in 2013. Lastly, the public associates overseas accounts with tax evasion and money laundering, so it may be difficult to garner any sympathy for your case when things go wrong.

One school of thought popular in the prepper community is to convert some of your savings into commodity metals: copper, tin, silver, platinum, palladium, and the likes. All of them are easy to store, last indefinitely, and will certainly hold value far better than a fiat currency in free fall. On the flip side, you may still need to accept substantial loss: an economic collapse will disrupt industrial demand, causing the prices of many such commodities to slump.

This brings us to gold: this metal occupies an interesting niche, because its value is driven chiefly not by industrial applications, but by direct consumer demand and by its status as a mainstream financial instrument. In fact, investors and governments alike frequently flock to it in times of economic uncertainty and stagnation, as they did in the wake of the financial crisis of 2007. Of course, this goes both ways: should the economy pick up steam, the demand may decrease and the currently elevated prices of gold may fall closer to their historical, inflation-adjusted average of $800 per troy oz. Still, the metal is an interesting and reliable hedge against economic disasters, especially given that it is very easily bought and sold. If you are worried about hyperinflation, you may want to convert some of your savings into this shiny commodity, although I wouldn't go over 20-30% or so.

Because of its very high value-to-volume ratio, physical gold is stored and moved around very easily, but keeping substantial amounts at home can be ill-advised; theft is a very real risk, and most insurance policies will not adequately cover the loss. Safe deposit boxes at a local bank, available for around $20 a year, are usually a better alternative - although they come with some trade-offs; for example, the access to deposit boxes was restricted by the government during the Greek debt crisis in 2015. Non-bank storage services do not have that problem, but cost quite a bit more.

3.2.4. Fiscal challenge #4: Oh no! Zombie apocalypse! [link]

The global financial system simply disappears. Mutant hordes roam the earth!

The preservation of wealth after a civilization-ending event is a popular topic of idle banter in the prepper community. Some folks believe that commodities such as silver and gold would return as the basis of a primitive post-apocalyptic economy - and if we're wildly speculating, in the longer haul, that seems like a fair guess. But in the immediate aftermath, it seems more likely that economic activity would be minimal and limited to barter or communal ledgers. Nobody would want to exchange a candy bar for a gold coin if they can't be sure about being able to find any other food.

This may sound like a good argument for putting all your money into freeze-dried meals, medicine, shovels, and other survival supplies. But of course, that decision would become a huge liability should the apocalypse not come, or simply not come soon enough: you probably can't pay a roofer or a dentist with a pallet loaded with ammo, cigarettes, and canned ham.

Here's my advice: keep the bulk of your savings in cash, stocks, and other assets you can easily liquidate or put to use today; even if you genuinely worry about the apocalypse, plan to spend no more than 2-4% of your money on essential prepper supplies. Sure, when the zombies come, your financial instruments will almost certainly become worthless; but you better believe that the value of your survival gear will increase 100-fold. Zombies or not, your net worth will be safe. Your delicious, tasty brains - well, that's something to worry about!

3.3. Prepper commandment #3: Learn new skills [link]

In the 90s, it seemed that you couldn't go wrong by getting into professional journalism, opening a video rental store or an arcade, or selling calculators, encyclopedias, disposable cameras, answering machines, and audio CDs. We would be very naive to hope that the next twenty years will not bring similarly dramatic disruption to many of the seemingly cozy professions of today.

So, here's another unorthodox prescription for building a comprehensive preparedness plan: develop useful and marketable secondary skills. A simple and enjoyable way of doing so is to pick a hobby you can get passionate about - and then work hard, be very honest about your own mistakes and shortcomings, and try to get better at it every week. You shouldn't seek immediate profits, since progressing from a hobby to a paid occupation inevitably takes away some of the fun; but try to gravitate toward pursuits that could conceivably morph into viable career choices within a decade or so. If you have a family, help your spouse and children pursue thoughtful hobbies of their own, too.

The value of such a step extends beyond the mere task of shielding you from glacial shifts in the job market: if a major disaster suddenly cripples the local economy, there may be no more jobs for insurance claims adjusters or account executives, but carpentry or metalworking skills could be in high demand for the coming year or two. You can never predict it exactly, but the more you can do, the better you can cope with whatever adventures come your way.

When it comes to recommendations, there is no short list of hobbies that are objectively better than the rest; the selection is vast, and the right choice will inevitably depend on your own interests, natural talents, the space you have available, and on countless other constraints. That said, here are some fairly popular options that may be worth thinking about:

  • Woodworking and carpentry,

  • Metalworking, knife making, gunsmithing,

  • Glassblowing, pottery,

  • Sewing, embroidery, leather crafting, toy making,

  • Amateur electronics or robotics,

  • Computer programming,

  • Graphical design,

  • Creative writing or online journalism,

  • Farming or hunting (in rural regions),

  • Community education and local charity work.

Not all of these hobbies can be turned into well-paying gigs unless you truly excel at them - but they are guaranteed to be challenging, meaningful, and fun. The Internet gives you ample opportunities to learn from others, compare notes, and get feedback on your work - all without prematurely subjecting yourself to the pressures of the commercial marketplace.

Of course, marketable hobbies aside, some of the more determined preppers pursue interests such as martial arts, pro marksmanship, bushcraft, paramilitary combat tactics, and other extreme survival strategies. Such talents can be quite useful in a couple of plausible if unlikely scenarios - but their major disadvantage is that during a simple economic downturn, they won't put bread on the table or pay your bills. It's not unwise to give them some consideration, but be sure to balance it with more pragmatic skills.

3.4. Prepper commandment #4: Don't hurt yourself [link]

Yup. Unintentional injury may seem like a topic unbecoming a true prepper, but it will be hard to live out a post-apocalyptic Mad Max fantasy with a bum leg or a broken neck; and more prosaically, serious prior injury may limit your ability to provide for yourself and your family, confront a robber, or get out of a burning home. It may seem like a far-fetched worry, but the lifetime probability of suffering serious harm is much greater than we intuitively suspect.

Now, there are some dangers to life and limb that we simply can't predict or prevent: the occasional falling piano, the murderous roommate, the untimely stroke. Then there are the risks we take willingly, accepting the inherent and unavoidable trade-offs of our hobbies or jobs: the possibility of being snatched by a giant squid while snorkeling off the coast of California, or the near-certainty of lung fibrosis from toiling in a sugar mine. These are the things we can't or don't want to give up - and that's perfectly fine.

But there are also the "hold my beer" moments: the unnecessary displays of bravado, overconfidence, or thoughtlessness. We recognize them from cringeworthy yet hilarious Youtube clips of people getting hurt - but we are guilty of the same: we get honked at for carelessly changing lanes, we end up climbing more than a fair share of rickety ladders and office chairs, and every now and then, we all get a bit cavalier with lawnmowers, escalators, ATVs, or other power tools.

We keep getting away with all that goofiness, and that only serves to make us more certain that our own transgressions carry no serious risks. But government statistics tell a strikingly different tale: in the US alone, unintentional injuries result in 40 million ER visits and 100,000 deaths every year. Heck, accidental injury is the leading cause of death for people between the ages of 1 and 45 - far ahead of cancer, heart disease, gun violence, and other pop culture bogeymen. And the injuries themselves are very prosaic, too: all you see are falls, cuts, burns, vehicular collisions, poisonings, and so forth. The "idiots" we sometimes watch on Youtube are us. They just happen to have been caught on camera on the day their luck ran out, perhaps aided by downing a couple of beers.

In the end, ladders, cars, and space heaters are a much greater threat to your well-being than a gun-totting robber or an army of zombie marauders could ever be. So, gleaned from accident statistics, here are some of the familiar-sounding but crucial survival tips. It may sound unlikely, but if something appears on this list, it's responsible for quite a few gruesome deaths or injuries every year; take it to heart.

3.4.1. Safety tip #1: Don't be a moron when working at heights [link]

Sure, the lightbulb needs changing and that office chair is really close, but it would take you only 15 seconds more to bring a more sturdy stool from another room, so don't take chances if you don't have to. Similarly, having someone hold a wobbly ladder for you or securing it with some rope can be a minor hurdle - but it's gonna be much less of a hurdle than dealing with a compound fracture or a dent in your skull.

Whatever you do, keep in mind that you probably experienced most of your falls as a kid, and that can profoundly skew your perception of danger: falling five feet and landing on your side is different when you weigh 50 lbs, and different when you are 180 lbs.

3.4.2. Safety tip #2: Drive defensively and stay calm on the road [link]

Got a car? Don't go too fast, keep a three-second distance to the vehicle in front of you, and always scan for cross traffic when approaching intersections or making turns: other drivers may be less attentive than you. Be very careful when changing lanes, do it slowly, and be sure to adjust your mirrors to eliminate blind spots (you don't really need to see the sides of your car). Slow down for cars stopped in other lanes - they may be letting a pedestrian through. Wear seat belts, keep children in fitting car seats, get some rest on longer trips, and don't talk on the phone - it doesn't matter that it's hands-free. Avoid frequent rides with people who drive badly, too.

Interestingly, driving and safeguarding your finances have something in common: when you end up hurting another person in an at-fault accident, they may go after your savings or real estate to recoup medical expenses, lost wages, and other costs. So, in addition to driving defensively, have a look at your insurance policy. The minimum liability coverage mandated by the state can be as low as $15,000; relatively few victims will settle with the insurer for that amount if they think that taking you to court could net them ten times as much. Bumping your limit to $250,000 is usually pretty cheap. In fact, if you have collision coverage, you can more than make up for it by increasing your deductible to $1,000.

Biking on public roads? Wear a helmet and bright-colored clothing, stay well clear of the doors of parked vehicles, move in a straight line instead of weaning in and out of the traffic, and watch for cars trying to make right turns. Scan for cross traffic at intersections and signal all turns. Don't run red lights - it's not worth the seconds shaved off your commute. Don't ride without holding the handlebars; it makes you look very hip, but when you do that, a single rock or an unnoticed pothole can throw you right under the wheels of a passing bus.

3.4.3. Safety tip #3: Show respect to dangerous machines and chemicals [link]

Read up on the safety rules pertaining to your hobbies and to your daytime job; seek out horror stories from other people in the business, too. Be very careful around select power tools, such as chainsaws, table saws, angle grinders, lathes, and nail guns - they have quite a penchant for taking fingers off and eyes out. Don't horse around any heavy machinery; if it's weighs more than you, it can kill you in the blink of an eye. This is also important for children: teach them not to play behind or under parked cars. And if you have a toddler, use straps to secure rickety dressers and other tall, heavy furniture.

At home, be very alert around deep fryers and pots of boiling water. Wear eye protection when working with drain cleaners, bleach, and other caustic substances. Learn about the overdose risks of paracetamol (ibuprofen is a much safer pick) and take a critical look at your prescription drugs. If you're ever doing DIY electrical work, learn how to do it properly, and get a non-contact voltage probe to double-check for live wires before you touch anything.

3.4.4. Safety tip #4: Don't die in a fire [link]

Install smoke detectors and keep them operational; if they are going off too often, try to move them farther away from the kitchen, or switch to photoelectric sensors, which are much less sensitive to minor cooking mishaps. There are many wired and battery-operated units to choose from.

Get at least two good-sized ABC fire extinguishers (5-10 lbs or so) and keep one in your bedroom. Learn how to deal with oil fires, don't stockpile excess flammable materials, and be very careful whenpouring flammable liquids near open flames. Be smart about where you put space heaters and candles, and don't smoke in bed. Water your Christmas tree and use LED tree lights. Unplug devices with lithium-polymer batteries when leaving home. Don't put grills next to siding-clad walls and don't overload extension cords. When cooking, stay in the kitchen or set a timer to remind yourself that the oven is on.

Folks in rural areas who live far away from any fire stations, but who have a pond, a creek, or a pool on their property, may want to look at afire pump kit. It's a fairly expensive tool ($1,000 or so), but it can rapidly put out even a large blaze - provided that you have a pond, a pool, or a cistern nearby.

3.4.5. Safety tip #5: Just in case, keep your senses razor-sharp [link]

If you're regularly drinking or doing psychoactive drugs, try to kick the habit - or at least scale it back. I'm not going to give you a talk about the evils of cannabis, but by the end of the day, impaired judgment is impaired judgment. It inherently increases the odds of waltzing into trouble or getting hurt.

3.5. Prepper commandment #5: Don't become a victim [link]

In addition to the dangers of poor financial planning and the ever-present specter of unintentional injury, another threat we should reckon with is becoming a victim of a crime. Although the risk is not as pervasive as the challenges discussed earlier in this chapter, it still earns a distinction as one of the things that many readers will almost certainly have to face at some point in their lives.

Ask a hardcore prepper for advice on this matter, and they will probably tell you to start practicing hand-to-hand combat, get a knife, or carry a gun. But in reality, we need a more nuanced and proportional approach to threats, and one that emphasizes avoidance and de-escalation, rather than the ability to resolve each and every conflict with a single well-placed shot. Sure, a self-defense weapon can save your butt in some life-or-death situations, but these are comparatively rare; such a tool won't deter a pickpocketer, won't stop a burglar from ransacking your place while you are at work, and won't prevent a hacker from emptying your bank account while you're busy watching the reruns of Gilmore Girls.

In other words, while this guide certainly doesn't have an anti-self-defense or an anti-firearm slant, we'll try to take a broader view before delving into the comparative merits of karate chops, blade weapons, firearms, stun guns, and pepper spray.

3.5.1. Defense tip #1: Practice situational awareness when on foot [link]

When walking around town, keep scanning your surroundings and be mindful of people around you. If your spidey senses are tingling, just bail: make a sharp turn and sprint away. Don't worry that some random dude closing up on you at night might be perplexed or offended by your move. Don't freeze up if somebody hollers or authoritatively barks an order at you - complying is a very powerful instinct, and some assailants know to exploit it.

Of course, some street-savvy readers may consider it to be in poor form to sprint away from a threat, and may be inclined to confront the danger and see where that takes them. It's an OK choice if you are well-armed or physically fit, but is certainly not a way to minimize the probability of harm.

3.5.2. Defense tip #2: Make yourself pickpocket-proof [link]

In shopping malls, on mass transit, and in other crowded settings, don't carry your most precious valuables in front or back pockets; a purse is also a clear no-no. Inner pockets of jackets, and breast- or knee-level pockets of pants and shirts, are much harder to muck with. Discreet, slim waist packs or under-the-garments neck wallets work even better. Emphasize to your friends that you are wearing such fashion accessories only ironically; who knows, maybe you will start a trend.

3.5.3. Defense tip #3: Protect your valuables at home [link]

Most break-ins are purely opportunistic: thieves are in and out within five minutes, quickly rummaging through all the places where people usually keep valuable stuff. You can bank on them going through every nook and cranny of your bedroom, looking under the mattress, peeking into every drawer - and grabbing everything that looks shiny and is easy to lift. Their usual targets include phones, cameras, tablets, laptops, jewelry, firearms, loose cash, checkbooks, credit cards, and prescription meds. Vital documents that may be useful for identity theft or benefits fraud, such as drivers licenses, passports, and SSN cards, are also a fair game.

Break-ins are difficult to prevent, especially in suburban single-family homes with secluded backyards and street-level windows and doors; tall fences and window bars can work, but they are expensive and tend to draw the ire of your neighbors. The most cost-effective solution may be to keep your windows and doors closed when away, but beyond that, just optimize for hassle-free outcomes. You can leave some less important goodies in plain sight - say, some cheap jewelry, a modest amount of cash, and a beat-up phone - and put all the real valuables in a much less obvious or less accessible spot. A heavy safe will usually do;diversion safes are pretty cool, too, if you trust yourself not to accidentally throw them away.

We'll talk about home security equipment later on - but in general, devices such as alarm systems, cameras, or sophisticated locks play a lesser role in keeping your belongings safe; a well-trained dog can work wonders, but especially in an urban or a suburban setting, such a pet is a substantial commitment (and can turn out to be a lazy bum).

If there's another powerful and low-cost burglary prevention tool at your disposal, it's being careful not to attract targeted theft. Be mindful of who you invite into your home, who handles your keys, and how much you signal about your financial status to your more distant family, random acquaintances, or strangers parked across the street. If you have children, teach them about the virtues of modesty, too. If you tell them that the thieves will probably take their game console, they may even listen to what you have to say.

Advertising your wealth aside, another sure way to invite burglars is to make it seem that your house is unoccupied: packages piling up in front, an overflowing mailbox, an empty driveway, all lights turned off at night. Asking a neighbor to park a car in your driveway, putting some lights on a multi-cycle timer ($8), and having someone pick up your mail, are just several examples of low-cost solutions that are worth trying out whenever going on a longer trip.

3.5.4. Defense tip #4: Plan for dangerous encounters [link]

Sometimes, you can't avoid a confrontation. Figure out how to react if somebody asks you to get into a car, demands cash, or barges into your occupied home. It would be a complete shock for you, but they have probably done it before - so you gotta rehearse if you want to have the upper hand. Even if they have a weapon trained on you, it's a game of confidence and wits, not just physical force.

For muggings, keeping several $10 or $20 bills in your front pocket (and having real valuables somewhere else) can be enough to send them on their way; in busy locations, you should also be able to just ignore the mugger and briskly walk away. For more serious incidents, it may be useful to respond with something that is non-threatening but catches the assailant off guard. Simply feigning a panic attack or initiating a startling conversation ("hey, are you a friend of CJ? Pretty sure we've met last year!") can throw them off balance - allowing you to fight back or get away. Of course, you also need a plan for that next step; that's where your running skills, your bare-hands self-defense talents, or your weapons proficiency can come into play. But again, you need to actively practice and develop approaches that have a chance of working in real life; there's no verbal diversion strategy in the world that would give you enough time to fumble through your purse to find an old, gummed up can of pepper spray.

For home intrusions, you should try to act out various scenarios: say, confronting the bad guy or trying to escape. Take into account that break-ins can happen at different times of day or night. Remember that intruders may have varied intents; some folks may be homicidal or high, but most will just want your laptop and will be very worried about getting hurt. Many robbers work in pairs, too.

Whether you like it or not, you may eventually have to defend yourself, so be sure to understand the law. You shouldn't take such advice from random people on the Internet, but as far as I can tell, in much of the US and in many other western countries, you have no duty to run away from an attacker and can use deadly force if you have a reasonable and immediate reason to fear for your life or the lives of others. But there are exceptions; for example, despite recent reforms, a duty to retreat exists in some form in several northeastern states and in some corners of the Midwest. There are also differences in how seemingly similar self-defense statutes get interpreted by the police, by prosecutors, and by courts in different parts of the world.

3.5.5. Defense tip #5: Don't be an easy target online [link]

Your cyber-life matters - or at the very least, your bank account password and your credit card numbers do. To avoid falling prey to hackers, keep your software up-to-date, choose decent and unique passwords for all important websites, don't install sketchy freebies, and don't fall for legit-looking but unexpected messages and prompts. When in doubt, just leave the site you were on, do some web searches to understand what's going on, and maybe try again some time later.

Beware of financial scams. If you get an IM from a friend on an unannounced overseas trip urgently asking for a loan, call them or check in with their family first. And no, there's no inheritance waiting for you in Nigeria, your chatroom bride-to-be in Ukraine is not short on cash, and you are not the 1,000,000th visitor to timecube.com.

Oh, one more thing: don't log into your bank, e-mail, or any other sensitive services from other people's computers; if you absolutely have to, change your password as soon as you get home. It's not that your acquitances are evil, but they may be more sloppy than you when it comes to keeping their devices safe.

3.5.6. Defense tip #6: Don't make enemies [link]

If you're doing something that's morally reprehensible or socially unwelcome, you are greatly increasing the odds of getting hurt. It doesn't matter if you think it's perfectly legal: if you are a monumental and malicious jerk, a bored prosecutor will probably dream up a felony charge to hit you with. Or perhaps they won't, but one of the people you wronged will lose it and take justice into their own hands. In other words, if you want to escape harm, don't mess with others out of malice, jealousy, boredom, or for petty personal gain.

3.6. Prepper commandment #6: Get in shape [link]

In the United States, about one in three adults is obese - that is, are overweight to the point where the condition likely interferes with their health or their daily lives. And while many folks in the prepper community tend to grossly overstate the importance of tip-top physical fitness, there is no denying that obesity is a very real foe. For example, among low-BMI individuals, the incidence of diabetes hovers around 1-4%, but the same number skyrockets to 50-80% for obese folks. Many other, serious metabolic and cardiovascular diseases follow the same curve - and can make it very difficult for the affected families to cope even with fairly prosaic and short-lived emergencies.

In all likelihood, if you are obese or slowly getting there, you know quite well that losing some weight is not really the hard part: if you were to stop eating for a week, you would likely shed 5-10 pounds or more. But it would be a miserable experience, and one almost guaranteed to be followed by an even faster rebound. So, the real challenge of weight management is coming up with a long-term strategy that does not amount to torture - and does not leave you constantly craving for familiar foods.

Alas, most of the popular diets make this task awfully hard: they force their followers to abandon a lifetime of dietary habits, taste preferences, and eating schedules - and stuff themselves full of kale, turnips, quinoa, acai berry, or whatever else happens to be this week's "fat-fighting superfood". To add insult to injury, most of the nutrition fads are not actually backed by real, reproducible science; suffice to say that in the 70s, table sugar was widely touted as a dieting aid. Even today, weight loss advice tends to revolve around robustly debunked concepts - say, the existence negative calorie foods, the alleged superiority of low-carb but high-fat diets, the evils of HFCS and aspartame, or the significance of eating meals on a particular schedule thoroughout the day.

Just as importantly, our innate nutritional instincts can be badly misguided, too: for example, contrary to common wisdom, bananas are not really healthier than potatoes, and the bulk nutritional qualities of a glass of apple juice are pretty close to those of a can of Sprite. Heck, good ol' butter has fewer calories than olive or coconut oil, so a "healthy" bruschetta is not far off from a less-reputable southern delicacy: deep-fried butter on a stick. It gets better: a supposedly nutritious burrito from Chipotle easily packs four times as many calories as a greasy burger from McDonald's, while a loaded coffee at Starbucks is about the same as downing two hot dogs with a heaping side of mashed potatoes to boot. The end result is a truly abysmal track record for most weight loss regimes; the long-term success rate for people who try to slim down is estimated to be somewhere between 5 and 20%.

My advice is that if you want to lose weight, it's best to stay away from celebrity-endorsed diets, dubious nutrition claims, and rigid, unworkable plans that seek to control your every urge. While every situation is different, here are several ways to eat less while still staying happy:

  • Start your breakfast withhigh-quality protein powder and insoluble dietary fibers (about 20-30 grams each; you can mix them together in a cup of cold water). There is fairly clear evidence that fiber and protein can increase satiety and reduce cravings thoroughout the day. Sure, it's not "natural", but it beats making implausible resolutions to organize your life around low-calorie, fiber-rich meals - especially if you don't like veggies or don't usually cook your food.

  • Beyond this, stick to your favorite foods and don't feel pressured to skip regular meals - but cut all portions in half, even if it means throwing a half-eaten burger out. Don't go back for seconds, too. It will feel wrong the first couple of times, but it's surprisingly easy to do. That's because portion control is almost completely psychological; your blood hormone and nutrient levels go up only some time after you cleaned your plate. Eating more slowly can make this step a lot easier, too.

  • For habitual snacking in front of a computer or a TV, see if you can substantially reduce calories while still sticking to satiating and tasty treats. This can be easier than it sounds: say, helping yourself to a nice serving of salted popcorn (110 kcal), preparing a cup ofbuttery mashed potatoes (110 kcal), or sipping some hot instant chicken soup (50-80 kcal), is an excellent alternative to Cheetos, M&Ms, or even supposedly healthy peanuts (easily 600-800 kcal). If you enjoy pickles or raw sauerkraut, they are extremely low-calorie, so have as much as you want; in the same vein, carrots are a pretty guilt-free choice. Chewing gum can keep you occupied between meals, and if you are downing multiple cans of sugary drinks a day, artificially-sweetened sodas offer agood alternative.

  • When buying food, don't fall for "diet", "reduced fat", "low sugar", or "low carbs" ice cream, yogurts, cakes, pizza, pasta, and so on - the differences are so minor that you might as well have the real thing and stop fooling yourself. Watch out for deceptive portion sizes, too. For example, Cheetos are labeled as 150 kcal per "serving", but there are almost 10 servings in a regular bag! Frozen fries are another great example: they look pretty low-cal until you realize that a serving is just 10-15 pieces or so - certainly not enough to make you feel full.

  • While dieting, try to drink a bit more and start takingOTC multivitamin supplements; they don't offer clear-cut benefits under normal circumstances, but they can compensate for mineral and vitamin deficiencies if you never had a particularly thoughtful diet, and are about to start eating less than you were accustomed to.

  • Don't hit the gym. Hold off with intense workouts at least until you are close to your target weight. Daily exercise schedules are hard to keep for more than a couple weeks, especially if you lead a busy life; on top of that, a drastic increase in physical activity can trigger cravings or upend your nutritional needs. If you are itching to burn some extra fat, incorporate less punishing activities into your daily routine - say, walking or leisurely biking to work.

  • Be in this for the long haul. Effortlessly losing 1-2 lbs per week while slowly developing better habits is far more meaningful than starving yourself for a month to get immediate but short-lived results. Get an accurate bathroom scale, take daily measurements first thing in the morning, calculate key milestones, and put it all in a spreadsheet to keep yourself honest and motivated. It will probably take 6-9 months to get the outcome you want; daily or weekly weight fluctuations are almost completely meaningless, but you should be seeing a consistent and predictable biweekly drop.

I can't promise that this approach will work for everyone, but after trying countless other methods, I found that regime quite enjoyable, effective, and worry-free; at the ripe old age of 35 and with three kids in tow, I ended up losing over 65 pounds - going down from a BMI of 29 to 20 or so.

Of course, if you are very obese or have any serious health conditions, such as diabetes or CVD, talk to a doctor first. In such situations, aggressive dieting can carry additional risks and calls for some monitoring along the way; a routine blood test or an ECG shouldn't cost much. And it goes without saying that if your diet makes you feel listless or sick, it's definitely time to stop right away!

Now, when it comes to fitness per se, I firmly believe that there is no need to go overboard; good health is far more important than Rambo skills. While getting buff may be a fun pastime for some young folks, there are very few emergencies that would force you to run 30 miles or climb a 20 foot wall. Being able to walk or bike for several hours is likely good enough to deal with all practical scenarios we talked about thus far.

3.7. Prepper commandment #7: Make friends with neighbors [link]

The funny thing about disasters is that they seldom unfold precisely as planned. Perhaps you will lose a job and get robbed the same week. Perhaps in the middle of a prolonged outage, you will find out that some of your emergency supplies have been misplaced, damaged, or spoiled. Maybe your plan to walk a mile to get drinking water from a river will get foiled by a broken limb. And maybe a brilliant home defense strategy will prove worthless when standing eye to eye with an angry mob of rioters armed with rocks.

In trying times, people always come together and find strength in local communities. Even if you don't expect it, you will almost certainly be able to count on the kindness of strangers. But your odds can be greatly improved by getting to know your neighbors ahead of the time, by cultivating trust and mutual respect, and by getting a sense of each others' toolkits and skills. In a grim situation, being on good terms with a doctor or a veterinarian can quite literally save your life. And heck, some rural communities in the US even maintain communal stashes of emergency supplies!

Of course, it goes both ways: you will almost certainly find it harder to get help if your neighbors still resent you for puking on their doormat and constantly partying at night; so once again, not being a jerk to other people is not just good manners, but a very legitimate survival skill. Even if it's not really your nature, say "hi", engage in small talk, and offer to help with minor hurdles every now and then. Bring your neighbors a pie or some donuts, add them on Facebook, and try to find common interests. Socialize with coworkers who live nearby, too. Even if the zombie apocalypse never comes, it still won't be a waste of your time.

Now, many "true" preppers would tell you to keep mum about your plans, so that in an emergency, you don't have to fend off armies of freeloaders begging for a slice of your meager supplies - or worse yet, trying to take them by force. I think that this attitude is short-sighted; sure, it makes sense not to broadcast your plans to the entire world, and there is no conceivable benefit to posting Facebook selfies with your stash of freeze-dried food or with a pile of cash. But the clear value of convincing some of your friends to start prepping greatly outweighs the distant possibility that one of them will attempt to raid your home the moment the power goes out.

3.8. Prepper commandment #8: Write down a response plan [link]

To cope with a true emergency, it's not enough to know the risks and sit on a pile of overpriced survival gear: you need to plan ahead. If your house is on fire, there may be no time to rifle through folders to gather all your vital documents; if the floodwaters are rising or a chemical tanker overturns on a nearby highway, it may a bit late to start thinking about refueling your car. And if you're stranded on a rural road in a broken-down vehicle, you may sorely regret not putting any drinking water in the trunk.

In fact, even in situations that don't unfold in such a dramatic way, sketching out a plan can help you optimize spending and spot potential problems early on. For example, there may be little merit to stockpiling 50 lbs of rice if you can't possibly store enough water to cook it all. But then, a quick look at the map may reveal that there is a freshwater reservoir within a biking distance of your home. Great - maybe all you need is a bike basket and a pair of spare inner tubes.

So, here's your homework: make a list of all the major threats discussed in this guide, alongside with any other contingencies you worry about. For each and every one of them, draft a detailed, step-by-step preparedness and response plan that sounds right to you, and that you can see yourself actually putting into action. Don't obsess over getting all the details right; we'll try to refine your choices in section 4, and even then, it may take several iterations to settle on an approach you are really happy with. For now, simply list all the noteworthy dangers, jot down some initial answers to the following questions, and see where that takes you.

3.8.1. Threat assessment topic #1: Is it a priority? [link]

Do some research to make sure you are not wasting your time on implausible risks. How likely is it that you would have to face this particular danger, and how much damage can it conceivably cause? For example, do you live in a 100-year flood zone? In the path of tropical storms? In a high-crime neighborhood? Be sure to search around and study publicly available resources; reaching out to local emergency response organizations can be a good plan, too. Try to focus on reputable sources; the science in doomsday movies and on conspiracy websites seldom checks out.

(If you decide that you don't care about a particular risk, skip the remaining questions and just move on to the next problem on your list.)

3.8.2. Threat assessment topic #2: What do you need to be ready? [link]

Do you need to secure any supplies or make other arrangements to prepare for this scenario? If you need to stockpile items, do you have enough room? How long would these supplies last in an emergency, and how often would you need to replace them in storage? Are there any additional steps that you want to take to be in a better place a month, a year, or five years from now? Make a detailed list and tally the costs.

Be critical of any assumptions you are making in your plan: sure, you have seen it all in the movies, but search for statistics or historical accounts to better understand how such events typically unfold in real life. Don't assume that all contingencies are covered by a generic home insurance policy, too: for example, earthquake and flood coverage is often sold separately (and costs a lot); and in any case, even if the insurance will eventually pay, you still need a short-term survival strategy to deal with the loss.

When it comes to dangers such as break-ins, fires, or earthquakes, be sure to walk around the house and take note of anything that unnecessarily exacerbates the risk. Perhaps throwing out old junk, reorganizing the contents of kitchen cabinets, adding earthquake latches, or fixing a broken lock would be a better use of your time than ordering space-age prepper gadgets from Amazon.

For natural disasters common in your region, you can find a lot of relevant (if US-specific) advice on the webpages of CDC,FEMA, and theAmerican Red Cross. You can also have a look at the excellent, detailed hazard maps available from FEMA, USGS, NOAA, and several other agencies.

3.8.3. Threat assessment topic #3: How, exactly, will you respond? [link]

If this particular calamity strikes, what's the step-by-step playbook you would follow, and how much time would you have to carry out the plan? Will you be sheltering at home, or is this a situation where you need to evacuate? If the answer is "it depends", what would be the key factors, and how quickly would you need to make the final call? If you pick the wrong option, how bad would it be?

Bugging out puts you at a tremendous disadvantage, so it's almost always better to dig in; but if you have to leave, also ask yourself this:

  • ...where would I go? Is the location sufficiently far away to be unaffected by the event you're running away from? If you are driving, will you have enough gas to get there? (Again, would it help to have a habit of keeping the tank at least half full?) Are the roads likely to be congested or blocked? How many people will think of exactly the same location? What if the destination proves to be inaccessible, overcrowded, or unsafe?

  • ...what do I need to bring? How much can you realistically take with you when leaving by car, by bike, or on foot? What are the most important items, and will you be able to grab them quickly enough? To simplify things, would it make sense to maintain a small cache of supplies in the trunk of your car or at a friend's place - and if yes, what should be in that box?

3.8.4. Threat assessment topic #4: What if you are somewhere unexpected? [link]

If you have a daytime job or go to school, there is a good chance that the event you are preparing for could unfold while you are at that location - or somewhere on the way. Do you need a special plan to handle this possibility? Can you get back home easily? Do you need water, food, money, or clothes to make that trip? How likely is it that you would be hurt or stranded somewhere?

Separately from this, consider the risks of less frequent but more dangerous trips. If you're sightseeing a particularly inhospitable or remote destination, what do you need to survive if, say, you get lost or your car breaks down?

3.8.5. Threat assessment topic #5: Do you need to talk to your family? [link]

If you have a spouse, walk them through your plans and make sure they can access the essential supplies and know how to use them in your absence. If you have children, give them the very basics as well. For example, in case of a fire, they should know the safest way out without having to wait for you; tell them how to react to home intrusions and medical emergencies, too.

If you are separated from others and need to meet someplace other than home, make sure that everybody will remember where the meeting point is - and will know what to do if you can't make it on time. Keeping some instructions in a wallet can go a long way.

3.8.6. Threat assessment topic #6: How can your plans backfire or fail? [link]

Try to identify the aspects of your plan that are most likely to go wrong, and come up with viable alternatives. Take a hard look at any new problems you are creating, too: for example, if you want to store gas in your garage, it will probably help in an evacuation, but will also increase the odds of accidentally starting a serious fire. Or, consider a far more prosaic case: if you are planning to stockpile batteries or bottles of insect repellent, you should make sure they can't leak and spoil other, more vital supplies nearby.

3.9. Prepper commandment #9: Plans have flaws, so also write a will [link]

People die, sometimes unexpectedly and in silly, undignified ways. Dying is seldom a pleasant affair and you generally don't get to choose the "how" or "when", but there is no better way to spoil your final moments than the sudden realization that you really screwed over the people you loved the most - and that it's too late to fix that now.

So, if you have children, a stay-at-home spouse, or any other people who may be dependent on you, it makes sense to write a will. Even if you don't have much of an estate to dispose of, your will can provide instructions for the custody of minor kids, potentially shielding them from abusive relatives or from foster care. This can be particularly important for expats, whose closest surviving family members may be in another country, difficult for the court to pinpoint or communicate with.

In most jurisdictions, to draft a will, you don't need a lawyer; the only skill that comes handy is the ability to express yourself clearly and unambiguously. There are countless state- and country-specific templates available online; in many cases, to carry legal weight, the will just needs to be co-signed by disinterested parties acting as witnesses - or cheaply notarized.

Where possible, you should name an executor in the will - a trusted person who will follow your instructions and take care of the formalities. If you don't, one will be probably appointed by the court. This will be costly and may lead to disappointing outcomes.

When writing this document, describe your "ideal" scenario, but also think about all the complications that may crop up and derail your plan. For example, what if both you and your spouse die, but your children survive? Or, who should get what share of the money if your spouse is badly hurt and can't resume caring for the kids, so they end up in the custody of a relative? What if your designated executor or custodian is unable or unwilling to perform the duties? And in an extreme case, if there are no surviving relatives, do you have any favorite charity?

Of course, for the will to be executed, it needs to be found. It makes sense to keep one copy in an intuitive location in your home, because that's where people will be looking for it first; but if there's a fire or a flood, that copy may be lost. So, make another witnessed or notarized copy and give it to the executor or to a close family member who doesn't live with you. Some folks don't recommend creating multiple legally binding copies of the same will, since it may cause some confusion, but from a disaster preparedness perspective, it's a smart call.

In many states, even with an uncontested will, it may take many months for the probate process to be wrapped up. If you are the sole provider for your family, make sure that they will have the means to survive in the meantime. The right kind of a shared bank account ("joint tenancy with right of survivorship") can do the trick. There are several other approaches to this problem, too, but they tend to be more dicey from the legal perspective - or more costly and more time-consuming to set up.

4. Prepper gear & supplies [link]

Yes! That's the part where he stops blabbing about personal finance and wills, and we all get to shop for nunchucks and throwing knives!

4.1. Water [link]

...Gotcha. But yup, let's talk about the supplies and tools that may enable you to prepare for common emergencies in a cost-effective way.

Even with adequate shelter and with limited physical activity, losing access to water means certain death after a couple of truly rotten days. Thankfully, in the developed world, this is a very uncommon fate: emergencies that leave communities without potable water are not rare, but when they happen, the government practically trips over itself to immediately restore service or to get water trucks on the road.

At the same time, it's not entirely crazy to worry that in some circumstances, the response may not come quickly enough; heck, the Department of Homeland Security says that for the first 72 hours after a disaster,you may be on your own and should have enough supplies to survive. The odds of ending up in a real pickle may be modest, but the stakes are extremely high - and compared to the complexity of preparing to some other contingencies, the cost of stockpiling some drinking water is practically nil. If nothing else, when a calamity strikes, you would have one less thing to worry about.

An argument can be made that even in an emergency, potable water is never too far away; after all, most human settlements have been erected near natural reservoirs: rivers, lakes, or easily reached underground aquifers. But this is an oversimplification. In rural areas, water supply can be fairly meager and vulnerable to weather fluctuations and other cyclic phenomena. For cities, it is true that many of them are seated on the banks of major lakes or rivers, but suburban sprawl can easily put some residents 10-20 miles away from the nearest reservoir; on top of that, some of the 20th century settlements in semi-arid and desert climates rely on water hauled from tens or hundreds of miles away.

Heck, even if you do have a nearby water source, it may take surprisingly little to spoil it: for example, after an unusually powerful storm, floodwaters can carry toxic sewage from treatment plants and into rivers and lakes. All in all, stockpiling some amount of drinking water is just a smart, low-effort prepper strategy, especially in areas with an elevated likelihood of large-scale natural disasters or industrial accidents.

This brings us to the "how". In most cases, the absolute minimum water intake is somewhere around one quart per person per day; but note that this assumes no weather extremes, no substantial exertion, and no immediate hygiene needs. When these assumptions hold true, storing about 1.5 to 2 gallons per household member - enough for perhaps up to a week - should provide a viable if modest buffer for short-term emergencies. Store-bought gallon jugs are pretty cheap, hassle-free, and easy to squeeze in just about anywhere; if you keep them away from sunlight and heat, they should last 5+ years before needing to be rotated or thrown out. Don't try to save a buck by reusing milk or juice jugs, though: they are almost impossible to clean properly and may end up supporting bacterial growth.

Well, that's the bare minimum - but if you have a garage, a basement, or other unused storage space, I would actually recommend going a bit further and grabbing one or two5 gallon cans ($18) per every household member. Although multi-week water outages are very unlikely, this simply gives you a more comfortable safety margin: if something goes awfully wrong and it becomes clear that help is not coming any time soon, you will still have time to look for alternatives or evacuate. A reserve also puts you in a better situation if it's unusually hot or if you have any urgent hygiene needs. The cans are very easy to use: wash them with a small amount of regular, non-scented laundry bleach, rinse, and fill up with tap water. Rotate the contents every 2-4 years or so.

If you want to prepare for more outlandish, long-term disasters, or if you have a large family, you can make realistic plans only if you live in a single-family home. This decision alone may give you access to 50-100 gallons of water sitting in the water heater (unless it's a tankless design). Next, if you have some backyard space, you may opt for relatively inexpensive55 gallon plastic barrels ($70), taking up about as much space a small curbside trash can. Another common option, costing about the same per gallon stored, is a 275 gallon tote ($325). Such solutions can easily provide water for an entire family for up to several months at 2 quarts per person per day, with some allowance for laundry and hygiene needs. Some preppers stockpile even more - but really, if you waited this long and the conditions are still dire, it may be high time to hit the road and find some other place to live.

(Of course, there are rural places that get water only seasonally, and where huge storage cisterns or rainwater collection systems are already a necessity; but within the scope of this guide, we're looking beyond what's normally needed to subsist.)

While home storage of water is not hugely complicated, things get a bit dicey when you have to evacuate - or if you end up being stranded away from home. If you have a car, your best bet is to put together a small emergency supplies box that, among other essentials, houses one or two 1-gallon jugs of water - and keep it in your trunk at all times. But without a car, your prospects are less cheerful: in case of a widespread disaster, your range will be severely limited, and even if you take some modest amount water with you, you will need to reach a more hospitable location within 1-2 days. A bicycle, a plan, and a good map will help. Afolding cart or a an inconspicuous box of supplies kept at work may be viable choices, too.

As for drinking untreated water: contrary to popular beliefs, in temperate climates, you are generally not taking huge risks by drinking from a backcountry lake or a creek; if it looks and smells all right, it's quite likely fine. On the flip side, a bout of diarrhea is probably the last thing you want to experience in such a situation, so it's good to take precautions if you can. Boiling your drinking water is a very robust method of eradicating microscopic wildlife (more about that soon). When boiling is not an option, adding several drops of regular, old-fashioned laundry bleach per gallon of water, then letting it sit for 30-60 minutes, will have a roughly comparable effect. Note that bleach has a limited shelf life; you will need to rotate it every 5 years or so. When on the go, sodium dichloroisocyanurate pills can be more convenient than liquid bleach and work just as well.

There are several other water purification techniques, including iodine, various types of filters, or even ridiculously expensive desalination systems. The recent Flint water crisis highlights the value of permanently installed and well-maintained RO units. But for short-term survival, my take is that most of the filtration systems targeted at preppers increase costs without offering clear-cut benefits. And really, don't overthink it: if the choice is between dehydration and drinking straight from a scummy pond, drink from the pond.

4.2. Food [link]

You can survive several weeks without food, but you won't be having a very good time. Food is costly, its supply is fairly easily disrupted, and it's a resource that the government may be much less inclined to deliver to your doorstep when things go wrong. So, with a variety of reasonable scenarios to worry about - anything from natural disasters to economic downturns - it just makes sense to be able to feed yourself even if you can't buy groceries for a while.

Of course, everybody has some non-perishable food around the house, but it's much better to create a dedicated stash: this way, you can count on the supplies always being at hand, and you can stockpile something more nutritious than stale crackers, a suspect bottle of olive oil, and a rusty can of tomato sauce. With a well thought-out stockpile of ready-made food, it's also a lot easier to hit the road.

For short-term survival, the highest priority is just energy - preferably in a form that doesn't cost much, lasts forever, requires no preparation, and takes up little space. Generally, you're looking at high-sugar or high-fat foods. Some of the common zero-preparation options include:

  • High-sugar energy bars. Grocery store brands have limited shelf life, but several prepper-targeted,Mylar-packed varieties can last 5-10 years. Such products are inexpensive (~300 kcal per dollar), convenient, and energy-dense (~2,000 kcal per pound). On the flip side, they are probably pretty nauseating as your primary food. Imagine living solely off Jelly Bellies for a week.

  • Dry survival rations. Sold under several brands, includingDatrex,ER Bar,S.O.S.,Grizzly, and more. Biscuit-like, less sugary and with a more agreeable taste than energy bars - somewhat reminiscent of shortbread. In my book, S.O.S. and Datrex taste best. Very inexpensive (~550 kcal per dollar) and should last 5-10 years when stored in a cool place. A tolerable choice for short- to medium-term nutrition in an emergency. Easy to pack, giving you ~2,200 kcal per pound.

  • Canned meat, veggies, or fruit. Storage life in excess of 20 years (regardless of "best by" dates). Tasty, relatively cheap (~200-300 kcal per dollar), and the choice is pretty broad. Fruits, veggies, and soups are not very energy-dense (~200 kcal per pound), making them impractical for hiking or bugging out; on the flip side, the syrup may provide some additional hydration. Meats fare much better, tipping the scales at around 1,500 kcal per pound. Canned foods are a good option for longer-term planning, provided that you have enough shelf space.

  • Freeze-dried dinners. Popular with hikers. Extremely lightweight (up to 2,500 kcal per pound) and surprisingly tasty. The most reputable brand isMountain House. Fairly expensive on a calorie basis (100-150 kcal per $1), but you get a choice of raspberry crumble, chicken with dumplings, bacon and eggs, and everything in between. Storage life in excess of 15 years. The drawback is that they need some boiling water to reconstitute (cold water will also work, but not make a tasty meal).

  • Military MREs. I don't find them particularly tasty, but they are popular among preppers. A bit on the heavy side (usually around 1,100 kcal per pound). Portable warm food with a ton of different menus available - although for the best price, you usually need to buy a variety box and can't cherry-pick. Moderately expensive (~150 kcal per dollar). Shelf life around 5-7 years, depending on manufacturer and storage conditions. A good source is TheEpicenter.com.

  • Nuts. At ~3,000 kcal per pound, nuts are surprisingly energy-dense for something that can be eaten as-is. Relatively cheap (~400 kcal per dollar). The major drawback is a relatively short shelf life, probably not exceeding a year or two. Nuts also do not provide complete nutrition, but that's only a concern in the long haul.

  • Vegetable shortening. Extremely cheap and energy-dense (2,500 kcal per dollar, 4,100 per pound), making it a unique choice when space or money is in critically short supply. In contrast to other common fats, store-brought cans of vegetable shortening should stay fine for 4 years or more. The product is very bland, but it's perfectly palatable when spread on crackers, mixed with bacon bits, and so forth. It does not provide complete nutrition - but again, that won't harm you in the short haul.

For folks who want to focus on the most plausible risks, I suggest stockpiling dry survival rations to last perhaps 2-3 weeks; seven 3,600 kcal packets per person should do the trick. That may sound like a lot, but keep in mind that it may take a while for stores to reopen after an earthquake or a flood - so it's not a bad plan to play it safe. And while eating ration bars for a week sounds bland, you may be in no mood for home cooking when you have to fix a collapsed roof and the utilities are cut off.

For those who are worried about less likely, longer-term contingencies - or who want to limit their future grocery expenses in case of a financial shortfall - a more varied stockpile to cover 3-4 months is a reasonable choice. At that timescale, it's still smart to begin with some number of hassle-free survival rations, but it is important complement them with a more palatable menu: freeze-dried or canned meals, MREs, or cheap home-made food. Crisco aside, some of the nutritious and easily stored staples include Mylar-bagged, oxygen-scavenged white rice, white flour, dried beans and grains, pasta, sugar, honey, powdered milk, salt, spices, and so forth; when stored properly, all of them can last 5 years or more. Freeze-dried or garden-grown fruit and veggies can add some flavor to your post-disaster cooking, too. Heck, you can even buy supposedly tastybutter,chicken breast, canned bacon, andbread-like crackers with 10+ year shelf life (although they are not cheap).

As for the appropriate calorie intake: almost all adults can function normally on 1,500 calories a day for extended periods of time, although they will slowly lose weight (probably not more than half a pound a week). If you are skinny or if you're aiming for surviving many months with no access to other food, budgeting 2,000-2,200 kcal per day is a safer bet.

For hardcore preppers convinced that they may be left with no access to food for a very long time, it would be also important to maintain a robust intake of protein; somewhere around 40-50 g per day is believed to be optimal, although you certainly don't need to observe it religiously. Ready-made protein-rich foods include some energy bars, most dry ration packets, some freeze-dried dinners, canned meat, and military MREs; smaller amounts can be found in some veggies, too. You can also stockpile protein powder - it's bland but relatively cheap ($1 per day). Freeze-dried scrambled eggs,powdered milk, and related products, including long shelf lifecanned orpowdered cheeses and pancake mixes, work well, too. As mentioned earlier, protein and dietary fiber also have a well-established satiating effect, helping you maintain a balanced diet - which can otherwise be tricky when snacking on high-calorie foods. Oh: having some OTC multivitamins may be a good plan, especially to supplement vitamin C.

Of course, some "doomsday" preppers worry about even more exotic, post-apocalyptic scenarios mentioned in section 2.3, basically aiming for indefinite self-sufficiency. I don't think it's a particularly sound concern, but if the prospect of a civilizational collapse keeps you up at night, my best advice is to move to a rural community where you could farm, fish, or hunt. Some urban survivalists fantasize about trapping local squirrels, pigeons, or raccoons - but they would run out of food very fast. Small urban and suburban gardens are usually difficult to maintain and don't produce enough to feed a family, too.

4.3. Fuel and electricity [link]

It takes just a single downed power line to knock out your furnace, AC unit, cooktop, refrigerator, and to make the lights go out; and when such an outage happens due to a larger-scale natural disaster, repairs can easily take days or even weeks. We think of fuel as a more dependable resource, but if 1979 is any guide, you only need one well-timed revolution in the Middle East to make it nearly impossible to fill up a car in some parts of the United States. Of course, such events are usually inconvenient, not disastrous, so it's perfectly fine not to dwell on them in your plans. At the same time, it doesn't hurt to take a closer look at what's at stake - and what the potential solutions may be.

Of all the plausible scenarios, another major oil crisis would probably hit most car-owning families the hardest, limiting their ability to get food or to take care of other, everyday needs. Generally speaking, there is no simple fix: keeping a gallon or two in your garage won't make much of a difference, while maintaining significant reserves of gas for personal use can be done safely (and legally) only if you own a large, rural plot of land. Electric vehicles, especially if charged from rooftop solar panels, can offer a wonderful backup in some parts of the world, but they carry a very hefty price tag. The best workaround may be the least inspired one: if you own a car, you can always keep your tank at least half full (a familiar mantra by now), and have enough food and other essentials to be able to wait out the worst.

A service interruption or a fuel crisis that takes your cooktop out of service for a week or two is the other hardship perhaps worth worrying about. It's not just about eating well: in an emergency, the ability to boil water is one of the best methods of making it safe to drink. While the owners of rural homes with 500 gallon propane tanks may have little to worry about, the rest of us would not be having fun. For those who cook using municipal natural gas, a simple backup is asmall, countertop electric burner, costing about $15. Conversely, for people with electric ranges, a portable camping stove ($13) and a handful of dirt-cheap 1 lb propane tanks ($4 at any hardware store) can be a safe, no-hassle choice. A pound of propane can boil around 12 gallons of water; the entire setup is also very easy to put in a backpack if you ever need to leave - so it's basically worth getting either way.

No heating in the middle of a particularly nasty winter can be problematic, too - although it's mostly a matter of comfort, not survival. In most places, with robust shelter and adequate clothing, bedding, and food, it's fairly hard to freeze to death at home (but note that the cold may make some infections or medical conditions worse; you may have to worry about frozen water pipes, too). The situation can become a lot more dire if you are on foot in the middle of nowhere, so truly hardcore, wilderness-minded preppers may have something to ponder about; but hauling a sufficient amount of fuel is typically impractical to begin with, so their best bet would be warm clothing, improvised shelter, and the ability to build a fire. We'll talk about that in the section that deals with camping supplies.

In some parts of the world, extreme heat can be far more dangerous than cold. When AC is not an option, it's usually possible to avoid trouble by staying in the shade, drinking a lot, and limiting physical activity. If it gets really nasty, the best way to cool yourself is to wet your clothing and hair, then stand in front of a running fan. You have a bigger problem if you happen to be stranded in a broken down car somewhere in the middle of a desert - but carrying some water and several other supplies in your trunk should help a great deal. More about that soon.

During a prolonged blackout, keeping flashlights, radios, and cell phones running can become a challenge of its own. The most cost-effective approach is to stick to devices that can take regular AA, AAA, or PP3 (9V) batteries; modern alkaline cells have very long shelf lives (10 years), can be bought cheaply in bulk, and will do the trick for almost all portable electronics you can think of. Of course, modern power-hungry smartphones are a notable exception to this rule. For that, you can always try solar chargers ($50) - they work well, but are a bit fragile and may not perform too amazingly in wooded areas or on overcast days. You can also go forhand-crank generators ($30, labor-intensive) or AA power banks ($15, mixed reviews). But ultimately, also allow for the possibility of not being able to call others for a while.

For powering more serious electrical equipment, a generator is a popular choice for people living in the backwoods. That said, this option comes with an interesting trade-off: if you were ever to face a contingency that may last for a longer while, it may be more important to conserve fuel for driving, cooking, or heating, than to use it for keeping the lights on. A fully-fledged solar installation helps you avoid such dilemmas, but costs an arm and a leg. A possible compromise is a jury-rigged solar setup done at a smaller scale: if you hook up 100W panel ($160) to adeep-cycle lead-acid battery ($60) and a low-cost inverter ($30), you gain the ability to recharge laptops and phones, or even power several desk lamps, a decent-size fan, or a small refrigerator. The whole contraption costs around $250 and is easy to stow away if you're not very short on space.

(If you take this route, charge the lead-acid battery fully, bag it, and then put it in the fridge or in another cool place; this will extend its shelf life by many years. Li-poly and regular non-rechargeable batteries benefit from being stored at low temperatures, too. But whatever you do, don't freeze any of them!)

That's probably about it... well, all right: this section focused chiefly on the immediate consequences of an outage, but a severe fuel crisis or a long-lasting power grid failure would have profound, cascading effects on the entire economy - probably including out-of-control unemployment, high inflation, product shortages, and more. That said, these are the outcomes we can already prepare for by other means. As for extreme preppers who aspire to long-term energy self-sufficiency, I think it's going to be a difficult feat: even with a solar installation, under constant cycling, the batteries may not last much longer than 5 years. Short of finding a cheap Soviet RTG on eBay, they may simply have to adapt to living without electricity or gas.

4.4. Electronics [link]

Although this may sound very disappointing to a typical geek, the list of genuinely useful prepper electronics is pretty short. Here's what I can honestly recommend:

  • A large pen drive. Computer hardware failures are far more common than space zombies or mutant superbugs. Because of this, one of your best investments can be a decent 128 GB pen drive ($30) with a copy of all your important files; in case of bank mix-ups, throw in copies of recent account statements, too. And hey, if want to feel like a cyber-ninja - you can always grab acopy of Wikipedia. It will undoubtedly come handy for rebuilding the civilization, and it's just 12 GB.

  • Flashlights. Unless you are living in a rural area, you don't need an eye-searing torch that chews through ten boxes of batteries in a day. Get two small, high-quality AA flashlights that give you at least 20 hours on low power; keep one near your bed, and another in your car or in an emergency stash. For a low-cost option, try Fenix E12 ($25). If you want 100+ hours of battery life and don't mind the price tag, check outFenix LD22 ($55).

  • A lantern. Not essential, but useful for preparing food, dining, reading, and other fun blackout activities where a narrow beam would be less comfortable than omnidirectional light. I like this device ($35) - it's small, fairly inexpensive, and very robust.

  • An old-fashioned radio receiver. A battery-operated AM/FM radio will be a good way to stay in the loop if cell networks and the Internet are down, and the civilization is temporarily banished back to the dark ages (aka the 90s). A cheap, brand-name model, such as Sony ICFP26 ($18), will do just fine.

  • Handheld FRS/GMRS radios. Many preppers obsess about long-distance communications, but in a typical emergency, chatting with people 100 miles away is not a priority. In contrast, a hand-held two-way radio can be very useful for keeping in touch with your friends and family during any prolonged outage. Again, pick a device that accepts the kind of batteries you can stockpile cheaply. Expect a range of 2-3 miles in rural regions, and less than a mile in highly urbanized areas - no matter what the manufacturer claims. With all that in mind, Olympia R500 ($55) is a good choice.

    Ham radio is a longer-distance option, but generally requires a license; if you are interested in amateur radio, getting a Technician license in the United States is fairly straightforward, and can help you coordinate local response to more substantial emergencies.

  • A thermometer that won't run out of juice. Responding to serious emergencies can be stressful and physically taxing, making it easy to catch nasty infections along the way. To know how bad things have gotten, it's good to have a reliable way to take body temperature; keep in mind that many low-cost axillary thermometers use LR41 batteries, and that you probably don't have any spares lying around. One good choice is this ($35). A traditional glass thermometer will also work, but is more fragile.

  • A small space heater and a fan. Sometimes useful for coping with temperature extremes. Decide for yourself if you need it. If yes, pretty much any make and model will do.

  • A dashcam or a security camera for your home. We'll talk about these later on.

Except for flashlights, don't keep any batteries in your emergency electronics, as to minimize the danger of an electrolyte leak messing up the device.

Of course, there are many other high-tech gadgets popular among some of the more affluent and paranoid preppers - anything from satellite phones, to night vision goggles, to heated insoles. In all likelihood, none of that is worth the cost. If I had to pick two extravagant "doomsday" accessories that could conceivably be useful to some people if something truly awful happens to the world, I'd go with a waterproof hiking GPS unit and a portable Geiger counter. Both are powered by AAA batteries and cost around $140. (We'll talk about Geiger counters and their relative merits a bit later on.)

Inspired by science fiction books and a handful of real-world incidents, some hardcore survivalists worry that their portable electronics or vehicles could be disabled by EMP weapons or solar flares. The concern over solar flares is misplaced; the threat of EMP is a tad more valid, but even if EMP warfare came to pass, small electronics and quasi-shielded automotive circuitry would probably not be permanently affected by anything other than a close blast. Power plants and transmission lines are a different story. Heck, in 1989, solar flares knocked out a good chunk of the Canadian power grid. Still, for that, a surge protector works better than tinfoil.

4.5. Essential tools [link]

While not all urban-dwelling readers may be particularly interested in DIY work, there are times when it's hard to call a handyman. So, almost every home will benefit from having a well-maintained "emergency" toolbox containing several items useful for performing basic repairs and dealing with other minor incidents:

  • A cheap pocket knife (link, $20),

  • A basic, no-frills multitool (link, $30),

  • A small adjustable wrench (link, $8),

  • At least 100 ft of paracord or UHMWPE rope (link, $10),

  • A big roll of duct tape (link, $10),

  • A rudimentary sewing kit (link, $5),

  • A decent pen or a mechanical pencil (link, $12),

  • A pack of writing pads (link, $6),

  • Sharp, large scissors (link, $5),

  • Needle-point tweezers (link, $10),

  • A compact but sturdy hammer (link, $15),

  • A box of 1" nails (link, $2),

  • A usable can opener (link, $7),

  • A sealed bag with several boxes of matches ($5).

Having a medium-size bucket ($8) at home is a must, too. If you own a bicycle and are expecting to use it in emergencies, it would be wise to throw in a bike tool ($20), several tire levers ($5), a patch kit ($5), one or two spare tubes ($10), and a portable pump ($10). Finally, for those who are worried about the decidedly unlikely prospect of having to escape home and fight off radscorpions in the wilderness, a a lightweight hatchet ($25), a folding saw ($20), a larger fixed-blade knife ($24), a folding shovel ($25), a compass ($9), and some matches or a lighter in a waterproof container can come handy in several ways.

A subset of this is also worth keeping in a car. It's not just about zombies or life-and-death situations: if you hit something in a parking lot and your bumper cover comes off or your liftgate won't stay shut, it's nice to be able to tie it down and get back on the road. Similarly, a shovel can help you get back on the road after getting stuck in snow or mud. But speaking of survival: a pocket knife, kept within reach (e.g., in the center console), can be used to cut seat belts if you get into a wreck; and in a pinch, it will double as a self-defense tool.Belt cutters can also fulfill that first task, and may be easier to operate if you are hurt - although they are less useful for other purposes. I'd also recommend getting an automatic center punch - it's a neat $7 tool that effortlessly shatters tempered glass (i.e., side and rear windows) when the doors won't budge. It works way better than many of the specialized car escape devices sold on the Internet.

If you own a house, especially in a region prone to earthquakes or tropical storms, you should probably have a sledgehammer, a chainsaw (with a charged battery or some fuel at hand), bolt cutters, and a pry bar. These heavy tools are essential for clearing debris and getting to whatever's underneath. Keep them far from your other supplies: if your primary stash gets pinned under other junk, you can use the tools to get it out. Don't store pry bars and similar equipment in plain sight; robbers often use found tools to force patio doors, to pop safes, orworse.

No matter where you live, it's also nice to have some materials at hand to patch up broken windows on a stormy night. Window security film can be used to keep broken glass in place, while a roll of thick plastic sheeting or tarp from a hardware store can come handy for temporary repairs; space permitting, you may also want to keep several wooden planks. For suburban and rural homes in regions prone to extreme weather, pressboard and sandbags may be worthwhile, too. Traditional sandbags tend to be extremely labor-intensive to fill, so plan accordingly; water-filled barriers are much easier to deploy, but cost more.Absorbent sock-style barriers can be used to deal with minor flooding, but only up to an inch of water or so; they may be less useful for inclement weather, but may prove indispensable for dealing with backed-up sewage or similar ills.

And now, for something completely different: during a longer water outage, you won't be able to flush your toilet - a little-appreciated but grave hygiene risk. When living in a single-family home, you should probably get a shovel and a pickax: they are useful in the backyard either way, but if push comes to shove, such tools allow you to dig out a latrine and address the sanitation problem in a fairly sustainable way. Of course, dumping bagged human waste into trash will work for a while, too, but it quickly becomes a liability.

4.6. Camping equipment [link]

Many hardcore preppers spend their time fantasizing about heroic survival in the endless, pristine wilderness, equipped with nothing more than a bug out bag, a trusty rifle, and their own iron will. But even in far more realistic situations, being able to set up a camp can be a valuable skill. During mass evacuations, there is always a good chance of being stuck on a congested highway for a day or two, or reaching your destination only to find out that all the hotels and motels are full. The benefits are clear for some small-scale emergencies, too: if backed-up sewage makes your home uninhabitable for a while, setting up a tent in a friend's backyard can be much cheaper than staying in a hotel for several weeks.

Above all, the nice thing about it is that camping gear doesn't need to just sit in your closet, collecting dust on the off chance that something bad may happen a decade from now. You can simply grab it and head out for the weekend every now and then; camping is fun, doubly so for kids. It's also a great opportunity to test some of your other equipment, and spot potential flaws in your preparedness plans.

Especially if you're living in the suburbs or in the countryside, I recommend having the following items at hand:

  • Maps. Essential for finding hospitable destinations, getting there, and finding alternative routes if something goes wrong. I suggest getting both a country road atlas and a more detailed map of your county or state. If you have a car, just keep them there - they may also come handy if you get lost and your cell phone dies.

  • Weather-appropriate clothing. A well-maintained stash of warm clothes, including waterproof ponchos and rain boots. In a pinch, you can also usemetallized Mylar blankets ($0.80 a piece): tie them with some tape to make improvised rainproof, windproof, or thermally insulating clothing and hats, shoe liners, and more. The blankets cost very little and take up virtually no room, so I strongly suggest keeping some in your car. If you're stranded in an inhospitable place, they could save your life.

  • Shelter. The usual combo is an appropriately-sized, waterproofed tent, a set of sleeping bags & pads, and possibly some compressible or inflatable pillows for comfort. In cold weather or during heavy rainfall, it's also possible to shelter in your vehicle, with Mylar blankets serving as a substitute for sleeping bags; and on a hot day, the same material and some rope can be used to improvise a shade. Again, the blankets are worth having in your car at all times.

  • Food prep gear. As discussed in section 4.3, one of the best ways to cook food or to sterilize drinking water on the go is to have several portable propane tanks, a miniature stove ($13), and a lightweight covered pot ($28). Some plastic dinnerware ($13) can be a nice touch. Make sure that the stove fits your propane tanks; you may need a Lindal valve adapter ($20) if not.

  • Mosquito repellent. Yep. End up in the wrong part of the woods and these bastards can suck you dry. Go for 40% DEET ($5) or 20% picaridin ($6). Actually, get both.

Of course, there is also the luxury option: buying a camper or an RV. Such vehicles are frowned upon in many cities, but if you are in a rural area, if it's within your budget, and if you can see yourself using it regularly, go for it - and don't look back.

4.7. Hygiene, health, environmental protection [link]

Humans are pretty fragile. In many of the more serious scenarios discussed in this guide, your survival or well-being may be critically dependent on the ability to deal with incidental medical emergencies, to curb the spread of communicable diseases, or to maintain sanitary conditions at home.

Of course, there are situations where prompt medical attention is simply a necessity; for example, although it may be theoretically possible for an untrained enthusiast equipped with an anatomy handbook to perform appendectomy, the odds of the patient surviving are pretty damn low. That said, outside the domain of major surgery, the outlook is not necessarily as grim - so even when professional help is not available right away, not all hope may be lost.

4.7.1. Health & hygiene topic #1: Basic cleaning supplies [link]

Before we dive into heady stuff, let's talk good housekeeping!

It pays to be prepared for nasty spills or sanitation emergencies. In addition to some of the tools discussed in earlier chapters, a good starting point is a large box of 13 gallon trash bags ($10-$30), another box of thick, 42 gallon contractor bags ($30), a set of disposable vinyl gloves ($4) plus a pair of tough PVC or nitrile ones ($11), some rubbing alcohol ($6), and a bottle of regular laundry bleach ($3). Rubbing alcohol is an excellent solvent and a rapid-evaporating disinfectant; bleach is a potent, long-lasting biocide and a great odor neutralizer. Oh - as noted earlier, anabsorbent sock-style barrier may be useful for containing particularly nasty spills, too.

When it comes to comfort and personal hygiene, I would also suggest stockpiling a carton of toilet paper, a pack of old-school soap bars, a bottle ofno-rinse body wash andshampoo (to conserve water), some antiperspirant, toothpaste and a toothbrush, nail clippers or scissors, and several disposable razors. At home, such items can come handy only during prolonged emergencies; but as a part of your in-car kit, they are invaluable if you are ever stuck somewhere or forget to take your toiletries with you on a camping trip.

As mentioned earlier, water outages can create an unpleasant problem with the disposal of human waste. While a bucket with a trash bag can be used as an impromptu toilet, to keep the conditions sanitary, some form of waste treatment is a must. A cheap option is pouring a layer of clumping (bentonite-based) kitty litter over it after every use; other budget solutions include cement and lime. More expensive choices aregelling agents andRV waste digestants.

Laundry is another (if slightly less pressing) problem that many preppers may have to reckon with. Well-chosen antiperspirants and BZK-based antimicrobal sprays do wonders to control bodily odors and extend the life of undergarments. Beyond that, careful hand-washing and rinsing techniques help minimize waste - but when there is no running water, doing laundry is still going to be a rare luxury for most.

4.7.2. Health & hygiene topic #2: Visibility on the road [link]

In addition to assorted tools and hygiene supplies, your car kit should probably include a high-visibility vest ($7); if your vehicle gives up life, it's better to be visible when trying to revive it or walking to get help. I'm less convinced about the benefits of carrying flares or flare guns; while they can be useful in serious emergencies, they also pose some fire risk.

4.7.3. Health & hygiene topic #3: Medical education [link]

Before you even think about self-medicating or treating wounds, you should get a reasonably systematic understanding of emergency medicine. I recommend getting"Wilderness Medicine: Beyond First Aid" ($10): it is accessible, focuses on situations where diagnostic and treatment facilities are limited, and goes well beyond the basics. Just as importantly, it avoids weird spiritual, homeopathic, or naturopathic claims that often creep up in prepper books.

Two other publications I can recommend are"Where There is No Doctor" and"Where There is No Dentist" by the Hesperian Foundation ($17 a pop for a paperback, but also available online for free). They pay less attention to contemporary meds or nuanced emergency procedures, and spend more time on holistic, community-oriented care for practitioners in some of the most impoverished regions of the world. This probably makes the publications worthwhile for hardcore preppers who worry about widespread, long-term cataclysms.

Now, even after reading all these, don't get too cocky: there are good reasons why it takes about 10 years to become a doctor, and why it involves not just reading a book or two, but also dissecting cadavers and watching other medics at work. When trying to render medical aid, not understanding the limits of your knowledge can literally kill.

4.7.4. Health & hygiene topic #4: Common meds [link]

When living in squalor conditions and running short on supplies, even seemingly prosaic medical conditions can become life-threatening. For example, in less developed countries, otherwise non-lethal diarrheal diseases cause almost 2.5 million deaths every year. The reason is simple: without proper care, the disease makes it easy for the victims to get terminally dehydrated or succumb to severe electrolyte imbalance.

And it's not all about dying, too: a nasty toothache or a debilitating allergy can make it very difficult to stay productive and alert. With all that in mind, my list of essential and easily available prepper medicines includesibuprofen ($10, pain relief),cetirizine ($15, allergy management), amoxicillin ($15, broad-spectrum antibiotic),loperamide ($10, anti-diarrheal), meclizine ($7, prevents vomiting), miconazole nitrate ($10, treats fungal skin infections), bacitracin ointment ($5, bacterial skin infections),topical lidocaine ($20, anesthetic), and hydrocortisone cream ($6, anti-itch). For disinfecting your hands and cleaning wounds,benzalkonium chloride wipes ($4) can work pretty well; for burns, many people swear byhydrogel dressings ($5) orhydrogel creams ($13), too. Finally, for treating severe dehydration, tryoral rehydration packs ($30).

Manufacturers' expiration dates on all meds are very conservative, but even the US governmentintentionally ignores them for its stockpiles of shelf-stable drugs. As far as I can tell, when stored in a fridge, all of these products should be good for 5+ years.

Of course, if you need any prescription meds to survive, try to get a reserve. Except for the case of narcotic painkillers, most doctors should be quite willing to help. In contrast to the shelf-stable substances discussed earlier on, be very careful with expiration dates if your stockpile includes any easily perishable drugs (say, insulin).

The aforementioned short list aside, there are other substances that may treat conditions such as anaphylaxis (epinephrine), or diseases such as tuberculosis and leprosy (isoniazid), uncomplicated appendicitis (levofloxacin), cholera and anthrax (doxycycline), malaria (artemisinin), typhoid fever, skin infections, and MRSA (TMP/SMX), systemic fungal infections (fluconazole), intestinal parasites (albendazole), and so on. In many places, you could legitimately stockpile them without prescription, and some prepper guides will encourage you to do so; but if you are truly concerned about such emergencies, be very aware of the difficulty of properly diagnosing unfamiliar diseases, and the serious health problems that many of these products may cause.

A handful of OTC dietary supplements may be useful for treating some chronic conditions in situations where prescription drugs are not available - but if you want to learn more, be prepared to wade through a sea of low-quality research and outright quackery. Preliminary but somewhat plausible findings include the apparent antidepressant properties of saffron and fish oil, the beneficial effects of curcumin on some types of chronic pain, or the utility of berberine and salacia reticulata in managing type 2 diabetes. Again, tread carefully;examine.com is a good starting point for getting the data behind some of the claims.

Ah, one more thing: for you car kit, I recommend getting some ibuprofen andcaffeine pills ($8). Sure, if you are getting sleepy, you should pull over and get some rest - but if you really can't, caffeine can help you stay alert. Note that it's possible to overdose; the symptoms are typically just very unpleasant, but in rare cases, can be life-threatening.

(For folks who consume coffee or caffeinated beverages daily, and who have near-complete tolerance to caffeine, adrafinil pills can be a viable emergency choice. Adrafinil is a powerful wakefulness-promoting agent with no stimulant properties, and is not a regulated substance in the US and many other parts of the world. Note that daily long-term use carries some risk of liver toxicity and other side effects. Do your homework.)

4.7.5. Health & hygiene topic #5: Dental emergencies [link]

Blame modern diets, blame our longevity, or blame the mistakes of mother nature - but the bottom line is that for most humans, dental problems are a question of "when", not "if". And when excruciating pain strikes at an inopportune time, it's really no laughing matter: in absence of adequate medical care, tooth problems have been known to push some people to the verge of suicide.

Unfortunately for preppers, the management of serious pain in an emergency situation is tricky: virtually all the potent painkillers have narcotic properties and are very illegal to buy or possess without a prescription. Fixing the underlying tooth problem can be similarly elusive: you need expert knowledge and a collection of expensive and bulky tools: high-speed drills, suction units, and so forth. In the end, the best preparedness strategy is just prevention: take good care of your mouth and stop by for a routine checkup at least once a year.

Of course, while this approach reduces the odds of being blindsided by a painful problem, it does not make the risk go away: a chipped tooth or a painful abscess can strike with virtually no warning. If you can't see a dentist right away, OTC painkillers can offer partial relief, but no amount of ibuprofen will let you forget about an exposed nerve. Topicalbenzocaine ointments may work better in some situations, but they don't last very long. Sometimes, swishing some cold water in your mouth, or sucking in air through a carefully positioned straw, can offer decent relief. In the longer haul, amoxicillin can clear up many dental infections, whilezinc oxide / eugenol cement can be used for emergency repair of damaged teeth. There are some reports that repeated treatments of cavities withsilver nitrate can be beneficial, too - but be aware that the substance is caustic and tends to semi-permanently stain skin (and anything else it comes into contact with).

4.7.6. Health & hygiene topic #6: Hemorrhage and wound management [link]

Severe bleeding is one of the major causes of death following an injury. It's an emergency on its own, and knowing how to manage it until help arrives can make all the difference between life and death.

A decent hemorrhage kit should probably include a generous amount of bandages, a tourniquet ($5-$15), clotting gauze ($40), and some duct tape. You should read the manuals and consult an up-to-date first-aid guide, but the basic idea is to apply lots of pressure to any profusely bleeding wounds. This can be done with bandages, clothing, duct tape, or even your elbow, knee, or hips. Clotting gauze or sponges, when pushed into the wound cavity, can help stop bleeding more quickly and stabilize the victim. Tourniquets used to be frowned upon in the past, but when dealing with major trauma to a limb, they sure beat bleeding out to death; it's just that they cause some tissue injury, and if kept on for too long, necrosis may set in and the limb may have to go.

Don't just keep that stuff in your home; it's actually more important to have such a kit in your car (ideally in the center console) and carry something equivalent when biking, hiking, climbing, hunting, or engaging into other injury-prone sports. There are some lightweight ready-made kits ($19) that may do the trick, although making your own is always a better choice.

In addition to such immediately necessary supplies, some prepper guides recommend purchasing sutures, along with tissue forceps and hemostatic clamps. Such equipment may be useful for neatly closing major wounds in situations where bandages won't do - but suturing correctly requires a fair amount of practice and know-how. For gnarly cuts, skin staplers orskin closure strips +benzoin swabs tend to involve less hassle - and are harder to mess up.

For longer-term wound management, in addition to hydrogels and benzalkonium chloride disinfectants discussed earlier on, there is some utility tonon-adherent dressings ($30) andabdominal pads ($7). In a pinch, when dealing with high-drainage wounds, sanitary pads should also do the trick.

4.7.7. Health & hygiene topic #7: Broken or crushed limbs [link]

Your emergency medicine book will go into more details about setting bones, applying splints, or even doing field amputations with a knife and a saw. But even just to deal with a sprained ankle, afolding cane ($14) may be good to have somewhere in your stash. Beyond that, bandages are useful for improvising splints; in areas where improvisation may be difficult - say, in the desert or up in the mountains - portable folding splints ($10) can be handy, too.

4.7.8. Health & hygiene topic #8: Respiratory and environmental protection [link]

When it comes to transmittable diseases, your best bet is avoiding exposure: if there's something really nasty making rounds in your community, stay home - or at the very least, avoid public transport and other crowds. With that in mind, N95 masks ($2 a piece) probably provide adequate protection against most airborne diseases. The other major transmission vector is hand contact, so don't touch other people, avoid public-use surfaces, wear gloves, and resist the instinct to touch your face without first washing or disinfecting your hands. We subconsciously touch our faces a lot more frequently than we suspect.

If you worry about releases from chemical plants or overturned ammonia tankers,3M multi-gas cartridges ($17) andhalf facepieces ($12) may offer robust protection when sized and fitted properly. That said, in most cases, it's more important to develop a plan for sealing your home; walk around and take note of any crawl space inlets, bathroom and kitchen exhausts, chimneys, fireplaces, and any other gaps. In an emergency, you can cover them with trash bags and duct tape.

Although we are entering the realm of extremely unlikely events, if you genuinely worry about encountering an overturned chemical tanker while driving down the highway,3M 5512 escape respirators ($16) offer decent short-term protection against many threats. In addition to low price, their major advantage is their small size; you could conceivably have one for every occupant, and just store that gear in the vehicle.

Of course, some extreme preppers will settle for nothing less than a military-grade gas mask rated for chemical, biological, and nuclear warfare. While it is true that such masks offer much better protection against nerve agents and similar extremely harmful substances, it's not a likely concern in most parts of the world - and either way, it's doubtful that you would have enough time to suit up once the symptoms kick in.

On a perhaps more realistic note: since many of the common and harmful industrial gases are highly water-soluble, breathing through a wet towel or other moist piece of cloth, or draping it to form a tent over an infant's car seat or a stroller, might offer some very short-term protection when all other options fail.

4.7.9. Health & hygiene topic #9: Vector control [link]

In some parts of the world, mosquitoes, flies, and other biting insects are major vectors for extremely serious diseases, such as malaria, African sleeping sickness, dengue fever, or lymphatic filariasis. The same is not a grave concern in more temperate climates; although malaria used to be a problem in some of the southern states, it has been eradicated by 1951. Today, some of the most serious incidents in the US and in Europe are the occassional cases of Lyme borreliosis or the West Nile virus.

Still, if you are worried about the situation changing for the worse, repellents such as DEET and picaridin can provide the first line of defense. Beyond that, more radical solutions may includeelectric bug zappers (especially when coupled with mosquito attractants, such as octenol or lactic acid),permethrin orpyrethrin insecticide sprays (applied to clothes or to the perimeter), mesh jackets, window screens, and bed nets. For crawling insects, borax and diatomaceous earth can act as a deadly barrier, too.

While serious zoonotic diseases can be also spread by birds, rodents, or even cats and dogs, such vectors are more easily controlled or avoided by maintaining sanitary conditions at home; in extreme cases, traps or poisons such as bromadiolone may do the trick, but unless you are living in a place prone to infestations, I wouldn't worry too much.

4.7.10. Health & hygiene topic #10: Dealing with nuclear fallout [link]

There are quite a few pop culture myths surrounding the dangers of nuclear incidents, contributing to a defeatist attitude among even some of the most hardened preppers. But in reality, such events are a lot more survivable than portrayed in fiction - and perhaps more importantly, the world that awaits the survivors would not necessarily be all that bleak. A good way to explore this topic is a book titled"Nuclear War Survival Skills". It sounds goofy, but it's been written by the folks who worked on the Manhattan Project, and is as close to scientific truth as you can get; plus, it is not copyrighted and can be downloaded for free.

But to summarize, let's start with the eponymous threat of nuclear war. A typical ICBM strike is likely to kill most people within a 1 to 10 mile radius of the explosion, with most perishing due to the blast wave and intense heat, not gamma rays. In fact, as witnessed in Hiroshima and Nagasaki, when one sees a flash of light, ducking behind cover is quite likely to save their life. But more importantly, even an "all out" nuclear exchange with another superpower would leave most of the United States unscathed. It would also not turn the planet into a post-apocalyptic wasteland - at least not any more than the hundreds of nuclear tests already conducted in the twentieth century.

The fallout threat tends to be overblown, too. For one, air bursts, which are preferred because of their improved blast radius, do produce that much of it; far more tends to be released during nuclear power plant meltdowns or ground bursts. In any case, whatever gets kicked up in the air can travel hundreds of miles before settling down. So, in the aftermath of an incident, getting indoors and sealing your home should be your first instinct. Basic respiratory protection can help, too.

At first, the falling dust will be extremely radioactive and even short-term exposure might be lethal - so your best bet would be to seek shelter in the basement, or near the center of mass of any other building. This maximizes the mass between you and the outside world, shielding you from the gamma rays produced by whatever happens to settle on the roof and the outside walls. The density and volume of the shielding material matters more than anything else. It does not have to be lead; mattresses and bulky furniture should do.

Luckily for the survivors, the highly radioactive isotopes present in the fallout are also very-short lived; the intensity of radiation will likely drop ten-fold within 6-8 hours, and will decrease a hundred-fold within two days. If you wait a week or two, it should be quite safe to venture out. Of course, it's still best to stay indoors for as long as possible, and when heading out, it's good to keep the trips short, to wear disposable coveralls ($11), and to take care not to track any residues into your home. But you don't need to lock yourself in an underground vault.

This brings us to an interesting question: if the radioactivity decays so quickly, why aren't people moving back to Fukushima or Chernobyl? Well... spare for several small hotspots, the exclusion zones are safe to walk around, but it can be more dangerous to drink contaminated water or eat local wildlife or crops. Our body may end up using some of the longer-lived radioisotopes as biological building blocks - which would expose us to low-grade radiation, at an extremely close range, for the rest of our lives. While it is usually not a death sentence, this phenomena is bound to produce a measurable spike in mortality across any sufficiently large population. It is more humane and more socially acceptable to keep people out.

Still, this does not mean that the survivors of a nuclear war would have to choose between starvation and death. Water and food stored in closed containers will not become radioactive - people would just have to be mindful of the dust on top. Crops can be grown after removing several inches of topsoil, and most rivers, streams, and creeks become safe quite rapidly (shallow bodies of standing water are a different animal). In other words, with basic precautions, it's quite possible to thrive in the aftermath of even the worst nuclear war. All it takes is some luck and a bit of knowledge; blast-proof bunkers are not a must.

In fact, one of the most significant health consequences of nuclear accidents is also very easy to manage: it's the release of copious amounts of radioactive iodine, a short-lived substance that gets absorbed by the thyroid gland. To deal with this issue, people in the affected areas are typically offered potassium iodide pills; this temporarily saturates thyroid and prevents any further uptake of iodine for a couple of days or weeks. Such tablets are available over-the-counter and dirt cheap ($7), so it's not a bad idea to have some at hand.

Other than that, there isn't much that can be done to limit the damage caused by serious exposure to radiation. Some animal studies suggest that pyrroloquinoline quinone (PQQ), an OTC dietary supplement, can have fairly pronounced radioprotective benefits. While the evidence is very preliminary, the substance is believed to be pretty safe, so you can certainly grab some just in case. Another potentially beneficial OTC products along the same lines are diindolylmethane (DIM) andn-acetylcysteine (NAC).

With all this out of the way, let's get back to a gadget mentioned a bit earlier in this guide: Geiger counters. Unless you're an emergency responder, you may not really need one. That said, such a device could conceivably help you stay informed and keep your family and friends at ease - and I don't mean just the remote possibility of a nuclear war. Consider all the bogus rumors of contaminated water and food in the aftermath of Fukushima; a radiation meter could have put any such speculation to rest.

Of course, to use a Geiger counter effectively, you need to know how to interpret the results. Although some controversy exists, the prevailing view is that the effects of radiation are cumulative in a fairly linear fashion; here's what you can expect once you hit a particular dose:

  • 100 mSv (millisieverts): no immediate effects. A marginal but measurable increase in the likelihood of developing cancer later in life (+0.5%). This dose was received by a handful of residents during the Fukushima disaster in 2011.

  • 1 Sv: mild radiation sickness and a substantial increase in lifetime cancer risk (around +6%). A dose that might have been received by some subset of residents near Chernobyl in 1986.

  • 2 Sv: severe radiation sickness with vomiting and hair loss. Dangerous but with good chances of survival. A pretty substantial risk of cancer down the line (+12%).

  • 5 Sv: typically lethal, although there is a chance of recovery with proper medical treatment. Survivors are highly likely to develop cancer later on.

  • 10+ Sv: nearly always fatal. A dose received by some of the first responders at Chernobyl.

Some Geiger counters can keep track of the cumulative dose for you, but most will simply display the rate at which you are getting exposed - typically in microsieverts per hour (µSv/h) or microroentgens per hour (µR/h; for gamma radiation, 1 R/h ≈ 1/100 Sv/h). To figure out what the reading means, you need to do the math: for example, at 600 µSv/h, you will hit 100 mSv within a week, and 1 Sv within about two months. (The usual background rate from natural sources hovers around 0.1-0.2 µSv/h.)

For folks interested in getting a nice, compact Geiger counter,Radex One ($120) is pretty hard to beat; it is tiny, inexpensive, and can be hooked up to a PC to continuously monitor the environment (and send e-mail or SMS alerts). The one caveat is that similarly to many other low-cost units, this device maxes out at 1 mSv/h - enough to know that something is very wrong, but not enough to tell if you're going to receive a life-threatening dose in an hour or somewhere within the next six months. In other words, some of the more hardcore preppers may want to invest in a more capable unit, such as ADM-300 (which goes all the way to 100 Sv/h) or RAD-60R (3 Sv/h). Decommissioned military and civilian devices in excellent working condition can be found on eBay for around $200.

4.8. Self-defense and personal security [link]

As discussed earlier in this guide, we face surprisingly high lifetime odds of becoming victims of burglary, assault, or other major crime. To deal with this danger, the guide promotes a handful of passive risk avoidance and loss minimization strategies, with the bulk of this advice found in section 3.5. But it would be dishonest to claim that such methods will always shield us from harm - so in this chapter, let's have a look at some of the tools that serve as the last line of defense when all other approaches fail.

4.8.1. Defense topic #1: Protecting your personal property [link]

It is fiendishly difficult to safeguard your belongings when you're not home. When dealing with opportunistic burglaries, a heavy, bolted-down safe, ideally ordered directly from a reputable manufacturer, is probably your best defensive tool. Against sophisticated adversaries on a targeted job, almost all bets are off; in such cases, operational security (section 3.5.3) is more important than any amount of high-tech gear.

Now, when asked about the best way to make a residence burglar-proof, most people would probably mention getting an alarm system. But alarm systems are fairly weak deterrents against theft; most statistics suggest that they reduce the likelihood of a break-in by around 50%. So, do the math: take the costs of installing an alarm system (probably around $2,000 for a comprehensive solution), plus the ongoing monitoring fees (easily $200-$500/year), and then contrast these numbers with the likely loss in case of one or two break-ins over the next several decades. Keep in mind that even if the numbers are favorable, a high-quality safe ($500+) may still be a more cost-effective approach.

Alarm systems aside, cameras are another popular security tool. They do relatively little to deter theft, but can document all sorts of problematic encounters - and in the event of a burglary, perhaps improve the odds of recovering stolen goods. Decent wi-fi cameras start at $100 a piece; many models can record to a local SD card, although having a centralized DVR unit ($200+), ideally stowed away in an inconspicuous place, will make the system more robust.

Some preppers advocate "hardening" the perimeter of your home. The returns on this investment will vary; for example, high-security locks and reinforced doors may be worthwhile in high-rise apartment buildings, where the front door may be the only way in. For single-family homes, the burglars will probably not bother with the locks at all; forcing open a bathroom window takes much less work. Tall fences and locked backyard gates can help, although their benefits are limited in rural areas or in shady neighborhoods.

The other tools worth mentioning here may be remote motion detectors, such aspassive IR monitors or beam sensors. They won't do squat when you're not on premises, but when you're home, they can give you an advance warning about unwanted visitors. It's a remote concern, but the sensors are relatively cheap, so just do what feels right.

As for cars: there is no hope. Don't leave anything of substantial value in the vehicle, and if the car itself is expensive, have it insured against theft (setting your deductible to $1,000 or more keep the premiums low). Avoid tempting the thieves in any way: countless car windows have been smashed over a $5 bill and some coins left in the cup holder. Put spare change somewhere else.

4.8.2. Defense topic #2: Limiting liability for car accidents [link]

Vehicular accidents are depressingly common; while defensive driving can limit your risk, the possibility of injuring another person or causing property damage never really goes away. When you are involved in a car wreck in unclear circumstances, or when your statements do not match the words of another driver, video evidence may be the best way to escape criminal charges or to resolve civil claims.

It used to be that dashcams were prohibitively expensive; but today, the prices start at $50, so it makes sense to give the devices a try. I can recommendRexing V1 ($100), but there are countless other options to choose from. The bottom line is, if you own a car, it's probably the most affordable and meaningful liability insurance policy you can get.

4.8.3. Defense topic #3: Fighting for your life [link]

In theory, a person's natural right to self-defense is broadly recognized in much of the western world - but in practice, different societies look at it in very different ways. Today, in much of Europe, the very notion that one private citizen could lawfully harm another human being is met with suspicion and distaste; the control over life and death is more willingly delegated to the agents of the state.

These differences manifest in how the regulators around the globe approach anything from knives to pepper spray - but of course, no topic is more contentious than firearms. The debate about the social benefits and costs of gun ownership is hopelessly polarizing and clouded by emotion; I'm certain that roughly half of the folks reading this document have a very visceral, negative reaction to the very idea that a private person should be allowed to carry a gun - and I do not honestly expect to change their minds.

That said, when we look beyond the dogma, the underlying facts paint an an incredibly nuanced picture of the right to bear arms - putting into question many of the deeply-held and seemingly common-sense beliefs. For example, despite the striking ubiquity of legally owned firearms in the United States - about one per every resident - the country actually enjoys lower per-capita rates of suicide, robbery, assault, or rape, compared to some of its esteemed European peers. This simple fact deals a serious blow to the creed that more guns translate to more crime.

Of course, this observation ignores one important fact: compared to EU countries, the United States suffers from a markedly elevated (but rapidly falling) rate of homicide. About two thirds of them are committed with guns - but lest we jump to conclusions, the non-firearm-related murder rate alone puts America well ahead of most of Europe, suggesting that the cause may have more to do with societal differences than with the availability of a particular tool. A finding that supports this theory is the fact that upward of 80% of US gun homicides trace back to gang activity and drug trade, often within the disadvantaged or impoverished strata of the society that are far less prominent on the old continent. Another telling observation is that comparisons of overall murder rates across US states or across EU countries with vastly different firearms ownership profiles don't reveal a convincing correlation between the two variables - something you would expect to see if legally owned guns had a causatory relationship with violent crime.

There is also a more utilitarian way of looking at it. From an individualistic, survival-focused point of view, the social costs (real or imagined) are basically moot: if you live in a place where guns are readily available to criminals, it's hard to think of a violent confrontation where not owning a firearm would put you at an advantage. There is a body of fairly compelling research showing that defensive gun uses happen in the US at a rate of somewhere between 500,000 and 1,500,000 times a year, with almost all confrontations resolved without firing a single shot. The inherent dangers of owning a firearm are often overstated by gun control advocates, too: unintentional injury or death due to having a gun at home issurprisingly rare.

All in all, it's OK to reject armed self-defense (or shun guns in particular) on religious or moral grounds - but doing so is probably not a particularly rational decision within the scope of this guide. From a rational standpoint, you should always pick the tools that are best suited for the scenarios you anticipate (provided that the state allows you to). Of course, a firearm is not always the answer, so let's take a broader look at some of the most popular options for shooing away looters or defending yourself:

  • Bare hands. No deterrent effect, but surprisingly effective when a confrontation can't be avoided - especially when facing a single assailant. Reserved for people who are physically fit and willing to invest a fair amount of time into training. One of the most pragmatic and widely-taught schools is Krav Maga, and there's certainly no harm in checking it out.

  • Pepper spray. An excellent, temporarily incapacitating weapon - very difficult to resist and capable of buying you just enough time to escape. Works quickly and reliably at distances up to perhaps 10 feet; can also stop some animal attacks. Usually not heavily regulated, making it easy to obtain and carry even in places that frown upon other forms of armed self-defense (but check the laws). Pepper spray becomes less effective in strong wind; there is also some risk of blowback, but this is mitigated in narrow-stream products, such as Sabre Pepper Gel ($18).

  • Knives. Very lethal and dangerous at close quarters, but only provided that you have the element of surprise on your side. They require some degree of physical fitness and training to use well. Their value is diminished when facing multiple assailants or dealing with a gun-wielding individual: even if you stab them, you are probably still gonna get shot. In a handful of places, carrying a knife may be illegal or subject to somewhat confusing restrictions, so perform due diligence if you want to take this route.

  • Stun guns. A nice idea, in theory. Unfortunately, most products require direct body contact with the attacker, are easily foiled by clothing, and may be less effective against people who are well-built, unusually agitated, or just high on drugs. While it's a popular self-defense choice, I can't honestly recommend it over pepper spray.

    (Projectile-type stun guns, such as Taser C2, are far better and work at a distance - but you need to have perfect aim on first try. They also cost quite a bit.)

  • Firearms. A very effective and supremely intimidating weapon, with lethality ranging from 20% for handguns to 80% for shotguns; for a novice user, the effective range is somewhere between 10 and 100 yards. Guns are heavily regulated in much of the world, but widely available in the US - although there are several states or municipalities that make it very difficult to get a permit unless you are a celebrity or a prominent donor.

    Even if your local government does not issue carry permits or erects other bureaucratic roadblocks, having a firearm in your home can provide a very effective deterrent in case of home intrusions. That said, a gun is also a responsibility: similarly to a chainsaw, you are either serious about following the safety rules, or somebody may get hurt.

Interestingly, the legal bar for claiming self-defense is typically no different whether you are using a less-lethal weapon or lethal force. But of course, the legal and psychological consequences of being wrong can be far more severe if you kill a person, versus just making their eyes itch. There are no easy answers, so do some soul-searching first. If you can't imagine killing another person to protect your family - and living with the consequences - don't get a knife or a gun.

4.8.4. Defense topic #4: Understanding firearms [link]

If you are contemplating getting a gun for home defense or for more outlandish survival scenarios, the first choice you will face is between a handgun, a shotgun, and a rifle. Here's what you need to know:

  • Handguns. This category encompasses a wide selection of small, lower-powered firearms that can be easily carried without attracting attention. Most have a fairly modest stopping power and require quite a bit of practice to accurately hit anything more than 10 yards away. A telling statistic is that in shootouts, the police have a hit rate somewhere between 10% and 30%; contrary to what some gun control supporters claim, an average policeman does not get that much practice, and probably trains less than your typical gun enthusiast - but these numbers are still something to keep in mind.

    Handguns are typically regulated more heavily than other firearms, in part because they account for the overwhelming majority of all gun crime. If you can get one, your basic choice is between:

    • Semi-automatic pistols. Typically capable of firing somewhere around 6-17 rounds from a removable magazine; reloading is very fast, provided that you carry another magazine with you. Their user interface is relatively complex, and some knowledge is needed to deal with potential misfires, jams, or to avoid negligent discharges - although the probability of any such issues is generally very low.

    • Revolvers. A more ancient type of a repeating firearm, usually holding 5-8 rounds in a non-removable cylinder. They are functionally simple, very dependable, and pretty accurate - but take more time to reload if it ever comes to that.

    You may be tempted to go for the most lightweight and highest-powered handgun you can find, but you would have to cope with punishing recoil and potentially blinding muzzle flash, so it's not always a good call. In home defense situations, 9 mm pistols and .38 Special+P revolvers are probably the sweet spot. There are too many models to make specific recommendations, but you can't go particularly wrong with Glock, Beretta, Sig Sauer, Ruger, Smith & Wesson, or Springfield Armory; some very futuristic if a tad more expensive revolvers are made by Chiappa, too. Whatever you do, avoid Taurus.

  • Rifles. Long, heavy guns, usually with detachable magazines housing anywhere from 4 to 30 rounds. Rifles fire high-velocity projectiles capable of accurately striking distant targets - and even a complete novice should be able to hit targets 25-50 yards away. With plenty of practice (and expensive optics), some rifles allow reliable hits at 1,000 yards or so.

    The most popular category are semi-automatic rifles, including the scary-looking AR-15 clones, the much less villainous Ruger Mini-14, and a bunch of in-between choices, such as Ares SCR. All three are known for reliability and good accuracy. Semi-automatics typically fire relatively small but high-energy projectiles (e.g., .223 Remington / 5.56x45 mm NATO); such projectiles are still suitable for home defense and hunting small to medium game.

    Another popular pick are bolt-action rifles, including Remington 700,Ruger Hawkeye, and Ruger Precision Rifle. Although there is a lot of variety, many are chambered for larger cartridges ideal for hunting big game (from .243 Winchester to .50 BMG) and are more suited for long-range shooting. For home defense, overpenetration becomes a significant concern.

    In the US, long guns are subject to fewer restrictions than handguns, chiefly because of their negligible role in street crime; that said, "assault weapons" - i.e., semi-automatic rifles with scary-looking cosmetic features, such as barrel shrouds or forward grips - have been a subject of recurring moral panics and various state- or municipality-level restrictions and bans.

    Perhaps interestingly, there is a handful of rifles chambered for handgun ammunition, includingRuger 77 series and Henry Big Boy. In the prepper context, their appeal is that you only need to keep one kind of ammo for both firearms. Putting a handgun caliber in a rifle gives you greatly improved accuracy, virtually no recoil, and somewhat improved range - but going past 100 yards is still going to be a stretch.

  • Shotguns. Long, heavy, large-bore weapons with tremendous stopping power, variously firing one large metal slug or a swarm of high-energy pellets; less-lethal rubber batons are also sometimes used for crowd or animal control. Aimed as easily as rifles, but because of the less ergonomic shapes of projectiles and their lower velocities, the effective range of a shotgun doesn't extend far beyond 100-200 yards. In places such as Australia or the UK, buying a shotgun is subject to fewer restrictions than other types of firearms.

    Excellent for home defense, where they combine high stopping power and accuracy with reduced risk of overpenetration. Also popular for waterfowl hunting (where multiple projectiles reduce the need for very precise aim), deer hunting, and for encounters with predators such as mountain lions, bears, and the like.

    Most shotguns pack a substantial amount of recoil, although lower-powered loads or smaller-gauge variants (e.g., 20 ga) can be operated by small-framed or younger shooters. Capacity typically ranges from 2 to 8 shells. A very affordable, popular, and reliable type of a shotgun is pump-action (reloaded by racking the slide); two best-known examples are Remington 870 andMossberg 590.

If you decide to get a gun, you must learn how to operate it safely: sign up for a basic course or have someone truly competent take you to the range. The basic safety rules can be summed up as:

  • Rule #1: When picking up a gun, always assume that it's loaded. Don't trust others and definitely don't trust your own memory. Always double-check. If you don't know how to operate a particular gun, ask before touching it. In firearms with removable magazines, always check the chamber after removing the mag.

  • Rule #2: Assume that you will eventually break rule #1, so when handling a gun, always keep it pointed in a safe direction. "Sweeping" other people is a no-no, so is looking down the barrel. At the shooting range, the safe direction is down range, toward the backstop. At home, just be mindful of neighbors and people in other rooms.

  • Rule #3: Assume that you will eventually break rules #1 and #2, so keep your finger off the trigger unless the gun is aimed and you're ready to fire.

  • Rule #4: When firing, know your target and what's beyond it. You don't want to shoot a drunk family member in the middle of the night, or have a bullet go through your target and strike a bystander.

With the rules internalized, you are extremely unlikely to cause unintentional harm. Keep practicing at least twice a month until you get good, and then go to the range at least several times a year. Try to use practice ammo with lead-free primers and clean bullets (e.g., RUAG Copper Matrix, Magtech Clean Range, Winchester Super Clean, Federal Ballisticlean) and avoid tracking lead residues from indoor ranges back home - especially if you have small kids. Always wear hearing and eye protection, too.

Keep your firearms in a quick-access safe if you have young children or expect people with kids to visit you every now and then. A safe is also a good way to deter opportunistic theft; a clever hiding place will also do, but criminals often have the same ideas as you and know where to look. Be smart about picking the right safe and placing it sensibly: you don't want to have to walk to the other end of the house, or to fiddle with keys or rotary dials, when every second counts. Electronic combination or biometric safes are usually pretty good, unless you go for the bottom dollar (don't).

5. Organizing and tracking your supplies [link]

Robust bookkeeping is an essential component of any preparedness plan. Without a neat spreadsheet to go back to, you will eventually lose track of the stuff you have, won't be able to locate critical supplies in a pinch, and won't know if and when your batteries, food, or meds have gone bad.

To get it right, make a list of all your emergency gear, along with expiration dates where applicable. Next, go through the list marking all the "stays home" stuff - the supplies that are impractical to haul around or not particularly essential when evacuating. Make sure that all the tactical gear - such as flashlights, fire extinguishers, first-aid kits, and self-defense weapons - are in a logical and easily reached place. For the remaining "stay home" items, just find an unobtrusive location, stow them away, and write the spot down in your spreadsheet.

The task of organizing the essentials you want to travel with is a bit more involved. For car owners, I suggest preparing two separate kits:

  • Boxed evacuation essentials. Camping and survival supplies to get you through at least one week, in case you need to leave home and can't be sure about finding a hospitable location right away. The gear should be boxed or bagged to make it easy to load into your vehicle. Include some amount of water and food, and make sure that the entire kit actually fits into the car. For many US cars, 56 quart storage totes ($19) work very well.

  • A get-me-home box. A container always kept in the trunk, small enough so that it doesn't hinder your normal use of the car, but substantial enough to help you survive several days (or cope with other, more prosaic roadside emergencies). The kit should include 1-2 gallons of water, Mylar blankets, rope, and other car supplies discussed earlier in the guide. A collapsible water bottle and afolding daypack can be useful if you have to walk on foot from a broken car to the nearest town. Throwing in some cash - just enough to pay for gas, a meal, a motel room, or a ride home - is also a good plan.

While you're at it, also check that you have a spare tire, a jack, a lug wrench, and a box of extra fuses. They come optional on some very cheap cars, and may be simply missing when you buy a used one. Some people find out too late.

Folks without a car are at a marked disadvantage, but should still try to put together a 72-hour "bug out bag" - and ideally, keep it somewhere within a walking or biking distance of their home (say, at work or at a friend's place). It's best to keep it light; some cash, 2-4 quarts of water, a 3,600 kcal emergency ration, and a raincoat will be almost certainly more useful than a gun and a collection of throwing knives.

Either way, when done with the list, be sure to re-read the response plans you drafted earlier on and cross-reference them with this spreadsheet. Iterate until you're happy with both, then print out the docs and place them somewhere intuitive. In a stressful situation, you will be able to quickly review the printouts to confirm that you are not missing anything.

6. Final words [link]

Hey, nice! You made it to the very end! So, here is a closing thought...

Rational prepping is meant to give you confidence to go about your business, knowing that you are well-equipped to weather out adversities. But it should not be about convincing yourself that the collapse is just around the bend, and letting that thought consume and disrupt your life.

Stay positive: the world is probably not ending, and there is a good chance that it will be an even better place for our children than it is for us. But the universe is a harsh mistress, and there is only so much faith we should be putting in good fortune, in benevolent governments, or in the wonders of modern technology. So, always have a backup plan.

Follow the author on Twitter:@lcamtuf.
Send in your feedback, questions, or kind words:lcamtuf@coredump.cx.

Your lucky number is: 17650345

BGP leaks causing internet outages in Japan and beyond

$
0
0
Yesterday some Internet users would have seen issues with their Internet connectivity, experiencing slowness or parts of the Internet as unreachable. This incident hit users in Japan particularly hard and it caused the Internal Affairs and Communications Ministry of Japan to start an investigation into what caused the large-scale internet disruption that slowed or blocked access to websites and online services for dozens of Japanese companies. In this blog post we will take a look at the root cause of these outages, who was affected and what networks were involved. Starting at 03:22 UTC yesterday (aug 25) followers of @BGPstream would have seen an increase in alerts involving Google. The BGPstream alerts were informing us that Google was announcing the peering lan prefixes of a few well known Internet exchanges. This in itself is actually a fairly common type of incident and typically indicates something isn’t quite right within the networks hijacking those prefixes and so these alerts were the first clues that something wasn’t quite right with Google’s BGP advertisements.   A closer look at our data shows not only BGP hijack incidents but also a high number of BGP leak events. A random example is this one: 171.5.0.0/17 announced by AS45629 (Jastel out of Thailand), which all of a sudden became reachable with Google as a provider for Jastel. To demonstrate this let’s look at some of the example paths (not an exclusive list):  
1103 286 701 15169 45629
13335 9498 5511 701 15169 45629
202140 29075 5511 701 15169 45629
52342 20299 262206 701 15169 45629
If we take a closer look at the AS paths involved starting at the right side, we see the prefix was announced by 45629 (Jastel) as expected. Since Jastel peers with Google (15169) that’s the next AS we see. The next AS in the path is 701 (Verizon) and this is where it is getting interesting as Verizon has now started to provide transit for Jastel via Google. Verizon (701) then announced that to several of it’s customers, some of them very large such as KPN (286) and Orange (5511). So by just looking at 4 example paths we can see it hit large networks in Europe, Latin America, the US, and India (9498 Airtel).In the example above we can see how Google accidentally became a transit provider for Jastel  by announcing peer prefixes to Verizon. Since verizon would select this path to Jastel it would have sent traffic for this network towards Google. Not only did this happen for Jastel, but thousands of other networks as well. Google is not a transit provider and traffic for 3rd party networks should never go through the Google network. Jastel has a few upstream providers and with the addition of Google and Verizon to the path, it’s likely only Verizon customers (which is still significant) would have chosen this path and only those that had no other alternative or specifically prefered Verizon over shorter paths.  However this is just the start.  

A word about traffic engineering

Google is one of the largest (CDN) networks in the world. It has an open peering policy and is extremely well connected with many peers. It’s also the source of a large amount of traffic with popular websites such as Youtube, Google search, Google Drive, Google Compute, etc. As a result many networks exchange a significant volume of traffic with just Google and those with direct peering with Google will want to make sure Google picks the right peering link with them. So as result large networks will start to deploy traffic engineering tricks to make sure traffic flows over the correct peering links with Google. The most powerful trick in the book is to start de-aggregating and announce more specifics. This means no matter the AS path length or whatever local-pref Google sets locally, the more specific prefixes are always preferred.   A unique insight into Google’s networkSince Google essentially leaked a full table towards Verizon, we get to peek into what Google’s peering relationships look like and how their peers traffic engineer towards Google. Analyzing this data set we find many more specific prefixes. Meaning prefixes that are not normally seen in the global Internet routing table (DFZ) and only made visible to Google for traffic engineering requirements. Let’s take a look at an example. The prefix 114.154.133.0/24 is not normally seen on the Internet, instead it is announced as the larger aggregate 114.144.0.0/12 by AS4713 NTT OCN, the largest service provider in Japan. During the time of the incident we see over 20,000 new OCN prefixes, all more specifics of their larger aggregate blocks (mainly their /11, /12’s, /13’s, 14’s and /15’s).  In this case OCN announced these more specific prefixes primarily to control how traffic comes in from Google. Now that Google leaked these prefixes to Verizon as well, everyone seeing announcements for these prefixes would have sent traffic for this prefix towards Verizon and Google, essentially changing the local traffic engineering trick into a much more global traffic engineering setup. Verizon customers and peers that would have seen this announcement would have preferred this over any other path since more specifics always win.    

Size and impact of this incident

If we look at what networks were impacted the most we can see that AS4713 NTT OCN, the largest service provider in Japan was impacted most severe. Our data shows over 24,000 new more specific prefixes for OCN were visible via Google and Verizon during the time of the incident. We also saw over 7,000 new more specifics for AS7029 (Windstream). The total list of new (mostly more specifics) is around 50,000. For those interested, the top 30 affected networks can be found below.  All of these leaks were visible between 03:22 UTC and 03:33 UTC, with some peers seeing the leaked paths till about 04:00 UTC. Or in local Japan time: 12:22 PM and 1:01 PM.       
Number of new prefixes via Google and Verizon ASN ASN name
24834 AS4713   OCN - NTT Communications Corporation  
7715 AS7029   Windstream Communications Inc                            
4650 AS8151   Uninet S.A. de C.V.                                      
2852 AS1659   Taiwan Academic Network (TANet) Information Center       
1746 AS3209   Vodafone GmbH                                            
1315 AS2519   ARTERIA Networks Corporation                             
1218 AS28573   CLARO S.A.                                              
614 AS9394   China TieTong Telecommunications Corporation             
560 AS12715   Orange Espagne S.A.U.                                   
506 AS27747   Telecentro S.A.                                         
463 AS16814   NSS S.A.                                                
430 AS12066   TRICOM                                                  
428 AS45510   TELCOINABOX PTY LTD                                     
404 AS11830   Instituto Costarricense de Electricidad y Telecom.      
369 AS39651   Com Hem AB                                              
357 AS6400   Compañía Dominicana de Teléfonos, C. por A. - CODETEL    
316 AS10318   CABLEVISION S.A.                                        
280 AS5615   KPN B.V.                                                 
225 AS4181   TDS TELECOM                                              
224 AS43205   Bulsatcom EAD                                           
221 AS17908   Tata Communications                                     
183 AS395105   HYTEC-7779                                             
179 AS45194   Syscon Infoway Pvt. Ltd.                                
166 AS9676   SaveCom Internation Inc.                                 
164 AS4764   Wideband Networks Pty Ltd, Transit AS                    
152 AS18106   Viewqwest Pte Ltd                                       
140 AS45069   china tietong Shandong net                              
131 AS10481   Prima S.A.                                              
128 AS13445   Cisco Webex LLC                                         
126 AS13156   Cabovisao, televisao por cabovisao, sa                  
 

Closing thoughts

In total we saw over 135,000 prefixes visible via the Google - Verizon path. Widespread outages, particularly in Japan (OCN) were because of the more specifics, causing many networks to reroute traffic toward verizon and Google which likely would have congested that path or perhaps hit some kind of acl, resulting in the outages. Many BGPmon users would have seen an alert similar like the one below, informing them new prefixes were being originated and visible global. 
====================================================================
New prefix for AS14061 (Code: 60)
====================================================================
Detected new prefix:  178.62.96.0/19
Update time:          2017-08-25 03:25 (UTC)
Detected by #peers:   18
Announced by:         AS14061 (Digital Ocean, Inc.)
Upstream AS:          AS15169 (Google Inc.)
ASpath:               18356 38794 45796 2516 701 15169 14061
Monitoring is one simple thing operators can do to quickly detect this and take action. In this case the recommended course of action would have been to shutdown the peering sessions with Google.BGP leaks continue to be a great risk to the Internet's stability. It’s easy to make configuration mistakes that can lead to incidents like this. In this case it appears a configuration error or software problem in Google's network led to inadvertently announcing thousands of prefixes to Verizon, who in turn propagated the leak to many of its peers. Since it is easy to make configurations errors, it clearly is a necessity to have filters on both sides of an EBGP session. In this case it appears Verizon had little or no filters, and accepted most if not all BGP announcements from Google which lead to widespread service disruptions. At the minimum Verizon should probably have a maximum-prefix limit on their side and perhaps some as-path filters which would have prevented the wide spread impact.
Viewing all 25817 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>