Reputation
16,009
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
33 76
Newest
 Pundit
Impact
~779k people reached

Jul
16
comment Live search/filter as you type in client approach
This is screaming DAG to me. Don't have enough time for a thought out answer but hopefully Google can help you put together an idea.
Mar
19
comment Preferred way to expand a command line script to be used as a library in Python
setuptools is the canonical packaging method for Python applications. After having used it myself, I much prefer it to loose files with if __name__ == '__main__' handlers. For example: github.com/Demonware/jose/blob/master/setup.py#L63, github.com/Demonware/jose/blob/master/jose.py#L540. The first link demonstrates the entry points in a library that I wrote and the second shows the implementation. Note that argument parsing is still entirely valid within the callable.
Mar
19
comment Aggregate documentation comments from multiple scripts into README?
In my experience, Sphinx tends to be much more commonly used and can pull docs from docstrings as well using the autodoc feature (sphinx-doc.org/ext/autodoc.html).
Mar
19
comment Does sending system-profile information with HTTP GET request conform to RESTful practices?
"If the framework is useful and this is the way it provides profile information to the backend, the REST police aren't going to break down your door." +1.
Mar
19
comment Best way to analyse a large class before refactoring it into smaller classes?
Interesting, why the downvote?
Mar
18
comment Write two versions of class with two different super classes without violating DRY?
+1 for LSP, composition rather than inheritance.
Mar
18
comment Best way to analyse a large class before refactoring it into smaller classes?
@sydan: Are you able to mock the interaction with other classes? I know this is easier in some languages than others. If that's a no-go, perhaps system tests to get started?
Mar
18
comment Does sending system-profile information with HTTP GET request conform to RESTful practices?
@MikePartridge: Derp, typo. It's RFC 7231. Thanks for the catch.
Jul
24
comment Opposite term of indent
@RobvanderVeer: This conversation moved on nearly two years ago ;)
Mar
22
comment Python code style - blank lines in long list
@Izkata: Code should be self-documenting. In grouping them, it's more obvious from a code standpoint. You can also reorder trivially now (not that you'd need to in this particular context) based on reference rather than cut/pasting blocks of code. /Also/, if the accelerator list becomes long, segregating them /absolutely/ increases readability.
Mar
22
comment Python code style - blank lines in long list
@Izkata: How, exactly, is segregating various accelerators into logical groups increasing readability and increasing complexity?! Sure, using chain rather than simple concat is more complex, but I've stated reasons for doing so above (preferring + when called for).
Mar
22
comment Python code style - blank lines in long list
See my update. I wasn't thinking overly clearly when I originally answered.
Mar
22
comment Python code style - blank lines in long list
Would love to know the reason for the downvote :P
Mar
22
comment Python code style - blank lines in long list
No reason in particular as they achieve the same result. Using chain, you could do something like accelerators = [accel_file, accel_project, ...] and then feed it into chain(*accelerators). But yes, if you're not doing something like that, then simple concat using + would be the way to go (I was working with chain when I wrote the above ;))
Mar
22
comment Python code style - blank lines in long list
@ChrisKrycho: See edit. Really, it's just personal preference, but this makes the intention of each portion of your list easier to grok. It's /clear/ what is intended to go where (and therefore increases readability).
Mar
22
comment Python code style - blank lines in long list
@ChrisKrycho: Ah, in my un-caffeinated state, I didn't see fully what was going on. Rather than using a class, I'd still set a local reference to each logical block and then chain them to create the list being fed into AcceleratorTable.
Mar
19
comment Can PHP and Javascript do backend together?
node can run a pure tcp server just as easily as a web server. for all we know, the OP was interested in using a services architecture where the PHP portion simply communicated with a service backend written in node. in that case, you wouldn't need two web servers. also, unless i'm mistaken, i'm not aware of a node-based php interpreter.
Oct
10
comment Multithreading synchronization interview question: Find n words given m threads
@RobertHarvey: Sometimes people ask the wrong questions. The OP has a poor mindset to tackle technical interviews and this answer was an attempt to help put him/her on the right track.
Oct
9
comment What are graphs in laymen's terms
I'd actually extend that example to note that all entities described in your example could be depicted as vertices in a graph (city, plane, magazine, map, etc), the map itself just being a single vertex.
Aug
30
comment Python Coding standards vs. productivity
@MarkBooth: You can't please everyone. I agree that if it's simply imposed from above it's more difficult to get buy in from other members, but it's still not a "huge waste of time". In having the standards in place, the code should be much more consistent and therefore you would run into less diversity in code throughout a project, which increases readability. But yeah.. Throwing away tests due to standards would lead me to believe that there were bigger problems under the hood.