<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Budi Tanrim (buditanrim.co)</title>
    <description>The latest articles on DEV Community by Budi Tanrim (buditanrim.co) (@buditanrim).</description>
    <link>https://dev.to/buditanrim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1092667%2F9a6f8f12-ce96-4fe2-82c2-3c0674198308.jpg</url>
      <title>DEV Community: Budi Tanrim (buditanrim.co)</title>
      <link>https://dev.to/buditanrim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/buditanrim"/>
    <language>en</language>
    <item>
      <title>How can I intercept the value from NSResponder and use that string? (SwiftUI)</title>
      <dc:creator>Budi Tanrim (buditanrim.co)</dc:creator>
      <pubDate>Thu, 22 Aug 2024 06:12:03 +0000</pubDate>
      <link>https://dev.to/buditanrim/how-can-i-intercept-the-value-from-nsresponder-and-use-that-string-swiftui-4dhb</link>
      <guid>https://dev.to/buditanrim/how-can-i-intercept-the-value-from-nsresponder-and-use-that-string-swiftui-4dhb</guid>
      <description>&lt;p&gt;Hi everyone, I need help with SwiftUI.&lt;br&gt;
My goal: I have a macOS app built, and I want to...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Have a button to open the emoji picker (managed this) &lt;/li&gt;
&lt;li&gt;When the user selects an emoji, intercept that value with &lt;code&gt;NSResponder&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then use it on my Button label&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The code below is a simplification. I need help: How can I intercept the value from the NSResponder and print it?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import SwiftUI
import AppKit

struct ContentView: View {
    private let emojiResponder = EmojiResponder()

    var body: some View {
        Button {
            // open the emoji picker
            if let window = NSApplication.shared.keyWindow {
                window.makeFirstResponder(emojiResponder)
                DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
                    NSApp.orderFrontCharacterPalette(nil)
                }
            }
        } label: {
            Text("Emoji?")
        }
        .onAppear {
            emojiResponder.onEmojiSelected = { selectedEmoji in
                print(selectedEmoji)
            }
        }
    }
}

// Custom Emoji NSResponder
class EmojiResponder: NSResponder {
    var onEmojiSelected: ((String) -&amp;gt; Void)?

