+
+
+ )
+}
diff --git a/app/blog/posts/spaces-vs-tabs.mdx b/app/blog/posts/spaces-vs-tabs.mdx
new file mode 100644
index 0000000..9caae26
--- /dev/null
+++ b/app/blog/posts/spaces-vs-tabs.mdx
@@ -0,0 +1,31 @@
+---
+title: 'Spaces vs. Tabs: The Indentation Debate Continues'
+publishedAt: '2024-04-08'
+summary: 'Explore the enduring debate between using spaces and tabs for code indentation, and why this choice matters more than you might think.'
+---
+
+The debate between using spaces and tabs for indentation in coding may seem trivial to the uninitiated, but it is a topic that continues to inspire passionate discussions among developers. This seemingly minor choice can affect code readability, maintenance, and even team dynamics.
+
+Let's delve into the arguments for both sides and consider why this debate remains relevant in the software development world.
+
+## The Case for Spaces
+
+Advocates for using spaces argue that it ensures consistent code appearance across different editors, tools, and platforms. Because a space is a universally recognized character with a consistent width, code indented with spaces will look the same no matter where it's viewed. This consistency is crucial for maintaining readability and avoiding formatting issues when code is shared between team members or published online.
+
+Additionally, some programming languages and style guides explicitly recommend spaces for indentation, suggesting a certain number of spaces (often two or four) per indentation level. Adhering to these recommendations can be essential for projects that aim for best practices in code quality and readability.
+
+## The Case for Tabs
+
+On the other side of the debate, proponents of tabs highlight the flexibility that tabs offer. Because the width of a tab can be adjusted in most text editors, individual developers can choose how much indentation they prefer to see, making the code more accessible and comfortable to read on a personal level. This adaptability can be particularly beneficial in teams with diverse preferences regarding code layout.
+
+Tabs also have the advantage of semantic meaning. A tab is explicitly meant to represent indentation, whereas a space is used for many purposes within code. This distinction can make automated parsing and manipulation of code simpler, as tools can more easily recognize and adjust indentation levels without confusing them with spaces used for alignment.
+
+## Hybrid Approaches and Team Dynamics
+
+The debate often extends into discussions about hybrid approaches, where teams might use tabs for indentation and spaces for alignment within lines, attempting to combine the best of both worlds. However, such strategies require clear team agreements and disciplined adherence to coding standards to prevent formatting chaos.
+
+Ultimately, the choice between spaces and tabs often comes down to team consensus and project guidelines. In environments where collaboration and code sharing are common, agreeing on a standard that everyone follows is more important than the individual preferences of spaces versus tabs. Modern development tools and linters can help enforce these standards, making the choice less about technical limitations and more about team dynamics and coding philosophy.
+
+## Conclusion
+
+While the spaces vs. tabs debate might not have a one-size-fits-all answer, it underscores the importance of consistency, readability, and team collaboration in software development. Whether a team chooses spaces, tabs, or a hybrid approach, the key is to make a conscious choice that serves the project's needs and to adhere to it throughout the codebase. As with many aspects of coding, communication and agreement among team members are paramount to navigating this classic programming debate.
diff --git a/app/blog/posts/static-typing.mdx b/app/blog/posts/static-typing.mdx
new file mode 100644
index 0000000..a37037f
--- /dev/null
+++ b/app/blog/posts/static-typing.mdx
@@ -0,0 +1,52 @@
+---
+title: 'The Power of Static Typing in Programming'
+publishedAt: '2024-04-07'
+summary: 'In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic.'
+---
+
+In the ever-evolving landscape of software development, the debate between dynamic and static typing continues to be a hot topic. While dynamic typing offers flexibility and rapid development, static typing brings its own set of powerful advantages that can significantly improve the quality and maintainability of code. In this post, we'll explore why static typing is crucial for developers, accompanied by practical examples through markdown code snippets.
+
+## Improved Code Quality and Safety
+
+One of the most compelling reasons to use static typing is the improvement it brings to code quality and safety. By enforcing type checks at compile time, static typing catches errors early in the development process, reducing the chances of runtime errors.
+
+```ts
+function greet(name: string): string {
+ return `Hello, ${name}!`
+}
+
+// This will throw an error at compile time, preventing potential runtime issues.
+let message: string = greet(123)
+```
+
+## Enhanced Readability and Maintainability
+
+Static typing makes code more readable and maintainable. By explicitly declaring types, developers provide a clear contract of what the code does, making it easier for others (or themselves in the future) to understand and modify the codebase.
+
+## Facilitates Tooling and Refactoring
+
+Modern IDEs leverage static typing to offer advanced features like code completion, refactoring, and static analysis. These tools can automatically detect issues, suggest fixes, and safely refactor code, enhancing developer productivity and reducing the likelihood of introducing bugs during refactoring.
+
+```csharp
+// Refactoring example: Renaming a method in C#
+public class Calculator {
+ public int Add(int a, int b) {
+ return a + b;
+ }
+}
+
+// After refactoring `Add` to `Sum`, all references are automatically updated.
+public class Calculator {
+ public int Sum(int a, int b) {
+ return a + b;
+ }
+}
+```
+
+## Performance Optimizations
+
+Static typing can lead to better performance. Since types are known at compile time, compilers can optimize the generated code more effectively. This can result in faster execution times and lower resource consumption.
+
+## Conclusion
+
+Static typing offers numerous benefits that contribute to the development of robust, efficient, and maintainable software. By catching errors early, enhancing readability, facilitating tooling, and enabling optimizations, static typing is an invaluable asset for developers. As the software industry continues to mature, the importance of static typing in ensuring code quality and performance cannot be overstated. Whether you're working on a large-scale enterprise application or a small project, embracing static typing can lead to better software development outcomes.
diff --git a/app/blog/posts/vim.mdx b/app/blog/posts/vim.mdx
new file mode 100644
index 0000000..b3e0a65
--- /dev/null
+++ b/app/blog/posts/vim.mdx
@@ -0,0 +1,39 @@
+---
+title: 'Embracing Vim: The Unsung Hero of Code Editors'
+publishedAt: '2024-04-09'
+summary: 'Discover why Vim, with its steep learning curve, remains a beloved tool among developers for editing code efficiently and effectively.'
+---
+
+In the world of software development, where the latest and greatest tools frequently capture the spotlight, Vim stands out as a timeless classic. Despite its age and initial complexity, Vim has managed to retain a devoted following of developers who swear by its efficiency, versatility, and power.
+
+This article delves into the reasons behind Vim's enduring appeal and why it continues to be a great tool for coding in the modern era.
+
+## Efficiency and Speed
+
+At the heart of Vim's philosophy is the idea of minimizing keystrokes to achieve maximum efficiency.
+
+Unlike other text editors where the mouse is often relied upon for navigation and text manipulation, Vim's keyboard-centric design allows developers to perform virtually all coding tasks without leaving the home row. This not only speeds up coding but also reduces the risk of repetitive strain injuries.
+
+## Highly Customizable
+
+Vim can be extensively customized to suit any developer's preferences and workflow. With a vibrant ecosystem of plugins and a robust scripting language, users can tailor the editor to their specific needs, whether it's programming in Python, writing in Markdown, or managing projects.
+
+This level of customization ensures that Vim remains relevant and highly functional for a wide range of programming tasks and languages.
+
+## Ubiquity and Portability
+
+Vim is virtually everywhere. It's available on all major platforms, and because it's lightweight and terminal-based, it can be used on remote servers through SSH, making it an indispensable tool for sysadmins and developers working in a cloud-based environment.
+
+The ability to use the same editor across different systems without a graphical interface is a significant advantage for those who need to maintain a consistent workflow across multiple environments.
+
+## Vibrant Community
+
+Despite—or perhaps because of—its learning curve, Vim has cultivated a passionate and active community. Online forums, dedicated websites, and plugins abound, offering support, advice, and improvements.
+
+This community not only helps newcomers climb the steep learning curve but also continually contributes to Vim's evolution, ensuring it remains adaptable and up-to-date with the latest programming trends and technologies.
+
+## Conclusion
+
+Vim is not just a text editor; it's a way of approaching coding with efficiency and thoughtfulness. Its steep learning curve is a small price to pay for the speed, flexibility, and control it offers.
+
+For those willing to invest the time to master its commands, Vim proves to be an invaluable tool that enhances productivity and enjoyment in coding. In an age of ever-changing development tools, the continued popularity of Vim is a testament to its enduring value and utility.
diff --git a/app/blog/utils.ts b/app/blog/utils.ts
new file mode 100644
index 0000000..0156eeb
--- /dev/null
+++ b/app/blog/utils.ts
@@ -0,0 +1,90 @@
+import fs from 'fs'
+import path from 'path'
+
+type Metadata = {
+ title: string
+ publishedAt: string
+ summary: string
+ image?: string
+}
+
+function parseFrontmatter(fileContent: string) {
+ let frontmatterRegex = /---\s*([\s\S]*?)\s*---/
+ let match = frontmatterRegex.exec(fileContent)
+ let frontMatterBlock = match![1]
+ let content = fileContent.replace(frontmatterRegex, '').trim()
+ let frontMatterLines = frontMatterBlock.trim().split('\n')
+ let metadata: Partial = {}
+
+ frontMatterLines.forEach((line) => {
+ let [key, ...valueArr] = line.split(': ')
+ let value = valueArr.join(': ').trim()
+ value = value.replace(/^['"](.*)['"]$/, '$1') // Remove quotes
+ metadata[key.trim() as keyof Metadata] = value
+ })
+
+ return { metadata: metadata as Metadata, content }
+}
+
+function getMDXFiles(dir) {
+ return fs.readdirSync(dir).filter((file) => path.extname(file) === '.mdx')
+}
+
+function readMDXFile(filePath) {
+ let rawContent = fs.readFileSync(filePath, 'utf-8')
+ return parseFrontmatter(rawContent)
+}
+
+function getMDXData(dir) {
+ let mdxFiles = getMDXFiles(dir)
+ return mdxFiles.map((file) => {
+ let { metadata, content } = readMDXFile(path.join(dir, file))
+ let slug = path.basename(file, path.extname(file))
+
+ return {
+ metadata,
+ slug,
+ content,
+ }
+ })
+}
+
+export function getBlogPosts() {
+ return getMDXData(path.join(process.cwd(), 'app', 'blog', 'posts'))
+}
+
+export function formatDate(date: string, includeRelative = false) {
+ let currentDate = new Date()
+ if (!date.includes('T')) {
+ date = `${date}T00:00:00`
+ }
+ let targetDate = new Date(date)
+
+ let yearsAgo = currentDate.getFullYear() - targetDate.getFullYear()
+ let monthsAgo = currentDate.getMonth() - targetDate.getMonth()
+ let daysAgo = currentDate.getDate() - targetDate.getDate()
+
+ let formattedDate = ''
+
+ if (yearsAgo > 0) {
+ formattedDate = `${yearsAgo}y ago`
+ } else if (monthsAgo > 0) {
+ formattedDate = `${monthsAgo}mo ago`
+ } else if (daysAgo > 0) {
+ formattedDate = `${daysAgo}d ago`
+ } else {
+ formattedDate = 'Today'
+ }
+
+ let fullDate = targetDate.toLocaleString('en-us', {
+ month: 'long',
+ day: 'numeric',
+ year: 'numeric',
+ })
+
+ if (!includeRelative) {
+ return fullDate
+ }
+
+ return `${fullDate} (${formattedDate})`
+}
diff --git a/app/components/footer.tsx b/app/components/footer.tsx
new file mode 100644
index 0000000..2f58fab
--- /dev/null
+++ b/app/components/footer.tsx
@@ -0,0 +1,61 @@
+function ArrowIcon() {
+ return (
+
+ )
+}
+
+export default function Footer() {
+ return (
+
+ )
+}
diff --git a/app/components/mdx.tsx b/app/components/mdx.tsx
new file mode 100644
index 0000000..7849731
--- /dev/null
+++ b/app/components/mdx.tsx
@@ -0,0 +1,109 @@
+import Link from 'next/link'
+import Image from 'next/image'
+import { MDXRemote } from 'next-mdx-remote/rsc'
+import { highlight } from 'sugar-high'
+import React from 'react'
+
+function Table({ data }) {
+ let headers = data.headers.map((header, index) => (
+
+ {`I'm a Vim enthusiast and tab advocate, finding unmatched efficiency in
+ Vim's keystroke commands and tabs' flexibility for personal viewing
+ preferences. This extends to my support for static typing, where its
+ early error detection ensures cleaner code, and my preference for dark
+ mode, which eases long coding sessions by reducing eye strain.`}
+