si

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.




si

Life inside the UK's first 'TikTok house'

These six creators moved in together to make viral TikTok videos.




si

Coronavirus: Scam sites selling masks and fake cures taken down

More than 160,000 suspicious emails have been reported to a new scam-busting service in two weeks.




si

Uber says 'no sacred cows' amid coronavirus crisis

The firm has already announced job cuts affecting 14% of its staff, but more measures may be needed.




si

Call for credit card freeze on porn sites

More than 10 leading bodies say porn sites stream content featuring child sexual abuse and sex trafficking.




si

Coronavirus: When might Hollywood reopen for business?

Cast and crews might have to quarantine together in the future when filming begins again.




si

Coronavirus and climate change a ‘double crisis’

Many activists have had to stop their usual work due to the pandemic. Here's how they're responding.




si

Worst song possible plays as Trump tours mask plant

As the president touts plans to reopen the economy, Live And Let Die blares over a loudspeaker.




si

Coronavirus: Russian hospital staff 'working without masks'

As coronavirus spreads in the provinces, more and more health workers are getting sick - and dying.




si

Coronavirus: Russia swaps Victory Day parade for air show

The Red Square parade was cancelled because of the pandemic, but in neighbouring Belarus the parade went ahead as planned.




si

Design is a (hard) job.

DESIGN WAS so much easier before I had clients. I assigned myself projects with no requirements, no schedule, no budget, no constraints. By most definitions, what I did wasn’t even design—except that it ended up creating new things, some of which still exist on the web. Soon I had requirements, schedules, and constraints, but most […]

The post Design is a (hard) job. appeared first on Zeldman on Web & Interaction Design.





si

Design Kickoff Meetings

Posted here for posterity: Design kickoff meetings are like first dates that prepare you for an exciting relationship with a person who doesn’t exist.

The post Design Kickoff Meetings appeared first on Zeldman on Web & Interaction Design.




si

Expressive Design Systems

Yesenia Perez-Cruz started her career as a designer at Happy Cog Philadelphia. From the first day, her design gifts were unmistakable. As her career progressed, she moved from one challenging role to another. At companies like Vox Media and Shopify, and at conferences around the world, she has been a design team leader, a popular […]

The post Expressive Design Systems appeared first on Zeldman on Web & Interaction Design.




si

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.




si

The Web We Lost: Luke Dorny Redesign

Like 90s hip-hop, The Web We Lost™ retains a near-mystical hold on the hearts and minds of those who were lucky enough to be part of it. Luke Dorny’s recent, lovingly hand-carved redesign of his personal site encompasses several generations of that pioneering creative web. As such, it will repay your curiosity.

The post The Web We Lost: Luke Dorny Redesign appeared first on Zeldman on Web & Interaction Design.




si

An insightful interview with Go's Rob Pike

#310 — May 1, 2020

Unsubscribe  :  Read on the Web

Golang Weekly

An Interview with Go's Rob Pike — Go’s co-creator answers some big picture questions about Go’s status, history, and future. “Go has indeed become the language of cloud infrastructure,” says Rob.

Evrone

???? What's Coming in Go 1.15 — This presentation covers all the major sections: tooling, performance, API changes, and the Big Ones, like the aforementioned smaller binaries. Fingers crossed for a final release in August.

Daniel Martí slidedeck

Troubleshoot Golang App Issues with End-To-End Distributed Tracing — Trace requests across service boundaries to optimize bottlenecks by drilling into individual traces end-to-end with flame graphs. Correlate Golang traces with related logs and metrics for fast troubleshooting. Enhance performance with a free Datadog APM trial.

Datadog APM sponsor

Debugging Go Programs using Delve — The recent Go community survey showed that most Go developers use text-based logging (e.g. with fmt.Print()) to debug, but if you want to step things up a notch, this is a gentle intro to Delve.

Naveen Ramanathan

My Journey Optimizing The Go Compiler — Assel explains how a simple task evolved into a legitimate compiler optimization (aimed at 1.15) and proves we should all have a curious mind.

Assel Meher

The 'Ultimate' Go Study Guide — A large repository of code examples with comments and notes from Hoanh’s attempt at learning the language. If you pick up concepts well from straightforward examples, this is worth a look.

Hoanh An

???? Jobs

Software Engineer at HiPeople (Remote/Berlin) — Fast-moving startup (backed by top tier VCs) shaping the future of modern recruiting is looking for engineers who love working with Go.

HiPeople

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

Vettery

???? Articles & Tutorials

Making a Multiplayer Game with Go and gRPC — Started as a (somewhat ambitious) project to learn Go, Sam walks us through the algorithms, design decisions, mistakes, and where Go helped and hurt the game.

Samuel Mortenson

Documenting a Go GitHub Repo — Or, “How to Keep the README in Your GitHub Repo in Sync with Your Go Doc.”