    // use insertTest method from NSResponder
    // I assume this allows me to get the input 
    override func insertText(_ insertString: Any) {
        guard let selectedEmoji = insertString as? String else { return }
        onEmojiSelected?(selectedEmoji)
        print(selectedEmoji)
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can anyone give me a pointer on how to solve this?&lt;br&gt;
What happens now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The emoji picker is opened, but nothing happens after I select an emoji&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
      <category>help</category>
    </item>
    <item>
      <title>I've been trying Haruki Murakami's routine (Wake up at 4 am to get 6 hours of deep work)</title>
      <dc:creator>Budi Tanrim (buditanrim.co)</dc:creator>
      <pubDate>Tue, 28 May 2024 23:30:20 +0000</pubDate>
      <link>https://dev.to/buditanrim/ive-been-trying-haruki-murakamis-routine-wake-up-at-4-am-to-get-6-hours-of-deep-work-39hk</link>
      <guid>https://dev.to/buditanrim/ive-been-trying-haruki-murakamis-routine-wake-up-at-4-am-to-get-6-hours-of-deep-work-39hk</guid>
      <description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I quit my job last year to build my own online business. The problem is that I usually work from 9 am to 4 pm. I feel I have no life :D&lt;/p&gt;

&lt;p&gt;Since I work for myself, I need to push myself and work hard. However, I end up feeling tired and unable to exercise and do other things.&lt;/p&gt;

&lt;p&gt;Then I stumbled upon Haruki Murakami’s schedule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dor92quhxzxnn3qqmmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dor92quhxzxnn3qqmmp.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
He wakes up at 4 am and does deep work for 8 hours. &lt;/p&gt;

&lt;p&gt;I've tried it for a week. It's been amazing. After lunch, I can stop thinking about work. If needed, I do another 2 focus hours in the evening.&lt;/p&gt;

&lt;p&gt;My schedule looks like this: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4 am: wake up&lt;/li&gt;
&lt;li&gt;4.30 am - 12 am: deep work, &lt;/li&gt;
&lt;li&gt;Use Pomodoro 1 hour focus and 10 min break&lt;/li&gt;
&lt;li&gt;12 pm - 1 pm: lunch and break &lt;/li&gt;
&lt;li&gt;2 pm: exercise &lt;/li&gt;
&lt;li&gt;3 pm - 6 pm: read, walk, chill &lt;/li&gt;
&lt;li&gt;8 pm: go to bed and try to sleep&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My favorite thing is that I can have life outside of my work.&lt;br&gt;
I wonder if anyone has done this and wants to exchange some suggestions. Or, if you are considering this routine, feel free to ask questions.&lt;/p&gt;

&lt;p&gt;If you're interested in building the same routine. You can join my live stream session: &lt;a href="https://youtube.com/live/slwvDGYwXBQ?feature=share" rel="noopener noreferrer"&gt;https://youtube.com/live/slwvDGYwXBQ?feature=share&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>I quit my job. Building a productivity app for ADHD. Join me on this journey</title>
      <dc:creator>Budi Tanrim (buditanrim.co)</dc:creator>
      <pubDate>Wed, 15 May 2024 11:57:43 +0000</pubDate>
      <link>https://dev.to/buditanrim/i-quit-my-job-and-building-a-productivity-app-for-adhd-i-need-your-input-c8i</link>
      <guid>https://dev.to/buditanrim/i-quit-my-job-and-building-a-productivity-app-for-adhd-i-need-your-input-c8i</guid>
      <description>&lt;p&gt;I quit my job, and I want to build something fun.&lt;/p&gt;

&lt;p&gt;I start by building a productivity app that targets people with ADHD.&lt;/p&gt;

&lt;p&gt;One of the features I'm exploring is the ability to drag and drop the task to the calendar. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaWJqNTU0ZzV1b3piYzJxejBlcmJpcGk4Nnp5ZHJlY2U1OHg4ZG03NCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/lN08NomvFgbojrnU57/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaWJqNTU0ZzV1b3piYzJxejBlcmJpcGk4Nnp5ZHJlY2U1OHg4ZG03NCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/lN08NomvFgbojrnU57/giphy.gif" width="480" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can do this in Google task and Google Calendar (sort of), but you can't adjust the duration, and 1 task can only scheduled in one place. &lt;/p&gt;

&lt;p&gt;What other features do you think will be useful to help people stay focused?&lt;/p&gt;

&lt;p&gt;Cheers&lt;br&gt;
&lt;a href="https://usetoday.app"&gt;usetoday.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other post&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/buditanrim/for-2-years-ive-been-collecting-productivity-tips-you-might-find-it-useful-4hjo"&gt;For 2 years, I've been collecting productivity tips for ADHD. you might find it useful&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>adhd</category>
      <category>productivity</category>
      <category>advice</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What modern authentication technology do big consumer apps uses?</title>
      <dc:creator>Budi Tanrim (buditanrim.co)</dc:creator>
      <pubDate>Mon, 06 May 2024 18:28:43 +0000</pubDate>
      <link>https://dev.to/buditanrim/what-modern-authentication-technology-do-big-consumer-apps-uses-ff4</link>
      <guid>https://dev.to/buditanrim/what-modern-authentication-technology-do-big-consumer-apps-uses-ff4</guid>
      <description>&lt;h1&gt;
  
  
  Q: What authentication technology do big consumer apps use?
&lt;/h1&gt;

&lt;p&gt;Passwords are no longer a reliable way to keep users secure. Many new and rising authentication technologies are available. I’ve been digging this topic and I’d love to share my findings, which could be useful for product designers and builders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lq3b2wh2rxaeof6z21j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lq3b2wh2rxaeof6z21j.png" alt="modern authentication" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: Magic links (sign up and login)
&lt;/h2&gt;

&lt;p&gt;Magic links are a passwordless way to authenticate users. After signing up, you’ll get an email with a link where you can click to authenticate yourself. Some companies like Slack, by default, don’t ask users to put in a password. This way, the company has less liability for making your password secure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User flow:&lt;/strong&gt; Sign up/login → get a link on email → click the link → done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideal for:&lt;/strong&gt; sign up and sign in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key benefit:&lt;/strong&gt; users don’t store any passwords on your database. Less liability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Companies that use this method:&lt;/strong&gt; Medium, Slack, Notion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95q5k3vflklzxcdd49a2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95q5k3vflklzxcdd49a2.png" alt="Notion magic link screenshot" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Passkey to login without password (login)
&lt;/h2&gt;

&lt;p&gt;I noticed Google and GitHub have been pushing this new passkey technology recently. It’s a simple and secure alternative to passwords. When you sign in to your account, Google will ask you to scan your face or fingerprint on your other devices to confirm that you are who you say you are. This is another form of two-factor authentication. KAYAK claimed they’d improved their security after implementing passkey (link).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User flow:&lt;/strong&gt; sign in → verify using fingerprint or face ID → done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideal for:&lt;/strong&gt; sign-in, preventing phishing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key benefit:&lt;/strong&gt; login without password, but verify using another device&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyword to look:&lt;/strong&gt; passkey, passwordless&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz5zf8lrawb6wclzcgnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz5zf8lrawb6wclzcgnu.png" alt="Image description" width="719" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 3: Biometrics authentication instead of PIN (Open app)
&lt;/h2&gt;

&lt;p&gt;In the past, many banking or fintech apps required users to enter PINs for extra security. But now biometrics like face ID and fingerprints have become a default way to “open the app.”&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User flow:&lt;/strong&gt; open the app → face ID / fingerprint → done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideal for&lt;/strong&gt; banking, financial services, healthcare, or apps requiring extra security before users can open them. Apps like banking usually store sensitive information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key security benefit:&lt;/strong&gt; users can open the app quickly—better experience for users, but still have extra security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Companies who use this:&lt;/strong&gt; Apple, Samsung, GoTrade, Wise, PayPal&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Method 4: Phone number as an identifier (Sign up and login)
&lt;/h2&gt;

&lt;p&gt;Many apps uses phone number as the unique identifier. WhatsApp is the first one popularize this approach. The obvious benefit is non-tech savvy people don’t have to remember usernames or passwords.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Observation:&lt;/strong&gt; all communication apps are using phone number as the only unique identifier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key security benefit:&lt;/strong&gt; Phone numbers are difficult to steal, unlike emails. When people noticed their phones are stolen, they can take action. So a lot of consumer apps these days utilizing this as the authentication method.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Companies who use this:&lt;/strong&gt; WhatsApp, Telegram, Wise, Tinder, Clubhouse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyth97rhg3bk1rm8gf3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyth97rhg3bk1rm8gf3a.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On two-factor authentication&lt;br&gt;
A lot of apps has already integrated two-factor authentication. This is widely adopted authentication method. So I’m not gonna talk about it.&lt;/p&gt;

&lt;p&gt;This is originally posted on &lt;a href="https://newsletter.buditanrim.co/p/how-big-consumer-apps-uses-modern"&gt;my newsletter&lt;/a&gt;&lt;br&gt;
Follow me on &lt;a href="https://www.linkedin.com/in/buditanrim/"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/buditanrim"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>design</category>
      <category>discuss</category>
    </item>
    <item>
      <title>For 2 years, I've been collecting productivity tips. You might find it useful</title>
      <dc:creator>Budi Tanrim (buditanrim.co)</dc:creator>
      <pubDate>Fri, 03 May 2024 14:10:56 +0000</pubDate>
      <link>https://dev.to/buditanrim/for-2-years-ive-been-collecting-productivity-tips-you-might-find-it-useful-4hjo</link>
      <guid>https://dev.to/buditanrim/for-2-years-ive-been-collecting-productivity-tips-you-might-find-it-useful-4hjo</guid>
      <description>&lt;p&gt;Since last year, I've been reading a lot of discussions about Productivity and ADHD. I find lots of valuable tips and have been compiling them on my Obsidian note. I have tried some of them, and I want to share these with y'all:&lt;/p&gt;

&lt;h2&gt;
  
  
  Increase focus (combat distractions)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Disable all your notifications, except for essential apps&lt;/li&gt;
&lt;li&gt;I find taking less sugar or carbohydrates during lunch helps a lot! Less sleepy!&lt;/li&gt;
&lt;li&gt;Set clear expectations and targets with your team or supervisor&lt;/li&gt;
&lt;li&gt;Exercise in the morning or walk. Your brain will focus better after some exercise.&lt;/li&gt;
&lt;li&gt;Listen to brown or white noise or any music without lyrics to your liking. My favorite so far is YouTube music, and I usually find one-hour lo-fi or instrumental music.&lt;/li&gt;
&lt;li&gt;Consider a site blocker if you find yourself opening a certain website&lt;/li&gt;
&lt;li&gt;Keep your to-do list at eye level. I use sticky notes, and recently, I used an app called Today, which has floating notes that stick on top.&lt;/li&gt;
&lt;li&gt;Brain dump all tasks quickly in the morning, then choose 1-2 critical tasks to focus on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deal with mood swings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Remind yourself that the world won't end if a few things fall behind.&lt;/li&gt;
&lt;li&gt;Ignore the awkward thing you did last week. People won't remember it.&lt;/li&gt;
&lt;li&gt;Brain dump in a notebook by your bed every night. It helps you to calm down and think.&lt;/li&gt;
&lt;li&gt;If you felt unproductive yesterday, don't hate yourself. Focus on improving yourself in the present.&lt;/li&gt;
&lt;li&gt;I use Obsidian to write daily journals&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get things done
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Put your todo in a place you can always see.&lt;/li&gt;
&lt;li&gt;Break down tasks into smaller chunks until they feel manageable&lt;/li&gt;
&lt;li&gt;Use Pomodoro. If 25 minutes work, a 5-minute break doesn't work, try 50 minutes work, a 10-minute break.&lt;/li&gt;
&lt;li&gt;Sometimes, I like to use a timer instead of Pomodoro. I like to use Toggl to track my time.&lt;/li&gt;
&lt;li&gt;Put your phone out of sight (in a different room)&lt;/li&gt;
&lt;li&gt;When you take breaks, make sure they aren't too interesting. Otherwise, you will get absorbed in them. Just go to the bathroom or clean during your break.&lt;/li&gt;
&lt;li&gt;Time block your calendar so you know what your day looks like. But don't beat yourself up if it doesn't go as planned. ⭐️ My favorite app for this is Today (usetoday.app). I can see tasks and calendars side by side.&lt;/li&gt;
&lt;li&gt;Download an app that chimes every hour so you get a sense when the time has passed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For daily things
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Three-point check before you go out: Phone, wallet, keys&lt;/li&gt;
&lt;li&gt;Have one bag for all your essentials—keys, chargers, toothbrushes—and when you go out, just grab that bag. Easy peasy!&lt;/li&gt;
&lt;li&gt;Put a bowl near your door for your keys, badges, or wallet so you can't leave without ALL the stuff you need. My spouse finds this helpful!&lt;/li&gt;
&lt;li&gt;Listen to podcasts when doing chores. It gives me excitement.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For traveling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pack things weeks before so you don't forget&lt;/li&gt;
&lt;li&gt;Have a checklist (toiletry, passport, what to check before leaving the house)&lt;/li&gt;
&lt;li&gt;Write things down if you worry about "Do I need a visa?" then write it in a FAQ format. Question: "Do I need a Visa to South Korea?" Answer: "&lt;em&gt;No. Here's the link from the official website."&lt;/em&gt; I like to use Notion for every trip.&lt;/li&gt;
&lt;li&gt;Find friends who is detail-oriented to plan the itinerary, ideally they know your condition.&lt;/li&gt;
&lt;li&gt;Set two alarms: (2 hours) and (30 mins) before the time you should go to the airport.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
    </item>
  </channel>
</rss>
