The rules: If you have to look stuff up or Google for it, you may post comments but not a solution. If you have a solution in your brain and can solve it without consulting authorities, post your solution.
You have a class like this and an example of its usage:
def initialize(x, y)
@x, @y = x, y
self.class.new(@x * value, @y * value)
v = Vector.new(3, 5)
puts v * 3
You would like to make the
#* method commutative, so that the following script
puts v * 3
puts 3 * v
Add one method to the Vector class to produce this result. The method body should have only one line.
I’ve used tools like ZenDesk and UserVoice to provide a means for users and customers to report bugs and make suggestions.
One thing that is very hard for busy professionals is to make clear how important something is.
Here’s my idea:
You report an issue. Example: “The font could be a bit bigger on the ‘notes’ page.”
After submitting, the reporter is given a list of issues and bugs that have been prioritized for resolution by the product manager or whoever is managing the ticketing tool.
Perhaps the list might look like this (in order of priority, highest to lowest):
1. Allow logins via Twitter.
2. Provide a means to change fonts in the ‘notes’ page.
3. Provide a means to forward a note to another user for pre-publication review.
Hmm, my issue? I’d put it after 2 and before 3.
This would provide the end user some perspective on all of the other things the product team is doing. In my experience, we get suggestions all the time. Are they that important? Frequently not. Additionally, sometimes we get a bug report that is truly important, but due to the passivity of the reporter, we may not know that it’s a blocker and should — in that user’s opinion and experience — come before everything else.
With this information, the product manager might slot it in after item 3 . . . or figure out how much work is needed to do it properly and get it prioritized.