This post is about maintaining skills you learn.
Skills can be lost as well as gained depending on how much we use them.
For example, in the beginning of my OSCP certification I decided to do a Python course as supplemental learning in addition to the what was taught. (Exploit development, and crafting one or two custom tools for enumeration.) It did help a lot and I enjoyed working with the language tremendously.
After passing the certification and carrying on with normal day to day work, the skills I picked up begin to fade. I forgot basic things, mixing Python syntax with BASH’s. Now when I try and code something, I’m looking things up, referencing old code; not a good place to be in.
Find an excuse to use you skills in everyday tasks, or even give yourself exercises to do, I stumbled upon a website that suggests excellent fun projects to code. These included simple games and other tools used to do specific tasks.
Here are a few fun Python exercise examples I decided to play with, the first of which is below:
- Rock paper scissors
- Number guessing game high low.
- Password / passphrase generator
- Fast network Ping tool
Rock paper scissors project:
My version, it probably needs more work but the basic functionality is there. Forgive the horrible lack of syntax highlighting.
#!/usr/bin/python3 import random import sys #Defined for display loop. while choice=-1 game_choice = ['Rock', 'Paper', 'Scissors'] secure_random = random.SystemRandom() #Print list for display def display_choices(): pos=0 print('Select one of the options') while pos <= 2 : #for opt in choice : print (pos,game_choice[pos]) pos=pos+1 def compare_choices(c,u): paprock='\nPaper wraps Rock' scispap='\nScissors cut Paper' rockscis='\nRock blunts Scissors' lose='\n---------------You lose!-----------' win='\n~~~~~~~~~~~~~~~~You win!~~~~~~~~~~~~' if u == c : print ('\nIts a draw\n') if u == 'Rock' and c == 'Paper' : print(paprock,lose) elif u == 'Paper' and c == 'Scissors' : print(scispap, lose) elif u == 'Scissors' and c == 'Rock' : print(rockscis, lose) #Winning section elif c == 'Scissors' and u == 'Rock' : print(rockscis,win) elif c == 'Paper' and u == 'Scissors' : print(scispap,win) elif c == 'Rock' and u == 'Paper' : print(paprock,win) while choice != 9: display_choices() ans=input('Choose an option (0,1,2 or 9 to exit): ') choice=int(ans) if choice == 9 : sys.exit() u_choice=game_choice[choice] c_choice=(secure_random.choice(game_choice)) compare_choices(c_choice,u_choice) print('\n')
Lots of improvements could be done, but it was a fun little project to do and I learned about ‘system.random()’ so it was a learning experience too.
I have a few idea’s of a tool I would like to code, so watch this space as it were. I would encourage anyone to try this and keep their skills sharp. I shall be coding the rest of the list later on and will do small posts with my versions of them. Feel free to comment on how bad my coding is or any tips for improvement!
Thanks for reading and have fun.