This site is dedicated to all things I see and that I think are interesting to publish almost always are other very smart people.

WELCOME TO MY LITTLE POSTEROUS

I would like to make the top menu on my page left aligned instead of right aligned. Does anyone know how? On my screen, it looks left aligned because there are enough pages to make the menu reach all the way to the left edge of the white container. But it is not, and I know that shows on other screen/other browsers. Always grateful for any help!

Latest

M.C. Escher on Loneliness, Creativity, and How Rachel Carson Inspired His Art, with a Side of Bach

Brain Pickings by Maria Popova / October 04, 2022 at 09:32PM

Thanks! Your feedback helps make Leo smarter. Leo was 71% confident this article was about Art.

“A person who is lucidly aware of the miracles that surround him, who has learned to bear up under the loneliness, has made quite a bit of progress on the road to wisdom.”


M.C. Escher on Loneliness, Creativity, and How Rachel Carson Inspired His Art, with a Side of Bach

“If you write what you yourself sincerely think and feel and are interested in,” Rachel Carson wrote as she contemplated the loneliness of creative work after her unexampled books about the sea made her one of the most beloved writers of her time, “you will interest other people.”

She couldn’t have known it then, but across the Atlantic another visionary was drawing creative succor from her work while reckoning with the same blessed burden of the unexampled.

M.C. Escher: Self-Portrait in Spherical Mirror, 1935.

In the autumn of 1955, M.C. Escher (June 17, 1898–March 17, 1972) wrote to his son:

A person who is lucidly aware of the miracles that surround him, who has learned to bear up under the loneliness, has made quite a bit of progress on the road to wisdom.

Escher spent his life trying to bear up under the loneliness of gift — the product of a rare mind best described, to use a notion alien to his epoch, as gloriously neurodivergent. His stunningly detailed lithographs and his meticulous woodcuts, his reality-warping geometries and astonishing tessellation and pleasantly unnerving defiances of gravity partway between optical illusion and dream, were a hallmark of the lonely patience of creative work, which often left him feeling like a “miserable fanatic,” “always wandering around in enigmas,” afflicted by an “association-mania.”

M. C. Escher: The Fifth Day of Creation. (Available as a print.)

Like Carson, who was too lyrical for science and too scientific for literature, Escher inhabited two worlds as an outsider to both; he felt that scientists nodded politely at his mathematically inspired art “in a friendly and interested manner,” but considered him merely a “tinkerer,” while artists were “primarily irritated” by his unclassifiable graphic daring. From this betwixt-and-between place, he lamented to son:

It continues to be a profoundly sad and disillusioning fact that I am beginning to speak a language these days only very few understand. It only increases my loneliness more and more.

In the introduction to the 1957 book about his core creative obsession, Regular Divisions of the Plane, he painted himself as a vessel for some larger creative force, available to all but accessed only by the very few:

I am walking around all alone in this splendid garden that does not belong to me and the gate of which stands wide open for anyone; I dwell here in refreshing but also oppressive loneliness. That is why I’ve been attesting to the existence of this idyllic spot for years… without expecting many strollers to come, however. For what enthralls me and what I experience as beauty is often judged to be dull and dry by others.

But for all his loneliness, Escher also saw himself as tasked with “astonishment” — “sometimes ‘beauty’ is a nasty business,” he wrote — and with rendering “dreams, ideas or problems in such a way that other people can observe and consider them.” And this was enough — the sheer joy his work gave him assured him that he was on “the right track.”

M.C. Escher: Sky and Water I. (Available as a print and as stationery cards.)

Work so unusual did not, could not, be arrived at via the usual paths. For all the astonishing mathematical precision of his prints, Escher had struggled ferociously with mathematics as a young student at the Haarlem School of Civil Engineering and Decorative Arts. It wasn’t until he heard Bach’s Goldberg Variations that his mind snapped onto its own gift for rendering meaning through form. “Father Bach,” he called him. Wonder-smitten by Bach’s music — by its mathematical figures and motives repeating back to front and up and down, by the majesty of “a compelling rhythm, a cadence, in search of a certain endlessness” — Escher felt in it a strong kinship, a special “affinity between the canon in the polyphonic music and the regular division of a plane into figures and identical forms.”

Later, Escher would come to regard his own work as “a kind of small philosophy,” but one that has nothing to do with the literary form philosophy ordinarily takes — rather, his was a philosophy of pleasure and spaciousness: the compositional joy of arranging forms on a plane and giving meaning to each part of it. “It has much more to do with music than with literature,” he wrote.

M.C. Escher: Fish.

What most enchanted him in Bach was the “infinite variation of waves and undulations” in his music — it spoke to something in his own soul that had not yet awakened. And then one day, while he was traveling through Italy as he did throughout much of his twenties and thirties, it did: Listening to his wife brushing her hair, Escher was reminded of the sound of waves and was suddenly overcome by an intense longing for the sea.

He had always been curious about the marine world, fascinated by the “fluid mass,” by its creatures and its phenomena — especially the otherworldly wonder of bioluminescence — but this was a calling of a different order and a new urgency.

M.C. Escher: The Phosphorescent Sea. (Available as a print and as stationery cards.)

He began taking voyage after voyage aboard cargo ships. Mesmerized by the billowing trails the ship left on the water, he watched the flying fish from the deck. He filled his notebook with a private glossary of nautical terms. On land, he read everything about the ocean he could get his hands on as the it went on tugging at his heart. He felt that only seasoned sailors understood this elemental yearning. “You never (or very rarely) come across such people on land,” he told his son.

This swelling obsession eventually led Escher to Rachel Carson’s The Sea Around Us — the lyrical book that had won her the 1951 National Book Award.

Rachel Carson, 1951

Wonder-smitten with her writing, Escher wrote to his son:

She describes that liquid element, with an overview of all its associated facets and problems, in such an enthralling manner, with precision and poetry, that it is driving me half insane. This is exactly the kind of reading material I, with my advancing years, need most: a stimulus from our mother earth for my spatial imagination… It is kindling in me intense inspiration to create a new print.

M.C. Escher: Regular Division of the Plane Drawing #20. (Available as a print and as stationery cards.)

He grew obsessed with rendering the blue fluidity of the “liquid element” in a static black-and-white image that sacrificed none of the feeling-tone and dynamism of the living reality:

Those waves! Soon I’m going to try once more to draw something wavelike. But how can you suggest movement on a static plane? And how can you simplify something as complicated as a wave in the open sea to something comprehensible?

M.C. Escher: The Second Day of Creation. (Available as a print.)

Carson’s poetic yet scientifically scrumptious writing rendered the wonder of the sea comprehensible not by diminishing its enchantment but by magnifying it with understanding, giving Escher a new way of thinking about the three-dimensional nature of space that had always animated his work and making him consider for the first time the fourth dimension of time. Like Carson, who looked at the ocean and saw in it a lens on eternity and the meaning of life, he now saw the ocean as an antidote to the transience that marks our lives — an ever-flowing, ever-lapping salve for our terrified incomprehension of the finitude of time, which is always at bottom a terror of our own finitude:

A human being is not capable of imagining that the flow of time could ever come to a standstill. Even if the earth were to stop turning around its axis and around the sun, even if there wouldn’t be any more days and nights, any more summers and winters, time will continue to flow onward into eternity, that’s how we imagine it.

M.C. Escher: Dolphins. (Available as a print and as a cutting board.)

Like Carson, who found in music the concentration and consecration of her work, Escher never ceased slaking his soul on Bach:

Many a print reached definite form in my mind while I was listening to the lucid, logical language he speaks, while I was drinking the clear wine he pours.

Months after Rachel Carson’s untimely death, Escher received an award with a reflection on his core creative ethos that is as true of hers:

