<?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: Tham</title>
    <description>The latest articles on DEV Community by Tham (@tham).</description>
    <link>https://dev.to/tham</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%2F517743%2Fbc7caf23-eb21-42a4-ba63-7597f23aaf68.jpeg</url>
      <title>DEV Community: Tham</title>
      <link>https://dev.to/tham</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tham"/>
    <language>en</language>
    <item>
      <title>airbox.dev is launched</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Wed, 08 Feb 2023 18:15:27 +0000</pubDate>
      <link>https://dev.to/tham/airboxdev-is-launched-3h0f</link>
      <guid>https://dev.to/tham/airboxdev-is-launched-3h0f</guid>
      <description>&lt;p&gt;After a month effort, I finally launched &lt;a href="https://airbox.dev"&gt;https://airbox.dev&lt;/a&gt; today. airbox is a developer productivity platform for finding the required tools and utilities for your programming needs.&lt;/p&gt;

&lt;p&gt;airbox is 100% free and no registration is required. I am sure this will help reducing your time to find the right tools for your programming requirements.&lt;/p&gt;

&lt;p&gt;This is a simple beginning. Lot more tools are on the way. Keep supporting me and suggests the tools that you require!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Kv81aZr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k69hkcvcax3f6zbd3jym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Kv81aZr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k69hkcvcax3f6zbd3jym.png" alt="airbox home page" width="880" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.airbox.dev"&gt;www.airbox.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>developer</category>
      <category>tools</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why you need a YouTube channel?</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Tue, 17 Aug 2021 13:12:34 +0000</pubDate>
      <link>https://dev.to/tham/why-you-need-a-youtube-channel-4cfa</link>
      <guid>https://dev.to/tham/why-you-need-a-youtube-channel-4cfa</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/RN9mvrzq61Q"&gt;
&lt;/iframe&gt;
&lt;br&gt;
I started my 100 days learning challenge on Dart programming language. I am currently documenting all the basic concepts on Dart.&lt;br&gt;
'Learn to teach others' is my biggest believe always. So I started a YouTube channel to document all my learnings. There are 2 benefits out of this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn the concept clearly and deeply&lt;/li&gt;
&lt;li&gt;Opportunity for others to learn from you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Moreover you can also build your own personal brand.&lt;/p&gt;

&lt;p&gt;Subscribe to my channel to learn Dart language (if interested)&lt;/p&gt;

&lt;p&gt;Keep learning &amp;amp; Keep growing!&lt;/p&gt;

</description>
      <category>darklang</category>
      <category>dart</category>
      <category>programming</category>
    </item>
    <item>
      <title>100 days dart learning challenge</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Sun, 15 Aug 2021 17:40:05 +0000</pubDate>
      <link>https://dev.to/tham/100-days-dart-learning-challenge-n2j</link>
      <guid>https://dev.to/tham/100-days-dart-learning-challenge-n2j</guid>
      <description>&lt;p&gt;Building the right habit is always challenging. I learned the habit-building technique recently from  &lt;a href="https://jamesclear.com/"&gt;James Clear&lt;/a&gt;  in his fantastic work on ' &lt;a href="https://amzn.to/3CPros1"&gt;Atomic Habits&lt;/a&gt; '. I decided to apply these techniques through a learning challenge. It is all about learning the Dart programming language for the next 100 days.&lt;br&gt;
My mission is to learn about the Dart programming language and planning to share my experience at the end of each week.&lt;/p&gt;

&lt;p&gt;Announcing here is also a social commitment to stick to the habits until it is automatic. I am following Dart language through their official  &lt;a href="https://dart.dev/"&gt;website&lt;/a&gt;. Please comment below if you have any other good resources to learn about the Dart language.&lt;/p&gt;

&lt;p&gt;I will keep you posted when I make progress and face any challenges during my journey. Let me know if you also have any such learning challenges and how that helped you.&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
      <category>programming</category>
    </item>
    <item>
      <title>Getting started with Firebase web v9 API</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Sat, 24 Jul 2021 10:53:29 +0000</pubDate>
      <link>https://dev.to/tham/getting-started-with-firebase-web-v9-api-221c</link>
      <guid>https://dev.to/tham/getting-started-with-firebase-web-v9-api-221c</guid>
      <description>&lt;p&gt;As I wrote in my previous article, I have started exploring  &lt;a href="https://firebase.google.com/"&gt;Firebase &lt;/a&gt; web v9 APIs. I am going to explain how easy to get started with Firebase web v9 API ( &lt;a href="https://www.npmjs.com/package/firebase/v/9.0.0-beta.7"&gt;beta&lt;/a&gt; ) and setup your project. This article covers the following to kick start your next experiment with Firebase APIs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Create a project scaffold &lt;/li&gt;
