Thinking about Polymorphism
An early-career dev friend asked me the other day if I prefer object-oriented over functional programming. I thought for second and responded with “It depends on the use case” “But I think OOP is more fun to write” “Also slightly more challenging” “It helps when you’re working with data that fits into a more polymorphic way of thinking” I must admit, I’m not sure if I’ve ever asked myself this question. I do feel like he’s asked me this question before, but I probably went with “it depends on the use case.” It’s a lazy response but a correct one!
TIL: How to add custom yaml validation to my vs code workspace
Generating the JSON schema from an existing YAML file # I pasted this into jsonformatter.org’s YAML to JSON Schema conversion tool: image: # required pullPolicy: Always name: "" # required tag: "" # required tags: # required environment: "" # required team: "" # required app: "" # required ingress: # optional enabled: false hosts: [] # required if ingress.enabled = true The result was this JSON Schema structure: { "$schema": "http://json-schema.org/draft-06/schema#", "$ref": "#/definitions/Welcome7", "definitions": { "Welcome7": { "type": "object", "additionalProperties": false, "properties": { "image": { "$ref": "#/definitions/Image" }, "tags": { "$ref": "#/definitions/Tags" }, "ingress": { "$ref": "#/definitions/Ingress" } }, "required": [ "image", "ingress", "tags" ], "title": "Welcome7" }, "Image": { "type": "object", "additionalProperties": false, "properties": { "pullPolicy": { "type": "string" }, "name": { "type": "string" }, "tag": { "type": "string" } }, "required": [ "name", "pullPolicy", "tag" ], "title": "Image" }, "Ingress": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "hosts": { "type": "array", "items": {} } }, "required": [ "enabled", "hosts" ], "title": "Ingress" }, "Tags": { "type": "object", "additionalProperties": false, "properties": { "environment": { "type": "string" }, "team": { "type": "string" }, "app": { "type": "string" } }, "required": [ "app", "environment", "team" ], "title": "Tags" } } } Making the proper changes to work for my use case # I saved my generated JSON Schema to a file named schema.json
I Built a Platform: Part 2
Coming soon to a theater near you
I Built a Platform: Part 1
I decided to build a platform at Christmas # Why? Because I spent pretty much my entire Christmas bedridden, having picked up Flu A from somewhere earlier in the week. It sucked, but I decided to sleep, code, and just for funzies, build myself a delivery platform. What else was there to do??? Ideally, I wanted my platform to have these features: development, integration, and production environments containerized deployments env promotion external ingress w/ domain certs basic monitoring gitops for IaC management I decided to write about it. Reflecting on experiences like this allow you to pull out the good, the bad, and the ugly parts of the process. Maybe my documented experience can help others as they navigate their way into the platform engineering space.
My First Post
Introduction # Heyyo