Month: June 2024

Separation of Church and State

As I see states enacting laws to require religious education in public schools, I think of the history of trying to incorporate Christian philosophy in law. I’ve always wondered *which* Christian. The real answer, I expect, is everyone assumes it is their own. Good for garnering votes, but that’s going to make implementation dicey.

Obviously some sort of Reformationist Christianity (sorry Catholics!). But there’s a big difference between Lutheran, Southern Baptist, Mormon, Presebeterian, Mennonite, etc. And, yeah, they locked up the courts so what the Constitution says and what the authors meant probably don’t matter … But I like to throw Deist in there as a knod to the founding fathers.

My gut is it ends up being “left up to the states” generally. So Arkansas can be Southern Baptist, Maybe Catholics get Rhode Island (only like 40% of the population, but the next highest is Pentecostal at like 6%). In states like Ohio, religions are going to have to band together to get a majority — it’ll be like a coalition government in the UK. If we’re lucky, “I don’t want to live in a theocracy” will win a state or three.

We are either stuck with whatever religious edicts align with our region or we move. And the feds are just in charge of saying it’s not a violation of the Constitution when women wearing slacks gets banned in some state. For reasons. Really good, substantiated by history and text, reasons.

 

https://apnews.com/article/louisiana-ten-commandments-displayed-classrooms-571a2447906f7bbd5a166d53db005a62

JPA/Hibernate Naming Strategies

One of the challenges of inheriting support of systems and code is reverse engineering what exactly you’ve got. In this case, I have Java code that reads from a Postgresql table named calculation_config & populates the information into a Redis cache. Except I could not find any text containing the string calculation_config. Started to wonder if grep was getting thrown off by line splits (although splitting a line in the middle of a table name is asking for future confusion), so was searching for sub-strings.

Which got me to the code that performs the operation — but the table is absolutely named calculationConfig in the code. ?????

package com.example.applicationmodel;
import lombok.Data;

import jakarta.persistence.*;

@Entity // This tells Hibernate to make a table out of this class
@Data // Lombok: adds getters and setters
@Table(name = "calculationConfig", schema = "components")
public class CalculationInfo {
    @Id
    private int functionId;
    private String dataCollectionGroup;
    private String component;
    private String metricInputs;
    private String metricName;
    private String functionDef;
    private String resourceType;
    private String metricDatatype;
    private String deviceModel;
    private String collectionSystem;
    private int status;
}

And today, I’ve learned about “naming strategies”. A mechanism used by the Hibernate ORM (Object-Relational Mapping) framework to map entities within Java code to table and column names. Other than obfuscation, why are we applying middleware principals to code?? Ostensibly because database naming “best practices” and code naming “best practices” vary. As an aside, I was taught the best naming best practice was one someone was likely to figure out with minimal confusion or research. Explicitly indicating the naming strategy might fit that requirement — ohh, here’s some strange name mapping thing in my code. Let me see what that means.

By default, Hibernate uses ImplicitNamingStrategy and PhysicalNamingStrategy to map Java names to database names. The default PhysicalNamingStrategyStandardImpl converts camelCase to snake_case.

So, for future reference … when I find table_name or field_name in my database, I should be grepping for tableName and fieldName in the code. That is … not super obvious.

Black Raspberry Coulis

To go with our smoked lamb, I made a coulis with maple syrup and black raspberries Anya picked and froze last year. Easy recipe — a pint of black raspberries (thawed) and about 1/3 cup of maple syrup (this would be a “to taste” kind of thing!). Boil for about ten minutes to break down the berries a bit, run it all through a blender, then use fine mesh cloth to strain out the seeds. It will set up as a jam once it cools, but it’s a nice sauce to drizzle over food whilst it is still hot.

Brisket

We smoked a brisket and lamb shoulder this weekend — basic salt & pepper rub, smoked with fruit wood, then brought inside to finish cooking. We’re going to order some butcher paper to see what that’s like because wrapping it always gets the bark soggy!

Hazelnuts – 2024

The hazelnuts are just starting to form — it looks like we’ve got nuts developing on the newer plants on the north side too. As far as propagating plants, I’ve pretty well established that dropping a woody cutting in willow water doesn’t work. Dropping a green cutting in water doesn’t work. Next, I’m going to try a green cutting in soil and air layering. I’ve found a few places online that say air layering worked … even if it looks a little odd having bundles of soil wrapped around the branches of your shrubbery.