« first day (674 days earlier)      last day (3642 days later) » 

00:00
Oh, my computer's time DID change.
@rolfl Does UTC use DST or not?
Why, local time on your be should be set to UTC and your locale should be set to sweden with the appropriate offset
My brain didn't.
@Hosch250 Now that you've pointed it out, I noticed I'm always in the top Network users list. [tag: addicted-to-cr]
13 secs ago, by Simon André Forsberg
@rolfl Does UTC use DST or not?
^^^ quoting that so that I can laugh at it again in the future.
;-)
00:01
@janos Welcome to 40k.
9
You need to do 8 downvotes to get there, though.
Congrats @Janos :D
Haha, that is my first pinned message.
Ever?
Ever (except when we were doing the ASCII games over on PPCG).
My answer, has all the makings for either a) very few comparative reviews at all are actually on topic... or b) no comparative reviews are on-topic.
00:02
I was a room owner, and I pinned one of my messages stating what the Github repo was.
@rolfl laugh all you want, but time-zones is confusing :) I've been told to avoid coding to them, and I don't often do time-related stuff. I would assume that UTC does not use any DST stuff, as that would seem to break a bit about the concept of Universal....
And even if we go with a) very few are actually on topic... it'd almost just be easier to just say they're all on-topic.
Outsiders already have a hard time understanding what's on-topic here...
s/on/off/? ^^^^^
Personally, I like them.
70 points and I get to delete stuff HUAHUHAUAHAUHAUA
Why did my tag attempt, fail >:
/sob
00:04
FTFY
I don't post them too often, but when I do, I'm seriously stumped at which is better.
@Legato was it the space?
It was.
Yes, it was.
Personally, I don't have much against them. The biggest problem about them is that many of them are purely hypothetical.
00:05
There are several problems with a lot of them.
Also, this makes me research and learn about multiple methods.
I haven't looked through the tag, but I like them at least to a certain extent.
@Hosch250 If you're stumped at which is better, have you at least started by clearly defining the criteria for which one or the other should be deemed better?
Well, I don't know.
00:07
To me, it feels ilke if you're stumped as to which snippet between two snippets is better, it's because you haven't appropriately defined the criteria for which should be considered better.
Any options I consider are fast enough.
Let me try to structure my thoughts on them... (A vs. B) answers:
1. they require an answer, not a review.
2. only one of the options is likely "real" code.
3. it's a question that happens at code time, not commit time.
4. there are objective criteria that the asker is probably too lazy to run
It is more about expandability, maintainability, and reusability.
And, if you're struggling to define the criteria, then it's unlikely that this is actually real code in a real scenario.
And again, I'm usually told a third way, so then I've learned two and been told a third.
No, it is real code for my app.
00:08
5. if the person needs to ask the question, they probably wont understand a good answer anyway
For rolfl's fourth scenario, these should all be pointed in the direction of Stack Overflow.
38 secs ago, by Hosch250
And again, I'm usually told a third way, so then I've learned two and been told a third.
Asking "which is faster" should be absolutely considered completely off-topic here under any circumstance.
And asking for a revoew of them as separate questions won't do that?
^
> they require an answer, not a review
00:09
I see.
^ which detracts from the ability for either snippet to be effectively reviewed.
@rolfl that's.... not a helpful point IMO. You're degrading/judging the asker there.
But look at the question I just asked.
@SimonAndréForsberg True.
I saw the other option when I was writing it, I could have implemented both.
00:09
0
Q: Depth First Backtracking Puzzle Solver

uliThere is this type of puzzle , that can easily be solved with a depth-first backtracking solver. I wrote one in python 3.4 and like to get some feedback. Especially I'm interested in the following points: deepcopy. The usage of deepcopy in DepthFirstBacktrackingSolver.findsolutions is somewhat ...

