« first day (1456 days earlier)      last day (3540 days later) » 

12:30 AM
up to 80% off microsoft's entire catalog in Steam right now
(that means Halo @Ampt)
 
 
14 hours later…
2:04 PM
php php if I execute a SQL statement once, would escaping be faster than prepared statements?
 
for executing once it doesn't matter
the execution tree will be built only once and then most of the computation will be computing the query itself
 
@ratchetfreak When I call $conn->real_escape_shit
It goes to the database right?
 
escaping to then concat into a statement?
 
Yes
 
that never goes to the DB
also a DB driver may cache previously used prepared statements so future operations can happen faster
so I say go the prepared path
 
2:16 PM
But thing is
If it's a POST
Why would I need caching
 
but then next POST will need to use the same query no?
 
Probably not
Yeah no definitely no
 
disregarding the parameterable stuff
 
Oh what do you mean
It caches the "prototype" statement?
 
yeah
it's possible at least
implementation details and all that
 
2:22 PM
When would you not use prepared statements?
I heard performance issues
 
so the driver gets the query string (not using the parameters) and then looks into a hash table if it's there and can then use the execution plan in stored in there
I would stay away from trying to escape user input in queries as that is a invitation for injection attacks
 
Trust me, I won't forget to escape and add quotation marks
So then basically all my statements will be permanently cached? Why not just define PROCEDURE for everything?
 
library methods have gotten SQL escaping wrong
not permanently just temporary
in the event the query happens again
 
I'm saying permanently because
 
but I repeat that is a implementation detail
 
2:26 PM
That query is always executed by some user
Or is it instance-specific?
 
for example "select count(ID) from users where username = :name and password = :hash" will be a query done often enough to warrant cashing but not worth defining a procedure for
that is easily cashable in a simple hashmap while "select count(ID) from users where username = 'rathet freak' and password = '1234564568972112345798' " needs some parsing first to recognize it as equivalent as the previous one
 
But still if you pre-define the procedure
Faster or no?
You know, I don't know
I'm so confused with all this database stuff
 
I'm leaning towards predefined is faster
 
2:46 PM
Me too
I lean there with a large angle
Almost falling but I really don't know
 
and would you trust legal advice from a hobo coming of the street into your board meeting and rambling on? — ratchet freak 20 secs ago
 
user55340
3:03 PM
Something for the engineer types (@GlenH7 I'm pointing at you) to get... and you might let your kids play with them too: littlebits.cc
 
user55340
 
user41796
@MichaelT I'm looking at that and wondering if I want to swing for the student kit and donate to the kids' school.
 
user55340
@GlenH7 it is indeed a possibility.
 
user41796
Looks like they've done a good job of making assembly closer to plug & play
 
user41796
Not necessarily something I would want for making permanent kit as the associated parts can be sourced for less, but a really great approach to "throw it together and see if it sticks."
 
3:07 PM
chrome now supports multi window login. This is slick
 
user41796
That didn't work. :-( Anyway, Toys! in the above link
 
TOYS!
 
user55340
 
user15026
@MichaelT I kinda super want.
 
so what kind of interface do we think they're using between modules
high power SPI?
I2C?
 
user55340
3:10 PM
@AshleyNunn heh.
 
user41796
@Ampt probably just physical connection
 
@GlenH7 but isn't there communication between units?
 
user41796
the magnets are there to help keep the connectors together
 
user55340
And there's also the Arduino starter bundle for those who have that level of engineering hacking.
 
user55340
 
3:11 PM
@GlenH7 I mean what protocol do the devices use for communication between them
 
user41796
@Ampt Ah, that's a good question. This link of theirs will lead you down the rabbit trail.
 
@Ampt DC on and off
 
user15026
I just like idea of messing around with stuff and getting it to do things.
 
Did I mention that you can have multiple chrome windows open, each one tied to a different google account?
One for work, one for your personal stuff, another for an alt account
going to gmail on each of these brings up the correct inbox, etc
 
user55340
@AshleyNunn It really is quite neat. There's a ted talk about it somewhere too...
 
3:14 PM
holy crap even the plug ins are per-account
neat
 
user55340
Btw... the Pro Library is on sale... littlebits.cc/collections/pro-library
 
user15026
@MichaelT Sadly that is just a little out of my price range
 
user55340
@AshleyNunn you need to make and sell cupcakes! (have you seen the markup on those?)
 
user15026
@MichaelT Yes I have, it is super ridiculous
 
3:22 PM
Dude cupcakes are srsbsns
 
user55340
@AshleyNunn toss some booze in there, and you'll have $4k (even $4k CND) in no time.
 
make cupcake for $0.25, sell for $15.99
 
user15026
@MichaelT Especially if I made those ones I am making for you guys when you fund my cupcake tour of awesome ;)
 
@Ampt did you know that if you accidentally light a full-pig roast on fire, it's likely to burn down every structure even remotely near it
 
@JimmyHoffa My little known fact is way cooler and more useful than your little known fact :P
 
user55340
3:26 PM
@JimmyHoffa is this minecraft or real world?
 
@MichaelT Haha! We've caught him now!
 
user55340
@Ampt do not try to catch burning pigs.
 
@MichaelT or dwarf fortress
 
user55340
@ratchetfreak nah... then you'd have... oh lets see... killer trout or something like that.
 
user55340
Ahh! Found it... undead giant sperm whale (amphibious).
 
but !!Pig!!
 
@Ampt you won't feel my fact is lacking in usefulness when you forget it and accidentally burn your house down trying to roast a whole pig one day
@MichaelT real world - in a whole pig the volume of fat and grease causes any fire to be overly energetic
BBQ restaurants burn down like that sometimes, oopsy daisy...
 
user55340
 
user41796
@JimmyHoffa You're supposed to slow roast anyway when cooking a whole pig
 
@GlenH7 mistakes happen
 
user55340
3:36 PM
And then related...
 
user55340
 
user55340
(yes, its related!)
 
But.... Is it... related.... to....... The VIDEO
(Note: ... = Dramatic Pause)
 
user55340
 
user55340
However its moderately important to put that in context...
 
user55340
3:40 PM
 
user55340
 
Did I mention I'm on PTO? MWahhaha
 
3:56 PM
@Ampt yes, you said you're on the bench unless you did get a project?
 
@JimmyHoffa well the difference is that today I woke up at 10:00 and am currently watching TV in my underwear.
Also, there's word of seattle for an upcoming project
 
user15026
@Ampt That's not a terrible way to be
 
@AshleyNunn I'd go so far as to call it pretty fantastic
 
user15026
@Ampt I think I would have to agree with you on that one.
 
4:17 PM
Guys please help
When is it not a good idea to use prepared statements
 
@Ampt call it what you want, just call it somewhere else. The internet's great because I don't have to know what state of dress the other people are in
 
@JimmyHoffa You don't have to, but now you get to! How neat is that
 
@Ampt don't worry you won't have to go, Seattle's a big competitive market, they wouldn't risk sending someone who doesn't know what they're doing, people in Seattle can tell the difference
 
@JimmyHoffa Good. That should really cut down on my competition then :) Thanks!
 
user15026
OH at work: "Do we have a bug tracking system?" cue laughter from the dev team "We don't? At all? How do we keep track of things?" someone points to a three layer deep sticky note covered bulletin board
 
4:32 PM
@AshleyNunn And I raaan, I ran so far awaaaay
 
@AshleyNunn you work at a software place now? Finally get that tech writing gig you been after?
 
user15026
@JimmyHoffa I work at a bitcoin sportsbook
 
user15026
I am a grader/CSR person
 
user15026
It pays well enough til I figure out my next great adventure
 
oh yeah I remember now. We're in (sort of) the same industry now
 
4:45 PM
Jimmy is a Bitcoin day-trader
He's really invested into the future of virtual currencies. I heard he even spear-headed the push for the DogeCar
 
(pickled)
 
user15026
@JimmyHoffa I suspect you deal with nicer people every day than I do...
 
@AshleyNunn aye, our particular clientele are...aged... our CSR's probably just get called sir and mam a lot, but working in the dev team means I don't have to know anything about it except when a CSR enters a ticket from a real issue
 
user15026
@JimmyHoffa I get called...the like supreme opposite in niceness to those things.
 
psr
@AshleyNunn Your moderator experience must be really helpful in you day job.
 
user15026
5:01 PM
@psr Yeah, and on the flip side, my work stuff makes me realize that the drama level here is relatively small potatoes, even on Gaming.
 
psr
@AshleyNunn Unless someone advocates a defensive build for an AD carry. There are limits.
 
WOAH touch support in chrome?!
 
user15026
@psr Truth. :P
 
@psr I like a defensive Huskar carry...
 
5:24 PM
@Ampt speech gestures too just like an Android phone...
 
user41796
@JimmyHoffa Why build two when you can build one?
 
@GlenH7 probably why Chrome does so much low level shit that it basically seems to have OS like features in it's behaviour - more portable
alright. Now I have my service querying and UI updating done, time to work on a good promise structure for defining dependencies
or come up with a proper parser that can turn my files into AMDs which I think is what I really want after all...
 
