Skip to content

Instantly share code, notes, and snippets.

View simonbrowndotje's full-sized avatar

Simon Brown simonbrowndotje

View GitHub Profile
@simonbrowndotje
simonbrowndotje / getting-started-java.json
Created February 10, 2015 11:54
Getting started with Structurizr for Java
{
"id" : 0,
"name" : "Model name",
"description" : "This is a model of my software system.",
"model" : {
"people" : [ {
"id" : "2",
"name" : "Anonymous User",
"description" : "An anonymous user on the Internet",
"tags" : "Person",
{
"model" : {
"people" : [ {
"id" : "6",
"name" : "Administration User",
"description" : "A system administration user.",
"location" : "External",
"relationships" : [ {
"id" : "7",
"sourceId" : "6",
package com.structurizr.example.client;
import com.structurizr.Workspace;
import com.structurizr.api.StructurizrClient;
import com.structurizr.model.Location;
import com.structurizr.model.Model;
import com.structurizr.model.Person;
import com.structurizr.model.SoftwareSystem;
import com.structurizr.view.SystemContextView;
import com.structurizr.view.ViewSet;
@simonbrowndotje
simonbrowndotje / private.xml
Created October 3, 2014 18:57
My private.xml file for Karabiner - Logitech R800 remote presenter settings for Apple Keynote (this remaps the blank/show screen buttons so they don't quit the slideshow)
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>LOGITECH_R800</productname>
<productid>0xc52d</productid>
@simonbrowndotje
simonbrowndotje / failure-to-communicate.md
Last active August 29, 2015 14:05
A Markdown file from my "Software Architecture for Developers" book

We have a failure to communicate {#failure-to-communicate}

If you're working in an agile software development team at the moment, take a look around at your environment. Whether it's physical or virtual, there's likely to be a story wall or Kanban board visualising the work yet to be started, in progress and done.

Why? Put simply, visualising your software development process is a fantastic way to introduce transparency because anybody can see, at a glance, a high-level snapshot of the current progress. Couple this with techniques like value stream mapping and you can start to design some complex Kanban boards to reflect that way that your team works. As an industry, we've become pretty adept at visualising our software development process.

However, it seems we've forgotten how to visualise the actual software that we're building. I'm not just referring to post-project documentation, this also includes communication during the software development pr

@simonbrowndotje
simonbrowndotje / techtribes.json
Last active August 29, 2015 14:03
An updated architecture model for the techtribes.je website.
{
"people" : [ {
"id" : 4,
"name" : "Administration User",
"description" : "A system administration user.",
"location" : "External",
"relationships" : [ {
"sourceId" : 4,
"destinationId" : 1,
"description" : "Add people, add tribes and manage tribe membership."
@simonbrowndotje
simonbrowndotje / gist:711f3867c464d6958cb6
Last active August 29, 2015 14:03
Creating one component view per controller
private static void createComponentViewsForWebApplication(Model model) {
SoftwareSystem techTribes = model.getSoftwareSystemWithName("techtribes.je");
Container contentUpdater = techTribes.getContainerWithName("Content Updater");
Container webApplication = techTribes.getContainerWithName("Web Application");
// create one component view per Spring controller
Set<Component> controllers = webApplication.getComponents().stream().filter(c -> c.getTechnology().equals("Spring Controller")).collect(Collectors.toSet());
for (Component controller : controllers) {
ComponentView view = model.createComponentView(techTribes, webApplication);
view.setDescription(controller.getName());
@simonbrowndotje
simonbrowndotje / spellings.py
Created July 3, 2014 15:35
A short Python 3 program that I used with year 6 at St Martin's School in Jersey
import random
def removeRandomLetterFrom(word):
lengthOfWord = len(word)
randomNumber = random.randint(0, lengthOfWord-1)
letterToRemove = word[randomNumber]
newWord = ""
for letter in word:
if letter == letterToRemove:
newWord += "_"
@simonbrowndotje
simonbrowndotje / spring-petclinic.json
Last active August 29, 2015 14:03
The JSON representation of the C4 model for the Spring PetClinic application
{
"people" : [ {
"id" : 2,
"name" : "User",
"description" : "",
"location" : "External",
"relationships" : [ {
"sourceId" : 2,
"destinationId" : 1,
"description" : "Uses"
@simonbrowndotje
simonbrowndotje / SpringPetClinic.java
Last active August 29, 2015 14:03
This is a C4 representation of the Spring PetClinic sample app (https://github.com/spring-projects/spring-petclinic/).
package com.structurizr.example;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.structurizr.componentfinder.ComponentFinder;
import com.structurizr.componentfinder.SpringComponentFinderStrategy;
import com.structurizr.model.*;
import com.structurizr.view.ComponentView;
import com.structurizr.view.ContainerView;
import com.structurizr.view.ContextView;