Filter by source
All sources GoCardless 6199 PubNub: 2474 Vercel 1700 Serverless 850 Ariya Hidayat 849 Jake Trent 816 Drew DeVault 784 Nic Raboy 734 SitePoint 689 Neon 506 Supabase 441 Shopify 435 Real Python 427 Soundcloud 409 Databricks 396 Johannes Brodwall 378 Jeremy Kun 328 Laravel 304 PostHog 296 Twilio 268 Cloudflare 258 Graham King 257 MapTiler 257 Carlos Becker 252 Scott Johnson 250 Lea Verou 244 Matt Aimonetti 231 Nvidia 231 Atomic Object 225 Andrew Bancroft 214 Lerner Consulting 193 Stack Overflow 191 Stanko Tadiฤ‡ 189 Freek Van der Herten 183 The Daily WTF 174 Raymond Chen 171 GitHub Old 162 Trivago 161 Discord 140 Dan Luu 137 Auth0 136 Swizec Teller 134 WyeWorks 134 Una Kravets 132 OCTO Technology 128 Codrops 126 Hostinger 126 Reginald Braithwaite 121 Android 120 Jane Street 120 Radek Pazdera 118 Warp 114 AWS 113 Antirez 110 Thoughtbot 107 Cerner 103 AdRoll 102 Changelog 101 Jake Wharton 101 Martin Fowler 99 Nelson Elhage 98 dbt Labs 97 Ilija Eftimov 94 Marek Majkowski 94 Docker 92 .NET 89 Finn.no 86 Nick Desaulniers 86 Sentry 86 Hayden James 85 Marcelo Rinesi 85 Timescale 85 Nordic APIs 84 Toptal 84 Luciano Mammino 80 Wingify 78 Jessie Frazelle 77 Monica Dinculescu 77 Matt Warren 76 Drivy 75 Jan Lelis 75 T.J. Maher 75 Paweล‚ Chudzik 73 Kotlin 72 Ebay 69 Mykhailo Kozik 68 Evil Martians 65 Axel Rauschmayer 64 Mozilla Release 64 Confluent 62 Tailscale 61 Tania Rascia 60 0xADADA 59 Jake Yesbeck 59 Khan Academy 59 Dean Hume 58 SurveyMonkey 57 RoseHosting 56 Facebook AI Research 54 jOOQ 53 Sam Saffron 51 Monstermuffin 48 Rust 46 Huon Wilson 45 Philip Walton 45 Stripe 45 The Pragmatic Engineer 45 Dennis Felsing 44 HackerEarth 44 Fly.io 43 Josh Sherman 43 Gleb Bahmutov 42 Robin Ward 41 Philipp Oppermann 40 Armin Ronacher 36 Daniel Doubrovkine (dB.) 36 Grab 36 Pinterest 36 Alex Russell 35 Addy Osmani 34 Airbnb 34 Brandwatch 34 Tumblr 33 8th Light 32 Joe Nelson 32 Netflix 32 Palantir 31 Bartlomiej Filipek 30 Domenico Luciani 30 IPFS 30 Lazarus Lazaridis 30 Pamela Fox 30 Evan Miller 29 GitHub 29 Vanilla Java 29 Evan Hahn 28 Jonathan Snook 28 PagerDuty 28 Ruslan Spivak 28 Dereuromark 27 Okta 27 Petr Mitrichev 27 Red 27 Julia Evans 26 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 25 Eli Bendersky 25 GameChanger 25 Guido van Rossum 25 Jay Fields 25 Jeff Preshing 25 Life Plus Linux 25 Mark Seaborn 25 Oona Rรคisรคnen 25 Srinivas Tamada 25 Stephen Colebourne 25 Steve Yegge 25 Criteo 24 Grafana 24 Kogan.com 24 Squarespace 24 Dropbox 23 Crystal 22 Elegant Code 22 HomeAway 22 Babbel 21 Blundell's Android Tutorials 21 Erlang Solutions 21 Gusto 21 Dave Cheney 20 David Walsh 20 Guardian 20 Justin Weiss 20 Michael Herman 20 Miguel Quinones 20 Mike Ash 20 Ole Begemann 20 Paul Irish 20 Robert C. Martin 20 Spotify 20 Stefan Parker 20 Target 20 Wilfred Hughes 20 Yahoo 20 Aaron Patterson 19 Instacart 19 Jeff Atwood 19 Thumbtack 19 Arkency 18 Nikola Breลพnjak 18 The Coded Self 18 Chris Wellons 17 Filippo Valsorda 17 Jerry Gamblin 17 Matthew Green 17 Wealthfront 17 Amit Merchant 16 Blender 16 Medium 16 Microsoft Python 16 Postmark 16 RocksDB 16 Stack Abuse 16 Yegor Bugayenko 16 Zach Holman 16 Bigcommerce 15 Edward Faulkner 15 High Scalability 15 Housing.com 15 Hypriot 15 Jacopo Tarantino 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Rob Allen 15 Robin Wilson 15 Slack 15 Advanced Web Machinery 14 Bootstrap.com 14 Grofers 14 Helpshift 14 HubSpot 14 OLX 14 REA Group 14 Vlad Mihalcea 14 Feedzai 13 Indeed 13 Lyft 13 Michael Crump 13 Nextdoor 13 Scott Hanselman 13 Strava 13 Bazaarvoice 12 Canva 12 Haptik 12 Henrik Warne 12 Jon Skeet 12 Mary Rose Cook 12 Nicolas Liochon 12 Novoda 12 Steve Bellovin 12 Abu Ashraf Masnun 11 Badoo 11 Deliveroo 11 Eric Lippert 11 Findmypast 11 Hashrocket 11 JobTeaser 11 Kevin Burke 11 Marco Pivetta 11 New York Times 11 OpenDNS 11 Paypal 11 Ramon Fried 11 RisingStack 11 Small Improvements 11 Transferwise 11 VNGRS 11 Vinted 11 Zendesk 11 Alan Storm 10 Appnexus 10 Artsy 10 BBC 10 Benchling 10 Bill the Lizard 10 Bohops 10 Brendan Eich 10 Brendan Gregg 10 Brujo Benavides 10 Clever 10 Curalate 10 Daily JS 10 Daily Tech Video 10 Daniel Schmidt 10 Dot Dev (.dev) 10 Dragan Djuric 10 Eddie Smith 10 Eric Elliot 10 Erik Runyon 10 Evan Jones 10 Federico Cargnelutti 10 Flickr 10 Freeletics 10 GoSquared 10 Groupon 10 Harry's 10 Henrik Lau Eriksson 10 High Scalability 10 Hootsuite 10 Idontgetoutmuch's Weblog 10 Itamar Turner-Trauring 10 Jamis Buck 10 Jesal Gadhia 10 Joel Spolsky 10 Juan Treminio 10 Junior Grossi 10 Kirill Shevchenko 10 Larry Land 10 Matt Cutts 10 Matt Might 10 Mesosphere 10 Miro Cupak 10 Miro 10 NSHipster 10 Nick Craver 10 Ofer Zelig 10 Panorama Education 10 Pat Shaughnessy 10 Piotr Pasich 10 Pony Foo 10 Postman 10 ReactJS News 10 Regular Geek 10 Remind 10 RetailMeNot 10 Riot Games 10 Schakko 10 Skyscanner 10 Stitch Fix 10 Teamwork 10 Tikhon Jelvis 10 Tinder 10 TrueCar 10 Undocumented Matlab 10 Universe 10 UpGrad 10 VTS 10 Wojtek Gawroล„ski 10 XING 10 Yammer 10 Yifan Lu 10 Zolmeister 10 eFounders 10 Josh Haberman 9 Nate Berkopec 9 Wemake.services 9 Mike Fogus 8 Ian Hummel 7 Ilya Grigorik 6 K. Harrison 6 Sensible 6 James Long 5 Thomas Young 5 Edgar Aroutiounian 4 Avenue Code 3 Bandcamp 3 James Hague 3 Raymond Hettinger 3 Algolia Anders Aarvik Ariejan de Vroom Asana Atlassian Bjรธrn Johansen Blake Erickson Bryan Cantrill Capgemini Chen Hui Jing Chien Tran Cloudera Cloudsmith CockroachDB Code with style! CodeName One Codelitt Codeship Commercetools Credit Karma Crowdfire Deezer DoorDash Dragan Gaic Engine Yard Entelo Envato Envoy Eventbrite Federico Tomassetti Figma GIPHY Galois Go GoDaddy Guilherme Rodrigues Hashnode Heroku Honeybadger Honeycomb IMVU Ievgen Kuzminov Instagram Jobandtalent John Resig Jonathan Dekhtiar Just Eat Kinvolk Kolosek Kyle Kingsbury LINE Linear LiveRamp Liveblocks Made Tech Marc Plano-Lesay Microsoft Edge Moove-it Mozilla Automation Team NPR Apps Nicolai Parlog (CodeFX) Oursky Oxide Computer Paul Lewis Peter Norvig Peter Steinberger Peteris Krumins PicCollage PlanetScale Prezi PullReview Rachel Kroll Radim ล˜ehลฏล™ek Ray Wenderlich React Native Render Retool Schibsted Tech Polska Sharethis Sketch Sky Betting & Gaming Soshace Speedledger Sqreen Square Stackshare Swift Swiggy Takipi Temporal Turso Vena Solutions VersionEye Wayfair William Kennedy Zed Zendesk(old) theScore
75 articles Visit blog โ†’

