Programming Languages Power Usage

Interesting article on The New Stack about programming languages power usage. Which Programming Languages Use the Least Electricity? https://thenewstack.io/which-programming-languages-use-the-least-electricity/ © 2019 The New Stack. All rights reserved. Should we all go back to C now?

Regular Expressions: Groups

In Python, you can write the following, to capture groups of characters with regular expressions. >>> import re >>> print(“Match is ‘” … + re.search(‘\\s([a-z]+)\\s’, … ‘My text string.’).group(1) + “‘”) Match is ‘text’ >>>  This is quite straightforward. In C#, you can write […]

Package basics

Packages form the basic building blocks of software components in many programming languages. For example, in Java you use the package statement to define the package for a class as follows. package a.b; public class C {     public static void main(String[] args) […]

Unit testing in Java and C#

Unit testing has become a cornerstone of modern software development. Some of the most popular frameworks for unit testing are collectively known as xUnit. Originally developed for Smalltalk, there are now xUnit frameworks available for many programming languages. The current version 4 of the […]

Some notes on lists in Java and Python

Java and Python both have collection types (or compound data types). For a general introduction into collection types, you might want to have a look at Wikipedia. One of the most basic collection types is a list. In Java, you use the interface java.util.List […]

About coding conventions

Coding conventions are an important part of software development. Contrary to popular belief, it is not only the functionality of the code that matters, what the code does, but also the readability, what the code looks like. That is because code is read much […]