« first day (2004 days earlier)      last day (2934 days later) » 

9:00 AM
Once you have a hierarchy of 50 tables and you literally wait for 30 seconds per page load you realize how untuned it is for performance
 
@misha130 I don't have a single web page that loads that slow
regression testing tells me my slowest page load is about 1.2 seconds
 
@misha130 Really? That slow?
 
@Mathematics : actually i want to delete record in datagridview when user selected particular row i written code for that but its giving me error object refernce not set if i write selectedRows[0] and if i write SelectedRows[1] its giving me datagridview index was out of range. must be non-negative and less than the size of the collection. parameter name: index exception

here is my code on button click :

 if (dataGridView1.Rows.Count > 1 &&   dataGridView1.SelectedRows.Count > 0 &&  dataGridView1.SelectedRows[0].Index != dataGridView1.Rows.Count - 1)
 
Yes that slow because of just something that EF wont do
 
@misha130 i'd have to say ... it looks like you're doing it wrong somehow ... but its hard to say without seeing your stack
 
9:01 AM
@Atul that's a big question, ask me in 1 or 2 sentence
 
@misha130 something EF won't do? ... I thought it was bloated?
 
Yes but it wants to do single queries per action
 
@misha130 use include in your queries
 
@misha130: that seems a bit far fetched. EF isn't that bad. Got a sample query of something that is terribly slow?
 
again...if you have a really big scale for this it
 
9:02 AM
@Mathematics : actually i want to delete record in datagridview when user selected particular row i written code for that but its giving me error object refernce not set if i write selectedRows[0] and if i write SelectedRows[1] its giving me datagridview index was out of range. must be non-negative and less than the size of the collection. parameter name: index exception

execpetion line : cmd.CommandText = "Delete from Ledger where AccountNumber=" + dataGridView1.SelectedRows[0].Cells["AccountNumber"].Value.ToString() + "";
 
50 tables one under the other going from 50 to 1
 
var result = foo.Include(f => f.Bar); <-- pulls child prop bar in the same query
 
thanks wadry :^)
 
disable lazy loading, and do as @wadry says, include the ones you need.
 
@scheien I still use lazy loading too ... but I choose when I use it wisely
 
9:03 AM
and use Select() to select only the data you need
 
I already did quit that job but I ended up writing my own queries and hitting much less time
 
@wadry It has its uses. Can still be a pitfall if one isn't careful
 
in other words don't use lazy loading when you are looping a child collection use it when you just want a single child but aren't sure if even loading that child is relevant yet when you run your query
 
@Atul the only way I can see that being possible is if the cell referred to has no value
 
@scheien yeh I admit you have to know what you are doing
 
9:04 AM
It was more like I need all the children and every data possible
from all the tables in the database
 
@misha130 this sounds like a problem I had, I ended up doing a projection to flatten out the data then query the flat set and then return the heirarchy elements based on that
possible in a single query in the end
I was loading trees on to a web page (if its the problem i'm thinking of at least)
 
interesting
 
I had a situation where I had multiple related trees
and the user could pull items from one tree and drop them on another
that would pull the whole heirarchy from that point in to the other tree
 
are you talking about your project for business flow?
 
easy from a ui point of view but fun in the SQL layer
@misha130 na I aint hit that one yet
I'm still in the planning stage
wanna get this one right before I start
someone in here suggested that basically what I was building was a CMS ... not far from the truth I suppose but its a bit more involved than a CMS
 
9:08 AM
@TomW : thanx brother problem has been resolved im not initialized OleDbCommand(); that's why error was occur but after discussing with you and @Mathematics i found error
 
Hi guys
 
its true but instead of tables and rows you have trees
 
can anybody give me idea or any help on this question:
 
but my point is ... EF hasn't failed me yet ... even when managing tables with 20 million+ rows
 
ui wise
 
9:09 AM
0
Q: Extension method to convert string and create new datetime object from it

LearningI want to return 24 hours data from employee shift start time to endtime. This is my table: Employee: EmployeeId,Name EmployeeId Name 1 Abc 2 Pqr Shift: ShiftId,EmployeeId,StartTime,EndTime ShiftId EmployeeId StartTime ...

 
@misha130 yup that's exactly it ... imagine a "treegrid"
 
well for one point I saw how badly they released EF 6
after using EF for 2 years I curse it I hate it
 
I have that but way way way deeper (50 levels+ in places) business people are nuts but hey its wht they wanted
 
lets listen along at work :^)
 
