« first day (858 days earlier)      last day (3142 days later) » 

12:00 AM
RELOAD!
 
Interrupt!ノ(º_ºノ) (╯°□°)╯︵ ¡ʇdnɹɹǝʇuI
 
There are 1491 unanswered questions (94.4316% answered)
 
YES
 
Not even sure how to flag those...lol
 
@rolfl @Phrancis that's exactly what I meant.
 
12:00 AM
Gotcha
 
@EBrown Unclear will do it.
 
@Hosch250 UWYA'd both, terrible questions from a terrible user.
 
I just flagged them myself.
 
@Mast UWYA'd one, Off-Topic'd one.
 
@Phrancis it can be useful for users with enough reputation, they can see exactly what hides behind it.
 
12:02 AM
It is so bad that they have a chat room set up for closing incoming questions: chat.stackexchange.com/rooms/26942/programmers-cv-please
 
@Duga oh crap, is the time that much?
 
One more down vote to whack off the front page: programmers.stackexchange.com/questions/296763/…
 
@Hosch250 Should I mention what percent of their questions are deleted in that room?
 
@EBrown No.
 
Right, because no one actually cares except me.
 
12:05 AM
No, because they got so much crap.
 
That ^^
 
I've been active there for two days, and picked up 25 flags.
Their front page is barely active - most new questions are off topic.
 
TTS (Sleep)
 
@Hosch250 I can point you to some users at SO which will fill out your flag amount every day till you get Marshal.
 
@Mast I'm pretty sure I have Deputy already.
But go ahead.
 
12:07 AM
@Mast You totally should.
To eat, or not to eat. Such a hard decision.
Think I might just head to bed.
 
But you're right, Programmers get a lot of crap questions where on SO it's more crap comments and crap answers.
Just a lot of crap everything I guess...
For starters: free obsolete flags
 
@Mast How are those obsolete?
 
Heh, still working on his comments?
 
@nhgrif Not me, I got Marshal partially from that guy.
Just passing him on ^^
 
Zak
Right. try to go to sleep again. 'nite
 
12:11 AM
I think this can of fruit cocktail is going back in the fridge.
 
@EBrown Updated answers...
 
And some keywords may or may not yield a surprising amount of crap.
Relevant:
113
Q: What do I do when I'm being insulted in a post?

Colin GillespieI am getting attacked. I have seen this happening quite a bit lately, but usually only in the comments though. How do we educate people on how this site works?

 
And Happy to Help is Too Chatty.
 
@Hosch250 I usually look at the date. More than 3 days and I consider it obsolete.
But Too Chatty should stick as well.
 
@Mast That is exactly why you need n rep to do a lot on SE.
 
12:13 AM
@EBrown And there's still plenty of bull around.
 
Guess what grade I just got?
> 500.00 % (A)
 
@Mast Well you have to allow people to start somewhere.
 
That is the best grade I've ever gotten.
 
@EBrown Kindergarten comes to mind, instead of SE
 
@Mast I meant rep wise.
 
12:14 AM
@Hosch250 500%? What scale does that follow?
I'd assume 100% is perfect
 
I don't know. 100% is perfect.
I guess I'm perfection 5 times over ;)
TTGES (Time To Go Eat Supper).
 
Pimping:
0
Q: Permalink to custom query parameter result

rolflCurrently, if you edit a query (which has parameters), and then run it, the SEDE tool allows you to click a "permalink": In the example above, the permalink is: https://data.stackexchange.com/codereview/query/361538/example-permalink?PTID=1 Note how the PTID parameter is included as part of t...

 
Every time someone "pimps" here I always remember 50 cent's song...
 
All I can say, is that there should be some form of kickback from creating good SEDE queries..... a badge, reputation or something!
 
@rolfl Personally I think anything that uses CURSOR is beautiful.
 
12:22 AM
@EBrown Shhhhhhh...
 
@Phrancis Yeah, otherwise Mat might hear. D:
 
@EBrown - FYI: This query
 
@rolfl I'm not even certain what that is.
 
