Programming Leftovers
-
Waiting for web content to do something in a Firefox mochitest - Paul Bone
It’s not unusual for a Firefox test to have to wait for various things such as a tab loading. But recently I needed to write a test that loaded a content tab with a web worker and wait for that before observing the result in a different tab. I am writing this for my own reference in the future, and if it helps someone else, that’s extra good. But I don’t think it will be of much interest if you don’t work on Firefox as the problem I’m solving won’t be relevant and the APIs won’t be familiar.
I don’t think of myself as a JavaScript programmer - I’m learning what I need to know when I need to know it, but mainly to write tests. So I’m not sure I’ll pitch this article at any particular level of JS knowledge, sorry.
-
Parse arguments with Lua | Opensource.com
Most computer commands consist of two parts: The command and arguments. The command is the program meant to be executed, while the arguments might be command options or user input. Without this structure, a user would have to edit the command's code just to change the data that the command processes. Imagine rewriting the printf command just to get your computer to greet you with a "hello world" message. Arguments are vital to interactive computing, and the Lua programming language provides the {…} expression to encapsulate varargs given at the time of launching a Lua script.
[...]
Finally, in the go section, parse the index and values in the args variable (the arguments provided by the user at launch). In this sample code, the first for loop just prints each index and value for clarity.
The second for loop uses the index to examine the first argument, which is assumed to be an option. The only valid option in this sample code is --say. If the loop finds the string --say, it calls the echo function, and the index of the current argument plus 1 (the next argument) is provided as the function parameter.
-
The Key Principles of Continuous Delivery
In the seminal book Accelerate, Forsgren and her co-authors provide empirical evidence that Continuous Delivery has a positive impact on the performance of software development organisations. If organisations neglect some of the principles and practices of Continuous Delivery, their performance will suffer. They will reach the point where simple changes will take ages to implement. Not so with Continuous Delivery.
-
Open Source & Saying "No"
A few weeks ago I was digging into a pretty complex issue that was only affecting less than 1% of users in the field with an application. With a constant mix of emotions working with React Native I appreciate how I can normally go all the way to the source during an investigation.
-
Modeling legacy code behavior using science
When you want to understand what a legacy program you’re working on is supposed to do, what’s your first instinct? Often it’s to look at the code.
But unfortunately legacy code is often so convoluted and inscrutable that it’s virtually impossible to tell what the code is supposed to do just by looking at it.
In these cases it may seem that you’re out of luck. But fortunately you’re not.
-
Write yourself into obsolescence. - /home/jwf/
This thought was pressed into my mind as I looked over all that I had created. Facing the inevitable end of one life chapter as it transitions into a new one, I recognized one possible way to improve our individual impact through documentation. Software and product documentation are classified as technical writing. While they differ in scope, they share a connection to other forms of written works like novels and newspapers; they are collections of a commonly understood, codified language meant to convey a meaning to other humans. The goal of writing yourself into obsolescence is not to create content for content’s sake. The goal is to create information pathways that leave behind a guiding light for those who come after us. The goal is to create some form of media or content that communicates information of value to someone else (even including your future self).