Filter by source
All sources GoCardless 6194 PubNub: 2474 Vercel 1664 Ariya Hidayat 849 Serverless 849 Jake Trent 816 Drew DeVault 784 Nic Raboy 734 SitePoint 629 Neon 504 Supabase 435 Shopify 432 Soundcloud 409 Databricks 396 Real Python 394 Johannes Brodwall 378 Jeremy Kun 327 Laravel 296 PostHog 294 Twilio 260 Graham King 257 MapTiler 257 Carlos Becker 252 Scott Johnson 250 Cloudflare 244 Lea Verou 244 Matt Aimonetti 231 Atomic Object 218 Andrew Bancroft 214 Nvidia 212 Stanko Tadić 189 Lerner Consulting 188 Stack Overflow 183 Freek Van der Herten 182 The Daily WTF 168 Raymond Chen 165 Trivago 159 GitHub Old 155 Discord 140 Dan Luu 137 WyeWorks 134 Swizec Teller 133 Una Kravets 132 Auth0 129 Codrops 126 OCTO Technology 123 Reginald Braithwaite 121 Android 119 Jane Street 119 Hostinger 118 Radek Pazdera 118 Warp 114 AWS 110 Antirez 110 Thoughtbot 105 Cerner 103 AdRoll 102 Changelog 101 Jake Wharton 101 Nelson Elhage 98 Martin Fowler 96 dbt Labs 95 Ilija Eftimov 94 Marek Majkowski 94 Docker 87 .NET 86 Finn.no 86 Nick Desaulniers 86 Hayden James 84 Marcelo Rinesi 84 Nordic APIs 82 Timescale 82 Toptal 82 Luciano Mammino 80 Sentry 79 Wingify 78 Jessie Frazelle 77 Monica Dinculescu 77 Matt Warren 76 Drivy 75 Jan Lelis 75 T.J. Maher 74 Paweł Chudzik 73 Kotlin 69 Ebay 68 Mykhailo Kozik 68 Axel Rauschmayer 64 Mozilla Release 64 Evil Martians 63 Confluent 62 Tania Rascia 60 0xADADA 59 Jake Yesbeck 59 Khan Academy 59 Tailscale 59 Dean Hume 57 RoseHosting 56 SurveyMonkey 53 jOOQ 53 Sam Saffron 51 Facebook AI Research 48 Monstermuffin 48 Huon Wilson 45 Philip Walton 45 Dennis Felsing 44 HackerEarth 44 Rust 44 The Pragmatic Engineer 44 Fly.io 43 Josh Sherman 42 Stripe 42 Gleb Bahmutov 41 Robin Ward 41 Philipp Oppermann 40 Armin Ronacher 36 Daniel Doubrovkine (dB.) 36 Alex Russell 35 Grab 35 Addy Osmani 34 Airbnb 34 Pinterest 34 Tumblr 33 8th Light 32 Joe Nelson 32 Brandwatch 31 Palantir 31 Bartlomiej Filipek 30 Domenico Luciani 30 Lazarus Lazaridis 30 Pamela Fox 30 Evan Miller 29 IPFS 29 Vanilla Java 29 Evan Hahn 28 Jonathan Snook 28 PagerDuty 28 Ruslan Spivak 28 Dereuromark 27 Okta 27 Petr Mitrichev 27 Red 27 GitHub 26 Julia Evans 26 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 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 Eli Bendersky 24 Kogan.com 24 Squarespace 24 Dropbox 23 Crystal 22 Elegant Code 22 Babbel 21 Blundell's Android Tutorials 21 Gusto 21 HomeAway 21 Netflix 21 Dave Cheney 20 David Walsh 20 Erlang Solutions 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 Stefan Parker 20 Target 20 Wilfred Hughes 20 Yahoo 20 Instacart 19 Jeff Atwood 19 Spotify 19 Thumbtack 19 Aaron Patterson 18 Arkency 18 Nikola Brežnjak 18 The Coded Self 18 Chris Wellons 17 Jerry Gamblin 17 Matthew Green 17 Wealthfront 17 Filippo Valsorda 16 Medium 16 Postmark 16 RocksDB 16 Stack Abuse 16 Yegor Bugayenko 16 Zach Holman 16 Amit Merchant 15 Bigcommerce 15 Blender 15 Edward Faulkner 15 High Scalability 15 Housing.com 15 Hypriot 15 Jacopo Tarantino 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Microsoft Python 15 Robin Wilson 15 Slack 15 Advanced Web Machinery 14 Grofers 14 Helpshift 14 HubSpot 14 OLX 14 REA Group 14 Rob Allen 14 Vlad Mihalcea 14 Bootstrap.com 13 Feedzai 13 Grafana 13 Indeed 13 Lyft 13 Michael Crump 13 Nextdoor 13 Scott Hanselman 13 Strava 13 Bazaarvoice 12 Canva 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 Haptik 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 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 Findmypast 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 Transferwise 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 →

1. Ruby TRICKS of 2018 (idiosyncratic-ruby.com)