The opening statement makes me wonder already :P
"Some will say OOP has certain advantages and weaknesses, but it doesn't, OOP is always wrong." This makes me cringe.
 
9:13 AM
Hi there. Colleagues, is it possible to define a contract (Contract.Requires) for a parameter of a method defined as a lambda expression?
 
@RoelvanUden such absolutism stinks of "I'm right you're wrong end of story"
 
@RoelvanUden My thoughts exactly.
 
The world is black and white @Squiggle
 
eg public int Foo(a, b) => a + b; - to Require that a and b are positive
 
@scheien The world is just a great big onion
 
9:16 AM
A good comparison:)
 
@Squiggle It has different layers of idiocy and it stinks?
 
@RoelvanUden and tring to do anything with it tends to make you cry
 
@RoelvanUden / and hate and fear are the spices that make us cryyyyy / oh-yeah, baby...
 
@Squiggle read that as opinipn
@Squiggle read that as opinion
 
@misha130 lol i posted that yesterday ... that guy is just plain broken, why does even claim to be a programmer?
 
9:21 AM
@TomW read that as option
 
@zerkms surely if you require that you should be using unit not int
 
@wadry his emberassing video is kind of cherry picking but I dont know
is it just bad developers?
but its professors in university
 
its people just trying to prove they know something you don't or he's view fishing on youtube
 
he replaced "ugly code" that had ifs with a switch
and said "this is much cleaner"
 
like how he says "OOP is the most popular means to do this stuff because its easy" ... like there's no other reason why OOP would be a good thing?
 
9:32 AM
???
 
To be fair, he does make certain fair points.
 
yeh what i got from that was ... replace the code you already had with your code in the same method and bang ... you fixed it ... so what's your OOP point again?
@RoelvanUden my understanding was that the crux of his point(s) if anything were more like "don't solve non OOP problems with OOP, and don't write shit code in the name of OOP"
or at least that's how he should have put it
instead he was like "NEVER use OOP"
 
I dunno, I still have 20m to listen.
I'll form my opinion when I get through that.
 
ah you must be on his "this is how we should do it" bit
 
one thing he is sort of right on that we use too much OOP
we should atleast consider different types of programming
 
9:44 AM
I wouldn't mind have a DI based function stack handle web requests
not sure how I might implement that though
I have theorised that maybe if I had all the component parts I might be able to construct the various bits I have in the various layers as a single method at runtime and just run that
feels wrong somehow though
 
@wadry easy is literally the whole reason programming languages exist
 
yeh ... to make the act of telling a computer what to do less arduous
maybe someone should offer that guy a hard drive platter and a charged needle
with the advice "go steady now"
 
Otherwise we'd just carry on using assembly and accept that DIYing your own macros is as far as you'd want to go with abstraction
 
imagine trying to write a modern web app in assembly
evil
would take forever too
 
yea but in C its quite possible and fine
you'd just have to implement some winsock2.h methods
implement http
 
9:51 AM
wo hold on there blasphemer ... c ... that's way too close to OOP
take it down a level, you're thinking progressively now
next you'll be saying "but yeh, using a web framework and a server would be easier"
 
JUST BECAUSE ITS EASY DOESNT MEAN ITS GOOD WADRY JESUS CHRIST
4
 
lol
 
@wadry the question was specifically about code contracts, which may require arbitrarily complex pre-conditions
 
ez = always good
 
@zerkms isn't that why we have data annotations ?
 
