Programming Leftovers
-
Rlang ☛ Creating a Scree Plot in Base R
A scree plot is a line plot that shows the eigenvalues or variance explained by each principal component (PC) in a Principal Component Analysis (PCA). It is a useful tool for determining the number of PCs to retain in a PCA model.
In this blog post, we will show you how to create a scree plot in base R. We will use the iris dataset as an example.
-
Austin Gil ☛ AI for Web Devs: Faster Responses with HTTP Streaming
In the previous post, we got AI generated jokes into our Qwik application from OpenAI API. It worked, but the user experience suffered because we had to wait until the API completed the entire response before updating the client.
A better experience, as you’ll know if you’ve used any AI chat tools, is to respond as soon as each bit of text is generated. It becomes a sort of teletype effect.
That’s what we’re going to build today using HTTP streams.
-
Matt Rickard ☛ Tech Invariants
It seems like none of the old rules apply in the age of AI developments. Traditional software businesses are being flipped over with advancements across text, image, video, and audio.
What are the rules that haven’t changed?
-
Get started with technical writing
Technical writing is everywhere. From the user manual for your new smartphone to the safety instructions on a bottle of medication, technical writing is all around us. At its best, it communicates complex technical information in a clear, concise way.
-
Raspberry Pi ☛ Raspberry Pi: Welcome, new partners: Growing the global impact of Code Club and CoderDojo
We partner with organisations that share our vision and values to grow the Code Club and CoderDojo networks worldwide. Meet our 7 new partners.
-
Hackaday ☛ Linux Fu: Customizing Printf
When it comes to programming in C and, sometimes, C++, the printf function is a jack-of-all-trades. It does a nice job of quickly writing output, but it can also do surprisingly intricate formatting. For debugging, it is a quick way to dump some data. But what if you have data that printf can’t format? Sure, you can just write a function to pick things apart into things printf knows about. But if you are using the GNU C library, you can also extend printf to use custom specifications. It isn’t that hard, and it makes using custom data types easier.
-
Enhance Code Readability and Maintainability with Apache Groovy’s Named Parameters
Java Records offer a modern and concise approach to define simple data objects in Java, improving code readability, maintainability and reducing the chance of bugs. There’s been a fair bit of interest this feature introduced in Java 14. Two characteristics of Records that stand out for me are automatic creation of getters and setters and named parameters in constructors.
Apache Groovy has provided these types of low ceremony and readability features since its inception. Moreover, Groovy provides them all across the language, not just in the limited case of something like Java Records.