Engineering culture
-
Upload
pamela-fox -
Category
Technology
-
view
1.570 -
download
0
Transcript of Engineering culture
![Page 1: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/1.jpg)
Engineering CultureWhat is it? What makes it great?
Wednesday, October 9, 13
![Page 2: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/2.jpg)
What I learnt in college
artificial intelligence graphics
java data structures
algorithms
calculus
C++
databasesnetworking
how to write code
Wednesday, October 9, 13
![Page 3: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/3.jpg)
...What I didn’t learn
how to write code *for a company*
communicationcode reviews
conventions release process
testing
post mortems
documentation onboarding
Wednesday, October 9, 13
![Page 4: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/4.jpg)
Different goals
College Company
Prove that we understand a concept or
mastered a skill.
1. Create a product that makes users happy.2. Create a codebase that’s maintainable and not fragile.3. Be intellectually excited by what we’re working on.4. Do it with limited time and resources. As fast and lean as possible.
Wednesday, October 9, 13
![Page 5: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/5.jpg)
That’s a lot to achieve...
1. Create a product that makes users happy.
2. Create a codebase that’s maintainable and not fragile.
3. Be intellectually excited by what we’re working on.
4. Do it with limited time and resources. As fast and lean as possible.
And that’s why culture matters.Wednesday, October 9, 13
![Page 6: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/6.jpg)
Why should culture matter to you?
Wednesday, October 9, 13
![Page 7: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/7.jpg)
Are you about to enter the job market?
Don’t join a company just for their product. Join for their culture.
Wednesday, October 9, 13
![Page 8: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/8.jpg)
Are you a founding engineer?
You are shaping the culture for all the engineers that will come after you.
Make it a good one.
Wednesday, October 9, 13
![Page 9: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/9.jpg)
Are you in an established culture?
You still have the power to change the culture.
Nothing is set in stone.
Wednesday, October 9, 13
![Page 10: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/10.jpg)
My Experience
Wednesday, October 9, 13
![Page 11: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/11.jpg)
Joined when Google was X years old.
Spent 5 years in developer relations
Wednesday, October 9, 13
![Page 12: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/12.jpg)
Joined when Coursera was 5 months old.
1 year as Frontend Engineer
Wednesday, October 9, 13
![Page 13: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/13.jpg)
Joined when KA was 2 years old.
2 months (so far!) as engineer/educator.
Wednesday, October 9, 13
![Page 14: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/14.jpg)
What makes a culture?
Wednesday, October 9, 13
![Page 15: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/15.jpg)
The Engineering Lifecycle
Onboarding
Writing Code: * Understanding existing code * Planning your code * Writing consistent code * Testing your code * Improving your code * Releasing your code * Monitoring your code * Learning from bad code
while(1) { writeCode();}
Wednesday, October 9, 13
![Page 16: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/16.jpg)
Onboarding
Bad culture: Treats your first week as “initiation”.
Good culture: Values getting everyone over the beginners hump with as many resources as possible.
Wednesday, October 9, 13
![Page 17: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/17.jpg)
On-boardingMonday:Morning: - Talks: Overview, HR- Take Photos for Team Page
Lunch: Show & Tell
Afternoon:- Talk: Backend Architecture- Talk: Frontend Architecture- Talk: Code Review Process- Deploy first change together!- Meet your team
Tuesday:- Work on a small change- Deploy small change
Wednesday-Friday:- Pick first big project- Brainstorming meetings with designers- Begin working on it!
Wednesday, October 9, 13
![Page 18: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/18.jpg)
On-boarding
https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/-new-employees-onboard-doc/developer-setup
Self-paced on-boarding:
On-demand help:
Wednesday, October 9, 13
![Page 19: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/19.jpg)
Understanding the current code
Bad culture: Expects everyone to just “figure it out.”
Good culture: Values over-communication about what the code does, and why it does it that way.
Wednesday, October 9, 13
![Page 20: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/20.jpg)
Comments
• from github coursera
• some funny comments
# Deprecated - this is true if the problem was done while in# context-switching topic mode, which has since been removed from the site.# TODO(benkomalo): Remove when all references are deadtopic_mode = db.BooleanProperty(indexed=False, default=False)
def consume_optional_goog_info(self, goog_user): """Assigns user information from Google to this UserData. Does not call put() on this entity and expects callers to do so.
Args: goog_user An instance of google.appengine.api.users.User Returns: whether or not fields were consumed and this entity was modified """
import feature_flags.infection # sad circular dependency fix :(
"""Holds UserData, UniqueUsername, NicknameIndex
UserData: database entity holding information about a single registered userUniqueUsername: database entity of usernames that've been set on profile pagesNicknameIndex: database entity allowing search for users by their nicknames"""
module
function
TODOs + deprecation
Sadness
Wednesday, October 9, 13
![Page 21: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/21.jpg)
High-level Docs
http://blog.pamelafox.org/2013/07/rewriting-django-admin-in-backbone.htmlhttp://blog.pamelafox.org/2013/03/rewriting-our-forums-with-backbone.html
http://www.youtube.com/watch?v=hgZWMSDl0P8
Wednesday, October 9, 13
![Page 22: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/22.jpg)
Writing consistent code
Bad culture: Doesn’t care how the code is written, as long as it works.
Good culture: Values a codebase where the code looks the same and seems to all belong together.
Wednesday, October 9, 13
![Page 23: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/23.jpg)
• google conventions
• google readability
• khan wiki
• enforced via hinters, recommended settings
https://sites.google.com/a/khanacademy.org/forge/for-developers/styleguide
>> git commit Linting...LINT OKAY: No lint problems
Guides
Tools
+
Language Style
Wednesday, October 9, 13
![Page 24: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/24.jpg)
Design Style
• coursera: common UI libraries
•
http://khanacademy.org/style
Guides Re-usable CSS+// Typography@baseFontSize: 13px;@baseFontFamily: MuseoSans300, "Helvetica Neue", Helvetica, Arial, sans-serif;@baseLineHeight: 22px;@textColor: #444;@lightTextColor: #898989;@fontSizeTiny: 11px;@fontSizeSmall: 12px;@fontSizeNormal: 14px;@fontSizeMedium: 16px;@fontSizeLarge: 18px;@fontSizeExtraLarge: 24px;@fontSizeHuge: 36px;
// Buttons@primaryButtonBackground: #89b908;@primaryButtonBorder: #76a005;@buttonTextColor: lighten(@grayDark, 15%);@buttonBorderRadius: 3px;
Wednesday, October 9, 13
![Page 25: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/25.jpg)
Best Practices
http://blog.pamelafox.org/2013/07/a-guide-to-writing-backbone-apps-at.htmlhttp://blog.pamelafox.org/2013/08/javascript-ui-library-design.html
Architecture
Tools/Libraries
APIs
...and tons more.
Wednesday, October 9, 13
![Page 26: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/26.jpg)
Writing consistent code
Do you follow standard conventions for every language in their stack?
Do you have your own conventions for the frameworks you use?
Wednesday, October 9, 13
![Page 27: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/27.jpg)
Testing your codeTesting your code
Bad culture: Expects you to write “safe” code, that’s magically free of bugs because you’re all so smart.
Good culture: Realizes that tests are the key to a stable and maintainable codebase.
Wednesday, October 9, 13
![Page 28: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/28.jpg)
Backend: Python/Django unit tests
Testing Code
http://blog.pamelafox.org/2013/06/testing-backbone-frontends.html
Frontend: Mocha/Chai/JSDom
Integration: Selenium*
Manual: QA Process, Engineer, and Team
Automated tests CI
+
Wednesday, October 9, 13
![Page 29: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/29.jpg)
Testing CodeTest education
Test engineershttp://googletesting.blogspot.com/2007/01/introducing-testing-on-toilet.html
https://www.google.com/about/jobs/search/#!t=jo&jid=35182&
Wednesday, October 9, 13
![Page 30: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/30.jpg)
Testing your codeTesting your code
Are there any tests?
What kind of tests?
How often are the tests run?
Is there a testing requirement for new features?
Is there a testing engineer or testing team?
Wednesday, October 9, 13
![Page 31: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/31.jpg)
Improving your code
Bad culture: Gives you no feedback on your code or gives you non-constructive criticism on your code.
Good culture: Recognizes that code reviews are a great way for everyone to learn from each other.
Wednesday, October 9, 13
![Page 32: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/32.jpg)
Code Reviews
http://phabricator.org/
>> arc diff>> arc land --onto master
Tools
Wednesday, October 9, 13
![Page 33: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/33.jpg)
Code Reviews
https://sites.google.com/a/khanacademy.org/forge/for-developers/code-review-policy
+ Docs
Wednesday, October 9, 13
![Page 34: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/34.jpg)
Improving your code
Are code reviews a part of the engineering process?
Are code reviews *required*?
What tool do you use for code reviews?
Wednesday, October 9, 13
![Page 35: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/35.jpg)
Releasing your code
Bad culture: Makes it hard to release code early and often.
Good culture: Enables everyone to release their code with minimal time and pain.
Wednesday, October 9, 13
![Page 36: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/36.jpg)
Release Process
http://betacs.pro/blog/2013/07/06/wayland/
8 minutes to deploy2 minutes to rollback
Wednesday, October 9, 13
![Page 37: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/37.jpg)
Releasing your code
How often is code deployed?
How fast is the process?
How fast is the rollback?
Who's in charge of a deploy?
Wednesday, October 9, 13
![Page 38: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/38.jpg)
Monitoring your code
Bad culture: Releases code without paying attention to how it fares in the wild.
Good culture: Recognizes the value of logging, alerts, and user feedback mechanisms to ensure code validity.
Wednesday, October 9, 13
![Page 39: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/39.jpg)
MonitoringBackend
monitoring+
Alerts
Wednesday, October 9, 13
![Page 40: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/40.jpg)
Monitoring
Frontend monitoring
User feedback alerts
Wednesday, October 9, 13
![Page 41: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/41.jpg)
Monitoring your code
Are backend and frontend errors monitored?
Are there user feedback mechanisms?
Are there smart alerts set up?
Wednesday, October 9, 13
![Page 42: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/42.jpg)
Learning from bad code
Bad culture: Sweeps mistakes under the rug, refusing to acknowledge or learn from them, or blames them on a bad coder.
Good culture: Realizes that mistakes are an opportunity for the *whole team* to learn and improve.
Wednesday, October 9, 13
![Page 43: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/43.jpg)
Post-Mortems
• Timeline of events• What went wrong?• What went right?• What specific action items would prevent this from happening in the future?
https://groups.google.com/forum/#!topic/google-appengine/p2QKJ0OSLc8
Don’t blame. Learn.
Wednesday, October 9, 13
![Page 44: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/44.jpg)
Post-Mortems
• Coding bugs: “The Mass Unenrollment”
• Server faults: “The Overloaded Database”
• Security issues: “Cross-site-scripting in PHP”
• Process flaws: “The Class Recyling Project”
Wednesday, October 9, 13
![Page 45: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/45.jpg)
Learning from your code
When bad decisions are made in code, how does the the team learn from them?
Wednesday, October 9, 13
![Page 46: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/46.jpg)
Now what?
Learn from others
Share with your team
Experiment
Share with others
“Team Geek” by Fitzpatrick and Collins-Sussman http://blog.pamelafox.org/2013/07/what-to-look-for-in-software.html
http://www.joelonsoftware.com/articles/fog0000000043.html
Wednesday, October 9, 13
![Page 47: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/47.jpg)
The culture matters as much as the product.
Wednesday, October 9, 13
![Page 48: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/48.jpg)
THAR! Here be dragons!
Wednesday, October 9, 13
![Page 49: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/49.jpg)
Planning your code
Bad culture: Expects great code to emerge with no thought or collaboration.
Good culture: Values the process of planning code.
Wednesday, October 9, 13
![Page 50: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/50.jpg)
Design Docs
• google template?
• can happen in a jira discussion
Wednesday, October 9, 13
![Page 51: Engineering culture](https://reader033.fdocuments.net/reader033/viewer/2022052821/554925bfb4c9059f4c8ba798/html5/thumbnails/51.jpg)
Design Discussions
• whiteboard
Wednesday, October 9, 13