Ruby was initially designed to be a successor of the Perl programming language, which also means that it inherited a lot of Perl's expressiveness. To celebrate this, the TRIC¹ contest was invented: Write the most Transcendental, Imbroglio Ruby program! Illustrate some of the subtleties (and design i...

2. Super Snakes (idiosyncratic-ruby.com)

Have you ever been confused by the __underscores__ required by some of __RUBY__'s features? You can get it right with this overview of all of "super snake" keywords and methods. There are three different types of underscore-wrapped syntaxes in the Ruby core language: keywords Object methods and Kern...

3. Unicode Version Mapping (idiosyncratic-ruby.com)

The Ruby core team cares a lot about Unicode, and this is why we have pretty good Unicode support in the language. Even though the Unicode standard evolves constantly - it gets updated at least once a year - Ruby's Unicode support is often only a little bit behind the current version of Unicode. The...

4. Clear Case of Unclear Casing (idiosyncratic-ruby.com)

Recent Ruby versions allow you to choose from a wide-range of uppercase letters - beyond just ASCII - to start a constant / class name: class Österreich # 00D6 ├─ Ö ├─ LATIN CAPITAL LETTER O WITH DIAERESIS end # Syntax OK However, it is not possible to use just any Unicode character: class ℻ # 213B ...

5. Nothing to Disable (idiosyncratic-ruby.com)

Ruby's mode of operation can be altered with some --enable-* / --disable-* command-line switches. By default, all of the following features are activated, except for the frozen strings and the JIT: Feature CLI Option to Change Description RubyGems --disable-gems RubyGems is the package manager of Ru...

6. Nothing to Escape (idiosyncratic-ruby.com)

What is your wild guess: How many different ways does Ruby provide for inserting a NULL byte into a double-quoted string? There are exactly 43 options¹! Here is the list, put together with some ideas from Episode 61: Meta Escape Control: Directly embedded NULL byte # => "\u0000" "\0" # => "\u0000" "...

7. Nothing to Compare (idiosyncratic-ruby.com)

How does nothing (as in nil, null, or nan) compare to nothing? Equality Equality == nil 0 0.0 0i 0r NaN¹ nil true false false false false false 0 false true true true true false 0.0 false true true true true false 0i false true true true true false 0r false true true true true false NaN false false ...

8. Assignments In-Style (idiosyncratic-ruby.com)

