« first day (1578 days earlier)      last day (2571 days later) » 

12:26 AM
yay fixed two bugs related to tag display /cc @JohanLarsson
needless to say, the drag and drop example in wpftutorial.net/DragAndDrop.html is slightly buggy
it remembers not the clicked framework element, but the one which is under the mouse cursor at the moment when WPF goes "hey, the user is doing drag and drop!"
which results both in missed drags (because the cursor isn't pointing at any framework element), and in wrong items being dragged (because at that point the cursor hovers a different item)
 
 
12 hours later…
12:43 PM
Morning
 
Are you sure about that?
 
Now that you mentioned it, not sure if it's morning at all... ;)
 
1:33 PM
Morning :)
 
Hello :)
 
udemy.com <-- is having a major sale.. everything is flat priced to £15 (though I noticed it dropped to £10 when I logged in). Purchased the Vue JS 2: The Complete Guide course.. pretty good stuff. May be worth checking out (they have ton of selection)
sale is ending in 2 days i think
 
2:12 PM
btw, it seems the sale is for the purchase of one course only so careful with what you choose 😀
 
2:34 PM
1
Q: access command defined in nested user controls wpf

konradI have a MainWindow derived from Window class. That window has a ContentControl that is used to host user UserControl objects in it. I am trying to create a button that will access a Command that was defined in that nested UserControl. The only trick is that my user control actually has more user...

 
2:58 PM
Is there a Window event that is triggered when Window is called as ShowDialog()?
 
More than likely
You probably have to dig into Win32 docs for that. It's likely something you can see if you hook into WndProc
 
ShowDialog means that it has a dialog result. That may be something to help when looking into it.
 
@Hypersapien Take a look at this: stackoverflow.com/a/637999/177416
 
yeah, i was under the assumption its outside the scope of Hyper's application and they are trying to figure out when external window opens up.
 
3:18 PM
Functional programming xD
 
@JohanLarsson this is an ugly part - hoping that my model's collection is actually observable, and observing it inside viewmodel
 
a ShowDialog will most likely always have a parent window
i'd just check for that
 
@Maverik losing you to the dark side >.<
 
no i'm way beyond.. i'm in JS world
 
even darker
 
3:23 PM
i actually did the Vue JS 2 course over this weekend (half done)
exactly - thats just blackhole matter
oo github has a new look
 
I assume that by new look you're referring to the big ass black bar on top
 
yea of course .. not much to look at otherwise xD
i'm a fan of strong contrasts :)
 
that bar hasn't always been there?
 
the black bar? not on my account at least
 
did it used to be grey?
 
3:32 PM
i believe it was light grey thing
certainly not a dark shade enough for me to notice before this
 
ahh. maybe enterprise has always had it... thats the UI I'm usually looking at
 
oh ok
why github enterprise though?
especially now that gitlab is much better offering
 
because when you roll enterprise with thousands of engineers, i'm sure switching isn't anybodies priority lol
 
(everybody I know who went for premium github mainly did it for private repos - so I'm assuming that's your core use case too)
yea resistance to change is another thing even if you wanted to switch :)
 
that's for sure. no matter which one we use people will still use it wrong anyways
> looks at repo names: ProductA, ProductA_v1, ProductA_v1_working, ProductA_v2, .... + 5 more
 
3:38 PM
its unfortunate.. i've had that too
i've often wondered how to tackle that (i've been thinking about collapsing them into one repo based off branches that start from first commit)
 
> guy calls team meeting IRT github server space available
 
IRT?
 
> says "just so you know, github server space is down, but i don't think it applies to us, I don't think we should delete anything, we barely use any space"
in regards to
 
nvm
yea i roughly made it to :)
sounds very corporaty
 
i'm sure some starving child in Africa would be more than happy to use the space of 10 of our delete stale repos.
its incompetence. I'd be willing to bet no other teams in the corporation have this problem.
 
3:44 PM
well most people don't believe in efficiency.. it just needs to be good enough
so Kevin, as it turns out.. i'm in the v1 v2 situation right now
i'm about to create a new version of identityserver that is completely different from original (though will yield the same result as far as apis are concerned)
how would you tackle that?
 
well is there only going to be one output?
 
erm.. yea i guess?
i have a .net 4.5.1 IdentityServer that's about to switch to Dotnet Core IdentityServer
 
completely different? different techs? different SDK? no shared code?
 
