33
Ten Commandments Of A Software Engineer Sebastian Marek

Ten Commandments Of A Software Engineer

Embed Size (px)

DESCRIPTION

Software engineering is not an easy profession. You have to constantly learn new things to improve your coding skills and make sure you produce better and cleaner code over time. It's not difficult, but you have to be aware of a few basic principles. With them in mind you will feel a better engineer and will gain respect from your fellow engineers. And the Lord said: "Thou shall always remember to write unit tests - no matter the deadline. Remember to keep the build green. Thou shall commit often and with meaningful messages (...)"

Citation preview

Page 1: Ten Commandments Of A Software Engineer

Ten CommandmentsOf

A Software Engineer

Sebastian Marek

Page 2: Ten Commandments Of A Software Engineer

@proofek

• a Pole living in Sheffield• over 12 years in

development• Pascal, C++, PHP, perl,

python, Java• co-author of 2 PHP books • big fan of process

automation• TDD and CI• occasionally contributes to

open source projects• wants to be a knight

Page 3: Ten Commandments Of A Software Engineer
Page 4: Ten Commandments Of A Software Engineer

@proofek

Page 5: Ten Commandments Of A Software Engineer

Couple that works for me…

Page 6: Ten Commandments Of A Software Engineer

I. Thou shalt not disrupt the legacy system.

1st commandment

Page 7: Ten Commandments Of A Software Engineer

I. Thou shalt not disrupt the legacy system.

Problem:

• Obsolete technology• Business critical• Poorly documented• Change risk vs. costly maintenance

Page 8: Ten Commandments Of A Software Engineer

I. Thou shalt not disrupt the legacy system.

Solution:

• extract• blackbox• Hide behind well defined interface

Page 9: Ten Commandments Of A Software Engineer

II. Thou shalt not re-invent the wheel.

2nd commandment

Page 10: Ten Commandments Of A Software Engineer

II. Thou shalt not re-invent the wheel.

• Repeatable operations• In-house framework vs. open source

framework• Training and support costs

Page 11: Ten Commandments Of A Software Engineer

III. Thou shalt commit often and your messages shalt be

informative

3rd commandment

Page 12: Ten Commandments Of A Software Engineer

III. Thou shalt commit often and your messages shalt be …

• Right tool for the job• Commit frequency• Commit verbosity

Page 13: Ten Commandments Of A Software Engineer

commit 04f1f73b9ad9a2fa968cc3d16701c84f10965e66Author: Generic Guy <[email protected]>Date: Thu Nov 18 16:16:19 2010 +0000

Initial commit of the entire client application

commit 38b22c0b4ed15ddf003d6e1d7fb879349a867957Author: Other Stuff Guy <[email protected]>Date: Mon Nov 22 16:26:27 2010 +0000

Changes to cancel other code

commit 971704e40b00cbd5fde612ed5aeb96e174bc9d2aAuthor: Verbose Guy <[email protected]>Date: Tue Nov 23 16:30:16 2010 +0000

Expand on comment

Meaningless commit messages

Page 14: Ten Commandments Of A Software Engineer

commit af1e80d98c9d8b6fe40efd3eadc27a9d4b1a2420Author: Failed Codereview Guy <[email protected]>Date: Wed Nov 24 17:07:16 2010 +0000

Code review changes, rename file

commit a69657b2045f1105cc940b67bab4b80b0e07ebe9Author: Did Tests Guy <[email protected]>Date: Tue Mar 22 15:29:03 2011 +0000

Unit tests to prove the fix

commit 971704e40b00cbd5fde612ed5aeb96e174bc9d2aAuthor: Fixed Guy <[email protected]>Date: Tue Nov 23 16:30:16 2010 +0000

Fixed

Useless commit messages

Page 15: Ten Commandments Of A Software Engineer

commit af1e80d98c9d8b6fe40efd3eadc27a9d4b1a2420Author: ProperComment Guy <[email protected]>Date: Wed Nov 24 17:07:16 2010 +0000

Fixed <TicketID>: Missing data in migration email

Added the extra variables in the email needed for a customer migrating from <a product>

