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?
Tag: java
heise online: Java ist Programmiersprache des Jahres 2015 im TIOBE-Index
“Viele Gewinner, aber auch einen großen Verlierer findet man eingangs des Jahres im TIOBE-Index zur Ermittlung der populärsten Programmiersprache. Über allen steht derzeit Java, das einen doch sehr überraschenden Boom zu verzeichnen hat.” http://heise.de/-3067171 Copyright © 2015 Heise Medien
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 […]
Can I add elements to a java.util.List that is backed by an array?
It seems that you can add elements to a java.util.List that is backed by an array. For example, you could try this: import java.util.Arrays; import java.util.List; public class ListSample { public static void main(String[] args) { String[] a = {“foo”, “bar”}; List l […]