Author: Lisa
Canadian Wildfire Sunset in Ohio
Tractor and Sunset
NEO4J: Searching
Returning data from NEO4J is matching — we can match a node using MATCH p=(a:TOMATO {name: 'Black Krim'}) return p;
where the object “p” becomes a set of nodes labeled with ‘TOMATO’ where the value of ‘name’ is ‘Black Krim’
More advanced matches set the return object to a set of nodes and relationships — here we set p to the set of items starting at the node labeled TOMATO with name ‘PLANT0’ with relationships and nodes until you get to a node labeled TOMATO with name ‘Tomato0000007’
MATCH p=(a:TOMATO {name: 'PLANT0'})-[*]->(b:TOMATO {name: 'Tomato0000007'}) RETURN p
Got ’em
We finally saw the new kittens, well kitten, on the back patio. Anya put a trap out, and the curious little one walked right in. She put another trap out, and we caught the mommy cat too! We’ll get her into the vet shortly, and the barn cats won’t sprout more kittens. We decided his birthday is April 25, 2023.
NEO4J: Relational Databases
I always found it odd that relational databases didn’t really have relationships as part of the stored data. Technically, they could if you had a view or stored procedure with a bunch of JOIN’s in there. But relational databases stored data about which you could build relationships. And people using the data may not even know about relationships that other people saw within that data. Some of our databases at work have amazing documentation — a hundred meg of PDF files detailing the relationships that the database creator wanted people to use. Other databases? No such luck!
To me, that’s the big advantage of a Graph database — the relationships are stored within the data, so anyone viewing it for the first time doesn’t need to poke around, see where values could be correlated across tables, and create their own JOIN statements to build out the relationship. Recording data in the database means defining those relationships. It would still be good to document a graph model (we have ‘people’ nodes who ‘act in’, ‘cast’, ‘produce’, or ‘direct’ ‘movie’ nodes), but you could figure all of those things out by perusing the database content.
Creamy Tomato Sauce for Pasta
I needed a quick meal last night — so I made a carrot-y, creamy tomato sauce for pasta.
Ingredients
- 1/4 cup olive oil
- 2 carrots, diced into small pieces
- 1/2 large onion, diced into small pieces
- 3-4 cloves of garlic, diced
- 3 oz tomato paste
- 1/3 cup plain Greek yogurt
- salt, pepper, Italian herbs
Method
- Heat olive oil in a pan. Add diced carrots and cook for a few minutes. Add garlic and onions and cook for a few more minutes until the onions become translucent.
- Add salt, pepper, and herbs. Then add tomato paste and stir to incorporate oil. Cook for a few minutes.
- Add pasta cooking water to thin to a reasonable consistency.
- Remove from heat and stir in yogurt. Add salt/pepper/herbs to taste.
NEO4J: Applications
I remember a friend of mine who taught introductory computer programming classes in University. One test question he always used was essentially ‘do something that people can do easily’. The exact details would change year to year, but the important thing is that the instructions simply stated “Sort the following list in alphabetical order”. Not write a program that sorts an arbitrary list into alphabetical order — sort this list. And, sure, you could write a program to do it. A program that would successfully accomplish the goal got an A grade. But so did someone who just took the list, sorted it alphabetically in their head, and wrote the list in alphabetical order. That answer? Would get extra credit. Because knowing when not to program is really important too. From a business standpoint, it’s a waste of money for someone to write a program to perform some easy one-off task that is never going to be done again.
I think about that a lot when I see “new” technologies getting picked up. I call it the “CIO magazine” approach to technology adoption. You see some new thing, have a very basic understanding of how it works, and decide we need to use one of these. And fail to consider if your use case is reasonable or if you’re willing to do the extra work for the “new” thing. The biggest example I experience of “not reasonable” is the prevalence of Java programming. If I am selling software, cross-platform compilation is A Very Good Thing. If I can maintain a single pipeline and a single release that all of my customers can use? Score! Internally developed software, though? We requisition specific platforms. Our Linux servers are not going to be Windows servers next Tuesday. I can write code, compile it for Linux, and be fine even if it doesn’t run under Windows. Because it doesn’t need to run under Windows. The extra work — our internal support groups adopted Agile. Except no one was willing to prioritize the ticket queue — so there’s no prioritized list of work to select from. Everyone has two “issues” for their sprint — “incident support” and “admin time”. A few people might get involved in a specific project and add “dns decom” or “nextgen vpn testing”. But sprint planning is repetitive (I’ve got incident support & admin time, too!), daily standups were a joke (I did tickets yesterday & had a meeting), and techs still didn’t know what ticket was the priority that should be pulled next. Which doesn’t make Java or Agile a bad idea — it just makes them overly complicated for the situation in which they are being used.
I think of all of this when I see Graph databases being implemented — step #0 is does a graph database make sense for my data? What would that mean? It would mean that the data elements are interconnected somehow — if you’d be using a lot of JOIN queries to interact with the stored data, then a graph model might make sense. If you’re just selecting items from individual tables where values are whatever? Then a graph database is a complex way of storing and accessing that data.
Turkey Hatchlings v/s Turkeys in the Mail
The first time we bought baby poultry, we picked them up from a local(ish) hatchery. The chicks hatched overnight, were sorted in the morning, and we picked them up in the afternoon. Happy, healthy chicks. The second time, the hatchery was halfway across the country but offered overnight shipping. That’s not a cheap option, but the birds were still happy and healthy when they arrived. Then we wanted to raise turkeys.
We ordered from a well known hatchery, and the only option was “shipping”. They shipped once a week. And USPS shipping was amazingly slow. So very slow. The USPS employee at the local central depot rang us on Saturday morning to see if we could come pick the birds up because he didn’t think they would survive until they were delivered on what would probably be Tuesday. We did, but only one of the birds survived even though we spent the weekend nursing sick birds.
Last year, we tried again — ordered from another well known hatchery. I couldn’t find a hatchery that offered overnight or two-day shipping. But I was able to find one willing to let me pay a little extra to have additional food added to the shipping box. The chicks arrived, but they were still not super spry.
This year, we hatched our first turkey poults. It’s amazing how much easier it is to get them eating and drinking when you start at day zero! The little guys spent about 12 hours in the incubator drying off, then they spent another 12+ hours sleeping under the heater. Then they were hopping around, investigating everything, and being birds. After sprinkling moistened food on the floor and adding tiny bits of plants (clover and dandelion greens) to the top of the water, the little guys were eating and drinking. And, when would find food or water … all of the other poults rush over to investigate.
Greenhouse Turkeys
We have a greenhouse full of turkeys! It was turkey liberation day at the farm — all of the poults that hatched last week are now in a larger brooder in the greenhouse. They’ve got a larger “turkey toaster” (a plate heater) for the evenings, but they are running around, exploring, and happily eating green leafy things.