« first day (716 days earlier)      last day (3599 days later) » 

12:07
0
Q: Unit Test failing on case sensitive string comparison

neuronal.bitI'm currently writing some unit tests for my own Binary Search Tree class with Microsoft's Unit Testing Framework in VS2013. The VS solution contains the project for the BST class (as an static library project), together with the according Unit Test project. Relevant classes (shortened too keep...

For code review you're better off here. If you post the error code however I'll be glad to help. — Jens 56 secs ago
@Jens: "code broke, please help" is explicitly off topic at Code Review. Take a moment to review what kind of questions can be asked there: codereview.stackexchange.com/help/dont-ask — Jeroen Vannevel 34 secs ago
But a code review/inspection is in order too. This should be UI related code, so anything that posts more than ~ 20 actions per second is faulty. Also any action that does too much or might block. — Henk Holterman 1 min ago
Does anyone have recommendations for a Git and Continuous Integration to install ona private server?
This seems like a great question, but it might be better suited to Code Review, a site for asking about improvements to working code. Here on Stack Overflow, it is borderline off-topic. — The Guy with The Hat 36 secs ago
@skiwi Gitlabs, Jenkins
@skiwi the CI part of that is heavily dependent on the language you're using to develop in.
12:19
@Unihedro That's what I figured out so far, cool!
We're most likely using AngularJS
0
Q: Table conversion script

Wim OmbeletsI'm converting a table that, up until now, had a non-identity ID column so I have this script I whipped up and it does what it's supposed to do: the original table ends up with an identity ID column and all data is there as it should be. There are also an old and a new table for testing purposes ...

12:40
Greetings, Programs.
0
Q: Flatten a tree to a collection of nodes

Nick UdellI have implemented simple tree class as follows: public class MoveTreeNode { public MoveTreeNode Parent { get; set; } private List<MoveTreeNode> children = new List<MoveTreeNode>(); public IEnumerable<MoveTreeNode> Children { get { ...

-7
Q: Why do "we" want Code-Review (and Code-Golf, ...) to be separate sites?

MartinWhy do we even have Code Review has the right title and raises the right issues, especially: Sure, there can be some overlap sometimes, but these other sites shouldn't be a complete subset of another, yes? But the actual question there is Should questions posted on Stack Overflow that are a...

@Jamal wtf is that?
If you have working code that you're looking to optimize, you'd be better served by posting this question (with full code) at Code Review. If you have non-functioning code, please post what you've got and point out where the errors are. — FreeMan 35 secs ago
@RubberDuck Some guy who thinks that it should just be one big uber meta all inclusive site.
12:52
:P
@RubberDuck The OP has one CR answer, with upvotes. I first thought he was just an unhappy customer.
"before you so flippantly suggest that we could be so easily lumped into that mess over on SO." meh that's rude
2
A: Why do "we" want Code-Review (and Code-Golf, ...) to be separate sites?

RubberDuck The experts and audience of Code Review is a 100% subset of SO. That's not true. Not at all. I barely ever look at SO, yet I am a top contributing member of the Code Review community. From a conceptual point of view, a good question on Code Review is also a good question on SO. Also no...

Don't care. SO is a mess.
And there was this some time back:
-4
Q: Fold Code Review back into Stack Overflow

wilxIt seems to me that this site should be folded back into Stack Overflow. This site is little known, and because of a lack of reviewers, it does not serve its purpose well. Instead, requests for code review should be marked with, say, a review tag on Stack Overflow. Anybody who does not want to se...

@Mat'sMug the dynamic parameters for moveitem operation cannot be retrieved from the 'sqlserver' provider for path: [path]. Invalid path: [path]
Where [path] is the actual & perfectly valid path.
13:10
@Pimgd are you here?
@Pimgd removed mine comment, need to read more :)
@Jamal you Banned that guy from our site, right?
or at least from posting on Meta for a short time
@Lyle'sMug I never did
@Jamal I just kid....lol I am going to post a review to his question, mostly just minor things because there is a lot that I don't know in C++
13:33
apparently code formatting is worth killing for.
Yes.
@chillworld hello
@Jamal Can this be merged into just the Return statement in C++?
BOOL wfret = WriteFile (fh, buf, to_write, &written,
    &overlapped);
return wfret;
@Pimgd yeah sorry, wanted to discuss but you already mentioned it later in the post
@Pimgd so removed comment and voted :)
-1
Q: Save a dictionary to csv

mbbx3hw2I'm very new to python, so still trying to figure out how to do lots of things! How would i convert this into a .csv file? I need it saved into 2 columns with the headers "x" and "y". Any help would be appreciated. (python 3) { "AAA": "all about action", "AEB": "all equals b", ...

This may be of interest. — OldCurmudgeon 13 secs ago
0
A: custom win32_file_streambuf

Lyle's MugWhen you have an if/else statement, and you find it necessary to use Curly Braces on the if statement, you should also use Curly Braces on the else statement. Like here if (result == std::codecvt_base::ok && from_next != from_last) { to_size = dest.size () * 2; ...

0
Q: Refactor nested foreach loop based on object property

Ortix92I'm using a levenshtein matching algorithm to match a title to a filename (for anime). I either use the main show title for matching or its alternative titles (flexget_titles). For that I have the following snippet of code. public function matchFilenameToShow($filename) { $shows = $this->sh...

somebody saw the drama?
14:10
1 hour ago, by RubberDuck
2
A: Why do "we" want Code-Review (and Code-Golf, ...) to be separate sites?

RubberDuck The experts and audience of Code Review is a 100% subset of SO. That's not true. Not at all. I barely ever look at SO, yet I am a top contributing member of the Code Review community. From a conceptual point of view, a good question on Code Review is also a good question on SO. Also no...

^that?
no there were four flags around here...
0
Q: Format letters into text (similar to how you might have date(D-M-Y) = 10 January 2015)

PeterThis is a relatively simple script (basically it's a dictionary containing information on how to edit the input text), but I'm trying to learn to write stuff properly. The commented bit at the top seems a bit messy, but I'm not quite sure how else to demonstrate all the functions in action. Func...

Woah ! Very nice response, good explanation and reusable solution ! I like it ! Did you make Cocoapod with just this Class ? Or somebody else ? 'cause it can be really useful ! — Léo Derbois 22 hours ago
:)
@Vogel612 flags on posts in this chat room?
This is all about formatting. It's trivial. Why not give a useful review about the code's functionality and design? I must say, though, I agree with almost all of your points. — Lightning Racis in Obrit 4 mins ago
do I tell these guys that I don't know what half the code is doing?
or that I don't code in C++?
14:19
Why not?
there are things that seemed odd to me but I chalked most of it up to the fact that it is C++
It's not like there's anything wrong with being judged.
lol :)
@Lyle'sMug You have a habit of answering questions related to subjects or languages you are only partially familiar with, then spend a fair amount of time mopping up the mess that you only partially get right ;-) I know it was a zombie, and I appreciate your efforts, but what's happened, is that people with more domain knowledge are calling you on things.
I would look on it as a learning experience.
0
Q: Replacing IUnitOfWork with a Factory Pattern

solomon8718As a follow-up to this blog post and this question, I wanted to post my idea of replacing the IUnitOfWork with a factory pattern. It seems to me that in the case of this blog post the IUnitOfWork seems to be a type of sudo-factory pattern with each repository type and their accessors hardcoded. S...

0
Q: Levenshtein Distance with Haskell Vectors and Memoization

anaIs the following an effective way to implement the Levenshtein Distance with Haskell vectors? import qualified Data.Vector as V levenshtein s1 s2 = levenshteinV (V.fromList s1) (V.fromList s2) levenshteinV p1 p2 = lev V.! l1 V.! l2 where lev = V.map levi (V.enumFromN 0 ...

14:24
You will get better at things, but, in a way, you use your answers as questions.
@rolfl on the other hand, question has now more viewers and there could be a good review coming up
but a bounty could also be good ;)
Yeah, I don't doubt it. I am surprised Lightness Races in Orbit is aware of it though, that's a serious name to have involved.
@rolfl and I do.
150K on SO.
@rolfl it got a lot of attention right away. I am surprised.
14:25
All I am saying, is that you poke around enough zombies, one of them may actually go for your brains ;-)
3
@rolfl indeed
Loki has a comment that he was going to check it out when it was first posted, maybe he will get to it now...lol
@rolfl LOL
I'm off to home
cu all
Cheers.
if only I had a brain singing
later
14:29
@rolfl you know @MartinR has 142k on Stack Overflow, right? He has posted several answers here.
Yeah, I know that too... we have a number of heavy hitters.
Martin was not on that post though (checking... no).
Eric is domain-wise the most high-profile, probably.
0
Q: tcp server client communicaton

