<?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: MorphZG</title>
    <description>The latest articles on DEV Community by MorphZG (@morphzg).</description>
    <link>https://dev.to/morphzg</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%2F685114%2Fdf77e71c-7321-48ca-bb14-3b8002a2b158.jpg</url>
      <title>DEV Community: MorphZG</title>
      <link>https://dev.to/morphzg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/morphzg"/>
    <language>en</language>
    <item>
      <title>Relfection of values</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Tue, 03 Dec 2024 20:24:16 +0000</pubDate>
      <link>https://dev.to/morphzg/relfection-of-values-5agh</link>
      <guid>https://dev.to/morphzg/relfection-of-values-5agh</guid>
      <description>&lt;p&gt;In a world obsessed with numbers, we've traded authenticity for algorithms. We post, not to connect, but to collect likes, hollow currency for shallow validation. Technology isn't the villain, it mirrors us. Are we building tools to improve lives, or just to mask our emptiness? Maybe it's time to pause the scrolling and confront our own, unfiltered image. Ask yourself: Where are the real values?&lt;/p&gt;

</description>
      <category>career</category>
      <category>life</category>
    </item>
    <item>
      <title>Let me tell you a story</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Mon, 16 Sep 2024 10:14:34 +0000</pubDate>
      <link>https://dev.to/morphzg/let-me-tell-you-a-story-2p29</link>
      <guid>https://dev.to/morphzg/let-me-tell-you-a-story-2p29</guid>
      <description>&lt;p&gt;A simple guy, nothing special about him, not much different from the other regulars you see in public. But.... that's just on surface, inside, every single one of us is very special. Living through unique experiences that shapes who we are. First love, first disappointment, first school fight.... Very early in life we start to diverge in unimaginable ways from each other but still, somehow, we are drawn to other people with similar interests. &lt;/p&gt;

&lt;p&gt;I like to stay occupied, i enjoy being productive. Sometimes finding fun where others would get bored to death. That's the reason i write. I like writing.  Writing is more than just an escape or a way to pass the time. It's a reflection, a conversation with myself. Each word is like pulling back a layer, exposing thoughts I didn’t even know I had. It's strange, really, how putting pen to paper or fingers to keyboard can bring out emotions you didn’t realise were hiding beneath the surface. &lt;/p&gt;

&lt;p&gt;I often think about the power of storytelling. How, with the right words, you can capture an entire moment, a fleeting feeling, or a lifetime of experiences. When I write, I'm not just telling a story; I'm weaving a piece of myself into it. Sometimes it's about people I've met, situations I've been in. Sometimes it's just pure imagination, creating worlds and characters that don’t exist, yet somehow feel more real than anything around me.&lt;/p&gt;

&lt;p&gt;There’s something thrilling about it, like I’m both the creator and the observer. I write to understand, to make sense of the chaos that sometimes spins in my head. And if, by chance, my words resonate with someone else, if they read something I’ve written and feel even a fraction of what I felt while writing it well, that’s just a bonus. Because, ultimately, I write for me. &lt;/p&gt;

&lt;p&gt;But that’s the thing about sharing your thoughts no matter how personal they feel, you never know who might connect with them.&lt;/p&gt;

</description>
      <category>writing</category>
      <category>career</category>
      <category>life</category>
    </item>
    <item>
      <title>Perfect note taking system</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Wed, 21 Aug 2024 14:49:35 +0000</pubDate>
      <link>https://dev.to/morphzg/perfect-note-taking-system-4lhe</link>
      <guid>https://dev.to/morphzg/perfect-note-taking-system-4lhe</guid>
      <description>&lt;h2&gt;
  
  
  Tweaking and configuring until you make it
&lt;/h2&gt;

&lt;p&gt;I’ve been down the rabbit hole of finding the perfect tool. It started innocently enough—I was searching for a text editor that could do it all. I tried everything from Evernote to Notion, but then I discovered the text editor that built a huge legacy over the decades of existence, Vim. Text editor you can run on a pocket calculator if it had a few more buttons but also so customisable and extensible you can do some serious work with it. While it's modern brother Neovim ruling the scene these days only sky is the limit.&lt;/p&gt;

&lt;p&gt;I could customise every little detail, configure countless plugins, scripts and themes available i can make it exactly how I want. I’d lose hours tweaking settings and refining my setup, convinced I was being productive just because I was working something. It felt like I was really accomplishing something, and i actually did have really cool piece of a tool. But it was not what i initially went for.&lt;/p&gt;

&lt;p&gt;I had a beautifully customised text editor that could handle anything i throw at it. But i had zero content, zero or almost zero output. Most of my time had been spent fiddling with configurations rather than getting things done. Like most of you i was scammed, by my own surplus of creativity combined with a lack of courage. That’s when it hit me: I wasn’t really moving forward. I was just spinning my wheels, obsessing over the system instead of the work. Being active on reddit.com i found many lost souls looking for a system, how to do it right. It is not about doing it right, you just have to start and you won't be wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why are we scared to start without having a system?
&lt;/h2&gt;

&lt;p&gt;So, why do we get so hung up on finding the perfect note-taking system before we even start? For many of us, it’s about control. Starting something new, like switching careers or diving into a new field, can be intimidating. We crave a sense of order, something that will guide us through the chaos. Having a system feels like having a map in uncharted territory—it’s reassuring. But here’s the problem: spending too much time on the map means you never actually start the journey.&lt;/p&gt;