The consistency of the phenomena around us, order, regularity, cyclical repetitions and renewals… brings me repose and gives me support. In my pictures I try to bear witness that we are living in a beautiful, ordered world, and not in a chaos without pattern, as it sometimes seems.

M.C. Escher. Sketchbook, tessellations.

After Carson’s death, two original signed Escher prints were discovered among her belongings. In the final years of his own life, in a token of gratitude for how her work had touched his, he granted the posthumously assembled Rachel Carson Council permission to freely reproduce his prints in their advocacy of the sea for perpetuity.

Complement with the Trappist monk and theologian Thomas Merton’s stirring letter of appreciation to Carson, then revisit the story of how Carl Sagan inspired Maya Angelou.


donating = loving

For a decade and half, I have been spending hundreds of hours and thousands of dollars each month composing The Marginalian (which bore the unbearable name Brain Pickings for its first fifteen years). It has remained free and ad-free and alive thanks to patronage from readers. I have no staff, no interns, no assistant — a thoroughly one-woman labor of love that is also my life and my livelihood. If this labor makes your own life more livable in any way, please consider lending a helping hand with a donation. Your support makes all the difference.


newsletter

The Marginalian has a free weekly newsletter. It comes out on Sundays and offers the week’s most inspiring reading. Here’s what to expect. Like? Sign up.

The best portable Bluetooth speaker

Engadget
By Brent Butterworth

This post was done in partnership with Wirecutter. When readers choose to buy Wirecutter’s independently chosen editorial picks, Wirecutter and Engadget may earn affiliate commission. Read the full guide to portable bluetooth speakers.

Portable Bluetooth speakers come in a variety of shapes, sizes, and prices, so it’s impossible to say that any one model is perfect for everyone. But we think the UE Wonderboom 2 has the best chance of delighting your ears without walloping your finances. This speaker has a full, clear sound and a compact design. It’s also waterproof and dustproof, and built to survive even the most adventurous vacations.

The UE Wonderboom 2 is as euphonious as Ariana Grande but as tough as Lara Croft. In our blind tests, our panelists picked this Bluetooth speaker as the best-sounding model under $100, with its especially clear vocal reproduction and a decent amount of bass for its size. It has an IP67 rating and is one of the most rugged Bluetooth speakers we’ve tested, able to survive a 5-foot drop and a dunking in 1 meter of water—but because it floats, it’ll probably never dive that deep. The Wonderboom 2’s only downside is its battery life, which, at eight hours, is adequate but not impressive. We like the Wonderboom’s cute, compact design, even if the almost-spherical shape makes this model a little tougher to pack away in a suitcase pocket or laptop bag.

If you want a portable Bluetooth speaker that approaches the sound of a good small stereo system yet is rugged enough to take almost anywhere, the JBL Xtreme 2 is a terrific choice. Three of our four listeners thought the Xtreme 2 was the best-sounding speaker we tested, praising it for its ample bass, high maximum volume, and overall clear, clean sound. It’s IPX7-rated, which means it can survive submersion in 1 meter of water, and it includes a handy, strong carrying strap. The Xtreme 2 also delivered 19 hours of battery life. But it’s much larger and pricier than the UE Wonderboom 2.

If you need something that sounds a little louder and fuller than the UE Wonderboom 2, but that’s more portable and affordable than the JBL Xtreme 2, the Sony SRS-XB32 finds a nice middle ground. It’s about twice the Wonderboom 2’s size, plays a little bit louder, and puts out a lot more bass. It’s also rugged, with an IP67 waterproof/dustproof rating. In our battery test, it automatically reduced its volume after about six hours of fairly loud use, but it played for about five more hours after that. It also has adjustable multicolor lights and flashing strobes, which don’t appeal to us—but somebody must like these things or manufacturers wouldn’t keep including them.

If you want to spend the bare minimum on an all-around good portable Bluetooth speaker, the Tribit XSound Go is a great choice. Its sound is obviously clearer and louder than that of almost all other budget Bluetooth speakers. The XSound Go is also small enough to slip into a laptop bag or an already stuffed suitcase, and it will run 10½ hours on a charge. Plus, it’s IPX7-rated, which means it’s sufficiently waterproof to survive a half-hour dunking in 1 meter of water, and it has a speakerphone function.

The EcoXGear EcoBoulder+ is a completely different kind of portable Bluetooth speaker than our other picks—it pumps out maximum volume for pool parties, picnics, and tailgating events. Although it can blast, it can also soothe—not only with its full, natural sound, but also with a built-in bottle opener and cupholders. Weighing 29 pounds and sized like a roll-aboard suitcase, the EcoBoulder+ is not something you’ll take on business trips, but its retractable handle and wheels do make it easy to lug around. It also has a built-in AM/FM radio and a long battery life—24 hours, in our test.

Why you should trust us

I’ve reviewed audio gear professionally since 1990. I have written reviews for magazines and websites including Sound & Vision, Home Theater Review, LifeWire, and Home Theater. I’ve probably conducted more blind tests of audio products than any other journalist, and I’ve tested somewhere around 350 wireless speakers to date. Since 2008 I have brought portable Bluetooth speakers on about 100 trips, from bike tours to transoceanic junkets to week-long trade-show slogs.

For our most recent listening tests, I was a panelist, along with Wirecutter senior staff writer Lauren Dragan and two musicians I often play with in Los Angeles: woodwind player Dan Gonda and drummer Sammy Velick, both in their late 30s. Dan and Sammy have considerable experience in music performance and production. And both of them own a few Bluetooth speakers and have heard many more of them in my home, where I use them to demo jazz tunes for musicians in my jam sessions.

Who should buy a portable Bluetooth speaker

Anyone who owns a smartphone or tablet would probably enjoy owning a portable Bluetooth speaker, which can improve the listening experience anywhere. Bluetooth is available in every current smartphone and tablet, as well as in most laptop computers, so you don’t need additional equipment. Unlike smart speakers and Wi-Fi speakers, Bluetooth speakers don’t require a network connection and the use of special apps—whatever you play on the phone will play through the speaker.

Portable Bluetooth speakers have a rechargeable battery and are frequently waterproof or splash-proof, so you can easily move them around the house or take them to a park or the beach. We’ve found that they make hotel rooms feel more like home.

The best of these speakers deliver sound quality that’s good enough for casual music listening, podcasts, and Internet radio. Although Bluetooth does degrade sound quality slightly, you’re unlikely to hear the effects through relatively low-quality speakers such as these. If you’re worried about it, take the online blind test on my website and see what you think.

If sound quality and volume are your top priorities, and you don’t plan to take the speaker out of your house, you may want to check out the larger, more powerful speakers featured in our other tabletop speaker guides:

For true high-fidelity sound, we recommend a pair of decent bookshelf speakers and a stereo receiver or one of the top picks from our best computer speakers guide. You’ll get clearer sound, much better stereo imaging, and usually much deeper bass response. You can add a Bluetooth adapter if the system doesn’t already have Bluetooth built in.

Voice control of the sort popularized by the Amazon Echo and Google Home is uncommon in portable Bluetooth speakers, because almost all voice-command technologies require a Wi-Fi connection to function. Some Bluetooth speakers provide a button that activates your smartphone’s voice-command technology (such as Google Assistant), but because you can access those features straight from your phone, this isn’t a big advantage.

How we picked

Here are some of the speakers we tested for our fall 2019 update. Photo: Rozette RagoI’d estimate that there are a couple thousand models of Bluetooth speakers now available, many sold under obscure brands and sometimes only through Amazon. Considering that new ones seem to appear every week, it would be impossible to find and hear them all. But we’ve listened to most of the major models and are always on the lookout for promising new models to test.