yea nothing is shared.. old version has hard coded stuff, new version will be driven off db (i'll eventually migrate all state/configuration over)
 
Will there be breaking changes with anything that interacts with it?
 
3:50 PM
nope
at least i'll try not to break anything
otherwise this will be a lot more painful and likely go on halt
 
well branch it, rebase and merge when you're ready to release?
 
i've never used rebase explicitly - i've always done "switch master to this"
i wonder if it does rebase under the hood.. but yea that's my strategy as well
 
it'd be a lot more useful if someone is digging through the repo to see the big change, and when it happened, rather than having to know to look at a completely different repo if it needs to go that far back
though, if its completely new and the old repo is going completely obsolete, just archive it and work in a new repo
you have a valid case. my team does not lol
 
yea i could archive but I'd rather keep it alive for now - i still need to use the existing commits to finish migration
 
our team is copy>pasting, renaming, and changing some #defines.
 
3:54 PM
and i like the branch shuffle idea better than archiving.. i'm the only one who knows what belongs where at this point in time
 
so 99% of the code is being reused, and that includes the 300MB SDK being used
 
there's literally 100s of projects here and nobody knows what goes where (even some of those projects are confusing to me)
oh yea i hate that bit
 
We now have a ProductA_v7 repo...
 
most of legacy repos have tons of dlls in them
i would have thought that to be a proper tag / branch case
 
but the project workspace file didn't change names, so when you open it you actually have to open the ProductA_v4 workspace file... not confusing at all lol
 
3:56 PM
i imagine you have lots of old folks?
 
all young lol
to be fair, some of the team is hungry to learn more and better themselves.
the others are just "good enough for me" mindset
 
@milleniumbug I think you need an unsubscribe of the old value to not leak there
 
the young need a whip to keep them in shape ;)
 
oh boy here Mav goes with the whips again
;)
 
@JohanLarsson yes, also that
 
4:03 PM
WPF means a lot of sad casting like that
They should have made DependencyProperty generic
 
4:40 PM
            var searchTextChanged = this.WhenValueChanged(x => x.SearchText);
            var birthDateChanged = this.WhenValueChanged(x => x.BirthDate);
            var domesticatedChanged = this.WhenValueChanged(x => x.Domesticated);

            var searchFilter = searchTextChanged.CombineLatest(birthDateChanged, domesticatedChanged, (searchText, birthDate, domesticated) => new SearchCriteriaBuilder() { SearchText = searchText, BirthDate = birthDate, Domesticated = domesticated })
                .Throttle(TimeSpan.FromMilliseconds(250))
little bit of DynamicData magic right there
private Func<IAnimalVm, bool> BuildFilter(SearchCriteriaBuilder searchCriteriaBuilder)
        {
            //actual filter logic
            return vm => true;
        }
 
that pretty similar to Rx?
 
i have no experience with Rx but my understanding is "yes"
allows me to have a bound OC that i can filter in real time as people interact with the UI
 
yep, sounds alike
haven't used either, but if i'm ever doing C# again, I'm wanting to try
actually might want to do my own data organization app, so that might be a good fit, but dunno. we'll see
 
rx is nice when you have observables
creating observables from events is pretty messy syntax
 
i barely understand what an observable is
should my search criteria properties be observables?
 
4:46 PM
something that needs to be "watched"?
 
if you change to explicit type for var searchTextChanged = this.WhenValueChanged(x => x.SearchText);
I would expect the type to be something like IObservable<EventPattern<...>>
An observable is an instance of a subscription to an event if that makes sense
that ~explanation~ probably does more harm than good
 
hah. yes.
 
makes sense
 
namespace RoslynSandBox
{
    using System;
    using System.Reactive;
    using System.Reactive.Linq;

    class Bar
    {
        public Bar()
        {
            var foo1 = new Foo();
            var foo2 = new Foo();
            var foo1Subscription = Subscribe(foo1);
            var foo2Subscription = Subscribe(foo2);

            Observable.Merge(foo1Subscription, foo2Subscription)
                      .Subscribe(_ => Console.WriteLine("One foo notified a change."));
        }

        private static IObservable<EventPattern<EventArgs>> Subscribe(Foo foo)
^ sample, perhaps not making anything any clearer
 
so the point is to get a console message whenever a foo changes. but what is the point of the Subscribe method
+= x then -= x?
 
4:59 PM
namespace RoslynSandBox
{
    using System;
    using System.Reactive;
    using System.Reactive.Linq;

    class Bar
    {
        public Bar()
        {
            var foo1 = new Foo();
            var foo2 = new Foo();
            IObservable<EventPattern<int>> foo1Subscription = ObserveChanges(foo1);
            IObservable<EventPattern<int>> foo2Subscription = ObserveChanges(foo2);

            var subscription = Observable.Merge(foo1Subscription, foo2Subscription)
                                         .Where(x => x.EventArgs > 5)
 
ok that seems more practical :)
 
^ better sample, starting to show when rx is nice
The Merge().Where() is declarative and nice
@Julien Subscribe is similar to what you do when you do += if you don't use events
 
i dont get this
return Observable.FromEventPattern<EventHandler<int>, int>(
x => foo.Changed += x,
x => foo.Changed -= x);
 
It is creating the observable from the event, the messy part
No way to write that without googling
 
bleh. lol
 
5:02 PM
The signatures in rx are scary and nasty
gist: 7d66a08a9104d75c6452504b2c391b3b, 2017-02-13 17:04:04Z
namespace RoslynSandBox
{
    using System;
    using System.Reactive;
    using System.Reactive.Linq;

