« first day (2475 days earlier)      last day (2470 days later) » 

6:00 PM
or is that :D
 
"cautiously positive"?
 
'I signed up' - that's very err. courageous and brave ;) I may consider signing up if the first week goes OK-ish, else I risk ending up suspended again. I don't want to be involved in bar fights - I'm the one who ends up in hospital/jail. — Martin James 28 mins ago
 
perhaps he's being sarcastic :P
 
I wonder if we could identify a few different broad types or "classes" of questions, have the user select theirs from a list, and show a template that made sense with that type of question. For example, we could have one type of question that is about specific code (the "debug-my-code" question done correctly), another that is about a specific algorithm, another that is more like your example here, etc. It would make the posting experience more interactive and help to tailor the templates. The problem, of course, is it makes the questions pretty cookie-cutter, which I instinctively dislike... — Cody Gray Jun 26 '16 at 11:57
 
^^ I still think enderland's template question is much better
 
6:05 PM
@vaultah Hammered.
 
@PM2Ring Thanks! :)
 
I'm going with "too broad" because the code they've posted is riddled with errors and shows no understanding.
 
wow
 
@davidism I'll take your word for it. If I saw that in the mentoring room, I honestly wouldn't know if it's suitable to be posted or not. Which is why I say mentors need some domain knowledge to help with questions that aren't total dogs.
Ok, this does look a bit confused:
read_data = open_read.readline()
if open_read.readline() == '':
    break
 
6:09 PM
And the line before it getting the dirname of the root and then hard coding "filename".
And pretty much every other line.
 
But I really have no idea with the rest of their code, since I have zero Flask knowledge.
 
The "mentor" thing will end up exactly the same as the help and improvement queue.
As in, not useful, and devolving towards simple proof reading.
 
@toonarmycaptain that would definitely be interesting
 
@davidism naah...
the point of the mentorship is that new users will talk
 
@davidism That could just be a dummy filename for their MCVE...
 
6:11 PM
I mean just by scale the mentors will resort to proof reading and moving on, since actually taking the time to understand is about the same investment whether you're in a chat or in a review.
 
and... we could find out what is wrong with the system.
now the comments are just "do this, do that, no no no"
 
@davidism its arguably worse in chat since you get help vampired and you don't in reviewing
 
instead of "why didn't you read how to ask?" (because I didn't see it linked anywhere)
ahha :D
how about... 3 people need to vote +1 to take the OP into a chat :D
but it wouldn't work either :(
because of ask and run...
 
ask and run is so annoying
 
Point taken. But number of mentors who could help to a degree with a lot of questions >> mentors with bronze badges in specific question area. So, while ideal, limiting who can mentor too much might mean a shortage of mentors, compared with limiting slightly (eg to >100-1000 rep).

But what do I care? If they won't let me at least try to help, and I'm coming in here when I need help myself, I don't lose much.
 
6:16 PM
i think that proposal just has a massive lack of undersatnding of how much time it takes to actually get a meaningful question out of a nooblet
 
@AndrasDeak @PM2Ring I read that the "no rep minimum" is to allow newbs to chat and ask questions. Not sure how it addresses mentors.
 
Has anyone brought up the (I assume) fact that most green bean questions are already answered elsewhere, and will never (because of simplicity ie answered in documentation, duplication, or broadness/please write me code) become good SO questions?
 
@Code-Apprentice That's how I originally read it too. But Andras's interpretation is certainly possible, and I haven't seen anything yet on that page that mentions the qualifications of mentors. Maybe there's something on the mentor sign-up page.
 
n00bel prize.
6
 
Or maybe they have not consider the mentors qualifications. The idea seems very noob centric.
 
6:22 PM
@toonarmycaptain Well, the issue of helping the askers search for existing answers has been mentioned on that meta page. And that's another reason that the mentors need domain expertise: it often can be hard to find the existing answers when you don't know all the jargon.
 
@KristinaLustig no, I mean the mentors will need a system to know if this is a return user. Nothing stops users from bookmarking and re-joining chat just to keep getting help with their low effort drafts. As an owner of the Python room, we have a whole backend system outside of SO that tracks what users we've seen and whether they're vampires, so that all ROs are on the same page. I know mods have annotations, but that's not available to ROs. — davidism 1 min ago
I'm imagining the chaos of the mentor room.
 
I didn't sign up after reading that post. It was scary.
 
> The N00bel prize shall be awarded annually to a mentor that has "done the most or the best work for educating n00bs, for the abolition or reduction of bad questions and for the holding and promotion of post writing workshops"
 
DSM
It's true. I've seen about a half-dozen questions which are requests for either a topological sort or a connected components/set consolidation/union-find problem, and there's no way a beginner is going to know those are the phrases to look for..
 
I'm certainly no green bean, I've been coding for decades. ANd I have pretty good all-round Googling skills. But a couple of weeks ago I started to learn about threading in Python, which I'd never used before. (Well, not directly: I've done lots of GUI stuff, but the GUI frameworks handle all that stuff for you, you just need to wait for events).
I noticed that it was taking me a lot longer than usual to find stuff because I was working with new idioms and unfamiliar jargon, and I often found myself going in circles, not making a huge amount of progress. I'm sure the situation is far worse for those who are just starting to code, and who don't have much in the way of research skills.
 