We use the following criteria to help us decide which speakers to call in for testing:

  • Portability and battery life: Although any Bluetooth speaker can be lugged around, we focused on models that have rechargeable batteries and are designed to take a trip to the beach or the park with no hassle.
  • Ruggedness and waterproof design: We gave priority to speakers that are built to survive the knocks and bumps of travel. Although we didn’t limit our testing to waterproof speakers, we did give preference in our judging to speakers with an Ingress Protection (IP) rating, which tells you exactly how waterproof and dustproof a speaker is.
  • Price: Even though we would like to test every type of portable Bluetooth speaker, we set a bottom price of $15. Bluetooth speakers are often available for as little as $5, but we’ve never found such an inexpensive model to sound good enough to bother using—especially when the speakers built into today’s better phones can play loud enough for light listening.
  • Playback controls: Because playback can be controlled from your Bluetooth source device (usually a phone or tablet), we didn’t require the speaker itself to have playback controls, but it’s a convenient plus.
  • Special features: Bluetooth speakers offer all sorts of features beyond the ability to play audio from Bluetooth-sourced devices. These include speakerphone capability, pairing (the ability to play the same material through two Bluetooth speakers at once), built-in lighting, and even integral bottle openers. In polls and comments, every reader seems to have their own opinion as to which (if any) features are the most important, so we didn’t require any particular features when picking products to test.

After considering all of the criteria, we ended up evaluating 35 new models for the most recent update, including recent releases from 1More, Anker, Audioengine, Doss, EarFun, Heyday, Harman Kardon, JBL, Kew Labs, LG, House of Marley, Marshall, Monoprice, Sony, Tribit, Tronsmart, UE, VicTsing, and Vifa. This brings us to a total of about 270 Bluetooth speakers that we’ve tested since this guide first posted.

How we tested

Our top picks, left to right: EcoXGear EcoBoulder+, Sony SRS-XB32, Tribit XSound Go, UE Wonderboom 2, and JBL Xtreme 2. Photo: Rozette RagoAs has become my standard practice for updates to this guide, I started by giving all of the new models a long listen, connecting them via Bluetooth through my Samsung Galaxy S9 phone and playing the same four test tracks: pop, heavy metal, hip-hop, and jazz. I compared the speakers not only with each other but also with some of our previous picks.

I measured the maximum output of each speaker at a distance of 1 meter using an NTi Minilyzer audio analyzer and a calibrated NTi MiniSPL test microphone. For this round of testing, I made one change from our past testing method because I noticed that my previous methods didn’t seem to accurately reflect the perceived maximum volume level in the speakers I tested. I speculate that this is due to the increasing sophistication of the internal limiters that protect the speaker drivers and minimize distortion. So instead of simply playing pink noise and noting the maximum decibel level on the audio analyzer, I used the analyzer’s Leq mode, measuring the average maximum level when playing ZZ Top’s very loudly recorded tune “Chartreuse.” Sometimes the result was a little higher than in previous tests, sometimes a little lower, but I think this approach will deliver a result that better reflects what you’ll hear in day-to-day use.

I narrowed the contestants to the models that I thought had a real chance to impress our listening panel, and I included a couple of past picks.

Although my personal audio tests were, by necessity, sighted (that is, I always knew which product I was hearing), I used a screen of thin black fabric to hide the identities of the products from the panelists. I first set the playback level of each speaker to 74 decibels, using the shaped-noise channel-balancing test tone recorded from a Dolby Digital receiver. Because of the widely varying performance, the coarse volume control steps, and the unpredictable actions of the volume limiters used in these speakers, it was impossible to match levels accurately, but in most cases I was able to get them within plus/minus 0.3 dB.

I played each panelist a mix of tracks known to be good tests of audio quality, such as Tracy Chapman’s “Fast Car,” as well as a couple of tracks of their own choosing. I concluded the test of each speaker by cranking it up as loud as it would go and playing a rock track, such as AC/DC’s “Highway to Hell.” We started with smaller models and moved up to larger ones, and I changed the order of presentation for each panelist.

I asked the panelists to note which speakers they liked best, paying particular attention to:

  • how clear they sounded at normal levels
  • the balance of bass to midrange to treble
  • how loud they were able to play when cranked up
  • how clear they sounded when cranked up

After the listeners gave me their opinions of the sound, I unveiled the speakers and got their comments about design, features, and price.

I checked the battery life of each of our top picks by repeating Steely Dan’s “Aja” at an average level of 75 decibels (measured at 1 meter), over and over until the power ran out. Note that our results may not agree with the manufacturers’ stated battery life, likely because their testing methodology—which they almost never publish—varies from ours. I also measured maximum Bluetooth range of all our picks.

For models that offer speakerphone functionality, I tried placing a call with each model to Lauren, who has helped me evaluate speakerphone quality for years. I speak to her from the same place in my living room, starting with my mouth 2 feet from the speaker; then I note how she sounds to me, and she tells me how my voice sounds.

Our pick: UE Wonderboom 2

Photo: Rozette RagoA portable Bluetooth speaker should be compact, rugged, affordable, and (most of all) good-sounding. The UE Wonderboom 2 ticks all of these boxes and then some. Three of our four panelists considered this model’s sound to be the best of any speaker we tested under $100, and they praised its natural balance of bass to midrange to treble, as well as its clear reproduction of voices. The Wonderboom 2 is about the size and weight of a large apple, so it’s easy to carry around. It also has lots of useful features, including an Outdoor Boost mode that makes it louder (at the expense of bass), an ultra-rugged design, stereo/mono pairing, an extra-long Bluetooth range, and a top button that lets you pause and restart the music, as well as skip to the next track.

“The sound is surprisingly clear for such a small speaker,” Sammy said. “It’s the best of the under-$100 models, and definitely the best overall when you consider price.” Lauren added: “It sounds bright, but it’s got enough bass to balance that out—it’s boom and sizzle, where most of the small speakers are all sizzle.”

With an IP67 rating, the Wonderboom 2 is dustproof and waterproof, and it can be submerged in up to 1 meter of water for a half-hour. It also floats, so you won’t lose it if you drop it off a boat or dock or into a swimming pool. UE says the Wonderboom 2 can withstand a 5-foot drop; we confirmed this by dropping it from 5 feet, first onto a hardwood floor and then onto concrete. Not only did it keep working, but it barely even showed a scuff mark. A small, elasticized strap on top lets you hang the Wonderboom 2 from a shower rod, tent pole, or other object, provided you have a carabiner, a hook, or a strand of string to attach it.

In our measurements, the Wonderboom 2 put out 84.6 dB at 1 meter, about the same level you’d hear from the traffic noise if you were standing at a busy city intersection—and enough to fill a small room with sound. The Outdoor Boost mode increased this by about 3 dB—that’s not a dramatic boost, but it is noticeably louder. However, this mode reduces bass, so the speaker doesn’t sound as full and pleasing. Bluetooth range measured an impressive 95 feet through one window.

Flaws but not dealbreakers

If you like lots of bass, this probably isn’t your speaker. I was the only panelist who didn’t rank the Wonderboom 2 as the best speaker under $100 because I was bothered to hear its little speaker drivers choking on some of the deep bass notes in my favorite jazz and pop recordings. If you prefer a bit more bass, the larger (and pricier) Sony SRS-XB32 may be more to your liking.

The Wonderboom 2 lacks a speakerphone function. We wouldn’t use this feature often, but you might.

Battery life is rated at 13 hours, but we measured roughly eight hours, and that’s with four trials of two different units, with the Outdoor Boost mode disengaged. That’s adequate to cover a full workday, but there won’t be any reserve to save you if you forget to keep it charged.