@SimonAndréForsberg - I based that on the Java abstract one that @nhgrif referenced in his answer.
I could have posted it as two questions, but again, would two questions really be good?
It was clear that the second option was better practice....
So the asker loses out on the benefit of getting either snippet effectively reviewed. And if they asked either individually, they still should end up with the same final "best possible scenario" result.
@janos pointed me in the other direction that I saw in my searches, but didn't know it was better.
How was I supposed to know that my method wouldn't release the resources as I thought, unless I specifically suspected that?
00:11
By asking about one method or the other individually?
Either.
And the one you ask about should be the one you're actually implementing.
Congrats on 40K @janos :D
7
Suppose I had implemented and tested both.
00:12
Okay.
They were equal to my eyes before the review, and all I wanted to know which was better to put in my unit test.
Better by what criteria?
Readability by general programmers? Safety/expandability...
When I researched the web, they were equal to my eyes, so I chose the top one.
@rolfl 1. yes, but the answer can be "C" and that is okay. 2. One method often has two real, separate implementations. Why do we have merge-sort, quick-sort, insertion-sort? They're different ways to accomplish the same goal. 3. yes, but does that define on-topicness on Code Review? At least not formally, it does not. 4. too lazy? judging askers. It might be that they don't know how to run it, or that they are concerned with something other than memory and performance.
Why do you want to know which one of two implementations is the best?
00:14
Why don't I want to know which is the best?
Don't you want the best, which, if you are a beginner programmer incapable of figuring out which between two is the best, it's unlikely that either is the best possible implementation?
But, in this case the second was the best implementation.
From my searches, there are two general methods.
Mine, and janos's.
If you're asking about readability, expandability... either there is a clear option... or it's highly subjective...
If you personally cannot determine which is better by your criteria, there's a good chance that the question is too subjective.
I feel like I've gotten so much better since I started really using the site.
8
Maybe these should go on Code Understanding.
00:16
Code Understanding shouldn't be a Stack Exchange site...
I keep forgetting that's a thing. ^
I don't think the "highly subjective" argument really works here. We're writing subjective answers all the time. How can we possibly draw the line between "subjective" and "too subjective"?
I don't really think so either, but it is in commitment now.
@SimonAndréForsberg - Assuming asking as two separate questions, instead of an A vs. B:
1. you would get a C answer from an A question, or a B question too
2. ask each implementation (real, and on topic), as a separate question. no problem
3. (weak argument here...) No it does not, you are correct. But it makes it a design, not implementation question
4. We are here to review code, not do people's work for them.
Only 33% though, so it will likely fail.
00:18
@SimonAndréForsberg All of our answers are pretty subjective, yes. But typically, questions take the open-ended form of "In what ways can this be improved?", which leaves it open to let the answerer comment on any aspect of a single implementation.
How can you possibly post an answer to an A vs B question without picking A or B? And if the criteria is so subjective, then it's a pretty pointless question with pretty pointless answers.
Supper is going on, so I'll have to leave in a couple minutes.
I'd like to continue the discussion later.
Meanwhile, if it's an A only answer, "How can I make this more readable?", it's going to be subjective what does and doesn't make it more readable, but answers can at least discuss various approaches in general that can make code more readable and can be applied toward other projects, even if any feedback can't directly be applied to the snippet asked about...
But if it's (highly-commented-well-formatted) A vs (highly-commented-well-formatted) B... and the question is "Which is more readable?" what's the point?
I don't agree with all comparative reviews, but I don't think they should be off-topic across the board.
Thank you Santa.
For example, consider the comparative review "braces vs. no braces" (off topic anyway).
00:22
The problem with comparative reviews... they all feel sort of like... "I'm going to commit either A or B. Tell me which I should commit." whereas our normal questions feel more like "I committed this 3 weeks ago, but I look at it now and feel like it could use some improvement in this specific area."
They both work the same, but which is better?
That is subjective, so off-topic, but it is kind of my point.
They don't work the same.
@rolfl
1. So, partially duplicated answers, more or less?
3. Should we really get back to that design-vs-implementation thing?
4. Agreed. Some people don't know about the work they have to do. Many askers on this site are beginners and learning things a lot. To push it to the extreme, we might as well tell them to buy some books about clean code and ask them to read that, or to look at more tutorials... We should not do people's work for them, but how do we define what is their work and what is 'our' work?
Assuming they are written right, they do.
Anyway, just called for supper, be back later.
Can we at least absolutely agree that "Which is faster?" "Which uses less memory?" sorts of questions are 100% off-topic?
00:24
@nhgrif We can say: "C would be even better, but if I had to choose between A and B I would go with B. A has flaws yada yada and B has flaws yada yada... so essentially, C fixes them all."
Then comparative review questions are absolutely fundamentally different from any other question.
Consider this...
0
Q: Updating global variables on resize() not working

