« first day (1010 days earlier)      last day (2245 days later) » 

03:13
@MuhammadYaseen That doesn't have anything to do with Ruby
 
3 hours later…
05:45
@thesecretmaster Thanks for the reply. Please find the link as jsfiddle.net/u4ugrwpo/2
 
3 hours later…
 
3 hours later…
11:34
@MuhammadYaseen I can't really help you, sorry.
12:37
I am currently using mailboxer gem
@meagar Hope you are doing fine.
@Cereal Hope you are doing fine.
Pretty good
Please find the link as jsfiddle.net/u4ugrwpo/4
@meagar I spend many hours but unable to fix it, if you could help me on this, are much appreciated.
This still has nothing to do with Ruby or Rails, please stop asking here
@meagar I am helpless as none of them from javascript group reply as always.
12:53
Well. entering unrelated rooms and bugging people for help on the weekend isn't going to win you any friends. Please stop it.
I already posted a question
because I am having problems
1
Q: Unknown key: :order in Mailboxer Gem

Ralf17I am currently trying to use the Mailboxer Gem. I have added the following line in my Gemfile: gem "mailboxer" In the konsole I did these: $ bundle install $ rails g mailboxer:install $ rake db:migrate $ rails g mailboxer:views and have added acts_as_messageable in my user.rb. However, I am...

 
2 hours later…
14:49
@Ralf17 I'm glad you got it figured out.
15:44
I've recently heard the term "agile development" a lot. Does anyone know any good resources to learn about what it is?
It's a fancy name for coding before you know what you'll be coding
That sounds useless. You can't really write code without knowing what the code is supposed to do.
still better than gathering requirements so long that you don't get to actually implement them
Agile is a collection of lightweight development processes that grew out of extreme programming (XP). XP, the first agile process, was created by Kent Beck and others as a reaction to the then common Waterfall process, a heavyweight process.
The idea is that you acknowledge the specs are always changing, so you code against what they might be
flexible code is always a plus
15:51
Agile still has specifications, but they are more often informal than formal, and most often are incomplete--they are enough to get started, but not enough to finish. The intent is that frequent communication between the business and the developers will be able to fill in the holes in the initial sketch.
Agile does this because complete specifications turn out to be very expensive, and often wrong. Only development can show the business that maybe the page doesn't work so well that way, or show the developers that maybe that technology doesn't work well. So take small steps with frequent course corrections and avoid dumping tons of time and money into specs that are going to change anyhow.
Oh, so it's basically some development practices you can follow to get flexible code?
No. Flexible code is not a part of agile.
Flexible code may be a result, a side-effect, or it may not be.
How can you end up with inflexible code in agile?
Agile is a set of practices that allow devs and business to communicate effectively.
@JanDvorak Because of YAGNI, you don't code for any more flexibility than you need right now.
but I need to cover the range of what the possible specs might be
15:56
No, you code for the spec in front of you right now. When the spec changes later, and the code needs more flexibility in order to achieve the changed spec, then you make it more flexible. Not before.
@WayneConrad So agile has nothing to do with actual development practices? It's just about communication and planning?
The agile process I like most--XP--has a great deal to do with actual development practices, but not a lot to say about the code itself. For example, refactoring is about the code. YAGNI is about the code, Much of the rest of XP isn't about the code itself.
Pair programming, for example, isn't about the code--it's about how devs communicate with each other when writing the code. Short iterations isn't about the code--it's about how devs and business communicate about what is being done.
Agile processes are more about communication than anything else.
Based on an in depth analysis of that incredibly complicated flow chat, I guess that agile might have something to do with communication.
Hehe. Oh, I forgot another practice that is very much about the code: TDD/BDD/etc.
I've heard about docs-driven development
16:04
So it seems like agile is not something that I could really take advantage of in my programming, because every project I work on, I do alone. And I already use TDD, which I'm still fairly bad at, but I'm improving.
If you're programming alone, you're most likely to be agile already
which one makes more sense.
the route is:

GET /users/:user_id/orders/:id/edit

