« first day (1579 days earlier)      last day (3594 days later) » 

23:00
PheonixBlade could. I never said it was a bad idea :)
Even though it often is
Nevermind.
@Greg Ehh. I'm curious now. What was the question?
@RoelvanUden On that web-site, does the partial class / when he implements the using how does it know to grab entity.
Oh, but you figured it out then?
Sort of, not really.
I feel like the example at those two parts is actually leaving some context out.
23:09
It seems to cover the terrible idea that is repositories on EF. He probably has a model-first database with generated partial entities that he's using.
I'm trying to decipher and learn a bit about building repositories.
@RoelvanUden Is that a really poor implementation?
@TravisJ you can link my discussed question as an example ;)
@Greg No, it seems right for a repository implementation. I just don't agree on the idea of using repositories on top of an EF context.
@Pheonixblade9 - I might include that :)
@BradleyDotNET - How about this version? i.imgur.com/ISmfO1g.png
Do you have a clean, simple project with what you feel is the proper implementation? So I can learn correctly.
23:15
I would just use the UoW. I have a simple Gist of it at gist.github.com/Deathspike/a1c1a85430ee18753d54, and using it in MVC at gist.github.com/Deathspike/9a578e59e62c09893808. @CharlieBrown has a great example too, and uses a more structural approach for larger applications, albeit I misplaced it completely. You could ask him when he's on again :-)
I think thats a lot better
@TravisJ I would include my example where Servy specifically says "I downvoted your answer because the question is bad, not because the answer is bad"
I might add, "Even if they posted an answer to a potentially poor question"? to the end
the question is "is it ok to downvote a good answer to a bad question?"
@RoelvanUden Okay, any aspect I should take a look at to learn?
23:17
@Pheonixblade9 - Yes but I want people to realize that midway through so they don't knee jerk downvote
I am also trying to cast the situation differently than from the bad question perspective.
@RoelvanUden That one Unit Of Work?
@JohanLarsson - Can you remove your chat invite?
@Greg Yeah. EF is essentially a UoW already.
gonna find it
23:18
Going off now though. Happy sleepy time.
@TravisJ it is gone
I still think it would be good if he became a reg.
At least I can use proper flaming.
I don't think having Servy in chat would be good for anyone.
I don't ~know~ him well though. Don't spend much time on main.
To finish off, all I'm saying is that I think repositories on top of EF are bad. Many good developers, thankfully, have the same opinion. There are plenty of examples of repositories and UoW abstractions though, and generally either way will work. UoW is easier to reason about though, IMHO, hence it has my preference. Either way, learning both is not bad!
@RoelvanUden Thank you, I'll take a look at that page.
23:21
@JohanLarsson - I think he alienates users. But I just didn't want the post to get sidetracked by a conversation about chat if I link to it.
I think the invite was fine.
@RoelvanUden - I use a repo on my ef context because I often want to change the entire context's configuration, or take advantage of an async approach, and didn't want to have to recreate that code everywhere.
@Pheonixblade9 - He alludes to it, but doesn't actually mention it specifically.
alludes to what? downvoting good answers to bad questions?
he pretty much specifically says he does that
I think people are familiar with seeing this.
@TravisJ guess I'm too used to the c++ guys :)
23:27
@JohanLarsson - Yeah, they have it down to an art
they have what down to an art? being dicks?
Wordsmith flamethrowing
Let's be honest though. Having to deal with memory management all day would make anyone grumpy.
you surprisingly don't have to deal that much with memory management if you're writing modern C++
you just basically have to treat all variables like using statements and you're fine
:D
23:29
And at least in their case, if some newbie comes in asking a dumb question odds are c++ really isn't the language for them anyway. :P
"go write some Scheme, you plebe"
Hey guys
Any Windows phone devs here ?
I've done some windows store
its pretty similar
@Redaa - I want to get into it but I need Windows 8.1 Pro and I haven't gotten around to buying it.
In my humble Opinion , Windows phone is now the good place to be, because of Windows 10, don't you think so ?
23:31
Windows phone is the best platform out of the big 3. Unfortunately, it came late to the game so it doesn't have much market share
When I can control my surface from a windows phone and vice versa I will be happy.
Windows Phone is easiest to develop for, has great hardware and first party support... and noone effing uses it
Yeah, market share is the problem
even with Windows 10
Smartglass tech is pretty awesome
though one code for everything should be sweet :)
23:32
@Squiggle I really like the new DailyWTF layout.
although that guy in the article seriously needs to shave and get a haircut
do you mean hololens by Smartglass ?
@BradleyDotNET Xamarin has mostly accomplished that
ABSOLUTELY agree with you phoenix, I live in africa and ppl have a bad vision in WP, they think it's a trashy brand that can't do anything at all. it's so underrated
my parents both have Lumia 930's and they're just fantastic phones
@Pheonixblade9 Haven't tried to deal with that tech yet, though it looks promising if I ever get into Android/iOS dev
23:35
Windows Phone also suffered from a lack of competitive hardware (on the higher end) and carrier lock-in/lack of availability issues
@ReedCopsey yep. The new Lumias are arguably better than any Android or iOS device out there though
Anyone knows how do i take a photo each x second (x is between 0.5 and 1 sec), no idea how to proceed
@Redaa that's pretty complicated
have you tried anything?
I'd start with "how do I take a photo"
I did
:D
cool, so next step is
"how do I repeat something every x seconds"
then when you figure out how to do that... you can combine the two
23:39
Will it be exactly 0.5 sec and not 0.6 ?
On Windows there is no way to guarantee that something will happen exactly at a given time
"Exactly" rarely happens with computer timers
0
Q: When is voting on an answer based on the poster appropriate?

