Eduardo Zepeda's latests posts
REST API: Best practices and design
- software architecture
- opinions
How do I design a REST API? How many levels should I nest my related resources? Relative or full URLs? This post is a compilation of some recommendations about some good REST API design practices that I have found in books and articles on the internet. I leave the sources at the ...
Read more
REST API basic characteristics and recommendations
- software architecture
- opinions
This publication is a minimal guide of practical tips on REST API design, I don't go too deep into the theory. On top of that, I may oversimplify many concepts in order to keep the text as short and simple as possible.In the next post I will talk about some more subjec...
Read more
Categories in Django using ForeignKey to self
- django
Grouping by categories is quite common in web applications, from movies, courses or any other resource that presents a hierarchical relationship to another object. In Django there are different ways to model these relationships. Probably, the first that will come to your mind wil...
Read more
Debounce and Throttle in Javascript
- javascript
Debounce and throttle are design patterns used to limit the execution of functions, generally they are used to restrict the amount of times an event is fired: click, scroll, resize or other events. Patterns are not exclusive to Javascript; in a previous post I explained how to us...
Read more
How to customize the User model in Django?
- django
In this post I explain three methods to extend or customize Django's User model, without having to rewrite it from scratch, and keeping all Django's user management features But, before we start, let's see where Django's User model comes from.Where do...
Read more
Differences between select_related and prefetch_related in Django
- django
The select_related and prefetch_related methods are used to reduce the number of queries made to the database. This translates into response time for each view. In addition, using these methods is one of the actions to implement to improve the performance of a Django application ...
Read more
Why using React.FC could be a bad practice?
- opinions
- typescript
When we use Typescript with React and we want to pass a children as prop to one of our components , we need to indicate the type. Generally we use the type React.FC, which is short for React.FunctionComponent. With this the Typescript message warning us of a children with type an...
Read more
Go: profiling or basic profiling of CPU usage
- go
In addition to unit test testing and coverage measurement in go , this programming language is capable of profiling the efficiency of the code by analyzing it in a very detailed way. This is quite useful to find bottlenecks or very expensive parts of the code, which are called nu...
Read more
Go: basic testing and coverage
- go
- testing
Go already has a testing module in its standard library that is ready for our use, we just need to import it and use it.Hey! did you know that I wrote a completely Free Go programming language tutorial?, click here to read it it Testing preparation in go For the tests to be ...
Read more
Go: race conditions on goroutines and mutexes
- go
In past posts I talked a bit about goroutines, deadlocks and channels . But there is another quite interesting issue about goroutines that stands out when we use asynchrony and there are many functions accessing data at the same time and. Multiple functions reading and writing th...
Read more