    class Bar
    {
        public void UsingRx()
        {
            var foo1 = new Foo();
            var foo2 = new Foo();
            IObservable<EventPattern<int>> foo1Subscription = ObserveChanges(foo1);
            IObservable<EventPattern<int>> foo2Subscription = ObserveChanges(foo2);

            var subscription = Observable.Merge(foo1Subscription, foo2Subscription)
                                         .Where(x => x.EventArgs > 5)
                                         .Subscribe(_ => Console.WriteLine("One foo notified a change."));

            subscription.Dispose(); // stop subscribing
        }

        public void UsingVanillaEvents()
        {
            var foo1 = new Foo();
            var foo2 = new Foo();
            EventHandler<int> handler = (sender, i) =>
                {
                    if (i > 5)
                    {
                        Console.WriteLine("One foo notified a change.");
                    }
                };
            foo1.Changed += handler;
            foo2.Changed += handler;

            foo1.Changed -= handler;
            foo2.Changed -= handler; // stop subscribing
        }

        private static IObservable<EventPattern<int>> ObserveChanges(Foo foo)
        {
            return Observable.FromEventPattern<EventHandler<int>, int>(
                x => foo.Changed += x,
                x => foo.Changed -= x);
        }
    }

    internal class Foo
    {
        public event EventHandler<int> Changed;
    }
}
^ side by side rx & vanilla events
I declared the eventhandler as a variable, normally it would be a method
Hopefully the sample shows why they call rx linq ro events
I used explicit types for the nasty ones
@Kevin You can play with ^, and some ask questions
It uses this nuget
@milleniumbug do you know rx?
untested code, maybe it does nothing :)
 
5:26 PM
@JohanLarsson Not at all
 
Later tonight you will be intermediate :)
Updated the gist
 
speaking of events, I have no clue how -= works with lambdas
My guess is that it doesn't at all
 
I'm not 100% sure but don't think it does either
 
Unless I happen to have the instance assigned somewhere and I use that one with -=
 
you can use a named method
It scatters the logic a bit
Or use rx, then you can just dispose the old subscription
 
5:34 PM
yes, this is probably the best way
 
 
1 hour later…
6:47 PM
has anybody had the misfortune of working with EF core recently?
they've broken the tooling beyond belief - they expect you to do dotnet new and stuff for .net core things - great.. but the resulting csproj can't be read by VS 2017 RC3 even.. it thinks i'm trying to target .net 4 >.>
and then it goes in an infinite loop of restoring some random thing .. now they want you to run dotnet ef migration command.. but hey.. that doesn't exist anymore.. splendid!
so you go back to vs.. but vs isn't out of its loop.. they REALLY want me to switch over to nodejs!
all i needed was 1 damn query to work
/rant
stay away from EFCore until Q2 at least
no upgrade that to stay away from .net core altogether.. it's in the worst shape i've ever seen it in.. and thats coming from me being in early preview days where it was supposed to be bleeding edge
so on that note - is there somebody pro with nodejs?
 
7:27 PM
You're on the bleeding edge, Maverik
Haven't used Core stuff yet
Or VS 2017
 
>net core seems fine
ef core is mostly OK but the migrations are jacked
Haven't upgraded to VS 2017 yet, waiting for RTM next month
I've got a reasonable size project that runs just fine on it, been doing it for the past couple weeks
the migrations problem took most of Saturday though :(
but if you have any questions Maverik I'd have a shot at answering
 
dotnet rc4 creates csproj files that VS2015 can't comprehend (pretty sure rc3 has the same thing)
so 2017 is imposed on me.. and then i'm stuck in where it is - i've started exploring nodejs :)
PS: i'm not going for EF core because i like this bleeding action - its a dependency of identityserver v4
 
Did you create the project with VS?
 
nope vs can't find dotnet
despite it being installed form installer
 
I think I needed the VS specific SDK and the regular SDK
 
7:38 PM
the csproj created by vs2017 is also vastly different from current dotnet's csproj
 
for what that's worth
 
its just far too much headache - i can get up and running in less time on nodejs that i've never attempted before
 
yeah, they switched the project format, but I thought that was a while ago
 
yea it was - but now everything is broken
 
node.... shivers
 
7:39 PM
but yea.. less time on nodejs because at least it does what the documenation says
already gotten first app up in 5 minutes.. more than what can be said about dotnet at this point
 
Not sure how far you are, but if you can start a new core project in VS15 I had that working just as fast :)
 
 
3 hours later…
10:33 PM
Figuring out memory leaks in bindings sucks 😋
 
when do bindings leak?
no inpc?
 
yeah - that's one place
there's actually a few things that can cause leaks in WPF bindings
 
can we write analyzers for them?
 
no idea how you'd figure it out
dotmemory is good at finding that they exist, but horrible at helping you figure out where it's happening
nasty one is if you have a System.Windows.Point or Rect exposed
 
@ReedCopsey do you have a list?
 
10:43 PM
in a type - even if the point is INPC
binding to item.Point.X leaks
same with Rect.Top / Thickness/ etc
and it's stupid - I get why the leak would exist while the control is there
but it leaks forever
even when you delete the UIelement with the binding, it still leaks :(
 
I don't get it
Is the binding Canvas.Left={Binding Point.X}?
 
 
1 hour later…
11:50 PM
something along those lines
 

« first day (1578 days earlier)      last day (2571 days later) »