Travis JIf a question is a simple question, then it can garner downvotes, close votes, and be deleted. Perhaps it enters the new triage queue. I think that is appropriate. However, in one of the larger posts on this topic, Can we prevent some of the low-quality questions from entering our system?, what ...

Any other approaches , because i really need it to be exactly the user chosen time (default : 0.5 sec )
I have something really ugly and hacky in mind:
var ints = Enumerable.Range(0, count).Concat(Enumerable.Repeat(-1, 5)).ToList();
for (int i = 0; i < ints.Count; i++)
{
    var value = ints[i];
    if (value == -1)
    {
        break;
    }
    Console.WriteLine(value);
    ints.RemoveAt(ints.Count - 5);
}
23:43
@Redaa Not really, you are at the whim of the thread scheduler
pseudocode
@Redaa You can't guarantee it
Why is it so important?
Want to loop an enumerable that can be changed by other threads but don't want locks
@JohanLarsson How does that time anything? Or is that different?
what do you mean time?
23:44
@JohanLarsson why not use the observer pattern?
like Reactive Extensions, I think
@Redaa - is the phone capable of that shutter speed?
@KendallFrey not sure rx is a fit here. depends on how you mean though
I have a list that I will loop very frequently when polling. Things will be added or removed from the list only rarely
Nah
@JohanLarsson There's really no way to safely loop through an enumerable and have the underlying collection change without locking somewhere
guess I could even try-catch-swallow the ints[i] for complete ugly
23:47
@JohanLarsson why not use a ReaderWriterLockSlim then?
@JohanLarsson I forgot, there is BlockingCollection which I found very useful for producer-consumer several times
that'll make it so it only blocks when you're adding/removing
@ReedCopsey sounds right, gonna read some dox
you also probably want to for loop it, not use IEnumerable<T>
for the enumeration/reading
@KendallFrey ah, did not know of that one.
yep gonna for it
23:48
or even while loop to avoid caching the counter
since a for loop will assume single threaded, and cache the count
@JohanLarsson - The list seems to shrink faster than the iterator grows and you break out half way through
Any way to get the scope/context information from within a task when declared as a lambda?
var t = Task.Factory.StartNew(() => { //Can I get task ID here?});
@JohanLarsson What's strange about it?
(I don't think that's appropriate necessarily for what you're describing)
@TravisJ yeah added a bunch of padding elements in the end. Very ugly and hacky,
@TravisJ See, I'm not entirely crazy :) "Reading between the lines, you're not voting based on the poster. You're voting on the fact/hypothesis that the answer is "not useful" because it encourages low quality content on the site. - Mystical"
@BradleyDotNET To me, that's ridiculous, since all your answer does is improve the usefulness of the content on that page
@ReedCopsey Guess I was surprised by the Take and TryTake methods.
@ReedCopsey I previously was pointing out that the vote was about the post, not the poster
Not agreeing with the whole statement made here
@JohanLarsson Well, BlockingCollection is effectively a queue, not a list
@BradleyDotNET Oh, I know - I'm just saying that way of thinking is crazy to me
23:57
Ok, no worries then
@ReedCopsey I think it supports stacks too, right?
then there is also the bag guy, never figured out a use for him. ConcurrentBag<T>
@KendallFrey well, it supports any collection that implements IProducerConsumerCollection<T>
@JohanLarsson ConcurrentBag is when you want a concurrent collection and you want to be particularly lazy about how it's implemented and used
but it works like a queue to that collection, which (by default) is a ConcurrentQueue<T> ;)
@JohanLarsson yeah - it's just a thread safe way to store a collection of objects, where ordering doesn't matter
23:59
@ReedCopsey yeah, queue is a sensible default, a stack would be subject to race conditions if used outside of specific requirements

« first day (1579 days earlier)      last day (3594 days later) »