« first day (821 days earlier)      last day (3195 days later) » 

4:14 PM
0
Q: Return IEnumerable<KeyValuePair> from a private method; use Dictionary or anon. type?

ErikEIs it okay to return IEnumerable<KeyValuePair<string, string>> from a private method instead of returning a read-only dictionary? This allows for shorter/simpler code. Note: In the below code, PropertyDictionary is a static property that returns an IReadOnlyDictionary<string, PropertyInfo> that ...

 
Morning
 
I think you should look at the sister site of SO codereview.stackexchange.comOskar Kjellin 47 secs ago
 
Greetings
 
@EthanBierlein Morning :)
 
Does any of you use PCSX2?
 
4:27 PM
The impossible has happened
 
Which is?
 
I asked a question on Programmers.SE that wasn't closed.
 
Link, please?
 
And it somehow made it's way onto the hot questions list.
12
Q: Is it better to store data in a small, unreadable format, or a large, readable format?

Ethan BierleinI'm often conflicted when creating a project that requires manipulation of data in files. Often times, I store data in a readable format, like JSON, as seen below: { "Project 1": { "description": "Bar Baz", "root_dir": "C:\\Foo", "size": 42 }, "Project 2": { ...

 
I asked a question on Programmers that wasn't closed like three times.
 
4:30 PM
"how to make this simpler!" codereview.stackexchange.com? — Shar1er80 19 secs ago
 
One of them still has no answers! :)
 
0
Q: Embedded FizzBuzz

SirPythonOverview Recently, I have started to enter the realms of embedded systems programming. And, as my first major project, I thought I'd do the obvious: FizzBuzz. However, this is a little different: this is a game. Like my FizzBuzz Challenge, the user must enter either Fizz, Buzz, FizzBuzz, or th...

 
@CaptainObvious Ugh. The assembly syntax highlighting is awful.
 
@EthanBierlein I completely agree. Reminds me of that one about the harmonic average.
 
I think for Assembly it should just highlight each word a different colour.
 
4:34 PM
Like that?
 
@EthanBierlein Ooh, that's pretty.
 
That's not the same as what I said, though. :(
That highlights specific words specific colours.
 
I should try to learn vim.
 
Maybe better fit for Code Review as opposed to SO? — user2366842 32 secs ago
 
@EthanBierlein I have a very basic syntax highlighter in Javascript. Maybe that would do better?
 
4:36 PM
@IsmaelMiguel Sure. I made a syntax highlighter as well.
Ages ago, though.
With JQuery.
 
I've made without jQuery
Just pure DOM access and regex.
You can find it somewhere on my github
 
I use JQuery simply because it's faster, and easier (sometimes)
 
@EthanBierlein jQuery isn't faster :/
Well, it's faster to write, not to execute.
 
That's what I meant
 
Then I agree that it is faster.
But, all I need is an HTML element and I'm done.
How is it odd?
 
4:42 PM
No.
That means that the asker agreed it was a duplicate.
 
When you mark something as a duplicate, there's a dialog at the top that only the asker can see.
One button puts it in edit mode. The other closes it by Community.
 
Anyone feeling brave?
 
@IsmaelMiguel How so?
 
Richard nearly a Jon Skeet, only for Sci-Fi
 
4:52 PM
There are two users with more rep.
 
5
Q: PHP function to create a Hex dump - Followup

