« first day (790 days earlier)      last day (3359 days later) » 
00:00 - 20:0020:00 - 00:00

user2509848
00:00
Good night.
user2509848
I have a bug in my code, as usual.
user2509848
I can fix it myself, though.
user2509848
I hope.
Good luck!
The other problem with hats: Precious few look right on a dolphin head
Oh well
user2509848
Be glad you can rotate/resize them.
00:05
No doubt. That isn't enough for some though. The helmet and Aztec hat in particular :(
For example, the helmet looks OK-ish
Apparently chat is slow at picking up the change...
Oh well, trying the Aztec one. My nose is sticking out though :(
user2509848
VS is being a jailbird.
user2509848
I try to compile a phone project, and it compiles the PC project.
user2509848
!lol
that was even funnier
user2509848
00:10
Now I am loling.
Are you just using the standard "Build" command?
user2509848
CTRL-f5.
Thats your problem
user2509848
It does it erratically.
The compiler doesn't see the phone project as a dependency
user2509848
00:10
I have the build project set to Windows Phone.
so it doesn't compile it.
user2509848
No, it does compile it usually.
Add it as a dependency, do a rebuild, or right click on the phone project and select "Compile" from there
user2509848
I have the startup project as Windows Phone.
user2509848
It usually works.
00:11
Ah, that would do it
Did the startup project change?
And now it picks up the hat change
user2509848
No, I don't know what is happening.
Huh, weird
user2509848
Yeah.
user2509848
That hat wouldn't look good on any avatar.
user2509848
Most hats wouldn't though.
00:15
At least your "head" is centered. Makes it a bit easier
user2509848
Yeah.
I like the waffle hat, I think I might have to screenshot that one for later
user2509848
Keep your hat year round?
Or at least bring it out from time to time
Naruto fits pretty well too
I basically have to stick with the flatter hats
user2509848
I like this one and St. Lucia.
user2509848
00:20
Now VS is taking a year to compile it.
user2509848
I'm going to restart it.
Sounds like a good idea
It shouldn't take that long to compile
I like to use BuildVision to help see progress
user2509848
No, I had to force quit it.
user2509848
It really takes about a second to compile when it doesn't have problems.
I feel very sorry for anyone else who has to read this code. Here's one of my format strings:
"{0} {3}.{1} Sn{1}ToApi{1}({2}.{1} srcItem)"
user2509848
00:27
What language is that?
C#
Its just a string I'm using in a String.Format call
user2509848
I wouldn't recognize it.
user2509848
Obviously, because I didn't.
user2509848
I thought maybe it was PHP or something.
The sad thing is is that I'm pretty sure thats the clearest it can be
I could do a bunch of string concatenation instead, but thats just as bad
user2509848
00:31
Put a comment in, at least.
user2509848
Oh, I get it.
user2509848
Like Console.WriteLine("{0}", value) type of stuff?
user2509848
I know about that.
user2509848
That isn't that bad.
00:34
Right
Its just hard to read when you have so many parameters
user2509848
Yeah, it isn't that bad, really.
user2509848
You only have 4, and they are seperated by commas, anyway.
F4z
F4z
If i was to change the Width and Height of a cutton from a different Window on Runtime, How can i achieve this? through databinding or publicly accessing the control?
user2509848
I'd probably bind it to something, but it depends.
user2509848
If you are wanting to change it a bunch, definitely bind it.
F4z
F4z
00:35
I have a checkbox in a different window and when I check that it's supposed to change the width and height of a button in another window. I have about 12 buttons
user2509848
Hmm, not sure, but they might be different threads, and that could be a problem.
Thats a very odd use case
user2509848
I would probably bind to a boolean value and provide a converter.
user2509848
That is, if you can.
Remember, a binding means there is data associated with the view property
I like the converter idea though
user2509848
00:37
If they are different threads, one of them might not be able to access the value.
F4z
F4z
this was my previous method but didn't work
user2509848
I don't know basic.
F4z
F4z
c#?
user2509848
Yes, I know C#.
user2509848
Some C# and some C++.
user2509848
First thing that strikes me is you never initialize your button.
user2509848
Don't even think you display your window after initializing it.
F4z
F4z
my button is in another window, I'm using that button so isn't it already initialized?
user2509848
MainWindow Menu = new MainWindow();
user2509848
Oh, I see.
user2509848
00:44
OK, NVM.
whats this? Fascinating, Ma'am
user2509848
Try passing the value as a ref.
F4z
F4z
is it a complicated process?
am i hatty
You use the ref keyword
user2509848
00:45
Yes.
how long does it take for hat to apply
In chat? A while
Just tested that incidentally
user2509848
See you.
ahh
click ma profile on SO, might be able to see it
F4z
F4z
is passing a ref done like this:
private void ChangeIcons(ref Button _Item, ref int _Width, ref int _Height)
{
_Item.Width = _Width;
_Item.Height = _Height;

}
00:47
Yep, can see it there just fine
That one really doesn't work with a dolphin head
Neither do the other star trek ones
which is sad, I like star trek :*(
F4z
F4z
If it helps, does adding: x:FieldModifier="Public" work?
Yes
to the first one
F4z
F4z
still didn't resize..
not the modifier thing
F4z
F4z
Got it.
I did the reference thing
00:55
Passing by ref could work here, but you probably want a binding
Honestly the whole control view elements from a different view thing is weird anyways
F4z
F4z
var window2 = Application.Current.Windows
.Cast<Window>()
.FirstOrDefault(window => window is Window2) as Window2;
Especially elements like Width and Height
F4z
F4z
I did that then Var.. to get the control
The fact that that code exists says you have a problem
F4z
F4z
my problem is solved
i just wanted to show you how I did it, With the help of another SO post
00:57
I would still try to find a less coupled approach, but I'm glad you got it working
F4z
F4z
the other way would be binding right? but I don't know how ti do it
Something you should learn if you want to unlock the power of WPF
F4z
F4z
is it used widely? guess it is then huh. I just started wpf
I was creating a program in WinForms but i descided that WPF is mroe "pretty" so I just changed, i'm trying to recreate the whole thing
And you hit the "WPF is not WinForms" problem :)
My conversation with James above might help get you started
F4z
F4z
it sure is. wayy different. I'm familiar with a bit of XAML but other than that I really might consider DataBinding
01:05
You'll definitely want to get good with binding
user2509848
Definitely.
SO really needs to go with consistency and fix user profile Question/Answer listings
don't list whichever they have higher of first... list them in the same order every time
Wow, never noticed that
Thats pretty confusing
You should feature request that, though it might be in flux with the profile page updates
user2509848
01:20
This question makes me think "Yeah, until one of them comes along with planes and nuclear weapons."
user2509848
8
Q: Killing all the explorers

Pavel JanicekThe year is 1489, Christopher Columbus is planning to test his theory, that if he sails west, he will be in India much much faster, than going to east. Because he knows Earth is rounded, so this could save him precious time, thus he would find better trade route to India We know he was wrong, be...

user2509848
Multiple bugs removed.
user2509848
More for tomorrow.
01:38
Not measuring a huge perf boost from batching col changes
Prolly too trivial datatemplate
Adding 1000 persons takes ~30 ms with vanilla OC. ~20 ms with batch guy.
I would up that to much larger batches
though it becomes less realistic when you do that
I"m surprised you saw any difference at 1000 to be honest
At 10k it is 300 : 200
gonna try it with 3d stuff tomorrow. It is noticeably slow.
nite
good night
I'm out as well, see you guys later
user2509848
02:24
Done!
07:42
Morning
 
2 hours later…
09:14
Morning
 
1 hour later…
10:16
@NETscape end of story : can't do that because the state of the mouse device which might be checked during the callbacks is retrieved in real time and not passed by parameter of the mouse event...
and I can't create a fake mouse device since its constructor is internal
11:16
Sup?
Morning!
I go away for 1 day and there's 1k messages!
read them all!
i've done that for two years but now i've come to have faith in current mod team :)
I did quickly cast my eye on entire transcript but it looks all good generally so I'm sure everybody kept things in order :)
most def
11:50
I blame André and NETscape
12:04
Always blame the foreigner
I'm a foreigner, so its ok!
I don't talk much, but I always try to clean the stars or give assistance on chat related things
In a talk between me, you and Sean, I'm the foreigner..
(Translation: keep me in power bitches!)
xD
You're always in power
I AM POWER
How have you guys got hats already? D:
12:07
No, you're Sean
Enter SO, inbox thingy up top
Go to Winter something
Winter Bash as always :)
Yeah, that
just turn it on and you get first hat for doing that
"You have not earned any hats yet"
=_=
Haha you're not worthy
12:08
you do have to enable the hat after you earn it
xD
Nope
Just turned it off and on again and no hat
YOU'RE NOT PREPARED
YOU ARE NOT REPAIRED
YOU ARE NOT IMPAIRED
12:50
Sup?
 