&lt;li&gt; Create Firebase project &lt;/li&gt;
&lt;li&gt; Setting up Firebase tools &lt;/li&gt;
&lt;li&gt; Firebase web v9 API configuration &lt;/li&gt;
&lt;li&gt; Application configuration 
### Create a project scaffold
I used  &lt;a href="https://vitejs.dev/"&gt;Vite &lt;/a&gt; scaffolding tool to create my project skeleton. Just fill the questions and you will be able to get one for you. In my case, I created a project with Vue.js framework.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init @vitejs/app &amp;lt;project_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;project_name&amp;gt;
npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By now, you should be able to see the sample project up and running on port 3000&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Firebase project
&lt;/h3&gt;

&lt;p&gt;Now you need to create a Firebase project. For that you need to go '&lt;a href="https://console.firebase.google.com/"&gt;https://console.firebase.google.com/&lt;/a&gt;' and create your project. This requires a Google account if not create one for you :)&lt;br&gt;
Just follow the instruction once you reach the firebase console and fill the required details about the project name and other details.&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting up Firebase tools
&lt;/h3&gt;

&lt;p&gt;Now we are going to install the required firebase tools to manage the project from our system. Execute the following commands from your project directory which was created in the first step&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g firebase-tools
firebase login //to access your firebase project created from the previous step
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Firebase web v9 API configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save firebase@9.0.0-beta.7 //Latest beta when I write this
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Application configuration
&lt;/h3&gt;

&lt;p&gt;Now you are ready to use the Firebase web v9 API in your application. Create a Javascript file under src directory to hold your Firebase project configurations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAuth&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;firebase/auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;firebaseConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;apiKey&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;authDomain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;databaseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;storageBucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messagingSenderId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;measurementId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firebaseApp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firebaseConfig&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getAuth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firebaseApp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Replace the above details with your project specific configuration. You grab the details from your Firebase console.&lt;br&gt;
Everything is now completed and you can import the auth variable in your project and use it.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>First look of Firebase web API v9 + Vue composition API</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Sun, 27 Jun 2021 15:19:25 +0000</pubDate>
      <link>https://dev.to/tham/first-look-of-firebase-web-api-v9-vue-composition-api-4eoo</link>
      <guid>https://dev.to/tham/first-look-of-firebase-web-api-v9-vue-composition-api-4eoo</guid>
      <description>&lt;p&gt;I started experimenting  &lt;a href="https://firebase.google.com/docs/reference/js/v9?authuser=0"&gt;Firebase web v9 APIs&lt;/a&gt; for my side hustle project along with  &lt;a href="https://v3.vuejs.org/guide/introduction.html"&gt;Vue 3&lt;/a&gt;. I worked with Firebase earlier API set. So initializing the project and getting started with Vue didn't take much of my time.&lt;/p&gt;

&lt;p&gt;But to the surprise, I got a fantastic experience with Firebase web v9 APIs with Vue composition APIs. I am going to explain how easy to get started with the integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario
&lt;/h2&gt;

&lt;p&gt;To continue on the API exploration, I will consider Firebase sign-up functionality with email and password.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Firebase web v9 API
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// latest firebase module is firebase@9.0.0-beta.5
npm install --save firebase@9.0.0-beta.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Firebase configuration for communication
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//src/services/firebase.js
//Add your project related keys in the below configuration
import { initializeApp } from 'firebase/app';
import { getAuth } from 'firebase/auth';

const firebaseConfig = {
  apiKey: "&amp;lt;change&amp;gt;",
  authDomain: "&amp;lt;change&amp;gt;",
  projectId: "&amp;lt;change&amp;gt;",
  storageBucket: "&amp;lt;change&amp;gt;",
  messagingSenderId: "&amp;lt;change&amp;gt;",
  appId: "&amp;lt;change&amp;gt;",
  measurementId: "&amp;lt;change&amp;gt;"
};

