io

Yes, the dam is breaking. The exploding reaction to the polyam 'House Hunters' episode




io

Friday Polynews Roundup — Triad storyline on "The Connors," Black Poly Nation gets TV rep, loving polyfamily profiles, community dreams, and evangelical worry that this all hits too close to home



  • Friday Polynews Roundup
  • poly and christian
  • polyamory on TV
  • tabloids

io

Friday Polynews Roundup — Safer sex in the pandemic. Move a metamour in for the duration? Skills for bottled-together partners, and more.




io

Friday Polynews Roundup — When this isolation ends, good long-distance sex, how to open a relationship, and more.




io

Friday Polynews Roundup — "Social power and quarantine in polyamorous relationships," Roswell TV series, more.






io

How io_uring and eBPF Will Revolutionize Programming in Linux

#263 — April 22, 2020

Read on the Web

StatusCode Weekly
Covering the week's news in software development, ops, platforms, and tooling.

The Devastating Decline of a Brilliant Young Coder — This is not a technical article but is an important one nonetheless. Lee Holloway essentially programmed Cloudflare into being. But then he became distant and unpredictable, and what happened to him is something that could affect any of us ????

Sandra Upson (WIRED)

How io_uring and eBPF Will Revolutionize Programming in Linux — Even more exciting times are coming for development on Linux thanks to these technologies. A good overview.

Glauber Costa

Slow CI Build? Get a 41:1 ROI by Switching to Semaphore — For every $1 invested in Semaphore, engineers gain $41 in reclaimed productivity. Who said money can’t buy you time?

Semaphore 2.0 sponsor

▶  Mob Programming and the Power of Flow — I enjoyed this insightful walk through the idea of bringing people together and attempting to develop things in an efficient way with numerous people around the same machine (a.k.a. ‘mob’ programming). It’s not for everyone, but it’s neat to see how it can work.

Woody Zuill

Cloudflare Workers Now Supports.. COBOL — COBOL is one of the earliest things you could really call a programming language (it first appeared in 1959!) and is often a source of amusement because it’s seen as old, verbose, clunky, and difficult to maintain. Nonetheless, it’s still in use (particularly in legacy systems) and you can use with Cloudflare Workers too!

John Graham-Cumming

Quick bytes:

???? Jobs

DevOps Engineer at X-Team (Remote) — Join the most energizing community for developers. Work from anywhere with the world's leading brands.

X-Team

Find a Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started.

Vettery

???? Stories and Opinions

How 'Memories', a 256 Byte Demo, Was Coded — You can watch the demo here or enjoy learning just how these unusual developers cram so much into so little space.

HellMood/DESiRE

The Computer Scientist Who Can’t Stop Telling Stories — For pioneering computer scientist Donald Knuth, good coding is synonymous with beautiful expression.

Quanta Magazine

▶  Discussing NGINX and Service Meshes with Alan Murphy — I enjoyed this SE Daily episode last week and learnt a fair bit.

Software Engineering Daily podcast

End-to-End Observability for Microservice Environments — Optimize service costs and reduce MTTR with full data correlation, payload visibility and automated tracing. Try free.

Epsagon sponsor

▶  Performance Profiling for Web Applications — An overview of how to use Chrome DevTools to understand a Web application’s performance bottlenecks.

Sam Saccone

Are Object Stores Starting to Look Like Databases? — A bit, yes.

Alex Woodie (Datanami)

The Case Against CS Master’s Degrees

Oz Onay

Why I Stopped Using Microservices

Robin Wieruch

???? Tutorials

Ask HN: I'm A Software Engineer Going Blind, How Should I Prepare? — This is something I hope none of you have to go through, but we’ve linked to other stories about being a blind coder in the past, and some form of sight loss will affect many of us over the years.

Hacker News

Writing an 'Emulator' in JavaScript (and Interfacing with Multiple UIs) — Tania built a Chip-8 interpreter in JavaScript and has gone into quite a bit of detail about what was involved here. Lots of neat bits and pieces to pick up from this.

Tania Rascia

What It Took to Build a Serverless App That Texts Positive COVID-19 News — Code, a screencast tour, and an article looking at what it took to build a simple serverless app using C#, Azure Functions, and Twilio to text news alerts (but only ones with positive sentiments!)

Gwyneth Pena S.

If You Use grep On Text Files, Use the -a (--text) Option — I could explain why but then you wouldn’t need to read this. Makes a good point.

Chris Siebenmann

Event-Reduce: An Algorithm to Optimize Frequently Running Queries? — In brief, the idea is that rather than having to re-run queries when data changes on a table, you can basically merge in changes to previous query results. Be sure to check the FAQs.

