« first day (1068 days earlier)      last day (3879 days later) » 

9:00 PM
It's a tool like any other tbh. I don't like AOP for most cases, but for debugging tuff it can be really good
modifying an entire system just to see what is happening in it and such. I'd never throw business logic at it anyway
maybe assertions. maybe
 
@ircmaxell that statement doesn't need an "or"
 
So really AOP is a shim
useful either because the language is not expressive enough (allowing for monkey patching) or hard to debug...
 
yeah, I guess that's it
 
Ok, off to drinks and dinner! Later!
 
@ircmaxell Later gramps.
 
9:15 PM
@tereško is there a less bloody reference i can read before jumping to POEAA?
 
not that i know of
 
Okay I am working on a data access layer for grabbing and persisting domain objects. In trying to abide by SRP I want my the domain objects themselves to be blissfully unaware of all things persistence related. So if I wanted keep track of what portions of the object have change since creation to inform the persistence layer of how to best update the data store. How would I best do that without mucking up my domain objects?
 
it's not a book that you should expect to understand on the first read-through
 
@tereško yeah, if i read that.. the tendency is i had to google every now and then before i get it
 
@Orangepill look at concept of "unit of work"
 
9:17 PM
@teresko that's what I'm trying to implement
 
@Orangepill well .. with UoW you register changes yourself
also, usually you will want to track only the changed domain objects and not each field in DO separately
 
@Teresko So the responsibility for tracking the dirty state belongs to the domain object itself?
 
what you track is not whether the domain object is dirty, but whether you did something to it that could make it dirty
 
that's very unpractical at times... I personally just end up tracking state
 
nobody said that this is a trivial problem
 
9:23 PM
@ocramius as in diffing state from time of creation to time of persisting?
 
@Orangepill I've been working for a bit on ChangeSet
correct
 
@ocramius So would it make sense for the domain object to be responsible for keeping it's initial state as well as its current state... or should the initial state be elsewhere?
 
well , if I needed to track the state of the object itself, then I would use something like described here
but IMHO keeping track of objects state this way cause more problems
 
@Orangepill I wouldn't keep it in the domain object itself
 
basically - there is no way to reliably track the changes in large object graphs
 
9:26 PM
and additionally, you don't really need to track the entire state. You just need to track if something changed IMO
for now, I'm just using strict comparison of extracted state (to avoid problems with large graphs). I'm thinking of including custom comparators in ChangeSet
 
I think that the best option is just to use simple UoW with caller registration
you could say that I have grown out of the original idea of tracking the objects state internally
 
that's ok-ish, but I thought the point was to actually stick to SRP
ah, that's actually a use case for AOP anyway :)
@Orangepill here's some examples
 
@Ocramius why are comments used as code ?
 
@Ocramius Thank you
 
@tereško because that's annotations. And you should not need to ask me. And if you're trying to just bother me you're achieving that.
same thing can be achieved via XML, or if you're insane, via YAML, or even worse, programmatically, by modifying mappings
 
9:36 PM
as I see it, all of those have the same SRP-related problems
 
hm?
That's the documentation of a mapper. That particular mapper uses configuration to work... not sure where the SRP problem is :P
 
just because you moved the "what to do when something changed" to the comments does not change the fact that you are still calling those methods when you are altering something
only this way you are hiding the behaviour where no behavior should be hidden
 
So if every thing that is acquired from my persistence store registered it's original state with the store, and at time of persisting the object the store would then diff the object against it's registered original state and deal with it appropriately. Does that sound like a sane path?
 
but nevermind .. i don't care about ORMs, so the mess they make have no effect on me
@Orangepill only if you can afford to store that state and to go through all of the object graph to verify
 
@tereško it's configuration, it's not the actual executed code =_=
gosh, am I still explaining this trivial stuff?
 
9:49 PM
Bought some Lucky Charms from Tesco. :) Not worth the price but they are nice.
 
@teresko I think it'll be fine... I may have to give myself a means to fetch from the store read-only to sidestep the overhead that would occur though.
Well I gotta get ... good night guys and thank you both @teresko and @ocramius
 
mysql question... I need to update old_path/image with new_path/image for a table... any ideas
 
@marabutt Run an update query?
 
@marabutt UPDATE website_content_pages SET content = REPLACE(content, 'this', 'that');
 
yay! Starcraft WCS is starting wcs.battle.net/sc2/en
 
user895378
@igorw I disagree with this. The affront to readability is having array type hints all over the place. Functional style programming has a lot of benefits but readability is not one of them. In a lot of ways I still see it as a step backwards for enterprise-style projects where readability and maintainability are as important as working code.
 
user895378
(These are opinions, of course)
 
@igorw should be valuable.
Turns out they aren't a lot of the time because they got too many details wrong.
 
@marabutt actually you should mark the old entry with "not_visible" flag and add new entry
the rule-of-thumb is "never delete anything unless it is explicitly required"
 
10:21 PM
"Each certification level consists of approximately 15 modules ($500 per module)." Very affordable.
 
Looks like the same group that Sebastian Bergmann belongs to.
 
@Fabien lolwut
 
From Bum -> Senior developer in just $30,000
Though apparently you don't need to buy a module to be certified.
 
Which is more expensive than my very good college degree.
 
and i get a feeling that also a lot less useful
 
10:24 PM
In 2007 BYU was rated best value for education by Princeton review, though.
 
Should just set up your own site and make a few exams and BAM start charging people for your <insert name here> certificate in PHP.
 
"thephp.cc is a group of 3 consultants that includes Sebastian Bergmann, the author of PHPUnit and Arne Blankerts, the author of phpdox."
 
At least it is made by someone who's made a wonderful testing tool for the PHP language. Hopefully some level of testing is included in that curriculum.
 
@LeviMorrison You would certainly hope so.
 
user895378
10:31 PM
You know what they say ... "People who can do. People who can't teach."
 
user895378
I just see most "certification things" as unnecessary middle men taking money in ways that aren't commensurate with the value provided.
 
@rdlowrey I agree. At least they aren't tying the certificate to the use of the modules; they are completely optional from the look of things.
 
I dunno if I would want to work somewhere that required me to have some formal education or certificate in programming.
Mainly because I have neither.
 
s/would want to/could ;)
 
heh. That too.
A cert is a cert though. Demonstrating your ability or showcasing it has to be more valuable no? I don't know. It's an easier view point for myself but it's not like I am in a position to actually judge.
 
10:39 PM
I have no certs and nobody here asks for certs in job interviews
 
user895378
11:54 PM
@igorw Expounding on what I mentioned earlier -- basically I'm 100% in favor of immutability wherever possible and eliminating side effects. But I think there's a useful middle ground (in PHP anyway) where you can apply those concepts in combination with the advantages of typehinting for readability. That's what I was trying to express.
 

« first day (1068 days earlier)      last day (3879 days later) »