« first day (1943 days earlier)      last day (2988 days later) » 

12:02 AM
Question, I know you can use NextResult. But if you have multiple results with all different data, what is a good way to do for each different model to know how to associate.
 
@Greg gonna need more context than that
 
I get five data tables, all different poco's.
I need to build them with the old school SqlDataConnection
 
user47589
do you mean SqlConnection?
 
Yes,
 
user47589
you can return the type of poco as part of the result set, i guess. shouldn't each row have the same columns?
 
user47589
12:14 AM
normally a query returns one type of thing, not a variety of types of things
 
user47589
if you have n pocos, you should have n queries.
 
Well, if I have multiple data tables they can be different results.
 
user47589
oh, one query, multiple result sets
 
user47589
my advice, don't do it like that.
 
@Amy Dba said tough shit.
@Amy So, yeah...
 
user47589
12:17 AM
...
 
@Amy Yeah, he won't change it and I don't have access to that data.
@Amy It's a third party.
 
12:37 AM
@Greg - I would try to classify the data present, and then based on that classification use a custom structure to populate the data with which makes sense for that result set.
 
12:52 AM
in case you all thought you had low productivity already, Cookie Clicker 2.0 is out ;)
 
user47589
oh god
 
user47589
i can't go back
 
:)
ONE OF US ONE OF US
 
user47589
My name is Amy, and I am 139 days off the cookie.
 
