Filter by source
All sources GoCardless 6194 PubNub: 2474 Vercel 1665 Ariya Hidayat 849 Serverless 849 Jake Trent 816 Drew DeVault 784 Nic Raboy 734 SitePoint 635 Neon 504 Supabase 435 Shopify 432 Soundcloud 409 Databricks 396 Real Python 396 Johannes Brodwall 378 Jeremy Kun 327 Laravel 297 PostHog 294 Twilio 260 Graham King 257 MapTiler 257 Carlos Becker 252 Scott Johnson 250 Cloudflare 245 Lea Verou 244 Matt Aimonetti 231 Atomic Object 219 Andrew Bancroft 214 Nvidia 212 Stanko Tadić 189 Lerner Consulting 188 Stack Overflow 183 Freek Van der Herten 182 The Daily WTF 169 Raymond Chen 165 Trivago 159 GitHub Old 155 Discord 140 Dan Luu 137 WyeWorks 134 Swizec Teller 133 Una Kravets 132 Auth0 130 Codrops 126 OCTO Technology 123 Reginald Braithwaite 121 Android 119 Hostinger 119 Jane Street 119 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 97 dbt Labs 95 Ilija Eftimov 94 Marek Majkowski 94 Docker 87 .NET 86 Finn.no 86 Nick Desaulniers 86 Hayden James 85 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 70 Ebay 68 Mykhailo Kozik 68 Axel Rauschmayer 64 Evil Martians 64 Mozilla Release 64 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 Gleb Bahmutov 42 Josh Sherman 42 Stripe 42 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 IPFS 30 Lazarus Lazaridis 30 Pamela Fox 30 Evan Miller 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 Blender 16 Filippo Valsorda 16 Medium 16 Postmark 16 RocksDB 16 Stack Abuse 16 Yegor Bugayenko 16 Zach Holman 16 Amit Merchant 15 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 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
816 articles Visit blog →

601. Pagination Headers with Kaminari (jaketrent.com)

Kaminari provides easy pagination in a rails app. It's great to use. We'll make it better by adding a little function to your controllers to provide useful pagination headers.Pagination from KaminariInstallation is easy with an addition to your Gemfile:gem 'kaminari'and an install:bundle installNow,...

602. React-Router with Flux (jaketrent.com)

react-router provides great route handling with route params and query params. Flux provides a pattern for building React apps, including a pattern from providing data to your components. Here's a straightforward way to make route changes trigger data changes in your components.Note: Code here refle...

603. D3 Class Operations (jaketrent.com)

D3 has operations for class name manipulation that you're used to from jQuery. These include addClass, removeClass, hasClass, and toggleClass. They just go by different names.selection.classedThe magic all comes in the form of the selection.classed method from d3. It is going to be the api that is u...

604. A JSON API Errors Serializer in Rails (jaketrent.com)

The default serialization of error states in Rails might not be what you want for your app. In that case, it'd be worth knowing how to write a custom serialization format for your needs. In my case, I am trying to match the JSON API format for errors. Here's a potential implementation...JSON API Err...

605. Destroy Duplicate Tests (jaketrent.com)

As soon as we begin to write a test for our code, it is natural for us to think that we are doing a good thing, and often, we are. Yet, I believe there are times that we’re writing tests when we’re hurting more than helping — and, of course, this is not on purpose. To clarify, I’m an advocate for te...

606. Expose HTTP Headers in CORS (jaketrent.com)

For APIs, it seems more and more data is making its way into the HTTP headers. Recently, whilst adding a Link header, for paging data, into the HTTP response, I realized that my browser code couldn't see it. Who was the culprit? CORS, of course.Headers in BrowserIt was just another day, and I was de...

607. Send Props to Children in React (jaketrent.com)

In React, you're always making components. Sometimes components are standalone. Other times, you'll have components that can nest children components. Sometimes you'll want to send properties to the children components from the parent as often as a doting parent wants to send packages to a child mis...

608. Set State in Callbacks in React (jaketrent.com)

In React, you can setup components that fetch their own data and set their own state with that data. Because of the async nature of data fetching, you’ll have to make sure to keep things cleaned up to avoid the error of trying to set state in an unmounted component.Updated for React 0.13. See belowR...

609. Broccoli Ember Emblem (jaketrent.com)

Make broccoli compile your emblem templates so they're ready for your ember app.The LibrariesBroccoli builds your assets quickly. It makes heavy use of caching so it only has to rebuild affected subtrees when files change. Emblem is a significant whitespace version of Handlebars templates, similar i...

610. Bower Resolutions (jaketrent.com)

When you specify dependencies for you app via Bower, some of the packages might rely on different versions of the same library. You will have to resolve what version of libraries your app actually wants. In other words, you break the tie. But you don't want to break it every time, so save your choic...

611. Link to Broccoli Assets on a Webpage (jaketrent.com)

Broccoli.js is good at building assets. But now that they're built, how does one use them on a webpage?Broccoli ServeBroccoli has a great feature of having assets cached at every step in a list of transforms. This makes it quite fast. It can selectively reprocess only the subset of assets that have ...

612. Detecting Window Closing in Ember (jaketrent.com)

In a long-running app such as you might build in Ember, it can be useful to detect when the window is closing. This is easily detected with JavaScript, and there are easy places to put the code in your Ember app.beforeunloadThe window event that you want to listen for is beforeunload. You might bind...

613. Convert App From EmberFire to Fireplace (jaketrent.com)