31. Constant Shuffle (idiosyncratic-ruby.com)

Today, another snippet from the category don't try at home, might have unforeseeable consequences! Constant assignmentยน is not permanent in Ruby, so it is perfectly valid to do this: module A end class B def initialize p 42 end end A, B = B, A # warning: already initialized constant A # warning: pre...

32. Top Level Binding (idiosyncratic-ruby.com)

In case you have wondered, what this top-level constant TOPLEVEL_BINDING is all about: It is, as its name suggest, the Binding of your script's main scope: a = 42 p binding.local_variable_defined?(:a) # => true p TOPLEVEL_BINDING.local_variable_defined?(:a) # => true def example_method p binding.loc...

33. New Ruby Startup (idiosyncratic-ruby.com)

What happens when you invoke the Ruby interpreter, even before it executes your first line of code? Actually a lot! A few observations: Initial Load Path These are all locations you can Kernel#require from: $ ruby --disable-all -e 'puts $LOAD_PATH.map{ |path| "- #{path}" }' โ€ฆ/ruby-3.2.0/lib/ruby/sit...

34. R(u)b(y)Config(uration) (idiosyncratic-ruby.com)

At some point when working with Ruby, you come across this mysterious RbConfig constant. A typical scenario is that you want to check which operating system your current program is executed on. You can do this with RbConfig::CONFIG['host_os'] or RbConfig::CONFIG['arch'], see the RubyGems source for ...