const firebaseApp = initializeApp(firebaseConfig);
const auth = getAuth(firebaseApp);

export { auth };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//src/services/UserService.js
import { auth } from './firebase';
import { createUserWithEmailAndPassword } from '@firebase/auth';

export default {
  async signupWithEmail(data) {
    console.log('UserService.signupWithEmail()');
    createUserWithEmailAndPassword(auth, data.email, data.password)
      .then((credential) =&amp;gt; {
        const user = credential.user;
        console.log(user);
      })
      .catch((error) =&amp;gt; {
        console.error('Error ', error.message);
      });
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Signup form in Vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//src/components/Signup.vue
//NOTE: Ignore the css classes for now
&amp;lt;template&amp;gt;
  &amp;lt;section class="p-main"&amp;gt;
    &amp;lt;div class="signup-wrapper"&amp;gt;
      &amp;lt;div class="signup-title title"&amp;gt;
        Sign Up
      &amp;lt;/div&amp;gt;

      &amp;lt;form @submit.prevent&amp;gt;
        &amp;lt;div class="signup-form"&amp;gt;
          &amp;lt;div class="w-full"&amp;gt;
            &amp;lt;input type="text" id="email" v-model="user.email" placeholder="Enter your email"&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="w-full"&amp;gt;
            &amp;lt;input type="password" id="password" v-model="user.password" placeholder="Enter your password"&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="btn-primary w-full text-center"&amp;gt;
            &amp;lt;!-- &amp;lt;a href="" class="link-white"&amp;gt;Signup&amp;lt;/a&amp;gt; --&amp;gt;
            &amp;lt;button class="btn-primary" @click="onSignup"&amp;gt;Signup&amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;

          &amp;lt;div class="px-16 mt-2 bg-gray-200"&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;div class="text-center"&amp;gt;
            Already having an account?
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="text-center"&amp;gt;
            &amp;lt;router-link :to="{ name: 'Signin'}"&amp;gt;
              Sign In
            &amp;lt;/router-link&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/section&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
import { useRouter } from "vue-router";
import UserService from '../services/UserService';
export default {
  setup() {
    const router = useRouter();

    const user = {
      email: '',
      password: ''
    };

    const onSignup = () =&amp;gt; {
      console.log(user);
      UserService.signupWithEmail(user);
      setTimeout(() =&amp;gt; {
        router.push({name: "Home"});
      }, 1000);
    };

    return {
      user,
      onSignup
    }
  },
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Importance of Firebase web v9 API
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The new API follows the modular SDK, that produces reduced SDK output based on your imports&lt;/li&gt;
&lt;li&gt;Provides greater supports with Javascript build tools&lt;/li&gt;
&lt;li&gt;Follows ES6 approach which is familiar to every Javascript developers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NOTE: Firebase web v9 APIs are still in beta stage. So there might be some breaking API changes in the future.&lt;/p&gt;

&lt;p&gt;Originally published on &lt;a href="https://tech.tham.xyz/first-look-of-firebase-web-v9-api-vue-composition-api"&gt;https://tech.tham.xyz&lt;/a&gt;&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>vue</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to migrate master branch to main in Github?</title>
      <dc:creator>Tham</dc:creator>
      <pubDate>Wed, 23 Jun 2021 14:00:32 +0000</pubDate>
      <link>https://dev.to/tham/how-to-migrate-master-branch-to-main-in-github-48aj</link>
      <guid>https://dev.to/tham/how-to-migrate-master-branch-to-main-in-github-48aj</guid>
      <description>&lt;p&gt;Few months back, Github changed the default branch from master to main. Due to this change, most of the projects were forced migrate from master to main branch. Recently I faced this problem for one of my projects.&lt;/p&gt;

&lt;p&gt;After multiple trials and errors, I successfully migrated my project to main branch. I would like to share the steps and it would help you when you face the similar problem in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  1: Connect local repo with your remote repo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin &amp;lt;remote_github_url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2: Pull the main source code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3: Move the source from master to main branch
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -m master main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4: Add and commit your changes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "master branch changed to main"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5: Set upstream and push changes to remote
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push --set-upstream origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now all your changes will be available in the remote main branch.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; Backup your source code before you do all these changes.&lt;/p&gt;

</description>
      <category>github</category>
      <category>migration</category>
    </item>
  </channel>
</rss>
