Notes of the Day 09-12-2017

      No Comments on Notes of the Day 09-12-2017

Book: “Start with Why”

  1. Take notes when reading for better focus.
  2. Be clear about WHY you are doing something. It’s more important than HOW and WHAT.
  3. Loyalty comes from inspiring people when “why” is clear.
  4. Inspiration != manipulation. When our decisions feel right we are willing to do more to get something.
  5. Clarity + Discipline + Consistency should become your new protein shake.
  6. Don’t do business with laggards(16% of the market). Those are not interested in new things and they boil down everything to price.
  7. Innovators(2.5%) and early adopters(13.5%) are willing to overlook the little mistakes when something has big potential.
  8. Innovators and early adopters are usually the most loyal clients that are better than motivated ones.
  9. Mass market success is 15-18% of the market.
  10. Usually, it’s better to focus on niche than on mainstream market so early adopters can test your product. Others like the early majority(34%), late majority(34%) and laggards probably won’t buy something that was not tested yet.

Article: Reactive Programming by Mindorks

  1. ReactiveX != functional reactive programming because in second one values constantly change over time
  2. Rx has 4 API components: Publisher, Subscriber, Subscription(Disposable in RxJava2), Processor
  3. Publishers: Flowable, Observable, Single, Maybe, Completable
  4. Stream is lazy: code inside create() doesn’t get executed without subscribing to the stream
  5. Cold publishers: Flowable, Observable, begin emitting when there is a subscriber (pull fashion)
  6. Hot publishers begin emitting immediately(push scenarios) but may cause OOME.
  7. Back pressure: AsyncSubject, BehaviourSubject, PublishSubject, ReplaySubject, UnicastSubject
  8. No back pressure: AsyncProcessor, PublishProcessor, ReplyProcessor, UnicastProcessor
  9. RxJava unsubscribes onError
  10. subscribeOn specify which scheduler invokes the code contained in Observable.create()
  11. observeOn allows control to which scheduler executes the cone in the downstream operators
  12. Schedulers: Schedulers.computation()- intensive CPU tasks, IO bound tasks, Schedulers.from(Executor) has custom ExecutorService, Schedulers.newThread()- create a new thread when a worker is needed. Not so popular.
  13. BackPressure relates to a feedback mechanism through which the subscriber can signal to the producer how much data it can consume and so to produce only that amount.
  14. BP strategies: BUFFER– buffers overflow in memory(may produce OOME), DROP– drops overfloating events, LATEST– keep only recent ones, ERROR– throw an error immediately, MISSING– “I don’t care! I will handle it in another way!”
  15. Specialized operators that request MAX_VALUE from upstream: onBackpressureBuffer, onBackpressureDrop, onBackpressureLatest

Leave a Reply

Your email address will not be published. Required fields are marked *