« first day (3044 days earlier)      last day (1887 days later) » 
00:00 - 21:0021:00 - 23:00

9:00 PM
We are worried that if we try to fix a bug, it might break something else.
 
regression tests are the solution
 
Also, is the latest .NET Framework 4.7.2's System.Workflow.Runtime a popular technology.
 
You probably will. As @Kendall said, why change it if you don't need to? If you attempt to "pay off" your technical debt you'll inevitably end up with more than you originally thought
 
@crazyTech Aren't you already using WF? I don't understand.
 
As far as I know, features are rarely removed, so you should be able to upgrade to 4.7.2 without breaking anything
 
9:02 PM
I'm trying to start with !Any(x == y), which is "none", and figure out Any(x == y), Any(x != y), and !Any(x != y) in English.
 
That said, my experience with WF is reading about it in a book years ago and never hearing about it since.
 
if we do try to do a rewrite with .NET Framework 4.7.2's System.Workflow.Runtime then will we find developers out there in the market who have experience in said technology
?
 
@crazyTech What makes you think you'll need a rewrite?
 
3 mins ago, by crazyTech
We are worried that if we try to fix a bug, it might break something else.
Presumably that.
 
@lee-butler are you sure that features are rarely removed? AngularJS is very different from Angular Version 6 ?
is it not?
 
9:06 PM
Angular isn't .NET
 
. Net is by Microsoft
 
even ASP.NET MVC 5 is quite different from ASP.NET MVC 1
 
Isn't MSFT famously (and sometimes tragically) backwards-compatible?
 
Microsoft love backwards compatibility
 
.NET very very rarely introduces breaking changes
 
user10864482
9:07 PM
@crazyTech think as of new tech as an egg. The egg become a chicken and eventually the chicken die.
 
Go find some random 16-bit application from the 90s (maybe even the 80s) and there's a good chance it will work just fine on Windows 10 (32 bit only though)
 
user10864482
yep. true anecdote ; we still use winmm.dll even if its a vestige from the 90. It work
 
I mean sure, a whole load of new shit is added all the time, but it's rare that anything is removed.
 
9:10 PM
I realised a couple of weeks ago that I've kinda done the same thing with the core library for our business apps
In theory I could drop a new copy of the dll on the first versions of most applications and it should work just fine
Except I've only been developing these apps for 3 and a half years, not 30
 
user10864482
as many before me said; don't repair something if it is not broken and if it is broken, repair it, don't start over
 
Tldr @crazyTech try the upgrade to 4.7.2 without changing anything else and it might just work as is. Even if it doesn't there probably isn't much that actually needs changing
 
@User23332 99 bugs in the code, 99 bugs in the code. Fix a bug, push the commit, 103 bugs in the code, 103 bugs in the code...
 
user10864482
starting over always looks a better option. Personally I think its because of cognitive dissonance; our human brain is wired to prefer the unknown because it fails to calculate all the variables
 
@User23332 Well, if you've had an application evolve over time, as they tend to do, a rewrite allows you to structure it with the desired result in mind.
 
user10864482
9:14 PM
@Sinjai I can't tell for other language but in c# one bug equal 200 bugs but fix that 1 bug and you fix the 199 others
 
user10864482
@Sinjai as a matter of fact I have
 
user10864482
part of the app I'm working on is from the late 80
 
user10864482
from before windows had a gui
 
I just don't think it's right to say starting over is usually not the better option. There are positives and negatives to either approach, yeah?
 
Also, a start over will possibly give us a chance to use new technologies that are more efficient, but I might be biased because I'm a software developer, and I'm always eager to try new technologies, but our management and customers will Unhappy about starting with a clean slate
 
9:16 PM
I did a partial rewrite of a couple of parts of our system a few months ago and it was amazing. I highly recommend it
 
user10864482
we are all like that but I think its because we see a trill in the unknown
 
I tried starting entirely fresh and it was a terrible idea, so much time and effort and it just wasn't really usable.
 
The problem is that the application is so huge, and written so long ago that we do Not have any of the original developers, and we have No strong expert for this particular Hedge Fund application
 
user10864482
rewrite part I agree, to me its code refactoring, but the whole thing? meh
 
user10864482
@crazyTech people come and go but code stays. Maintaining code is probably like 70% of what I do
 
9:19 PM
We are scared of changing code because it might break something, so we just have a workaround by updating sql tables whenever data is wrong
 
If anyone's day was too fun or productive, here: docs.google.com/spreadsheets/d/…
 
user10864482
@crazyTech my guess is your situation is not unique, you just need a good strategy to address the challenges
 
"some" == "not all" ?
Not all should be none
 
user10864482
good night everyone
 
I hate my life
G'night User.
 
9:26 PM
any C# library around for calculating betweenness centrality for graphs?
 
Googles betweenness centrality
@tempidope Does it need to be C#?
@KendallFrey Save me from my torment of logic
 
well, ideally - to coexist with other pieces of code.
 
@Sinjai not all is some not
 
Trying to put them all in English and find equivalencies that way.
 
