[SOLVED] In Windows, how to recover an invisible application window

Scenario:

  • You are using a laptop with one or more external monitors at home and (a different set of external monitors) at the office.

Problem:

  • Every once in a while, when you switch between home and office, some buggy application will not handle its screen positioning correctly, so it will open up off-screen. In the taskbar you can see that the application has launched, but the application window is invisible.

How to fix:

Read more »

A Programming Language

Abstract

My thoughts and notes on how I would like a new programming language to look like.

The unique selling point of the language is:

Automatic memory reclamation without garbage collection.

Other selling points of the language are:

  • Simple and elegant. (So that it is suitable for the academia.)
  • Expressive. (So that it is suitable for experienced programmers.)
  • Consistent. (So that it is attractive to developer teams.)
  • Guiding. (So that it promotes best practices.)
  • Fast. (So that it is suitable for high performance computing.)
  • Lean. (So that it is suitable for resource-constrained computing.)

This is work-in-progress; It is bound to be heavily amended as time passes, especially if I try some new language, like Kotlin or Rust.

Summary of language characteristics

Read more »

Malicious Inaction

Actor Wayne Knight in the original Jurassic Park movie
playing the role of the unscrupulous programmer Dennis Nedry,
(anagram of “Nerdy”,) the main villain.
****    
  **Malicious Inaction** (noun) any situation where a piece of software encounters an unexpected condition and responds by deliberately doing nothing, including *not* throwing an exception.  Synonyms: Silent Failure; Deliberate Malfunction; Unscrupulous Programming; Undermining; Sabotage; Treachery; Subversion; Vandalism.

I think that the term “Silent Failure” fails to express the amount of harm done. Sure, the word “failure” indicates that something went wrong, but the word “silent” somewhat lessens the severity of the term, and it makes sound as if no feathers were ruffled, so it may have been alright.

Read more »

Digital Audio Waveform Generation

For various projects of mine I need to be able to synthesize sound, so I decided to take a quick dabble in the realm of Digital Signal Processing. I mean, how hard could it be, right?

After some fooling around with the Sampled Audio Subsystem of the Java Virtual Machine I was able to hear sinusoidal waveforms of various frequencies from my speakers, and I was starting to think that I am probably almost done, until I tried to play square waveforms. That’s when I realized that I had barely scratched the surface. The square waveforms sounded pretty awful at any frequency, and especially at high octaves they sounded like random notes. Triangular waveforms, sawtooth waveforms, really anything except sinusoidal waveforms all suffered from the same problem.

A bit of googling around soon revealed the name of the source of my troubles: aliasing.

A naïvely sampled square wave,
exhibiting a bad case of aliasing. Note how some of the peaks and valleys consist of 3 samples, while some consist of only 2 samples.
Read more »

SVG in WPF

My notes on how to use SVG graphics in a WPF application

The Goal

The goal is to be able do do things like this:

1
<Button Content="{StaticResource mySvgImage}">

… where mySvgImage somehow stands for a vector image that has somehow been obtained from an SVG file.

The solution must not involve any proprietary, closed-source libraries.

Naturally, we want one of the following:

  • Either directly include SVG files into our application as resources, or, if that is not possible, then:
  • Have an “asset pipeline” approach where our SVG files are automatically converted during build into some format which is suitable for inclusion as a resource.
Read more »

Java with Maven: Giving CI/CD a try

Please note that this is work in progress. I am still working on it and refining it, as my understanding of it improves.

I have a set of public repositories on GitHub showcasing my work, () which is in java with maven. These projects are interdependent, so when you check out one of them, in order to compile and run it you need the binaries of some of the others. You could manually check out all of them and put them in an IDE project, but that’s too much work. Solving this problem requires having Continuous Integration & Continuous Deployment (CI/CD) in place, so I decided to try my luck in setting one up using free services only.

Read more »