Sean ParsonsFor some reason when I re size this in a browser the global variables values don't change and I can't execute my if statement even though in console.log(), it's displaying that the variable has changed. Essentially I want to be able to only have the nav bar collapse if the mobile menu is active &...

We have the rule about being open to having any part of your code reviewed.
If I have implementation A and implementation B. 50% of each is identical, the other 50% is different.
See, when I post a comparative review it's more like I did one thing...and then for some reason I tried it another way completely because I got an idea while doing the first thing, and I see where one may be better than the other, but I'm not sure which would be better in the general sense.
You're essentially saying "Don't review the 50% that's different--I only care about the differences between these two snippets--not their similarities."
00:26
@nhgrif We often do not think so much about the asker's answer to "Do I want comments about any aspect on the code?", normally we don't care what their answer to that is and just comment about any aspect of the code anyway.
So answers to comparative reviews should just individually review each snippet?
And as a bonus to the asker, perhaps answer which snippet is better?
^ That's the confusing thing. I think people who want a comparative review just want to pick a or B
My thing is I actually want a review on both.
But I can only speak for myself.
And that doesn't really fit what Code Review is about (just wanting an A vs B answer)
And if you actually want a review on both, why not just post two questions?
@nhgrif I can't say that 100% for sure. 99% off-topic, perhaps?
What 99%? What's the 1%?
If your only concern is speed, then you should be posting the fastest of the two snippets and asking how it should be made faster.
00:29
@nhgrif You mean "Don't review the 50% that's the same"?
@SimonAndréForsberg yes.
Code review questions are off topic if they require the reviewer to run the code before they can answer. I think that's a 'fact'. Being able to run the code is nice, but requiring to run it as a prerequisite is not.
And if your concern is speed, you should absolutely know how to test speed and determine which is faster.
@rolfl You could answer some performance based questions without running the code.
You could, agreed.
which is why performance questions are allowed.
But... performance comparisons shouldn't be allowed... this isn't the place you go to have someone figure out which runs faster for you...
00:31
But there's a difference between "how can I make this faster", and "is this version A faster than that version B".
@nhgrif because A and B are so similar, and the same concept, you have essentially done the same things in two different ways.
@SimonAndréForsberg Why?
@nhgrif I can't answer what the 1% is. I don't even know if it even exists. It is an "I know it when I see it" kind of thing.
I actually don't understand how someone could implement two pieces of code and sit there and scratch their head about which is better.
What encouraged you to write the second snippet? What was wrong with the first snippet?
Did the second snippet solve whatever about the first snippet that encouraged the second snippet to be written at all?
If I ask: "I have this code A which does X, and this code B which does Y, please review?"
that should be 2 questions
if X == Y, is it any different?
00:34
Can I ask about my implementation in Objective-C of a Fraction class versus my implementation in Swift of a Fraction class? Swift and Objective-C can be used alongside each other even moreso than .NET languages.
@rolfl IMO, if X == Y, then it could be two questions, but doesn't have to be.
About the A vs. B performance questions, those are mostly bad questions because it's impossible to answer them without knowing the environment they're being run on, and the different input sizes, etc...
There is a difference between bad and off-topic questions though.
I'm not saying I want to see A vs. B performance questions here. Definitely not. But are they really off-topic?
I am not against people having multiple items of code which do the same thing (assuming each implementation is on-topic on code review when weighed up against our 'rules'). I just think each implementation should stand in their own quesiton.,
1 implementation per question.
You have multiple implementaitons, then have multiple questions
I see some duck-typing monkey-typing!
@SimonAndréForsberg Would there be a problem with me asking about an Objective-C vs Swift implementation of a class? I could literally plug-and-play them in the same project, no matter which language was the project's "primary" language. It doesn't matter between these two.
Each implementation should be able to be reviewed independently.
00:39
For A vs. B questions, remember that there's also "too broad" and "primarily opinion-based" close reasons (that are not categorized into "off-topic"). If there was a "primarily situation based" close reason, we could definitely use that.
Nahhh... every question is context-based....
@SimonAndréForsberg Assuming my question met all of your criteria for , would it be acceptable that one implementation is and the other is ?
@nhgrif I'm probably not the right person to ask about that. But I would feel that No, it should be different questions.
@Simon - play the devil's advocate for a second.... hypothetically, if we were to require that all A vs. B questions were asked as separate questions.... what would be the down-sides, what would be the upsides?
(I see very few downsides, and a lot of upsides, personally).
I don't like using words like "always" and "never" to categorically defining things in a specific way, which is perhaps something I need to get better at, but I can agree that mostly, A vs. B can be better as two questions. It depends a lot of the question though.
00:45
@SimonAndréForsberg Why?
Do I think the Java question in @nhgrif's meta answer is a bad question? Yes. Do I think that it is off-topic? No.
@SimonAndréForsberg Can you think of a question where it would be a problem?
Why would a vs question be off-topic as a ?
would have clearly been better as two questions (possibly with a day or so between them).
0
Q: Tic tac toe Array in c language