you could combine the equivalent expressions into the same row
with two columns, one for Any and one for All
and two English, one for all and one for some
 
9:34 PM
I don't know which are equivalent, that's the point of the exercise.
 
If you make the table I can help fill in the gaps
lol
 
> etc
 
You get the format I mean, no?
 
Not really
Yeah actually
 
one column for All expressions, one for Any expressions...
 
9:38 PM
You want to start with the logical equivalents and then add the English
 
Fill in what you know
 
I was trying to do the opposite, but it seems pretty obvious now that the whole !Any(==) thing behaves just like a !(x == y) == x != y
 
Back.
 
yeah maybe it would make more sense to simplify the expressions
 
Sweet, sweet lunch.
 
9:40 PM
All(x), All(!x), etc.
 
Greg it's 3:40, you really need to quit drinking.
See sheet 2
 
!!wallah
 
Et voila!
So then it leaves the question of any technical differences.
e.g. will All(x != y) differ from !Any(x == y) in terms of performance/work done.
 
Not that I know of, they short circuit identically
 
9:46 PM
That all will go until x is y, the any will go until x is y.
So ye
 
@Sinjai Not even 2:00 PM here.
 
So why do we even have both? I can use Any for anything I could use All for, and it only took an hour!
 
Any should stop iteration as soon as the condition is met, All validates that all meet the condition.
 
You're telling me all won't short-circuit as soon as something doesn't meet the condition?
Poppycock
All is a funky inverse of Any
 
@Sinjai For the same reason we have either instead of just using Aggregate
 
9:51 PM
			if (source == null)
			{
				throw Error.ArgumentNull("source");
			}
			if (predicate == null)
			{
				throw Error.ArgumentNull("predicate");
			}
			foreach (TSource item in source)
			{
				if (!predicate(item))
				{
					return false;
				}
			}
			return true;
Any is identical except predicate doesn't get inverted.
As you'd expect, of course.
 
and I guess the booleans are switched
 
Oh yeah.
So the final part of this thought experiment would be whether EF treats them any differently when converting to SQL.
 
@Sinjai They differ total time wise.
 
@Greg You're not comparing equivalent code, the timing is meaningless
 
I am comparing if all or any are greater than 1000
 
9:59 PM
Which are two different operations
 
Any will break as soon as condition met, my understanding is all will continue until it checks all conditions.
 
@KendallFrey I get the same times when using synonymous logic.
 
All will break as soon as the condition is not met
 
@Greg I posted the sauce above.
 
10:00 PM
I'll check that out.
 
By the way, Greg, you can just do var sw = Stopwatch.StartNew()
 
I'll be damned.
 
Someone at MS was thinking that day.
Why on Earth would you check every item?!
 
@Sinjai Eh, took like four seconds was not trying to write that fiddle super elegant, just get it done.
 
Understood.
 
10:03 PM
@Sinjai Good question actually.
 
wat
 
Logically you would expect it to be the inverse of any now that I think about it.
 
Anyway, the performance difference appears to be the result of caching.
Running Any again proves to be even faster than the All call.
Also, no string interpolation? What is this, 1921?
@Greg You replied to the wrong message here, hence my confused 'wat'. Just for the record.
 
I like to do ($"") but dotnetfiddle does not like it.
 
Oh.
By the way, I don't entirely know what's going on here.
 
10:11 PM
Wtf are you working on?
 
That's what EF generates.
I'm not sure why it has to do all that additional casting stuff for NOT EXISTS.
 
I do not know, likely something crazy based on the query it is being passed to do something.
 
Hm?
That's what's generated by DbSet<Model>.AnyAsync(x => x.Id == 1), etc.
Not doing anything fancy there.
Anywho, it looks like if you want to micro-optimize, you should avoid Any(!=) and All(==), which will both result in a NOT EXISTS and therefore that casting.
Wait, no
Calling All makes it use NOT EXISTS, even if you use !=
Looks like I have an SO question on my hands.
!!shrug
 
10:26 PM
¯\_(ツ)_/¯
 
If it ran the wrong way is Entity Framework caching to query plan?
 
?
Looks to me as if EF is set to use NOT EXISTS regardless then flip that result as necessary.
But why that is is beyond me.
 
Entity Framework after a query executes, it creates a query plan in SQL to execute the next time that code executes. So that the query executes quicker in future from code.
 
Yeah good point sorry, lemme switch up the order and see what happens.
How do you clear that query plan?
 
You have to do it from SQL
The SQL instance is storing it.
 
10:34 PM
Well
Even if it is getting cached, it should be caching the NOT EXISTS version.
I call All(!=) first in that example, which should mean what they're really looking for is == to short-circuit.
Yet it uses NOT EXISTS.
I'll check using the actual code, which I haven't run yet so there shouldn't be any caching going on.
Ow
I really need a more ergonomic workstation.
Hey, does TOP (1) do anything if you know the query's gonna have 1 result anyway?
EF does that when calling Find, which should be returning a unique result.
Hey Millenium.
 
What.
 
What.
@Greg What?
 
00:00 - 21:0021:00 - 23:00

« first day (3044 days earlier)      last day (1887 days later) »