Reputation
3,529
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 10 23
Newest
 Civic Duty
Impact
~109k people reached

9h
revised Using an answer from any question and answer site in my source code is plagiarism?
added 58 characters in body
10h
answered Using an answer from any question and answer site in my source code is plagiarism?
10h
comment Using an answer from any question and answer site in my source code is plagiarism?
@VISWESWARAN1998 In principle answers can be copyrighted, in which case you need to comply with the license. Since that's CC-BY-SA, a license badly suited for code, this is problematic. Many answers may not meet the threshold of originality required for copyright protection, in which case reusing it is no problem. I recommend using answers only to learn how to solve a problem, instead of copy&paste. Though in practice many users ignore the copyright issues and simply use code from SO as-is. If you can do that depends on how risk averse your company is.
10h
comment Using an answer from any question and answer site in my source code is plagiarism?
Plagiarism mainly matters for academics. At work you need to care about copyright violations.
14h
comment Service-locator anti-pattern alternative
Injecting an instance already removes the creation of the object from your class. I'd only inject a factory if the class needs to create multiple instances with different parameters.
14h
comment Service-locator anti-pattern alternative
Why do you "usually use a factory"? In most cases you can simply inject an instance instead of a factory. And even if you need a factory, Func<IFoo> is already a factory, no need to wrap it in another class+interface.
16h
comment What algorithm would have the fastest average run time and least memory requirements for sorting a deck of playing cards?
Sorting the full deck is trivial, since the output is fixed. You can simply generate a sorted deck in linear time or copy from a fixed template.
1d
comment Linux equivalent to Visual Studio “Debug -> Attach To Process”?
@CharlesE.Grant For me remote debugging only implies that the target is on a different (virtual) machine, and says nothing about starting a new process vs attaching to an existing one. Personally I have never done remote debugging, but I have often attached a debugger to a running process.
1d
comment Microservices with the same database
I wouldn't worry about the connection overhead. I'd worry far more about microservices limiting the scope of atomic operations.
1d
revised php base64_encode simplified answer
added 6 characters in body
1d
comment php base64_encode simplified answer
When you have binary data and want to represent it as text, you need to use an encoding like Hex or Base64.
2d
comment Why are floats still part of the Java language when doubles are mostly recommended instead?
32 bit floats are require less memory and are faster, especially using SIMD instructions.
Apr
25
comment Why there is a drop of interest in DBMSs?
@Izkata They need to apply some normalization over the years as well, otherwise it'd climb a lot for everything as internet usage climbs. It seems likely that it's normalized to the fraction of search queries.
Apr
25
comment How to structure Restful API client files in C# project?
A folder per resource and the different methods within that folder. Not the other way round.
Apr
25
comment How to structure Restful API client files in C# project?
I'd rather organize my project by endpoint/resource than by method.
Apr
25
comment Adding config parser to code that uses global variables
At minimum I recommend using a single Config class and passing an instance of it to whatever needs access to the configuration.
Apr
25
comment Why there is a drop of interest in DBMSs?
I'm not sure if this graph really indicates a drop. Or if the drop in the graph is mainly an artifact of normalization. e.g. due to more non-technical users coming online and using google more. If you add generic terms like "programming" or "database" they show a similar drop. So it's very likely that this drop is really due to a shift of the internet user demographic from programmers to non technical users.
Apr
23
comment Why does the type go after the variable name in modern programming languages?
C# uses the prefix syntax, yet it treats int[] x, y as two arrays. It's just the silly C syntax which treats those modifiers as unary operators on the variable (and a mix of prefix and postfix, no less) that causes problems.
Apr
21
comment How would I identify a gap in a set of curve data, and get its value?
You can take the minimum and maximum of each curve to obtain the interval it covers. Then union all the intervals and what remains are the gaps.
Apr
21
revised Is there any simpler way to check the strong level of password?
added 191 characters in body