« first day (1825 days earlier)      last day (3173 days later) » 

12:09 AM
@psr Brilliant!
Is someEnumerable.FirstOrDefault(predicate) faster than someEnumerable.Where(predicate).FirstOrDefault()?
 
 
1 hour later…
user55340
1:15 AM
@NickAlexeev Half jokingly, you can work from this list
 
2:34 AM
@psr Holy shit, this works so well that I can right-click, Go To Implementation on TimeSpan, and Resharper will actually download the reference source from Microsoft and open it.
You saved my life.
 
3:06 AM
I believe the two should have near identical performance, as the first or default with predicate calls where under the covers.
At least, the non linq to objects query providers I've seen have done that.
 
 
2 hours later…
5:12 AM
hello everyone , i usually come to this chat room when i get stuck on java problems,
but this time the question when i am lacking the interest in learning java
what you do when you are not interested in learning a computer language and you also know that language is very important for your carrer
@durron597
 
 
6 hours later…
11:14 AM
Umm, I dunno. I learned enough JavaScript to get stuff done, but haven't learned it really.
 
 
1 hour later…
12:33 PM
Happy Coffee Day
@user143252 shouldn't be hard to learn, the question is would it be beneficial for that one spot in your career, or is it going to help you overall across the industry? Don't let company's pidgeon hole you into some 40 year old crap or proprietary stuff that makes you incapable of moving to another company because other company's have no use for your skills.
 
user55340
1:00 PM
@user143252 find a project that intrests you and pushes your boundaries of code... Or can be perfect and beautiful(and then get some brandy, turn the lights low, put on some German electronica and enjoy it)
 
@durron597 thank you, this helped me, implement dictionary.
1
Q: Implementing Dictionary using hashtable with chaining

overexchangeAs mentioned in this homework6, the homework problem is, Part I (6 points) Implement a class called HashTableChained, a hash table with chaining. HashTableChained implements an interface called Dictionary, which defines the set of methods (like insert(), find() and remove()) that a diction...

@MichaelT Good morning
 
1:25 PM
@MichaelT I had a sidecar this weekend at a fancy restaurant for my birthday; had brandy in it, and it was absolutely delicious. I think next time I'm at the store thinking of reaching for a bottle of scotch I might grab a bottle of brandy instead... wish they weren't so expensive, but c'est la vie
 
user55340
Brandy + grand mariner (equal parts)
 
@MichaelT the sidecar was armegnac, cointreau, and lemon juice
 
user55340
You could switch the Cointreau to grand mariner for a variation on it. Switched from a sharp orange to a brandy based orange.
 
@MichaelT this sounds rather good as well... ah geez, it's only 7:30 and wednesday, this conversation at this point in the week does not seem right..
 
@JimmyHoffa SCOTCH
 
1:29 PM
@enderland good point.
 
user55340
It's a long weekend. Start early.
 
oh true!
 
user55340
Btw, I have Friday off, so this day is like Thursday for me.
 
@MichaelT I need to get one of those schedules....
 
Gads I'm a bum, I need to make reservations somewhere fancy for this weekend, 6th anniversary
 
user55340
1:30 PM
9/80 is quite nice.
 
pssh, anniversary. That sounds like a failure to set proper expectations.
 
@Telastyn haha, some of us like to celebrate things we're happy about ;P (even if we're too lazy to actually plan any celebrations, and mostly just want to nap instead of celebrating)
 
user55340
@JimmyHoffa traditional candy / iron. Modern, wood.
 
@MichaelT the idea of pre-planned gifting (which let's be honest, was invented by industry marketing) is way too silly.
(f u Simon, I do what I want)
 
user55340
Traditional is quite old.
 
user55340
1:37 PM
Dates back to Middle Ages superstitious (for luck)
 
hey all, semi-legal question
if you try to download a pdf from a site programmatically, you get 403 forbidden
then you change the User-Agent to something reasonable for a web browser
and it works
does that mean anything legally? like, you are breaking the law / contract TOS by spoofing your user agent
to download something that you could download for free with a regular web browser
 
user55340
What does robots.txt say?
 
@MichaelT *
Context: I wrote this Stack Overflow answer
3
A: Why am I getting content type of a PDF file is returned as HTML?

durron597When I access this page in Java, if I attempt to actually load the page, I get a 403 - Forbidden error. These error pages are HTML pages, not pdf files, so that's why you're getting the content type you're seeing. This site is probably detecting your browser or using some other mechanism to prev...

Which basically tells him to try changing his user agent to solve the problem, but I don't know any of the legal implications of changing one's user agent.
thanks for your answer. How do I know that by setting the User-Agent I am not violating the TOS of the website. Where should I find it? — Rushdi Shams 51 mins ago
 
user55340
None. It is purely advisory.
 
Downvoters, please comment on why you are burying this question. While it might be better suited for programmers because it does not contain any code directly, it is still a valid question about coding techniques and shows effort through research. People, and especially new members like here, might not be aware of this other site and leaving their questions in a bad shape like this is not improving the situation ;) — Etienne Maheu 52 secs ago
 