3 hours later…
15:23
@franssu can't you copy the event args to be used at a later time?
that's what I did but the mouse's state is not a member of those event args
15:38
well, it is, but it's readonly
i.e from the sources of ButtonBase.cs
 protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    {
        [...]
        if (e.ButtonState == MouseButtonState.Pressed)
        {
create your own even and package the event and the mouse state with it
and MouseButtonEventArgs.cs :
  public MouseButtonState ButtonState
        {
            get
            {
                MouseButtonState state = MouseButtonState.Released;

                switch(_button)
                {
                    case MouseButton.Left:
                        state = this.MouseDevice.LeftButton;
                     [...]
15:54
so... I'm stuck
mhmmm
what part
I can copy the event args, which contain the device, not the state of the device
@NETscape and I can't do that, even if I can inherit from MouseButtonEventArgs, ButtonState is not virtual
16:10
can you inherit from MouseDevice like referencesource.microsoft.com/#PresentationCore/Core/CSharp/… , then create a property that returns pressed state every time
MouseDevice's constructor is internal
so I can't inherit:(
 
2 hours later…
17:47
There is no hat you get just for enabling the feature, if anyone is still thinking that
Oh I won mine by voting on 15/12
12/15 for americans
That was a pretty easy/quick one to get :)
18:17
O i just noticed we have a new room owner :)
well deserved!
whoa
outta no where!
its @Maverik!
I'm going to take a wild guess and assume it was @JohanLarsson ? :)
heh.. dude i'm on holidays!!
i'm about to disappear completely from tomorrow, after I'm done having my way with sean in his new office :D
we're having serious tree traversal problems here homies
poor guy
:D i see MouseButton.Left -- i leave right there
you know how itchy i get with treeview / datagrid problems that involve people tryingt o pull stuff from view
no no no
nothing with events
18:20
oh ok
its managing the items and context menus
I have events for the BaseItem... for instance, "RemoveRequested" ... and I have my VM that holds OC<BaseItem> handle the event
if a nodes child is requested to be removed, I have to check all parent nodes (OC<BaseItem>.Contains) to see if I need to delete it from the VM collection
otherwise, I have to check each parents set of children, and short circuit if possible
which is essentially nested loops
why not have children that are aware of their parent?
sounds like a typical double linked list problem to me
because, why should they, i guess?
Even in a double linked list, Node doesn't know about List
you know double linked lists are a thing for a reason yea?
mm sorry i dont have enough context
but i wasn't implying you literally implement a double linked list
18:24
right... i'm thinking there has to be a way to write a recursive search to find the parent the node is in
i mean, just have children that know about their immediate parent
why search?
@Maverik You have to be careful because that tightly couples the two classes
If they are meant to be that way, then thats alright
Does file.txt know its inside C:\Temp?
true Bradley, but given how much I know netscapes project from past two years.. i'm pretty sure that aint' a big problem
(i'm assuming its the same one netscape?)
well the thing is, is that i've grown as a dev, and i'm trying to stick with good design.
18:26
lol
ok xD
so you've refactored the entire thing (btw good job!)
I don't think Children should know about their upper hierarchy
and this is a different treeview... but in defense, my first treeview doesn't have children that know about parents either :p
I think they can know about it, if it saves headache
but we all know, i'm lenient
as reed would say - is decoupling worth the headache?
this is the exacty same scenario that he tells us about Lazy Loading..
its all the rage, but many times its not really worth it
I don't even know why people go lazy loading route without actually using promises
18:29
I don't know about lazy loading, but lazy enumeration sure is useful
:) yes it is useful.. but having a bound property do "if value == null ? value = new Object() else return value;" is pretty pointless
but you'd see it in plenty of places
there's 0 point in lazy loading that i think
its a bound property, its going to be built as soon as UI is built
Yay VS2015 can't "publish" things >.>
or it can't publish my project at least
should nodes know their parents entire implementation, or just interface?
Again, it comes down to coupling
interface if you can get away with it
An interface is preferred to direct knowledge
@Maverik Sure, that code seems awfully silly
18:33
rule of thumb: go with least amount of coupling without going overboard & causing headache for maintenance developers
^
Also try to factor in potential future features (really hard obviously)
So that the design has flexibility in the correct locations
nod +1
i kinda liked implementing events :(
Nothing wrong with that, though it introduces a small amount of overhead
I find events create a lot more messy code in my projects than they're worth (i could just be plain shite too!! issues of self taught development)
if you like events, you shuold invest time in Rx
reading Rx is far easier than jumping all over the place with events (as a developer who is just reading your code to patch things)
18:37
well i guess it was a learning experience... i had the interface implementation down yesterday, then switched it when i agreed that child don't need to know about their parents
then i was met with the headache, and now i can implement the interface implementation in like 10 minutes
well starting from there is a good idea
@Maverik An event is just a multicast delegate (with public assignment). So instead of saying "You things I know about, do something" You say "Anyone who cares, please note this has happened".
but realising when you should accomodate new feature is just as important
Its just a different paradigm to me, both have their place
Yea I know about that brad (thanks), but i just find that when I'm debugging, I'm jumping all over the place as events fire and react
18:39
@Maverik this happened
Sure. Debugging an event invocation is no fun
i just love the eventful nature of Rx queries and still linear debugging
Granted, I find when I am stepping into an event invocation, I have bigger problems :)
and as the old guys here know, I'm baised towards ReactiveUI (even if Paul Betts, REALLY needs to do something about documentation)
@BradleyDotNET true, but at that time you really don't want to be getting distracted by jumps :D
I had a small app that I wrote with events ages ago.. i then had to debug it to find an edge case
i NEVER wrote eventful code like that again :)
if i need to listen ... .Subscribe() ftw
Absolutley
18:42
Observables are far easier to handle
I think if you are going to deal with events, you have to have a really good handle on the system so you know where the listeners are
yea and hope that you're not leaking things
pretty hard to guarantee as is my limited noob experience
I have this one program that deals with WMI events
its a small service that basically pulls in all processes of different terminal servers via WMI
no matter what i do, the events randomly break in there and WMI keeps leaking
That sucks
18:45
only solution: restart service every 6 hours (nobody really notices it)
I'm amazed at how often I see/hear about that solution to long running programs
basic model of that thing is -- once somebody requests processes, i do a full query to TS but then i register a WMI event
and sometimes WMI sends me duplicate event -- sometimes i don't get it at all
and i unregister out of it once the querying from user goes idle for 5 minutes (like they've minimized app or something)
so yea if i leave it running, it will keep hogging the server until an out of memory happens
first time i found out aboutt hat, it was running for i think two weeks and had hogged up about 3gb
(it starts around 150mb)
We had a problem like that where we leaked an entire view everytime you switched to another one
Fixed it though, and haven't seen much in the way of leaks since
18:49
i haven't had it with anything but WMI based services
Maybe there is just a bug in WMI
so i'm inclined to think it has to do with wmi subsystem / .net wmi subsysterm
yea i did research, the memory issue is an ancient issue
supposedly fixed in 2k8r2 but.. nope
unfortunately that thing is just one part of puzzle and if i make any major change to it, a lot of other services will break
Yeah, changes to core services are never fun
so I'm basically waiting for a generation 2 solution :) which hopefully will happen soon
we're going from central model to decentralized agent model so I can skip wmi shit completely
(for background: I work for a cloud hosting company - and this thing is part of our infrastucture monitoring software as well as offering some functionality to customers)
so new plan is to go all out insane with new agent model and go websocket / signalr crazy to push out events
and finally introduce message queueing into system
that should last us for another 5 years, hopefully! around which time i'll be ready for gen 3 rewrite :)
PS: please feel free to suggest something along those lines (websocket / signalr / message queue scenario) as I'm still in planning stage and I haven't had a lot of exposure to this model
SignalR is reasonable
We are in the process of load-testing it
19:02
I just think its a bit too raw
I still haven't settled on what stack do i want to settle on around it
I've used Apache Apollo, and it worked OK
cool, thanks
19:36
(it is a bool to return to canexecute, determining if anything in the tree is checked)
@Maverik sounds like a project for Sean :)
nah i have shit load planned for him already :D
Seems reasonable
^
and I'm off till tomorrow now.. g'night folks :)
Night Mav
19:57
1   obj1
2   obj2
5   obj3
7   obj4
    obj5
    obj6
    obj7
    obj8
List<int> on the left
OC<BaseItem> on the right
quickest way to remove items at the indexes given on the left
Both indexes are integers?
no
i would delete obj2, obj3, obj6, and obj8 in this case
RemoveAt
which are at index 1, 2, 5, 7
00:00 - 20:0020:00 - 00:00

« first day (790 days earlier)      last day (3359 days later) »