« first day (1916 days earlier)      last day (3035 days later) » 

user47589
2:00 PM
hey, chill
 
@RoelvanUden If I passed an Iqueryable, then my UI is actually the one making the query call
 
@Amy Sorry.
 
@RoelvanUden and people tell me I should be more diplomatic
They'd love that line here. They'd say it's very Me.
 
user47589
sentences @RoelvanUden to 5 minutes in the corner
 
noooo banish him from the KINGDOM!!!!
 
2:01 PM
hey guys which is best practice if you have an input field that is incremented dynamically with a max capacity of 10 input fields and needs to be stored in the database. 1.To have one field in the db storing the inputs with some sort of character seperator. 2. To have 10 input fields in your db each storing the matching created field
 
we want blood, we want blood, we want blood...
 
M J
hi guys
 
@TomW Hah! I'm allergic to incompetence, and get annoyed, so I feel you bro.
 
or 3 some other suggestion is welcome
 
@Michael your UI should never be doing queries
 
2:02 PM
your *
 
FUCK fixed
 
huehuehuehue
 
y'all taken the SO survey yet? meta.stackoverflow.com/questions/314186/…
 
user47589
@RoelvanUden me too
 
"How old are you?" Immortal is not an answer
 
2:04 PM
@Squiggle ugh in the new bracket 35+
 
lol
Do you believe in aliens?
 
@juanvan 30-34 still, thankfully :)
 
this is my answer: THEY ARE NOT ALIENS THEY WERE HERE FIRST WERE THE ALIENS
 
* WE'RE
 
WERE-ALIENS
 
2:06 PM
...my god
 
NO
RAGE HAS NO GRAMMAR
 
@Squiggle mouth hanging open, stogie stuck to bottom lip
 
*Rage doesn't have any grammar
 
All of you
kill yourselves
 
+_+
 
2:07 PM
to all stupid put "grammar" in your asshole
2
 
user47589
no
 
hey @Squiggle can you advice on my question?ps:sorry for pinging you just this 1ce
 
user47589
you can't cast grammar to panini
2
 
@RoelvanUden uh, what?
 
user47589
2:08 PM
no asshole overloads accept an argument of type Grammar
 
Only type "Panini" is accepted
 
@GotaloveCode one-to-many table structure. Don't have fields like Value1 Value2 Value3. It smells.
@GotaloveCode and don't ping :P
 
@Squiggle -_- Number of woman on the team, do they have to be real women or does Bruce count as a woman
 
"Is unit testing worth the effort?"
lol
this survey
 
@juanvan is Bruce legally female?
 
user47589
2:09 PM
ping (PONG!)
 
He Won woman of the year
LOL
 
which is unbelievable
what a fucking joke
 
as a woman I would be Pissed
 
okay so is that choice 1 or 2 am totally confused
 
@Amy Grammar g = new Grammer(new Panini() {cheese,bread,meat});
boom
the constructor knows whats up
 
2:11 PM
@SteffenWinkler Eh?
 
user47589
you still can't pass a Grammar into your asshole. do you not grok polymorphic panini?
 
@RoelvanUden You wrote that ToList is terrible?!
 
wait
 
How else do you get a Queryable to spit out it's results?
 
2:12 PM
@SteffenWinkler enumerate it
 
@SteffenWinkler ^
 
but only as far as you actually want
 
user47589
you illuminate it
 
public class Asshole{}

public class Panini : Asshole {}

public class Grammar : Asshole{}
 
user47589
Panini inherits from asshole!
 
2:13 PM
lol
 
user47589
stop it, you're going to make me laugh out loud at work
 
If I've an IQueryable that'll return 100 results, you want to write 4 lines of code for something that can be done in one line? @TomW @RoelvanUden Why?
 
@Failsafe composition would work better
 
asshole has to be the base class
 
panini IS_A asshole, not panini _HAS_A asshole?
@SteffenWinkler what if I don't want 100 results?
what if I want the first 10?
 
2:14 PM
This is an example scenario Person 1 does 5 activities. So I record as 1.input name="person" dynamically added so 2.(textarea name="activity[]") *5 @Squiggle then have db fields as 1.person 2.activity but seperate them with some special character or something?
 
@SteffenWinkler Efficiency. If you return a ToList of a table that contains 100.000 records and I want to show 10, shouldn't I be able to create a query that only selects the top 10? ;-)
 
@TomW then you should've filtered the data on the database
 
Well, that's exactly what IQueryable is doing
 
