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

Apr
21
revised Is there any simpler way to check the strong level of password?
added 261 characters in body
Apr
21
revised Is there any simpler way to check the strong level of password?
added 261 characters in body
Apr
21
revised Is there any simpler way to check the strong level of password?
added 208 characters in body
Apr
21
revised Is there any simpler way to check the strong level of password?
added 218 characters in body
Apr
21
answered Is there any simpler way to check the strong level of password?
Apr
21
comment Is there any simpler way to check the strong level of password?
Writing a good strength checker isn't easy. You'll need to detect various patters humans like to use.
Apr
21
comment Is there any simpler way to check the strong level of password?
That algorithm is extremely dumb. Aa0 is strong while ].^~>(+&*}% is horrible.
Apr
21
comment Is there any simpler way to check the strong level of password?
Why would you limit the password length to 11 characters?
Apr
19
comment Is it a bad practice to use JSON strings as keys of objects?
I'd worry about the ordering of keys. {"x": 7, "y": 8} and {"y": 8, "x": 7} are different strings, yet equivalent as far as JSON is concerned. You should check the JSON.stringify documentation to see if it makes stronger guaranteed about the string representation it produces than the JSON format requires.
Apr
16
comment Is there a good reason to run 32-bit software instead of 64-bit on 64-bit machines?
@FilipHaglund Depends very much on what you're doing. For RSA and Elliptic Curve Crypto a factor 2 advantage due to 64 bit registers/multiplications is quite possible. For other algorithms there is no advantage at all and you needlessly pay the cost of double sized pointers.
Apr
8
comment Data structure for storing sorted data
Trees are the standard approach for ordered indexes.
Apr
8
comment Why do C arrays not keep track of their length?
If I had designed it, a function argument written as T[] wouldn't be equivalent to T* but rather pass a tuple of pointer and size to the function. Fixed size arrays could decay to such an array slice, instead of decaying to pointers as they do in C. The main advantage of this approach isn't that it's safe by itself, but that's a convention on which everything, including the standard library can build.
Apr
8
comment Why do C arrays not keep track of their length?
If only the pointer+length struct had been baked into the language and standard library. So many security holes could have been avoided.
Apr
8
comment Why do C arrays not keep track of their length?
Turns out that no programmers know what they're doing to the degree that C requires.
Apr
8
comment How to handle error opening Windows file created by my code
@gnat That directory should be user writable and UAC shouldn't cause problems.
Apr
8
comment Bits - Least-Significant/Lowest is 0th or 1st; zero or one indexed
I'd use "bit n" with zero-based indexing instead of "nth bit".
Apr
7
comment Why are large amounts of magic numbers acceptable in CSS and SVGs?
Some values are indeed just chosen because "they look good". But the example the OP linked contains the same value several times, but it's not clear if they represent the same thing or only have the same value by coincidence. Also it uses a value of 198px which is the difference of the size of something else (200px) and a 2px border.
Apr
7
comment Why are large amounts of magic numbers acceptable in CSS and SVGs?
@Oded There seems to be an experimental version of CSS that has something similar to variables: CSS Custom Properties for Cascading Variables Module Level 1
Apr
7
comment Constructor overloading or allow null?
What do you mean by incorrectly? That sounds like a synonym of bug to me. Deliberately passing null to the constructor may be useful, but I see no reason to deliberately set the property to null with the intention of setting it to the default value.
Apr
7
comment Why does nobody use indentation in css?
There css preprocessors that support nesting, which is similar to what you want, but without being as ugly.