Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7994761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:12:47+00:00 2026-06-04T14:12:47+00:00

Most of the blogs or tutorials or books have private methods at the bottom

  • 0

Most of the blogs or tutorials or books have private methods at the bottom of any class/module. Is this the best practice?

I find having private methods as and when necessary more convenient. For example:

public
def my_method
  # do something
  minion_method
end

private
def minion_method
  # do something
end

public
def next_method
end

This way I find the code more readable instead of scrolling up and down continuously which is very irritating.

Is there something terribly wrong in this approach? Is having private methods at the bottom not just a best practice and something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:12:48+00:00Added an answer on June 4, 2026 at 2:12 pm

    The best practice in my point of view is to go sequentially and declare your methods without keeping private in point of view.

    At the end, you can make make any method private by just adding: private :xmethod

    Example:

    class Example
     def xmethod
     end
    
     def ymethod
     end
    
     def zmethod 
     end
    
     private :xmethod, :zmethod
    
    end
    

    Does this justify your question?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In C following this article ( http://blogs.msdn.com/oldnewthing/archive/2006/12/21/1340571.aspx ), we have succesfully been able to
I have checked lots of tutorials on xml parsing in iOS .. but most
Just a quick questions, since most blogs and tutorials I found are about the
For instance, on most blogs you can click on an article and it will
I've seen mspec used with nunit on some blogs and discussions. In fact, most
It looks like this template tag works like a charm for most people: http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/
Most of the ASP.NET MVC paging solutions I have found by googling look like
I have started this support ticket project where users can create tickets and the
The most relevant question here on StackOverflow was this , which still doesn't answer
I know some of the tutorials for creating Xcode project templates, for example this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.