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
original post @ https://www.linkedin.com/feed/update/urn:li:activity:6881954451964461056?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A6881954451964461056%2C6882013851898933249%29&replyUrn=urn%3Ali%3Acomment%3A%28activity%3A6881954451964461056%2C6882320295986917376%29 | |
I think there is a lot to unpack here, and it is probably a very long blog post with very descriptive meaning to terms | |
around system/software design. For more in-depth information, see CQRS Documents by Gregg Young. Also, look | |
at Event Modeling from Adam Dymitruk. Both are exceptional. | |
However, I will try to be concise. CQRS means separating your writes from your reads. In other words, when some | |
actor (user, external system, what have you) issues a command (write side) to the system, it is only changing its state. | |
The system's internal state is critical here, and the system shouldn't leak the internal structure out (encapsulation and | |
information hiding). The Command side does not mean the system doesn't return a typical representation of t |
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 Sub DeleteRowTest() | |
Dim i As Long | |
Dim LastRow As Long | |
Dim Cols As Variant | |
Dim LookFor As String | |
Dim rng As Range | |
With Application | |
.ScreenUpdating = False |
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
-module(math_functions). | |
-export([test/0, even/1, odd/1, filter/2, split/1, split2/1]). | |
test() -> | |
true = even(10), | |
false = even(11), | |
true = odd(11), | |
false = odd(10), | |
tests_passed. |
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
require 'spec_helper' | |
feature "Credential idempotency" do | |
# He shouldn't be describing it anyway, but you | |
# could write the nice little stuff here | |
scenario "Editing authorization information of a credential increments the version" do | |
prev_version = obj.credential_version | |
obj.modify_encrypted_data # A real Domain model or moved to a page object |
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
def set_json_headers | |
request.env['HTTP_ACCEPT'] = 'application/json, text/javascript, *' | |
request.env['CONTENT_TYPE'] = 'application/json' | |
end |
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
# controller code for /foo/1 | |
before_filter do |controller| | |
controller.some_verification(params[:id]) | |
end | |
# controller code for /foo/1/bar/1 | |
before_filter do |controller| | |
controller.some_verification(params[:foo_id]) |
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
module Kernel | |
# Returns the object's singleton class. | |
def singleton_class | |
class << self | |
self | |
end | |
end unless respond_to?(:singleton_class) # exists in 1.9.2 | |
# class_eval on an object acts like singleton_class.class_eval. | |
def class_eval(*args, &block) |
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
Spork.each_run do | |
# This code will be run each time you run your specs. | |
AppName::Application.reload_routes! | |
Factory.factories.clear | |
Dir.glob("#{::Rails.root}/spec/factories/*.rb").each { |file| load "#{file}" } | |
end |
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
{\"beverage\": | |
{ | |
\"approved\":null, | |
\"created_at\":\"2011-07-11T13:24:08Z\", | |
\"description\":\"The king of beers\", | |
\"id\":1, | |
\"name\":\"Bud Light\", | |
\"producer\":\"Anheuser-Busch\", | |
\"updated_at\":\"2011-07-11T13:24:08Z\" | |
} |
NewerOlder