Enabling Apps Downloaded to MacOS

Frequently on a mac you need to get a custom app installed. If you can use the appstore or brew it’s great. However some smaller apps are not on these platforms. The mac has great security systems to protect you from this, but the assumption that everything is malicious can prevent the happy path from being easy.

Recently I resorted to using the following:

https://osxdaily.com/2019/02/13/fix-app-damaged-cant-be-opened-trash-error-mac/

This will after a checklist lead to the following command:

xattr -cr /path/to/application.app

This removes the flag that indicates that the code has been downloaded.
Only do this if you trust the code being run (in my case it was an inhouse tool written by the company that I am contracting at).

Reducing Stress by Taking Control

A few years ago I was finding myself annoyed by the lack of documentation at work. At the time I just complained and carried on. This raised my stress level and did not help anything.

I then decided to be the change that I wanted, and started writing documentation for things that I needed. Once you have a start you can ask questions and will find that others will help expand.

This applies beyond documentation. If I find something wrong that is put down to “that violates our policy” then I ask to see the policy in writing. It’s very common for there to be talk of a policy that does not exist.

If something is wrong or annoying you try to see what can be changed, how can you help to make this happen. Sometimes this just a case of getting the right people to talk to each other.

The User Interface is not Your Domain Model

Back in 2012 in the Open Source Journal (2012 issue 4) Robert C Martin argued that the database in not the center of your application. Given that DDD is more prevent now than then I would like to make a further argument.

The main problem that some companies have in building a domain model is that they don’t understand the difference between their user interface and the model. This is a key point. For some applications these can be very similar. However for others there are processes that live beyond the UI that are not typically discussed outside of the development team. It’s this part that having a clear distinct Domain Model helps with.

Something Strange, Something Familiar

In a recent presentation I was demonstrating a new proposed architecture. Part of the demo included workflows using the architecture based upon some documentation that the customer was familiar with.

I received feedback that this was effective.

To generalise this when introducing something new to someone try to link it to something that they already know.

Simple Agent Sample

Elixir does not have global variables.
This can make certain operations difficult.

This is where an Agent helps:

{:ok, pid} = Agent.start(fn -> 42 end)
pid |> Agent.get( & &1)
pid |> Agent.update(&(&1 + 1))
pid |> Agent.get( & &1)

This wtaps some state in a Process.

Since it is only updated via messages some concurrency issues are removed,
Privacy is achieved by keeping the pid hidden.

Note that the simple update has a 5 second timeout. The update will fail if it takes too long.




Notes on C4/Plantuml

Over the last month I have been using C4 PlantUML extensively to design a system.

PlanrUML is a set of tools that can be used to generate UML diagrams. In particular I have been using the C4 Model combined with Activity diagrams.

These can be used to generate diagrams that can be included in the github project and referenced from the README,md file.

Both vscode and intellij have decent plugins that can allow for rapid previews.

You can keep multiple diagrams source in a single file which helps to keep them synchronized in version control.

Lifespan of a C level executive

In my experience C-level executives typically stay for 3 years. It will be longer for a founder, but the hired-into-the-role will want to have made an impact and be looking for the next role.

Further the newly hired C level will take between 3 to 6 months before they know the specific business enough to start to make changes.

The outgoing C level may take some of their trusted staff with them. This can cause some disruption itself.

This pace of change could explain the typical 2-3 year duration of developers at a company. The new manger will stop or alter their predecessors projects and start new ones.

Golang Utilities

I am now working through “For The Love Of Go”.
This is a more modern introduction to Go that the Go Programming Language book.

It teaches the language starting with tests.

Chapter 2 introduces gofmt which can be used to find formatting errors.
Oddly they can be fixed with go fmt