Posts
Speeding Up DevSecOps: Rethinking the Shift-Left Approach
Introduction In the world of modern software development, Shift-Left Security and DevSecOps have become de facto practices. The idea is simple: security should not be an afterthought but rather an integral part of the development lifecycle, starting as early as possible. While these practices strengthen security and compliance, they often introduce additional steps that can slow down the development pipeline. This raises an important question: Is there a way to speed things up without sacrificing security?
Posts
Building Immutable Infrastructure Without Containers
Immutable infrastructure is a concept that has revolutionized the way we think about deploying and maintaining systems. It ensures that once an instance of infrastructure is created, it is never modified. Instead, any changes require the creation of a new instance. This approach enhances consistency, reduces configuration drift, and simplifies rollback processes. While immutable infrastructure is often associated with Infrastructure as Code (IaC) and containers, it’s entirely possible—and sometimes necessary—to implement it with Virtual Machines (VMs) instead of containers.
Posts
Aspire, Podman in windows
REM download https://github.com/containers/podman/releases/download/v5.2.5/podman-remote-release-windows_amd64.zip REM unzip it to C:\DIM\podman-remote-release-windows_amd64 SET PODMAN_HOME=C:\DIM\podman-remote-release-windows_amd64\podman-5.2.5 set PATH=%PATH%;%PODMAN_HOME%\usr\bin podman machine init podman machine start set DOTNET_ASPIRE_CONTAINER_RUNTIME=podman Get podman desktop from https://podman.io/
Posts
Speed up postgresql container without initing everytime
A newly created postgresql container will do a following steps. They are quite time consuming in integration testing and add some unpredictable factor. If a integration testing will clean up tables and data, volumes can be used to speed up postgresql container.
pg_ctl -D /var/lib/postgresql/data -l logfile start
initdb
stop postgresql and start again
There might be one issue, do I need to maintain the same credential?
Posts
expert beginner vs Generalizing Specialists vs icicle-shaped vs t-shaped
Today I read an article Learning to learn and it mentions the concept "expert beginner" I learnt in past. I am wondering the differences among other concepts (namely generalizing Specialists, icicle-shaped vs t-shaped) in those domain, where I fall into the category, do I do the correct career choices etc.
The differences among them can be quickly generated from chatgpt, I quoted the answers here for quick references.
Aspect Expert Beginner T-Shaped Professional Generalizing Specialist Icicle-Shaped Specialist Skill Depth
Posts
Change content of a file in block or byte level
Since wrote Things learnt from recent preparation of 1T data for testing, I had figured out how to do that on the following weekends. Today I couldn’t get the steps to do so immediately. It is better to note down for my next time usage. The detailed steps is as following
Find the location in the file
Get the block contains contents to modify
Extract the block to a file and modify it
Posts
Things learnt from recent preparation of 1T data for testing
Several things learnt from recent preparation of data for testing.
Question the way when it takes too long to process data sed: remove last n lines In the past I always thought sed is the fastest way to manipulate data. Is it true for all the cases? I generated 1T testing data in ndjson format, however the last lines of those files are corrupted json data. I had to remove the last line.
Posts
Mermaid flow with subgraph control
One thing constantly bothered me since I used mermaid for flowchart, how to correctly group elements in a group. Only today I have a thought about what will happen if I put node in subgraph without links between them. Finally I got it works to correctly group elements in a group.
Another things, mermaid diagram is natively supported in asciidoctor now. This one is my first example to use it.
Posts
Clojure for real competitive edge and performance
In Beating the average, Paul Graham mentioned lisp is the secret weapon behind his startups, he also elaborated on that point. I believed deeply that after I wrote some small programmings in common lisp before I learnt reddit pilot from lisp to python. Since then I always doubt if the power of lisp is still relevant considering that java, dotnet, python and ruby ecosystems are more mature than that time.
Posts
Inconsistent templates in visual studio and dotnet cli when dotnet_cli_home set to custom location
Due to security policy, I had to set dotnet_cli_home to non-default location to run some building steps. Things went quite well until not. All my command line usages and batch scripts work, until I tried to create a project using the custom project template via Visual Studio and noticed that old deleted template was shown in "Create a new project" dialog.
I tried several options and none of them works for my case.