Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(26)

Issue 4811051: paging code at item history moved under util

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by sinha
Modified:
13 years, 5 months ago
Reviewers:
Reimar Bauer
Visibility:
Public.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -26 lines) Patch
M MoinMoin/apps/frontend/views.py View 3 chunks +3 lines, -26 lines 1 comment Download
M MoinMoin/templates/history.html View 1 chunk +1 line, -0 lines 0 comments Download
M MoinMoin/util/__init__.py View 1 chunk +31 lines, -0 lines 2 comments Download

Messages

Total messages: 1
Reimar Bauer
13 years, 5 months ago (2011-07-24 20:59:37 UTC) #1
some findings

please don't ask me again for a better name than result.
Usually you have everything in the description of the method or you know the
name of the method.

result is a name in a generic method / function for explaining the method /
function itselfs. But in real world if you use such names you obfuscate what you
are doing.
Usually you should try to use the same name for what you are doing on all
places.
That helps much in understanding the functionality and is for later refactoring
also easier grepable.

http://codereview.appspot.com/4811051/diff/1/MoinMoin/apps/frontend/views.py
File MoinMoin/apps/frontend/views.py (right):

http://codereview.appspot.com/4811051/diff/1/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:595: result = util.getPageContent(history,
offset, results_per_page)
if it is selected_content please name it not result

result is much too generic and I don't like comment strings here explaining what
result it is. You described it as selected_content in getPageContent so you have
already a better name than result

http://codereview.appspot.com/4811051/diff/1/MoinMoin/util/__init__.py
File MoinMoin/util/__init__.py (right):

http://codereview.appspot.com/4811051/diff/1/MoinMoin/util/__init__.py#newcode86
MoinMoin/util/__init__.py:86: """ Selects the content to show on a single page
"""\n

please explain all parameters

http://codereview.appspot.com/4811051/diff/1/MoinMoin/util/__init__.py#newcod...
MoinMoin/util/__init__.py:106: 
remove empty lines
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b