Daniel Meyer

Embedding Binary Objects in C

Ted Unangst

???? Code and Tools

Desed: A Debugger for sed — Demystify and debug your sed (the text processor that comes with nearly every Unix) scripts, from the comfort of your terminal. Step through line by line, place breakpoints, etc.

SoptikHa2

Falcon: An Open-Source, Cross Platform SQL Client — Built around Electron and React, this basic client can quickly do chart visualizations of query results and can connect to RedShift, MySQL, PostgreSQL, IBM DB2, Impala, MS SQL, Oracle, SQLite and more.

Plotly

The SaaS CTO Security Checklist

Sqreen sponsor

Termible: Offer Terminal Apps in the Browser Without Installation — This is a commercial service but I find the idea intriguing. You provide a Dockerfile, embed some code on your site, and let people play with your product/service “live”. HTTPie seems to use it for its live examples.

Termible

X410: An X Server for Windows 10 — If you’re using WSL (Windows Subsystem for Linux) to run Linux behind the scenes of a Windows 10 install, X410 takes things to another graphical level.

Choung Networks

60 Linux Networking Commands and Scripts“I decided to create a network tools go-to-list for myself. Then, I thought, why not turn the list into a blog post?”

Hayden James

Brök: A Tool to Find Broken Links in Text Documents — Built in Haskell.

Mark Wales

xsv: A Fast CSV Command Line Toolkit Written in Rust. — Another ‘Swiss Army knife’ for your slightly structured data.

Andrew Gallant




io

U.S. tightens visa rules for Chinese journalists amid coronavirus tensions




io

Gavin Newsom Signs Executive Order to Mail Every Voter a Ballot for November Elections

California Governor Gavin Newsom announced Friday that he had signed an executive order to mail ballots to the state’s 20.6 million registered voters, citing potential health risks due to the ongoing coronavirus pandemic.“There’s a lot of excitement around this November’s election in terms of making sure that you can conduct yourself in a safe way, and make sure your health is protected,” Newsom said Friday. In March, the state allowed ballots to be mailed in for its primary, which saw a record-high of 72 percent of all ballots that were cast by mail.California Secretary of State Alex Padilla, who heads the state’s elections, commended the move “It’s great for public health, it’s great for voting rights, it’s going to be great for participation,” he said. California already allows for generous absentee voting, passing a 2002 decision which gives voters the option to request permanent voting by mail, regardless of the reason.While Newsom’s decision applies only to the November election, it could set a precedent for other Democratic states, with voting by mail quickly becoming a partisan issue. It comes after the state’s lawmakers and local officials requested the measure, saying coronavirus will severely hamper voting efforts, a complaint echoed by prominent Democrats.“Why should we be saying to people, ‘Stand in line for hours,’ when we don’t even want you leaving the house?” House Speaker Nancy Pelosi said in April. But President Trump has repeatedly slammed calls for mail-in voting, saying last month that it lets “people cheat” and involves “a lot of dishonesty.”Newsom said that his order would still allow an “appropriate number” of in-person voting sites, saying that some voters, including those that are disabled, require technological help to cast a ballot.





io

DNA samples lead to arrest in 1987 murder of 17-year-old Ohio girl: 'Great to see justice'

Using DNA to track down 67-year-old James E. Zastawnik, police made an arrest in the 1987 murder of an Ohio girl.





io

WHO: If lockdowns go on for 6 months, there could be 31 million new domestic violence cases globally

Women and children are experiencing unprecedented levels of abuse and violence at home as stress and anxiety continue to mount due to the pandemic.





io

An entire town in New York is being put on a diet to prevent obesity-related coronavirus complications

A New York town has launched a diet and exercise program to help residents lose weight to prevent reported risks of obesity and coronavirus outcomes.





io

A 1996 court declaration written by Tara Reade's ex-husband shows she spoke of harassment in Biden's Senate office

"It was obvious that this event had a very traumatic effect on (Reade), and that she is still sensitive and effected (sic) by it today," Dronen wrote.





io

James Clapper Said He ‘Never Saw Direct Empirical Evidence’ of Trump-Russia Collusion in FBI Interview