manoj ollaIs a function can be called between client to server in tcp server client communication and getting the data from the server or client and printing on the reciever.

Who is Eric?
@rolfl he messes with me a lot...lol
14:34
Oh
@Lyle'sMug You say things he disagrees with, a lot.
but anyway, I have to get started on actual work, figure out where I left off on Friday.
@rolfl yes I do....lol but he wrote the language, right?
Mostly, yes
he is almost as much of an expert in C# as I am in JDOM... ;-)
Don't disregard his 3 posts!
oh he's had some more votes!
14:39
@JeroenVannevel They were all migrated here.
never posted here directly
@Lyle'sMug he was part of the language design committee, and wrote large parts of the compiler
Someone said Swift is the Jon Skeet of programming languages.
I did that
Did you see my message a bit ago about my Powershell problem?
Someone will make me wish I started that sentence with "don't quote me on that, but..."
yeah, ...but I don't think I can be useful (sorry for not replying earlier)
Joe
Joe
14:43
Hello
Joe
Joe
whats going on here
lots of skeet and lipert talk I see
25€/h for 2h a week to help someone with English..
not bad
do people ever read license agreements?
14:45
newp
Joe
Joe
Anyone ever figure out what is the one question that Eric Lipert upvoted?
in VBA, 3 mins ago, by RubberDuck
@FreeMan No. If you read it, then you'd know you were selling us your soul and then you wouldn't do it.
0
Q: Managing state in Clojure

