Programming

Posts related to (software) programming

Callable Classes in Python, VB.Net and VB6

Let’s do some multiverse madness here and do something specific but do it across different programming languages! 🙂 For this one, let’s make the class or rather the instance of it — callable; that is, instead of the client invoking its method, we invoke itself. What do I mean by this? Most of us call …

Callable Classes in Python, VB.Net and VB6 Read More »

ByVal & ByRef in VB6 — When to use which?

One of the things new (or even experienced) VB6 programmers need to know about are the relevance/importance of ByVal and ByRef when passing parameters to a function or subroutine, as not knowing this could cause hard-to-detect bugs and unexpected results — and not being able to create more advanced codes. ByVal ByVal means pass “by …

ByVal & ByRef in VB6 — When to use which? Read More »

Using Functions for Dependency Injection and as Callback in Python

Although implementing Dependency Injection design pattern and Callbacks can be implemented in most programming languages (even in VB6), it’s just cleaner/neater to do in Python. These are also scenarios or use cases where you intentionally would pass the function object instead of it’s return value. Function as dependency To write a function that behaves differently …

Using Functions for Dependency Injection and as Callback in Python Read More »

When to and Why Use Parentheses in Python

One of the important (and usually confusing) concepts a developer needs to understand in Python is the use (or omission) of parentheses. This may seem so trivial, even obvious but it’s something that can cause problems to a lot of programmers, especially new ones coming from a different programming language. At best it could cause …

When to and Why Use Parentheses in Python Read More »