Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Network Engineer as a coder

Network Engineer as a coder

There are few best practices we should follow while writing a script/code, example: as code reusability, not reinventing the wheel, selecting a write library for your use case etc.
In this session I will talk about my learnings from a network engineer to a python coder

Vivekanand

March 09, 2020
Tweet

Other Decks in Technology

Transcript

  1. Network Engineer as a coder By Vivekanand Vishwakarma [DRAFT] Note:

    This is a draft deck, will provide an updated (completed) deck shortly.
  2. Agenda • Introduction • Why a network engineer should code

    • How to become a good coder • Common Mistakes in coding • Some of the Use cases and My Key Learnings from recent project • Questions and Answers
  3. Networking by A Non-Network engineer

  4. def hello(name, msg = "Good morning!"): return "Hello",name + ',

    ' + msg if __name__ == '__main__': print(hello('Vivek', "Good afternoon!")) Code by a Non-Developer
  5. Networking by A Network engineer

  6. Code by a Developer def hello(name, msg = "Good morning!"):

    """ This function greets to the person with the provided message. If message is not provided, it defaults to "Good morning!" :param name & message :returns name & message """ return "Hello",name + ', ' + msg if __name__ == '__main__': print(hello('Vivek', "Good afternoon!"))
  7. Common Mistakes • Assumptions • Lack of proper requirement gathering

    • Lack of flowchart/Pseudo code • Jumping on Hands-on mode • Lack of knowledge about the other modules • Unknown infrastructure • Overcommit • Doesn’t follow any software architecture • Copying and pasting the code; unsure of what it does • Doesn’t follow the best practices • Doesn’t know exception error meanings • Naming Class/Method/Function as XYZ • Many more ….
  8. Use Cases [DRAFT]

  9. Key Learning • Don’t assume • Don’t code directly •

    Have proper workflow/Pseudo • Follow standards from beginning • Modularize your code • Meaningful Function and Class name • Comments and Docstrings • Error Handling • Logging • Security
  10. • Unit Tests -> Mocking • Python Path • DBAPI

    • Handling Different failure scenario/FMEA/Test Cases • Retry • GIT commit -> Always Local-Dev-Prod • Deployment -> Should know where to Deploy • Input and output of a function -> description params • Be ready for accommodating on fly changes- specifications are being changed on the fly Key Learning continue..
  11. Questions?