7,846 reputation
72944
bio website zopatista.com
location Cambridge, United Kingdom
age 41
visits member for 2 years, 8 months
seen 4 hours ago

Invisible framework coding ninja


Jan
17
comment How do I debug a python multiple-sentence generator?
And why did you post this here? You have a practical programming problem, off-topic for Programmers. You have an account on the site where this would have been on-topic (but take into account there are duplicates there).
Jan
17
comment How do I debug a python multiple-sentence generator?
nouns and verbs are not lists. They both are one string, and you are picking a random character, not a word. Your getRandomWord() function is generic, why repeat it 3 times? And yes, your functions are executed just once. You need to call them inside the loop, not outside, if you expect them to produce new values each time.
Jan
14
comment In ASP.NET MVC, should the view models have an ID?
This directly contradicts the other answer though, without addressing why you should have an id anyway.
Jan
12
comment When writing object-oriented code, should I always be following a design pattern?
That article was written just yesterday; are you affiliated with the blog at all? If so, please do disclose that affiliation.
Jan
8
comment 'import module' vs. 'from module import function'
Note that I directly address that difference in my answer; there will be a difference between using import sys then using sys.argv thousands of time in a loop vs. from sys import argv then using just argv. But you don't. For things you do just once at the global level of your module, you really should optimise for readability, not microscopic differences in timings.
Jan
8
comment 'import module' vs. 'from module import function'
You are adding in an attribute lookup. To compare import module with from module import name correctly, add that name lookup to the import module case. E.g. add the line sys.argv to the ar test, etc. There will still be a difference, because the work done is slightly different, as different bytecode is generated and different codepaths are executed.
Jan
5
comment How to put a .py file on a web host and use it in the command prompt?
en.wikipedia.org/wiki/Revision_control
Jan
5
comment How to put a .py file on a web host and use it in the command prompt?
@ollymahoshi: Use a version control system and set up a nightly or hourly script to update your local copy of the repository.
Jan
5
comment How to put a .py file on a web host and use it in the command prompt?
No, Python does not have any facilities with executing a remote file from a URL. That would generally be a bad idea; how much do you trust that the remote code hasn't been altered to try and hack your system?
Jan
5
comment What is the difference between user stories and features?
This doesn't add anything new over the existing answers, and is mostly an anecdote, and no explanation is given for the 'rule'. Please don't add 'me too' answers if they don't add anything of value to answer the question asked.
Dec
22
comment What Are Some Advantages/Disadvantages of Using C over Assembly?
This is just mostly a reworded version of What Are Some Advantages/Disadvantages of Using C over Assembly?; you didn't add anything new to the discussion here.
Dec
13
comment In agile environment, how is bug tracking and iteration tracking consolidated.
Spammers go to crazy length, and even well-meaning developers can go all-out making sure they mention their pet project in every answer they post. That is something we want to avoid here. A simple disclaimer suffices in most cases. Moreover, generic answers that do not focus on how a specific product solves the problem are far more useful in the long run.
Dec
12
comment “Standard” format for using a timestamp as part of a filename
This doesn't add anything to the far more general discussion in the other posts, which actually touch upon aspects such as legal characters and sorting and uniqueness.
Dec
11
comment In agile environment, how is bug tracking and iteration tracking consolidated.
I notice you are hawking this tool on your blog as well; what is your relationship to Yodiz? Do you profit from sales of this product? Can you please review the help center on promotions?
Dec
11
comment Why do objects created with no assignment not generate a syntax error in Python?
print('Done') is also an expression. It even returns None (produces a value). Should it be a syntax error too? How can I distinguish that call from tuple(['some', 'list']), where tuple() is a type and produces an object? As far as Python syntax is concerned calling a type to produce an object and calling a function are the exact same thing, so you cannot distinguish function calls from other expressions.
Dec
5
comment Languages and frameworks to build REST services
It is the question that is problematic here, so this is not entirely your fault. But even so, lists of technologies do not make for helpful and useful answers on Programmers, and this question will likely be closed now that you drew attention to its existence again.
Dec
1
comment Should I use a class as a wrapper?
You are both inheriting and wrapping. If Acid is a kind of Compound, then inherit, not wrap. You don't need to copy things if you inherit; that is kind of the point of inheritance.
Nov
20
comment how python updates references to variables
Glad to have been of help! Feel free to accept my answer if you feel it was useful to you. :-)
Nov
19
comment Naming self or this something else, a good idea?
In Python: self is such an established convention, that I find using anything else extremely surprising. And what if the method interacts with other users? self is crystal clear, you are working on the current instance, the one the method is bound to.
Nov
11
comment Why is the Unix linker called “ld”
The other answer has added some interesting counters to this, including PDF links of 1971 UNIX man pages that use link editor, not link loader.