Reputation
346
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 7
Newest
 Commentator
Impact
~1k people reached

  • 0 posts edited
  • 3 helpful flags
  • 8 votes cast
Jul
17
comment Is there a name for this data structure pattern consisting of a list of dictionaries each with one entry, consisting of an object?
@Vynce Not a stupid question, just misguided. A design pattern is a general solution to a common problem, where "common" is relative to all programmers and all programs, not just your experiences. Not every solution you see is a design pattern. Linked lists and hash tables predate the Design Patterns book by 40 years, see far more use than this data structure, yet are conspicuously absent. "Use it when it's right" is absolutely correct, same for every data structure. If you want to know when it's right to use this, then you asked the wrong question. As for the name, I'll concede.
Jul
15
comment Is there a name for this data structure pattern consisting of a list of dictionaries each with one entry, consisting of an object?
@Vynce It's neither a pattern nor an anti-pattern. Period. These terms do not apply to simple data structures. I have answered your question. Programmers sometimes use sub-optimal data structures reasons that aren't readily apparent, such as compatibility or familiarity. There's nothing inherently special about List<Map<String, Map<String, Object>>>.
Jul
15
comment Is there a name for this data structure pattern consisting of a list of dictionaries each with one entry, consisting of an object?
@Vynce There are countless programs that could consume this data structure. Is the ordering of the records in the array important? Impossible to tell. It could have been a list, a set, a bag, or something else in the original data, but JSON only has lists and maps. One program could have used a list, another could have used a set, and the JSON would look the same. Can the same ID show up in multiple records? Impossible to tell without documentation. If you've seen this structure before, then try examining the programs that use it for more concrete examples.
Feb
13
comment Possible way to make java class builder more abstract by using interface required keys
This might be better suited for Code Review.SE.
Oct
27
comment Should I hide certain HTTP status codes?
@Lawtonfogle Depends. 401 means "you might have access if you authenticate" and requires the WWW-Authenticate response header. 403 means "you don't have access, period."
Sep
4
comment Testing for Authentication loop holes / bugs
If securing your web application is 1%, I'd hate to see the other 99%.
Aug
22
comment What is the use of the prefix “for(;;);” in an Ajax response
Similar to this question on SO: stackoverflow.com/q/2669690/1102962
Aug
20
comment Finding a way to simplify complex queries on legacy application
@l0b0 Legacy code is simply code without unit tests.
Aug
18
comment How to test a random-generating feature in application?
If the randomness doesn't need to be extremely good, then any off-the-shelf or built-in RNG should work. Set it and forget it. If you need to unit test predictably, give it the same seed value so you get the same stream of numbers out. Other than that, you need to give us more information.