That query reports the % of deleted posts for all sites on the exchange.... ;-)
 
@rolfl I already have one to do that.
 
12:24 AM
Yup, but can you change the query in a parameter box?
 
I don't need to. It queries all the sites at once.
That's how I found out Programmers has the highest rate of (probably) deleted questions out of all of them. Over 50%.
Anything with a NULL value in Score is deleted.
 
cough ... I know that, but you're missing my point....
how long would it take now to report on the number of.... answers?
 
@rolfl Apparently...lol
 
Hm, you're using sp_executesql @query - I normally use execute(@query) - Same thing?
 
@rolfl No clue. Change the 1 everywhere to 0?
 
12:26 AM
which site has the most Constituent badges.....
which site has the most users?
 
@rolfl Don't really care. Lol
@rolfl Still don't care...lol
 
What I'm saying, is that you can do that in seconds using the query/link I sent.
 
Aha.
I am not really that concerned about that type of data, tbh.
I'm not a hardcore SE'er.
 
Paste: select count(*) from [site]..Users in to the query box, and you win....
For what it's worth, you copied/pasted that query you have from one of mine, @EBrown ....
 
@rolfl I know, I think Mast or Malachi gave me it.
From the badges one.
 
12:28 AM
Site badge rankings....
 
Yeah, I needed something quick (because I suck ____ at using CURSOR)
 
Hm, what is [site] exactly? The catalog for all sites?
 
Yeah, let me add it in a comment at the top.
 
No, it is a substitution parameter.....
 
12:29 AM
Reminded me of tempdb..foo
 
@rolfl Updated my query to include a link to that one.
 
when the query runs it will replace [site] with [CodeReview.stackexchange], and [Programmers.stackexchange], etc.
@Phrancis That's essentially exactly what it is.
 
yes, each "site" has a different database, and I put the database in before the table.
 
@Duga huh? new alert?
 
12:31 AM
New alert, and accurate.
 
@Duga Beat me to it. :-) Good work, Duga.
 
Ahhhh question code edits :)
 
FWIW, I agree it's not trivial, I've been meaning to add it. — Tim Stone 6 mins ago
Yes!
 
Tim's SE staff right?
 
Sort of. not quite....
He's a "blessed" independent operator.....
A moderator on stack apps, and does "consulting" on the SEDE side of things....
Tim Post is staff ;-)
 
12:35 AM
BTW.Python
 
0
Q: Compressing .hover jQuey

John123I have 5 or 6 ID's and I need to compress .hover jQuery into smaller amounts. I tried the following answer: Combining hover functions but due to how he needed only 1 "group" inside the .hover function makes mine not work because I need a way to have 2 "group"'s inside the function. Look at my jQu...

 
Sooooo... design question from a newb...
Say I'm writing a script to do some utility stuff with text files on the file system... and I've extracted some things into classes that I felt belonged together
If while modifying my script to change the order in which some things are happening, I'm finding my classes' methods to not work and new method needing added in the classes; what design flaw is this a sign of?
 
@Duga Jamal got it
@Phrancis Do you want data in your classes or should the classes have actual methods?
Seems like you just want a storage container.
 
Well, I get a feeling that I over-extended some of my classes
 
12:47 AM
No, not feature creep, sounds like what happens with changes.
 
    @Debug(debug=False)
    def get_urls(self):
        """
        Reads each line of a file looking for patterns that match a URL.
        If a URL pattern is matched, the URL string is appended to the returned list.
        It applies filters for including and excluding specific strings from a URL.
        Filters can be empty lists, in which case they are ineffective.
            :return: list of URLs as strings
        """
        full_file_path = self.full_file_path
        filter_include = self.filter_include
 
Then, you need to refactor again, after so many changes...
 
That^ is one method among others in a class GetUrlsFromFile
 
Don't worry, adding new methods is extremely common.
And if you are adding more methods for more features, then you are probably doing the write thing.
 
@Phrancis I don't see a problem here.
 
12:49 AM
Just be sure to not duplicate code more than you need.
 
