This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PrintDiamond { | |
public static void main(String[] args) { | |
char letter = args[0].toUpperCase().charAt(0); | |
int letterAsNumber = ((int)letter - (int)'A') + 1; | |
int gridSize = (letterAsNumber * 2) - 1; | |
int numberOfSpacesAtEdge = (gridSize - 1) / 2; | |
int numberOfSpacesInMiddle = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simon lives in Jersey (the largest of the Channel Islands) and works as an independent consultant, helping teams to build better software. His client list spans over 20 countries and includes organisations ranging from small technology startups through to global household names. Simon is an <a href="http://www.codingthearchitecture.com/2013/05/17/saturn_2013.html" target="_blank">award-winning speaker</a> and the author of <a href="http://leanpub.com/software-architecture-for-developers" target="_blank">Software Architecture for Developers</a> - a developer-friendly guide to software architecture, technical leadership and the balance with agility. He still codes too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people" : [ { | |
"id" : 3, | |
"name" : "Authenticated User", | |
"description" : "A user or business who's content is aggregated into the website.", | |
"location" : "Internal", | |
"relationships" : [ { | |
"sourceId" : 3, | |
"destinationId" : 8, | |
"description" : "Manage user profile and tribe membership." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model model = new Model(); | |
SoftwareSystem techTribes = model.addSoftwareSystem(Location.Internal, "techtribes.je", "techtribes.je is the only way to keep up to date with the IT, tech and digital sector in Jersey and Guernsey, Channel Islands"); | |
Person anonymousUser = model.addPerson(Location.External, "Anonymous User", "Anybody on the web."); | |
Person aggregatedUser = model.addPerson(Location.External, "Aggregated User", "A user or business with content that is aggregated into the website."); | |
Person adminUser = model.addPerson(Location.External, "Administration User", "A system administration user."); | |
anonymousUser.uses(techTribes, "View people, tribes (businesses, communities and interest groups), content, events, jobs, etc from the local tech, digital and IT sector."); | |
aggregatedUser.uses(techTribes, "Manage user profile and tribe membership."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package je.techtribes.component.tweet; | |
import com.structurizr.annotation.Component; | |
... | |
@Component(description = "Provides access to tweets.") | |
public interface TweetComponent { | |
/** | |
* Gets the most recent tweets by page number. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model model = ... | |
SoftwareSystem techTribes = model.getSoftwareSystemWithName("techtribes.je"); | |
Container contentUpdater = techTribes.getContainerWithName("Content Updater"); | |
// context view | |
ContextView contextView = model.createContextView(techTribes); | |
contextView.addAllSoftwareSystems(); | |
contextView.addAllPeople(); | |
// container view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people" : [ { | |
"id" : 3, | |
"name" : "Aggregated User", | |
"description" : "A user or business with content that is aggregated into the website.", | |
"location" : "External", | |
"relationships" : [ { | |
"sourceId" : 3, | |
"destinationId" : 1, | |
"description" : "Manage user profile and tribe membership." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.structurizr.example; | |
import com.fasterxml.jackson.databind.DeserializationFeature; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.SerializationFeature; | |
import com.structurizr.model.Location; | |
import com.structurizr.model.Model; | |
import com.structurizr.model.Person; | |
import com.structurizr.model.SoftwareSystem; | |
import com.structurizr.view.ContextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people" : [ { | |
"id" : 2, | |
"name" : "User", | |
"description" : "", | |
"location" : "External", | |
"relationships" : [ { | |
"sourceId" : 2, | |
"destinationId" : 1, | |
"description" : "Uses" |
OlderNewer