1:45 PM
I mean, clearly the site is blocking non web browsers for some reason
 
user55340
Is the file in one of those disallowed directories?
 
nope
 
user55340
Then robots.txt doesn't apply to it. User agent is advisory as to the type of content and behavior of the end user app.
 
Why would their server then refuse to serve a pdf file to something with User-Agent of "java"?
 
user55340
Programmer error?
 
1:47 PM
@MichaelT okay
 
user55340
I'm going to serve this to ie, that to safari, this other to chrome. Default? Nope, got all of them.
 
user55340
It's becoming more common with desktop / mobile site differentiation.
 
gotcha
 
user55340
2:06 PM
Gah! @Snowman you were a reopen review audit I missed.
 
user55340
 
2:19 PM
sigh. Not my team, but still:
public class ServiceCore<TBusinessObject, TDto, TKeyedObject, TDataObjectKey> : IServiceCoreFullCrud<TDto, TDataObjectKey>
    where TBusinessObject : IBusinessToDataTransferObjects<TDto>, IBusinessToDataObjects<TKeyedObject, TDataObjectKey>, new()
    where TKeyedObject : class, IDataEntity<string, TDataObjectKey>, new()
    where TDataObjectKey : IEquatable<TDataObjectKey>,  IDataKey<TDataObjectKey> ,new()
 
@Telastyn Oh, great, my eyes are bleeding now. Thanks
 
don't you work with Java day to day? You should be used to it by now :P
 
that's C# if I'm not mistaken
 
it is, but this sort of enterprisey verbosity is more common in Java
 
StackOverflow is a site for people with programming problems that have not found a solution yet. Questions about best practices would probably get a better answer on Programmers Stack Exchange. Here is a recent example of a Best Practice question that was well received. — Rainbolt 1 min ago
 
user55340
2:39 PM
@Duga recent? As in 2013? That's an eternity ago here.
 
@Telastyn My code doesn't look like that.
 
good.
 
2:57 PM
hmmm. so one of the business teams wants me to use data from a production database and a development database together... this strikes me as a bad idea...
sure it's read only but... still
 
smelly.
 
yeah, I'm not a huge fan of doing this, though supposedly the data on the prod is better than dev (no way!) but still... I don't like connecting those datasystems together, period
 
@enderland why don't they just give you a backup or ETL the prod data or some such?
 
So there's been a ton of conversation about how markdown is supposed to work, edge, cases, there's 15 different standards
I never really saw it until yesterday
x***x** doesn't bold anything in an answer. x*x
 
@JimmyHoffa apparently the view only exists on one database (which should be like a 10 minute process to get on another one ??)
 
3:01 PM
it does in chat though. Why??
 
user55340
Markdown is very fractured.
 
It also works in comments.
 
@durron597 I think people have gone a bit off the deepend in the whole idea of trying to standardize this little organically evolved syntax... you want standard markdown format? Use TeX... otherwise, just work with whichever markdown system you're using and call it a day.
 
10
Q: How bold is this post?

durron597Preamble In Stack Exchange markdown, we use ** to bold out text. For example, this markdown: The **quick brown fox jumps over the lazy** dog. Renders as: The quick brown fox jumps over the lazy dog. Of course, we use ** to close boldness as well. So less of the answer will be bold. For ...

 
user55340
Answer markdown is also slightly different than comment.
 
3:02 PM
@MichaelT And chat.
 
user55340
Chat cans comment are similar as they are both on the fly. Posts are distilled and saved as html.
 
happy coffee day!
 
user55340
Happy coffeescript day!
 
@MichaelT Happy golfscript day!
 
