How to use Core Data

Issue #741

Whenever I do Core Data, the Laws of Core Data @davedelong is always my northern star

Below are some of take aways from that post

1) Core Data is more than just SQLite wrapper, it manages objects, relationships, fetching, faulting, …
2) Having 2 context: 1 main and 1 background that are both backed by the persistent coordinator. In modern Core Data stack, NSPersistentContainer has default viewContext already, we just need another newBackgroundContext
3) Never use a fetched NSManagedObject outside its context’s queue.
4) The viewContext is for fetching NSManagedObject on the main queue, and those objects are meant for read only. All mutating operation should be in the background context.
5) Better, like I usually do, is to treat CoreData as a cache, and use plain old struct for UI. This reduces dealing with faulting and optional
6) Using struct that mirrors Core Data NSManagedObject, it looks verbose (you can use code generator or Sourcery for this) but it’s safer
7) A nice trick to quickly convert struct to NSManagedObject is to use reflection with Mirror. NSManagedObject subclasses from NSObject so it is key value compliant

Read more

How to form product idea

Issue #740

How to gain product ideas?

1) Scratch your own itch. If you don’t have any itch to scratch, stop here. This is awkward. Go travelling. Go exploring the world. The world always has problems and needs solution.
Image

2) Build any service, app or website. Along the way you’ll find tons of things you need that and unsolved by existing solutions, and tons of things you can improve upon.

3) Sign up for some paid newsletters to find ideas. This is the worst. This is like someone browsing through a tatoo catalog. You’re doing things for trend, for money, not for your self drive 👎

4) Most product ideas are not that hard, and require little tech skill. There are simple things that many people struggle or can’t do or learn by themselves. They need your help.

5) Read enough to build the mindset. You don’t need to listen to all podcasts, read all the books, attend all the courses to get started. You’re just procrastinating.

6) The only constant is “change”. The best time is now.

7) Does it matter if what you’re about to make has been done by someone else?

Probably not. You’re the master of your own itch, you know how to solve it your way. Every solution is unique and will be developed in different directions

8) Idea is veryvery cheap.
If someone sherlock your idea, execute it better, provider better customer support, understand the domain better. Isn’t it fair to say they deserve better success than you?

9) Is this idea worth executing?

If you ask me, my answer will be NO. Those who are super passionate about their idea will just ignore my advice and do it anyway.

Read more


Updated at 2021-01-04 06:44:45

How to join AppStore Small Business Program

Issue #739

New program reduces App Store commission to 15 percent for small businesses earning up to $1 million per year

1) “earning up to $1 million” means proceeds, not sales. This is what we get after Apple’s cut. “up to” means $999.999
2) “if they earned up to $1 million in proceeds during the previous calendar year”. This means that if $1M is surpassed, the standard rate (30%) kicks in for the rest of the year, and also next year.
3) If a developer’s business falls below the $1 million threshold in a future calendar year (e.g. 2021), they can requalify for the 15 percent commission the year after (e.g. 2022)
4) This is surprising new, follow Apple’s promise in WWDC about changes in Appstore policy. It should be credit to @dhh ‘s fight for hey.com, which somehow affects the decision.
5) Some may need to stop generating revenue, by removing from sale, giving away or moving their apps to different distributing platforms to remedy the threshold surpassing.
6) Now the question is, how to get to the first $1000 😂

Read more

How to deep work

Issue #738

Just found out the book Deep Work by Cal Newport and it has some interesting guidelines
Here’s a very good summary of the book

https://www.youtube.com/watch?v=gTaJhjQHcf8&ab_channel=ProductivityGame

  1. Put a boundary on distraction. Allow yourself to be distracted at predefined time and with limit

a1

  1. Develop a routine habit. Best is to focus in the early morning as there are no other requests

a2

  1. Sleep is crucial. Get enough sleep. Do a complete shutdown in the evening.

a3

Read more