John Cox

Blogs · @wyome

Tagged ruby · everything

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot

This reference sheet provides a side-by-side comparison of JavaScript, Python, PHP, and Ruby across multiple programming domains—from basic grammar and variables through advanced features like threads and databases. It covers syntax differences (like how each language defines functions, handles string interpolation, and structures control flow), built-in data types and operations (arrays, dictionaries, mathematical functions), and practical facilities (regular expressions, date/time handling, exception management). The second sheet extends the comparison into areas like file I/O, web functionality, object-oriented programming, reflection, and testing, making it a comprehensive quick-reference guide for developers working across these four languages or learning a new one by comparison.

Permalink

How Basecamp Next got to be so damn fast without using much client-side UI - (37signals)

Basecamp achieved exceptional speed in their redesigned application through two complementary approaches: Stacker, a custom pushState-based engine that minimizes HTTP requests by only refreshing changed content while preserving the page layout, and an aggressive "Russian doll" caching strategy where every piece of content is individually cached so that when something changes, only the affected caches are invalidated while others are reused. This multi-layered caching system, combined with techniques like sharing identical cached templates across pages and users (with JavaScript handling user-specific logic), enables most requests to complete in under 100ms without sacrificing the development experience of building in server-side Rails rather than client-side JavaScript frameworks.

Permalink