« first day (2583 days earlier)      last day (1419 days later) » 

12:00 AM
RELOAD! There are 6699 unanswered questions (89.9312% answered)
 
 
2 hours later…
1:38 AM
Hi there, I'm new around here and it seams to me that this is the place to turn to get advice on polishing up aspects of my projects code. I'm working on a multi-file project and wouldn't necessarily expect to get comments on the whole thing, but would like general pointers on how to improve my codes general architecture. What might be a good way of setting up such a post to get the most out of it.
Would it be a good idea to post a handfull of snippets + a link to the whole repo on github, or is that seen as poor form?
 
Hi Andrew, Our character limit on Code Review is actually exceedingly large. So you may be able to post more code than you initially thought. Then reviewers can respond as they wish (you can request that certain areas be focused on though)
 
Oh cool, so I guess i should then have like an opener to show the file structure of the repo, and fill in all the relevant files in their own sinppets then?
 
Snippets are a bad idea. We need all the important code. Links to repos are acceptable but only for code that isn't necessary. Think of it this way. A reviewer should be able to review the code without ever visiting the repo if they so choose.
 
haha, sorry when I said snippets I meant markdown code blocks containing each code file
 
ohh yes. That is a common approach
 
1:44 AM
but yeah, I think I get the picture, if you need to follow a link to answer the question the odds of getting a response drop dramatically :P
 
actually it is considered off-topic at that point...
 
does that translate to grounds to close the question?
 
yes. The question needs to be reviewable from the code embedded in the question.
Any links should be supplemental or additional reading...
 
ok, I'm poking around to see if I can find a longish question of the sort I'd be looking to post. I don't expect you to know any of the top of your head, but on the off chance you did, know of any decent examples that approach the limits of tolerability?
 
This is a good example:
25
Q: A scoring approach to computer opponents

Simon ForsbergThis code is starting to be used within several of my projects, and therefore I thought it's time to get it reviewed. Description The most common application for this code is that there is a computer opponent in a game which needs to make a decision based on some parameters. A list of all possi...

Also worth a read:
33
A: Checklist for how to write a good Code Review question

Simon ForsbergSimon's Guide for posting a good question There are a lot of questions that appear on Code Review, and all questions are fighting for reviewer attention. This is a non-exhaustive list of items that I am looking for in a Code Review question when determining whether or not I should review it and ...

 
1:51 AM
Thanks, for both, I appreciate the help. Looks like a good question takes time to write, which is perfectly understandable :)
 
yes. But be patient, it is worth it. I can say from experience, taking the time to write a good question is far more rewarding.
 
I can imagine, I always learn so much from feedback. The best is when you discover something you didn't know you didn't know. Such as now, where I think I have determined that programmers.stackexchange is a place I should frequent too for architecture advice :)
Also, thanks for your help. ciao
 
2:54 AM
0
Q: A Simple Definite Integrator Class of a Single Variable

Francis CuglerI have written a simple Integrator class in C++17 that can perform a definite integral of a single variable through the use of its evaluate() function. It can also perform a second integral of the same integrand of a single variable where the inner limits of integration are from [lower,y] where l...

 
If you have a working program (the working part is a hard requirement) and can show a minimal reproducible example of it, then consider posting on the Code Review SE instead. — Some programmer dude just now
 
3:19 AM
0
Q: 'Advanced' Math Calculator, Worth it?

UnfreeHeXThis code below, was for my school project, first year. I am new to C programming, before which i learned python, hence i do not know the tweaks and tricks in C language. What are the various ways to improve the code. Moreover, My requirement requires me to have indentation. I am unsure how to ap...

 
4:08 AM
0
Q: Is this a good unit test for testing three types of mappings all at once?

user141240This question is related to my previous two questions, in which I have implemented HashTable, and also SortedListMap and BinarySearchTree. Since the three types of mappings have similar interfaces, if I wrote three separate tests for them there would be lots of boilerplate codes. Instead I decide...

 
4:56 AM
0
Q: Installing GNOME extension via CLI

artu-hnrqIntending to reuse the installation process of a GNOME extension, I wrote the following script: #!/bin/bash # It installs a target gnome shell extension defined via url STORE_URL="https://extensions.gnome.org/extension-data" EXTENSIONS_PATH="$HOME/.local/share/gnome-shell/extensions/" ZIP="gnom...

 
5:46 AM
@CaptainObvious Eh... That code contains foreign code fragments. While they're attributed, I'm not sure whether the original sources are compatible to CC-BY-SA
 
6:08 AM
0
Q: Inserting a node into a doubly linked list in C

shirley suGiven a reference to the head of a doubly-linked list and an integer, data, create a new DoublyLinkedListNode object having data value data and insert it into a sorted linked list while maintaining the sort. My code works for most cases but I am getting a segementation fault for some reason. Is ...

0
Q: Extracting website names from link code cleanup

abyssmuI'm working on a program that takes website links and extracts the website name. Right now, it works perfectly, but it is very much a brute force approach and very ugly in my opinion. Some of the properties of the links are as follows: - entirely random - will all contain https:// and .com - may...

 
6:18 AM
@Zeta at first I thought, how did you know! then saw the author name etc in the middle of the code
 
6:56 AM
0
Q: Max sum of abs difference in array