There are a few changes required to convert your Ember app from using EmberFire to Fireplace. Here are a few that I found to be required. There are probably more.Your OptionsEmberFire and Fireplace both provide an API for you to integrate your Ember app with a Firebase backend. You don't need either...

614. Testing Express Validator (jaketrent.com)

Express-validator is a middleware for Express on Node.js that can help you validate user input. It's a lovely library. Here's a pattern for testing code that uses it.InstallTo get express-validator in your project, install with npm:npm install express-validator --savePlug in the MiddlewareTo use the...

615. Permit Array in Rails Strong Parameters (jaketrent.com)

Rails 4 introduced the pattern of strong parameters at the controller layer. As a best practice, you will explicitly list the parameters that an endpoint should accept in payloads. Arrays are specified just slightly different.Strong ParametersYou don't want those blackhats to update any field they w...

616. Grunt-init Exercism.io (jaketrent.com)

Exercism.io has a great set of JavaScript exercises. They could be made better by a better test setup and runner. I've created a small grunt-init template to help in that setup.Exercism.ioFor those unfamiliar, Excercism.io is a great tool that helps coders and potential coders learn and expand their...

617. Add Zerigo DNS to Heroku (jaketrent.com)

Once upon a time, I could setup DNS super easily on Heroku using their Zerigo DNS addon. Lately, I tried again using the same pattern and failed. Here's an updated step-by-step guide.Back in the DayIt used to be that all you had to do was setup the nameservers on your domain registrar, add the Zerig...

618. Define Methods Dynamically in Ruby (jaketrent.com)

In Ruby, it's common to see new methods defined dynamically or on the fly for your class. And who doesn't want to have a piece of that metaprogramming?An ExampleFor example, I just finished an exercism code exercise where I felt like there was a fair bit of code duplication. I had a bunch of conveni...

619. Call Dynamic Method in Ruby (jaketrent.com)

I love Ruby's syntax for method calls. The syntax for calling dynamic methods is pretty nice, and it's easily mastered.send methodThe send method is one of the best and most basic ways to call a method dynamically on your object. Let's say we have an object with multiple methods like this:class Fezz...

620. Exercism Review (jaketrent.com)

Exercism.io is a fantastic site and tool that provides a wealth of daily code exercises. If you want to learn to be better in a language, it's a great resource to do exercises and receive feedback.OriginExercism.io was introduced to me by Franklin Webber of gSchool and JumpStart Labs fame. He and hi...

621. Save a Gem to Gemfile from Terminal (jaketrent.com)

Have you ever wished you could save a gem to your Gemfile straight from the command line? I wish Rubygems had this built in, but it's easy to add. After all, there's a gem for that.From npmComing from Node/Npm previous to Ruby/Rubygems, I wished I could do something like this:npm install express --s...

622. Debug Ruby and Rails (jaketrent.com)

Interactive debugging can sometimes be faster and more effective in helping you code than a puts statement. It's easy to get interactive debugging in Ruby or on Rails with the help of a nice gem.No IDE RequiredThere are Ruby IDEs that provide interactive debugging capabilities. My favorite is RubyMi...

623. Change Page Title in Angular Route (jaketrent.com)

When you change routes in Angular, the page title doesn't change automatically, but this can be done rather simply.Servers and ClientsClient-side routers are pretty awesome. A new url is pushed into the browser's history to represent the particular resource that pure client code has produced and dis...

624. Use D3 rangeBands (jaketrent.com)

When building a chart such as a bar chart in d3, you'll want an evenly divided space on your x axis. You could divide the space up with your own manual calculations, accounting for space available, bar width, and inner and outer padding. Or, you could have d3 do the calculation for you via a rangeBa...

625. Start Review (jaketrent.com)

Starting tends to be one of the biggest hurdles that we must jump in order to find out what awesome we really have inside of us and let it shine. In the book Start by Jon Acuff, he gives great motivation and tactical steps for starting to find our awesome. It's a hilarious, inspiring, and practical ...

626. Rotate Gauge Needle in D3 (jaketrent.com)

If you want to make a gauge chart in S3, you'll need a needle on your gauge. It's not hard to draw a triangle, but here's the extra work to rotate it.The Gauge ChartI'm not sure what you call this kind of chart, but I call it a gauge. It pretty much looks like a speedometer or a pressure gauge. I'm ...

627. Import Erb Into Karma (jaketrent.com)

Rails asset pipeline allows you to use erb helpers in your CoffeeScript. You'll still need to bring get these files into Karma runner. It's really easy. You just need to get to know your Karma config options.erb in JavaScriptsWhy in the world would you want to use erb helpers inside your script file...

628. JavaScript Mixins (jaketrent.com)

JavaScript makes mixins inherently easy. Mixins are a native feature of the language without calling it that. Here are a few methods for making this happen.Attach a PropertyYou can attach a property to a Javascript object at any time. You don't need to monkey patch it. It doesn't need to be packaged...

629. How to Create a Bower Package (jaketrent.com)

Bower is a client-side or browser package manager. It will handle your 3rd-party packages that are registered with the service. To make it more useful, you can package up some of your own code and create a component to install with Bower.Prepare your PackageTo prepare your code to be a Bower package...

630. Test Angular Directive With Isolate Scope (jaketrent.com)

Directives with isolate scope do not inherit their scope from their parent. Thus, the pattern to test them is slightly different.When testing a directive, you'll often want to setup some fixture element to attach your directive to. This will act as the DOM that you will compile with scope. At that p...
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open