I see a lot of posts about "getting stuck", "burning through tokens" and "going around in circles" etc. To prevent this you need to add tests and get them to pass. Aim at 60% test coverage. Otherwise when your app or program because more complicated, bringing in a new change will break an already working feature. The app does not know what to consider when making changes as it doesn't have the context from all of your previous conversations. Whereas if you add tests, they will fail and when this occurs and the app will understand the purpose of the test, and that you need to maintain that functionality. It will add a bit of time in the beginning but save you from a world of hurt later on.
Posted by gregyoung on February 16, 2010
Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.
Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).
version: "2.1" | |
networks: | |
kong-net: | |
driver: bridge | |
services: | |
####################################### | |
# Postgres: The database used by Kong |
variables: | |
GCP_PROJECT_ID: **** | |
GCLOUD_SERVICE_KEY: **** | |
NPM_TOKEN: **** | |
image: andrzj/gcloud-ci | |
cache: | |
untracked: true | |
key: "$CI_BUILD_REF_NAME" |
// Filter all URL's that have "/blogs/" in it AND don't have "em-foca". Result limited and pretty | |
db.assets.find({ | |
$and:[ | |
{ url: /\/blogs\// }, | |
{ url: {$not: /em-foca/}}, | |
] | |
}).limit(2).pretty() | |
// Filter and count all URL's that have "/blogs/" in it | |
db.assets.find({url: /^http:\/\/(.*)\/blogs\//}).count() |
$('#form').data('serialize',$('#form').serialize()); // On load save form current state | |
$(window).bind('beforeunload', function(e){ | |
if($('#form').serialize()!=$('#form').data('serialize'))return true; | |
else e=null; // i.e; if form state change show box not. | |
}); | |
// ******* | |
var initial_form_state = $('#myform').serialize(); |
$data = array("name" => "Hagrid", "age" => "36"); | |
$data_string = json_encode($data); | |
$ch = curl_init('http://api.local/rest/users'); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( | |
'Content-Type: application/json', |