6:27 PM
^^ so much that
 
It surprises me that people don't try to offer more education on how to search, considering that it's a skill of comparable importance to coding itself
 
this goes back to how I usually always end up mentioning research skills
it's a skill.
 
Instead people would prefer to browbeat others who fail to search properly, IMO
 
and new terminology even with a level of experience is still difficult.
@Marcus Yes. That is a big problem.
I fall in to that trap too.
I think we should all be better for that. Not only that, though. We usually behave based on the LCD
which is very bad.
and usually unfair.
 
This reminds me of my math professors' attitudes towards calculators. Yes, anyone can learn to use a calculator. Still this is a skill that must be learned by any student. It isn't something that everyone will just suddenly know even if they have very strong math skills.
 
DSM
6:29 PM
To be fair, the comment mechanism isn't really a good way to teach searching, and that's really all we have as an option.
 
Phew!
@PM2Ring yup - just for new members. Mentors do need experience with SO. — Kristina Lustig ♦ 12 mins ago
 
@poke that video in the demo was "interesting"
 
And most students come out of an algebra class or calculus class with very rudimentary knowledge of the topic...far from "very strong".
 
Most of those classes just teach plug-and-chug, which infuriates me
 
@DSM Funny enough, I never bothered to think beyond the comment space in terms of how SO can provide more help
 
6:32 PM
ODE was one of my favorite math classes and it was almost entirely plug and chug.
Learning techniques and recognizing patterns that signal when to use a particular technique.
 
I think StackOverflow has evolved to a point where it is so packed with information, that something needs to change in how communication is handled on the site to improve interaction
 
Plug-and-chug is necessary to solve things, but I think what is often left out is how to problem-solve / understanding why things work the way they do / etc
 
I agree. And both of those can be treated at so many different levels of depth.
 
DSM
Yeah, a lot of diffy-Qs is pattern matching. You need a fair bit of time to cover stuff beyond the level of ansatz.
 
pattern matching is an important skill IMO and can be generalized to things beyond math and science.
when I do 1 on 1 tutoring, I try to emphasize these more general and abstract skills to show how mathematically thinking can be useful in every day life.
 
6:35 PM
just ask questions
it's easier to give answers than questions but questions teach a lot more
 
> The mentors help with question formation, strategies for searching for existing questions, or with tagging. Mentors don’t actually answer programming questions in chat.
oh...that's interesting...
 
@PM2Ring @Code-Apprentice there's no criteria in the signup page, but I think it's plausible that they'll set criteria tightly or loosely based on the demographics of the volunteer set they get.
 
asking good questions is definitely the hard part. Any researcher can tell you that.
 
@Marcus find a way to teach problem solving effectively, and I'll buy your method and become wealthly.
 
Ironically, pattern matching is pretty effective :P
 
6:39 PM
@toonarmycaptain So, far the response on meta has been pretty positive, so hopefully there won't be a shortage of qualified mentor volunteers, and they'll be able to set the criteria fairly high.
 
