FEX 技术周刊 - 2018/07/09
人类历史上有太多里程碑式的创新，源起于微不足道的梦想，最终成长为改变世界的力量。而在这个AI时代，每一个梦想都更有机会成为现实，每一位开发者的创新与现实仅有一步之遥。2018年夏天，百度诚邀全球开发者，发现改变世界的力量，让我们一起 Create More。
Web Components in 2018
Adoption and hype around Web Components have been extended and undulating. That said, as the Web Component specifications gain better adoption, the need for polyfills should gradually dissolve, keeping them leaner and faster for users. The Shadow DOM allows developers to write simple, scoped CSS which is arguably easier to manage and generally better for performance. Custom Elements give a unified methodology for defining components that can (in theory) get used across codebases and teams.
Vue.js: the good, the meh, and the ugly
Moving from React to Vue, two years later. Picking up new frameworks and libraries is exciting but also stressful. Even after some evaluation you never really know what skeletons you’re going to find out down the road. My honeymoon period is long over. After about 2 years of using Vue almost daily I can finally write about it with some perspective. 另附：Building Mobile Apps With Capacitor And Vue.js.
What Is Redux: A Designer’s Guide
Do you know Redux’s real power is beyond managing the state? Do you want to design with an understanding of how Redux works in mind? Let’s dig deeper into what Redux can do, why it does its things, what the downsides are, and how it relates to design.
React Native: A retrospective from the mobile-engineering team at Udacity
The mobile team here at Udacity recently removed the last features in our apps that were written with React Native. We’ve received numerous questions regarding our usage or React Native and why we’ve stopped investing in it. In this post, I hope to answer the majority of the questions we’ve received and give insight into: What is the size & makeup of our particular team? Why did we try React Native in the first place? What was the reason for removing it? What worked? What didn’t? 另附：Would Airbnb Have Fared Better With NativeScript Instead of React Native、Releasing 0.56 · React Native.
微前端架构是一种类似于微服务的架构，它将微服务的理念应用于浏览器端，即将 Web 应用由单一的单体应用转变为多个小型前端应用聚合为一的应用。由此带来的变化是，这些前端应 用可以独立运行、独立开发、独立部署。以及，它们应该可以在共享组件的同时进行并行开发——这些组件可以通过 NPM 或者 Git Tag、Git Submodule 来管理。
科普文：服务器上如何 Node 多版本共存
很多公司的服务器环境没有做隔离，就是全局安装一个 Node.js Runtime，一般很少升级。nvs / nvm 等可以用来切换版本，但无法同时共存。而且一般服务器不允许你随意升级。因此很多同学都会很痛苦：「都 8012 年了，还是 Node 4.x 甚至 0.x 简直想死！」时至今天，最好的办法就是 Docker。但奈何很多小公司还处于水深火热之中。本文将介绍下我们很早前就使用的一套方案，可以完美解决非 Docker 情况下 Node 多版本共存问题。科普文：为什么不能在服务器上 npm install
Maybe type is a popular abstraction for defining values that may or may not exist. It encapsulates the type checking and guards our code against any error or bugs caused by the missing values. In this post, I will show how to use Maybe and keep your app readable and maintainable. Let’s dive in.
Pointer events with React — The why, how, what?
Back in the good old days we only had a mouse and listening for events was simple. The web content assumed the user’s pointing device will be a mouse. Nowadays we have many devices which don’t correlate to having a mouse, like phones with touch surface or pens. How can we listen for events if the user doesn’t have a mouse?
Resilient, Declarative, Contextual
Today I want to take a different tack. I want to look at three key characteristics of CSS that set it apart from conventional programming languages: it’s resilient; it’s declarative; and it’s contextual. Understanding these aspects of the language, I think, is key to becoming proficient in CSS.
Clearfix: A Lesson in Web Development Evolution
The web community has, for the most part, been a spectacularly open place. As such, a lot of the best development techniques happen right out in the open, on blogs and in forums, evolving as they’re passed around and improved. I thought it might be fun (and fascinating) to actually follow this creative exchange all the way through. To take a look at a popular CSS trick, the clearfix, and find out exactly how a web design technique comes to be.
Building a Snipping Tool with Electron, React and Node.js
In this tutorial, I’ll show how to build a snipping tool using desktopCapturer module. We’ll use React for building our application’s user interface and Nodejs as a backend server for uploading snipped images.
A Real-World WebAssembly Benchmark
How to drop 10 million packets per second
Internally our DDoS mitigation team is sometimes called “the packet droppers”. When other teams build exciting products to do smart things with the traffic that passes through our network, we take joy in discovering novel ways of discarding it. Being able to quickly discard packets is very important to withstand DDoS attacks. Dropping packets hitting our servers, as simple as it sounds, can be done on multiple layers. Each technique has its advantages and limitations. In this blog post we’ll review all the techniques we tried thus far.
A one size fits all database doesn’t fit anyone
A common question that I get is why do we offer so many database products? The answer for me is simple: Developers want their applications to be well architected and scale effectively. To do this, they need to be able to use multiple databases and data models within the same application.
The Not-So-Dark Art Of Designing Database Indexes: Reflections From An Average Software Engineer
What I eventually came to realize, after years of impostor syndrome, was that database index design is simply not that mysterious: If you need to access data quickly, you index it. If the performance of data access isn’t a concern, you don’t index it. That’s 90-percent of what you need to know about database indexing
Rules of optimization
Basically Programming Wisdom (which btw often is a great sources for actual programming wisdom) posted a quote that basically suggested more or less that there’s never a good time to think about performance. Even experts should defer it until later! This is way worse advice than your usual “premature optimization is the root of all evil” tirade. The premature optimization at least addresses something that can be a bit of a problem, i.e. that programmers go ahead and obfuscate code in order to make it faster, without even looking at whether the code had any performance problem to begin with or verifying that the new code actually is any faster, and in the process of doing this introducing bugs and reducing readability.
Timsort — the fastest sorting algorithm you’ve never heard of
Timsort: A very fast , O(n log n), stable sorting algorithm built for the real world — not constructed in academia.
Kubernetes 1.11: a look from inside Google
With the release of 1.11, let’s take a look at the core Kubernetes work that Google is driving, as well as some of the innovation we’ve built on Kubernetes’ foundations in the last three months.
Democratizing APIs with Natural Language Interfaces
We have been studying natural language interfaces to APIs (NL2APIs). Different from general-purpose NLIs like virtual assistants, we examined how to build NLIs for individual web APIs, for example, the API to a calendar service. Such NL2APIs have the potential to democratize APIs by helping users communicate with software systems. They can also address the scalability issue of general-purpose virtual assistants by allowing for distributed development.
I am pleased to announce that npm is transitioning its public issue trackers from GitHub to a Discourse site at npm.community. This will allow us to give the community a single place to report bugs that impact npm, regardless if they’re on the website, in the command line tool or in the registry itself.
Let’s celebrate Hugo’s 5th birthday
How a side project became one of the most popular frameworks for building websites.
Office UI Fabric
The official front-end framework for building experiences that fit seamlessly into Office and Office 365.
SSR for React that’s invisible (zero configuration!) and quick (no Webpack!)
React From Zero
A simple (99% ES2015 less) tutorial for React. Everything runs in the browser without a manual pre-compilation. 另附：Formik - Build forms in React, without the tears.
Rete is a modular framework for visual programming. Rete allows you to create node-based editor directly in the browser. You can define nodes and workers that allow users to create instructions for processing data in your editor without a single line of code.
Convert HTML to PDF online with PDFShift’s lightning-fast and powerful API
CSS Grid Layout Interface Builder
WebSub provides a common mechanism for communication between publishers of any kind of Web content and their subscribers, based on HTTP web hooks. Subscription requests are relayed through hubs, which validate and verify the request. Hubs then distribute new and updated content to subscribers when it becomes available. WebSub was previously known as PubSubHubbub.
GoAccess - Visual Web Log Analyzer
GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.
Command-line program to download videos from YouTube.com and other video sites.
GCFS - A FUSE file system based on Google Drive
GCSF is a virtual filesystem that allows users to mount their Google Drive account locally and interact with it as a regular disk partition. You can find out more in this paper.
A graph of programming languages connected through compilers. This project shows a graph where the nodes are programming languages and the edges are compilers. The graph is drawn using Cytoscape.js, particularly the CoSE layout module.The data for the list of compilers is sourced from the compilers.js module.
A Linux terminal recorder written in Python that renders your command line sessions as standalone SVG animations.
Timeline 2.0 — Interaction Design for Sketch
Design Interactions and Export Code, Directly in Sketch.
“MVP vs. MDP” and the winner is…
MDP - Stands for Minimum Desirable Product or someone even says Minimum Delightful Product.MVP - Stands for Minimum Viable Product.
Order Out of Chaos: Patterns of Organization for Writing on the Job
Given the endless variety of writing situations, there is no such thing as a single organization solution. But saying that “advice varies widely depending on the situation” doesn’t tell the whole story. There are flexible patterns and principles that can guide you in finding, customizing, and creating structures for your goals. The key thing to remember is that structure affects meaning. The sequence of information, the categories you use, the emphasis you imply through your hierarchy—all of these decisions impact how well your audience understands what you write. Your ideal structure should therefore reinforce what you mean to say.
Design Principles That Help You Shape The Best User Experience
Every product has an ultimate goal — to help people solve certain problems. When designing a product, you need to keep user experience in mind, you don’t want to create a product that is more complicated than the actual problem the users have. There are some principles to follow when designing a product. It could be an app, a website or a physical product. These principles would help you shape better user experience.
Better Research, Better Design, Better Results
Most web professionals like to see their influence felt in web design projects as early as possible, in order to make sure what they have to say gets heard. Yet often SEOs and content marketers are asked to step in post-launch when the design work is more or less complete. However, there are very real benefits, ranging from better UX to lower costs to using SEO-focused data such as keyword research as a springboard for design and development, rather than having to turn to it further down the line.
Mobile App Design Best Practices and Mistakes
The most common mistakes span from failing to maintain consistency throughout the lifespan of an app to difficulty attracting users in the first place. It’s challenging to design an app with intuitive simplicity without it becoming repetitive and boring. An app has to offer pleasing design and UX details without losing sight of a greater purpose. Most apps live and die in the first few days, so following some basic mobile app design best practices and avoiding the most common mistakes will help designers create apps that live past that 90-day mark.
Dribbble’s Sarah Kuehnle - Community is everything
In case you haven’t noticed, we at InVision are huge Dribbble fans. The invite-only social platform for designers launched in 2009 and has since become the best place to share illustrations, animations, wireframes, photography, and other creative work.
EU copyright law
Italy Wikipedia shuts down in protest at EU copyright law、Spanish Wikipedia also shuts down in protest at proposed EU copyright law、Latest Text Of EU Copyright Directive Shows It’s Even Worse Than Expected: Must Be Stopped、Controversial copyright law rejected by EU parliament
Tim Berners-Lee’s Solid is a platform designed to re-decentralize the web
The idea is simple: re-decentralize the Web. Working with a small team of developers, he spends most of his time now on Solid, a platform designed to give individuals, rather than corporations, control of their own data. “There are people working in the lab trying to imagine how the Web could be different. How society on the Web could look different. What could happen if we give people privacy and we give people control of their data,” Berners-Lee told me. “We are building a whole eco-system.”
Founder to CEO
I coach tech startup CEOs (and tech investors) in Silicon Valley, most of whom are young technical founders. They include the CEOs of Coinbase, ClearBit, AngelList, CoinList, TrustToken, Bolt, Shogun, Speechify, etc. In my coaching, I found several things: Becoming a great CEO requires training; For a founding CEO, there is precious little time to get that training, especially if her company is succeeding; While there are many books out there with excellent and relevant knowledge for the founding CEO, there is no single book that is a compendium of all the things she needs to learn; My mentees and I repeatedly solve the same core issues together. In this book, I have simply written down the solutions that we came up with. And hopefully it will serve as a compendium so that you can become a great CEO in the very little time you have to do so.
– THE END –