Former director of national intelligence James Clapper in 2018 said that he hadn't seen evidence that the Trump presidential campaign colluded with Russia to win the 2016 general election.Clapper was responding to a query from then-representative Tom Rooney, a Florida Republican, during an interview before the House Intelligence Committee. The transcript of the interview was released on Thursday."I never saw any direct empirical evidence that the Trump campaign or someone in it was plotting [or] conspiring with the Russians to meddle with the election," Clapper said."That's not to say that there weren't concerns about the evidence we were seeing, anecdotal evidence…[redacted]," Clapper added. "But I do not recall any instance when I had direct evidence of the content of these meetings. It's just the frequency and prevalence of them was of concern."Rooney then asked Clapper, "At what time is collusion collusion, and at what time is it just people that may have an affiliation with the campaign meeting or talking with… the Russian ambassador or somebody that's of Russian origin, and when should that be taken as something that rises to the level of an Intelligence Community concern?""I really can't answer it other than the sort of visceral reaction to why all these meetings with the Russians," Clapper responded. Clapper admitted that it would be "legitimate" for incoming Trump administration officials to meet with representatives of Russia, "but I think there is a line…between that and violating the principle that in this country we traditionally have one President and one administration at a time."The interview was part of a set of 53 transcripts of interviews held by the House Intelligence Committee as part of the Russia investigation. Current committee chairman Adam Schiff had called for the release of the transcripts in 2018.However, after 43 transcripts had been reviewed and redacted by intelligence agencies as of June 2019, Schiff refused to relase the completed transcripts to the public. Current acting DNI head Richard Grenell informed Schiff on Wednesday that all the transcripts were ready for publication.





io

Latvia to ease coronavirus restrictions for public gatherings from May 12




io

'Never Seen Anything Like This': Experts Question Dropping of Flynn Prosecution

WASHINGTON -- The Justice Department's decision to drop the criminal case against Michael Flynn, President Donald Trump's former national security adviser, even though he had twice pleaded guilty to lying to investigators, was extraordinary and had no obvious precedent, a range of criminal law specialists said Thursday."I've been practicing for more time than I care to admit and I've never seen anything like this," said Julie O'Sullivan, a former federal prosecutor who now teaches criminal law at Georgetown University.The move is the latest in a series that the department, under Attorney General William Barr, has taken to undermine and dismantle the work of the investigators and prosecutors who scrutinized Russia's 2016 election interference operation and its links to people associated with the Trump campaign.The case against Flynn for lying to the FBI about his conversations with the Russian ambassador was brought by the office of the former special counsel, Robert Mueller. It had become a political cause for Trump and his supporters, and the president had signaled that he was considering a pardon once Flynn was sentenced. But Barr instead abruptly short-circuited the case.On Thursday, Timothy Shea, the interim U.S. attorney in the District of Columbia, told the judge overseeing the case, Emmet G. Sullivan, that prosecutors were withdrawing the case. They were doing so, he said, because the department could not prove to a jury that Flynn's admitted lies to the FBI about his conversations with the ambassador were "material" ones.The move essentially erases Flynn's guilty pleas. Because he was never sentenced and the government is unwilling to pursue the matter further, the prosecution is virtually certain to end, although the judge must still decide whether to grant the department's request to dismiss it "with prejudice," meaning it could not be refiled in the future.A range of former prosecutors struggled to point to any previous instance in which the Justice Department had abandoned its own case after obtaining a guilty plea. They portrayed the justification Shea pointed to -- that it would be difficult to prove to a jury beyond a reasonable doubt that the lies were material -- as dubious."A pardon would have been a lot more honest," said Samuel Buell, a former federal prosecutor who now teaches criminal law at Duke University.The law regarding what counts as "material" is extremely forgiving to the government, Buell added. The idea is that law enforcement is permitted to pursue possible theories of criminality and to interview people without having firmly established that there was a crime first.James G. McGovern, a defense lawyer at Hogan Lovells and a former federal prosecutor, said juries rarely bought a defendant's argument that a lie did not involve a material fact."If you are arguing 'materiality,' you usually lose, because there is a tacit admission that what you said was untrue, so you lose the jury," he said.No career prosecutors signed the motion. Shea is a former close aide to Barr. In January, Barr installed him as the top prosecutor in the district that encompasses the nation's capital after maneuvering out the Senate-confirmed former top prosecutor in that office, Jessie K. Liu.Soon after, in an extraordinary move, four prosecutors in the office abruptly quit the case against Trump's longtime friend Roger Stone. They did so after senior Justice Department officials intervened to recommend a more lenient prison term than standard sentencing guidelines called for in the crimes Stone was convicted of committing -- including witness intimidation and perjury -- to conceal Trump campaign interactions with WikiLeaks.It soon emerged that Barr had also appointed an outside prosecutor, Jeff Jensen, the U.S. attorney in St. Louis, to review the Flynn case files. The department then began turning over FBI documents showing internal deliberations about questioning Flynn, like what warnings to give -- even though such files are usually not provided to the defense.Flynn's defense team has mined such files for ammunition to portray the FBI as running amok in its decision to question Flynn in the first place. The questioning focused on his conversations during the transition after the 2016 election with the Russian ambassador about the Obama administration's imposition of sanctions on Russia for its interference in the American election.The FBI had already concluded that there was no evidence that Flynn, a former Trump campaign adviser, had personally conspired with Russia about the election, and it had decided to close out the counterintelligence investigation into him. Then questions arose about whether and why Flynn had lied to administration colleagues like Vice President Mike Pence about his conversations with the ambassador.Because the counterintelligence investigation was still open, the bureau used it as a basis to question Flynn about the conversations and decided not to warn him at its onset that it would be a crime to lie. Notes from Bill Priestap, then the head of the FBI's counterintelligence division, show that he wrote at one point about the planned interview: "What's our goal? Truth/admission or to get him to lie, so we can prosecute him or get him fired?"Barr has also appointed another outside prosecutor, John H. Durham, the U.S. attorney in Connecticut, to reinvestigate the Russia investigators even though the department's independent inspector general was already scrutinizing them.And his department has intervened in a range of other ways, from seeking more comfortable prison accommodations last year for Paul Manafort, Trump's former campaign chairman, to abruptly dropping charges in March against two Russian shell companies that were about to go to trial for financing schemes to interfere in the 2016 election using social media.Barr has let it be known that he does not think the FBI ever had an adequate legal basis to open its Russia investigation in the first place, contrary to the judgment of the Justice Department's inspector general.In an interview on CBS News on Thursday, Barr defended the dropping of the charges against Flynn on the grounds that the FBI "did not have a basis for a counterintelligence investigation against Flynn at that stage."Anne Milgram, a former federal prosecutor and former New Jersey attorney general who teaches criminal law at New York University, defended the FBI's decision to question Flynn in January 2017. She said that much was still a mystery about the Russian election interference operation at the time and that Flynn's lying to the vice president about his postelection interactions with a high-ranking Russian raised new questions.But, she argued, the more important frame for assessing the dropping of the case was to recognize how it fit into the larger pattern of the Barr-era department "undercutting the law enforcement officials and prosecutors who investigated the 2016 election and its aftermath," which she likened to "eating the Justice Department from the inside out."This article originally appeared in The New York Times.(C) 2020 The New York Times Company





