Reputation
11,019
Next privilege 15,000 Rep.
Protect questions
Badges
5 21 62
Impact
~565k people reached

Jan
12
comment Efficient way to query thousands of records by ID from a Mongo document with hundreds of thousands of IDs - or is that infeasible?
Mongo has an in query already. You might experiment with chunking the array passed in - I'm not a Mongo expert. docs.mongodb.org/v3.0/reference/operator/query/in There probably isn't a better solution with Mongo - it's written with the expectation that both tables you want to "join" might be sharded, so in general you have to fake it with map-reduce steps. But for you the in operator should be sufficient.
Jan
5
comment Which database could quickly query on different columns of a billion records database ? (See the scenario)
Sounds similar to the requirments that led to the mnesia database, which is open source.
Dec
29
comment Are a class's methods a type of closure?
You are saying the methods have access to global variables, then saying they are local in a sense. Since you are not talking about any specific language, it's unclear what you mean. If they are really global, it really doesn't make sense to call it a closure.
Nov
9
comment Can I wrap a collection with a static class and still call it repository pattern?
@t3chb0t I would describe a cache as something that speeds up a computation (without altering the semantics) by saving some or all of the results of a computation. Many caches have to deal with invalidation but I would still call it a cache even if you are so sure it will fit in memory that there is no code to deal with invalidation.
Jul
31
comment How to better define SRP and “wholesome” objects?
SRP means a class should have one reason to change. You don't want the accounting rules code to change because you changed the database or the UI or the network stack or the authentication or the logging... It involves some element of predicting what kinds of changes there will be, so there is uncertainty and subjectivity involved.
Feb
25
comment Are deadlines Agile?
Some of my deadlines have proved pretty agile.
Feb
25
comment Is it worth even checking to see if Guid.NewGuid() is Guid.Empty?
If you are seeing this pattern repeatedly perhaps a utility method would be in order? Repeating code chunks like this seems like a bigger problem than the fact that you are checking an edge case that will never happen and might not matter even if it did happen.
Feb
20
comment What would an anti-tree look like?
People, he means the mathematical dual of a tree. Mathematical duals are well defined.
Jan
13
comment Been working on a project for the last 6+ months. Consultants have been brought in and want to change everything. What should I do?
If they felt able to recommend that in just one day, it seems reasonable to wonder if they were going to recommend Angular no matter what. Also, even if their decision wasn't already made, if they know Angular but not JQM, JQM will seem more complicated. Also, they may get paid more if they scrap things and start over - it's awfully hard to teach someone something if their paycheck depends on not understanding what you teach.
Dec
17
comment Are all magic numbers created the same?
possible duplicate of When is a number a magic number?
Dec
12
comment Isn't there a chicken-and-egg issue since GCC is written in C++ itself?
Yes, but chickens and eggs have the same problem and they've solved it too.
Nov
21
comment Why is PHP so hated?
@Herrk I actual did talk to Yannis some time ago, asking a very similar question, in the whiteboard. chat.stackexchange.com/transcript/message/4302018#4302018 (keep reading a bit if you are interested, there is other discussion in between).
Oct
18
comment How to avoid module dependency chain nightmare caused by transitive dependencies?
Off hand, transitive dependencies aren't some weird artifact introduced by a weird implementation, there really are dependencies and they really are transitive. They are also common in programming. I'm not sure why it's confusing or a nightmare. Maybe you could elaborate on why this is something to be concerned about?
Oct
17
comment How to perform deferred tasks in backend
I don't think it's clear what your problem actually is. If you only consider them to have gold status if expiration Date>= now then there is no moment you need to "remove" it. So what exactly is the problem that remains?
Oct
17
comment How to perform deferred tasks in backend
Whenever you check the status check the expiration date too?
Oct
9
comment Static and not-static: programmer quantum theory
Is using $this not a "clear and unambiguous mode"? What is the problem you want solved?
Oct
8
comment Why is reading from memory not a side-effect but reading from a file is?
If someone wanted to implement a version of Haskell that did its own memory paging but kept the same public semantics then it would be side effect free (technically the files would have last access time modified and such, but that would not be exposed to the programmer directly) for the purpose of writing programs. The implementation of pure functional languages may, and do, have side effects. If as a programmer you are accessing a file at the level of the program itself you are dealing with a concept, files, that conceptually includes side effects.
Sep
19
comment Are Git branches, in fact, “homeomorphic endofunctors mapping submanifolds of a Hilbert space”?
I've always assumed that the author of the joke did get the monad joke but was purposely descending in to gibberish as a parody. One of those things that starts out plausible and becomes steadily less so until only at the end can you be sure its gibberish. It seems uncharitable to conclude he didn't get the monad joke.
Sep
16
comment Data model for persisting queries to database
Hmm, what are your UI requirements and target audience? A simple DSL for ANDs and ORs can be easier than a visual query builder (or a fancier interface can do both and have one update the other). Also, it's hard to tell if you are better off storing the query by constituent parts or just saving and parsing a string. Do you need to use SQL to query your saved queries?
Sep
15
comment Data model for persisting queries to database
Who will be creating the queries? How will they be evaluated - does the query need to eventually be expressed in pure SQL or is it up to you? What technologies are you using to implement this (some environments make some techniques easier or harder)?