6:07 PM
168
A: A monad is just a monoid in the category of endofunctors, what's the problem?

misterbeeIntuitively, I think that what the fancy math vocabulary is saying is that: Monoid A monoid is a set of objects, and a method of combining them. Well known monoids are: numbers you can add lists you can concatenate sets you can union" There are more complex examples also. Further, Every mo...

^-- great explanation of a phrase that people throw around as a joke about how confusing the terminology is around category theory and monads
wow, some people got intellisense for F# into EMACS
 
user41796
And Mathematicians wonder why no one ever listens to them...
 
with visual studio F# project support in EMACS
@GlenH7 no they don't lol, mathematicians wonder why identity elements aren't invertible, but the last thing they wonder about is anything related to people
 
user41796
@JimmyHoffa Honestly, I've never listened to one long enough to know what truly troubled them.
 
@GlenH7 and you blame them for not liking people...tsk tsk...
 
user41796
I should work on being more understanding
 
6:17 PM
@GlenH7 you should, you can start now. Hey wanna hear this cool thing I learned about arrows? they're monoids too! Just like monads, who knew!
 
user41796
< looks for mute button >
 
user41796
Oh, sorry. I was just turning down the dubstep channel so I could listen to what you were trying to say.
 
@GlenH7 it is unfortunate that one has to trawl through so much super-abstract-crazy like monoidal endofunctors to find techniques like encoding logic in the type system how I showed you the other day. If it weren't for all that crazy nonsense on the road to the useful stuff, those useful techniques wouldn't be so arcane
 
user41796
@JimmyHoffa I'd agree with that. I don't think I could have ever put that together without your help
 
user41796
And I still ran into issues figuring out how to tease out the properties' types so I could cast them back to a primitive correctly.
 
6:21 PM
@GlenH7 you can't get anywhere near those advanced techniques without finding tons of scary terms and equations that look nothing like programming, always scares programmers away
 
user41796
That's quite true
 
user41796
Lippert has an article explaining why you sometimes need to double cast object when casting to something else. And he delved into covariance and contravariance and blah blah blah ... :-)
 
user41796
Which I mention only because he's really good at avoiding scary terms when explaining things
 
@GlenH7 yeah, at the end of the day abstraction is just compression. Covariance and contravariance aren't complex, but it would take too much space to directly explain the concepts instead of just using the words and relying on your readers to be able to mentally decompress the concepts when reading about them. If people didn't use those scary terms like universal quantification but instead were more explanatory, their articles would be unreadably long
 
user41796
Just gimme teh codez!
 
6:27 PM
@GlenH7 true, side effect: Most of his writings are like 5-10 article series, other than his articles detailing .NET intrinsic functionality like static constructors and static member initializers, I can't read most of his blog. Entire articles in each series are all dedicated to small concepts because he avoids abstraction and writes so decompressed, I get bored with the pacing
 
user41796
On the flip side, that's invaluable to someone like me who isn't as familiar with all of that.
 
@GlenH7 yep, he's the first blog I would point most people at for tons of concepts
 
user41796
And I think today is my turn to complain about how big Angular is and how many different ways there are to do something.
 
@GlenH7 really? That's...just strange...
 
user41796
At least I have working examples from other apps that we have to work from.
 
6:34 PM
@GlenH7 are you actually touching Angular?
 
user41796
at some point today, yes I will be
 
user41796
throwing together a simple page to streamline our process for adding new users
 
user41796
So my first step is stripping out everything I don't need from the other page(s) and building it up from there.
 
@GlenH7 ah - let me know how it goes, Angular seems way too much for any "simple page" - but I've read around people saying it's very easy to just use a tiny bit of Angular for simple things rather than getting pulled into using a bunch of parts of it... Am curious if you find it is easy to do simple things with it or not
 
user41796
Hopefully it will work well in my case. Broadly speaking, I need to capture some pasted text; convert that to new users; then push the new users to a web service. Found an answer on SO kind of showing how to run the conversion.
 
user41796
6:41 PM
But I'm sure I'll have an opinion of it in a few days...
 
c-v to create an account? weird.
 
user41796
@JimmyHoffa we'll get requests from clients to add a batch of users. A lot of the time, they just pass a spreadsheet around with the details for each user (first, last name; email; ID; etc...)
 
@GlenH7 right, engineering firm = lots of professional services projects
 
user41796
pretty much
 
psr
@JimmyHoffa Not true. They wonder whether people are invertible as well.
 
7:01 PM
@psr and? ....are they?
 