&lt;p&gt;We’re scared that if we don’t have a system, we’ll mess up. We’ll forget something important, miss a critical detail, or simply feel overwhelmed by the sheer volume of information. But in reality, the only way to overcome that fear is to dive in, messy and unorganised as it might be. The system can come later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do we need a system?
&lt;/h2&gt;

&lt;p&gt;Here’s where things get interesting: you don’t really need a system to get started. I know, it sounds counterintuitive. But think about it, some of the most successful people in the world didn’t start with a flawless system. They started with passion, curiosity, and a willingness to learn. The system was something they developed over time, based on what actually worked for them.&lt;/p&gt;

&lt;p&gt;In fact, obsessing over a system before you even begin can be more of a hindrance than a help. You’re putting the cart before the horse, worrying about the structure when you should be focusing on the content. Notes, after all, are just a tool to help you capture and organise your thoughts. The real value lies in what you’re learning, not how you’re organising it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with content, and the system will come
&lt;/h2&gt;

&lt;p&gt;So, where should you begin? Start with the content. Write, scribble, note what you’re learning, just save what seems important. Why you think it's important? Where you found the information? Think about how would you search for it when you need it. There is a search tool in any app you use, so help your future self and make the information easy to find by adding tags or keywords. Still no need for complex directory structure, keep everything together and just use search tool. If you are adding tags try not to go crazy with to many tags. Tags should be specific with no more than 3 or 4 tags per note, otherwise they loose the purpose. The point here is to help you find the information later.&lt;/p&gt;

&lt;p&gt;As you accumulate more notes, patterns will naturally start to emerge. You’ll begin to see what works and what doesn’t. Maybe you’ll notice that certain tools or methods help you retain information better. That’s when you can start to develop your own system, tailored to your needs. The key is to let the system evolve organically, rather than forcing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t stress too much
&lt;/h2&gt;

&lt;p&gt;It’s easy to get caught up in the idea that you need to have everything figured out from day one. But here’s a little secret: nobody does. Whether you’re starting a new career, learning a new skill, or just trying to keep track of your grocery list, the perfect system is one that grows with you.&lt;/p&gt;

&lt;p&gt;Don’t stress if your notes look like a chaotic mess at first. The important thing is that you’re capturing information and learning. The organisation will come with time, as you refine what works for you. Remember, the goal is progress, not perfection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Embrace the mess and keep moving
&lt;/h2&gt;

&lt;p&gt;In the end, the perfect note-taking system is a myth. There is no one system to rule them all even when it seem like it. There are many templates and workflows available online but at the end you will notice how you can combine different ideas with your creativity and your own personal preference. In the end you will naturally start following a pattern you like and enjoy, your own personal workflow should not restrain you but help you to grow. The real magic happens when you let go of the need for perfection and simply focus on what is actually important. Start with the content, and allow your system to evolve slowly. Embrace the messiness, the trial and error, and the inevitable tweaks along the way.&lt;/p&gt;

&lt;p&gt;Image taken from: &lt;a href="https://www.getclockwise.com/" rel="noopener noreferrer"&gt;https://www.getclockwise.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>learning</category>
      <category>career</category>
    </item>
    <item>
      <title>Note Taking as a Learning Tool: How to Retain Knowledge and Spark New Ideas</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Tue, 06 Aug 2024 03:14:30 +0000</pubDate>
      <link>https://dev.to/morphzg/note-taking-as-a-learning-tool-how-to-retain-knowledge-and-spark-new-ideas-19i0</link>
      <guid>https://dev.to/morphzg/note-taking-as-a-learning-tool-how-to-retain-knowledge-and-spark-new-ideas-19i0</guid>
      <description>&lt;h2&gt;
  
  
  The Importance of Taking Notes
&lt;/h2&gt;

&lt;p&gt;If you're like most people, you've probably scribbled down notes in the margins of a textbook, jotted a few thoughts on a notepad, or tapped out reminders on your phone. But have you ever considered how structured note taking can transform your learning process and spark new and fresh ideas? For those diving into new fields, like i am jumping into a web development, note taking isn't just something you do here and there. Notes should be like a living, always evolving organism. If done right, note taking can be a powerful tool for personal growth and creativity. Not only retaining the new knowledge but as a tool help you develop new insights and wider perspective. In this post, i will share my own experience with note taking, and how leveraging tools like Obsidian can supercharge thinking capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Brief History of Note-Taking
&lt;/h2&gt;

&lt;p&gt;Before we dive into modern methods, let’s take a quick trip down memory lane. Note taking has been around for centuries, from ancient scholars scratching ideas onto papyrus to medieval monks meticulously copying texts. In the 20th century, the advent of typewriters and early computers revolutionised how we capture information, making it easier and faster. Fast forward to today, and digital tools have opened up a world of possibilities for organising and retrieving our thoughts with  ease.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Note taking is not just a way to remember things; it's a method of making sense of the world around you.”&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Methods of Note Taking
&lt;/h2&gt;

&lt;p&gt;There’s no single best approach to note taking, but understanding different methods can help you find what works best for you. Here’s a rundown of popular techniques:&lt;/p&gt;

