Filter by source
All sources GoCardless 6188 PubNub: 2462 Vercel 1539 Ariya Hidayat 849 Serverless 848 Jake Trent 812 Drew DeVault 783 Nic Raboy 733 Neon 479 Supabase 424 Soundcloud 409 SitePoint 406 Johannes Brodwall 378 Databricks 366 Jeremy Kun 323 PostHog 286 Real Python 286 Graham King 257 Carlos Becker 251 MapTiler 250 Scott Johnson 250 Lea Verou 242 Laravel 232 Matt Aimonetti 231 Andrew Bancroft 214 Stanko Tadić 186 Twilio 181 Atomic Object 176 Cloudflare 170 Nvidia 168 Trivago 158 Freek Van der Herten 155 Stack Overflow 145 The Daily WTF 136 Discord 134 WyeWorks 134 Dan Luu 133 Raymond Chen 133 Una Kravets 132 Swizec Teller 129 GitHub Old 128 Reginald Braithwaite 121 Radek Pazdera 118 Warp 114 Antirez 110 Codrops 110 Jane Street 105 Android 104 Cerner 103 AdRoll 102 Auth0 102 Jake Wharton 101 Changelog 100 Nelson Elhage 98 OCTO Technology 96 Ilija Eftimov 94 Marek Majkowski 94 Thoughtbot 89 AWS 88 dbt Labs 88 Finn.no 86 Nick Desaulniers 86 Hostinger 84 Hayden James 81 Luciano Mammino 79 Martin Fowler 78 Wingify 78 Marcelo Rinesi 77 Monica Dinculescu 77 Matt Warren 76 Docker 75 Drivy 75 Jan Lelis 75 Jessie Frazelle 75 Paweł Chudzik 73 Toptal 73 .NET 69 Nordic APIs 69 Mykhailo Kozik 68 Lerner Consulting 67 T.J. Maher 67 Timescale 66 Axel Rauschmayer 64 Mozilla Release 64 Ebay 62 Kotlin 62 Tania Rascia 60 0xADADA 59 Khan Academy 59 Jake Yesbeck 58 Confluent 57 Evil Martians 54 jOOQ 53 Tailscale 51 Sam Saffron 50 Sentry 49 Monstermuffin 48 RoseHosting 48 Huon Wilson 45 HackerEarth 44 Philip Walton 44 Dennis Felsing 43 SurveyMonkey 43 Fly.io 42 Robin Ward 41 Philipp Oppermann 40 Gleb Bahmutov 39 Facebook AI Research 38 The Pragmatic Engineer 38 Dean Hume 37 Rust 36 Josh Sherman 35 Alex Russell 34 Stripe 33 Joe Nelson 32 Tumblr 32 8th Light 31 Addy Osmani 31 Grab 31 Armin Ronacher 30 Domenico Luciani 30 Lazarus Lazaridis 30 Palantir 30 Pamela Fox 30 Airbnb 29 Brandwatch 29 Evan Miller 29 IPFS 29 Ruslan Spivak 28 Vanilla Java 28 Bartlomiej Filipek 27 Daniel Doubrovkine (dB.) 27 Jonathan Snook 27 Petr Mitrichev 27 Pinterest 27 Red 27 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 25 Dereuromark 25 Evan Hahn 25 GameChanger 25 Guido van Rossum 25 Jay Fields 25 Jeff Preshing 25 Julia Evans 25 Life Plus Linux 25 Mark Seaborn 25 Okta 25 Oona Räisänen 25 Srinivas Tamada 25 Stephen Colebourne 25 Steve Yegge 25 PagerDuty 24 Squarespace 24 Kogan.com 23 Criteo 22 GitHub 22 Babbel 21 Elegant Code 21 Crystal 20 Dave Cheney 20 David Walsh 20 Eli Bendersky 20 Guardian 20 HomeAway 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 Yahoo 20 Dropbox 19 Gusto 19 Netflix 19 Instacart 18 Nikola Brežnjak 18 The Coded Self 18 Aaron Patterson 17 Jeff Atwood 17 Thumbtack 17 Erlang Solutions 16 Stack Abuse 16 Wealthfront 16 Arkency 15 Bigcommerce 15 Edward Faulkner 15 Filippo Valsorda 15 High Scalability 15 Hypriot 15 Jacopo Tarantino 15 Jerry Gamblin 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Matthew Green 15 Medium 15 Microsoft Python 15 Postmark 15 RocksDB 15 Slack 15 Spotify 15 Yegor Bugayenko 15 Advanced Web Machinery 14 Helpshift 14 Housing.com 14 HubSpot 14 OLX 14 REA Group 14 Robin Wilson 14 Zach Holman 14 Amit Merchant 13 Blender 13 Chris Wellons 13 Grofers 13 Indeed 13 Nextdoor 13 Rob Allen 13 Scott Hanselman 13 Henrik Warne 12 Jon Skeet 12 Mary Rose Cook 12 Nicolas Liochon 12 Novoda 12 Steve Bellovin 12 Abu Ashraf Masnun 11 Badoo 11 Bazaarvoice 11 Blundell's Android Tutorials 11 Canva 11 Feedzai 11 Haptik 11 Hashrocket 11 JobTeaser 11 Kevin Burke 11 Lyft 11 Marco Pivetta 11 Michael Crump 11 Paypal 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 Bootstrap.com 10 Brendan Eich 10 Brendan Gregg 10 Brujo Benavides 10 Clever 10 Curalate 10 Daily JS 10 Daily Tech Video 10 Daniel Schmidt 10 Deliveroo 10 Dot Dev (.dev) 10 Dragan Djuric 10 Eddie Smith 10 Eric Elliot 10 Eric Lippert 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 New York Times 10 Nick Craver 10 Ofer Zelig 10 OpenDNS 10 Panorama Education 10 Pat Shaughnessy 10 Piotr Pasich 10 Pony Foo 10 Postman 10 Ramon Fried 10 ReactJS News 10 Regular Geek 10 Remind 10 RetailMeNot 10 Riot Games 10 Schakko 10 Skyscanner 10 Stitch Fix 10 Strava 10 Teamwork 10 Tikhon Jelvis 10 Tinder 10 Transferwise 10 TrueCar 10 Undocumented Matlab 10 Universe 10 UpGrad 10 VTS 10 Vlad Mihalcea 10 Wilfred Hughes 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 Grafana 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 Shopify 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