« first day (2012 days earlier)      last day (2977 days later) » 

6:00 PM
if I was more talented I'd make an image that was something like "not sure if serious or trolling - wait definitely trolling" :)
 
user41796
@enderland Well, I just realized why they don't let the newer generation bots vote. Look at what happened to gnat's voting patterns
 
plot twist: Stack Exchange really is in the business of perfecting AI and most users are experiments from them
 
user41796
Hopefully they revised their 3 rules after the earlier AI versions.
 
"making the internet a better place" sounds suspiciously like this XKCD...
 
user41796
Yep, MFA.
 
6:07 PM
well, it's about programming and is asking a specific question, so if that is off topic here, where should I ask it? — ChrisBint 42 mins ago
hrm. should having to rewrite many of your test mocks be a sign of a bad test design or just... a large refactor?
I guess the fact that I'm changing the things that were previously mocked differently seems... the cause, so that's not "too" bad I guess?
It just feels wrong. hah. though it's helpful for refactoring to make sure all the logic stays the same to have to fix tests...
 
user41796
Just sounds like you're refactoring the code base is all.
 
I guess by definition my tests have to fail. since the underlying calls I was mocking changed...
 
user41796
Y U BREAK UR CODE?
 
experimenting with replacing some of the stuff I wrote with an API
 
IT tip of the day: nothing solves problems with indirection like more indirection
 
user41796
6:21 PM
Now you have { undefined } problems!
 
More indirection, more planning, more process, more people, more money, more abstractions... not the solutions to problems.
 
@Telastyn but job security :(
 
user41796
You just fled a job with lots of security
 
:-)
and am quite happy about it, tbh
there. more clear what I meant :)
 
sorry, I had a meeting this morning where I found out that senior leadership thinks our date is unrealistic, so they're going to go through a big long estimation process (again) to come up with a new date.
since the process worked so well the last time.
 
6:36 PM
humbug. Do more work, create more code, construct more crap, all so that we can have an easy way to do less, which is actually a hard way to do more, instead of just not doing it all to begin with. Where'd I put that glass..
Defaults: Because nobody knows what they're doing, including the people designing the defaults apparently!
 
heheh
 
mumble...grumble...
 
configuration is evil - always.
 
@Telastyn which is why it should be utterly stringy as hell. It should be oversimplified beyond all belief because anything else will turn it into the spawn of satan. True Facts.
Anytime someone thinks their configuration system needs a feature added to it; there needs to be a Configuration Leprechaun that just leaps outta the corner of the dimension with a left jab, and disappears back to the corner of the dimension.
 
just add a few more user options, can't be too hard right?
 
6:42 PM
> I want my configuration system to allow inheritance of pop smack pop ouch!
 
though I guess, in some systems, if your answer to that is "not too hard" it means you designed it well
 
A) I didn't design this system, B) adding a few options is one thing, it's when you want some defaults for those options which are occasionally one way and occasionally another but you want it to just automatically be occasionally one or another without any work to change the setting saying which way it goes that makes me want to bite people. Full cannibal mode; f'real.
 
Speaking of not too hard, I felt like my multiple inheritance demo last night was not too hard, so that says a lot for Python, I think... :)
 
@AaronHall MI is easy in some languages, but always solves a problem that would be better solved a different way
 
@AaronHall speaking of python, is there any data structure in python that matches this format for catching multiple exceptions?
 
6:46 PM
the best configuration system I've used was a POCO that got serialized out to json. Pretty much all the code just used the typed POCO and didn't care where it came from.
 
I had incorrectly assumed it would be [e1, e2] instead of (e1, e2)
 
I don't think you can solve this better than with multiple inheritance: gist.github.com/aaronchall/ae173ef9343f30d10a28
You mean suppresses exceptions like pass does?
 
no, I mean more like why the datastructure for (e1,e2) is not [e1, e2]
 
tuples vs lists?
 
yeah. is there a significant meaning for why the "except" would take a tuple instead of a list?
 
6:48 PM
Why can't you use a list?
 
or is that... relatively arbitrary
@AaronHall it seems to require the tuple for that
[e1, e2] does not catch both exception types (perhaps neither?)
 
