I dont feel like going back to work...
-
Side-effects are evil. Learn to appreciate that, and code becomes dead simple. I can code fresh code faster than trying to understand what his code is attempting to do.
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))leppie wrote:
Side-effects are evil.
I'm pretty sure I know what you mean and that we agree, but wanted to add... The problem is hidden side-effects; you do one thing but unbeknownst to you something else is changed. You can minimize this by limiting the scope of what is changed when a function is called, making the scope of state changes as narrow as possible. Think of state machines sending messages to each other in such a way that they don't care what the results are; their invariants are guarenteed regardless. One way I picture software is a collection of stateless functions (functions without side-effects). These are robust functions tested in isolation. On top of that are state machines that manage state changes and use the stateless functions for performing calculations and so forth. Each state machine having a narrow scope and being written in such a way that its invariants are always in force. At a higher level you have a collection of state machines organized to complete a task that the component or application is designed to perform. Anyway, the bottom line for me is that state changes are inevitable. It's a matter of organizing and isolating them so that the end result is robust software.
-
A good AOP design should have orthogonal business logic not affected by 'side effects'.
Brady Kelly wrote:
A good AOP design should have orthogonal business logic not affected by 'side effects'.
There's a mouthful. :) I must say, my brain sort of locks up every time I encounter the words "horizontal", "vertical", and "orthogonal". Maybe it's because I'm thinking of some innuendo rather than biz-speak. Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
Brady Kelly wrote:
A good AOP design should have orthogonal business logic not affected by 'side effects'.
There's a mouthful. :) I must say, my brain sort of locks up every time I encounter the words "horizontal", "vertical", and "orthogonal". Maybe it's because I'm thinking of some innuendo rather than biz-speak. Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
Marc Clifton wrote:
I'm thinking of some innuendo rather than biz-speak
Especially when there are several layers of horizontal side effects? ;)
You can't turn lead into gold, unless you've built yourself a nuclear plant.
-
Brady Kelly wrote:
A good AOP design should have orthogonal business logic not affected by 'side effects'.
There's a mouthful. :) I must say, my brain sort of locks up every time I encounter the words "horizontal", "vertical", and "orthogonal". Maybe it's because I'm thinking of some innuendo rather than biz-speak. Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
Try wearing orthogonal shoes? :~
-
as my 'team leader' does not why the following wrong:
a.SomeProp = a.SomeProp; // no funny side-effects, plain old property
And then he asked me not to criticize him... :wtf:
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))Nothing wrong with the statement in VB.NET. In fact it is cleaner since you don't have to use any semi-colons and only one character to note a comment... :) a.SomeProp = a.SomeProp ' no funny side-effects, plain old property
Steve Naidamast Black Falcon Software, Inc. blackfalconsoftware@ix.netcom.com
-
as my 'team leader' does not why the following wrong:
a.SomeProp = a.SomeProp; // no funny side-effects, plain old property
And then he asked me not to criticize him... :wtf:
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))1: Often Harmless way to shut up the compiler messages .. but for variables, not properties 2: If done to cause some code attached to that property to fire that isn't readily available elsewhere (or not enough time make new class or somthing) .. so be it. :) In order of importance: MUST WORK :thumbsup: NICE FORMATTING :rose: RUN FAST AS HELL :-\ "Accepted Practices" X| Innovation and Best Practices are mutually exclusive... (Good Common Sense excluded) :cool: --Jason
Know way too many languages... master of none!
-
But where's the line between useless and wrong? I mean, you start here:
a.SomeProp = a.SomeProp;
Then here...
Debug.Assert(a.SomeProp == a.SomeProp);
And somehow you end up here...
while (true)
{
if ((a.SomeProp == a.SomeProp) == true)
{
a.SomeProp = a.SomeProp;
break;
}
}
return (a.SomeProp == a.SomeProp);And then it starts to get a little weird.
Proud to have finally moved to the A-Ark. Which one are you in? Developer, Author (Guardians of Xen)
Next lesson: How to increase compile time, without hurt the program speed, so our project looks huge, once compiled! (e.g. we satisfied our boss for a lot of "work" we did!) P.S. Don't ignore quotes! :)
-
Nope, they're a bunch of ####ers. Some older, some younger, but all f###w##s.
Panic, Chaos, Destruction. My work here is done.
Could be worse -- you could be dealing with HR :-) I think we need to find/invent a term for the level beyond 'pure evil'. True, 'corporate America' would suffice but it would confuse the normtards (those who think they're normal which makes their utter retardedness so much more destructive and unbearable). And in case someone in this thread didn't already understand, the only qualification for a management position is to have proven you ability to fill in for upper management and/or Satan himself with its concomitant enjoyment of making sure that the rules are followed. I'd find Dilbert a helluva lot funnier if it wasn't so spot-on. FtMFs. Sorry to hijack your thread to rant but it's better than every other thought that comes to mind. Peace be with you and good luck!
-
Or just 42: Get a case of beer. (24 of them, coincidence, I think not, when you drunk they look the same)
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) -
as my 'team leader' does not why the following wrong:
a.SomeProp = a.SomeProp; // no funny side-effects, plain old property
And then he asked me not to criticize him... :wtf:
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))I never like going back to work but I like to eat and have a roof over my head. Also, I do the most interesting algorythm development and codeing at home.
Joe V My Blog on Testing Me, Myself, and I SGP Robotics team and FIRST Robotics