double ping my bad
 
that's the point
 
2:15 PM
@TomW uh yes. Filtering data should be done by that thing that was build for it: Your database
 
@SteffenWinkler Yes.. and that's why IQueryable exists.
 
It is doing it, if you use IQueryable correctly
 
Everything else just makes your network slow
 
@SteffenWinkler IQueryable filters data at the database
 
@Failsafe that'd only be possible if you've absolutely nothing between your database adapter and your View
 
user47589
2:16 PM
"35. When evaluating a new employment opportunity what's most important to you?
(select up to 3)" i selected all of them
 
@SteffenWinkler No, it works with Queryable projections too.
 
What book should every programmer read
 
@RoelvanUden but where is your data converter?
 
the pragmatic programmer?
 
user47589
I put Code Complete
 
2:18 PM
I mean, you've the data type of your object2relational mapper. And you've the data type that is used in the rest of your application
where do you convert between those two?
 
user47589
considered putting Knuth's "The Art of Computer Programming", but that's a set of books.
 
Zen and the Art of Motorcycle Maintenance: An Inquiry into Values (ZAMM), first published in 1974, is a work of philosophical non-fiction, the first of Robert M. Pirsig's texts in which he explores his Metaphysics of Quality. The book sold 5 million copies worldwide. It was originally rejected by 121 publishers, more than any other bestselling book, according to the Guinness Book of Records. The title is an apparent play on the title of the book Zen in the Art of Archery by Eugen Herrigel. In its introduction, Pirsig explains that, despite its title, "it should in no way be associated with that...
 
(in my case I've to since we have to be able to support multiple databases)
 
To make a long story short, @SteffenWinkler, if you're pulling a bunch of stuff you don't need, you're doing it wrong. No ifs, no buts.
 
@RoelvanUden I entirely agree with you on that
 
2:20 PM
Well then, you probably misunderstood what we were complaining about.
 
I guess...
but now I'm actually curious how you bind from your view, over your viewmodel to your model to your db adapter and then getting it to execute that queryable on the database
to me that sounds like black magic o_0
 
Your claim was that ToList() isn't stupid and is actually essential.
How does ToList() help with this problem?
 
user47589
well, ToList isn't stupid.
 
user47589
how its used can be
 
in the context of returning a large dataset from IQueryable
 
2:23 PM
@TomW suppose I need to get every contact that has the name 'Winkler' from a database: myContext.Contacts.Where(contact => contact.Name.StartsWith("Winkler")).Select(filteredContact => new AppContact(){Name = filteredContact.Name [...]}).ToList();
 
@Amy Not stupid, not essential. :P
@SteffenWinkler Why the ToList at the end?
 
^
 
@RoelvanUden because my dbadapter returns a List?
 
@SteffenWinkler But why
Why not an IQueryable<T>
Then you can still change it on a higher level.
 
> From time to time I encounter people who attempt to express an API in terms of IQueryable<T>. That's almost always a bad idea.
 
2:25 PM
@RoelvanUden because it'd result in an exception higher up
 
@SteffenWinkler But why would it?
 
Okay, question. If your trying to be in a agile development shop. Which you know my shop doesn't use structure, has a lot of Web Forms being migrated to MVC with just jQuery all over the place.

I'm pushing for Ember / EF / Unity / WebApi

But my boss is too scared about a steep learning curve and not enough people knowing how to use those tools, and not being able to just throw jQuery or throw shit together. He mentioned Angular over Ember, which I'm not to keen on Angular. Anybody have some stuff to push and drive the point that our shop would be better off with the above?
 
correct me if I'm wrong but if I'd return an IQueryable there, I'd need to keep the db context alive, right?
 
IQueryable<T> : IEnumerable<T>, and passing IEnumerable<T> to a view is a well-used pattern
 
2:26 PM
because else it wouldn't be able to fetch anything from the db
 
@SteffenWinkler Of course.
 
@RoelvanUden well then.
 
You must have some kind of request-based context...?
 
the lifetime of a request is not an unreasonable amount of time for a dbcontext to live, no?
 
Or do you create new contexts for every little thing
 
2:27 PM
@TomW but it was hammered into my brain that if something implements IDisposable you pack it in a using
 
@TomW This
 
@RoelvanUden that -> connections are one-per-request
 
IQueryable for your DAL access and you return an IEnumerable to a view
 
@TomW IME the answer lies somewhere between the two arguments
 
LOL question 42:
 
2:28 PM
and if I were to return from that method the using for my db context would close.
 
The stupid people check
 
Which in turn would result in an exception in my view because it can't get the IQueryable to evaluate
 
@SteffenWinkler >_<' that's a decision I can't agree with. Why would you want that?
 
var asshole = new List<Panini>();
 
@RoelvanUden see here for example: programmers.stackexchange.com/a/142068/60669
 
2:30 PM
@mikeTheLiar It would have to be Asshole.Add(new Panini());
and also Asshole.Add(new Grammar());
 
51
A: Creating database connections - Do it once or for each query?

pdrIf you create one per query / transaction, it is much easier to manage "closing" the connections. I can see why common sense dictates that you should open one and use it throughout, but you will run into problems with dropped connections and multithreading. So your next step will be to open a po...

 
Asshole() is very flexible
 
Well, if you work at it
 
@Failsafe I'd avoid the use of Add() - I'd prefer to Upsert()
 
lol
 
2:32 PM
@SteffenWinkler In HTTP it's really easy, one request = one context. Closing and creating contexts all the time defeats the purpose of the change tracker in the first place.
 
@RoelvanUden I've ha da bunch of projects that had that going. SqlConnections being opened and never/not always closed. SqlConnections being reused (because they weren't closed first). From my experience leaving SqlConnections open just results in problems especially if you have multithreading going on. Which the writer of that answer agrees on.
 
