« first day (2476 days earlier)      last day (1839 days later) » 

00:00
RELOAD! There are 6400 unanswered questions (90.0880% answered)
4
00:13
A quick web search using 'PowerShell AD browser' also takes you to this... Stackexchange PowerShell Active Directory Browser, --- codereview.stackexchange.com/questions/55056/… --- which leads to the authors winform implementation --- adexploder.codeplex.com --- and his sourcce code here: ---adexploder.codeplex.com/SourceControl/latest#adexploder.p‌​s1 ---. It's a bit dated, but shodul give you direction. — postanote 18 secs ago
Stack Overflow specializes in not-working code. If your code is working correctly, you might submit it at Code Review, which handles performance, as well as style, correctness, security, and a whole lot more. — usr2564301 26 secs ago
00:43
If this is working code, I recommend posting to the Code Review Stack Exchange, which this would be on topic for. — ShadowRanger 16 secs ago
00:54
I'm voting to close this question as off-topic because it is not asking for resolution of a specific problem. It asks for general code review instead and would a better fit for codereview.stackexchange.com. — walnut 55 secs ago
I'm voting to close this question as needs more focus because the existence of the Code Review site should not be used as a reason to close a question. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSᴀᴍ Onᴇᴌᴀ 9 secs ago
01:33
0
Q: First console application, Is there anything I can do better?

Ben WI have recently started coding in c++ and have made a simple console application. When executed the program asks the user to position their cursor wherever they want continuous repeating clicks, after 7 seconds it then asks the user to set an interval for the clicks. Since I am fairly new I am wo...

02:13
0
Q: Using React, Quiz Implementation

ConanI've made a quiz app using React: https://codesandbox.io/s/eloquent-kare-gczfw Would be awesome to get some feedback, especially the animation that happens when the "next" button is clicked. I realized that the animation happens initially, then does not happen, then happens again. Wondering what...

 
3 hours later…
04:57
0
Q: Swift model for the Nevada Democratic Caucuses Feb 22 2020

Darrell RootLong one here, but election transparency is worth a rough code review. The Iowa Caucuses have numerous errors in delegate awards because they did their computations manually (their closed-source app failed). In response I released a Swift "Caucus Report" iOS app for the upcoming Nevada caucuses...

05:14
Monking
0
Q: Simple python code with datetime, datetime operation and datetime formating, I would like to make it more concise

RNAI am sure there will be a way to make this code simpler, can someone take a look? Basically what it does is: get now and a week ago from now then format it to utc (i.e. 2020-02-04T23:18:00Z) to enter in boto3 command as parameters import datetime end_time = datetime.datetime.now() start_tim...

05:37
codereview.stackexchange.com might be a better place for this question — Karthikeyan Vaithilingam 25 secs ago
0
Q: Why help(import) gives an error? -python-

confusedThis is my second week in python. For help(time) there is no problem it works but for help(import) orhelp(as) I have this error: File "<ipython-input-5-664ce45ddf5e>", line 1 help (import) ^ SyntaxError: invalid syntax Can you tell me how import is different from time?

05:58
0
Q: Naming insecurity

Martin FrankI'm having trouble with proper naming. That issue appears when i try to apply to first class collection to my class and use sonar as well: public class Units { private final List<Unit> units = new ArrayList<>(); [...] } Here's the problem, sonar says: A field should not duplicat...

06:38
0
Q: Implementing Sample Abstract Factory Pattern using Smart Pointers in C++

Kiran ThilakWas trying to implement and example code to smart pointer from link. Is it a good practice? To go with all unique pointers or should we use shared pointers in this case? How can i improve this ? #include <iostream> #include <string> #include<memory> void LOG(std::string strText) { std::cout <<

possible answer invalidation by Hooman Bahreini on question by Hooman Bahreini: codereview.stackexchange.com/posts/234168/revisions
@Duga seems ok
06:58
0
Q: How to make the runtime of the following code faster?

user11833872The program needs to count the number of distinct permutations of N which appear as a substring of H at least once. N can have anywhere between 1 and |N |! distinct permutations in total – for example, the string “aab” has 3 distinct permutations (“aab”, “aba”, and “baa”). The runtime is too high...

 
1 hour later…
08:05
possible answer invalidation by greybeard on question by Darnoc Eloc: codereview.stackexchange.com/posts/237192/revisions
08:23
Not enough people in the bloody queues lately.
@Duga Fine
0
Q: An app displaying items fetched from JSON, but I think maybe I'm not using best Android development praxis