I officially love all the skill development that has happened in the specialization towards front-end stuff through the industry over the past 5-10 years. I just spun up an XP VM running IE8 and looked at the site I been working on for the first time - and it looks and behaves flawleslly identical to modern chrome thanks to using all the boilerplate shims et al modern front-end folks have developed to.
5-10 years ago, you couldn't just go online and root around and come up with CSS frameworks and HTML boilerplates that when used instead of writing your own HTML guarantees consistent look and feel across countless clients
the screen resolution on this little VM I have is small - and the CSS library I used which gives me tags and styles to utilize to display/hide/move things based on screen size - and even back in IE8 it's working perfectly so it's displaying the mobile view because it's so small
 
3:22 PM
@JimmyHoffa then you realize that more than half of the boilerplate code is there just for IE8 and down and wish you could just EOL it right then and there.
 
@Ampt sure but I didn't have to write it, and I don't have to maintain it. The only way it effects me is that I use classes from a CSS framework to organize and style everything, which I would do anyway because it makes it easier and more semantic to layout stuff even if I only needed a current browser.
 
3:35 PM
urgh feels like coffee'o'clock
 
/me is half inclined to start a fundraiser to buy jimmy a desk keurig so he stops bitching
 
@JimmyHoffa Same here
 
Then instead of "urgh coffee o'clock" it becomes "mmmm coffee o'clock"
 
user41796
@durron597 he's already got a french press at work. no need for the keurig
 
@GlenH7 He has no hot water at his desk
 
user41796
3:44 PM
@durron597 So he needs a usb powered water heater
 
user41796
Better yet, someone ought to design a GPU / CPU water-cooling system that dumps the waste heat into a coffee cup of water.
 
user41796
And props on clearing 20k
 
but then you'd need to refill the cooling system with some other water
unless you're suggesting recycled waste fluids :P
 
user41796
Easy enough to build in a little reservoir for potable water
 
@Telastyn My company builds the thing on the ISS that turns...human waste fluids...into drinking water. Maybe you can buy one (at some hefty pricetag).
 
3:48 PM
@ThomasOwens reverse osmosis machine?
 
@GlenH7 Thanks
 
user41796
Just get a hella strong UV lamp to kill everything off and then run it through a reverse osmosis system
 
@ratchetfreak I dunno, but it's in space.
 
Doing it while weightless is a different problem than doing it in gravity.
 
architecture astronomy at its finest to improve Jimmy Hoffa's coffee.
 
3:49 PM
@durron597 It's got to be harder, doesn't it?
If you can do it in space, you should be able to do it on Earth.
 
@ThomasOwens if gravity is a problem then you just do it in free fall
 
@ThomasOwens For example, think about how a drip coffee machine works. Do you think you could do it that way in freefall?
Filters just don't work in freefall.
 
drip coffee machine is gravity fed; of course it's not going to work in 0g
 
user41796
I think most RO systems have to apply pressure on the fluid in order to force it through the membrane at a more reasonable rate of flow.
 
@durron597 True. But I'm saying the opposite. Isn't it harder to engineer something when you have much lower gravity? Aren't there a subset of problems that having normal gravity makes easier?
 
3:54 PM
RO needs pressure
otherwise the fluid would go in reverse
 
I'm sure there is also the converse - some problems are harder to solve on a normal sea-level gravity than in space.
 
on the "dirty" side of the membrane the pressure needs to exceed the osmotic pressure or nothing will happen
 
@ThomasOwens Oh, I misread you. I thought you were saying it was easier in freefall.
Yes, gravity is helpful.
 
a tank in 0g needs to be a bladder tank or you need to account for starvation if the dipstick hits an air bubble
 
@durron597 you can't possibly imagine any device or humanly possible thing at all could stop me from bitching about things..
 
3:59 PM
Any experienced JS programmers can volunteer to edit this MDN page. here is the feedback about this page.
 
Ok, scotch might. But that's a superfood and I don't suspect it was made by literal humans. We just aren't great enough to do that.
 
scotch? In INDIA it is the beer brand.
 
psr
@RobertHarvey That's a nice feature.
 
@RobertHarvey Maven does that also, except it's free. And you have to be using Java.
 
@durron597 there's an eclipse plugin for java as well (downloading from docjar)
 
4:05 PM
hello
 
@ratchetfreak Yep
 
I am looking for some firefox batch assistance
does anyone know here some batch?
 
@macroscripts This is probably not the best room
Here we talk about how to clean pee in space, and also drinking coffee
 
