Magic is now secured for 1.000.000 years

I just read about the requirements for having your GitHub repository participate in the Arctic Doomsday vault, which is created in Svalbard to last for a million years (or something) – And golly gosh, it seems also future Homo Sapiens, if still around 1.000.000 years from now, can benefit from Magic.

Of course, Magic is not the only repository to make it into the vault – But it’s kind of interesting that it’s amongst those who made it I must confess 🙂

Cyprus is still in the EU

Today Britain gets their independence. 60+ years later than Cyprus, but OK, let’s leave the gory details out of this, shall we? Hence, I’d like to congratulate Britain on this accomplishment, and at the same time inform business leaders, CEOs, and investors in Little Britain that Cyprus is still in the EU

… just sayin’ … 😉

Hence, in addition to having the lowest corporate taxes in Europe, a fairly recognizable culture, 95% of the island speaking fluently English, high level of education, where a large portion of the islanders literally studied in London – We (Cyprus) are now closer to Europe than Britain. So if you’re a business owner in England looking for ways to (re) establish yourselves inside of EU – Welcome to Cyprus my friend.

We could surely need the jobs 🙂

Benefits …

  • Literally zero percent corporate tax
  • About half the salary expectations
  • 95% of the islanders speaks fluently English, and the culture is very close
  • An amazing people (I’m a native Norwegian myself, and they’ve taken me to their hearts as if I was one of their own)
  • Oh yeah, almost forgot … STILL a member of the European Union 😀

But congratulations Great Britain with having finally gained your independence …!! 😀

Emotional debt

Debt is normally a bad word, but when it comes to emotions, things are different. If I tell others that you’re brilliant, you will be emotionally indebted towards me, which makes sure you will try to convince others about that I am brilliant, and very often right in my assessments of other people – Simply since one of my assessments is that you’re brilliant. Very easy to understand.

This morning I woke up to another PM from Blake, where he wanted my opinion about something – And hence as a result, I created another outbound link towards DZone here on my blog, for no other reasons than that I felt I had to, because Blake is so focused on me succeeding, that I feel I have to make sure he succeeds. Notice, before Blake started working as the community manager at DZone, this blog contained maybe one or two outbound links towards DZone. In the few months Blake has worked for DZone, I’ve create 5-6 outbound links towards DZone – Just sayin’ …

Other similar ideas down this same alley are often referred to as pay it forward, community driven, etc. Basically, the idea is that if you want to succeed, you have to make sure others succeeds first, and that you somehow is the facilitator for their success, and that their success depends upon your success. It doesn’t always take a rocket scientist to build a rocket. Sometimes all you need is common sense 🙂

Database administration tools

Sometimes you invent things, and you’re not entirely sure what it is in the beginning. Maybe you feel it’s really brilliant, but you cannot clearly see all of its use cases initially. And the more brilliant and innovative whatever you invent is, the more this tends to happen. Magic is like that to me.

One thing that has dawned upon me lately though, is that Magic is a really good second level support tool, for editing records in your databases. Often we have problems originating from data in our apps, and we want to browse through our data, without having to write weird SQL. Maybe we even want to update a record, and we’re not sure if your SQL will update one record, or 20 million records. Or maybe we want to delete a record (sigh!), and we’re reading our SQL 15 times, having two other developers reading it too, making sure we don’t empty our database table in production as a consequence of a typo in our SQL. There is a reason why most developers have only read access to the production database – If even that …

For such scenarios Magic is really, really good. For instance, at my day job, we keep localised words and phrases in our database. Then we send its English version to some foreign person, who’s not a software developer. He edits the translations records using Excel, and later we import his translations as CSV files into our database. Highly manual type of work, very tedious, and very sub-optimal.

With Magic, we can simply allow our translator to access the production database directly, through some kind of Magic app, giving him or her only access to our translation tables, and he can edit it directly using his browser. Without fearing he’ll mess up things, or forcing him to learn SQL may I add.