@Code-Apprentice I'm married to a teacher...some places "rudimentary" would be generous and a success.
 
The question score is currently upto +54-11. And IMHO the tone of the responses seems a lot more supportive than it was for SOD.
 
@toonarmycaptain true dat
I don't have any experience with professional teaching. I worked for the uni math department in the tutoring center and did private 1 on 1 tutoring. Even with that amount of attention many of my students were overwhelmed with math and CS classes to the point that they stopped seeing me and likely dropped the class early in the semester.
or failed the class and had to try again the next semester.
 
I think when it comes to certain professions you have to really enjoy the subject to get deep into the weeds
 
@Code-Apprentice ...and some of that seems to be teacher quality and/or freedom (ie limited to teaching Algebra2 = not allowed to spend 3 weeks on necessary Algebra 1 revision), and some of that seems to be student quality in terms of preparedness/conscientiousness
 
6:43 PM
seeing something as "this is hard but i want to learn it" vs "this is too hard, I don't like it"
 
...seeing something as "I want an A but I don't want to learn it" vs "I have to do some work to attain knowledge to get a passing grade, even when I don't really give a rats and don't want to work if possible" would be preferable to what I see/hear
 
@toonarmycaptain One of the biggest problems with modern education systems, especially in the US, is the focus of pushing through each topic. X class periods on topic Y. Then there is a test and the class moves on to the next topic. The variability in the students understanding of the material doesn't help, either. Some students get it completely. Some don't get it at all.
And most are at some point of the spectrum in between. So when the teacher gets to a more advanced topic which relies on previous topics that are not mastered, the new topic does not make any sense to many students and the deficiency just aggregates over time.
 
Do you hear that?
rumbling
something is happening
user image
16
 
and by "something" you mean "nothing"
 
@Code-Apprentice Definitely -- I see it a lot with people who move on from algebra to trig/calculus way before they're ready
 
6:48 PM
@idjaw golden pineapples for you :D
 
DSM
Well, that's a much happier outcome than the earthquake monitor page I was just checking! Pineapples for idjaw.
 
@idjaw (ban)hammer time!
 
@idjaw Congrats!
 
@idjaw Congrats. Now go review dem dupes
 
FF7 victory theme
 
6:49 PM
The dupes will be bloody friends. But in the kindest most apologetic way possible.
#TrueNorthStrong
 
You forgot the free part :D
 
Excuse me peasant. I have the hammer. Don't talk to me
(holy crap...it's already starting)
 
@Marcus exactly. I saw a talk from Sal Khan (of Khan Academy). He showed some statistics that a common theme is that in any given class, some students struggle early and slowly ramp up to mastery while others get the early topics very quickly and slow down later on the more advanced topics. Over all both groups of students get to the same level of master in the same amount of time but at different rates.
whereas the traditional education system defines a fixed rate that everyone has to learn each topic.
 
@idjaw sir your "hammer" is a nail hammer compare to what BR has :D but still I admit, a nail hammer is still pretty scary.
 
I pay BR heavily for him to turn the other cheek for my shenanigans
 
6:52 PM
on another topic...I'm jamming out to GoT music on Spotify. This stuff is sooooo good.
And listening to the music alone without all the distraction of the plots and characters and boobs makes it even more enjoyable.
 
@idjaw May I suggest you add a little lego hammer to your avatar picture ?
 
talk about a learned skill...this composer has honed his abilities to the extreme
 
@MooingRawr my photoshop skills are lacking. I think that would be funny though.
 
I think they shouldn't be able to take ALgebra II unless they've passed ALgebra 1 and Geometry. Trouble is when a) they get passed through because that's less work than failing (plus NoChildLeftBehindError) and b) law prevents you from having standards for AP classes...because it would be racist to have people disallowed to enter AP classes because they can't add single digit numbers in their head...(true story)
 
Well done, @idjaw!
 
7:01 PM
This opinion might be somewhat controversial but I almost feel like students would be better served by placing focus on statistics rather than calculus simply because they're more likely to use it in their everyday lives
 
@BhargavRao turns out no one who is annoyed with SO being negative wants to do anything about it???
 