&lt;h3&gt;
  
  
  Zettelkasten
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Linking ideas creates a web of knowledge that evolves over time."&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: Developed by German sociologist Niklas Luhmann, Zettelkasten, which means “slip box” in German, is a method of note-taking that focuses on creating a network of interconnected notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Each note (or “zettel”) is a self-contained idea or concept. Notes are linked to each other through a unique identification system, making it easy to trace connections between different ideas. This method encourages the development of a personal knowledge base or "second brain."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Great for building a complex web of interconnected ideas, which can be particularly useful for research and writing projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cornell Method
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“The Cornell Method provides a clear and organised way to simplify knowledge review”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: Developed by Walter Pauk, the Cornell Method is a systematic approach to note taking that helps with organization and review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: The page is divided into three sections: a narrow left hand column for cues or key terms, a wider right hand column for detailed notes, and a summary section at the bottom. During the lecture or reading, take notes in the right-hand column. Afterward, summarize the notes and jot down key terms or questions in the left hand column.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Provides a structured way to review and study notes. The summary section and cue column help reinforce learning and facilitate easier review.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Mind Mapping
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“Mind mapping helps visualise relationships and encourages creative thinking.”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: Developed by Tony Buzan, mind mapping is a visual note-taking method that organizes information around a central idea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Start with a central concept in the middle of a page, and then branch out with related ideas, keywords, or concepts. Each branch can further expand into sub-branches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Useful for brainstorming, organising thoughts, and visualising relationships between concepts. It’s also helpful for memory retention due to its visual nature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outline Method
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“Outlining breaks down information into manageable chunks, making it easier to digest.”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: This is a hierarchical method that organizes information into main topics and subtopics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Start with main headings and then create subheadings or bullet points under each heading. Each level of detail is indented to show the relationship between ideas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Excellent for organizing structured information and creating a clear, logical flow. It’s particularly useful for subjects with a clear hierarchy, such as history or science.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sentence Method
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“This method is perfect for capturing detailed, step-by-step information.”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: This method involves writing each new piece of information as a new sentence, often in a linear fashion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Notes are taken in complete sentences, with each sentence representing a distinct idea or fact. This method tends to produce a narrative style of notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Provides detailed and comprehensive notes that can be easy to understand when reviewed later. It’s particularly useful for lectures with dense information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Flow Based Note Taking
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Capture ideas in their natural flow to foster creativity and insight."&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: This approach emphasizes capturing ideas in a free form, non linear way, often using a combination of text, diagrams, and arrows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Notes are taken in a continuous, flowing manner, integrating text and visual elements to capture the flow of ideas as they come.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Allows for creative expression and can adapt to various types of information, making it useful for subjects where connections are fluid and less structured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Charting Method
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Categorise data to compare, contrast, and clarify information efficiently."&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: This method organises information into tables or charts, which is particularly useful for comparing and contrasting data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Create a chart with columns and rows to systematically categorise information. Each row can represent a different item or concept, while columns represent different attributes or criteria.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Ideal for subjects involving comparisons, classifications, or data analysis. It helps to quickly visualise and retrieve information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Boxing Method
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;"Separate topics visually to keep your notes organised and accessible."&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Concept&lt;/strong&gt;: Information is divided into “boxes” or sections on a page to visually separate different topics or subtopics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Draw boxes around related pieces of information to group them together visually. Each box can be a topic or a subtopic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengths&lt;/strong&gt;: Helps in organising notes by visually separating different sections. Useful for subjects where clear delineation between topics is helpful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each method has its own advantages, and the best choice often depends on personal preference, the nature of the material, and the intended use of the notes. Some people even combine methods to suit their needs!&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Tips for Effective Note Taking
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Be Concise and Focused&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Avoid writing down everything verbatim. Instead, focus on capturing key points, main ideas, and essential details. Use abbreviations and symbols to speed up the process and keep your notes succinct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why It Helps&lt;/strong&gt;: Concise notes are easier to review and retain. They also help you to process and understand the material better as you’re forced to distil the information into its most important elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Active Listening and Engagement&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Engage actively with the material as it’s presented. This means asking questions, making connections to what you already know, and summarising information in your own words as you take notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why It Helps&lt;/strong&gt;: Active engagement ensures that you’re not just passively transcribing information, but actually processing and understanding it. This improves retention and comprehension.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Organise Your Notes Clearly&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Use headings, subheadings, bullet points, and numbered lists to structure your notes. Leave space for additional information or clarifications. Consistently use a system for organising your notes, whether it's a specific method like the Cornell Method or just a personal style.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why It Helps&lt;/strong&gt;: Well organised notes are easier to navigate and review. They make it simpler to find specific information and see the overall structure of the material.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Review and Revise Regularly&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Set aside time to review and revise your notes regularly. Summarise what you’ve learned in your own words, fill in any gaps, and clarify any points that are unclear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why It Helps&lt;/strong&gt;: Regular review helps reinforce the material in your memory and ensures that your notes are accurate and complete. Revising also helps you to better understand and integrate the information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Utilise Visual Aids&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tip&lt;/strong&gt;: Incorporate diagrams, charts, and other visual elements to represent complex information and relationships. Tools like mind maps or flowcharts can help in visualising connections between ideas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why It Helps&lt;/strong&gt;: Visual aids can make abstract or complex information more concrete and easier to understand. They also help in memory retention by engaging different cognitive processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why i love Obsidian?
&lt;/h2&gt;