io

Iran's president says an end to United Nations arms embargo is a 'right'

The Iranian president said Wednesday that lifting a U.N. arms embargo on Tehran would be an “obvious right” and added a veiled warning of unspecified steps Iran could take if the embargo is extended, as the United States wants.





io

Coronavirus: Are dentists open for emergency care? And other questions

Are dentists open for emergency care, and other questions answered by BBC experts.




io

Nicola Sturgeon: 'Care home situation profoundly upsetting'

Nicola Sturgeon says the situation in care homes is "profoundly upsetting".




io

Coronavirus: Unions warn over move to increase rail services

Rail union leaders have written to Prime Minister Boris Johnson with "severe concerns".




io

Coronavirus: UK banks get 100,000 loan applications on first day

Banks see stampede for bounce-back loans within hours of the new government scheme going live.




io

Coronavirus: Nearly two million claim universal credit

About 8,000 job centre staff have been redeployed to process claims for financial help, minister tells MPs.




io

Coronavirus: Nicola Sturgeon sets out options for easing lockdown

The moves could include a gradual reopening of schools and allowing people to spend more time outside.




io

Anti-abortion campaigner loses Stella Creasy poster ban appeal

A judge dismisses Christian Hacking's bid to overturn a ban on posters put up around Waltham Forest.




io

Coronavirus: Neil Ferguson to face no police action for 'undermining' lockdown

Scotland Yard says Prof Neil Ferguson's behaviour was "plainly disappointing" but rules out fining him.




io

Bank of England warns of sharpest recession on record

Bank head Andrew Bailey tells the BBC there will be no quick return to normality after the hit to jobs and income.




io

Coronavirus: Russia marks WW2 Victory Day with subdued celebrations

Footage of last year's Red Square military parade play on TV as the pandemic mutes celebrations.




io

Little Richard : Rock 'n' roll pioneer dies

The self-styled "king and queen of rock 'n' roll" - who inspired Elvis and The Beatles - dies at 87.




io

Coronavirus: Online students face full tuition fees

If universities are teaching online next term students will still have to pay full tuition fees.




io

Coronavirus: 'Humiliation' as school meal vouchers fail at till

"We had to leave all our shopping," a mother tells BBC News.




io

Coronavirus: Key safeguards needed for schools to reopen - unions

Education unions say they want scientific evidence it is safe for teachers and pupils to return.




io

VE Day: The Queen addresses the nation

The Queen commemorates the 75th anniversary of VE Day with a televised address to the UK.




