Square Developer Blog

developer.squareup.com · Company blog · on HN since 2019

Engineering blog of Square, covering its Ruby tooling, API design, accounting systems, and engineering practices.

What HN saysHN cites it for Square's work on Ruby typing with RBS and Steep, its Racket-based OpenAPI DSL, and Caviar's word2vec menu recommendations.
47HN people shared it
22linked it in comments
51stories submitted
1.5Kstory points
8 months agolast shared
2019people per year2026

Most-shared posts

  1. 1
    RBS, Ruby’s new type signature language
    4 people · 511 points · first shared 2020 · 334 comments on HN
  2. 2
  3. 3
    RubyKaigi and the Path to Ruby 3
    4 people · 8 points · first shared 2019 · 1 comments on HN
  4. 4
  5. 5
    Taming OpenAPI using Racket to create a DSL
    3 people · 74 points · first shared 2019 · 47 comments on HN
  6. 6
    Kubernetes – Pod Security Policies
    2 people · 9 points · first shared 2020 · discussion on HN
  7. 7
    Square's New Engineering Blog
    2 people · 7 points · first shared 2019 · 4 comments on HN
  8. 8
    Announcing Square’s New Ruby SDK
    2 people · 6 points · first shared 2019 · discussion on HN
  9. 9
    How to Be a More Influential Engineer
    2 people · 4 points · first shared 2021 · discussion on HN
  10. 10
    Enabling Serverless Applications at Square
    2 people · 3 points · first shared 2020 · discussion on HN
  11. 11
  12. 12
  13. 13
  14. 14
    Caching E-Commerce Data for the Web
    1 people · 11 points · first shared 2021 · discussion on HN
  15. 15

What HN people wrote when they linked it

