Posts

Modern JavaScript Async Patterns

tech tutorial

Modern JavaScript Async Patterns

Exploring the evolution from callbacks to async/await and beyond.

Promise Chains vs Async/Await

// Promise chains
fetchUser(id)
  .then(user => fetchPosts(user.id))
  .then(posts => renderPosts(posts))
  .catch(handleError);

// Async/await
try {
  const user = await fetchUser(id);
  const posts = await fetchPosts(user.id);
  renderPosts(posts);
} catch (error) {
  handleError(error);
}

The async/await syntax makes asynchronous code much more readable!

Building a Hugo Theme from Scratch

tech tutorial

Building a Hugo Theme from Scratch

Creating a custom Hugo theme has been an exciting journey! Here’s what I learned while building the nomad-tech theme.

Key Concepts

Hugo’s template lookup order is crucial for theme development:

layouts/
├── _default/
│   ├── baseof.html
│   ├── list.html
│   └── single.html
├── partials/
└── section-name/
    └── list.html

Hugo Pipes for Assets

Modern Hugo themes should use Hugo Pipes for asset processing:

{{ $scss := resources.Get "scss/main.scss" }}
{{ $css := $scss | resources.ToCSS | resources.Minify | resources.Fingerprint }}

Multilingual Support

Hugo’s i18n system makes multilingual themes straightforward:

Digital Nomad Visa Guide 2024

nomad lifestyle

Digital Nomad Visa Guide 2024

Complete guide to digital nomad visas and remote work permits.

Top Nomad-Friendly Countries

  • Portugal: D7 Visa (1-2 years)
  • Estonia: Digital Nomad Visa (1 year)
  • Barbados: Welcome Stamp (1 year)
  • Dubai: Virtual Working Program (1 year)

Application Tips

  1. Income Requirements: Usually $2000-3500/month
  2. Health Insurance: Mandatory for most programs
  3. Processing Time: 2-8 weeks typically
  4. Remote Work Proof: Employment letter or business registration

Planning ahead is key for a smooth nomad journey!

Digital Nomad Life in Bali: 3 Months In

nomad lifestyle

Digital Nomad Life in Bali: 3 Months In

Three months into my Bali adventure, and I’m still amazed by how this island balances productivity with paradise.

The Good

  • Coworking Scene: Dojo Bali and Outpost are incredible
  • Internet: Surprisingly reliable 50+ Mbps in most areas
  • Community: Amazing nomad community, especially in Canggu
  • Cost: $800-1200/month for a comfortable lifestyle

The Challenges

  • Rainy Season: Coding during tropical storms is… interesting
  • Traffic: Scooter rides to meetings can be adventures
  • Time Zones: Client calls at 2 AM are rough

Productivity Tips

  1. Morning Routine: Surf at sunrise, code by 9 AM
  2. Coworking: Don’t work from your villa all the time
  3. Backup Internet: Always have a mobile hotspot ready

The blend of tech work and tropical living is addictive. Already planning my next destination!

CSS Grid vs Flexbox: When to Use What

tech tutorial

CSS Grid vs Flexbox: When to Use What

Understanding the differences between CSS Grid and Flexbox for modern layouts.

Use Flexbox For:

  • One-dimensional layouts (rows OR columns)
  • Component-level design
  • Centering content
  • Navigation bars

Use CSS Grid For:

  • Two-dimensional layouts (rows AND columns)
  • Page-level design
  • Complex layouts
  • Card grids
/* Flexbox for navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Grid for main layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: auto 1fr auto;
}

Both are powerful tools - use them together!

Best Coworking Spaces in Thailand

nomad lifestyle

Best Coworking Spaces in Thailand

My experience working from Thailand’s top coworking spaces.

Bangkok

  • HUBBA-TO: Premium space in Thonglor
  • Launchpad: Great community, multiple locations
  • The Hive: Professional environment

Chiang Mai

  • CAMP: The nomad headquarters
  • Punspace: Reliable and affordable
  • Maya Lifestyle: Modern facilities

Phuket

  • Andaman Coworking: Beach vibes
  • Outpost: International community

What to Look For

  • Stable internet (50+ Mbps)
  • Comfortable seating
  • Meeting rooms
  • Coffee quality (important!)
  • Community events

Thailand’s coworking scene is world-class!