Eyal Posener

The 5 Crucial PDF & Office Features For Corporate Apps in Pure Go — UniDoc develops pure Go libraries for managing PDF and Office files since 2016. Here are the features developers use the most.

UniDoc sponsor

▶  Discussing Building Immediate Mode GUIs in Go — Elias Naur, creator of Gio, joins the popular Go podcast to discuss building GUI apps with Go, the pros and cons of immediate vs retained mode and examples of each.

Go Time Podcast podcast

The Creation of a Realtime Patient Monitoring System with Go and Vue in 3 Days — This is the Go content I am here for. Connecting with monitoring devices and leveraging Go’s strengths to create a helpful, distributed application. Great work.

Kasun Vithanage

Add It Up: Azure’s Go Problem — Here’s one takeaway from the Go Developer Survey. Of the major clouds, Azure is the one Go developers seem least enamored by.

Lawrence E Hecht

Why You Should Generally Be using the Latest Version of Go — No surprising arguments here.

Chris Siebenmann

???? Code & Tools

XLSX: A Library for Reading and Writing XLSX (Excel) Files — Got spreadsheets? Want to make spreadsheets? There’s a lot you can do with them here.

Geoffrey J. Teale

SQLBoiler: Generate a Go ORM Tailored to Your Database Schema — A long standing library that has now switched to modules.

Volatile Technologies Inc.

Decimal: Arbitrary-Precision Fixed-Point Decimal Numbers for Go — The library laments that it can only support decimal numbers with up to 2^38 digits after the decimal point so take care ????

Spring Engineering

Beta Launch: Code Performance Profiling - Find & Fix Bottlenecks

Blackfire sponsor

Redigo: A Go Client for Redis — In related news, Redis 6.0 has just been released.

Gary Burd

ntp: Facebook's NTP Libraries — NTP stands for “Network Time Protocol”, if you were wondering. Basically, clock synchronization.

Facebook Incubator

grobotstxt: A Native Go Port of Google's Robots.txt Parser and Matcher Library — Now you can crawl your own site, just like Google does.

Jim Smart

A Compiler for a Small Custom Language Into x86-64 Assembly — One of those ‘labor of love’ type projects that you might enjoy poking around in. You won’t use this project directly, but you might be intrigued how to create a similar compiler for your own thing.

Maurice Tollmien

MIDAS: Microcluster-Based Detector of Anomalies in Edge Streams — A Go reimplementation of this C++ version.

Steve Tan

Liftbridge 1.0: Lightweight, Fault-Tolerant Message Streams — A server that implements a durable, replicated message log for the NATS messaging system.

Liftbridge




si

Confessions of a call-centre scammer

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




si

Blasian love: The day we introduced our black and Asian families

Blasian - black and Asian - couples now exist in South Africa... but they don't always have an easy time.




si

Coronavirus: The grandad who became a TikTok star without realising it

Joe Allington was persuaded to dance on TikTok for the first time in January. Now he's got 1.5 million followers.




si

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.




si

Stop and search: the controversial police power

Reporter Aaron Roach Bridgeman speaks to suspects, police and campaigners.




si

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

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




si

Electrosensitivity: 'I didn't believe people had it, then it happened to me'

Velma, Emma and Dean believe mobile phone signals, wi-fi and other modern technology makes them ill.




si

Coronavirus crisis forces farmers to throw milk away

Some dairy farmers are throwing away thousands of litres amid supply chain disruption due to coronavirus.




si

Coronavirus: Rising commercial PPE costs 'frustrating', says care home CEO

The CEO of Methodist Homes says a secure supply chain from government would mean avoiding inflated prices.




si

Coronavirus will have "significant impact" on economy

Chancellor Rishi Sunak has told reporters that Covid-19 will cause "hardship ahead".




si

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.




si

Coronavirus: UK chancellor on new microloan scheme for small businesses

Firms will be able to borrow up to £50,000, which will be interest free for the first year.




si

Millie Small: My Boy Lollipop singer dies aged 72

The singer, who had Jamaica's first million-selling single, dies after suffering a stroke.




si

Venezuela: Trump denies role in bungled incursion

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




si

Using Proxies with Redux Types

One of the most common problems that I run into when using Redux is trying to figure out why an action is not being captured by a reducer. For someone just getting starting with Redux, debugging this issue can be especially overwhelming because of how Redux manages data flow. So before you start pouring over configuration code, or the logic contained in your action creators and reducers, please, make sure your action types are defined and spelled correctly.

One of the most common problems that I run into when using Redux is trying to figure out why an action is not being captured by a reducer. For someone just getting starting with Redux, debugging this issue can be especially overwhelming because of how Redux manages data flow. So before you start pouring over configuration code, or the logic contained in your action creators and reducers, please, make sure your action types are defined and spelled correctly.

