« first day (3350 days earlier)      last day (44 days later) » 

12:04 AM
REFRESH! There are 8115 unanswered questions (89.3062 answered)
 
 
1 hour later…
1:16 AM
As UnholySheep said, codereview would be the better place for this. But to provide some insight for you: there are scenarios where you use a bunch of if statements like this. In your case in particular, I'm sure there's some simplifications that can be made with logic, but unless your code is slow or impossible to decipher, don't sweat making it perfect too much right now. Code isn't always going to be elegant and beautiful. — Ryan R 29 secs ago
 
 
3 hours later…
4:39 AM
Monking
 
5:23 AM
Monking
 
 
1 hour later…
6:27 AM
Questions about performance on working code might be best suited for CodeReview instead. — JvdV 15 secs ago
 
7:20 AM
0
Q: Universal reader which design/architecture pattern: which choices would you do?

curiousMy goal is to propose a generic interface to read all kind of document, without bothering of file extension (reading word, pdf, etc ...). How would you do ? I imagined 3 implementatio to ensure a generic and flexible interface but perhaps would you suggest an other one ? I would like to get some...

 
7:38 AM
@CaptainObvious Their previous attempt is self-deleted.
 
8:37 AM
0
Q: A query for VIEW from different tables

PerkoneI use MariaDB. I have a bank, the bank has accounts, accounts have expenses and favors, expenses and favors have currency, and currency has an exchange rate. I need to create a query (VIEW) that will select the account from his bank and show me all his expenses and favors from the date when is cr...

 
 
2 hours later…
10:19 AM
0
Q: UX Best Practice for Error Messages in JSON REST API?

LanceI am putting together an ad-hoc system for returning error messages, and I want to "get it right" this time (for the 100th time of implementing this sort of thing haha). By get it right, I mean I want to efficiently return the right errors to the user, and not return to them any potential leaks o...

 
 
1 hour later…
11:36 AM
0
Q: Sending events to the API via queue functionality

RobsonI am working on the queue which requirements are: We can 3 types of events (start, heartbeat which will be added to the queue in 5sec intervals, and the end event) Backup the events in local storage for cases like (close browser, close tab) Send only the newest event if we have more than 1 event...

 
So I was doing a video-test on my Mac, I can't watch DRM-protected videos when docked to my external display because the DisplayLink driver isn't HDCP compatible, but I can run a Parallels VM with Windows and Chrome and it works perfectly fine.
 
12:02 PM
@Mast Rock and a hard place? That's bad.
@DerKommissar You considering writing your own driver in OSX?
 
@pacmaninbw It's quite unfortunate.
 
Yes
 
12:53 PM
@pacmaninbw No, I just open Parallels and watch the videos lol
 