psr
7:12 PM
@JimmyHoffa The answer was right there in the explanation of why a monad is just a monoid in the category of endofunctors. Sheesh.
 
7:43 PM
When is it not a good idea to use prepared statements
In sql
 
.NET Fact Of The Day: .NET Event members are immutable by being copy on get. This is why you should only ever touch a local copy, because if you try to fire or otherwise utilize the actual member directly, it could be null so you have to check for null first, but after the null check you will get another copy that may have been nulled , so you always have to do a get and hang onto the copy the getter gives you as it will not change after the copy was made.
@Shahar when you want to create security holes that you can later patch and make a big stink about how great you are for having fixed the security holes
The copy on get behaviour is a purposeful feature to allow people to grab thread local versions that won't be screwed up by other threads un/subscribing to the event. A wise tradeoff in my book, the trade being that when you get a local copy, and another thread unsubscribes a listener (maybe in the .dispose()) before you fire the event, your local copy will have that listener and fire it's subscription regardless - it's a known unsolvable race condition
well..maybe not unsolvable, I guess if you wanted to fix it with a mutex mechanism of some sort you likely could...maybe... but it would be ugly as hell and relatively unnecessary
 
8:19 PM
@JimmyHoffa no I mean when would you use escaping + query over prepared statements
 
psr
@Shahar That is the question Jimmy answered, yes.
 
No...
Prepared statements + appropriate double quotes = wow so secure
I'm sorry I meant
Escaping + appropriate double quotes = wow much security
 
psr
If you feel confident enough that you know the SQL parser's algorithm well enough that you can properly escape in all cases and feel it's a productive use of your time to write that and maintain it for all version of all databases you use now and in the future, feel free.
 
user41796
Every now and then I want to congratulate a poster for earning my last close vote of the day. Most of the time, I'm pretty sure they wouldn't understand though.
 
8:36 PM
votes down, VLQ flags etc are welcome too
recommendations tag! and nothing else, wow
 
psr
Sort of answerable, though
I almost always see line counts though, not character counts
 
user41796
@psr So not only does that OP not understand what the site is about, they can't search very well either.
 
user41796
That took you all of a minute to search for?
 
psr
I'm not arguing that it's a good question
"average program length by language" LMGTFY
I haven't commented on his question because I'm not sure I want to encourage him.
 
@GlenH7 recommendations tag says: Tag for asking for recommendations on resources (such as books), programming languagesuser320473 5 mins ago
4
Q: recommendations tag - burn? edit? blacklist? or kill one by one?

MichaelTHistorical questions about recommendations: Should we ban the recommendations tag? Is a [recommendations] tag really necessary? The general consensus of these two is that the tag really should go away... though nothing has been done about it. If the tag remains, it really needs a better tag-...

 
user41796
8:46 PM
@gnat Already fixed the tag wiki. :-)
 
user41796
I'll roll through the tag this weekend / evening and do what I can to kill off the tag and any associated crap questions.
 
@GlenH7 I think it's about time to clean this garbage completely. When @MichaelT posted, there were 88 questions, lots of them opened. Now it's about 20, most closed, many with delete votes. Oh, it would be nice to burninate as well - it's smaller but stinks almost as much
 
user41796
I've got delete votes left in the day, I'll go see what's deserving...
 
user41796
And for the record, I love being able to directly edit tag wikis without having to go through the review queue.
 
@GlenH7 I was going to bump that meta question next week, there are few questions worth editing / closing yet. But recent "pearl" made me want to kill it now :)
 
user41796
8:50 PM
Skimming what's there, it's just as easy to kill it off over the weekend.
 
@GlenH7 great to hear that. I started cleanup with most tricky / worthy to stay open questions, and it was quite difficult in the beginning. Didn't notice how it turned out that only garbage has left
 
user55340
Knocked out a couple more of them...
 
user55340
Actually... lets put this one to rest: programmers.stackexchange.com/questions/46573/…
 
@MichaelT I strongly oppose! because I am outta delete votes for today :)
 
user41796
Needs just 1 more
 
user55340
8:59 PM
Could even get @JimmyHoffa or @psr to do that one...
 
are we cleaning up tags?
 
user55340
Oh oh... its the Y guy.
 
user55340
@YannisRizos suggestions and recommendations.
 
user41796
@YannisRizos yes please
 
user55340
10
Q: When a task can be accomplished by either Javascript or CSS, is it better to use CSS?

A TI always veto JavaScript by using CSS as much as possible. i.e. I create tabs and rollover buttons using CSS rather than JavaScript. I have seen some solutions—specifically the Wt web-framework—which advocate JavaScript; but gracefully downgrade to CSS if the browser isn't capable/js-disabled. ...

 
user55340
9:01 PM
Double whammy there.
 