Finally, though the Wonderboom 2 is light and compact, it’s not slim. Its cylindrical design, measuring about 3½ inches in diameter and 4 inches high, takes up more space in a suitcase than some slimmer designs and prevents it from fitting comfortably in a laptop bag.

Upgrade pick: JBL Xtreme 2

Photo: Rozette RagoThe JBL Xtreme 2 is easily one of the best portable Bluetooth speakers we’ve heard, with a big, full sound that approaches the quality of what you might hear from a good compact stereo system. Three of our four panelists considered it to be the best of all the speakers we tested in this (and probably every) round. The Xtreme 2 is a good bit bigger and heavier than the UE Wonderboom 2 and the Sony SRS-XB32, but its detachable shoulder strap makes it easy to carry to the beach or park. Because the Xtreme 2 carries an IPX7 rating, it can easily survive rogue waves or unexpected downpours.

“It’s the only one that had enough bass to sound good on Kanye West’s ‘Love Lockdown,’ ” Lauren said. “It has a 3D, spacious quality to the sound. Male voices sounded good, although the sound is a little bright, so it makes female voices sound a little harsh.” Sammy and I had similar comments; only Dan demurred, saying the bass was too pumped-up for his taste.

At 11½ inches long by 5 inches in diameter, with a weight of 5.4 pounds (more than four pounds heavier than the Wonderboom 2), the Xtreme 2 isn’t especially compact, and it definitely isn’t light—but thanks to its thick canvas shoulder strap, it’s easy to lug around. The strap even has a bottle opener built into its buckle.

Although the Xtreme 2 put out a relatively modest 89.9 dB at 1 meter in our tests, it seems far louder because the sound is so full and the bass really kicks. Battery life is rated at 15 hours, and we measured 19 hours in our tests. Bluetooth range measured an impressive 110 feet through one window.

The Xtreme 2 is larger and heavier than our UE and Sony picks, but the included shoulder strap makes it easier to carry around. Photo: Rozette RagoThere’s a speakerphone function—when I called Lauren, she described my voice as sounding “clear, but a little compressed,” but her voice sounded great on my end of the call. The Connect+ function lets you connect up to 100 Connect+ speakers together for mass playback (although that’s 98 speakers more than most people would probably want to connect). The play button on top lets you pause and restart playback and skip to the next track.

The Xtreme 2 has two real downsides. The first is that it’s expensive—about twice the current price of our previous upgrade pick, the Sony SRS-XB41. But three of our four panelists greatly preferred the sound of the Xtreme 2, so for listeners who want a very loud, clear, and full-sounding speaker, we expect it’ll be worth the extra cost.

The second downside to the Xtreme 2 is that it charges only through a separate AC adapter, which of course you’ll have to remember to bring with you if you want to play it for more than 19 hours. A speaker this big and powerful would charge much too slowly through a Micro-USB cable, but we wonder if switching to USB-C (as so many other Bluetooth speakers have done) might have been preferable.

Also great: Sony SRS-XB32

Photo: Rozette RagoThe Sony SRS-XB32 is the speaker to get when you need a bit more speaker than the UE Wonderboom 2 but not as much speaker as the JBL Xtreme 2. It’s about twice the size and weight of the Wonderboom 2 (and a notable step up in price), but it has a fuller, bassier sound that would make it a reasonable substitute for a small stereo system—and a better choice for use in a dorm room or bedroom. The SRS-XB32 also has a variety of features that we expect some listeners will think are awesome and others will think are silly.

“Overall, this one sounds very good,” Dan said. “The sound is well balanced between bass and treble, and it never sounds nasty, as some of these speakers did.” Lauren, Sammy, and I generally shared Dan’s sentiment: The SRS-XB32 won’t make you forget you’re listening to a compact Bluetooth speaker, but it’s satisfying for casual listening at home, small backyard gatherings, and sharing tunes with a few friends at the beach. The Extra Bass button lets you punch up the lows when you put on hip-hop, heavy metal, or taiko drum recitals.

The SRS-XB32 measures 9.3 by 3.1 by 3.2 inches and weighs 2 pounds—that’s a little too big to toss into a suitcase without a second thought, but small enough to toss into a car trunk or beach bag. Because it’s IP67-rated, it’s dustproof and waterproof, so there’s no need to worry if it encounters sand, splashes, or rain.

Like some of Sony’s other portable Bluetooth speakers, the SRS-XB32 has multicolored lighting that can be adjusted through a smartphone app. We’re not particularly fond of this feature, but if you like this sort of thing, then you’ll like this sort of thing. The SRS-XB32 also includes Sony’s Party Booster feature, which produces various percussion sounds when you slap the speaker on the front, sides, top, or bottom. I can’t imagine what kind of party might be enlivened by this feature, although I can attest that the sounds will stop a misbehaving shih tzu from doing whatever she’s doing.

Battery life is rated at 24 hours with Extra Bass off and 14 hours with Extra Bass on, but for us the battery life didn’t come close to Sony’s ratings. Even with Extra Bass off, the SRS-XB32 ran for only six hours before it automatically reduced its level to preserve battery life; it lasted another five hours after that. We saw this same behavior in the SRS-XB32’s predecessor, the SRS-XB31, but unlike the SRS-XB31, the SRS-XB32 is still usable when it reduces its volume. So the SRS-XB32 will probably last through a day at the beach, but don’t forget to charge it when you’re done listening.

At full blast, the SRS-XB32 puts out 87.4 dB at 1 meter. That’s almost 3 dB more than the Wonderboom 2, but the Sony’s fuller sound makes it seem even louder. Bluetooth range measured about 50 feet through one window. You can connect up to 100 compatible Sony wireless speakers for synchronized playback. You can even sync the lights. The play and pause button on top lets you pause and restart playback and skip to the next track. When we tested the speakerphone function, Lauren reported that my voice sounded fairly clear and natural, but her voice sounded like she was speaking into a disposable plastic cup.

Budget pick: Tribit XSound Go

Photo: Rozette RagoIf you want a great all-around portable Bluetooth speaker for about the cost of a tank of gas, the Tribit XSound Go is a terrific choice. Sonically, it’s a step up from anything else we’ve heard in this price range, with clearer sound and more bass than most competitors can muster. This speaker is easy to travel with, too—it’s small enough to slip into a laptop bag or any suitcase. Plus, it’s IPX7-rated, which means it’s sufficiently waterproof to survive a half-hour swim in 1 meter of water.

When the XSound Go accompanied me through four weeks of travel, I continued to be surprised by how clear and full its sound was. Voices sound natural and distinct, never bloated or hoarse, as they can through most inexpensive Bluetooth speakers. The XSound Go doesn’t sound as full or play as loud as the Wonderboom 2, but all of the panelists thought it delivered amazing sound quality for its price. Measured maximum volume was 82.4 dB—not enough to get a party going, but enough for light listening in a typical living room.

The XSound Go has play/pause and volume buttons, but it lacks track-skip controls. Photo: Kyle FitzgeraldThere’s nothing flashy about the XSound Go, but it doesn’t have that cheap, plasticky look that many budget Bluetooth speakers have. Although it has a play/pause button on the top, it doesn’t have track-skip buttons, which would come in handy if you used the XSound Go in the shower. The battery is rated for 24 hours of life; we got only about 10½ hours, but for a cheap Bluetooth speaker, that’s fine.

The XSound Go’s speakerphone function is good, especially for the price. I could hear Lauren very clearly, although she complained that my voice sounded slightly muffled. In our tests, Bluetooth range was about 25 feet through one wall, which is good for a speaker of this size.

Also great: EcoXGear EcoBoulder+

