Date post: | 12-Apr-2017 |
Category: |
Engineering |
Upload: | amit-upadhyay |
View: | 250 times |
Download: | 1 times |
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
git basics
▶ commit often: once you have a minor piece working, commit
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
git basics
▶ look at your pull request not individual commits
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
git basics
do not have long lived branches▶ do not have changes for long, figure out if some partial work
can be merged▶ longer the branch, worse the programmer▶ create new branch from existing ones, new pull request etc▶ disable features▶ be creative: getting your changes merged is your job.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ self, then peer, then super
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ are there any hardcoded variables, that should be in settings?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is there any code that can be reused or made a utilityfunction?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ do all files meet style guideline?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is there unit test for main thing?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is the copy approved by product team?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ are human strings internationalized?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is there something clever being used? can anything besimplified?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ are we using new library? if so is it justified/approved?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is there any commented out code?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ is there any pending TODOs or FIXMEs?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ can any logging, print, debugging calls be reduced?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ are all user and api inputs validated?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code review
▶ are variable and functions name accurate, spelling, tense,grammar etc?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Editor
▶ quickly changing file if file name is known
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Editor
▶ quickly searching for file if content is known
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Editor
▶ quickly looking for some word in currently open file
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Editor
▶ intellisense navigation of file
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Editor
▶ learn keyboard macros (create & execute it)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Style rant
▶ imports must be ordered (django, system, ours,requirements.txt)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Asana rant
▶ everything you get a mail, add it to asana, on every mailfollow up, remind
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Asana rant
▶ look at your page and organize it
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Asana rant
▶ multiple projects for a task
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Asana rant
▶ refer other tasks as much as possible
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Asana rant
▶ what does asana and ack mean?
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ optimize for read**ability (written once, read 100 times)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ write comments first▶ delete comments afterwards if your english version and python
version are similar
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ early returns/continue etc▶ its ok to iterate some lists twice or thrice)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ no big try blocks (try must have single statement)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ say what you mean, code is written for humans first
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ dont be clever, dont rely on “happens to satisfy need”.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ reuse (ask if what you are writing if motor product logic orgeneric thing)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ understand what you are doings
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ cost of development vs optimization (is it good enough?)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ pay special attention to names. use spell checkers. mindgrammar.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ do not import from somewhere where it is not defined (unlessinit_.py)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ dont write generalised code. hate generics.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ move code around to see what looks better, would be easierto next guy
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ dont automate till have you have done it 3-4 times manually
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ do automate what you do 100s of times a day
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ ask if i can make this simpler before being done.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ multi line ifs are ok▶ multi line if must have or/and in front not end
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ multi line if must have or/and in front not end
if ((datetime.utcnow() -
transaction.updated_on.replace(tzinfo=None)).days> 0
or (hasattr(m,
'refresh_transaction_before_proposal')and m.refresh_transaction_before_proposal()
)):
refresh_transaction_details(transaction)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code Tips
▶ never do if not with else block
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ make your functions tall not wide
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Code tips
▶ delete variables once they are not being used
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ never write more than few lines in ipython/python shell, usefile
▶ all.py
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ mail tagging for productivity (to reply, waiting, discuss)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ make terminal, server and browser quickly switchable(milliseconds count)
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ uniformity is a good, boring is good, done is better, simple isperfection
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ use ssh config file
ControlMaster autoControlPath /Users/amitu/.ssh/tmp/%h_%p_%r
Host awsHost aws.coverfox.comUser ubuntuPort 333
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
Misc tips
▶ Work from home folks make it a point to attend the scrum