@durron597 i am searching all over stack
where can I find the asnwer?
 
What do you mean by firefox batch?
 
user41796
4:07 PM
@durron597 And scotch. Don't forget about the scotch
 
user41796
@macroscripts not in here, sorry.
 
@durron597 batch code that runs firefox
 
@GlenH7 It's too early for scotch. Now is irish whiskey (because coffee)
 
user41796
@durron597 This is definitely a morning for that.
 
"runs firefox"?
 
4:08 PM
@macroscripts You mean windows batch?
To launch firefox, perhaps?
@macroscripts Can you give me a link to a really basic example of what you're talking about?
 
user41796
As I was going to get some hot water for my tea earlier, I was thinking just how much I'd love some coffee with baileys and a touch of whiskey in it
 
@durron597 I wonder if that question will hit hot questions lol
Oh, it's already there. lol
 
@GlenH7 I normally don't like flavored coffee, but I like coffee with baileys, frangelico and/or amaretto
(and, of course, the irish whiskey)
 
irish cream is one of the alcohols I really, really like
 
user41796
It's been quite a while since I've had amaretto, which is a bit surprising for me. Used to really like it.
 
4:12 PM
@enderland If you upvote everything, that will help :-P
@GlenH7 I never think to buy it, but when I lived with my brother's family, my sister in law always had a bottle
Man I haven't had alcoholic coffee in a really long time. Maybe I will this weekend.
 
user55340
4:39 PM
Mods, there is a nice shiny flag for you on meta. I wanted to disengage from the comments.
 
user55340
(I would advise others not to answer it as the comments feel remarkably like bashing ones head on a wall)
 
user41796
4:58 PM
@MichaelT People get wound up about the silliest of things. There's definitely a case of "It's gone, let it go."
 
user55340
I'd feel guilty about suggesting open source or law stack exchanges. While likely not intentional, that would be like migrating Goma to SO. Shifting a problem doesn't solve it.
 
user41796
> "Don't migrate crap"
 
@GlenH7 yet why is that so hard :(
 
user41796
The source question on main behind your recent meta challenges is a great example of why licensing questions could / should be banned. Not that they aren't answerable, but because a decent chunk of the folk asking the questions have zero basis in the matter and can't understand the answers that are provided.
 
user41796
You could extend that argument to some of the conceptual programming questions we get. I think "Unclear" is the best close answer we have in those cases. Where "unclear" really means "you have no clue what you're asking about so we can't even attempt to answer."
 
user41796
5:08 PM
@enderland because mods can't give up their migrate wars... it's like monkeys flinging crap around.
 
user41796
don't forget to pop it with spam flags
 
@GlenH7 I've already flagged it, hah
 
user41796
We will feed the spaminator!
 
So now that I have 20k
My problem is that almost everything I want to delete is mod flaggable anyway
Plus, I already was spending all my deletes daily anyway on regular stuff.
 
user41796
5:21 PM
You get an extra delete vote for every 1k extra up to 35k. Moah votes!
 
user41796
 
oh, not the last one anymore :)
 
user41796
Now it all makes sense. I remember reading that MTWP trainwreck
 
5:47 PM
@enderland because the way close votes currently work strongly encourages people to conflate voting to close as off-topic with voting to migrate somewhere else
 
@Ixrec I think SE would be better off if migrations just didn't exist other than the paths, the extra work for copying/pasting a question that's actually good is way less than the pain of migrating questions that are crap
 
if forced to choose between the current migration system and no built-in migration support at all, I would probably agree that none is better
I think SE could do it in a way that provides huge advantages, but only by separating it from the act of close voting, and instead making work via the target site choosing to receive it rather than the source site choosing to send it
then it would mean that questions good enough to be worth migrating have a chance of getting looked at by people who probably don't have time to stalk every other SE site
 
user15026
I like the on-site guys at my work - they've taken it upon themselves to push to get me the stuff I need access to so that I can help them. (It's stuff I should have had access to weeks ago.)
 
user15026
(That and they are always super patient and willing to walk me through ANYTHING.)
 
I'm sure that this is a duplicate. Should I vote to close it as a duplicate of this or this? cc: @JimmyHoffa @RobertHarvey
Or something else?
Stunned I got the accept here. I expected it to go to the guy who actually quoted JDK authors
 