&lt;p&gt;Obsidian is a flexible note taking app that helps you organise your ideas by linking notes together and using simple Markdown formatting. Its Graph View shows how your notes are connected, making it easy to explore your thoughts visually. With notes stored locally and lots of customisation options, Obsidian is great for keeping track of and connecting your information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Markdown Support.&lt;/strong&gt; Obsidian uses Markdown, a lightweight markup language, which allows you to format your notes easily and ensures compatibility with other Markdown based tools. This makes writing and editing content straightforward and flexible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links and backlinks.&lt;/strong&gt; One of Obsidian’s standout features is its bidirectional linking system. You can create wiki style links between the notes and Obsidian will automatically update the links when you change or move connected notes. It is possible to create a link to notes that still has to be written, empty and nonexistent files. After clicking on such link, obsidian will automatically create a new file. It helps if you are writing a lot and planning to connect future writings, no need to come back and update the links. It is flexible and powerful. The ability to link notes and visualise connections makes Obsidian ideal for building a personal knowledge base.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graph View.&lt;/strong&gt; The Graph View is a visual representation of your notes and their connections. It provides an intuitive way to see how your ideas are related, allowing you to explore your knowledge base dynamically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customisability.&lt;/strong&gt; Obsidian is highly customisable. You can choose from a range of themes, install plugins, and adjust settings to tailor the app to your workflow. This adaptability makes it suitable for various use cases, from simple note-taking to complex project management. Obsidian can work very well as a bare bones app, without any additional plugins but plugins are also a great way to add and remove extra features. From simple styles and calendars to complex data fetching plugins that turns your obsidian vault into a database, powerful  template generators... you name it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local Storage.&lt;/strong&gt; Only you are the owner of your notes. Unlike many cloud based note taking apps, Obsidian stores your notes locally on your device as a plain markdown files organised into a set of directories and sub-directories. This offers greater control over your data and ensures that your notes remain accessible even without an internet connection. You can easily format, reformat, convert, code, encode and so on... It is your data and you can move it how you wish.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Publishing tools.&lt;/strong&gt; By utilising a simple structure of notes stored in a local directories or online repositories like github or gitlab, with the help of the static site generators like &lt;a href="https://quartz.jzhao.xyz/" rel="noopener noreferrer"&gt;Quartz&lt;/a&gt; or &lt;a href="https://jekyllrb.com/" rel="noopener noreferrer"&gt;Jekyll&lt;/a&gt; it is only a matter of few minutes and you can have your own digital garden, collection of personal knowledge and everything you written. Feeling inspired? Read this: &lt;a href="https://maggieappleton.com/garden-history" rel="noopener noreferrer"&gt;A Brief History and Ethos of the Digital Garden&lt;/a&gt;, a newly revived philosophy for publishing personal knowledge on the web.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Taking notes is a simple yet powerful practice that can greatly improve how you perceive the world around you. From organising ideas to tracking progress and facilitating learning, effective note taking can enhance your productivity and problem solving skills. By using the right tools and methods, and maintaining a consistent note taking habit, you can ensure that you stay organised, focused, and continuously improving in your web development journey.&lt;/p&gt;

&lt;p&gt;So, grab a notebook or fire up Obsidian, and start turning your scattered thoughts into a well organised stash of knowledge. Happy note taking!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image taken from: &lt;a href="https://blog.cuaa.edu" rel="noopener noreferrer"&gt;https://blog.cuaa.edu&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>YAML reference and important concepts.</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Sun, 21 Jul 2024 22:07:32 +0000</pubDate>
      <link>https://dev.to/morphzg/yaml-reference-and-important-concepts-21p9</link>
      <guid>https://dev.to/morphzg/yaml-reference-and-important-concepts-21p9</guid>
      <description>&lt;h2&gt;
  
  
  YAML Ain’t Markup Language
&lt;/h2&gt;

&lt;p&gt;YAML is a data serialisation language designed to be human-friendly and work well with modern programming languages for common everyday tasks. It is often used for configuration files that are parsed and read by a programming language or a framework. It's readable syntax format makes it easy for developers and system admins to understand and modify.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design goals
&lt;/h2&gt;

&lt;p&gt;The design goals for YAML are, in decreasing priority:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Should be easily readable by humans.&lt;/li&gt;
&lt;li&gt;YAML data should be portable between programming languages.&lt;/li&gt;
&lt;li&gt;Should match the native data structures of dynamic languages.&lt;/li&gt;
&lt;li&gt;Should have a consistent model to support generic tools.&lt;/li&gt;
&lt;li&gt;Should support one-pass processing.&lt;/li&gt;
&lt;li&gt;Should be expressive and extensible.&lt;/li&gt;
&lt;li&gt;Should be easy to implement and use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Basics syntax rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Case sensitive.&lt;/li&gt;
&lt;li&gt;Files should have .yaml as the extension.&lt;/li&gt;
&lt;li&gt;Does not allow usage of tabs, use spaces instead.&lt;/li&gt;
&lt;li&gt;As opposed to json, comments are supported with &lt;code&gt;#&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use indentation to denote structure&lt;/li&gt;
&lt;li&gt;List members are written with leading hyphen &lt;code&gt;-&lt;/code&gt; each on it's own line but can also be enclosed in square brackets and separated with commas.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Block style list&lt;/span&gt;
&lt;span class="na"&gt;List&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;itemA&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;itemB&lt;/span&gt;