35. Proper Unicoding (idiosyncratic-ruby.com)

Ruby's Regexp engine has a powerful feature built in: It can match for Unicode character properties. But what exactly are properties you can match for? The Unicode consortium not only assigns all codepoints, it also publishes additional data about their assigned characters. When searching through a ...

36. Symbolic Validations (idiosyncratic-ruby.com)

When exactly don't you have to :"escape" a Ruby symbol? Because this question is somehow related to the Ruby interpreter's internal usage of symbols, the rules are not the most obvious ones: : + Identifierยน, optionally appended by !, ?, or = (โ†’ methods) :@ + Identifierยน (โ†’ instance variables) :@@ + ...

37. Fixed Numbers (idiosyncratic-ruby.com)

A quick reminder that number literals in Ruby can be pretty fancy! Example Evaluates To Class Purpose 0x10 16 Integer Integers in hexadecimal (0-16) format 0o10ยน 8 Integer Integers in octal (0-8) format 0b10 2 Integer Integers in binary (0-1) format 1e1000 Float::INFINITY Float Floats in exponential...

38. Sad Methods (idiosyncratic-ruby.com)

In general, Ruby's reflection capabilities are pretty powerful, although not always logical. However, when reflecting on a method's (or proc's) usage, you are sometimes stuck with sad methods. Sad methods only work for code, that is written in Ruby itself. And Ruby itself (official MRI) is written i...

39. Static Monkeys vs. Strong Ducks (idiosyncratic-ruby.com)

Programming languages have been, and will always be categorized by their typing system. Naturally, large parts of the Ruby community (including myself) have some kind of aversion against static typing. But while Ruby goes down the route of being dynamically typed that does not mean that you are not ...

40. ERB Render Standard (idiosyncratic-ruby.com)

ERB stands for <%# Embedded Ruby %> and is the templating engine included in the Ruby Standard Library. While there are more recent gems that provide a better templating experience (see tilt for an abstraction, and erubis/erbse for an updated ERB), it is also convenient to have basic support directl...

41. Identification (idiosyncratic-ruby.com)

Is it a hash? Or is it a hash? hash = {"Idiosyncratic" => "Ruby"} hash["Idiosyncratic"] # => "Ruby" hash.compare_by_identity idiosyncratic_in_variable = "Idiosyncratic" hash[idiosyncratic_in_variable] # => nil hash["Idiosyncratic"] # => "Ruby" Hash#compare_by_identity changes the semantics of what i...

42. Utility Gems (idiosyncratic-ruby.com)

RubyGems is bundled with core Ruby since 1.9, which was first released in 2007. As long as you do not run Ruby with the $ ruby --disable-gems flag, it is available to you without having to install anything. This also means that you can use some of RubyGems' support utilities for free! 1) Current Pla...

43. Too Expressive & * _ ? (idiosyncratic-ruby.com)

Ruby's syntax is so expressive โ€” it utilizes every printable, non-alphanumeric ASCII character as much as it cans. Sometimes, this can be confusing for beginners. The next sections show 4+ different meanings of every portrayed single character (not counting different meaning as custom string delimit...

44. No More Errors (idiosyncratic-ruby.com)

If you don't like errors in your code, you will have to fix them. This handy list of Ruby's errors will hopefully help you do so! (And welcome back for the second season of Idiosyncratic Ruby!) Built-in Exceptions Exception Thrown by core Ruby when Remarks NoMemoryError The Ruby interpreter could no...

45. Roots of Rubyism (idiosyncratic-ruby.com)

This is a summary of reasons why you should still use Ruby: It is a language with a terrific community (welcoming and always questioning itself) and ecosystem (a lot of problems already solved), which is beautiful (focus on productivity), a little conservative (in the sense that it is easy to work w...

46. Regex with Class (idiosyncratic-ruby.com)

Ruby's regex engine defines a lot of shortcut character classes. Besides the common meta characters (\w, etc.), there is also the POSIX style expressions and the unicode property syntax. This is an overview of all character classes: Meta Chars Char Negation ASCII Unicode . - ยน Any ยน Any \X - Any Gra...

47. Limitations of Language (idiosyncratic-ruby.com)

If you take a closer look, you'll notice that Ruby's grammar has quite a few edge-case where its syntax is inconsistent or ambiguous: Binary Minus vs Minus taken as Unary Method Argument >> [1,3,4,5].size - 1 # => 3 >> [1,3,4,5].size -1 # wrong number of arguments(1 for 0) No Simple Rule, if a Symbo...

48. Operating Nothing (idiosyncratic-ruby.com)

There is an operator in Ruby, that does nothing: The unary plus operator. It is part of the language for keeping symmetry with the unary minus operator! This is awesome, an operator for free! How can we utilize it? Update: In Ruby 2.3, the plus operator got its first purpose: Create an unfrozen copy...

49. Golfing Basics (idiosyncratic-ruby.com)

Code Golf is the art of writing the shortest program possible. The less bytes the better. And the competition is just ridiculously strong! Head over to Anarchy Golf if you want to see more! A good beginner's problem is printing out Pascal's Triangle: Spend a few days to get to 45 bytes. Spend a few ...

50. File Encoding Magic (idiosyncratic-ruby.com)

Ruby has three default encodings. One of them is the default source encoding, which can be set using a magic comment in the file's first line, or in the second line if the first line is taken by a shebang. Default source encoding (UTF-8): p "".encoding #=> #<Encoding:UTF-8> With encoding comment (fi...

51. Meta Methodology (idiosyncratic-ruby.com)

Ruby clutters its objects a lot with methods for metaprogramming other methods: Class.instance_methods.grep /method/ => [:instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods, :method_defined?, :public_method_defined?, :private_method_defined?, :protecte...

52. Goto Fail (idiosyncratic-ruby.com)

If you change one line in Ruby's source, it will support goto statements! You can install a patched version via RVM's patch feature: $ rvm install 2.2.2 -n goto --patch http://git.io/vfxF2 $ rvm use 2.2.2-goto What to do to play around with this new feature? Let's reimplement this famous bug in Ruby...

53. Ruby Lookalikes (idiosyncratic-ruby.com)

Tired of good old, but slow Ruby? Try one of Ruby's successors: Name Compiles To Description Crystal Machine Fast Ruby Mirah JVM Fast Ruby in Java Opal JS Ruby for JavaScript CoffeeScript JS JavaScript for Rubyists Elixir BEAM Ruby for Erlang Scala JVM Multi-Paradigm Ruby Rooby Machine Simple Ruby R...

54. Literate Ruby (idiosyncratic-ruby.com)

Ruby has a built-in feature that is much like Literate CoffeeScript. In contrast to it, this Ruby option will not ignore literature, but garbage: -x[directory] Tells Ruby that the script is embedded in a message. Leading garbage will be discarded until the first line that starts with โ€œ#!โ€ and contai...

55. Uniform Resource Matching (idiosyncratic-ruby.com)

Ruby's URI standard library contains a very sophisticated regex for matching URLs: "At https://idiosyncratic-ruby.com you can learn about the " \ "obscure parts of Ruby"[URI.regexp] # => "https://idiosyncratic-ruby.com" This regex is built in uri/rfc2396_parser.rb and looks like this: $ ruby -v ruby...

56. Better Standards (idiosyncratic-ruby.com)

A guide to Ruby's stdlib and available alternatives. Please note: The standard library was turned into gems, see stdgems.org for up-to-date information on all standard gems! Standard Library Overview Library Sources Description Alternatives abbrev mri Small library that finds the shortest abbreviati...

57. Symbolic Reservations (idiosyncratic-ruby.com)

This episode takes a look at the unusual use of symbols in one of Ruby's core APIs: Enumerable#chunk The chunk method splits the receiver object into multiple enumerators, using the rule defined in the block. It keeps together the parts that match in series. It then passes the result of this rule an...

58. Con-Struct Attributes (idiosyncratic-ruby.com)

Ruby's Struct class is a convenient way to create Ruby classes, which already have some attributes defined. If you are not familiar with structs, you should watch Avdi Grimm's introduction to structs! But in many cases there is something better than structs: Gems that Define Attributes for "Plain Ol...

59. Stream Editing (idiosyncratic-ruby.com)

One of Ruby's goals was to replace popular unix stream editors like awk or sed, which both have the concept of manipulating files in a line-based manner. Ruby has the -n option for this: Causes Ruby to assume the following loop around your script, which makes it iterate over file name arguments some...

60. Changing the Rules (idiosyncratic-ruby.com)

Ruby allows you to change key functionality of the language. This means, it is also possible to break key functionality! Six examples of Ruby code you should never use: Undefining Core Methods The simplest way to change Ruby's global behavior is monkey patching: Nothing stops you from altering impor...
Type to search HN and engineering blog articles
Press Escape to close  |  โ†‘โ†“ to navigate  |  Enter to open