Can you find other use cases for the thing …?


According to Blake, DZone’s community manager, DZone will publish one of my most exciting articles ever later today. The reasons why I am excited about it, is because it’s the first time I get an article published about the frontend scaffolding machinery in Magic. Originally though, I wrote the article slightly different, trying to emphasize a philosophical point, which got lost during the review and editing process. Don’t get me wrong, I don’t mind having DZone editors proofread and edit my content, and I do understand how they might have felt that my “punchline” was a little bit out of context – However, I think it was kind of important myself, so I’ll try to write up the same ideas here – And the idea was to show how the really smart people will use the best tools available, to avoid manual labor, simply because they have no ego. As I explain my point, I will also hopefully give you a tool to separate the Einsteins from the Elvis.

Imagine asking Einstein what the square root of 1.2675467 is. How do you think he would have answered that question if he was alive today? My assumption is that he would have fetched his iPhone, pulled up its calculator, punched the numbers, and clicked the “square” button. Then imagine asking Elvis the same question. Elvis would have asked you for a pen and paper, and probably spent 20 minutes calculating the square root by hand, simply for no other reasons than to prove that he could. The reasons for this difference, is because Einstein doesn’t need to prove anything – While Elvis needs to take care of his reputation, to make sure everybody understands he’s “very good at his job”. Einstein doesn’t need to show you he is good, you already know he’s good.

If you don’t understand what I mean by “Elvis” and “Einstein” as analogies here, please read this Quora answer, which actually is my most popular answer ever at Quora.

A brilliant developer will hence always use the best tool available, to avoid doing manual labor – While a less than brilliant developer will do anything he can to avoid using tools, to show the world that he can do it himself, by hand, without needing tools. This becomes the equivalent of “software development ego”, to speak in Buddhist terms, and results in much suffering for Elvis. This also makes Einstein 1.000.000 times as productive as Elvis – Because calculating square roots of anything by hand, is simply not very smart, and steals precious time from your more important tasks, preventing you from being optimal in your approach to your job. Your calculator can simply calculate the answer to your square roots 1.000.000 times faster than you can do it using pen and paper.

I finished of my original article with a funny conclusion, which kind of was that I shimmered a job interview question in the above realization, which was as follows: Ask the interview candidate about the square root of some 16 digits number. If he pulls up his phone to calculate it using his calculator, the candidate has passed. If he asks for pen and paper to do it manually, he’s failed. Notice, I don’t literally mean that you should use trickery job interview questions such as this, but I think you get my point if you look through the humorous parts of this conclusion.

Now we know why Einstein gets to show everybody his tongue … 😉


When you have as much coding experience as I do, you kind of have a moral obligation to teach – It simply comes with experience, and is something probably most “super senior software developers” can resonate with. Having coded since computers had two digits kilobytes of RAM, obviously implies decades of experience – And since I know I won’t live forever, I feel a moral obligation to teach the things I’ve taught myself over the years to those coming after me.

Hence, I have written articles about what I know for dozens of different magazine, probably the most famous being MSDN Magazine, where I broke a couple of records too may I add on a couple of my articles, in regards to numbers of readers and page views.

Anyways, my current publisher of choice is DZone. Simply because they care about my opinion, they listen to me, and if I have change suggestions for them, they will often implement my suggestions in weeks to please me and other writers at their site. In addition, the monthly meet-ups with the rest of their core team, have become something I very much look forward to, since they’re often able to gather some of the most interesting tech writers in our industry into these meetings, making every meeting become a party for my tech hungry mind.

If you have dozens of years of experience, you too have an obligation – And that obligation is to make sure whatever you’ve taught yourself over the years, lives beyond the number of years your body happens to walk this earth. Hence, teach! Because you have an obligation to humanity to make sure whatever knowledge you’ve accumulated, “rubs off” to the next generation, and does not follow you to the “other side” as you leave us.

