traits of a good engineer

22
Traits of a Good Engineer Talk given to SASTRA University Students by N.Rajagopal, Ametek Instruments India Ltd, 20-Aug-2011

Upload: rajagopal-nagarajan

Post on 23-Jan-2018

85 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Traits of a Good Engineer

Traits of a Good Engineer

Talk given to SASTRA University Students by

N.Rajagopal,Ametek Instruments India Ltd,20-Aug-2011

Page 2: Traits of a Good Engineer

Trait #1

Page 3: Traits of a Good Engineer

Trait #1: Curiosity

• Have curiosity of a small kid• Insatiable desire to know how things work• Have your own “feel” rather than going by

other’s views• Enjoy playing around with controls, options,

choices

Page 4: Traits of a Good Engineer

Trait #1: Curiosity

• You could be fixing a level 3 bug in a module. But that should not limit you to seeking beyond. You can ask following questions –▫ How does it get started?▫ Where are configuration files?▫ Which platforms does it work?▫ What tools are used? Why are those tools used and not something

else?▫ What happens if I pull that card out▫ And so on..

• Most of the time you have access to the source code, design documents, test plans, configuration files – take time to understand them

• Use your project as a vehicle to understand the big picture of the product you are working on

Page 5: Traits of a Good Engineer

What can go wrong with this code?

void foo (char *bar) { char c[12]; strcpy(c, bar);}

int main (int argc, char **argv) {

foo(argv[1]);}

Page 6: Traits of a Good Engineer

What can go wrong with this code?B. - "hello" is the first command line argument.

C. - "AAAAAAAA

AAAAAAAA

AAAA\x08\x35\xC0\x80" is the first command line

argument.

Page 7: Traits of a Good Engineer

Trait #2: How to break?

• Have an eye for details

• Look for boundary conditions

▫ In all aspects of engineering (design, coding, testing)

▫ Some examples: What happens when you run out memory,

file handles, records, and other resources?

▫ What happens if I run x instances of same program in a

server? Does it crash or just gets loaded?

▫ Do you handle the situations gracefully?

• An engineer should always know the limits of system

and how to test it

Page 8: Traits of a Good Engineer

Trait #2: How to break it?

• Have a “hacking” mindset

• Example: While there were so many raving reviews of iPhone, I found one review interesting

• It pointed out different issues in iPhone: ▫ Inability to change batteries,

▫ draining of batteries when using BlueTooth and WLAN,

▫ inability to use skype,

▫ cannot install 3rd party browser and so on

• Bingo, the person was an engineer and he has tried to “break” it in different ways and found all boundary conditions, issues!!

Page 9: Traits of a Good Engineer

Trait #3

Page 10: Traits of a Good Engineer

Trait #3: How to get going?

• Very few products are built in “grounds up development” mode now

• You could be joining a project that has 2 million lines of code and 5 years into production. You may be asked to fix a bug in a module.

• How do you proceed in such situations?▫ Use code browsing tools▫ Build, trace and learn control path

• Still not able to figure out? Then –▫ Check with colleagues ▫ Ask in communities, internal mailing lists, project space▫ Google, mailing lists ▫ Search for Howtos, Wikis▫ “Figure Out”!

Page 11: Traits of a Good Engineer

Trait #3: How to get going?

• Be comfortable with the fact that you will work on products with big, old source code bases without fully understanding it.

• Don’t expect someone to train you• Key to success is not to get intimidated by size.• Learn to zoom to right place, use right tools, ask right

questions and get going! It is a maze and be learn to be comfortable with that!

Page 12: Traits of a Good Engineer

What do you choose in these cases?

• You need to do code a mathematical function, say sine(x). There are two approaches –▫ You can create a lookup table with values for all the degrees

and get value from table▫ You can write a function that calculates the value from first

principles

• You need to store lots of persistent data in your application. There are two approaches▫ You can compress the data and store it to save disk space▫ You will store the data as it is as you cannot afford the time

involved in compression/decompression, but it needs much more storage

Page 13: Traits of a Good Engineer

Trait #4: How to make tradeoffs

• Tradeoff, n: (From Wikipedia)▫ A trade-off (or tradeoff) is a situation that involves losing

one quality or aspect of something in return for gaining another quality or aspect.

▫ It implies a decision to be made with full comprehension of both the upside and downside of a particular choice.

• Throughout your career, you will be pushed to look for tradeoffs in design, code and testing

• You need to understand contradictory requirements and come up with pragmatic tradeoffs▫ How much to test? (time to market vs quality of product)▫ Cost vs benefit;▫ Living with old architecture vs moving to new one

Page 14: Traits of a Good Engineer

Trait #4: How to make tradeoffs

• All resources are finite and it drives many tradeoff decisions

• There will be pulls between budget, time, features and quality.

• This is a delicate balancing act, you will do throughout your career.

• You need to define and adhere to acceptable levels in all these and get key stakeholders on board

• Best engineered solutions are a beautiful pieces of tradeoff between contradictory factors

• Making a right tradeoff is an art that you will learn over your career. It does not happen in one project. Learn by observing experienced people!

Page 15: Traits of a Good Engineer

Trait #5: Think long term

• You should not think that your product has short life span

• Your work could survive many years and be used across multiple product lines

• Cobol code written for IBM mainframes in 1970s are still taking care of some banking transactions now!

• CMC designed CRIS system for railway reservation in early 1990s. It supported 100 terminals. Today, same core is still running but supports internet booking, credit card gateways, SMS and web frontends, IVR and scales to millions of transactions!

Page 16: Traits of a Good Engineer

Trait #5: Think long term!

• BSE stock trading system was designed by TCS for a small load in 1980s. Today, load has soared multiple times but same core system runs with little changes, but on faster hardware and handling millions of transactions!

• Don’t design/architect in such a way that you are forced to throw it away after sometime and do a fresh engineering.

• Avoid kludges unless absolutely required• Remember each cycle of engineering takes time and

money!• A good design/code is a piece of art, will survive years

and is beautiful!

Page 17: Traits of a Good Engineer

Trait #6

Page 18: Traits of a Good Engineer

Trait #6:Never stop learning!

• The world of technology keeps changing continously• Software development framework keeps changing ▫ 1st generation: Mainframes, COBOL, batch processing▫ 2nd generation: Mini computers▫ 3rd generation: PCs, client server, network computing▫ 4th generation: web applications▫ 5th generation: Web 2.0, mobile apps and so on..

• Each cycle of change has made engineers to learn new frameworks, languages, environments, paradigms and adjust to them!

Page 19: Traits of a Good Engineer

Trait #6: Never stop learning!

• If you don’t adjust to new realities, you will become obsolete!

• Learn “Programming” and not “Languages”• You can survive only if you embrace change and keep

learning throughout your career!

Page 20: Traits of a Good Engineer

Trait #7: Pride!

• An engineer should pride himself/herself of his/her work

• Pride does not mean bragging or boasting• Pride means feeling good about what you have

achieved▫ Met tight performance requirements▫ Managed a big change without affecting existing design▫ Found an elegant workaround for this fix▫ Did a good tool in open source

• Like your work and enjoy the challenges it provides• This acts as a tonic to you and makes you to face

challenges!

Page 21: Traits of a Good Engineer

Questions?

Page 22: Traits of a Good Engineer

Thank you for your time

[email protected]