dev.betterdoc.org
json
BetterDoc Product Development Blog
dev.betterdoc.org · English
Here we blog about what we work on, how we do this, and why.
json
https://dev.betterdoc.org/feed.json
- Last post
- Jun 19, 2026
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 0
- Our last check
- Answering
- Served from
- United States
- Text score at discovery
- 12,642
- Format
- json
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- Dynamic Ecto Queries and PostgreSQL Query Plans
Jun 19, 2026 · original
My preferred way of including optional where clauses in Ecto queries is compact – but caneventually trigger unexpected performance problems. Investigating this led medown a rabbit hole of Postgrex , preparedstatements and PostgreSQL heuristics. Concisely Including Optional Where Clauses in Ecto Queries An Elixir application I’m working on involves managing a table of ‘medics’,i.e. doctors, dentists, nurses etc.. The medics table is stored in aPostgreSQL database and features columns like Column Name Type Examples first_name text John last_name text Doe birth_year integer 1979 state text active , retired , etc. … … … A common operation is presenting a list of medics to the user, and thus theapplication defines a function for listing medics in that table. However, it’susually not desirable to get all medics. Instead, only medics who are notretired should be returned. To support this, I lik - Custom client-side bindings for Phoenix LiveView
Oct 20, 2023 · original
At BetterDoc we’ve been using Phoenix LiveView for a little over a year now, and it’s gradually replacing big parts of our software. And if you’ve been using LiveView as well, chances are you’ve come to appreciate the programming model and all the thoughtful conveniences on offer- not least of which the client-side bindings . These bindings can act as an entry point for client to server communication or help sprinkle a bit of client-side reactivity, and all of this works without us actually having to write any ‘proper’ JavaScript. It’s a bit hard to explain the attraction of not writing JavaScript in a way that everyone can relate to, but for me it boils down to this: it’s not about JavaScript per se, but rather about the code in general. Less code is less liability. If we don’t have to write the code ourselves, then we don’t have to maintain it or test it either. We can rely instead on - Developing a feature for elixir-ls
Apr 29, 2022 · original
Thanks to BetterDoc’s 20% time for personal development 1 , I recently had the opportunity to add a little feature to elixir-ls, the language server that provides the smarts behind autocompletion - among other things - for the vscode-elixir plugin. This is a post to jot down my learnings from trying to figure out how to develop the feature and the workflow I ended up using. Maybe this helps the next person looking to scratch an itch but doesn’t know where to start ;) How the plugin works The protocol Language servers that cater to a specific language tend to be written in the same language that they provide the smarts for 2 . For VSCode (and other editors) then to be able to communicate with a language server in a manner that is not tied to a particular language, the language server needs to implement an API on top of the rest of the code according to the LSP protocol specification which - Our contribution to the Hex package manager
Dec 15, 2021 · original
Two days ago, Hex v1.0 wasreleased . This isa major achievement, and all the reason to celebrate! We’re delighted that wewere able to contribute to this success by implementing a new feature which isnow readily available! Hex is the de-facto standard when it comes to packagemanagement in the Elixir ecosystem. Most developers don’t typically run itdirectly but rather invoke it via Mix tasks. For instance, running mixdeps.get for fetching dependencies is a very common thing to do – however,it’s Hex doing all the grunt work in the background! The recent Hex v1.0 release is a significant milestone for the project: it’sthe first time the major version got bumped after having been with the v0.y.z version scheme for over sevenyears ! Being an Elixir shop, we are of course very excited to see this degree ofsoftware maturity. However, we’re not just happy users of Open Source software:we also wan - Creating testable HTTP API client code in Elixir
Nov 19, 2021 · original
Creating testable HTTP API client code in Elixir Intro As part of my day job I’ve had to create a couple of HTTP API clients and aftersome experimentation I’ve ended up with a code structure that I like and that I feel makes testing codethat uses a JSON API client easier. Making actual HTTP requests to 3rd-party services while running the tests can bedifficult because of credential availability on the machine that runs the tests,lack of a testing environment for making calls, slowness etc. One solution is to mock the outgoing requests on the client while making surethat mocking the calls is as easy as possible - but there’s always some pain involved.There are other valid approaches to this kind of testing like exvcr but I feel like mockingbalances out code coverage, usability and ease of setup fairly well. The libraries to use are Mox for mocking function calls Knigge for simplifying the - Hiring steps for developers at BetterDoc
Aug 2, 2021 · original
There was a lot of discussion about how many interviews a candidate must go through to get hired. This post describes the four hiring steps we have in place. Steps in our hiring process For you as a candidate, it depends a little on the channel we got in touch with you who you’ll be talking to. When we approach you on LinkedIn, you will have a first interview with someone from our HR department. If you approach us via email or StackOverflow, your first interview will be a combination of what is listed here. Also, vacations, projects and life in general may skew the planned interview flow a little. So please: Don’t be irritated if your experience does not 100% match what is written here. Initial interview We want to know you a little better, and we talk about BetterDoc in general. As said before, it depends a little on the way we got in touch with each other if this gets “merged” into the - Insights from working with a complex but functional setup
Jul 23, 2021 · original
Reflections on how a complicated technology setup can be made to work for the team instead of against them. Intro I’ve been writing software (and managing people, budgets and projects - all with varying degrees of success) for quite a few years now. Over that time I’ve formed opinions and prejudices, consciously and unconsciously, about what is more likely to work and what is likely to lead to a mess. I joined BetterDoc at the start of 2021, so it’s been a bit over 6 months at the moment of this writing and I might still be missing clues other than what follows. What I’m about to share is not exactly a lesson in humility; more like an observation of the conditions under which a complex technological setup can be a success. The BetterDoc setup My past experiences taught me to be distrustful of buzzword-bingo setups; it’s usually the result of some developer or other being bored who ends u - We're looking for an infrastructure engineer
Jul 22, 2021 · original
Our team as well as our software landscape is growing, so it’s time for us to start looking for someone focusing on infrastructure. In this post we want to share a bit our reasoning behind this. Where we’re coming from Right now, taking care of our infrastructure (managing our Kubernetes cluster, improving our Continuous Integration and Continuous Deployment pipeline, looking at other components like databases) is something that we share among all of our developers. Some people out there might call this “DevOps” but this term is pretty much burned throughout the industry. For some it’s simply a new name for “Ops” while for others it’s the solution to every problem out there and will ultimately bring balance to the Force. So let’s quickly forget we ever used it. We’re also growing our team quite fast which in turn means that the amount of software that we can produce grows quite fast as w - How Docker Forced Me To Learn More About Linux
Jun 18, 2021 · original
This post tells the story of some missing data and how it turned out to be related to how we built our Docker images. To give you the proper context it will talk about: the problem the root cause how we fixed it what we learned from this Grab a coffee and make yourself comfortable, we’re going iiiiiiiiin! The Mystery of the Missing Data Recently a colleague reported some inconsistent data in two distinct parts of our system.Some data was missing that wasn’t supposed to be missing. Without going into too much detail, this data is supposed to be synchronized through an eventing mechanism.One of our services emits events which another service picks up. After digging a bit through the logs of both services we concluded that the receiving service never got the events in question, which means that the emitting service was misbehaving. Where are my events!? The emitting service is written in Ru - Our case identifiers
Apr 16, 2021 · original
Coming up with identifying a case both internally and externally isn’t an easy thing.This post shows how we solved this issue for us. Why we need an identifier When we’re helping our patients, a request we’re handling for a single patient is called a case .Within a case we’re helping a patient with a specific problem to find a doctor that is uniquely qualified to help that patient with his/her specific problem. The whole operation of collecting information from the patient, searching for the best doctors and communicating the results back to the patient happens in the context of that case. At several points both internally at BetterDoc and when communicating with the patient we need to identify a specific case. A typical identification might be something like “The case for is Mr. Müller, the guy with pain in his left knee”. There are a variety of reasons why this is not the way we identi - Friday Projects
Apr 9, 2021 · original
Friday is innovation and learning time for the Product Development team — here’s an (incomplete) list of topics team members have tackled in the last months. Peek into Rust (Deeper) peek into Elixir Ansible A closer look at K3s Talk preparations for conferences bash & awk catch up TDD hands-on with phoenix Documentation grooming Open source contributions Prototyping of new (unasked for) features in the product Open source work (e.g. Knigge ) Playing around with interesting tech (earthly.dev, Dhall, neo4j) Playing around with interesting languages (Rust, ReasonML, PureScript) Improvements to internal tooling (private hex repos) Experimenting for some Elixir DDD micro-framework thing Nerves based door opener Internal operations tool for managing our services and projects (parc-cli) An OAuth enabled account system Looking into Go game engines GraphQL in Elixir Reading books All these projec - How we organize work
Apr 6, 2021 · original
We are constantly reviewing and modelling the way we organise who does what and when. Currently, we have two basic ways to bundle tasks into manageable packages: Shapes and Ship-Its. We started with one feature at a time , and evolved this quite a bit since then. Shapes Stolen from the guys at Basecamp , we have set up our own way of describing problems along with a solution sketch, a team, and a time box. We deliberately took the parts that seemed useful to us from the original Basecamp idea while ignoring the details that seemed to be overkill, at least for now. The approach fits nicely into our way of thinking about developing a product. Ship-Its Small(ish) tasks, where we do know exactly what to do or what to find out. The definitions of these things are soft, and we are still experimenting with a lot of different forms for them. We discovered that writing Ship-its can be hard to get - Three steps to a paperless home office
Dec 9, 2020 · original
The time of binders full of invoices and other documents is over.At least for me. Almost all of my personal home office is paperless these days. However almost everything still arrives on paper.This article tells you how I deal with it. The goal My ultimate goal is to have as little paper documents as possible. A few things are too important to throw away, like important contracts or bank account credentials, but everything else should be stored digitally. After looking at a few full blown document management solutions I switched to a very simple system: Storing the documents as PDFs in a regular folder structure. The pipeline Step one: Paper to PDF I still get documents in paper by post. So the first step is my scanner: An Epson WorkForce multi functional printer.The document scanner within the device has the nice functionality to directly store the scanned documents in the cloud. My cl - Sane Excel file generation with Ruby on Rails
Oct 16, 2020 · original
TL;DR: These are the 3 major steps we took to reduce our memory footprint (0.2Gb instead of 4Gb) and the time to generate the reports (2m instead of 15m): streamed the data directly to disk with xlsxtream ; switched the memory allocator to jemalloc ; and selected only what we needed, while avoiding ActiveRecord when pulling large amounts of data from the database Our setup Our main app used to be a rather big Rails monolith (235 Models, 220 Controllers, …) that was running on Heroku for the last few years. Recently, we moved towards developing all new stuff as a smaller (micro) services alongside this monolith.But hosting these smaller applications on Heroku quickly became too expensive, so we began to slowly migrate them to AWS EKS (AWS Managed Kubernetes Service) . After a while only our monolith remained on Heroku, so we decided to move it too. Since there are parts of our monolith th - How we split Plug.SSL to control SSL redirection
Sep 25, 2020 · original
Photo by Shane Aldendorff on Unsplash Recently I set out to configure a service of ours to run behind a reverse proxy with TLS termination . With Phoenix being the great framework it is, I assumed this would be a breeze.But it turned out that reality had different plans for me. In this post I’ll tell you a story on all the different bits of documentation I rummaged through, the things I learned from reading the source code of Plug.SSL , the solution I arrived at, and the proposal I submitted to plug . What we want to achieve In a nutshell we want to be able to: recognize X-Forwarded-* headers 1 from the proxy set the HSTS header 2 for HTTPS requests permanently redirect HTTP requests to use HTTPS exclude some requests from the redirect (and as such the HSTS header) Phoenix and SSL When looking up information on SSL and Phoenix, you’ll most likely come across this guide on the Phoenix web - Please don't waste my time with generic cover letters
Sep 24, 2020 · original
I might be hard to grasp, but don’t just talk about yourselves in the cover letter of your application. I am screening quite some applications for our job opening - what is a surprise for me is the obvious tendency of people to apply using completely generic one-size-fits-all cover letters. Tell me why you are interested in the position , and what makes you a good fit for the job’s requirement. Be specific. Make sure it does not sound generic. Bonus points for being open on where you might lack experience or you have to replace knowledge with curiosity. Be specific. Be open about things that are clear for the reader of your CV. Thanks,Sebastian - Active Record Basics
Sep 11, 2020 · original
Do you use Ruby (on and off Rails) and have objects holding data which you need to store and retrieve later? Then Active Record might be the perfect tool for you! In this article I give you a short overview of Active Record and explain how to use it with a few examples which I found to be essential. I will also share some points I found to be quite difficult to get right. What is Active Record? Ruby’s Active Record is an Object-Relational-Mapping layer: ORM lets you store data in a relational database and interact with it as objects. For example, instead of manually querying data using SQL statements and then converting it manually into an array, using Active Record’s User.all returns an array already filled with the wanted data. With the help of ORM’s it’s also possible to store and load data with complex relationships as objects, resolving the relationships to connections between objec - Accessing a GitHub repository within Kubernetes via a sidecar container
Aug 7, 2020 · original
To separate our services and the data our service operates on we use separate GitHub repositories as storage.This article will demonstrate how we make sure that our operational services always have the latest data available. Our usecase Image the following scenario: You have a service that is responsible for rendering templates.Let’s assume these templates are written in Markdown and rendered by the service into HTML. The service is responsible for replacing variables with their respective values and converting Markdown into HTML. The templates themselves will change a lot more frequently than the service itself.Additionally, we want non-developers to be able to edit the template content without risking to accidentally change code. Making it work locally One way to achieve this is to separate these responsibilities into two distinct projects which are represented by two distinct git repo - Database Basics, Part 4: Transactions, Locking and Indexes
Jul 17, 2020 · original
In this final part of the series I’m going to tell you about two database administration concepts that will help you in your understanding of how databases work, and one bonus that I consider “good to have heard about.” Transactions A transaction can be thought of as a group of operations. An operation is a “logical unit of work”, if you will. For example, if you want to update your postal address in an online shop where you’re registered, the transaction might consist of these operations: Find user with name "Jenny Muller" in table "Customers" Set the address to the new addressSave the updated address to the database As you can see, a transaction consists of several operations that belong together. In order to ensure data integrity in the database, a database transaction must maintain A tomicity, C onsistency, I solation, and D urability. This is commonly known as the ACID properties: A - Database Basics, Part 3: Data Models and Database Design
Jul 15, 2020 · original
Surely you might have wondered by now “How do I graphically represent my database entities and their relationships?” As with the rest of this series, this post doesn’t claim to be complete or to cover all possible points in detail - it is meant to give you a good overview of terms and concepts I feel would prove valuable for beginners, and which I would have wanted to have a few weeks ago when I started on this journey. You will find links to in-depth references at the end of this post. Data Models I’m going to show you two ways of representing database relationships: conceptual models and database design models . But first let’s recap entities real quick and then I’ll introduce you to the degrees of relationships as first step: Refresher on Entities and Entity instances An entity or entity class is a description of the structure and format of all of that entity’s occurrences (remember t
Discovered by the rss-feed-index crawler, which checks each feed at most once a month.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_dev_betterdoc_org_beebb1c073d749ac. More from this site: dev.betterdoc.org in the Feeds tab.