The introduction of pattern matching in Ruby 2.7 brought us a new style of multi-assigning local variables: The pattern assignment, or, how you could also call it, the assignment in-style. After you have deactivated the warnings for experimental features, try the following piece of code: [1, 2, 3, 4...

9. Warning: The Experiment (idiosyncratic-ruby.com)

Ruby's Warning module learned some new tricks in Ruby 2.7: Support for muting different categories of compile warnings has been introduced. This is a mechanism on top of the warning level reflected by the $VERBOSE variable. You can now silence deprecation warnings: These are aspects of the language ...

10. Ruby has Character (idiosyncratic-ruby.com)

Ruby comes with good support for Unicode-related features. Read on if you want to learn more about important Unicode fundamentals and how to use them in Ruby… …or just watch my talk from RubyConf 2017: ⑩ Unicode Characters You Should Know About as a 👩‍💻 Ruby ♡ Unicode Characters in Unicode Codepoint...

11. Warning: The Module (idiosyncratic-ruby.com)

Starting with Ruby 2.5¹ it is possible to customize the behavior of Kernel#warn through the Warning module. Here is how: def Warning.warn(w) # super calls the original behavior, which is printing to $stderr super "\e[31;1mRUBY WARNING: \e[22m#{w.sub(/warning: /, '')}\e[0m" end # # # # examples warn ...

12. What the Regex? (idiosyncratic-ruby.com)

Regexes, the go-to-mechanism for string matching, must not only be written, but also need to be applied. This episode acts as a reference with some style advice for working with regular expressions in Ruby. If you are looking for resources on writing the actual regexes, take a look at the link colle...

13. idiosyncratic_eval (idiosyncratic-ruby.com)

When you get farther upwards the steep hill that is Ruby mastery, you will come across some powerful, yet slightly evil methods: instance_eval and class_eval¹. They allow you to execute code and define methods tied to a specific class, at the same time giving you access to outer scope variables thro...

14. Less Feature-Rich, More Fun (idiosyncratic-ruby.com)

Ruby was created in 1993 and has come a long way. The preferred style of coding has changed quite a lot and solid best practice has emerged (though, as always, one size does not fit all). At the same time, Ruby's tool support could be better, the language is still too complex. Maybe, the time has co...

15. Meta Escape Control (idiosyncratic-ruby.com)

Double-quoted strings can not only be used with interpolation, #{}, they also support various escape sequences, which are initiated with \. Escape sequences allow you to embed raw byte and codepoint values. Furthermore, there are shortcuts for common formatting and control characters. Byte Sequences...

16. Escape Back Referencing (idiosyncratic-ruby.com)

Ruby has more than one way to access additional information about the most recent regex match, like captured groups. One way is using the special variables $`, $&, $', $1 - $9, $+, and also in the MatchData object $~. They become available after using a method that matched a regex, or when the metho...

17. Big Data Without End (idiosyncratic-ruby.com)

Ruby's big DATA constant does more than you might expect! Everything after the __END__ keyword (at the beginning of the line) is not interpreted as Ruby, but can be retrieved with the big¹ DATA constant.² This is an example big-data.rb script: p DATA.read __END__ big data Big DATA is a File object, ...

18. Magic Instructions (idiosyncratic-ruby.com)

Ruby supports magic comments (interpreter instructions) at the top of the source file, mostly known for setting a source files' Encoding. This is the most common use case, but there is more you can do. Source File Encoding The default encoding of string literals in a Ruby file is UTF-8: p "".encodin...

19. What the Time? (idiosyncratic-ruby.com)

%a %A %b %B %c %C %d %D %e %F %g %G %h %H %I %j %k %l %L %m %M %n %N %p %P %Q %r %R %s %S %t %T %u %U %v %V %w %W %x %X %y %Y %z %Z %+ %% - _ 0 ^ # : Date and time formatting is traditionally done with strftime. Not any different in Ruby, which includes a public domain based strftime implementation ...

20. US-ASCII-8BIT (idiosyncratic-ruby.com)

How come that Ruby has two ASCII encodings? Encoding.name_list.grep(/ASCII/) # => ["ASCII-8BIT", "US-ASCII"] Which one is the normal one you should use for ASCII? Aliases ASCII-8BIT US-ASCII BINARY ASCII   ANSI_X3.4-1968   646 So, US-ASCII is aliased to ASCII, but then what is ASCII-8BIT for? Encodi...

21. Struggling Four Equality (idiosyncratic-ruby.com)

Another of Ruby's idiosyncrasies is equalness. It's not too complicated, but naming is an issue here. Four Concepts of Equalness equal? Object Identity Comparison This one is easy. Two objects should be considered identical. Think: x.object_id == y.object_id == Equality Equality This is the usual me...

22. Try Converting (idiosyncratic-ruby.com)

Similar to metaprogramming, Ruby's type conversion system has evolved over time. While the result functions, it is also a little inconsistent and suffers from poor naming. Let's put things in perspective: Implicit and Explicit Conversion Ruby objects are usually converted to other classes/types usin...

23. The Constant Tree (idiosyncratic-ruby.com)

Generated with Ruby 3.2.2, including RubyGems and DidYouMean: Object (Class) ├─ARGF (ARGF.class) ├─ARGV (Array) ├─ArgumentError (Class) ├─Array (Class) ├─BasicObject (Class) │ └─BasicObject → BasicObject ├─Binding (Class) ├─CROSS_COMPILING (NilClass) ├─Class (Class) ├─ClosedQueueError (Class) ├─Comp...

24. Constant Visibility (idiosyncratic-ruby.com)

It is less common, but similar to methods, constants have a visibility attached to them. You have the choice between private and public, and you can also mark a constant deprecated! Like with methods, the default visibility of a constant is public. Unlike methods, which have a lot of associated meth...

25. ½ Kilo of SHA256 (idiosyncratic-ruby.com)

How many bytes (= ASCII characters) of Ruby code does it take to generate a SHA 256 hash sum of STDIN? 500 Bytes¹ q,z=[3,2].map{|t|i=l=1;(2..330).select{i-1<(l*=i)%i+=1}.map{|e|(e**t**-1*X=2**32).to_i&X-=1}} s=proc{|n,*m|a=0 m.map{|e|a^=n>>e|n<<32-e} a} i=$<.read.b<<128 (i+"\0"*(56.-(w=i.size)%64)+[...

26. Naming Too Good (idiosyncratic-ruby.com)

Some words should not be chosen as identifiers for variables, parameters and methods in Ruby, because they clash with core methods or keywords. As long as you do not define a method with the name of a keyword, Ruby will not complain. Still, it is often better to avoid naming things like existing met...

27. What the Format? (idiosyncratic-ruby.com)

%a %A %b %B %c %d %e %E %f %g %G %i %o %p %s %u %x %X %% 0 $ # + - * space Ruby comes with a structured alternative to classic string interpolation: This episode will explore format strings, also known as the sprintf syntax. Recall the normal way of interpolating variables into a string: v = 42 "-->...

28. Ruby TRICKS of 2015 (idiosyncratic-ruby.com)

Ruby was initially designed to be a successor of the Perl programming language, which also means that it inherited a lot of Perl's expressiveness. To celebrate this, the TRIC¹ contest was invented: Write the most Transcendental, Imbroglio Ruby program! Illustrate some of the subtleties (and design i...

29. Ruby TRICKS of 2013 (idiosyncratic-ruby.com)

Ruby was initially designed to be a successor of the Perl programming language, which also means that it inherited a lot of Perl's expressiveness. To celebrate this, the TRIC¹ contest was invented: Write the most Transcendental, Imbroglio Ruby program! Illustrate some of the subtleties (and design i...

30. The Art of Arguments (idiosyncratic-ruby.com)

There is nothing easier than parsing the command-line arguments given to your Ruby program: It is an array found in the special variable $*: $ ruby -e 'p $*' -- some command line --arguments ["some", "command", "line", "--arguments"] That is Too Easy! The trouble begins with supporting common argume...
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open