In any application that I have built, most bugs that I have run into are simply due to typos. However, the solution to this particular problem is harder to spot because no errors are raised when the application is run. Take a look at the snippet below.

// actionTypes.js

export const FETCH_FILE_REQUEST = 'fetch_file_request';
export const FETCH_FILE_SUCCESS = 'fetch_file_success';
export const FETCH_FILE_FAIL = 'fetch_file_fail';


// filesReducer.js

import {
  FETCH_FILE_REQUEST,
  FETCH_FILE_SUCESS,
  FETCH_FILE_FAIL
} from '../actions/actionTypes';

const filesReducer = (state = {}, action) => {
  switch (action.type) {
    case FETCH_FILE_SUCESS:
      return { ...state, file: action.payload };
    default:
      return state;
  }
}

export default filesReducer;

Assuming we dispatched an action with type FETCH_FILE_SUCCESS, the filesReducer should catch the action before the default case is returned. But what if that is not happening? Where do we start the debugging process. There does not appear to be anything wrong with the code in the reducer; the action type was imported and matches the case in the switch statement. There are no errors in the browser. Where is the issue?

You may have noticed that I misspelled SUCCESS in filesReducer.js, but the reason this can be hard to catch is because importing undefined types does not cause an error, so when we import FETCH_FILE_SUCESS, its value is actually undefined, so our reducer always hits the default case.

It would be nice if the existing import/export system could help us catch this. Unfortunately, since action types are just strings, validating their existence is challenging. Luckily, we have another option.

Enter Proxies

Proxies are a feature of ES2015 that allow us to customize operations on a object. They can be used in many different ways, and you can find some useful examples here and here. For our problem, this example from Mozilla looks promising:

let validator = {
  set: function(obj, prop, value) {
    if (prop === 'age') {
      if (!Number.isInteger(value)) {
        throw new TypeError('The age is not an integer');
      }
      if (value > 200) {
        throw new RangeError('The age seems invalid');
      }
    }

    // The default behavior to store the value
    obj[prop] = value;

    // Indicate success
    return true;
  }
};

let person = new Proxy({}, validator);

person.age = 100;
console.log(person.age); // 100
person.age = 'young'; // Throws an exception
person.age = 300; // Throws an exception

So if proxies can be used to validate that properties assigned to an object are of a certain type and value, we should definitely be able to ensure that our action types are never undefined, or else throw an error that will be easy for us to fix. Let’s refactor our actionTypes.js file.

// actionTypes.js

const types = {
  FETCH_FILE_REQUEST: 'fetch_file_request',
  FETCH_FILE_SUCCESS: 'fetch_file_success',
  FETCH_FILE_FAIL: 'fetch_file_fail'
}

const typeValidator = {
  get(obj, prop) {
    if (obj[prop]) {
      return prop;
    } else {
      throw new TypeError(`${prop} is not a valid action type`);
    }
  }
}

module.exports = new Proxy(types, typeValidator);

First, we define a object containing all our action types. Then we define our validator handler typeValidator. The get method inside our handler is called a trap, and provides access to the properties of a object. If the property we are looking for, an action type, in this case, exists in the types object, return that prop, unmodified. Otherwise, throw an error because the prop does not exist.

Finally, export a new proxy, passing the types object as the target and the typeValidator as the handler. However, it is important to note that the ES2015 module system does not work well with proxies, so module.exports and require() must be used for exporting and importing the types.

Barely any code needs to change in the reducer and action creator files, but in order for the action types to be imported successfully, we just need couple lines of code in a new file:

// actionTypesProxy.js

export const {
  FETCH_FILE_REQUEST,
  FETCH_FILE_SUCCESS,
  FETCH_FILE_FAIL,
} = require('./actionTypes');

// in the reducer and action creator files
// change '../actions/actionTypes' to
// '../actions/actionTypesProxy'

By creating a proxy to verify the existence of an action type, we no longer have to worry about correctly naming a property upon import because an error will be thrown in the browser console as soon as the application starts. So, reduce the number headaches you get when developing an application using Redux and start using proxies.

Interested in learning how to build applications using Redux with ReactJS. Check out this online course! Modern React with Redux




si

The dressing room of Mali team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Mali team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Mali team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Mali team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Mali team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Mali team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Mali team is pictured

KOLKATA, INDIA - OCTOBER 28: The dressing room of Mali team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team is pictured

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team is pictured

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

The dressing room of Brazil team is pictured

KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images)




si

A general view of Spain dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of Spain dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of Spain dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of Spain dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of England dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of England dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of England dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of England dressing room

KOLKATA, INDIA - OCTOBER 28: A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)




si

A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final

KOLKATA, INDIA - OCTOBER 28: A general view of England dressing room prior to the FIFA U-17 World Cup India 2017 Final match between England and Spain at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images)