JohnCan someone make me a 1 dimensional tic tac toe in c language.? Please guys if you will do it you'll save my grade. Our teacher is not teaching and then now she is requiring us this project. She is crazy.

00:49
An iterative process for-the-win.
@rolfl They would've made for a set of good questions...
@rolfl Up-sides: Moar activity! Moar repz! Each implementation gets more attention on it's own. Down-sides: Not necessarily obvious at all times that there are two different implementations. Harder to get a clear overlook at how the two implementations differ and what the positive and negative aspects of each implementation are.
Plus, more rep all around, and each implementation gets way more focus.
@SimonAndréForsberg The questions could always refer to each other....
I could write a for loop and a foreach loop that do the same things.
The foreach loop is preferred.
Not always, @Hosch250
00:51
The for loop supports modifying the objects (if I might want to later).
Not always, but often.
> Harder to get a clear overlook at how the two implementations differ and what the positive and negative aspects of each implementation are
^^ Which is why I avoid using statements as "always".
two parts to that, one right, the other doubtful.
In .NET, the for loop is faster.
The foreach loop is preferred for what reasons?
^^ Not always. (I think)
00:52
Not always, but usually.
foreach loop is useless if you need the index, not (or in addition to) the content
@SimonAndréForsberg I've never heard that a foreach is faster in .NET
They are the same for arrays, I believe.
The foreach is more readable.
@nhgrif Really?
00:53
Yes.
@rolfl what is right, what is doubtful?
When is item more readable than ItemCollection[i]?
It's more clear what's going on in a foreach (and it's less prone to off-by-one and index-out-of-bounds errors).
> Harder to get a clear overlook at .... what the positive and negative aspects of each implementation are
^^^ wrong / doubtful
When you're using it multiple times and in most cases, you're going to do:
item = ItemCollection[i]
as the first line of the loop anyway
00:54
Let's say that 90% of the time, I use the value in the loop precisely once.
> Harder to get a clear overlook at how the two implementations differ
@rolfl Why? When doing A vs. B reviews, I feel that we tend to say "The positive things about A are... the positive things about B are..."
first part right, but meaningless.
I use foreach because it is standard, but I fail to see how it is actually better under any circumstances.
@SimonAndréForsberg And you can't do that as answers to each part questions?
00:55
Also, when I use the value multiple times, I'm usually forced into a for loop anyway so I can modify the value.
@rolfl Let's face it, how often do we say positive things in reviews?
^^^ centralizing the discussions.
^^ yay
Commence operation "Move chat messages"?
Not yet, I just want to keep it out of the competing for-each loop discussion.. ;-)
@Hosch250 Give me an example of where you've used a foreach loop, and paste me the for and the foreach version of the loop.
I will .
01:01
Alright, let me open my IDE.
foreach (MenuItem item in manager.GetMenuItems(version))
{
    if (item.Title.StartsWith(" ")) { continue; }
    ItemList.Add(item);
}
Actually, that is a forced foreach because it returns some sort of collection.
Also, that is probably better because it just gets manager once.
It's not a forced foreach. You could save it as a local variable.
True.
I'll do that.
But still, in this instance, it is messier.
Often, I have the collection sitting around anyway.
Give me an example where you think the implementation of each kind of loop is equally clean
            IEnumerable<MenuItem> MenuItems = manager.GetMenuItems(CurrentItem.Menu);

            for (int i = 0; i < MenuItems.Count(); i++)
            {
                if (!MenuItems.ElementAt(i).Title.StartsWith(" ")) { continue; }
                ItemList.Insert(ItemList.IndexOf(CurrentItem) + 1, MenuItems.ElementAt(i));
            }
