« first day (3559 days earlier)      last day (450 days later) » 

12:04 AM
0
Q: Python planetary simulation, not working?

HaleI am trying to create a program in python that calculates forces between bodies (i.e earth, moon and a hypothetical moon) and make them move according to the changes in velocity and forces. I want the values and measurements to be realistic and thus I have created a scaling factor that converts r...

 
REFRESH! There are 7471 unanswered questions (90.2430 answered)
 
12:37 AM
You need to delete this and ask, instead, on codereview.stackexchange.comRob 15 secs ago
@Rob No! This perfectly fits the performance tag (with a lot of similar questions). This is a common misconception on Stack Overflow. Please read Performance question - Stack Overflow or Code Review?. — Jérôme Richard 48 secs ago
 
1:33 AM
@Rob The disagreement is due to the distinction being not so obvious. There is a more precise/complete post here (well-received community wiki). This question match the requirements. — Jérôme Richard 45 secs ago
 
1:45 AM
"Is my code right" questions lack the focus required for Stack Overflow. They might be on-topic on Code Reviewcafce25 49 secs ago
 
1:56 AM
@cafce25: This question would be off-topic on Code Review. Questions on Code Review must be about working code. — Andreas Wenzel 54 secs ago
If the code works then this seems more a question for Code ReviewYogi 14 secs ago
 
 
4 hours later…
6:24 AM
0
Q: Find steps to sort unsorted string list

Clément JeanLet's say that we have a list of strings and we want to find the steps (pair representing swaps to be made) to sort it. Here is my current implementation: auto is_lexicographically_ordered = [](const std::string &s1, const std::string &s2) { return std::lexicographical_compare(s1.begin(), s1....

 
 
2 hours later…
8:19 AM
possible answer invalidation by Clément Jean on question by Clément Jean: codereview.stackexchange.com/posts/282956/revisions
 
8:56 AM
0
Q: A simple Tcl-like shell interpreter in C++

Edd12321This is an implementation of a custom shell/Tcl language hybrid. I think the logic is pretty clear, but I see other people writing C++ like to abstract their code a lot. I would like to know how to improve my project by making the code more "idiomatic" and fragmenting it into smaller components: ...

 
And well if you would post code like while((s[0] = c = getch()) == ' ' || c == '\t') (taken straight from K&R) on a professional code review, you'd be dismissed as a clueless quack and risk losing your job. The problem isn't just that the book is old, the main problem is that it's bad, teaching bad practices that weren't acceptable even in the 1970s. There were no excuses for writing obfuscated crap code like that even in the 1970s. — Lundin 10 secs ago
 
@Duga That's okay - adding the missing header includes that I asked for.
 
 
4 hours later…
12:40 PM
This may be a better question for Code Review. — larsks just now
 
1:05 PM
Welcome to Stack Overflow! If you believe that the code works correctly, consider presenting your work (with its unit tests) in a more-complete fashion over at Code Review. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. Before you do that, make sure to read A guide to Code Review for Stack Overflow users first, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". — Toby Speight 41 secs ago
 
1:52 PM
You might like to post a question like this over at https://codereview.stackexchange.com/ - it sounds like just what you want (a code review). Other than that, since you are dealing with weird characters creating "some function" sounds reasonable to me. — topsail 31 secs ago
 
2:12 PM
@topsail Where is the code to be reviewed in this question? This is not ready for the Code Review Community. — pacmaninbw 38 secs ago
 
 
1 hour later…
3:17 PM
@CaptainObvious MRC, a few sample lines of code from multiple files. Multiple users have asked for more code.
Code is more C than C++.
Looking at the repository the code does need review once they post more of the code.
 
3:35 PM
Your way is readable and succinct. Don't see any reason to do any other way. Anyway, you might be looking for Code ReviewTomerikoo 12 secs ago
If you do post on the Code Review Community, please read A guide to Code Review for Stack Overflow users and How do I ask a good question? first. — pacmaninbw 7 secs ago
 
3:54 PM
Monking
 
Monking
 
Monking
Only 9 COBOL questions since Code Review got started, that is interesting. It may well be dead. ;)
 
4:24 PM
@pacmaninbw wow only one xquery question ... my company actually has used it for 20+ years for XML content base searching
 
