I know which side of class I was sitting when closure topic came in Programming Languages class in Junior year of college. Having come across so many details of programming languages from currying to machine instructions, I was not that happy when closure came. I was fine with function and method.
Well, closure is more interesting, cool and also useful than what I might have initially sighed about.
In this article, we’ll go over variable scopes — global scope, local scope and nonlocal scope, and how closure works with variables of different scopes to make it interesting.
A pang of maybe a panic or a guilt effervesced as I looked at a notification on a medium article that was published last midnight. Yes, spent my weekend to work and polish on that technical article. A question arose, ‘Is it reaching audience it is meant for?’ 5$/month is not everyone’s cup of tea.
My technical articles are meant to give a small push or a little assurance of ‘you too can master this concept’. So in the evening took off all the articles that were behind the paywall, 13 total. Was glad that I was able to undo…
Before I encountered ‘lambda’ in Python, I had encountered it in Math, maybe in some variable naming; mmm.. eigenvalue λ. So the term wasn’t something new; however, this cryptic one liner had flown away from my radar until now.
We’ll learn about lambda function, it’s usages, and more pythonic alternatives.
Lambda function is another way of creating a function without a name, aka anonymous function. It’s syntax is
As I was writing this article on numeric types in Python, I also wrote on float data types. There are times where we cannot have finite binary representation of a fractional number such as 1/10, 2/10.
In this article we’ll go over IEEE’s standard on floating point binary representation and simple algorithm to compute binary representation of floating numbers.
While Python does have built-in function
bin() to get binary value of integer, float type is still bit obfuscated. We can import
ctypes module and use it to get binary value of fractions and it takes an understanding of normalized and…
If you’re in States, Happy post 4th of July!
Can’t believe I’m out of school for the past 3 years which also means I haven’t done Maths actively, though it started trailing off slowly after March 2015. I had taken my final formal Math class during winter session of 2015 to complete minor requirement. The class was called Elementary Numerical Theory . The subject made me put humongous winter blizzard events sideway. Those numbers you learn since you can remember your time at schools, are not numbers; they are rich with their properties. Hello prime, pi, gcd, hello to all…
Memory has been an elusive topic for me except I know there were some terms such as ‘pass by value’ , ‘pass by reference’, ‘destructor’ , ‘segfault’ going around in my
C++ class which I spectacularly failed. When retook the class after a year, this time offered in Java, did fine and bumped up the crazy GPA. ‘Memory Leak` was again one of the term that I got around in a later class and sounded ominous. Before that I had come across ‘gas leak’, ‘water leak’; how bad this ‘memory leak’ could be?
Here we’ll learn about variables, memory address…
Dunder stands for double underscore and rhymes with thunder. Unlike thunder, dunder method doesn’t have to make noise, it works like magic✨ — behind your optical sensory. In this article we’ll refer to magic/dunder method as dunder method.
Side note: I learned what dunder stood for in my first CS class and I guess it has stuck with me since then. Later, I might also have been a little nuisance by blurting what it stood for. 🤐 :flips_mane:
Dunder method starts and end with double underscore
_ , like
Let’s model a vaccine information…
hmm…, it’s already June and also this is my first article for year 2021 🧐. My plan for 2020 was to have at least 1 article/month. Hope you are doing fine.
During my early times of learning Object Oriented Programming (OOP),
setter method were some of the concepts I learned. These methods embody encapsulation property of the OOP paradigm. I was bit amused by classes having private and public property and how you want to keep your classes’ properties secure and mysterious by encapsulating it.
I have used this concept in some commercially successful languages like Java and…
grep is for making grip of patterns in a text!
g : global search
re : regular expression
p : print
Neat. Thanks grymoire!
Before writing the series,
grep was a more known command to me which had also become quite handy. I have used it just as a standalone command or in combination with other command such as
grep ing pattern in an output passed to it from another command —
It’s not awkward, it stands for 3 developers — Aho, Weinberger, Kernighan
I had to break ‘sed, awk, grep’ post to each independent topic. Realized they need their own space. Having been done with
sed, now is
Like most articles here, I also had to do a lot of pushing myself to complete it. Things does not flow smoothly as I like, like when I am in flow, things come up such as appointment to see a new place since the last lease was ending soon! Anyways, taking time and hopefully complete this article on an election night.