> make this chat-room... monitored by learning bots. At the beginning they will need help from real mentors, but I'm pretty sure after a while they will be able to help 90% of the new users
@toonarmycaptain IMO "passing" isn't good enough. I have seen students get passing grades and still struggle in later, more advanced classes because of lack of actual mastery in the prerequisite topics.
 
DSM
Figuring out how to handle low-performing students in a needlessly credentialist society is tough.
 
@Code-Apprentice indeed...passing without any mastery at all is an issue
 
@enderland yeah. But atleast the new possible comment abuse flags are helping us find out the worst of the negative comments. We're sending out 100s of these warnings every month.
 
7:04 PM
@BhargavRao there's abusive, and then there's negative
 
@toonarmycaptain You also bring up a good point about the relation between evaluating skill in a topic and racial/economic status issues. That can get incredibly thorny.
 
this room, by many people's standards, is highly negative and <all the things>
 
that's what we get for strict moderation.
 
@Marcus I agree that statistics is certainly very valuable in "every day life". There should definitely be a lot more emphasis on this in mathematics education up to secondary level.
 
@BhargavRao nah, it's more having standards
 
7:05 PM
Yeah
 
I'm all about downvoting/closing off topic questions, particularly from people who blatantly don't care
 
@enderland true.
 
@Code-Apprentice well it's the law where we live, presumably because people were being racist, but it's terribly unfair to the hardworking smart kids to have people who shouldn't have passed Algebra 1 in their AP PreCal classes
 
I saw a book at Barnes & Noble several months ago that according to the synopsis on the back was about applying mathematical thinking to "everyday life"
 
@MooingRawr Nah, then he'd turn into another TigerhawkT3. :)
 
7:08 PM
I think a general conception of mathematics, particularly statistics, and of science and the scientific method/how experiments and studies are constructed (and the results you can conclude from a particular study setup) would transform the way the American public thinks and elects. But alas.
 
@idjaw pineappliest of pineapples!
 
@toonarmycaptain exactly...and understanding statistics is critical for understanding science
 
@Marcus As much as I love calculus, I tend to agree. I never learned much statistics or probability theory in school, and wish I'd learned more. I occasionally try to motivate myself to improve my stats knowledge, but it's hard for me to gather sufficient motivation. ;)
But frankly, as far as the mathematical skill of the general public is concerned, I'd be happy if they had a better understanding of the humble ratio, never mind algebra, calculus, or statistics. :)
 
@PM2Ring i have to admit that's pretty cute :d
 
7:24 PM
user image
8
 
@MooingRawr It was, at first. But the dude went hammer-crazy, and he's often been criticised for over-zealous dupe-hammering. He used to be a regular here, until he got sick of us telling him to slow down with the hammer.
Nice work, @Rawing
 
thanks :) I'm afraid it doesn't look as good in a smaller resolution though
 
@PM2Ring @Marcus I had to take "Statistics for Engineers" and was very bored with the class. I ended up taking it three times. By far the my least favorite math class during college. I tend to delegate "statistics" to the status of "the red headed step child of mathematics". I learned a lot more about stats when I started tutoring it for some business students.
 
DSM
May 15 at 18:10, by DSM
Being puzzled by the relationship between the hypothesis and the sample space is the first step toward the One True Way, i.e. probability theory, and rejecting the pseudoscience of statistics.
 
@Rawing That's a shame. I was going to say you could filter some of the van Gogh background texture onto the hammer, but I guess that would make it look even worse in smaller res.
 
7:29 PM
@Rawing wow thanks so much!!!!
Gonna make the change soon
Thanks all for the congratulations and pineapples! :)
It's going to sound sappy, but it was really the good community here in room 6 that kept me coming back and wanting to do more.
 