9:55 AM
I mean.. When I play games, I of course pick the ez way to win.. That's why hacking/cheating is the way to go
Just sayin
 
@wadry not sure how it's relevant, those are simply different tools for different purposes
 
@zerkms hmmm i probably have some wires crossed or something nvm
 
@wadry well, just check the code contracts project (which is unfortunately dead though)
 
wasn't that what WCF used?
basically its WSDL descriptions were serialised code contracts (SOAP messaging)
 
Hrrrm different meaning of contract
 
10:00 AM
@JakobMillah so you're a hacker?
 
@zerkms I think it got merged into the main framework, so it's not dead, just administered centrally
 
@TomW I've spent some time finding if it's still alive and seems like it's at least not developed, not sure if we can name it "dead" then
2 of 5 initial developers who were driving it left MS
 
It looks like its just called System.Diagnostics.Contracts now
 
anyway, now I have undeletable (lol) extension in my VS (the code contracts one cannot properly clean up after itself) as a reminder about playing with it
 
It's not dead, it's finished.
 
10:04 AM
I got promoted to senior mobile developer just now~
2
 
Good morning team
 
star that if you want
 
ish
 
@TomW An important distinction lol
 
something that is finished is dead - a software project cannot be bug-free
 
10:04 AM
@zerkms It's not dead. It's alive, and there has been talk of adopting it in Roslyn.
 
@zerkms Yes it can
 
was it? on Build?
 
@zerkms Then every software project in existence is dead according to your standards. No software is ever "finished".
 
Guys, do you believe that C# will soon dominate the Java? :D
 
okay, it's just sloooooooooooooooooooooooooowly maintained
 
10:06 AM
@mark It already does.
@zerkms What exactly is your problem? You want something to be "finished" (thus nobody is working on it anymore) and meanwhile you also want it to be very active. Your logic is directly interfering with your own set of rules.
 
Wow! @RoelvanUden that's nice to hear. :) I'm grateful I'm on the path of C# <3
 
@RoelvanUden I don't have any problems
I just made a statement which one may not agree with, I'm fine with that
 
As long C# is with Windows, it is in the right track :D
 
From my experience, Java is chosen over C# in places where stability is at a premium - banks and financial institutions that want long-term stability for the project. C# is seen as less stable, changing at a much greater pace, and only recently available on non-Windows machine at all.
 
@RoelvanUden and, "no" I do not want something to be "finished" - since everything evolves. The Code Contracts does not comply with the new C#6 features, so it's definitely not "finished" hence I asked my very initial question
 
10:10 AM
I have a program let's call it Program A.

Program A loads another program let's call it Program B.

Program A wraps Program B to provide extendability that Program B does not have, programs C, D, and E use program A to customize program b.

Program A and Program B execute in the same AppDomain while programs C, D, and E each execute in their own individual app domains.

In .NET GC happens on the process level, i.e. All AppDomains with a procress share a GC (In this case: A,B,C,D,E all share one GC).
 
Just use real names, it's a lot easier than A,B,C,D,E referencing X,Y,Z by way of Q,R
 
@Tomwa I'm not sure what you mean by "loads" and "program".
Is B an EXE that can run independently ("has its own GC") or can also be loaded into an existing process?
Could it be that when it's running independently, the Main program entry point holds a reference to the component, while loading it dynamically into A's process doesn't hold it?
 
Yes
@AvnerShahar-Kashtan "Could it be that when it's running independently, the Main program entry point holds a reference to the component, while loading it dynamically into A's process doesn't hold it?"

Not sure.
 
If I create a class that receives an array in its parameter, will that array be a ref of itself defined in main, or a clone of the same data?
 
@Amivit Arrays are passed by ref. If you change an entry in the array, it will be reflected in the caller.
 
10:16 AM
I see, so I have to Array.Copy manually, for every class I wish to receive a copy of this array?
 
@Amivit If you want to create a new array, yes.
Why do you need to clone the array?
 
