# avoid

Published articles for avoid.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Effective Kotlin Item 7: Prefer a nullable or Result result type when the lack of a result is possible

DevFeed: [Effective Kotlin Item 7: Prefer a nullable or Result result type when the lack of a result is possible](<https://devfeed.tech/articles/effective-kotlin-item-7-prefer-a-nullable-or-result-result-type-when-the-lack-of-a-result-is-possible-39285.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-nullable-result>)

Published: 2022-10-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [exceptions](<https://devfeed.tech/topics/exceptions.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [avoid](<https://devfeed.tech/tags/avoid.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Kotlin article explains when to return nullable or Result types and when to throw exceptions. It recommends explicit return types for expected failures because they are clearer and more efficient to handle, while exceptions should be reserved for unexpected or exceptional conditions. It also notes reasonable uses of exceptions in some backend and Android processing patterns.

### Source excerpt

Why should we prefer to avoid throwing exceptions and using types to our advantage.

## Robust queue job handling in Craft CMS

DevFeed: [Robust queue job handling in Craft CMS](<https://devfeed.tech/articles/robust-queue-job-handling-in-craft-cms-31291.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2019-08-03T15:37:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Content Management System](<https://devfeed.tech/topics/cms.md>), [Job](<https://devfeed.tech/topics/job.md>), [async](<https://devfeed.tech/topics/async.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [cms](<https://devfeed.tech/tags/cms.md>), [craft](<https://devfeed.tech/tags/craft.md>), [failed](<https://devfeed.tech/tags/failed.md>), [here-s](<https://devfeed.tech/tags/here-s.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [independent](<https://devfeed.tech/tags/independent.md>), [insights](<https://devfeed.tech/tags/insights.md>), [job](<https://devfeed.tech/tags/job.md>), [jobs](<https://devfeed.tech/tags/jobs.md>), [long-running](<https://devfeed.tech/tags/long-running.md>), [queue](<https://devfeed.tech/tags/queue.md>), [runner](<https://devfeed.tech/tags/runner.md>), [stalled](<https://devfeed.tech/tags/stalled.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [uses](<https://devfeed.tech/tags/uses.md>), [using](<https://devfeed.tech/tags/using.md>)

### AI overview

This tutorial explains how Craft CMS queues long-running tasks and why its default web-request-based queue execution can leave jobs stalled or failed. It discusses using an independent async queue runner.

### Source excerpt

Craft CMS uses queue jobs for long-running tasks. Here's how to avoid stalled or failed queue jobs by using an independent async queue runner

## MySQL Migrations

DevFeed: [MySQL Migrations](<https://devfeed.tech/articles/mysql-migrations-35617.md>)

Original publisher: [Read original article](<https://zolmeister.com/2016/08/mysql-migrations.html>)

Author: Zoli Kahan

Published: 2016-08-27T05:00:00Z

Content type: tutorial

Language: en

Sources: [Zolmeister](<https://devfeed.tech/sources/zolmeister.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Database](<https://devfeed.tech/topics/database.md>), [Docker](<https://devfeed.tech/topics/docker.md>)

Tags: [alter](<https://devfeed.tech/tags/alter.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [database](<https://devfeed.tech/tags/database.md>), [docker](<https://devfeed.tech/tags/docker.md>), [downtime](<https://devfeed.tech/tags/downtime.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [mysql](<https://devfeed.tech/tags/mysql.md>)

### AI overview

This article describes migrating 17 million rows in MySQL without downtime while a table continues receiving reads and writes. It explains using Large Hadron Migrator to copy the table and track new writes with triggers, adjusting migration speed to avoid write timeouts, and running the process in a Docker container. The migration ultimately took more than 20 hours, and cleanup was manual if problems occurred.

### Source excerpt

MySQL Migrations Migrating 17M rows with no downtime - Isotope Scenario: 17M rows in a table, constant writes/reads, slave/master setup. If you try to run an ALTER TABLE (especially on older versions of MySQL), most operations will lock the table for writes for the entire run-time of the query. To avoid this, we need to incrementally update the table, incorporating write changes as they arrive. Our solution was to use the Large Hadron Migrator, built and open-sourced by SoundCloud.

## Writing Shell Scripts

DevFeed: [Writing Shell Scripts](<https://devfeed.tech/articles/writing-shell-scripts-30280.md>)

Original publisher: [Read original article](<https://www.netmeister.org/blog/writing-shell-scripts.html>)

Published: 2016-04-08T21:03:11Z

Content type: tutorial

Language: en

Sources: [Signs of Triviality](<https://devfeed.tech/sources/signs-of-triviality.md>)

Topics: [Script](<https://devfeed.tech/topics/script.md>), [Shell](<https://devfeed.tech/topics/shell.md>)

Tags: [avoid](<https://devfeed.tech/tags/avoid.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [scripts](<https://devfeed.tech/tags/scripts.md>), [shell](<https://devfeed.tech/tags/shell.md>), [writing](<https://devfeed.tech/tags/writing.md>)

### AI overview

A set of general guidelines for writing clean, reliable shell scripts and avoiding common pitfalls.

### Source excerpt

Writing clean, realiable shell scripts is not rocket science. Here are a few general guidelines to avoid common pitfalls and increase the reliability of your scripts.

## Avoid static imports

DevFeed: [Avoid static imports](<https://devfeed.tech/articles/avoid-static-imports-37681.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/avoid-static-imports/>)

Author: Carlos Alexandro Becker

Published: 2015-07-05T00:00:00Z

Content type: opinion

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>)

Tags: [antipattern](<https://devfeed.tech/tags/antipattern.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [code](<https://devfeed.tech/tags/code.md>), [java](<https://devfeed.tech/tags/java.md>), [oop](<https://devfeed.tech/tags/oop.md>), [readability](<https://devfeed.tech/tags/readability.md>)

### AI overview

The article argues that Java static imports should be used sparingly because overuse can obscure where methods and members originate, pollute the namespace, and reduce code readability and maintainability. It recommends importing only a small number of frequently used static members when appropriate.

### Source excerpt

There are a lot of Java API's and Frameworks which rely on static methods and the sort. Arguably, this is a bad OOP practice, but let's not enter this particular subject just yet.

## Follow-up on dim:mailrc-add-entry

DevFeed: [Follow-up on dim:mailrc-add-entry](<https://devfeed.tech/articles/follow-up-on-dim-mailrc-add-entry-34350.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2009/09/follow-up-on-dimmailrc-add-entry/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2009-09-07T10:50:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [function](<https://devfeed.tech/topics/function.md>), [file](<https://devfeed.tech/topics/file.md>)

Tags: [automatically](<https://devfeed.tech/tags/automatically.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [file](<https://devfeed.tech/tags/file.md>), [function](<https://devfeed.tech/tags/function.md>), [integration](<https://devfeed.tech/tags/integration.md>), [using](<https://devfeed.tech/tags/using.md>)

### AI overview

A follow-up describes extending a function to support multiple mailrc files and configuring Gnus integration to expand and complete mail aliases through keyboard shortcuts.

### Source excerpt

The function didn't allow for using more than one mailrc file, which isn't a good idea, so I've just added that. Oh and for gnus integration what I need is (add-hook 'message-mode-hook 'mail-abbrevs-setup) it seems... so that if I type the alias it'll get automatically expanded. And to be real lazy and avoid having to type in the entire alias, mail-abbrev-complete-alias to the rescue, assigned to some easy to reach keys.