Photo: Rozette RagoAbout two years ago, the “pool blaster” Bluetooth speaker category emerged: large models that have high volume levels and a waterproof design. Many people would love having a speaker like this for pool parties or tailgating, but the EcoXGear EcoBoulder+ is the first we’ve found that delivers the combination of volume and sound quality we’d been hoping for—at a price that’s typically $100 to $150 less than that of many competing models.

The EcoBoulder+ has many convenient features, including cupholders. Photo: Kyle FitzgeraldThis is easily the best-sounding pool blaster we’ve heard to date, with an even balance of bass, midrange, and treble that presents all instruments and vocalists naturally without calling attention to (or mangling) any one element of the music. The EcoBoulder+ is built much like a good home stereo speaker, with an 8-inch woofer below a 3-inch tweeter, and an 8-inch passive radiator in the back to reinforce the bass. The big speaker drivers and the built-in amp rated at 100 watts allowed the EcoBoulder+ to hit 104.1 dB in our tests, about 14 dB louder than the JBL Xtreme 2. That’s loud enough to cover a typical suburban backyard. If the sound isn’t quite to your liking, bass and treble controls let you fine-tune it, but we never felt the need.

The EcoBoulder+ has many convenient features, including a bottle opener. Photo: Kyle FitzgeraldThe EcoBoulder+ is also easy to cart around. With a retractable handle and built-in wheels, it scoots around just like a roll-aboard suitcase. Sturdy handles on top allow two-handed lifting. It’s IP67-rated, which means it’s waterproof and dustproof, and it also has a waterproof pocket on the side for a smartphone. A bottle opener on the side and two cupholders on top facilitate consumption of beer or a bottle of Mexican Coca-Cola. This model also has a built-in AM/FM radio, so tailgaters can listen to the game. A ¼-inch jack on the speaker’s side lets you connect a microphone (not included), so you can use the EcoBoulder+ as a little PA system. In the unlikely event that you need more volume, you can pair two EcoBoulder+ speakers for stereo sound.

Surprisingly, the EcoBoulder+ even has a speakerphone function, so if you ever need to do a conference call with 30 people while sitting poolside at a Florida resort, you’re good to go. Even more surprisingly, the speakerphone function is one of the best we’ve tested, with excellent voice quality at both ends.

The EcoBoulder+ has many convenient features, including a waterproof pouch for your phone. Photo: Kyle FitzgeraldA power socket lets you connect a standard AC cord for charging. Battery life is rated at 10 hours at full volume. Considering that few people will buy the EcoBoulder+ to play music at normal indoor levels, we ran our battery-life test with the volume set 6 dB louder than we did with the other models we tested (which in a normal living room sounds pretty loud). Even at this higher volume, the EcoBoulder+ ran for 24 hours on a charge. Bluetooth range in our tests was about 43 feet through one wall, enough that you could probably leave your phone indoors while the EcoBoulder+ played out by the pool.

One panelist summed up the EcoBoulder+ nicely when he said, “They obviously took a hard look at what a person wanting a speaker like this would need, and they put it all in there. And it sounds way better than anything similar we’ve tested.”

The EcoBoulder+ speaker’s top-mounted buttons let you skip tracks, mix in the signal from a microphone, and set and access tone presets. Photo: Kyle Fitzgerald

What to look forward to

Other than the Wharfedale Exson M (a surprisingly inexpensive model from a brand revered by audiophiles) and the Aiwa Exos-X8 (a 24-inch-high, 25-pound potential competitor to the EcoXGear EcoBoulder+), we aren’t aware of any major new portable Bluetooth speaker introductions pending. The only ones introduced at the recent IFA show in Berlin also had Wi-Fi capabilities, putting them outside the scope of this article.

We’ll likely do our next update in spring 2020, when the new models that we expect to see introduced at CES in January will start to become available.

The competition

We’ve tested more than 270 portable Bluetooth speakers specifically for this article. Some competitors came very close to our top picks in performance and value, and they may be worth considering, depending on your priorities. Here’s a list of some of the more recent models we’ve considered, in alphabetical order.

The circular 1More Portable BT Speaker produced distorted bass, made voices sound unnatural, and seemed to vibrate a bit on the table we placed it on.

In our tests, the Altec Lansing Sonic Boom 2 didn’t play anywhere near as loud as we think a “pool blaster” speaker should.

Although we found that the Altec Lansing Super Life Jacket played loud and had impressive bass for its size, we thought the sound was rather rough and uneven.

The Anker SoundCore has a low price and an appealingly simple design, but it didn’t sound as full and smooth as the Tribit XSound Go.

The Anker SoundCore Boost loses voice clarity with its bass boost mode activated, but without it, we thought the bass was usually lacking.

We thought the tiny Anker SoundCore Icon Mini didn’t play loud or clear or full enough to warrant the investment.

The Anker SoundCore Motion+ plays very loud for its size and cost, but voices have a boosted, unnatural quality, and the bass doesn’t cut it for hip-hop and pop.

Our panelists preferred the Tribit XSound Go to the Anker SoundCore Motion B, but all thought the Motion B sounded pretty good—and it is an excellent value.

The Anker SoundCore Sport XL plays very loud for its price, but our panelists found its sound to be a little too harsh.

Our panelists thought the Aomais Go had a nice, full sound and a reasonable price, but they thought it was rather bulky for the volume it delivered.

We liked the clarity of the Audioengine 512 on vocals and most instruments, but thought its bass and lower midrange weren’t strong enough to handle most hip-hop and heavy rock.

The Aukey SK-M12 SoundTank might be the loudest Bluetooth speaker we’ve heard in the $50 price range, but we thought its sound was too bright and edgy.

Our panelists loved the sound of the B&O Beoplay A1, but they lost their enthusiasm when they saw its high price.

We like the Bose SoundLink Color II a lot, but we think the Sony SRS-XB32 is more useful and sounds more powerful.

The Bose SoundLink Micro sounds surprisingly full for its size, but for its price it doesn’t play all that loud.

The Bose SoundLink Revolve has a big, full sound, but in our tests we thought it distorted too much for something in its price range.

The Bose SoundLink Revolve+ has an even fuller sound than the Revolve, but our panelists complained about unnatural fluctuations in volume due to its internal limiter settings.

The Braven 105 doesn’t play very loud, but it sounds fairly clear and full for its size, and its integral elastic strap makes it a good speaker to hang from shower-curtain rods.

The Braven Balance has a nice, slim design and a reasonable price, but our panelists thought it didn’t play loud enough for its size.

The Braven BRV-360 has a harsh, overly trebly sound.

The Cambridge SoundWorks OontZ Angle 3 plays extremely loud for its price and size, but our panelists found its sound rather shrill. The same goes for the OontZ Angle 3 Ultra.

With a built-in MP3 player and MicroSD card slot, plus a USB input, the Creative Sound Blaster Free is a nice speaker for its price, but we think our top picks sound better.

The Creative iRoar Go didn’t please our panelists; two complained about a buzzy sound in the midrange and some distortion in the bass.

The Doss SoundBox Touch is our former pick for best budget Bluetooth speaker, but the Tribit XSound Go delivers comparable sound in a smaller chassis.

The Doss Traveler is a campsite-friendly speaker with integral LED flashlights. It plays clear and loud, but our panelists liked the Tribit XSound Go better.

The Doss SoundBox Pro doesn’t really sound better than the Tribit XSound Go, and it’s larger and costlier.

We found the sound of the Doss SoundBox Plus thin and unpleasant, especially on voices.

The EarFun Go is similar in size, design, quality, and price to the Tribit XSound Go. Our panelists had a slight preference for the XSound Go, but either is a good buy.

Two of our panelists praised the EarFun UBOOM for its clear and balanced sound, but two panelists thought its clarity was lacking.

The Edifier MP200 is a cute, cube-shaped speaker that sounds good but doesn’t play as loud as some competitors, and it scoots around a bit when playing music with a lot of bass.