adrianton3Where should you store state and how should it be managed in a ClojureScript application? Take the following code for example - it's a "game" where you travel either down or left. (ns cljsfiddle) ; initialise the state (set! (.-x js/window) 0) (set! (.-y js/window) 0) ; state modifiers (de...

@Joe it was an accident I read somewhere
in Java on Stack Overflow Chat, Jan 9 at 11:30, by Unihedro
> Confirm that you have read and understood our terms of use by pressing the red "Disagree" button below while holding Shift key at the same time.
Joe
Joe
14:46
Ha, nice.
ah, yeah that
He just doesn't upvote because he doesn't want anyone to think they know more about C# than he does. and upvoting a question or an answer about C# would mean that he either agrees, thinks it's a good question or couldn't have said it better....
There's no such thing as Eric not being able to say it better
14:54
or that he didn't know that about C#.
I'm a Lippert/Passant fanboy, no sarcasm
oh....
I am glad he did what he did.
I need to work more and talk less....lol
So... Trent Reznor must have had a seizure... Have you guys heard this song?
This song is like 30 years late...
@JeroenVannevel join the club!
@rolfl no just somewhere....
sorry 4 the tardy reply... meeting came up
15:08
anyone else have thoughts on this C# Question? ►►► codereview.stackexchange.com/q/86908/18427
This looks like a better question for Code Review. — Don't Panic 24 secs ago
0
Q: Improving a paint brush app

GrendanHere's a fully working code. How can I modify it such that it's in proper format. I mean, somebody told me that I should have all the instructions in the paintComponent method. How do I modify my code to do that? I have excluded the import statements to cut down the size. public class MyPaintBru...

Well that was quick...
0
Q: Dealing with DB Through EF within Winforms

tornupI have the following code which uses EntityFramework to reach out to a DB and retrieve data to populate into a Winform application gridview. I am still quite new to C# and especially abstracting code out of code behind/writing loosely coupled code. Could the following code be reviewed and feedb...

@CaptainObvious wait, how is that one off-topic?
15:22
Which?
the swing one
oh
0
Q: Improving a paint brush app

GrendanHere's a fully working code. How can I modify it such that it's in proper format. I mean, somebody told me that I should have all the instructions in the paintComponent method. How do I modify my code to do that? I have excluded the import statements to cut down the size. public class MyPaintBru...

