James Reads

HomeBlog

Week of Nov 11th, 2018

  • Black Georgia State Senator Arrested For Doing Job

    Apparently, a black woman can find herself arrested at a moment's notice, even though the only crime she commits is being damn good at her job.

    Read at 06:57 pm, Nov 16th

  • Ending the Amazon Hunger Games

    Amazon is seeking a location for its second corporate campus — already known as “HQ2” — and the company has turned its search into a surreal spectacle by inviting local governments to publicly court the multi-billion-dollar company with tax incentives and subsidy packages.

    Read at 06:54 pm, Nov 16th

  • So Just What Was That Melania Power Play About?

    If the president loses the First Lady, it’s game over. Yet Donald Trump has come so unhinged that he let the legitimate concerns of Melania explode into a public rebuke of him.

    Read at 06:49 pm, Nov 16th

  • How Passion for Programming Can Make us Worse at our Jobs

    “Good programmers are passionate about what they do” is basically a platitude in our industry.

    Read at 06:45 pm, Nov 16th

  • Alexandria Ocasio-Cortez Is Right about Amazon’s Corporate Welfare

    After a long process, Amazon finally announced that it will locate its new headquarters in New York and Virginia. Following the announcement, Representative-elect Alexandria Ocasio-Cortez tweeted that “Amazon is a billion-dollar company.

    Read at 02:37 pm, Nov 16th

  • Another Facebook vulnerability could have exposed information about users and their friends

    The security company Imperva has released new details on a Facebook vulnerability that could have exposed user data.

    Read at 02:25 pm, Nov 16th

  • Will New York Fund Amazon Subsidies or Student Debt Relief?

    New York Gov. Andrew Cuomo made headlines begging Amazon to site its second headquarters in the state. Now, however, prominent Democrats in the state Senate and Assembly have slammed the idea of offering taxpayer subsidies to the retail giant.

    Read at 02:21 pm, Nov 16th

  • Nigerian firm takes blame for routing Google traffic through China

    SAN FRANCISCO (Reuters) - Nigerian internet provider Main One Cable Co took responsibility on Tuesday for a glitch that caused some Google traffic to be temporarily misrouted through China, saying it accidentally caused the problem during a network upgrade.

    Read at 09:20 am, Nov 16th

  • How to Stop the Amazon Extortion From Happening Again

    So, after leading America’s desperate cities around by the nose for a year, an $800 billion company has at last selected the winners of the contest to have the right to shower it with taxpayer subsidies. If only there was a way to prevent this sort of thing from ever happening again...

    Read at 09:20 am, Nov 16th

  • Amazon selects New York City and Northern Virginia for new headquarters

    Amazon today announced that we have selected New York City and Arlington, Virginia, as the locations for our new headquarters.

    Read at 09:16 am, Nov 16th

  • Company Towns: 1880s to 1935

    Company Towns in the U.S. 1880s to 1935 Introduction: In the 1890s, in remote locations such as railroad construction sites, lumber camps, turpentine camps, or coal mines, jobs often existed far from established towns.

    Read at 09:12 am, Nov 16th

  • Students in Brooklyn protest their school's use of a Zuckerberg-backed online curriculum that Facebook engineers helped build

    Students at a Brooklyn high school staged a walkout last week to protest teaching methods in their classrooms, which include a web-based curriculum program partially funded by Facebook CEO Mark Zuckerberg.

    Read at 09:03 am, Nov 16th

  • This Is All Donald Trump Has Left

    President Donald Trump often stands near a helicopter on the White House’s South Lawn while reporters shout questions at him. Certain elements of this ritual are the same every time.

    Read at 09:00 am, Nov 16th

  • Five days of fury: Inside Trump’s Paris temper, election woes and staff upheaval

    As he jetted to Paris last Friday, President Trump received a congratulatory phone call aboard Air Force One.

    Read at 08:09 am, Nov 16th

  • How to use Docker for Node.js development

    There are a couple aspects of Node.js that make using Docker for development somewhat difficult. The primary difficulties come from dependency differences based on environment and a long running server process during development.

    Read at 08:57 pm, Nov 15th

  • Facebook Failed to Police How Its Partners Handled User Data

    Facebook failed to closely monitor device makers after granting them access to the personal data of hundreds of millions of people, according to a previously unreported disclosure to Congress last month.

    Read at 07:59 pm, Nov 15th

  • Whitaker’s Appointment as Acting Attorney General Faces Court Challenge

    WASHINGTON — In the days since President Trump ousted Attorney General Jeff Sessions and declared that he was installing Matthew G. Whitaker as the acting attorney general, many critics have challenged Mr. Whitaker’s fitness for the job.

    Read at 02:13 pm, Nov 15th

  • Trump is preparing to remove Kirstjen Nielsen as Homeland Security secretary, aides say

    President Trump has told advisers he has decided to remove Homeland Security Secretary Kirstjen Nielsen, and her departure from the administration is likely to occur in the coming weeks, if not sooner, according to five current and former White House officials.

    Read at 11:31 am, Nov 15th

  • Episode 266: Andy Bloch

    Andy Bloch is a long-time professional poker player and computer programmer who was one of the pioneers at the intersection of these fields. He was also a member of the MIT Blackjack team that was the subject of Bringing Down the House and Twenty-One and an owner of Full Tilt Poker.

    Read at 09:13 am, Nov 15th

  • Faster async functions and promises · V8

    Asynchronous processing in JavaScript traditionally had a reputation for not being particularly fast. To make matters worse, debugging live JavaScript applications — in particular Node.js servers — is no easy task, especially when it comes to async programming.

    Read at 11:38 pm, Nov 14th

  • Confession: I don’t unit test React/Redux code

    And to be honest, I don’t always unit test backend code these days either. I have spent years educating myself in the art of unit testing. In my career, I have probably written thousands of unit tests.

    Read at 07:49 pm, Nov 14th

  • Amazon’s HQ2 Spectacle Isn’t Just Shameful—It Should Be Illegal

    This article was updated at 10:10 a.m. ET on November 16, 2018. The Amazon HQ2 saga had all the hallmarks of the gaudiest reality TV. It was an absurd spectacle, concluding with a plot twist, which revealed a deep and dark truth about the modern world.

    Read at 07:46 pm, Nov 14th

  • A heavily Republican Florida county allowed some residents to vote by email, apparently illegally

    Former Florida Gov. Jeb Bush (R) jumped into the GOP pile-on of Broward County elections supervisor Brenda Snipes on Monday, tweeting that "there is no question ... Snipes failed to comply with Florida law on multiple counts.

    Read at 07:28 pm, Nov 14th

  • The next version of HTTP won’t be using TCP

    The next version of the Hypertext Transfer Protocol (HTTP)—the network protocol that defines how browsers talk to Web servers—is going to make a major break from the versions in use today. Today's HTTP (versions 1.0, 1.1, and 2) are all layered on top of TCP (Transmission Control Protocol).

    Read at 07:27 pm, Nov 14th

  • De Blasio calls Democratic takeover of NYS Senate 'whole new ballgame'

    While he did not mention it, the law granting the mayor control of the city schools is also set to expire next year. De Blasio in recent years was only granted short-term extenders because the Senate GOP wouldn’t go longer. The law should face an easier renewal debate this time around.

    Read at 07:25 pm, Nov 14th

  • YouTube CEO calls EU’s proposed copyright regulation financially impossible

    YouTube CEO Susan Wojcicki has once again decried the European Union’s proposed copyright directive, arguing in a new blog post that it’s impossible for a platform like YouTube to comply with the suggested regulations.

    Read at 07:23 pm, Nov 14th

  • A 100,000-router botnet is feeding on a 5-year-old UPnP bug in Broadcom chips

    A recently discovered botnet has taken control of an eye-popping 100,000 home and small-office routers made from a range of manufacturers, mainly by exploiting a critical vulnerability that has remained unaddressed on infected devices more than five years after it came to light.

    Read at 07:20 pm, Nov 14th

  • Bad Practices on Phone Number Form Fields

    Phone number fields, along with birthdate fields, are tricky to get right. There are many phone number formats users can choose from and they’re often unsure which format is valid. Sometimes they’re even unsure if they need to include their country code with it.

    Read at 07:18 pm, Nov 14th

  • Should the Press Boycott Trump? Political Strategists Weigh In

    The CNN chief Jeff Zucker gave his troops unexpected orders the day after President Trump snatched the press credential away from Jim Acosta, one of the network’s White House correspondents. The temptation to play it big was strong.

    Read at 07:16 pm, Nov 14th

  • Veterans haven't received GI Bill benefits for months due to ongoing IT issues at VA

    "This is — to be kind — a train wreck,” said Rep. Phil Roe, R-Tenn., the chairman of the House Committee on Veterans Affairs. Shelley Roundtree departed the U.S. Army in 2013 after seeing friends and fellow soldiers die in combat during his tour in Afghanistan.

    Read at 07:12 pm, Nov 14th

  • Enthusiasts vs. Pragmatists: two types of programmers and how they fail

    Do you love programming for its own sake, or do you do for the outcomes it allows? Depending on which describes you best you will face different problems in your career as a software developer. Enthusiasts code out of love.

    Read at 12:21 pm, Nov 14th

  • Zeit Serverless Docker, node.js backend and variables not allowed

    ? Support the show by becoming a Patreonhttps://www.youtube.com/watch?v=trP9q...? (Patrons only) Fun Fun Forum topic for suggestions:https://www.funfunforum.com/t/need-yo...? (Patrons only) Discussion for this episodehttps://www.funfunforum.com/t/lets-co...? mpj on Twitterhttps://twitte

    Read at 10:46 am, Nov 14th

  • Democrats Say Their First Bill Will Focus On Strengthening Democracy At Home

    Democrats will take control of the U.S. House in January with big items topping their legislative to-do list: Remove obstacles to voting, close loopholes in government ethics law and reduce the influence of political money. Party leaders say the first legislative vote in the House will come on H.R.

    Read at 09:22 am, Nov 14th

  • Is Fraud Part of the Trump Organization’s Business Model?

    What, exactly, is Donald Trump’s business? The Trump Organization is unusual in that it doesn’t appear to do the same thing for very long.

    Read at 09:20 am, Nov 14th

  • On GraphQL Schema Stitching & API Gateways

    I’ve been thinking a lot on GraphQL “Schema Stitching” these days. At its core, Schema Stitching is the art of composing multiple GraphQL Schemas into one GraphQL Schema.

    Read at 09:15 am, Nov 14th

  • Reactive Programming in JavaScript with RxJS.

    RxJS is JavaScript library for transforming, composing and querying asynchronous streams of data. RxJS can be used both in the browser or in the server-side using Node.js. I took a challenge to explain RxJS to developers in a simplistic way.

    Read at 09:10 am, Nov 14th

  • M.T.A. Chairman, Tasked to Fix New York’s Subway Problems, Resigns

    As New York City continues to grapple with a subway crisis, Gov. Andrew M. Cuomo must now look for a new leader to turn around the system. Three days after Mr. Cuomo was elected to a third term, he announced that the chairman of the Metropolitan Transportation Authority was stepping down.

    Read at 09:08 am, Nov 14th

  • State Senate election wins buoy tenant activists' hopes for stronger rent regulations

    Tenant activists are optimistic now that the Democrats will lead the State Senate in 2019. Photo Credit: Getty Images/Spencer Platt

    Read at 09:03 am, Nov 14th

  • Amazon HQ2 may bypass City Council to settle in Long Island City

    Earlier this week it was reported that Amazon’s rumored Long Island City HQ2 could be located within the proposed Anable Basin megaproject and Crain’s has now learned that Governor Andrew Cuomo may be planning to circumvent City Council to make it happen.

    Read at 09:01 am, Nov 14th

  • This tax break could be worth up to nearly $1B for Amazon

    Officials have kept quiet any economic incentives they’re offering Amazon to move part of its second headquarters to Long Island City. But there’s one benefit already on the table that could be worth up to nearly $1 billion for the e-commerce giant.

    Read at 08:59 am, Nov 14th

  • Lean Testing or Why Unit Tests are Worse than You Think

    Testing is a controversial topic. People have strong convictions about testing approaches. Test Driven Development is the most prominent example. Clear empirical evidence is missing which invites strong claims. I advocate for an economic perspective towards testing.

    Read at 08:13 pm, Nov 13th

  • A Few Questions Need Answers Before Amazon Invades Long Island City

    Monday's bombshell revelation that Amazon might be ready to split its new second headquarters in two and locate one half in Long Island City, initially reported in the Wall Street Journal but later repeated by the Times, let loose a flood of speculation about what it would mean for New Yorkers to

    Read at 08:06 pm, Nov 13th

  • My Experience with a Pixelbook

    About 2 months ago I switched from using Kubuntu on a Dell XPS 15 to working full time on a Pixelbook running Chrome OS.

    Read at 07:25 pm, Nov 13th

  • The “C” in CSS: The Cascade

    Following up from Geoff’s intro article on The Second "S" in CSS, let’s now move the spotlight to the "C" in CSS — what we call the Cascade. It’s where things start to get messy, and even confusing at times.

    Read at 07:19 pm, Nov 13th

  • Amazon HQ2 likely to be split between Crystal City, VA, and Long Island City, NY

    It seems Amazon has finally chosen the two locations for its new headquarters: Queens, New York, and Arlington, Virginia. The company has yet to formally announce its decision, but news about the HQ2 sites began leaking last week.

    Read at 09:29 am, Nov 13th

  • Stephanie Miner wins ballot line for new Serve America Movement in NY governor race

    Former Syracuse Mayor Stephanie Miner succeeded Tuesday in her effort to win a recognized ballot line for a new party called the Serve America Movement. She won 50,672 votes across the state, according to unofficial results from the New York State Board of Elections.

    Read at 09:25 am, Nov 13th

  • NYC’s ballot measures all receive decisive approval

    Last night, New Yorkers gave a decisive “yes” vote to three ballot proposals that came from the city’s Charter Review Commission, all of which seek to give city residents more say in the city’s various democratic processes.

    Read at 09:23 am, Nov 13th

  • Can Democrats Pass Progressive Legislation Now?

    New York has had its share of mammoth, impregnable governors. There was Thomas Dewey, the reform dynamo who nearly became president, and Nelson Rockefeller, the heir to America’s vastest fortune, an eventual vice president, and the only governor to win four terms.

    Read at 09:22 am, Nov 13th

  • Gounardes defeats Golden after tight campaign

    The Golden era has come to an end. Democrat Andrew Gounardes scored an upset victory in a tight race against eight-term incumbent state Sen.

    Read at 09:15 am, Nov 13th

  • How Democrats finally did it on Long Island

    Long Island emerged on Tuesday as the pivotal swing region in New York Democrats’ new state Senate majority.

    Read at 09:14 am, Nov 13th

  • Democrats Wrest Control Of NY State Senate From Republicans

    Senate Democratic Conference Leader Andrea Stewart-Cousins, D-Yonkers, will be the new Senate Majority Leader in New York.

    Read at 09:10 am, Nov 13th

  • Henry Zhu Through the Open Source Looking Glass

    Read at 08:08 am, Nov 13th

  • Computing, Climate Change, and All Our Relationships by Nabil Hassein – Deconstruct

    (Editor's note: transcripts don't do talks justice.

    Read at 07:25 pm, Nov 12th

  • New York Should Say No to Amazon

    Mr. Kim is a member of the New York State Assembly. Ms. Teachout is a law professor at Fordham University. This week, word leaked that Amazon may be close to finalizing a deal to set up a major operation in Long Island City, Queens. The news, which was embraced with peak sycophancy by Gov.

    Read at 02:39 pm, Nov 12th

  • Amazon must give up Echo recordings in double murder case, judge rules

    On Friday, a local judge in New Hampshire ordered Amazon to hand over Echo recordings made the day a Farmington couple was murdered at its home. According to local media accounts, Strafford County Superior Court Presiding Justice Steven M.

    Read at 09:27 am, Nov 12th

  • 1 Thing You Can Do To Make Your Internet Safer And Faster

    On April 1st, 2018, we announced 1.1.1.1, the fastest public DNS resolver in the world ???. Today, we are launching the 1.1.1.1 mobile app to make it incredibly easy to use 1.1.1.1 on your phone. Any time you are on a public internet connection people can see what sites you visit.

    Read at 09:26 am, Nov 12th

  • Facebook is ending forced arbitration for sexual harassment complaints

    Facebook will no longer force employees to settle sexual harassment claims in private arbitration, following a similar change at Google yesterday, according to The Wall Street Journal.

    Read at 09:26 am, Nov 12th

  • “Weed Nazi” Stumbles in Effort to Unmask Antifascist Activists

    San Francisco, CA – Oral arguments began Friday morning in San Francisco Superior Court where “weed Nazi”, Bethany Sherman, is seeking to unmask anonymous antifascist researchers for publishing articles outing her as a neo-Nazi.

    Read at 09:25 am, Nov 12th

  • Google Workers Reject Silicon Valley Individualism in Walkout

    VideoWorkers are protesting the company’s handling of sexual harassment. The walkouts followed a New York Times report that the tech giant paid millions of dollars in exit packages to male executives accused of harassment.

    Read at 09:24 am, Nov 12th

  • The healthiest people in the world don’t go to the gym

    If you want to be as healthy as possible, there are no treadmills or weight machines required. Don’t just take my word for it—look to the longest-lived people in the world for proof.

    Read at 09:19 am, Nov 12th

  • Tech-Bro Culture Was Written in the Code

    Adapted from A People’s History of Computing in the United States by Joy Lisi Rankin. Out now from Harvard University Press.

    Read at 09:18 am, Nov 12th

  • Matt Mullenweg Addresses Controversies Surrounding Gutenberg at WordCamp Portland Q&A

    Matt Mullenweg joined attendees at WordCamp Portland, OR, for a Q&A session last weekend and the recording is now available on WordPress.tv. The first question came from a user who tried Gutenberg and turned it off because of a plugin conflict. She asked if users will have to use Gutenberg when 5.

    Read at 09:08 am, Nov 12th

  • What if Google unionized?

    Last week more than 20,000 Google employees walked out of their workplace to protest, and demand major changes in, how the company handles harassment and discrimination.

    Read at 09:04 am, Nov 12th

  • Labor group slams Google workplace changes for treatment of contractors

    Tech Workers Coalition, a group that includes staffers in the tech industry, as well as labor and community organizers, said temporary, vendor and contract workers, known as TVCs, have been marginalized by Google's executive leadership.

    Read at 08:59 am, Nov 12th

  • Google Changes Policies on Sexual Misconduct After Protests

    Google changed some policies on sexual misconduct after thousands of employees walked out of their offices last week to protest big payouts for executives accused of harassment and other misbehavior. The Alphabet Inc.

    Read at 11:10 pm, Nov 11th

  • Why the Google Walkout Was a Watershed Moment in Tech

    Outsiders have little leverage to force the industry to change. The companies’ own workers are another matter. For a few hours last Thursday, just about everything at Google ground to a halt. At 11 a.m.

    Read at 11:02 pm, Nov 11th

  • Your Office Doesn’t Have Nap Time Because You Are Not a Child

    Send questions about the office, money, careers and work-life balance to workfriend@nytimes.com. Include your name and location, even if you want them withheld. Letters may be edited. I want to ask out this woman at my company. She’s junior to me, but doesn’t report to me directly.

    Read at 10:38 pm, Nov 11th

  • Inside Kris Kobach’s losing Kansas campaign: ‘Check logic and reason at the door’

    Kris Kobach blamed money. He blamed history. He didn’t blame himself for losing a race for governor in a state where Republicans outnumber Democrats nearly 2 to 1.

    Read at 10:34 pm, Nov 11th

  • Kavanaugh Accuser Christine Blasey Ford Continues Receiving Threats, Lawyers Say

    Christine Blasey Ford is still being harassed after leveling sexual assault allegations against Supreme Court Justice Brett Kavanaugh, her lawyers say. "Justice Kavanaugh ascended to the Supreme Court, but the threats to Dr.

    Read at 09:50 pm, Nov 11th

  • Sessions, in Last-Minute Act, Sharply Limits Use of Consent Decrees to Curb Police Abuses

    WASHINGTON — Former Attorney General Jeff Sessions has drastically limited the ability of federal law enforcement officials to use court-enforced agreements to overhaul local police departments accused of abuses and civil rights violations, the Justice Department announced on Thursday.

    Read at 09:48 pm, Nov 11th

  • Matthew Whitaker is a crackpot

    The acting attorney general of the United States is a crackpot. Matthew G. Whitaker, installed in the job by President Trump to replace Jeff Sessions, was asked in 2014, during an ill-fated run in the Republican senatorial primary in Iowa, about the worst decisions in the Supreme Court’s history.

    Read at 09:43 pm, Nov 11th

  • 8 years of suffering under Barack Obama

    The sentence I hear most from well-meaning, conservative friends since President Trump’s election is this: “We suffered 8 years under Barack Obama.” Fair enough. Let’s take a look. The day Obama took office, the Dow closed at 7,949 points. Eight years later, the Dow had almost tripled.

    Read at 09:40 pm, Nov 11th

  • File Upload With Multer in Node.js and Express

    In this tutorial, I'll show you how to use the Multer library to handle different file upload situations in Node. As I said above, Multer is Express middleware. Middleware is a piece of software that connects different applications or software components.

    Read at 09:40 pm, Nov 11th

  • Trump’s Appointment of the Acting Attorney General Is Unconstitutional

    The president is evading the requirement to seek the Senate’s advice and consent for the nation’s chief law enforcement officer and the person who will oversee the Mueller investigation. Mr. Katyal and Mr. Conway are lawyers.

    Read at 09:38 pm, Nov 11th

  • ZEIT – Now 2.0

    Today we are proud to present Now 2.0 to the world. Our new platform simplifies the organization of your codebase, while dramatically improving the reliability and scalability of your deployments.

    Read at 09:27 pm, Nov 11th

  • JavaScript Private and Public Class Fields

    This post is designed to be read after you read A Beginner’s Guide to JavaScript’s Prototype. My favorite part of the JavaScript community is that everyone seems to always be asking “why?”.

    Read at 09:12 pm, Nov 11th

  • React Hook “Gotcha’s”

    I’ve been playing around with React Hooks a little bit (both with Curi and React Router). The experience has mostly been smooth, but there are a few places where I have gotten hung up: Effects are functions that are run after React finishes rendering.

    Read at 09:05 pm, Nov 11th

  • React Render Props

    Let’s say we were in charge of recreating a dashboard similar to Stripe’s. As most projects go, everything goes great until the very end.

    Read at 09:00 pm, Nov 11th

  • Implicit state sharing: React’s context API & provide/inject in Vue

    Imagine you are creating an accordion component that you want to distribute publicly through an npm package. You would like the user of this accordion to be able to use the component in a very flexible way, by composing multiple components together.

    Read at 03:58 pm, Nov 11th

  • ETS, Day 3

    I wrapped up my research at ETS today. Honestly, yesterday was the big day in terms of uncovering materials that are pertinent to my book. Today was one of those bonus days, where one finds a bunch of stuff that makes one say “Oh, I want to write a book on that.”

    Read at 03:52 pm, Nov 11th

  • How to set up a GraphQL Server using Node.js, Express & MongoDB

    So you are planning to start with GraphQL and MongoDB. Then you realize how can I set up those two technologies together? Well, this article is made precisely for you. I’ll show you how to set up a GraphQL server using MongoDB.

    Read at 03:48 pm, Nov 11th

  • In Tuesday's Absolute Worst Vote, California Opts for Year-Round Daylight Saving

    On Tuesday as voters across the country headed to the polls in a referendum on the Republican’s two years of controlling the Legislative and Executive Branch, a more sinister referendum was was underway in California.

    Read at 02:32 pm, Nov 11th

  • How to make your code better with intention-revealing function names

    Code is a way to communicate with developers reading it. Functions with intention-revealing names are easier to read. We read the function name and can understand its purpose. The function name is our tool for expressing intent on a piece of code.

    Read at 02:31 pm, Nov 11th

  • Hack Education Weekly News

    Each week, I gather a wide variety of links to education and education technology articles. All this feeds the review I write each December on the stories we are told about the future of education.

    Read at 02:26 pm, Nov 11th

  • I was at the protest outside Tucker Carlson’s house. Here’s what actually happened.

    About a dozen protesters visited Tucker Carlson’s home Wednesday evening with signs, a megaphone, and a tambourine.

    Read at 11:05 am, Nov 11th

  • Stop Feeding the Hot Duck

    Hot Duck mania has gripped the internet. It’s sent birding twitter atwittering, and the New York City news media seems to hang on the duck’s every move. At this point, the duck may be a semi-permanent fixture of Central Park, and it’s good that so many people love it.

    Read at 10:52 am, Nov 11th

  • Will the Left Go Too Far?

    For the third time in a century, leftists are driving the Democratic Party’s agenda. Will they succeed in making America more equitable, or overplay their hand?

    Read at 10:50 am, Nov 11th

  • Tech C.E.O.s Are in Love With Their Principal Doomsayer

    The futurist philosopher Yuval Noah Harari worries about a lot. He worries that Silicon Valley is undermining democracy and ushering in a dystopian hellscape in which voting is obsolete.

    Read at 10:16 am, Nov 11th

  • New York Should Say No to Amazon

    Mr. Kim is a member of the New York State Assembly. Ms. Teachout is a law professor at Fordham University. This week, word leaked that Amazon may be close to finalizing a deal to set up a major operation in Long Island City, Queens. The news, which was embraced with peak sycophancy by Gov.

    Read at 02:40 am, Nov 11th

  • On Migrating from Wordpress to Static Markdown - Thomas Hunter II

    On Migrating from Wordpress to Static Markdown 9 min read Nov 9, 2018 The website you're currently reading has evolved much over the years. Its humble beginning circa 2006 was that of a web programming tutorial site, nucleocide.net: a hand-rolled PHP/MySQL website infested with SQL Injections. Years later it migrated into a business, renownedmedia.com: a Wordpress blog for an LLC of mine. Finally, inspired by David Walsh, the site became thomashunter.name: another Wordpress blog with a dozen plugins, an ever-changing layout, and an attempt at personal branding. Fast forward to 2018 and the site has amassed over 400 posts. Content was copied and pasted from platform to platform along the way. Images were haphazardly uploaded, screenshots retaining their default messy macOS filenames. What could have been an empire of original content was reduced to a mire of digital hoarding that only served to distract the poor reader from morsels of useful content. Over the past week I finally cleaned out this messy closet of a website. Like the title gives away, the content has been migrated from the feature-rich Wordpress to a simple Markdown-based static site generator. What follows is an explanation of these changes and the benefits—and drawbacks—which come with them. Philosophy The current incantation of this site was made by following these simple guidelines: Portability CMSs and Blogging platforms come and go. Some store content as HTML, some as a proprietary format like BBCode, some as some sort of weird HTML hybrid thing (like Wordpress). Content can be stored in SQL, NoSQL, or even text files. I really wanted a simple format that I could easily migrate to the next big platform in several years. I chose the ubiquitous Markdown format and a simple directory of images. Easy to Backup Backing up the content of a website is imperative. When running everything in Wordpress the natural flow is to make changes in production, on a single server, performing the occasional manual backup. If the server dies then the content is forever lost. With this static site all the Markdown and images exist locally, rendered HTML and images are on a web server, and Markdown is committed to Git. If any single one of those sources were to fail the site could be reconstructed by consulting the other two sources. Freedom One thing I really wanted to avoid is vendor lock-in. Many people in our industry blog with Medium these days. I admit that I like to put copies of posts there occasionally, or even use it when blogging for an organization. However, whenever I have a post of mine hosted solely on Medium it just doesn't feel like I own it anymore. Also, if a post is hosted at medium.com—a site owned by a company—then it's not doing anything to increase the page rankings for thomashunter.name—a site owned by myself. GitHub Pages were also appealing, though despite my love of their product it is still a form of vendor lock-in. I also didn't want to migrate content to a subdomain (for GitHub DNS purposes), and I want to easily host web applications next to content (like this goofy Batman Comic Generator. Ultimately, serving HTML content via nginx, hosted on a VPS I control, provides all the flexibility I desire. SSH-ing in to occasionally run sudo apt update && sudo apt upgrade isn't that much of a maintenance overhead. Noteworthy Features There are many common anti-patterns employed by technical blogs; such issues are usually the fault of the underlying blogging platform, not the author themselves. While rebuilding this site I wanted to avoid these anti-patterns while also implementing practical new patterns. Relevant Next/Previous Links How many times have you clicked the Next link at the end of a Wordpress post, only to be taken to an unrelated post? Those links typically take the reader to the next or previous chronological post—a lesson about CSS followed by a story about a pleasing ham sandwich. This site only displays Next/Previous links when articles are part of a series. An example of this is Advice for Technical Public Speaking: Part 2 wherein the Next and Previous links will take you to parts 1 and 3. Printable Content Visit a Medium article and launch your browser's Print Preview feature and you'll end up with a few inches of margin and a trailing, empty page. This experience, while frustrating, is better than that of most websites. Now try the same thing on this site. The sidebar disappears and the footer gains small details to compensate. This is handled by the print-only CSS media query and looks something like this: .print-only { display: none; } /* Hidden unless printed */ @media print { aside { display: none; } /* Don't print the Sidebar */ main { width: initial; margin: 0; } /* Remove excessive margins */ .print-only { display: initial; } } It is difficult track the myriad of conversations relating to a particular post. Consider when one is submitted to Hacker News, Reddit, and Facebook. How is a reader to ever join in the conversation? This site makes third-party comments a first-class citizen. For an example see Node.js and Lambda Three Part Series; at the end of the post are links to relevant Hacker News, Reddit, and Medium discussions. Shadow (Canonical) Posts One goal I've always had is that of a central location linking to every post I've written over the years; including guest blog posts published to other websites. However, a lot of those sites eventually suffer from bit rot, such as Hosting and Developing Cobalt Calibur on the MongoDB website. This site reproduces much of that content locally, such as this local version of that same post. Normally this would negatively affect search engine traffic, but with the help of the canonical meta tag, local "shadow posts" won't be listed in search engines. <link rel="canonical" href="https://www.example.com/post-by-tlhunter" /> Valid Copyrights Most sites use a generic site-wide template for the footer. Such a footer usually contains text like Copyright $YearSiteWasMade $EntityName or Copyright $YearSiteWasMade - $YearPageWasViewed $EntityName. Unfortunately, this means a website established in 2014, and that contains a blog post written in 2016, will incorrectly display a copyright of 2014. This site takes the timestamp of the rendered post and uses that for the footer date, ensuring the footer copyright is always accurate. Deprecated Posts Some posts are so old that their content is no longer accurate. However, they may still get a decent amount of views or be useful from a historical point of view. In these situations the post gains a frontmatter deprecated: true tag. This results in a large DEPRECATED banner being placed at the top of the page. Take a look at Database Administration using phpMyAdmin (2009) for an example of a decrepit post I just couldn't kill. Search Engine Optimization Compared to most modern webpages mine is pretty small. A cold cache will require about 400kb of uncompressed requests to load. Subsequent loads should only be ~10kb (depending on the amount of page content). The number of resources the site requires is fairly small: 1 advertisement, analytics, 1 JavaScript file for syntax highlighting, 1 CSS file, an avatar image, and web fonts. Perhaps more important for SEO is the rather simple DOM. The URL structure changed during the migration, not for technical reasons but for the betterment of readers. Links to the site forever exist in forum posts and emails and pages all across the internet. We've all felt that enduring pain when trying to debug a technical problem, searching for hours, clicking a link in a forum post which promises to have the answer, only to have our hearts broken by a 404. To prevent this from happening I've given nginx a mapping of old URLs to new URLs and it will redirect requests accordingly: rewrite ^/blog/support-me-on-patreon/?$ /posts/2018-02-12-support-me-on-patreon permanent; rewrite ^/blog/advanced-microservices/?$ /posts/2017-06-19-advanced-microservices permanent; rewrite ^/batman/$ /batman permanent; rewrite ^/talks/$ /talks permanent; This site is served via HTTPS which also boosts search rankings slightly. Adding HTTP2 support is still on the TODO list. Google Chrome has a feature called Lighthouse built into its Web Inspector. This is helpful for fixing webpage performance. For example it will recommend things like consolidating network requests, adjusting cache expiration, finding images with missing alt attributes, etc. A few hours with Lighthouse helped make this site more efficient. Here's a screenshot of this site's current score: Lighthouse results Implementation The static site generator is written in ~200 lines of synchronous Node.js code. For my workflow I copy a Markdown template file, alter a few lines of YAML frontmatter, and begin writing Markdown content. I can preview the website locally with npm run preview, build the changes with npm run build (all couple hundred posts recompile within 1 second), and deploy the changes using npm run deploy. The site build script employs the following modules: The frontend makes use of highlight.js for performing syntax highlighting—doing this server-side is on the TODO list. If there weren't already dozens of competing static site generators out there I would open source this one. Another convenient feature is that if the Markdown document contains a URL to YouTube, Vimeo, or a GitHub Gist, the URL is replaced with the appropriate HTML to embed that resource within the page. This Gist contains the code for performing such a replacement: Deployment Deployment is done by running npm run deploy which triggers a few lines of scp. I could have done something fancy with pushing commits to the web server and triggering a build but the benefit probably wouldn't be worth the setup time. A side-effect of this new system is reduced overhead of hosting the website. With the server no longer running Wordpress or MySQL I was able to halve the Linode VPS hosting costs! Drawbacks I can no longer update the site using any device with internet access; instead it must be done on a development laptop. During the many years that I've been running websites this hasn't actually been necessary, but I can see it being a blocker for other writers. Wordpress makes image insertion very easy. It'll create a YYYY/MM folder for the image, generate several thumbnails, and insert them using a WYSIWYG editor using the default filename. For better or worse the new process is more manual. I have to move an image by hand and paste the filename into Markdown. So far I do prefer this new approach. Wordpress ends up puking thumbnail images everywhere, even in dimensions which are never used. During the migration I even discovered that for each image I've uploaded via Wordpress there would be both an image.jpg and a duplicate named image1.jpg! And finally, I can no longer schedule a post to go live in the future, a Wordpress feature I'll miss dearly. As an example, I would often write up a three part series during the weekend and have them publish on Monday, Wednesday, and Friday morning. In theory I could rebuild this using a CRON job, but again, it might not be worth the effort. Migration Process At the beginning of the migration process the site had over 400 posts. The ideal post format is basically the same format used by Jekyll: a Markdown document with embedded YAML metadata (affectionately referred to as frontmatter). Thanks to the jekyll-exporter Wordpress plugin I was able to export posts in a mostly-working format. Many of the posts still contain HTML instead of pure Markdown, but they render just fine. The exported YAML was a bit rough. I manually modified each file to adhere to a cohesive format. Since the site doesn't use Jekyll, certain features become superfluous such as id: 123, author: Thomas Hunter II, and layout: post. Fields like title: and date: remain vital. These changes were easily automated using the sed command. Other changes like merging categories with tags and consolidating their entries were a bit painstaking. The old YYYY/MM image folder format is fine and is still used by the new site. Wordpress stores them in a directory called wp-uploads which was renamed to a more generic media. Those pesky thumbnails, however, just had to go. The following one-liner was all it took: # Delete all Wordpress image thumbnails find . -type f -regextype posix-egrep -regex ".*/.*-[0-9]+x[0-9]+.(jpg|png|gif)$" -delete Not all posts are worth keeping, even when considering the aforementioned deprecation feature. About 140 posts were deleted in the making of this website. Parting Thoughts I love this new system. It gives me enough control to be creative with features and UI. Building a layout from scratch—and not basing it on an existing template—really makes the site feel like it belongs to me. In the age of GitHub, Markdown has become second nature to software engineers—myself included—and this makes content writing an absolute pleasure. Copyright 2018 Thomas Hunter II | @tlhunter | thomashunter.name Source: On Migrating from WordPress to Static Markdown – Thomas Hunter II

    Read at 08:49 pm, Nov 16th

  • Hot reloading with create-react-app without ejecting 🔥 ⏏️

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Hot reloading with create-react-app without ejecting 🔥 ⏏️

    Read at 08:21 pm, Nov 16th

  • Alexandria Ocasio-Cortez has less than $7,000 saved

    Alexandria Ocasio-Cortez, a 29-year-old Democrat who will represent the 14th Congressional District of New York, is the youngest woman ever elected to Congress and until recently worked in food service. She currently has less than $7,000 in savings, according to her communications director. Her finances became a talking point after she mentioned to The New York Times that she's struggling to afford an apartment in Washington D.C., where the median rent, $2,700, is twice the national median. Her claims came under fire this week after some news outlets publicized a financial disclosure filed in April that showed she had as much as $15,000 in savings, and more in checking. In the disclosure, which uses ranges rather than exact amounts, Ocasio-Cortez reported that she had: $15,000-$50,000 in a checking account$1,001-$15,000 in a savings account$1,001-$15,000 in a 401(k)Her wages in 2017 came to about $26,600, according to the 2018 disclosure, and she's still paying off $15,000-$50,000 in student loan debt. The 2018 race took its toll on her finances, Corbin Trent, director of communications for Ocasio-Cortez, tells CNBC Make It. "She's had to dip into her savings since that was filed. She's down to well below $7,000 now" in that account, and the amount in her 401(k) hasn't changed as she has not been contributing to it in recent months while she has been living off of her savings. Trent said he was unable to comment on her current checking account balance. "Some of the money she has was obviously just saved while she was working, but some of it also came from when her parents sold the house. After her dad passed away, her mom gave her some of that money," Trent says. Her father, who died in 2012, was a small business owner, and her mother, originally from Puerto Rico, cleaned houses, according to the Ocasio-Cortez campaign. The family sold its house in Yorktown in 2016 for $355,000. Since quitting her job as a bartender in February, Ocasio-Cortez has taken just over $6,000 in salary from her campaign, according to campaign finance records. The congresswoman-elect ran on a progressive platform that highlighted issues like affordable housing, the cost of college, a jobs guarantee program and Medicare for all. Source: Alexandria Ocasio-Cortez has less than $7,000 saved

    Read at 08:14 pm, Nov 16th

  • Dark modes with CSS | CSS-Tricks

    By Robin Rendle On November 14, 2018 macOS, media queries With the introduction of dark mode in macOS, Safari Technology Preview 68 has released a new feature called prefers-color-scheme which lets us detect whether the user has dark mode enabled with a media query. That’s right. If this becomes a little bit more supported in other browsers, then we might potentially soon have a way to toggle on night modes with a few lines of CSS! Recently Mark Otto described how we can start using prefers-color-scheme today in order to create themes that dynamically adjust to the new user setting. And the neat thing about this post is that Mark sort of frames it as an accessibility issue and shows how he uses it on his own website to adjust images so that they’re not too bright for the user: @media (prefers-color-scheme: dark) {
 img {
 opacity: .75;
 transition: opacity .5s ease-in-out;
 }
 img:hover {
 opacity: 1;
 }
 } In the code above, Mark detects whether the user has dark mode enabled with the media query and then makes the images darker so that they match a dark background. This reminds me of an excellent post by Marcin Wichary where he explores a similar technique and goes one step further by adding all sorts of filters to make sure they have a much higher contrast. Andy Clarke also wrote up some thoughts about how to take this fancy new CSS feature and how we might apply a dark theme across our website. He describes how to pick colors so our light/dark themes are consistent in terms of branding and how we might want to use a lighter font-weight for darker backgrounds. He writes: Designing for dark mode shouldn’t stop with choosing darker colours. You should also consider altering typography styles to maintain readability for people who use dark mode. Light text against dark backgrounds appears higher in contrast than when the same colours are used in reverse, so to make your dark mode designs easier to read you’ll need to add more white/dark space to your text. If your fonts offer a lighter weight, using that for your dark mode design will open up the letterforms and make them appear further apart... What was that? It sure sounded like the joyous applause of typography nerds and designers everywhere! Source: Dark modes with CSS | CSS-Tricks

    Read at 07:29 pm, Nov 16th

  • Dreaming the Book

    Dreaming the Book Audrey Watters on 14 Nov 2018 , tagged on , read I can tell that it’s almost time for me to turn from research to writing. I’m dreaming about the book. I dream about its organization. I dream about the acknowledgements. I dream about what primary documents are left to track down and to read. I dream about how I’m going to tackle the writing process. I dream about the introduction. I dream about the blurbs. They aren’t panicky dreams. Not yet. I know those will come soon enough. Last night, I dream about the outline – how the book will start. How the first few chapters will go. But I woke up before I could wind my way through it all. And that’s what I thought about this morning too went I went for my AM walk: where and how does the book end? (Right now, I think it ends, as it (almost) begins, with the IBM punchcard.) twitter facebook Audrey Watters Published 14 Nov 2018 Source: Dreaming the Book

    Read at 07:28 pm, Nov 16th

  • TypeScript ❤ Node.js: the tale of Stix – SpoonX Studio – Medium

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: TypeScript ❤ Node.js: the tale of Stix – SpoonX Studio – Medium

    Read at 07:27 pm, Nov 16th

  • How A Seattle Man Died From Dangerous Silicone Injections Into Genitals

    Jack Chapman made a lot of big changes during his relationship with his romantically dominant boyfriend. He changed his name, his country, his friends. He also changed his body, bulking up his chubby frame to Marvel-superhero breadth. Then he dramatically changed the size of his genitals. It killed him.Australia-born Chapman legally changed his name to Tank Hafertepen about six years after striking up a submissive relationship with Dylan Hafertepen, a heavily tattooed and beefily muscular dom. Over the course of their seven-year relationship, the pair became minor social media personalities among gay bears (husky, hairy gay men) enamored of their size — particularly the apparent size of Tank’s genitals.During his time with Dylan, and with his online fans’ encouragement, Tank had been enlarging his scrotum and penis with silicone injections, a body modification both dangerous and illegal. The fetish is typically associated with a “gainer” mentality — a consuming desire to enlarge your body, to put on as much weight as possible. Some gainers want muscle, others fat. For Tank, a self-described gainer, silicone injections to his genitals (link NSFW) drew immediate praise and encouragement on social media. As one fan said of a picture he posted to Tumblr, “that underwear bulge * SWOON * what a handsome minotaur man you are :smile:.” Wrote another, “That junk down south looks AMAZING. Bet your master lays on that bulge like a pillow every night.”On Oct. 9, Tank was admitted to the hospital with trouble breathing. He died six days later from lung problems caused by a silicone embolism.Tank’s death and the circumstances around it raise questions about the sometimes blurry line between extreme dom/sub relationships and abuse, and — in the niche world of radical body modification in which he lived — suspicions around just who is to blame for his death. Tank’s friend “Aphyr” wrote in a lengthy rumination on his death, “I don’t know how long Jack was in the hospital, and I don’t know what his experience was like there — but I know that Dylan isolated him and kept his death from his friends, and that makes me deeply uncomfortable.”Dylan told BuzzFeed News, “I’m sad about all the speculation.” He chalked up the chatter following Tank’s death to mere “misinformation” and “conspiracy theories.” “You could tell he was a little bit lost”As a young gay man in Melbourne, Australia, Tank (his family and some friends still call him Jack; in this story we use Tank as he legally changed his name) was drawn to the city’s vibrant bear scene. At 22, he entered a local bear pageant, and while he didn’t win, friends described him as a fan favorite. In 2008, Tank began hosting a podcast called The Cubby House that quickly developed a following in the international bear community. But according to his mother, he felt stuck in Melbourne in a dead-end job, and when he won a visa lottery to go to the States to be with his long-distance boyfriend, Dylan, he leaped at the chance.Friends remember Tank as a warm, friendly guy with a big personality and endless curiosity. “He was a big goofball. Always had a smile,” said Kyle, a friend who asked that his last name not be used here. Arman Ellis, a friend from Seattle, where Tank lived at the time of his death, told similar stories. “We bonded together over video games, pop culture, photography,” Ellis said. “Everything I was game to do — visit waterfalls, ride on boats and wear sailor hats even if people thought we were idiots — he was game to do it too.” In Seattle, Tank worked for an organization that provided meals to people with HIV, and wanted to pursue a career in public health. A woman he’d helped through his work recalled “Uncle Tankie” giving her infant son Christmas presents.But Tank’s friend Aaron Cluka said, “You could tell he was a little bit lost. … [He] was a bit unlucky in love. He was always kind of looking for his place.” He thought he had found it on the internet.Through his radio show and his Tumblr, Tank connected with a larger community of bears in the US. He started talking to Dylan, who was Tumblr-famous thanks to his blog, Noodles and Beef. In it, Dylan regaled readers with stories of BDSM circuit parties and polyamorous relationships with a rotating cast of men he referred to as his “pups.” He had an impressive, muscular physique and a handsome face, which he showed off in provocative pictures in the blog and associated newsletter.Tank and Dylan began a long-distance relationship around 2010, when the former was still in Australia, friends said. Dylan “collared” Tank — initiating him into romantic servitude with a chain and lock around his neck — in 2012, according to Tank’s blog. Three years later, Tank obtained a visa to go to the US and moved in with Dylan and his other pups — “Alpha,” “Carne,” and “Biff” — in San Francisco and later in Seattle (another red-headed pup, “Angus,” was added during a short breakup in 2016 when Tank moved out). The family would often appear at popular gay clubs and events like the Folsom Street Fair to show off in jockstraps or bedazzled football pads. They reveled in the attention. On a 2016 trip to Australia, Dylan and Tank “played a round of naked pool to the delight of the evening crowd” at a sex club. In March 2016, Tank tattooed Dylan’s astrological sign, Taurus, on his chest. Dylan described Tank as having “earn[ed his] brand.”Their relationship, which they closely documented online, was based around a dominant–submissive power exchange in which Dylan was the “Master” and Tank was his “pup.” It orbited around several scenes: polyamory, BDSM, leather, pup play, bears, gainers, and body modification. It’s 2018 — plenty of people incorporate these scenes into a happy, healthy sex life, but some of Tank’s friends found his relationship with Dylan worrisome. Kevin Reader, who cohosted Tank’s Cubby House podcast, described their relationship as toxic, and a former partner of Dylan’s, Raymond Smith, said Dylan was manipulative.Tank posted a list of “Rules and Responsibilities” online which stipulated that he would follow his Master’s “body goals,” specific measurements Tank had to meet “regarding [the pup’s] weight, their muscle mass, and their proportions.” It also mandated that Tank would “submit to all orders for body modifications, including piercings, tattoos, scrotal saline inflation as well as body growth supplements including steroids and HGH - in accordance to the wishes of the Master.” Dylan previously said in an interview with International Pup Play that Tank wanted to be a powerlifter: “And so I pushed him with the power exchange to achieve those goals. To pursue certain hobbies, to reach certain caloric needs, to do what he needed to become a gold medalist.”In a statement to BuzzFeed News, Dylan said the list circulating online was “a piece of erotic fiction written by Tank, featuring some of his submissive fantasies.” Still, Tank posted to his Tumblr about signing a “contract” with Dylan. And in a photo on Facebook, a tattoo is partially visible on Tank’s lower back: “Property of Master Dylan,” a mark stipulated in the list, which states, “This brand will be in two parts, the first will be the shield motif with text reading ‘Property of Master’, the second part, when the pup has earned the privilege of revealing his Master’s identity, will read the Master’s first name.” Tank also said in an interview with a blog about gay BDSM relationships that he had drawn up a contract that gave Dylan significant control of Tank’s life — his finances, his phone, his time, and his friends. (Dylan responded he and Tank kept their finances separate.)Dylan and the four pups who lived with Tank in Seattle until his death initially did not answer multiple requests for comment via emails, calls, and texts. When a BuzzFeed News reporter attempted to reach them in person, they called the police. That reporter was arrested and jailed. The following week, Dylan and a pup, Daniel Balderas Hafertepen, filed restraining orders against the same reporter. A week later, Dylan responded to an email from BuzzFeed News, answering a series of questions. “It’s terrifying”Both Tank and Dylan publicly acknowledged the dangers of injecting silicone on their own blogs. Dylan said he’d seen friends die in pursuit of the fetish. Tank wrote that the procedure “can have major health risks if done incorrectly” and refused to offer instructions for how to do it or where to obtain medical-grade silicone. But he kept posting pictures of his size gains. Dylan told BuzzFeed News they sometimes manipulated the photos “to make his genitals and body appear larger.”Tumblr said in a statement to BuzzFeed News that it does not comment on specific accounts, but its policy does not ban posts about body modification or body dysmorphia, as long as they do not promote self-harm.In February 2016, when an anonymous reader asked just how big he intended to go, Tank answered, “Master will decide when enough is enough.”For Dylan, bigger was better. In a 2016 ABC News segment about “bigorexia” — an obsession with gaining muscle — Dylan discussed his journey from a 140-pound teen to a 265-pound colossus, hinting a bit at an obsession. “I was so caught up in that lifestyle, so obsessed with the ever-moving goalpost of getting bigger, bigger, bigger that I never really considered this a problem,” he said.Dylan denied forcing Tank to get injections. “This was his fetish,” he said. “I did not make him inject silicone. On the contrary, I helped him get some removed.” He said Tank got silicone injections by himself in Mexico in 2014, and again in Sacramento during a period when they were broken up in 2016. Dylan said this showed Tank’s “strong personal motivation to pursue silicone,” and called him a “proud exhibitionist.” In May 2018, Dylan said he brought Tank to a plastic surgeon who removed some silicone.Because silicone injections to the penis and scrotum are illegal and dangerous, silicone enhancement of male genitalia is uncommon. However, there’s a small scene of mostly gay men interested in it. On Xtube, a popular site for amateur porn, there are a handful of men with silicone-enhanced genitals posting video clips, including one in which a man self-injects using a thin needle, some rubber tubing, and a plunger of silicone. The most popular video has amassed about 30,000 views.“We don’t know how often this happens, but there are more people out there doing it than we think,” said Dr. Mark Wurfel, a professor of pulmonary care at the University of Washington School of Medicine. “Most of the cases reported in the literature are people injecting themselves or going to a clandestine site to get it done.” Doctors are generally aghast at the procedure, which poses significant danger to those who undergo it. Free-floating silicone often causes severe inflammation. It can enter the bloodstream, usually at the time of the injection, or migrate later into the lymphatic system. Bigger globules block blood vessels and kill tissue or clog the machinery of the lungs and brain, depriving a person of oxygen and causing permanent damage or death.“Once it gets into the tissues, it’s like jello in a sponge. It sets. You have to remove the silicone by removing the tissues. That’s the problem.” said Dr. Sophie Bartsich, an assistant professor of plastic surgery at the Weill Cornell Medical College. Medical-grade injectable silicone, Bartsich said, is usually only available in very small quantities for specific eye surgeries, about an eyedropper’s worth, so for illicit injections people often use other, more hazardous substances like industrial lubricant.Wired with hundreds of tiny blood vessels, the penis and testicles provide ample opportunity for mistakes. But still people seek out the injections.“There’s a 1-in-3,000 risk of death with an injection of your own fat into your buttocks. Imagine injecting an area with a ton of dilated veins with a foreign material. Consider the injection techniques of somebody without medical training. It’s a recipe for disaster,” said Dr. Alex Sobel, president of the American Board of Cosmetic Surgery. “This is avoidable. We shouldn’t even be having this conversation; this guy should be alive.”The night Tank was hospitalized, Dylan said, “he warned me he was feeling sick and had trouble breathing, even asking to borrow my asthma inhaler.”“IsNoodlesAndBeefInJail”Tank’s death this October caused immediate uproar on Tumblr — both outpourings of mourning for a community member and rage against Dylan. It also raised some questions. In a eulogy to Tank on his blog, Dylan had claimed his pup died from an undiagnosed lung condition, but some of Tank’s friends and fans were suspicious. They feared Dylan had pushed him too far, and they began to scour their email archives, text messages, and the web for evidence of abuse. Back in 2016, Tank posted to his Tumblr a photo of his tear-streaked face with a long apology to Dylan, writing that he was “shit” for disappointing his Master. He’d gone in a friend’s hot tub without Dylan’s permission.“I don't deserve love. I don't deserve forgiveness. I only deserve to suffer,” Tank wrote. “A pup needs to ask his Master and get his permission to meet with people and do activities which are outside of his regular routines. ... A pup is to avoid even being in situations which could even potentially arouse suspicions in his Master.”Tank’s friends, many of whom were well-versed in dominant/submissive relationships and roleplay, found the tone and severity of the forced contrition alarming. Tank’s fans did as well. “Tumblr turned on [Dylan] after the hot tub incident,” Kyle told BuzzFeed News.A few months later, Tank messaged Kyle. “Keep it to yourself, but for my own sake I need to develop an exit strategy.” Tank and Dylan split for a time, but by summer 2017, they were back together. A year later, Tank was dead.Posts accusing Dylan of covering up Tank’s death began to go viral on Tumblr: He explicitly told some friends Tank was still alive when it was no longer so. In a newsletter published shortly after Tank’s death, he included a photo of them both wearing air masks and discussed air quality in Seattle. He made no mention of his partner’s passing or hospitalization. He wrote, "Arrived home to Angus, Biff, Tank…and Seattle shrouded in wild fire smoke." “I regret this,” Dylan told BuzzFeed News, explaining he was dismayed that rumors of Tank’s death had begun circulating so quickly. “In my grief, I was furious and denied anything was wrong while aimlessly trying to find out the source,” he said. “It was a mistake and I apologize to those I misled.”But outrage over Dylan's handling of the news continued to build online. Dylan soon shuttered all his social media accounts, replacing the relationship ruminations he featured on his personal blog, Noodles and Beef, with actual recipes for noodles and beef dishes. There are now a number of Tumblrs devoted to investigating the details of Tank’s demise — IsNoodlesAndBeefInJail, NoodlesAndBeefUncovered, DylanNoodlesAndBeef, NoodlesAndBeefLeftovers, and an anti-Dylan blog called NoodlesAndReceipts, whose stated purpose is “to call out the abuser and the fans who love him.”Fans obsessed over every detail of the saga for weeks. They dissected an Australian TV news report about Tank’s death and a reported article in a Seattle alt-weekly, the Stranger. On a 75-page-long message-board thread on the internet drama hub Kiwi Farms, would-be sleuths dug up the court filings made by Hafertepen against the BuzzFeed News reporter, and even tracked down what they believe was a 911 call to the Hafertepen building on the date listed on Tank’s death certificate as the accident date. They went as far as connecting Dylan to a man named Peter Dovak, who died of a pulmonary embolism in November 2017, which Dovak’s longtime partner said arose from genital silicone injections.Dylan dismisses the flurry of activity as “a lot of misinformation.” “Some misinterpreted facts, conspiracy theories, and not nearly enough celebrating the wonderful man that he was,” he said. “Continued speculation has not allowed me to remain silent.”As for the outrage on social media, he’s aware of it. “If I read the things being said about me online and didn’t know the truth, I would think I was guilty of something too,” he said. “Tank was very loved and I understand the urge to blame someone for his death.” Dylan says he plans on launching a memorial site for Tank at TankHafertepen.com.“Oh you poor thing, you lost your partner”Linda Chapman only learned about her son’s online fame and the reason for it after he died. She blames Tank’s death on Dylan and his interest in silicone injections. Dylan, she told BuzzFeed News, is “a narcissistic bastard” and a “disgusting pile of shit.”“At first I was sympathetic to Dylan. Oh you poor thing, you lost your partner,” Linda explained. She had met Dylan before; he’d even spent a Christmas at her home, but now, she’s incensed. “I want to blow this wide open to help people in abusive situations, and to let the dangers of silicone injections be known.”There are other concerns as well. Three weeks before his death, Tank drew up a will, a copy of which was reviewed by BuzzFeed News, that left everything he owned, including $200,000 held in an investment account from his late father, to Dylan. But Chapman maintains her son had long pledged to leave that money to his autistic brother. Chapman thinks Dylan had something to do with Tank breaking that promise, and she’s retained Seattle lawyer Catherine Clark to contest the will.She and Chapman may challenge the will’s validity in court and also attempt to hold Dylan liable for his partner’s death. Dylan insists the will is legit. He showed BuzzFeed News a photo of Tank signing the will in front of a notary and witnesses; the witnesses were two of the other “pups,” as was the executor Tank named.Asked about his intentions for the money, Dylan told BuzzFeed News Tank had already used some of the $200,000 to move to the US and for other expenses. The rest, he said, will go to Tank’s brother after paying Tank’s medical and legal bills. “Tank had wanted the money (roughly AUS$150,000) to go towards our home together, but without Tank it’s a reminder of what I’ve lost,” he said in an email.Linda hopes the Seattle Police Department will investigate Dylan for his alleged role in Tank’s death, but that’s unlikely. An SPD officer familiar with the case told BuzzFeed News it’s not viewed as a crime, describing it as akin to an illegal drug overdose. If someone’s boyfriend introduces them to heroin, encourages them to shoot it, and they die as a result, police typically won’t bring charges against the boyfriend.Meanwhile, Dylan and Tank’s community of adoring fans are still struggling to come to terms with Tank’s death — and its implications. As one commenter on an anti-Dylan blog said, “We all watched them play with the size of their balls for years and didn’t say anything, so we’re probably all complicit to some level and we should all be ashamed.” ● Source: How A Seattle Man Died From Dangerous Silicone Injections Into Genitals

    Read at 05:10 pm, Nov 16th

  • What Did 'Pod Save America' Expect? | HuffPost

    POLITICS 11/15/2018 07:49 pm ET Updated 19 hours ago Until Wednesday night, at least, Tim Miller was known — if he was known at all outside Beltway circles — as the token Republican pet of Crooked Media, the distributor of the wildly popular “Pod Save America.” Crooked is a podcast group founded by Obama administration alums Jon Favreau, Jon Lovett and Tommy Vietor, and the role of Miller, a former Jeb Bush spokesman, is occasionally to play the heel but mostly to assure liberal listeners that Good Republicans do exist. He has a segment, called “The Cuck Zone,” in which he often criticizes the Trumpier segments of the GOP.   Accepting Miller as a friendly face in liberal circles required a certain transient amnesia about what the Republican Party is and how Miller has served it. The effort of not knowing became a lot harder on Wednesday, when The New York Times published a blockbuster report that, among other unseemly details, revealed that Facebook had hired an opposition research firm to push back against anti-Facebook groups. The campaign exploited the anti-Semitism on the right, encouraging reporters “to explore the financial connections between [George] Soros’s family or philanthropies and groups that were members of Freedom from Facebook.” The Republican operative behind the campaign was none other than Miller. This created an awkward situation for the boys of Crooked Media. When the story first dropped, Favreau disgustedly tweeted out the paragraph about the smears, seemingly without realizing it was his buddy who had propagated them. Several hours of silence later, the official Crooked Media account announced that Miller would not be contributing to Crooked while Favreau, Lovett and Vietor got “to the bottom of Tim’s involvement in this work.” pic.twitter.com/Vsk600RHin— Crooked Media (@crookedmedia) November 15, 2018 But what about his involvement in their work? Miller’s presence on the Crooked team was a modern media spin on a familiar phenomenon: prominent liberals inviting the right-wing weasels into the living room, allegedly in the interest of getting a different perspective, the totally predictable result of which is an orgy of special pleading and whitewashing. These days, there are few better publicists for the forces of illiberalism than the establishment liberals who wish to appear broad-minded. To be fair, the bros of Crooked Media aren’t wholly part of this same establishment liberal rot. They are far more humane and grounded than your average left-of-center D.C. politico. (I should mention here that I have appeared on Lovett’s podcast). They don’t really whine about civility. They don’t make meaningless calls for bipartisanship (in government, at least). And for the most part, they rarely punch left. But they do have a weakness common to liberal creatures of the D.C. professional political class: their token Never Trumper. Much like David Frum and Bill Kristol, Tim Miller has capitalized on his status as one of the country’s dozen Never Trump Republicans for which establishment media remains insatiably horny. Miller puts a charming millennial twist on the type, perfect for the more youthful “Pod Save America” crowd. He’s become a regular contributor on Crooked Media’s podcasts and has even written for its website.  Here’s what Miller had to say for himself, regarding his little Facebook anti-Semitism oopsie: For ppl asking - Definers shared a narrow document about an anti-Facebook group's funding. It was entirely factual, as Open Markets organizers have acknoweldged they get funding from Soros. I have defended Soros from smears & conspiracies that weren't based in fact. 1/— Tim Miller (@Timodc) November 15, 2018 All he did was share a document about an anti-Facebook group’s funding — and a factual document, no less. It’s not his fault the Jews really were behind it! The thing is, every group needs funding. It’s unclear why George Soros funding this group, in particular, would have been noteworthy. Unless, of course, you want to make use of the long history of anti-Semitic smears and conspiracies swirling around Soros for political gain. Nothing in Miller’s explanation indicates that he did anything less. And he knew exactly what it was he was doing.   I'm no fan of Soros' politics but the fact that the conservative media is spinning him donating half a billion dollars to support refugees fleeing terror and oppression is a good sign of the moral rot on the right. https://t.co/4HIzgTHLx8— Tim Miller (@Timodc) November 5, 2018 Where the alt-righters handed out their Protocols of the Elders of Zion pamphlets in public, Miller tried to achieve similar ends with a raised eyebrow behind closed doors. Maybe Miller doesn’t like Trump and his kind because they’re giving the game away. But why would a bunch of Obama administration alums even bother with a professional Republican operative in the first place? According to their statement, its because Miller “has interesting things to say about the Republican Party in the Trump era.” Let’s see what those interesting things are: “The politician x got $ in exchange for dead kids” isn’t just rhetorically out of bounds it is also wrong and counterproductive. Even if you grant that a pol is opposing gun control bc of politics it’s pressure from base *voters* not a few thousand bucks that’s doing it. 1/— Tim Miller (@Timodc) March 25, 2018 Very interesting! Unfortunately, it’s also incorrect, or at least it’s defining “base voters” so narrowly as to render them politically meaningless. The vast majority of Americans — including a majority of Republicans — want stricter gun control. But it’s understandable why someone who benefits from politicians raking in piles of toxic cash might want people to believe otherwise.  Let’s see what else he’s got. This is a beautiful Heidi ad on her sister's adoption. Think it has hurt national Democrats that most have traded in the "rare" and "life" parts of the debate in favor of only waving pro-abortion pom poms. https://t.co/sDB3xCFQKs— Tim Miller (@Timodc) October 19, 2018 “Pro-abortion pom poms.”  The only conceivable reason to ally yourself with someone like Miller is to show the world how tolerant and reasonable you are. In return, the Never Trumpers get even more cash and a crucial credibility boost among liberals and centrists.  And it’s not as if Favreau, Lovett and Vietor didn’t know who it was they were boosting. From 2007 to 2009, Miller was a communications strategist at the D.C. public affairs firm Berman and Company, where he also worked as a spokesperson for the Employment Policies Institute, which put out this highly misleading ACORN attack ad. ACORN, or the Association of Community Organizations for Reform Now, advocated for the poor, helped families navigate federal aid programs and registered people to vote — until it was brought down by Republican strategists like Miller, working alongside less respectable ratfuckers like James O’Keefe of Project Veritas. According to ProPublica, the Employment Policies Institute also “produced numerous reports arguing that boosting the minimum wage hurts teen workers and frustrates job creation.” The folks who write the white papers are just ratfuckers who carry briefcases. In 2013, Miller helped co-found the GOP opposition group America Rising, a group that put out ads like this: Miller actively worked to paint Hillary Clinton as a lying thief and to terrify Americans into believing that the only thing standing between them and ISIS was a Republican president. It shouldn’t be surprising to anyone that a professional smear man would, as the Times reported yesterday, casually talk about a willingness to “muddy the waters” regarding Facebook’s egregious privacy issues. Plus, he still very much sees George W. Bush as a man of honor.  To a certain Beltway mindset, it is the height of seriousness not to take political ideas so seriously that you attach life-or-death significance to them. For the “Pod Save America” hosts and for most of the other liberals eagerly embracing Never Trumpers, showing off your Republican pal — the good, polite kind of Republican! — feels harmless because most of them will never actually have to deal with the consequences of actual Republican policies.  It’s uncomfortable to acknowledge that the person you’ve been joking around with the past few years is exactly the guy your harshest critics said he was. But if Crooked Media is serious about being a fresh voice for progressives, it’s time to stop pretending that Miller is anything other than what it’s supposed to be fighting against.  BEFORE YOU GO Source: What Did ‘Pod Save America’ Expect? | HuffPost

    Read at 04:20 pm, Nov 16th

  • Bad day for Bruce: Republican loses suit to block instant runoff, then loses instant runoff, too

    Thursday November 15, 2018 · 2:44 PM PST 2018/11/15 · 14:44 Democratic Rep.-elect Jared Golden Democratic Rep.-elect Jared Golden Election officials in Maine tabulated the results of the country's first-ever instant runoff for Congress on Thursday, determining that Democrat Jared Golden defeated Republican Rep. Bruce Poliquin by a narrow 50.5-49.5 margin after the second-choice preferences of voters who cast ballots for two third-party candidates were taken into account. Poliquin had led 46.4 to 45.5 on the initial balloting, but 65 percent of those who voted for independents Tiffany Bond and Will Hoar elected to mark a second choice. That group overwhelmingly transferred their votes to Golden, who won second-choice ballots by a 69-31 margin, allowing him to edge ahead of Poliquin. Golden, a Marine veteran who served in both Iraq and Afghanistan, gives House Democrats their 37th flip this cycle, with five races still uncalled at press time. This race saw heavy spending, but Golden prevailed even though northern Maine’s rural 2nd District veered sharply away from Democrats in 2016, voting for Donald Trump 51-41 after supporting Barack Obama 53-44 four years earlier. Remarkably, that makes Poliquin the first incumbent to lose this seat since 1916. Of course, the soon-to-be-ex-congressman is extremely bitter about this turn of events, even though Mainers twice voted to require runoffs in such races, and all candidates participated in this election knowing the system they'd be operating under. Nevertheless, Poliquin waited until after Election Day to file a lawsuit challenging the system, but just ahead of the tabulation on Thursday, the judge hearing the case, Lance Walker, sharply rejected Poliquin's request for a restraining order to block the instant runoff and declare him the winner. Walker specifically noted that Poliquin's position would deprive all of Bond's and Hoar's voters of what they understood to be their right to be counted—that is, their right to be able to cast a second-choice ballot and have that tallied if their first-choice candidates were knocked out. Walker concluded by saying that Poliquin's remedy does not lie with the courts but rather would be "to petition the political branch to change the law"—in other words, call your congressman. Poliquin says he plans to forge ahead with his challenge regardless, but if legal norms hold, his odds of success look poor. Of course, that's a big "if" nowadays, given the makeup of the Supreme Court, but it's worth noting that Walker is a Trump appointee. .media-body .new-comment-wrapper.media .media-body .new-comment-wrapper.media {{backgroundUrl avatar_large}} .avatar .username Joined: {{created_at}} Story Count: {{n_stories}} Comment Count: {{n_comments}} Popular Tags: {{showTags popular_tags}} {{#each badges}} {{badgeUrl .}} {{/each}} .right_author_info {{authorSig user_sig}} .bottom_author_info author_bio_inner {{/unless}} {{/if}} {{#ifcanRecComment author_id}} {{#if recommenders_text}} {{else}} {{/if}} {{n_recrates}} {{n_recrates}} {{else}} {{#if recommenders_text}} {{else}} {{/if}} Recommended {{n_recrates}} time{{simplePlural n_recrates}} {{/ifcanRecComment}} {{#ifCommentFlaggable author_id story_author_id}} {{/ifCommentFlaggable}} {{#if preview}} {{/if}} Source: Bad day for Bruce: Republican loses suit to block instant runoff, then loses instant runoff, too

    Read at 03:55 pm, Nov 16th

  • Inlining or Caching? Both Please! | Filament Group, Inc., Boston, MA

    Inlining or Caching? Both Please! Posted by Scott 11/13/2018 Last week, I was finishing a section of my slides for a presentation at the Performance.Now() conference. In it, I was exploring patterns that enable the browser to render a page as fast as possible by including code alongside the initial HTML so that the browser has everything it needs to start rendering the page, without making additional requests. Our two go-to options to achieve this goal are inlining and server push (more on how we use those), but each has drawbacks: inlining prevents a file from being cached for reuse, and server push is still a bit experimental, with some browser bugs still being worked out. As I was preparing to describe these caveats, I thought, “I wonder if the new Service Worker and Caching APIs could enable caching for inline code.” As it turns out, they can! Caching an Inlined File Let's start with an example. The following code snippet has a style element containing some inline CSS. I've added an ID attribute onto the style element so that it's easy to find it using JavaScript. After the style element, a small piece of JavaScript finds that CSS and uses the new Cache API to store it in a local browser cache (with a content type of text/css) for use on subsequent pages. <style id="css"> .header { background: #09878} h1 { font-size: 1.2em; col… } h2 { margin: 0; } … </style> <script> if( "caches" in window ){ var css = document.getElementById("css").innerHTML; if( caches ){ caches.open('static').then(function(cache) { cache.put("site.css", new Response( css, {headers: {'Content-Type': 'text/css'}} )); }); } } </script> After that runs, the inline CSS will be stored in a file called site.css in a local service worker cache. But in order to use that file on subsequent pages, we will need to go a little further. Rounding this out with a Worker You might recognize the caches API above if you've worked with Service Workers. Despite its ties to Service Workers however, Caches is actually available in the window global namespace as well, so unlike workers, we are able to use Caches while having access to content from the DOM. That said, in order to ensure a subsequent page on the site will get this local site.css file if the browser requests it, a service worker will still be needed. Here's a common Service Worker snippet you might already have running on your site: when a file is requested by the browser, the worker looks in local caches before going to the network. With this worker running, any future requests to site.css will find it in local cache and avoid a network request. (function(){ 'use strict'; self.addEventListener('fetch', event => { let request = event.request; let url = new URL(request.url); // Ignore non-GET requests if (request.method !== 'GET') { // try local cache first, then go to network event.respondWith( caches .match(request) .then(response => { return response || fetch(request); }) ); } }); })(); We're now ready to handle requests to site.css on subsequent pages of the site. It's worth noting here that in order to truly take advantage of this pattern in a site's templates, subsequent pages will need to avoid inlining the files and instead reference them externally (using a stylesheet link, a script tag, etc.). To negotiate that in an HTML template, we often set a cookie on the first visit to a site. Then, on subsequent page views, the server can check for that cookie to infer that it's safe to assume the browser has files already in cache. If so, it can reference the files externally instead of inlining them. If this process is new to you, I'd recommend reading our article Modernizing our Progressive Enhancement Delivery. A Proof of Concept Demo To demonstrate the pattern in action, I've created a simple demo page. Here's how it works: The page linked below includes some inline CSS and a caching function much like the example above. It also installs the service worker code above to check for files in local caches when requests are made. That first demo page contains a link to a second page which references site.css using a regular <link rel="stylesheet" href="site.css"> element. If site.css is loaded locally, which should happen in any service worker supporting browser, the second page will have a green background. If site.css is loaded from the server, the background will be red. You can try the demo here Taking it Further There are some areas that come to mind immediately when thinking about how we can improve on the example above. Optimizing for Reuse One improvement we can make is to set up the script to look multiple inline style and script elements using a common selector, and apply custom attributes to these elements to declare their content-type, file path, and cache name for saving their content to cache. With those attributes in place, a script can find and cache many of these inlined files in a single sweep. That might look like this: <style data-cache="static" data-type="text/css" data-path="/css/site.css"> body { background: green; color: #fff; } a { color: #fff; } </style> <script data-cache="static" data-type="text/javascript" data-path="/js/head.js"> alert( "This script ran from head.js, which was inlined and local." ); </script> <script> if( "caches" in window ){ function cacheFile( file ){ caches.open( file.filecache ).then(function( cache ) { cache.put( file.filepath, new Response( file.filetext, {headers: {'Content-Type': file.filetype }} )); }); } var toCache = document.querySelectorAll( "[data-cache]" ); for( var i = 0; i Here's a second demo that does just what you see above, with both CSS and Javascript (click through to its second page again to see it work). Optimizing our Critical CSS Approach We might also consider ways to use this pattern to improve upon existing critical CSS patterns. For example, we often inline a page's critical CSS, and then load the site's full CSS at a later time. In this workflow, the full CSS file typically overlaps many of the CSS rules with the "critical" subset we already delivered. A better approach might be to load a full version of the CSS that does not contain the critical rules at all, and then use the Caches API to combine the critical and full CSS files to create a full site CSS entry in local cache. Deliver an Entire Website via HTML?? If we wanted, we could even try using this pattern to deliver an entire front-end codebase in one HTML response, mimicking a fancy web packaging format. Would it be a good idea? Probably not! But it would be fun to experiment. For now, we'll be brainstorming about other potential uses... and possibly updating our site! Thanks for reading. /primaryContent /secondaryContent end interior footer Source: Inlining or Caching? Both Please! | Filament Group, Inc., Boston, MA

    Read at 03:39 pm, Nov 16th

  • React Hooks for GraphQL – Open GraphQL – Medium

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: React Hooks for GraphQL – Open GraphQL – Medium

    Read at 03:32 pm, Nov 16th

  • Pelosi Mulls Super-majority Rule For Tax Hikes On Bottom 80%

    Whom does the Speaker speak for? Photo: Brendan Smialowski/AFP/Getty Images This week, Minority Leader Nancy Pelosi unveiled a list of new procedural rules that her caucus intends to implement when the next Congress is seated. Most of these measures are unobjectionable “good government” reforms. But one of them would create a new — and all-but insurmountable — obstacle to the passage of many of the policies that the Democratic Party claims to support. The rule, proposed by Pelosi and Massachusetts congressman Richard Neal, would “require a three-fifths supermajority to raise individual income taxes on the lowest-earning 80 percent of taxpayers.” This might look innocuous (if not commendable) on first glance. In recent decades, America’s richest citizens have seen their tax rates plummet, even as their share of income gains soared. Given this state of affairs, you might think it progressive, by definition, to restrict new tax increases to the top 20 percent of earners. But you would be wrong. There are several problems with the rule Pelosi has proposed. For one thing, while progressives are committed to increasing the discretionary income of the bottom 80 percent, that does not necessarily mean keeping their tax rates frozen at historically low levels. Currently, for much of the American middle class, health-insurance premiums function as a steadily rising tax. A bill that required those households to pay a new, smaller monthly sum to the government — so as to fund a single-payer system that would actually reduce their cost of living, by delivering radically cheaper health-care services — could hardly be called regressive. And the same can be said for legislation establishing universal child care, paid family leave, or any other program aimed at easing the middle class’s financial burdens by dramatically expanding the public sector’s ambitions. Equating support for middle-class families — with opposition to increasing their tax rates — is a conservative project, which Democrats have no business advancing. If the party wishes to establish structural barriers to policies that would hurt the middle class, why not require a three-fifths majority to cut Medicaid, Medicare, or Social Security? Furthermore, as Richard Phillips from the Institute on Taxation and Economic Policy notes, the supermajority threshold proposed by Pelosi could actually prevent Democrats from closing loopholes exploited primarily by the superrich. Third, saying that any individual tax increase on the bottom 80% should require a supermajority makes it more difficult to close some basic tax loopholes. Closing the carried interest loophole surely would affect a few people in the bottom 80% for example?— Richard Phillips, Inc. (@taxjusticewonk) November 15, 2018 And the requirement is also likely to open the door to further restrictions. On the state level, many GOP-led governments require supermajority support to raise taxes of any kind, a rule that has had devastating consequences for many a red state’s public school systems. On the federal level, it’s conceivable that a future, GOP-controlled House — in a context of rising inflation or interest rates, and thus, of widespread demand for deficit reduction — could use such a rule to ensure that austerity is executed entirely through spending cuts. But the precedent the rule sets for future Democratic majorities is even more concerning. In the present context, with Mitch McConnell leading the Senate and Donald Trump in the White House, the supermajority requirement is of no real consequence. The Republican Party is not going to sign off on middle-class tax hikes — or at least, not to finance new social spending. Once procedural rules are established, however, they can be difficult to eliminate. There are plenty of Democrats in the House who don’t want to be forced to chose (publicly) between voting for higher taxes on the middle class, or against a priority of the progressive base. Such lawmakers are sure to value (and thus, insist on the preservation of) a procedural obstacle that allows them to forgo voting on legislation that forces them to make such hard choices, by rendering such bills impossible to pass without GOP buy-in (which is to say, impossible to pass). All this would be a bit less problematic if the Democratic Party had overcome its allergy to deficit spending (and/or accepted Modern Monetary Theory as its personal truth). But it hasn’t: In addition to forbidding tax increases on the bottom 80 percent, Pelosi has also vowed to honor the “pay as you go” rule, which requires the House to fully finance any and all new government spending. Taken together, these two requirements could make Medicare for All impossible to pass out of the House. It is true that the super-majority rule is specifically worded to bar increases in individual income taxes, as opposed to payroll taxes (the primary funding mechanism for Bernie Sanders’s single-payer bill). But it is unclear whether this distinction will be honored in practice: As a political matter, it could be difficult to insist that payroll tax hikes don’t actually increase the bottom 80 percent’s income taxes – even though such hikes would take income out of the bottom 80 percent’s paychecks, and direct it to the federal government. And if the distinction between income and payroll taxes doesn’t stick, then the super-majority rule would render a whole host of Democratic policies nonviable. For example, Kirsten Gillibrand’s FAMILY Act finances an expansion of paid family and medical leave with a 0.4 percent increase in the payroll tax (split between employees and employers). Her law would make life much easier for many caretakers in the bottom 80 percent, while increasing their tax bills by a near indiscernible amount. And yet, in the name of helping the middle class, the new Democratic House majority wants to give their Republican colleagues the power to veto such legislation. Although Pelosi officially proposed the supermajority rule, it is unclear whether the idea originated with her. At present, a group of House Democrats from the caucus’s moderate wing is pushing to oust Pelosi from leadership. Generally speaking, those leading the charge to deny Pelosi the speakership have made opposition to tax hikes a far more prominent part of their political brands than she ever has. And according to the Washington Post, many of the rule changes endorsed by Pelosi had been “demanded by some members in return for their speaker votes.” Thus, it is neither clear that Pelosi is the driving force behind the supermajority rule, or that denying her her the Speakership would prevent its implementation. After all, there are other forces that could be pulling the caucus in a more conservative direction: Republican gerrymandering proved insufficient for preventing Democrats from winning back the House — but, by systematically underrepresenting liberal constituencies, it did manage to ensure that the new Democratic majority would be unusually beholden to swing (and/or right-leaning) voters. Katie Porter, an Elizabeth Warren acolyte, did just win election in a historically Republican district in Orange County— but she ultimately felt that she needed to air ads like this in order to do so. Regardless, the supermajority requirement’s origin matters less than its defeat. Between now and January, the progressive forces within Team Blue’s tent must work to nip this rule in the bud. When voters went to the polls earlier this month, 123 House Democrats, and many of the party’s House candidates, had pledged to support Medicare for All. If the new Democratic majority decides to make that goal more difficult to achieve — as its first act upon taking office — then it will recklessly betray many of the people whose votes, dollars, phone calls, and door-knocking put them into power. House Dems Mull Making Their Own Agenda Impossible to Pass Source: Pelosi Mulls Super-majority Rule For Tax Hikes On Bottom 80%

    Read at 01:52 pm, Nov 16th

  • Mira Ricardel headed for exit after clash with Melania Trump's office - CNNPolitics

    The dispute spilled into public view in extraordinary fashion on Tuesday when the first lady's office released a statement calling for deputy national security adviser Mira Ricardel's ouster as reports surfaced that President Donald Trump would fire the official."It is the position of the Office of the First Lady that (Ricardel) no longer deserves the honor of serving in this White House," the first lady's communications director Stephanie Grisham said in a statement on Tuesday.The White House announced Wednesday that Ricardel would be leaving her role as deputy national security adviser and would take a different role in the administration.The statement Tuesday from Melania Trump's office amounted to a stunning public rebuke by a first lady of a senior official serving in her husband's administration. It came after reports surfaced earlier Tuesday indicating Ricardel would be pushed out of her post after less than seven months on the job.Neither Ricardel nor spokespeople for the National Security Council responded to CNN requests for comment.Reflecting the fast-moving nature of the events, soon after a Wall Street Journal report surfaced Tuesday afternoon alleging Ricardel was fired and escorted off the White House grounds, a senior White House official denied the story to reporters.The official said Ricardel was still in her office Tuesday afternoon. Her departure leaves national security adviser John Bolton without one of his key allies in the White House, a deputy who has also shared his penchant for bureaucratic infighting.It was those sharp elbows that sources said led to the first lady's stinging statement, with Ricardel most recently feuding with members of the first lady's staff over her trip to Africa. One person familiar with the matter said Ricardel quarreled with the first lady's staff over seating on the plane and use of National Security Council resources.A White House official accused Ricardel of being dishonest about the feud and subsequently leaking stories to try to cover her behavior.And before her spat with the East Wing, Ricardel butted heads repeatedly with Defense Secretary Jim Mattis, a rivalry that was well-known within the Trump administration. Her disputes with Mattis preceded her time as deputy national security adviser, going back to the presidential transition when Ricardel sought to block Mattis from hiring certain people who had been critical of Trump or were viewed as insufficiently loyal to Trump.Tensions had also been rising between Ricardel and chief of staff John Kelly and his deputy Zach Fuentes in recent weeks, according to people familiar with the matter. Kelly and Fuentes believe Ricardel was leaking negative stories about them to the press, the people said. The dispute made it difficult for Ricardel to land in a top post in the Trump administration, though she was ultimately tapped for the position of undersecretary of commerce for export administration. Ricardel then joined the National Security Council as Bolton's deputy in April after he was named national security adviser.Ricardel has been key to Bolton's efforts to restructure the National Security Council and to help Bolton secure his place as an influential adviser to the President on all foreign policy matters.The drama surrounding Ricardel's ouster surfaced while Bolton was half a world away in Singapore, where he is attending the Association of Southeast Asian Nations summit.West Wing caught off guardWest Wing officials were caught off guard on Tuesday by the statement from the first lady's spokeswoman targeting Ricardel, two sources familiar with the matter said.White House officials were generally aware of the tensions between Ricardel and the first lady's office stemming from the Africa trip, but were stunned to see the first lady take such a public stance against a senior staffer through her spokeswoman. Sources said officials in the White House press shop were particularly annoyed that they didn't get a heads-up from the East Wing.West Wing and NSC officials are more upset at the way the East Wing handled the matter than the substance of the effort to push Ricardel out.One person said neither Trump, Kelly nor press secretary Sarah Sanders knew the statement was coming. Ricardel made few friends since she came on board in April, clashing with officials across the administration. Two administration sources said she was generally not well liked, though others pushed back, saying she was a respected member of the team and one of the highest ranking women in the West Wing. Even one NSC official who said they liked Ricardel said she "liked to pick fights with a lot of different folks" and suspected her latest feud with the first lady's office was "the last straw."Another official was more forgiving: "She'd run through a brick wall for you but her personality isn't for everyone."This story has been updated.CNN's Pamela Brown and Sarah Westwood contributed to this report. Source: Mira Ricardel headed for exit after clash with Melania Trump’s office – CNNPolitics

    Read at 08:13 am, Nov 16th

  • Oh Man, Look at Your API! – Pixel Point – Medium

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Oh Man, Look at Your API! – Pixel Point – Medium

    Read at 10:03 pm, Nov 15th

  • Move over, Hillary and Barack! Fox News has found a new supervillain

    Wednesday November 14, 2018 · 12:17 PM PST 2018/11/14 · 12:17 Why are you so obsessed with me? Why are you so obsessed with me? Forget the “caravan” and forget Beto O’Rourke. There’s a new object of completely unhinged and unbridled (and unfounded) obsession in the dark right-wing fantasy land that is Fox News, and she’s a 28-year-old Congresswoman-elect.  With Hillary Clinton out of the picture, Nancy Pelosi hard at work guiding the House to its reclaimed majority, and the value of ginning up fiery hatred for Central American asylum seekers plummeting, Donald Trump’s most favored network has homed in on New York’s newly elected Alexandria Ocasio-Cortez. Besides being young, brown, and a woman, Ocasio-Cortez is also an unapologetic Democratic Socialist—and we all know what the word “socialist” does to them Fox folks. Journalist Parker Malloy of Media Matters for America shared a supercut Wednesday morning that shows just how much America’s Worst News Network has been discussing AOC. It’s startling, when you stop laughing at the stumbling anchors and their pseudo-Spanish accents. There’s a new villain in Fox town, folks, and soon enough, the fearmongers will figure out how to say her name. .media-body .new-comment-wrapper.media .media-body .new-comment-wrapper.media {{backgroundUrl avatar_large}} .avatar .username Joined: {{created_at}} Story Count: {{n_stories}} Comment Count: {{n_comments}} Popular Tags: {{showTags popular_tags}} {{#each badges}} {{badgeUrl .}} {{/each}} .right_author_info {{authorSig user_sig}} .bottom_author_info author_bio_inner {{/unless}} {{/if}} {{#ifcanRecComment author_id}} {{#if recommenders_text}} {{else}} {{/if}} {{n_recrates}} {{n_recrates}} {{else}} {{#if recommenders_text}} {{else}} {{/if}} Recommended {{n_recrates}} time{{simplePlural n_recrates}} {{/ifcanRecComment}} {{#ifCommentFlaggable author_id story_author_id}} {{/ifCommentFlaggable}} {{#if preview}} {{/if}} Source: Move over, Hillary and Barack! Fox News has found a new supervillain

    Read at 09:29 pm, Nov 15th

  • Tinder introduces Swipe Surge to alert users of high activity nearby - The Verge

    Tinder is one of the most popular dating apps out there, but it goes through its periods of lulls and highs throughout the day. There’s also likely to be more activity during a concentrated event (like a music festival or even the Olympic Games) than on a random November Sunday night. The company understands this, and it’s introducing a new feature today called Swipe Surge. The concept is simple: if there’s an abnormally high amount of people using the app in one specific area, Tinder will tell people who are nearby. To receive announcements about surges in traffic, users must turn push notifications on. Those who participate in Swipe Surge will also have their profile immediately boosted to the front of the line, which is a perk that users typically need to pay for during non-Surge times. Tinder’s announcement also came with a few handy statistics about what a surge in users, which would prompt a push notification, actually means. Swipe Surge is currently “testing on iOS devices in select cities,” but Tinder hasn’t specified which cities have the feature. The Verge has reached out for clarification. Source: Tinder introduces Swipe Surge to alert users of high activity nearby – The Verge

    Read at 04:31 pm, Nov 15th

  • CLI: improved

    (edit)I'm not sure many web developers can get away without visiting the command line. As for me, I've been using the command line since 1997, first at university when I felt both super cool l33t-hacker and simultaneously utterly out of my depth. Over the years my command line habits have improved and I often search for smarter tools for the jobs I commonly do. With that said, here's my current list of improved CLI tools.READER DISCOUNTSave $80 on terminal.trainingI've published 38 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today.$19 - only from this linkIgnoring my improvementsIn a number of cases I've aliased the new and improved command line tool over the original (as with cat and ping).If I want to run the original command, which is sometimes I do need to do, then there's two ways I can do this (I'm on a Mac so your mileage may vary): $ cat # ignore aliases named "cat" - explanation: https://stackoverflow.com/a/16506263/22617 $ command cat # ignore functions and aliases bat > catcat is used to print the contents of a file, but given more time spent in the command line, features like syntax highlighting come in very handy. I found ccat which offers highlighting then I found bat which has highlighting, paging, line numbers and git integration. The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching). I've also aliased bat to the cat command: alias cat='bat' 💾 Installation directionsprettyping > pingping is incredibly useful, and probably my goto tool for the "oh crap is X down/does my internet work!!!". But prettyping ("pretty ping" not "pre typing"!) gives ping a really nice output and just makes me feel like the command line is a bit more welcoming. I've also aliased ping to the prettyping command: alias ping='prettyping --nolegend' 💾 Installation directionsfzf > ctrl+rIn the terminal, using ctrl+r will allow you to search backwards through your history. It's a nice trick, albeit a bit fiddly. The fzf tool is a huge enhancement on ctrl+r. It's a fuzzy search against the terminal history, with a fully interactive preview of the possible matches. In addition to searching through the history, fzf can also preview and open files, which is what I've done in the video below: For this preview effect, I created an alias called preview which combines fzf with bat for the preview and a custom key binding to open VS Code:alias preview="fzf --preview 'bat --color "always" {}'" # add support for ctrl+o to open selected file in VS Code export FZF_DEFAULT_OPTS="--bind='ctrl-o:execute(code {})+abort'" 💾 Installation directionshtop > toptop is my goto tool for quickly diagnosing why the CPU on the machine is running hard or my fan is whirring. I also use these tools in production. Annoyingly (to me!) top on the Mac is vastly different (and inferior IMHO) to top on linux. However, htop is an improvement on both regular top and crappy-mac top. Lots of colour coding, keyboard bindings and different views which have helped me in the past to understand which processes belong to which. Handy key bindings include: P - sort by CPUM - sort by memory usageF4 - filter processes by string (to narrow to just "node" for instance)space - mark a single process so I can watch if the process is spikingThere is a weird bug in Mac Sierra that can be overcome by running htop as root (I can't remember exactly what the bug is, but this alias fixes it - though annoying that I have to enter my password every now and again): alias top="sudo htop" # alias top and fix high sierra bug 💾 Installation directionsdiff-so-fancy > diffI'm pretty sure I picked this one up from Paul Irish some years ago. Although I rarely fire up diff manually, my git commands use diff all the time. diff-so-fancy gives me both colour coding but also character highlight of changes. Then in my ~/.gitconfig I have included the following entry to enable diff-so-fancy on git diff and git show:[pager] diff = diff-so-fancy | less --tabs=1,5 -RFX show = diff-so-fancy | less --tabs=1,5 -RFX 💾 Installation directionsfd > findAlthough I use a Mac, I've never been a fan of Spotlight (I found it sluggish, hard to remember the keywords, the database update would hammer my CPU and generally useless!). I use Alfred a lot, but even the finder feature doesn't serve me well. I tend to turn the command line to find files, but find is always a bit of a pain to remember the right expression to find what I want (and indeed the Mac flavour is slightly different non-mac find which adds to frustration). fd is a great replacement (by the same individual who wrote bat). It is very fast and the common use cases I need to search with are simple to remember. A few handy commands: $ fd cli # all filenames containing "cli" $ fd -e md # all with .md extension $ fd cli -x wc -w # find "cli" and run `wc -w` on each file 💾 Installation directionsncdu > duKnowing where disk space is being taking up is a fairly important task for me. I've used the Mac app Disk Daisy but I find that it can be a little slow to actually yield results. The du -sh command is what I'll use in the terminal (-sh means summary and human readable), but often I'll want to dig into the directories taking up the space. ncdu is a nice alternative. It offers an interactive interface and allows for quickly scanning which folders or files are responsible for taking up space and it's very quick to navigate. (Though any time I want to scan my entire home directory, it's going to take a long time, regardless of the tool - my directory is about 550gb).Once I've found a directory I want to manage (to delete, move or compress files), I'll use the cmd + click the pathname at the top of the screen in iTerm2 to launch finder to that directory. There's another alternative called nnn which offers a slightly nicer interface and although it does file sizes and usage by default, it's actually a fully fledged file manager. My ncdu is aliased to the following: alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules" The options are: --color dark - use a colour scheme-rr - read-only mode (prevents delete and spawn shell)--exclude ignore directories I won't do anything about💾 Installation directionstldr > manIt's amazing that nearly every single command line tool comes with a manual via man <command>, but navigating the man output can be sometimes a little confusing, plus it can be daunting given all the technical information that's included in the manual output. This is where the TL;DR project comes in. It's a community driven documentation system that's available from the command line. So far in my own usage, I've not come across a command that's not been documented, but you can also contribute too.As a nicety, I've also aliased tldr to help (since it's quicker to type!): alias help='tldr' 💾 Installation directionsack || ag > grepgrep is no doubt a powerful tool on the command line, but over the years it's been superseded by a number of tools. Two of which are ack and ag.I personally flitter between ack and ag without really remembering which I prefer (that's to say they're both very good and very similar!). I tend to default to ack only because it rolls of my fingers a little easier. Plus, ack comes with the mega ack --bar argument (I'll let you experiment)! Both ack and ag will (by default) use a regular expression to search, and extremely pertinent to my work, I can specify the file types to search within using flags like --js or --html (though here ag includes more files in the js filter than ack).Both tools also support the usual grep options, like -B and -A for before and after context in the grep. Since ack doesn't come with markdown support (and I write a lot in markdown), I've got this customisation in my ~/.ackrc file: --type-set=md=.md,.mkd,.markdown --pager=less -FRX 💾 Installation directions: ack, agFuther reading on ack & agjq > grep et alI'm a massive fanboy of jq. At first I struggled with the syntax, but I've since come around to the query language and use jq on a near daily basis (whereas before I'd either drop into node, use grep or use a tool called json which is very basic in comparison). I've even started the process of writing a jq tutorial series (2,500 words and counting) and have published a web tool and a native mac app (yet to be released). jq allows me to pass in JSON and transform the source very easily so that the JSON result fits my requirements. One such example allows me to update all my node dependencies in one command (broken into multiple lines for readability): $ npm i $(echo $( npm outdated --json | jq -r 'to_entries | .[] | "(.key)@(.value.latest)"' )) The above command will list all the node dependencies that are out of date, and use npm's JSON output format, then transform the source JSON from this: …to this: [email protected] [email protected] That result is then fed into the npm install command and voilà, I'm all upgraded (using the sledgehammer approach). Honourable mentionsSome of the other tools that I've started poking around with, but haven't used too often (with the exception of ponysay, which appears when I start a new terminal session!): ponysay > cowsaycsvkit > awk et alnoti > display notificationentr > watchWhat about you?So that's my list. How about you? What daily command line tools have you improved? I'd love to know.Want more?Posts, web development learnings & insights, exclusive workshop and training discounts and more, direct to your inbox.I won't send you any spam, and you can unsubscribe at any time. Powered by ConvertKitAwesome, thanks so much!Now you'll need check your email to confirm your subscription. Source: CLI: improved

    Read at 10:37 am, Nov 15th

  • Keyboard-Only Focus Styles | CSS-Tricks

    By Chris Coyier On November 14, 2018 :focus-visible, accessibility, focus Like Eric Bailey says, if it's interactive, it needs a focus style. Perhaps your best bet? Don't remove the dang outlines that focusable elements have by default. If you're going to rock a button { outline: 0; }, for example, then you'd better do a button:focus { /* something else very obvious visually */ }. I handled a ticket just today where a missing focus style was harming a user who relies on visual focus styles to navigate the web. But those focus styles are most useful when tabbing or otherwise navigating with a keyboard, and less so when they are triggered by a mouse click. Now we've got :focus-visible! Nelo writes: TLDR; :focus-visible is the keyboard-only version of :focus. Also, the W3C proposal mentions that :focus-visible should be preferred over :focus except on elements that expect a keyboard input (e.g. text field, contenteditable). (Also see his article for a good demo on why mouse clicking and focus styles can be at odds, beyond a general dislike of fuzzy blue outlines.) Browser support for :focus-visible is pretty rough: DesktopChromeOperaFirefoxIEEdgeSafariNoNo4*NoNoNoMobile / TabletiOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid FirefoxNoNoNoNoNo62* But it does have Firefox support, and as Lea Verou says: ... once Chrome ships its implementation it will explode in a matter of 1-2 months. That's generally how things go these days. Once two major browsers have support — and one of them is Chrome — that's a huge enough slice of the web that can start using it. Especially when it can be done as safely as this property. Safely, as in, there is an official polyfill, meaning you can nuke default focus styles and just use :focus-visible styles: /* Remove outline for non-keyboard :focus */
 *:focus:not(.focus-visible) {
 outline: none;
 }
 
 /* Optional: Customize .focus-visible */
 .focus-visible {
 outline: lightgreen solid 2px;
 } But, as Patrick H. Lauke documented, you can do it even without the polyfill, using careful selector usage and un-doing styles as needed: button:focus { /* Some exciting button focus styles */ }
 button:focus:not(:focus-visible) {
 /* Undo all the above focused button styles
 if the button has focus but the browser wouldn't normally
 show default focus styles */
 }
 button:focus-visible { /* Some even *more* exciting button focus styles */ } Seems like a nice improvement for the web. Source: Keyboard-Only Focus Styles | CSS-Tricks

    Read at 08:38 pm, Nov 14th

  • React Hooks — let’s not get too attached – LogRocket

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: React Hooks — let’s not get too attached – LogRocket

    Read at 12:33 pm, Nov 14th

  • Overengineering CSS | Go Make Things

    Source: Overengineering CSS | Go Make Things

    Read at 08:21 am, Nov 14th

  • TypeScript-aware React hooks for global state – ITNEXT

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: TypeScript-aware React hooks for global state – ITNEXT

    Read at 08:13 am, Nov 13th

  • Implementing Smooth Scrolling in React ― Scotch

    Smooth Scrolling, dont know what it is? Well, instead of clicking on a button and being instantly taken to a different part of the (same) page, the user is navigated there via a scroll animation. It's one of those subtle features on a site that makes an incredible difference in terms of aesthetics. I personally just implemented this on one of my personal sites because I love the look and feel it provides to the user. That said, even though smooth scrolling might be subtle, it can be a bit tricky to implement yourself. Because of that, in this article, we are going to use the react-scroll package on NPM. We'll be building a simple app in this tutorial, but if you want a quick rundown of how react-scroll works: Install react-scroll npm i -S react-scroll Import the react-scroll Package import { Link, animateScroll as scroll } from "react-scroll"; Add the Link Component The <Link /> component will point to a certain area of your app. <Link to="section1"> Let's take a deeper dive and build a little React app with smooth scrolling. For convenience, I've created a starter React project (using Create React App 2.0) that has a navbar at the top along with five different sections of content. The links in the navbar are just anchor tags at this point, but we will update them shortly to enable smooth scrolling. You can find the project at React With Smooth Scrolling . Notice, this link is for the "start" branch. The master includes all of the finished changes. To clone the project, you can use the following command. git clone https://github.com/jamesqquick/React-With-Smooth-Scrolling.git If you look into the Src->Components directory, you'll find a Navbar.js file that contains the navbar with nav items corresponding to 5 different sections. Then, if you open up the App.js file in the Src directory, you'll see where the Navbar is included along with the five actual sections. Each section component takes in a title and subtitle. Since I'm just using dummy text in the different sections, I added that text to a DummyText.js file, imported it, and passed it into each Section component. To run the app, you can use the following command. npm start This will start the app in development mode and automatically refresh the app when you save on of your files. You can view it in the browser at localhost:3000. Ok, now it's time to install the react-scroll package and add that functionality. You can find information on the package on NPM. To install the package, run the following command. npm install react-scroll Then, open the Navbar.js file back up and add an import for two named imports, "Link" and "animateScroll". Notice that I've aliased "animatedScroll" to "scroll" for ease of use. import { Link, animateScroll as scroll } from "react-scroll"; With all of our imports defined, we can now updated our nav items to use the "Link" component. This component takes several properties. You can read about all of them on the documentation page on NPM, but we will pay special attention to activeClass, to, spy, smooth, offset, and duraction. Scotch Newsletter Join 100,000 subscribers. Get weekly dev news and tutorials. Thank you! You have successfully joined the Scotchy super duper web dev awesome mailing list. activeClass - class applied when element is reached to - target to scroll to spy - make Link selected when scroll is at its targets position smooth - animate the scrolling offset - scroll additional px (like padding) duration - time of the scroll animation, can be a number or a function The "to" property is the most important part as it tells the component which element to scroll to. In this case, this will be each of our sections. With the *offset *property, you can define an additional amount of scrolling to perform to get to each section. *Duration *is pretty slelf-explanatory, and spy and active class we will come back to in a minute. Here's an example of the properties that we will use for each Link component. The only difference between them will be the "to" property as they each point to a different section. You'll need to update each of the nav items accordingly. With these added, you should be able to go back to your browser (your app should have automatically restarted already) and see smooth scrolling in action! The active class property allows us to define a class to apply to the Link component when it's "to" element is active. A Link is considered active if it's "to" element is in view near the top of the page. This can be triggered by clicking on the link itself or by scrolling down to the section manually. To prove this, I opened up the dev tools in Chrome and inspected the fifth link as shown below. When I clicked on that link or scrolled to the bottom of the page myself, notice that the "active" class is in fact applied. To take advantage of this, we can create an active class and add an underline to the link. You can add this bit of css in the App.css file in the Src directory. .nav-item > .active { border-bottom: 1px solid #333; } Now, if you go back to your browser and scroll around a bit, you should see the appropriate link is underlined. For one last bit of content, this package also provides some functions that can be called directly like "scrollToTop", "scrollToBottom", etc. as well as various events that you can handle. In reference these functions, typically, the application logo in a navbar will bring the user to the home page or the top of the current page. As a simple example of how to call one of these provided functions, I added a click handler to the navbar brand image to call scroll the user back to the top of the pagel like so. scrollToTop = () => { scroll.scrollToTop(); }; Back in the browser, you should be able to scroll down on the page, click the logo in the navbar, and be taken back to the top of the page. If you're curious, spend some time exploring the other functions and events that this package offers you! As I said, smooth scrolling is one of those features that can add a lot aesthetic value to your application. As you can tell, with the react-scroll package, it's pretty easy to implement, so it's definitely worth the effort. If you have any additional questions or comments feel to comment below or find me on twitter, @JamesQQuick. Source: Implementing Smooth Scrolling in React ― Scotch

    Read at 08:13 am, Nov 13th

  • useEffect vs useLayoutEffect vs useMutationEffect | Buttondown

    The simple rules for when to use each. Note: If the words "React Hooks" doesn't ring any bells for you, then stop for a moment and go here to read/watch...Source: useEffect vs useLayoutEffect vs useMutationEffect | Buttondown

    Read at 07:13 pm, Nov 12th

  • Researchers Defeat Most Powerful Ad Blockers, Declare a ‘New Arms Race’ - Motherboard

    An example of a privilege attack demonstrated by the researchers. Here, Jerry posts an adversarial image to facebook that causes it to be blocked (in red) on every user’s browser.  Ad blockers were created for people who are sick of ads’ constant assault on their senses or who want to improve their internet security. Yet ever since the first ad blockers were released on the internet, there’s been an escalating conflict between adblock developers and advertisers creating ad blockers and ad blocker-blockers. Last year, Princeton researchers created a perceptual ad blocker, which could visually locate advertisements on a webpage and filter them out. This plugin was supposed to be the “ad blocking superweapon” that would put an end to the ad-blocking arms race since it didn’t target ads based on their code, but on the way they looked on the page. According to new research published this week on arXiv, however, an AI was able to defeat perceptual ad blockers. Moreover, the researchers warned, ad blockers will be on the losing side of the arms race and expose their users to new attack vectors in the process. “Our attacks are not a step in a ‘quid pro quo’ arms race,” the researchers wrote. “Instead, contrary to prior beliefs, they are indicative of a clearly pessimistic outcome for perceptual ad blockers. Our results show that if deployed, perceptual ad blockers would engender a new arms race that overwhelmingly favors publishers and ad-networks.” Ad blockers such as AdBlock or uBlock work by maintaining “filter lists,” which are sets of rules that tell the ad blockers what type of content to block. These lists can be custom-made or users can use one of the many publicly available lists such as EasyList. The problem with filter lists is advertisers are constantly figuring out ways to get around them and creating too extensive of a filter list can significantly slow down a web browser. An example of a privilege attack demonstrated by the researchers. Here, Jerry posts an adversarial image to facebook that causes it to be blocked (in red) on every user’s browser. Image: arXiv Perceptual ad blockers rectify these shortcomings by blocking ads based on how they look on a webpage. This includes looking for ad cues such as a “Sponsored” link or the close button on pop-up ads, as well as the legally required signifiers that an ad is in fact an ad. Perceptual ad blockers are much harder to subvert in principle because they require advertisers to fundamentally change the content and appearance of the ad. This may result in a less effective advertisement or violation of legal requirements about declaring advertising. Only a year-and-a-half after perceptual ad blockers were heralded as the end of the ad-blocker arms race, however, a team of researchers from Stanford and CISPA Helmholtz Center for Information Security have discovered a “panoply” of vulnerabilities in perceptual ad blockers that undermine their efficacy and expose users to new attack vectors. The researchers focused on two types of perceptual ad blocker, one called Perceptual Ad Highlighter and the other called Sentinel, which use neural networks, a type of machine learning architecture loosely based on the human brain, to recognize ads on webpages. These ad blockers rely on a visual classifier that is trained on thousands of screenshots from websites that have their advertisements labeled so that the algorithm can create models of what an ad looks like. Read More: These Screen-blocking Glasses Are Ad Blockers for Real Life To highlight the vulnerabilities of these visual classifiers, the researchers created adversarial ad examples that were meant to fool and undermine the efficacy of Sentinel and Highlighter. The researchers tested their attacks on six different visual classifiers in total, three of which were already deployed as part of perceptual ad blocking software. In these attacks, the researchers would make changes to advertisements that were nearly imperceptible to a human but capable of tripping up a machine learning algorithm. Among the most devastating attacks launched by the researchers was a “privilege-hijacking” attack that caused the perceptual ad block to block legitimate content on a webpage after mistaking it for an ad. In other words, the researchers managed to turn the very tool that makes perceptual ad blockers effective into their greatest weakness. In fact, according to the researchers, “ad blockers operate in what is essentially the worst possible threat model for visual classifiers.” An example of some of the false ads used by the researchers for their adversarial attacks. Here the AdChoices logo, the small blue triangle, is doctored to fool the ad blocker neural net. Image: arXiv The researchers tried several different adversarial attacks on the perceptual ad blockers’ visual classifiers. One attack, for example, slightly altered the AdChoices logo that is commonly used to disclose advertisements to fool the perceptual ad blocker. In another attack, the researchers demonstrated how website publishers could overlay a transparent mask over a website that would allow ads to evade perceptual ad blockers. “The aim of our work is not to downplay the merits of ad-blocking, nor discredit the perceptual ad blocking philosophy, which is sound when instantiated with a robust visual ad detector,” the researchers concluded. “Rather, our overarching goal is to highlight and raise awareness on the vulnerabilities that arise in building ad blockers with current computer vision systems.”Source: Researchers Defeat Most Powerful Ad Blockers, Declare a ‘New Arms Race’ – Motherboard

    Read at 08:07 am, Nov 12th

  • The ironic inaccessibility of a11y | CSS-Tricks

    By Chris Coyier On November 11, 2018 accessibility This resonated with me: It’s ironic to me that the numeronym “a11y” lacks accessibility: it’s not immediately decipherable by humans who aren’t “in the club”; and, in some fonts, it’s visually indistinguishable from the word “ally” (with lowercase L’s), which can foil searches for clarity. — Eric Meyer (@meyerweb) November 5, 2018 Because I bet it took me a year after seeing that acronym ("numeronym", I guess) for the first time to know that was just a stand-in for the word "accessibility". I'm only now just understanding that "i18n" means "Internationalization" and "l10n" means "Localization". I wonder how many conversations or articles I've missed because I just assumed the weird moniker was referring to something that had nothing to do with me. On the flip side, I wonder what good has come from having these cool words form a banner to rally under. Lots of good conversation in that thread. I don't know enough to have an opinion about whether anyone else should or shouldn't use it, but remembering my own confusion, I think I'll avoid it around here. Source: The ironic inaccessibility of a11y | CSS-Tricks

    Read at 07:56 am, Nov 12th

  • That Cute Baby-Bear Video Reveals a Problem With Drones - The Atlantic

    But when biologists started watching the video, they saw a very different story.
 We could all learn a lesson from this baby bear: Look up & don't give up. pic.twitter.com/nm0McSYeqY
 — IM🍑HIM (@ziyatong) November 3, 2018The video, they say, was clearly captured by a drone. And in it, they saw the work of an irresponsible drone operator who, in trying to film the bears, drove them into a dangerous situation that almost cost the cub its life. “I found it really hard to watch,” says Sophie Gilbert, an ecologist at the University of Idaho who studies, among other things, how drones affect wildlife. “It showed a pretty stark lack of understanding from the drone operator of the effects that his actions were having on the bears.” (It wasn’t just scientists, either; several drone pilots were also dismayed by the footage.)Read: Why drones make elephants go berserkThe only information accompanying the video says that it was captured on June 19, 2018, in the Magadan region of Russia. No one knows who shot it, which drone was used, or how close it flew. But “it doesn’t matter how far away it was, because I can tell from the bears’ behavior that it was too close,” says Clayton Lamb of the University of Alberta, who studies grizzly bears in the Canadian Rockies and uses drones to map the area where they live.The setting of the video is already suspicious, Lamb says. With a cub that small and vulnerable, it’s very unlikely that a mother bear would opt to traverse such a steep and slippery slope. “There’s no reason a female would normally accept that risk, unless they were forced into it,” Lamb says. Throughout the video, he notes, the mother is constantly looking up at the drone and clearly bothered by its presence. At some point, the footage zooms in, probably because the drone itself was swooping closer. That, Lamb says, explains why the mother unexpectedly swats at the cub, causing it to fall. She probably read the drone’s approach as a kind of attack and was trying to push her cub away.She may, as some biologists have suggested, have parsed it as an eagle (and indeed, the shadow of a bird of prey can be seen in the video). But Lamb suspects that her concern was more straightforward: A strange, loud object was closing in. “Many people think that drones are silent, like a soaring bird or a paper airplane,” he says, but at close range, they can be very loud.Professional wildlife filmmakers have also turned to drones, using them to capture shots of frolicking river dolphins in Planet Earth II and Galápagos sea lions hunting yellowfin tuna in Blue Planet II. But documentary crews often include naturalists who are sensitive to the behaviors of their subjects. “As we get tech that allows the common user to gather those shots, people who aren’t professionals can misuse it to get a homemade Planet Earth video,” says Lamb. Source: That Cute Baby-Bear Video Reveals a Problem With Drones – The Atlantic

    Read at 11:50 am, Nov 11th

Week of Nov 4th, 2018

  • Patching the Vue.js Virtual DOM: The need, the explanation and the solution

    Your first question might well be, why would it be necessary to interfere with the Virtual DOM? Vue.js neatly abstracts this concept from us. Just to quickly recap, when I say Virtual DOM, I’m talking about the DOM-like tree structure that Vue.js creates from your component templates.

    Read at 09:05 pm, Nov 10th

  • China is making the internet less free, and US tech companies are helping

    China’s restrictive internet policies are being actively exported around the world, according to a new report by nonprofit organization Freedom House published yesterday.

    Read at 09:02 pm, Nov 10th

  • Busting SIM Swappers and SIM Swap Myths

    KrebsOnSecurity recently had a chance to interview members of the REACT Task Force, a team of law enforcement officers and prosecutors based in Santa Clara, Calif.

    Read at 08:59 pm, Nov 10th

  • Calls to Delay WordPress 5.0 Increase, Developers Cite Usability Concerns and Numerous Bugs in Gutenberg

    Developers and business owners are waiting anxiously in the wings, as Gutenberg is 11 days away from its debut in WordPress 5.0. There is still a chance that the release could be delayed to the secondary date (January 22, 2019), but the decision has not yet been announced.

    Read at 08:18 pm, Nov 10th

  • ETS, Day 2

    I arrived at Landgraf Hall a little earlier today, but archival research is hard work, and I’ve left a little earlier too. My back is killing me.

    Read at 08:15 pm, Nov 10th

  • Answer these 10 questions to understand if you’re a good manager

    Something I struggled with as a new manager was finding a sense of accomplishment, and as I’ve moved on to manage managers, I’ve seen this become a challenge for them, too.

    Read at 08:12 pm, Nov 10th

  • Police decrypt 258,000 messages after breaking pricey IronChat crypto app

    Police in the Netherlands said they decrypted more than 258,000 messages sent using IronChat, an app billed as providing end-to-end encryption that was endorsed by National Security Agency leaker Edward Snowden.

    Read at 08:08 pm, Nov 10th

  • ETS, Day 1

    I’m in Princeton, New Jersey this week at the Educational Testing Service headquarters where Ben D. Wood’s papers are housed.

    Read at 08:04 pm, Nov 10th

  • Blizzard Courts Controversy With New 'Overwatch' Anti-Toxicity Measures

    Combating toxicity has become a number one priority for Blizzard in an attempt to make its online competitive shooter Overwatch less hostile and more hospitable for players.

    Read at 08:02 pm, Nov 10th

  • Simplify Styling with Functional CSS

    Do you dread styling your apps? Fear that a change might break the styles you crafted through many hours of labour? I'm here to tell you that there's another way. Introducing functional CSS.

    Read at 07:59 pm, Nov 10th

  • Simplify Styling with Functional CSS

    There is no doubt that "functional CSS" resonates strongly with some people. If that term is new to you, I belive it's come to mean the same thing as "Atomic CSS" as defined by John Polacek here.

    Read at 07:58 pm, Nov 10th

  • Broken machines, rejected ballots and long lines: voting problems emerge as Americans go to the polls.

    Civil rights groups and election officials fielded thousands of reports of voting irregularities across the country Tuesday, with voters complaining of broken machines, long lines and untrained poll workers improperly challenging Americans’ right to vote.

    Read at 07:57 pm, Nov 10th

  • Brian Kemp’s Lead in Georgia Needs an Asterisk

    Updated at 3:50 p.m. ET on November 12, 2018. The Democrat Stacey Abrams, a black woman, made a valiant effort to win the governor’s race in Georgia, one of the original 13 states, whose commitment to human bondage ensured that the U.S. Constitution would treat slavery with kid gloves.

    Read at 07:50 pm, Nov 10th

  • Architecture no one needs is server side templating

    In a blog post named The Architecture No One Needs Greg Navis claims that SPA (Single Page Applications) are “almost always worse than a multi-page app” and claims that there are alternatives that “can yield similar benefits without the costs”.

    Read at 06:27 pm, Nov 10th

  • The Architecture No One Needs

    Single-page apps are all the rage nowadays. Many praise their vague technical benefits while ignoring tremendous development costs.

    Read at 06:21 pm, Nov 10th

  • Bernie Sanders Says Not All Voters Who Feel 'Uncomfortable' With Black Candidates Are Racist

    The comment came in an interview with The Daily Beast published Thursday, in which the senator discussed the difficulties faced by black gubernatorial candidates Andrew Gillum in Florida and Stacey Abrams in Georgia.

    Read at 06:17 pm, Nov 10th

  • Election coverage: the road not taken

    Originally published as a Twitter thread on election day, 2018. There was a path the American press could have walked, but did not. This alternative way was illuminated as far back as 1992. Our political journalists declined it. And here we are. This post is that story.

    Read at 06:14 pm, Nov 10th

  • I KNOW WHY YOU'RE SAD.

    On paper, Tuesday was a good day for Democrats. They took the House for the first time in eight years. Several important Governorships (in advance of post-Census 2020 redistricting battles) were won. Notably vile Republicans like Kris Kobach, Scott Walker, and Dana Rohrabacher lost.

    Read at 06:10 pm, Nov 10th

  • Functional Programming, CSS, and your sanity

    Learning Clojure and/or Haskell will make you a better programmer. Even if you don’t use it day to day, there are a ton of prescient lessons to be taken back to your language of choice. Functional programming is infectious.

    Read at 06:08 pm, Nov 10th

  • Rationalizing Functional CSS

    The idea of functional CSS just seemed like the craziest thing I'd ever heard of. "Why would I ever use this? I'm awesome at CSS," I'd tell myself. If you haven't heard of it, functional CSS (or atomic CSS/utility classes/immutable CSS - I could go on forever.

    Read at 06:03 pm, Nov 10th

  • chibicode/react-functional-css-protips

    This repo is a Three-Act rant essay. I've originally written this to teach functional CSS to my coworkers, but maybe you'll find it helpful too.

    Read at 05:54 pm, Nov 10th

  • Why I moved my site from WordPress to GatsbyJS.

    When I originally started JSdiaries, I did so with the intention of providing information about JavaScript, Web Applications, Data Visualisation and everything in-between. For example, if I wanted to use code syntax highlighting in my posts I’d use a plugin like Crayon Syntax Highlighting.

    Read at 04:46 pm, Nov 10th

  • Inside Tesla’s factory, a medical clinic designed to ignore injured workers

    This story was originally published by Reveal from The Center for Investigative Reporting, a nonprofit news organization based in the San Francisco Bay Area. Learn more at revealnews.org and subscribe to the Reveal podcast, produced with PRX, at revealnews.org/podcast.

    Read at 01:45 pm, Nov 10th

  • Missing the Story

    Five years ago, I came across an article in The New York Times about a spate of robberies in the Bronx.

    Read at 09:37 am, Nov 10th

  • Duncan Hunter Is Running the Most Anti-Muslim Campaign in the Country

    SAN DIEGO, Calif.—Congressman Duncan Hunter had a problem. The California Republican was supposed to coast to reelection this year. A square-jawed ex-Marine who inherited his father’s House seat in 2008, Hunter had won each of his past five elections by a wide margin.

    Read at 07:04 pm, Nov 9th

  • Without evidence, Trump and Sessions warn of voter fraud in Tuesday’s elections

    President Trump and Attorney General Jeff Sessions on Monday issued strong warnings about the threat of voter fraud in Tuesday’s elections, echoing the president’s baseless claims that massive voter fraud marred his 2016 election and prompting accusations that his administration is trying to in

    Read at 06:48 pm, Nov 9th

  • Billionaire Pushes Marsy’s Law To Victory in Six States, Despite Concerns That It Threatens Defendants’ Rights

    Marsy’s Law, a controversial effort to define crime victims’ rights through amendments to state constitutions, won handily in six states on election night, even though it has been successfully challenged, amended, or blocked in several other states that have adopted it.

    Read at 06:41 pm, Nov 9th

  • Is Long Island City ready for Amazon’s HQ2?

    Brace, New Yorkers: New York City will become one of two locations that will house Amazon’s second North American headquarters (colloquially known as HQ2).

    Read at 06:34 pm, Nov 9th

  • Simply JavaScript: a straightforward intro to Mocking, Stubbing, and Interfaces

    I like to think that I’m a simple guy, I like simple things. So whenever I sense complexity, my first reaction is to wonder if I can make things easier. Before I transitioned to software development, I spent time as a sound engineer. I was recording bands and mixing live shows.

    Read at 11:02 am, Nov 9th

  • How to Handle Monetary Values in JavaScript

    Money is everywhere. Banking apps, e-commerce websites, stock exchange platforms, we interact with money daily. We also increasingly rely on technology to handle ours. Yet, there’s no consensus around how to programmatically handle monetary values.

    Read at 09:19 am, Nov 9th

  • A JavaScript framework for functions of state and action

    Functions like that are very common in the JavaScript ecosystem. For example, the reducer function used to build a Redux store is a function that takes the current state and some action and returns nothing but a new state.

    Read at 09:12 am, Nov 9th

  • The Merits of Mocking

    What are you doing when you mock something, and when is it worth the cost? NOTE: This is a cross-post from my newsletter. I publish each email two weeks after it’s sent. Subscribe to get more content like this earlier right in your inbox! ?

    Read at 09:10 am, Nov 9th

  • Thinking About React, Atomically ⚛

    If you’re not familiar with Brad Frost’s Atomic Design principles, stop right now and go read about it on his blog or buy his book.

    Read at 09:09 am, Nov 9th

  • Florida’s Governor, Senate, Ag Races May Be Subjected To Recount

    TALLAHASSEE (CBSMiami/NSF) – After graciously conceding the governor’s race to Republican Ron DeSantis, Tallahassee Mayor Andrew Gillum may have a second chance. Election departments across the state are still counting vote-by-mail, provisional, and overseas ballots.

    Read at 09:06 am, Nov 9th

  • America's Problem Isn't Tribalism—It's Racism

    It’s fashionable in the Donald Trump era to decry political “tribalism,” especially if you’re a conservative attempting to criticize Trump without incurring the wrath of his supporters. House Speaker Paul Ryan has lamented the “tribalism” of American politics.

    Read at 09:03 am, Nov 9th

  • Trump’s new acting attorney general once mused about defunding Robert Mueller

    This post was originally published in October and has been updated with Whitaker’s installment. Matthew Whitaker has been appointed acting attorney General after Jeff Sessions resigned Wednesday at President Trump’s request.

    Read at 07:20 pm, Nov 8th

  • The Eyes of the World Are on Democratic Candidate Lucy McBath

    Some time during my two-and-a-half hour flight to Atlanta on Sunday afternoon, Lucy McBath’s race against Republican incumbent Karen Handel became a toss-up. I was making my way to a rally where McBath was scheduled to appear, in Chamblee, a suburb just north of the capital, when I saw the news.

    Read at 07:17 pm, Nov 8th

  • Something’s Happening in Texas

    This year, I voted in Texas for the first time. It was complicated. Registering to vote was simple enough. The post office had a form I could print out with my personal information and change of address.

    Read at 07:11 pm, Nov 8th

  • Brian Kemp Just Engaged in a Last-Minute Act of Banana-Republic Level Voter Manipulation in Georgia

    In perhaps the most outrageous example of election administration partisanship in the modern era, Georgia Secretary of State Brian Kemp, who is running for governor while simultaneously in charge of the state’s elections, has accused the Democratic Party without evidence of hacking into

    Read at 12:52 pm, Nov 8th

  • Why Don’t Young People Vote? This System Doesn’t Want Them To.

    To vote in the United States, you can’t simply go cast a ballot. In most states, you first have to register. If you’ve registered, you have to have state-issued identification to then actually vote. If you don’t have identification, you might have to pay a fee to obtain it.

    Read at 11:46 am, Nov 8th

  • A Familiar Force Nurtures Trump’s Instincts on Immigration: Stephen Miller

    When self-inflicted damage left Donald J. Trump’s poll numbers sagging shortly after the Republican National Convention in 2016, the solution was to reframe the race around an incendiary issue that has animated Mr. Trump for decades: immigration. Mr.

    Read at 09:28 am, Nov 8th

  • From Silicon Valley elite to social media hate: The radicalization that led to Gab

    Like many young entrepreneurs drawn to California's technological gold rush, Andrew Torba brought a familiar mix of smarts, ambition and big ideas when he arrived nearly four years ago.

    Read at 09:24 am, Nov 8th

  • Downplaying Deportations: How Textbooks Hide the Mass Expulsion of Mexican Americans During the Great Depression

    The Trump Administration’s horrifying record on immigration, exemplified by the heartbreaking scenes of family separation during the summer of 2018, sparked a new round of discussion and debate about U.S. deportation policy.

    Read at 09:03 am, Nov 8th

  • CC Working with Flickr to Protect the Commons

    Today, Creative Commons is working closely with Flickr and its parent company SmugMug to find ways to protect and preserve the Commons, and ultimately help it grow and thrive. We want to ensure that when users share their works that they are available online in perpetuity

    Read at 11:41 pm, Nov 7th

  • Why won’t anyone adopt a subway station?

    In a clarion call to the private sector last year, Gov. Andrew Cuomo urged big businesses to adopt one of New York City’s grubby subway stations and lavish it with care.

    Read at 11:40 pm, Nov 7th

  • A New York Community Fights to Keep a Psychiatric Ward in Its Own Backyard

    The first time he entered the new spine center at Allen Hospital, Joe Dempsey could not believe his eyes. The main desk looked like it was made of marble.

    Read at 11:38 pm, Nov 7th

  • Uber’s Secret Restaurant Empire

    On Aug. 1, Brooklyn Burger Factory began selling gourmet patties in its residential neighborhood of Crown Heights. But even though the restaurant serves a steady stream of jerk burgers, salmon burgers, and veggie burgers, not a single person has shown up to eat one.

    Read at 11:22 pm, Nov 7th

  • Old School 'Sniffing' Attacks Can Still Reveal Your Browsing History

    Most modern browsers—such as Chrome, Firefox, and Edge, and even browsers such as FuzzyFox and DeterFox (different, security-focused versions of Firefox)—have vulnerabilities that allow hosts of malicious websites to extract hundreds to thousands of URLs in a user’s web history, per new resea

    Read at 11:18 pm, Nov 7th

  • Intel CPUs fall to new hyperthreading exploit that pilfers crypto keys

    Over the past 11 months, the processors running our computers, and in some cases phones, have succumbed to a host of attacks.

    Read at 11:15 pm, Nov 7th

  • Enforcing Accessibility Best Practices with Component PropTypes

    I’m diving into React a lot more, and I’m specifically focused on making rock-solid, dumb presentational components that can be ingested by other applications. Part of making these components rock-solid is providing some definition and guardrails for the props associated with each component.

    Read at 11:08 pm, Nov 7th

  • Thinking About React, Atomically

    React, at its core, follows Atomic Design inherently by encouraging developers to keep components as simple and as broken down as possible. From this simplicity, we can create more complex components and containers of components to create the user interfaces of our applications.

    Read at 11:07 pm, Nov 7th

  • GraphQL: A success story for PayPal Checkout

    At PayPal, we recently introduced GraphQL to our technology stack. If you haven’t heard of GraphQL, it’s a wildly popular alternative to REST APIs that is currently taking the developer world by storm!

    Read at 11:06 pm, Nov 7th

  • Trump Models U.S. Economy on Kansas. That’s a Mistake

    If you had to choose one state out of the 50 to use as a blueprint for America's future growth plan, which state would you select? Let's add a wrinkle. There are two choices, Kansas or California, which my Bloomberg Opinion colleague Matthew Winkler wrote about the other day.

    Read at 07:49 pm, Nov 7th

  • How Far Have the Democrats Moved to the Left?

    The future of the Democratic Party looks a lot like Alexandria Ocasio-Cortez. Once it was the party of patrician liberals like Franklin Roosevelt; now women, people of color, and voters in big cities are the demographics at the heart of the party.

    Read at 07:43 pm, Nov 7th

  • Why Millions of Teens Can't Finish Their Homework

    In decades past, students needed little more than paper, pencils, and time to get their schoolwork done. For the vast majority of students, that's no longer the case. Most schoolwork these days necessitates a computer and an internet connection, and that includes work to be done at home.

    Read at 07:20 pm, Nov 7th

  • Trump unloads on CNN journalist Jim Acosta: 'You are a rude, terrible person'

    President Donald Trump's ongoing feud with Jim Acosta, CNN's chief White House correspondent, boiled over on Wednesday, with Trump calling Acosta "a rude, terrible person" as he tried to ask the president a question.

    Read at 03:08 pm, Nov 7th

  • Donald Trump Jr. Expecting to Be Indicted by Mueller Soon

    Last year, Donald Trump Jr. testified that he never informed his father of a meeting with Russian officials promising “dirt” on Hillary Clinton.

    Read at 03:08 pm, Nov 7th

  • Let’s pair program a Reddit place clone using Firebase

    ? (Patrons only) Official Fun Fun Forum topic for this episode:https://www.funfunforum.com/t/let-s-p...? Support the show by becoming a Patreonhttps://www.youtube.com/watch?v=trP9q...? vscode live sharehttps://code.visualstudio.com/blogs/2...? mpj on Twitterhttps://twitter.com/mpjme?

    Read at 02:31 pm, Nov 7th

  • The Real Lesson of My Debate With Steve Bannon

    Tickets sold out within 15 minutes after Toronto’s Munk Debates announced that I would debate Steve Bannon on its platform. The negative reaction arrived more slowly, but it was just as emphatic.

    Read at 08:41 pm, Nov 6th

  • The Fetishization of Mr. Rogers’s ‘Look for the Helpers’

    Turning the reassuring line for children into a meme for adults should make everyone uncomfortable. After the senseless calamity of a mass shooting, people seek comforts—even small ones—in the face of horror.

    Read at 08:29 pm, Nov 6th

  • There’s Nothing Virtuous About Finding Common Ground

    The first time I found myself facing a political dilemma was in the year 1976; I was 5 years old. My parents were what we used to call “movement people,” veterans of the civil rights movement who leaned toward black nationalism and pan-Africanism.

    Read at 08:23 pm, Nov 6th

  • One Of The Top Candidates For Democratic Leadership Has A Plan To Work With Trump

    “I think we have a lot to prove to the American public,” moderate Democratic Rep. Cheri Bustos says.

    Read at 08:12 pm, Nov 6th

  • Daylight Saving Time Is America's Greatest Shame

    Daylight Saving Time is the greatest continuing fraud ever perpetrated on the American people. And this weekend, the effect of this cruel monster will rear its ugly head again.

    Read at 08:08 pm, Nov 6th

  • How and why we built the Marvel Styleguide

    After I joined Marvel in August last year, the first project I worked on was our new styleguide. At that time, Marvel was doing a lot of things well. The brand was fun, the UI was simple, colors were bright and animations were snappy. There was a lot to love.

    Read at 11:40 am, Nov 6th

  • Introducing Solid

    After eight months of hard work, we’re so excited to announce that we’ve recently launched Solid, BuzzFeed’s CSS and component library.

    Read at 09:33 am, Nov 6th

  • 1 in 4 Statisticians Say They Were Asked to Commit Scientific Fraud

    As the saying goes, "There are three kinds of lies: lies, damned lies, and statistics." We know that's true because statisticians themselves just said so. A stunning report published in the Annals of Internal Medicine concludes that researchers often make "inappropriate requests" to statisticians.

    Read at 09:29 am, Nov 6th

  • Two weeks into journey across Mexico, migrants face illness, exhaustion and danger

    As their fellow travelers rested along the side of the road, Walter Hernández and his four-year-old son David tossed a bouncy yellow ball back and forth amid the black soot of burned-off brush. The acrid smell of smoke still lingered as they played. But all was not well, confided Hernández.

    Read at 09:28 am, Nov 6th

  • Hack Education Weekly News

    Each week, I gather a wide variety of links to education and education technology articles. All this feeds the review I write each December on the stories we are told about the future of education. I’m starting on that project soon, and my god, this all looks so grim.

    Read at 09:21 am, Nov 6th

  • Rendering Performance

    Users of today’s web expect that the pages they visit will be interactive and smooth and that’s where you need to increasingly focus your time and effort.

    Read at 09:12 am, Nov 6th

  • Thinking About React, Atomically ⚛

    If you’re not familiar with Brad Frost’s Atomic Design principles, stop right now and go read about it on his blog or buy his book.

    Read at 09:59 pm, Nov 5th

  • React Suspense with the Fetch API

    Let’s reveal the magic behind the curtain that is React Suspense. For educational purposes, I’ll cover how I created this package. If you’re just here for solutions, I don’t blame you.

    Read at 09:50 pm, Nov 5th

  • Whopping 62 percent of jobs don't support middle-class life after accounting for cost of living

    How many Americans collectively hold almost 1.5 trillion dollars worth of student debt? Buzz60's Mercer Morrison has the story. Buzz60 Esther Akutekha, who lives in Brooklyn, New York, has a good job as a public relations specialist that pays more than $50,000 a year.

    Read at 09:43 pm, Nov 5th

  • Dozens of Jeff Bezoses Protest Amazon's Continued Relationship With ICE

    Outside Amazon’s Seattle headquarters today, protesters arrived wearing quite possibly the most terrifying Halloween costume imaginable: Jeff Bezos’s face.

    Read at 09:38 pm, Nov 5th

  • GitHub Rolls Out More Small Improvements as Part of Project Paper Cuts

    In August, GitHub announced Project Paper Cuts, an effort aimed at bringing small improvements to the developer and project maintainer experiences. These are fixes for issues that don’t generally fall within larger initiatives.

    Read at 09:26 pm, Nov 5th

  • A personal review of automated testing tools in the JavaScript world

    In this post, I will talk about my experiences with test automation using tools that support JavaScript. In the first part of the post, I will talk about tools for test automation of the graphical user interface or GUI.

    Read at 09:15 pm, Nov 5th

  • Rebel, Rebel: For White Women Who Block Black People on Twitter Because Apologizing Is Too Damn Much

    Before this weekend, I never really paid very much attention to Rebel Wilson. Last week, she popped up on my radar again when I saw a tweet that quoted her proclaiming herself to be the first plus-sized woman to play the lead in a romantic comedy.

    Read at 08:03 pm, Nov 5th

  • Copying objects in Javascript

    In this article we will look at the various ways an object can be copied in Javascript. We will take a look at both shallow and deep copying. Before we begin, it is worth mentioning a few basics: objects in Javascript are simply references to a location in memory. These references are mutable, i.e.

    Read at 08:02 pm, Nov 5th

  • Google Faces Internal Backlash Over Handling of Sexual Harassment

    SAN FRANCISCO — Google is struggling to contain a growing internal backlash over its handling of sexual harassment and its workplace culture.

    Read at 08:00 pm, Nov 5th

  • How Vilification of George Soros Moved From the Fringes to the Mainstream

    VideoGeorge Soros, a billionaire Democratic fund-raiser, has long been villainized in certain right-wing circles. Now conspiracy theories about him have gone mainstream, to nearly every corner of the Republican Party.

    Read at 07:44 pm, Nov 5th

  • How a lie about George Soros and the migrant caravan multiplied online

    This is the life of a lie. Three weeks ago, a caravan of Hondurans began walking nearly 2,000 miles to the United States. Their ranks grew as they inched north and, along with them, falsehoods grew, too.

    Read at 09:27 am, Nov 5th

  • How to Punish Voters

    The prosecution of individual voters for fraud is a trend that seems intended to intimidate. Ms. Duffy Rice is a lawyer and a criminal justice reporter.

    Read at 09:21 am, Nov 5th

  • No One Wants to Campaign With Bill Clinton Anymore

    LITTLE ROCK, Ark. — When a Republican state legislator in Arkansas pushed last year to rename the Bill and Hillary Clinton National Airport in Little Rock, Clarke Tucker stood up for the former president. “The argument was that the people of Arkansas don’t support the Clintons,” said Mr.

    Read at 09:16 am, Nov 5th

  • When and why to clean up your code: now, later, never

    You’ve got to meet your deadlines, you’ve got to fix the bug, you’ve got to ship the product. But you’ve also got to think about the future: every bug you introduce now will have to be fixed later, using up even more time.

    Read at 09:08 am, Nov 5th

  • Trump attacks Paul Ryan, says he 'knows nothing' about birthright citizenship

    President Donald Trump went after House Speaker Paul Ryan on Wednesday, saying one of the top Republican leaders in the President's party "knows nothing about" birthright citizenship and "should be focusing on holding the Majority" in the House of Representatives "rather than giving his opinions"

    Read at 07:32 am, Nov 5th

  • Making Sense of React Hooks

    I strongly recommend to watch this opening keynote to see the problems we’re trying to solve with the Hooks proposal. However, even an hour is a big time investment, so I decided to share a few thoughts on Hooks below.

    Read at 10:42 pm, Nov 4th

  • How to Organize Your CSS with a Modular Architecture (OOCSS, BEM, SMACSS)

    They were by far my favorite toys—had loads of ‘em! See, I’m a designer, son of a designer. Lego blocks were our first creativity sandbox: they allowed us to assemble all sorts of crazy things.

    Read at 10:36 pm, Nov 4th

  • Simplify Styling with Functional CSS

    In this article I’ll explain what functional CSS is, show you how it compares to traditional CSS, and demonstrate how you can simplify styling by using functional CSS! I used to hate writing CSS. I couldn’t make head nor tail of it.

    Read at 09:36 pm, Nov 4th

  • GraphQL - The good and the bad

    GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API as well as gives clients the power to ask for exactly what they need and nothing more.

    Read at 09:30 pm, Nov 4th

  • The cold incubator: the VC dream of workerless wealth

    Chicken incubators are hot: eggs need heat to thrive. This was a different sort of incubator, a glass enclosure within a VC office. The VCs had the best views, but even we could look down ten stories and see the sun sparkling on the Charles River and reflecting off the buildings of downtown Boston. It was summer when I joined the startup, but even so the incubator was freezing. The thermostat was skewed by a hot light sensor right below it, and the controls reset every night, so mornings were frigid. I took to wearing sweaters and fingerless gloves; the team at the other side of the incubator had figured out a way cover the AC vents with cardboard in a way that wasn’t visible to passersby. But I didn’t have to suffer from the cold for very long. Soon after I joined the startup I unwittingly helped trigger our eviction from the rent-free Eden of the incubator to the harsher world outside. The fall from grace Most of the people who worked out of the incubator just used a laptop, or perhaps a monitor. But I like working with a standing desk, with a large Kinesis keyboard, and an external monitor on top. My desk towered over everyone else: it was big and imposing and not very neat. Which is to say, the incubator started looking like a real office, not a room full of identical tables with a few Macbook Airs scattered hither and yon. And standing under the freezing air conditioner vent made my arms hurt, so I had to setup my desk in a way that was visible from the outside of the incubator. And that view was too much for one of the partners in the VC firm. There were too many of us, we had too many cardboard boxes, my standing desk was just too big: it was time for us to leave the incubator. The dream of workerless wealth VCs take money, and (if all goes well) turn it into more money. But the actual reality of the work involved was too unpleasantly messy, too uncouth to be exposed to the sensibilities of wealthy clients. We had to be banished out of sight, the ever-so-slightly grubby realities of office work hidden away, leaving only the clean cold dream of capital compounding through the genius of canny investors. This dream—a dream of profit without workers—is the driving force behind many an investment fad: The dream in its purest form, Bitcoin and cryptocurrencies promise wealth pulled from thin air, spinning hay into gold without the involvement of any brutish Rumpelstiltskins. Driverless cars promise fleets of assets without those dirty, messy, expensive drivers; but until they come round, Uber and Lyft’s horde of drivers are safely kept at a distance as independent contractors with five star reviews. Artificial intelligence promises decision making without human involvement, an objective encoding of subjective prejudice that will never feel moral qualms. And if you work for a VC-funded startup, this dream takes on a nightmarish tinge when it turns to consider you. Unbanished—for now The point here is not that VCs want to reduce effort: who wouldn’t want a more efficient world? The dream is not driven by visions of efficiency, it’s about status and aesthetics: doing actual work is ugly, and paying for work is offensive. Of course, some level of work is always necessary and unavoidable. And so VC firms understand that the startups they fund must hire workers like me and you. But the cold dream is always there, whispering in the background: these workers take equity, they take cash, they’re grubby. So when times are good hiring has to be done as quickly as possible, but when times are bad the layoffs come just as fast. And when you are working, you need to work as many hours as humanly possible, not because it’s efficient—it isn't—but because paying for your time is offensive, and so you better damn well work hard. Your work may be necessary, but to the cold dream it’s a necessary—and ugly—evil. Every painful failure taught me a lesson—but only after it was too late.Source: The cold incubator: the VC dream of workerless wealth

    Read at 01:26 pm, Nov 10th

  • Pete Corey - Bending Jest to Our Will: Caching Modules Across Tests

    My test suite has grown to be unreliable. At first, a single red test raised its head. Not believing my eyes, I re-ran the suite, and as expected, everything came back green. As time went on and as more tests were offered up to the suite, random failures became more of a recurring problem. Eventually, the problem became so severe that the suite consistently failed, rather than consistently passed. Something had to be done. After nearly twenty four hours of banging my head against the wall and following various loose ends until they inevitably unraveled, I finally stumbled upon the cause of my problems. Making Too Many Database Connections Jest, the testing platform used by the project in question, insists on running tests in isolation. The idea is that tests run in isolation can also be run in parallel, which is the default behavior of Jest’s test runner. Due to decisions made far in the immutable past, our team decided to scrap parallel executions of tests and run each test sequentially with the --runInBand command line option. The Jest documentation explains that running tests in band executes all of the tests sequentially within the same process, rather than spinning up a new process for every test: Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. However, when I ran the test suite I noticed that every test file was trigging a log statement that indicated that it just established a new database connection. Connected to mongodb://localhost:27017/test This explains a lot. If each test is spinning up its own database connection, it’s conceivable that our database simply can’t handle the amount of connections we’re forcing on it. In that case, it would inevitably time out and fail on seemingly random tests. But if all of our tests are sharing a single process, why aren’t they sharing a single database connection? Jest Ignores the Require Cache In turns out that this project instantiates its database connection in a dependent, shared sub-module. The code that handles the instantiation looks something like this: let connection = mongoose.createConnection(MONGO_URL, ...); connection.on('open', () => console.log(`Connected to ${MONGO_URL}`)); module.exports.connection = connection; Normally, due to how Node.js’ require and require.cache work, the first time this shared module is required anywhere in our project, this code would be executed and our database connection would be established. Any subsequent requires of our module would return the previously cached value of module.exports. The module’s code would not re-run, and additional database connections would not be opened. Unfortunately, Jest doesn’t honor require.cache. This means that every test file blows away any previously cached modules, and any require calls that test file makes will re-evaluate the required module’s source. In our case, this re-evaulation creates a new database connection, which is the root of our problem. Mocking a Module with the Real Thing The Github issue I linked above hints at a solution to our problem. If you’d like to set a module, you can add it to setupFiles in a way that does jest.mock('module-name', () => { return moduleContents }). Christoph is suggesting that we add a file to our setupFiles Jest configuration, which we’ll call test/setup.js, and mock our shared module in that setup file: const mockSharedModule = require('shared-module'); jest.mock('shared-module', () => mockSharedModule); Unfortunately, this doesn’t solve our problem. The test/setup.js script runs before each test (emphasis is my own): The path to a module that runs some code to configure or set up the testing framework before each test. We need to find a way to require our shared module once, before all tests run. Thankfully, we can do this by creating a custom Jest environment, and instructing Jest to use our new environment with the testEnvironment configuration option. We can require our shared module within our new environment, and mock any subsequent imports of our module to return a reference to the instance we just instantiated. Unfortunately, we can’t set up that mock within our environment. We need to do that within our test setup file. This means we need some way of passing the contents of our shared module from our custom environment into our test/setup.js. Strangely, the only way I’ve found to accomplish this is through the use of globals: const NodeEnvironment = require('jest-environment-node'); const sharedModule = require('shared-module'); class CustomEnvironment extends NodeEnvironment { constructor(config) { super(config); } async setup() { await super.setup(); this.global.__SHARED_MODULE__ = sharedModule; } async teardown() { await super.teardown(); } runScript(script) { return super.runScript(script); } } module.exports = CustomEnvironment; Most of this custom environment class is boilerplate required by Jest. The interesting pieces are where we require our shared module, and most importantly, when we assign its contents to the __SHARED_MODULE__ global variable: this.global.__SHARED_MODULE__ = sharedModule; Note that __SHARED_MODULE__ isn arbitrary name I chose to avoid collisions with other variables defined in the global namespace. There’s no magic going on in the naming. Now, we can go back to test/setup.js and create a mock of our shared module that returns the contents of the global __SHARED_MODULE__: jest.mock('shared-module', () => global.__SHARED_MODULE__); And that’s all there is to it. Our custom environment requires and evaluates our shared module once, instantiating a single database connection. The reference to the shared module’s contents is passed into our test setup script through a global variable. Our setup script mocks any future requires of our shared module to return the provided reference, rather than re-evaluating the module, creating a new database connection, and returning the new reference. Whew. In Hindsight After much blood, swear, and tears, our test suite is once again consistently passing. Rejoice! While this solution works, it highlights a fundamental problem. We’re not using Jest correctly. We came into this project with a preconceived notion of how testing and, by extension, our test framework should work. When the we learned more about our tools and realized that they didn’t work how we expected, we didn’t retrace our steps and reassess our strategy. Instead, we applied quite a bit of time and pressure to force our tools to behave as we expected. While having the knowhow and ability to do this is great, actually doing it in your project isn’t recommended. Instead, see if you can use Jest in “The Jest Way”. If you cannot, maybe you shouldn’t be using Jest. In hindsight, I should go have a talk with my team… Source: Pete Corey – Bending Jest to Our Will: Caching Modules Across Tests

    Read at 01:20 pm, Nov 10th

  • Static Properties in JavaScript Classes with Inheritance | www.thecodebarbarian.com

    One of the major challenges when working with AWS Lambda is bundling all your node_modules into one zip file. Most simple examples rely on zipping up the entirety of ./node_modules, but that doesn't scale well if you're looking to built a suite of Lambda functions as opposed to a single "Hello, World" example. In this article, I'll demonstrate the problem with zipping up Lambda functions yourself and show you how to use Webpack to bundle a Lambda function that connects to MongoDB. Source: Static Properties in JavaScript Classes with Inheritance | www.thecodebarbarian.com

    Read at 01:14 pm, Nov 10th

  • Announcing Test262 Report - javascript, testing, web standards - Bocoup

    Nov 07 Today we’re launching Test262 Report to provide JavaScript developers with up-to-date information on the state of new and existing language features across implementations. Test262 Report is based on daily runs of Test262, the ECMA-262 (“ECMAScript” or “JavaScript”) test suite, in nightly builds of JavaScript engines, and visualizes at-a-glance status of feature implementation progress.Taking a look at our data, the good news for JavaScript developers is that the state of JavaScript is strong, with many of the language’s built-in Objects and syntax at 100% interoperability. JavaScript has many independent and complete implementations, numerous additional partial implementations, even more embeddings, and a broad-based design consensus process. This sets JavaScript apart as a programming language, and makes reporting like this key to legibility of new feature status.Test262 is the JavaScript Ground TruthTest262 is the official JavaScript language conformance test suite, containing comprehensive test material for each feature in the JavaScript language. New language features require these tests in order to be added to the ECMAScript® Language Specification, and implementers rely on these shared tests in order to implement new features correctly and confirm completeness prior to release. This makes Test262 results the ground truth for the state of a JavaScript feature.In 2012 we started working directly on ECMA-262 and began accumulating internal ad-hoc knowledge of the state of JavaScript features. When we started working on Test262 in 2015, we found ourselves comprehensively using new language features prior to their implementation and release. Until today, we have not had a way to share this knowledge. Test262 Report is designed to capture the latent knowledge in our platform testing practice for our peers in the JavaScript development community.How We Build Test262 ReportWe are building test262.report daily from a run of all Test262 material (34,657 conformance test files at the time of this writing) in each of the 4 major engines, in default and strict modes, as well as in module code when ES Modules are present. We’ve built our testing bots using open source tools that we contribute to or maintain. We use Test262-harness as our runner and eshost to normalize host runtime environment disparities. We use jsvu to install the latest engine binaries.Who is Test262 Report For?We talked to a lot of JavaScript developers in the design stages of Test262 Report. JavaScript developer feedback led us to focus primarily on the interoperability tables you see on test262.report today. However, we also believe there are strong use cases for automation tools, implementers, specification authors and documentation maintainers.We are working to make it possible for automation tools like Babel and TypeScript, can consume Test262 Report data to generate an environment baseline for code compilation based on realtime implementation status. We have gotten positive feedback from engine implementers and release managers about using other engine implementation statuses to prioritize their work and reality check the usability of a feature. Specification authors at TC39 (the Technical Committee that writes EcmaScript) are already using Test262 Report to quickly check the state of a feature prior to advancing it to Stage 4 (“Finished“) and including it in the specification. Lastly, we invite the broader community of folks thinking about the development of JavaScript to use these reports in blog posts and documentation about new and existing language features.Roadmap for Test262 ReportMoving forward, we will continue to invest in infrastructure and CI maintenance for daily runs and reports. We would also like to add feature tags, search and more developer-friendly labels to the UI. Our priorities for the infrastructure are first to add results for additional JavaScript parsers and implementations like Babel, TypeScript, Flow, Preact, Moddable XS, JerryScript, and njs. We are also looking to add results for engine embeddings like Node.js, Firefox, Chromium, WebKit and Edge. Finally, in the medium term we would like to develop a data API and integrate with environment presets for compilers like Babel and TypeScript and compatibility tables like those on MDN.In addition to Test262 Report, we would like to report on more areas of the Web Platform for developers. Our criteria are test completeness and veracity. We are already contributing to WPT (Web Platform Tests), and working with the Google Chrome ecosystem infrastructure team on the results collection behind wpt.fyi, so WPT is an obvious next candidate.ConclusionWe are excited to launch, maintain and continue to improve Test262 report. We welcome your feedback, feature requests and bug reports on the public issue tracker for Test262 Report at github.com/bocoup/test262-report-issue-tracker. We will continue to improve the veracity and completeness of these reports, and are eager to collaborate with the community, our partners, and funders to make the Web Platform more predictable for developers.Source: Announcing Test262 Report – javascript, testing, web standards – Bocoup

    Read at 11:20 am, Nov 10th

  • Medical Marijuana and Gun Laws Collide | Fortune

    If you have a medical marijuana card, the 9th U.S. Circuit Court of Appeals says that you can’t buy a gun. The court ruled 3-0 on Wednesday that a ban preventing medical marijuana card holders from purchasing firearms is not in violation of the Second Amendment, the Associated Press reports. There are nine western states under the appeals court’s jurisdiction, including Nevada, where the case originated. A lawsuit was filed in 2011 by Nevada resident S. Rowan Wilson after she tried to purchase a gun for self-defense and was denied based on a federal ban on the sale of guns to users of illegal drugs. Though marijuana has been legalized in some places on a state-by-state basis, it remains illegal under federal law. The court maintained that drug use “raises the risk of irrational or unpredictable behavior with which gun use should not be associated.” Wilson claimed that she doesn’t actually use marijuana, she simply obtained a card to show her support for its legalization. The appeals court agreed with guidelines from the federal Bureau of Alcohol, Tobacco, Firearms and Explosives that firearms sellers should assume that medical marijuana card holders use the drug. Chaz Rainey, the attorney representing Wilson, said that he plans to appeal the decision. “We live in a world where having a medical marijuana card is enough to say you don’t get a gun, but if you’re on the no fly list your constitutional right is still protected,” he told the AP. He argued that there should be more consistency in how the Second Amendment is applied. Alex Kreit, marijuana law expert at the San Diego’s Thomas Jefferson School of Law, expects that this ruling won’t be the last we see of the issue. He told the AP that the ruling may be challenged by people who use medical marijuana who will argue “that they shouldn’t be lumped with other drug users in terms of concerns about violence.” Source: Medical Marijuana and Gun Laws Collide | Fortune

    Read at 10:41 am, Nov 10th

  • New! JavaScript i18n support in WordPress 5.0 – Make WordPress Core

    .page-header .entry-header For years, internationalization (i18n) has been a thing that has been pretty well supported in WordPress when it comes to PHP development. For PHP, WordPress already provides all the tools necessary to make it as easy as possible to localize WordPress core, themes and plugins to any language. Today we are bringing the same capabilities to JavaScript development for WordPress. How does it work? When registering your scripts you can add wp-i18n as a dependency to allow you to add translatable strings as you would in PHP: wp_register_script( 'my-handle', plugins_url( '/js/my-file.js', MY_PLUGIN ), array( 'wp-i18n' ) ); Inside your scripts you will then be able to use wp-18n as follows: const { __, _x, _n, _nx } = wp.i18n; __( '__', 'my-domain' ); _x( '_x', '_x_context', 'my-domain' ); _n( '_n_single', '_n_plural', number, 'my-domain' ); _nx( '_nx_single', '_nx_plural', number, '_nx_context', 'my-domain' ); These functions mirror their PHP counterparts and can be used in exactly the same manner. The final step is to tell WordPress your script contains translations and of which domain, this is to allow WordPress to selectively load only the necessary translations to ensure everything is as fast as can be: wp_set_script_translations( 'my-handle', 'my-domain' ); Advanced usage Right now it’s already possible to ship your own translations using the load_textdomain function and passing your own MO file. This is also possible using wp_set_script_translations which accepts an optional third path argument that allows you to tell WordPress to first look elsewhere for translations: wp_set_script_translations( 'my-handle', 'my-domain', plugins_url( '/languages', MY_PLUGIN ) ); If passed WordPress will first check if a file in the format of ${domain}-${locale}-${handle}.json exists in the given path and use it as the source of translations if so. Alternatively it will also first check the given path for the md5 filename before defaulting to the WordPress languages directory. If you want to ship your own translation files these should be in the JED 1.x ( .json ) format. GlotPress is able to create these along with other tools such as po2json. Ideally these files should only contain translations that occur within their respective JS files. Behind the screens When you upload your plugin or theme to wordpress.org all JS files will automatically be parsed the same as is already being done for PHP files. Any detected translations will be added to translate.wordpress.org to allow the community to cooperate to ensure WordPress, plugins and themes are available in as many languages as possible. In order to parse all JS files the i18n-command for wp-cli is used. This replaces makepot.php to not only allow picking up translations in JS files but also to audit strings, parse strings only of a specific text domain and even pick up a few strings that weren’t detected by makepot.php. This command is freely available and open-source as makepot.php was and it’s recommended that anyone using makepot.php transition over to this much improved replacement. Based on these parsed translations Language Packs are generated. Traditionally these used to only contain PO and MO files, one pair for each locale. In order to selectively load only the necessary translations regardless of whether it’s used or not a few more files are being added, one JSON file for every JS file that contains translations per locale. When parsing JS files for translations we don’t know which handle is used to register that file so we’ve had to use an alternate mechanism to find the translations belonging to each file. To do this we’re using the md5 of the relative path of each file. This is appended to the usual name of ${domain}-${locale} in the form of ${domain}-${locale}-${md5}.json. When you set script translations for a handle WordPress will automatically figure out the relative md5 hash of your source file, check to see if a translations file exists and if so ensure that it’s loaded into wp.i18n before your script runs. Plugin and theme support Translation and Language packs support for plugins and themes that are hosted on the repo is expected in the upcoming weeks. The patches are ready and waiting for commit. Plugin and theme authors are encouraged to start using wp-i18n in their JavaScript projects. Credits This API wouldn’t have been possible without the long standing efforts of @ocean90, @swissspidy, @nerrad, @atimmer, @schlessera and more recently @herregroen. Thanks a ton for the incredible work you’ve all put into making this a reality! Another thanks to @herregroen for providing the necessary input for this devnote. #i18n .entry-content .entry-meta #post-## #comments Post navigation #nav-below Source: New! JavaScript i18n support in WordPress 5.0 – Make WordPress Core

    Read at 10:38 am, Nov 10th

  • The Majestic Monolith – Signal v. Noise

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: The Majestic Monolith – Signal v. Noise

    Read at 09:54 am, Nov 10th

  • Classic Editor Plugin May Be Included with 5.0 Updates, Support Window Set to End in 2021 – WordPress Tavern

    Gary Pendergast announced this morning that the Classic Editor plugin will be officially supported until December 31, 2021. The plugin eases the transition for sites where plugins or themes are not yet compatible with Gutenberg and gives users the opportunity to preserve their existing workflows. “Since the Classic Editor plugin is central in this transition, we are considering including it with upgrades to WordPress 5.0,” Pendergast said. “New WordPress installs would still add it manually, and we’ve included it in the Featured Plugins list to increase visibility. If you have thoughts on this idea, please leave a comment.” Pendergast clarified that “officially supported” means that the plugin “will be guaranteed to work as expected in the most recent major release of WordPress, and the major release before it.” He also said the project will evaluate the continuing maintenance of the plugin in 2021 and may possibly extend the date. The post has already received quite a bit of feedback and generally positive reactions to the prospect of including the Classic Editor along with 5.0 updates for existing sites. WordPress Core Committer Pascal Birchler asked for a clarification on what “we” referred to in Pendergast’s post, and Pendergast clarified that he is speaking on behalf of the WordPress project. Other commenters pressed for more information, as the announcement was delivered as something that had already been decided and the conversation surrounding the decision was not public. “I’m grateful for the communication on a hard date for support of the classic editor,” Darren Ethier commented on the post. “It helps many people depending on WordPress for their livelihood to make plans surrounding things depending on it. But for volunteers who ‘show up’ at meetings and in contributing, the process for arriving at these kinds of decisions in an open source project is very opaque and seems to be increasingly so.” This announcement highlights a trend in recent decision making for the project where decisions on important items appear to have been made behind closed doors without community input. Matthew MacPherson’s proposal for an independent accessibility audit, which had broad support from the community, was shut down in a similar way. MacPherson was named WordPress 5.0’s accessibility lead but didn’t seem to be fully vested with the power to lead that aspect of the release in the community’s best interests. I asked MacPherson if he could further clarify how the decision to forego the audit was reached, as it seemed even a surprise to him in the GitHub issue thread. He said he had “no comment” on how the decision came about. WPCampus is now pursuing an accessibility audit in order to better serve its community of more than 800 web professionals, educators, and others who work with WordPress in higher education. “We’re receiving a lot of interest and I’m holding meetings with potential vendors to answer their questions,” WPCampus director Rachel Cherry said. “We’ve received a lot of messages from individuals and organizations wanting to contribute financially.” The recent report from the accessibility team demonstrates critical issues that prevent the team from recommending Gutenberg to users of assistive technology. These issues also have a major impact on those using WordPress for higher education, as the law requires them to meet certain standards. Several in this particular industry commented on Pendergast’s post to advocate for shipping the Classic Editor plugin with new installs as well. “Many organizations who use WordPress are required by law to provide accessible software under Section 508,” Rachel Cherry said. “Until such a time when the accessibility of Gutenberg has been improved, and Section 508 compliance is clear, these organizations will require use of the Classic Editor. “Not to mention the users who will be dependent upon the Classic Editor to have an accessible publishing experience. “Please consider bundling Classic Editor with all versions of core, new and updated, going forward so that every end user has the easy and inclusive option of using it from day one.” Elaine Shannon, another WordPress user who works in academia, also commented on the Pendergast’s post to recommend having the Classic Editor bundled with new versions of WordPress, due to many education sites running on multisite installations. “Some institutions are on managed hosts, where they’ll receive 5.0 without initiating the update themselves,” Shannon said. “Others are managed by on-campus IT services, where one campus admin will push the update and affect thousands of users. In many cases, these are MultiSites where end users – the ones who need the choice of whether to use Gutenberg or Classic Editor – do not have the ability to add a plugin. So regardless of whether these users are in a brand-new shiny install or just an updated existing one, many users are going to need to fall back to the Classic Editor, and if it’s not bundled with Core there will be some folks left having to contact their administrator.” Pendergast’s post said the WordPress project is considering including the plugin with upgrades to 5.0 but did not identify where or when that decision will be made. However, users who depend on the plugin now have a clear idea of how long it will be supported. “As for the EOL on Classic Editor support, that’s probably more clarity than [the core team] has ever really given on a feature-to-plugin transition and I’m in favor of having that hard date,” WordPress core developer Drew Jaynes said. “It sets the right tone that the plugin is not intended as a long-term solution, rather a stopgap with a definitive EOL.” Like this:Like Loading... Related Source: Classic Editor Plugin May Be Included with 5.0 Updates, Support Window Set to End in 2021 – WordPress Tavern

    Read at 08:14 am, Nov 9th

  • Beto O’Rourke Drops F-Bomb on Live TV During Concession Speech – Variety

    Beto O’Rourke was too proud to hold back an f-bomb late Tuesday, even on national television. Following a narrow defeat in the Senate race to Republican Ted Cruz in Texas, O’Rourke, the celebrity-backed Democrat and former punk rocker, told his hometown supporters of El Paso he was “so f—ing proud” of them. “Tonight’s loss does nothing to diminish the way I feel about Texas or this country. I’m so f—ing proud of you guys,” O’Rourke said of the people who worked on his campaign, shortly after the race was called for the incumbent. During his emotional concession speech, O’Rourke said: “It is the greatness to which we aspire and the work we are willing to put into it to achieve it by which we will be known going forward. This campaign holds a very special place in the history of this country. Every day going forward. You have made that possible.” MSNBC, which didn’t censor O’Rourke’s comment, later apologized. “Sorry for the F-bomb,” anchor Brian Williams said. “We have no control of what’s in the concession speeches.” O’Rourke, whose campaign raised a record-setting $60 million, was a long-shot to defeat Cruz, a Republican, in the historically red state of Texas, despite finding widespread support nationwide in one of the most closely-watched races of the election. RELATED: Source: Beto O’Rourke Drops F-Bomb on Live TV During Concession Speech – Variety

    Read at 08:06 am, Nov 9th

  • NodeJS as an… Operating System? – Kieran Maher – Medium

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: NodeJS as an… Operating System? – Kieran Maher – Medium

    Read at 08:03 am, Nov 9th

  • Why you should avoid ORMs (with examples in Node.js)

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Why you should avoid ORMs (with examples in Node.js)

    Read at 08:01 am, Nov 9th

  • Introducing the GraphQL Foundation – Lee Byron – Medium

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Introducing the GraphQL Foundation – Lee Byron – Medium

    Read at 07:47 am, Nov 9th

  • Indieweb comic

    How to get on the #indieweb! (not very detailed but hopefully gets people interested!) Author: Yulia posted on 2018-11-05 10:16:29 +0000. This entry has been tagged with the keywords: Source:

    Read at 09:44 pm, Nov 8th

  • Redux middleware compatible React Hooks library for easy global state management

    Why have I been blocked? This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data. Source: Redux middleware compatible React Hooks library for easy global state management

    Read at 07:50 pm, Nov 8th