@NeilButterworth No this code would not get past any reasonable code review. Putting as many side effects on one line of code is not an achievement. Unreadable and umaintainable. For most if conditions if it gets a bit more complicated write a small function named after what the predicate is evaluating. — Pepijn Kramer 32 secs ago
 
4:59 PM
@pacmaninbw Considering there are 7 lolcode questions, yes.
 
the last question was asked asked Jan 8, 2021. There are 33 questions, with the last one asked Nov 24, 2022. There are 26 questions, with the last one asked Feb 21, 2022
 
@SᴀᴍOnᴇᴌᴀ WOW!
 
we are considering newer alternatives - e.g. AWS elastic search
 
@SᴀᴍOnᴇᴌᴀ My first programming language was assembly (I was 11) my second programming language was Pascal (whole bunch of classes at the university).
I learned COBOL and FORTRAN 66 the next semester.
 
5:14 PM
if we aren't counting HTML as a language, my first would either be vbscript or VB
 
My third semester I learned LISP, SNOBOL, and 2 other languages while studying about different computing techniques such as thunk. I stopped counting HTML a long time ago.
I learned BASIC on my own, I ended up teaching it for ESL students.
C may have been my 7th or 8th programming language.
I learned it in my third year for an operating systems class.
 
I heard the word the other day when a coworker used it - that reminds me of a university course called programming languages, where we studied the language for a short time. I see there are three posts with that tag
 
5:37 PM
@SᴀᴍOnᴇᴌᴀ I never learned smalltalk, my first object oriented language was Simula for a simulations class my senior year at the university. My second OO language was C++ really more of C with Classes, that I learned on the job, we were converting our code base from pre-ANSI C to C++.
 
Monking
 
 
2 hours later…
7:10 PM
Prashanth Chandrasekar on January 31, 2023
It was a busy and successful quarter, so although my first update of 2023 takes place in a fundamentally different environment than my first of 2022, my optimism for the future has not changed. It’s simply joined by a dose of pragmatism. 
 
7:54 PM
0
Q: (Dog) Agility - Penalties Calculator

GisvaldoI have written the following code and wanted to ask for alternative ways of completing the given task, since I think that my code - even if "properly working" - is quite "brute" and it could greatly use some improvement. The exercise is about Agility (dogs) and it wants me to calculate, for a tot...

0
Q: How to avoid reading hidden sheets?

cavemanThe code combines all sheets needed from source A, then is used to update source B by adding it as the last entry data. I have two sheets in excel that are hidden in source A. Currently I'm using two repeated lines to delete them, would there be a way to just not read in hidden sheets from source...

 
8:20 PM
Hey it is really hard to help you here with very general questions. Maybe have a read on (how to ask questions)[stackoverflow.com/help/how-to-ask]. Also if you have working code that you want to improve on you might want to look at codereview.stackexchange.comSnake_py 9 secs ago
 
8:57 PM
I won't fight the closure of this question, but I was about half way through a mini code review. If I were to choose one note, it's that the comments OP made are not good. They just re-state what the line of code is doing, it's a waste of your and my time. Better comments usually lean more toward why you're doing something. I can already see what. — sweenish 25 secs ago
 
9:10 PM
0
Q: Planetary simualtion in python

HaleI have created a program in python that calculates forces between bodies (i.e earth, moon and a hypothetical moon) and make them move according to the changes in velocity and forces. This is the code for the program: from math import sin,cos,sqrt,atan2,pi import pygame pygame.init() class Planet...

 
9:36 PM
1
Q: Doubly linked list first fit free list malloc/free in Python

Xander DunnAs an exercise I've implemented malloc and free in Python as a first fit free list as described here. This tracks which blocks are free in a doubly linked list that is sorted by the address of the first byte of the block. It also keeps track of the size of each allocated block in a dictionary. Th...

 
10:01 PM
0
Q: Reducing space complexity of recursive function F that uses memoization

svokI've coded a program that calculates A111133, and is relatively quick too (about N^1.5 complexity). For input 30 000 it takes roughly 4 seconds. Problem is the memory usage, which rises due to its recursive nature (1Gb for 30 000). I need to calculate input that is max 300 000, but can't because ...

 
 
2 hours later…
11:54 PM
If your code works, then this may be more appropriate for Code Review. — Unmitigated 10 secs ago
 

« first day (3559 days earlier)      last day (450 days later) »