io

A panel on accessibility, design inclusion and ethics, hiring and retaining diverse talent, and landing a job in UX.

It’s one thing to seek diverse talent to add to your team, another to retain the people you’ve hired. Why do so many folks we bring in to add depth and breadth of experience to our design and business decision-making process end up leaving? Hear thoughtful, useful answers to this question and other mysteries of […]

The post A panel on accessibility, design inclusion and ethics, hiring and retaining diverse talent, and landing a job in UX. appeared first on Zeldman on Web & Interaction Design.





io

Workloads, acceleration, and making Postgres better

#353 — April 29, 2020

Read on the Web

Postgres Weekly

7 Things That Could Be Improved in Postgres — As 1990s dance pop group D:Ream sang in 1994, Things Can Only Get Better.. including Postgres ???? Luckily these are all ‘nice to have’s but I dare say we’ll see some of them (such as automatic tuning and auto-vacuuming improvements) appear over time.

Kaarel Moppel

How The Citus Distributed Query Executor Adapts to a Postgres Workload — Citus is the popular extension for horizontally scaling Postgres and its query executor has seen some huge updates lately.

Citus Data (Microsoft)

eBook: The Most Important Events to Monitor in Your Postgres Logs — In this pganalyze eBook, we are looking at the Top 6 Postgres log events for monitoring query performance and preventing downtime.

pganalyze sponsor

Swarm64 DA 4.0: A Database Acceleration Extension for Postgres — Swarm64 started life as a FPGA-driven way to accelerate Postgres performance, but can now work without FPGAs too. This is not a free product but if you want to give it a run, there’s a trial or it can be spun up from the AWS Marketplace.

Yana Krasteva

Postgres Performance Goalposts — An interesting heuristic from Bruce here on what to do if you expect your connections, queries, or write queries to be above/below certain levels.

Bruce Momjian

A Tale of Password Authentication Methods in Postgres“Let’s say you want to implement a password authentication method in a client/server protocol..” Here’s the story of how Postgres came up with its approaches.

Peter Eisentraut

How to Set application_name When Using psql — As Craig says: “Setting your application name in Postgres is SO USEFUL. It will help a lot for debugging when you’ve got multiple different apps/services connecting to the same database.”

Denish Patel

How to Upgrade Postgres from v11 to v12 on Ubuntu 20.04 — Now that Ubuntu 20.04 is out, this might be on your mind!

Paolo Melchiorre

Working with Amazon Aurora PostgreSQL: What Happened to the Stats? — Apparently there’s a bug with numerous versions of Aurora PostgreSQL that causes certain stats to be lost on restart.

Michael Vitale

Postgres Vision 2020 - Free Online Conference (June 23-24) — Learn how today’s IT leaders are using Postgres. Join from anywhere in the world and listen from 30+ Postgres experts.

EnterpriseDB sponsor

A Deep Dive into PostGIS Nearest Neighbor Search — Take a deep dive into the Postgres and PostGIS internals to find out how K-nearest neighbor accelerates local search.

Martin Davis

My Favorite Postgres Extensions: Part One — A basic high level look at pg_partman and postgres_fdw.

Nawaz Ahmed

Kanel: Generate TypeScript Types from Postgres

Kristian Dupont

Postgres.app: The Easiest Way to Get Started with Postgres on the Mac — I’ve used this for years, it’s super popular, but if there’s just a handful of developers out there who’d benefit from it and don’t know about it, this reminder will be worth it :-) It continues to get very frequent updates.

Jakob Egger, Chris Pastl, and Mattt Thompson

???? Upcoming Events

All in-person events we had listed are cancelled or postponed due to the COVID outbreak, so we're now linking to webinars, livestreams, and similar online events.

If you have any, just hit reply and if it's Postgres related (and either free or not too expensive) we'll include it in a future issue. Just one this week:

  • ???? Postgres Vision 2020 on June 23-24. A full attempt at an online Postgres conference across multiple days with multiple tracks.

???? – requires e-mail address or registration
???? – costs money to participate




io

Medium-hard SQL questions to think about

#354 — May 6, 2020

Read on the Web

Postgres Weekly

pgModeler: A Postgres Database Modeler — An easy way to create and edit database models in a visual way. It’s packaged up as a paid product but is also open source so you can build your own.

Raphael Araújo e Silva

The Best Medium-Hard Data Analyst SQL Interview Questions — This article begins with a quote: “The first 70% of SQL is pretty straightforward but the remaining 30% can be pretty tricky.” True! This article focuses on the tricky ‘medium-hard’ area that few tutorials venture into.

Zachary Thomas