1:33 PM
:)
 
 
1 hour later…
2:41 PM
What I'm trying to tell you is that the TS compiler ain't gonna be happy. You can either turn it off by laboriously casting or @ts-ignoring every place you use that type, or you can rewrite your code to work with it. As for the JS working fine, if I saw that in a code review I'd flag it and tell you to use customElements.define to properly extend an HTML element. As to whether or not it's worth the effort to change it (particularly if it's already in production as-is) is a call you're going to have to make, but I've already shown you the path if you choose to do so. — Jared Smith 54 secs ago
Not if you are code reviewing a PR on github. — Renato 49 secs ago
 
2:55 PM
Monking
 
3:09 PM
Guest Post on July 06, 2022
While Perl might seem like an outdated scripting language, it still has plenty of relevant uses today.
 
> If you love UNIX/Linux/BSD like me, then you have definitely learnt Perl and programmed in it. I am pretty certain you have also used Perl more than once, perhaps several times.
You can do perfectly fine without nowadays...
 
3:52 PM
@Mast Python may have taken its place
 
4:16 PM
Monking
 
4:36 PM
14
Q: Hide the "describe what you've tried" bullet (new askers' modal)

Toby SpeightOur new asker's modal has the three bullets: Summarize the problem Provide details and any research When appropriate, describe what you've tried We are able to remove the third bullet point (see "Short version …" section at the end of that answer). I'd like to propose that we do that. There ...

Modal got updated.
 
@Mast cool
 
4:50 PM
@pacmaninbw I really think that's what happened
 
5:03 PM
possible answer invalidation by FLAK-ZOSO on question by FLAK-ZOSO: codereview.stackexchange.com/posts/277885/revisions
 
Spent 2 hours this morning debugging something for my OS course (having zero type-safety sucks) and it came down to doing a process->stack = PROC_READY instead of process->state = PROC_READY
 
possible answer invalidation by FLAK-ZOSO on question by FLAK-ZOSO: codereview.stackexchange.com/posts/277885/revisions
 
5:25 PM
The correct answer to the interviewer is that this is bad code that should never pass a code review. — Cheatah 24 secs ago
instead of opening an opinion-based discussion on stackoverflow (explicitly off-topic), i suggest asking whoever did the code review of how they would solve the problem instead. — Franz Gleichmann 38 secs ago
It would be interesting to know whether the interviewer would insist on getting an answer other than "UB" or "should not pass code review". Then you would know to probably walk away and apply somewhere else. — Cheatah 34 secs ago
 
5:45 PM
@DerKommissar Is that the operating system you built booting up?
 
Yep, booted and running two different processes with the scheduler
 
:)
What hardware are you running it on?
 
Just a qemu VM
 
Thought that might be the case.
 
On Windows I use a Bochs VM
 
5:47 PM
VM is probably the only to develop OS software now.
 
It's really nice because if you're building a "robust" one you can turn hardware features on and off
 
What is Bochs VM, I have VMWare Works installed.
 
Bochs is less "VM" more "Emulator": bochs.sourceforge.io
 
@DerKommissar Thanks for the link, looks interesting.
Love the image with the Daemon and the Penguin in the same box.
 
I like it because it's very lightweight and you can manually edit the config file relatively easily.
 
5:53 PM
Does it let you pick and choose from different chip sets?
I know it allows you to choose any X86 processor.
 
I'm not sure, Qemu does
I set up the basic config file to run my samples, I haven't done much else
 
I'm reading through the documentation now. It does provide some variety.
 
6:53 PM
0
Q: MP3 Playlist Class in Python

Seraph776Background Info I am an intermediate level Python programmer. This is my implementation of a MP3 Playlist class challenge that was hosted on 101 Computing.Net. The goal of the challenge was to implement a Class in Python to maintain an MP3 Playlist. The key features of the class are the ability t...

0
Q: How can this RESTful API server framework be improved?

AminMalI have made a project (you can find it here on Github), which is basically a RESTful API server framework. This project is kind of like my hands-on practice on Golang. I'm not sure if this is a valid question in codereview stackexchange, but I couldn't find any better platform. So I started to fi...

 
7:18 PM
If you're looking for ways to improve your existing code, I'd suggest submitting to Rust code review instead — PitaJ 50 secs ago
 
7:45 PM
0
Q: Workers-consumer implementation with message passing (using crossbeam-channel) in rust

Kirill LykovI've implemented a PoC for the problem of many producers who generate some messages by themselves and send them to a single consumer. I use crossbeam-channel for message passing instead of shared state. One interesting thing is that to inform producers to stop producing I use drop(receiver) inste...

 
8:28 PM
Note: please keep in mind that the original version of this question provided a working solution and asked for something "more elegant". Such question should not be asked (and certainly not answered) here. Stack Overflow is for specific, objective, practical programming problems/questions. Questions asking for improvements to existing, working code should be asked on Code Review instead. — TylerH 32 secs ago
 
9:01 PM
@TylerH As with any question, we do make guesses repeatedly about what the asker wants based on the actual words in the question. It's not irrational to interpret "more elegant" as better performance and/or lesser code. Code review questions are not off topic here either. — TheMaster 37 secs ago
 
9:17 PM
@TheMaster Finally, questions asking for specific performance improvements, which is what that Meta question is about, are on-topic here if they are, as mentioned above, specific and objectively answerable. Code Review questions are a broader subject and are not on-topic here (and are not what that Meta question discusses, either). — TylerH 34 secs ago
Your question belongs more on codereview.stackexchange.com. — Christopher 30 secs ago
 

« first day (3350 days earlier)      last day (44 days later) »