In a way, if you think about it, realising that some parts of you will live on, even after your mortal body dies – Is also quite comforting too may I add 🙂

Eliminating process boundaries

I know a Buddhist joke, it goes like this: “The Dalai Lama walks into a pizza restaurant. The waitress asks him what he wants, His Holiness answers ‘One with everything'”.

When Gautama Siddhartha became the Buddha, his first realization was that he had always been “one with everything.” This was according to his own accounts, one of his most important realizations, implying he had always been the Buddha, and so had everybody else too. Similar constructs exists in software development. Software developers tends to believe in systems of perfect information. Two examples of such systems of perfect information are chess and Tic-Tac-Toe. However, no such systems exists, even though we tend to believe they do. A perfect example of this is the following screenshot I took this morning, which came about due to that the cleaning lady had cleaned my desk during the weekend, and probably jacked out one of my cables to one of my monitors.

Active Events, or Super Signals as I refer to them today, is simply the realization of that my computer is already “one with everything”, due to that it allows me to create systems, where I no longer care about whether or not my functions are executed in-process or out of process. Hence, I simply treat my in-process functions as if they were out of process invocations, allowing me to polymorphistically change my implementations, as if I had the whole World Wide Web at my disposal. And no, this is not science fiction – It’s at your disposal today. And I’d argue it’s pretty useful too 🙂

Pleasing 1 customer

The nature of software is that it can be copied. Implying once you’ve created the initial version of your software, and somebody is willing to pay you to gain access it, you arguably have a license to print money. This results in that as you start marketing your software product, it becomes imperative to please your first customer. Because that first customer will provide you with valuable feedback, that will allow you to significantly improve the quality of your software – Resulting in that it becomes easier to sell to the 2nd customer, the 3rd customer, and so on. In addition, your first customer, will also hopefully give you valuable quotes, that you can use in your future marketing process, making it easier for others to believe in whatever product it is you’re trying to sell.

The first customer you have as you start out your software company, hence becomes validation of that you’ve done something right – In addition to that he’ll lead you into an even better path for your future efforts, and such improve your product, while also proving that your product has the right to live.

Take very good care of your first customer. Because if you can please him, you can please the world – And if the world is pleased, the world will take care of you!


To feel appreciated is a fundamental human need. Science have shown that unless babies are given physical care and love, they will grow up to become cognitively disabled – And regardless of how much we tend to believe we are rational and thinking human beings, a simple touch or gesture, telling somebody you’re happy they’re there, will create a spiral of positive consequences for the receiving party.

Yesterday I attended a DZone Core meet up with a lot of really interesting people. I felt that others appreciated I was attending, and I would therefor want to reciprocate the feeling. We had a long and fruitful discussion about subjects close to our hearts, and Blake later wrote about his ideas of building online communities at Medium.

However, I think the most important thing in Blake’s article, was that he took the time to listen to us, ask us all for a quote, and wrote down what we all said we felt was important. If you’re the CEO of DZone and reading this article of mine here, then whatever you’re paying Blake is not enough – He practically singlehandedly made DZone pass the Turing test as far as I’m concerned! 😉

Blake’s article about building online communities should be mandatory reading for anybody doing any type of networking, and/or trying to build an online community! Besides, it also quotes all participants of the meeting, in addition to some not participating. #MustRead!

Gene Kim spoke about his latest book, The Unicorn Project, and it was very interesting to hear his thoughts about DevOps. In case you don’t know Gene from before, he’s a Washington Post best selling author of software development books, and sold half a million copies of his first book about DevOps called the Phoenix Project. I must confess I haven’t read any of his books, but after meeting him yesterday, both of his books are definitely on my list of #MustReadBooks for 2020. If there’s anything like a Stephen King of software development, Gene is probably it. Highly interesting ideas, and more importantly, a down to earth and really nice guy, with little or no ego, willing to listen to even the smallest amongst us, even though he’s obviously massively successful from before. A unique quality in a unique person.

