Eduardo Zepeda's latests posts

To do this we will create a fairly simple object:

const user = {
  userIsLoggedIn: true, 
  email: "[email protected]",
  accountType: "premium" 
}

This object could be the response to an API request. From the previous object we could destructure three properties, userIsLoggedIn, email and accountType.

","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/"}},{"@type":"BlogPosting","headline":"The 4chan about technology and programming","description":"

Many people who spend much of their day in contact with the Internet, whether for pleasure or for work, have eventually ended up on an image board, usually the most popular one among English speakers: 4chan.

4 chan has a technology section, called /g/, where there are usually threads about programming, software development, GNU/Linux and other topics that can be quite interesting, however most of them have a quality that leaves much to be desired, full of trolls and users with much ignorance on the subject. In short: they serve no purpose other than mere entertainment.

","datePublished":"Mon, 16 Sep 2019 00:00:00 +0000","dateModified":"Mon, 16 Sep 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/opinion/the-4chan-about-technology-and-programming/"}},{"@type":"BlogPosting","headline":"How to find a previously executed command in GNU Linux?","description":"

Sometimes we execute commands that solve a specific task on our system. We may have done a file lookup using regular expressions or perhaps we accessed a server via ssh and no longer remember the IP address. Re-creating the regular expression from scratch can be very time consuming and perhaps finding the IP again can also be more time consuming than if we could simply retrieve the command. We can find a previously executed command in GNU/Linux in a simple way, here is how.

","datePublished":"Sun, 01 Sep 2019 00:00:00 +0000","dateModified":"Sun, 01 Sep 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/linux/how-to-find-a-previously-executed-command-in-gnu-linux/"}},{"@type":"BlogPosting","headline":"The Big O notation for algorithm analysis","description":"

I love astrophysics and try to keep up with new discoveries as they happen; whether they are trivial things, like the discovery of a new planet; or significant, like the hypothetical Dyson spheres they swear they find every month. But this time the discovery was simply outstanding.

Last April 2019, the first photograph of a black hole was published.

\"First

First picture of a black hole

","datePublished":"Thu, 15 Aug 2019 00:00:00 +0000","dateModified":"Thu, 15 Aug 2019 00:00:00 +0000","author":{"@type":"Person","name":"Eduardo Zepeda"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://coffeebytes.dev/en/linux/the-big-o-notation-for-algorithm-analysis/"}}]}