« first day (2167 days earlier)      last day (2796 days later) » 

5:04 PM
Another typo I keep making: "an [mcve]" when it should be "a [mcve]" because it expands to "minimal". English!
 
An MCVE sounds reasonable to me
 
[mcve] gets expanded, and "an minimal" doesn't sound right.
 
I do that literally every time.
 
@wim That looks wiggity wack
interesting, though
 
@davidism it can be different I'm sure
 
5:08 PM
@davidism I start to do that a lot, because "an em" vs "a minimal"
 
My dad does English training for organisations and he thinks it's much easier to teach people who have bad grammar than to teach people who think English is Latin with different words
 
Solution: train yourself to mentally pronounce "MCVE" not as "em cee vee ee" but as "muckvee"
 
Then "please provide a muckvee" gets transcribed as "please provide a [mcve]" which expands to "please provide a minimal [...]"
 
Huh, interesting.
> Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.
- esr
 
5:15 PM
That email to chatroom@sopython.com totally doesn't read like a spearphishing attempt at all.
 
dang i feel dumb ... my whole problem with multivariate regression boils down to a[0] != a[:,0] in numpy slicing
 
@WayneWerner not sure that's true
makes beautiful Origami suspension bridge; invites Wayne to cross chasm on it
 
@RobertGrant I'm pretty sure that if your origami suspension bridge was strong enough to span a chasm and not collapse under its own weight, I'd be totally happy to cross that sucker.
 
It's a very narrow chasm
 
Not that I'm entirely convinced of the veracity of that statement - I'd need to see some studies, first.
 
5:20 PM
And the bridge is perfectly designed to be at maximum tolerance when supporting its own weight
A feature its beauty allowed the creators to get just right
 
@MartijnPieters Oh we got a new one. Last one was from that guy who wanted to "invest in our Country".
Wait, are you saying the "I'm getting 404's" is a phishing attempt?
 
@davidism I am.
 
I guess I can kind of see it with "are you the person who takes care of such things". I was about to link them to GitHub.
 
Visited 'your website' is way, waaay too generic. As is 'the information you provide'.
 
I'm more interested in responding to the other guy "as to enable me to gives you More Details about my investment proposal." That sounds like a sure thing.
 
5:26 PM
Plan: carpet-bomb contact addresses for various sites. When someone bites, send them something more targeted. You initiated the next step, so you are inclined to trust more, be open to click on a link that looks like it is for your own site. Might be a proxied log-in for some common CMS, they steal credentials.
 
you clearly have not dealt enough with people if you think that they are in general able to properly describe misbehaviour of programs
@MartijnPieters
 
@RobertGrant Sounds like an interesting thought experiment - without some margin of error, the likelihood of collapse immediately on the introduction of some external variables (wind, sunlight, etc) I'm pretty sure this mythical bridge would collapse immediately. Plus there's the whole part about constructing the bridge in the first place - what are you going to use to hold it up, etc.
 
@WayneWerner :-)
 
Uh-oh, @MartijnPieters has started carpet-bombing chat.
 
again
 
5:27 PM
Plan: carpet-bomb contact addresses for various sites. When someone bites, send them something more targeted. You initiated the next step, so you are inclined to trust more, be open to click on a link that looks like it is for your own site. Might be a proxied log-in for some common CMS, they steal credentials.
 
Anyway, I could be wrong, but some big, overengineered thing is probably not weaker than something thinner that looks as though it effortlessly spans a gap
 
*ugly
overengineered is not (necessarily) ugly
for instance, the Tesla
it's an incredible piece of machinery for getting you from point A to point B
 
How's that overengineered?
 
When your feet will do just fine :P
 
@davidism that one went straight to my spam folder, had to fish it out to see how legit that one is!
 
5:30 PM
Definitions of overengineered that include everything ever aren't useful :)
 
please #define define
 
@MartijnPieters I have a filter that prevents stuff to chatroom@sopython.com from being marked automatically.
There's way too much amusing stuff to send it straight to spam.
 
@RobertGrant a bio-attack air filter?
 
I'd call that overspecified rather than overengineered
 
And apologies for the repeated arrival of my messages. Trains and mobile networks and the SO chat stack don't mix too well.
 
5:32 PM
True.
 
recbg
 
> redcbg
 
I feel like I'm going crazy, how would I get the value of an input element in jinja2? I'm trying to do {{ url_for('route', data=value_of_input_element) }}. Am I doing something wrong?
 
Yeah, probably
jinja renders to HTML
 
5:38 PM
@MorganThrapp you wouldn't? Either you already know the input, it was posted in request.form, or you're still on the client so you use JavaScript.
 
if you want to put something in jinja it needs to come through the render_template('yourpage.html', value_of_input_element=42) call
 
@davidism Gotcha, that's the part I was missing. I didn't realize it automatically got added to request.form.
 
All submitted form data is in request.form.
 
It is if it's in a form and you click the submit button
 
Yeah, that's what I'm doing. I was just missing the part where it's in request.form already.
 
5:40 PM
:-)
@davidism I used wtforms but it seemed a bit weird (sorry to be so precise) - do you use a helper lib for flask forms?
Sometimes wonder about writing my own and calling it Hubris
 
I use (and maintain) WTForms and Flask-WTF.
 
Uh oh
 
Awkward
 
My hubris is getting me into trouble and I haven't even written it
 
b&
 
5:42 PM
watches WTForms uninstall from his machine, followed by Flask
 
@RobertGrant I agree there's a lot of inconsistency in WTForms. What did you think was weird?
 
Sorry I actually can't remember off the top of my head - let me look
Been a few months
 
Field processing and validators aren't consistent about how they produce errors or handle empty data, for example.
 
Yep that sounds familiar
(Still loading PyCharm)
I found it really easy to have a single function to handle get and post with Django; not so much with WTForms
 
What didn't work? It's supposed to use the same pattern: create form, if post and valid then do something and redirect, else render template.
 
5:47 PM
I don't think that I had many problems with (Flask-(WTF)orms)
not that I used it a whole lot
 
Consistency is my main gripe, I have a bunch of custom fields to replace built-in ones. I just became a maintainer recently so that's something I want to change.
 
I think the most awkwardness that I came across (trying to recall) is some inconsistencies between WTForms and Flask-WTF. I don't remember the specifics though
 
cbg
 
Heh. I guess that's a good(?) thing that we both are concerned with consistency ;)
cabbage @inspectorG4dget
 
5:49 PM
so, I have some good news... really, it's just not-bad news
 
lol:
this Undercover Boss format really doesn't work at all in Finland
 
I heard back from the school's administration. Apparently, I haven't yet failed my comps - they've accepted my written part, and are now moving forward to schedule the oral
 
because everyone always knows the boss anyhow...
 
That is good news @inspectorG4dget, congrats and you'll do well in the next part as well :)
 
Oh - here's one thing: Django lets me take a database object and specify which fields of it should autogenerate a form in a very compact syntax, and also going the other way lets me only update certain fields very easily
 
5:51 PM
fingers crossed! Thanks @JGreenwell
 
I couldn't figure out at the time how to do that, although possibly I just didn't look hard enough and switched to manually assigning (models were small so it didn't matter)
It was basically the only thing where my experience with Django was simpler than my experience with Flask; everything else was on a par or simpler with Flask
 
just remember your in academia so if your panel looks anything like the last one I saw do not follow the old adage "picture the audience in their underwear when nervous"
or you will be sick ;)
 
@JGreenwell yeah I can see how that could fail in so many ways.
 
hahhaaha! Yeah, they're all pretty wrinkly. I don't want to see any of them in their underwear
 
actually I can't see how it would work with anyone at all :D
 
5:58 PM
@RobertGrant WTForms-Alchemy provides that
WTForms itself only provided a basic implementation and that's being removed in 3.
 
@RobertGrant that's actually a bad thing :P
I want to be able to decouple things, but by no way does django make it easy at all
 
I'm working on a Django project right now. I had forgotten just how terrible Django templates were. Jinja's macros and globals make things so much simpler.
 
You can do that in Django and make a separate Form object from Model, it just provides a convenience method to create a form out of a model, and also limit which fields go in
And also add to/remove from the validation that comes from the model, IIRC
 
I was feeling pretty productive this week right up until the instant the boss' boss' boss said "we're setting a good pace this sprint, if we keep it up we can put in some more work for the guys to do"
Ah, so my reward for work is... More work. Ok then.
 
@davidism okay; I will have definitely looked at that. Could be wrong, but I think at the time it didn't support the latest version of $something
 
6:06 PM
@Kevin Setting expectations low :+1:
 
manager thought "my workers are not working themselves to the bone, if they are not doing this I will have to pay retirement and/or keep them on at a higher pay because they haven't gone insane and left so I can hire a noob - ergo I must work them to the bone"
 
so glad my company isn't wtf-stupid about this sort of stuff
 
@Kevin ah, the "the troops need to be pushed now and again" approach
 
^ statement you will never hear in the actual military except maybe boot but that's not real military just testing ground
 
At least when a horrible drill instructor in an army film runs faster to make the troops keep up, he at least is running and not just operating the speed of a small hare everyone has to chase
 
6:09 PM
 
That's cool
"Call me a boss again and I'll whip you!"
 
back to office hours. I have a student here
 
> I'm looking forward to it, mathter
 
@RobertGrant actually the DI in that case is probably not only running faster but having to run back and push the people falling behind then sprint all the way back to the front (really hard when platoons get to 100 people sizes) - which is why nobody sane wants to be a DI
 
Pretty sure the way to be a horrible boss to an Igor is to tell them to stop working
@JGreenwell that makes sense (and tallies with my understanding from movies - bonus!)
 
6:12 PM
we know that; like Vimes oiling all the hinges so they don't creak
 
@AndrasDeak that is an awesome pic
 
Today's exercise appears to be an interest rate calculator...
 
@JonClements booooring. interest rates? :'(
 
How common is the practice of putting the project folder inside the virtualenv folder? It causes problems in Flask. I've always kept the env inside or completely separate from the project, not the other way around.
 
checks....yes, yes it is
 
6:13 PM
oh you mean bad question commonality?
 
@davidism Ew, what?
 
@davidism I've read that before I think
 
one of my coworkers asked over lunch if I contribute to SO at all.. didn't want to tell him I'm an addict :|
 
@randomhopeful I just noticed that message on the starboard, that's hilarious:D
 
Made no sense so I didn't
 
6:14 PM
anybody here use sentry / raven?
 
yeah, I've never heard of that being done
 
Yeah, I'm just making sure that "ew" is the common reaction. I don't think I've come across anything that recommends it, but I have seen people do it.
 
@Rooster yeah i do all the time
I like it quite a bit ...
 
hey @Joran, how's your intern doing?;)
 
i do as well. Im trying to get us to use it but I'm getting push back regarding the request to the sentry api in our code causing latency
 
6:16 PM
lol i think he is totally stuck
 
we technically lesson 3 is using Python for numerical calculations (and lists/for loops) so I assume other people just decided on interest rates as the project/program
 
@davidism I would recommend against it. I can't think of a reason to recommend it, unless you really just don't want to add env to your .gitignore
 
i solved it this morning
Im gonna send it to him ... it uses curve_fit
 
my response has been to say, that should only happen if were catching an error
also, its really not that bad
 
who is pushing back?
 
6:17 PM
I had an intern, but all he did was give me back the canonical form of things I gave him
 
You can also host it right next to the application for a lot lower latency.
 
the guy I have to convince that we should use this (boss )
 
are you using it with django/web stuff? or are u useing it
in stand alone
and what @davidism said (if you are using it with a server)
 
ooo, that might be the answer
is that still on the free tier though?
 
it just does a celery request ... its not like it actually processes data before handing back an ok
 
6:18 PM
Sentry is open source, they offer detailed instructions for self-hosting.
 
its open source
 
and using it for both web / and non web
 
its something lieke apt-get install python-sentry && /etc/init.d/sentry start
the call is very fast
 
thats extremely useful information about the self hosting
thanks!
 
even if it has to bounce all over the world
 
6:19 PM
i think that might push me over the top
 
@Rooster even if you don't self-host, producing the async task is almost no overhead compared to the exception in general.
 
^^
thats what i have been saying
the latency is basically null
and if you really cant handle it ... do the call in its own thread... requests is smart enough to give up the gil while waiting for response
 
Presumably the Celery instance handling that isn't running locally, so it's still a network call, but it shouldn't be a big deal.
 
(or urllib or whatever raven uses under the hood)
 
right, except actually this is going to be using perl, I just found python people more knowledgeable about sentry/raven in general so I thought I'd ask here
i'll say ewww for you ;)
 
6:21 PM
o i c ...
 
@JoranBeasley Hey! Sorry to bug you about this again, do you by any chance know if there was a GH link associated with that smooch article you read? I know some of the guys who work there and they are curious to know where people hear about them and what particular tools some people find interesting.
 
i can have perl talk to celery
and then I'm all set
:D
 
perl is like python that you wont understand in 3 months
(regardless the call should still be damn fast)
 
Perl is a write-only language
 
@Rooster you could try asking the Sentry folks on Twitter, they're pretty friendly.
 
6:22 PM
@JoranBeasley cbg
 
user559633
@davidism fwiw, my $0.02. I've seen project-inside-env done about a handful of times and typically by someone that's unsure of what he/she is doing.
 
@idjaw ... lemme find the article
 
thanks, all good info
 
@JoranBeasley glad to hear that:)
 
6:23 PM
I think a lot of us used Perl at one time or another
heck, I taught it for a very small bit (single semester) not that long ago
 
@JGreenwell used it at uni for part of one module; that was it
 
ya, I have mixed feeling about it
 
Implemented a log file parser
 
my first language was perl \o/ (I think)
 
I've jumped around language wise
 
6:24 PM
unless it was turbo pascal
 
id been writing primarily python the past year and a half
 
@RobertGrant basically that's what it was used for when I taught it (part of module for "Intro to Scripting" class
 
My first language was Bash. My first language I learned in school was Fortran. I'm 23. I know those last 2 statements don't match up.
 
i kind of miss it
 
I did a ton of VBA as my first language...
 
6:25 PM
it has been fun explaining what a list/dict comprehension is to the perl people
 
the first language I learnt in school was German.
 
My first language was Basic. My first language professionally was COBOL. My first language at school was VB (not .Net) - then C++, Java, and Python
 
then English,
 
@AnttiHaapala har har
 
@JGreenwell I remember enjoying that assignment
 
6:25 PM
qBasic over here, lol
 
then Swedish...
and only after that, TurboPascal
 
Perl is fun just gets evil, pure evil, when it comes to maintaining - cause "TMTOWTDI" (There's more then one way to do it)
 
the other programming language that I've learnt in a school was Java.
The first language that I've used professionally was Perl.
Then C++.
I was paid for programming Python in 2001.
 
15 years...some kids on SO weren't even born when you were paid to do Python
Which makes Python very old.
 
@idjaw diginative.co/my-personal-bot is the article (its pretty disapointing if you are expecting the user to talk about what he did)
 
6:33 PM
how is 15 years very old?
 
Get back to me when Python is as old as Lisp
 
user559633
Old enough for marriage in most orthodox religions
 
@idjaw as an aside ... I dont think he mentioned smooch at all. I mentioned in the linkedin convo that it was quite disapointing as an article aimed at developers, as he didnt cover what he did at all (at which point he pointed me to smooch.io)
 
> First appeared 1958; 58 years ago
Mm, pleasing symmetry there.
 
user559633
6:35 PM
" I see that you have a strong passion for DevOps automation, CI/CD, Ansible and Hadoop. " it would be rude to direct this recruiter to an optometrist, right?
 
@Kevin a mom joke would be appropriate
@tristan I'd say you were going easy on them even if you did
 
user559633
"I see that you have a history of doing the needful, particularly ASAP"
 
yes, proctologist instead to have their head removed
 
To whom it may concern: needful needs doing.
 
@JoranBeasley ah ok. I see Thanks for digging that up for me. Really appreciate it.
 
6:37 PM
typical Canadian, saying sorry and seeing thanks
 
@tristan I get recruiters asking me if I want to work in <Canadian City> not realizing how far <Canadian City> is from me.
should be close by
yes...yes...close by
 
close by astrophysical measure
 
user559633
<Canadian City> sounds like a fun supermarket.
 
user559633
Or a hyperspecific simcity clone.
 
People vaguely remember that most map projections cause areas near the poles to look larger than they actually are. So they overcompensate and assume all points in Canada are near all other points in Danada.
 
6:38 PM
Open one in Boston
 
One more flask question, import styles. What do people use? I normally do full namespace imports flask.request.form, but the docs seem to use request.form. Which is actually used?
 
I wonder what the inhabitants do when Godzilla strikes...
 
Is Danada the Canada from an alternate dimension where everyone's named Dan?
 
At least it's not Standa.
 
Danada is the harmless form of Canada
 
6:39 PM
No, it's the Spanish colony. They are Canadian, they say "de nada" a lot.
 
waits
 
Or is it that micronation that Tony Danza owns?
 
something something Micronesia
 
user559633
@MorganThrapp I apparently do from flask import request, then subsequent calls are request.form
 
@tristan Yeah, I'm thinking I'm going to do that. I'm having issues staying under 120 characters with the full namespace.
 
user559633
6:43 PM
120 characters? Look at you with your fancy post-1999 monitor
 
My monitor is actually a little silly. I stole it from the desk of a coworker when they quit. :P
 
but how does that make it silly?
 
I've been here 6 months and I still don't have a desk. You kids and your amenities
 
I assumed it giggled at you or something
 
Nah, I just feel ridiculous having a 27" and 23" monitor.
I've never had 2 huge monitors like this before. I'm used to having 2 18".
 
6:48 PM
that feeling when I jumped from 15" crt to 22" lcd <3
I used that 15" crt for 13 years
 
I have one 15" right now
 
My favorite monitor is the one I had in high school typing class because I could press the degauss button and it would go bwooonnngg and distort the screen crazily
 
granted I will cast my calculations to my larger TV when I need to test visualizations
 
Degauss! High quality.
 
@Kevin also the one next to it (just to annoy a few classmates)
 
6:53 PM
@AnttiHaapala was it a curvy crt?
already a curvy->flat crt is weird
 
That was a fun class up until about the second to last day when I rather bluntly told off the girl who sat next to me and asked me a lot of kind of grating basic questions all semester, and the teacher said she "was surprised at [me]" in the kind of tone that indicated that I had done a thing beneath my usual character. I still think about that from time to time. Well that's my story of regret and emotional burdens.
 
Which is the real Kevin? We'll never know...
 
@Kevin I think we need to talk about you
 
I get that reference.
 
Stress!
 
6:58 PM
@Kevin if the radio's playing I Got You Babe when you wake up, you know what's happened
 
Jeez, the representation of Kevins in hollywood. Either they're unhinged, or trap-setting geniuses.
 
Kevin the bird from UP is the most well-balanced of all of us.
 
@AndrasDeak naturally
 
Oh, I remember never hearing the end of that
 
@AndrasDeak it could do 72 Hz...
 
6:59 PM
Except, if I'm only remembering, it must have ended at some point. Hmm.
 
if you tuned it very carefully
 
I'm having one of my moods today.
 
wim
What badges should I track next?
 
@wim legendary
 
What badgers? Idk, whoever else is in your clan
 
7:02 PM
@wim I've been tracking Illuminator: edit and answer 500 questions
 
wim
Legendary looks good but I don't even have epic yet, I'll track that
 
It's really slow to get (for me at least), but I think it's really beneficial.
 
wim
and tag badge ... just got python3 silver
maybe regex ?
although I hate regex
I have every question badge
 
I am bad at asking questions
perhaps I should pretend that I do not know something...
 
wim
I ask good questions but people downvote me anyway
actually I think I have a stalker downvoter because I always collect random DV on everything
 
7:05 PM
I get the impression that SO is harder on users with low and high reputation. I wonder if there's some sweet spot in the middle where questions are more likely to be well received.
 
wim
hahaa , I think thats true
i like to DV martijn for even the tiniest inaccuracy ... :) he always edit and fix them though.
 