The Edifier MP700 sounded impressively clear, but it didn’t play as loud as we’d hoped for its size, and its metal handle made it heavy to lug around.

Our panelists thought the Fender Newport sounded great, but it’s not convenient for portable use. If you like the Newport’s guitar-amp styling, we strongly recommend it.

The Harman Kardon Onyx Mini has a generally pleasant, fairly full sound, but our panelists thought its sound on bass-heavy music was distorted and indistinct.

We liked the full, clear sound of the Harman Kardon Onyx Studio 4. And even though its rechargeable battery and integral handle make it technically portable, it’s large enough that you probably wouldn’t want to carry it much farther than the backyard.

The Heyday Square Portable Bluetooth Speaker has almost no bass.

The iHome iBT374 is nicely priced for the volume and bass it delivers, but our panelists thought the unit’s strong bass and treble overshadowed vocals.

The Jam Hang Around and Jam Hang Tight are beautifully designed, affordable waterproof speakers with cool integral charging cords, but their sound distorted too often for our taste.

Our panelists thought the JBL Charge 4‘s bass sounded too dull and boomy.

The JBL Clip 3 is a nice, ruggedly designed small speaker, but our panelists didn’t like its near-total lack of bass. And this model’s small integral clip makes it hard to hang off of most objects.

JBL’s Flip Bluetooth speakers are practical, powerful, and reasonably priced. But as with past Flips, our panelists thought the JBL Flip 4sounded too thin and needed more bass.

The JBL Flip 5 came very close to being a top pick—it falls between the UE Wonderboom 2 and the Sony SRS-XB32 in price and performance. Our panelists thought it sounded a tad bright but very good overall. However, we got only about six hours of battery life from it.

A cute design and built-in lights make the JBL Jr POP an appealing choice for kids; it sounds clear but has less bass than most other speakers in its price range.

The JLab Crasher Mini sounded surprisingly full for its size, but our test sample soon started distorting badly.

The JLab Crasher XL is a good choice if you want something larger and more powerful than the UE Wonderboom 2 for about the same price; our panelists generally liked the Crasher XL’s loud, full sound.

The Kew Labs K1 tends to sound blaring and garbled when playing hip-hop and heavy rock.

The Kicker Bullfrog BF400 has a great design for outdoor use, but even though it sounds good at lower volume, it distorted too much for us at high volume.

The Kicker Bullfrog BF200 is a smaller version of the original Bullfrog. It might have been our top pick in a “pool blaster” had we not found the much more powerful and less expensive (but much bulkier) EcoXGear EcoBoulder+.

The LG PK7 sounds very clear, clean, and balanced, but despite its large size, it doesn’t play loud enough to fill a bedroom.

We considered the Libratone One Click as a top pick because it plays pretty loud and has a beautiful design, but it sounds a little too trebly to us.

The Libratone Too sounds very clear and natural and has a beautiful design, but we don’t think it plays loud enough for the price.

We liked the full sound and compact design of the House of Marley No Bounds, but deep bass makes it rattle across whatever it’s sitting on.

We considered making the House of Marley No Bounds Sport a pick because we love the design, and the sound is good for the price, but we got only about six hours of run time.

Unlike almost all other portable Bluetooth speakers, the House of Marley No Bounds XL sounds pretty good cranked up, but at lower volumes the bass seems to obscure vocals and guitars.

The Marshall Kilburn II tends to clamp down the volume abruptly when it hits a deep bass note, and voices have a sort of canned quality.

I loved the clarity of voices and instruments with the Marshall Stockwell II, but our other panelists thought it should deliver more bass and more volume for the price.

The Monoprice Deep Blue Sub710 puts out a lot of volume for the price, but our panelists thought it needed a little more bass and a fuller sound.

My Samsung Galaxy S9 on its own had higher measured output than the Monoprice Deep Blue Sub75.

The Monoprice Harmony Capsule has good sound quality for its size, but it’s bulkier than the Wonderboom 2, and we got only about 6½ hours of battery life from it.

The Monoprice Harmony XL delivers powerful sound for the price, and it would make a great office speaker, but its bulk and non-waterproof design make it less practical for portable use.

The Nyne Bass was a previous pick for its ratio of dollars to decibels, but many newer speakers sound better.

Our panelists thought the Nyne Boost sounded tinny and needed more bass.

The tiny Polk Boom Bit is one of the most flexible and useful Bluetooth speakers ever. We love it for hiking, but its three-hour battery life limits its utility.

Our panelists thought the Sbode M400 sounded pretty good, but that it didn’t play loud enough.

The Scosche BoomBottle MM has a nice, very rugged design, but our panelists thought it sounded shrill.

We like the cool, fold-out design of the Sony GTK-PG10, but we think the EcoXGear EcoBoulder+ sounds better, and it’s more waterproof.

Even with the Extra Bass button engaged, the Sony SRS-XB22 didn’t have enough bass for us, and voices sounded rather coarse.

Although the Soundcast VG1 sounds very clean and clear, it doesn’t play particularly loud for its price.

The Tribit MaxSound Plus is a good-sounding, affordable speaker that falls between the UE Wonderboom 2 and the Tribit XSound Go in price and performance. If we had more picks, this might be one.

We didn’t like the Tribit StormBox as much as its predecessor, the 360° Sound Speaker (which was our former top pick), because we thought its sound had a blaring, sibilant quality.

The Tronsmart Force didn’t put out enough bass for our panelists.

We think that, for its size, the Tronsmart Element T6 should have more bass; it tends to sound blaring and harsh.

The UE Boom 3 sounds good, plays loud, and has lots of great features, but our panelists prefer a little more bass for the price.

Our panelists really liked the UE Megaboom 3 for its features and rugged design, but they preferred the fuller sound of the Sony SRS-XB41 and JBL Xtreme 2.

The Urbanears Rålis sounded too bassy for our taste, and it didn’t play especially loud for its size.

The hockey-puck-sized VicTsing SoundHot C6 doesn’t play real loud, but it does sound good. And its detachable suction cup and IPX5 rating make it a good, cheap shower speaker.

The Vifa City is small and stylish, but it compressed the sound heavily when we played hip-hop and heavy rock tracks.

We can’t pick the Vifa Oslo because few people want to spend $450 (its price at the time of writing) for a portable speaker. But it plays loud and has a wonderfully full, clear sound.

The V-Moda Remix is an elegantly designed speaker, but it’s very pricey for the sound quality offered.

This guide may have been updated by Wirecutter. To see the current recommendation, please go here.

When readers choose to buy Wirecutter’s independently chosen editorial picks, Wirecutter and Engadget may earn affiliate commissions.

A Guide to Custom Elements for React Developers

CSS-Tricks by Charles Peters

I had to build a UI recently and (for the first time in a long while) I didn’t have the option of using React.js, which is my preferred solution for UI these days. So, I looked at what the built-in browser APIs had to offer and saw that using custom elements (aka Web Components) may just be the remedy that this React developer needed.

Custom elements can offer the same general benefits of React components without being tied to a specific framework implementation. A custom element gives us a new HTML tag that we can programmatically control through a native browser API.

Let’s talk about the benefits of component-based UI:

  • Encapsulation – concerns scoped to that component remain in that component’s implementation
  • Reusability – when the UI is separated into more generic pieces, they’re easier to break into patterns that you’re more likely to repeat
  • Isolation – because components are designed to be encapsulated and with that, you get the added benefit of isolation, which allows you scope bugs and changes to a particular part of your application easier

Use cases

You might be wondering who is using custom elements in production. Notably:

  • GitHub is using custom elements for their modal dialogs, autocomplete and display time.
  • YouTube’s new web app is built with Polymer and web components.