@Rawing darn beat me to it :( Oh well nicely made
 
<3
 
only 54 upvotes needed in for gold badge
anw congrats @idjaw :D
 
@idjaw you say sappy like it's a bad thing. North Sap is liquid gold and you know it :D
 
oh yes...the best kind of sap
 
7:36 PM
Oh now I want to photoshop a tap for your right hand :D
 
the more Canadian the better
go for it.
 
did I mention how crazy good GoT music is?
some of these compositions and especially the performance just sends chills up my spine
 
it is quite amazing
one of my favourite pieces was the last episode of last season
won't spoil anything, but I'm sure those who have seen it know exactly what I mean
it is quite amazing
 
The one with the organ?
 
yup
 
7:39 PM
That's what I'm listening to right now
the disonance of the voices is just spine tingling at parts.
oh...it just has a still...no actual footage from the episode
@idjaw ^
 
TASTY!!!!
thank you
I love pineapple
 
Didn't want to onebox with the ping ;-(
 
alright....time for train 2/3 on my way home
will be back here once I get on the train wifi
(what a long day)
 
Heya folks.... Got an odd question.
I'm trying to understand why the output buffer is not being flushed even though I said:
    print("something", flush=True)
 
DSM
What convinces you that it isn't being flushed?
 
7:51 PM
The issue is sleep(n) keeps getting skipped
I'll upload a snippet in a moment.
 
DSM
You might also want to make it clear what exactly the problem is, your two comments don't seem related at all.
 
Have a safe trip @idjaw
@Sometowngeek yes, a MCVE will certainly help.
 
MCVE?
 
small snippet of code that reproduces the problem so we can see what's going on
 
7:59 PM
@Sometowngeek You've been an SO member for almost 3 years, so it's somewhat concerning that you don't know what MCVE means.
 
Thanks. Having computer difficulty here and was not able to get the link in a timely manner.
 
@PM2Ring I'm still a student at an university, so I'm not completely well-versed with the development world yet.
 
aaaaand on train 2/3
 
@Sometowngeek OTOH, you haven't exactly been a prolific writer of questions or answers. ;)
 
@DSM Thank you :)
 
8:00 PM
MCVE is an SOism, not generally a professional acronym.
 
I've been lax in following up with SO until a few months ago.
 
Still, you seem to be familiar with the concept if not with the exact acronym
 
I'm still working on uploading the code snippet. I'm back tracking on my progress so I can show my issues.
 
Yeah, MCVE is SO jargon. In the outside world, a common synonym is SSCCE: Short, Self Contained, Correct (Compilable), Example
 
DSM
"sscce" used to be one of my most common comments on SO..
 
8:05 PM
I'm in the city that does all the politics for the country
waiting for the train to leave
 
IIRC, the SO MCVE page was created because the SO powers decided they were sick of people linking to the external SSCCE page so they created a local official alternative.
 
DSM
@idjaw: oh, I figured you were back already.
 
Never mind on my issue...
I just figured it out xD
 
@DSM Unfortunately my return trip did not have a direct train. I had to make a stop and stay here for a couple hours.
 
I had sleep(n) in the wrong place
MCVE should be a professional acronym since "Minimal, Complete, and Verifiable Example" seems to be easier to memorize than "Short, Self-Contained, Correct (Compatible) Example"
 
8:10 PM
2.5 GB file nvm :P
 
I keep writing it as MVCE so they should reorder it. Fix plz
 
Reorder for 1 bajillion people.... Or help 1 person remember the order... Hrmm....
 
My weak laptop keeps freezing on me
 
Give it moar power! :D
 
Yes, I need to
 
8:12 PM
@idjaw \o/
 
Probably a memory upgrade is in order
 
@AndrasDeak \o/
@Code-Apprentice memory.....upgrade? please....downloadmoreram.com
get with the times.....sir.
 
now go install poke's hammerwarn userscript
 
hammerwarn....there is more power to be had?
 
Hey can someone point out where I'm missing something:
If you look here https://automatetheboringstuff.com/chapter5/ under the heading "Nested Dictionaries and Lists" there's a series of print functions. I'm trying to figure out how I would write something to condense these down.
I think what I'm trying to do is iterate over the values within the nested dictionaries using totalBrought on each, which I can then pass to a print function in the style they've already got it.
I've been playing with various for/in loops, but keep getting errors
 
8:14 PM
 
3 hour meeting :|
 
@toonarmycaptain please give the actual code you are using and the error messages
 
@Code-Apprentice How old is your laptop?
 
