@JimmyHoffa licenseNumberMatches is an Expression<Func<TLeft, TRight, bool>>. cacheRecord is a TLeft, licenseCandidate is a TRight. PostVerify is just a black box extension method. It does some database magic behind the scenes.
The rule looks like this:
var licenseNumberMatches = Rule.Create<CacheRecord, LicenseCandidate>((cache, license) => cache.RegistrationNumber == license.LicenseNumber);
So your issue is you want to carry a message with the failure, but your rules engine only handles bool and not SomeResultType { Success, FailureMessage } ?
so this is the distinction between in Haskell what's known as the Maybe monad and the Either (or Exception) monad. The maybe you get either success or failure, but Either gives you Success or Failure with a message; it has the ability to carry information on it's failure as opposed to Maybes failure is Nothing which carries .. nothing. Just like a bool gives you success or failure that carries no info
What you could do is dig into your rules engine and make it use some Result type you create
public class Result<TSuccess, TFailure> where TFailure : class { public TSuccess SuccesResult { get; set; } public TFailure FailureResult { get; set; } } }
use that instead of bool throughout and you know you're in failure if result.FailureResult != null
is the C# why of doing an exception monad instead of the maybe monad
alternatively, changing all of that now would plausibly be a pain for you.
I thought about that. But the original rules engine was peppered with things like Task<MyMothersApartment<UnitOfWork<T, TResult>>>. Sorta left a bad taste in my mouth.
And one of the design goals for this new engine was simplicity. The expression trees are already more complicated than I wanted.
then And(new[] { Tuple.Create(licenseRule, "License no go!"), Tuple.Create(sillyRule, "No silly! No!") }, cacheRecord, licenseCandidate) will iterate your ruleset on that cache record and license candidate
@RobertHarvey yeah, it's unfortunate C# has to make dealing with optional results and optional values and such not simple. This is why Algebraic Data Types are feckin awesome
@ThomasOwens He went around me to solve the problem, so I needed to explain to him why his solution wouldn't work, and also to reassure him that we do not have urgency, so he can take some time to think things through.
@JimmyHoffa pfft Go to the CEO's office? Bitch please. You email that shit straight to AP from your cell while you're on your yacht.
@ThomasOwens Well, he's going to be more terrified if he don't start talking to me, because he was planning to workaround from a data feed that's deprecated and slated for deletion next week.
I'm all like honey, we don't need asap on this, just do it right.
@enderland tons of reasons. Independent consultants are rarely acceptable vendors for lots of large corps. Pooled insurance benefits are vastly cheaper than independent insurance. The public exchanges may change a bit of the calculus for a ton of people regarding that. Getting into independent consulting gigs though can be a mess- lots of places even if they allow paying independent consultants won't do it because they'll interview the person and say "Fuck it, work for us or scram."
@JimmyHoffa yeah, my company won't let me do contract work with them by myself even though I am THE sme on the stuff I was working for before... I guess it seems a bit sily to me though
@enderland Fiefdom. People setup rules around who can and can't do work and what/how they can or can't do work, because it allows them a modicum of control and power. Authority. Many people do all sorts of things to get their hands on those traits in businesses because they feel having Authority/Power provide an amount of safety and capacity for self determination. It's based on a 2-choice perspective: Either you give orders or follow orders, and no choice inbetween exists
Producers recognize a 3rd choice: Create enough value that nobody wants to mess with you. The Goose that lays the golden egg choice if you will.
But lots of people have a focus more on organization and people than actual crafting. It's just not an available option to them, their only way of providing value is via organizing others into an ideally greater aggregate. Lots of times they get confused and think the organizing is the cause of 100% of the resultant value rather than realizing it's simply a modifier and it can be negative or positive.
@JimmyHoffa I think for my (now previous :o) company it's a matter of "if we go through standard suppliers we will save money! who cares about whether or not better people should get paid more, we save money by hiring in bulk err the cheapest folks err whatever!"
@enderland exactly: Someone gets to attempt to create value by making the decisions about who can and can't consult there rather than ceding that decision to others. They think it'll give them the ability to create value through their high quality organizational and people skills. They don't realize the value created by giving people greater choices would be better, or they don't care because they want to ensure they get the credit for all positive vendor results.
but they get to tout how they're saving money by ensuring a fixed set of vendors is used. See how much value they created? If they didn't institute those rules they wouldn't have been able to add so much value!
If someone "wants to learn how to bake a cake" just get her some basic advice and a direction to go and she will be happy and thankful.. Anyone who has some Python experience could easily throw in some helpful advice. Why are you so concerned? I'm just glad that Akira71 could do it before the censoring squad stepped in. It's just sad. — le0m8 mins ago
As a developer, I want to receive data about pricing relationships from [datasource] so that I can display the correct label on the product spec sheet. Or something to that effect.
I think you could be a slob without necessarily being slovenly.
Now I will spend some time thinking on this.
user15026
That's true, I can see an argument for that.
user41796
7:02 PM
ELU nerd sniping FTW
user41796
In other news, I have been wanting to try out new restaurants for a variety of different reasons. Today was the second experiment, and I'm quite happy with the results.
user15026
What kind of place did you try? :)
user41796
Today was a semi-fast food'ish Mexican place
user41796
They had chili rellenos for a lunch special, so that's what I went with
user41796
Pretty tasty and they didn't skimp on making sure the veggies were fresh
So their breakfast menu is basic and tastes PHENOMENAL.
user41796
@KitZ.Fox Those are the best kind. Some of the guys in the on-site cafeteria simply don't give a sh!t about what they're serving. And it really shows.
user15026
@GlenH7 This is my rule. The more of a hole in the wall it is, the better the chances of something ridiculously amazing going into my mouth.
user41796
7:10 PM
I go out of my way to avoid those offerings if I see any of those cooks
user41796
@AshleyNunn They must have all been drawn to the big city a bit North of you.
user15026
@GlenH7 Yeeeeep.
user15026
KW is decent sized, but Toronto is the bigger draw for sure.
user15026
I mean we're working on making us more interesting (and with places like Google, it's kinda working? Though the LRT construction is both drawing people and closing businesses as it screws up stuff)
@GlenH7 is American BBQ unique to America? It's interesting, because of our diversity there's a very small number of foods that are uniquely common in America. One of them to my understanding is Biscuits (I believe). The closest you get outside the states from my understanding is typically a croissant, but it's really not the same thing at all.
Most American foods can be found outside of America, but to my knowledge not the biscuit. Wonder if you can get anything like BBQ ribs outside America.
user41796
@KitZ.Fox I was about to rattle off some of the high end places in my city that I haven't been to, but that would have had the same effect
user41796
@JimmyHoffa My experience is no, American BBQ is unique to the US
I grew up in a very small town - my city now is like 300K (if you just pick Kitchener, iirc), I don't think I could be happy in anything smaller. (and ideally I want to move to Toronto at some point)
user15026
(but that is a big scary change that I haven't worked up the oomph to try for yet)
@GlenH7 yeah, the meat cooking techniques aren't supremely novel, but the flavor being aimed for - like you said especially with the sauces - is relatively so.
user41796
@AshleyNunn Toronto is about as big as you can get in N. America. But 'burbs are 'burbs
Mustard is a well used spice in other cultures, I wonder if you could find a cooked meat dish that's rubbed with Mustard fairly similar to a Carolina BBQ in flavor
user41796
Unless you're wanting to live in the city, which I'm personally not a big fan of
@GlenH7 whaa?? That's not altogether uncommon at all. I think maybe it came from France because the places coming to mind immediately are those that have received french colonial influences: Vietnamese and Carribean off hand
I remember in the Dominican Republic walking down the street and seeing somebody had like a mini-dumpster in their front yard made out of like holed-metal-grating, with a whole pig sitting in the middle of a pile of hot coals; Was like a pig-coal-sandwich.
And it smelled bloody fantastic
user41796
I'd argue that the smokey flavor was a convenient byproduct and not an intentional aspect of the cooking
user15026
7:32 PM
This makes me want decent barbecue now.
user41796
@AshleyNunn You're welcome to come visit
user15026
@GlenH7 I fully plan to take you up on that at some point, when my vacation days aren't focused on the fact @WorldEngineer is still too dang far away.
@GlenH7 iduno, I figure if something's a byproduct of a particular cultural approach to cooking something that it's a part of the goal, otherwise they'd change the way they cook things to get rid of that flavor
user41796
@AshleyNunn Call it splitting the travel distance?
@JimmyHoffa So, I think the guy in DR was cooking that way because that's what he had that was convenient. Or said another way, if he had a cheaper or more convenient way to cook, he'd jump on it immediately
user15026
@GlenH7 Oooh, I like the way you think. :)
user41796
Whereas when you look at any of the major BBQ competitions, they've got custom built smoking rigs to concentrate the smoke flavor (and indirect heat) in the meat chamber of their cooking trailers
@enderland Pretty much what Jimmy said - sure, my take home rate is x, my total compensation is 3x and they pimp me out for 6x, BUT they line up my work for me, take care of legal shit, provide credibility, give me training so I can correctly do the job, blah blah blah.
user15026
@KitZ.Fox and you're not impossibly far from me, if I remember where things are in America (which I am horrendous at)
My dad was an independent contractor (in general construction mind you) when I was little, so I've seen that world - where some months are so busy he's turning down jobs, to the next where no one is spending money. This is especially true in corporate america where the beginning of the fiscal year means $$$$$$$$$$$$ and the end means that they're cutting contracts like paula deen doles out butter
Don't get me wrong, my dad made out pretty well, and I would expect I could do the same too - but there's a lot of extra work beyond sitting down and coding for 8 hours that I'm not necessarily chomping at the bit to do
user41796
@JimmyHoffa on a similar note, have you seen the smokers that can fit a whole pig? The pork comes out dang tasty then
user41796
@Ampt I have never had the itch to deal with that aspect
@GlenH7 ohhh smoker yeah that's a different thing. I thought you meant the smokey flavor regarding the slow-fire-roasting. The way we smoke meats is definitely not the same.
user41796
7:40 PM
Yes, that was my point from earlier
user41796
I have never seen an american style smoker outside of the US
user41796
Arguably, there are similar things like those green egg things.
@Ampt speaking of cutting contracts, there's ample stories of large corps just not paying independent contractors or dicking them around on that because they know they can out-lawyer them. Used to work with a guy who said when he was at GM he saw the bureaucracy there had purposeful bits built in to make it easier to agree to pay but then not have the authority to sign the check for contractors.
user15026
Now I want copious piles of meat all smokey and delicious. But sadly, there's nowhere to get that close to work, so it will be tomorrow before I can make that happen (because they'll be closed by the time I get home tonight)
He said he felt bad, saw many people do work and then get nothing or have to spend months banging their way through the bureaucratic chain just to get what the contract demanded
user15026
But I think tomorrow night I might order me a pile of delicious smokey meatstuff.
if there's one good thing about working for a mega corp, it's knowing that they have a literal army of lawyers employed solely to stop that kind of shit
@Ampt yeah, he said managers would go to finance and say "Look we already agreed to pay this, you guys signed off on hiring them, now they need to be paid" and get told "Well, this doesn't fit our current months budget so I'm not signing the check, my hands are tied and you don't have the authority to sign it. Deal."
@Ampt yeah, and anyone they consult with knows what shit storm will be coming if they don't make good.
user41796
@AshleyNunn If you're willing to pay exorbitant rates, one of the top rated local chains here will ship. Quality isn't as far off from in-restaurant as you might expect.
@JimmyHoffa oh man, look at all this code I won't be checking in til I get this paycheck. Be a real shame if your whole project was a month and a half behind schedule cuz we couldn't get one little signature
@AshleyNunn we like doing full crock pot with spare ribs, since they are fattier
with leaner ribs you can precook them partially in a crock pot, then bake them and liberally apply bbq sauce, bake a bit, and reapply and get the very thick gooy bbq sauce that's wonderful
user114359
@enderland heathen! The only way to prepare ribs is to smoke them for 6-12 hours, then brush on BBQ sauce and grill on high heat to carmelize it.
with leaner ribs you can precook them partially in a crock pot, then bake them and liberally apply bbq sauce, bake a bit, and reapply and get the very thick gooy bbq sauce that's wonderful
spare ribs are fatty enough that they turn absolutely delicious in a crock pot in a way babyback don't
don't ruin babyback by not doing what @Snowman said though haha
I am smoking baby back ribs using an electric vertical smoker.
Given that most food absorbs smoke for an hour or two before saturating, what will happen if I stop adding wood chips after about two hours? Will I get the same result as if I continued to add wood chips, given that the ribs are unli...
heh 250tdp kepler... I welcome the efficient chip future where I no longer give any thought whatsoever to the cooling approaches. I think they even got passive cooling on some of the Maxwells. Mine's all of 60 TDP
> Kepler is the codename for a GPU microarchitecture developed by Nvidia as the successor to the Fermi microarchitecture. Kepler is Nvidia's first microarchitecture to focus on energy efficiency.
so yeah, better than fermi but still..250.. Maxwell's mostly well below that save for the Titan. And to be sure, 250w is actually higher than all 500 series except for the 590
higher TDP than anything in the 600 series except the Titan