« first day (2935 days earlier)      last day (32 days later) » 

12:02 AM
RELOAD! There are 7582 unanswered questions (89.4320% answered)
 
 
2 hours later…
1:53 AM
If you want feedback on working code, you can ask at codereview.stackexchange.com instead. — François Andrieux just now
 
0
Q: Building a tree containing all permutations of arithmetic expressions given some numbers

Mihael KeehlGiven any series of numbers, for example 1,2,3,4,5 and given the arithmetic operands + - * / including parenthesis, what would be the most optimal way to build a tree that contains all permutations and all expressions for these numbers and operators? It doesn't have to be in a specific programmin...

 
 
1 hour later…
3:18 AM
0
Q: Trigger API endpoint change on button group

Penny LiuI've written this crypto detail page which comprises with button group and area chart. My approach is straightforward, use button selected index (0, 1, 2) mapping with different API URLs. // app/components/Area.js const handleUrlParams = (selectedIndex) => { switch (selectedIndex) { case 0...

 
 
1 hour later…
4:33 AM
Welcome to SO. If you want someone to review your code, please upload this post at CODE REVIEW. — elena.kim 1 min ago
 
5:00 AM
0
Q: What should a C++ exception class have to be portable across language versions?

Scott McPeakI want a custom C++ exception class I can use as a best practices model. The searches I've done so far haven't really addressed my conerns. My specific concerns are: I want a class that works well with C++98 through C++20. So far I have dealt with that using the NOEXCEPT macro. Is that suffici...

 
5:22 AM
possible answer invalidation by Razvan Zamfir on question by Razvan Zamfir: codereview.stackexchange.com/posts/257284/revisions
@elena.kim The current post would be closed for lack of description on Code Review. Please don't redirect low-quality questions, thank you. — Mast 39 secs ago
 
@Duga Looks like a minor indentation fix that wasn't mentioned.
 
6:17 AM
0
Q: Installing custom axios interceptors inside a react component of a Shopify embedded app

slepicI have axios client created something like this: import axios from 'axios' const apiClient = axios.create(); I am adding a request interceptor that sends a shopify session token with the request in the Authorization header. And I am adding a response intercepter that makes a redirect to an auth ...

0
Q: Simple command line API client (Python)

M3RSWas given a take-home test as part of a job interview, which I failed due to a supposed lack of tests, logging, error handling and packaging. But I did touch upon all of these.. suggested time spent was only 2 hours. The task was to create a command line tool in Python that integrates with a trad...

 
6:42 AM
0
Q: Python Rubiks cube solver - general code comments

sjcexplorerI have been learning Ptyhon/Flask for the past 5 months and have just finished a first complete version of the app: Working site: https://rubiks-cube-solver.herokuapp.com/ Github link: https://github.com/samjcox/rubiks The app mostly uses Python, Flask and Bootstrap, with a small amount of Java...

 
 
2 hours later…
8:39 AM
Original question was how to center box inside box + makes entire box clickable. I provided solution that match requirements. Orginal code is OPs code and it's provided as just an example, it's not Code Review exchange. Your solution from comment doesn't even meet requirements, so I don't understand why did you voted it down. — ulou 1 min ago
 
8:50 AM
0
Q: TDD Greeter Kata

