that's not my code!

Post on 07-May-2015

606 Views

Category:

Software

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Inheriting code is something we all have to deal with, and knowing what you're getting yourself into is a big part of that initial deep dive. Just like anything else, this is a skill that needs to be practiced and perfected over time. This session will walk through some strategies to use when looking at code you didn't write, finding problem spots, as well as share some personal experiences I've had when working with other people's code. You'll leave feeling confident about digging into your next codebase, and have some new tools in your pocket for dealing with the unexpected.

TRANSCRIPT

That’s not my code!@MicheleTitolo

Thursday, May 15, 14

Thursday, May 15, 14

Thursday, May 15, 14

Thursday, May 15, 14

Thursday, May 15, 14

Thursday, May 15, 14

The Art of Code

Thursday, May 15, 14

Purpose

Thursday, May 15, 14

What are you trying to solve?

Thursday, May 15, 14

Fixing a bug?

Thursday, May 15, 14

Adding a new feature?

Thursday, May 15, 14

Updating a web API?

Thursday, May 15, 14

This helps focus your search

Thursday, May 15, 14

First thing’s first.

Thursday, May 15, 14

Does it build?

Thursday, May 15, 14

No! Wait!

Thursday, May 15, 14

You can and will learn a lot before building

Thursday, May 15, 14

Meta Information

Thursday, May 15, 14

Who? What? When? Where?

Thursday, May 15, 14

Why? How?

Thursday, May 15, 14

Who? What? When? Where?

Thursday, May 15, 14

Who?

Thursday, May 15, 14

Source Control

Thursday, May 15, 14

git log

Thursday, May 15, 14

Or use a GUI

Thursday, May 15, 14

How many people?

Thursday, May 15, 14

Are all the commits by one user?

Thursday, May 15, 14

Are the commit messages useful?

Thursday, May 15, 14

Xcode File Headers

Thursday, May 15, 14

//// MRTViewController.m// Awesome App//// Created by Michele Titolo on 5/03/14.// Copyright (c) 2014 Awesome Co. All rights reserved.//

Thursday, May 15, 14

Find in Project

Thursday, May 15, 14

grep

Thursday, May 15, 14

Were the files mostly created by one person?

Thursday, May 15, 14

Were they created by 17 people?

Thursday, May 15, 14

Too many cooks in the kitchen

Thursday, May 15, 14

Common encounters

Thursday, May 15, 14

One shop, two shopred shop, blue shop

Thursday, May 15, 14

Bifurcated code

Thursday, May 15, 14

No source control?No names in headers?

Thursday, May 15, 14

This tells you about the client

Thursday, May 15, 14

What?

Thursday, May 15, 14

Use the app

Thursday, May 15, 14

There will be things you don’t understand until you use it.

Thursday, May 15, 14

Thursday, May 15, 14

Use the app

Thursday, May 15, 14

Ask questions

Thursday, May 15, 14

Identify edge cases

Thursday, May 15, 14

...because you will have to deal with them

Thursday, May 15, 14

Oh, and write all of this down

Thursday, May 15, 14

Future you will thank you

Thursday, May 15, 14

When?

Thursday, May 15, 14

What iOS version?

Thursday, May 15, 14

What version was it built for?

Thursday, May 15, 14

Updating iOS 4 apps is a PITA

Thursday, May 15, 14

Backwards compatibility?

Thursday, May 15, 14

Is it using new stuff?

Thursday, May 15, 14

How is it checking version?

Thursday, May 15, 14

The further back, the more fragile the code will be

Thursday, May 15, 14

Gaps in development?

Thursday, May 15, 14

If it went months untouched, why?

Thursday, May 15, 14

Years?

Thursday, May 15, 14

Technical Debt

Thursday, May 15, 14

Where?

Thursday, May 15, 14

Contractors? In-House? Shop?

Thursday, May 15, 14

In-house -> out-of-house

Thursday, May 15, 14

Contractors - who?

Thursday, May 15, 14

Dev Shops

Thursday, May 15, 14

Outsourced?

Thursday, May 15, 14

Not written by someone who’s native language is yours

Thursday, May 15, 14

i.e. “colour” vs “color”

Thursday, May 15, 14

iOS Experience?

Thursday, May 15, 14

Internationalization

Thursday, May 15, 14

What countries is the app available?

Thursday, May 15, 14

What languages are supported?

Thursday, May 15, 14

The Code

Thursday, May 15, 14

The fun part!

Thursday, May 15, 14

Why?

Thursday, May 15, 14

Who, What, When, Where

Thursday, May 15, 14

Just don’t jump to conclusions

Thursday, May 15, 14

How?

Thursday, May 15, 14

File Structure

Thursday, May 15, 14

Xcode vs HD

Thursday, May 15, 14

Images

Thursday, May 15, 14

Make a map of where everything is

Thursday, May 15, 14

Building

Thursday, May 15, 14

Does it compile?

Thursday, May 15, 14

...because it doesn’t always

Thursday, May 15, 14

Missing dependencies?

Thursday, May 15, 14

Weird build settings?

Thursday, May 15, 14

Warnings

Thursday, May 15, 14

Number

Thursday, May 15, 14

Severity

Thursday, May 15, 14

#warning

Thursday, May 15, 14

Comments

Thursday, May 15, 14

TODO, FIXME, ???, $#^@!

Thursday, May 15, 14

Documentation?

Thursday, May 15, 14

Headers

Thursday, May 15, 14

README

Thursday, May 15, 14

The .pch

Thursday, May 15, 14

Tests

Thursday, May 15, 14

Dependencies

Thursday, May 15, 14

Submodules

Thursday, May 15, 14

CocoaPods

Thursday, May 15, 14

???

Thursday, May 15, 14

The Art of Code

Thursday, May 15, 14

Who, What, Where, When, Why, How

Thursday, May 15, 14

Art takes time

Thursday, May 15, 14

Art takes patience

Thursday, May 15, 14

Code takes time

Thursday, May 15, 14

Code takes patience

Thursday, May 15, 14

Thanks!@MicheleTitolo

Thursday, May 15, 14

top related