931 reputation
518
bio website
location Italy
age
visits member for 1 year, 11 months
seen 16 hours ago

Mar
6
revised Should I refactor large functions that mostly consist of one regex?
deleted 6 characters in body
Mar
6
answered Should I refactor large functions that mostly consist of one regex?
Mar
6
comment Should I refactor large functions that mostly consist of one regex?
Are you sure a giant regex is the best solution to your problem? Have you considered simpler alternatives, like a parser library or replacing a custom file format with a standard one (XML, JSON etc)?
Feb
12
answered Is it better to use a switch statement or database to look through 5,000 to 10,000 instances?
Feb
11
comment An alternative to an array of functions?
I have no time to post a complete answer, but if you need the functions to call one another, you can just define them outside the array.
Jan
13
comment Does 'consider returning Null Object' apply to a DAO read method?
The Option (or Maybe) type is not 'being type-safe just for the sake of it'. 1) It forces you to always consider an empty result. 2) It allows you to compose functions, returning null on the first failure. It can make your code considerably shorter and clearer.
Nov
29
answered Is error suppressing bad practice?
Oct
5
comment Why is quantity in software still written as “1 result(s)”?
+1 Grammatical number can be very different from one language to another. Some languages have dual (which refers to exactly 2 entities), some languages use a singular form for every number ending with 1 (21, 31, 41, etc.)...
Sep
23
comment Best Practices: Database app programming patterns
-1 because it does not answer the question.
Sep
23
awarded  Popular Question
Aug
29
comment Changing a variable through a series of statements … What is this technique called?
@James Maybe to save a lot of precious time and minimize misunderstandings in the communication between developers. Not to mention learning what the possible solutions are without having to reinvent them each time.
Jun
21
comment Finally block for methods - is it a bad idea?
If I understand your question correctly you can simply put the decision logic in a separate function, and return when you want to "break the flow and perform the real stuff".
May
29
awarded  Critic
May
28
awarded  Yearling
Apr
13
comment Writing your own framework or using an existing one?
I have just discovered that my boss is one of those people who think having small functions is a new-fangled trend. Recently I told him that our code contains some extremely long functions (>=3 pages) which should be split into smaller ones. He replied: "Don't you think having a lot of small functions would make the application slower?" Apparently we should never take anything for granted...
Apr
13
accepted Why do relational databases only accept SQL queries?
Mar
26
awarded  Nice Question
Mar
21
comment Why do relational databases only accept SQL queries?
@RobertHarvey Nothing. But it needs to be converted to SQL. The point of my question is why can't we have driver-level access to data manipulation operations.
Mar
21
asked Why do relational databases only accept SQL queries?
Feb
23
awarded  Caucus