A paper of almost 250 pages (inclusive of references) is available from OpenAI's website.
I have Seen the Config (And AI Wrote It)
I Bless Thy Debugger My Child
Saturday, 1 August 2026
OpenAI's Astra Solves More Maths Problems
Astra has solved 10 hard maths problems (published 1 August 2026) following on from its disproof of the Erdös unit distance conjecture (from combinatorial geometry) in May 2026.
Defensive Perl
Perl is less fashionable than Python these days, but it is a very flexible language which excels in text processing.
Its flexibility allows a myriad of programming styles, however, so having a set of defensive techniques helps.
Here are some top tips:
- Switch warnings on - use the minus-w command line flag - #! perl -w
- Learn and use perlpod - it looks a bit like this at the start of your file =head1 NAME myscript =cut
- Always use strict; at the start of your program (this pragma restricts expressions that are hard to debug)
- Qualify your variables with type prefixes (similar to "Hungarian" notation) e.g. my $sHeader for strings, my @aCodes for arrays, my %hCodesToDescriptors, and appropriate equivalents for common custom types
Recap on pragmas: A pragma is a module which influences some aspect of the compile time or run time behaviour of Perl, such as strict or warnings. From Perl 5.10 onward - custom pragmata are supported.
Happy Perling!
Labels:
blastfromthepast,
codingconventions,
perl,
pragma,
pragmata
How Imports Work in Python
The syntax for import is as follows (keywords in quotes):
"import" module [ "as" identifier ]
There is also a variation to use when testing proposed changes to Python:
"from " "__future__" "import" feature [ "as" identifier ]
The first thing import does is find an load the module. It then initialises the module.
Frozen Frames when Debugging Python
When running pdb, you will notice certain debugging frames as frozen. This is typically when:
- code is compiled C-extension code (e.g. importlib, asyncio, threading internals)
- the debugger cannot step in or modify them
- they are part of Python's frozen importlib bootstrap
For example, in the following:
<frozen importlib._bootstrap>
<frozen importlib._bootstrap_external>
The modules are embedded in the Python binary.
If you try ll in the Python debugger when compiled code is being processed, you will get the error: *** could not get source code.
Friday, 31 July 2026
Understanding HTTP State Management
Understanding HTTP Redirects
Introduction
One of these concepts is HTTP redirects. What are they, why do they exist, and what a "reasonable" number of redirects looks like when sending an HTTP request to a server.
What is a redirect - technically speaking?
First the technical part. HTTP redirects occur when a server responds to a client request with the reply 3XX (status code). This is coupled with a location header of the URL it wants the client to load instead.
The browser or other HTTP client (which could be a Python program, for example) then follows the redirect, issuing a new request to the URL in the location header.
Why are they needed?
Examples:
301 Permanent redirect - e.g. for site reorganization, domain migration, SEO link preservation
Also temporary redirects - e.g. for load balancing
HTTP to HTTPS redirect
Redirects can be configure in Apache .htaccess and in nginx.
Pythons requests module allows by default 30 redirects.
Labels:
apache,
http,
httpredirects,
https,
nginx,
Python,
webprogramming
PyCharm
PyCharm is an IDE for Python development from JetBrains. Copilot recommends this for large projects.
However to connect to WSL projects you need to have the JetBrains gateway installed.
Know your requirements well to understand if you really need such an overwhelming IDE.
Subscribe to:
Posts (Atom)