enter_haken projects cookbook notes read about
  • time for money, money for time - August 7, 2018

    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.

    more
  • first steps with rasmus - July 31, 2018

    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.

    %3 curl curl web client router router managing http routes curl->router POST request inbound inbound add entities into the transfer table router->inbound validation transfer transfer database gatekeeper inbound->transfer insert into database socket websocket client connection socket->router backchannel counter counter Postgres notification listener transfer->counter send a receipt manager manager executes a database manager counter->manager executes the manager graph_elixir graph entity manager counter->graph_elixir load the result from transfer manager->counter gets the result graph_elixir->socket update the client

    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.

    more
  • connect the dots - July 23, 2018

    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.

    more
  • get in touch with vue - March 8, 2018

    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.

    more
  • Alternative content management system approach - February 19, 2018

    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.

    %3 cluster_0 internet cluster_1 counter cluster_2 core cluster_3 cms cluster_4 lms cluster_5 forum cluster_6 behind the counter client1 web client web web backend client1->web transfer transfer table web->transfer client2 web client client2->web client3 web client client3->web user user management transfer->user content content relations transfer->content lms lms management transfer->lms forum forum management transfer->forum role role management user->role bl database backend content->bl lms->bl forum->bl

    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.

    more
  • A database gate keeper - August 7, 2017

    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.

    %3 cluster_0 some kind of middleware cluster_1 PostgreSQL cluster_2 relational data mwnode middleware node transfer transfer table mwnode->transfer customer customer person person customer->person p2p person to phone person->p2p p2a person to address person->p2a phone phone p2p->phone address address p2a->address transfer->customer

    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.

    more
  • Generate a ERM from a PostgreSQL database schema - July 20, 2017

    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.

    %3 cluster_0 Database cluster_1 bash schema database schema awk awk processing schema->awk dot graphviz processing awk->dot

    more
  • Working with immutable data in Postgres - July 15, 2017

    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.

    more
  • Automatically update MIT licenses - July 7, 2017

    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.

    more
  • Moving ORM Mapping towards the database - July 6, 2017

    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.

    more
  • providing test data for databases - June 28, 2017

    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.

    more
  • using pandoc filters to create graphs with hakyll - February 20, 2017

    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

    more
  • get in touch with react - January 2, 2017

    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.

    more
  • six months in new job - December 27, 2016

    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.

    more
  • days left - May 11, 2016

    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.

    more
  • minimum viable product - March 25, 2016

    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.

    more
  • Repository ownership - March 20, 2016

    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.

    more
  • getting better - February 27, 2016

    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.

    more
  • Git Cleanup - February 27, 2016

    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.

    more
created by Jan Frederik Hake | atom feed | generated by Hakyll | blog source | the source code on this site is covered by a MIT license | Creative Commons Lizenzvertrag