OK, let's assume the value is just sitting around, so I call the first like this:
foreach (MenuItem item in MenuItems)
{
    if (item.Title.StartsWith(" ")) { continue; }
    ItemList.Add(item);
}
That is a bit messy, but not too bad.
The value is an IEnumerable, so I can't use [i] indexing.
How is ItemList.Add(item) not more readable than that long as apparently equivalent line from the first snippet?
By the way, rather than using continue;... you should invert the conditional and put the inserting method inside the if.
01:12
Hmm, these must be different snippets.
They don't work the same.
.Add() appends, and .Insert() does not usually.
Anyway, here are two equivalents:
            foreach (var itemToRemove in itemsToRemove)
            {
                collection.Remove(itemToRemove);
            }

            for (int i = 0; i < itemsToRemove.Count(); i++)
            {
                collection.Remove(itemsToRemove[i]);
            }
They are from an implementation of .RemoveAll() for ObservableCollections.
@nhgrif True, thanks.
For examples this simple, it's not that big of a deal. But the point here, mostly is think about the first line and the body.
I agree, but is doing item = ItemCollection[i] any faster/better than calling ItemCollection[i] multiple times?
It is better when the ItemCollection name is terribly long.
What?
I don't know, performance-wise...
but...
Consider when the collection doesn't contain all the same type
polymorphism, interfaces, etc.
For each says... "for everything in this collection, which I'm going to treat as X-type, I'm going to do this..."
What he says is valid but I feel like this is just one giant comment codereview.stackexchange.com/questions/83601/… Excepting maybe the recommendation in changing the return type of the method.
A for each loop says a lot about the loop, all in the first line.
01:19
@nhgrif What happens if you do var item in ...?
Isn't that the same as a for then?
I don't know. I don't speak C#.
Most C# programmers recommend var, but I don't use it.
OK.
I don't know how var works.
It tells the compiler to automatically choose a type.
But the first line is cleaner for other reasons.
We don't have a whole lot of unnecessary stuff.
01:21
So, var s = "str" creates a string, and var d = 1.9 creates a double...
What if we only want to do something with the odd-numbered indexes?
Then we use a for.
for int i = 1; i < collection.Count(); i += 2)
If we always use for and never use foreach, then this loop doesn't stand out as much... and it should.
It does something different.
Most for loops take the form:
They should all be doing something different anyway.
01:23
for (int i = 0; /*some conditional*/; ++i)
Look at what my wife brought home
Which is also, basically, what a foreach does.
If they do something fundamentally the same and are used a lot, why not create a method?
@Phrancis Cute.
... you're missing the point.
Most.... almost every for loop initiatlizes a variable called i to zeros and increments by 1 per iteration.
That's what for loops are good at.
foreach loops are good at.
01:25
If we're only using i as the index into a collection, we should use the foreach and eliminate this unnecessary variable, for one.
for loops are good at incrementing anything.
Unless, we need to modify the value.
In which case, we are forced to use a for anyway.
And for two, by making a habit of always using a foreach loop in your code, then when you've used something different, it should stick out to anyone reading the code.
Any loop that needs to stand out that much more should have a WARNING - CONTINUE WITH CAUTION comment.
...
Okay, moving on then...
And any loop that needs that should probably be re-written.
01:27
I'm not sure what you guys are even arguing..if you're even arguing.
@Phrancis Did you see the edit?
@Legato It is the Socratic Method.
Points are being missed.
OK, why should these need to be so obviously different?
Which "these"?
for (int i = 0; i < ItemsCollection.Count(); i++)
{
    ItemsCollection1.Add(ItemsCollection[i] + 1);
}
for (int i = 0; i < ItemsCollection.Count(); i += 2)
{
    ItemsCollection2.Add(ItemsCollection[i] + 1);
}
Personally, the += instead of the ++ makes it jump out for me.
01:30
In most use-cases, when you're iterating through a collection, particularly a collection of objects, you're just doing the same thing with each one.
A foreach is a sign post that this is that normally, most-common use case of iterating over a collection.
foreach loops can be read and more quickly understood exactly what is going on because the first line serves as a big signpost.
OK.
But again, if someone needs the signpost, why aren't they reading the code more carefully and actually understanding what exactly it does?
Because in an 8 hour workday, you have 12 hours worth of programming to do.
I can look at a piece of code and usually know which one of my co-workers wrote it without looking at a comment line where they left initials or looking at Source Control blame lines.
Because we all have our little patterns.
Of course.
01:35
Some patterns aren't our own--some patterns are part of what's called "best practice" for the given language.
0
Q: Java Trie structure

