From 6de2346ee5b4a1d4b0b81bbe33e452c9fb284f11 Mon Sep 17 00:00:00 2001 From: Caleb Braaten Date: Thu, 16 Apr 2026 02:45:36 -0700 Subject: [PATCH] Remove test posts --- content/2024/12/year-in-review.md | 93 ----------------------- content/2025/09/typescript-tips.md | 108 --------------------------- content/2025/10/a-new-post.md | 82 -------------------- content/2025/10/building-with-bun.md | 101 ------------------------- content/2025/10/my-first-post.md | 51 ------------- 5 files changed, 435 deletions(-) delete mode 100644 content/2024/12/year-in-review.md delete mode 100644 content/2025/09/typescript-tips.md delete mode 100644 content/2025/10/a-new-post.md delete mode 100644 content/2025/10/building-with-bun.md delete mode 100644 content/2025/10/my-first-post.md diff --git a/content/2024/12/year-in-review.md b/content/2024/12/year-in-review.md deleted file mode 100644 index a46ae99..0000000 --- a/content/2024/12/year-in-review.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: 2024 Year in Review -date: 2024-12-28 -tags: [Career, Productivity] -excerpt: Reflecting on 2024 - the projects I built, lessons I learned, and goals for 2025. A year of growth, challenges, and accomplishments. -draft: false ---- - -# 2024 Year in Review! - -As 2024 comes to a close, I wanted to take some time to reflect on the year. It's been a year of significant growth, both professionally and personally. - -## Professional Highlights - -### Projects - -This year, I worked on several exciting projects: - -**E-commerce Platform**: Led the frontend architecture for a new e-commerce platform serving 100k+ daily users. We achieved a 40% improvement in page load times through careful optimization. - -**Design System**: Built a comprehensive design system from scratch, complete with documentation and Storybook. This is now used across 5 different products. - -**Open Source**: Made my first significant open source contributions! Contributed to several Bun-related projects and created a few small utilities that others found useful. - -### Skills Developed - -- **Performance Optimization**: Learned a ton about web performance, Core Web Vitals, and how to actually make sites fast -- **System Design**: Started thinking more about architecture and scalability -- **TypeScript**: Became much more proficient with advanced TypeScript patterns -- **Testing**: Finally built a solid testing practice - -## Personal Growth - -### Writing - -Started this blog! Writing has helped me: -- Clarify my thinking -- Learn more deeply -- Connect with others in the community - -### Work-Life Balance - -Made a conscious effort to improve work-life balance: -- Implemented a hard stop at 6 PM -- Started exercising regularly (3x per week) -- Picked up reading again (finished 12 books!) - -## Challenges - -Not everything was smooth sailing: - -**Burnout**: Hit a rough patch in Q2 where I was working too much. Learned the importance of rest and boundaries. - -**Imposter Syndrome**: Still struggles with this occasionally, but getting better at recognizing it and pushing through. - -**Saying No**: Learned that saying no to some opportunities is necessary to say yes to the right ones. - -## Lessons Learned - -1. **Quality > Quantity**: Better to do fewer things well than many things poorly -2. **Ask for Help**: Nobody knows everything, and asking for help is a strength -3. **Document Everything**: Future you will thank present you -4. **Take Breaks**: Rest isn't laziness - it's necessary for sustained performance -5. **Community Matters**: Connecting with other developers has been invaluable - -## Goals for 2025 - -Looking ahead to 2025: - -### Professional -- Contribute to a major open source project -- Speak at a local meetup or conference -- Learn Rust (for real this time) -- Build and launch a side project - -### Personal -- Write 24 blog posts (2 per month) -- Read 20 books -- Maintain exercise routine -- Learn to cook 10 new recipes - -### Learning -- Deep dive into system design -- Master web performance -- Learn more about databases -- Get better at writing - -## Thank You - -Thanks to everyone who supported me this year - colleagues, friends, family, and the online tech community. Looking forward to 2025! - -What were your highlights from 2024? What are you looking forward to in 2025? - diff --git a/content/2025/09/typescript-tips.md b/content/2025/09/typescript-tips.md deleted file mode 100644 index 615577a..0000000 --- a/content/2025/09/typescript-tips.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: 5 TypeScript Tips I Wish I Knew Earlier -date: 2025-09-18 -readingTime: 10 minutes -tags: [TypeScript, JavaScript, Productivity] -excerpt: Five practical TypeScript tips that will make your code more type-safe and your development experience smoother. From utility types to const assertions. -draft: false ---- - -# 5 TypeScript Tips I Wish I Knew Earlier - -TypeScript is an amazing tool, but it takes time to learn all its features. Here are five tips that significantly improved my TypeScript development experience. - -## 1. Use `satisfies` for Type Checking - -The `satisfies` keyword (added in TS 4.9) lets you validate that a value matches a type without widening its type: - -```typescript -type RGB = { r: number; g: number; b: number }; - -// Before: Type is widened to RGB -const color: RGB = { r: 255, g: 0, b: 0 }; - -// After: Type is preserved as literal values -const color = { r: 255, g: 0, b: 0 } satisfies RGB; -``` - -This is especially useful when you want both type safety and precise types. - -## 2. Const Assertions - -Adding `as const` to an object or array makes all properties readonly and infers literal types: - -```typescript -// Regular array: type is string[] -const fruits = ['apple', 'banana']; - -// With const assertion: type is readonly ['apple', 'banana'] -const fruits = ['apple', 'banana'] as const; -``` - -This is perfect for configuration objects and enum-like values. - -## 3. Utility Type: `Awaited` - -Need to get the resolved type of a Promise? Use `Awaited`: - -```typescript -async function fetchUser() { - return { id: 1, name: 'Alice' }; -} - -// Gets the return type without the Promise wrapper -type User = Awaited>; -// User is { id: number; name: string } -``` - -## 4. Template Literal Types - -Create types based on string patterns: - -```typescript -type EventName = 'click' | 'focus' | 'blur'; -type EventHandler = `on${Capitalize}`; -// Result: 'onClick' | 'onFocus' | 'onBlur' -``` - -This is incredibly powerful for creating type-safe APIs. - -## 5. Discriminated Unions - -Use a common property to narrow union types: - -```typescript -type Success = { status: 'success'; data: string }; -type Error = { status: 'error'; error: string }; -type Result = Success | Error; - -function handle(result: Result) { - if (result.status === 'success') { - // TypeScript knows this is Success - console.log(result.data); - } else { - // TypeScript knows this is Error - console.log(result.error); - } -} -``` - -This pattern eliminates entire classes of runtime errors. - -## Bonus: Non-Null Assertion Operator - -While I generally avoid the `!` operator, it's useful when you know better than TypeScript: - -```typescript -// When you're certain the element exists -const button = document.getElementById('submit')!; -button.click(); -``` - -Use sparingly and only when you're absolutely sure. - -## Wrapping Up - -These tips have made my TypeScript code more robust and easier to maintain. The key is to leverage TypeScript's type system to catch errors at compile time rather than runtime. - -What are your favorite TypeScript features? Let me know! diff --git a/content/2025/10/a-new-post.md b/content/2025/10/a-new-post.md deleted file mode 100644 index 3e4ff5b..0000000 --- a/content/2025/10/a-new-post.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Modern Development Workflow -date: 2025-10-21 -tags: [Web Development, TypeScript, Productivity] -excerpt: Explore modern development workflows that boost productivity and code quality. Learn about hot module replacement, automated testing, and modern tooling. -draft: false ---- - -# Modern Development Workflow - -In today's fast-paced development environment, having an efficient workflow is crucial for maintaining productivity and code quality. - -## Hot Module Replacement - -Hot Module Replacement (HMR) revolutionizes the development experience: - -```typescript -// Vite configuration with HMR -export default { - server: { - hmr: { - overlay: true - } - }, - plugins: [ - reactRefresh() - ] -} - -// During development, changes appear instantly -const Component = () => { - const [count, setCount] = useState(0); - return ( - - ); -}; -``` - -## Tool Chain Essentials - -A modern tool chain should include: - -- **Fast builds**: Vite or Bun for lightning-fast compilation -- **Type safety**: TypeScript for catching errors at compile time -- **Code formatting**: Prettier for consistent code style -- **Linting**: ESLint for maintaining code quality - -## Automated Testing - -Integrate testing into your workflow: - -```typescript -// Component testing with React Testing Library -import { render, screen, fireEvent } from '@testing-library/react'; -import Counter from './Counter'; - -test('increment works correctly', () => { - render(); - - const button = screen.getByRole('button'); - fireEvent.click(button); - - expect(screen.getByText('Count: 1')).toBeInTheDocument(); -}); -``` - -## Best Practices - -- **Git hooks**: Pre-commit hooks for code quality checks -- **CI/CD**: Automated testing and deployment -- **Documentation**: Keep README files up to date -- **Code reviews**: Peer reviews for knowledge sharing - -## Conclusion - -A modern development workflow combines the right tools with good practices. Invest time in setting up your environment properly, and it will pay dividends in productivity throughout your project. - ---- - -*This post demonstrates the power of modern development tools and workflows.* diff --git a/content/2025/10/building-with-bun.md b/content/2025/10/building-with-bun.md deleted file mode 100644 index 83fbf9e..0000000 --- a/content/2025/10/building-with-bun.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Building a Modern Blog with Bun and TypeScript -date: 2025-10-20 -tags: [Web Development, TypeScript, JavaScript] -excerpt: A deep dive into building a performant, modern blog using Bun's runtime, TypeScript, and server-side rendering. Learn about the architecture decisions and tradeoffs. -draft: false ---- - -# Building a Modern Blog with Bun and TypeScript - - -## Why Bun? - -Bun is an all-in-one JavaScript runtime that's significantly faster than Node.js for many operations. It includes: - -- A blazing-fast JavaScript/TypeScript runtime -- Built-in bundler -- Native TypeScript support -- Package manager -- Test runner - -For this blog, the combination of native TypeScript support and the built-in bundler made Bun an obvious choice. - -## Architecture Overview - -The blog uses a hybrid approach: - -### Server-Side Rendering - -All HTML is generated on the server using JSX as a templating language. This means: - -- **Fast initial page loads** - No waiting for JavaScript to download and execute -- **SEO friendly** - Search engines see fully rendered HTML -- **Works without JavaScript** - Core functionality doesn't depend on client-side JS - -### AppShell Pattern - -The blog implements an "AppShell" pattern where: - -1. First visit loads the full page with AppShell (sidebar, header, etc.) -2. Navigation replaces only the `
` content -3. Subsequent requests send a custom header to indicate AppShell is already loaded -4. Server returns just the content, not the full shell - -This gives us SPA-like navigation speed with SSR benefits. - -## Markdown Processing - -Blog posts are written in Markdown and processed at build time: - -```typescript -// Simplified example -import { marked } from 'marked'; - -const html = marked.parse(markdownContent); -``` - -The plugin: -- Scans the content directory -- Parses frontmatter (title, date, tags, etc.) -- Converts markdown to HTML -- Stores everything in SQLite for fast queries - -## Performance Results - -The result? Page loads under 128KB including: -- All HTML -- All CSS (inlined) -- Minimal JavaScript for interactivity - -First contentful paint happens in under 100ms on a fast connection. - -## Developer Experience - -With Bun's `--watch` flag, the entire development workflow is seamless: - -```bash -bun run --watch ./index.tsx -``` - -This watches for changes and hot-reloads the server. Combined with the markdown plugin, changing a blog post immediately reflects in the browser. - -## Lessons Learned - -### What Worked Well - -- **JSX for templating** - Familiar, type-safe, and no new syntax to learn -- **SQLite for search** - Fast, embedded, and perfect for a small blog -- **Bun's speed** - Development is incredibly fast - -### What Could Be Better - -- **Hot reloading** - Would love client-side HMR for styles -- **Build step** - Currently all processing happens at runtime -- **TypeScript types** - Virtual modules need proper type definitions - -## Conclusion - -Building with Bun has been a great experience. The performance is excellent, and the developer experience is top-notch. If you're building a new project and want to try something modern, I highly recommend giving Bun a shot. - -The code for this blog is open source - check it out on GitHub! diff --git a/content/2025/10/my-first-post.md b/content/2025/10/my-first-post.md deleted file mode 100644 index 0e5f6fa..0000000 --- a/content/2025/10/my-first-post.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Welcome to My Blog -date: 2025-10-15 -tags: [Career, Web Development, Another Tag, Blogging] -excerpt: Starting a new blog to share my thoughts on web development, programming, and building great software. Here's why I decided to start writing. -draft: false ---- - -# Welcome to My Blog - -I'm excited to finally launch my personal blog! After years of thinking about it, I've decided it's time to start sharing my experiences, learnings, and thoughts about web development and software engineering. - -## Why Start a Blog? - -There are a few reasons I decided to finally take the plunge: - -**Learning in Public**: Writing about what I learn helps solidify my understanding. Teaching is one of the best ways to learn, and writing blog posts forces me to really understand a topic deeply. - -**Building a Knowledge Base**: I often solve problems and then forget the solution months later. This blog will serve as my personal reference guide for future me. - -**Contributing to the Community**: The developer community has given me so much through blog posts, tutorials, and open source. This is my way of giving back. - -## What to Expect - -I plan to write about: - -- Web development best practices -- TypeScript and JavaScript tips -- Architecture and design patterns -- Career advice and lessons learned -- Tools and productivity - -## The Tech Stack - -This blog itself is built with some fun technologies: - -- **Bun** - The all-in-one JavaScript runtime -- **TypeScript** - For type safety -- **Elysia** - Fast web framework for Bun -- **SQLite** - For blog post search and metadata - -I'll be writing more about the technical implementation in future posts. - -## Let's Connect - -If you enjoy the content, feel free to reach out! You can find me on Twitter, GitHub, and LinkedIn (links in the sidebar). - -Thanks for reading, and I hope you find something useful here! - -Test change at Wed Oct 22 06:20:32 PDT 2025 -