It's GetUrlsFromFile and url_list is returned. Sounds like it's according to design.
 
Ah. See I'm actually trying to add a method or two in there that lets me treat the source one line at a time, instead of a whole file... should I just make a new class instead of trying to shoehorn into this one?
 
Not necessarily.
If it is fundamentally another part of the same process, no
 
Sounds like it's a different implementation of the same task.
 
@Mast Yeah, I figured out that I need to add some non-related tasks to happen in-between reading and evaluating lines, so get_urls(self) does too much
 
12:51 AM
@Phrancis ^^
 
?
Nothing to see there :o
 
in The CRonicles, 7 mins ago, by Mat's Mug
20
Q: "ONCE", "UPON", "A", "TIME"

PhrancisI'm working on a small program to perform various tasks on text content, primarily at the word level. I wrote these methods as ways to help prepare the raw text file into something more malleable, like a List<String>, where at a later point I can perform various routines such as counting and sort...

I think that title was excellent
 
Why thank you!
But, I don't really understand how this works...?
 
I've never posted a self bounty before, what's a good amount for this?
 
@Legato Dunno, 50-300?
 
12:54 AM
@Phrancis I'm dumping links in The CRonicles, so come year-end, we can search for in there to find all noteworthy posts
 
If you do 50, you get a net gain of 10 rep on the question.
 
@Mat'sMug I have something cool you may wish to see.
 
OHhHHHH I know, I think I'll extract some steps from the bigger method into smaller ones, then chain them back into the bigger one (so the small steps can also be called from outside)
 
@Hosch250 200 is always a winner
 
Evening
 
12:55 AM
@Mat'sMug Except on that one by rolfl - wasn't that 300 wasted?
 
shit happens
5
 
23
Q: Connect Four AI (Minimax) in Clojure

naegI wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc. But keep in mind the AI is not finished yet, other heuristics will be added in the near future. Curren...

 
@Legato I put up one bounty so far, only 50. Was enough.
 
Wasted imaginary internet points eh :)
 
Your mileage may vary.
 
12:56 AM
I love debugging when the debug points aren't being hit.
 
@Hosch250 Doesn't that mean your points are in the wrong place?
Or simply not enough points?
 
LOL, no, it means (in this case) that I was missing an attribute.
I wish it had thrown an exception.
 
Ah.
 
I thought it'd be an interesting question.
 
@Legato Interesting questions don't necessarily gain good answers.
 
12:59 AM
THIS IS AWESOME
 
Or any at all. :P
 
I've seen many good questions I can't answer.
 
@EBrown ORLY?
 
@Phrancis OH YES
 
@EBrown NO WAI!
 
12:59 AM
@Mat'sMug I am rolfl and I endorse that statement
2
 
Stackoverflow is for asking about problems with code you wrote, that you feel should work, but doesn't, and you've tried everything you could think of already. "How would you improve this code" is off topic and should be asked on codereview.stackexchange.com instead. — Mike 'Pomax' Kamermans 37 secs ago
 
@Hosch250 YA RLY!
 
@Hosch250 SRSLY BRO
 
@rolfl LOL. I endorse the sentiment, not the phrasing.
@EBrown HUH?
 
I try to make that happen about once a day.....
 
1:00 AM
@Hosch250 HOLD ON I HAVE TO GET THIS CR QUESTION READY
THIS IS SO COOL
Alright, Caps Lock off now.
2
 
Let it out already dude @EBrown ;p
 
@Phrancis ♪ I'm so excited, and I just can't hide it. ♪
 
We noticed.
 
@EBrown ... ... no... you didn't... ***ARGH***
 
Fortunately, I don't know that song.
 
1:02 AM
This is a good moment to GTFO
 
@Hosch250 You do, you just don't remember that you do (and you're all the better for it)
 
I don't even know who Gloria Gaynor is.
 
That was wrong. That was a different horribly catchy annoying song
 
@Hosch250 I'm so sad now.
 
@Phrancis This is the perfect moment to create the puke smiley room.
 
