The TLDR Tech
285 FOLLOWERS
I write blog in the tech domain, majorly in Django, python, react and developer focus. The TLDR Tech is for those moments when we quickly want to understand something and move on, so that later on the weekend we can dig deep into the core concepts.
The TLDR Tech
1y ago
What is middleware?
Middleware is a program that acts as a bridge between two services/programs. Middleware should be like a plugin in any Framework.
Middleware in Django
Middleware is a framework of hooks into Django’s request/response processing.
Django supports both Custom and Built-in Middleware
This blog is limited to discussion on SecurityMiddleware
SecurityMiddleware is a class of Django Middleware
The django.middleware.security.SecurityMiddleware provides several security enhancements to the request/response cycle.
The following list of settings can be set or updated in Django ..read more
The TLDR Tech
1y ago
If you're a data scientist or a Python developer or just starting out in the field, you'll likely need a Python distribution like Anaconda. It's one of the most popular Python distributions out there, and it includes pretty much everything you need to get started with data analysis and scientific computing.
Anaconda is very popular among data scientists and developers because it makes managing your software much easier. In this post, we'll discuss what Anaconda is and why you might want to use it.
What is Anaconda?
Anaconda is a Python distribution for data science. It includes NumPy, SciPy ..read more
The TLDR Tech
2y ago
Django template is a powerful built-in feature that most people on the modern web tend to overlook. Even I have myself overlooked this feature for more than 3 years into Django development, to finally embrace it with open arms. Let us first try to see how to render Context using Template in Django.
from django.template import Context
from django.template import Template
def render_content_with_context(html_data, context_data):
template = Template(html_data)
context = Context(context_data)
return template.render(context)
html_data = '<h1> Hello {{name}}</h1&g ..read more
The TLDR Tech
2y ago
Gone are those days when you could be an expert of a certain language/framework and survive as a developer in the Industry. In today's fast-moving tech world, you are expected to be a problem solver. Companies want people who can understand the business problem and build a solution to it, rather than have a solution and try to see if the problem gets solved or not.
To be a problem solved developers now have to keep on learning SQL databases, No-SQL databases, frontend frameworks, backend frameworks, no-code platforms, low-code platforms, on-premise setup, cloud setup, serverless setup, and th ..read more
The TLDR Tech
2y ago
Working with multiple NodeJS projects can be challenging at times with different NodeJS version requirements. There are multiple tools that can help with working with multiple versions like
nvm
n
fnm (My go-to approach which is performance and version oriented, for non docker projects)
Docker (Always suggest going for docker setup, read the article below for more)
Why should you learn docker?
Gone are those days when you could be an expert of a certain language/framework and survive as a developer in the Industry. In today’s fast-moving tech world, you are expected to be a problem solver ..read more
The TLDR Tech
2y ago
Javascript ecosystem is one of the finest and most evolving platform in the programming community. Hence you would find a lot of times the packages you have used in your project or in the global space get outdated soon. It becomes a task to then go and find out the upgrades and manually update the packages.
Though one should always read the change-logs of the newly released package and then migrate to the newer version, but still knowing the commands to identify the outdated packages is important.
How to find all the outdated packages in your global space?
npm outdated -g --depth=0
This would ..read more
The TLDR Tech
2y ago
Code formatting and hygiene is one of the most crucial aspects of a project, this determines if all your fellow developers love to work on the codebase or they have a frustration look when a new task is given to them. How much so ever the senior folks in the team try to control the hygiene using review process, they are bound to be by-passed if there are not enough automated processes added.
This brings us to the next question what all automation can someone do to make sure that the code hygiene is maintained and people do not by-pass these as per their advantage. In python there are primaril ..read more
The TLDR Tech
2y ago
Native packages are one of the most performance oriented way to perform any task. While working with NodeJS one would encounter the most common task of making an HTTP request. There are multiple built-in packages and also third-party packages which can be used to do the same.
Native https
request
axios
superagent
got
Out of all the above approaches only https comes out of the box in NodeJS without any additional installation. This also removes the additional overhead of bloating your code.
But then why do people use other packages? The reason is simple, the ease of implementation outweighs ..read more
The TLDR Tech
2y ago
Using CDN would be one of the first pieces of advice which anyone would give when you want to improve the performance of your globally distributed users. CloudFront is the AWS CDN, which helps you integrate seamlessly into the AWS ecosystem.
While using CloudFront you might come across one of the most trivial debugging problems, how to access different edge locations. For example, if I am trying to test my CDN from India, my web requests would be served from the PoP located in India, but let us say some users in Russia is facing some problem on my website which is served via CDN, then it beco ..read more
The TLDR Tech
2y ago
A cookie can be accessed through javascript if it does not have HttpOnly header set. Any attacker who managed to perform XSS or run a client-side script is able to access the cookie if it does not have HttpOnly flag set.
Cookie with HttpOnly flag set is inaccessible via client-side javascript.
How does HttpOnly flag help?
when attacker tries to read cookie which has HttpOnly flag set, javascript responds with empty string
For which cookies should I set HttpOnly flag?
For cookies which we don't want to be accessed through javascript, this flag should be set.
Does HttpOnly flag provide 100% pr ..read more