Remember the initial days when you were forced to learn recursive programming? And how you were thankful that it’s all over and you don’t have to deal with the whole thing anymore? Well, why do you think that is? Recursion is not all that bad! A lot of beginners who start out with programming somehow end up hating recursion. The main reason is that people don’t really understand how to deconstruct a given problem to make it suitable for recursion. Recursive code, by itself, is nice and small. But understanding what exactly is the recursive part can be pretty confusing. If used correctly, recursion can be one of the best weapons in your programming arsenal. Let’s see what’s beneath all this! Continue reading “Understanding Recursion: Part 1/4”
What Is A Galois Field?
A Galois Field is actually a corn field owned by any person named Galois! Too obvious? Alright, that was a joke. Anyway, the word ‘field’ is being used in the mathematical context here. Évariste Galois was a mathematical prodigy who laid strong foundations for abstract algebra. His collected works contain important ideas that have had far-reaching consequences for nearly all branches of mathematics, thus etching his name in mathematics forever. Unfortunately, he died at a tender age of 20. The work he did as a teenager is now being used by mathematicians around the world for their doctorate studies and related research work. Prodigy indeed! Just so we are clear, this blog post has nothing to do with corn fields. Well then, what else can it be about? Continue reading “What Is A Galois Field?”
Transcendental Functions
Transcendentalism refers to the philosophical movement that developed in the 1800s. It taught people to believe in the inherent goodness of people and nature. It also said that religious organizations and political parties corrupt the purity of an individual. So obviously, any ceremonies or functions attended by transcendentalists should be called transcendental functions. Right? No, not really! That has actually nothing to do with what we will be discussing here. When we hear the term ‘function’ used in a scientific context, we immediately jump to mathematics. If you are somewhat familiar with mathematics, you know what a function is. If not, no worries; we will discuss it further soon. But for now, all we need to know is that real functions are divided into two groups: algebraic functions and transcendental functions. Wait, what? Aren’t all functions and equations ‘algebraic’? Well, not exactly. As it turns out, transcendentalism exists in mathematics! Continue reading “Transcendental Functions”
Why Do We Need Stress Testing?
This is the third and the last blog post in this three-part series. If you want, you can read the first and second posts. In these previous posts, we discussed load testing and performance testing. With load testing, we can see how the system behaves when there is too much load. With performance testing, we can analyze all the moving parts of the system and optimize them accordingly. Load testing and performance testing analyze existing parts assuming everything is in tact. But what if a part of the system completely breaks down? How will you know what’s going to happen at that point? This is where stress testing comes into picture. Continue reading “Why Do We Need Stress Testing?”
Why Do We Need Performance Testing?
This blog post is the second one in this three-part series. If you want, you can read the first and third parts as well. In the previous blog post, we discussed about load testing and how it is useful in determining the behavior of a given system. Load testing is actually a part of the bigger performance testing framework. With load testing, we can understand how the system will behave under extreme load conditions. But what about all the other moving parts of the system? Extreme load is not the only problem a system can face. How do we understand all the constraints of a system? How can we determine what part of the system is going to misbehave in real time? This is where performance testing comes into picture. Continue reading “Why Do We Need Performance Testing?”
Why Do We Need Load Testing?
This blog post is the first one in a three-part series. If you want, you can read the second and third parts as well. Let’s say you are building a website that allows users to create an account, upload photos and browse around. So you will go ahead and define the functionality, design the interface, build the core backend and add all the necessary infrastructure. But how will you know if your design is strong enough the handle everything? How will you know if the website will perform well when a lot of users use it simultaneously? This is where load testing comes into picture. Continue reading “Why Do We Need Load Testing?”
Purkinje Effect
Ever wondered why the colors seem to change at night? For example, if you look at an air painting, you can see how the colors of objects look radically different in very low light just before dawn or dusk. Consider a red rose, for instance. We know that the flower’s petals are bright red against the green of the leaves in daylight. But, take a look at dusk and you will see that suddenly the contrast is reversed, with the red flower petals now appearing dark red or dark warm gray, and the leaves appearing relatively bright. Bright red doesn’t remain bright red anymore, and green doesn’t remain green either. They all become a bit monochromatic and it becomes difficult to separate them. Why does this happen? Continue reading “Purkinje Effect”
Kruithof Curve
This is more of a continuation of my blog post on color temperature. Back when fluorescent light sources first came up, they changed the way humans thought about light and color rendering. A scientist named Arie Andries Kruithof performed some experiments on how the human eye relates the amount of light in a given time of day to the color temperature of the light source, and came up with a theory. As we move through the day, the amount of light we get keeps varying. Typically, human beings like higher color temperature light sources during the daytime hours, and lower color temperature sources once the sun goes down. People in warmer climates tend to favor cooler color temperature sources, and people in colder climates like warmer light. So what does this have to do with the Kruithof curve? Continue reading “Kruithof Curve”
What Is Color Temperature?
Wait a minute, isn’t “temperature” associated with weather? How can color have temperature? The thing is that color temperature is actually a characteristic of visible light that has several important applications in photography, publishing, and many other fields. We actually see and feel it all the time, it’s just that we don’t realize that we like certain color temperatures more than others. The concept of color is more easily apparent to us. We can see what’s red and what’s blue. There are a lot of characteristics of color that we feel, but don’t realize. So what exactly is color temperature? Continue reading “What Is Color Temperature?”
How To Load Different XIBs Based On The Device Type?
What’s with all the different sizes of the iOS devices? I mean, sure we have autolayout feature that takes care of things in general. But if you want real aesthetic perfection, then you are better off having a separate XIB for each screen size. If you create a universal app, Xcode automatically creates two separate XIBs for iPhone and iPad. But if you want to differentiate between the 3.5 inch screen and the 4 inch screen on the iPhone, you should create a new XIB and add it to your project. You should of course name them accordingly. You can then load the XIBs by checking for the device type as given below. Continue reading “How To Load Different XIBs Based On The Device Type?”