es Expressive Design Systems By www.zeldman.com Published On :: Thu, 21 Nov 2019 22:17:59 +0000 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. Full Article A Book Apart Advocacy art direction Best practices Design Designers Happy Cog™ industry a book apart books design systems designers
es A panel on accessibility, design inclusion and ethics, hiring and retaining diverse talent, and landing a job in UX. By www.zeldman.com Published On :: Thu, 05 Dec 2019 15:00:29 +0000 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. Full Article Accessibility Diversity video
es The Web We Lost: Luke Dorny Redesign By www.zeldman.com Published On :: Wed, 04 Mar 2020 12:46:30 +0000 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. Full Article Advocacy art direction Design Designers Ideas industry interface IXD Jason Santa Maria links Off My Lawn! Redesigns Responsive Web Design State of the Web Tech The Profession User Experience UX Web Design Web Design History webfonts homepage personal sites redesign redesigns web design
es A kindness By www.zeldman.com Published On :: Thu, 26 Mar 2020 01:53:06 +0000 Dino works six days a week as a porter in my apartment building, cleaning walls and floors, removing trash, distributing recyclables. He’s one of those essential workers who are suddenly on the front lines. We’ve always been friendly. I’ve been hibernating in my apartment for days, because it’s what we’re all supposed to do, and […] The post A kindness appeared first on Zeldman on Web & Interaction Design. Full Article glamorous Coronavirus My Glamorous Life
es Preparing for the Future with React Prereleases By reactjs.org Published On :: Tue, 22 Oct 2019 00:00:00 GMT To share upcoming changes with our partners in the React ecosystem, we’re establishing official prerelease channels. We hope this process will help us make changes to React with confidence, and give developers the opportunity to try out experimental features. This post will be most relevant to developers who work on frameworks, libraries, or developer tooling. Developers who use React primarily to build user-facing applications should not need to worry about our prerelease channels. React relies on a thriving open source community to file bug reports, open pull requests, and submit RFCs. To encourage feedback, we sometimes share special builds of React that include unreleased features. Because the source of truth for React is our public GitHub repository, it’s always been possible to build a copy of React that includes the latest changes. However it’s much easier for developers to install React from npm, so we occasionally publish prerelease builds to the npm registry. A recent example is the 16.7 alpha, which included an early version of the Hooks API. We would like to make it even easier for developers to test prerelease builds of React, so we’re formalizing our process with three separate release channels. Release Channels The information in this post is also available on our Release Channels page. We will update that document whenever there are changes to our release process. Each of React’s release channels is designed for a distinct use case: Latest is for stable, semver React releases. It’s what you get when you install React from npm. This is the channel you’re already using today. Use this for all user-facing React applications. Next tracks the master branch of the React source code repository. Think of these as release candidates for the next minor semver release. Use this for integration testing between React and third party projects. Experimental includes experimental APIs and features that aren’t available in the stable releases. These also track the master branch, but with additional feature flags turned on. Use this to try out upcoming features before they are released. All releases are published to npm, but only Latest uses semantic versioning. Prereleases (those in the Next and Experimental channels) have versions generated from a hash of their contents, e.g. 0.0.0-1022ee0ec for Next and 0.0.0-experimental-1022ee0ec for Experimental. The only officially supported release channel for user-facing applications is Latest. Next and Experimental releases are provided for testing purposes only, and we provide no guarantees that behavior won’t change between releases. They do not follow the semver protocol that we use for releases from Latest. By publishing prereleases to the same registry that we use for stable releases, we are able to take advantage of the many tools that support the npm workflow, like unpkg and CodeSandbox. Latest Channel Latest is the channel used for stable React releases. It corresponds to the latest tag on npm. It is the recommended channel for all React apps that are shipped to real users. If you’re not sure which channel you should use, it’s Latest. If you’re a React developer, this is what you’re already using. You can expect updates to Latest to be extremely stable. Versions follow the semantic versioning scheme. Learn more about our commitment to stability and incremental migration in our versioning policy. Next Channel The Next channel is a prerelease channel that tracks the master branch of the React repository. We use prereleases in the Next channel as release candidates for the Latest channel. You can think of Next as a superset of Latest that is updated more frequently. The degree of change between the most recent Next release and the most recent Latest release is approximately the same as you would find between two minor semver releases. However, the Next channel does not conform to semantic versioning. You should expect occasional breaking changes between successive releases in the Next channel. Do not use prereleases in user-facing applications. Releases in Next are published with the next tag on npm. Versions are generated from a hash of the build’s contents, e.g. 0.0.0-1022ee0ec. Using the Next Channel for Integration Testing The Next channel is designed to support integration testing between React and other projects. All changes to React go through extensive internal testing before they are released to the public. However, there are myriad environments and configurations used throughout the React ecosystem, and it’s not possible for us to test against every single one. If you’re the author of a third party React framework, library, developer tool, or similar infrastructure-type project, you can help us keep React stable for your users and the entire React community by periodically running your test suite against the most recent changes. If you’re interested, follow these steps: Set up a cron job using your preferred continuous integration platform. Cron jobs are supported by both CircleCI and Travis CI. In the cron job, update your React packages to the most recent React release in the Next channel, using next tag on npm. Using the npm cli: npm update react@next react-dom@next Or yarn: yarn upgrade react@next react-dom@next Run your test suite against the updated packages. If everything passes, great! You can expect that your project will work with the next minor React release. If something breaks unexpectedly, please let us know by filing an issue. A project that uses this workflow is Next.js. (No pun intended! Seriously!) You can refer to their CircleCI configuration as an example. Experimental Channel Like Next, the Experimental channel is a prerelease channel that tracks the master branch of the React repository. Unlike Next, Experimental releases include additional features and APIs that are not ready for wider release. Usually, an update to Next is accompanied by a corresponding update to Experimental. They are based on the same source revision, but are built using a different set of feature flags. Experimental releases may be significantly different than releases to Next and Latest. Do not use Experimental releases in user-facing applications. You should expect frequent breaking changes between releases in the Experimental channel. Releases in Experimental are published with the experimental tag on npm. Versions are generated from a hash of the build’s contents, e.g. 0.0.0-experimental-1022ee0ec. What Goes Into an Experimental Release? Experimental features are ones that are not ready to be released to the wider public, and may change drastically before they are finalized. Some experiments may never be finalized — the reason we have experiments is to test the viability of proposed changes. For example, if the Experimental channel had existed when we announced Hooks, we would have released Hooks to the Experimental channel weeks before they were available in Latest. You may find it valuable to run integration tests against Experimental. This is up to you. However, be advised that Experimental is even less stable than Next. We do not guarantee any stability between Experimental releases. How Can I Learn More About Experimental Features? Experimental features may or may not be documented. Usually, experiments aren’t documented until they are close to shipping in Next or Stable. If a feature is not documented, they may be accompanied by an RFC. We will post to the React blog when we’re ready to announce new experiments, but that doesn’t mean we will publicize every experiment. You can always refer to our public GitHub repository’s history for a comprehensive list of changes. Full Article
es Building Great User Experiences with Concurrent Mode and Suspense By reactjs.org Published On :: Wed, 06 Nov 2019 00:00:00 GMT At React Conf 2019 we announced an experimental release of React that supports Concurrent Mode and Suspense. In this post we’ll introduce best practices for using them that we’ve identified through the process of building the new facebook.com. This post will be most relevant to people working on data fetching libraries for React. It shows how to best integrate them with Concurrent Mode and Suspense. The patterns introduced here are based on Relay — our library for building data-driven UIs with GraphQL. However, the ideas in this post apply to other GraphQL clients as well as libraries using REST or other approaches. This post is aimed at library authors. If you’re primarily an application developer, you might still find some interesting ideas here, but don’t feel like you have to read it in its entirety. Talk Videos If you prefer to watch videos, some of the ideas from this blog post have been referenced in several React Conf 2019 presentations: Data Fetching with Suspense in Relay by Joe Savona Building the New Facebook with React and Relay by Ashley Watkins React Conf Keynote by Yuzhi Zheng This post presents a deeper dive on implementing a data fetching library with Suspense. Putting User Experience First The React team and community has long placed a deserved emphasis on developer experience: ensuring that React has good error messages, focusing on components as a way to reason locally about app behavior, crafting APIs that are predictable and encourage correct usage by design, etc. But we haven’t provided enough guidance on the best ways to achieve a great user experience in large apps. For example, the React team has focused on framework performance and providing tools for developers to debug and tune application performance (e.g. React.memo). But we haven’t been as opinionated about the high-level patterns that make the difference between fast, fluid apps and slow, janky ones. We always want to ensure that React remains approachable to new users and supports a variety of use-cases — not every app has to be “blazing” fast. But as a community we can and should aim high. We should make it as easy as possible to build apps that start fast and stay fast, even as they grow in complexity, for users on varying devices and networks around the world. Concurrent Mode and Suspense are experimental features that can help developers achieve this goal. We first introduced them at JSConf Iceland in 2018, intentionally sharing details very early to give the community time to digest the new concepts and to set the stage for subsequent changes. Since then we’ve completed related work, such as the new Context API and the introduction of Hooks, which are designed in part to help developers naturally write code that is more compatible with Concurrent Mode. But we didn’t want to implement these features and release them without validating that they work. So over the past year, the React, Relay, web infrastructure, and product teams at Facebook have all collaborated closely to build a new version of facebook.com that deeply integrates Concurrent Mode and Suspense to create an experience with a more fluid and app-like feel. Thanks to this project, we’re more confident than ever that Concurrent Mode and Suspense can make it easier to deliver great, fast user experiences. But doing so requires rethinking how we approach loading code and data for our apps. Effectively all of the data-fetching on the new facebook.com is powered by Relay Hooks — new Hooks-based Relay APIs that integrate with Concurrent Mode and Suspense out of the box. Relay Hooks — and GraphQL — won’t be for everyone, and that’s ok! Through our work on these APIs we’ve identified a set of more general patterns for using Suspense. Even if Relay isn’t the right fit for you, we think the key patterns we’ve introduced with Relay Hooks can be adapted to other frameworks. Best Practices for Suspense It’s tempting to focus only on the total startup time for an app — but it turns out that users’ perception of performance is determined by more than the absolute loading time. For example, when comparing two apps with the same absolute startup time, our research shows that users will generally perceive the one with fewer intermediate loading states and fewer layout changes as having loaded faster. Suspense is a powerful tool for carefully orchestrating an elegant loading sequence with a few, well-defined states that progressively reveal content. But improving perceived performance only goes so far — our apps still shouldn’t take forever to fetch all of their code, data, images, and other assets. The traditional approach to loading data in React apps involves what we refer to as “fetch-on-render”. First we render a component with a spinner, then fetch data on mount (componentDidMount or useEffect), and finally update to render the resulting data. It’s certainly possible to use this pattern with Suspense: instead of initially rendering a placeholder itself, a component can “suspend” — indicate to React that it isn’t ready yet. This will tell React to find the nearest ancestor <Suspense fallback={<Placeholder/>}>, and render its fallback instead. If you watched earlier Suspense demos this example may feel familiar — it’s how we originally imagined using Suspense for data-fetching. It turns out that this approach has some limitations. Consider a page that shows a social media post by a user, along with comments on that post. That might be structured as a <Post> component that renders both the post body and a <CommentList> to show the comments. Using the fetch-on-render approach described above to implement this could cause sequential round trips (sometimes referred to as a “waterfall”). First the data for the <Post> component would be fetched and then the data for <CommentList> would be fetched, increasing the time it takes to show the full page. There’s also another often-overlooked downside to this approach. If <Post> eagerly requires (or imports) the <CommentList> component, our app will have to wait to show the post body while the code for the comments is downloading. We could lazily load <CommentList>, but then that would delay fetching comments data and increase the time to show the full page. How do we resolve this problem without compromising on the user experience? Render As You Fetch The fetch-on-render approach is widely used by React apps today and can certainly be used to create great apps. But can we do even better? Let’s step back and consider our goal. In the above <Post> example, we’d ideally show the more important content — the post body — as early as possible, without negatively impacting the time to show the full page (including comments). Let’s consider the key constraints on any solution and look at how we can achieve them: Showing the more important content (the post body) as early as possible means that we need to load the code and data for the view incrementally. We don’t want to block showing the post body on the code for <CommentList> being downloaded, for example. At the same time we don’t want to increase the time to show the full page including comments. So we need to start loading the code and data for the comments as soon as possible, ideally in parallel with loading the post body. This might sound difficult to achieve — but these constraints are actually incredibly helpful. They rule out a large number of approaches and spell out a solution for us. This brings us to the key patterns we’ve implemented in Relay Hooks, and that can be adapted to other data-fetching libraries. We’ll look at each one in turn and then see how they add up to achieve our goal of fast, delightful loading experiences: Parallel data and view trees Fetch in event handlers Load data incrementally Treat code like data Parallel Data and View Trees One of the most appealing things about the fetch-on-render pattern is that it colocates what data a component needs with how to render that data. This colocation is great — an example of how it makes sense to group code by concerns and not by technologies. All the issues we saw above were due to when we fetch data in this approach: upon rendering. We need to be able to fetch data before we’ve rendered the component. The only way to achieve that is by extracting the data dependencies into parallel data and view trees. Here’s how that works in Relay Hooks. Continuing our example of a social media post with body and comments, here’s how we might define it with Relay Hooks: // Post.js function Post(props) { // Given a reference to some post - `props.post` - *what* data // do we need about that post? const postData = useFragment(graphql` fragment PostData on Post @refetchable(queryName: "PostQuery") { author title # ... more fields ... } `, props.post); // Now that we have the data, how do we render it? return ( <div> <h1>{postData.title}</h1> <h2>by {postData.author}</h2> {/* more fields */} </div> ); } Although the GraphQL is written within the component, Relay has a build step (Relay Compiler) that extracts these data-dependencies into separate files and aggregates the GraphQL for each view into a single query. So we get the benefit of colocating concerns, while at runtime having parallel data and view trees. Other frameworks could achieve a similar effect by allowing developers to define data-fetching logic in a sibling file (maybe Post.data.js), or perhaps integrate with a bundler to allow defining data dependencies with UI code and automatically extracting it, similar to Relay Compiler. The key is that regardless of the technology we’re using to load our data — GraphQL, REST, etc — we can separate what data to load from how and when to actually load it. But once we do that, how and when do we fetch our data? Fetch in Event Handlers Imagine that we’re about to navigate from a list of a user’s posts to the page for a specific post. We’ll need to download the code for that page — Post.js — and also fetch its data. Waiting until we render the component has problems as we saw above. The key is to start fetching code and data for a new view in the same event handler that triggers showing that view. We can either fetch the data within our router — if our router supports preloading data for routes — or in the click event on the link that triggered the navigation. It turns out that the React Router folks are already hard at work on building APIs to support preloading data for routes. But other routing frameworks can implement this idea too. Conceptually, we want every route definition to include two things: what component to render and what data to preload, as a function of the route/url params. Here’s what such a route definition might look like. This example is loosely inspired by React Router’s route definitions and is primarily intended to demonstrate the concept, not a specific API: // PostRoute.js (GraphQL version) // Relay generated query for loading Post data import PostQuery from './__generated__/PostQuery.graphql'; const PostRoute = { // a matching expression for which paths to handle path: '/post/:id', // what component to render for this route component: React.lazy(() => import('./Post')), // data to load for this route, as function of the route // parameters prepare: routeParams => { // Relay extracts queries from components, allowing us to reference // the data dependencies -- data tree -- from outside. const postData = preloadQuery(PostQuery, { postId: routeParams.id, }); return { postData }; }, }; export default PostRoute; Given such a definition, a router can: Match a URL to a route definition. Call the prepare() function to start loading that route’s data. Note that prepare() is synchronous — we don’t wait for the data to be ready, since we want to start rendering more important parts of the view (like the post body) as quickly as possible. Pass the preloaded data to the component. If the component is ready — the React.lazy dynamic import has completed — the component will render and try to access its data. If not, React.lazy will suspend until the code is ready. This approach can be generalized to other data-fetching solutions. An app that uses REST might define a route like this: // PostRoute.js (REST version) // Manually written logic for loading the data for the component import PostData from './Post.data'; const PostRoute = { // a matching expression for which paths to handle path: '/post/:id', // what component to render for this route component: React.lazy(() => import('./Post')), // data to load for this route, as function of the route // parameters prepare: routeParams => { const postData = preloadRestEndpoint( PostData.endpointUrl, { postId: routeParams.id, }, ); return { postData }; }, }; export default PostRoute; This same approach can be employed not just for routing, but in other places where we show content lazily or based on user interaction. For example, a tab component could eagerly load the first tab’s code and data, and then use the same pattern as above to load the code and data for other tabs in the tab-change event handler. A component that displays a modal could preload the code and data for the modal in the click handler that triggers opening the modal, and so on. Once we’ve implemented the ability to start loading code and data for a view independently, we have the option to go one step further. Consider a <Link to={path} /> component that links to a route. If the user hovers over that link, there’s a reasonable chance they’ll click it. And if they press the mouse down, there’s an even better chance that they’ll complete the click. If we can load code and data for a view after the user clicks, we can also start that work before they click, getting a head start on preparing the view. Best of all, we can centralize that logic in a few key places — a router or core UI components — and get any performance benefits automatically throughout our app. Of course preloading isn’t always beneficial. It’s something an application would tune based on the user’s device or network speed to avoid eating up user’s data plans. But the pattern here makes it easier to centralize the implementation of preloading and the decision of whether to enable it or not. Load Data Incrementally The above patterns — parallel data/view trees and fetching in event handlers — let us start loading all the data for a view earlier. But we still want to be able to show more important parts of the view without waiting for all of our data. At Facebook we’ve implemented support for this in GraphQL and Relay in the form of some new GraphQL directives (annotations that affect how/when data is delivered, but not what data). These new directives, called @defer and @stream, allow us to retrieve data incrementally. For example, consider our <Post> component from above. We want to show the body without waiting for the comments to be ready. We can achieve this with @defer and <Suspense>: // Post.js function Post(props) { const postData = useFragment(graphql` fragment PostData on Post { author title # fetch data for the comments, but don't block on it being ready ...CommentList @defer } `, props.post); return ( <div> <h1>{postData.title}</h1> <h2>by {postData.author}</h2> {/* @defer pairs naturally with <Suspense> to make the UI non-blocking too */} <Suspense fallback={<Spinner/>}> <CommentList post={postData} /> </Suspense> </div> ); } Here, our GraphQL server will stream back the results, first returning the author and title fields and then returning the comment data when it’s ready. We wrap <CommentList> in a <Suspense> boundary so that we can render the post body before <CommentList> and its data are ready. This same pattern can be applied to other frameworks as well. For example, apps that call a REST API might make parallel requests to fetch the body and comments data for a post to avoid blocking on all the data being ready. Treat Code Like Data But there’s one thing that’s still missing. We’ve shown how to preload data for a route — but what about code? The example above cheated a bit and used React.lazy. However, React.lazy is, as the name implies, lazy. It won’t start downloading code until the lazy component is actually rendered — it’s “fetch-on-render” for code! To solve this, the React team is considering APIs that would allow bundle splitting and eager preloading for code as well. That would allow a user to pass some form of lazy component to a router, and for the router to trigger loading the code alongside its data as early as possible. Putting It All Together To recap, achieving a great loading experience means that we need to start loading code and data as early as possible, but without waiting for all of it to be ready. Parallel data and view trees allow us to load the data for a view in parallel with loading the view (code) itself. Fetching in an event handler means we can start loading data as early as possible, and even optimistically preload a view when we have enough confidence that a user will navigate to it. Loading data incrementally allows us to load important data earlier without delaying the fetching of less important data. And treating code as data — and preloading it with similar APIs — allows us to load it earlier too. Using These Patterns These patterns aren’t just ideas — we’ve implemented them in Relay Hooks and are using them in production throughout the new facebook.com (which is currently in beta testing). If you’re interested in using or learning more about these patterns, here are some resources: The React Concurrent docs explore how to use Concurrent Mode and Suspense and go into more detail about many of these patterns. It’s a great resource to learn more about the APIs and use-cases they support. The experimental release of Relay Hooks implements the patterns described here. We’ve implemented two similar example apps that demonstrate these concepts: The Relay Hooks example app uses GitHub’s public GraphQL API to implement a simple issue tracker app. It includes nested route support with code and data preloading. The code is fully commented — we encourage cloning the repo, running the app locally, and exploring how it works. We also have a non-GraphQL version of the app that demonstrates how these concepts can be applied to other data-fetching libraries. While the APIs around Concurrent Mode and Suspense are still experimental, we’re confident that the ideas in this post are proven by practice. However, we understand that Relay and GraphQL aren’t the right fit for everyone. That’s ok! We’re actively exploring how to generalize these patterns to approaches such as REST, and are exploring ideas for a more generic (ie non-GraphQL) API for composing a tree of data dependencies. In the meantime, we’re excited to see what new libraries will emerge that implement the patterns described in this post to make it easier to build great, fast user experiences. Full Article
es An intro to making Postgres high availability on Kubernetes By postgresweekly.com Published On :: Wed, 15 Apr 2020 00:00:00 +0000 #351 — April 15, 2020 Read on the Web Postgres Weekly A Detailed Look at pg_show_plans — A few issues ago we linked to a basic introduction to pg_show_plans – this goes a little further. pg_show_plans lets you look at the execution plans of slow queries in real time as they’re being executed which can help you when troubleshooting. Kaarel Moppel Intersecting GPS Tracks to Identify Infected Individuals — I’m not a huge fan of COVID-19 related content, but this is a pretty interesting technique with numerous use cases. Essentially it uses PostGIS to identify overlapping paths. Florian Nadler Online Training: Learn PostgreSQL from Home — The remote PostgreSQL Database Administration training course is available at a discounted rate & will be conducted in two different timezones. The course covers day-to-day DBA operations, monitoring, server configurations, and more. 2ndQuadrant PostgreSQL Training sponsor PostgreSQL's 'Related Projects' — Thanks to Andreas Scherbaum for pointing out a new page on the Postgres site dedicated to projects related to Postgres like the code that runs the Postgres web site, mailing list, build farm, package management system, etc. PostgreSQL Global Development Group Authentication Configuration in Postgres (and CockroachDB) — In Postgres, client authentication can be controlled via a ‘HBA’ (host-based authentication) file. It’s not something we see covered very often, so you might find this interesting, particularly as it compares things against CockroachDB. Raphael ‘kena’ Poss ▶ Easy And Correct High Availability Postgres with Kubernetes — A 50 minute talk from PostgresOpen 2019 that goes all the way ‘from containers up’ until actually doing stuff with Postgres. Steven Pousty How To Set Up an Express API Backend Project With Postgres — A pretty extensive walkthrough of creating an HTTP API using Express with Node.js and Postgres on the backend, then deploying it all on Heroku. Chidi Orji A Beginners Guide to Basic Indexing in Postgres James Bannister eBook: The Most Important Events to Monitor in Your Postgres Logs — In this eBook, we are looking at the Top 6 Postgres log events for monitoring query performance and preventing downtime. pganalyze sponsor Documenting the Citus Extension to Postgres: An Interview with Joe Nelson — Joe, a.k.a. begriffs, talks about why he works on documentation, why the multi-tenant and real-time analytics tutorials matter, the INSERT..SELECT with repartitioning feature, and what development platform Citus uses for docs. Citus Data (Microsoft) Procedural vs Query Approaches for Finding Packages — Explorations of a query that can be used to display which packages are available for a given FreeBSD port. Get your head around the data model and the ideas here apply to all sorts of situations. Dan Langille ???? 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: ???? Date/Timestamp types in PostgreSQL with Andrew Dunstan and 2ndQuardrant on April 22 at 4pm UTC. ???? – requires e-mail address or registration???? – costs money to participate ???? Seen on Twitter Saw this tweet and thought it was a pretty neat reminder of the sorts of things we can do with Postgres. Justin kindly let us include it: Click through to the original tweet if you want to see the code better. Neat use for a generated column! Full Article
es Workloads, acceleration, and making Postgres better By postgresweekly.com Published On :: Wed, 29 Apr 2020 00:00:00 +0000 #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 Full Article
es Medium-hard SQL questions to think about By postgresweekly.com Published On :: Wed, 6 May 2020 00:00:00 +0000 #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 Full Article
es npm's CTO: So Long, and Thanks for All The Packages By nodeweekly.com Published On :: Thu, 16 Apr 2020 00:00:00 +0000 #334 — April 16, 2020 Read on the Web Node Weekly npm Has Now (Actually) Joined GitHub — We announced GitHub’s acquisition of npm a month ago but now the process is complete. Not much real news here but the plan is to now focus on community engagement and improving registry infrastructure. Jeremy Epling (GitHub) Node v13.13.0 (Current) Released — fs.readv is a new function to sequentially read from an array of ArrayBufferViews, util.inspect now lets you specify a maximum length for printed strings, the default maximum HTTP header size has been increased to 16KB, there are three new collaborators, and more. Michaël Zasso Get Better Insight into Redis with RedisGreen — Modern hosting and monitoring services include memory usage maps, seamless scaling, key size tracking, and more. RedisGreen sponsor ▶ Watch the Live Coding of a New Feature for Node.js — This is not something for novices, but if the idea of watching ‘over the shoulder’ of a Node.js collaborator implementing a new feature directly into Node itself interests you.. this could be a valuable hour spent. Vladimir de Turckheim node-libcurl 2.1: libcurl Bindings for Node — libcurl is a very powerful and well established way to fetch data from URLs across numerous protocols. node-libcurl 2.1.0 brings support for the latest version of libcurl (7.69.1) to us in the Node world. Jonathan Cardoso Machado npm's CTO: 'So Long, and Thanks for All The Packages!' — Ahmad Nassri was npm’s CTO but has now left. Here, he reflects on the past ten years of npm, the repo, the company, and the achievements of both. Ahmad Nassri ???? Jobs Find a Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started. Vettery Node.js Developer at X-Team (Remote) — Join X-Team and work on projects for companies like Riot Games, FOX, Coinbase, and more. Work from anywhere. X-Team ▶️ Get ready for your next role: Pluralsight is free for the entire month of April. Stay Home. Skill Up. #FreeApril — SPONSORED ???? Tutorials Working With AWS Route 53 from Node — Route 53 is Amazon Web Services’ suite of DNS-related services. Like every AWS service, you can control it via an API, and here’s how to manipulate hosted zones from Node. Valeri Karpov Best Practices Learnt Running Express.js in Production for 4 Years — There’s a lot of stuff packed in here focused around middleware, testing, logging, and general concerns around scaling and keeping apps running in production. Adnan Rahić The Node.js Security Handbook — Improve the security of your Node.js app with the Node.js security handbook made for developers. Sqreen sponsor How To Set Up an Express API Backend Project with PostgreSQL — A pretty extensive walkthrough of creating an HTTP API using Express with Node.js and Postgres on the backend, then deploying it all on Heroku. Chidi Orji Porting to TypeScript Solved Our API Woes — From the guy behind the (in)famous Wat video comes a tale of porting a backend from Ruby to TypeScript. Gary Bernhardt How to Mass Rename Files in Node Flavio Copes ▶ Let's Build a Digital Circuit Simulator In JavaScript — A special episode of the Low Level JavaScript series takes us on a brief journey into the world of digital logic. Low Level JavaScript The Story of How I Created a Way to Port Windows Apps to Linux — We mentioned ElectronCGI recently as a way to let .NET and Node.js code depend upon each other, but here its creator explains more about the how and why. Rui Figueiredo How to Create an Alexa Skill with Node — Implementing a custom ‘skill’ for Amazon Alexa by using Node and AWS Lambda. Xavier Portilla Edo ???? Tools, Resources and Libraries Node v10.20.1 (LTS) Released — If you’re still using Node 10, don’t use v10.20.0, use this, due to a bug in the .0 release. Bethany Nicolle Griggs emoji-regex: A Regular Expression to Match All Emoji-Only Symbols Mathias Bynens ip-num: A Library to Work with ASN, IPv4, and IPv6 Numbers — Happy in both Node and the browser. dadepo Optimize Node.js Performance with Distributed Tracing in Datadog Datadog APM sponsor verify-json: Verify JSON Using a Lightweight Schema — A lighter weight alternative to something like JSON Schema. Yusuf Bhabhrawala middle-manager: A Lightweight 'No BS' Presentation Tool — A bit of humor, really. It turns Markdown into basic presentations but then the magic is it detects your ‘BS’ business language so you can remove it ???? Anders Full Article
es Can you build Node add-ons in Rust? Yes. By nodeweekly.com Published On :: Thu, 30 Apr 2020 00:00:00 +0000 #336 — April 30, 2020 Read on the Web Be sure to check out the Tools and Libraries section today as there have been quite a lot of (minor) releases.. from MIDI parsing and JPEG decoding to generating TypeScript types from a Postgres database.. maybe there's something for you ???? Node Weekly Middy 1.0: A Node Middleware Framework for AWS Lambda — Middy’s aim is to make writing serverless functions (hosted on AWS Lambda) easier by providing a familiar middleware abstraction to Node developers. The example in this post shows off the main benefit. Luciano Mammino Rust and Node.js: A Match Made in Heaven? — This is technical stuff but using other languages, such as Rust, for building add-ons for Node is an interesting area. Anshul Goyal Faster CI/CD for All Your Software Projects Using Buildkite — See how Shopify scaled from 300 to 1800 engineers while keeping their build times under 5 minutes. Buildkite sponsor Editly: Slick, Declarative Command Line Video Editing — I’ve long wondered why there isn’t a good way to “code” video editing at the command line other than wrangling with arcane ffmpeg options. Well.. this uses ffmpeg, but it handles a lot of the wrangling for you. Mikael Finstad Node v14.1.0 (Current) Released — Last week we featured the release of Node 14.0 and 14.1 is already with us. Principally bug fixes, plus an update to the OpenSSL dependency. Bethany Nicolle Griggs ???? Jobs Backend Developer (Skien, Norway) — We are looking for a full-stack dev with a solid track record to help us adapt to tomorrow's security requirements. OKAY Find a Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started. Vettery ℹ️ If you're interested in running a job listing in this newsletter, there's more info here. ???? Articles & Tutorials Four Tools for Web Scraping in Node — A walk through of a few different libraries (for scraping and parsing data directly from websites) to see how they work and how they compare to each other. Sam Agnew Six Platforms for Hosting a Node App in 2020 — Of course, you can run a Node app pretty much anywhere there’s a server, but some platforms make it easier than others. These all have free tiers too. Glitch, Now.sh (now Vercel) and Heroku are particular favorites of ours at Cooperpress. Amit Bendor Getting Started with NuxtJS — Learn how to create Vue.js-powered server-side rendered apps with NuxtJS including configuring an app and deploying it on Heroku. Timi Omoyeni The Node.js Security Handbook — Improve the security of your Node.js app with the Node.js security handbook made for developers. Sqreen sponsor A Collection of Challenging TypeScript Exercises — “The goal: Let everyone play with many different TypeScript features and get an overview of TypeScript capabilities and principles.” Marat Dulin Exploring Node.js Internals — It’s reasonably elementary but Aleem Isiaka explains how the internals of Node.js interact with one another on a simple task such as creating a file. Smashing Magazine Creating CommonJS-Based npm Packages via TypeScript Dr. Axel Rauschmayer Turning Vue Components Into Reusable npm Packages — Outlines how you can reuse Vue components across your projects by automating your process to bundle, test, document, and publish your components. Sjoerd de voorhoede ???? Tools, Resources and Libraries Node v12.16.3 (LTS) Released — OpenSSL gets an update, and warnings are no longer printed for modules that use conditional exports or package name self resolution. Node.js pm2 4.4 Released: The Node Production Process Manager — A very mature and widely used process manager that includes a load balancer for keeping Node apps alive forever and to reload them without downtime. v4.4 improves the Node 14 compatibility. Alexandre Strzelewicz jpeg-js: A Pure JavaScript JPEG Encoder and Decoder — It admits it’s far slower than native alternatives but if you need a pure JavaScript JPEG encoder/decoder, this is where to go. Eugene Ware AppSignal Now Supports Node.js: Roadmap for the Coming Weeks AppSignal sponsor node-stream-zip: For Fast Reading of ZIP Archives — Reads chunk by chunk rather than all in one go so it’s memory friendly. Dimitri Witkowski JZZ: A MIDI Library for Node and Web Browsers — Send, receive and play MIDI messages from both Node and the browser on Linux, macOS and Windows. Sema Vegemite: A Pub/Sub State Manager — Inspired by Immer and Redux, full TypeScript support, and sized at only 623 bytes, which includes one dependency. Luke Edwards Kanel: Generate TypeScript Types from Postgres Kristian Dupont web-worker: Consistent Web Workers for the Browser and Node — In Node it works as a web-compatible Worker implementation atop worker_threads. In the browser it’s an alias for Worker. Jason Miller node-csv-parse: A CSV Parser Implementing the stream.Transform API Adaltas Full Article
es The 2019 Go developer survey results are available By golangweekly.com Published On :: Fri, 24 Apr 2020 00:00:00 +0000 #309 — April 24, 2020 Unsubscribe : Read on the Web Golang Weekly Go Developer Survey 2019 Results — The annual survey results are here but calculated differently than in previous years. See how the community feels, what tools we use, and what we’re really using Go for. The Go Blog Fiber: An Express.js Inspired Web Framework for Go — If you know Express (from the Node world) than Fiber will look very familiar. It supports middleware, WebSockets, and various template engines, all while boasting a low memory footprint. Built on top of FastHTTP. Fiber We Now Offer Remote Go, Docker or Kubernetes Training — We offer live-streaming remote training as well as video training for engineers and companies that want to learn Go, Docker and/or Kubernetes. Having trained over 5,000 engineers, we have carefully crafted these classes for students to get as much value as possible. Ardan Labs sponsor A Comparison of Three Programming Languages for Bioinformatics — This is quite an academic piece but basically Go, Java and C++ were put head to head in an intensive bioinformatics task. The good news? Go won on memory usage and beat the C++17 approach (which was admittedly less than ideal) in performance. The team in question chose Go going forward. BMC Bioinformatics Go for Cloud — A Few Reflections for FaaS with AWS Lambda — A response to a this article about Go’s pros and cons in the cloud. You should read both. Filip Lubniewski ???? Jobs Enjoy Building Scalable Infrastructure in Go? Stream Is Hiring — Like coding in Go? We do too. Stream is hiring in Amsterdam. Apply now. Stream Golang Developer 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 ???? Articles & Tutorials An Introduction to Debugging with Delve — If you’re in the “I don’t really use a debugger..” camp, Paschalis’s story and brief tutorial might help you dip a toe into the water. Paschalis Tsilias Object Ordering in Go — This is all about object comparison and the types of comparisons that are allowed in Go. Reading this post > Not reading this post. Eyal Posener How to Manage Database Timeouts and Cancellations in Go — How to cancel database queries from your app and what quirks and edge cases you need to be aware of. Alex Edwards The Go Security Checklist — From code to infrastructure, learn how to improve the security of your Go applications with the Go security checklist. Sqreen sponsor Data Logging with Go: How to Store Customer Details Securely — Specifically, this looks at using custom protobuf FieldOptions to mark fields as OK to log and reflection to check those options. Vadzim Zapolski-Dounar How to Install Go in FreeBSD in 5 Minutes — You can use a package manager, but this way has advantages and it’s easy. Jeremy Morgan ???? Code & Tools Fynedesk: A Fyne-Powered Full Desktop Environment for Linux/Unix — Previously we’ve linked to Fyne, a Go-based cross-platform GUI framework, but now it’s been used to create an entire Linux desktop environment! Fyne.io Lockgate: A Cross-Platform Locking Library — Has support for distributed locks using Kubernetes and OS file locks support. Flant Pomerium: An Identity-Aware Secure Access Proxy — An identity aware access-proxy modeled after Google’s BeyondCorp. Think VPN access benefits but without the VPN. Built in Go, naturally. Pomerium Beta Launch: Code Performance Profiling - Find & Fix Bottlenecks Blackfire sponsor Apex Log: A Structured Logging Package for Go — Inspired by Logrus. Apex mediary: Add Interceptors to the Go HTTP Client — This opens up a few options: tracing, request dumping, statistics collection, etc. Here Mobility SDK iso9660: A Go Library for Reading and Creating ISO9660 Images — The use cases for this will be a bit niche. The author created it to dynamically generate ISOs to be mounted in vSphere VMs. Kamil Domański pxy: A Go Livestream Proxy from WebSockets to External RTMP Endpoints Chua Bing Quan Full Article
es Confessions of a call-centre scammer By www.bbc.co.uk Published On :: Sun, 08 Mar 2020 00:09:20 GMT How Indian call-centre scammers justified tricking Western victims out of hard-earned money. Full Article
es 'How do I convince the Home Office I'm a lesbian?' By www.bbc.co.uk Published On :: Wed, 26 Feb 2020 00:32:26 GMT More than 1,500 people claim asylum in the UK each year, claiming that they are persecuted for being gay. But it's not an easy thing to prove. Full Article
es Blasian love: The day we introduced our black and Asian families By www.bbc.co.uk Published On :: Wed, 11 Mar 2020 00:20:43 GMT Blasian - black and Asian - couples now exist in South Africa... but they don't always have an easy time. Full Article
es Extreme piercing: A festival of self-inflicted pain By www.bbc.co.uk Published On :: Fri, 17 Apr 2020 23:45:49 GMT Since time immemorial, a village in West Bengal has paid tribute to Shiva by self-inflicting pain. This year coronavirus put a stop to it. Full Article
es Coronavirus: 'Depression feels like my cat is sitting on my chest' By www.bbc.co.uk Published On :: Fri, 17 Apr 2020 02:58:57 GMT Two young people describe how the coronavirus pandemic and the lockdown have affected their mental health. Full Article
es The man who grew his own Amazon rainforest By www.bbc.co.uk Published On :: Wed, 01 Apr 2020 23:07:59 GMT Fighting back against destruction in the Amazon: how one man grew a rainforest of his own. Full Article
es From patient to healer: How this woman is saving lives By www.bbc.co.uk Published On :: Wed, 08 Apr 2020 23:17:58 GMT Women who have overcome depression are running therapy sessions to help others Full Article
es Ex porn-star and activist explores men's rights issues By www.bbc.co.uk Published On :: Tue, 21 Apr 2020 06:16:04 GMT Philipp travels to a conference on men’s issues in Chicago, shedding light on the controversial movement. Full Article
es Coronavirus: Flower grower donates blooms to key workers By www.bbc.co.uk Published On :: Sun, 05 Apr 2020 00:06:58 GMT Horticulturalist Ben Cross is working with supermarkets to donate flowers to NHS workers. Full Article
es Coronavirus: Three perspectives on furloughing By www.bbc.co.uk Published On :: Tue, 07 Apr 2020 23:09:17 GMT Three people react to the furloughing scheme put in place in response to the coronavirus outbreak. Full Article
es Coronavirus crisis forces farmers to throw milk away By www.bbc.co.uk Published On :: Wed, 08 Apr 2020 23:16:01 GMT Some dairy farmers are throwing away thousands of litres amid supply chain disruption due to coronavirus. Full Article
es Coronavirus tests and masks sold by fraudsters online By www.bbc.co.uk Published On :: Fri, 10 Apr 2020 04:54:22 GMT A BBC investigation has found online scams selling fake protective equipment and coronavirus tests. Full Article
es Bill Gates: Few countries will get 'A-grade' for coronavirus response By www.bbc.co.uk Published On :: Sun, 12 Apr 2020 05:00:05 GMT The Microsoft billionaire says we find ourselves in uncharted territory with the coronavirus pandemic. Full Article
es Virus vaccine research 'enormously accelerated' By www.bbc.co.uk Published On :: Tue, 14 Apr 2020 21:19:00 GMT A vaccine normally takes a decade to develop, but GSK and Sanofi want a viable coronavirus vaccine by the end of next year, GSK chief executive Emma Walmsley says. Full Article
es Coronavirus: The unexpected items deemed 'essential' By www.bbc.co.uk Published On :: Wed, 15 Apr 2020 23:07:31 GMT Cheese shops and gun stores are among the services still open in locked down places around the world. Full Article
es Coronavirus: UK chancellor on new microloan scheme for small businesses By www.bbc.co.uk Published On :: Mon, 27 Apr 2020 16:30:38 GMT Firms will be able to borrow up to £50,000, which will be interest free for the first year. Full Article
es Chancellor: 'Tough times' as coronavirus affects UK economy By www.bbc.co.uk Published On :: Mon, 27 Apr 2020 15:48:21 GMT The chancellor says there have already been "tough times" as the coronavirus outbreak has an impact on the UK and warns "there will be more to come". Full Article
es Coronavirus: Three continents, four lives, one day By www.bbc.co.uk Published On :: Thu, 30 Apr 2020 23:10:26 GMT The stories of people who died on one day, from an exile who returned home to a disaster survivor. Full Article
es Coronavirus: Disease meets deforestation at heart of Brazil's Amazon By www.bbc.co.uk Published On :: Mon, 04 May 2020 01:24:37 GMT Coronavirus has overwhelmed Manaus, the Amazon's biggest city, and the worst is yet to come. Full Article
es Millie Small: My Boy Lollipop singer dies aged 72 By www.bbc.co.uk Published On :: Wed, 06 May 2020 09:47:49 GMT The singer, who had Jamaica's first million-selling single, dies after suffering a stroke. Full Article
es Mexico receives ventilator shipment from US By www.bbc.co.uk Published On :: Wed, 06 May 2020 15:44:54 GMT The 211 machines were purchased from a US firm, Mexico's foreign minister said. Full Article
es Brazil's Amazon: Surge in deforestation as military prepares to deploy By www.bbc.co.uk Published On :: Fri, 08 May 2020 21:17:52 GMT The military is preparing to deploy to the region to try to stop illegal logging and mining. Full Article
es Coronavirus: Brazil's outbreak 'threatens Paraguay's success' By www.bbc.co.uk Published On :: Sat, 09 May 2020 04:20:41 GMT Paraguay's president says he has reinforced the border with the worst-hit country in South America. Full Article
es Venezuela: Trump denies role in bungled incursion By www.bbc.co.uk Published On :: Fri, 08 May 2020 19:25:57 GMT Venezuela has accused the US of being behind a botched raid to oust President Maduro. Full Article
es Using Proxies with Redux Types By reactjsnews.com Published On :: Tue, 28 Mar 2017 16:00:00 +0000 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 Full Article
es 2008 Club World Cup Final: LDU Quito 0-1 Manchester United By www.fifa.com Published On :: Mon, 10 Dec 2012 02:58:00 GMT Liga de Quito-Manchester United, FIFA Club World Cup Japan 2008 Final: Both teams showed impressive attacking flair, but it was Wayne Rooney's angled shot that made the difference. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2008
es 2009 Club World Cup: Estudiantes 1-2 Barcelona (AET) By www.fifa.com Published On :: Tue, 11 Dec 2012 03:06:00 GMT A:Estudiantes-Barcelona, FIFA Club World Cup UAE 2009 final: Barcelona won their sixth trophy of the year following a last-gasp equaliser and a headed winner in extra time against a dogged Argentine opponent. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup UAE 2009
es Esperance 1-1 (6-5 pens) CD Guadalajara (UAE 2018) By www.fifa.com Published On :: Tue, 18 Dec 2018 16:42:00 GMT Nine-man Esperance ended their FIFA Club World Cup UAE 2018 campaign on a high after a tense 6-5 penalty shoot-out win against Chivas in the match for fifth place. Full Article Area=Tournament Section=Competition Kind=Match HL Tournament=FIFA Club World Cup UAE 2018
es Javier Ceppi, Praful Patel, and Jaime Yarza speak to the media during a press conference By www.fifa.com Published On :: Thu, 26 Oct 2017 14:03:00 GMT KOLKATA, INDIA - OCTOBER 26: L-R: Javier Ceppi, Tournament Director at LOC FIFA U-17 World Cup India 2017, Patel Praful and Head of FIFA Tournaments, Jaime Yarza speak to the media during a press conference ahead of the FIFA U-17 World Cup India 2017 tournament at Vivekananda Yuba Bharati Krirangan on October 26, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es Javier Ceppi, Praful Patel and Jaime Yarza speak during a India 2017 press conference By www.fifa.com Published On :: Thu, 26 Oct 2017 14:07:00 GMT KOLKATA, INDIA - OCTOBER 26: L-R: Javier Ceppi, Tournament Director at LOC FIFA U-17 World Cup India 2017, Patel Praful and Head of FIFA Tournaments, Jaime Yarza speak to the media during a press conference ahead of the FIFA U-17 World Cup India 2017 tournament at Vivekananda Yuba Bharati Krirangan on October 26, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es Praful Patel and Jaime Yarza speak to the media during an India 2017 press conference By www.fifa.com Published On :: Thu, 26 Oct 2017 14:11:00 GMT KOLKATA, INDIA - OCTOBER 26: Patel Praful and Head of FIFA Tournaments, Jaime Yarza speak to the media during a press conference ahead of the FIFA U-17 World Cup India 2017 tournament at Vivekananda Yuba Bharati Krirangan on October 26, 2017 in Kolkata, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es Claudio Gomes of France and Abel Ruiz of Spain pose for photos By www.fifa.com Published On :: Fri, 27 Oct 2017 13:00:00 GMT GUWAHATI, INDIA - OCTOBER 17: Claudio Gomes of France and Abel Ruiz of Spain pose for photos with referees prior to the FIFA U-17 World Cup India 2017 Round of 16 match between France and Spain at Indira Gandhi Athletic Stadium on October 17, 2017 in Guwahati, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es Abel Ruiz of Spain celebrates a scored goal By www.fifa.com Published On :: Fri, 27 Oct 2017 13:01:00 GMT MUMBAI, INDIA - OCTOBER 25: Abel Ruiz of Spain celebrates a scored goal during the FIFA U-17 World Cup India 2017 Semi Final match between Mali and Spain at Dr DY Patil Cricket Stadium on October 25, 2017 in Mumbai, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es The dressing room of Mali team By www.fifa.com Published On :: Sat, 28 Oct 2017 11:43:00 GMT 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) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es The dressing room of Brazil team By www.fifa.com Published On :: Sat, 28 Oct 2017 11:43:00 GMT 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) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es The dressing room of Mali team By www.fifa.com Published On :: Sat, 28 Oct 2017 11:44:00 GMT 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) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es The dressing room of Brazil By www.fifa.com Published On :: Sat, 28 Oct 2017 11:44:00 GMT 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) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
es The dressing room of Brazil team By www.fifa.com Published On :: Sat, 28 Oct 2017 11:45:00 GMT 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) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017