-
Git repo directly checked out in home directory
- Noisy
- Have to ignore
*
, everything is a--force
- Juggling machine variations is a pain
-
Homesick / Homeshick
How do you or should you break a monolithic repository into smaller pieces?
The question of whether separation should take place and how granular it should be is a debate that happens in very significantly large project I've been involved with to date.
If the goal is to make developers lives easier, then the split must certainly not cause more harm than good. There can't be a hard and fast rule such as "each module should have it's own repository" because the day to day impact of a project maintained by a single individual could be horrendous if the project contains hundreds of modules. On the other hand, a project with thoudsands of developers and thoudsands of modules likely will struggle equaly with such a rule.
Therefore I'm working on a initial litmus test to determine the criteria for breaking a large repository into several smaller repositories.
package org.gradle.training | |
import org.gradle.api.tasks.Input | |
import org.gradle.api.tasks.OutputDirectory | |
import org.gradle.api.tasks.TaskAction | |
import org.gradle.api.DefaultTask | |
import org.gradle.util.GFileUtils | |
import org.gradle.api.artifacts.Configuration | |
import org.gradle.api.artifacts.component.ModuleComponentIdentifier | |
import org.gradle.maven.MavenModule |
import org.apache.http.HttpException; | |
import org.apache.http.HttpHost; | |
import org.apache.http.HttpRequest; | |
import org.apache.http.conn.SchemePortResolver; | |
import org.apache.http.impl.conn.DefaultRoutePlanner; | |
import org.apache.http.protocol.HttpContext; | |
import org.slf4j.LoggerFactory; | |
/** | |
* ***[recommended]**** Use System default planner like this : |
# Changed to use content-type flag instead of header: -H 'Content-Type: application/json' | |
siege -c50 -t60S --content-type "application/json" 'http://domain.com/path/to/json.php POST {"ids": ["1","2","3"]}' |
set HUB to "192.168.1.216" --change for your bridge IP | |
set USER to "newdeveloper" | |
repeat | |
repeat with bulb from 1 to 2 -- Change if you have more bulbs or want to use a subset | |
set hue to (random number from 5000 to 12750) | |
set sat to (random number from 150 to 255) | |
set bri to (random number from 50 to 255) | |
set transitiontime to (random number from 1 to 3) -- Increase range for slower transitions | |
set query to "{\"sat\":" & sat & ",\"hue\":" & hue & ",\"bri\":" & bri & ",\"transitiontime\":" & transitiontime & "}" | |
set command to "curl --request PUT --data '" & query & "' http://" & HUB & "/api/" & USER & "/lights/" & bulb & "/state/ --connect-timeout 5" |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used
import org.gradle.internal.reflect.Instantiator | |
class Host { | |
String name | |
Host(String name){ | |
this.name = name | |
} | |
} |