Programming Leftovers


-
Margaret Hamilton Recalls Her Life as a Programming Pioneer – The New Stack
In the early 1960s, Margaret Hamilton began her career as a pioneering programmer and systems designer. And when NASA launched a series of missions that led to the first astronauts on the moon, Hamilton was director of the Software Engineering Division at the Massachusetts Institute of Technology’s Instrumentation Laboratory, developing the mission’s onboard flight software.
That project included writing 40,000 lines of code for the moon-landing lunar module, and its “mothership,” the orbiting craft carrying the command and service modules.
-
Understanding jq's reduce function
Being a predominantly functional language, the fact that jq has a reduce function comes as no surprise. However, its structure and how it is wielded is a little different from what I was used to. I think this is partly due to how jq programs are constructed, as pipelines for JSON data to flow through.
I decided to write this post after reading an invocation of reduce in an answer to a Stack Overflow question, which had this really interesting approach to achieving what was desired: [...]
-
Coding Cobol: Tricks with arrays (or tables)
Arrays in Cobol are called tables, and they are a bit odd. For example the following code creates a 1D table with 5 elements in it, each of type x(5), or rather a “string” of 5 ascii characters.
-
the tragedy of gethostbyname – Ariadne's Space
A frequent complaint expressed on a certain website about Alpine is related to the deficiencies regarding the musl DNS resolver when querying large zones. In response, it is usually mentioned that applications which are expecting reliable DNS lookups should be using a dedicated DNS library for this task, not the getaddrinfo or gethostbyname APIs, but this is usually rebuffed by comments saying that these APIs are fine to use because they are allegedly reliable on GNU/Linux.
For a number of reasons, the assertion that DNS resolution via these APIs under glibc is more reliable is false, but to understand why, we must look at the history of why a libc is responsible for shipping these functions to begin with, and how these APIs evolved over the years. For instance, did you know that gethostbyname originally didn’t do DNS queries at all? And, the big question: why are these APIs blocking, when DNS is inherently an asynchronous protocol?
Before we get into this, it is important to again restate that if you are an application developer, and your application depends on reliable DNS performance, you must absolutely use a dedicated DNS resolver library designed for this task. There are many libraries available that are good for this purpose, such as c-ares, GNU adns, s6-dns and OpenBSD’s libasr. As should hopefully become obvious at the end of this article, the DNS clients included with libc are designed to provide basic functionality only, and there is no guarantee of portable behavior across client implementations.
-
How to Read and Print Pretty JSON With PHP
JSON is a popular data storage format to exchange data between server and browser. It is derived from JavaScript and supported by many standard programming languages. It is a human-readable file format that anyone quickly understands if it prints with proper formatting. JSON data prints in a single line when no formatting is applied. But this type of output is not easier to understand. So, the formatted JSON data is very important in order for the reader to understand the structure of the data. Pretty print is used to format the JSON data. JSON data can be represented in a more readable form for humans by using pretty printing. There are many ways to apply pretty printing in JSON data. The ways to apply JSON pretty-printing using PHP are shown in this tutorial through various examples.
-
Java News Roundup: OpenJDK Updates, Spring Framework 6.0-M3, Helidon 3.0-M1, JobRunr 5.0-M1
This week's Java roundup for March 14th, 2022, features news from OpenJDK, JDK 19, Spring Framework 6.0-M3 and 5.3.17, Spring Tools 4.14.0, Quarkus 2.7.5, Helidon 3.0-M1, March 2022 Payara Platform, Open Liberty 22.0.0.3 and 22.0.0.4-beta, Hibernate ORM 5.6.7, Hibernate Search 6.1.3 and 6.0.9, JobRunr 5.0-RC1, Apache Camel 3.11.6, Piranha 22.3.0, JReleaser update, and reasons why Java makes sense.
-
Fun with font rendering consistency in Python
On a daily basis, I work on firmware for an embedded device that uses the Bridgetek FT800. It’s a nifty chip that takes commands over SPI/I2C and turns them into an image displayed on an LCD. It’s very useful for displaying user interfaces with simple microcontrollers. Bridgetek is actually a spinoff company from FTDI, and this kind of solution seems right up their alley — take something complicated like USB or a display controller, and create a simpler interface for dealing with it, such as UART/SPI/I2C.
-
Installing Perl: A Chicken-and-Egg Problem | Tom Wyant [blogs.perl.org]
A couple days ago the SD card on a Raspberry Pi lost its beady little mind, and I ended up rebuilding the system from scratch. I generally build my own Perl (also from scratch) and then install the modules I need. So that I can have a log file to rummage through in the event of a problem, I start by configuring the CPAN client interactively, and then doing
$ cpan YAML 2>&1 | tee YAML.log
$ cpan Bundle::CPAN 2>&1 | tee YAML.log
-

- Login or register to post comments
Printer-friendly version- 1944 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago