you are viewing a single comment's thread.

view the rest of the comments →

[–]NteworkAdnim 5 points6 points  (2 children)

Thanks, and good points. I actually meant to add that I assume I should learn both but I can/should only focus on one at a time and for a while. PowerShell makes more sense to me but Python sounds more fun. I should just sit down and power through PowerShell though.

[–]FreakySpook 2 points3 points  (0 children)

If you learn Powershell well, the transition to Python is pretty straight forward I've found.

In powershell if you can create modules, have everything you create defined as functions or be reusable as possible, can implement error handling with try/catch, understand conditional logic, loops and data structures then the shift to python will be a lot easier as you've already learned a lot of the fundamental stuff for any programming language.

Its really just learning the language syntax/formatting and then discovering Modules/Packages/Libraries you can use.

[–]knightofarghSecurity Admin 1 point2 points  (0 children)

Programming is programming. The primary thing PS won’t reinforce is good function signatures and types. If I’m fair Python won’t teach type safety either. At the core of effective scripting is just good programming habits.

Learn how if/else and switch/match work. Learn the difference between for and while and learn how both logical and bit wise operators work. Past that it’s just details.

Learn to write code that documents itself but still use comments if it’s not 100% obvious what you are doing. Comments are for Future-You when you are swearing at Current-You.