SimsonI was writing an app for a challenge but apparently this was not good enough could somebody please point out the most major flows in my design? https://github.com/simonsso/Pet-Shop-Boy MainActivity.kt package net.thesimson.petshopboy import android.app.AlertDialog import android.content.Dialo...

0
Q: Refactoring 1 class with 3 similar methods with different signature and return value

GalinaI have a class with 3 similar methods. I can't consider which a pattern to use better for refactoring: template method, strategy or something else? I don't know. Can you help me? public class Graph{ // doesn't matter methods and constructor of the class public bool BreadthFirstSearc...

09:00
0
Q: Condition to check if a number is near to the highest

user218349Wanted to know if there is a way to check if a number is near to the one at the peak of the given numbers... Code: #include <iostream> #include <cmath> using namespace std; int main() { string name[100]; int score[100], i = 0, j = 0, highest = 0, avg = 0, count = 0; for (i = 1; i <...

@Mast Can you expand on your comment. How's it not complete?
Like the code's clearly been cropped in the wrong place. But IDK other than that
09:33
You can copy/delete your question and ask it again at codereview ;) — G-Cyr 47 secs ago
0
Q: How python handling variables which equals to 0.0?

user3541356I wondering how this is possible: In [53]: e, x = 0.0, 0 In [54]: e is 0.0 Out[54]: False In [55]: e is 0 Ou...

0
Q: This is a CSS/HTML/PHP dynamic text list

asobakI'm wondering if there is a better way to write the same exact thing? I wrote it to display three different dynamic messages, but I feel like there can be a lot of improvements... Any help/idea would be appreciated. .list-wrapper { width: 100%; } .list { ...