Monitor Custom Postgres Metrics in Real-Time with Datadog — Monitor and visualize Postgres performance in context end-to-end alongside the rest of your stack. Create custom, drag-and-drop dashboards to quickly view analytics on any Postgres metric. Try Datadog free.

Datadog sponsor

My Favorite PostgreSQL Extensions: Part Two — The second part of a series we linked to last week. This time, Nawaz takes a look at pgAudit, pg_repack, and HypoPG.

Nawaz Ahmed

Backup Manifests and pg_verifybackup in Postgres 13 — Postgres 13 will introduce two features to enhance the automated validation of physical backups: backup manifests and a new tool called pg_verifybackup.

Gabriele Bartolini

arm64 Packages Now on apt.postgresql.org — If you’re running ARM64 hardware and Debian or Ubuntu, you can now install Postgres via apt.

Christoph Berg

Speeding Up count(*): Why Not Use max(id) - min(id)? — A warning tale in case you decide to take this shortcut. While you might be able to estimate or fudge a number that’s close, you can’t guarantee sequences will give you an exact, correct answer here.

Hans-Jürgen Schönig

Using Postgres for JSON Storage — With JSON and JSONB types and associated advanced ways to query such columns, using Postgres as a store for JSON data is pretty simple. This is the briefest of overviews but leads into an interactive online tutorial.

Steve Pousty

How to Migrate From Inheritance-Based Partitioning to Declarative Partitioning — Partitioning was introduced in Postgres 10 and Postgres 11 improved the declarative partitioning support. This article demonstrates a move from inheritance based partitioning to declarative partitioning using the native features found in Postgres 11+.

Caterina Magini

Free eBook: How to Get a 3x Performance Improvement on Your Postgres Database — Learn our best practices for optimizing Postgres query performance for customers like Atlassian and how to reduce data loaded from disk by 500x.

pganalyze sponsor

How to Backup Multiple Tablespaces with pg_basebackup

Ahsan Hadi

▶  Security and Compliance with Postgres — A recorded webinar that 2ndQuadrant ran recently.

Boriss Mejías

Oracle to PostgreSQL: ANSI Outer Join Syntax in Postgres — The latest in a series of blog posts about migrating to Postgres from Oracle which looks at what Postgres offers in place of Oracle’s join operators.

Kirk Roybal

An Interview with 2ndQuadrant's Jimmy Angelakos — The latest ‘PostgreSQL Person of the Week’ to face questions about his experiences with Postgres.

Andreas Scherbaum

dadbod.vim: A Modern Database Interface for Vim — A Vim plugin for interacting with numerous databases, including Postgres.

Tim Pope

???? Upcoming Online Events

  • Postgres Pulse - weekly at 11am ET each Monday. Weekly Zoom-based sessions with folks like Bruce Momjian, Vibhor Kumar, and other people at EnterpriseDB.
  • ???? Postgres Vision 2020 on June 23-24. A full attempt at an online Postgres conference across multiple days with multiple tracks.

???? – requires e-mail address or registration
???? – costs money to participate




io

Confessions of a call-centre scammer

How Indian call-centre scammers justified tricking Western victims out of hard-earned money.




io

Coronavirus: Here's how you can stop bad information from going viral

Experts are calling on the public to practise ‘information hygiene’ to help stop the spread of falsehoods online.




io

Coronavirus: 'Depression feels like my cat is sitting on my chest'

Two young people describe how the coronavirus pandemic and the lockdown have affected their mental health.




io

Why being gay in Russia is about "love and passion"

The secret moment between two gay Russian lovers that defied haters.




io

Coronavirus: what we can learn from the war generation

What can younger people learn from the generations that lived through World War Two?




io

Coronavirus: How a plus-size fashion retailer is adapting

Ojoma Idegwu, founder of plus-size fashion label Dear Curves, explains how she is adapting to coronavirus.




io

Coronavirus: Disease meets deforestation at heart of Brazil's Amazon

Coronavirus has overwhelmed Manaus, the Amazon's biggest city, and the worst is yet to come.




io

Brazil's Amazon: Surge in deforestation as military prepares to deploy

The military is preparing to deploy to the region to try to stop illegal logging and mining.




io

Venezuela: Trump denies role in bungled incursion

Venezuela has accused the US of being behind a botched raid to oust President Maduro.




io

React Router & Webpack in Production

I’ve been working on a pretty large react-router codebase at work. Currently it has around 50~ code splits, which as you can imagine, is a lot of routes. This is going to be a post on the things I’ve learned throughout building out my development / production config and how we are using webpack in production.

###Initial Setup

Before I really dive into how my webpack config is setup and the problems I’ve found, I’ll quickly go over how this app is setup. Currently, there’s one entry point and it looks like this:

import React from 'react'
import { render } from 'react-dom'
import { match, Router, browserHistory } from 'react-router'
import AsyncProps from 'async-props'
import routes from '../routes/index'
/* globals document, window */

const { pathname, search, hash } = window.location
const location = `${pathname}${search}${hash}`

match({ routes, location }, () => {
  render(
    <Router
      render={props => <AsyncProps {...props}/>}
      routes={routes}
      history={browserHistory}
    />,
    document.getElementById('app')
  )
})

It looks like a standard react-router setup, except a couple things are different. For one, there’s way too many routes to have them all in this file, so we are importing the main route object into this file. Second, we are using match on the client side. Without matching first, the client side would try to render before the splits were downloaded causing an error. You can read a little more about match on the client here.

Next, we are using Ryan Florence’s awesome async-props library for loading data into components. It allows me to load data from an api before the server renders components. It will pass the data down to the client for the client-side render, and then data will load as you navigate to new pages automatically.

###Routes

Our main routes file looks like this:


export default {
  component: 'div',
  path: '/',
  indexRoute: require('./index'),
  childRoutes: [
    require('./login'),
    require('./account'),
    ...
  ]
}

There’s a lot more require’s in our app of course. And these are nested pretty deep. The files referenced in the root file have more child routes, and those use require.ensure which you can read about in the webpack docs on code splitting. It tells webpack to make a new bundle, and then load that bundle when require.ensure is called on the client. Here’s an example:

if(typeof require.ensure !== "function") require.ensure = function(d, c) { c(require) }

module.exports = {
  path: 'account',
  getComponent(location, cb) {
    require.ensure([], (require) => {
      cb(null, require('../../views/master/index.jsx'))
    })
  },
  childRoutes: [
    require('./settings'),
  ]
}

There’s a few things going on here. First, we have a function at the top that will polyfill require.ensure. Why? Well, on this project we are server rendering our whole site as well, which I would rather not do, but due to the type of site we are building: we have to. The next thing is the relative require path. I’m using this awesome babel resolver plugin along with webpack’s resolve paths so that I can import files like this:

import Header from '../../master/header'
//becomes
import Header from 'master/header'

Why do I have to use a babel plugin AND webpack’s resolve feature? Once again, doing a server rendered app, the code is ran on the server and also through webpack. In this particular app, I haven’t had time to experiment with webpacking the server. Anyways, if I didn’t use the babel plugin, errors would be thrown on the server, but webpack would work fine. This is one of the common things I have ran into while building this app.

Realizing some things need to be done slightly different on the server or client. You may still be wondering why I am referencing the component as a relative path in the above route example, and that’s because the babel plugin I’m using only works with import and not require. My route objects are the one place that I have these “nasty” looking paths.

##Webpack

I was prompted to make this article after tweeting this out:

A couple people wanted a better explanation as to what’s happening here. When I was first building my production webpack config, even after using all of these plugins:

new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
  compress: { warnings: false },
  comments: false,
  sourceMap: false,
  mangle: true,
  minimize: true
}),

My bundle looked like this:

That’s pretty huge if you think about it. And I’m not talking about the amount of bundles. I’m talking about the file size. After searching everywhere for a solution to get the bundle size down further, I found webpack’s AggressiveMergingPlugin. This thing is a life saver. As you may have seen from the tweet, the output turns into this:

Just having the main, vendor, and one other bundle brings the whole site under 1MB. I’m using the plugin to only merge files if the size reduction is more than 50%, which is the default.

People talk about code splitting in webpack and think it’s really amazing to load the JS for the page you’re on and nothing more. It sounds great. The problem is that the file size is immensely bigger. If someone more familiar with webpack has a better idea as to why this is, I’d like a better explanation. It isn’t feasable to keep the splits instead of merging them. This site is pretty large, with a lot of routes as you can tell from the screenshots. Codesplitting without merging would cause way more waiting on the client side every time you navigate to a new page. Even if the JS was heavily cached, the first time you hit these pages it will have to load a 300kb bundle for some of them.

##Caching

That takes us to caching. We are about a month away from publicly launching this site, so we haven’t setup the workflow for pushing updates through a cdn, but that will be the end result. For now, in my webpack config, my output object looks like this:

output: {
  path: __dirname + '/public/assets/js/[hash]/',
  filename: '[name].js',
  chunkFilename: '[id].js',
  publicPath: '/assets/js/[hash]/'
},

This is in the production config of course. This way I can cache the files and when I update the code, the hash will change and the browser won’t be caching the old code. I pass in the hash as an env variable at runtime to that the server has the correct path to the assets folder.

##Problems

