|
OriginalGriff wrote: Pay peanuts, get monkeys elephants.
|
|
|
|
|
Nah...elephants never forget. We're talking RentACoder here - they never learn!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Jörgen Andersson wrote: Pay peanuts, get monkeys elephants squirrels.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
A word of caution - a CRM is generally a very large and complex piece of business software.
Depending on your specification - you may be better off buying something off the shelf although it will not come cheap.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
So, first day on the job and your BS CV has got you in the s#it eh?
|
|
|
|
|
While coming to office today, I noticed some yellow thing flutter. I was just under my right eye on the balaclava. I ignored it for a while and kept riding. Then started feeling weird in right eye so stopped to check. Nothing in helmet, nothing in balaclava, nothing in the eye.
Somehow my mind tells me it was a tiny spider.
I tried doing that SpiderMan thing with hands to see if it works now, but I ended up looking stupid in office. I still feel there is something in my right eye.
"You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[ ^]
|
|
|
|
|
It takes a while before it starts working. Just keep doing those wrist flip motions around the office...
<sig notetoself="think of a better signature">
<first>Jim</first> <last>Meadors</last>
</sig>
|
|
|
|
|
Radioactive spider venom isn't instant acting - wait until lunchtime, and then try to crawl on the ceiling.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
No comeback? You were overwhelmed by a desire to fall into a bathtub and can't get out out again, weren't you?
I am not a number. I am a ... no, wait!
|
|
|
|
|
I had a second look at Code Contract[^] yesterday night (after reading Joe Duffy's latest blog post on error[^]).
Mmm... I might give them a go.. But I am curious, is anyone here reading this using them?
What's your ... feedback / impression / experience like with them?
Cheers!
|
|
|
|
|
I never rarely do something just because someone else says I should.
Even when all the other kids were jumping off a bridge, I did not.
|
|
|
|
|
No one told me to use them, but I got this thing named curiosity... You have heard of it ya?
Beside Code contract seems to come with this static compiler analysis thing which looks interesting....
I take it you have no experience with Code Contract then!
|
|
|
|
|
|
Sander, there's a rumour going around that Pete O'Hanlon uses pixels made from aeternium and veracium, so his content is never inaccurate. I suspect it's true.
I'd like to use those myself, but all I can afford is temporarium and probabilium:
they want years off your life to even get the starter-kit for what Pete is using.
I can't even afford a smidgen of griffium, or deemium. Yes, there's always kruykovium, which is basically free in exchange for your soul, but I don't have enough shielding to handle its high read-io-activity.
cheers, Bill
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
There's so much funny in that post, but this part in particular made me laugh
BillWoodruff wrote: there's always kruykovium, which is basically free in exchange for your soul, but I don't have enough shielding to handle its high read-io-activity I know someone else who would love it too (he has a lot of griffium)!
|
|
|
|
|
Excellent info Sander, thank you and Peter!
Gotta have a look!
|
|
|
|
|
Hi: curiosity is an excellent attitude ! You got me curious, so I went to the VS Gallery, downloaded, installed CodeContracts ... only to realize it's already baked into .NET 4.5.
It was pretty easy to set up a test-class with the three key types of contract, Ensures, Requires, ObjectInvariant, and then observe what happened as I enabled, or disabled, the various tests (code at end).
The one thing that concerns me is that every time I compile the project with this test class (after making some change), my AV software is telling me that it is doing direct disk sector access using something called 'ccrewrite.exe, which is a digitally unsigned file:
File information according to the publisher of the detected file (may be faked) (ccrewrite.exe):
Company: Microsoft Corporation
File description: CCRewrite
Copyright: (c) Microsoft Corporation. All rights reserved.
File version: 1.9.10714.2 While PostSharp may be doing something similar to modify code, I never see notificaition like this (perhaps because PostSharp is using a signed something-or-other ?).
The test class code:
public class testContract
{
private int? _testInt;
public int? testInt
{
get
{
?>() != null);
return this._testInt;
}
set
{
Contract.Requires(value != null);
_testInt = value;
}
}
public testContract(int? testinput)
{
testInt = testinput;
}
[ContractInvariantMethod]
void ObjectInvariant()
{
//Contract.Invariant(_testInt != null);
}
} I note that configuring how CodeContracts will handle validation fails involves a Panel in Project/Properties/Code Contracts that has a complex number of options.
I like the idea of catching errors before they occur ! There's still so much functionality in PostSharp I haven't explored; will be interesting to see what it might/doesn't offer in terms of constraints.
You may have seen my blurb about Jeremy Pinker's interesting 'FluentValidation open-source project here, recently [^], another interesting approach to bomb-proofing code. Of course, I am not implying direct comparison to 'CodeContracts here, since you use 'FluentValidation on 'instances of objects at run-time, not compile-time.
Take a look at this example of 'FluentValidations syntax" (example by the FV author, taken from here: [^]):
public class MyClass {
public string Id { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string OldPassword { get; set; }
public string NewPassword {get;set;}
public string ConfirmPassword {get;set;}
}
public class MyValidator : AbstractValidator<MyClass> {
public MyValidator() {
RuleSet("NameAddressRuleset", () => {
RuleFor(x => x.Id).NotEmpty();
RuleFor(x => x.Name).NotEmpty();
RuleFor(x => x.Address).NotEmpty();
});
RuleSet("PasswordRuleset", () => {
RuleFor(x => x.OldPassword).NotEmpty();
RuleFor(x => x.NewPassword).NotEmpty();
RuleFor(x => x.NewPassword).Equal(x => x.ConfirmPassword);
});
}
}
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
modified 26-Feb-16 7:12am.
|
|
|
|
|
Thanks for your pioneering work Bill!!!
During work today I used lull to read about code contract. They do support both static and runtime checking! (although I guess you have to run with the compilation attribute to keep them hey?!)
I am still not entirely convince... I will have to see if static compilation has any goodies!
|
|
|
|
|
Hi Super Lloyd,
Perhaps it is less appropriate to give details of a commercial software tool here, given our collective (and valued) "sensitivity" to hidden agendas of "promotion;" but, fyi PostSharp offers its own CodeContracts implementation [^] which includes these validation attributes: (note: the list here may not be complete since it's based on PostSharp version 3)
NotNull Requires a non-null value
NotEmpty Requires a non-null and non-empty string or collection
Required Requires a non-null object or a non-whitespace string
CreditCard Requires a valid credit card number
EmailAddress Requires a valid email address
Phone Requires a valid phone number
RegularExpression Requires a match of a regular expression
StringLength Requires a string of a given length
EnumDataType Requires a valid value for an enumeration (can be applied to strings and integers)
GreaterThan Requires a value greater than a threshold.
LessThan Requires a value less than a threshold.
Positive Requires a value greater or equal to 0.
StrictlyPositive Requires a value strictly greater than 0.
Range Requires a value within a range.
High Performance and Flexibility [^].
PostSharp is expensive, but, imho, a very powerful tool whose facilities go far beyond validation.
cheers, Bill
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
Hi Bill!
Since I am trying to stir in my careless soul some traces of interest for Contracts..
I am very far away from spending money on it!
|
|
|
|
|
I doubt your soul is "careless," and I bet you do have a concern for validation ... which is what this is all about for we mere mortals who have ... errors ... to deal with
cheers, Bill
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
Trying to discover what CodeContracts (from MS) can and cannot do when the 'static compile option is set is not easy: [^].
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
I'm not used to AM/PM notation in time and tried to understand when 27th, February 12PM is in Israel...
One says 12PM is midnight at the END of the day, while other says it is midday...
So between EST and IST there are 7 hours...does it mean that 12PM is 19:00 or 7:00 of the next day?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: 12PM 12PM is always noon in the US, or midday. 12 AM is midnight. I've never heard of people refer to it backwards but perhaps some places do.
So, 12:00 PM EST is 7:00 PM in Israel.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|