DSM
@toonarmycaptain: I think the first thing to do is build a collection of all the stuff people brought. If you loop over the values of allGuests and add the keys to a set, you'll wind up knowing what things people brought.
There are some slick ways to one-line that, but a loop is fine too.
 
@DSM so I need to collate the different foods and related numbers, then iterate over and print that list?
I've been trying things like
for foods in allGuests.values() print(totalBrought(allGuests, foods))
 
8:20 PM
@Sometowngeek I bought it less than a month ago
 
Hrmm... What would classify it as weak then? Only 2 GB RAM or...?
 
@toonarmycaptain see the star board for how to format code in chat
@Sometowngeek 4 GB
 
4GB is weak sauce
 
The stars on the starboard doesn't last forever. They get flushed by newer ones.
 
I'm starting to struggle on 8
 
DSM
8:21 PM
But the values in allGuests are dictionaries, not foods. totalBrought accepts the guests dictionary and a food.
 
or more popular... Not sure the "outlined" stars represent.
 
@idjaw 4 is what my firefox eats for breakfast
 
DSM
My personal notebook is only 4 GB and I do okay.
 
But you're a weirdo who closes all the tabs aren't you?
 
It also depends what you run though
 
8:22 PM
@Sometowngeek the pinned ones last a little longer
 
LOL
DSM probably has an extension that doesn't let him open more than two tabs at a time
 
The outlined one is the pinned one?
 
even if he tries to cheat with a new window.
 
I think my 20 tabs is a large part of my problem
@Sometowngeek yes
 
I got so crazy with my tabs I got a tab session saver
it was ridiculous
 
8:24 PM
Hmmm... maybe there is something else. Just hung again with only 4 tabs and Spotify open
 
@toonarmycaptain Hmmm. I don't like how they use + string concatenation and that str() call inside their print() calls. But anyway, take a gander at this:
keys = ('apples', 'cups', 'cakes', 'ham sandwiches', 'apple pies')
print('Number of things being brought:')
for k in keys:
    print(' - {:14} {}'.format(k.title(), totalBrought(allGuests, k)))
 
I'm guessing only RO can pin them, right?
@Code-Apprentice 20 tabs? I think you're a tab hoarder :P
 
@DSM yeah, that's why I asked in here, I wondered if I could iterate over the items in all the nested dictionaries. But they don't really teach that in the text :s
 
greater than 10 tabs drive me crazy.
 
I have 10. I'm not happy until I can barely make out the favicon
 
8:25 PM
@Sometowngeek yes I am. I have to occasionally go through my tabs and close ones I am no longer using.
 
I have 16 tabs pinned at any given moment. I mean, it's over 3 windows, but yeah.
That's not counting non-pinned tabs, just the stuff I always have open.
 
I envy you, @MorganThrapp... I want 3 monitors drools
 
DSM
@toonarmycaptain: to be explicit about what I was getting at before, you could do something like
In [27]: keys = set()

In [28]: for food_dict in allGuests.values():
    ...:     keys.update(food_dict)
    ...:

In [29]: keys
Out[29]: {'apple pies', 'apples', 'cups', 'ham sandwiches', 'pretzels'}

In [30]: keys = sorted(keys)

In [31]: keys
Out[31]: ['apple pies', 'apples', 'cups', 'ham sandwiches', 'pretzels']
 
I've got 4. :P I use 3 virtual desktops, one window of chrome on each desktop.
 
I probably went back again to ~100 tabs after my last decimation when I removed 400
 
8:26 PM
@idjaw I just let chrome save my tabs on close
 
DSM
After which you can do what PM2Ring did.
 
@Code-Apprentice Yeah I actually have that too...sometimes when I want a hard reset on everything it gets a bit annoying, because I have to go and do that extra step :P
 
I guess Automate the Boring Stuff was originally written for another language. They aren't using PEP-8 naming conventions, I guess that camelCase stuff comes from Java.
 
automate the boring stuff seems like it is geared towards the scripter who wants to make their life easier as an admin or operator
am I off?
 
@AndrasDeak how do you have room for that many?
 
8:28 PM
Andras is a physicist....he knows things we don't
if SO had a physics tag, Andras would be the supreme chancellor
 