Similarities to the Component API

When trying to compare React Components versus custom elements, I found the APIs really similar:

  • They’re both classes that aren’t “new” and are able that extend a base class
  • They both inherit a mounting or rendering lifecycle
  • They both take static or dynamic input via props or attributes

Demo

So, let’s build a tiny application that lists details about a GitHub repository.

If I were going to approach this with React, I would define a simple component like this:

<Repository name="charliewilco/obsidian" />

This component takes a single prop — the name of the repository — and we implement it like this:

class Repository extends React.Component {
  state = {
    repo: null
  };

  async getDetails(name) {
    return await fetch(`https://api.github.com/repos/${name}`, {
      mode: 'cors'
    }).then(res => res.json());
  }

  async componentDidMount() {
    const { name } = this.props;
    const repo = await this.getDetails(name);
    this.setState({ repo });
  }

  render() {
    const { repo } = this.state;

    if (!repo) {
      return <h1>Loading</h1>;
    }

    if (repo.message) {
      return 
Error: {repo.message}
; } return (

{repo.full_name}

{repo.description}
); } }

See the Pen React Demo – GitHub by Charles (@charliewilco) on CodePen.

To break this down further, we have a component that has its own state, which is the repo details. Initially, we set it to be null because we don’t have any of that data yet, so we’ll have a loading indicator while the data is fetched.

During the React lifecycle, we’ll use fetch to go get the data from GitHub, set up the card, and trigger a re-render with setState() after we get the data back. All of these different states the UI takes are represented in the render() method.

Defining / Using a Custom Element

Doing this with custom elements is a little different. Like the React component, our custom element will take a single attribute — again, the name of the repository — and manage its own state.

Our element will look like this:

<github-repo name="charliewilco/obsidian"></github-repo>
<github-repo name="charliewilco/level.css"></github-repo>
<github-repo name="charliewilco/react-branches"></github-repo>
<github-repo name="charliewilco/react-gluejar"></github-repo>
<github-repo name="charliewilco/dotfiles"></github-repo>

See the Pen Custom Elements Demo – GitHub by Charles (@charliewilco) on CodePen.

To start, all we need to do to define and register a custom element is create a class that extends the HTMLElement class and then register the name of the element with customElements.define().

class OurCustomElement extends HTMLElement {}
window.customElements.define('our-element', OurCustomElement);

And we can call it:

<our-element></our-element>

This new element isn’t very useful, but with custom elements, we get three methods to expand the functionality of this element. These are almost analogous to React’s lifecycle methods for their Component API. The two lifecycle-like methods most relevant to us are the disconnectedCallBack and the connectedCallback and since this is a class, it comes with a constructor.

Name Called when
constructor An instance of the element is created or upgraded. Useful for initializing state, settings up event listeners, or creating Shadow DOM. See the spec for restrictions on what you can do in the constructor.
connectedCallback The element is inserted into the DOM. Useful for running setup code, such as fetching resources or rendering UI. Generally, you should try to delay work until this time
disconnectedCallback When the element is removed from the DOM. Useful for running clean-up code.

To implement our custom element, we’ll create the class and set up some attributes related to that UI:

class Repository extends HTMLElement {
  constructor() {
    super();

    this.repoDetails = null;

    this.name = this.getAttribute("name");
    this.endpoint = `https://api.github.com/repos/${this.name}`    
    this.innerHTML = `<h1>Loading</h1>`
  }
}

By calling super() in our constructor, the context of this is the element itself and all the DOM manipulation APIs can be used. So far, we’ve set the default repository details to null, gotten the repo name from element’s attribute, created an endpoint to call so we don’t have to define it later and, most importantly, set the initial HTML to be a loading indicator.

In order to get the details about that element’s repository, we’re going to need to make a request to GitHub’s API. We’ll use fetch and, since that’s Promise-based, we’ll use async and await to make our code more readable. You can learn more about the async/await keywords here and more about the browser’s fetch API here. You can also tweet at me to find out whether I prefer it to the Axios library. (Hint, it depends if I had tea or coffee with my breakfast.)

Now, let’s add a method to this class to ask GitHub for details about the repository.

class Repository extends HTMLElement {
  constructor() {
    // ...
  }

  async getDetails() {
    return await fetch(this.endpoint, { mode: "cors" }).then(res => res.json());
  }
}

Next, let’s use the connectedCallback method and the Shadow DOM to use the return value from this method. Using this method will do something similar as when we called Repository.componentDidMount() in the React example. Instead, we’ll override the null value we initially gave this.repoDetails — we’ll use this later when we start to call the template to create the HTML.

class Repository extends HTMLElement {
  constructor() {
    // ...
  }

  async getDetails() {
    // ...
  }

  async connectedCallback() {
    let repo = await this.getDetails();
    this.repoDetails = repo;
    this.initShadowDOM();
  }

  initShadowDOM() {
    let shadowRoot = this.attachShadow({ mode: "open" });
    shadowRoot.innerHTML = this.template;
  }
}

You’ll notice that we’re calling methods related to the Shadow DOM. Besides being a rejected title for a Marvel movie, the Shadow DOM has its own rich API worth looking into. For our purposes, though, it’s going to abstract the implementation of adding innerHTML to the element.

Now we’re assigning the innerHTML to be equal to the value of this.template. Let’s define that now:

class Repository extends HTMLElement {
  get template() {
    const repo = this.repoDetails;
  
    // if we get an error message let's show that back to the user
    if (repo.message) {
      return `
Error: ${repo.message}
` } else { return `

${repo.full_name}

${repo.description}
` } } }

That’s pretty much it. We’ve defined a custom element that manages its own state, fetches its own data, and reflects that state back to the user while giving us an HTML element to use in our application.

After going through this exercise, I found that the only required dependency for custom elements is the browser’s native APIs rather than a framework to additionally parse and execute. This makes for a more portable and reusable solution with similar APIs to the frameworks you already love and use to make your living.

There are drawbacks of using this approach, of course. We’re talking about various browser support issues and some lack of consistency. Plus, working with DOM manipulation APIs can be very confusing. Sometimes they are assignments. Sometimes they are functions. Sometimes those functions take a callback and sometimes they don’t. If you don’t believe me, take a look at adding a class to an HTML element created via document.createElement(), which is one of the top five reasons to use React. The basic implementation isn’t that complicated but it is inconsistent with other similar document methods.

The real question is: does it even out in the wash? Maybe. React is still pretty good at the things it’s designed to be very very good at: the virtual DOM, managing application state, encapsulation, and passing data down the tree. There’s next to no incentive to use custom elements inside that framework. Custom elements, on the other hand, are simply available by virtue of building an application for the browser.

Learn more

The post A Guide to Custom Elements for React Developers appeared first on CSS-Tricks.

Memorable Memorials: 10 Extraordinary War Monuments

[ By Steve in Culture & History & Travel. ]

These extraordinary war monuments stand out from the crowd in commemorating those who have fallen while performing their duty in the service of their country.

Memorial Day was formerly known as “Decoration Day” and was traditionally celebrated on May 30th – a date upon which no major battles had been fought. Memorial Day differs from Veterans Day in that the latter honors veterans of war. We lead off with a unique war memorial designed to fulfill its mission, as it were, on only one day every year: November 11th, at 11:11am, no less. The Anthem Veterans Memorial in suburban Phoenix, Arizona, was dedicated in 2012. The monument’s white stones, red bricks and blue sky reflect the colors of the American flag.

The Anthem Veterans Memorial consists of five staggered stone pillars signifying the five branches of the United States military. Designer Renee Palmer-Jones precisely aligned the pillars so that at 11:11am on November 11th, the sun’s rays pass through elliptical cutouts in the five pillars. The sunlight spotlights a mosaic of The Great Seal of the United States set into the red-bricked Circle of Honor.

