Recommended word order of names?

Viewed 477

From my perspective there can be (at least) two aproaches how to create a name for a variable, function, class etc.

  1. Structured:

    history_clear()
    history_save_to_file()
    cache_remove_entry()
    cache_find()
    browser_window_url_trim()
    
  2. Readable for humans:

    clear_history()
    save_history_to_file()
    remove_entry_from_cache()
    find_in_cache()
    check_for_updates()
    

What is the preferred word order? Is there any? I'm quite new to the programming but I'd like to acquire the good coding habits from the beginning. I've briefly read the PEP 8 Style Guide but I didn't find the answer there.

3 Answers
Related