&lt;span class="c1"&gt;# Flow style list&lt;/span&gt;
&lt;span class="na"&gt;List&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;itemA&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;itemB&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Associative arrays or dictionaries, also called maps or mapping values are represented using colon &lt;code&gt;:&lt;/code&gt; in the format of key value pair. They are enclosed in curly braces &lt;code&gt;{key1: value1, key2: value2}&lt;/code&gt;. A question mark can be used in front of a key if key have complex structure, like combination of &lt;code&gt;? key: value&lt;/code&gt; both being a key to another value. They provide efficient mechanisms to retrieve values based on keys and organised data storage. The values can be of any type, including other nested dictionaries, lists, strings... anything.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Block style&lt;/span&gt;
&lt;span class="na"&gt;employees&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Alice&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;developer&lt;/span&gt;
    &lt;span class="na"&gt;skills&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Python&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Javascript&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Bob&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;designer&lt;/span&gt;
    &lt;span class="na"&gt;skills&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Photoshop&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Illustrator&lt;/span&gt;

&lt;span class="c1"&gt;# Flow style&lt;/span&gt;
&lt;span class="na"&gt;employees&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;Alice&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;developer&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;skills&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Python&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Javascript&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;Bob&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;designer&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;skills&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Photoshop&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Illustrator&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Strings can be unquoted but may be enclosed in double or single quotes.&lt;/li&gt;
&lt;li&gt;Multiple documents can be separated inside a single file using a &lt;code&gt;---&lt;/code&gt; while document end is denoted with dots &lt;code&gt;...&lt;/code&gt;. Using dots is optional since enclosing the document with hyphens &lt;code&gt;---&lt;/code&gt; inherently ends it. Dots can be useful in cases where you need to explicitly denote the end in situations where document is followed by non-yaml content.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="c1"&gt;# Document 1&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Document&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;1"&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;key1&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;value1&lt;/span&gt;
  &lt;span class="na"&gt;key2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;value2&lt;/span&gt;
&lt;span class="nn"&gt;...&lt;/span&gt;

&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="c1"&gt;# Document 2&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Document&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;2"&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;key3&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;value3&lt;/span&gt;
  &lt;span class="na"&gt;key4&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;value4&lt;/span&gt;
&lt;span class="nn"&gt;...&lt;/span&gt;

&lt;span class="c1"&gt;# Non-YAML content can follow, or another YAML document can start with `---`&lt;/span&gt;
&lt;span class="s"&gt;Some non-YAML content or metadata&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Use anchors &lt;code&gt;&amp;amp;&lt;/code&gt; to define reusable nodes and aliases &lt;code&gt;*&lt;/code&gt; to refer to previously defined node. Merge key &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; to merge the content of an anchor into another node. Using anchors and aliases simplify the yaml files by avoiding redundancy and ensuring consistency. When dealing with large configuration files you can make them cleaner and easier to maintain.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;default_settings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nl"&gt;&amp;amp;default&lt;/span&gt;
  &lt;span class="na"&gt;resolution&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1080p&lt;/span&gt;
  &lt;span class="na"&gt;frame_rate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60&lt;/span&gt;
  &lt;span class="na"&gt;aspect_ratio&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;16:9&lt;/span&gt;

&lt;span class="na"&gt;player1&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;*default&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Player1&lt;/span&gt;
  &lt;span class="na"&gt;controls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;move_up&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;W"&lt;/span&gt;
    &lt;span class="na"&gt;move_down&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;S"&lt;/span&gt;

&lt;span class="na"&gt;player2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;*default&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Player2&lt;/span&gt;
  &lt;span class="na"&gt;controls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;move_up&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ArrowUp"&lt;/span&gt;
    &lt;span class="na"&gt;move_down&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ArrowDown"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To assign a tag to a node use ampersand &lt;code&gt;&amp;amp;&lt;/code&gt;. To reference that node, use an asterisk &lt;code&gt;*&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Tom Nolan&lt;/span&gt;
&lt;span class="na"&gt;bill-to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="nl"&gt;&amp;amp;id01&lt;/span&gt;
  &lt;span class="na"&gt;street&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;123 Main Valley&lt;/span&gt;
          &lt;span class="s"&gt;Room 16          &lt;/span&gt;
  &lt;span class="na"&gt;city&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;   &lt;span class="s"&gt;New York&lt;/span&gt;
  &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;NY&lt;/span&gt;

&lt;span class="na"&gt;ship-to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="nv"&gt;*id01&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In YAML, scalar values can be represented in various ways, including block notation, which allows for multi-line text. The &lt;code&gt;|&lt;/code&gt; and &lt;code&gt;&amp;gt;&lt;/code&gt; symbols are used to specify how line breaks and formatting should be treated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Literal block scalar, the &lt;code&gt;|&lt;/code&gt; symbol is used when you want to preserve all the line breaks and formatting in the text exactly as it appears. It tells yaml to include the line breaks in the content. The text will be rendered with the exact formatting you see, including newlines and indentation. Useful for preformatted text, code blocks, or any content where exact formatting is crucial.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Folded block scalar, the &lt;code&gt;&amp;gt;&lt;/code&gt; symbol is used to fold newlines into spaces, which helps to produce a single-line output for text that is easier to read. It also allows for maintaining newlines when there are blank lines between paragraphs. Converts line breaks into spaces to produce more compact text. Maintains paragraph breaks with blank lines but removes other line breaks. Ideal for long texts that should appear as a single paragraph in the output.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;literal_block&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;This block preserves line breaks.&lt;/span&gt;
  &lt;span class="s"&gt;Each line is treated separately.&lt;/span&gt;

  &lt;span class="s"&gt;Blank lines are kept as is.&lt;/span&gt;