peanuty1 · 2022-07-28
I recommend Square, it works great for my mom's business. https://developer.squareup.com/reference/square/payments-api
mekster · 2021-12-16
I like ruby but the recent static typing feels a step backwards having have to write a separate file, unlike typescript where you can incrementally add typing to the actual source code. https://developer.squareup.com/blog/the-state-of-ruby-3-typing/ And when I saw ruby isn't included in the list of supported language for the next gen JetBrains editor, perhaps due to low sales of RubyMine, I felt its best days may be over. https://www.jetbrains.com/fleet/ (Scroll down to the list of programming language icons)
bayonetz · 2019-11-06
Neat! eggie5 and friends, I did something related for Caviar that you might be interested in: https://developer.squareup.com/blog/caviars-word2vec-tagging-for-menu-…
whycombagator · 2019-06-20
Related, Square wrote a great article: "RubyKaigi and the Path to Ruby 3"[0]. The section titled "Static Analysis" high level compares Sorbet to Steep [0] https://developer.squareup.com/blog/rubykaigi-and-the-path-to-ruby-3/
disposedtrolley · 2021-09-05
Very interesting idea, I'd love to see where it goes! This reminds me of Square's Racket DSL [1] for making OpenAPI tolerable, but perhaps a more pragmatic approach. The team I worked with in my previous job built a lot of tooling around OpenAPI (CLI, GitHub integration etc.) to try and improve the developer UX around creating, maintaining, and collaborating on large definitions. The OAS definition for the company's core product amassed ~60k lines of YAML. Some of the features you listed happen to solve some of the biggest challenges we ran into: > Type checks and autocomplete. The CLI tool we developed was able to parse an OAS (expressed in a single file or over multiple ones using $refs) into a tree structure. This allowed the tool itself to reason about the state of the OAS, but it was difficult to expose the same information to the user via an editor extension or language server. Utilising an existing language and all of its editor features to write the OAS to begin with would alleviate some of the pain points we saw when managing very large collections of OAS files. > Easy CICD integration. We built a whole GitHub integration that listens for webhook events (like PR opened, commit merged into master etc.) which then downloaded the OAS files from the affected repo, ran checks and validations, compiled them into a single monolithic file, uploaded the file to S3, and generated Markdown docs. I can imagine this process being much simpler if existing language tooling…
lamchau · 2019-11-04
Square | Mobile Engineers (Mid/Sr levels) | ONSITE VISA San Francisco, CA -- Mission -- We believe everyone should be able to participate and thrive in the economy. So we’re building tools that make commerce easier and more accessible to all. We started with a little white credit card reader but haven’t stopped there! -- About the team -- Current team size: 4 iOS, 2 Android, 1 PM, 1 EM Languages: Objective-C/Swift; Java/Kotlin I'm one of the many hiring managers here at Square. My team, CDX (Connected Devices Experience), is searching for an Android engineer interested in platform, product, and/or low-level work (e.g. drivers, bluetooth, hardware). If you enjoy platform work that is consumer visible, I'd love to chat with you! -- Links -- We're always open to new talent here at Square. If this role isn't a fit, there are several others I'd be happy to refer you to other teams. Our philosophy on growth as an engineer is available here: https://developer.squareup.com/blog/squares-growth-framework-for-engin… -- Apply -- These are roles for my team and sister teams (mention CDX if you're specifically interested): • Mid-level Android Engineers: https://smrtr.io/3zKmj • Senior Android Engineers: https://smrtr.io/3zKmq • DM for other roles: https://squareup.com/us/en/careers/jobs
gytisgreitai · 2023-06-28
Stripe uses integers [1] Adyen uses integers [2] Square uses integers [3] So not sure that the industry would agree with you [1] https://stripe.com/docs/api/prices/create#create_price-unit_amount [2] https://docs.adyen.com/api-explorer/Checkout/70/post/payments#request-… [3] https://developer.squareup.com/reference/square/objects/Money
sails · 2022-12-09
I was wondering if you have other examples of a database like SpiceDB, specifically where the database is a "database system" for a very specific use-case (in this case application permissions). Square[1] have described something somewhat similar for accounting. > SpiceDB is an open source database system for managing security-critical application permissions inspired by Google's Zanzibar paper [1] https://developer.squareup.com/blog/books-an-immutable-double-entry-ac…
scarface74 · 2022-09-06
Well, I was trying to avoid the entire rant about using API Keys for security in the first place. https://zapier.com/engineering/apikey-oauth-jwt/ https://cloud.google.com/endpoints/docs/openapi/when-why-api-key We all have done it at one point or another. But if I am ever in the middle of a technical presentation and mention “API Keys”, I get all types of dirty looks from security. Notice that Square for instance strongly discourages API Keys for production. https://developer.squareup.com/docs/build-basics/access-tokens On the AWS side (where I work) we always discourage long term use of access key/secret keys for accessing resources even though I realize it’s necessary for some integrations. Even then, most organizations also put a condition that you can only use it from known IP addresses.
evolve2k · 2022-03-10
Lots of Ruby hate/snark on the thread. A primary criticism in regards post is that Ruby is not typed, hence the Nil error shown. Ruby has recently introduced static typing and it’s been years in the making, due to a desire by the core team to do it well. A major goal of Ruby 3, which was released in December has been adding an elegeaht and sophisticated type system to Ruby. ref: https://developer.squareup.com/blog/the-state-of-ruby-3-typing I haven’t played with a typed Ruby product yet but I’m confident when I do that they approach they take will be logical and considered.
adeelali · 2021-09-19
I see Stripe and Plaid SDKs being discussed. Has anyone tried out Square's SDKs: https://developer.squareup.com/docs/sdks#square-api-sdks? Keen to know some thoughts on the code quality.
Apocryphon · 2021-07-30
The problem is that the Cocoa framework, even after the advent of Swift, has always been created with MVC in mind. We're now at a point in iOS where trends have rolled around and now people are saying to pick MVC because that was Apple's intention, other architectures were created because people were doing it wrong: https://medium.com/flawless-app-stories/the-only-viable-ios-architectu… Obviously most significant production apps are using variant architectures such as at the bare minimum having view models, and the introduction of SwiftUI and popular earlier frameworks such as RxSwift also complicates things. Most apps aren't using pure MVC, sure, but it doesn't mean that the architecture isn't scalable. The alternatives might also be pretty gnarly: https://developer.squareup.com/blog/ziggurat-ios-app-architecture/
snappytrap · 2020-11-02
matahwoosh · 2020-09-01
At Square most of the applications run in the datacenters and this project allows AWS Lambda instances to seamlessly call into the datacenters -- basically developers can break out part of their apps and deploy them as Lambdas. This is a deep-dive on the mTLS set-up for Lambdas, but for general overview check out https://developer.squareup.com/blog/enabling-serverless-applications-a…
So the author offers two alternatives: 1. Using docker-secret inside of a Docker swarm 2. Using Keywhiz [1], a Java server together with a FUSE client. This seems overkill for a lot of cases. If environment variables are such a security problem, why not just use a config file (not checked into the source code repository) with proper permissions set? [1] https://developer.squareup.com/blog/protecting-infrastructure-secrets-…
usmannk · 2020-07-02
Square: https://developer.squareup.com/blog/squares-growth-framework-for-engin… https://docs.google.com/spreadsheets/d/12h50IYqd7fsO7tJ0l1OuHYbz5vN2d2… Noticed you linked the blogpost but may have missed that it also includes a spreadsheet.
carom · 2022-08-11
Use them to measure how well people will perform in the tasks that you need them to do. For coding interviews, Square's is really good. [1] I am not sure if they have sample questions written anywhere in the linked blog posts, but very simple things with added complexity. Example - Write a rate limiter that takes in a timestamp (integer) and returns true if it hasn't hit a rate limit. Ok, now what if we make the rate limiter per user. Just simple things to see how you represent data, store it, create interfaces to it, and how you refactor to deal with change. Most likely, you want to be having someone write tests for some code and review some code. Then speak to them about their experience. Depends on your organization though, maybe you are small and people need to produce a lot more than the large tech companies. 1. https://developer.squareup.com/blog/ace-the-square-pairing-interview/
desmap · 2020-09-01
from Soutarowho who did the type system for Ruby 3: We defined a new language called RBS for type signatures for Ruby 3. The signatures are written in .rbs files which is different from Ruby code. You can consider the .rbs files are similar to .d.ts files in TypeScript or .h files in C/C++/ObjC. The benefit of having different files is it doesn't require changing Ruby code to start type checking. You can opt-in type checking safely without changing any part of your workflow.[1] So UX-wise I don't know. While it's nice to have them separated, you are just faster if you have types in the code in front of your face when the IDE warns. Otherwise you will context-switch on any warning/error. This could get significant since you code just based on the LSP's output sometimes for hours. The IDE could help here with showing the definition when warning but still, if you want to change the definition or want to see more than just a snippet you will constantly jump between files. Also .d.ts files were introduced to type old code and as an fallback and as a secondary option, At some point, Matz and Soutaro need to integrate types into the language itself to get the same level of productivity other typed languages offer, eg. Rust/Go/TS. The next thing is IDE support, anyone knows more? [1] https://developer.squareup.com/blog/the-state-of-ruby-3-typing/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close