A function is an essential construct in programming. The language that we use to convey a message on the computer, functions closely resemble a verb: “the nuts and bolts of the language” (S. Pinker, 2007). Put it in another way, functions serve as the primary constructs for expressing a set computational procedure in a programming language.
It is better to break down the problem into manageable pieces. Solving the smaller part of the problem requires a computational procedure that we store in a function.
This article will introduce the things to consider in designing and organizing functions.
A function is…
Data science seems to be a convoluted term that rose in popularity mostly tied with the advancements of machine learning frameworks. Some argue that data science is a term for an overpaid statistician, others imagine them to be a role one adapts from software engineering, while some see them as businessmen with technical skills. I’ve seen heated forums debating the ethos of this term. I found Field Cady’s definition of data science to be in the right spot where this tension can be settled.
Data science means doing analytics work that, for one reason or another, requires a substantial amount…
Imagine you are tasked to make an algorithm for the automation of airplane control systems. You closed the deal with a known airplane company. Your software is now used in 30% of all the modern plane control systems. This is an overly complex system that you worked with for years, but you forgot to specify on your program that under all circumstances, an airplane should never enter into a nosedive.
One night, you were called up by the company for an emergency. There’s a report on unexpected nosedives to have been caused by your software. You gathered your team to…
Python 3.10 just announced their release on April 10 this year. Most of the updates were done to improve the developer experience and maintainability of the codebase.
We enjoyed the fun of writing Python code for its readable syntax, and user-friendly language design. It was clearly meant for getting rid of type prefix you would normally write in other languages such as C++ or Java. Keep in mind that C++ and Java are compiled languages that necessarily impose a set of grammatical rules for mapping them onto a machine code that you can execute. But Python is a dynamically typed…
Object-oriented programming (OOP) has become one of the most used programming paradigms since its conception. Part of the reason why the object-oriented approach is widely practiced is code-reusability. OOP emphasizes a group of concepts packed up together and their relations with other objects. The main idea behind this paradigm is to bind a template for the data and its associated behaviors.
function set_str_data(string _arg);
function set_int_data(int _arg);
The pseudocode above shows some basic features of OOP. We can observe that the object has an internal (
Data Structures underlie everything we do in computer science: understanding them is critical to writing rigorous software and effective algorithms.
There are two general ways of looking at data structures: concept and implementation. Ideally, they should serve you the sense in selecting an effective data structure for a given problem. Fundamental data structures manifest themselves naturally in most situations. The problem usually demands a certain data structure, while others could be represented in different ways. An effective data structure should simplify the problem. But that is only half of the story since a data structure must also ensure computational efficiency…
Gottfried Wilhelm Leibniz was a prominent German polymath of the 17th century. He made contributions not only in the field of mathematics, which his most prominent discoveries on the language of symbolic logic, and calculus were established, but also in philosophy, which he formally studied, and theology where he argued a rational stance for the existence of God. While Leibniz works in different fields were found to be foundational he was involved in controversies that although he was a member of the Royal Society and the Berlin Academy of Science, his grave went unmarked for 50 years.
This is the…
Algorithms can be a very difficult subject to understand. They come in varying logic expressed in varying languages, implemented in different syntax for varying purposes. Indeed, there are algorithms that are said to be different but works pretty much the same: the distinction can be drawn upon many parameters, one that is common is the nature of how the logic is implemented and how efficient it is based on some constraints usually determined by time and memory it needs — more generally with respect to finite resources.
In this article, we shall take a general perspective and build our understanding…
“I don’t know what I did. It opened a bunch of pop-ups and crashed the program. I don’t ever want to use it again; it’s frustrating”
Humans are not immune to errors. In fact, to err is to be human. Systems should, therefore, account for the events of errors. It should have a feedback mechanism that allows the user to have brief information about the series of actions that are rendered inside the system upon request. Whenever an error has occurred the feedback has to be concise and actionable.
Before we delve a bit further into our discussion, it is…
While doing research, it was advised to follow a methodological approach that another author had used for their investigation. There are laboratory standards and protocols one has to follow in doing science. Working for weeks in the Philippine Textile Research Institute with my colleagues investigating the plausibility of Green Chemistry for developing nanotechnology, we spent a ton amount of time, money, and effort on doing something wrong. Apparently, some research upon which we laid the foundations of our methods did not agree with the actual result we had developed in the lab. …
Hi, I’m Dave. I love writing about science & technology — to make sense of what I’m reading. I believe that some ideas are worth sharing.