user41796
6:34 PM
@durron597 Yours provides an answer better tailored to the question. Leading votes answer is just a quote and a brief summary
 
user41796
@AshleyNunn You. Have. The. Power!
 
@AshleyNunn are you liking stuff more now?
 
wow, 6 reopen votes
 
are you kidding me, access violation plus a dump of a callstack in an ETL tool?
 
user41796
@Ixrec on what?
 
6:46 PM
in the queue I mean
usually it's 0-2
 
user41796
@durron597 Short answer is it depends.
 
@GlenH7 finished processing them, they were all closed within the last week or so and all blatantly still deserving of closure, none had even been edited
so...no idea what that was about
 
user41796
Oh, actually. Re-reading that question, it's a flawed premise and belies a misunderstanding of what the MVVM | MV* patterns are meant to provide
 
@GlenH7 I have no idea what you're referring to despite a cursory familiarity with MVC; could you elaborate? (and/or write an answer on durron's upcoming question?)
 
user41796
6:51 PM
Sure.
 
user41796
The main issue with that question is that the title doesn't match the body. The other issue being an unsupported opinion is just tossed out there asking for affirmation or refutation
 
they look like a match to me
agreed on the opinion bit
is the issue that MVC strongly implies an event system so the answer is "just fire an event the same way the UI widgets do"? that's all I can come up with
 
user41796
MVC can be done without an event system. MVVM can't.
 
user41796
MVVM introduces binding of elements between the View and VM. That binding reduces a lot of boilerplate code that has to otherwise be written.
 
user41796
But depending upon the MV* implementation, the model may not even be on the same system as the View and intermediary layer
 
6:56 PM
I've tried looking up the difference between MVC and M-whatever-whatever before but none of the top google hits ever provide anything concrete, so I still have no idea what any of the acronyms are about
 
user41796
ASP .NET MVC is a good example of that - the model and controller live on the web server
 
it's my personal "I'd love to ask this on SE but it's obviously way too broad" question
 
user41796
 
@GlenH7 stupid tangential question: controller on the server sounds to me like every button click needs a server round-trip, I am misinterpreting that right?
 
user41796
@Ixrec No, because MS bastardized the MVC pattern with ASP .NET MVC. :-)
 
6:58 PM
@GlenH7 thanks, an MVC v MVP explanation that makes sense will be a plenty good start
 
user15026
@enderland Yes and no. I am getting more used to things so I feel more productive. There is still a lot I need to get trained on, but it's not as bad as before
 
@GlenH7 I'm both more and less confused by this answer
 
user15026
And I managed to catch a pretty decently sized mail server related issue today before anyone else noticed :D
 
user41796
Ironically, WPF and Silverlight MVVM have all 3 on the same box, and the model ends up calling a service of some sort. ASP .NET MVC only has the "View" on the client, but there's a fair bit in backing code behind that view.
 
0
Q: Why is it the caller's responsibility to ensure thread safety in GUI programming?

durron597I have seen, in many places, that it is canonical wisdom1 that it is the responsibility of the caller to ensure you are on the UI thread when updating UI components (specifically, in Java Swing, that you are on the Event Dispatch Thread). Why is this so? The Event Dispatch Thread is a concern of...

 
user41796
7:00 PM
@Ixrec MS completely drifted away from the Smalltalk origins of MVC when they made ASP .NET MVC. In smalltalk, they are layers of an onion. In MS's ASP world they are completely separate layers.
 
as seems to always be the case with MV*, every metaphor people try to use for it gives me far more questions than answers
 
user41796
And @durron597's version of the question is different than the one the other person was asking
 
which is probably why it won't get closed
 
@GlenH7 Also, my version makes sense.
 
user41796
Quite true...
 
7:13 PM
@GlenH7 Um... it sounds like you're agreeing with me.
You're not explaining why it should be the caller's responsibility, you're agreeing that it should be the view's responsibility. Unless I'm missing something.
 
Um, no. It's perfectly fine to mix and match paradigms. C# is an object-oriented language. Linq is essentially a functional programming library. Using the two concurrently is a perfectly acceptable approach. Functional techniques are a perfectly valid technique for improving your object-oriented code, especially in the area of concurrency. In short, the dividing line you're describing doesn't exist. — Robert Harvey 4 mins ago
 
user41796
@durron597 Who are you saying is the caller in this case? The controller?
 
user41796
Or the View?
 
@GlenH7 See my edit.
 
