Ship of Theseus
  • Home
  • Build Your Own Series
  • Ruby
  • Author
Subscribe
Forrest Ye

Forrest Ye

Creating programming educational content, one blog post at a time.

http://forresty.com
Ruby

Re-Implementing Sinatra: Params, Status Code, Headers, ERB and Automated Testing

This post continues the quest we started in a previous post: to re-implement our own almost-compatible Sinatra clone. If you haven't read it, I suggest you at least give a quick skim. In this post, we will tackle: supporting POST, PATCH, PUT and DELETE HTTP methodsparsing query params and named

  • Forrest Ye
Forrest Ye May 7, 2019 • 26 min read
Ruby

How Sinatra Works, or How We Can 山寨 (Shanzhai) a mini Sinatra in 23 Lines of Code

Sinatra is great. It is simple, it is elegant, it is easy to use, and it is wildly popular. It's arguably the second most popular Ruby web framework, following, well very obvious, the Rails. Ideally we want to thoroughly study how Rails works, but the codebase of Rails is quite

  • Forrest Ye
Forrest Ye Apr 28, 2019 • 21 min read
Ruby

Creating Your Own Calculator for Fun and Profit

Have you ever wondered how to create a computer program that can understand arithmetic expressions like: (3 + 11) * 5 - 21 / 7 and yield the right result? As a human, such tasks seems incredibly easy: just perform 3 + 11 first and we will get 14, then 14 * 5 and we

  • Forrest Ye
Forrest Ye Mar 31, 2019 • 17 min read
Ship of Theseus © 2023
  • Data & privacy
  • Contact
  • Contribute →
Powered by Ghost