Every project starts with an idea. I use my blog for thinking out loud. Some of the ideas ends up with an article series, others may leed to new projects.
I startet my blog on enter-haken.github.io (sources). New content will be added only here.
I recently had to write a letter to a government agency. With no office suite installed, I took a look to my installed packages and found pandoc. With pandoc you can transform documents, with a variety of input and output formats. It is the question, if I can use this package to create a letter.
Due to the covid 19 outbreak springer is launching a global program to support learning worldwilde.
Harish Narayanan build a small python project to build a static website from the springer provided excel files. The result looks interesting, because you can use the book links, without having excel installed.
When you develop software, you also have to look up things frequently. This can be a Google search, or a confluence / jira lookup, read a blog post or a news article. During your look up you connect informations.
The more information is linked, the better you can remember it. This is how our brain is working.
If you have a similar problem a few months later, you repeat your look up. Maybe you can remember some steps, but not all of them.
This is where brain and memories comes into play.
It has been a while, since I launched my blog on github. Meanwhile I have rented a baremetal server at Hetzners server auction. It took me a few months to breathe life into the server.
It has
fine for me.
I could have used my old engine, but I decided to put my blog on new feets.
I have two kids, 16 and 20 years old. My third child will see the light of the world in December this year. My oldest boy currently took a year of, went to Japan and currently lives in Australia. He ask me, what to do after graduate school. I told him, to find a job, which is currently complicated for robots to take off. My youngest girl still has three years in school, but she is also thinking about the time after graduation.
As they think about their future, I think about what kind of world I will leave for them.
Every being has a limited amount of time on this planet.
Time
is the only true currency
, we have in our lives.
As we think of currency
we often hear the sentence.
Time is money.
I think the opposite is also true.
Money is time.
Let's take a few thoughts.
Having the first parts of rasmus
in motion, I started my first tests.
There is no user management yet and the frontend is somehow static.
So the first inserts will be made via curl
.
The backchannel
isn't in place yet.
Currently you can see the result in the rasmus
log.
Let's demonstrate this workflow with an example.
A few months ago, I started a little project named rasmus.
It was my plan, to build a competitive CMS, which I can be proud of.
During the work on rasmus
, I gather a lot of different information.
I stored some of them as bookmarks.
Weeks later, I stared on my bookmarks, which I've partly stored over the years and tried to remember, why I saved these links.
Some of the links were so old, that the presented information has become obsolete.
I noticed, that the context is missing.
The question is, how to save the context? I took a step back, and started to work on a possible solution for that problem.
On some links, I could remember how I came up with it.
I found the missing links via Google and started painting a map.
As a result, I got a graph with links as nodes
and the context as edges
.
I've been recently asked to build up a little vue
example.
The task is, to show appointments from a google calendar.
I know some react
stuff, but the vue
framework and the google api was new for me.
So I start with some digging.
First things first.
The vue
example will be a client only solution.
As like create-react-app
, I use vue-cli to bootstrap my application.
In the last months, I had to manage a bigger Wordpress instance with many plugins installed. It is a kind of mess. Plugins affecting each other. Different look and feel. Different UX. Plugins which must not be plugins, solving caching issues for example. The site CMS Garden shows several approaches.
I would like to think of a CMS like an application platform, let's call it rasmus
, where there plugins can be understood as a separate application.
Accepting the challenge, I start something new.
At first, let's start small and build a scaffold for the application platform. You can imagine this like a fast food restaurant.
You put your request at the counter
and behind the counter
the magic happens.
The worker behind the counter
must not know how a burger is made, and how many fries must be in a fryer.
He sees the current orders on a screen, and put the meals together, when the separate parts are ready.
When the order is ready, the customer can be served.
After working with some entities it comes the question, how to get the data inside and outside the database. There is no need, that other parts of an application need to now, how the data is organized in relations. One possible way of hiding the inner database structure is to create a kind of transfer table.
This table is a kind of a gate keeper. Only this table should be used to communicate with he outside world. Maybe this sounds a little bit weird for a moment, but let me show you my idea.
Creating a ERM is one of the first tasks, when a database is designed. During implementation, you have to sync the model with the schema. This manual task can be very annoying. With some database knowledge and some Linux standard tools, this task can be automated.
After taking a first look at the JSON columns, let's look at a few possible applications. Imagine a simple shop system with articles, prices and purchase orders.
An article can be active
or inactive
.
CREATE TYPE article_status AS ENUM (
'active',
'inactive'
);
Every article has an article_number
.
CREATE TABLE article (
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(),
article_number VARCHAR(128) UNIQE NOT NULL DEFAULT '',
name VARCHAR(128),
description VARCHAR(2048),
status article_status NOT NULL DEFAULT 'active'
);
You can see that id
and article_number
are unique, so both could be used as a primary key.
This is not normalized in a usual way.
There are a few points, why to stick to this solution.
When you are using the MIT license for your own project, you can add copyright notices to the license. The license starts with
The MIT License (MIT)
Copyright (c) 2016 Jan Frederik Hake
Permission is hereby granted, free of charge, ...
For every year, you make changes to the source, you have to add the year to the copyright notice. Especially for projects, which are rarely updated, the license is often forgotten.
With some git and awk magic, this task can be automated.
Storing data in a relational database has it's roots in the late sixties of the past century. The core idea has survived the last decades. About 2009 the term NoSQL appeared.
As for now PostgreSQL is the most advanced relational database in the world. With version 9 you can store non atomic data in a JSON column. Document based NoSQL databases like MongoDb are storing there data in so called collections. These collections are similar to PostgreSQL JSON columns.
With PostgreSQL you are able to use the best of both worlds.
A few days ago, I did some experiments with PostgreSQL JSONB columns. A used a simple person model for my tests, containing address data for a person.
For my tests, I needed some test data. I could have generated some random strings, but I wanted to fill the database with more realistic data. I have often thought of a test data generator for commonly used data models. If you want to generate randomized addresses for a person, you need a big list of street names and city names. When it comes to geographical data like this, open street maps comes into the game.
When you want to convert one document format into an other, Pandoc is your friend. Hakyll is using it for converting Markdown into HTML. Once installed (eg. via cabal / stack) you can call pandoc from command line.
$ echo "# test" | pandoc -t native
[Header 1 ("test",[],[]) [Str "test"]]
This simple example shows the native format. A list of definitions can be found at Hackage. Every document format read is converted into this native format. It is the pandoc internal representation of the document.
$ echo "# test" | pandoc -w html
<h1 id="test">test</h1>
You can get a html output as well. A pandoc filter can be used to inject a custom behavior between reading and writing a document. This feature is needed to write filters to work with Hakyll
Last year I started a little web project for work. After probing some frameworks, I started with react. I must say, the tooling around the framework is quite sophisticated.
First of all, npm is needed for the build tool chain.
Via npm install create-react-app -g
you've got a good point to start.
It installs the tool chain, needed for creating a development environment.
This year is almost done. I got a new place for work and found a new old friend the Deutsche Bahn. My way to work consist now of cycling and going by train.
After almost four years, I am moving on towards a new job. Removing the german holydays, weekends and vacations, there are only 23 working days left.
This is not very much time, considering the work, which have to be completed before I leave. So I decided to build something simple to direct my attention to the last days.
According to User Story Mapping, 44ff there are several ways to grow a product. You can take the requirements as given and build a product peace by peace. Finally you deliver it all, or try to build working products with each iteration.
Weeks ago my colleagues and I had a discussion about code ownership. Over years ownership may skip over to other developers e.g. due to job change. For a approximation you can start with the files, checked in to repository. I will use the Angular.js repository for demonstrations.
When you think about programming, you will have writing code in mind. Although pressing you ideas into executable code is one of the finest discipline for a software engineer, but it doesn't tell the whole story.
There are some techniques and abilities, a good software developer should have from my point of view.
After working over months with several developers on one repository, a little bit "tree care" is necessary. Usually old merged branches are deleted on server, when they are not needed any more.