Eduardo Zepeda's latests posts

Django is my favorite web development framework, it is mature, its documentation and community are excellent. When I wrote about the advantages and disadvantages of Django I explained you how to go from an idea to a working prototype in a very short time and without writing almost any code. I learned much of what I know about this framework years ago, reading and practicing the contents of a book called Definitive Guide to Django: Web Development Done Right by the authors Adrian Holovaty , Jacob Kaplan-Moss (co-creators of Django) and impeccably translated into Spanish by Saul Garcia under the title La guía definitiva de Django: Desarrolla aplicaciones web de forma rápida y sencilla.

","datePublished":"Wed, 01 Apr 2020 00:00:00 +0000","dateModified":"Wed, 01 Apr 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/django/the-definitive-guide-to-django/"}},{"@type":"BlogPosting","headline":"How to program an automatic wallpaper changer in Python?","description":"

In the previous post we made an automatic wallpaper changer in Python

In this entry we are going to use Cron to program the periodic execution of this script and that it is in charge of changing the wallpaper every certain time, automatically, every hour, two hours, every day, every minute or the frequency that we want.

If you don’t know how Cron daemon works and how to schedule tasks using this tool, please check my post about Cron and Crontab .

","datePublished":"Sun, 01 Mar 2020 00:00:00 +0000","dateModified":"Sun, 01 Mar 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/python/how-to-program-an-automatic-wallpaper-changer-in-python/"}},{"@type":"BlogPosting","headline":"How to create a wallpaper changer using Python in Gnome?","description":"

In this post we are going to create an automatic, random and minimalistic wallpaper changer for GNU/Linux using Python. With no extra functions, super lightweight and totally homemade, its only function will be to randomly select an image and set it as wallpaper. I will explain the function of each line in the code.

Updated Updated for Gnome 43 and Python 3.12

If you are not familiar with Python syntax, read about one of the best books for getting into Python in my post about the book Python Immersion .

","datePublished":"Sat, 15 Feb 2020 00:00:00 +0000","dateModified":"Sat, 15 Feb 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/python/how-to-create-an-automatic-wallpaper-changer-using-python-in-gnome/"}},{"@type":"BlogPosting","headline":"Program periodic tasks easily in Linux with Cron and Crontab","description":"

In this post I’ll teach you how to program tasks to be executed every certain amount of time, it could be as complex as you want, just by modifying a simple file, the crontab file, which is available in every popular Linux distribution, if not all of them.

Many times we want to run a script or a command every so often, for example when we want to perform periodic backups of a database, send your subscribers a reminder email, or perhaps delete cache files every so often. Cron, in conjunction with Crontab allows you to run a task every so often.

","datePublished":"Sat, 01 Feb 2020 00:00:00 +0000","dateModified":"Sat, 01 Feb 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/linux/program-periodic-tasks-easily-in-linux-with-cron-and-crontab/"}},{"@type":"BlogPosting","headline":"You don't know how to use Javascript console","description":"

I bet you have ever used console.log() to debug errors when programming in javascript. But you may not know that console has other useful methods besides log(). In this post I am going to place some of the most useful methods that I have found on the web. In this entry I am going to put some of the most useful methods I have found on the web.

Console.info Displays information

console.info() performs the function of displaying information

","datePublished":"Wed, 15 Jan 2020 00:00:00 +0000","dateModified":"Wed, 15 Jan 2020 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/you-dont-know-how-to-use-javascript-console/"}},{"@type":"BlogPosting","headline":"Destructuring with default values in Javascript","description":"

In the previous post I briefly discussed the topic of destructuring with nested objects in javascript . In this post I am going to talk a bit about how we can specify default values when destructuring an object in javascript.

To do this we will create a fairly simple object:

","datePublished":"Sun, 01 Dec 2019 00:00:00 +0000","dateModified":"Sun, 01 Dec 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/destructuring-with-default-values-in-javascript/"}},{"@type":"BlogPosting","headline":"Destructuring nested objects in Javascript","description":"

In the previous posts I briefly explained how to perform a destructuring of objects in Javascript , but in most cases we will not be lucky enough to work with flat objects, but we will find nested objects with several levels of depth. Will we have to settle for forgetting about this feature and do the job explicitly assigning a constant to each object? Luckily Javascript allows us to work with the destructuring of nested objects.

","datePublished":"Sat, 16 Nov 2019 00:00:00 +0000","dateModified":"Sat, 16 Nov 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/destructuring-nested-objects-in-javascript/"}},{"@type":"BlogPosting","headline":"Destructuring lists in JavaScript","description":"

In the previous post I explained a bit about the topic of object destructuring in javascript . In addition to object destructuring, JavaScript also allows you to destructure lists. In this post I will talk about list destructuring in JavaScript.

Let’s imagine that we have a list with numerical values.

const scientificData = [15.222, 1.723, 1.313, 4.555, 2.333, 1.990]

The contents of the list are just numbers, they tell us absolutely nothing. These values could be coefficients, temperature measurements, lengths of some part or some gradient of concentrations of a solution; we have no way of knowing. We might be tempted to process the information by accessing the indices of each value in the list, but this would detract from the readability of the code.

","datePublished":"Sun, 03 Nov 2019 00:00:00 +0000","dateModified":"Sun, 03 Nov 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/destructuring-lists-in-javascript/"}},{"@type":"BlogPosting","headline":"Destructuring variables in javascript","description":"

For those like me, whose first language was not fortunate (or unfortunate) enough to be javascript, destructuring can take on esoteric overtones. In this post I will try to explain in a simple way the destructuring of objects in javascript. Destructuring is a process that, contrary to popular belief, is actually quite simple and, moreover, can improve code readability.

If you want to start learning Javascript from scratch I recommend the book Eloquent Javascript , here I recommend what I consider the best book to start.

","datePublished":"Wed, 16 Oct 2019 00:00:00 +0000","dateModified":"Wed, 16 Oct 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/destructuring-variables-in-javascript/"}},{"@type":"BlogPosting","headline":"The best book for learning modern JavaScript","description":"

There are many good books to learn Javascript however the book Eloquent Javascript really made me understand modern Javascript. If you plan to dedicate some hours to acquire knowledge of this language, don’t waste your time looking for more, you will hardly find a book that covers such a variety of concepts in such an understandable and complete way as this one.

","datePublished":"Tue, 01 Oct 2019 00:00:00 +0000","dateModified":"Tue, 01 Oct 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/javascript/the-best-book-for-learning-modern-javascript/"}}]}