Skip to content

Instantly share code, notes, and snippets.

View wisnukurniawan's full-sized avatar

Wisnu Kurniawan wisnukurniawan

View GitHub Profile
val features = (applicationContext as?Launcher.Provider)?.launcher?.features
// This is equals to above
// val features = arrayListOf<FeatureLaunchable>(
// OrderFlightFeature(),
// OrderHotelFeature(),
// OrderTrainFeature(),
// TransactionFeature(),
// SettingFeature()
// )
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// Get list of FeatureLaunchable from custom Application
val features = (applicationContext as? Launcher.Provider)?.launcher?.features
// println(features)

1. Separation of immutable and mutable logic

Quite a lot of different people have been on the same trail of thought. Gary Bernhardt's formulation of a "functional core, imperative shell" seems to be the most voiced.

"Boundaries" - Gary Bernhardt

"Imperative shell" that wraps and uses your "functional core".. The result of this is that the shell has fewer paths, but more dependencies. The core contains no dependencies, but encapsulates the different logic paths. So we’re encapsulating dependencies on one side, and business logic on the other side. Or put another way, the way to figure out the separation is by doing as much as you can without mutation, and then encapsulating the mutation separately. Functional core — Many fast unit tests. Imperative shell — Few integration tests

https://www.youtube.com/watch?v=yTkzNHF6rMs

@wisnukurniawan
wisnukurniawan / HD.txt
Last active June 9, 2021 00:27 — forked from lexrus/HD.txt
All WWDC 2013 Session Videos URLs in https://developer.apple.com/wwdc/videos/ dumped with Chrome. You can download these videos **without** a Apple developer account by running the download.sh script. There is also a sample code downloader here: https://github.com/jfahrenkrug/WWDC-Downloader
http://devstreaming-cdn.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/604r7b4rnjq86/604/604_hd_scenekit_whats_new.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/603anuihzisyb2a3/603/603_hd_vr_with_metal_2.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/507koao27wdpt/507/507_hd_capturing_depth_in_iphone_photography.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/514tjrrgnguh4k/514/514_hd_error_handling_best_practices_for_http_live_streaming.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/515vy4sl7iu70/515/515_hd_hls_authoring_update.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/513fzgbviu23l/513/513_hd_high_efficiency_image_file_format.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/506jgz9rblchh/506/506_hd_vision_framework_building_on_core_ml.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/505e36yrkhhfv/505/505_hd_whats_new_in_photos_apis.mp4?dl=1
https://devstreaming-cdn.apple.com/videos/wwdc/2017/707h2gkb95cx1l/707/707_hd_advances_i
@wisnukurniawan
wisnukurniawan / wwdc-2015-pdf.txt
Created December 9, 2019 02:47 — forked from palaniraja/wwdc-2015-pdf.txt
WWDC 2015 - PDF download links
http://devstreaming.apple.com/videos/wwdc/2015/217wu453thu1r1/217/217_adopting_new_trackpad_features.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2267p2ni281ba/226/226_advanced_nsoperations.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/233l9q8hj9mw/233/233_advanced_touch_input_on_ios.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/224o6pqmtb4ik/224/224_app_extension_best_practices.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2048w4vdjhe1i1m/204/204_apple_watch_accessibility.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/232f1zopzycv/232/232_best_practices_for_progress_reporting.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/213w6grumlfm0q/213/213_building_apps_with_researchkit.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/234reaz1byqc/234/234_building_document_based_apps.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2313dt427pmq/231/231_cocoa_touch_best_practices.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/209c9277tttlt9
http://devstreaming-cdn.apple.com/videos/wwdc/2015/217wu453thu1r1/217/217_adopting_new_trackpad_features.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/2267p2ni281ba/226/226_advanced_nsoperations.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/233l9q8hj9mw/233/233_advanced_touch_input_on_ios.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/224o6pqmtb4ik/224/224_app_extension_best_practices.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/2048w4vdjhe1i1m/204/204_apple_watch_accessibility.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/232f1zopzycv/232/232_best_practices_for_progress_reporting.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/213w6grumlfm0q/213/213_building_apps_with_researchkit.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/234reaz1byqc/234/234_building_document_based_apps.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2015/2313dt427pmq/231/231_cocoa_touch_best_practices.pdf?dl=1
http://devstreaming-cdn.a
@wisnukurniawan
wisnukurniawan / PDF
Last active October 2, 2024 10:44 — forked from nevan/wwdc_2016_videos.txt
WWDC 2016
http://devstreaming-cdn.apple.com/videos/wwdc/2016/102w0bsn0ge83qfv7za/102/102_platforms_state_of_the_union.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/201h1g4asm31ti2l9n1/201/201_internationalization_best_practices.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/202w2zhc4l8yomptqnt/202/202_whats_new_in_accessibility.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/203x2w42att1kdzg1ce/203/203_whats_new_in_cocoa.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/204t23fvanrkj7a1oj7/204/204_imessage_apps_and_stickers_part_1.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/205n2okotvilcayc8rc/205/205_whats_new_in_cocoa_touch.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/206a38wgme6uponcuwd/206/206_whats_new_in_tvos.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/207i37356qcyyh2yxos/207/207_whats_new_in_foundation_for_swift.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/208j30f4v1a1i9i5fg9/208/208_whats_new_in_watchos_3.pdf
http://devstreaming-cdn.apple.co
@wisnukurniawan
wisnukurniawan / wwdc2014-videos-and-pdf
Last active June 9, 2021 00:15 — forked from jianpx/wwdc2014-videos-and-pdf
wwdc 2014 videos and pdf download links, including HD/SD version.
http://devstreaming-cdn.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_intermediate_swift.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_advanced_graphics_and_animation_performance.pdf?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming-cdn.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov
http://devstreaming.apple.com/videos/wwdc/2014/306xxjtg7uz13v0/306/306_hd_javascript_for_automation.mov
http://devstreaming.apple.com/videos/wwdc/2014/404xxdxsstkaqjb/404/404_hd_advanced_swift.mov
http://devstreaming.apple.com/videos/wwdc/2014/701xx8n8ca3aq4j/701/701_hd_designing_accessories_for_ios_and_os_x.mov
http://devstreaming.apple.com/videos/wwdc/2014/224xxxlsvigdoc0/224/224_hd_core_os_ios_application_architectural_patterns.mov
http://devstreaming.apple.com/videos/wwdc/2014/717xxux5eg6f9v4/717/717_hd_kids_and_apps.mov
http://devstreaming.apple.com/videos/wwdc/2014/716xx8q4shlqcp8/716/