--- layout: post title: Chapters 16 & 17 date: 2009-03-30 20:21:48.000000000 -06:00 type: post published: true status: publish categories: - Vlad in progress tags: [] meta: _gcid: '60' _gcuser: Vladimir Gitlevich content_type: book U_S_C_message: '' _dependencies: s:6:"a:0:{}"; _custom_background: a:5:{s:3:"url";s:0:"";s:16:"background-color";s:0:"";s:17:"background-repeat";s:6:"repeat";s:21:"background-attachment";s:6:"scroll";s:19:"background-position";s:8:"left top";} _intro_text: default _intro_custom_banner: a:1:{s:3:"url";s:0:"";} _bitly_trim: http://dddcommunity.org/?p=51 _edit_last: '3109' author: login: Vladimir Gitlevich email<EMAIL_ADDRESS>display_name: Vladimir Gitlevich first_name: Vladimir Gitlevich last_name: '' ---
Domain Driven Design Final Session
Chapter 16 + Chapter 17
February 3, 2004
Guest author: Eric Evans
Russ: p. 442, "large-scale structure can save a project?"
Eric: Yes, but the read the rest of the sentence -- "... an ill-fitting
structure can severely hamper a project." Throughout this chapter
I express skepticism about the large-scale structure, and point out how
it's less important than some of the other concepts in this book. Say
the model context issues in Chapter 14. And you desperately need to distill
out the part of the system that gives you the most value. And refactoring
toward deeper insight, those things in Part III, that's what really rewards
your use of a model. And you really need to bind the application and model
together using the techniques of Part II. ANd you need to cultivate a
ubiquitous language. So now we come to Chapter 16, and large-scale structure.
And it is less important than any of those things.
Eric: It's better to have no large-scale structure than one that doesn't
fit.
Azad: I came into a project rather late. There were clear layers in place,
and there wasn't much to be done about the large-scale structure at that
point. If you have 100 people working on it, there's not much scope for
change.
Eric: 100 people can certainly decide to stop honoring the layers, the
software structure.
Dave: But getting consensus for change is very, very, hard.
Eric: If you can't get the key people in a room, you shouldn't be doing
trying to pull off strategic design.
Scott: Is the workflow of an application, the overall business process...
is that a large-scale structure? I worked on some applications where that
became a constraint on the design.
Eric: Yes, I guess that would be. I haven't seen that, but I could believe
it as a large-scale structure. Did it help?
Scott: No, it hurt.
David: Often you need a pretty serious crisis to break out of an existing
large-scale structure.
Sam: Isn't it easier to start from some large-scale structure and refactor
the solution to better meet the needs of a business?
Eric: I do find it easier to move from one structure to another, that's
true.
Russ: Sam has an important point here. Is it always true that having
some large-scale structure is better starting point for getting to a good
structure than having none?
Eric: But clinging to a bad structure...that's not a good idea. When
I say it's easier to transform one structure to another, I don't mean
just any structure. If it was a structure that was valuable in the past.
Russ: And minimal.
Eric: And minimal. If it was based on a valuable structure, then it provides
some useful organization to base a new structure on. If something is unstructured,
or badly structured, forced into an unnatural shape, it provides you no
guidance, or worse, is misleading.
John B: If you're having large-scale structure problems, those are good
problems to have. It means your system has grown to the point where it
has a large-scale.
Scott: I had an insight when I was reading this. We were trying to layer
our applications -- architecture and infrastructure. On our web server
application, the layering was fine. The web application server. Now I
can see different ways to structure the domain layer.
Eric: Because you have a distinct domain layer, you can consider developing
a strategic design for that part of the system. And probably the web service
is a newer system than the others, it's less of a mess.
Russ: In response to Robert's question...how small a system would these
issues, large-scale structure -- at what point of smallness would it be
meaningless?
Eric: At some level this would degenerate down to a point where there
was no distinction between the domain objects and the large-scale structure.
Let's think about the XP concept of a System Metaphor. That's a large-scale
structure aimed at relatively small systems.
John B: What forces drive you toward a large-scale structure?
Eric: "Developers cannot see the forest for the trees". If
you can look at a small system, maybe look at the 10 objects of the system
and understand the whole thing, you may not need any other structure.
But with 500 objects, it helps having a structure to describe the significant
relationships of groups of objects. But if you group things wrongly, it's
worse than no structure.
Eric: Nobody seemed to complain about my discussion of the System Metaphor
as part of large-scale structure. I was expecting more criticism.
Russ: We had some heated discussions on this in an earlier draft.
Jeff: I'm not convinced that "Firewall" is a developer's metaphor.
It doesn't describe the structure and components of what goes into it.
Maybe it's a marketecture metaphor, or a network administrator's metaphor.
John B: There was a certain point in the development of firewalls at
which the metaphor hit a wall. It used to be that you'd "punch a
hole" for port 80, for port 25. Active firewalls no longer match
this metaphor of holes, in the same sense. They have to understand the
context of a network conversation to allow protocols like File Transfer
Protocol to operate.
Russ: I'm trying to learn something about System Metaphor. For the C3
project, it helped them decide how to structure and name their domain
objects and methods. Your firewall example does not exactly match up with
this usage.
John B: It's not a system metaphor in the XP sense. Maybe a system metaphor
for a system of machines on a network.
Eric: When I asked Ward Cunningham about it, this was the example that
really gave me that 'aha'. And since its development, the structure of
the security products available has been shaped by the metaphor of the
firewall.
John B: I've heard Ward use "Raincoat" as an alternate metaphor.
I like "Doorman", because it implies some understanding of context.
Scott: The fact that you can have this discussion proves the effectiveness
of the metaphor. But I don't understand the applicability to actual application
development.
John B: When someone asks me what "System Metaphor", I tell
them to forget what they've learned, point them to Eric's book and say,
"read Domain-Driven Design".
Russ: The POSA architectural structures are examples of large-scale structure?
Eric: Yes, Pipes and Filters especially.
John B: One of the things that the firewall metaphor implied was "inside"
and "outside". "Outside" was dangerous, exposed. "Inside"
was protected.
John C: So to get inside, there were Trojan horses.
John B: And since not so much has been done about (nodding to John C)
capability-based security, once something bad gets in, it has a free hand.
Eric: (Layers) I'm talking about just the domain layer, as opposed to
architectural layering. Organizing the domain layer in terms of broad
responsibilities. All of the usual layering rules apply.
Scott: I don't know if you intended this... you went from Responsibility
Layering to Knowledge Levels to Pluggable Component Framework. I'm not
sure how you would get to a Pluggable Component Framework without perhaps
putting the interfaces at the boundaries of Responsibility Layers.
Eric: I don't define a navigation between these distinct large-scale
structures.
Scott: But as I was reading your examples... say the Policy layer in
Responsibility Layering... I could see how you'd decouple that through
an interface and make that a pluggable component.
Eric: In Chapter 17, say Figure 17.3 or 17.4 p. 487, there's a picture
of combining these structures with bounded contexts, some of which might
span layers. Maybe that is relevant to some of what you're talking about.
Russ: Configuration of a pluggable component -- actually realizing an
instance of an application -- is a difficult part of the story. There
are a lot of ways to put these things together.
Eric: I wanted to give a picture of how bounded contexts might align
with development teams, with layers and components. If you were to take
it another step from this point (layers and contexts), you might make
it pluggable.
Scott: Figure 16.8, one of the things I find compelling as a developer,
is that the layers of objects would be apt to change independently. I
appreciate your name of "Responsibility Layers", making that
distinction in the summary.
Eric: I do, actually, mean to maintain all the rules of layering, of
references only in one direction. I don't want to create any confusion.
The concept of layers is simple and valuable in many contexts. Perhaps
you mean where I am talking about Knowledge Levels -- they aren't layers.
There are references in both directions in Knowledge Levels.
John B: Where did "Cargo Repository" come from and why?
Eric: It replaced a bidirectional association between Customer and Cargo,
to support the layering. For a customer to say "I have these cargoes"
is to violate the layering.
John B: And why is this a good idea?
Russ: Customers don't really need to know about cargoes, in terms of
their responsibilities.
Eric: In this case, what I'm trying to say is that when you impose a
large-scale structure, that it will affect how you make detailed design
decisions. It helps people understand the system, and causes them to make
decisions that will conform to the structure (for better or for worse).
Scott: Either having the line with the layers shown, or carrying that
drawing to the next... put a line in 16.5 . When you explain it, it's
clear, but I had to think harder when I was studying the diagrams by myself.
John B: Why is the layering between Operations and Capability important?
Eric: It's something you learn from experience as the project goes along.
If you are working on a larger system, maybe 500 objects rather than 5,
you may find a natural stratification of concepts that give you layers
which are useful for design. It can help you make sense of a system you
can't otherwise absorb at a glance.
Sam: I kept the 7 +/- 2 rule in my head in the time, as I was working
on a growing system. When I started hitting the limit, I applied some
organization, by putting in organizing principles to structure the system.
Eric: Yes, you get pressed into these things. You don't seek large-scale
structure in a 6-object model. But when you have a 600-object model, you
desperately need ways of understanding it as a whole. All the strategic
design techniques help with this problem, but the large-scale structure
directly addresses it.
Robert: Or when you have the need to distribute the system? Then large-scale
application structure can be very important.
Eric: That's a different motivation than what I describe. What I'm talking
about here is conceptual organization, being able to understand the domain
objects of the application.
Russ: How did the "Knowledge Levels" discussion come across
to people?
Sam: That turned out to be the exact pattern I was looking for. I could
relate to it, the dead-on solution for what I needed.
Eric: Who's read Analysis Patterns?
(Russ, Tracy have)
Russ: A long time ago. I recall it was more likely to be composition
rather than inheritance.
Eric: That is a mistake in the diagrams, those are intended to be object
references rather than type derivations. [An aside, urging people to report
errata here
when they find it.]
Sam: The interaction diagrams really helped make sense of it.
Eric: More trouble than I intended to put people to, to understand. This
pattern, and especially this example, was rather late to go into the book.
So not as many people looked at the diagram before it went to press.
[...]
Eric: Russ, as you said, minimalism...less is more is a good principle
to apply in large-scale structure. If you try to be too comprehensive,
it'll just be a dead, suffocating blanket over the whole project.
Russ: p. 481, for a second printing, if you could reword the first paragraph
in the refactoring section. It seems to claim that if you have a good
understanding of your domain, you could impose the structure in advance.
Eric: If you really understand it in depth, and in the context of your
system.
Russ: I was worried that a banking analyst writing a banking system would
mistakenly conclude that their deep domain knowledge would let them go
ahead and do detailed design up front.
Eric: But if you're on your fourth banking system, you could probably
get away with it. I don't think it's so important a point. The point is
really, don't do it up front! Don't do it up front! Don't do it up front!
Sam: So, someone who has written 3 systems... I beg to differ. If they
were 3 procedural systems. Or 3...
Eric: OK. I'll just repeat "Don't do it up front!"
Eric: Chapter 17 is short, but it's quite important.
Robert: You make the case for not doing these things up front. It all
makes sense. But what do you say to managers who need some predictability.
Eric: When I first encountered XP, XP's honesty was refreshing. "We
can promise you a date, but not a feature set, though we will promise
you that it will do something useful." People need to face facts,
to recognize unknowns. You make a plan, you make a prediction perhaps,
but your business plan needs to be able to deal with disappointments.
What's more, you haven't set up a process in your company that prevents
you from taking advantage of opportunities. You can't eliminate all downside
risk, but software development projects frequently use methodologies which
completely eliminate the upside potential. How's that for a business plan?
John C: Although "lucky accidents" -- features which are easy
to develop, by surprise -- sometimes raise issues with the cost to document,
train, test, and maintain.
(discussion of diagram on p. 487, related to "anticorruption layer"
in Figure 17.4).
John B: So if you have a legacy system straddling two layers, like in
17.4, is that a motivation for the anticorruption layer?
Eric: It adds to the badness [that the legacy system doesn't conform
to the large-scale system you want to apply]. It probably wouldn't be
the only motivation for the anticorruption layer.
John B: Is 17.6 an example of a HIGHLIGHTED CORE?
Eric: It's actually more a SEGREGATED CORE. I've moved the core code
into its own packages. A HIGHLIGHTED CORE might have core classes scattered
among a number of packages.
Russ: So there are BOUNDED CONTEXTS and there are RESPONSIBLITY LAYERS.
The BOUNDED CONTEXTS are areas between which you need to limit their references
and contacts, because you are speaking different languages in these different
contexts, and need to negotiate the common terms.
Eric: Yes, these are two orthogonal concepts.
Russ: I'm a little surprised you talk about tight integration within
a BOUNDED CONTEXT. What would you call a tightly cohesive group of classes
within a context?
Eric: If the clustering is really close, I'd call it a MODULE.
Russ: I really appreciate having the vocabulary for BOUNDED CONTEXT.
We did this before we had the terms, and we really had to fumble around,
we would say, "let's draw a line around this set of classes here,
and this set here."
Eric: I think BOUNDED CONTEXT is my really original contribution in this
book. It's something that I think successful teams have worked effectively
with for some time, but didn't have a word for. Probably the existing
word was "scope", but this is such an overloaded term, and it
most often is used at a much smaller scale/finer grain.
Patrick: That'll be your middle name, Eric "BOUNDED CONTEXT"
Evans.
(Six Essentials for Strategic Design Decision Making)
Russ: What will you do... what can you do if you have a team that doesn't
necessarily feel ready to be generalists, to operate in all the roles
you describe?
Eric: All of these are essentials, each of them based on observed lacks
in projects in my experience. If you are missing any of these essentials,
you can go ahead and develop and produce software, but you will not have
effective strategic design.
Scott: (describes a problem with a bi-located development group)
John Brewer: This sounds like a team problem, not really a design problem.
Eric: I agree with John basically. Strategic design does give you some
options to help deal with it. The pure design solution would be to separate
the two teams' parts of the domain, to create separate BOUNDED CONTEXTS
which are related via customer-supplier or other relationships.
Russ: Or sharply defining what's inside and outside the SHARED KERNEL.
Eric: Do you have a UBIQUITOUS LANGUAGE that everyone uses to communicate
changes during your daily phone calls? To introduce new terms if necessary?
But that requires conversations.
Scott: We capture some of that via code, some via conversation. We have
a Wiki, but it's less useful than we'd hoped.
Eric: You may wish to look at p. 37-38 on what makes a design document
useful.
Dave: We've effectively used a digital snapshot dropped as a picture
onto the project Wiki to keep design documents up to date with little
effort.
Russ: Are there cubes? Offices? Shared workspace?
Scott: Both. Mostly people work in the shared space.
John B: Maybe you should spring for two Polycom speaker phones and keep
an open phone connection throughout the day, to keep communication going..
Eric: So, for the case of technical framework development, I added one
more principle, which I wanted to emphasize: "Don't write frameworks
for dummies!"
Russ: Anything you'd like to leave us with?
Eric: from the conclusion, the section called "Looking Forward"
[short reading from page 505]. I want to point out that working in the
domain layer has significant, interesting technical challenges. There
are a hundred little tricks of the trade, and if you master them, you
can move into new areas, and you have these tools in hand, you can rapidly
learn the new area and create supple, useful models. Domain-driven development
is a specific skill that has value, and a discipline that people can learn
to be better at. And people should be selecting and hiring for it.
Russ: Then we can bring in some infrastructure geeks...
Eric: Yes, and some electricians to make sure there is good lighting
in the workspace.
Eric: The core, the heart of the system is that domain layer. People
who know how to create that stuff should be the most valuable people on
the project.
John B: I think it's the third big O-O book, after Design Patterns and
Refactoring.
Charlie: Maybe the second.
John B: Chronologically speaking.
Eric: I'm curious, I almost wanted to ask for a secret ballot... sometimes
when I go to a discussion group, I've had a chance to read the material,
sometimes I haven't. To satisfy my curiousity, perhaps if people could
write down a percentage of how much of the book they've read.
(Tracy carries Jeff's hat around collecting scraps of paper for Eric
to count and satisfy his curiosity on this point)
John B: I wanted to say some good things about p. 479, the AIDS Quilt
example. It's a large-scale structure where you're really strict about
a few things and very lax about others. It enables the whole thing to
work well.
???: But quilt pieces can be anything. I don't see any large-scale design.
Eric: Each piece has to be a precise size, it has to be edged a certain
way, and it has to be foldable. It is a minimal set of rules that makes
it possible to take all those independently created quilt pieces and fit
them together in any arrangement.
John Corbett
John Brewer
Dave Smith
Azad Bolour
Darlene Wallach
Ken Scott-Hlebek
Robert Benson
Tim Huske
Wayne Vucenic
Russ Rufer
Charlie Toland
Tracy Bialik
Carol Thistlethwaite
Jeff Miller
Patrick Manion
Walter Vannini
Sam
Scott
Kevin