There were a few big problems I came across while building out a server rendered app with dynamic routes. The first was page titles. How am I supposed to have the right title on the client and on the initial server render? Thankfully, Ryan has yet another solution. react-title-component solves this perfectly.

The next was, how do I hit an api, wait for the response on server render, load new data on route changes, and of course, do this at the component level. As I mentioned before, async-props solves this problem too. It will give you route info so that you can make requests based on things in the url.

The next problem is one that I haven’t fully solved. Webpack is getting really slow. It takes around 20 seconds on a maxed out macbook 15” to build code in production. On the server, it takes more like a minute! If I’m in development mode, it takes around 10 seconds to make the initial build, and sometimes it lags on building the splits on code change. If anyone has insight into this I would love to hear it.

This one goes along with the webpack one, and it is reloading the server. I haven’t tried to webpack the server but I hear doing so works great for this. I don’t think it would fix the problem with webpack being slow though, and in fact it would probably make it even slower.

##Folder structure

I almost forgot to throw this one in here! I’m really happy with the structure of this project. I have a views folder that has all of the same folders and file names as the routes folder. It makes it really easy to find things. These also correspond with the URL to the page. /account/settings will be in views/account/settings.jsx and routes/account/settings.js. The same is true for my tests folder.

##Conclusion

I hope this gave you a good glimpse at how webpack and react router work at a larger scale than you see most blog posts cover. If you have any questions or things that you would like me to talk about that I haven’t already, please leave a comment below and I will update this post! I’m sure that I forgot a few problems and tips writing this. I was thinking this would be a short post but it blew up on me!




io

The Diverse React Navigation Ecosystem

The routing ecosystem around React and React Native is quite different. One is characterized by a strong incumbent, and the other is plagued by rapid change.

React JS

No question about it, React Router (ReactTraining/react-router) is king here. They have the benefit of several years of active development, along with an active community submitting PR’s, fixes, etc. Supplement that with myriad tutorials and how-to’s and you end up with a well-supported, stable product. To be fair, React Router has suffered some major API upsets, and is nearly the poster-child for javascript fatigue but the maintainers have declared their lasting support for a few specific versions, which means you can plop down with V3 and be good to go for the next 12 to 24 months.

React Native

Ok, this is where things start to get really, really crazy. The most important thing to keep in mind is that the React Native team has produced three navigation helpers: NavigatorIOS, Navigator, and NavigatorExperimental.

  • NavigatorIOS was quickly deprecated, as it was supported only by (you guessed it) IOS.
  • Navigator is the currently endorsed solution for navigation, at least if you are following the official docs. However, its about to be upset by-
  • NavigationExperimental. This is an updated navigator that has learned some lessons from Navigator, and has some solid integration with Redux. ‘Navigator’ is (or was!) sleighted to be deprecated in favor of NavigationExperimental at some point.

Already you have three ‘official’ navigators supported by the React Native team. The big issue with all three of these is that they are somewhat lightweight and don’t include a lot of common navigation situations out of the box, like sidebars, tab bars, headers, etc. To solve that, the community has introduced…

  • React Native Router Flux (aksonov/react-native-router-flux). My personal favorite, this is router is based upon NavigationExperimental. You can imagine that the authors looked at NavigationExperimental, realized that everyone would be writing the same wrapper code around it, and so created this project.
  • React Native Router (t4t5/react-native-router). Haven’t used it, but it is colossally popular.
  • React Router Native (jmurzy/react-router-native). Strives for API conformity with React Router (the above mentioned one). The great approach here is that they bring in the concept of a URL in native apps, where one doesn’t otherwise exist. This is a great approach that simplifies a lot of common routing situations. Of course, there’s one more big solution that is supposedly going to become the standard:
  • React Navigation (react-community/react-navigation). Seen as a solution that will soon be ‘official’ in the community, it is intended to replaced NavigationExperimental. This package is still in active development, so I expect at least a bit of API upset over the coming months. If you want to use official solutions, go with this, if you want a tried and true solution, go with React Native Router Flux.




io

2000 FIFA Club World Championship: Corinthians 0-0 Vasco da Gama (4-3 PSO)

Corinthians-Vasco da Gama, FIFA Club World Cup Brazil 2000 Final: The all-Brazilian final had a plethora of familiar names - including legend Romario, Edmundo, Gilberto Melo, Ricardinho and Dida - and ended in a dramatic penalty shootout.




io

2006 Club World Cup Final: Internacional 1-0 Barcelona

Internacional-Barcelona, FIFA Club World Cup Japan 2006 Final: The powerful side of Ronaldinho, Deco and Andres Iniesta lost out to the Brazilians despite creating a number of chances.