Evan BechtolI recently have been working on a Trie in Java. I have looked at the related posts here on Code Review to try and enhance my code, but I do have some methods and constraints not present on other posts. Objective To efficiently implement a Trie data structure in Java that is fast, with low memor...

And any time you're trying to debug code, or even if you're just adding features...
the first thing you must do is understand the code...
The more the code is written to distinct, consistent patterns, and the more well-defined those patterns are, the quicker you can read and understand what the code does.
I try to do that in my code.
02:05
0
Q: Checking whether one string is a rotation of another

giulioGiven a method isSubstring, two strings s1 and s2, check whether s1 is a rotation of s2 using only one call to isSubstring. Any comments on the code below? I would like to check the complexities as well: For isSubstring: - runtime:O(n^2) - memory: in place For isRotation: - runtime:O(n^2) - me...

02:46
0
Q: is this GCD implemented getter setter thread safe and work better in objc?

dopcn@interface ViewController () @property (nonatomic, strong) NSString *someString; @end @implementation ViewController @synthesize someString = _someString; - (NSString *)someString { __block NSString *tmp; dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ ...

03:09
0
Q: The Game 6 Nimmt In Python

Ye YangQ:write a function that consumes a list of nat numbers bwtween 1 and 104 and produces the total number of points earned. * 55 is worth 7 pts * multiples of 11 (other than 55) are 5 pts * mult. of 10 are 3pts * mult. of 5(other than mult. of 10 and 55) are 2 pts * any other cards is 1 pts EX: [4,2...

03:50
-1
Q: Code takes input and multiplies each digit with in 13 digit segments. The code fails to append the values to an array

anandThe loop below multiplies characters in 13 digit segments. The issue occurs when I try append the final values to my list I get a 'index out of range error'. Am I incorrectly applying the append function? for x in parser: count = 0 val = [0] while count < len(parser): z = 0 v = 1 ...

I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Ryan Haining 1 min ago
For questions about improving or critiquing working code, you might want to consider instead posting to codereview.SE. — lvc 1 min ago
04:23
@pbabcdefp you are correct. I have edited the code to reflect this. Thanks for the code review — NicholasFolk 18 secs ago
04:53
0
Q: Strategy Game Menus and OOP

bazolaMost of my experience is with Objective-C, so I am relatively new to Java inheritance. I understand that there are concepts such as abstract classes and interfaces, but I am still not totally sure when to use them. I would really like feedback on the structure of my inheritance in the following ...

Night, CR.
I'll leave you to the zombies now.
Night @Hosch250
05:37
@janos well done :) congrats
0
Q: Email Template Parser PHP Class

jasondavisThis is a very basic PHP CLass that I am working on which will allow me to provide an HTML template in the form of a string saved to a variable or into an actual template file. I can then pass into my PHP Class an array where the array KEYS will be used to find and replace variables in the templ...

05:51
monking @all
Monking @all
hey @chillworld
hey @Heslacher
 
2 hours later…
08:21
This might be better suited to codereview.stackechange.com. — Andy Turner 45 secs ago
It would be closed on CodeReview as it is not a complete code sample. It is pseudocode/hypothetical code from what we can see here and thus would be off-topic unless OP provided the real-life implementation of his code (rather than just a few bits and pieces). — Dan Pantry 1 min ago
08:36
0
Q: Building Data abstraction for rectangle using "objects"

overexchangeFor the below given exercise: Exercise 7: Abstracting Rectangles Implement a representation for rectangles in a plane. (Hint: You may want to make use of your procedures from exercise 5). Then, in terms of your constructors and selectors, create procedures that compute the perimeter and ...

-1
Q: Removal of all foreign coding?

ZacI have no idea on codes or xcodes or evn developing. Although For the past few months now my phones acts and does what it likes or more so what it would like me to see... I've found my data is constantly accumulating and there's always a double ring tone wen calling, my passwords change and set...

08:53
Without reviewing the full source code that drives your web site from first to second step, it's impossible to accurately tell what's wrong. I'd suggest you posted your source files to codereview.stackexchange.com. — Nasha 21 secs ago
0
Q: How to run php script in background using php?

Maddy I just want to show the output of my first file without waiting for the second php file which i have included at the end of the first php file. How can i achive this using php?

@Nasha codereview is for working code only. If the code in question does not work either by throwing an exception or by not producing the expected result it will be closed as off-topic. — Heslacher 21 secs ago
10:03
0
Q: Minimal webserver in c++

Dmitry Teslenko#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sstream> #include <vector> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <pthread.h> using namespace std; const char *response_200 = "HTTP/1.1 200 OK\nContent-Type: t...

10:37
@Nasha codereview is for working code only. If the code in question does not work either by throwing an exception or by not producing the expected result it will be closed as off-topic. — Heslacher 2 hours ago
@Heslacher While I agree that Nasha is wrong there... the bigger problem is that answer isn't an answer and should be flagged/removed, which would also make Nasha's comment go away.
@nhgrif I can't judge on javascript questions/answers (I don't speak javascript). I just commented on the obvious about "not working".
10:51
I'm voting to close this question as off-topic because this belongs in codereview.se. — BalusC 1 min ago
I flagged it for moderator review because I (or any normal user., I think) cannot move it. I also read in meta.stackexchange.com/questions/89799/… that one criteria for suitability in codereview is "Is it actual code from a project rather than pseudo-code or example code?"; I think you presented example code, which may be considered OT in cr, which apparently tries to be a review site for "real code", whatever that is. — Peter Schneider 18 secs ago
11:07
1
Q: Building Data abstraction for rectangle using "objects"

