341 reputation
15
bio website
location
age
visits member for 2 years, 1 month
seen Jan 27 at 10:09

Apr
26
awarded  Nice Answer
Jan
25
awarded  Nice Answer
May
29
awarded  Yearling
May
27
comment Return random `list` item by its `weight`
@Veehmot thanks, edited.
May
27
revised Return random `list` item by its `weight`
Bug in code example
May
2
comment Is the algorithm more important than the programming language?
Second time I did something similar but as a project template. It creates a source file with an input class below Main and few things inside Main method (instance of my input class and the output stream and case loop).
Apr
26
answered Is the algorithm more important than the programming language?
Mar
15
comment Why use a database instead of just saving your data to disk?
Same can be said for quicksort, binary search and hash tables. They are more complicated then selection sort, thorough search and plain arrays but when somebody implements them for you, there is no reason not to use them. After you make your app with ordinary files, try to remake it or part of it with databases. It would be great way to learn.
Mar
14
comment Why use a database instead of just saving your data to disk?
Because they are usually implemented as a B-trees (not to be confused with binary tree) and trees, if balanced, have O(1) lookup complexity in the best case and O(log n) in an average and the worst case. I've heard of hash based indices (O(1) lookup on average) but don't know if any DB supports them.
Mar
14
answered Why use a database instead of just saving your data to disk?
Mar
14
comment Why use a database instead of just saving your data to disk?
About indices, no, database doesn't index everything automatically. Only few things are automatically indexed while the rest require explicit "please make this indexed". And indices reduce search to logarithmic time, O(log(n)) which is slightly slower than constant.
Sep
5
comment Has “Not everyone can be a programmer” been studied?
You're on the right track but you tie programming languages with hardware (computers) to tightly. Programming is not exclusively the ability to talk to the computer. Programming is about describing a process in a consistent way. Describing a process to other human is similar to coding it in a high level programming language. The biggest difference is that humans are more tolerant to ambiguity.
May
29
awarded  Editor
May
29
revised Return random `list` item by its `weight`
Fixed grammar and remove subjective opinion about other answer
May
29
comment Return random `list` item by its `weight`
@Nevermind readability is subjective, I'll edit out that part. Actually that whole sentence doesn't make sense :)
May
29
comment Return random `list` item by its `weight`
@BenjaminKloster everyday pseudo-random number generators are O(1) and they aren't no more complex than math functions such as square root. Computation heavy RNGs are rarely used outside of cryptography. Even implementations of metaheuristic algorthms (and your problem resembles to roulette wheel selection used in genetic algorithms) use quick RNGs over slow but "more random" RNGs.
May
29
awarded  Supporter
May
29
awarded  Teacher
May
29
answered Return random `list` item by its `weight`