??
Seems okayish?
> How do I modify my code to do that?
there's no paintComponent method in OP's code
But he's still just asking for help refactoring, right?
Does the code work?
He says it does.
Welcome to CR! I suggest you edit your post to remove the part about implementing new features (I see no paintComponent method there), and then we'll reopen your question and I'm sure you'll be amazed with the answers you'll get. — Mat's Mug 5 secs ago
15:26
I voted for reopen.
I was close to studying today. It's a good thing I mailed my lector to ask when the test is -- I almost started studying 3 weeks early.
I bet I get my Fanatic Badge before the Elections... 78 more days! or I get a job in Tennessee before the Fanatic Badge and the Elections....
15:49
hey
Not sure if I can push everything through for this uni project, but...
Private server with Gitlab and Jenkins and as technologies React or AngularJS with REST API backend (possibly Spring MVC) sounds solid?
For creating a website
lol, java
@nhgrif iToo
turn it into ASUPERIOR.NET and I approve
It's a project of 8 Bachelor students (includes me) and on top of that we have 2 Master students that are taking a course on project/team management and are managing us, quite interesting
And the customer for this project is actually our own IT department of my university
As in lecturers, etc. responsible for our courses, not the ICT department responsible for hardware
16:06
I heard some good things about the Django framework, if you wanted to go for a python website ;)
0
Q: C++ class for capturing broadcast window messages

LingxiIn the Windows operating system, some system events are notified via broadcast window messages. DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE are good examples of this. To receive and process these notifications, one need to have a window with an associated window procedure. Given a non-GUI appl...

0
Q: One trivial method, two ways to write it (switch-case or dictionary)

Xis88I'm mildly confused about whether this belongs to CodeReview, StackOverflow or Programmers because this is not a mere request for a code review, but since it contains fully functional code and concerns only programming style, I'm posting it here. Correct me if I'm wrong. Here's the first, straig...

16:33
Consider posting this on codereview.stackexchange, it seems to be more appropriate there. — Alex M. 32 secs ago
0
Q: Correct form of passing $variable to mysql

coderminatorI am wondering which of the following two examples is the correct or safe form of passing a variable to database: Example one with dots and double quotes $varname=mysqli_real_escape_string($db,$_POST['test']); $query = "SELECT * FROM `members` WHERE `username` = '" . $varname. "' LIMIT 1"; Ex...

0
Q: Very first implementation of an interface

KrowiSo, for my application I need a Localizer so the application can be displayed in multiple languages. Now that I have the localizer, I want to be able to se it in my entire application. After some searching and questions on Stack Overflow I decided to use dependency injection. What I know so far i...

@CaptainObvious off-topic / can't compile and isn't ready for reviewing
16:53
0
Q: Printing a pyramid

user70827Can you please review this code to determine if it's good or can be improved? #include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int h = 20; int bl = 1; while (h != 0) { for (int i = 0; i != h; i++) { ...

why doesn't actually broken code get close half as fast as working code where OP is asking for a way to implement things differently?
come on guys, one more!
@Mat'sMug Doesn't know how to use interfaces? Check. Uses esotheric attributes? Check. Copy-pasted-code detected!
Your code can't compile as provided. Do you have an actual implementation? If not, I'm afraid your code isn't ready for a peer review - but please do come back when it is... because I have plenty to say about it! — Mat's Mug 14 mins ago
There's so much to say about so little code already.. That's frightening, really
4
indeed!
16:57
> put on hold as off-topic by Lyle's Mug, Mat's Mug, sᴉɔuɐɹɥԀ, Jeroen Vannevel, skiwi just now
I have the power
thanks bud
0
Q: Small Modifications In Program Logic and Structure

GrendanI'll keep my question short and precise so that there is no uncertainty. Being a beginner that I am, I have implemented this paint brush app in a certain way by taking some parts of someone else's code as reference. I can safely say that I have built it from the scratch and about 75% of the work ...