Quantum states
 
@PM2Ring I noticed that too. Figured that since Automate is being consistent within the text, that makes it ok? lol
 
@Code-Apprentice magnets
 
DSM
Deeper wizardry would be sorted(set().union(*allGuests.values())), but it's actually not that much clearer. And deeper yet would be to toss the totalBrought function entirely and do
In [35]: sum(map(Counter, allGuests.values()), Counter())
Out[35]:
Counter({'apple pies': 1,
         'apples': 7,
         'cups': 3,
         'ham sandwiches': 3,
         'pretzels': 12})
but that's probably not pedagogically useful.
 
@toonarmycaptain It's ok, and even PEP-8 says that you should be consistent with existing code in a codebase. OTOH, they're teaching new Python coders the wrong thing.
 
8:31 PM
An SSD would be nice, but I think more ram so that i am not swapping nearly so often will help significantly
 
for a dict like that, a loop is probably clearest
 
@dsm, probably not. But basically what we're saying is that with that data structure, and that number of data points, you're probably not going to get the number of lines of code down much further than the specific print statements?
oops, sorry to run, time to go home from my blessed job where I can be on here ;) laters all, and thanks :)
 
DSM
@toonarmycaptain: check what PM2Ring did above. You can use a single print statement for all the foods.
Well, I guess "cups" aren't foods. :-/
 
pffft....wanna bet?
 
I just built my keys tuple by cutting & pasting from their output. But now I'm wondering why they didn't print the pretzels data.
 
8:36 PM
It looks like the lower list includes items not in the original as well (e.g. cakes), and pretzels get ignored entirely :(
 
DSM
The dangers of hardcoding. I guess it makes sense to distinguish the show-list from the observations, though, or otherwise you wouldn't notice that nobody brought any cups cakes..
 
cupcakes
 
DSM
Nice.
 
hmm...several processes are hitting the HDD. Not sure why.
 
you left it on vibrate
 
8:44 PM
It finally dropped below 100% access time after several minutes, but not to 0%
 
oh sorry. Let me throttle that for you
is that better?
 
Aren't you thrashing? How's your ram and swap?
 
ram is at 64% usage, so shouldn't be thrashing at this moment
I suspected that to be a problem earlier when ram usage was pegged out at almost 100%.
 
yup
 
The most recent hang occurred when I had hardly any apps open: Just chrome with 4 tabs and Spotify.
at least in the foreground. I'm sure there are other processes windows is running that I am not entirely aware of.
 
8:47 PM
@DSM I went with a nested for:
keys = sorted({food for supplies in allGuests.values() for food in supplies})
And here's a version that Guido would hate:
keys = sorted(reduce(set.union, map(set, allGuests.values())))
 
waiting for the disk access to settle down before I launch anything else
but I'm starting to grow impatient
 
DSM
@PM2Ring: your first one's nice, I prefer mine to your second. ;-)
 
Kristina's now upto +66-11
@DSM I prefer yours to my second one too.
 
@PM2Ring ?
 
hey guys, I have a quick question about a bit of code that I have
 
8:50 PM
yesterday, by davidism
Do research before you ask. Have a basic understanding before you ask. Don't answer if these two things are obviously not fulfilled.
oh, her meta post @PM2Ring
 
@enderland That's the current vote count on her Stack Overflow Mentorship Research Project SO meta question.
 
I don't even see it as a "featured" post, interesting
 
Yeah, I was slightly surprised by it not being a featured post, it's obviously rather active.
 
how exactly can I type the last line of the following into a calculator such as wolfram alpha or a ti nspire cx cas? import numpy as np
from scipy.integrate import quad
from scipy.optimize import minimize
encoderdistance = 2.53141952655
Dx = lambda t: -3.05 * np.sin(t)
Dy = lambda t: 2.23 * np.cos(t)
def func(x): return np.sqrt(Dx(x)**2 + Dy(x)**2)
print minimize(lambda x: abs(quad(func, 0, x)[0] - encoderdistance), 1).x
 
@PM2Ring it is featured
but it's apparently featured #3 and so it doesn't show on the list
 
8:53 PM
@FairlyFactual - what does "quad" do again?
 
its the scipy integrate function
 
DSM
quadrature. :-)
 