I know that unassigned lists are transformed to tuples as a minor optimization (since you won't be mutating them)
 
o_O
 
so one would think using brackets should be ok
probably the parser only allows tuples as an optimization for the exceptions?
 
I'm not sure. I guess this is less trivial than I thought, I'll work up a MVWE
 
6:50 PM
Maybe you could get that changed, try the Python mailing list
 
I'm curious more than anything
 
@enderland The docs says the syntax there may be odd due to backwards compatibility with older syntax. Maybe a list there triggers older syntax parsing?
 
@Telastyn I wrote one of these that just uses XML from the app.config to serialize to POCO. You define the configsection to be DynamicConfigurationSection and in the heading of the section you put type="Some.Type" and the DynamicConfigurationSection deserializes it to POCO. In code it's just DynamicConfigurationSection.Get<Type>("name")
it's still more overhead than simple JSON but it fits nicely with the .NET approach.
 
nod
 
@Keen not sure. I'm writing an SO question :)
@Keen I think that refers to Exception, e vs Exception as e
0
Q: Why does handling multiple exceptions require a tuple and not a list?

enderlandConsider the following example: def main_list(error_type): try: if error_type == 'runtime': raise RuntimeError("list error") if error_type == 'valueerror': raise ValueError("list error") except [RuntimeError, ValueError] as e: print str(e...

 
7:00 PM
@enderland Right, the old syntax 'Exception, e' is blamed for why we need to use a tuple there. I bet that a [Exception, e] would also trigger the parser to think you're using the old syntax.
@enderland thx, i'll be watching that.
bah, i miss being able to edit chat messages for longer periods.
 
user55340
@Keen too bad we can't make you an honorary blue for the room.
 
7:19 PM
@MichaelT do blues get longer chat message edit times?
oh blues, yes, of course
thought you meant italics
Owners don't get a longer period than non-owners, do they?
 
user55340
@JimmyHoffa nope. We just get to move and pin.
 
@enderland The answers to that are astonishingly unsatisfactory. I strongly assume someone just implemented the except clause as a proof of concept with tuples, then forgot to properly design the features. Now hordes of SOsians and mailing list dwellers are trying to do weird post-hoc justifications about tuple efficiency. Some language design grows organically, as in, covered in *bleep*
@AaronHall, would you enjoy submitting a PEP to end this madness?
 
@MichaelT how do you cleanly solve this without multiple inheritance. (No time to actually read that and figure out what it's talking about and work up a solution m'self right now)
I've faith non-MI solutions are better in effectively every scenario, if you take the time to find a good non-MI solution.
 
my personal impression is that whenever you think you want MI, what really happened is you painted yourself into a corner design-wise and are looking for an easy way out instead of addressing the core issue
 
^^
or in the parlance my colleagues have gotten used to hearing from me; you need to simply Try Harder
MI is an x/y solution
 
7:34 PM
and half the time the answer is "just use composition, it's not even that hard"
 
I think the MI problem maps somewhat cleanly to MI, but using MI is by no means necessary. The alternative solution is to create a system of roles, where each soldier has exactly one role. The role can conform to an “Archer”, “Horseman”, or “Flying Rain of Fire” interface, the last of which subsumes the other two. The special commands can only be given after retrieving a view onto that soldier through that role. This solution is only multiple subtyping, not multiple inheritance.
 
oh it was the codeless code thing, I hadn't even followed the link yet
 
user55340
@JimmyHoffa that's part of the problem. MI is one of the distasteful approaches... Though not an option at all in Java at the time of writing.
 
Java even allows the thing that's sort of like MI but actually not terrible
 
user55340
The idea is soldier as a base class. Archer a d horseman as subclasses and then... Yea a mess with that last one.
 
user55340
7:37 PM
@Ixrec default methods go a ways at resolving this.
 
user41796
> Oh hey! This requirement I hadn't mentioned and completely derails what you've already been doing is one we can't budge on. Sorry about that!
 
^ half of our potentially decent questions do this =(
 
user41796
I'm just irked because it was a last minute curve ball during what was supposed to be the final presentation.
 
7:55 PM
@amon I don't think I'll be proposing a change. See my answer for why.
 
@MichaelT Ok, my turn, let me look at this and see what I can solve...
 
It might be worthwhile looking at the types of questions that are on topic at programmers.stackexchange.com. — R Sahu 31 secs ago
 
So if I understand correctly:
Soldiers can FightToDeath
Archers can FightToDeath, and ShootFoe
Horseman can FightToDeath, and TrampleEnemy
RainOfFire can FightToDeath, and ShootFoe, and TrampleEnemy
@MichaelT is this a correct assessment of the situation?
there's pieces of knowledge as well (rank, horse name) etc
 
@amon was it just the one answer that was lacking? I only see two total - one of them being Aarons
 
user55340
@JimmyHoffa rof can also charge.
 
8:01 PM
@AaronHall Your quite extensive answer does a poor job of answering the question, but contains one interesting thought “we appear to be doing type checking for the special case of a tuple. It would certainly make the code slower to add another type to check for”. But why do we have to check for specific types, rather than just testing for iterability? Until shown something like a design document or a quote from the designer, I'll just assume this feature simply wasn't designed at all.
@enderland There's a self-deleted answer which I commented on. I'm dissatisfied with all answers, but least dissatisfied with Aaron's (see above)
 
@amon I need 10k rep on Stack Overflow! haha
 
@enderland I'd bounty you 500 if they hadn't added 25k permissions
I am sort of interested in site analytics, not enough to answer any crappy java questions though
 
HA
 
I also don't buy the “allowing anything except tuples would be slow” argument. It would be truly trivial to optimize a tuple literal to a more efficient type matching implementation rather than actually allocating some container. Part of the problem making this inelegant is Python's extreme late binding. We don't know that an identifier refers to a type until it is evaluated, in contrast to Java where we need special syntax for multi-exception handlers.
 
SoldierRole { FightToDeath(), Rank }
ArcherRole { ShootFoe() }
HorsemanRole { TrampleEnemy(), HorseName }
RainOfFireRole { LeadCharge() }

Army {
  Dictionary<Name,  SoldierRole> Soldiers
  Dictionary<Name, ArcherRole> Archers
  Dictionary<Name, HorseManRole> Horsemen
  Dictionary<Name, RainOfFireRole> RainOfFireMembers

  AddRainOfFireMember(string name) {
    Soldiers.Add(name, new SoldierRole())
    Archers.Add(name, new ArcherRole())
    Horsemen.Add(name, new HorsemanRole())
    RainOfFireMembers.Add(name, new RainOfFireRole())
there's one simple compositional approach
 
8:08 PM
@amon tuples are also only marginally better at memory usage than a list and seriously who is going to have something like Exception (e1, e2,... e99999) anyways :)
 
I actually remember one case where I wanted to have non-hardcoded exception types in a catch clause, though that was in Java.
 
@amon +1, I don't really understand the why any better than i did before reading your [Aaron Hall's] answer
 
it sounds like the answer is there is no why
 
^^ @AaronHall as we've said before; you'd really benefit in your communication/instruction towards other developers from learning more languages and getting out of your Python bubble
I've found lots of your answers to be a bit confusing and I think that's somewhat why, you should try to broaden your perspective a bit
 
finally read Aaron's answer, I have to admit I'm also confused; there seems to be an argument against making your exception tuple/list a variable that can be changed by other parts of the code at runtime (which, tbh, would be insane anyway), but I don't see anything that explains why a literal list would be any worse than a literal tuple
 
8:20 PM
@Keen that's how I feel on SO chat. :(
 
user55340
@enderland but why would you ever go there.
 
@Keen did something change?
 
@BarryTheHatchet I used to have a diamond.
 
ooh, you powered down
you don't even seem to have a SFF account any more??
not so Keen on SFF?
 
Thanks guys, still trying to improve it, but I'm at work too...
 
8:27 PM
@Keen oo, drama? drama drama? We get none of that here; the most dramatic event we have is when we look in our mugs and can see the bottom. Spill! What fun!
 
missed msgs dammit
 
@BarryTheHatchet rand was elected moderator there, so I had my account removed.
 
user55340
@Keen and broke the election page too. Bravo.
 
So I guess we're a refugee camp now. @BarryTheHatchet was a refugee escaping the travails of TL, but one refugee doesn't make a set. @Keen if you come by way of escape hatch route from SFF then we've got a set which is technically an entire demographic now.
 
@Keen I don't understand why an election result causes the staff to remove your account. Does SFF follow a different model?
 
8:28 PM
sigh
 
like mods are participants in the hunger games
that could be fun?
 
@BarryTheHatchet ...i requested the account deletion.
 
user114359
Whoever voted to migrate this to SO... please don't. — Snowman 40 secs ago
 
@Keen oh right I see
that's one heck of a protest vote.
 
i don't like to half-ass things. i whole-ass them instead.
 
8:30 PM
u ass
 
:( no one has answered my last Scifi question... alas, it's probably way too hard
 
user55340
@BarryTheHatchet the past activities of the newly elected mod caused some drama in the election and even spill over on MSE.
 
ok well welcome to the Whiteboard where the biggest problem we have is that people keep asking questions on Stack Exchange
enjoy :D
also feel free to suggest new nicks that I can use throughout the year.
 
@enderland looks it up That'll be a hard one to answer, if you include his participation in destroying the second Death Star.
 
@enderland meh, it's a bit of a "research for me plz" question :/
 
8:32 PM
@Keen nah, just the direct kills
 
user114359
@enderland link? I can't be arsed to find it myself
 
@BarryTheHatchet that's like 95% of scifi questions
 
1
Q: How many confirmed kills does Wedge Antilles have?

enderlandI have been rereading some of my favorite Legends Star Wars books and it occurs to me... Wedge Antilles has a lot of kills. It seems that he consistently is getting multiple kills in every engagement in each of the books and he is in a lot of books. I understand that many of these are in non-Dis...

 
one might suggest that if you want to know the answer, watch the movies and count 'em
cos you're basically asking someone else to do that for you
@enderland sadly so
 
@BarryTheHatchet If the rest of SO is The Hunger Games, and this is the sanctuary for escapees, that makes this the rebellion headquarters. I guess that makes me the crazy bald lady; @GlenH7's scotch participation makes him Woody Harrelson; so @MichaelT must be Phillip Seymour Hoffman.
 
8:32 PM
@BarryTheHatchet it's the EU books that I'm more interested in ;)
 
@BarryTheHatchet Worse than that, it's asking about the many books that include Wedge as well.
 
@JimmyHoffa can I be the hot one?
@Keen enderland is "whole ass" too :D
 
And I bet he had kills pre-ANH too.
 
@Keen yeah, question is how many of them are documented
 
user114359
@Keen I don't even know what character that is
 
user55340
8:33 PM
@Keen ohh - canon fights! Legends vs Disney.
 
you star wars heathen @Snowman!
 
@Snowman SPOILER he's Darth Maul's mother
 
@Snowman He's like a B-level Star Wars character. One of the handful of people to survive the attack on the Death Star in ANH, the Empire's attack on Hoth in ESB, and the attack on the second Death Star in RotJ.
 
(and had the good sense to stay away from TFA)
 
user55340
Rogue squadron IIRC.
 
8:34 PM
@Keen honestly though - I'm always curious how people come upon this little corner of SE, especially given the growth it's seen over the past year or so- what did link you here?
 
@JimmyHoffa he has been here quite a bit
 
@JimmyHoffa After leaving SFF.SE, I was looking for other chat rooms. Picked this one since I'm a budding programmer.
 
@MichaelT yeah. he is the founder of Rogue Squadron, not to be confused with Rouge Squadron
 
user114359
@enderland Rouge Squadron must be where the men of Rogue Squadron go to "unwind" after a tough battle
 
@JimmyHoffa I can't remember how WB came to my attention tbh
it's not like I frequented Programmers
heck, I still don't...
 
user114359
8:37 PM
And I haven't read any of the Star Wars books or seen anything other than the movies. So I don't know all of those obscure details
 
@Keen Unless you're a budding software designer, your interest in this chat room is off-topic.
 
@Keen ah, just dropped into P.SE and looked for it's room then?
 
all the obscure details I know are from browsing SFF
 
user55340
I will note we do advertise it in close reasons, help center and meta faqs.
 
user114359
@BarryTheHatchet lolwut? We also talk about coffee and whiskey on a regular basis.
 
8:38 PM
@MichaelT true, but then it would probably be well known how he got here as we typically mention to each other to watch for a drop-in and link the source Q/A in those events.
 
user114359
Not to mention @JimmyHoffa's rants on various random topics.
 
@Snowman cough s/programmer[s]/software design[er]/ :D
 
@BarryTheHatchet you probably mistakenly sent a "migrate to programmers" comment
 
@BarryTheHatchet maybe we should change the name of the site?
 
@enderland heh nah I've been aware of Programmers.SE since the early days; I just don't know how my Whiteboarding came about
probably via a chat flag or someone oneboxed a particularly stupid message into the Lounge
 
8:39 PM
@BarryTheHatchet I know, but I suspect there was a comment chain of argument about it
 
@JimmyHoffa hey, good idea! can't believe I never thought of that
 
@BarryTheHatchet you showed up around same time the TL had a couple of shitstorms broadcast all over via MSE and chat flags; You could have gotten linked around MSE or other places
 
and I'm the expert at changing names!
@JimmyHoffa lol you make it sound like the Lounge wasn't constantly a shitstorm broadcast all over via MSE and chat flags
anyway the upshot is that I'm here now and I hate you all <3
so what have I missed? been away a lot lately.
 
user114359
wtf another name change? I finally saw the Supergirl avatar.
 
8:44 PM
@JimmyHoffa Yup.
 
user114359
:28084085 what's disgusting? I have no idea what you're talking about :-)
 
@Snowman To be fair I did give you like two weeks' warning
@Snowman huh? not sure what you're referring to!
haw haw
so I'm back on Docker work this week. finally going to finish that whole thing
in fact, hah, that's why I came in here! /cc @JimmyHoffa
 
heh I've been working a ton with Docker the past month ;)
 
I had a chat-like question to ask y'all, then kept the tab open because it was an ongoing project. and just sort of forgot to leave
@enderland I saw! Did you ever get that routing problem solved?
 
@BarryTheHatchet ... not really - the answer basically is (I think) that docker really doesn't like talking between networks
 
8:47 PM
@enderland well that was stated in your question
 
I think that's basically the answer, though
 
not a very good answer ;p
 
Speaking of Whisky; @GlenH7 you ever finish that bottle of Connamara?
 
it's a con, mara!
 
user41796
@JimmyHoffa Long gone
 
9:03 PM
@enderland Looks like we need to ask Antoine Pitrou: github.com/python/cpython/blame/…
 
@GlenH7 Where's it rate on your scale?
What're you working on now then?
 
@JimmyHoffa An aged GlenH7, obviously
 
user41796
@BarryTheHatchet "Forgot to leave?" I'm reasonably certain there's several of us in here who could help with that... :-P
 
user55340
@psr good and related read! And non-trivial.
 
9:07 PM
@GlenH7 :(
 
user41796
@JimmyHoffa Definitely on the positive side, was a very enjoyable bottle
 
user41796
@BarryTheHatchet No need for frowning faces, just letting you know that we're here to help.
 
psr
@MichaelT Makes the excellent point that you really shouldn't assume your business rules will happen to match the static typing rules of your language.
 
I'd get screamed at for that level of sarcasm
 
user41796
@BarryTheHatchet Nah, I would hope not
 
9:14 PM
@GlenH7 to be fair, I think that's basically the reason all of us are here.
 
user41796
Probably more truth to that than I care to admit
 
user114359
@JimmyHoffa you can check out any time you like but you can never leave!
 
room topic changed to The Whiteboard: General Discussion for programmers.stackexchange.com Pants optional when telecommuting. [coffee-day] [horror-stories] [xkcd.com/1305/] [my-code-is-compiling] [scotch] [the-other-monitor]
 
it'd be nice if that showed the before and after
 
user41796
@JimmyHoffa meh, that doesn't work as you would hope
 
9:17 PM
room topic changed to The Whiteboard: General Discussion for programmers.stackexchange.com Pants optional when telecommuting. [coffee-day] [horror-stories] [xkcd.com/1305/] [my-code-is-compiling] [scotch] [the-other-monitor]
@GlenH7 not really; no. Fuck it though. It's up to others to figure it out. Not my job.
 
user41796
How do you really feel about that?
 
user114359
room topic changed to The Whiteboard: General Discussion for programmers.stackexchange.com Pants optional when telecommuting. [coffee-day] [horror-stories] [xkcd.com/1305] [my-code-is-compiling] [scotch] [the-other-monitor]
 
user114359
@JimmyHoffa I give up too
 
what are you trying to do?
 
user41796
They're trying to break tag links link to the comic instead of the prog's tag page.
 
user114359
9:22 PM
clearly
 
yeah. clearly. ...
 
user55340
Almost works on mobile... But that's mobile.
 
room topic changed to The Whiteboard: General Discussion for programmers.stackexchange.com Pants optional when telecommuting. [coffee-day] [horror-stories] [my-code-is-compiling] [scotch] [the-other-monitor] [xkcd-1305]
now it should work..
@GlenH7 need your approval on my tag wiki...
 
user114359
@JimmyHoffa I approved it
 
user114359
probably needs one more
 
9:26 PM
there.
 
wow that is depressing
probably doesn't help the acoustic song I'm listening to is "Never Meant to Belong"
 
user55340
You know some day the big Y is going to go "WTF is this?"
 
user41796
@enderland Life frequently is. passes over a glass of scotch
 
user41796
@MichaelT That's exactly what I was thinking
 
the big Y?
 
user55340
9:28 PM
Say not his name so it's harder to find that message.
 
hahahaha
gotcha
 
user114359
@MichaelT I assume that is the Greek letter Y?
 
user41796
It will expire off in a week anyway, right? No Q associated with it
 
@GlenH7 hrmm, that's sad
 
user55340
@GlenH7 has wiki. Not sure.
 
user41796
9:30 PM
@Snowman It is the Alpha and the Omega. All is encompassed.
 
user41796
@MichaelT Then we can declare: Science!
 
user55340
@Snowman Υ♦️
 
@GlenH7 or irony
 
What's the right site to discuss handling technical interviews where the interviewer got the answers wrong?
 
user114359
@PhilLello none of the above. The subject of the question may be on-topic, but not as an interview question
 
user114359
9:32 PM
19
Q: Why do interview questions make poor Programmers.SE questions?

MichaelTOccasionally a question that is asked at an interview comes up - "how would you design Amazon Web Services" or "how would you write Google" or some such question. These questions find their way to Programmers.StackExchange in hopes of getting an answer for the next time they are asked on an inte...

 
44
Q: How to tell a interviewer that he is wrong on a technical question

VivekYesterday I went for a job interview at a product based company. In one of the interviews the interviewer asked me a question that I answered correctly (I have cross checked it) but he kept on asking me the same question again and again. First I thought maybe he just wants me to get confused and...

 
the part about interview etiquette is for The Workplace, the actual technical question itself goes to one of the technical SEs like SO or Programmers or a few dozen other places depending on what it was
 
yuck who wrote that answer with the syntax it had
 
That may in fact be the question I would pose.... I've researched a few network stack topics that came up; turns out I was right and the interviewer kept pushing for the wrong answer!
 
user114359
is there a meta post somewhere describing how rep is grandfathered in on deleted questions? I know if it is deleted before a certain point you lose any rep changes, I'm just not sure what that threshold is
 
9:38 PM
Don't overestimate interviewers, I'm sure there are plenty would would argue with you from a point of being wrong too
 
user41796
@PhilLello The correct answer is to call that a bullet dodged and to move on
 
user114359
@PhilLello that may be a positive sign: do you want to work somewhere where people are clueless?
 
user114359
what @GlenH7 said
 
@PhilLello TWP and the answer is to quit
@PhilLello you didn't want to work there anyway then.
 
Oh, so we're back to the “cultural fit” discussion now? Though that might really be applicable here, since there's a difference between friendly fallibility to foster learning and ossified “truths” that won't be questioned.
 
9:46 PM
I think it would be a tad unfair to say clueless, I think it's more a case of dated knowledge (like interrupts vs polling in device drivers). I'm hopefully at a stage in my career where the person above me doesn't need to know how to do my job, just that I know how to do it.
 
ok, ye naysayers, say ye nay no more: stackoverflow.com/questions/35851782/…
 
user55340
Heh. Physics is writing a bunch of canonical dups for relativity questions.
 
man, IE likes to choke on 5000 lines of code in a mercurial web view.
 
user41796
@AaronHall you forgot the semi-colon in the TL;DR
 
It's a comma splice.
Totally legit.
 
user55340
9:48 PM
@GlenH7 Python is anti semicolon.
 
user41796
passes himself a glass of scotch
 
Apparently grammarians will have to deal with "scare quotes" too... sigh.
 
@GlenH7 I should do this... What's in your bottle right now?
I'm still working on a cheap bottle of Calvados I got a while back. Getting an itch for a proper bottle of Whiskey again. Hmm...
 
Now it's an "Executive Summary"
 
@AaronHall Your answer is truly impressive and tries to teach how to fish. Reading bytecode or even the interpreter source is a convenient skill to answer many questions about implementation behaviour. Though I still don't see an answer to the “why” question.
Which leads me to believe that @enderland just picked the wrong site. Should have asked on Programmers, tagged with , received -7 score, almost get closed, then receive a +3'ed answer after 2 days.
 
9:56 PM
why, you want more history?
we used to raise strings
 
language design question vs. implementation details
 
so we didn't catch error types
we caught strings
 
@AaronHall we still do in Perl. Better libraries declare their exceptions to match a certain regex. *shudders*
 
so there wasn't even a tuple in the beginning
 
“In the beginning, there was Guido. And Guido said ‘let there be tuples’. And the tuples were good.”
 
user41796
9:59 PM
@JimmyHoffa Current bottle I have is from the pacific NW, but I can't remember the name. Wheat based whiskey, rather tasty. Fairly smooth with a good number of notes to it.
 
user41796
The marketing blurb on the back has a lot of references to fly fishing. Ha! Just found it - Washington Wheat.
 
I'm frustrated with my inability to satisfy your question, but perhaps the only one who could is Guido or his crew.
 
psr
@GlenH7 Flagging as inappropriate. This discussion is turning into soft pour porn.
 
drinks whiskey from his stackoverflow mug
 
user41796
@psr You ought to be able to find Dry Fly distillery products easily enough IIRC
 
user41796
10:05 PM
Their Washington Wheat was good enough that I'd definitely entertain trying their other products
 
@AaronHall that explains why Exception (RealException, 'hahahahaha') as e: works in 2.7 ;-)
 
@amon I could always repost!
 
random: is Java the only major language with checked exceptions? (namely, exceptions that you must somehow explicitly mention in every function they might pass through)
 
@GlenH7 interesting. I've been meaning to try small batch local stuff- Breckenridge Bourbon seemed ok in the mixed drinks I've had it, though if I recall @Shog9 decried it as terrible boot-swill...
 
user41796
10:10 PM
@Ixrec offhand, I want to say yes.
 
user41796
@JimmyHoffa I'm pretty flexible in that regards. I value the experience of learning about different types of drinks and am willing to suffer through the occasional duff bottle as a result.
 
user41796
For example, I'll never buy aeroplano tequila again but I don't regret having bought a bottle.
 
@Ixrec for certain definitions of "major"- though I have a tickle in the back of my mind saying Obj-C might also...
 
user41796
But I'm snobby in that I don't think tequila should have oak notes like a chardonnay
 
user41796
@JimmyHoffa I think you're right on obj-C, but I haven't done much (any) work in that language.
 
user114359
10:13 PM
checked exceptions are like STDs. Once one method has them, they spread to the rest of your application like an infection that just won't go away.
 
@GlenH7 same, I have a duff bottle of Mead that's been sitting untouched since I bought it and tried it on new years. Elderflower and Hibbiscus and Malt used in it's making. The malt really made it quite too awkward a flavor, c'est la vie.
 
@Snowman though I have never used them myself this is the impression I have of them, and I'm glad they aren't in any of the languages I use
 
user41796
@JimmyHoffa Time to turn it into sangria?
 
3 down 4 up
 
@GlenH7 time to throw it away. Opened over 3 months ago now... yeah.
 
10:16 PM
that's why I don't usually answer new questions
I'm not the fastest gun in the west.
 
I'm seeing no evidence of checked exceptions in the Apple docs on ObjC, so maybe that's a no
 
@Ixrec yeah, mayhaps I'm thinking of something else
 
I still believe checked exceptions are a mostly good idea, and that a unified exception hierarchy is a good idea. I do however notice that less-than-stellar programmers will invariable drift to the root exception type for the method annotations which defeats the purpose of both ideas. The only solution would be throws-annotation inference. Or (my preferred approach) no exceptional control flow at all, just returning Either types.
 
user41796
@JimmyHoffa Yeah, pitch it if it's too far oxidized for even sangria
 
@amon to be fair, I think Haskell has checked exceptions the right way. Frankly, I think ADT's are just bloody awesome and every language should have them, but they're so incompatible with a liskov subtyping type system
 
10:20 PM
I still don't understand the motivation behind checked exceptions tbh; they're already not ignored by default when they get thrown, and having to maintain an explicit list of all possible exceptions sounds to me like a lot of wasted bookkeeping effort since 90% of the time you can't do much with the exception besides log it
 
therein lies the rub, putting both type systems in the same language causes too many weird things that people have difficulty with. And nobody's familiar with the HM type system so it's kinda DOA so much.
@Ixrec it's about compile time enforcement, not runtime enforcement
 
@JimmyHoffa Haskell has unchecked exceptions – I can error () wherever I want without having to change the function type. ADTs don't rule out subtyping.
 
but compile-time enforcement of what exactly? is having an up to date list of all exception types which could ever reach my main() function somehow really valuable?
 
@amon you're not wrong - but to be certain Either is indistinguishable from a checked exception. As for subtyping, composition isn't really the same thing - nor is multiple interfaces (which multiple type classes are)
 
monads like Maybe and Either are totally fine
 
10:22 PM
... it's spreading. first it was only Jimmy going on about monads. then it was amon too. now even Ixrec has adopted it into his vernacular :o
 
explicit nullability is great
 
checked exception are a kind of type-checked documentation. It can be really challenging to figure out all the important error modes of a function, just being told what they are is extremely helpful. The problem lies in the law of demeter violation: my function signature inherits all throws annotations from the used functions, which leaks an implementation detail.
 
How do you make an ADT sub-type another such that it automatically receives every piece composed to that other thing composed to it - without just composing that other thing. A x B = C<-- this is subtyping, taking 2 things to create a unique distinct thing. ADT's a sum types. A + B = AB <-- the B is composed to the A, the B hasn't been taken away
 
@amon "leaking implementation details" is a much more elegant phrasing of my complaint
but what would it mean to have a checked exception which does not "leak" those details? that problem seemed to me like it was a fundamental part of the idea
unless we've diluted the term enough that it now includes things like Either
 
@Ixrec Java's specific design of checked exceptions has significant problems, but they are a great tool for API design. They can be useful if I decide to only declare exceptions of my own semantically useful exception hierarchy rather than passing through the exceptions of whatever library I'm using.
Unfortunately, this takes tremendous effort. While I like creating convenient and correct libraries, this feature is in the way for most people. Common Java wisdom is to derive all your exceptions from RuntimeException which doesn't have to be declared, and just be done with it.
 
user114359
10:31 PM
This almost sounds like a good question for the main site, if it weren't POB: do checked exceptions leak implementation details, violating LoD?
 
user114359
Or at the very least, it is a yes/no question
 
my question is slightly different albeit even more POB: Is it possible to have a form of checked exceptions that are actually useful without infecting all my callers with bookkeeping obligations?
 
user114359
11
Q: Why is "Is it possible to..." a poorly worded question?

MichaelTA lot of questions try to cast a net into sea of possible designs with the wording "is it possible to...". These questions often get closed for one reason or another. What steps should I take to try to ask a better question?

 
perhaps if you were only required to declare those exceptions which originate within the current package
 
user114359
I think I have a way to word the question to be on-topic and not POB/broad
 
10:35 PM
Asking "Is it possible" means you don't know if it is possible, which means you probably do not know enough to ask a question at the level that we expect.
 
whether*
@AaronHall Is it possible to write an on-topic question on Programmers.SE?
 
user114359
@BarryTheHatchet there are at least three questions per day we don't close
 
On Stackoverflow, asking "How do I" allows us to better tell your competence and properly allocate effort.
On Programmers, we expect higher level questions. I have not achieved zen for Programmers yet.
 
@Ixrec yes, if we introduce the notion of functions that are transparent to throws annotations (should be the default), have a throws annotation interference system, and properly integrate the annotations into the type system so that I can consider them in generics etc.
 
10:40 PM
now that is elitist
 
@amon I'm struggling to work out what half of that means
 
The important part is making these annotations optional, but still available. A compiler warning to urge you to spell out a throws annotation is more valuable than forcing you to do so, because most people will try to ignore them (which is OK).
But even if I don't have to declare the exceptions, a method will still throw a set of exceptions. Fortunately, this set can be inferred by the compiler.
 
psr
@amon unless the method is open for sub-typing, and sub-types can throw other exceptions
 
The point about the type system means that currently lambdas and function interfaces like Function<>, Consumer<>, Supplier<> all assume no throw. They literally cannot be composed with methods that have a throws annotation. But if they could take a throws annotation as generics parameter, this would change.
 
user55340
@RobertHarvey you just love talking civility about bounties offered in alien languages I bet.
 
10:47 PM
tbh I still don't get why we need complex type hierarchies of exceptions in the first place; in the code I'm normally maintaining pretty much every exception indicates a programming bug that simply has to be fixed and has no sensible recovery action even if I bothered to catch it
so all my effort goes into giving the exceptions sufficiently detailed messages that I don't waste my future self's time
 
user114359
@Ixrec because the type of the exception indicates the error. It makes it easy to differentiate e.g. a null pointer and a divide by zero. This tells you what broke, which is even more important if the line that broke has multiple expressions.
 
@psr of course throws annotations must obey Liskov. IIRC subtyping doesn't make inference impossible, just more costly (see also my complaints about Scala compilation speed…)
 
user114359
What would a generic exception tell you about float z = 3 / object.getValue()? Was object null? Did getValue() return 0.0f? This is why we have an exception hierarchy.
 
psr
@amon Impossible if you need to dynamically link outside your compilation unit.
 
@Snowman so...the type of the exception is valuable primarily because it'll show up in the error message? (I'm cool with that, though obviously that doesn't need to be a type to get that effect)
 
psr
10:50 PM
Well, impossible until run-time I guess.
 
@Snowman having exception types is only useful if my control flow depends on the exception type. Reasonable for business exceptions, not for stuff like null pointers. The error message which can detail the exact reason is far more valuable for debugging
@psr good point, thank you.
 
@Snowman in principle there's no reason an "untyped"/generic exception couldn't have a competent error message like "Tried to divide 3 by 0" or "Could not invoke getValue() method of undefined" (and those are pretty close to what JS actually does throw)
 
@psr actually, that's irrelevant. Changing the checked exception breaks binary compatibility, just like widening the return type of a method.
aagh, now I see how that won't work with inference. Reality sucks.
 
it may be that I simply don't have any "business exceptions" in my app, since I don't write code for payment systems or network synchronization or any other messy error-prone operations (at least, error-prone in that sense that they depend on lots of arbitrary rules or 3rd party systems)
 

« first day (2012 days earlier)      last day (2977 days later) »