121 reputation
4
bio website
location Riga, Republic of Latvia
age 23
visits member for 2 years, 9 months
seen 19 hours ago

Feb
25
comment How to write camel case for words like “phonenumber”, “motorcycle”, “wavelength”, etc
@JasonC Thanks, finally it makes sense why the counter-part is tearDown :D
Feb
25
comment How to write camel case for words like “phonenumber”, “motorcycle”, “wavelength”, etc
The non-adressed setUp case is an edge case though, it's a single word, but JUnit historically has it's fixture initialization named setUp.
Oct
30
comment Why can't Java/C# implement RAII?
FYI, Java has a similar construct since version 7, the syntax is try(Resource r = new Resource()) { hurr; durr; }. That's as close as you get and fairly similar to what many modern languages do (e.g., Python's with keyword).
Oct
14
comment Which hashing algorithm is best for uniqueness and speed?
Just to put people off the idea of "In particular, a common technique for storing a password-derived token is to run a standard fast hash algorithm 10,000 times" -- while common, that's just plain stupid. There are algorithms designed for these scenarios, e.g., bcrypt. Use the right tools.
May
16
comment Why is 0 false?
@Giorgio Not just Common, afaik, LISP in general, at least I'm sure of Scheme, Clojure and Elisp. They're all fairly similar on those kinds of things. Still, that's 4 then.
May
15
comment Why is 0 false?
@MasonWheeler I could probably list the (reasonably popular) languages where 0 != FALSE on the fingers of 1 hand -- Haskell, Ada and Java off the bat, maybe a couple of others.
Apr
30
comment How do you keep track of what classes and functions your team has written?
A separate repo might be overkill for much of the stuff, but if your build system supports some kind of modularity (most do), then at least pulling it all out into some sort of util module would be enough.
Apr
15
comment Readable regular expressions without losing their power?
Reading / editing regexes is actually trivial if you know what they're supposed to capture. You might have heard of this rarely used feature of most languages called "comments". If you don't put one above a complex regex explaining what it does, I reserve the right to smack you in the face with a shovel when I see you. :) Also, code review.
Mar
14
awarded  Informed
Mar
6
comment How can robots beat CAPTCHAs?
Concerning the downvotes -- there is a point that goes roughly like "the question shows serious lack of research". There are thousands of blog posts and online resources, hell, even research papers concerning this topic. Simply googling for it spews out tons of info. There are a lot of people who are annoyed by you asking a question on SE before trying Google.
Feb
26
comment Is there a reason that tests aren't written inline with the code that they test?
I think your premise is somewhat flawed. Other than doctest which Simon already mentioned, most of C++ code has tons of asserts scattered in it. These are, essentially, tests. Unit testing etc. is used for separation of concerns and code reuse (the setup / teardown parts).
Nov
6
comment Pure Java web browser, is it practical?
Technically speaking, wouldn't the Android versions of Opera, Chrome & FF be written in Java? Haven't tried FF, but given a decent device, Chrome & Opera work pretty well.
Oct
29
comment When to use DAG (Directed Acyclic Graph) in programming?
Planning is a whole branch of problems that deals with DAG a lot.
Sep
18
awarded  Teacher
Sep
14
answered Depending on fixed version of a library and ignore its updates
Sep
11
comment What am I missing about PHP?
@DisgruntledGoat The author never promised to be objective or anything. The article is good for what it is -- a comprehensive summary of everything you could ever get pissed about in PHP. Having had my share of dealings with it, I knew many of the listed things, however, I don't think I could come up with anything near that amount for any other language I know.
Sep
3
comment Specific reasons for still using Subversion?
This is actually moot, git only needs a large enough part of the hash to be able to disambiguate, usually something ~ 6 chars is enough, not the whole hash.
Apr
8
comment How often do experienced programmers have trouble getting their code to perform its intended purpose?
+1 on programmers being automata transforming caffeine into code. :)
Mar
17
comment Is unit testing or test-driven development worthwhile?
What I'd like to add, is that unit testing also makes you think about your interface design. When you get to a part where you think "how do I unit test private methods?", you know it's probably your interface that's wrong.
Mar
17
comment How to break the “php is a bad language” paradigm?
@N.B. Yes, but in this case, IMHO saying that "FB is built on PHP" is like saying that StackOverflow is built on CSS and JavaScript, 'cause it has some nice UI touches here and there...