Programming Leftovers
-
A 4-minute guide to Java loops
A while loop performs a set of tasks for as long as some predefined condition is true. This is considered a control structure that directs the flow of a program. It's a way for you to tell your code what to do by defining a condition that it can test, and take action based on what it finds. The two kinds of while loops in Java are while and do while.
-
I scanned every package on PyPi and found 57 live AWS keys | Tom Forbes
After inadvertently finding that InfoSys leaked an AWS key on PyPi I wanted to know how many other live AWS keys may be present on Python package index.
-
The Perl Toolchain Summit is back in 2023! | BooK [blogs.perl.org]
After a three years pandemic-induced hiatus, it is my pleasure to announce that the Perl Toolchain Summit is happening again!
This year, for the thirteenth edition, we will be gathering again in Lyon, from Wednesday April 27 to Sunday April 30 2023, in the hotel Campanile Lyon Centre Part-Dieu. Participants will stay at the hotel, and work in the meeting rooms dedicated for the event.
[...]
The summit provides dedicated time to work on the critical systems and tools, with all the right people in the same room. The attendees hammer out solutions to thorny problems and discuss new ideas to keep the toolchain moving forward.
Given the important nature of the attendees’ work and their volunteer status, we try to pay for all expenses (travel, lodging, food, etc.) through sponsorship. If you’re interested in helping sponsor the summit, please get in touch with Philippe Bruhat at book at cpan.org.
-
Architecture diagrams should be code
For the past few years I’ve been the most senior developer on my teams in Atlassian, in both position (Principal Engineer) and time (almost 9 years) - this means I usually take on the responsibility of managing our software architecture.
Architecture is the relationships between systems, which can be fairly tricky to talk about. Probably the best form of communication is a diagram, with boxes representing systems (or components) and lines representing relationships between them. This can still have issues.
-
Epochalypse
The signed 32-bit integer that is historically used to keep unix epoch time has already exhausted of all possible values.
-
Introduction - Just Programmer's Manual
-
Makefiles for Web Work – Ross Zurowski
A set of recipes for using Makefiles for web development.
-
What Happens When A CPU Starts
-
How to store your app's entire state in the url
I'm working on a flowchart editor that runs in the browser, and I wanted a way for people to use it without having to sign in, or store any data on our server. I wanted to give them control over their data and to be able to store it locally to open and edit later. And also easily share it with other people. It's easy to do this by supporting file upload/download, but I wanted something simpler, like the ability to share by sending a url. I also didn't want to store anything on the backend (at least for the free tier).
[...]
Everything after the `/g/a#` is a stringified version of a json object that contains all the information about the flowchart. It gets stringified, then compressed, then Base64 encoded. I update the url on every graph edit, so copying the graph state is as simple as copying the url in your browser bar.
-
What causes flaky tests
A flaky test is a test that passes sometimes and fails sometimes, even though no code has changed.
In other words, a flaky test is a test that’s non-deterministic.
A test can be non-deterministic if either a) the test code is non-deterministic or b) the application code being tested is non-deterministic, or both.
-
Care is needed to use C++ std::optional with non-trivial objects
It is possible for an optimizing compiler to elide some or all of the superfluous constructions, especially if you can inline the functions, so that the compiler can see the useless work and prune it. However, in general, you may encounter inefficient code.