<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>tintran</title>
    <link>https://tintran.me/</link>
    <description></description>
    <pubDate>Tue, 28 Apr 2026 12:02:56 +0000</pubDate>
    <item>
      <title>I turned down an Google offer (after trying for 3 years)</title>
      <link>https://tintran.me/i-spent-3-years-working-on-leetcode-problems</link>
      <description>&lt;![CDATA[I spent 3+ years working on Leetcode problems. I failed dozen of interviews including many FAANGs. I finally got an offer at Google after 3rd try, but I turned it down. Hard decision. ]]&gt;</description>
      <content:encoded><![CDATA[<p>I spent 3+ years working on Leetcode problems. I failed dozen of interviews including many FAANGs. I finally got an offer at Google after 3rd try, but I turned it down. Hard decision.</p>
]]></content:encoded>
      <guid>https://tintran.me/i-spent-3-years-working-on-leetcode-problems</guid>
      <pubDate>Tue, 28 Apr 2026 10:17:32 +0000</pubDate>
    </item>
    <item>
      <title>Balance</title>
      <link>https://tintran.me/balance</link>
      <description>&lt;![CDATA[Balancing between family responsibilities with your careers motivation is hard. &#xA;&#xA;I&#39;ve recently been laid off. If I were on my own, I would spend a year or two working on my ventures, living off my savings. But then, I had a commitment to buy a house for my parents soon, I&#39;m not willing to &#34;default&#34; on that.&#xA;&#xA;I&#39;m going to find a balance between the two. That means looking for a job, where I can still learn about SaaS, about software, improve my skills which I can use later for the ventures. &#xA;&#xA;It looks like a compromise, but maybe it&#39;s actually not. It&#39;s the shortest path forward, for me.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Balancing between family responsibilities with your careers motivation is hard.</p>

<p>I&#39;ve recently been laid off. If I were on my own, I would spend a year or two working on my ventures, living off my savings. But then, I had a commitment to buy a house for my parents soon, I&#39;m not willing to “default” on that.</p>

<p>I&#39;m going to find a balance between the two. That means looking for a job, where I can still learn about SaaS, about software, improve my skills which I can use later for the ventures.</p>

<p>It looks like a compromise, but maybe it&#39;s actually not. It&#39;s the shortest path forward, for me.</p>
]]></content:encoded>
      <guid>https://tintran.me/balance</guid>
      <pubDate>Tue, 28 Apr 2026 08:31:15 +0000</pubDate>
    </item>
    <item>
      <title>About Dagger 2 Scope Injection</title>
      <link>https://tintran.me/about-dagger-2-scope-injection</link>
      <description>&lt;![CDATA[What Does @Scope Do?&#xA;&#xA;If a scope annotation is present, the injector may retain the instance for possible reuse in a later injection.&#xA;&#xA;@SomeScope&#xA;@Component(dependencies = SomeModule.class)&#xA;interface SomeComponent {}&#xA;&#xA;@Module&#xA;class SomeModule {&#xA;  @SomeScope&#xA;  SomeObject createObject();&#xA;}&#xA;&#xA;Given the @Scope-annotated Dagger component above, the effect of @SomeScope is that, for the lifetime of SomeComponent, there will be one and only one SomeObject instance.&#xA;&#xA;In other words, @SomeScope can be used to instruct SomeComponent to keep the SomeObject for later use.&#xA;&#xA;How Is @Scope Implemented?&#xA;&#xA;Under the hood, the DoubleCheck class is used internally to keep the object reference and re-inject it when requested.&#xA;&#xA;If we remove the thread-safety-related code, it looks like this:&#xA;&#xA;public final class DoubleCheckT {&#xA;  private static final Object UNINITIALIZED = new Object();&#xA;  private volatile ProviderT provider;&#xA;  private volatile Object instance = UNINITIALIZED;&#xA;&#xA;  @Override&#xA;  public T get() {&#xA;    if (instance == UNINITIALIZED) {&#xA;       instance = provider.get();&#xA;    }&#xA;    return (T) instance;&#xA;  }&#xA;}&#xA;&#xA;From the code above, multiple calls to DoubleCheck.get() will return the same instance, which serves the purpose of scoped injection.&#xA;&#xA;Android Example&#xA;&#xA;In Android, an @ActivityScope declared as follows is often used to ensure that the scoped object is a singleton within the lifecycle of the activity, given that there is only one Dagger component associated with that activity.&#xA;&#xA;@Scope&#xA;@Retention(RetentionPolicy.RUNTIME)&#xA;public @interface ActivityScope {}&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="what-does-scope-do">What Does <code>@Scope</code> Do?</h3>

<p>If a scope annotation is present, the injector may retain the instance for possible reuse in a later injection.</p>

<pre><code class="language-java">@SomeScope
@Component(dependencies = SomeModule.class)
interface SomeComponent {}

@Module
class SomeModule {
  @SomeScope
  SomeObject createObject();
}
</code></pre>

<p>Given the <code>@Scope</code>-annotated Dagger component above, the effect of <code>@SomeScope</code> is that, for the lifetime of <code>SomeComponent</code>, there will be one and only one <code>SomeObject</code> instance.</p>

<p>In other words, <code>@SomeScope</code> can be used to instruct <code>SomeComponent</code> to keep the <code>SomeObject</code> for later use.</p>

<h3 id="how-is-scope-implemented">How Is <code>@Scope</code> Implemented?</h3>

<p>Under the hood, the <code>DoubleCheck</code> class is used internally to keep the object reference and re-inject it when requested.</p>

<p>If we remove the thread-safety-related code, it looks like this:</p>

<pre><code class="language-java">public final class DoubleCheck&lt;T&gt; {
  private static final Object UNINITIALIZED = new Object();
  private volatile Provider&lt;T&gt; provider;
  private volatile Object instance = UNINITIALIZED;

  @Override
  public T get() {
    if (instance == UNINITIALIZED) {
       instance = provider.get();
    }
    return (T) instance;
  }
}
</code></pre>

<p>From the code above, multiple calls to <code>DoubleCheck.get()</code> will return the same instance, which serves the purpose of scoped injection.</p>

<h3 id="android-example">Android Example</h3>

<p>In Android, an <code>@ActivityScope</code> declared as follows is often used to ensure that the scoped object is a singleton within the lifecycle of the activity, given that there is only one Dagger component associated with that activity.</p>

<pre><code class="language-java">@Scope
@Retention(RetentionPolicy.RUNTIME)
public @interface ActivityScope {}
</code></pre>
]]></content:encoded>
      <guid>https://tintran.me/about-dagger-2-scope-injection</guid>
      <pubDate>Tue, 24 Apr 2018 08:43:10 +0000</pubDate>
    </item>
    <item>
      <title>My Google and Facebook Interview Experience</title>
      <link>https://tintran.me/my-google-and-facebook-interview-experience</link>
      <description>&lt;![CDATA[The application and phone screen steps were the usual ones. They are available on other channels, such as Glassdoor and blog posts. In this post, I will only talk about the things specific to my onsite interviews and the things I could have done better.&#xA;&#xA;Metadata&#xA;&#xA;I interviewed with Google Sydney in November 2017 and Facebook Singapore in December 2017.&#xA;Both interviews were for Android engineer positions.&#xA;I failed both.&#xA;&#xA;My Preparation&#xA;&#xA;6.006 course from MIT on YouTube, about twice for each lecture.&#xA;Code Jam 2017. I could not get to round 2.&#xA;Kick Start 2017. My best rank was 239 in round C.&#xA;HackerRank and LeetCode, about 200 problems, with only a few hard problems.&#xA;Cracking the Coding Interview. I did most of the problems, with only a couple of problems from the hard section.&#xA;&#xA;The Onsite&#xA;&#xA;My Google onsite consisted of 5 coding interviews on a single day. They were heavy on algorithms and data structures. The questions were around hard difficulty on LeetCode. Usually, each interview started with a warmup question, around medium difficulty, then got more difficult as I solved them.&#xA;&#xA;Facebook asked not only coding questions, but also system design and behavioral questions. The questions were relatively easier. I did give correct solutions, but that was not enough. I should have shown how I arrived at the solution. My recruiter suggested that I work on algorithms and data structures, so I guess that was the reason for rejection.&#xA;&#xA;Why I Could Have Done Better&#xA;&#xA;For Google, I should have solved more hard problems. Do not fall into the trap of pattern matching, especially for ad-hoc problems. The key is to strengthen problem-solving skill, not study the kinds or categories of problems and then pattern match them.&#xA;&#xA;Read more: Planning an Approach to a Topcoder Problem, Part 1&#xA;&#xA;For Facebook, I should have thought and explained more critically.&#xA;&#xA;I will try again in 2018.&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>The application and phone screen steps were the usual ones. They are available on other channels, such as Glassdoor and blog posts. In this post, I will only talk about the things specific to my onsite interviews and the things I could have done better.</p>

<h2 id="metadata">Metadata</h2>
<ul><li>I interviewed with Google Sydney in November 2017 and Facebook Singapore in December 2017.</li>
<li>Both interviews were for Android engineer positions.</li>
<li>I failed both.</li></ul>

<h2 id="my-preparation">My Preparation</h2>
<ul><li>6.006 course from MIT on YouTube, about twice for each lecture.</li>
<li>Code Jam 2017. I could not get to round 2.</li>
<li>Kick Start 2017. My best rank was 239 in round C.</li>
<li>HackerRank and LeetCode, about 200 problems, with only a few hard problems.</li>
<li>Cracking the Coding Interview. I did most of the problems, with only a couple of problems from the hard section.</li></ul>

<h2 id="the-onsite">The Onsite</h2>

<p>My Google onsite consisted of 5 coding interviews on a single day. They were heavy on algorithms and data structures. The questions were around hard difficulty on LeetCode. Usually, each interview started with a warmup question, around medium difficulty, then got more difficult as I solved them.</p>

<p>Facebook asked not only coding questions, but also system design and behavioral questions. The questions were relatively easier. I did give correct solutions, but that was not enough. I should have shown how I arrived at the solution. My recruiter suggested that I work on algorithms and data structures, so I guess that was the reason for rejection.</p>

<h2 id="why-i-could-have-done-better">Why I Could Have Done Better</h2>

<p>For Google, I should have solved more hard problems. Do not fall into the trap of pattern matching, especially for ad-hoc problems. The key is to strengthen problem-solving skill, not study the kinds or categories of problems and then pattern match them.</p>

<p>Read more: <a href="https://www.topcoder.com/community/data-science/data-science-tutorials/planning-an-approach-to-a-topcoder-problem-part-1/">Planning an Approach to a Topcoder Problem, Part 1</a></p>

<p>For Facebook, I should have thought and explained more critically.</p>

<p>I will try again in 2018.</p>
]]></content:encoded>
      <guid>https://tintran.me/my-google-and-facebook-interview-experience</guid>
      <pubDate>Tue, 24 Apr 2018 08:42:53 +0000</pubDate>
    </item>
  </channel>
</rss>