Soldierstone Memorial

Most people have neither seen nor even heard of Soldierstone… and that’s just as the memorial’s creator, the late Stuart Allen Beckley, intended. The retired Army lieutenant colonel and Vietnam veteran sought to pay tribute to the uncredited people who assisted foreign soldiers over many decades of war in Southeast Asia.

Secreted in a clearing deep in Colorado’s 1.8-million-acre Rio Grande National Forest at 10,000 feet above sea level, Soldierstone‘s central 10-ft-tall monument bears quotes engraved in Vietnamese, Laotian, Cambodian and French – the languages of America’s allies through thirty years of fighting. Flickr user MJM1977visited the memorial on July 24th of 2014.

Polar Bear Monument

The Polar Bear Monument in Troy, Michigan, commemorates fallen soldiers of the North Russian Expeditionary Forces. About 75 percent of the 5,500 Americans sent to Archangel, Russia as part of the post-WWI Allied Intervention were from the Detroit area and called themselves the “Polar Bears”.

96 soldiers were KIA in Russia and in 1929; the remains of 56 were recovered and subsequently interred on this site on May 30th of 1930. Flickr user Jazz Guy (flickr4jazz) visited the Polar Bear Memorial on May 2nd, 2011.

Next Page – Click Below to Read More:
Memorable Memorials 10 Extraordinary War Monuments

[ By Steve in Culture & History & Travel. ]

[ WebUrbanist | Archives | Galleries | Privacy | TOS ]

Breathing Earth of vegetation

Flowing Data

Using data from NOAA STAR, Nadieh Bremer creates a breathing Earth that shows the seasonal cycles of vegetation over the course of a year.

The animation happening in the map above, through all 52 weeks of 2016, visualizes these seasonal cycles. The rise and fall of the growing season in the Northern Hemisphere is particularly visible. However, when focusing on different parts of the planet other cycles & different seasons become noticeable as well; the Southern regions of Africa, Brazil, and New Zealand, having the reverse cycle as the North, or India getting drier and drier up until the July when the monsoons start. The more often you watch the year go by, the more small details will start to stand out.

See also John Nelson’s project from a while back of the same name, which made use of satellite imagery.

Tags: animation, environment, vegetation

¿Esta píldora te evitará ir al gimnasio?

Genciencia by Sergio Parra

Si el olor de los gimnasios te repele, si no quieres compartir espacio vital con los que suelen retorcer mancuernas para, a continuación, avanzabar en esa actitud chulesca que recuerda de perfil a un croissant, o sencillamente hacer deporte te da pereza, quizá esta píldora podría ser la solución a todos tus males.

En definitiva, una pastilla que produce los beneficios del ejercicio físico ahorrándonos los sacrificios que acarrea.

El desarrollo de la píldora

Esta pastilla no era un mito, sino una idea conceptual basada en un desarrollo de investigadores del Instituto Salk, en La Jolla (California), que creen que sería posible de concebirla.

Con todo, si ya estás empezando a dar palmadas de alegría, mejor que te advierta que: a) todavía queda trabajo para terminarla y b) no se usará para los perezosos, sino para personas con trastornos cardiacos o pulmonares, discapacitados o afectados por la diabetes tipo 2.

El secreto reside en el hallazgo de un gen en ratones, el el PPARD, que causa los mismos efectos que el entrenamiento físico: no ganaban peso con facilidad y tenían una respuesta rápida a la insulina.

Los investigadores han encontrado también un compuesto químico, llamado GW1516, que activaba el gen PPARD.

Tras el análisis molecular de los músculos de ratones que habían recibido este compuesto duarante ocho semanas, se descubrió que cambiaba la expresión de 975 genes: los que se activaban estaban vinculados a la quema de grasa para conseguir energía, mientras que los se apagaban eran los encargados de hacer lo propio con los carbohidratos (azúcares). Según explica Michael Downes, coautor del estudio:

El estudio sugiere que quemar grasa no es tanto una manera de lograr la resistencia cardiovascular, sino más bien de ahorrar glucosa y preservar el buen funcionamiento del cerebro.

El siguiente paso potencial sería la creación de un medicamento para humanos basado en el compuesto GW1516 que pueda activar el gen PPARD sin necesidad de hacer ejercicio a fin de ayudar a personas con trastornos cardiacos o pulmonares, discapacitados o afectados por la diabetes tipo 2.

Poly Fluid Sizing

Jake Wilson digs in, and while he finds that calc() isn’t quite up for the job (e.g. font-size: calc(3vw * 3vw); /* This doesn't work in CSS */), he does land on a technique he’s calling Poly Fluid Sizing, which takes a map of breakpoints and font sizes and linear interpolates them just about as good (*it depends*).

Direct Link to ArticlePermalink

Poly Fluid Sizing is a post from CSS-Tricks

Air Tight Bonsai AL-05 Mini-Monitor

The Absolute Sound Articles

Air Tight Bonsai AL-05 Mini-MonitorIf you think mini-monitor means small sound, the Air Tight Bonsai will have you thinking again. Forget mini; the sound here is decidedly, uh, maxi. For starters, the speaker’s wide dispersion and voluptuously full and rounded imaging will fool you into thinking you’re listening to a far larger transducer. Plus, in the midband the Bonsai delivers an exciting sense of immediacy and a bold presence, coupled with remarkable detail, that also belie its size and single 4″ driver. It’s a thing of beauty to behold, to boot. Air Tight, founded by the legendary Atsushi Miura and based outside of Osaka, …

 

Discover “Unpaywall,” a New (and Legal) Browser Extension That Lets You Read Millions of Science Articles Normally Locked Up Behind Paywalls

Open Culture

Earlier this month, Impactstory, a nonprofit supported by grants from the National Science Foundation and the Alfred P. Sloan Foundation, launched, Unpaywall, a free browser extension that helps you “find open-access versions of paywalled research papers, instantly.”

As the co-founders of Impactstory describe itUnpaywall is “an extension for Chrome and Firefox that links you to free full-text as you browse research articles. Hit a paywall? No problem: click the green tab and read it free!”

Their FAQ gets into the mechanics a little more, but here’s the gist of how it works: “When you view a paywalled research article, Unpaywall automatically looks for a copy in our index of over 10 million free, legal fulltext PDFs. If we find one, click the green tab to read the article.”

While many science publishers put a paywall in front of scientific articles, it’s often the case that these articles have been published elsewhere in an open format. “More and more funders and universities are requiring authors to upload copies of their papers to [open] repositories. This has created a deep resource of legal open access papers…” And that’s what Unpaywall draws on.

This seems like quite a boon for researchers, journalists, students and policymakers. You can download the Unpaywall extension for Chrome and Firefox, or learn more about the new service at the Unpaywall website.

Note: Over at Metafilter, you can find a good list of sources of, or methods for, obtaining free academic content.

via London School of Economics/Metafilter

Follow Open Culture on Facebook and Twitter and share intelligent media with your friends. Or better yet, sign up for our daily email and get a daily dose of Open Culture in your inbox. 

If you’d like to support Open Culture and our mission, please consider making a donation to our site. It’s hard to rely 100% on ads, and your contributions will help us provide the best free cultural and educational materials.

Discover “Unpaywall,” a New (and Legal) Browser Extension That Lets You Read Millions of Science Articles Normally Locked Up Behind Paywalls is a post from: Open Culture. Follow us on Facebook, Twitter, and Google Plus, or get our Daily Email. And don’t miss our big collections of Free Online Courses, Free Online Movies, Free eBooksFree Audio Books, Free Foreign Language Lessons, and MOOCs.