@PaulMcG Quadrature == integration. Kevin'd by DSM
 
Does your TI calculator have an "integrate" button?
 
yes
im moreso confused on the minimize part
 
8:54 PM
from scipy.optimize import minimize
 
DSM
So the question is how to get a calculator to minimize an arbitrary function?
 
oh that's what you have
your expectations towards calculators is becoming unrealistic
 
So you are solving for the absolute/relative minimum of the function?
 
yeah. im just trying to understand what steps the minimize function takes to get the answer that the program outputs
which is output in radians
 
where is the indication to use the hammer?
 
8:56 PM
@FairlyFactual Well, how would you find the minimum value of a function?
 
I want to close a dupe, but it looks the same as before I got the badge?
 
@idjaw Just vote, and the magic will happen.
Assuming it's got the tag.
 
im not sure. thats why im asking. I was able to get it to work in code, but im trying to see how to transfer that code into a simple equation in wolfram alpha
 
wooooooo I did hammer things
 
@FairlyFactual How much calculus do you know. Do you know what a derivative is?
@idjaw Yay! It's fun, isn't it. :)
 
DSM
8:58 PM
Wolfram Alpha and a TI calculator have very different tools. WA has a built-in minimizer, I'm pretty sure.
 
i know some calculus (mostly self taught) and yes i know what a derivative is
 
@PM2Ring it's pretty awesome seeing your name next to the gold icon on a dupe hehe
 
@PM2Ring and they said math would never matter!
 
@FairlyFactual Ok. So if your calculator doesn't know how to do derivatives, you'll have to program it in from first principles.
 
LOL enderland
 
DSM
8:59 PM
The default algorithm that minimize uses is BFGS, but that's overkill for this problem, I think.
 
I actually remember calculus a lot better because the way we learned integration/differentiation was very theoretical
In mathematics, a Riemann sum is an approximation that takes the form ∑ f ( x ) Δ x {\displaystyle \sum f(x)\Delta x} . It is named after German mathematician Bernhard Riemann. One very common application is approximating the area of functions or lines on a graph, but also the length of curves and other approximations. The sum is calculated by dividing the region up into shapes (rectangles, trapezoids, parabolas, or cubics) that together form a region that is similar to the region being measured, then ...
 
@FairlyFactual Are you looking for an exact solution or a numerical one?
And do you know the difference?
 
I have the solution from the code as approximately 1.02050535, but im trying to figure out how to find that manually
 
Numerical differentiation is a bit more fragile than numerical integration, but if your function's reasonably well-behaved you can approximate f'(x) by doing (f(x + Δx) - f(x)) / Δx). The trick is to use a Δx that's small enough to get a secant slope value that's close enough to the desired tangent slope, but if you make it too small you'll get errors due to the finite size of floats.
 
this is bringing back horrifying memories of writing matlab code to do that
 
9:05 PM
I suggest using complex step differentiation in that case
 
basically just told someone asking my team to RTFM
 
The function seems simple enough that you might be able to minimize by hand fairly easily. At least if you understand the principles involved.
 
Many functions are hard to integrate symbolically, which is why we often have to resort to numerical integration. OTOH, if you have the equation of a function it's always possible to do symbolic differentiation, so there's not as great a need for numerical differentiation.
 
Since you are minimizing, you need to take the derivative of the integral...which should just cancel out.
the abs() adds some complications for symbolic manipulations...
 
And once you have the derivative in symbolic form you can use standard root-finding techniques to find where it's equal to zero & hence find the functions maxima / minima / points of inflexion.
@Code-Apprentice Ah, good point. Fortunately, those complications aren't insurmountable. :)
 
 
3 hours later…
:X
 
there are some other really funny ones in there too.
it's satirical...but really.... is it? really?
holy crap I just realized that the photoshop job @Rawing made even had the arm moved for the hammer. I only noticed this once I got home and saw the bigger image on my screen.
that. is. awesome.
 

« first day (2475 days earlier)      last day (2470 days later) »