&lt;span class="na"&gt;folded_block&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="s"&gt;This block folds newlines into spaces,&lt;/span&gt;
  &lt;span class="s"&gt;so it will be displayed as a single&lt;/span&gt;
  &lt;span class="s"&gt;line of text with spaces replacing&lt;/span&gt;
  &lt;span class="s"&gt;line breaks.&lt;/span&gt;

  &lt;span class="s"&gt;Paragraphs are separated by blank lines.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;In YAML, scalar values are simple, indivisible data values that can be represented in different ways. They include basic data types like strings, numbers, and booleans. Scalars are the most basic form of data you can work with in YAML, as opposed to more complex data structures like lists or maps. These include: Strings, Numbers, Boolean, Null, Date and Time,&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;scalar_values&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;string_plain&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;This is a plain string.&lt;/span&gt;
  &lt;span class="na"&gt;string_double_quoted&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;is&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;double-quoted&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;string&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;with&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;newline&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;quote&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;
  &lt;span class="na"&gt;string_single_quoted&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;This&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;is&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;single-quoted&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;string&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;with&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;single&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;quote&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;inside&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;it.'&lt;/span&gt;
  &lt;span class="na"&gt;integer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;42&lt;/span&gt;
  &lt;span class="na"&gt;float&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3.14&lt;/span&gt;
  &lt;span class="na"&gt;boolean_true&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;boolean_false&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="na"&gt;null_value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="na"&gt;date&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2024-07-21&lt;/span&gt;
  &lt;span class="na"&gt;datetime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2024-07-21T14:30:00&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>yaml</category>
      <category>configuration</category>
      <category>reference</category>
    </item>
    <item>
      <title>Who am i? For real</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Fri, 12 Apr 2024 14:19:34 +0000</pubDate>
      <link>https://dev.to/morphzg/who-am-i-for-real-13bo</link>
      <guid>https://dev.to/morphzg/who-am-i-for-real-13bo</guid>
      <description>&lt;p&gt;Young, naive and overconfident. Now, 38 years of age, frustrated but highly motivated. I thought success will come by default but was wrong. I always felt confident with skills and value i offer to my employee. bartender since 2005 till now. and i was sure i am a good one. but after my 30 birthday i started to question. somehow i realized i have other skills and interests that none of my colleagues have. In more than a decade of my bartending None of my work buddies. few more years have passed and i am now sure i am different. i just don’t fit into the stereotype.&lt;/p&gt;

&lt;p&gt;Started to wonder. who am i actually? my natural talent. some born as warriors, some as bards, musicians and others as clowns. Who am i? And i found the answer. What you do in your free time? That is career for you. Ever since high school technology was around me. While friends just play the games. I always tried to find how mechanics work? How damage is calculated? How to get highest value with minimal effort. And just like that my head bulb was lit. i love code, i love exploiting the system rules to get optimal results. never really a math guy but mechanics in the background.&lt;/p&gt;

&lt;p&gt;When i started coding in visual studio i got access to simplified git interface. I had urge to learn how all those components work together. Launch the terminal and learn git, learn bash and linux scripting… like puzzles connecting and forming a picture. I realized the backend for web apps is my perfect fit. But then came machine learning and all those really challenging stuff years ahead of me. Currently to high above my level. With 36 i think i am now more than ready to take that bite.&lt;/p&gt;

</description>
      <category>life</category>
      <category>career</category>
      <category>writing</category>
    </item>
    <item>
      <title>Beyond the login screen</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Fri, 12 Apr 2024 12:20:35 +0000</pubDate>
      <link>https://dev.to/morphzg/beyond-the-login-screen-30j5</link>
      <guid>https://dev.to/morphzg/beyond-the-login-screen-30j5</guid>
      <description>&lt;p&gt;In the fast-paced world of web development, ensuring the security of your applications is paramount. With cyber threats becoming increasingly sophisticated, it's more important than ever to fortify your websites against vulnerabilities and pitfalls. In this guide, we'll delve into common vulnerabilities, pitfalls to avoid, and best practices for securing your web applications, covering topics such as user authentication, secure storage of user data, encryption, password hashing and salting, and OAuth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Common Vulnerabilities and Pitfalls
&lt;/h2&gt;

&lt;p&gt;Before diving into specific security measures, let's address common vulnerabilities and pitfalls that plague web applications. Cross-Site Scripting (XSS), SQL Injection, Cross-Site Request Forgery (CSRF), and insecure direct object references are among the most prevalent vulnerabilities. These vulnerabilities can be exploited by attackers to compromise user data, inject malicious code, or hijack user sessions. To mitigate these risks, it's crucial to implement robust security measures at every stage of development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ensuring Website Security
&lt;/h2&gt;