commit 971704e40b00cbd5fde612ed5aeb96e174bc9d2aAuthor: ProperComment Guy <[email protected]>Date: Tue Nov 23 16:30:16 2010 +0000

Fixed <TicketID>: Scheduled changes cancelled without cancelling engineering appointment

Do not let scheduled changes to be cancelled without calling in, as there is an appointment that needs to be cancelled

Informative commit messages

Page 16: Ten Commandments Of A Software Engineer

IV. Thou shalt document early and while thy mind is fresh

4th commandment

Page 17: Ten Commandments Of A Software Engineer

IV. Thou shalt document early and while thy mind is fresh

• Document from the beginning of the project• Developer documentation– Automated documentation– Real world examples– Hints and tips

• End user documentation– Internal– external

Page 18: Ten Commandments Of A Software Engineer

V. Fear not the Priests of Quality Assurance nor the Altar of Testability, though they be

stained with the blood of thy brethren; for they are the

Salvation of the Righteous, and the Servants of our Lord, the

Customer.

5th commandment

Page 19: Ten Commandments Of A Software Engineer

V. Fear not the Priests of Quality Assurance nor the Altar of …

• Manual testing vs. automated• Unit tests• Functional tests• Frequent and early integration• Setup CI server• Fix bugs ASAP• Take ownership

Page 20: Ten Commandments Of A Software Engineer

VI. Designeth not for complexity, but for simplicity; and wherever the Beast named Complex shall

rear its ugly head, smiteth it with thy Sword named Modular, and let no Module be known by the

Name of the Beast.

6th commandment

Page 21: Ten Commandments Of A Software Engineer

VI. Designeth not for complexity, but for simplicity; and wherever…

• The curse of overengineering• Convention over configuration design

paradigm• Complex problems are best solved using

simple solutions.

Page 22: Ten Commandments Of A Software Engineer

VI. Designeth not for complexity, but for simplicity; and wherever…

"Make everything as simple as possible, but not simpler”

Albert Einstein

Page 23: Ten Commandments Of A Software Engineer

VII. Thou shalt not kill (maintainability)

7th commandment

Page 24: Ten Commandments Of A Software Engineer

VII. Thou shalt not kill (maintainability)

• Coding standard that everybody follows• Keep your code under control– Size– Complexity

• Remove dead code

Page 25: Ten Commandments Of A Software Engineer

VIII. Thou shalt not repeat yourself

8th commandment

Page 26: Ten Commandments Of A Software Engineer

VIII. Thou shalt not repeat yourself (Copy)

8th commandment

Page 27: Ten Commandments Of A Software Engineer

VIII. Thou shalt not repeat yourself

• Copy/paste temptation• Clones mutations• Extract and reuse ASAP• Tools that support clone detection

Page 28: Ten Commandments Of A Software Engineer

IX. Thou shalt speak up early and often

9th commandment

Page 29: Ten Commandments Of A Software Engineer

IX. Thou shalt speak up early and often

• Effective communication within team– Trust– Weak and strong points

• Effective communication within business– Communications channels– Open and honest– Provide options

• No decisions vs. bad decisions

Page 30: Ten Commandments Of A Software Engineer

X. Thou shalt recognize and retain your top talent.

10th commandment

Page 31: Ten Commandments Of A Software Engineer

X. Thou shalt recognize and retain your top talent.

• Non fungible people• Experience + talent• Retention policy• “Hit by a bus” vs. “Upset and unhappy”• People gardening – fertilizers vs. weed control

Page 32: Ten Commandments Of A Software Engineer

Thanks to:

Pictures• http://www.flickr.com/photos/biscuitsmlp/3439419556/in/photostream/• http://orangeroom.deviantart.com/#/d4rsmkf• http://www.flickr.com/photos/imnotquitejack/4099186535/

Further reading• The Ten Commanndments of Software Engineering - http://bit.ly/IgHZTu• The Ten Commandments of Software Quality - http://bit.ly/yJfatp• The Ten Commandments of Egoless Programming - http://bit.ly/atT1F9

Big thanks

Page 33: Ten Commandments Of A Software Engineer

Questions?

https://joind.in/6290

Q&A