- Jul 2022
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096
-
But sometimes these books leave the impression that heartfelt desire and hard work alone will lead to improved performance—“Just keep working at it, and you’ll get there”—and this is wrong. The right sort of practice carried out over a sufficient period of time leads to improvement. Nothing else.
practice doesn't make perfect, it's the right kind of practice
-
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096
-
The effectiveness of training data depends primarily on how well it relates to the human defined meaning and how reasonably it represents real model usage. Practically, choices around Training Data have a huge impact on the ability to train a model effectively. Training Data makes sense when a set of conditions are true. For example, training data for a parking lot detection system may have very different views. If we create a training data set based on a top down view (see left side of Figure 1.2) and then attempt to use the image on the right we will get unexpected results. That’s why it’s important that the data we use to train a system closely matches the data our trained system would see in production.
-
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096
-
According to the World Health Organization, 785 million people globally lack basic drinking-water services.2 That’s a little over 10 percent of the world’s population, and even two million Americans don’t have access to safe drinking water or basic plumbing.3 Do you have enough food to eat every day? More than 820 million people in the world were undernourished in 2018.4 No matter how much you hate your job, do you have even the slightest potential or ability to get another one? According to the Global Slavery Index, 40.3 million people were in modern-day slavery in 2016.5 They really don’t have the option to quit. Do you have a proper toilet at home? Around 60 percent of the world’s people (4.5 billion of them) don’t have a toilet that properly manages human waste.6 Do you have high-speed Internet at home? About three billion people aren’t even on the Internet.7 Even twenty-one million Americans lack broadband access.8
-
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096
-
Choice architecture is not just about how websites are designed or how policies are implemented. It is not just about professionals and researchers. We are all designers every day, posing choices to our friends, colleagues, and families. My friend is also a decision designer when, instead of asking his three-year-old whether she is ready to go to bed, he asks if she prefers to fly into bed or bounce into bed. He reported that bedtime became much less stressful for everyone involved when he started presenting options instead of a yes-or-no choice.
-
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096Leap1
-
Despite all the commercial success, the deleterious side of the business was obvious. Dye manufacturing gave rise to dangerous pollution. Factory workers toiled in poorly ventilated facilities, holding only thin cloths over their nose. Washing after work was never enforced, and, in the evenings, workers would walk home with their arms, neck, and face smeared with brilliant streaks of iridescent sheen.14 The toxins caused skin discoloration, blood in the urine, and convulsions. Bladder cancer, known as aniline tumor, was so common that local doctors described it as “the most noticeable occupational disease.”
-
-
by.dynamic-dns.net:7096 by.dynamic-dns.net:7096
-
The shift from a system in which the debt notes are convertible to a tangible asset (e.g., gold and silver) at a fixed rate to a fiat monetary system in which there is no such convertibility last happened in the US on the evening of August 15, 1971. As I mentioned earlier, I was watching on TV when President Nixon told the world that the dollar would no longer be tied to gold. I thought there would be pandemonium with stocks falling. Instead, they rose. Because I had never seen a devaluation before, I didn’t understand how it works.
-
In other words, using the market values of what one owns to measure one’s wealth gives an illusion of changes in wealth that don’t really exist. As far as understanding how the economic machine works, the important thing to understand is that money and credit are stimulative when they’re given out and depressing when they have to be paid back. That’s what normally makes money, credit, and economic growth so cyclical.
-
- Nov 2019
-
brianyang.com brianyang.com
-
Generated black magic code will give us a hard time building on top when we try to adjust or extend it without knowing what it actually does.
Generated black magic code will give us a hard time building on top when we try to adjust or extend it without knowing what it actually does.
-
- Oct 2019
-
brianyang.com brianyang.com
-
With APIs, you pull data from the provider. But webhooks allow the provider to push data to you.
With APIs, you pull data from the provider. But webhooks allow the provider to push data to you.
-
- May 2019
-
brianyang.com brianyang.com
-
Hooks enable a drastically different way to build stateful components in React, which means that they also invalidate 1 a lot of the established patterns.
Hooks enable a drastically different way to build stateful components in React, which means that they also invalidate 1 a lot of the established patterns.
-
- Mar 2019
-
-
While hooks alone are useful, they become even more powerful with the ability to combine them into custom hook functions. By building your own hooks, you are able to extract React logic into reusable functions that can simply be imported into our components. The only caveat to hooks is that you must follow some basic rules.
While hooks alone are useful, they become even more powerful with the ability to combine them into custom hook functions. By building your own hooks, you are able to extract React logic into reusable functions that can simply be imported into our components. The only caveat to hooks is that you must follow some basic rules.
-
- Feb 2019
-
brianyang.com brianyang.com
-
The useRef() Hook isn’t just for DOM refs. The “ref” object is a generic container whose current property is mutable and can hold any value, similar to an instance property on a class.
The useRef() Hook isn’t just for DOM refs. The “ref” object is a generic container whose current property is mutable and can hold any value, similar to an instance property on a class.
-
Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.
Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
Where this gets even more powerful is the ability to create custom hooks that use useStaticQuery in them. Let’s say you need to query for the site title several times in your app. Instead of a call to useStaticQuery in each component, you can extract it out to a custom hook like:
Where this gets even more powerful is the ability to create custom hooks that use useStaticQuery in them. Let’s say you need to query for the site title several times in your app. Instead of a call to useStaticQuery in each component, you can extract it out to a custom hook like:
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
Mocking and testing fetch with Jest
Mocking and testing fetch with Jest
-
-
brianyang.com brianyang.com
-
Add notify and you’ll get desktop notifications when the test runner finishes. If you have thousands of tests, they can take a while to finish. Just by adding this flag you’ll optimize your time.
Add notify and you’ll get desktop notifications when the test runner finishes. If you have thousands of tests, they can take a while to finish. Just by adding this flag you’ll optimize your time.
-
-
brianyang.com brianyang.com
-
Adding type annotations can take a little bit of additional type, but the benefits will undoubtedly pay off. Our code will be less prone to errors, it will be self-documented, and our team members will be much more productive because they will spend less time trying to understand the pre-existing code.
type annotations help us code faster
-
- Jul 2018
-
-
It seems that users prefer to use applications instead of mobile sites on smartphones, but at the same time, they are not eager to install apps from the stores. PWAs solve that problem.
users prefer to use apps instead of mobile sites, but don't want to install apps from the app store
-
- Jun 2018
-
brianyang.com brianyang.com
-
Apollo link state is a way to combine your local state management with your remote state management. The approach assumes you are using Apollo, which allows you to use GraphQL over Rest. However, you do not need a GraphQL server in order to use this approach! – apollo-link-http allows you to write everything you need to adopt Apollo client side. This means that it's a viable all-in-one solution for state management (async and remote included), even if you aren't using GraphQL.
Manage local state and remote state with apollo-link-state, without needing GraphQL, using apollo-link-http
-
-
brianyang.com brianyang.com
-
We knew we had to solve this problem, so we asked ourselves: What would it look like to manage state in Apollo Client? First, we thought about what we liked about Redux — features like its dev tools and binding state to components via connect. We also thought about some of our pain points with Redux, like its boilerplate and its do-it-yourself approach to core features like asynchronous action creators, caching, and optimistic UI.
Managing your local data in Apollo Client with apollo-link-state
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
Any ReactJS codebase should implement a UI-Library as soon as possible, even if it increases the development time in the beginning, it will be a huge win in the long run.
Implement a UI Lib for all React applications.
-
- May 2018
-
brianyang.com brianyang.com
-
Please use Open Zeppelin smart contracts, they help to take the guesswork out of security issues with solidity and ensure that you are deploying a safe smart contract. It is not a silver bullet, but it will help you to develop more secure code.
Use Open Zeppelin smart contracts and write more unit tests.
-
-
brianyang.com brianyang.com
-
What we need is actions and dispatchers to dynamically update the store. What if our dynamic store was just the state of a root React component?
What we need is actions and dispatchers to dynamically update the store. What if our dynamic store was just the state of a root React component?
-
-
brianyang.com brianyang.com
-
First, using change detection only for updating the view state limits the number of places where the application model can be changed. In this example it can happen only in the `rateTalk` function. A watcher cannot "automagically" update it. This makes ensuring invariants easier, which makes code easier to troubleshoot and refactor.
trigger $digest cycle on: User Interaction through events, XMLHttpRequests and Timeouts.
-
-
brianyang.com brianyang.com
-
Now that you have setup the library successful, you can use many algorithms of deep-learning in the start function after net = new convnetjs.Net();, and if you need something to run periodically then use the periodic function.
Use deep-learning algorithms with the constructor.
-
-
-
In order to ensure that happens, Webpack provides chunkhash. Chunkhash is based on the contents of each entry point rather than the entire build. Using that is just as easy:
Chunkhash is based on the contents of each entry point rather than the entire build.
-
-
brianyang.com brianyang.com
-
In this article, I am going to give a quick overview about Node.js and then we will share 50 most recommended node.js framework which will help software developer to boost their skills.
Brief on various node frameworks, mostly unmaintained.
-
-
brianyang.com brianyang.com
-
This problem is a classic one with small to medium companies. The application that is being developed in the company has only unit tests (the base of the pyramid) and nothing else.
Unit tests without integration tests is an anti-pattern
-
- Apr 2018
-
-
This means: Building an app that uses a pre-existing blockchain platform, i.e. Bitcoin, Ethereum, Hyperledger Fabric or similar. This approach is like creating an app that runs on a known operating system.
How are you supposed to build an app that uses the Bitcoin blockchain?
-
“Platform” (Type I DApp) This means: Building a new blockchain and token system, either from scratch or by forking existing blockchains. This approach is like creating your own operating system that other people will eventually build on. Real world examples of DApp I projects include Bitcoin, Ethereum and Hyperledger Fabric, all of which are blockchain platforms other developers can build on.
This is confusing, because Litecoin is just a fork of Bitcoin, with minor changes in the block size.
Also the author fails to distinguish between forking the codebase and forking the blockchain.
-
Platform (Type I DApp) Software (Type II DApp) Specialized Software (Type III DApp)
this author defines these types, which are not agreed upon by the community. this probably should be made clear.
-
Startups are already shifting to a crowdfunded model while angel investors are bound to start buying ICOs instead of stocks.
Startups that disregard the SEC regulations could face criminal charges. Allowing unaccredited investors to own shares in a company, that is intended to go up in value, that they are able to trade, sounds like a security.
-
Identity: An identity blockchain could confirm identities through crowdsourced consensus. With encrypted “proof of existence” biometrically tied to your DNA instead of an easily-compromised identification number, identity theft may become a thing of the past.
a private key can also be easily compromised. whenever a user uses their private key to assert their identity, the service has essentially compromised this key, whether for improved performance or a record of authentication. using blockchain as a solution for identifying an individual means you trust in a centralized party to confirm your identity.
-
The process is beautifully democratic, determining what is true by consensus rather than a decision from one central authority.
More specifically, what is true is determined by the consensus protocol, which is often POW and perhaps in the future, POS.
-
Look at Bitcoin (which is built on blockchain) for an example: every time there’s a transaction, the blockchain network asks multiple computers (nodes) to approve transactions based upon their local blockchain. In order for the transaction to be approved, 51% of nodes have to be in agreement.
the sender uses their private key with their public key, to sign a transaction. miners and full nodes will try to hash a value that is smaller than its target. This takes a tremendous amount of computing power, which is determined by the difficulty level set in the bitcoin network. The first machine to find this key, which publish it to the network, and this gets appended to the blockchain.
-
Blockchain is changing the way we do business, and it’s just getting started. If you’re looking to learn about blockchain and how to incorporate it into your industry, you’re in the right place.
scroll down to read more comments
-
IOTA is definitely worth checking out, even if you’re just curious about exploring a technology that’s even newer than Bitcoin or Ethereum.
This seems to infer IOTA is better because it's newer, but it's not like buying a car. Newer does not equate to better. Newer is less mature, less developed, like a baby. I'd rather trust a grown-up.
-
Using a testnet. This is a private blockchain which runs on your host computer. The goal of a testnet is to debug your blockchain app code without spending real cryptocurrency.
testnet isn't always local. Ethereum testnets include Ropsten, Kovan, and Rinkeby.
-
Blockchain is powerfully more secure than traditional databases because it removes middlemen like banks, businesses and governments from the safety equation, replacing them with distributed nodes — computers in a blockchain network. Each node hosts its own copy of the blockchain database so it can participate in the blockchain peer-to-peer network.
this statement conflates the idea of blockchain and decentralization. these are two fundamentally different concepts. there are many cryptocurrencies that use the blockchain but are not decentralized, like Ripple. Others in where the majority of tokens are owned by the founders, like NEO.
-
It’s understandable that many blockchain discussions feature Bitcoin, but it’s just the tip of the iceberg for blockchain applications. Nearly any form of digital information can be stored in a blockchain, and almost any digital asset can be exchanged with a blockchain-based smart contract.
we have enough problems just storing transactions that amount to bytes in the bitcoin blockchain. sure there are projects out there storing files like IPFS, Siacoin, and Storj, but these technologies have not matured and not suited for enterprise. this also ignores the fact there is a cost that is an order of magnitude greater than a conventional db.
-
Instead of writing a contract in legal terms, imagine writing If-Then statements. This is the premise of a smart contract. Once the contract’s conditions are met, the blockchain automatically executes the autonomous “Smart Contract” for asset exchange. If you think this sounds a lot like Ethereum, you’re right.
bitcoin supports smart contracts, without the security and privacy concerns of ethereum.
-
If you’ve created an app, website or business, you’ve used a database. Remember: when we say “the blockchain”, we’re simply referring to a type of database — one that’s massive, decentralized, peer-to-peer and cryptographically secure. Apps are constantly making implementation choices based on security, performance and programming language constraints. When you base your application on blockchain, it’s really just another implementation choice. Developing an app on a blockchain will influence your programming language choice, app design and testing/debugging processes. In turn, you’ll receive transparency, security and automation (if you develop smart contracts). Although the blockchain community has grown significantly in the last several years, there still aren’t that many blockchain apps or developers. There’s tons of room for innovation and no better time to jump in on the blockchain revolution than now.
these points make it seem like you can choose: blockchain or some db. they are not always interchangeable and there are a lot of unstated costs associated with these kinds of choices. this sounds like you can develop any application on the blockchain, when that's not necessarily the case.
-
- Jan 2018
-
brianyang.com brianyang.com
-
reuse some exisitng configuration files without necessarily understand how Webpack really works.
Get around having to reuse webpack config files.
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
What makes Watson really great to me is its Natural Language Understanding and all the Watson Developer Cloud services are available in beta form, so they are free to use.
Watson Developer Cloud services are available in beta form
Tags
Annotators
URL
-
- Jun 2017
-
-
Throughout a lot of the case studies that Addy features, the heavy-hitters in building for better web experiences lied in link rel=preload, requestIdleCallback(), and HTTP2 Server Push. There were many mentions the PRPL pattern
Build a better web experience with link rel=preload, requestIdleCallback(), HTTP2 Server Push, and PRPL
-
- Feb 2017
-
brianyang.com brianyang.com
-
What is interesting about opinion is that the more you know about a subject, the more opinionated you are likely to be. That can be a good thing. Show me a programmer who doesn't have opinions and I'll show you a programmer who is just doing what they've been told to do. Show me a programmer who has an opinion but can actually argue multiple sides of an argument and I'll show you a programmer who really knows his stuff. If you hold opinions so strongly that you are offended when someone disagrees with you, you have an issue.
having multiple opinions is a good thing
-
- Jan 2017
-
-
In fact, you can compose those components with each others to make more advanced charts. That way, you benefit from already available reusable components. You can even break those advanced components in multiple reusable ones on your end.
Victory gives you composable components and some useful abstractions out-of-the-box, but when your requirements are very specific you will need to use D3 directly.
-
-
brianyang.com brianyang.com
-
If you write code at the peak of your mental capacity, then it will be harder for you to understand it later, not to even mention your colleagues who are not even familiar with the intricacies of the algorithm
Keep your code extremely simple, so when you come back to it 6 months later, you'll know what the heck you were doing.
-
-
brianyang.com brianyang.com
-
PureComponent saves us time and helps us to avoid writing redundant code. It is important to understand the right ways to use it, otherwise its usefulness is voided. Since the PureComponent does shallow comparison, changes inside props or state will be ignored. For example, let's consider a situation where the parent component has a render method and a click handler:
Shortcut to do only shallow comparisons before triggering render will optimize React apps as deep comparisons are expensive.
-
-
-
The process of setting up Lambda that has been demonstrated in this article is very manual and somewhat ephemeral, but there are other ways to configure and initialize Lambda driven by the AWS API.
Serverless just means not having to maintain one, and instead using functions as a service. Easily configurable with some frameworks.
-
- Dec 2016
-
-
Ember tries to solve this with FastBoot. Backbone has Rendr. React has React Isomorphic.
Angular Universal over React Universal, Ember FastBoot, and Backbone Rendr
-
-
-
Whether used on their own or combined together, the best thing about these two features is that they are the perfect progressive enhancement. If your user's browser doesn't support them, they will simply fall back to HTTP/1.1 without Service Workers. Your users may not experience as fast a load time as they would with these two techniques, but it would be no different from their normal experience. HTTP/2 Server Push and Service Workers are really the perfect partners when it comes to web performance.
Pushing data to the user with HTTP2 before the browser has requested it, and serving assets from a cache on subsequent page loads with service workers.
-
-
brianyang.com brianyang.com
-
By restraining the usage of context to be just a dependency injection system, instead of a state container, we can make context based libraries and shouldComponentUpdate behave both correctly without interference, without breaking the API's of consumers. And without requiring a better context implementation in React itself. Just stick to this simple rule:
Use context as dependency injection that will only be called once within a component.
Tags
Annotators
URL
-
-
-
On a related note, multitasking is a really bad idea. To be productive, developers need to focus on one thing at a time.
It costs a lot to switch and do different things. Concentration produces better quality code with less bugs.
-
-
brianyang.com brianyang.com
-
... props are a way of passing data from parent to child. ... State is reserved only for interactivity, that is, data that changes over time.
Managing ephemeral state is often done with a predictable state container such as Redux, Flux, or MobX.
Tags
Annotators
URL
-
-
-
It's a shame that we're all still building custom solutions to this problem rather than collectively using something built into the browser. Users tend to learn the UX features of their browsers if they're exposed to them enough. We don't debate whether a user will have trouble inputting text into an <input>, or selecting an option from a <select>, because these are controls that the user sees in their browser of choice all the time.
Instead of building our own form validation styles we should be using what's built into the browser.
-
-
brianyang.com brianyang.com
-
To get to instant-loading, auto-upgrading experience, all you need to do is combine the laser-sharp leanness of AMPs with the richness of progressive web apps in one (or multiple) of the following ways: AMP as PWA When you can live with AMP's limitations. AMP to PWA When you want to smoothly transition between the two. AMP in PWA When you want to reuse AMPs as a data source for your PWA.
AMPs load instantly and PWAs give you native-like experiences. Some patterns in implementing them together.
-
-
brianyang.com brianyang.com
-
Let's say we have a page that's a simple form. Or simple form will have autocomplete, so we need to make queries. We need to submit the form so we will have a mutation. This same form will be used to allow users to edit the record, so we need multiple mutation queries in one componentX. One way to accomplish this is with compose, which takes multiple mutation queries and runs them simultaneously. You will need to name your queries.
How to GET, POST, and DELETE in one view in a React component on a reactive server with GraphQL
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
This is really simple to use once you have React v15.4.0 in your project. We kindly copied the guide for Google Chrome from v15.4.0 release notes:
Component profiling now ready with React v15.4 in Chrome devtools timeline
Tags
Annotators
URL
-
-
brianyang.com brianyang.com
-
This is where babel-preset-env comes in: it's a Babel preset that automatically determines the correct Babel plugins to use based on the provided environments
Babel presets let you target supported environment. Tell the transpiler how to handle ES2015 and ES2016 constructs and avoid transpiling everything down to ES5, for example.
Tags
Annotators
URL
-
-
-
make your own successful strategy to transform your technology stack quickly and successfully
make your own successful strategy to transform your technology stack quickly and successfully
-
-
brianyang.com brianyang.com
-
automatically update links in a navigation list based on scroll position.
Scrollspy is used to automatically update links in a navigation list based on scroll position.
-
-
-
So as a developer you don't bother with complicated interactions. You just manage changes to the state in response to user or server changes. The UI then updates itself. And they all use a "virtual dom" for performance (use service workers) and to increase portability of rendering (server, client or even native mobile app). A CLI to simplify common tasks and facilitate recommended best-practices.
Predominant theme in JS frameworks - manage changes in your state, directed by the user or server, and the UI updates itself.
-
-
brianyang.com brianyang.com
-
Use React for ephemeral state that doesn't matter to the app globally and doesn't mutate in complex ways.
React components handle state effectively, there's no need to throw in Redux because that's what all the cool kids are doing.
-
-
brianyang.com brianyang.com
-
Electron compiles desktop applications for Windows, Linux, and Mac. Meteor creates a full stack web application and potentially iOS and Android apps via Cordova.
Electron compiles desktop applications for Windows, Linux, and Mac. Meteor creates a full stack web application and potentially iOS and Android apps via Cordova.
-
-
brianyang.com brianyang.comForgekit1
-
React implements a browser-independent DOM system for performance and cross-browser compatibility. We took the opportunity to clean up a few rough edges in browser DOM implementations. In React, all DOM properties and attributes (including event handlers) should be camelCased. For example, the HTML attribute tabindex corresponds to the attribute tabIndex in React. The exception is aria-* and data-* attributes, which should be lowercased. So all DOM attributes and children prop are low-level props. High-level props - are custom props.
reduce code duplication in React components
-
- Nov 2016
-
brianyang.com brianyang.com
-
Use reverse proxy
view
-
- Oct 2016
-
brianyang.com brianyang.com
-
One-way dataflow has proved "the way" forward, even Angular 1.x has it now to steer away from two-way bindings in components to help the migration.
Immutable data structures is the way
-
-
-
Use func stubElement to create fake element Use sinon.fakeServer.create
He's saying you probably want to stay away from using 3rd party libs in components, things that modify the DOM, stating that jQuery doesn't really understand how to work with shadow DOM and might run into problems selecting things that aren't selectable.
-
-
brianyang.com brianyang.com
-
Create your own cli with yeoman generator taking some code from psk
-
-
brianyang.com brianyang.com
-
- browser prefixes broke things so now they're flags
- flexbox for 1 dimension
- grids for two dimension
-
-
brianyang.com brianyang.com
-
Elasticsearch provides almost all its functionality through REST APIs and does not ship with a graphical user interface (GUI). While I cover how you can perform all the necessary operations through APIs and Node.js, there are several GUI tools that provide visual information about indices and data, and even some high level analytics.
no gui
-
-
brianyang.com brianyang.com
-
Use mediator component as higher order component to orchestrate lower level components changing its state and pushing it down.
-
-
brianyang.com brianyang.com
-
Interesting alternative to using express with request
-
-
-
use
Deploying on ssl
-
- Sep 2016
-
brianyang.com brianyang.com
-
- can't create custom attributes
- frameworks want to control the DOM tree
-
-
brianyang.com brianyang.com
-
Interesting React patterns!
-
- Aug 2016
-
-
good stuff
-