9,948 reputation
2450
bio website dmitry.cheryasov.in
location
age
visits member for 4 years
seen 23 hours ago

I constantly try to expand the little I know about programming.

google profile


Nov
8
answered Smart fallback for line endings in code files?
Nov
7
reviewed Edit Why is SQL's BETWEEN inclusive rather than half-open?
Nov
7
revised Why is SQL's BETWEEN inclusive rather than half-open?
Added alternate terms for "Semi-open" to help with searching.
Nov
6
comment At what point should you collapse many parameters into (e.g.) struct to improve readability in function headers?
«11. If you have a procedure with ten parameters, you probably missed some.»
Oct
27
comment How do you identify bugfix commits on QA environment with Git repository?
Putting ticket number to commit messages and even git branch names is an extremely good idea.
Oct
27
comment How do you identify bugfix commits on QA environment with Git repository?
@igorp1024 Why can't you have multiple tags per sprint? Have a tag per major build; I assume your build numbers increase monotonically? Say, I've built something from a commit I remember; after the build is done, I might git tag that commit with the build number. Maybe your build system can do this automatically. Tie fixes to builds / tags, not to commits. Tags are very cheap. Just clean them up on the next sprint.
Oct
25
comment Removal or footer text in an open source
The program must have come with a license, or at least a name of the license, like "GPL v2", or "Apache License", or "BSD License", etc. Look for it.
Oct
25
comment Removal or footer text in an open source
What does the license say?
Oct
23
answered Is it possible to make a printable 'template' document?
Oct
22
comment How important is it to reduce the number of lines in code?
A tangential bit showing how far the care about code terseness and simplicity may take you: a story about kdb.
Oct
22
comment Return equal occurrence of char in a list of strings
Well, this can make perfect sense if we use byte-sized characters.
Oct
22
revised Return equal occurrence of char in a list of strings
added 9 characters in body
Oct
22
comment Return equal occurrence of char in a list of strings
Imagine that the first string has only one character, and the second line is long and contains all sizeof(char_t) * 8 possible characters. You'd have counted great many counts of characters in the second string that don't ever occur in the first. (This, or I misunderstand what you mean saying "preprocess both strings").
Oct
22
answered Return equal occurrence of char in a list of strings
Oct
15
comment Name for this type of parser, OR why it doesn't exist
Basically your parser parses a single document and yields a parse tree, then immediately starts parsing another document, etc. I suppose this behavior modification is trivial compared to the variety of parsing techniques applied to a single document. Hence the lack of a special term for it.
Oct
15
comment Seeking Guidance on Thread Safe Scripting
Try from multiprocessing.pool import ThreadPool and import Queue, and in no time you'll stop reinventing wheels and start solving your problem. Have some worker functions running on your thread pool, send tasks to workers using one queue, send results back to the main thread using another queue.
Oct
13
answered Haskell's ':' operator
Oct
13
comment Why does Scala have return but not break and continue
I can imagine that the authors of the language consider tail recursion as the way to construct iteration. I can imagine that break and continue need some additional cleanup machinery. OTOH return is a way to orderly terminate a function, and any cleanup machinery is already there anyway.
Oct
7
comment Which one of these would be the better way to implement object copying in c#?
The partial copying approach makes most sense with immutable objects, that is, when all object's fields are final. If you already have a builder class for that, you could extend it so that it would accept a template object: var modified = builder(template).WithA('foo').WithB('moo').build();. If the objects are indeed immutable, you could easily share larger parts of them while copying. Also, I always tend to prefer shorter code; it's usually clearer.
Oct
7
awarded  Enlightened