wim
7:19 PM
TIL: passing a tuple to str.startswith
 
@wim reading through the standard library reference was the time most well spent...
 
wim
I think I knew it but then I forgot it
then I found it again the other day and it made me happy
strangely, it doesn't let you use a list
 
now if string.replace could take a dictionary :(
 
wim
thats str.translate (py3)
 
it only works for unicode codepoints
 
wim
7:23 PM
anyway there's a good reason for it not to work. the output is not well defined because dicts are unordered
 
they are now! :P
 
wim
'abc'.replace({'ab': 'wtf', 'bc': 'umm'}) == ??
 
just use 'abc'.replace(OrderedDict({'ab': 'wtf', 'bc': 'umm'})), silly
 
Did you just initialise an OD with a dict? :p
 
(no, I'm not serious)
I realized that my joking is not evident, considering the things I occasionally do here python-wise
 
7:26 PM
Anyway... re.sub and all that :)
 
wim
'a'.replace({'a': 'b', 'b': 'a'} == .... 'a' ? :)
 
@AndrasDeak Python-wise and PHP-foolish, we call you
 
@wim an infinite loop would be awesome :)
 
Yes, I'm reduced to making semantically meaningless puns
Also I just used a tautology
Things are bad, guys
 
because they are bad?
 
wim
7:28 PM
'a'.replace({'a': 'ah'}) == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah !
 
@JonClements why not, python 3.6
 
@AnttiHaapala beats the purpose there, doesn't it?
 
@wim it should work like a|b as regular expression in re.sub
 
@wim ahhhhhhhhhhhh
 
wim
ahhhhhhhh whoops
 
wim
7:40 PM
Just found that pythonic is actually defined in the glossary "An idea or piece of code which closely follows the most common idioms of the Python language, rather than implementing code using concepts common to other languages."
 
I was going to ask the other day if the phrase "pythonic" is actually used anywhere official. Guess it is.
 
wim
it appears 12 times in cpython repo
mostly in code comments
 
boo
 
@wim I call bs
10 times
and mostly in docs + tools + history
it appears once in the actual Python code, in Lib/ssl.py:
"""This module provides some more Pythonic support for SSL.
 
wim
oh, I had a detached head
checkout master, pull, and I see 10 times too now
I had been investigating OrderedDict history for this question and accidentally left it detached on an old commit
 

« first day (2167 days earlier)      last day (2796 days later) »