user41796
Oh... let me think a bit then
 
7:19 PM
@GlenH7 Re: edit; that's the thing, I've been able to achieve a loose coupling in my GUI application by having a view interface package and then achieving thread safety by doing all that work in the view itself.
 
Historically, UI's have always required this of callers. It has something to do with the way the UI is architected; message pump, and all that. The UI has always been what they call a Single Apartment thread; it can't handle being updated from other threads because that's just the way it was designed.
And yes, the ViewModel would be the place to fix that.
 
user41796
So there's a way to write async code within winforms, which basically consists of the View.method() checking to see if it's really the View or not. But that aligns with what you're saying should be going on. I don't know why others are saying the Controller should check to see if it's the View or not and then call the View
 
user41796
@RobertHarvey Is that because the View can't determine if it's the View or not?
 
Well, UI in general becomes hairy because pushing bits to a video card is necessarily serial.
 
user41796
Or is it because once you're in a View method, you can't determine that you're not really the View-owning-thread and can't push a message to the actual View?
 
7:24 PM
@GlenH7 I don't know enough about UI architecture to give you a definitive answer. I do suspect that the continuation model adopted in async await was strongly motivated by the single-threaded UI model, however.
 
user41796
And I may well be wrong in how I summarized the winform async approach then
 
Before async await came along, the usual approach in Winforms was to spin up a BackgroundWorker object. The BackgroundWorker contains events that you can subscribe to that will automatically Invoke back to the UI thread, so that you can update a progress bar, etc.
In the meantime, the UI remains responsive to user input, including pressing a cancel button (by which you can fire a Cancel event on the Background Worker forthwith).
 
all this talk about UI threads just reminds me that we don't have webworkers in any of our internal JS frameworks...
hooray for unavoidable UI blocking
 
@Ixrec you can move the next portion of the function into a setTimeout(foo, 1);
effectively a invokeLater
 
7:30 PM
@ratchetfreak doing 10 seconds of work on the next tick doesn't prevent the UI from being frozen for 10 seconds
 
it does if you split it into 200 ms chunks that you split across multiple calls
 
(actual server requests are genuinely async so it's not terrible, but some parts of the client-side UI stuff can be expensive to update)
hm
 
you'll peg the cpu but events can be handled
 
you mean if I break up one 10s block of code into 1s chunks executing on separate ticks, the UI thread might do stuff in between those chunks?
 
7:32 PM
I'll have to try that
 
see if you can split that update code into distinct phases that you can call separately
 
after I finish rewriting the code so it can load 20x20 pixel art in less than 90 seconds; no amount of async magic will make that acceptable
 
it can be
if you make it show up little by little ;)
 
we have everything ever broken up into promises so I suspect we're already doing a lot of chunking
 
though 90 seconds to decode 400 values?
 
@ratchetfreak it's a bit more complicated than that, long story short I believe we have an O(n^4) algorithm where we could probably get away with O(n log n)
 
@durron597 I'd hide the runnable aspect of it or double check whether you are in the EDT in run()
 
@ratchetfreak Yeah, it probably should be an inner class.
Though, the way my code is designed, I'm almost never in the EDT when setObject is called.
I'm not saying never never to hedge, but I wouldn't be surprised if it was never never.
 
also do a testAndSet for resetting the flag otherwise you might miss an update
(you clear the queue and before the flag gets reset another thread adds a update but sees the set flag)
also isEmpty() is a much better test in the while()
well you can just check the queue again
 
@ratchetfreak Hm, maybe I'll just put the whole class on code review :-P
 
7:46 PM
and to keep harping on about it E obj; while((obj = updates.poll())!=null)doTask(obj); is much cleaner
(even when wrapped in try catch)
 
8:16 PM
0
Q: Class to manage updates coming in from another thread

durron597Managing updates from other threads into Swing is a hard problem. In MVC design, if you don't want to have the Presenter be responsible for Thread safety, you can end up with deadlock issues, and also too many little tasks getting started; not great. I have written a class designed to manage th...

Now you can put these thoughts in a more organized form.
 
8:43 PM
> Durron597,
On 08/19/15, you did something for which we'll be forever grateful - You canceled your Hulu subscription.

It was like a tough love, teaching moment from a 90's sitcom. The saxophone music cued. You sat us down on the living room sofa. And we had a heart-to-heart.

And whether you canceled because of the commercials, for another reason, or at your horoscope's suggestion, we want you to know - we hear you.
 