I'm voting to close this question as off-topic because it is asking for a code review. Better suited for codereview.stackexchange.com — Tim Castelijns 27 secs ago
Still not working here (Python 3.4.1 on Windows 7) - gist.github.com/textbook/fc67449ceb27eebcd036jonrsharpe 1 hour ago
@blaizor Glad to hear that :)
Sweet, fresh SEDE data :D
17:11
@skiwi you might want to consider using spark for the backend instead of something as large as spring
Not apache spark btw.
@Vogel612 A big part of the interest in Spring is also for Hibernate and POJO classes, DAO/Service layer, etc.
Link for Spark? It doesn't give hits in Google here :/
Give me a sec i got one on my github project...
I am using that with jooq as my backend right now and it looks damn promising to use for REST Based things
Doesn't look bad at all, I even bookmarked it
Though it doesn't feel like the right tool in this case
What about dependency injection for services?
What problem are you trying to solve with that?
Visitors here offf for a while
If you have complex services that you need to call and work with, then you cleanly want to inject those in your controllers
17:18
@skiwi you mean NHibernate and POCO classes ;)
@Mat'sMug Plain Old Crap Object?
F# type providers with POCO FTW ;o
s/Crap/CLR
Common Language Runtime if you wondered
0
Q: Python - Using Two wordlists to search a list of texts

Collin J.I have a function that takes two separate wordlists and searches a third list, which is a text formatted as a list of wordlists. The function finds the proximity between words in word_list1 and word_list2 by taking the difference between their indexes; (it takes one over the difference, so that...

It's funny that for some students after their school is done and they're done with homework etc. they are done for the day... For me, the day just starts at that point :)
Dang it, I need to read 10 (small) chapters of a book for this project and I even want to read on now
17:43
should be migrated to codereview. >! Somehow the site is not in the list when I flag this — NaCl 7 secs ago
You should post a question in a different site Code Review. — iharob 52 secs ago
0
Q: Need help optimizing java code

Nilzone-I'm trying to solve a rather challenging problem I found on this site. When I submit my code it gives me correct answer on 5 out of 10 test cases. The rest of them has a timeout. Something here needs to be optimized, but I fail to see what the something might be. import java.io.*; import java....

18:00
Getting close to a C++ badge:
1
A: Printing a pyramid

Hosch250First, it isn't too good of an idea to use using namespace std; as discussed here. There are times and places to use it, but you should know about this. Second, it is obvious you are using VC++. You should write your main like this instead: int main() I'm not sure what the h and bl names ar...

0
Q: How to know if my code is well written?

Caio KawasakiWell, I'm writing a plugin that will work as a lightbox, and I wonder if there are other methods which I could use to improve the code ... $("#gallery").pacalu({ description: true, closeButton: true, arrows: true }); $.fn.pacalu = function(o) { var el = $(this).attr("id"...

@CaptainObvious How to know if my title is well written?
0
Q: Difference between function pointer codes

unixpipeI would like to know what really are the differences between these two pieces of code and what are any advantages of one over the one, if any. Can there be undefined behavior with either one of these? I would assume not because there are no local variables in the Add function. 1st code: #include <

18:16
Code Review is for reviewing working actual code, note for explaining code that you don't understand. — nhgrif 1 min ago
that's why that didn't work....OP Delete
Yeah, he sounded like a bit of a jerk.
anyone want to check my mud on a couple of C# answers?
@nhgrif yeah little bit
0
A: Return existing values inside database

Lyle's MugYou check if both are not null and then you check them both again, I see from the returns that you don't need to run another block of code when you end another block. personally I think I would set this up differently. If one is null, check to see which one isn't null and run that code, otherwi...

0
A: PBKDF2 Authorization first go, is this optimal?

Lyle's MugI really think that you should merge all of these if statements, make them an if/elseif/else statement. just move all the variable declarations to the top. then it turns into this [HttpPost] [ValidateAntiForgeryToken] public ActionResult Authorize(Administrator a) { var admin = _db.Adminis...

0
A: Is this an acceptable way of calling common async code from a derived method?

Lyle's MugIn your code you create 2 boolean variables for a simple if statement conditional, personally I think that you shouldn't create these variables unless you are going to use them in more than one place or for complex condition statements. using (FleetContext db = CreateDatabaseContext()) ...

