HOW TO CREATE A DOCKERFILE FOR YOUR DENO FRESH PROJECT
Sometimes creating a Dockerfile is an art, you need to be aware of what files include in each layer to leverage the docker cache. How can we do this with deno fresh? Recommended or usual Dockerfile Most of the examples I have found in the internet (like this one) tend to copy all the files in the same Docker instruction: FROM denoland/deno:2.1.4 WORKDIR /app COPY . . RUN deno cache main.ts RUN deno task build USER deno EXPOSE 8000 CMD ["run", "-A", "main.ts"] This of course works, but we are just copying all the files in the Docker image, and that can cause many issues:
HOW TO ADD OTEL TO YOUR DENO FRESH PROJECT
OpenTelemetry is a standard for adding telemetry to your application. There are a myriad of implementations for almost all the programming languages. But you need to be aware that the particularities of each language can make integrating with OTEL very different in one case or other. Introduction This post assumes you know what observability is, the best practices and the bare minimum that is accepted nowadays in modern applications. We would also suppose that you know what OpenTelemetry is, how it works and the best practices when adding OTEL to an application. We will not delve in explanations about those concepts, we will only show some examples about how to add OTEL to a deno fresh application.
FAULTY ENGINEERING CAREER LADDERS
Introduction Let’s see several issues with the Engineering ladders I have seen on my 16 years of experience. This is a long post, I do not recommend reading it in one sitting. Faulty engineering ladders Most companies I worked for had some kind of Engineering ladder. It looks nice and promising to know that you can be promoted. However, in my experience there is no clear path for promotion. No clear way to be promoted This is one of the most common faults in the career ladders I have seen. All the supposedly clarity of the ladder dissipates when I ask for the promotion process. There are no defined goals, nor a structured process.
HOW TO WRITE A SIMPLE MIDDLEWARE IN DENO FRESH
Middlewares are layers that inject data or check the HTTP request and are used by a set of routes. They are very useful as they group functionality together. Let’s see how to implement a middleware in deno fresh. Select the routes the middleware is going to affect The middlewares in deno fresh are created inside a _middleware.ts file. This file will affect the routes that are from its level to the bottom. Let’s see an example:
THE DIFFERENT TYPES OF PERSONALITY
There are several frames that try to define the different types of personality (without any kind of particular order): Surrounded by idiots C-me colour profiling Disc profiles The four tendencies What are those? Several psychology researchers have determined that people can be grouped based on 4 personality profiles. Mainly they define the following dimensions: Analytical Dominant Social/Leader Cooperative How do they affect your communication? Depending on what dimension reflects more on you, you will need to improve other areas were you are not so skilled. For example if you are not a social animal, maybe you need to be more careful or have more tact when talking with team mates.
LEADERSHIP WITH PASSIVE SUBJECTS
Most leadership advice (that I have read) assumes all the team members are motivated and want to improve themselves. However, what about the opposite? What can happen when a developer is not interested in improve their skills and is dragging down the team? Along this post we will delve on the subject of what to do when you have to lead over different types of developers. A note of warning In Spain, contractors are hired as a temporal replacement for full-time permanent employees. They work in the same office than the company employees but are paid monthly by the contracting company. They have the same responsibilities of the employees but they are paid by the contracting company.
CV DRIVEN DEVELOPMENT
CV Driven Development or Resume Driven Development consist on taken strategic decisions based on how they improve the CV of the developers that work on that project. Introduction Most of the project management methodologies have a focus on improving the satisfaction of the clients and users. Most of the time by removing friction between them and the development process, or by reducing waste. CV Driven Development has as one of the non-functional requirements learning something new. It does not have to be a bad thing, but if it is not done properly, it can be chaos when dealing with maintenance of the project.
WAR STORIES
When talking about software documentation we usually describe the what and how, but explaining the reason (why) is it left out. Giving a background about why the team took some decisions can help developers understand better why the software is the way it is. Documentation is a foundational part of software I would say that nobody doubts that a piece os software without documentation is not useful. Software can have a big complexity and maintaining it and extend it can be hard if there is no guide. It would be akin finding the exit from a maze without a map.
THE RUNTIME TYPE-CHECKING OPERATOR IN TYPESCRIPT
I have been working with TypeScript for a while but for sure I am not an expert in the language (I feel more comfortable with Python). I like the idea of type-safe but limiting the static type checking process can make you confident about what you are getting from outside sources, and if you do not trust those sources (you should NOT), you would need to include a lot of repetitive checks any time we read data from the outside.
DON'T USE SINGLETONS
The Singleton pattern is one of the patterns that appeared in the Design Patterns book by Erich Gamma et al.. What is a singleton? The singleton is one design patter to share a resource in a controlled manner in a code base. That resource could be a configuration, a connection or any other global state that should be unique. How to implement it? There are several ways to implement this, but in Python (for example) you can implement it by making use of the Python metaclasses.