Suggest a good method name for "running year" [closed] - ruby

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Please help to come with a nice name for a method. Actually it is a scope that defines limit on date. This limit is from today and 365 days to the past, to the same day in past basically. So this is kind of rolling year I would say.
This method is currently named #in_last_year. But I don't like it. It can be understand as if it is only returning the previous year, like if today is 2013 it would only return dates in 2012, but actually it can return yesterday or a day a week ago that happens in 2013.
It is used in a faking(seeding) tool. And the usage looks like:
Faker::Date.in_last_year
I came with names like "in_running_year", "in_ongoing_year". They seem ok for me, but maybe there are some known term for such entity, probably in finance world.

How about dates_to.same_day.next_year or dates_from.same_day.last_year
Then you can have modifier words like week, month, or decade, etc.

Related

What do you call this kind of design? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I don't know what to search for about this kind of design. I will use it on my app for the empty state, but I'm getting trouble searching. hope you can help me guys. Thank you :)
Well the design type is "minimalist" or "modern" I'd say. If you are looking for a specific file format or something I think you'd be looking for SVGs (Scalable Vector Graphics).
From trial and error, the best search queries are along the lines of "Abstract Minimalist" or "Contemporary Art". Agreed, it is difficult to express to a computer what image you are trying to find.

Retrieving people who +1 an URL [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've burning out the past 2 days trying to come with a recipe to get all the People who have +1 an URL, I'm trying to calculate the potential reach of a publication in Google+.
I did get the public shares of a URL using Ripple, amount and users, but is not the same.
I writing my app in ruby, but at this moment, I can't care less about the language.
To get clear view of my problem, please read my comment below.
There is no API method to get a list of who as +1'd a URL. If you would like to see such a feature please open a new issue.

Time difference compare to presence like Twitter in Ruby [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Is there a gem or another easy way to get time difference compare to present time like Twitter?
Of course I can write it myself, but I don't want to reinvent the wheel.
If you are using rails, you could do
distance_of_time_in_words_to_now #user.created_at
#=> "15 days"
or
time_ago_in_words #post.created_at
#=> "about 13 hours"

Following programming styles -- update poor adherence? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a project I am working on that is written in Python. The variable/class/function/everything names do not adhere to the Python style guide.
example: a variable might be called myRandomVariable instead of the proper: my_random_variable
My question is, is it worth combing through all the code (around 10,000 lines) to fix all the naming convention problems or should I just say, 'the heck with it -- it works'?
Thanks
Edited to give example
Just because there is a Python style guide, it does not mean that all Python code should adhere to it. The most important thing to consider in a code base is that it's consistent with itself, at LEAST on a per-file basis, preferably across the project!
I would vote for your second option. They are just styles. Everyone will have their own style. You don't need to be in compilance with defined styles to say your product is great.

What is a good resource to learn about Ruby's Time, Date and DateTime? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I've been trying to learn about Time, Date and DateTime in Ruby. Can someone recommend a good resource that teaches everything about Time, Date and DateTime in Ruby?
I think the best place where you can lear about Time, Date and DateTime classes in Ruby are: Apidock - Ruby and Ruby on Rails APIs
and Ruby on Rails API
Thats bacause theese classes are just small part of complex language - and everything you have to do - is to read language API to learn about special classes you need.
Some quick help about 'Date Time Format in RUBY'
http://snippets.dzone.com/posts/show/2255

Resources