user41796
@durron597 Did you intend to leave the opening in there?
 
@GlenH7 whoops, no.
 
user41796
edit and I'll purge
 
You'll fix it for me, I know you will.
I can't, it's too old
 
user41796
I like that version better
 
user41796
8:49 PM
Whee! I was useful today.
 
Anyway, the important thing is "no commercials hulu! hooray!!"
 
user41796
I really ought to see what hulu's offerings are. I've been without cable for several years now. But I haven't been watching any TV shows in that time either.
 
@GlenH7 They have a much bigger selection of mainstream tv shows.
 
user41796
All I really want to watch is soccer games...
 
man, this project is a complete cluster of lack of requirements. the only requirements I have are basically wrong anyways
 
8:55 PM
hulu is US only =(
 
@enderland You should quit your job.
 
@ThomasOwens DONE
 
@enderland Probably a silly question, but was the "quit your job" advice ever common enough to be considered an actual problem on TWP?
 
@Ixrec yes, it was
 
user41796
@enderland There was a huge meta post in it, wasn't there?
 
8:58 PM
yeah
 
after reading that Fowler post I've become convinced my brain is simply not compatible with the MV* acronyms
 
user41796
Oh, that's the other bit. How the patterns are discussed frequently deviates from the proper definition of them.
 
user41796
The easiest thing to do is to step back and ask "what are we really trying to do here?"
 
user41796
And then intentionally ignore people who obsess and argue over little details
 
@GlenH7 this is why I never ask anyone at work about these things; we have more than enough real questions to ask each other =)
 
user41796
9:07 PM
We rarely go into the broader aspects of programming for the same reasons. This is my outlet.
 
user55340
Again, read a language of patterns. They are guidelines and broad paths to follow - not specific step by step.
 
our code's a bit weird right now since there's a thing called a model, and there's a thing around it called a controller, which is half of the thing formerly known as the controller which now contains only event handling, and there's a thing called a view which actually doesn't touch UI widgets anymore because we pulled that part out into a thing I called a presenter for lack of a better synonym...and now I have no idea if any of it is named correctly
I've gotten in the habit of referring to all of the above by their filepaths because anything else is too ambiguous
 
user114359
@MichaelT I saw your comment about the review audit on my phone but I was in a day-long meeting (yay!) and couldn't see the full context. I could see how that edit alone would not be enough to reopen a question, assuming it was actually closed.
 
user55340
It is unfortunate that some see them as step by step or building blocks with some XML glue rather than ideas
 
it seems that as long as writing software is a lucrative industry there will always be people that try to do the work that don't want to think
design patterns are one such outlet
 
9:11 PM
oddly enough the main thing I got out of Fowler's post are terms to use for referring to the things I thought MVC stood for which actually are unambiguous, like "Separated Presentation" and "Observer Synchronization"
I can say with absolute confidence we are doing both of those things, despite having no idea whether what we're doing is MVC or MVP or MVVM or MVPTX
 
user55340
Building block patterns also make for nice homework- but that again reinforced the "this is the only thing they can be" mentally.
 
I'm glad my comp sci degree didn't waste any time on them
they'd be even more meaningless in a context like uni where you never work on large-scale software projects
 
user41796
9:29 PM
> Gotta use 'em all!
 
new FactoryPatternManagerDecoratorVisitorSingleton()
 
user41796
@Ixrec There's enough to worry about within a reasonable degree of study without focusing too much on those bigger subjects / terminology.
 
user41796
It's better to know the general reasoning about why you would want to do something than to obsess over details within terminology.
 
user55340
27
A: Choosing the right Design Pattern

MichaelTA key misconception in today's coding world is that patterns are building blocks. You take an AbstractFactory here and a Flyweight there and maybe a Singleton over there and connect them together with XML and presto, you've got a working application. They're not. Hmm, that wasn't big enough. ...

 
user55340
>
Trying to use all the patterns is a bad thing, because you will end up with synthetic designs—speculative designs that have flexibility that no one needs. These days software is too complex. We can't afford to speculate what else it should do. We need to really focus on what it needs. That's why I like refactoring to patterns. People should learn that when they have a particular kind of problem or code smell, as people call it these days, they can go to their patterns toolbox to find a solution.
 
user55340
9:35 PM
(Erich Gamma)
 
user55340
Full quote:
 