user55340
Unrelated to that... neat Java8 Update 20 feature: String deduplication: blog.codecentric.de/en/2014/08/…
 
@YannisRizos no cleanup no way! We're merely discussing various and about how great it would be to get back into good old times of NPR
 
@MichaelT too many answers (and none pointing out the most important fact) - CVd.
 
user41796
@MichaelT thanks for fixing that one
 
user55340
@GlenH7 it had a fair number of votes and views and answers and such...
 
user55340
9:05 PM
might be a candidate for historical lock... though I'm going to think about it more (or reconsider when I stumble across it again)...
 
user55340
Its not a bad question, it and its answers are well written... its just not a good Q&A question.
 
user41796
One more delete vote required for this one and this one. And suggestions goes boom!
 
user55340
@YannisRizos with the big delete votes.
 
user55340
More than just boom.. its possible to bug those mods to blacklist it to never show up again.
 
oh I am getting rep refunds of deleted downvoted answers. Very nice of you guys, thanks!
 
user41796
9:09 PM
Because it's all about get you rep refunded. :-D
 
user55340
, other than that one locked merge that will take a mod like @YannisRizos is empty.
 
user55340
Btw, friday afternoon is likely the best time to do these (though it will sit a bit on the weekend for active) because you aren't pushing off other rapidly active answers during the workday.
 
user55340
Though yea... front page is kind of spammed with my edits.
 
user55340
Gah... saw this...
 
user55340
0
Q: Basic logical operator question

user147699#include <stdio.h> int main() { int k=5; if(++k < 5 && k++ / 5 || ++k <= 8) { printf("%d",k); } return 0; } Why is the output 7 and not 8?(I am a beginner in programming so please bear with me.)

 
user55340
9:17 PM
Hmm... maybe another tag cleanup is in order... 776 questions. Bit big.
 
user41796
@MichaelT Shunt them all to /dev/null instead?
 
@MichaelT unlearn
 
user55340
Out of delete votes now too...
 
user55340
@YannisRizos is empty... please blacklist it before any more determined askers have a chance to put it back.
 
we haven't had rollback war for quite a while... programmers.stackexchange.com/posts/254855/revisions (flagged for moderators to take care of)
I am almost thankful to the asker. Without their crappy question, it would take at least a week or even two more to cleanup these tags :)
 
user55340
9:33 PM
@gnat I've got a flag in there too asking for close, edit, delete, and blacklist (or some subset of that).
 
@MichaelT bleh?
 
@MichaelT Can't, only SE can. Meta.
 
user55340
@YannisRizos Raise the bat signal?
 
user20683
@GlenH7 shunt to g0 (SPARC joke, we're walking, we're walking)
 
user55340
@ChrisF they're gone... please hail the appropriate capable individuals so that they can obliterate the tags recommendations and suggestions so that they may never come back to haunt us again. — MichaelT 2 mins ago
 
user55340
9:40 PM
@MichaelT - now they're gone it will be harder for them to return. Leave it a couple of days. If they come back then I'll ask for blacklisting. — ChrisF ♦ 1 min ago
 
user55340
So for that... if the rollback war guy really wants to have that tag there... it will get hit with a bigger hammer.
 
user55340
So anyways... lost in all that... @gnat did you see that bit about Java 8 and strings I linked?
 
user55340
> Whenever the garbage collector visits String objects it takes note of the char arrays. It takes their hash value and stores it alongside with a weak reference to the array. As soon as it finds another String which has the same hash code it compares them char by char.
If they match as well, one String will be modified and point to the char array of the second String. The first char array then is no longer referenced anymore and can be garbage collected.
 
@MichaelT but what if one of the characters in one of the arrays is a superposition O_O
it might match occasionally
 
user55340
9:56 PM
@JimmyHoffa Fortunately, there's no java.quantum.string library.
 
10:17 PM
...I just started writing 'TypeSystem.coffee'....
 
user55340
11:03 PM
29
Q: Down with FizzBuzz... LOL

Mat's MugThis post is the result of reading through and following the LOLCODE Specification 1.2, and writing and executing my code on compileonline.com. My "hello world" was going to be a fizzbuzz. I like it because it nicely illustrates the basics of a language - variables, operators, looping, condition...

 
user20683
@MichaelT I saw that
 
user55340
btw, @gnat that - programmers.stackexchange.com/… would likely be a good place to start chipping away at it.
 
user20683
A website from another time for sure
 

« first day (1456 days earlier)      last day (3540 days later) »