| |
|
|
| = |
dyad |
word-parallel operation
on Boolean arguments for the following verbs:
= < <. <: > >. >: +. +: * *. *: ^ ~: | ! |
| <.@f |
both |
also >.@f ; avoids non-integer intermediate results on extended precision integers |
| <.@% |
dyad |
also <.@:% >.@% >.@:% ; special code on integer arguments;
see the J6.02 release notes |
| i.<./ |
monad |
also i.>./ and i:<./ and i:>./ ;
special code for integer and floating point lists;
see the J 5.04 release notes |
| + |
dyad |
also * and - ; on Windows,
assembly code for integer arguments
for the vector-vector,
vector-scalar, and scalar-vector cases |
| ^ |
dyad |
x^y works by repeated multiplication if x is real
and y is integral
|
| m&|@^ |
dyad |
avoids exponentiation for integer arguments |
| m&|@(n&^) |
monad |
avoids exponentiation for integer arguments |
| {&x^:a: |
monad |
special code for integer list x ;
see the J 5.04 release notes |
| {~^:a: |
dyad |
special code;
see the J 5.04 release notes |
| f@]^:g |
dyad |
applies f instead of x&(f@]) on each iteration;
see the J 6.01 release notes |
| | |
dyad |
special code when the left argument is a positive power of 2;
see the J 6.02 release notes |
| +/ .* |
dyad |
also +./ .* and ~:/ .*. ;
special code in general;
special code for Boolean left or right arguments and for vector right arguments;
see the J 5.04 and
J 6.01 release notes |
| -/ .* |
monad |
special code in general; special code for square matrices;
special code for arrays of 2-by-2 matrices;
see the J 4.05 release notes |
| $, |
dyad |
also ($,)"r ; also {, {., }., e., ;
avoids ravel;
see the J 4.06 release notes |
| x=.x,y |
- |
also =: ; in place;
see the J 5.03 release notes |
| ;@:(<@u;.n) |
dyad |
special code;
see the J 5.03 release notes |
| ;@:{ |
dyad |
special code;
see the J 5.03 release notes |
| [;.0 |
both |
also ] ;
special code for vector or matrix right arguments;
see the J 5.01 release notes |
| f;.1 |
both |
also f;._1 f;.2 f;._2 ;
avoids building argument cells for several verbs: < $ , # [ ] {. {:
<@}. <@}: ; also <&}. <@:}. etc.;
see the J 4.05 release notes |
| f;.1 |
both |
also f;._1 f;.2 f;._2 ;
special code for sparse Boolean left argument;
see the J 4.06 release notes |
| f;.1 |
both |
also f;._1 f;.2 f;._2 ;
special code when the result of f on each cut is
boxed and atomic;
see the J 5.03 release notes |
| f/;.1 |
both |
also f;._1 f;.2 f;._2 ;
special code for atomic verbs = < + +. * etc.;
see the J 5.03 release notes |
| f;.3 |
both |
also f;._3 ;
special code for matrix right arguments |
| ;@:(<@u;.n) |
dyad |
special code;
see the J 5.03 release notes |
| # |
dyad |
special code for Boolean left arguments |
| #: |
dyad |
special code for (0,d)#:y where d is a positive
power of 2 and y is integer;
see the J 6.02 release notes |
| #: i.@(*/) |
monad |
also (#: i.&(*/)) , etc.;
special code for non-negative integer vectors;
see the J 4.05 release notes |
| x&(128!:3) |
monad |
special code to pre-compute look-up table of CRC values for each byte |
| =/"r |
monad |
also < <: > >: +. +: * *. *: ~: ;
word-parallel operations on Boolean arguments; also special
code for insert over an axis of length 2;
see the J 5.03 release notes |
| +/ |
monad |
also * and - ; on Windows,
assembly code for integer arguments |
| ,/ |
monad |
also ,. ; ,&.> ,.&.> ; linear time;
see the J 4.05
and J 7.01 release notes |
| m b./ |
both |
special code for bitwise Boolean functions;
see the J 5.01 release notes |
| f/@, |
monad |
also f/@:, f/&, f/&:, ; avoids ravel;
see the J 4.05 release notes |
| f/@:g |
dyad |
also [: f/ g ; special code for
atomic f and g ; further optimizations for +/@:g ;
see the J 6.01 release notes |
| #/. |
dyad |
avoids building argument cells;
see the J 5.03 release notes |
| +//. |
monad |
also +. *. = ~: <. <: >. >: 17 b. 22 b. 23 b. ;
avoids building argument cells;
see the J 6.01 release notes |
| +//. |
dyad |
also +. *. <. >. = ~: n b. for various vector
right arguments; avoids building argument cells;
see the J 5.03 and
J 6.02 release notes |
| </. i.@# |
monad |
also x</.i.#x ; special code;
see the J 5.03 release notes |
| ({.,#)/. |
dyad |
also (#,{.)/. ; special code;
see the J 5.04 release notes |
| (+/%#)/. |
dyad |
avoids building argument cells;
see the J 6.02 release notes |
| +//.@(*/) |
dyad |
also ~://.@(*./) ~://.@(+./) +//.@(*./) +//.@(+./) (22 b.)//.@(17 b./) ;
avoids building argument cells;
see the J 6.01 release notes |
| /: |
both |
also \: ; special code for several data types;
special code for arguments with 5 items or less;
see the J 4.05 release notes |
| /: |
dyad |
special code when the left and right arguments are the same
boolean, literal, integer, or floating point vector;
also for /:"1 when the left and right
arguments are the same boolean, literal, integer, or floating point arrays;
also for \: ;
see the J 5.01 release notes |
| /:~ |
monad |
special code for
boolean, literal, integer, or floating point vectors;
also for /:~"1 and /:"1~ ;
also for \: ;
see the J 5.01 release notes |
| /:@/: |
monad |
also /:@:/: and /:&/: etc.; special code;
see the J 5.04 release notes |
| {/: |
dyad |
also {/:~ ; special code for scalar integer left argument and integer or floating point vector right argument;
see the J 6.03 release notes |
| #\ |
monad |
special code; see the J 7.01 release notes |
| =/\ |
monad |
also +. *. ~: ;
word-parallel operations on Boolean arguments |
| +/\ |
monad |
also * and - ; on Windows,
assembly code for integer arguments |
| +/\ |
dyad |
also <. >. +. *. = ~: m b. for atomic m e. 17 22 23 25 ;
special code for positive left arguments
and boolean, integer, or floating point right arguments;
see the J 5.03 and
J 6.02 release notes |
| [\ |
dyad |
also ] and , ;
see the J 5.01 release notes |
| 2 f/\y |
dyad |
special code;
see the J 4.06
and J 6.01 release notes |
| m b./\ |
monad |
special code for bitwise Boolean functions;
see the J 5.01 release notes |
| (+/%#)\ |
dyad |
special code for positive left arguments and integer and floating point right arguments;
see the J 5.03 release notes |
| #\. |
monad |
special code; see the J 7.01 release notes |
| u/\. |
monad |
special code |
| =/\. |
monad |
also < <: > >: +. +: *. *: ~: ;
word-parallel operations on Boolean arguments |
| +/\. |
monad |
also * and - ; on Windows,
assembly code for integer arguments |
| m b./\. |
monad |
special code for bitwise Boolean functions;
see the J 5.01 release notes |
| f/\. |
dyad |
special code for atomic associative f ;
see the J 6.02 release notes |
| { |
dyad |
special code for right arguments of several data types;
special code for integer left arguments;
special code for indexing first two axes |
| <"1@[ { ] |
dyad |
avoids <"1 if left argument is integer array |
| p{~q i.] |
monad |
also (q i.]) { p"_ and q&i.{p"_ ;
special code when p and q are literal lists;
see the J 6.02 release notes |
| {/: |
dyad |
also {/:~ ; special code for scalar integer left argument and integer or floating point vector right argument;
see the J 6.03 release notes |
| a=: c}x,y,:z |
- |
avoids catenation and lamination;
in-place if c is Boolean
and a is x or y ;
see the J 4.05 release notes |
| y=: x i}y |
- |
in-place |
| y=: y i}~ x |
- |
in-place;
see the J 6.03 release notes |
| f"r |
both |
numerous verbs have integrated rank support
| monad and dyad | | <. <: < >. >: + +. +: * *. *: - -: % ^ ~: | |. |: , ,: ! /: \: [ ] {. }. o. |
| monad only | | -. %: ^. #. ,. / \ \. {: }: @. ? A. H. j. p. p: q: r. t. x: /:@/: +/%# |
| dyad only | | = > $ # { e. i. i: $, m b. -.@-: |
For (+/%#)"r see the J 6.02 release notes.
|
| ^@o. |
monad |
special code; see the J 7.01 release notes
|
| "."0@": |
monad |
also @: or & or &: instead of @ ;
special code; see the J 6.01 release notes
|
|<EMAIL_ADDRESS>|
monad |
special code if f0 , ... , fn are atomic;
see the J 5.02 release notes |
| x&(128!:3) |
monad |
special code to pre-compute look-up table of CRC values for each byte |
| m&i. |
monad |
also m&i: -.&m e.&m ;
see the J 5.04 release notes |
| u&.(a.&i.) |
monad |
special code if u-:u"0 ;
see the J 6.02 release notes |
| m b./&.(a.&i.) |
monad |
avoids conversion to and from integers;
see the J 6.02 release notes |
| m b.&.(a.&i.) |
dyad |
avoids conversion to and from integers;
see the J 6.02 release notes |
| ? |
monad |
also ?. ; special code if argument is identically 2 |
| ?@$ |
dyad |
also ?. ; also ?@# ; also [: ? $ ; special code;
see the J 5.03 release notes |
| e.i.0: |
dyad |
see the f i.0: entry below
|
| E. |
monad |
special code for Boolean and literal vector arguments |
| E.i.1: |
dyad |
see the f i.0: entry below
|
| i. |
monad |
also i: ; special case for length-1 arguments |
| i. |
dyad |
also e. and i: ; special code for several data types;
special code for i.!.0 ;
special code for the monad i.~ or x i. x ;
special code for arguments with many identical columns;
see the J 4.05 release notes |
| f i.0: |
dyad |
special code for the following functions;
see the J 5.01,
J 5.03, and
J 5.04 release notes.
| f i. 0: | |
i.&0@:f | |
first place where not x f y |
| f i. 1: | |
i.&1@:f | |
first place where x f y |
| f i: 0: | |
i:&0@:f | |
last place where not x f y |
| f i: 1: | |
i:&1@:f | |
last place where x f y |
| [: + / f | |
+ /@:f | |
number of places where x f y |
| [: +./ f | |
+./@:f | |
x f y anywhere? |
| [: *./ f | |
*./@:f | |
x f y everywhere? |
| [: I. f | |
I. @:f | |
indices where x f y |
| Notes: |
| | | |
f is one of the verbs = ~: < <: > >: E. e. |
| | | |
Special code is available only for Boolean, integer, floating point, literal,
and symbol arguments |
| | | |
Special code is used only for atoms and lists if f is not e. |
| | | |
If f is E. , special code only
for E.i.1: +/@:E. +./@:E. I.@:E. |
|
| i.<./ |
monad |
also i.>./ and i:<./ and i:>./ ;
special code for integer and floating point lists;
see the J 5.04 release notes |
| m&i. |
monad |
also m&i: -.&m e.&m ;
see the J 5.04 release notes |
| p {~ q i. ] |
monad |
also (q i. ]) { p"_ and q&i. { p"_ ;
special code when p and q are literal lists;
see the J 6.02 release notes |
| I.@:< |
dyad |
see the f i.0: entry above
|
| +/%# |
monad |
special code for the following:
|


Vanessa Hudgens Sings ‘Breaking Free’ During Drunk Karaoke
by Erika HarwoodVanessa Hudgens has still got it. The actress dusted off her High School Musical skills for a, um, “sober” karaoke rendition of “Breaking Free.”
“Um. Here’s a really bad, aggressive, and totally sober 😂😳🙏🏻 version of breaking free,” she wrote on Instagram to accompany the video. “Yep. That happened lol it hurts my ears but also makes me laugh lol 🤷🏻♀ the “ooo yeah”. Dear lord lol 🤦🏻♀🤘🏻”
While Hudgens is embracing her Disney star past, she recently opened up about the struggles she faced in her career due to her start in High School Musical for Wonderland Magazine.
“After High School Musical, there were a lot of projects coming in that were very similar, with the same sweet, girl-next-door characters which people knew I could do, and could have been easy things to do just to work,” she said. “But we said no. We needed to move away from that, to find a part that allowed people to see me for something else. I’m really happy with the way we held out, and how we were to be able to make myself a little more diverse.”
Still, Hudgens appreciates her start as Gabriella Montez.
“People may remember me for that part for the rest of my life,” she said. “It’s special when you’re able to leave something behind that can contribute to someone’s life with positive effect. High School Musical has done that, and continues to do that, for children all over the world. The fact that I can be a part of something that hopefully inspires kids to be fearless, follow their dreams and not be afraid of going after what they’re truly passionate about… That’s an amazing thing to have as a legacy.”


Unset Implicit Arguments. Definition compose (A:Set) (g f:A -> A) (x:A) := g (f x). Definition thrice (A:Set) (f:A -> A) := compose A f (compose A f f).Build an expression, the normal form of which is 27, using only two occurrences of thrice, one occurrence of S, one occurrence of (0) and two jokers (symbol '_' ).


Hello, I am Dustin. I am a web developer and this is one of my practice projects. I built this site with SublimeText, Node.JS (server), and Bootstrap.
The idea here was to do a purely JS (vanilla) build of a simple to-do list. Started as a follow along refresher with watchandcode.com. Then once I finished the course I tried experiemnting with it and did my own thing. There is a lot more that could be done with this.
All the images were taken from unsplash.com, except of course for my picture.


There are many different 3D design softwares, with only minor differences between their core functions. Most differences only arise because the programs are developed by different companies. A few are free and open-source programs. most have license arrangements that allow free student or hobby use, with a public account.
Fusion 360
Inventor
SOLIDWORKS
OnShape
Unreal Engine
Blender
Antimony
OpenSCAD
There are some basic skills that are needed with all graphical 3D design software:
Understanding the filetypes for parts
The file type for a single part
The file type for 'assemblies' of multiple parts together
The STL file type for storing geometry only (used for 3D printing)
Drawing 2D sketches before extrusion or cutting
Sketches can be drawn on a starting plane
Sketches can be drawn on existing flat surfaces of the model
Sketches can be drawn on insterted planes, placed in/on the part by the user
Extrusion and cutting of the model, from a sketch
Extrusion adds material to the model
Cutting removes material, as the opposite of an extrusion
*All shapes on the sketch need to be 'closed' in order to cut or extrude
*Extrusions and cuts have options to move away from their originating sketch in various amounts and directions
*There are many more skills around the basic Extrusion and Cut actions
There are advanced options to edit 3D models that often vary per software
Linear Arrays to expand a grid of model properties
Circular Arrays to expand a circular pattern of model properties
Loft to extrude in a nonlinear direction
Shell to remove a side and hollow out a shape (to a specified thickness)
Bevel/ Chambfer to curve or angle the edges of a shape
*There are usually many more advanced options, but these vary with each type of software...
Dimensioned design allows you to build to specifications
The dimension tool allows you to specify sizes in sketches and extrusions
Constraints allow you to set relationships between parts of a design
3D designs can be made to relate to real-world materials and objects to the model
Parameter tables can allow dimensions to have names, such as "thickness"
Parametric design allows you to build to specifications, with an ability to scale your work
A good parametric design includes relationships between features of an object
Sketch elements will have constraints that hold their relationships
Dimensions will be related via functions in parameter table for scalability [ex: width = 5 * thickness]
Assemblies of parts may be interrelated, and designed to fit together


| Struts 2 > Resources Available to Velocity Views |
Here's the quick summary of the references available to Velocity templates that are kicked-off from WebWork:
$actionInstanceVariable
Each of your action class instance variables (for which you've written a getter method) are available in your Velocity template as $actionInstanceVariableName.
In other words, if you have an instance variable in your Action class:
public class ProcessEditTableRowAction extends ActionSupport { private String fooString;
And you have a getter method for that string (in that same ActionClass):
public String getFooString() { return fooString; }
Then in your Velocity template you can retrieve the value of that String by simply refering to:
$fooString
Note: For the most part you don't have to worry about lettercase. If your Velocity reference is $fooString (note the lowercase "f" in foo) and your getter method is called getFooString (note uppercase "F" in foo) then WebWork does the "right thing" and uses getFooString() to retrieve the value of $fooString.
But things can get weird is some circumstances. TODO: At least I think they can get weird. At one point, I remember having a problem with the lettercase of Velocity variable names and the corresponding getter methods that was being used to lookup the value. But I can't remember exactly how the problem manifested so can't provide an example. Need to do that.
TODO: I'm curious what takes care of translating the $variableName references to method calls on the Action object's getters. Where does that happen?
$req
The current HttpServletRequest created and managed by your Servlet environment (Tomcat, Resin, etc.).
$res
The current HttpServletResponse created and managed by your Servlet environment (Tomcat, Resin, etc.).
$stack
The OGNL value stack. (API Docs)
TODO: Talk about what's actually on the stack. Doesn't do a whole lot of good to know it's there without knowing what's on it.
$ognl
A reference to an OGNL tool. (API Docs)
([See OGNL Basics|
http://wiki.opensymphony.com/display/XW/Ognl])
At the time of this writing, there are no docs for that object, so if you really want to know how it works, be a Jedi and "use the source". (The CVS repository is browsable here: https://webwork.dev.java.net/source/browse/webwork/src/java)
Tip:
Jason/Patrick note that one nifty thing you can do with this tool is to call static class methods. That's rather handy since Velocity doesn't offer access to class variables or methods, but only to instantiate objects that have been placed in the Velocity Context. So you can't normally do things like Math.random().
To call a class method, from within Velocity template, using the OGNL tool, you do this:
$ognl.findValue("@com.acme.FooClass@FOO")
TODO: the original email detailing the above example used $value to refer to the OGNL tool, not $ognl. But the source indicates it's "$ognl" that's shared with the context. Which is right?
$webwork
A reference to the VelocityWebWorkUtil class. (API Docs)
At the time of this writing, the API docs for this object are effectively blank, so if you really want to know how it works, be a Jedi and "use the source". (The CVS repository is browsable here: https://webwork.dev.java.net/source/browse/webwork/src/java)
Tip:
Mathew notes that the VelocityWebWorkUtil class can instantiate other objects for you. This, too, is very handy since Velocity is normally constrained to only the objects that have been explicitely shared with it's context (and not something you have control over when using Velocity templates kicked off by WebWork).
To instantiate an object from a Velocity page (that's been kicked off by WebWork, of course) do this:
#set($object = $webwork.bean("com.foo.ClassName"))
This technique can be particularly handy for grabbing a reference to one of the VelocityTools objects. (The VelocityTools are not included with WebWork, you'll need to go grab the lib and put it in your classpath if you want to use $webwork.bean() to grab references to the tool objects.)
(Note: If you're rumaging through the source, the source-code for the $webwork.bean() method above is really in VelocityWebWorkUtil's parent class WebWorkUtil.)
$action
A reference to the action context that called this template. TODO: Not really sure what's in there or what it's good for. Should probably note that.
#tag and #bodytag#
Provides a way of using a JSP taglib from velocity.
Many, but not all taglibs can be used.
ex:
#tag( Text "name='title.edit'" )
provides a way to uses the <ww:text name="title.edit" /> tag from velocity.
Note the <ww:text /> is probably not that useful from velocity since
$action.getText('title.edit')
see UI tags#WW/UI+Tags for more information about webworks tags. Many provide equivalent velocity examples. Usage with other tags could be infered based on examples given.


THE PARAGRAPHING TAG
In normal text writing, when writitng for some time we give a space or paragraph and go to the next line, doing that in HTML still outputs all the text in one line, to create a paragraph in HTML you need the p tag. It also has an opening and closing tag.
SYNTAX
<--
-->


--Sort By New Sources--
{{article.title}}
By {{selectedSources.name}}
{{article.description}}...
2 days, 8 hours
|
2 comments
|
|


This plugin allows to classify 7 types of skin lesions as described in the publication
[The HAM10000 Dataset: A Large Collection of Multi-Source Dermatoscopic Images of Common Pigmented Skin Lesions](https://arxiv.org/abs/1803.10417)
Images are analyze with a pretrained model built with Tensorflow.js.
When loading the plugin, a default image is provided. You can also use your own images: on **computer** you can upload an image, on a **smartphone** you can
snap an image.
# Source code
This plugin is ported from: [Skin Lesion Analyzer Web App built using Tensorflow.js](https://github.com/vbookshelf/Skin-Lesion-Analyzer).
The entire process of model building and the training process is described in this Kaggle kernel:
https://www.kaggle.com/vbookshelf/skin-lesion-analyzer-tensorflow-js-web-app
{
"name": "Skin-Lesion-Analyzer",
"type": "window",
"tags": [],
"ui": "A pretrained MobileNet image classifier for images of skin lesion built with Tensorflow.js",
"version": "0.1.2",
"api_version": "0.1.2",
"description": "A pretrained MobileNet image classifier built with Tensorflow.js",
"icon": "extension",
"inputs": null,
"outputs": null,
"env": "",
"requirements": [
"https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>"https://unpkg.com/spectre.css/dist/spectre.min.css",
"https://unpkg.com/spectre.css/dist/spectre-exp.min.css",
"https://unpkg.com/spectre.css/dist/spectre-icons.min.css"
],
"dependencies": [],
"defaults": {"w": 15, "h": 20}
}


Class OutputFileStream¶
Defined in File file_stream.h
Inheritance Relationships¶
Base Type¶
public ostream
Derived Type¶
public marian::io::TemporaryFile
(Class TemporaryFile)
Defined in File file_stream.h
public ostream
public marian::io::TemporaryFile
(Class TemporaryFile)


Learning resource for cloud computing and web development.
Use this form to log in/register.
Enter your data if you have already an account:
Error: {{ error }}
Fill out your data:
Error: {{ error2 }}


servers down
It's not Stadia, Destiny is currently down for all platforms
Users are encountering an error message when attempting to play Destiny 1 or 2 on all platforms, including Stadia.
by Jason EnglandWhat you need to know
- Destiny servers are currently down affecting all platforms, including Stadia.
- Bungie has addressed the outage on Twitter saying they are investigating.
- The outage has been going on since around 8:00 AM EST.
Stadia has been the target of a lot of criticism over the past week since its release. Many reviewers have had laundry lists of complaints ranging from input lag to issues of games not running in 4K. Even users have chimed in with problems such as Stadia causing their Chromecast Ultras to overheat.
While it's easy to cast blame at Google's new cloud streaming gaming service for everything, there is one issue that popped up this morning that cannot be placed on Stadia. According to many reports online and via 9to5Google, the game Destiny is currently down.
Considering every Stadia user was given Destiny 2 as their first free game, I'm certain many are logging on today to find an error screen and immediately blaming Stadia. That would have been my first reaction as well with the new service, but it turns out this is a widespread issue affecting all platforms.
The Bungie Help Twitter account has even addressed the outage saying, "We are investigating issues affecting Destiny 1 and Destiny 2. Please standby for updates." There is also a thread from the Destiny subreddit currently racking up hundreds of complaints about the outage as well.
That's unfortunate for all the Stadia users out there looking to enjoy the service on the first Friday since it was released. Especially because the game selection is rather sparse on the service at the moment and many will be looking to play the only free game that is currently available. Hopefully, Bungie will have the servers up and running soon or at least by the time most of us get off from work today.
Get More Stadia
Google Stadia
- Google Stadia: Everything you need to know
- What network speeds do I need to play Stadia games?
- Can I play Stadia on a Chromebook?
- Will Stadia work with my existing Chromecast?
We may earn a commission for purchases using our links. Learn more.


{% extends 'base.html' %} {% load static %} {% block title %}Near-field communication - Description{% endblock %} {% block styles %} {% endblock %} {% block scripts %} {% endblock %} {% block content %}
Near-field communication (NFC) is a set of communication protocols that enable two electronic devices, one of which is usually a portable device such as a smartphone, to establish communication by bringing them within 4 cm (1.6 in) of each other.
NFC devices are used in contactless payment systems, similar to those used in credit cards and electronic ticket smartcards and allow mobile payment to replace/supplement these systems. This is sometimes referred to as NFC/CTLS (Contactless) or CTLS NFC. NFC is used for social networking, for sharing contacts, photos, videos or files. NFC-enabled devices can act as electronic identity documents and keycards. NFC offers a low-speed connection with simple setup that can be used to bootstrap more capable wireless connections.
Similar ideas in advertising and industrial applications were not generally successful commercially, outpaced by technologies such as barcodes and UHF RFID tags. NFC protocols established a generally supported standard. When one of the connected devices has Internet connectivity, the other can exchange data with online services.
NFC-enabled portable devices can be provided with application software, for example, to read electronic tags or make payments when connected to an NFC-compliant apparatus. Earlier close-range communication used technology that was proprietary to the manufacturer for applications such as stock ticket, access control and payment readers.
Like other "proximity card" technologies, NFC employs electromagnetic induction between two loop antennas when NFC-enabled devices—for example a smartphone and a printer—exchange information, operating within the globally available unlicensed radio frequency ISM band of 13.56 MHz on ISO/IEC 18000-3 air interface at rates ranging from 106 to 424 kbit/s.
Each full NFC device can work in three modes:
The Secure Element chip. This is an NFC chip that contains data such as the SEID (Secure Element Identifier) for secure transactions. This chip is commonly found in smartphones and other NFC enabled devices
NFC is rooted in radio-frequency identification technology (known as RFID) which allows compatible hardware to both supply power to and communicate with an otherwise unpowered and passive electronic tag using radio waves. This is used for identification, authentication and tracking.


FEUP Exams
Please pick your course
Semester:
1
2
Course:
Please pick your curricular units
Warning
Exams
Acronym
Day
Weekday
Start
Finish
Rooms


[gecode-users] Peak Memory
Christian Schulte
cschulte at kth.se
Tue Feb 17 09:15:32 CET 2009
Just the memory used by the Gecode search engine: the stack for search
together with all spaces (with their propagators, branching, etc) stored on
that stack.
Christian
--
Christian Schulte, www.it.kth.se/~cschulte/
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of David Przybilla
Sent: Tuesday, February 17, 2009 1:34 AM
To: users at gecode.org
Subject: [gecode-users] Peak Memory
Hello,
Im not sure about the meaning of "Peak Memory" in the statistics showed.
does it mean the memory used by the whole program or just the memory used
by spaces and propagators?
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090217/38f2caca/attachment.htm>
More information about the gecode-users
mailing list


|
AbstractComponentInvocationHandler
(100%) CglibComponentInvocationHandler (100%) CglibComponentProxy (100%) ComponentKey (91.8%) ComponentProxyFactory (100%) ComponentStrategyDecorator (100%) DefaultComponent (78.5%) DefaultContainer (78.3%) DispatchingComponentStrategy (100%) DynamicWeaverFactory (95.5%) JdkComponentInvocationHandler (100%) JdkComponentProxy (100%) LazyLoadingComponentStrategy (100%) PoolingComponentStrategy (88.2%) SingletonComponentStrategy (93.3%) ThreadLocalComponentStrategy (83.3%) |


where
(restriction)select
(projection)join
In ActiveRecord (without Arel), if :photos
is the name of the
association, use joins
In Arel, if photos
is defined as the Arel table,
photos = Photo.arel_table
users.join(photos)
users.join(photos, Arel::Nodes::OuterJoin).on(users[:id].eq(photos[:user_id]))
If the simpler version doesn't help and you want to add more SQL statements to it:
users.join(
users.join(photos, Arel::Nodes::OuterJoin)
.on(photos[:user_id].eq(users[:id]).and(photos[:published].eq(true)))
)
multiple joins
with the same table but different meanings
and/or conditions
creators = User.arel_table.alias('creators')
updaters = User.arel_table.alias('updaters')
photos = Photo.arel_table
photos_with_credits = photos
.join(photos.join(creators, Arel::Nodes::OuterJoin).on(photos[:created_by_id].eq(creators[:id])))
.join(photos.join(updaters, Arel::Nodes::OuterJoin).on(photos[:assigned_id].eq(updaters[:id])))
.project(photos[:name], photos[:created_at], creators[:name].as('creator'), updaters[:name].as('editor'))
photos_with_credits.to_sql
# => "SELECT `photos`.`name`, `photos`.`created_at`, `creators`.`name` AS creator, `updaters`.`name` AS editor FROM `photos` INNER JOIN (SELECT FROM `photos` LEFT OUTER JOIN `users` `creators` ON `photos`.`created_by_id` = `creators`.`id`) INNER JOIN (SELECT FROM `photos` LEFT OUTER JOIN `users` `updaters` ON `photos`.`updated_by_id` = `updaters`.`id`)"
# after the request is done, you can use the attributes you named
# it's as if every Photo record you got has "creator" and "editor" fields, containing creator name and editor name
photos_with_credits.map{|x|
"#{photo.name} - copyright #{photo.created_at.year} #{photo.creator}, edited by #{photo.editor}"
}.join('; ')
limit
/ offset
users.project(users[:age].sum) # .average .minimum .maximum
users.project(users[:id].count)
users.project(users[:id].count.as('user_count'))
order
Most of the clever stuff should be in scopes, e.g. the code above could become:
You can store requests in variables then add SQL segments:
all_time = photos_with_credits.count
this_month = photos_with_credits.where(photos[:created_at].gteq(Date.today.beginning_of_month))
recent_photos = photos_with_credits.where(photos[:created_at].gteq(Date.today.beginning_of_month)).limit(5)