kuchI have done kata greeter using TDD and I would appreciate code review. I feel that probably I overcomplicated solution in this part: class BeginningProviderImpl implements BeginningProvider { @Override public String provide() { LocalTime time = timeProvider.provide(); for ...

 
@CaptainObvious I don't Java much. Is that question reviewable?
 
9:22 AM
Possibly, possibly I am available for consultation or You could just ask a proper question or bring Your code to CodeReview which is another StackExchange site which focuses on reviewing code. — Matiiss just now
 
9:42 AM
0
Q: Signing in with "Remember me" option implemented with Spring and Kotlin

WeeedoooI'm trying to implement authentication with "Remember me" option using Spring and Kotlin. I would really appriciate if someone could help me find potential issues with that implementation as well as improvements to the code. Let's start with sign in API. It accepts 3 parameters, email: String, pa...

 
10:25 AM
It seems you're looking for a Code Review. — El_Vanja just now
 
10:55 AM
How can you be reached for the consultation? Also, I asked a new question here: codereview.stackexchange.com/questions/260847/…Zac Cherbourg 49 secs ago
 
1
Q: New in PHP OOP and need opinion

milenmkI am new to PHP OOP and decided to start learning by converting something I wrote in procedural PHP. So now I need your opinion and recommendations for my first work. One of the main reasons I chose this project, is that it has a lot of repetitive SQL queries, with small differences (like a date ...

0
Q: Caesar Cipher using Ascii char codes

uberThis function should take in a string and a number as params and 'rotate' the string to the equivalent alphabet letter that is located at the letter position + 'rotation' parameter. e.g.: "stackoverflow" --- "fgnpxbiresybj" def caesar(inputString, rotation = 1): zNum = ord('z') alphaLen =...

0
Q: Embed a mini-window in a resizable canvas

Zac CherbourgI have a resizable canvas, and I want to add a mini-window that I obtained via a previous question. The code is too long to be shared, that's why I'm sharing snippets of code with you class ResizableCanvas(Canvas): def __init__(self, parent, **kwargs): Canvas.__init__(self, parent, *...

 
I typically cannot be reached because I have really never thought of consulting (I have had that idea, but...) and even if I were doing that outside of StackOverflow, I wouldn't do it for free (unless for someone I knew) but I will think about this, as for the question You posted there on CodeReview I don't think it will be really answered but I don't know much about that site but I think that it is more about making performance better or sth, but as I said I don't know. Also I don't think that that kind of question can be asked on StackOverflow (which is meant for specific problem solving) — Matiiss 48 secs ago
@Matiiss Please take a look at the Guide to Code Review for Stack Overflow users. I'm not sure why you decided to mention our site, but the question got closed for multiple reasons. — Mast 11 secs ago
 
11:13 AM
It's quiet in here.
 
Kaz
@Mast My company's getting bought today so I'm a little busy :)
 
And thank you very much for code review, I will try to improve my code and change this fragment. Cheers — Bounty119 52 secs ago
 
11:34 AM
@Kaz Congratulations and good luck.
 
11:58 AM
@CaptainObvious @Mast it's ... lacking a lot of context. Like all of the "Predicate" things that are registered into the spring context. The best review is probably "Why are you using Spring for a kata?"
 
Apparently I need to vote 16 more times and I get the Electorate badge
 
@Vogel612 Thank you. Closed.
Every predicate in their own file, that must be fun...
 
doesn't actually need to be...
inner classes are a thing
and Spring is ~EnTeRpRiSe
 
With that many files for something simple, it definitely looks Enterprisey.
 
@Mast Most frameworks I've used suggest 1 file per class. Django, Vue, Angular, Angular.js. Prevents you from losing git history by splitting god-files, amongst other things
 
12:55 PM
Depending on what you're trying to do, this might be a better question for Stack Exchange Code ReviewNicholas Hunter 22 secs ago
 
@Vogel612 Looks like they're trying to turn it into a comparative-review.
 
feels much more on-topic now, tbh
still, ... too enterprisey for my tasts (even the non-spring version)
 
Greetings, Programs.
 
1:18 PM
Greetings, User.
 
1:32 PM
0
Q: why is my c code not printing decimal values despite using double type variables?

Shout SeliI inputed the real value as 1 the imaginary value as 1.7 the power as 4 and the program gave an answer of -8 + -13j instead of -8 + -13.856 #include<stdio.h> #include<stdlib.h> #include<math.h> typedef struct complx { double real; double imaginary; } complex; complex de_Moivres (double r...

 
2:10 PM
@Vogel612 What's wrong with Enterprise programs?
 
nothing specifically, just the way they are written gives me a headache a lot of the time
 
Well they are large. Have you ever worked on a project where you wrote maybe 1/10 of the code?
 
multiple times, actually.
IME enterprise software has the tendency to bloat quickly and excessively, resulting in lots of special casings and spaghetti
didn't help that the projects I caught had little to no formal documentation or requirement documents
 
If done right though, enterprise code should contain a large library of code that can be reused. Which saves you a lot of code writing if you can actually find it in the spaghetti.
 
keyword: if
 
2:17 PM
Naturally.
 
that requires a concerted effort and discipline that all-too-often is sabotaged by management
 
@Vogel612 That is the key problem as far as I can tell. There should be architecture documents, requirement documents and other formal documentation.
 
Rarely enough time to do anything the right way in any discipline.
 
either unwittingly or as a result of external pressures (which can also be unwitting higher management)
@Mast that's ... not correct
 
Well, it was in my last 4 jobs.
 
2:18 PM
it's just that software development is not recognized as a proper engineering discipline
 
So perhaps you have much better luck than me.
 
@Vogel612 Sounds like you were working with something like docutils/setuptools. Monolithic beasts which should have been refactored a long time ago. Many modern frameworks are pretty good, because people actually need to use them.
 
@Vogel612 Depending on the management it actually is correct.
 
I'm doing Electrical Engineering and there are a lot of corners cut there.
 
Chris (aka. rubberduck) recently shared an interesting thread on twitter re: engineering
 
2:19 PM
Luckily we actually have standards to follow, which are basically the law.
 
Which standards?
 
So even when cutting corners, it doesn't get too egregious.
@pacmaninbw IEC
 
@Peilonrayz this really isn't about frameworks. Also monoliths are perfectly fine for the vast majority of software applications
 
EU version of NFPA.
 
@Vogel612 Spring's a framework.
 
2:22 PM
Machine directive is more or less IEC 60204. Combined with the low-voltage directive, that covers most things. Then there are things like elevators and diggers that have their own sets.
 
Thinking about rereading the Mythical Man Month.
 
@Peilonrayz yes, and? Not all spring code is enterprisey
also the lack of formal documentation and requirement docs is utterly unrelated to any frameworks used in an application ...
 
@Vogel612 True
 
@Vogel612 So you're going off on a tangent. Ok
 
@Peilonrayz in some sense of the word? pacman asked why I didn't like enterprise code.
 
2:26 PM
@Vogel612 Being a proponent of OOD, OOP, Unix and Linux I might not agree with that.
 
unrelatedly: Why is web development such a flipping pain?
 
Because it has to look good and no one cares if it works right.
5
 
@pacmaninbw the kernel is a monolith
 
A small monolith.
 
@pacmaninbw sounds about right. ~grumbles something about setting a checkbox value
@pacmaninbw but a monolith nonetheless :)
 
2:28 PM
:)
Back to finishing my 2020 taxes.
 
ah, damn, that's another thing on my todo list ... ~sighs
 
Cassidy Williams on May 17, 2021
There are a lot of opinions out there about how to improve and scale sites “beyond the Jamstack” by adding in features that use a Node server in addition to the pre-built pages. One of those features is called Incremental Static Regeneration. Some people call it “hybrid web development” (or “hybrid serverless + static”) but let’s talk a bit more about what that means.
 
2:44 PM
@Feeds Statics? I thought dynamic was the way to go nowadays?
 
3:36 PM
Given that your code already runs, and you just want some pointers for maybe how to refactor it, this question might work better on our sister site Code Review Stack Exchange. — Tim Biegeleisen 36 secs ago
 
3:52 PM
if you post on Code Review please read the help center pages like How do I ask a good question? - in its current form this post might likely be considered off-topic because there is little context about what the code does and how the method is used, plus the title is about CR goals instead of describing what the code does — Sᴀᴍ Onᴇᴌᴀ 59 secs ago
 
4:31 PM
0
Q: Throwing multiple exceptions in Java

Shreyansh VyasI currently have a validate function that returns a string exception if a warriors attack, level, or defense is zero. I have written an if statement with all the possible combinations. This however looks ugly and I would like to only check for the three different variables and then throw two exce...

 
4:57 PM
0
Q: Unit Tests for User class with JUnit 5 in JAVA

JimmyHuThis is a follow-up question for Android APP class serialization in JAVA. Some problems have been mentioned in forsvarir's answer. Then, I am following JUnit 5 User Guide to redesign the test cases for User class. Because the part of Save and Load methods are the operations including read and wri...

 
Number is about the least useful measure you've proposed; if that's what's measured I'm incentivised to pointlessly duplicate tests until the computer says yes. How can you ensure the tests are valuable - do you have the knowledge and skills to review them? Can it be part of the existing code review? Mutation testing is one technique that can give an idea of how much of the code written was required by a test. — jonrsharpe 29 secs ago
 
5:22 PM
0
Q: Jquery selector - robustness of the syntax

Francky_VI'm rather new to front-end & jquery selector. While what I am doing works, I'm unsure it's necessarily robust. FYI, the backend & templates are built on Django. The auto-naming conventions in Django forms (which is what gives the elements here their names) are pretty stable. However some of that...

 
5:48 PM
0
Q: Time Converter - Python Tkinter - General comments on code

Sheik-YaboutiI have been learning python since being in lockdown, this is the first Tkinter application I've built without consulting the internet or seeking help anywhere. It is a time converter where you can select the input unit via a checkbox and the other entry windows will fill with the correct conversi...

 
 
3 hours later…
8:22 PM
0
Q: Find the first repeating sequence in digits of pi

conaI wrote a function to return the first n length sequence which occurs twice in the digits of pi. Along with the repeated sequence, I want the indices of the first and second occurrences. For example, if n is 1, code returns (1, 0, 2) and if n is 2, (26, 5, 20). For reference, here are the first d...

 
8:38 PM
 
 
1 hour later…
9:40 PM
@Silidrone Please take a look at the CR Help center page What types of questions should I avoid asking? 'It's OK to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?"'. If the OP presented fully working code with enough context then that would be on-topic. — Sᴀᴍ Onᴇᴌᴀ 53 secs ago
 
10:04 PM
0
Q: Robot OOP Class in Python part 2

Daro1234451Here is the thing. So I wanted to create Robot class and make the Robot fights. But know im struggling with weird output because all i've got is just Robot E lost all the power Robot D lost all the power Robot C lost all the power Robot B lost all the power Robot A lost all the power That's my c...

0
Q: Google maps has become washed out. I cannot see roads. I have made a hack work around that dims the page to make the roads contrast with the map

S. MeltedSee https://www.youtube.com/watch?v=MAPfjlwMyB4 for example of issue I am having. Now, I made a snippet inside the developer console in chrome to "fix" this, but I am certain there are better ways to do it. Here is the snippet: var style = document.createElement('style'); style.type = 'text/css';...

 
10:18 PM
I’m voting to close this question because it is not a question. If anything, it belongs on code review. — Dan 19 secs ago
 
10:29 PM
0
Q: not-a-DBA first time with production code

RASGi had to learn SQL by myself, and this is production code. so i'd really appreciate any feedback. really. no reason to be polite :) i know there are some things that i shouldn't be doing, but i don't know what to replace it with. WITH getCotaUsada AS ( SELECT REPLACE(id, 'home::', '') as user...

 
@Dan the question doesn't belong on Code Review. Please don't recommend users to post off-topic questions on other sites, as all you're doing is causing the OP to have an even worse experience of the Stack Exchange network. — Peilonrayz 41 secs ago
 
10:51 PM
This isn't a technical problem. It's a personnel problem. Do code review and encourage your team to buy into whatever metrics you value. — Chris 31 secs ago
This might be better on the Code Review stack exchangeJDługosz 14 secs ago
 
11:07 PM
possible answer invalidation by Scott McPeak on question by Scott McPeak: codereview.stackexchange.com/posts/260835/revisions
 
11:42 PM
@Duga Acknowledges the answer, adds info, does not invalidate the answer.
 

« first day (2935 days earlier)      last day (32 days later) »