and I'm just gonna request another acceptability judgement:
All these "what-if"'s aren't in any way addressing the actual question. And they miss the point of the SE ethical model. SE was designed with some specific goals in mind. These goals greatly affected how the site was built. And soem questions simply go "against the idea behind" StackExchange. Just because the demand is there this doesn't mean that the original goal should be dropped, especially when seeing that the original goal is also in high demand. With that all being said, if you're searching for a discussion platform (and I'm repeating myself) then SE IMO isn't the right place to look. — Vogel612 5 mins ago
18:32
this might be better placed in codereview.stackexchange.comenigma 49 secs ago
@Lyle'sMug I'm kinda surprised you didn't make the next step there...
because I see some duplication in there
right before I posted it here in chat I noticed that and thought about it.
This looks awful:
for line in text:
    for i, item in enumerate(line):
        for w in list_a:
            if w in item:
                first_int = i
                first_word = w
                for t, item in enumerate(line):
                    for x in list_b:
                        if x in item:
                            second_int = t
                            second_word = x
                            if first_int:
                                if second_int != first_int:
                                    dist = 1.0 / abs(second_int-first_int)
I bet it runs awful too.
@Vogel612 in one the only difference is a variable that is an int in one block and a string in another block...let me take a look again
Triple-nested loop, with an additional double nested loop if certain conditions are true!
18:33
holy .... what is that... O(n ^ 4)??
@Lyle'sMug probably the string should be an int then..
Wow, I just realized I can flag a comment on a deleted post.
That's a pretty sweet slide, @Hosch250
Didn't think of it that way.
How about a half-rainbow?
Half-rainbows are not cool. Double rainbows are though.
18:39
@nhgrif Do you know about the ++ -- operators in C++?
Yes.
I got this comment:
Your comment about the increment/decrement operators is only partly correct. Yes, when applying them to an iterator object, the pre-inc/decr will avoid a copy. For a native type like int, this is irrelevant. — glampert 1 min ago
They're from C...
I assume he is right, but I'm not sure what he means.
I thought it always applied to use the prefix over the postfix when possible.
A good compiler will probably take care of it for you. Just look at the assembly and see if it's different.
18:43
@rubberduckvba Sharp VBA? What abomination is this?!
getting noticed ;)
How would I do that?
I don't know for VS. I can check in Xcode at home in a few hours.
@Vogel612 looks like there are data types that could be overloaded or something there. I added to that answer though, check it out and let me know what you think. codereview.stackexchange.com/a/87092/18427
I'm voting to close this question as off-topic because it is about Code Review and/or mathematical efficiency, not a problem with non-working code. — TylerH 34 secs ago
> Disk space required: 62063 MB
I caved for GTA V
First they empty my bankaccount, now they fill my hard disk
3
0
Q: Metadata Management

Shelby115Purpose: I've on occasion required a method for changing a (or a set of) Display names (formats, order, etc.). The problem was I'd have to push to production just to change something as simple as display name of a column. To fix this, we decided on storing this metadata information into the dat...

0
Q: Simplify LESS :hover and :focus