I see, thanks. Well I have various sorting methods separated in classes, I wish to compare performance using threads too, however in order to do a proper comparison, they should all be attempting to sort the same, unsorted array
 
If you want the details I can provide them.

I have StarAPI (Program A - WPF executable program), Stardew Valley (Program B -XNA Executable Program), and Various AddIns implementing an interface loading through MAF.

StarAPI creates an instance of Game1 (The entry point for XNA) and calls it's run method, it then stores this instance reference in a private field.

With/Without loading mods GC always unloads XAUDIO2.7 (the component of Stardew Valley) prematurely.
All of this causes an "Unhandled Exception" which crashes the program.
 
@Tomwa Run it indepedently where it doesn't get unloaded, debug it using SOS.DLL and use !gcroot to see what's preventing it from being collected.
@Tomwa Is this a component that you yourself hold manually, or is this referenced somewhere deep in the bowels of the XNA libraries?
 
Deep within XNA
I know how to use Windbg and loadbysos to find the exception
But how do I find what's holding it?
 
10:20 AM
!gcroot
 
Right, but when do I call that?
It's easy enough to wait for the exception and do clrstack
But if I wait for the exception it's too late.
 
Do you have any idea if the crashes are consistent? I mean, do you always get the crash after you do x in the game?
Or is it immediate?
 
The crash happens during garbage collection at almost exactly 14 mins
 
Right, then. Just debug the process or take a memory dump at around 13 minutes and see if there's a gcroot on the object.
 
@AvnerShahar-Kashtan hey how do i get the count of 'q' in a basic list?
stringList.where(n => n.string == "q").count?
 
10:26 AM
@AdanRamirez Yes. Have you tried it?
 
var stringList = wordList.Where(n => n.Equals("q")).Count();
 
var count = wordList.Count(n => n.Equals("q"));
 
@TomW oh those contracts ... gah .... never found a nice way to use that stuff
felt like you were using code to enforce codding standards to me ... which is inherently flawed surely
 
You never reaaaally feel how long 14 minutes is until you have to wait it out
 
@wadry it's to enforce expectations explicitly, not just in one's head
that's what we partially do with the type systems
 
10:36 AM
@Tomwa sounds like a classic case of premeture collection ... have you considered using(viagra) { } blocks in your code?
@zerkms yeh just I never felt it gained me anything other than a headache i'd have to explain to the next developer that came along
 
The premature collection isn't happening in my code though
 
have you had better luck with it?
@Tomwa the problem you have is that GC is evaluated by counting references to the object essentially, any object reference that comes from a marshalled point of call cannot be counted .. in other words, when program B is done with component whatever, it gets scheduled for GC regardless fo weather program A is done with it or not
 
A has no idea the component even exists. B is the only one who uses it.
A doesn't create the audio and I haven't yet written the code to manipulate it, B expects the module to stay available but GC unloads it.
 
in your own words from above "Program B has a component which is being prematuraly collected by the GC, which does not happen when Program B has it's own GC. "
that is the cause of your problem right?
 
GC doesn't count references, it just looks for a link down to a GC root. The question is whether an AppDomain barrier causes problem for determining that an object is rooted.
The XAudio component itself probably isn't the problem, since you don't hold a reference to it yourself.
 
10:43 AM
then I have no idea what the hell you are doing
 
@AvnerShahar-Kashtan I've issued a break at ~13 mins
 
what's a "lightbox"?
 
Executed .loadby sos clr
But when I typed !gcroot
I got an exception
 
@StevenLiekens Javascript library that opens an image in a pop-window and darkens the background.
 
0:034> !gcroot
c0000005 Exception in C:\Windows\Microsoft.NET\Framework\v4.0.30319\SOS.gcroot debugger extension.
PC: 50d2bff3 VA: 00000000 R/W: 0 Parameter: 00000000
 
10:45 AM
oh okay
 
@Tomwa A bit over my pay grade, I'm afraid. No idea why. :-/
 