user55340
> Bill Venners: Is the value of patterns, then, that in the real world when I feel a particular kind of pain I'll be able to reach for a known solution?

Erich Gamma: This is definitely the way I'd recommend that people use patterns. Do not start immediately throwing patterns into a design, but use them as you go and understand more of the problem. Because of this I really like to use patterns after the fact, refactoring to patterns. One comment I saw in a news group just after patterns started to become more popular was someone claiming that in a particular program they tried to use all 23
 
im just going to pretend that the guy that used the 20 patterns was just some sort of troll
 
the other popular claim about patterns I like is that a lot of them are making up for a certain lack of expressiveness in traditional languages like C; I find a lot of them either don't exist or are too trivial to call patterns in something like Javascript where functions are first-class objects
 
user41796
9:39 PM
@Ixrec s/C/C++/
 
user55340
Everything is a pattern. We just forget about them being so.
 
user41796
GoF were C++ guys
 
in particular, the previous version of the product I'm working on was written mostly in C++, and the core of it is a visitor pattern; the new Javascript-y version works basically the same way but the visitor thing sorta just disappeared somehow
@GlenH7 I had C++ in mind too but didn't know where GoF was focused, gtk
 
user55340
1
A: Are design patterns essential for good code?

MichaelTYes, patterns are essential. I'll refer you to What if I will not use Software Design Patterns? by Eric Lippert in which he points out: Variables are a design pattern. Methods are a design pattern. Operators -- addition, subtraction, etc -- are a design pattern. Statements are...

 
user41796
A lot of what they said was applicable to C as well, but they were very much OO.
 
user41796
9:40 PM
No dirty structured programming for them, no sir!
 
user55340
13
A: What if I will not use Software Design Patterns?

Eric Lippert What kind of problems may I face, if I won't use Software Design Patterns? You'll have the problem of not being able to write any software. Variables are a design pattern. Methods are a design pattern. Operators -- addition, subtraction, etc -- are a design pattern. Statements are a des...

 
"What is a design pattern?" would be such a troll interview question
I guess promises might count as a pattern
 
user41796
does that make broken promises an anti-pattern?
 
depends what you mean by "broken"
though there are a lot of anti-patterns surrounding promises and callbacks
 
I have been asked that in an interview.
 
9:47 PM
did you "pass"?
 
user41796
And hear I was being all snarky... Oh, my achy brakey heart....
 
@GlenH7 … but also Smalltalk. I have found that some of the Patterns are only widely known in their crippled C++ form, whereas the Smalltalk examples provide relevant thoughts for more dynamic languages, e.g. C#, Java, or Python.
 
for a long time I didn't fully understand the whole "promises are about making async code look sync" thing, and didn't realize that return value; inside a then() is a good thing
 
I don't remember. Given my interview pass rate, odds are not good.
 
user41796
@amon That's quite true.
 
user55340
9:51 PM
Don't forget the lisp weenies who claim everything is just a subset of lisp.
 
user55340
> PaulGraham said "Peter Norvig found that 16 of the 23 patterns in Design Patterns were 'invisible or simpler' in Lisp." norvig.com/design-patterns
 
@Telastyn have you gone to the fair?
or are you going to?
 
user55340
Second largest state fair.
 
it is the largest by daily attendance, and it is the largest relative to state population by a big margin
and texas's runs twice as long
 
user55340
10:00 PM
Texas vs Minnesota... Round 1... Go!
 
 
Went last Friday.
I go every other year or so.
@whatsisname
Usually go to the renfair during off years instead.
 
im going this friday
did you see anything spiffy and new this time around
 
10:30 PM
Nice, Karl answering my question kicked it into HNQ 52nd place
take it easy all
 
psr
10:46 PM
@ratchetfreak Maybe add a sentence about 2 callers trying to lock the same set of things but in opposite order is a common way to achieve deadlocks? I missed that on first read even though it's a good answer.
 
11:05 PM
@RubenBaden Might be a good question on Programmers.SE, as I'm not an expert on a huge number of languages. As far as I know, most imperative languages in the extended C family, if you will, behave just as Python does here: a local scope is introduced in the function and global things are not modified unless explicitly requested (e.g., global squared in your example). To me, function scope is almost the most basic type, and I suspect languages that don't have it are languages where the concept of scope is very weak or not present at all. — Two-Bit Alchemist just now
 

« first day (1825 days earlier)      last day (3173 days later) »