Posts

Surprising Truths About the Future of Databases

Image
Ever wonder what's really happening behind the scenes of your favorite apps, streaming services, or even your smart fridge? It's all about data, and the databases that manage it. We swim in an ocean of it, a veritable deluge that is only getting deeper. Consider that in 2023 alone, the amount of data created, captured, copied, and consumed globally reached 120 zettabytes. Databases are the unsung heroes, the silent MVPs making sense of this chaos. But the era of the "digital filing cabinet" is over. Databases are undergoing a massive transformation, moving from rigid, monolithic systems to incredibly flexible, intelligent, and specialized powerhouses. In this post, I explore some of the most surprising developments in this landscape—from the resurgence of SQL and the rise of "embedded" engines that live inside your apps, to the fusion of databases with AI and the Git-like ability to "branch" your data. Read on to discover why the future of database...

A Summary of Database Types

Image
During a recent conversation I started to think about the various types of databases now available. What types are there? What are they used for? In a later article I will explore developments in databases. Relational Database Management Systems (RDBMS) Relational databases model data using rows and columns organised into a series of tables. This architecture became dominant in the 1980s. The design involves splitting data into a set of normalised tables, or relations , which aims to ensure that each elementary "fact" is stored only once, thereby simplifying update operations and helping to maintain consistency. The vast majority of these databases use Structured Query Language (SQL) for querying and writing data. Compared to non-relational databases, RDBMSs typically provide strong consistency (also known as immediate consistency). Examples of Use: Relational systems dominate large-scale data processing applications. Specific implementations like PostgreSQL are often ut...

CRISPR: Genome Editing

Image
CRISPR: The Tiny Tool Changing Everything Every now and then, a scientific breakthrough comes along that feels like it’s been plucked from science fiction. For the past decade, that breakthrough has been CRISPR . At its core, CRISPR is a gene-editing tool—short for Clustered Regularly Interspaced Short Palindromic Repeats (yes, a mouthful). It started out as a defence system in bacteria, but scientists figured out how to repurpose it for editing DNA. Imagine having a pair of molecular scissors that can snip, tweak, or rewrite the genetic code. That’s CRISPR. And it’s powerful enough that its discoverers, Emmanuelle Charpentier and Jennifer Doudna , were awarded the Nobel Prize in Chemistry back in 2020. CRISPR Gene Editing: Molecular Toolkit How Does CRISPR Actually Work? Think of CRISPR as a tag-team: A guide RNA , like the GPS coordinates, tells the system where to go. The Cas9 protein , acting as scissors, makes the cut in the DNA. Once the cut is made, the cell rushes in...

Is China becoming an innovation hub?

Image
Dispelling the Myth that China Does Not Innovate The idea that China is merely a "copycat" nation, lacking originality, is increasingly outdated. While its economic rise did involve adapting foreign technologies, this narrative ignores both a long history of invention and a present-day transformation into a global innovation leader. Historically, China produced world-changing inventions such as paper-making , printing , gunpowder , and the compass —the "Four Great Inventions." These were not isolated breakthroughs but part of a sustained tradition of technological advancement. Other contributions, including the wheelbarrow , umbrella , abacus , and cast iron , highlight a culture of ingenuity that predates modern globalisation. In recent decades, China has shifted from imitation to independent innovation , driven by a deliberate, government-led strategy for technological self-reliance. The country has massively increased research and development (R&D) funding, ...

Replacing CRLF from files

Image
The following is a number of different methods you can use to strip ^M from files. This was more of an exercise than a feature I need regularly. However, there was a recent incident at work where someone had checked-in such an abomination. Some tools just don't like Windows line endings in files, i.e. CRLF, Carriage Return Line Feed . So, as an exercise, here is a collation of the numerous ways to fix these aberrations ... Note: Most editors now have a quick way of doing this. file You can see whether a file has ^M using the file command: Example Consider a file containing ^M, file reports: $ file test.txt test.txt: ASCII text, with CRLF, LF line terminators After stripping ^M, we have: $ file test-fixed.txt test-fixed.txt: ASCII text dos2unix Probably the simplest way is to use the dos2unix command. Example Show file has ^M line endings: $ dos2unix -i test.txt 3 16 0 no_bom text test.txt Now fix: $ dos2unix test.txt Proof that file has been fixed...

Magic Triangle - Solved

Image
Magic Triangles This puzzle features in  CSIRO 's  Double Helix  blog post,  A Magic Triangle Brainteaser . The  Magic Triangle  problem involves arranging integers on a triangle. Consider a triangle with a circle at each vertex and along each side: Arrange the numbers 1 to 6 in the circles so that each side sums to the same value. This specific challenge requires each side to sum to 10. Method for Triangles First, label the nodes sequentially starting from any vertex: The solution involves the following steps: Generate all permutations of numbers 1 to 6 as  a ,  b ,  c ,  d ,  e ,  f . Filter permutations to satisfy the magic shape condition: $a + b + c = c + d e = e + f + a$. Apply the final condition:  a  +  b  +  c  = 10 . Using Haskell Generate all permutations of the numbers 1 to 6: import Data.List permutations [ 1 .. 6 ] This yields  6! = 720  permutations. Filter for sides with equal sums: [ [(a,b,c), (c,d,e), (e,f,a)] | ...