10,516 reputation
42056
bio website
location
age
visits member for 3 years, 5 months
seen yesterday

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.
Dec
11
comment What's the scariest piece of Other People's Code you've ever had to maintain?
@Mawg - Did I mention that it was a dynamic language with occasional use of an eval() kind of function? And that the variables were usually broadly scoped, often globally? Your approach is good but isn't always an option.
Dec
11
comment Inheritance vs Association in this example
Is this homework? It seems like an absurdly simplified domain model for a real world financial application. If it is homework, then you are correct about 'additional domain knowledge' being unneeded. For a real system it would depend on what else it does and to a degree on what it might be asked to do in the future (which is part of why it's pretty hard to ask a reasonably answerable design question).
Dec
11
comment Finding repeated text in a string
Wait,what? I've you have already parsed it down to the text stream, then, yes, your problem is so trivial that I don't know why you asked. But your question appears to ask how to parse HTML for duplicate strings within text fields? Maybe? You also mention an SQL query. You should clarify your question.
Dec
11
comment Does a licence exist where forking forces the developer to resell it when developer want to redistribute?
This question appears to be off-topic because it is about how to create a desired type of software license
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.
Oct
2
comment FizzBuzz on Large Scale
@Doval - I think he did FizzBuzz with a switch statement.
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)?
Sep
13
comment How to signal that a method chain should not continue?
Usually you return something representing the invalid state, that can be used to continue the chain later.
Sep
8
comment What is meant by an HTML5 application?
This is somewhat nitpicking, but people also often mean "browser features not actually part of the HTML5 spec per se, but part of some other standard developed at roughly the same time as HTML5". For example, WebGL isn't part of the W3C HTML5 spec. Most people don't need to care about the difference. Most people saying "HTML5 application" are unaware such distinctions are possible to make.
Sep
2
comment What to do if you're stuck on a project because you got dumped in without the information you need?
Do you need to know what it should do or is it figuring out how it does it? (Knowing what it should do includes being able to determine if a change you made broke other existing functionality).
Aug
27
comment Addressing the fact that primary keys are not part of your business domain
business keys are eternally unique - until they aren't. If you are using the business keys as primary when this happens then the change in business rules breaks more stuff.