&lt;p&gt;Website security encompasses a broad range of practices aimed at safeguarding your web applications against various threats. This includes implementing secure authentication mechanisms, enforcing access controls, validating user inputs, and keeping software dependencies up-to-date. Additionally, employing HTTPS encryption, using secure coding practices, and regularly auditing your codebase for vulnerabilities are essential steps in bolstering website security.&lt;/p&gt;

&lt;h2&gt;
  
  
  User Authentication: The Gateway to Security
&lt;/h2&gt;

&lt;p&gt;User authentication forms the cornerstone of web application security. By verifying the identity of users, you can control access to sensitive resources and protect against unauthorized access. Common authentication methods include username/password authentication, multi-factor authentication (MFA), and single sign-on (SSO). It's crucial to choose the right authentication mechanism based on your application's requirements and sensitivity of the data being accessed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Secure Storage of User Data
&lt;/h2&gt;

&lt;p&gt;Once users are authenticated, their data must be securely stored to prevent unauthorized access or leakage. This involves encrypting sensitive information such as passwords, credit card numbers, and personal details before storing them in databases or filesystems. Encryption ensures that even if attackers gain access to the stored data, they cannot decipher it without the encryption keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Importance of Encryption
&lt;/h2&gt;

&lt;p&gt;Encryption is the process of encoding information in such a way that only authorized parties can access it. It plays a vital role in protecting data both at rest and in transit. Encryption algorithms use cryptographic keys to transform plaintext data into ciphertext, rendering it unreadable to anyone without the corresponding decryption key. Encryption is crucial for safeguarding sensitive information, such as passwords, financial transactions, and confidential communications.&lt;/p&gt;

&lt;h2&gt;
  
  
  How and Where We Use Encryption
&lt;/h2&gt;

&lt;p&gt;Encryption is employed in various areas of web development, including data transmission over insecure networks (HTTPS), storage of sensitive data in databases, and securing communications between clients and servers. By encrypting data at rest and in transit, developers can mitigate the risk of data breaches and unauthorized access.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Limitations of Encryption
&lt;/h2&gt;

&lt;p&gt;While encryption provides a robust layer of security, it's not infallible. Attackers can employ techniques such as brute-force attacks, cryptographic vulnerabilities, or social engineering to bypass encryption controls. Additionally, the improper implementation or weak configuration of encryption algorithms can render them susceptible to exploitation. Therefore, it's essential to stay updated on best practices and emerging threats in encryption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Password Hashing and Salt
&lt;/h2&gt;

&lt;p&gt;Password hashing is a crucial aspect of user authentication, whereby passwords are transformed into irreversible hash values before being stored in databases. Unlike encryption, hashing is a one-way process, meaning that it's computationally infeasible to reverse the hashed value back to the original password. This ensures that even if the hashed passwords are compromised, attackers cannot retrieve the plaintext passwords.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Hashing and Hash Functions
&lt;/h2&gt;

&lt;p&gt;Hashing involves applying a mathematical algorithm to convert input data (plaintext passwords) into fixed-length hash values. Common hash functions include SHA-256, SHA-512, and bcrypt. Hash functions produce unique hash values for each input, making them ideal for storing passwords securely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Differentiating Hashing from Encryption
&lt;/h2&gt;

&lt;p&gt;While both hashing and encryption involve transforming data into a different format, they serve distinct purposes. Encryption is reversible, meaning that encrypted data can be decrypted back to its original form using the decryption key. In contrast, hashing is irreversible, ensuring that plaintext passwords cannot be retrieved from hashed values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance and Security of Hashing
&lt;/h2&gt;

&lt;p&gt;Hashing passwords before storing them in databases is essential for protecting user credentials against unauthorized access. Even if attackers gain access to the hashed passwords, they cannot decipher them without performing a brute-force attack or exploiting hash vulnerabilities. However, it's crucial to use strong hash functions and employ additional security measures such as salting to enhance the resilience of password hashing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Salt for Added Security
&lt;/h2&gt;

&lt;p&gt;Salt is a random string of data that is concatenated with passwords before hashing, making each hashed value unique even for identical passwords. By adding salt to the hashing process, developers can thwart pre-computed hash attacks and rainbow table attacks, significantly increasing the complexity of password cracking attempts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing OAuth for Secure Authentication
&lt;/h2&gt;

&lt;p&gt;OAuth (Open Authorization) is a widely adopted protocol for delegated authorization and authentication, allowing users to grant third-party applications limited access to their resources without sharing their credentials. Unlike traditional authentication methods, OAuth enables secure, token-based authentication, reducing the risk of credential theft and phishing attacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding OAuth and Its Advantages
&lt;/h2&gt;

&lt;p&gt;OAuth simplifies the authentication process for users by eliminating the need to disclose their credentials to third-party applications. Instead, users authorize access to their data through OAuth tokens, which can be revoked or refreshed as needed. This granular access control enhances security and privacy, minimizing the potential impact of data breaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mechanics of OAuth
&lt;/h2&gt;

&lt;p&gt;OAuth operates through a series of interactions between the resource owner (user), the client application, and the authorization server. Upon initiating a request for access to protected resources, the client application redirects the user to the authorization server, where they authenticate and authorize the requested permissions. Upon approval, the authorization server issues an access token to the client application, enabling it to access the user's resources on their behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Securing Your Web Applications with Node.js
&lt;/h2&gt;