overexchangeFor the below given exercise: Exercise 7: Abstracting Rectangles Implement a representation for rectangles in a plane. (Hint: You may want to make use of your procedures from exercise 5). Then, in terms of your constructors and selectors, create procedures that compute the perimeter and ...

@200_success Did you get the chance to look into this query?
0
Q: How can I simplify this lengthy numerical code?

David ZhangThe following Julia code implements Terry Feagin's 10th order explicit Runge-Kutta method (a more accurate cousin of RK4). Though the structure of the code is quite simple (i.e. no cyclomatic complexity), it involves many high-precision coefficients and lengthy arithmetic expressions which bring ...

Post your code; "Maybe there's a better algorithm" if your code works and you are looking for someone to review it and search for improvements you should post it on codereview.stackexchange.com, "or even a library" asking for libraries or other resources is off-topic on Stack Overflow. — Pshemo 1 min ago
11:41
0
Q: How to create an enumerator, based on a ATL collection?

AschrattI am designing a COM wrapper for a C++ library using ATL. Currently I am a little bit confused about enumerators that are based on ATL collections. I already wrote several enumerators based on STL collections, but since there is no ICollectionOnATL-interface (such as the ICollectionOnSTL-interfac...

I'm voting to close this question as off-topic because it's better off on codereview.stackexchange.comAndy 17 secs ago
0
Q: Tag request [atl]

AschrattI am new here and thus do not have permission to create tags yet. Could we create the atl-tag, which is equal to the atl-tag on stackoverflow? I would like to tag this question.

0
Q: Getting rid of goto without duplication in Go

райтфолдConsider the following function: func Listen(username string) (net.Listener, error) { path := filepath.Join(socketsDir, username) oldUmask := syscall.Umask(^0600) defer syscall.Umask(oldUmask) listener, err := net.Listen("unixpacket", path) if err != nil { return ni...

0
Q: Better way of writing javascript functions

Nate_tyroneI am a newbie to native javascript, i am pretty much coming to grips with the operators, etc. At the moment i am current constructing a slide. please view the code below. "use strict"; var sliderImg = flickrImgs; var intSeconds = 3; function loadSlider(){ flickrImgsShown = 0; flickrDisplay...

11:57
It is actually a question, while they do ask for a code review that is not the purpose of the question posted. — eyegropram 58 secs ago
I personally agree with @Andy: despite the question may be valid, the code is apparently working, therefore reviewing it or writing it in a different (clearer or shorter or whatever) way should not necessarely belong to stackoverflow but, instead, to codereview, where the user can even learn faster, shorter and easier ways to read and understand its own code. — briosheje 1 min ago
12:30
@Heslacher neither can I, but that answer is obviously just a comment or extended question.
12:43
0
Q: Anatomy of a string-reversal program with less coupling

aduchI'm currently trying to improve my C understanding. Would you mind telling me if there are good/bad things that I did here? (I implemented a function to reverse a string in place). For example things I feel uncomfortable with: I forwarded pointers to a buffer so that I could loosen the couplin...

13:08
Greetings, Programs.
Hi!
Hi!
@200_success: I have just realized that is just based on a textbook. Do we still need it?
It's helpful, I think.
Yeah, also for locating that one user's questions easily. ;-)
13:13
=)
Would you consider re-creating ?
I feel you two should be involved...
@200_success But it's already a synonym.
I'm asking to undo the synonym.
Oh. I'm not quite sure.
It opens up having tags for each challenge site.....
I am not a big fan of that, but it is not too horrible either.
13:22
@200_success thank you for your edit
I did not understand the note, code is not using Python's class system
There is unity to Project Euler questions compared to the other sites.
@overexchange Idiomatic Python would look quite different.
13:45
@200_success Can you please help me on this queries?
-1
Q: Building Data abstractions for rational numbers using "type abstraction"

overexchangeIt is taught in class that data abstraction is the methodology to create barrier between "how data values are used" and "how data values are represented". Also, an abstract data type(ADT) is some collection of selectors and constructors, together with some behaviour conditions (invariants). It i...

1
Q: Building Data abstraction for rational numbers using "objects"

overexchangeI follow this definition of "object":An object is a value exporting a procedural interface to data or behavior. Objects use procedural abstraction for information hiding, not type abstraction. Object and and their types are often recursive. Objects provide a simple and powerful form of data abstr...

Am almost done with DA and ADT exercises and waiting for the comments for above queries so that I can confirm my thoughts on this topic. This is very important for me, before I proceed further.
@200_success These queries are the mixture of what I learnt in the class + what I learnt in the paper written by Cook as mentioned in the above two queries.
will connect from home, time to leave.
I don't understand your question either.
You really shouldn't have duplicated your question by asking it again with Java.

« first day (674 days earlier)      last day (3642 days later) »