- The Red Queen Effect
- Getting the World to Do the Work for You- Joseph Tussman
- Schlep Blindness
- Lessons From Biology
- We are What we Remember
- Externalities - and then what?
- Tragedy of Commons
- Effective Learning
- Double loop Learning
- Bayesian Updating
- To Explore or Exploit
- Ideas that can change Life
- Process vs outcome
- Models are not exact but useful in certain conditions
- Smart Decision Making
- How to not be Stupid
- How to think
- Decision Making Process
- 100 true fans
- Thinking Rate is Fixed
- Focusing on simplicity
- Winning a Election
- Problem Solving
- Equality
- Economic Growth
- How to Act
- On Humour
- Being Special
- Decentralization of News
- How to generate Ideas
- The fall of Institutions
- The Death of Middle
- The Middle men are no longer needed
- Being a better Manager
- Knowledge Makes everything simpler
- Working hard
- Creating vs Consuming
- Problems of defining yourself by your job
- Tips for being a great Programmer
- Learn the intuition of learning before gaining new knowledge
- Code base: One app should have one repo, if multiple app are sharing code then it should be refactored into library. One repo will have multiple deployments (prod, staging, local, variants etc)
- Dependencies: All projects should have a explicit dependency declaration and isolation from system dependency. If the app relies of system dependencies then it should be statically linked.
- Configuration: Any value like endpoints, keys etc should be refactored into configs. Best is to add them to env variables. They should not be committed to version control. In android it might not work, as we have to bundle them in apk. But we can still maintain configs separately.
- Resources: Both local and 3rd party services should be considered as attached resources. The resource should be referred only by the url/locator service. There should be only config change and no code change to swap our resources.
- Build, Release, Run: The build state transforms code into runnable, the release stage adds config to the runnable, the run stage take the release and executes it in the execution environment. The whole pipe line in one way flow and any new changes will require a new release. The run stage should be light weight and should able to run without user intervention in case of restarts.
- Activity Results API
- Android dependency Graph
- Constraint Layout with percentage
- Vector Assets
- Work Manager
- Pull Apk from Device
- get Path
adb shell pm path com.example.someapp
- Get APK
adb pull /data/app/com.example.someapp-2.apk
- get Path
- Securing Keys in NDK Layer: You can store api key in the NDK layer which makes it difficult for bad actors to access them. Easy way is just add include C++ while creating project and add kets in native-lib.cpp file.
- Best Way to SHA1, SHA256 and MD5 signatures of your debug or signing certificate
- Set the appropriate variant
./gradlew signingReport
- You can even click gradle -> Project -> app -> tasks -> android -> signingReport
- To get an APKCertSha256Digest
keytool -printcert -jarfile ~/PATH_TO/YOURAPKFILE.apk | grep "SHA256: " | cut -d " " -f 3 | xxd -r -p | openssl base64
echo "SHA256_TEXT_REPRESENTATION" | xxd -r -p | openssl base64
- xxd does a hex dump of input, basically text to binary
- Intro to Pandas
- If you make a column as index you can't access it with
[colum]
you will have to use df.index - GroupBy you can directly call
sum
- If you make a column as index you can't access it with
-
Python List Comprehension A list comprehension looks like this:
new_list = [f(o) for o in a_list if o>0]
This will return every element ofa_list
that is greater than 0, after passing it to the function f. -
You can use the ADB accessibility to change the density of Physical Device or Emulator to test you app UI on small screen devices
adb shell wm density //see current density adb shell wm density 580 //set a different density adb shell wm density reset //reset denity to default
-
You can check out only a subdirectory from a huge git repo. Really helpful when experimenting with google samples.
- You need git version > 2.19 (GitHub is supported)
- Do a sparse clone with no blobs and with history depth 1
git clone \ --depth 1 \ --filter=blob:none \ --sparse \ https://github.com/googlesamples/mlkit.git
- This will only clone a empty repo*
- The enter the repo and sparse-checkout the subdirectory which you need
git sparse-checkout set android/material-showcase
- Switch On a PC remotely
- vscode-snippet (Easily search common code snippets)
- using launchd to run cron jobs
- Espanso Really cool utility which you can use to create text substitution
- AWK
- Redux Thunk
- Optimizing Big query Execution
- Shallow Backup Simple tool to backup your dot files, package list, fonts and configs. Has inbuilt git integration.
- Glitch Online tool to create websites and host directly.
- Command-Option-C will copy the file path
- Holding control during screenshot will copy directly to clipboard
- Apple Books Directory
/Users/<Name>/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents
- Multi Digit Multiplication
- Kotlin Collections
- SQL
- GitFlow
- Design Patterns
- SQL Best Practices
- Firebase Gotchas
- Technical Writing
- Kotlin Coroutines Exception Handling
- Various ways of Handling Exception In Coroutines
- runCatching is Kotlin idiomatic way for try-catch
- Coroutine exception handler should be rarely used, won't work in scopes or inbuilt scopes like lifeCycle or viewModelScope.
- you can use handler directly with supervisorJob.
- It better user supervisorJob most of the time as it doesn't cancel other children when one fails.
- Kotlin, Coroutines and Flows
- In Java and Kotlin the func invocation is *pass-by-value for primitive types(Primitive object like Integer etc) (only java) if you modify the value of pass parameter it does not change but if it is an object the any modification done in function will reflected in the original object. More Details
- Kotlin joinToString
(1..100).joinToString(separator = "\n") { "$it. Point" }
- Kotlin Flows
- You won't get anywhere by making other people feel stupid, no matter how correct you are.
- Being kind is harder than being clever.
Inspired by ashandilya