user = User.find(params[:user_id])
OR
user = current_user
What's current_user?
If current_user = User.find(params[:user_id]), I would say user = current_user because you have to look at the AR query for a sec before you realize what it's fetching from the DB.
@thesecretmaster For solo programming, I'd focus on TDD as you do, then also YAGNI and refactoring.
16:14
@thesecretmaster good point
Use current_user, and make it a method included by the ApplicationController (assuming Rails). This is a common practice (devise does this, for example), so it won't surprise anybody.
@JanDvorak I do that, too :)
But, if you are doing current_user = User.find(params[:user_id]); user = current_user then I would just use user = User.find(params[:user_id]).
def current_user
  @current_user ||= User.find(params[:user_id])
end
Then you don't need a user = current_user. Just call current_user anywhere you need it.
How do you practice YAGNI?
on another note.. i really dont understand the hate against ruby in HN ..
[..]
I don't see a bright future for ruby, I think it had some lead advantage, but RoR/opinionated-design really cut down the options for innovation with a Ruby based web dev group. It is interesting to see how diametrically opposed philosophy of Ruby the language is from the RoR community, it is like Ruby created a liberal blank space and RoR immediately filled it with conservative inflexibility.
[..]
16:17
Wait, wait... something seems wrong about what I just typed. Please tell me what current_user means. I assumed it meant the currently logged in user, but looking at your code, I'm not sure.
@Nima For better and worse, Ruby and RoR seem to now be conjoined.
It's kinda funny that when I learned ruby, the first think I learned was Sinatra.
Seeing as Rails is so much more popular.
I don't think ruby is going anywhere anytime soon. It has a strong and welcoming community; It is also very easy to get started with.
I agree with you that Rails requires following conventions but then again which framework doesn't?
Rails is a mature framework and has been widely used in production. The reason why rails succeeds is because it allows you to deliver applications very quickly to market to meet the business needs.
Ruby's philosophy is move quickly and break things, I have no doubt ruby will stay relevant thanks to the community embracing change rapidly.
Yeah, but from what I know (and I know almost no rails), rails follows the philosophy convention over configuration, which means that you have many more conventions than in other frameworks like sinatra
right
17:32
@thesecretmaster You asked about YAGNI, and I missed it. When doing TDD/BDD, it means that you write no more code than is needed to pass the tests, then you refactor to make it clean, but not to add functionality (unless that is a side-effect of making the code clean) or plan for the future.
class C
 def inspect
  raise ArgumentError.new C.new
 end
end
C.new
# How does IRB manage not to crash in this case?
instead it reports an ArgumentError: #<C:0x0000000f12b6c8>
17:47
Hope all are doing well.
Please find the link as below;
I spend many hours but unable to fix it, if you could help me on this, are much appreciated.
I knew it is javascript, but I am helpless as nobody in the javascript room replied now and before.
And this is required for my rails project.
You have already been told not to post this here...
@MuhammadYaseen As per the room rules "If nobody answers, please don't repeat your request."
@thesecretmaster Thanks for the reply and kind information.Bye!!!
18:16
@JanDvorak I think IRB is rescuing Exception
18:41
Yeah, I'd guess that if inspect raises an exception it falls back to some internal implementation
Also @JanDvorak FYI, you don't need to instantiate your exceptions, you can just do raise ArgumentError, C.new
The bbatsov style guide says to prefer raise a, b over raise a.new(b) for reasons I'm unclear on: github.com/bbatsov/ruby-style-guide#exception-class-messages
19:23
The Ruby Rampage/Rails Rumble prizes have never been interesting to me
It's just a bunch of free "paid tier" accounts to services I don't want or use
Most of which offer free tiers that are just as good when starting out
I'd rather all that cash be invested in buying the winners a Macbook or something
 
2 hours later…
21:02
Out of last years winners, there is only one which really seems cool to me: gittens.r15.railsrumble.com/ohai
Sadly, the gitten for the so_ruby_chat repo is hibernating and starving.
 
1 hour later…
22:40
@meagar I did forget about that bit, thanks for reminding me. Perhaps it's recommended because it's there, or because the runtime has the theoretical ability to not actually instantiate the exception?
It works the same either way, I think. So it's a matter of style.
Advi wrote a book about exceptions in Ruby, it may have the answer. I have it somewhere.
raise ExceptionKlass, b is equivalent to to raise ExceptionKlass.exception(b); which is equivalent to raise ExceptionKlass.new(b).

« first day (1010 days earlier)      last day (2245 days later) »