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 »

Python Environments

If you’re working on different projects, especially large projects, you should be using Python Environments. So what is a Python Environment and why should I care? The best definition is the one from the official documentation: The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. …

Python Environments Read More »

Try..Catch… … in VB6?

If you’ve been using VB.Net or any modern programming languages, you’ve probably used Try..Catch (or try..except) when performing routines that could potentially fail. But in the classic Visual Basic 6.0 language, there is no such construct… right? Technically there’s none…but…there is a way to mimic that behavior — or at least the mechanism using pure/native …

Try..Catch… … in VB6? Read More »

Python Course Syllabus

If I’m going to create my own Python Tutorial Course, here’s what I’d probably use as course syllabus: Basics hello, world operators & expressions variables & scope data types type casting data structures value comparison multiple assignment comments user input output formatting indentation decision making (branching) error handling Intermediate function loop args & kwargs importing …

Python Course Syllabus Read More »