MaxKorlaarI have the following snippet of LESS code to generate CSS. I have some different classes which I apply to different elements, and on hover or focus they should change color. .social-icons { color:#bbbbbb; // Material design palette, 500 .blue { &:hover, &:focus { color: #2196F3;...

0
Q: Parsing url from a document and matching it from a array

kannuI need help in parsing url's from a document and then match if that url is found in a array then append a text to that url. This is what I have done till now: (fiddle) This is working fine, need to ask if this is correct way? What exactly I need to is search url's in a list(ul) (which will be a...

Ha, what do you expect?
I have downloaded games faster than this is allocating disk space
I PROMISE I WONT INSTALL PHOTOSHOP WHILE YOU'RE DOWNLOADING, STEAM
0
Q: How does SE Code Review differ from a real life code review?

moarboilerplateHow do you contrast Code Review, as a StackExchange site, with a real-life code review? If there are differences, are these differences acceptable? How does Code Review bridge the gap between a newcomer's mental model of what a code review is and expectations of the Code Review site? Are these...

19:04
I can hear your meta-keyboard-keys-clicking from here
How does SE Stack Overflow differ from real life stack overflow? Are these differences acceptable? — nhgrif 13 secs ago
not funny
Why not?
Stack Overflow debugging is different from real life debugging.
oh.
should be "real life debugging" then ;)
meh..
19:10
but SO-debugging is RL-debugging!
I don't actually have a friggin clue what their problem is..
@Mat'sMug meh.
when the rubber duck remains silent, that is
see?
the problem is, on SO the rubber duck is almost always silent
and if it isn't it needs hours to respond sometimes
As an SO answerer, my real life compiler is more helpful than SO askers.
19:12
and as a CR reviewer?
As an SO asker, SO is a massive crutch.
Are these differences from "real life" acceptable?
@nhgrif I see I'm not the only one in a zen mood today. I blame @rolfl.
> In essence, Mu.
Joins clapping
I am impressed y'all know the reference ;-)
@Lyle'sMug some comments are not needed... which ones?
@rolfl urbandict helps
19:18
@Vogel612 probably all of them.....lol jk
well "some of them are not needed" isn't really much of a help don't you think?
You should never under (or over) estimate a rubber duck.
4
So, since we're on the topic of zen coding.
in VBA, 18 mins ago, by RubberDuck
> A novice asked the great master: “What is the Way?”

The master replied, “Writing code is the Way.”

The novice then asked, “What is not the Way?”

The master replied, “Writing code is not the Way.”

The novice said, “Then the writing of code is all things.”

The master replied, “And the not-writing of code also.”

The novice asked, “At the present moment, are we writing code, or not writing code?”

The master replied, “We are the code.”
In case you all were wondering...... moderators get pinged when there's a new question on meta.
I think we all just figured you were omniscient.
5
that was definitely the more obvious conclusion ;)
19:25
dang it I forgot what I was doing.....
If your code already works and you're interested in improving it, try over on Code Review. — Kevin 50 secs ago
A better fit for Code ReviewPaul Roub 33 secs ago
reviews of working code are off topic for SO. There is a seperate site for that: codereview.stackexchange.com If you have a specific problem in your code, please identify it so that we can help fix it. — Davis Broda 20 secs ago
@Vogel612 updated answer.
@John This was less about the code itself, and more the way that the question was phrased. There is no actual question here, beyond "does this work". In fact, his question seems to be more about reviewing the algorithms he is using than any particular error. That sore of discussion is not on topic regardless of whether the code actually runs properly. He should either post on Code Review to ask about algorithms/best-practices, or post a question regarding a specific error. — Davis Broda 34 secs ago
0
Q: java;store various types in a field

