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

Mar
24
comment How to secure my authentication code?
@MarjanVenema password_hash takes care of that. Just use password_hash to create the hash and password_verify() to verify. On older versions of php, use the polyfill.
Mar
24
comment Is “use ”abc“.equals(myString) instead of myString.equals(”abc“) to avoid null pointer exception” already problematic in terms of business logic?
I'd use Object.equals(a, b) for comparisons. Add an explicit != null assertion if you need that instead of abusing a method call to check it implicitly.
Mar
24
comment How to secure my authentication code?
Don't store plaintext passwords. Hash them using password_hash.
Mar
24
comment How to secure my authentication code?
You forgot the die call after setting the Location header. Probably harmless in this case, but can easily lead to security holes in future versions.
Mar
23
comment How do I generate multiple hashes that can be resolved to a single value?
It's called encryption. You get different ciphertext if you use different nonces/IVs.
Mar
23
comment Can StringBuilder be used to effectively store and manage multiple variables of data?
Have you considered CSV or Json?
Mar
21
revised How does a Dependency Injection/IOC Container know which implementation to use?
added 87 characters in body
Mar
21
comment How does a Dependency Injection/IOC Container know which implementation to use?
@BЈовић Looks like C#, but I don't think it really matters.
Mar
21
answered How does a Dependency Injection/IOC Container know which implementation to use?
Mar
21
comment Is there a programming language which requires argument qualifiers (reference/value) to be specified at the call point?
C# requires ref or out when you pass by reference. (But you can still pass references by-value without annotations, the benefit is rather limited)
Mar
19
comment Is there any good search algorithm for a single character?
You can throw SIMD instructions at it, but you won't get anything better than O(n).
Mar
18
comment Is there any proof a permissive licenced (MIT/BSD) project will suffer from closed forks?
When I publish code using the MIT license (or CC0/public domain) I'm more worried about a fork using a viral license (GPL, etc.) than about a closed source fork.
Mar
17
comment .NET Implementation Question (repository access)
Difficult to answer without context. Perhaps an extension method on IRepository<T> would be a better choice.
Mar
17
comment How to find complexity of T(n) = 8T(n/2)+n^2.93(log n)^93?
Sounds like a horrible idea. Especially in this case, since o(n^2.93 * (log n)^93) ⊂ o(n^3) and thus o(n^2.93 * (log n)^93) ≠ o(n^3).
Mar
17
comment What is the best way to sync the time of a live sports match with your app?
I don't see why you'd have to send updates several times per second. That would be only necessary if the ticking/paused mode changes that often. I'd expect the push solution to be cheaper than the pull solution, since you only need to send a message when something changes.
Mar
17
revised How to find complexity of T(n) = 8T(n/2)+n^2.93(log n)^93?
added 1 character in body; edited title
Mar
17
comment How to find complexity of T(n) = 8T(n/2)+n^2.93(log n)^93?
Shouldn't your = be a ?
Mar
16
comment Can a purely declarative language cause runtime exceptions?
@Niels You can design languages that always terminate and depending on how you define success it might even terminate successfully all the time. But such languages won't be able to solve every problem.
Mar
14
comment The concept of “quality gates” in software testing
I'd allow failed tests in feature branches, but not in any of the main branches.
Mar
11
comment Laissez faire memory management
Memory leaks in long running processes are mainly a problem is the leaks accumulate. Your examples might well be due to the runtime not bothering to run the GC because the program terminates before the GC triggers, whereas for a long running process the GC would eventually trigger.