That's just common sense.
 
@Failsafe What is this conversation even
 
@RoelvanUden well then. How do you make sure that the sqlconnection serving your IQueryable is closed?
 
@SteffenWinkler You dispose of at the end of your request.
 
I know that
but
 
@SteffenWinkler In HTTP, upon receiving the request, create context, when you send the result, close it.
 
3 mins ago, by Failsafe
Asshole() is very flexible
just wow
 
@Failsafe @RoelvanUden Okay sorry I had to go to a meeting.

But instead of extracting things out dataaccess repos your saying I should just put Using(contexts) everywhere?
 
@RoelvanUden yeah, HTTP. How about a real C# application?
 
2:34 PM
There seems to be some question as to whether grammar is a sub-class of panini
 
@SteffenWinkler So HTTP is not really C#? Wow.
 
@RoelvanUden HTTP is a protocol ;)
 
@SteffenWinkler I imagine at the begin and close of your view. Makes sense to me.
 
@RoelvanUden but one view can have multiple tables and maybe I need to refresh or I want to write something down etc etc
 
Then refresh.
 
2:36 PM
it'd be neat to have it that way, but I'm having a hard time understanding how you'd do that cleanly
 
have the view have multi partial views that can refresh independently from the main view
 
@juanvan true, that would work.
also wouldn't you need to have those connection objects referenced somewhere?
 
would use the same Repo contexts?
 
@Squiggle about that JetBrains thing, do you know if it has a cross-platform UI designer/framework support as well?
@juanvan ah right, yes.
 
@SteffenWinkler are you setting up your dbcontext with EF?
 
2:42 PM
@Michael no.
using LinqConnect by devart here
 
@SteffenWinkler oh i see
 
@KendallFrey what's the problem here
 
@SteffenWinkler well still, did you end up encapsulating the context (data access calls) in repos or what?
 
you got a problem with Asshole()?
 
> you got a problem, Asshole()?
 
2:44 PM
Im gonna tear you a new Asshole()
 
@Michael I've a database adapter that is referenced by my MVVM models.
 
@SteffenWinkler That wasn't mentioned in the announcement.
 
@Squiggle ah, damn. Then it probably doesn't
 
I'm doubting they will prioritise the creation of a wysiwyg WPF editor etc.
 
we really need a cross platform UI framework with proper support and stability and functionality
or rather I need that
 
2:45 PM
I don't think WPF has been implemented in Mono, has it?
 
@Squiggle you think correct. Those fools decided to port Silverlight (aka the second coming of flash) instead of WPF.
 
hybrid/webapp ftw
 
well, then. Xamarin, perhaps? or Cordova? Cross-platform UI stuff seems best done with HTML5 these days.
 
@Squiggle isnt xamarin == mono?
er Xamarin : Mono
 
2:47 PM
@Failsafe no.
Xamarin is a company that, nowadays, uses Mono for their products and is still involved in the development of Mono.
 
no, it's like asp.net == .net
 
Xamarin is also a product
 
but for some reason they're very focused on porting mono/.net to mobile platforms
 