srkI am just trying to understand the algorithm of the problem statement Here is my implementation after following the algorithm mentioned in the link static int sumOfMaxAbsDiff(int[] arr) { Arrays.sort(arr); int len = arr.length; int[] temp = new int[len]; int sum = 0; for (i...

 
7:20 AM
0
Q: Reduce the code execution time

ZiaI have proposed the below solution, written in Java and it is working fine for all the test cases, but for some test cases it is taking 1 sec of time to execute, I want to improve the code, Please suggest me some best practices applicable which is helpful in order to optimize the code. package c...

 
 
1 hour later…
8:32 AM
-1
Q: Foobar Challenge- Bunny Prisoner Locating

Sudha ManiBunny Prisoner Locating Keeping track of Commander Lambda's many bunny prisoners is starting to get tricky. You've been tasked with writing a program to match bunny prisoner IDs to cell locations. The LAMBCHOP doomsday device takes up much of the interior of Commander Lambda's space station, an...

 
9:23 AM
0
A: Phrancis: A final review of a good member

Simon ForsbergPhrancis. Even though I never met you, I feel like this is the first time I'm losing someone so close to me. A good friend. It's just a few days more than six years ago now that you joined Code Review. You quickly became a valuable user trying to help out as much as you could. Just a few months...

 
 
2 hours later…
11:35 AM
possible answer invalidation by Francis Cugler on question by Francis Cugler: codereview.stackexchange.com/posts/243130/revisions
 
0
Q: Make touch drag more intuitive/smooth for AR-Application in C#

Clayy91I am currently working on an app to augment pictures on a vertical plane. Once the vertical plane is placed, the user is able to put an object on the plane. The placed object can be selected and dragged on touch - so far everything works fine. void MoveSelected() { Vector3 curPos = c...

 
12:24 PM
Monking
 
Monking
@Zeta Historically I've found we don't really care. The owner can submit a DMCA takedown if they want.
 
0
Q: My implementation of Clojure's assoc-in

NavarroThis is my implementation of Clojure's assoc-in function. I am looking for tips on making it more idiomatic and in general, better. (defn my-assoc-in [m [& ks] v] (let [sorted-keys (reverse ks)] (loop [curr-key (first sorted-keys) rem-keys (rest sorted-keys) curr-m...

 
12:42 PM
I'm too lazy right now to go into details, but after scrolling through it; looks fine. Maybe volatile Boolean moveOut in combination how you use it seems strange but that's a whatever. You may want to post this question on Code Review if it's working code and you just want some feedback, improvement tipps. It's not very on-topic for SO. — akuzminykh 59 secs ago
 
1:23 PM
@Zeta @Peilonrayz It's a legal concern, so it doesn't concern us. The reason we usually don't allow other people's code is just as much on moral and practical grounds as on legal ones. Legal trouble are the CM's responsibility.
The usual close reason for something like that doesn't apply here it seems, so I'd say we let it be and see what happens.
 
@Mast Agreed. However I'd say don't go anywhere near it, unless you're happy with the fact your answer may just disappear one day.
 
lol
Yes, that could be a concern for some answerers.
 
 
1 hour later…
2:56 PM
0
Q: A little Python roguelike with mostly using standard libraries

fenosSo, I made this in order to practice my Python OOP and algorithms skills, and refactored it a bit after a few months of s tale. May anybody review it in a PR please? Want to see the flaws that could be fixed, considering I didn't improve much since the initial development of this. https://github....

 
3:20 PM
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 19 secs ago
 
3:56 PM
For working code that you want to improve, you should ask on code review. Consider deleting this question, if you choose to post it there. — cigien 51 secs ago
 
 
1 hour later…
5:14 PM
You can post your specific code on the code review site, and get answers directly relevant to your case. — Kenny Ostrom 58 secs ago
 
0
Q: Optimizing code solution for Palindrome Index-Hackerrank

R. WanjohiI submitted my solution for palindrome Index coding challenge but I get "test cases terminated due to time out error". My code is working and so I don't know what else to do to optimize it. Please help: function palindromeIndex(s) { let palindrome = s === s.split('').reverse().join('') i...

 
5:51 PM
If I were you, I would complete the entire program and then submit it for code review or submit it here and ask a specific question such as "I would like to change this part of code to...". — CodingYoshi 18 secs ago
 
 
3 hours later…
8:32 PM
0
Q: Unique Distancing Problem, Memoization in Haskell

Benoît PilatteI've been reading CodeReview for a while but this is my first post here. This is also my first Haskell program. I've tried to learn Haskell unsuccessfully before, so I was looking for a puzzle to program in haskell, to go head first in the world of pure functionnal programming. The code bellow i...

0
Q: How can I generate number of text files with random content and random sizes?

Benzi Avrumiusing System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Tests { class RandomTests { private static Random random = new Random(); ...

 
9:09 PM
I’m voting to close this question because it belongs on [codereview] — Eyeslandic 8 secs ago
 
9:50 PM
0
Q: User.service which pass array to URL (Angular 9)

user225271I'm new to Angular, and have a lot of habits from old JS functions, recently have written this service where get an Array of ids and then pass it in URL in form .../api/users/?page=0&locationIds=1&locationIds=2 and want to know is it correct way for Angular 9 or can I somehow make it looks better...

 

« first day (2583 days earlier)      last day (1419 days later) »