Creating a semantic search engine involves using an embedding model to convert text into vectors, storing these vectors in a vector database, and then querying the database using the embedding of the user's search query to find semantically similar documents. This article is a step-by-step guide on setting this up.
SQL has become the dominant language for interacting with relational databases in the last 50 years. It faced competition from other query languages like QUEL, but its adoption by IBM's Db2 and subsequent endorsement by standards bodies cemented its position as the industry standard. SQL has evolved a lot since then to stay relevant.
A security vulnerability in GitHub's branch protection feature allows for protected credential exfiltration. This occurs when a wildcard branch protection rule is used, as it immediately protects any newly created branches, making them eligible to access secrets restricted to protected branches. This can be exploited to exfiltrate sensitive information, such as signing keys, by creating a new branch and setting up a workflow to access the secret.
Erlang and Elixir, built on the Erlang Virtual Machine (BEAM), are powerful tools for creating scalable, reliable real-time applications, such as WhatsApp and Discord, due to their fault tolerance, scalability, distribution capabilities, responsiveness, and ability to handle live code updates.
Promises in JavaScript aren't always intuitive to use, but they're required to be productive with JavaScript. Promises are needed because JavaScript is single-threaded, which can cause issues when blocking operations like window.prompt() are used. This post dives into the mechanics of Promises, their states (pending, fulfilled, rejected), and how to work with them using the .then() and .catch() methods. It also covers creating custom Promises, chaining them together, passing data between them, and the modern async/await syntax for a more synchronous-like experience.
Grab manages its data using a data lake, using different storage formats for high and low throughput data. For high-throughput data, which is frequently updated, it uses Apache Avro with a Merge on Read (MOR) strategy, appending new data to log files for efficient writes and periodically compacting them for manageable reads. For low-throughput data with infrequent updates, it uses Parquet with Copy on Write (CoW), creating new file versions for each write.
Parsing JSON, despite its seemingly simple format, is actually quite challenging because there are so many specifications that can be interpreted in different ways. This has led to inconsistencies in how different JSON parsers handle edge cases, extreme values, and maliciously crafted payloads, resulting in potential bugs, crashes, and denial-of-service vulnerabilities. This article goes into detail about this issue with examples of different types of objects (arrays, objects, numbers, and strings) combined with different types of parsers (C Parsers, Regex, and more).
The creator of Ruby on Rails, David Heinemeier Hansson, realized that the success of the framework was not due to his attempts to convince others, but rather by showcasing its capabilities and letting others decide for themselves. He now believes in respecting the various preferences of programmers and encouraging them to find the language that best suits their individual style and needs.
The "Skip to main content" link in website accessibility for keyboard-based navigation is really useful for a lot of users. Adding it to documentation sites should be standard.
Several new features were added to web browsers in May 2024, including CSS anchor positioning and stepped value functions in Chrome 125, the Screen Wake Lock API in Firefox 126, and the Compute Pressure API in Chrome 125.
Brioche is a new package manager and build tool inspired by Nix, Homebrew, and Cargo. It is a flexible and easy-to-use tool for managing software projects across different platforms and languages.
QStudio 3.0 is an SQL editor that supports DuckDB as a local database. It has a Parquet file viewer and can convert a query result from any database to store it locally.
Radial menus, also known as pie menus, are circular context menus used in video games to provide a smooth way for players to select options through directional input. They originated in console RPGs like "Secret of Mana" to streamline actions during battles, but have since evolved to be used in various ways, such as for quick actions in games or for selecting dialogue options in conversations.
Python modules can be run as command-line tools using the "-m" argument, providing functionality like starting web servers, opening URLs, formatting JSON data, and managing Python environments. This article goes through a bunch of examples, such as using libraries to read email, unzip files, and more.
Microsoft's new AI-powered Recall feature, which screenshots everything on a user's PC, has been criticized by cybersecurity experts due to potential security flaws in its data storage. It could potentially be exploited by malware or attackers.
Developers have been copy-pasting code from various sources even before AI existed, so it's up to new developers who want to be good at their job to use AI productively while still understanding the code being produced.
The phrase "it's just one line of code" is misleading because it often hides the actual cost of the code, which can be massive in terms of complexity and performance impact on the end user.
Andreas Kling, creator of SerenityOS, is forking Ladybird (a web browser project) from SerenityOS and stepping back a bit from SerenityOS to allow both projects to focus on their main interests.
Fortune 50 companies like AWS and Google Cloud and fast growing startups like Vercel and Secureframe work with TLDR to reach our audience of over 4 million tech-savvy decision makers with highly customized campaigns (like this one!).
Strong types in programming languages like C++ and Rust, which enforce specific data types and rules for variables, lead to fewer bugs, more expressive APIs, and potentially better performance. They prevent invalid input, improve code clarity, and reduce the need for repetitive error checking (like in JavaScript with undefined).
This article describes a pattern for geographically distributing PostgreSQL databases for multi-tenant applications using only standard PostgreSQL functionality. The pattern involves separating per-tenant data from control plane data, placing tenant data in the nearest region, creating a global view using Foreign Data Wrappers, and partitioning, while keeping authentication and control plane data centralized. This approach lowers latencies, complies with data residency laws, and allows edge computing while maintaining most PostgreSQL features and ACID guarantees within tenants.
Agile and Scrum are too rigid and bureaucratic as implemented in the industry right now. Daily standup is a prime example of a pointless and unproductive ceremony that wastes developers' time and fails to actually foster progress.
Meetings are timesuck for devs. To be useful and effective, meetings should have an authoritative document to guide discussions. This makes sure that everyone is on the same page about the project's goals and complexities.
A three-step process for writing clean code: first, prioritize making the code work, then add testing for correctness, and finally, refactor and clean up the code while relying on the tests.
In local-first development, app code works directly with a client-side embedded database, which optionally syncs with a backend database. To support this paradigm, PowerSync [11] allows you to build local-first apps with simple state management and real-time reactivity [11] by continuously syncing your SQL databases.
Twinny is a free private AI extension for VS Code. It comes with fill-in-the-middle code completion, AI chat, customizable prompt templates, and more. Twinny supports both API endpoints and local LLMs.
Ivan Trusov, the lead programmer for a project, shares his experience using Lua for game development within the Defold engine. Trusov encountered some surprises with Lua's syntax and quirks, particularly with table handling. Despite these challenges, he found Lua's simplicity and speed very useful. Trusov also discusses the limitations of Lua's lack of strict typing and modules.
htmx offers a simpler alternative to frameworks in frontend development by enhancing HTML with attributes that enable AJAX-like functionality, utilizing the hypermedia concept to create RESTful applications without excessive JavaScript.
A developer shares lessons learned from running a simple static news archive website for learning Finnish. He enjoys using cronjobs and Git together as they complement each other nicely. He also thinks simplicity and working locally are severely underrated.
A developer created a tic-tac-toe game using only HTML and CSS, adding a "random" button to simulate a computer player and incorporating an audio easter egg.
Design deeper layer APIs to be more generic, use documentation to guide design and reduce obscurity, and try out multiple designs to incorporate the best ideas.
The DRY (Don't Repeat Yourself) principle can be harmful if applied prematurely. Early abstractions can lead to unnecessary complexity where future requirements may require independent evolution of seemingly similar looking pieces of code. Instead of blindly following DRY, developers should always think through what code sections are truly redundant or may evolve in the future based on business requirements.
1Password's browser extension build system, which was over half a decade old, had become slow and inefficient. The team integrated esbuild into the production build system, which achieved a 90% reduction in build times.
UI and UX over time have gotten worse. For example, current web interfaces often lack basic functionalities like "Ok" and "Cancel" buttons, require overly precise mouse movements, and lack clear visual cues for active elements or application identification.
This article challenges three common engineering leadership anti-patterns. First, it argues against always avoiding micromanagement, suggesting that leaders should engage in "conflict mining" to understand context and write down the details of company strategies. Second, it advocates for measuring imperfect but useful metrics over waiting for perfect ones. Lastly, it challenges the idea of managers as umbrellas, suggesting that exposing teams to the "gory details" and providing less buffered information is probably better in the long run.
After initially being a GraphQL advocate, this developer now advises against its use due to several issues he encountered. These include increased attack surface due to query language exposure, difficulties in implementing effective rate limiting, challenges with query parsing and server overload, performance issues like N+1 problems and data authorization inefficiencies, and the overall complexity of maintaining a GraphQL codebase.