Every Friday, I publish the Friday 5, a list of 5 links to useful things for coders.
In this week’s Friday 5: a site that catalogs VS Code’s surprising capabilities, a look at the darker corners of Go, background processing in Android, a full-text search in 150 lines of Python, and generating brighter and darker versions of color in JS.
VSCodeCanDoThat.com
Visual Studio Code is a far more capable editor than you might suspect, and the VS Code Can Do That?! can help you discover tips, tricks, and techniques to help you get the most out of this editor.
Each tip/trick/technique comes with a video showing the tip/trick/technique in action and a link to a more detailed description of the tip/trick/technique.
Check it out: VSCodeCanDoThat.com
Darker Corners of Go
Rytis Bieliunas writes:
While simplicity is at the core of Go philosophy you’ll find in further text it nevertheless enables numerous creative ways of shooting yourself in a foot.
Since now I have used Go for production applications for several years and on the account of the many holes in my feet I thought I’d put together a text for the fellow noob students of Go.
My goal is to collect in one place various things in Go that might be surprising to new developers and perhaps shed some light on the more unusual features of Go. I hope that would save the reader lots of Googling and debugging time and possibly prevent some expensive bugs.
Check it out: Darker Corners of Go
Background Processing in Android
Here’s an article from the Auth0 Developer Blog, where I’m one of the writers/editors:
Android apps use the main thread to handle UI updates and operations (like user input). Running long-running operations on the main thread can lead to app freezes, unresponsiveness and thus, poor user experience. To mitigate this, long-running operations should be run in the background. Android has several options for running tasks in the background and in this article, we’ll look at the recommended options for running different types of tasks.
This article uses Java and covers threading, WorkManager
, and AlarmManager
.
Check it out: Background Processing in Android
Building a full-text search engine in 150 lines of Python code
If you’ve wondered how full-text search engines work and thought about building your own, this basic implementation in Python is worth trying out. In this article, you’ll build an engine that searches Wikipedia’s article abstracts and ranks them for relevance, and it’ll do so in milliseconds!
The article covers these major topics:
- Collecting and formatting the data
- Indexing the collected data (which includes stemming the words in the data to their basic forms)
- Searching
- Ranking results by relevance
Check it out: Building a full-text search engine in 150 lines of Python code
Generate Brighter And Darker Versions Of Color With JavaScript
TinyColor is a fantastic JavaScript library that can help you out with a whole bunch of tasks when you’re working with colors. This article takes a quick look at this more-useful-than-you-might-think library.
Check it out: Generate Brighter And Darker Versions Of Color With JavaScript
Are there useful things for coders that should appear in the next edition of Friday 5? Let me know at joey@joeydevilla.com!