1:03 AM
You broke my heart @Hosch250.
 
Alright, back to Python then
 
@EBrown Serve you right, if you have that sensitive of one.
 
monking
 
@Legato What in the world?
Why did you just close that zombie of yours?
 
0
Q: Console Repetitive Prompt

EBrownSo I wrote this for my Mandelbrot Generator, to collect and use input from the user, and I made it dynamic enough to be useful anywhere. I'm really interested in all critiques of it, as I'm going to be using it a lot now. The idea is to allow the user to easily show messages on the console, tha...

That is what I got so excited about.
 
1:15 AM
Boy, is that ugly.
You definitely need a review.
 
You are more than welcome to submit one. ;)
 
@EBrown Can you show the class structure too?
 
What does the $ before strings mean?
 
@EthanBierlein String interpolation.
It means anything between {} is interpolated. Basically, $"{5}" is the same as string.Format("{0}", 5).
 
Yeah, I figured that out when I saw {Environment.ProcessorCount} in the string.
 
1:16 AM
@Hosch250 What class structure?
 
What class are those methods in?
 
@Hosch250 class Program
The main root class.
 
Where is T coming from?
 
They are static, so they can be dropped anywhere.
It's a generic type parameter.
 
Don't you have to use Program<T> to use that?
 
1:17 AM
@Hosch250 No, that's why <T> is declared on the method.
 
Oh, OK.
 
static T Prompt<T>
That means, that T is only local to the Prompt method.
Generic type parameters can be used on class or method declarations.
 
I didn't know you could specify T on a method only like that.
 
Yeah, it makes it really handy.
 
1:18 AM
@EBrown lol, I was about to say that.
 
I thought you had to pass it in with class<T> to be able to use it on methods.
 
The where T : struct also means that T has to be a value type.
@Hosch250 Nah. :)
 
@EBrown Yeah, I know that.
 
@Hosch250 Ah, alright. :)
 
3
Q: Console Repetitive Prompt

EBrownSo I wrote this for my Mandelbrot Generator, to collect and use input from the user, and I made it dynamic enough to be useful anywhere. I'm really interested in all critiques of it, as I'm going to be using it a lot now. The idea is to allow the user to easily show messages on the console, tha...

 
1:20 AM
Man, this is one of the handiest things I've written by far.
 
-_-
Really, @EBrown
3
Q: A completely repetitive console prompt, a completely repetitive console prompt

EBrownSo I wrote this for my Mandelbrot Generator, to collect and use input from the user, and I made it dynamic enough to be useful anywhere. I'm really interested in all critiques of it, as I'm going to be using it a lot now. The idea is to allow the user to easily show messages on the console, tha...

 
@Quill Yessir.
I'm laughing so hard I'm almost crying right now.
That one was just for you, @Quill. ;)
(And @Jamal of course)
 
@EBrown I'm writing an answer. Can you check something for me quick?
 
@Hosch250 Sure thing.
 
What happens when you change (T)(object)result; to (T)result;?
 
1:27 AM
Failure to compile.
(I already tried it.)
"Cannot convert type '____' to 'T'"
 
type '____' wtf
 
Hmm.
 
@Phrancis Replace '____' with the name of the source type.
 
@Phrancis it makes you give a face like that
 
            short result = 0;
            pass = short.TryParse(line, out result);
            resultValue = (T)result;
That errors as "Cannot convert type 'short' to 'T'".
 
1:29 AM
user image
4
 
the query strings, oh the horror
 
@Duga nope, all good
 
Man, this is so neat.
 
> If anyone can have a look - I know it's not a story of 5 minutes... - you could save me from depression :)
ಠ_ಠ
 
1:36 AM
@God Thank you for your kind words. — Alex 34 mins ago
reads funny
 
@Mat'sMug You might like this question. It has a bad use of generics. ;)
 
I'm reading it
why isn't requireValue a bool requireValue = true?
 
@Mat'sMug Well, actually...I'm not really sure that or defaultValue should be optional.
I feel like there should be two separate methods for that.
 
