Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command prompt |
Ctrl+` | python console |
Ctrl+N | new file |
function keepTrying(otherArgs, promise) { | |
promise = promise||new Promise(); | |
// try doing the important thing | |
if(success) { | |
promise.resolve(result); | |
} else { | |
setTimeout(function() { | |
keepTrying(otherArgs, promise); |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
- Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
- Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
- Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
- Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
- Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
- Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
/** | |
* ``` | |
* Does JDK8's Optional class satisfy the Monad laws? | |
* ================================================= | |
* 1. Left identity: true | |
* 2. Right identity: true | |
* 3. Associativity: true | |
* | |
* Yes, it does. | |
* ``` |
The three design patterns (Adapter, Facade and Bridge) all produce the result of a clean public API. The difference between the patterns are usually due to a subtle context shift (and in some cases, a behavioural requirement).
The primary function of an Adapter is to produce a unified interface for a number of underlying and unrelated objects.
You will notice this pattern being utilised in many applications. For example, ActiveRecord (the popular Ruby ORM; object-relational mapping) creates a unified interface as part of its API but the code underneath the interface is able to communicate with many different types of databases. Allowing the consumer of the API to not have to worry about specific database implementation details.
The principle structure of this pattern is:
#Distributed System Course List
##Systems
-
Cornell CS 614 - Advanced Course in Computer Systems - Ken Birman teaches this course. The readings cover more distributed systems research than is typical (which I am in favour of!). In fact, there's barely anything on traditional internal OS topics like filesystems or memory management. There's some worthwhile commentary at the bottom of the page.
-
Princeton COS 518 - Advanced Operating Systems - short and snappy reading list of two papers per topic, covering some interesting stuff like buffering inside the operating system, and L4.
package de.tdlabs.training.keycloak; | |
import static java.util.Arrays.asList; | |
import javax.ws.rs.core.Response; | |
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; | |
import org.keycloak.admin.client.Keycloak; | |
import org.keycloak.admin.client.KeycloakBuilder; | |
import org.keycloak.representations.idm.CredentialRepresentation; |
The git repo of the kata is here: https://github.com/sandromancuso/cleancoders_openchat/
The "starting-point"
branch is where both implementations began: https://github.com/sandromancuso/cleancoders_openchat/tree/starting-point
- The 🇬🇧
"openchat-outside-in"
branch captures the tomato by tomato history of the London approach. - The 🇺🇸
"openchat-unclebob"
branch captures the tomato by tomato history of the Chicago approach.
#Distributed System Course List
##Systems
-
Cornell CS 614 - Advanced Course in Computer Systems - Ken Birman teaches this course. The readings cover more distributed systems research than is typical (which I am in favour of!). In fact, there's barely anything on traditional internal OS topics like filesystems or memory management. There's some worthwhile commentary at the bottom of the page.
-
Princeton COS 518 - Advanced Operating Systems - short and snappy reading list of two papers per topic, covering some interesting stuff like buffering inside the operating system, and L4.