Nettie
 
@Squiggle I thought Xamarin.Forms was only for mobile/Apple stuff?
 
2:49 PM
@Squiggle what jetbrains thing?
 
I thought Xamarin(company) made Mono first the made Xamarin(product) based off of mono
oh i guess not
 
@CuddleBunny see pinned link. They're releasing a new cross-platform C# IDE based no ReSharper tech.
 
Xamarin was monogame or something like that
 
I guess Xamarin just sponsors mono
 
@Failsafe nah Xamarin was founded a few years ago. Mono is much older.
 
2:50 PM
@SteffenWinkler I think Xamarin.Forms is also good for desktop apps
 
@Squiggle just checked, apparently only for Windows.
Xamarin is a San Francisco, California based software company created in May 2011[2] by the engineers that created Mono from wikipedia
 
@Squiggle Wait, Xamarin.Forms for Desktop? That's new.
 
@Squiggle oh, I suspect the primary motivation is ASP.NET 5 on *nix platforms
 
@RoelvanUden apparently. At least they write it on their website that you can use it for Windows Store apps
 
@CuddleBunny yep.
 
2:51 PM
@Squiggle @CuddleBunny Well microsoft did partner with xamarin
 
@SteffenWinkler Windows Store apps can very well simply be Universal apps for WP
 
@CuddleBunny @Squiggle which actually looks feasible now
 
I was playing with NancyFx/Owin and VS Code on my mac the other week. It's almost usable!
 
In 2 years Xamarin Studio will be inside visual studio
 
@RoelvanUden ah, okay.
@Failsafe there is already an extension IIRC
 
2:52 PM
the tech is actually there - it's just the tooling that needs to catch up. JetBrains is doing well.
 
really?
that was fast
 
aspnetcore doesn't have a bunch of the libraries I take for granted but it works really well
 
yeah Xamarin plugin for VS has been around for a while
 
@Failsafe I thought it was coming in v2015 tbh
 
2:53 PM
@SteffenWinkler wow
 
@Squiggle the tooling isn't even that great in VS. There is a lot of command line stuff
and damn MAX_PATH errors in NPM =.=
 
i won't feel surprised if i hear msft acquire xamarin someday this or next year
 
@tweray that's what i thought was gonna happen at build 2015
i was waiting for it
im excited for .net CLI
 
maybe this build
 
im not going to this years build
i went to the past 2
 
2:55 PM
i feel like right now it's already somehow that way, they are just not making it public so msft haters can be more relaxed about using xamarin
 
and i bet they are gonna giveaway a hololens
 
I've never been to build, my boss won't pay for it
 
I'm betting it won't be long before MS tries to use something Chakra-based instead of Node...
 
@CuddleBunny I paid for it myself
i dont want to represent my company
 
my boss doesn't pay me enough to pay for it myself either...
 
2:56 PM
lol
 
but I'll be on a plane to Japan when BUILD happens this year
 
lol
 
user47589
i wanna go to japan!
 
Hi guys, can anyone please tell me what is the recommended way to calculate size of an image that is base64 encoded as string? Should I convert this to bytes first to calculate or is there any other way? I basically need to limit image upload to 512 kb for max size.
 
going for extremely delayed honeymoon
 
yeah, honeymoon is 10000x more important than that damn msft shit
 
Oh, I thought you meant going to a MSFT thing in Japan for your honeymoon
 
I need to get me to a conf this year. Any suggestions for one around Europe?
 
user47589
i would go to a MS conference for my honeymoon
 
@Squiggle TechEd europe
 
2:58 PM
hello guys, I have a problem with "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''" Anyone knows what is this about?
 
@TomW that's gonna be some really sad honeymoon you know
 
i think it's in spain
 
@Amy yeah, I saw that one but just want to ensure that 4*Math.Ceiling(((double)s.Length/3))) is the way to go as per that question.
 
@Failsafe It hasn't been announced yet. Think it will be in Barcelona again?
 
@Squiggle yea
 
user47589
2:59 PM
why wouldn't it be the way to go?
 
unless msft give you some previlige so if you are on honeymoon you can skip the line to experience hololens
 
it's been there the past couple of years
 
posted on January 14, 2016 by ericlippert

Thanks to everyone who came out to my beginner talk on using functional style in C# on Wednesday. I had a great time and we had a capacity crowd. The video will be posted in a couple of weeks; I’ll put up a … Continue reading →

 

« first day (1916 days earlier)      last day (3035 days later) »