Ray Elenteny and myself had a lengthy discussion about dynamic versus static programming languages, and I jokingly proclaimed that we were about to solve a 50 year old software development dispute as our discussion progressed. Ray is an amazingly skilled software architect, and he have written a lot of articles about Docker and Kubernetes at DZone. For those curious about what we concluded with, it was basically that it takes an extremely skilled software developer to use dynamic languages, and that although Miles Davis probably would have used Lisp, you should probably start out with something easier (static) in the beginning – To avoid spending the rest of your professional life, maintaining the bugs you created as you started out 😉

Here’s one of Ray’s articles about planning and designing Docker Images, if you’re curious about him. Even though I know little or nothing about Docker, after hearing Ray speak about architecture and software development yesterday, I can pretty much guarantee you the guy knows what he’s talking about.

After me and Ray concluded with that Miles Davis would have used Lisp, Dheeraj Gupta made us all come back to earth, by informing us about the importance of monetisation. Dheeraj is an Indian Java software developer whom I am sure we will hear more great things from in the future. Dheeraj writes about Big Data, Hadoop and other interesting things over at DZone. Some of his articles have 50.000+ page views, so I must only assume he knows what he’s talking about – Even though I’m not a Java guy myself. Because even though flying high is important to see the big picture, in the end, monetisation is what makes us able to fly high I guess. #KeepingItReal would be my assessment of Dheeraj!

To end out where I started, and live as I preach, I want to finish with the following.

  • Yi-Kai Chen
  • Rei Vilo
  • Dheeraj Gupta
  • Rahul Rai
  • Davide Guida
  • Radivoje Ostojic
  • Unni Mana
  • Gene Kim
  • Ray Elenteny

Thank you all for a nice meet up yesterday. I appreciated it!

Angular Material Select and database lookup tables (referential integrity)

This article is an addition to the video below, and it demonstrates how to use “lookup tables” from your database, and combine these with Angular Material Select widgets. The specific table I am wrapping, is the “account_types” table from the “magic_crm” MySQL database, but the idea is similar for all lookup tables. You might have to use a different [value] for your “mat-option” elements, if the primary key in your lookup table is not the same as the display column.

Above is how our final result will look like. Notice the Material Select dropdown parts.

In the following video, I am walking you through all the required steps to create the above result.

Walkthrough of how to use Material Select to ensure and simplify database referential integrity

The HTML code I created for the above video was as follows. Notice, this code should replace your existing “mat-form-field” wrapping your input data-bound towards “data.entity.account_type” in your “accounts-edit-modal.html” file. Delete that entire mat-form-field, and paste in the following code as its replacement.

      placeholder="Account type"
        *ngFor="let el of accountTypes"

Replace the existing “account_type” input widget with the code from above. Then import OnInit with the following import declaration in your “accounts-edit-modal.ts” file. Basically, just add “OnInit” into your list of imports from “@angular/core”.

import { Component, Inject, OnInit } from '@angular/core';

Make sure you implement OnInit on your component. This interface ensures Angular invokes your “ngOnInit” method as the component is initially loaded by Angular.

export class AccountsEditModalComponent implements OnInit {

Add a field in your class to hold your “account_types”. This becomes our “data source” for our Angular Material Select widget.

private accountTypes: any[] = [];

And implement the ngOnInit method in your TypeScript file. This method retrieves all “account_types” from your backend, and assigns them to the field we created in the above code. The rest will be automagically wrapped up by Angular and Magic in combination.

  ngOnInit() {
    this.service.account_typesGet({}).subscribe(res => {
      this.accountTypes = res;

If you’re still confused, please watch the video above where I demonstrate the process in 10 minutes.

Notice, I want to emphasise that this is useful for database tables with maybe 5-50 items, and it is *not* for tables having hundreds or thousands of records!