I automated the clicking. :(
 
user47589
12:58 AM
cheater
 
I couldn't help it. The cookie count wasn't even closed off.
I am a cookie monster :(
5 it is, home I go.
 
I did too, lol
though until you get to golden cookies, clicking doesn't do much
 
1:57 AM
@TravisJ 1,5 hours later. no, i put a ToList() at the end of the query.
and that was the issue. with lazy loading it works now, but i have no idea why i get a timeout with ToList()
pastebin.com/auSAqHqS <- here are my 2 versions of the query. i would appreciate if someone can explain why the performance is so different (SQL Server Timeout after 30 sec. vs a few seconds)
 
 
2 hours later…
3:40 AM
boo
 
4:15 AM
Guys, is it ok to store large strings in Windows.Storage.ApplicationData.Current.LocalSettings?
 
4:35 AM
@WashingtonA.Ramos I think saving large strings would not be problem, you can save it to xml also, but I think LocalSettings will do the same thing(Serialize deserialize)
 
@Jamaxack there seems to be a limit of 8KB to LocalSettings, so I'm trying to use Windows.Storage.StorageFolder. I'm just trying to locate the folder in my computer to see if it's really saving the data or I'm doing something wrong...
 
5:28 AM
What's Best way of connecting to Database and using Queries in C# ? Want to use it on MVC Controller page
 
ako
5:48 AM
hi pedram
 
6:14 AM
7 am is too early for work
i regret this decision
@Pedram best in terms of speed or easy to use/maintain?
if you want speed then use vanilla ADO.NET and write your own queries
and do your own mapping
 
Hi ako
and Steven it's just a Store kind of site, which ppl can register , Login , Purchase a bunch of stuff , i don't think it really need that much speed
 
6:59 AM
 
7:57 AM
Fgsfs stupid train people
YOU CAN'T GET PAST
 
@TomW :(
:( :(
 
THERE ISN'T ROOM
YOU CAN SEE THERE ISN'T ROOM
 
Morning power rangers
 
The finest C-pound programmers around
 
8:13 AM
@TomW If they only squeeze hard enough
What up @Jeremy? Late night coding?
Morning @JakobMillah
 
@scheien Yeah a little bit
I ate a little bit, then the server went down for some inexplicable reason
And now I'm not tired, thanks in part to my snack...
 
@scheien Morning!
 
@Jeremy somebody else doing some nightly maintenance?
 
@scheien Perhaps, but I'd have figured we'd have an outage notice on the internal page
Lots of people use this setup for development. Suspect someone just broke something.
 
Goooood moooorniiiinngggg
 
8:18 AM
^ Moin
 
I'm a little sad... was doing some cool fiddly UI stuff and was excited to see data flow through it :(
 
:(
So my git newbie tendencies really showed off last night
 
So the good thing about working on stuff thats not in prod is no screaming managers
Grumbling, but not screaming
The bad thing about working on stuff that's not in prod is 0 value delivered
 
I still like delivering the most
I like the pressure
But the best thing ever would be to work for myself :D
 
Well, thing is, we're not ready. We haven't been given enough detail about the requirements of the other systems, so we know what we've done won't work, it's not finished
 
8:29 AM
That is rough though
 
Gueta morge!
(trying out my dialects)
 
@TomW Been there, done that. It sucks balls.
God morgen @Squiggle
 
@scheien did you find that when you tell managment about these issues, the next time you talk to them it's like the conversation never happened?
 
Upper management often have this invisible cloak of self-assurance, which can only be penetrated by things they want to hear.
 
@Squiggle hello! Will You take the job?
 
8:34 AM
@ntohl Still undecided :P
 
8:44 AM
I'm leaning towards "yes", because I really like the guy who interviewed me. He's 10k rep, so that can't be bad, right?
 
That sounds good. Would he be your manager?
 
He'd be sharing with me some of his responsibilities.
investigating new tech, prototyping, code reviews etc.
wow I just noticed I've actually asked zero questions on SO
 
You know everything ofc
 
hell no I don't, but I'm never ahead of the tech curve so all my questions have already been asked
 
kappa
 
8:53 AM
can I add custom properties to items in Visual studio solution ?
 
@TomW I feel like that happens every time I bring up something that might be considered a flaw.
@Squiggle Welcome to the zero questions boat. May I take your order?
@Squiggle Same or different company?
 
@scheien different company
 
<div id="categorys"></div>

When I see this... My English might not be flawless, but damn...
Hurting my feelings
 
Somebody skipped their english classes.
 
worked in Berlin. In graphs... What do You have? Parent and Chield
 
9:08 AM
Talked to some irish people in Copenhagen last weekend, and one of the girls says: "you have this accent, your english is bad", and I'm like "well, sure, I might have an accent, but you're still drunk out of your mind, so how could you tell?". Then we all had a good laugh.
 
@JakobMillah could be a typo ? I would suggest growing up and ignore such stuff
 
@Mathematics There are some words that are never typos for Swedes. That word is one of them. But yes, you are right. It's not really a big thing. It's just too common
 
@Mathematics That isn't a typo, it's just bad.
@ntohl haha, awesome.
 
hi
 
Hi everyone
 
9:17 AM
@scheien what's bad about it @coding wise ?
pretty sure you could deal with it without moaning - I used to moan at such mistakes but realized was wasting my time nothing else..
 
It's just a name coding wise. I don't moan about stuff like that, I just fix it.
 
What I do moan about is the lack of commenting
 
If the code is well written, it should be self explanatory.
but yea, sometimes there's still a need for a comment.
 
The code should describe what it's trying to do. Comments help to explain why you're doing it.
 
I do like that one actually provide a comment for the method, to tell what it does, and what parameters it requires.
 
9:23 AM
you mean the /// <summary> comments?
 
yep.
For the backend stuff that doesnt change that often
or shouldnt change
 
Most of the code I see looks like moms spaghetti
 
Still easy to peek into it, but hard to do when you only have an assembly. One could of couse disassemble it, but it takes more time than to just read a short comment.
 
but might just be me :P
 
Shit me. The American elections looks like it might actually be Sanders vs. Trump.
 
9:25 AM
If trump gets it
 
WWIII incoming.
 
This is some compelling car-crash viewing right here
hah if Trump gets in he's going to have a hard time doing anything at all.
same with Sanders, but at least he'll be pulling in the right direction.
 
Sounds like you know more about that than I do, hehe :)
 
It's basically Capitalism vs. Socialism writ large
 
yeah, that I get, but how is it when it comes to law, rewriting, voting, and such? Does everything have to be decided by the senate?
 
9:29 AM
ELI5: "Fear of the Other, money is power" vs "Share the prosperity, do the right thing"
yeah it's proposed by Congress then has to get approval in the Senate.
Trump has the popular vote, but there'll be a lot of rebellion in his ranks - enough to make sure there's nowhere near the majority support in his own party he would need to pass new laws.
"quorum" is a great word
 
Had to look up that one
 
Hate politics
too much bullshit
 
With the politics in America being what they are, Americans look crazy to the rest of the world..
 
So the worst scenario is that Trump, or Sanders would just veto everything, so that nothing changes?
 
Swedish politics looks like kindergarten
 
9:35 AM
@JakobMillah: much the same here
 
Writing cooments is one of our company's rule
because after couple years, other programmers can understand the code
 
/// <summary>Placeholder to reach 90% documented status</summary>
 
9:51 AM
@RoelvanUden Hah. Reminds me of those placeholder summary strings that MonoDevelop drops in for you.
 
Electro/House music when I work.. I get monsterproductive
 
@scheien Since npm3 it doesn't nest npm modules in npm modules. The entire tree is flattened and resides under node_modules.
 
Crazies tend to win primaries, especially the early ones. The especially crazy ones tend to have problems winning the general election.
 
use banana!
 
@RoelvanUden uhm, might be a different version I used, added it through nuget. That shit fucked up the visual studio git provider.
@RoelvanUden haha, yeah, that's useless. Like those who aim for 100% test coverage.
 
9:57 AM
Exactly.
 
@JakobMillah great musics
 
@JakobMillah you should check out Kygo, but I guess you have already heard of him.
 
Good music to develop with isn't so much about a catchy rhythm or melody, but more about shutting out all annoying workplace sounds. And then it's better to have something where you don't focus on lyrics. :-P
 
@scheien House names never tells me anything. But I put on a list now and ye, it's familiar ^^ Good stuff!
 
Music that makes you listen isnt fit for work
:)
 
10:00 AM
@RoelvanUden Exactly
 
I use classic-style music 9/10 times
Fuck that booming shit :P
 
hehe
I play intruments myself, so I tend to get really into whatever I'm listening to.
It's kind of annoying sometimes
 
What do you play? ... Did I ask this before? I don't recall.
 
Hehe so do I :p But house is not my territory, so it's kinda easy for my ear. I like something uptempo
 
@RoelvanUden might have, don't remember either. I play guitar, both classic and electric, and also some piano.
 
10:06 AM
Classic => acoustic I presume :P
 
yeah
Steel strings, not the classic classic
 
Played long?
 
a few years. 5-6 maybe
 
That's not a few. That's quite a bit. You must be able to play quite a bit then
 
meh, some, not much hehe
 
10:08 AM
I'll grab my trombone. We should start a band.
 
hey guys
ok this reporting stuff just got "qwerky"
I needt provide an IQueryable for some complex analytics from some back end linking of and project of data
 
"quirky"
 
@RoelvanUden: I usually end up just playing stuff that I think of right there. Playing around with scales and sounds.
 
0
Q: How do I do Complex LINQ to Entities queries using automapper and EF with unrelated tables

WardySo I wrote a ContractService that uses an implementation of the Repository pattern and EF to deliver CRUD functionality to my API layer above this and in this service I need to join some until now unrelated data. The data cannot be joined because of the way it is stored and you'll see why when y...

@Squiggle lol that too
 
@scheien Ahh. I see. Are you self thought then?
 
10:10 AM
yeah
 
angular guru anyone ?
 
@scheien Sounds like it was quite a hurdle :D
 
hehe yeah
it has been quite a ride
 
@Mathematics you probably want the js chat for that
 
@RoelvanUden: Do you play any instruments?
 
10:11 AM
I used to play the piano
 
@scheien Yes, or at least I try to play it, the Violin.
 
wouldn't mind getting back in to digital music composition tbh
 
@Wardy they hate angularjs
 
for sounds related to games i'm building
 
infact they hate anything related to JS as well
 
10:11 AM
@Mathematics with good reason
 
@Wardy 1. you say your tables are "unrelated"? Is this really true?
 
@Mathematics haha ... also with good reason
 
@RoelvanUden oh that's awesome. Are you taking classes?
 
@Squiggle ok they are "unrelated" in terms of foreign keys references
 
Didnt read thoroughly but...I don't think the question explains why you can't join them
 
10:12 AM
@Wardy 2. You're returning a new AuditedContract() rather than a DB-serialized model. This is going to make it very hard to force the query to resolve at the database level.
 
I'm not sure how I would define a key that is something like "id = id from table with name EntityType" where entity type is a column in the audit entry table
 
@scheien I've started to learn about 3 months ago. I'm nowhere near playing a nice tune yet, but it's starting to come along little by little. Yeah, I take lessons, once every week, and practice every day. I'm currently at melodic pieces with 1 finger :-P
 
@Squiggle yeh that's there as a helper to help people answer the question
to return an EF mappable collection of anon objects would be enough
 
Violin is hard AF...
I've started playing the guitar again after like 4-5 years off.. It's so nice to play and sing some..
 
@TomW joining is not really the problem ... the issue I have is how to inform linq of the right stuff to build the join syntax in the db
 
10:15 AM
@Wardy also argh - c => c.Id == int.Parse(ae.EntityId)
 
plus ... i need the result of a join between 2 tables where 1 of them has been projected
 
fix your database!
 
I've heard that Violin is the most complex instrument to start with, and perhaps that's showing, it's really quite complicated in my opinion. There is so much you need to do just right just to produce a single tone... >_<'
 
storing ints as varchars?
egads, man
 
@Squiggle yeh that's an issue ... the entity id could be a value of a primary key from any table
not all tables have int primary keys
so the column can't be int
and there's no way that i know of to say this column is an object
 
10:16 AM
@Wardy that's fucked up
 
so i can compare any object with it
 
seriously bad database design
 
@Squiggle you have a better idea?
 
If this data is read-only I suggest you write a view and map EF to that.
 
@Squiggle I tried that
 
10:17 AM
because you don't want the bad DB design to bleed into your domain
 
couldn't get EF code first to behave
 
try harder? ;)
 
in a windows forms datagridview you attach a List<someType> to its datasource...later you add items to that list...datagridview should refresh right? #winforms
 
@Wardy Sounds like the system I am working with.. Did you design it? ;)
 
@Squiggle I hit wierd issues ... when i create the view that joins AC_Contract to AuditEntry, when i query audit entry child rows it then generates sql to pull the primary key value from the view from them
 
10:19 AM
or do we have to call something to make it refresh...I can't remember my winforms... :(
 
@JakobMillah hey i'm open to suggestions on how I can improve the design
 
@deostroll Can't remember if you need to refresh manually?
 
@Wardy is there a way you could just persist the concept of an AuditedContract in your database?
 
AuditEntry needs to store auditing information about dynamically any entity that has a marker interface on the type def
@Squiggle because half the fields don't exist ... they are calculated
AC_contract => Contract in code
as a projection
 
ah
 
10:21 AM
then I join AuditEntry to Contract
 
sorry for the misunderstanding of terminology
 
and I need an IQueryable of those
 
@JakobMillah do we require to refresh it manually...?
 
@Wardy my suggestion is to fix your database to 3rd normal form so that things can be queried efficiently.
or restrict your repository to only allow specific types of query
 
@deostroll Yes.. Or if there's an event listener for it. Not sure
 
10:22 AM
@Squiggle what do you mean
 
if this is a read-only system, consider creating a queryable database and transform the source data via an ETL process to something cleaner
 
my repo can get an IQueryable<T> where T is any table
@Squiggle the system as a whole is not read only ... the set i need here however is only needed to be read only
 
am I making sense?
 
@Squiggle how would I go about 3rd normal forming the data? ... are you saying I should have an AuditEntry table for each Entity type
@Squiggle ETL process?
 
I'm saying that given the design you have, you're asking for a really awkward solution to what should be a simple problem
 
10:25 AM
@JakobMillah okay, here is a crazy thing I did...I assigned to null and then reassigned the same object reference (now updated) back...
 
Extract-Transform-Load. Take data from A, clean it up, put it in B.
 
dgv.DataSource = null;
dgv.DataSource = myList; //which is now updated
 
@Squiggle ah ... yeh i think that may be the only way I can go here
 
This was supposed to happen auto-magically if I rem correctly...!
 
huh ... that's basically how a ton of other stuff in the same system works ... never heard of ETL before though
 
10:27 AM
@Wardy ETL - extract, transform, load...what your SSIS is basically...
 
@deostroll we don't use SSIS
 
it's a standard solution for a reporting system. Get your data into a usable form, write reports easily.
 
@Squiggle until now all the data in this db is about day to day busines sprocess
 
what sort of table sizes are you playing with? 1-2million?
 
@Squiggle much smaller ... audit might get there though if the process is wildly successfull
most of the tables are at most 10's of 1,000's
some no more than 100 or so
AC_Contract shouldn't be more than a few thousand
 
10:30 AM
ah. With that scale you could probably hack it, do the queries in memory, and fix it later when performance becomes an issue :P
unless you have blobs of >10MB in your rows
 
that's actually a viable solution ... I was hoping to avoid that though to avoid having to hack it back to how it should be done later
@Squiggle na the rows are tiny
 
I'll leave that decision up to you, then :)
 
I think you guys are right ... i'm gonna have to ETL the crap out of this
I have a funny feeling that the follow requirements will need it anyway
 
Don't over-engineer a solution. You just need to clean up the data somehow.
SSIS isn't a simple package. You might be able to achieve the same thing using Windows task scheduler and a large SQL script.
but srsly, that column that stores ints as strings and might refer to foreign keys that may or may not exist in one of many different tables... that smells absolutely rotten.
 
Sounds great
Especially if the foreign key is named something completely different
 
11:01 AM
Hello guys
 
@Squiggle I alrady have a hosted servicing framework thats doing daily processing on this data, I can bolt on steps to solve this problem by doing the ETL bit
 
👍
 
I've just had a whiteboard tech chat about this problem, the boss has suggested taking the normalised approcah and generate an audit table for each type
 
i have one registration form where user can upload his/her single profile pics
 
@Wardy that sounds surprisingly sane
 
11:02 AM
I now just need to figure out how to do something like this in EF
 
so i want functionality where after selecting image i want to display progress bar and preview of image
 
AuditEntry<T> where each T results in EF storing the AuditEntries for a T in its own table
 
don't bother doing ETL using EF. Get your hands dirty in SQL.
then query that nice clean data
 
I recall from head ram that when I did this before EF wanted to create a single table for the base AuditEntry type
I'm hoping that if I tell EF to ignore the base type and mark it abstract I can keep the generic approach in place
 
and on click of save button i will save whole things and just name of image in database and image will be saved in my local folder
so any help ??
 
11:04 AM
at the moment it's nice because I can just mark any T : IAmAuditable and it starts auditing stuff that happens to all T's
I want to keep that
@Squiggle Normalising the data like this should sovle the problem because is then have a foreign key constraint and non of that odd int.Parse(key) rubbish going on
I thought this was bad when I started seeing that ...
 
precisely
 
just means we end up with a lot more tables in the db ... hardly a problem if its well structured data
business logic should be dead simple though
I can do a normal projection I think to get AuditedContracts using AutoMapper
and it should still sit in the db until the query is executed
hey @Squiggle do you know if there is a way to create a multiple DbSets in an ef context from a single type ?
I basically want to do stuff like this ...
class Foo { public ICollection<AuditEntry> AuditTrail { get; set; } }
class Bar { public ICollection<AuditEntry> AuditTrail { get; set; } }
I need to get the child collections in to their own Tables in the db
not something i've tried before ... i spose I could use a generic ... maybe AuditEntry<T> in some way
 
anyone used workflow foundation before? I'm looking at ways of organising all of the business processes we have.. stop people filling up MVC controllers with hundreds of lines of logic
 
yep I use WF a lot here
it works OK. Versioning workflows is a pain, but that's always going to be true.
 
@AlexH WF is great ... I would use it a lot more if i could figure out how to put the WF designer on a web page
 
11:17 AM
@Squiggle:Hi
 
hey @Learning :)
 
@Squiggle:check your hangout
 
@Squiggle @Wardy thanks, two endorsements means it's worth a look!
 
@AlexH are you trying to manage long-running workflows? approvals, orchestration etc?
 
if not busy
 
11:18 AM
@Squiggle there's a couple of processes which can take ~2 weeks+
and a few shorter ones like registering for the main site, and filling out some sequential forms
 
@AlexH the most difficult things we discovered about WF were persistence and versioning.
 
@Squiggle terminology ... is someone using BizTalk too !!!
brutal tech that
 
@Wardy ain't nobody got time for that shit
 
i'm not usch a big fan of BizTalk
@Squiggle lol
 
@RoelvanUden yep. and with it being fretless, it's even harder to hit those clean tones.
 
11:20 AM
@AlexH my advice is: You can quite easily use WF to orchestrate stuff, but don't try to extend the activities with your own code. Make it interact with a REST or WCF service that does the real grunt work.
 
@Squiggle +1 to that
 
@Squiggle ok thanks. Will bear that in mind
 
at best create a dead simple basic workflow step to call an endpoint then just parameterize the crap out of it
or does WF now have a REST calling step?
 
yep it can make web calls quite easily
I like how you can make your own complex actions through composition, too
 
how does versioning become an issue?
Like I know it's typically an issue with anything, but is there anything specific which is a PITA
 
11:23 AM
@Squiggle why is it whenever life gets hard in programming you see composition used
otherwise the usual case is some basic inheritance lol
 
composition <3
I'm generally avoiding inheritance in most things now
 
Composition seems to be able to handle all those "I'm going to ruin your life" type problems
 
I like Golang. It has implicit and explicit interfaces, but no inheritance.
and it works just fine
 
Oh god, BizTalk
I'm cursing it right now
Main issuebwith it right now is that developing runs at a glacial pace because the deployment process is SO FING SLOW
A CI build takes 40 minutes
Most of that is deployment
 
glacial
 
11:37 AM
!!youtube It's My Belly Button (Song)
 
I've spent (wasted) all morning trying to get one test run to work properly so I can commit
 
@TomW I know exactly what that is like
 
Also, mstest insists on recompiling solution of ~100 projects on every test run, anyone have any idea how to stop that?
Sanders should propose a law that allows users to force vendors to fix bugs
Instant vote from anyone who uses tech
 
11:53 AM
@TomW brake down the solution
@TomW that would put pretty much every software company out of business
@TomW its frustrating but how can we set a higher standard for other developers than we set for ourselves ... I bet you write buggy code at times and don't always have the time to fix it or have more important issues to deal with
 
@TomW they'd just get around that by reclassifying bugs as 'documented features pending further implementation'.
 
@Wardy yeah I do, but it's my employer's problem what I spend time on, not mine
 
@Wardy broken software is often caused by lack of clarity in requirements. You would expect a Vendor to have a better grasp on what their software is meant to do, right?
 
@Squiggle you would think that, but I know pretty deeply what my code is supposed to do ... that doesn't mean the requirements I have been given are actually what was intended (written languages are open to interpretation after all)
 
aye
and therein lies the rub
 
12:00 PM
@TomW by that logic, your employer should accept the fact that you might on a whim put them out of business because they are liable for your not delivering buggy code
 
Rub.
 
we also have to accept that not all developers are senior devs that completely understand the technology they are working with throughout their working life
in other words ... shit happens
 
12:17 PM
@Squiggle ROFL
 
dat SQL...
 
12:31 PM
@Wardy that's generally what's understood by the term 'employment'
 
Good Evening
 
@Wardy that vendor could put me out of business by releasing software with a bug that they refuse to fix. Selling software comes with responsibility
 
@TomW you don't have to agree with that vendors licencing agreement or pay for their software
 
In what other context can you pay for a product that doesn't work, and not be entitled to redress?
 
12:49 PM
@TomW broadband
mobile phones
 
Yeah, that old subscription chestnut
But that's ok to you?
 

« first day (1943 days earlier)      last day (2988 days later) »