@Peilonrayz That entire question is a mess and the code simply can't do what OP wants it to do. There's a lot of code missing for the proposed functionality. Hence, incomplete.
Both explicit questions stated are off-topic requests on top of that.
1 how to write a code correctly **(unclear)**, I read about the steps **(what steps, of writing code in general?** but could you show me a written codes regarding this topic **(No, we can review what you got but you aren't remotely close to finished)**
2 how can I get built neural networks from the libraries like numpy and tensorflow? **(That's the kind of question you got to read other documentation or a full book for, not a request for review)**
I strongly suspect it's a bit of a mock-up, a start.
But it's not doing anything ML at the moment.
Wrongly cropped, wrongly indented, those returns don't make sense, it's simply not any use to try and review that, IMO.
Now we're at it, why did you VTC this question?
09:54
Ok that I can accept
@Mast Yeah, that was a mistake. I read the post and the comments and the answer, and all the data points I looked at pointed at it being off-topic. And then after completing the review I went back to it, to write a comment. I checked the edits and saw that I shouldn't have closed it.
@Peilonrayz No problem, 2 more votes to reopen.
10:20
0
Q: String to list of pairs

KazzI have an input like this: x = '415,252,428,233,428,214,394,207,383,205,390,195' And I want to end up with this y = [(415,252),(428,233),(428,214),(394,207),(383,205),(390,195)] The closes I got is tmp = [int(i) for i in x.split(',')] y = zip(tmp[::2], tmp[1::2]) How do I get rid of the ...

10:41
0
Q: C# MySQL connection and some queries

LV98Goal: I am trying to get the hang of using MySQL connections within C# windows forms. These are such areas I am targeting: Loading dataGridView correctly Refresh dataGridView from an external form (See public void RefreshGrid()) Update query for MySQL connection I'd like to hear some reviews...

0
Q: nodejs require complex

Hello WorldI am struggling with require issue in node js I have 2 files modules. File 1 (report.obj.js): const moment = require('moment'); module.exports = function () { this.functionOne = function () { // some task } this.functionTwo = function () { // some task 2 } }; ...

11:01
0
Q: How do you solve JSON Ref? In a JSON, given the key path, need to find the a property after following $ref. Is my code, right?

Dinesh GuptaI was applying for a Senior Python developer position at a startup. I have around 3 years of experience. This was the question given to me. Implement a function to query json_schema The goal of this excercise is to implement a function that allows you to query the type of a keypath in a jsonsch...

11:12
For code review related queries, post your questions at codereview.stackexchange.comShubham 17 secs ago
11:28
@Peilonrayz: I deleted the comment under your answer to avoid confusion.
Also on that topic: what does intermarry mean in this context? I can only find translations to German revolving around marriage ;-)
@AlexV @Graipher fixed it.
11:56
@Mast I see! So it was not intentional I guess :-)
@AlexV Ah, you can repost it ;P
@AlexV I've never been very good at spelling. Fortunately I have a spell checker to make me seem far more competent than I actually am
2
@CaptainObvious Example code.
12:42
0
Q: Binary tree pruning with BFS

John SpringI have the following code and it does not look nice to me as too many if statements strolling around. How can I make this shorther and nice looking (more readable). public TreeNode pruneTree(TreeNode root) { if (root == null || (root.left == null && root.right == null && root.val == 0)) retu...

Monking @avazula
@Mast Monking! How's it going?
@Chrillewoodz. Sir I undertsnad, but that's not my code. This will have to go through code review by team lean and so much of drama they do. :-( — Tanzeel 53 secs ago
13:00
@Peilonrayz A non-representative survive among a few of my colleagues lead me to the conclusion that the snippet in question really has quiz potential :-)
0
Q: Find the max of a list using recursion

awwwwwHi i needed to find the max int of a list using recursion, I have done it this way I'd like to know if you think is a good way, and I have a couple of questions: int trovaMassimo(node_t *head){ int e; if(head == NULL){//this can happen just the first time right? printf("Lista vu...

13:12
Eh, I'm reviewing in the "low quality posts" queue, and I see a post that isn't "looks ok", should be given a little bit before "delete", can't be "edit"ed into shape. And I don't want to skip cause I'll never see it again. Is there a way to go to the next review item?
@Peilonrayz If you think it should be given time, 'Looks OK' is the appropriate action I think.
@avazula Good, nice to see you dropping by.
@Mast What do you mean dropping by? I'm always here, this room is in my favs :p
I don't talk much though
But I read everything
@Mast IIRC that should be only used if the post is a good post. Maybe it was a different queue but I remember people being vexed that poor questions were being removed from the queue when they should have been handled.
@AlexV Fair, I can imagine it's on the Pluralsight quiz.
But when I did it, it was asking me about metaclasses and other nonsense.
13:31
@Peilonrayz There is no better option. Or you'd want to skip & favourite it, keep track of it by hand.
It's choosing between evils here.
Yeah, that's the truth
Thanks :)
14:23
0
Q: Code very slow in ms project VBA

Marcinmy code in MS project VBA, in theory, doesn't do anything major. Compares the tasks with each other. But it runs super slow. One run through Temp lasts 15 secs. Try that with 1500-2000 tasks and the macro takes hours.. Please advise. Sub Laczona() Application.Calculation = xlManual Application...

1
Q: Minimalist context compressor

DaBlerI am working on an implementation of the minimalist compression method. The method is based on context modeling, followed by a simple entropy coder (Golomb-Rice coder). The context model uses a single previous byte in the uncompressed symbol stream to predict the next byte. At the moment, my impl...

If your code is functional and without errors, I would recommending posting this code in codereview.stackexchange.com, not stackoverflow. — Jawad 46 secs ago
@juharr ok understood. In the code review, I will suggest that the method be made non-static and that the injected repository be used. That's exactly what I had intended to do, but I was wondering if there was some valid reason that this method maybe should be static. — Casey Crookston 32 secs ago
14:45
It sounds like you might have you work cut out for you. ;) Incidentally, if you want some opinion-based debate about the design, you could post on codereview.stackexchange.com (but you'd have to include more of the code, and some companies don't allow that) — Matthew Watson 44 secs ago
15:24
-2
Q: function composition

KazzCan't find the iterator for this: def f(x): return x*2 a = 1 n = 100 for i in range(n): a = f(a) print(a) Obviously I need to replace the loop with proper code. I was trying to use functools.reduce reduce(lambda x,count: f(x), chain([a],range(n))) but that doen't look good

15:44
0
Q: Name for mconcat implementation for applicative monoid

danbroooksI have implemented a function mcollect which is effectively mconcat only for applicative monoids: mcollect :: Applicative f => Monoid (f a) => [a] -> f a mcollect = mconcat . fmap pure However I am not overly keen on the name mcollect, an alternative name in the spirit of mconcat is am...

16:04
0
Q: Faster way to run python code

Nehal SameeI am solving the following problem: https://codeforces.com/problemset/problem/331/C3# My code for the above problem is as follows: n=int(input()) count=0 while n: l=list(int(i) for i in str(n)) n=n-max(l) count+=1 if n == 0: break print (count) The code gives correct...

Ben Popper on February 13, 2020
Our intrepid new coder meets his first data structure. With an array of concepts in front of him, will he push his learning until it pops for him?
16:24
0
Q: Thread safe nature of properties in MVC base controller

Casey CrookstonI've been asked to do a code review on an MVC project that is still in the early stages of development. I am seeing something that I'm not sure about. I'm wondering about the thread-safe nature of CurrentUserProfile in the Base Controller and then _userId in the controllers. public class BaseCo...

16:39
Shorter...
public class ElevatorTwo {

enum Direction {
UP, DOWN;
}

public static List<Integer> calculateFloors(int startFloor, Direction direction, List<Integer> floors) {
// de-duplicate and order all in one go
var uniqueFloors = new TreeSet<Integer>(floors);

// these only introduce a view, they don't duplicate anything
var aboveFloors = uniqueFloors.tailSet(startFloor, false);
var belowFloors = uniqueFloors.headSet(startFloor, false);
var reverseIter = belowFloors.descendingIterator();

// but we want it in a list
possible answer invalidation by S.S. Anne on question by Saad: codereview.stackexchange.com/posts/236514/revisions
@Duga Nah, that's fine.
Or doesn't that work?
17:05
Monking
@skiwi Can you explain monking?
Does it mean that the suggestion of Duga is false?
Let me find something
32
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, and the reversed gniknoM sometimes used when one le...

Ah, a very late monking to you :)
^^
I haven't really been following this room much lately, you're just new here?
This might be a better question for the Code Review site on StackExchange. — T_Bacon 52 secs ago
17:11
New to the chatroom mostly. My review things come and go, check out my rep line. It is like a staircase.
I'm mod at cryptography and mainly take interest in cryptographic reviews.
Or some Java ones (and JAVA ones, although they get closed while i'm writing something).
Ah nice
That closed elevator question was very JAVA.
0
Q: Elevator Java Exercise

SpartanHedgeyI'm a graduate developer, and have been assigned a small task to write a Elevator program that takes a starting floor, a direction and a sequence of destination floors and then works out the sequence in which the floors should be visited. While there is the option to use Collections.sort() on an ...

I posted some slightly improved code above.
possible answer invalidation by Peilonrayz on question by Kazz: codereview.stackexchange.com/posts/237240/revisions
@skiwi Unfortunately it was only about linked lists, or you could do another nooooooooooo
@Duga It's fine @Duga, I'm the answerer - I know I've violated a different rule. But meh
17:18
That rule being not to edit yourself while answering or something?
Oh, you edited code. Yeah, well.
Only the OP is allowed to edit code. I'm not the op, but I fixed the seq to a. Because it's an obvious C&P error, that happened cause the question's radically changed.
You should ask this kind of question at codereview.stackexchange.com . It's not wrong tho, I just think you can find more helpful answers there — CH4B 23 secs ago
You've got so many memes. I don't think we have any. Boring cryptographers :P
0
Q: OpenGL fragment shader optimization questions

AudioGuyMy (simple) game engine has one big fragment shader for the whole scene. Right now, with multiple objects, collision detection and bloom post-processing (4 linear passes) I get frame times of ~18ms at 1080p on my AMD RX550 (2GB) - which is quite okay for me. But I think that I can squeeze more ...

0
Q: Wordcloud from all answers here on CR by a user

GraipherSince I haven't really used Python's new async features yet, I took some older code of mine, which took all of my answers here on Code Review and generated a word cloud from them, and updated it to fetch the pages in an asynchronous way. This script uses the py-stackexchange package for the API ...

However, I think that our mod election question: "Why does the porridge bird lay his egg in the air?" was superb.
17:30
That sounds like a very strange question, you got a link to it?
Huh, directed to who? which question?
Where they answered the "Why does the porridge bird lay his egg in the air?" mod election question
7
Q: December 2018 Moderator Election Q&A - Questionnaire

Grace NoteIn connection with the moderator elections, we are holding a Q&A thread for the candidates. Questions collected from an earlier thread have been compiled into this one, which shall now serve as the space for the candidates to provide their answers. Not every question was compiled - as noted, we...

If you want your working code scrutinized, for possible issues better post at Code Review. — usr2564301 47 secs ago
It seems to be from the FireSign theatre. Maybe they tried to shut down our brains. However, my brain doesn't stop easily. It is the defining characteristic of my brain.
17:45
0
Q: How can I code more clear on finding the person with the biggest loss

Roelof WobbenFor a course I following and my code is approved I had to make some code that finds the person with the biggest loss where the input is a string[] The string arrray looks like this : { "Tom, 1, 3, -1", "Gillie, 2, 3, 1", "Thor, 1000, 1001, 1002" }; I solved it this way but it's not a clean ...

@MaartenBodewes That's some good content 😂
18:01
Monking
I believe you should've posted this at codereview.stackexchange.comOrkhan Alikhanov 59 secs ago
Hi there!
Already commented on that last one Duga mentioned. Code not working , not on topic.
0
Q: Understanding closure concerns

Li BraryI'm still in the process of figuring out many aspects of stackexchange, and a recent question of mine got closed after I responded to comments provided. I'm hoping to understand more about the feedback provided in the closed dialog so I'm posting here. Here's the original post. And I found almos...

18:26
0
Q: Most performant way to check if elements are overlapping

RafaelI know you can calculate if an element is overlapping another by comparing the top|bottom|right|left properties within the getBoundingClientRect method. However, you need to loop through the elements to do so. I'm curious to know what is the performant way of checking to see if an element is over...

@Peilonrayz regarding the meta you're trying to answer, the revision history is probably quite enlightening
AFAICT the title was really badly chosen
~crawls back into the cave they're learning in
@Vogel612 IDK, the question was edited to a better title and gets closed 2 days later. I don't think it was the old title.
hmm ... maybe ...
I've just taken a comparatively furtive glance at it
I think it was closed for the last part of the authorship reason - asking why the code works the way it does. But to me it just doesn't add up at all
18:49
@Peilonrayz The rest of the question is a bit iffy as well, but I vaguely recall voting to leave it open. Left a comment 10h ago.
But we see so much crap lately it's easy to become overly zealous.
Or we're just sharing the same amount of crap over less people, I don't know.
2
probably the latter, tbh
@Mast Yeah I skipped it in the queue, cause it felt a bit off. But explaining why it's AoC is going to be way more tricky than if it were VTC as LCC.
I ran out of reviews. Not that the queue is empty, but I hit my max for the day...
t3chb0t left publicly, but there's also a number of other high-rep users / regulars that left whether prompted by the changes on SEs side or because life happened...
@Vogel612 Worldbuilding lost 3 moderators end of January. So it could've been worse...
@Peilonrayz Yup.
Especially if you weren't one of the voters to close. Otherwise it's a lot easier I remember.
Never fun answers to write though, although sometimes OP takes it constructively and all is well again.
18:57
SO is really getting worse and worse it feels
    if(temp == null) {
      return null;
    } else {
      return temp;
    }
Where do you get these programmers?
just your regular everyday university graduates.
Always interesting if people use methods to throw exceptions. I've answered one here on SO. You might like to read it and I would like your opinion on the method throwException().
On Java Card I mentioned to the JSF that their throwIt method (used for every exception!) uses this anti-pattern.
@MaartenBodewes Wot
I don't like exceptions. If something illegal happens, crash. Give me that stacktrace.
Well, in Java you can in principle throw an Error rather than an exception.
And all exceptions carry a stack trace of course.
@MaartenBodewes ewww, no
19:10
Or "throables" really.
throwing errors is reserved for the runtime
I'm not saying that it is good practice, but I always find it interesting to note this kind of thing to persons that argue for a "crash".
If I have a method parseVeryComplexStructure then I might get runtime errors, and I may not want to crash.
Please note that whenever I write software, it will 97% of the time be used by me exclusively and 99,9% of the time be used exclusively by people that know how to find me so I can tell them to properly format their input.
@MaartenBodewes then catch RuntimeException is the correct behaviour
@Mast That's good job security, but not good practice.
19:14
When writing software for clients, sure, you don't want to barf the trace on every occasion.
@MaartenBodewes I'm not a developer.
I code to make my work easier.
Automate the crap away. If I have to write handlers for everything that could go wrong, I'd never get anything done.
@Vogel612 Or just catch Exception because it will still allow errors to pass.
right :)
I really hope a back-end dev won't use my tactics. Would be bad.
@Mast there's good places for back-ends to crash, actually..
none of them are after startup is completed, though
Anybody that argues against exceptions seem to believe they can catch all errors. They don't.
Sorry, I'm a bit polarized on this issue :)
19:17
I don't assume I can catch all errors.
But when one occurs, I want to see it. The entire thing.
Show that trace.
Right, but that happens with exceptions too. As long as nobody is not so stupid as to throw them away. And you can also magic away errors on many runtimes (although it si not common practice).
And what would the benefit be of that?
@Mast When I set out on this, I had a foggy picture in my head. But damn, this is one of the hardest 3 sentence paragraphs I've ever written.
@Peilonrayz Need a hand?
Tempting, I'm in the middle of that section, so maybe once I've finished the section.
19:23
Feel free to dump it here before posting if you're not sure.
And yes, writing that kind of answers is hard.
That meta post yesterday took me way too long as well.
You say there is "no way to enforce a logical separation of concerns via simple language rules." But for example, you can put different layers in different projects and use the limitations on circular references to prevent calling into a layer you shouldn't. Although in theory, a dev can just put some code in the wrong project. That is much more obvious to them and a code reviewer than just forgetting Task.Run() somewhere it is needed. Just an example to say, you can with some kinds of logical separation. — Jeff Walker Code Ranger 25 secs ago
@Vogel612 They made one stupid decision in Java cryptography (JCA): they made everything a checked GeneralSecurityException. So now you have to explicitly catch exceptions if you perform e.g. Cipher.getInstance("AES/GCM/NoPadding"). I'm not particularly in favor of checked exceptions.
19:42
@Mast Bit long so I Gisted it. I'm not to sure if the role play part is needed, or if it would even help.
@Peilonrayz Eh. "You've only stated yes to my question and not shown what you're saying is actually correct." That's kind of how your answer reads as well.
I can accept that, because I can't prove the closers were correct - as I don't know why they closed.
20:05
@Peilonrayz If it shouldn't be closed, perhaps the better response is to get it re-opened.
20:20
@Mast At first I thought that'd be the best idea. However it's fairly frequent that there's a disconnect between what I think is right and what the site thinks is right.
@Peilonrayz Yea. I think this question can be salvaged if OP puts in a little more effort. But if the concerns in the comments aren't addressed it's pulling on a dead horse.
@Mast IDK I skimmed the book, and it's implemented it in roughly the same way.
0
Q: LeetCode: Validate Binary Search Tree C#

GiladI was struggling with this question for many times. and I have solved it every time, because I understand the concept. but I can never get to a good concise solution which is easy to follow. in a coding interview I always choke when I see this question. this is the best solution I was able to f...

sigh
Basically it's a convoluted Hello World.
20:33
Sure, why not.
Oh, just when I voted to re-open the Mug had already hammered it.
Welp. Case closed.
Eh, opened.
2
Yeah a very convoluted hello world. This has given me a headache 😂
JavaScript always does that.
21:01
@Peilonrayz btw thanks for answering that meta... I was having a very hard time not calling out a certain particular disruptive user in my reply
@MathieuGuindon No problem :)
0
Q: make a list of m nodes, where m is taken in input

awwwwwHi this is the code I wrote for create as many nodes as he needs (the m variable), but I noticed that using this method I'm creating one more node. What's the best way of fcreating as many nodes as the user say us? node_t *head = NULL; head = (node_t *)malloc(sizeof(node_t)); node_t ...

isn't every a somewhat convoluted hello world?
there's a nice meta discussion to be had about the relevance of on CR I think.
@MathieuGuindon Honestly a lot of the design-patterns questions aren't that well-suited for the site because they focus on hypothetical scenario's that are too hypothetical. A programming-challenge is the middle road between a real problem and a text-book example showcasing a new theory/feature/function/library/whatever and a design-patterns post often enough takes a wrong turn in that regard. — Mast 27 mins ago
I kind of agree, but at the same time I can't help feeling that telling design pattern "example implementations" vs "actual implementations" is too blurry a line to draw in the sand
It's a blurry line and yes, is only barely better.
21:20
@MathieuGuindon Not in !
This feels weird. +70 reputation yesterday and +150 today o_O
Remember the good old rep-capping days...
@MathieuGuindon Probably just me, but I think that'd just be an XY problem. Isn't the problem what's "too hypothetical"?
I also think example code is an XY of lacks context, and I'm starting to think hypothetical code is just lacks context or broken code.
JavaScript's Duck typing makes it unsuitable for this Duck :P
@Peilonrayz could be construed as such, yes ...but historically hasn't been.
I guess I should re-look at the historics
This comment made me think:
@MathieuGuindon Honestly a lot of the design-patterns questions aren't that well-suited for the site because they focus on hypothetical scenario's that are too hypothetical. A programming-challenge is the middle road between a real problem and a text-book example showcasing a new theory/feature/function/library/whatever and a design-patterns post often enough takes a wrong turn in that regard. — Mast 44 mins ago
Should we close questions for being too hypothetical, or for not being answerable?
21:31
@SimonForsberg Isn't that what MRC (new LCC) is?
@Peilonrayz "that" being what exactly?
> Missing Review Context: Code Review requires concrete code from a project, with enough code and / or context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site.
It's clearly for hypothetical code.
Also is my answer unclear? As I don't think the post should be closed. But it seems like some of you think I am saying it should be closed
But if a hypothetical question comes along, but you feel that you could answer it, would you?
@SimonForsberg Click the link, it says just "too hypothetical"
It's not just about hypothetical code
@Peilonrayz upvoted your meta answer. The last part of your answer is clear that you think it's on-topic
21:45
@SimonForsberg Technically hypothetical are answerable, but the answer would be more and more useless the more hypothetical it gets.
Would you guys do me a favor and not close the duck yet?
typing answer.
OK, that's it Ubuntu's out.
@MaartenBodewes I don't think anyone plans on closing it, in fact, @MathieuGuindon reopened it earlier
Two editor windows open and only one shows up in my panel.
@SimonForsberg OK, I'll keep typing my answer then :)
22:10
@MaartenBodewes Please ping me when you post it :)
22:27
@Peilonrayz Finally got something, JS is far from my first language.
Posted now.
@Peilonrayz I'm not completely sure if my "operation" method should not simply be flyBehavior. Oh well.
@MaartenBodewes Nice, interesting read.
When reading it I had a couple "that's different from Python" but that I didn't notice
With JS I'm not sure if you should really split business logic and user interface, it seems like one big mess to me whichever way I look at it }:[
22:44
@MaartenBodewes I'll be completely honest, but I don't really understand that. I should really learn some new jargon...
Oh, they had a method that wrote to document (the user interface). I've yet to meet a Duck that can write documents.
You have a model that does the work, and you have an interface that displays the result (or interacts with the model). You should not mix the two.
@MaartenBodewes You've just not met the right ducks ;P
Ok, yeah that makes complete sense. And the name makes sense too.
With Java I sometimes just pass a PrintWriter, and if that finally prints to System.out, well fine... But if you're also trying to perform the formatting within a Duck class then you're trying to teach calligraphy to a duck.
That would need to be a very smart duck :)
23:02
@Peilonrayz I'm not sure if a "Rubber" is a duck actually. "RubberDuck" maybe, but if I find a rubber in the bath, I don't immediately think ... duck.
@MaartenBodewes If I found a rubber in the bath, I'd be wanting to drain the water. Yuck
oh, gosh. :facepalm: I'm so slow.
I'll see myself out
23:50
0
Q: Extract numbers from a txt file with letters

Dinu MihaiI am new to python and I have a little problem. I Have some data-sets like below written in a txt file. I would like to extract the first sequence of numbers from a txt file in 2 separated vectors: Xcen and Ycen, and then take the second sequence and overwrite the 2 vectors and so on. I've tried ...


« first day (2476 days earlier)      last day (1839 days later) »