To recall previous commands from the command history in bash, press ctrl-r.
You will be prompted as follows:
Start typing the first or first few characters of the previous command you want to repeat. Bash will search the command history backwards and display the first match. In your example, all you need to type is l and the prompt will display :
(reverse-i-search)`': ls programming
Then press enter to execute the command again.
If you want to learn more ways to use the command history in bash, open man bash or info bash and search for history.