hasanghaforianIn a java class that belongs in a library, I have a field size that indicates size of image.Really it must be int,but some values are depending to devices,so other developers can set various types for it: thumbnail (value depends on device) real size (value depends on device) custom (arbitrar...

19:42
@DavisBroda well, to be on-topic on CR, the code must be working to the best of OP's knowledge. Asking "does this code work" is therefore off-topic on Code Review. Please see CR's help center for a refresher - asking "what's the best practice regarding X" is also off-topic on CR. — Mat's Mug 35 secs ago
0
Q: Ruby: Player assignment in tic-tac-toe

ppadru1I am building my first OOP program, Tic Tac Toe. I want to conquer it in chunks, but the first part for me is the intialization of the program and the creation of the two players. I want to get some feedback about how I structured this before I move on to build the board and the actual gameplay...

0
Q: Python : Logging processes spawned via multiprocessing

newkid101I am fairly new to the world of multiprocessing and logging. I have a script which can chunk up a large file and upload the chunks into an amazon bucket in parallel. The script works perfectly in OSX and Linux. However when i ported it onto windows, I can seem to log the function that I call via ...

0
Q: C++ Disposing Textures

MattMattRecently, I've asked in code review if my code was causing any pointer related issues; They answered me that I had problems with my dispose method. Basically, I'm disposing textures from a texture map, by cleaning the texture at the ID given to the method. So I would like to ask you if now, I'm d...

0
Q: Project Euler #10 summation of primes Ruby

CyzanfarI'd like to have some feedback as to the performances of the algorithm. class Sumprime attr_accessor :number def initialize(number) self.number = number prime_serie end def is_prime?(num) counter = 2 root_num = Math.sqrt(num).ceil wh...

19:57
ruby seems to be getting popular around here..
20:08
Rubbeh rubbeh rubbeh rubbeh
Looks like a bad pronunciation of "rubber"
> ahah error:
wtf?
The 11 most recently active are all unanswered...
Hmm, I answered a new one earlier.
0
Q: Is Angular the best choice of front-end framework?

user1035288I'm starting a personal project soon and I've been investigating whether to use Angular or not when I came across these; https://javascriptkicks.com/articles/2657/i-wont-be-using-angular-for-my-next-project-and-neither-should-you and http://eisenbergeffect.bluespire.com/leaving-angular/ The arti...

20:20
Well, I'm looking at the Java question, and I have a couple questions:
First, why would you have an empty base like this:
public interface SizeMode {
}

public enum DevicePreDefinedImageSizeMode implements SizeMode {
    THUMBNAIL, REAL_SIZE
}

public enum CustomImageSizeMode implements SizeMode {
    CUSTOM_SIZE
}
I see no value there, but I might be wrong.
marker interface
the usage of it isn't seen here
OK.
And this needs a better error message:
@Override
public int getDownSampleFactor() {
    throw new UnknownError("????");
}
@DavisBroda - I guess the jist of my question is whether or not I used the SecureRandom class correctly to generate a cryptographically secure random password. If this question is more appropriate to codereview.stackexchange.com, then I apologize if I wasted anyone's time. — jamas 31 secs ago
> I'm highly disappointed in your developers here.
Under no situation should a password be stored as plain text.

How do I know you're storing passwords as plain text?
Because you sent it to me.
smdh
In fact, because only one of the two classes derived from the base class uses this, I don't know if I would have this abstract method:
public abstract int getDownSampleFactor();
Either make it throw and just handle in the base, or don't have it in the base.
0
Q: C++ port of my Ruby narcotic solitaire simulator

EMBLEMHaving undergone a little "rediscovery" of C++, I decided to port my Ruby narcotic solitaire simulator program to it. My goal here is efficiency. This program is already about 5 times faster than the Ruby version on my computer; I want to make it even better. #include <algorithm> #include <chrono>...

All right, @Hosch250 I'm home. Where's the C++ code in question?
If you do decide to ask on Code Review, please provide a decent amount of context (i.e. your entire TextureManager class). — 200_success 21 secs ago
5
A: Printing a pyramid

Hosch250First, it isn't too good of an idea to use using namespace std; as discussed here. There are times and places to use it, but you should know about this. Second, it is obvious you are using VC++ (which isn't bad, but isn't exactly the same as C++). You should write your main like this instead: ...

Do you understand what he's saying?
20:49
Not really.
Edward's answer mentions the same thing, and he knows C++.
The problem with your answer is that you say it's making a copy.
But since it's not an object, it's not making a copy.
Oh, OK.
So, how does it store the old value then?
Hang on, I'm figuring out how to view the assembly... but... copy is just the wrong word, really.
I see.
The word copy conveys extraordinarily expensive memory operations.
I'll show the assembly difference once I figure it out.
20:53
OK.
Well, Xcode generated identical assemblies.
> In a short simple program such as this one, it makes no difference, but over your programming career, you will use both --i and i--. The difference is that the pre-decrement version (--i) decrements and then returns the value, while the post-decrement version (i--) saves the original value, decrements and then returns the original undecremented value.
> Modern compilers are smart enough to understand when you're not actually saving the value and will optimize them both to the same exact code (as with this case), but again, it's useful to know the difference.
I was not able to post my question unfortunately since the pack leaders jumped on me like a bunch of scavengers but I just wanted to thank you for answering my original question here and I guess one day I will just sort of figure out for myself by just reading and learning and not bother asking any questions on any forums since it didn't involve mathematical formulas for an atomic bomb or the latest exploit on bash or the kernel. — unixpipe 2 hours ago
@iharob Code explanations are not within the scope of Code Review. — nhgrif 46 secs ago
My comment disappeared, and I didn't get to vote to reopen! :(
What comment?
I still insist that should be its own Stack Exchange site instead of a tag on Stack Overflow...
And if it were, there'd be about 3 open questions and 14 quadrillion duplicates of these three questions.
@JeroenVannevel If you think GTAV is emptying your bank account, then you've definitely never played Crusader Kings or Europa Universalis.
21:20
0
Q: Object to query string

user1852503An object (POJO) holds query arguments and has two-binding to a form using some MVC framework. later the object needs to be converted to a query string that will be appended to an HTTP request. function objectToQueryString(obj) { return Object.keys(obj) .filter(key => obj[key...


« first day (716 days earlier)      last day (3599 days later) »