TLDR Web Dev 2024-04-11

CodeGemma by Google 🤖, Gemini 1.5 integrations 📄, difficulty of code search 🔍

🧑‍💻
Articles & Tutorials

Code Search is Hard (5 minute read)

Code search is a hard problem to solve compared to normal search. Search tools often optimize for natural language, but these techniques make code search worse. Most big companies have custom code search tools, which is a sign of how difficult the problem is. Postgres has functions that can make code search easier, like its full text search options.

How I write tests in Go (14 minute read)

Golang comes with its own testing library, which is not common among popular programming languages. Unit tests in Go should be written to run in parallel by default so that concurrency issues are surfaced early on. The testing package has a comprehensive set of flags and can provide code coverage reports, race condition detection, static analysis, shuffled test execution, and more.
🧠
Opinions & Advice

Don't require people to change 'source code' to configure your programs (2 minute read)

Programs should avoid requiring users to modify source code files (like Makefiles or header files) for configuration purposes. This is because it can often lead to merge conflicts during updates later on, which can be difficult to debug. Configurations should be handled through other methods instead.

Shell History Is Your Best Productivity Tool (6 minute read)

This blog demonstrates how customizing ZSH shell history configurations can be a boon for your productivity. These tips make it easier to find and reuse past commands quickly. You can efficiently access a personalized command library by tuning history storage and implementing advanced search techniques such as ‘fzf’ and ‘ag’.
🚀
Launches & Tools

Deco (Website)

Deco is a real-time TypeScript web editor. You can code directly on the web or on your machine and get instant feedback.

Aider (GitHub Repo)

Aider is a command-line tool that lets you directly edit code in your files while pair-programming with GPT. It will git commit changes with AI-generated commit messages.

CodeGemma (8 minute read)

CodeGemma, a collaborative effort between Google and Hugging Face, is a family of open-access, code-specialized LLMs. The models are available in 2B and 7B configurations. They have been fine-tuned with a lot of data to bring better performance in logical reasoning and programming suggestions.
🎁
Miscellaneous

Gemini 1.5 and Google’s Nature (10 minute read)

The recent Google Cloud Next keynote showcased Google’s vast, scalable AI infrastructure, which is difficult to replicate. Gemini models can now be integrated with Google Search and enterprise data sources, reducing hallucinations and creating better answers. Gemini 1.5 Pro can process up to 1 million tokens of information, which is a breakthrough in long context understanding. Google is integrating Gemini into many of its enterprise products, such as Google Workspace and code development tools, which is another competitive advantage for them.

Notes on git's error messages (10 minute read)

Git’s error messages can be confusing to understand, but there are some great strategies to help decode them. Git status clarifies the current branch state, and git log helps examine commits and identify divergence points. You can also customize your shell prompt to display branch status, which can be helpful.

Why Can't My Mom Email Me? (5 minute read)

This author was receiving encrypted emails with blank bodies from his mother. The issue was Proton's use of the Web Key Directory (WKD), which automatically encrypts emails if a public key is found for the recipient's address, even if the user didn't explicitly enroll in the service. The author’s email address was enrolled, so he received blank emails.
⚡️
Quick Links

Oh my Git! (Website)

An open-source game to learn and understand Git better.

Improving our Jest execution time by 300% (5 minute read)

A look into how one developer improved slow Jest tests by fixing memory leaks, disabling redundant type checking, and optimizing some functions.

"BatBadBut" Vulnerability Discovered in Rust Standard Library on Windows (2 minute read)

A vulnerability named "BatBadBut" was discovered in the Rust standard library on Windows that allows arbitrary command execution due to improper argument escaping when invoking batch files.

GPT-4 Turbo with Vision Now Available via API (11 minute read)

Some interesting use cases for GPT-4 with Vision include nutrition insights from pictures, UI replication from screenshots, web scraping, and data extraction.
Get our free, 5-minute newsletter read by 350,000 frontend, backend, and full stack developers
Join 300,000 readers for