our site uses the word "lightbox" a lot for dialog boxes
 
@StevenLiekens Yes, well, it's an easily abused term.
 
Access violation - code c0000005 (!!! second chance !!!)
eax=144ebbd4 ebx=14619368 ecx=00000151 edx=00000150 esi=1448a510 edi=1448a510
eip=144ab08c esp=1471f860 ebp=1471f860 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
<Unloaded_XAudio2_6.dll>+0x5b08c:
144ab08c ?? ???
 
@StevenLiekens some stupid ass designers thought they would format a javascript dialog box slightly differently and call it by another name
 
10:47 AM
isnt a lightbox an extension of some other library?
and I dont mean dialog box
 
I thought a lightbox was a box though created a dark overlay of the parent page?
 
its literally just a modal dialog
nothing special about it
 
yes
 
It should dim the page though.
 
except that we can have overlapping lightboxes so I wouldn't say they're modal
 
10:48 AM
Lightbox doesnt exactly dim the page
it lights it up, like its name implies
 
also the dimming effect stacks
 
you can also have overlapping modal dialogs ... doesn't mean you should lol
 
It's a familiar UI concept that uses the modal dialog box, dimming the main background, and click-outside-to-close UI concepts.
 
then what makes it modal?
 
exactly my point ... lightboxes were meant to be a modal means to render things like images
people have taken the usage well beyond that now
 
10:50 AM
facebook uses dialogs like that a lot
I remember when they first had that new photo viewer with dimming effect
everyone hated it
now they use that windowing style for everything
 
I like the idea because i dont want to switch pages just for that
 
good morning, probably had some bad soy milk, what should i do?
 
make sure you have enough TP
 
Strap yourself down to the toilet so you don't become airborne
 
(sending this message in toilet)
 
10:56 AM
call your loved ones and say your goodbyes
 
Good luck bro
 
Ask your baby for some diapers
 
11:15 AM
Is there any such thing as good soy milk?
 
I KNEW I SHOULDN'T TRUST ANY MILK
 
in cows we trust
 
is there an easy way to tell vs "use the version of this assembly that your referenced dependencies are using" because its too ratarded to figure that out despite the binding redirection in my config file
 
I don't know how to fix this GC issue
 
> ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded ratarded
 
11:19 AM
yup ... that about sums it up
Error	CS1705	Assembly 'Core.Api' with identity 'Core.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Bullshit, Version=5.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Bullshit' with identity 'Bullshit, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
the dependency says its version 5.9.0.0 when i look at it, the problem project in this case just says it's referencing version 0.0.0.0 ... despite the binding redirection
gawd i thought M$ was better at this crap
 
That was mindblowing
over 9000
 
@AvnerShahar-Kashtan I'm working in C# in the banking sector
 
u has z access 2 z monayz?'
 
11:38 AM
Kurwa!
Im trying to reprogram one of my SP's
And, I need to know on SP level if result returns any rows.
SELECT SUM('dbo.logg' + @parameter1) 'SELECT * FROM logg' + @parameter1 + ' WHERE ' columnName = 1),0);
Been trying with that syntax.
But it is not cooperating.
What am I missing ?
 
o/
 
\o
 
\o/
!!youtube gonna make you sweat
 
;O
 
11:48 AM
@Froxer co kurwa!?
 
god, fuck you monday
 
Kuuuuuuuuuuuuurwa
 
morning Steve
 
morning
 
Sooo when I build for release it crashes immediately
 
11:50 AM
I am getting PJ in my jelly beans about this SQL I am trying to accomplish.
I guess, i should be @ dba stackexchange being PJ about it.
 
what
 
Soon Friday again, no worries BORO
 
Oh Im just stupid
Nope still happening
 
@Tomwa the first step on the road to recovery is admitting that you have a problem :p
 
11:55 AM
Fixed it
Now that I have it launching I can see if I can fix the actual issue
 
I believe in you @Tomwa.
 

« first day (2004 days earlier)      last day (2934 days later) »