&lt;p&gt;In conclusion, securing your web applications requires a multifaceted approach encompassing authentication, encryption, and access control mechanisms. By understanding common vulnerabilities, employing best practices, and leveraging robust security protocols such as OAuth, you can mitigate the risk of data breaches and safeguard sensitive information.&lt;/p&gt;

&lt;p&gt;Now, let's dive into implementing some of these security measures in Node.js:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Define User as a mongoose model&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mongoose&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mongoose&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Define user schema&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;mongoose&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Schema&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;oauthId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// Hash value will be stored instead of password&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Create User model&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mongoose&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;userSchema&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Salt the password, hash everything together and repeat 10 times&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bcrypt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bcrypt&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;saltRounds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;hashPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&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;salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;bcrypt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;genSalt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;saltRounds&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;bcrypt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;comparePasswords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;plainPassword&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hashedPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;bcrypt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;plainPassword&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hashedPassword&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;User Authentication with Passport.js&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LocalStrategy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;verifyPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Invalid username or password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="c1"&gt;// Serialization refers to converting a user object into a format that can be easily stored in a session. This usually involves extracting a unique identifier (such as the user's ID) from the user object and storing it in the session.&lt;/span&gt;
&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serializeUser&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deserializeUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;OAuth Integration with Passport.js&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;passport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;passport&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;OAuth2Strategy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;passport-oauth2&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;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./models/User&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OAuth2Strategy&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;authorizationURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/oauth2/auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tokenURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/oauth2/token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;clientID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CLIENT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;clientSecret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CLIENT_SECRET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;callbackURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/auth/callback&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;refreshToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;oauthId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;oauthId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;displayName&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>authentication</category>
      <category>security</category>
      <category>node</category>
    </item>
    <item>
      <title>Uncovering Ikigai: My Journey</title>
      <dc:creator>MorphZG</dc:creator>
      <pubDate>Fri, 13 Oct 2023 19:17:54 +0000</pubDate>
      <link>https://dev.to/morphzg/uncovering-ikigai-my-journey-4fio</link>
      <guid>https://dev.to/morphzg/uncovering-ikigai-my-journey-4fio</guid>
      <description>&lt;p&gt;Life often has a way of surprising us, and my journey from behind the bar counter to becoming a web developer is a testament to that. I’m a simple guy, a 38-year-old on a quest to discover my Ikigai – that elusive balance of passion, profession, vocation, and the needs of the world. This is the story of how I found the courage to transition into the world of web development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Life behind the bar
&lt;/h2&gt;

&lt;p&gt;For 15 years, I poured drinks, mixed cocktails, and witnessed countless stories unfold in the dimly lit ambiance of the bar I called home. While it had its charms, I couldn’t ignore the nagging feeling that something was missing. I yearned for a deeper sense of fulfillment, a reason to wake up in the morning that extended beyond the nightlife.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hint of passion
&lt;/h2&gt;

&lt;p&gt;My fascination with mechanics and the inner workings of technology was a constant presence in my life. During the rare moments of downtime at the bar, I started to dive into the intricacies of technology, trying to understand how everything fits together. Each new insight felt like solving a puzzle, and it quickly turned into a passion. I couldn’t get enough of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self discovery
&lt;/h2&gt;

&lt;p&gt;As I delved deeper into web development and technology, I realized that the path to mastering this craft was going to be challenging. I am a self-taught developer, which meant countless hours of learning, practicing, and overcoming obstacles. The late nights in front of my computer were tough, but they were also incredibly rewarding.&lt;/p&gt;

&lt;h2&gt;
  
  
  World needs
&lt;/h2&gt;

&lt;p&gt;While contemplating this career shift, I wondered if web development aligned with the needs of the world i live in. In today’s digital age, another industrial revolution, there’s a growing demand for talented and passionate guys willing and able to think out of the box and solve problems. Not to earn a paycheck but because they enjoy it so much. I can describe the feeling like solving the puzzle or winning the game you love playing. That is my Ikigai.&lt;/p&gt;

&lt;h2&gt;
  
  
  Financial stability
&lt;/h2&gt;

&lt;p&gt;Leaving the stability of my bartending job was a daunting prospect. The steady income had been my lifeline, but my growing passion for web development and understanding technology’s inner workings gave me the courage to embrace the unknown. I realized that I could be paid for something I loved and believed in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The journey ahead
&lt;/h2&gt;

&lt;p&gt;My pursuit of Ikigai has brought me to this point, where I’m no longer just a bartender; I’m a budding web developer with a passion for understanding technology’s mechanics. My journey is ongoing, and the path ahead is still filled with uncertainty, but every line of code I write and every project I complete is a step closer to my true purpose.&lt;/p&gt;

&lt;p&gt;As I continue this transition and exploration of my newfound passion, I want to share my knowledge and experiences with the world. This blog is the canvas where I’ll paint the picture of my journey – the challenges, the triumphs, and everything in between. My hope is that by sharing my story, I can inspire others to follow their passions and uncover their own Ikigai.&lt;/p&gt;

&lt;p&gt;Until the next chapter of our adventure.&lt;/p&gt;

</description>
      <category>life</category>
      <category>webdev</category>
      <category>career</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
