Most of the time, there is no need for us to optimize memory usage in Python. Either our programs are too small to consume significant memory or we are are storing the data in databases outside the program. Regardless, there may exist cases where we must retain excessively large structures or a large number of objects in memory. As a result, I hope to illustrate practices that can decrease program memory usage.
By default, whenever you create an object in Python, you will have the ability…
Let’s get cracking!
Suppose we want to create an enum to represent the cardinal directions:
However, existing properties/keys can be altered and new properties can be added into
Reading and writing to disk and navigating the filesystem is a staple in any language. Let’s learn how to do it in Go with os, a package that lets us interact with operating system functionality.
Creating & Opening Files
Writing & Appending to Files
Navigating & Reading Directories
Walking through a Directory
If you call
os.Create on an existing…
When building a website, it is important to make sure it works consistently on all the major browsers. After all, each browser is unique in the development features it provides.
For example, check this diagram out:
Algorithms & Data Structures interviews are notoriously difficult. Coming up with an optimal approach to a problem is already time-consuming. So, if you become stuck on the implementation, you may not even finish the problem! As a result, understanding how to use each of the core data structures and knowing the Python-specific caveats about them will make the implementation seamless.
There are multiple ways of optimizing server performance. One way is to make the client do some of the work. Consider uploading images for profile pictures. Since high-quality images take up several MB, it is costly to send them over the network to the server. Also, since profile pictures don’t need to be extremely detailed, it would be nice to compress them and save space. Thankfully, with HTML Canvas, we can compress our images right upon an upload by resizing them…
Although building software projects can be challenging, deployment can be a pain. In fact, in situations where speed is necessary, deployment must be seamless. For that reason, I want to show you how to deploy Redis for free and use Redis remotely. Redis Labs, a Redis cloud hosting service, offers a free plan with simple deployment steps. We will leverage that plan to create an instance and integrate that instance with Node.js.
Do everything quickly and well.
― G.I. Gurdjieff
To start, head over to https://redislabs.com/ and sign up.
Asynchronous programming is incredible! With it, we can run our IO-intensive tasks without having to block the execution of other code. However, in situations where the code after a blocking task depends on the task’s result, we must wait. Now, imagine if the blocking task took a long time to finish or it never finished. This could be problematic in the context of the application. We can solve this issue by setting a time limit on our task. If our task doesn’t finish in the span of the time limit, we can return a failure value instead. Let me elaborate.
Performance is a must when it comes to building software. However, in certain situations, the speed to set up and integrate new services for proof of concept evaluation or infrastructure is overlooked. Specifically, in the realm of databases, there are many options, but I find Deta to be most seamless to set up and use. Deta offers Deta Base (I will refer to it as Base), a NoSQL data store optimized for developer simplicity. In this article, I aim to show how to set up a Deta project and interact with your Base to store and manipulate Pokemon data.
This article is the prequel to Visualize Website Usage with a React Dashboard. In this article, we build out a service to track and store usage. In Visualize Website Usage with a React Dashboard, we build a dashboard to put the usage data in perspective.
What is the most valuable resource in the modern era? Personally, I think that data triumphs in value over any other entity in the current world. In fact, data is the primary driver of decisions and actions in many lucrative industries of the present world.
Interested in the convergence between tech and business. Coding is a superpower!