Posts

React patterns, techniques, tips and tricks

A compilation of React Patterns, techniques, tips and tricks. Gitbook format :  https://vasanthk.gitbooks.io/react-bits Your contributions are heartily ♡ welcome. (✿◠‿◠) Design Patterns and Techniques Conditional in JSX Async Nature Of setState() Dependency Injection Context Wrapper Event Handlers Flux Pattern One Way Data Flow Presentational vs Container Third Party Integration Passing Function To setState() Decorators Feature Flags Component Switch Reaching Into A Component List Components Format Text via Component Share Tracking Logic Anti-Patterns Introduction Props In Initial State findDOMNode() Mixins setState() in componentWillMount() Mutating State Using Indexes as Key Spreading Props on DOM elements Handling UX Variations Introduction Composing UX Variations Toggle UI Elements HOC for Feature Toggles HOC props proxy Wrapper Components Display Order Variations Perf Tips Introduction shouldComponentUpdate() check Using Pur...

Pyro - Deep universal probabilistic programming with Python and PyTorch

Image
Please also refer to the  Pyro homepage . Pyro is a flexible, scalable deep probabilistic programming library built on PyTorch. Notably, it was designed with these principles in mind: Universal : Pyro is a universal PPL -- it can represent any computable probability distribution. Scalable : Pyro scales to large data sets with little overhead compare to hand-written code. Minimal : Pyro is agile and maintainable. It is implemented with a small core of powerful, composable abstractions. Flexible : Pyro aims for automation when you want it, control when you need it. This is accomplished through high-level abstractions to express generative and inference models, while allowing experts easy-access to customize inference. Pyro is in an alpha release. It is developed and used by  Uber AI Labs . More information is available in the  launch blog post . Installation First install  PyTorch . Install via pip: Python 2.7.*: pip install pyro-ppl Python 3.5...

Uber's cross-platform mobile architecture

Image
RIBs is the cross-platform architecture behind many mobile apps at Uber. The name RIBs is short of Router, Interactor and Builder, which are core components of this architecture. This framework is designed for mobile apps with a large number of engineers and nested states. The RIBs architecture provides: Shared architecture across iOS and Android.  Build cross-platform apps that have similar architecture, enabling iOS and Android teams to cross-review business logic code. Testability and Isolation.  Classes must be easy to unit test and reason about in isolation. Individual RIB classes have distinct responsibilities like: routing, business, view logic, creation. Plus, most RIB logic is decoupled from child RIB logic. This makes RIB classes easy to test and reason about independently. Tooling for developer productivity.  RIBs come with IDE tooling around code generation, memory leak detection, static analysis and runtime integrations - all which improve developer p...

Version 5.0.0 of Angular Now Available

They are pleased to announce version 5.0.0 of Angular, pentagonal-donut. This is a  major release  containing new features and bugfixes. This release continues our focus on making Angular smaller, faster, and easier to use. Here’s a breakdown of some of the biggest changes in v5. For the full list, please see the  changelog . Build Optimizer As of 5.0.0, production builds created with the CLI will now apply the build optimizer by default. The build optimizer is a tool included in our CLI for making your bundles smaller using our semantic understanding of your Angular application. The build optimizer has two main jobs. First, we are able to mark parts of your application as  pure , this improves the tree shaking provided by the existing tools, removing additional parts of your application that aren’t needed. The second thing the build optimizer does is to remove Angular decorators from your application’s runtime code. Decorators are used by the compiler...