method overloading == optional parameters
but you're right. optional parameters have this "VB" feel.
 
Well the problem I have with it is that if there's no defaultValue specified, then by nature, requireValue should be true.
Likewise if requireValue is false, then defaultValue should have something.
 
1:41 AM
so.. you validate your args and throw new ArgumentException when they're invalid?
 
Well, that's not necessarily true either.
Pay attention to the where clause on T.
 
There you go, downvote away.
 
@Hosch250 I don't really downvote. ;)
 
Did you even read it?
Somebody upvoted it within seconds.
 
@Hosch250 Yeah, I'm a quick reader.
Well, I upvote first, then if I don't like it, I downvote afterwards.
 
1:42 AM
So am I, but not that fast.
 
(It's a bad habit, I know, but it has saved me a lot of time.)
 
@EBrown Next time, I'll write it so long that the upvote gets locked in.
 
@Hosch250 You would have to far exceed the maximum character count for that to happen. ;)
Plus I've gotten really good at skimming for good content.
 
@EBrown bad habit, especially for long answers. Your vote might lock-in before you finish reading!
 
@Mat'sMug Hasn't happened yet! :)
 
1:44 AM
@Mat'sMug I do that for your answers.
But, if you turn crook, it will be easy to edit it so I can DV.
 
@Hosch250 This as well! I have insta-edit, so I can just edit something then DV as needed if it locks in. ;)
 
My favorite nugget in the answer is the last point.
 
@Hosch250 I actually thought about that as I was writing it.
I might still do it.
 
If all you do using generics is introduce a zillion if blocks, then don't use it.
 
1:48 AM
@EBrown That's fixing a bad habit with another bad habit.
 
@Mat'sMug Go handle your obsolete comment.
 
@Duga no
 
@Duga if you said code block edited instead, you couldn't be wrong.
 
This may be a question for Code Review. codereview.stackexchange.comGod is good 37 secs ago
 
Let's see what happens when @Jamal gets to work.
 
1:50 AM
@Mast It's actually fixing a bad habit with a worse habit...lol
 
@Duga nope
 
@Hosch250 It's @EthanBierlein not Jamal.
 
@EthanBierlein edit-spree?
 
1:51 AM
Looks like adding spree to me.
 
@Mat'sMug Yup. I'm adding to the ~20 questions that could use it.
 
@Godisgood Please don't review broken code to Code Review. We only review implemented, working code there. — Hosch250 52 secs ago
 
@Duga False alarm (again).
 
2 mins ago, by Mat's Mug
@Duga if you said code block edited instead, you couldn't be wrong.
oh wait, it's not looking at code block edits, is it?
 
@Hosch250 The problem is that I'd almost rather have all these if statements, as opposed to a bunch of method's with few to no lines in them. I guess I still have to make the final decision on that.
 
1:53 AM
@EBrown If they have no lines, then don't make them.
 
@Mat'sMug I wonder if @Duga should only consider edits made by the OP for answer invalidating?
 
^^ that too
 
Hmmm...I wonder if I can change this code from struct's only to allow classes as well.
 
@EBrown Probably.
 
@Hosch250 Not looking like it.
 
1:58 AM
You would have to adjust it, anyway.
 
The reason it works for struct types is because of:
        if (type == typeof(short))
        {
            short result = 0;
            pass = short.TryParse(line, out result);
            resultValue = (T)(object)result;
        }
Which I cannot really use for class types.
 
0
Q: Implementing the basic elements of functional programming with C++ templates

xiver77With C++ templates, I've implemented a template list type with cons, reverse, merge, sort, filter, map, fold; and higher order template functions with currying. The C++ compiler can also work as an interpreter of a (convoluted) purely functional programming language, which is the C++ template met...

 
Oh well, I'll worry of it tomorrow.
Tonight, I'm off to bed.
 
Maybe you could really use generics instead of ifs.
Night.
 
@Hosch250 How so?
 

« first day (858 days earlier)      last day (3142 days later) »