Technology Tales

Notes drawn from experiences in consumer and enterprise technology

17:02, 27th September 2022

R for Clinical Study Reports and Submission is a practical guide authored by Yilong Zhang, Nan Xiao, Keaven Anderson and Yalin Zhu, aimed at helping both novice and experienced R programmers use the language to prepare clinical study reports (CSRs) and submit them to regulatory agencies. CSRs are integral to clinical trial development, serving as comprehensive scientific records of individual trials, and their preparation is guided by the ICH E3 framework. The book covers the creation of tables, listings and figures, project management and the regulatory submission process, and has been presented at a number of industry events including the R/Pharma Conference, the ASA Biopharmaceutical Section Regulatory-Industry Statistics Workshop and the PSI Webinar Series.

17:01, 27th September 2022

SAS Mirror Manager for SAS Viya 3.4

SAS Mirror Manager is a tool used to create and manage mirror repositories for deploying SAS Viya 3.4, supporting both Linux and Windows environments as well as containerised deployments. It can be run locally without needing to be installed on the deployment environment itself, and is available for download in versions compatible with Linux, Macintosh and Windows on x64 architecture, each at roughly 4 MB in size. Instructions for downloading and using the tool are included in the deployment guide linked within the user's Software Order Email.

17:00, 27th September 2022

SAS Mirror Manager for SAS Viya

SAS Mirror Manager is a tool used to create and manage mirror repositories for deploying SAS Viya, and it can be run locally without needing to be installed on the deployment environment itself. It is available for download in versions compatible with Linux, Macintosh and Windows operating systems, each at approximately 7 megabytes in size, with instructions provided through the relevant deployment guide. SAS also offers supporting resources for users, including training options spanning classroom, live web, e-learning and one-on-one mentoring formats, as well as a globally recognised certification programme and a dedicated user group for administrators and architects.

18:06, 24th August 2022

Hello Shiny Python

In July 2022, the alpha release of Shiny generated considerable excitement among Python practitioners, who had long sought an equivalent to the R Shiny framework for building bespoke web applications. Installed via PyPI like any other Python package, Shiny follows the same fundamental two-part structure familiar to R Shiny users, comprising a user interface layer that generates HTML, CSS and JavaScript rendered in the browser, and a server function containing the application logic.

The UI and server communicate through uniquely identified input and output bindings, with the server receiving user-driven values and returning rendered results such as plots. A practical demonstration of this involves building an interactive application using the plotnine library to display diamond price data filtered dynamically by colour selection, illustrating how relatively straightforward it is to produce a functional, interactive data application in Python using the framework.

18:05, 24th August 2022

Shiny for Python

This framework for creating reactive data and AI applications in Python offers a streamlined approach to building interactive dashboards and web interfaces. It minimises manual state management by automatically determining execution paths, reduces unnecessary re-rendering through a reactive engine and integrates with modern Python tools to support custom styling and complex applications. Users can begin by installing the package, selecting a template and customising layouts with data, enabling the development of scalable and visually appealing applications with minimal setup.

11:54, 20th August 2022

Using Pandas with Python Decimal for accurate currency arithmetic

When working with currency or other figures requiring precise decimal representation, Python's default float type and Pandas' NumPy float64 can introduce subtle inaccuracies due to their base 2 internal representation, meaning comparisons and calculations may produce unexpected results.

Two practical approaches exist for maintaining accuracy. The first involves integer arithmetic, where decimal separators are stripped and values are converted to integers before calculation, though this requires all values to share the same number of decimal places. The second, more flexible approach uses Python's Decimal module, which maintains a base 10 representation and produces exact results.

When using Decimal within Pandas, care is needed because standard aggregation methods such as sum() and mean() will silently convert Decimal objects back to float64. To preserve Decimal types, any sum operations should use apply() with a lambda function, and mean values should be calculated by combining apply() with a manual division by the length of the dataframe rather than relying on the built-in mean() method.

13:10, 18th August 2022

Julia 1.8 Highlights

This significant update to the Julia programming language brings several enhancements aimed at improving performance, usability and package management. The new version introduces a tool that provides detailed insights into how long dependencies take to load, helping developers identify bottlenecks in package initialisation. This is particularly useful for large projects where understanding load times can lead to optimisations.

The package manager now includes an indicator that shows whether a package is on its latest version and whether other packages are preventing it from updating. This helps users avoid confusion when encountering bugs or discrepancies between documentation and the code they are running. A new flag allows users to see which packages are outdated and what constraints are holding them back.

Support for creating sysimages with precompiled packages has been improved, allowing for faster load times. However, this comes with the caveat that versions of packages included in sysimages are fixed, meaning updates to those packages will not be automatically applied.

Pre-compilation has been enhanced to retain more type-inferred code, reducing the need for repeated inference during initial runs. This can significantly cut down on latency for workloads with predictable types. The changes also make pre-compilation more reliable, ensuring that methods linked to a package are cached effectively.

Apple Silicon is now a Tier 2 supported platform, with improvements to the linker reducing crashes that were common in earlier versions. This update ensures better stability on macOS devices using ARM processors. These changes collectively aim to make Julia more efficient, easier to manage and more compatible with modern hardware, addressing both developer and user needs in a rapidly evolving ecosystem.

12:56, 13th August 2022

Compiling a Custom Sysimage in Julia

Creating a custom sysimage in Julia can significantly reduce pre-compilation delays, particularly for frequently used packages like Plots, by precompiling essential functions and dependencies into a standalone file. This involves setting up a new project, defining a representative workflow in a script, compiling the sysimage using PackageCompiler.jl and then configuring Julia to load the custom image instead of the default one. The result is a faster startup time for Julia sessions, with minimal delay when accessing precompiled packages, though some steps still necessitate direct interaction with the terminal for full control over the compilation process. While this process can be initiated through terminal commands, support within VSCode remains experimental, requiring manual configuration to ensure the sysimage is recognised and used automatically when launching a REPL.

15:34, 29th July 2022

DevOps with VS Code, GIT, and SASjs

The integration of SAS development with DevOps practices through tools like SASjs and Visual Studio Code streamlines workflows for coding, testing and deploying SAS applications. Developers can configure multiple targets for isolated builds and deployments, ensuring collaboration without conflicts.

Automated linting enforces coding standards, while unit tests generate coverage reports and results in JSON or CSV formats. Documentation is automatically generated from SAS program headers, and data lineage can be tracked by defining inputs and outputs within jobs. The process supports iterative development, with commands for executing code, managing SAS Drive folders and triggering jobs in Viya.

Although the VS Code extension is tailored for Visual Studio Code, the SASjs CLI offers core functionality for those using alternative IDEs. Community engagement and feature requests are encouraged, with options to contribute directly or collaborate with SAS Apps developers. This approach enhances code quality, reduces manual checks and aligns SAS workflows with modern software development practices, facilitating smoother integration into automated release pipelines and continuous improvement.

15:33, 29th July 2022

SAS DevOps with SASjs CLI

The SASjs Command-Line-Interface offers a range of tools for managing development and deployment processes in SAS environments, supporting tasks such as creating structured repositories, compiling services with dependencies, building deployment packages, executing deployment scripts and generating documentation from code metadata. It includes features for testing macros and jobs, managing compute contexts, synchronising files and deploying frontend applications as streaming services, along with a variety of commands to streamline workflows from initial setup through to execution and validation.

  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.