Ismael MiguelThis is a followup of the following question: PHP function to create a Hex dump @Corbin made a very interesting review, and I re-wrote most of the code. function hex_dump( $value ) { $to_hex = function( $number ){ $hex = strtoupper( dechex( $number ) ); //if we don't check ...

 
@nhgrif more than Jon or more than Richard?
 
DVK has more badges. the other one....eh
I was talking about their Reputation Tab graph
 
@nhgrif They aren't capping almost every day like Richard is.
 
4:54 PM
There are users with 200-500 reputation that have almost the double of my badges
 
if you look at them, Richard's is most impressive, unless you compare it to Jon Skeet's
 
@nhgrif You just linked one of my favorite songs.
 
Lazer shark!
2
also, there's a 10-hour version: youtube.com/watch?v=E_zdQc4DzFI
 
Good song, but the "fake programming" stuff bothers me ^^
 
5:06 PM
huh?
 
@nhgrif I'm talking about the video I just linked
 
I think Ethan just told you you're a fake programmer
5
You can't let him get away with it -- it would make you lose your street cred
4
Fight fight fight
5
 
@nhgrif Do you mean Laser Sharks?
 
@SimonAndréForsberg You forgot to accept SirPython's answer on codereview.stackexchange.com/q/97268 (in case you are looking for better answers, tell him what his answer is missing. He deserves the +25 reputation)
 
not even remotely
I mean...
 
That's a purely stylistic review
I don't accept those either
 
@Duga Flagged for NC. SO losers...
 
Out of 20 answers, I have only 6 that weren't accepted. (5 of those will never be accepted).
It's case to say that it isn't that bad!
 
5:33 PM
This probably would be better asked at codereview.stackexchange.comEric Renouf 8 secs ago
I'm voting to close this question as off-topic because working code looking for review belongs on codereview.stackexchange.com. If you choose to repost there please try to do more than drop a huge script and just say "Suggestions please?". Mention specific areas you are looking for advice about and/or specific things you think you could probably have done better. — Etan Reisner 50 secs ago
 
On SO, 44 out of my 88 answers aren't accepted.
 
1 out of 9 is accepted.
5 with zero upvotes, including the accepted answer.
 
0
Q: jQuery advice: scrolling event being fired too many times

John NivavThis code works and does the job, but its EXTREMMELY poor + rudimentary and have some issues with scrolling event. Can somebody help me to optimize the scrolling event? Prototype: http://codepen.io/rootion/pen/gpZZpG Structure and desired behaviour: There are two containers, .layout__left (re...

 
http://www.commitstrip.com/en/2015/08/03/a-very-common-coders-youthful-mistake/
CommitStrip - Blog relating the daily life of web agencies developers
A Very Common Coder’s Youthful Mistake
CommitStrip
1438623142
 
One of my best answers is basically a copy from some manual.
 
5:38 PM
25 out of my 116 answers was accepted
24
A: A comprehensive regex for phone number validation

Ismael Miguel/^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$/i This matches: (+351) 282 43 50 50 90191919908 555-8909 001 6867684 001 6867684x1 1 (234) 567-8901 1-234-567-8901 x1234 1-234-567-8901 e...

This was my best one
 
@CommitStrip Sadly, that's true.
 
And it is a community wiki
 
325/805 here. Ya'll need to step up your answering rate
 
@JeroenVannevel I've decided to use StackOverflow as less as possible
 
@IsmaelMiguel It's a question with half a million views, that may help with the votes.
@JeroenVannevel I migrated to CR and I'm not going back.
 
5:40 PM
@Mast But it is a community wiki, doesn't count for reputation
 
I don't care for fixing bugs. I'm more concerned my code makes my ass look fat.
 
I'm concerned about bugs
 
/joke
 
My most successful question is actually on Programmers.SE.
 
But on StackOverflow I've made only around 13-14 questions
 
5:42 PM
@Morwenn so is mine
most interesting Q/A's are on SO though
CR doesn't come even close
 
the best way to take care of bugs is to hide a sugar cube in a nearby office so they migrate away
 
At least what's interesting to me
 
How do I check my questions accross the network?
 
Now we're talking statistics: the following question has a score of 7. So do all 3 answers.
7
Q: Writing a program to read a maximum of 99 elements in an iteration from a list

09Q71AO534I want to read a list of elements and pass a maximum of 99 elements to a function for some logical operations. I have tried this with an array as an example and this code was successful in achieving my purpose. I just want someone to review it and help optimize it. /** */ package com.review....

 
5:44 PM
> Where equations are born and mutants are buried
lol
 
go to your profile on any site and ciick "network profile"
 
My best answer is on Parenting, surprisingly.
 
@Malachi That was an old one :)
 
58
A: Write program in your favorite language in another language

Ismael MiguelPHP and Javascript This is a polyglot: You can run this code in both languages: if("\0"=='\0') { function printf(){ $b=Array(); $a=$b['slice']['call'](arguments); $a=$a['join'](''); console.log($a); return $a.length; }; function strtoupper($...

My best answer
Across the whole network
The 5th more voted on there was a brainfuck interpreter -.-
 
@Morwenn I just like the title! lol
 
5:46 PM
@IsmaelMiguel That quote is so heavily misunderstood.
I don't think you (or the majority of the answers) understand the point of the quote. It's not that a Real Programmer writes code that looks lexically like Fortran even though he's writing in Pascal or LISP: it's that he applies a Fortran way of thinking even when writing in Pascal or LISP; e.g. "As all Real Programmers know, the only useful data structure is the Array.". Great answers would be procedural code in Prolog, functional code in C, object-oriented code in Pascal. — Peter Taylor Mar 21 '14 at 11:10
 
@IsmaelMiguel mine is
25
Q: Is my coding technique progressing in terms of C# loops?

MalachiI have isolated a little bit of code that was causing a small debate between myself and another user. I have taken some of the things that he said and meshed it with the code that was being reviewed in the first place here. Original Code while (!validInput) { var playerChoice = -1; Con...

 
@Malachi The problem in the question was quite interesting too.
 
Didn't get me any nomination in the "best title of the year" award category though
Saddest day in my life
 
@Mast Why is it misunderstood?
 
Read the comment.
 
5:48 PM
@JeroenVannevel should have
 
I read it, and in fact I can't understand it at 100%
 
I gave myself an honorary mention and a cookie so my mind was eased
 
I have two PPCG answers and one Puzzling answer in my top list. The rest are CR.
 
I decided to do not participate that much on PPCG
It is floaded with Pyth and CJam.
 
I quit because you can't golf with C++, and I don't know a lot of Python.
 
5:53 PM
What takes those languages do in 8 bytes or less, will take 100 in PHP
 
@JeroenVannevel if I want to create a credit card object for a one time charge, should I make it a struct or a class?
 
@IsmaelMiguel That is why they can't be used for anything real.
 
the object represents a charge?
 
I am not going to store the object any longer than I need to right now.
no the card information itself
 
@Hosch250 Abusing eval wasn't good enough for them, so they wrote their own languages...
2
 
5:54 PM
@IsmaelMiguel Use Rebmu. It could work and be original.
 
@Hosch250 Some, with an effort, can be used for string processing. Like Retina. (it really isn't a language, but they accepted as it)
 
One of those languages prints the entire 99 bottles of beer on the wall if you call a function which is one character.
That's cheating.
 
Yeah, that sounds like a situation where structs are typically advised
 
On the other hand, they've invented languages that can write any program with any single character - you just keep adding more to the end to change it.
 
@Morwenn o.O I can't read it
 
5:55 PM
@JeroenVannevel what is the difference? one is a type and one is an object?
 
I don't use them often myself because I'm not too familiar with them but if I recall correctly, you use them when they're not supposed to live very long and are small in size
 
@IsmaelMiguel Well, it's a general-purpose golfing language after all...
 
Memory location amongst others: heap vs stack
one will also get boxed when needed, incurring extra operations
 
@JeroenVannevel I used a struct once for a something I was going to serialize into an XML
 
@Morwenn Still, unreadable
 
5:56 PM
@JeroenVannevel what do you mean by boxed?
 
and most importantly: structs are value types so very good for immutable information
 
@Mast Should there not be restrictions against that?
 
@EBrown There are.
 
boxing is wrapping a value type in a reference type
Java is more easy to notice this: int -> Integer.class
 
@EBrown I think it's part of the 'standard loopholes' rule you can apply to a question.
 
the more we talk about this I think that struct is the way to go
thanks @JeroenVannevel
 
No problem
 
I need to read about structs more.
 
That rule will eliminate a bunch of tricks like that and underhanded.
 
I need more coffee
 
5:58 PM
Underhanded?
 
Structs are pretty handy, if you know what you are doing.
 
We need oneboxing for MSDN
2
 
And GitHub.
I wrote a suggestion for community challenge that almost won once. Then, I posted it again, and last I saw, it had an average of +3.
It was killed that time.
 
I think that might've been the one CC I actually voted on
It seemed useful
 
6:00 PM
I'm not going to post it again so I don't seem like a troll, but if you want to post it, I'll vote for it.
 
0
Q: Is there a more efficient way to remove a header and footer from text output with PDFminer?

pliebI use PDFminer to extract text from a PDF. Then I reopen the output file to remove an 8 line header and 8 line footer. Is there a more efficient way to remove the header/footer, either in place or without re-opening/closing the file? Please mention general best practices I dd not follow. Thanks...

 
Sure, when I stumble upon the thread for the next time
 
8
Q: September 2015 Community Challenge

Gareth ReesIt's time to choose a community-challenge for September 2015. Post your challenge as an answer to this question. Feel free to resubmit non-winning ideas from previous months. Vote for those answers which interest you. At the end-of-day on Monday, August 31st, the top-voted post will become the ...

 
Stumble stumble
 
Trip, fall.
 
6:03 PM
I'm not sure if it's a feasible thing to request as CC though
You can't really make something that relies on a system you have no control over
how do you even inject that?
 
It is run client-side.
We could make a request on Meta.SE instead.
 
That would be better
Time to enjoy my amazing wonderful shower that I've missed so dearly
 
@Hosch250 Needs more answers.
 
Would anyone be interested in designing his own language?
 
There aren't many languages I'm completely unfamiliar with. I touched most of them at least once.
 
6:16 PM
@IsmaelMiguel I already tried several times.
 
@IsmaelMiguel It's usually not worth the hazzle, so people write libraries instead.
I could try LOLCODE...
 
I'd try Clojure.
 
@Mast Try MarioGolf (an attempt of a golf language) or Corky (incomplete documentation, no implementation so far). If you want the challenge, try basic. Or TI-BASIC.
@Mast Libraries for what?
 
@IsmaelMiguel I've written both BASIC and TI-BASIC.
So those don't qualify.
 
Hum...
Oak!
 
6:19 PM
I'm not very proficient with them, but that wasn't the question.
 
There is always Whitespace, or Piet.
 
Ook!
Ook. Ook. Ook? Ook!
 
Fish
Pyth
 
At some point I wanted to try to write a language that performed automatic downcasts based on some conditions, but I never managed to define proper semantics.
 
6:19 PM
Retina
 
Chef.
 
@Mast AppleScript?
 
ArnoldC?
 
@Morwenn I have a language that it's purpose is to be compiled or de-compiled from and to Javascript and PHP, or interpreted
 
@nhgrif Can you compile that without a Mac?
 
6:20 PM
Shakespear
 
Well, it's not a compiled language.
 
@nhgrif Can you interpret that without a Mac?
 
@Mast Ideone?
 
Google would know better than me.
 
There's a language that is a JSON object
And it executes code from there
 
6:22 PM
The current :
17
A: August 2015 Community Challenge

Gareth ReesIn the game of Racetrack, cars race around a track bounded by two concentric closed loops drawn on a square grid: Each player has a car at an integer position \$(x, y)\$ on the grid with a velocity vector \$(v_x, v_y)\$ that starts at \$(0, 0)\$. Players take turns to move their cars. A move c...

 
How about Chess?
Optional-AI.
 
@Mast I've seen it 10 times
 
I'm thinking what a nice language would be for Racetrack.
Mathematica would be nice I think, or whatever that language is called.
 
> It has an instance size under 16 bytes.
9 different properties For a credit card
 
0
Q: Oneboxing for MSDN/GitHub/Badges

Hosch250We have OneBoxing for Wikipedia, Twitter, and a few other sites. It would be nice to have OneBoxing for MSDN and GitHub links. Also, you can expand tags for a site like [tag:tag-name] and [meta-tag:tag-name]. It would be nice to be able to do this for badges as well.

 
6:28 PM
@Hosch250 Shouldn't that be two different requests?
 
Dunno.
 
One for the OneBoxing, one for the badges?
Those are different things IMHO.
 
@Mast I'm studying to be a politician, though; this is just an omnibus bill.
 
I'd say your chance on success would be higher by splitting up.
 
0
A: September 2015 Community Challenge

Hosch250Implement Chess! Your program must support two human players and enforce all the rules, including En Passant, Castling, move legality, pawn promotion, and everything else. You must provide at least an ASCII output display for a given command. Anything above and beyond the basic requirement is ...

0
Q: OneBoxing badges

Hosch250I'm not sure if this is the right term, but we can OneBox tags like [tag:tag-name] and [meta-tag:tag-name]. It would be nice to be able to do this for badges as well.

 
6:42 PM
I've never written LOLCODE before. Are you sure? — Mast 24 mins ago
crying
 
No Brainfuck love there?
 
@EBrown Already touched that, doesn't qualify.
 
@Mast Qualifies for me. :)
 
11
Q: How to speak Brainfuck: for beginners

MastThe following code transforms multi-line input into the the Brainfuck equivalent. One line turns into one program. The resulting programs are split by newlines for readability. Brainf.cpp #include "Brainf.hpp" int main() { std::vector<std::string> userInput; std::string currentLine = "...

 
Can't look! Not allowed to cheat!
 
6:44 PM
@Mast I think he meant swift ;-) — Mat's Mug ♦ 1 min ago
 
LOL
 
@Mat'sMug Ideone doesn't like Swift.
@EBrown You can look, it's actually a C++ question which outputs BF.
 
Yeah but then I would have touched Brainfuck, and I can't cheat for the CC! :(
 
@EBrown No, you'd have looked. If having looked disqualifies a language, I'm doomed for the challenge.
 
hey fellas
 
6:46 PM
Hi @janos
 
hey Mast!
 
oh the irony. I just got a github notification from the ANTLR repository... expect a swift target soon
 
I'm currently learning Lua or that would have qualified...
 
I might actually make an attempt to learn BF just for that CC.
 
Writing BF isn't hard. Writing idiomatic BF is.
 
6:50 PM
0
Q: How do I make data retrieval faster or a better way to do this?

VickThe code I use is working fine. It takes little longer to retrieve and display the data. I feel the table design isn't good because of which the data retrieval is always slow. Table 1: SystemsTable -- 2.2k+ rows +------------+--------------+------+-----+---------+----------------+ | Field ...

0
Q: How can I make theae Java classes and objects less reliant on each other

Adam.JI'm creating a Java application and require some help with designing my classes. The program allows a user to add an Item and their preferred price, as well as a list of websites that contain the item. The program then scrapes each website for the current price and returns the lowest price to th...

 
thea?
 
@Mat'sMug He meant theæ.
 
Okay well then I honestly don't understand this website. Is there another place I can go to ask someone for help on this topic? It's been hours and I keep getting told I'm asking the wrong question... — Adam.J 51 secs ago
 
lol
 
I just don't always have the time to think up different comments for whenever someone doesn't understand proper titles.
 
6:55 PM
Don't take it personal, some people just need some time getting used to SE.
Most people do...
But luckily some of us still read the on-topic and how-to-ask pages.
 
> @Adam.J Code Review is for the review of existing, working code. Your code is pseudo-code, and as such is off-topic. In a situation like this, you may find better help at Programmers.SE. (That is, if they can agree on their scope for today.)
(Had to sneak a bash a Programmers in there somehow)
 
@Mast I wonder if many get bad habits from SO as well. Question quality means much less over there.
 
@Jamal I stopped going to SO for among other things that reason.
 
@Jamal Does question quality mean anything over there?
 
@EBrown Below a certain level the chances of staying above 0 score are slim.
Afar from that, not sure.
Some of the lousiest questions are still upvoted and/or answered.
Some answerers only care about possible rep, not about the rest.
 
7:03 PM
@Mast I do still flag things over there.
 
That's the only thing I still do there.
 
@Mast Link-only answers, "try this" answers... if only downvotes on answers were free.
 
Not constructive comments, a lot of those.
I don't flag actively on SO, but some of the comments Duga catches just deserve some flagging.
Got 319 helpful flags on SO, 180 from comments.
 
Fun fact: I have more SO flags than CR edits.
9
 
@Jamal Poor SO mods!
 
7:09 PM
:-)
 
I don't really flag over there any more.
 
0
Q: MVC and asynchronous callbacks

Stefan FalkI am currently refactoring my GWT client and try to apply the MVC pattern to all concerned classes. My problem is that I am not sure about two things here: Where do I control which view gets displayed? For example if the user logs in and the start page should get loaded. Would the controller lo...

 
0
Q: Upon finding a bug, should you continue reviewing?

SirPythonOccasionally, when I am writing a review, I'll notice that the OP's code has a small typo in it that renders that part of their code broken. Should I stop, delete my review, and leave them a comment saying that their code is broken (and possibly a line number and error message, too)? Or, should ...

 
Mis-click on review FTW
@CaptainObvious @Jamal I think that is Java, it's not C#, I know that much
is a Java product
 
Example of decent, easily solve-able SO question: stackoverflow.com/questions/31794996/…
The only problem I see with that question is the OP's lack of attempt.
 
7:19 PM
holy carp @SirPython. You've come a long way since that amateurish question, not very long ago. I remember that review well, and your thankfulness for the spolier boxes. Having seen your recent superb reviews, it's hard to believe you're the same person who posted that question
 
@janos Thank you for the compliment :)! I'm glad I haven't written too many questions, or else I may not have been able to find an example.
 
a simple SEDE query on my answers LIKE '%bug%' would turn up quite many, I think
 
@janos That's a potential answer to the meta.
 
I'm writing one ;-)
 
-1
Q: Optimizing segment tree with lazy propagation

MosesI have solved this Flipping Coins problem using segment tree with lazy propagation. Here is my solution #include <stdio.h> #include <string.h> #define N 100000 int lazy[N] = { 0 }; void update_tree(int tree[],int node, int a, int b,int i,int j) { if (a > b || a >j || b < i) return...

 
7:29 PM
This is a duplicate of something. This has been discussed on meta before (I'm just not sure where right now...) — nhgrif 1 min ago
 
Greetings
 
added a bit more to my meta answer
 
I have reached the limit of the number of upvotes that may be used on one answer.
 
Abby T. Miller on August 3, 2015
Welcome to Stack Exchange podcast episode #66, recorded live at Stack Exchange HQ in New York, NY on July 7, 2015. Today's podcast is brought to you by The Association of Ex-Fog Creek Summer Interns (AEFCSI). Today's show is hosted by the usual suspects Jay Hanlon, David Fullerton, and Joel Spolsky, plus ex post facto Producer Alex.
 
0
Q: Is this a good way to strip whitespaces in a CSV file in Python?

codycrossleyI am interested in removing leading/trailing whitespaces in a .csv file, and I was wondering if there's a better way to execute this: with open("csv_file.csv", "rb") as infile: r = csv.DictReader(infile) fieldnames = r.fieldnames #Creates list of fieldnames for row in r: for...

 
7:47 PM
Evening all :)
 
Hello, @DJanssens!
 
Hey @SirPython, how are u doing? :)
 
I'm doing great today. How are you?
 
@Jamal is this true?
 
Yep
 
7:50 PM
WOW!
 
0
Q: Advice on PHP code style and good practices

rivfaderI just want some advice regarding code style and best practices. Also I want to know if I'm using constant declaration and closures properly. This code is used to get the data from here http://consulta.siiau.udg.mx/wco/sspseca.forma_consulta which is the schedules for classes on my ex-school. <...

 
Meta Review FTW!
 

« first day (821 days earlier)      last day (3195 days later) »