Page 1 of 2 | Next »
[01:59:25] bazzy: it's great.. even in the moments when it *could* have expected me to remember something 3 chapters ago, it realizes that I need a refresher and that meant a lot
[02:00:47] bazzy: on thing I need reinforcement on is why we `redirect_to` for flash[:notice] but render for flash[:warning] 's
[07:05:13] bazzy: Radar, Listing 3.8 (Rails 4 in Action) is this a subtle plug for Sublime Text 3 or what?! xD
[07:09:38] bazzy: I'm really digging writing this first Capybara test .. it's inspiring me to write my own integration testing framework that "emulates GUI interaction" for applications written in SDL (I don't know if one exists already) ...
[07:10:25] bazzy: written *with* SDL I should say .. (It's a cross platform multimedia library in C)
[07:13:13] bazzy: I once had a potential client who ... along with some comrades, were drunk while they proposed a potential project I could execute .. They seemed completely closed to idea of user experience documentation ... I was pretty put-off by that ... I think a part of my dreams of approaching these people (they are friends after all) again after finishing this book and maybe closing a deal
[07:15:38] bazzy: these people kind of just expected to understand exactly what they wanted without explanation .. I honestly think I would have to "experience" their current infrastructure at work in full detail to be able to know exactly what to do without their direct guidance
[07:16:54] bazzy: Radar, is that another way of saying "I've practically proven the logic is sound" at that point in time?
[07:17:35] bazzy: sevenseacat, that's great to hear, because I imagine "junk formulas" coming my way hehehe
[07:18:48] bazzy: I'm really excited to be a Rails developer!~ Would you believe I'm (trying) to improve my C++ at the same time!
[07:23:53] bazzy: doing something every day! It was quite frustrating to me. I immediately accepted the notion that I would not be coding rails again until a real project fell into my lap .. and they are now!
[07:23:53] bazzy: I actually first got involved with Rails in 2008 but I was far too young to really grasp it .. It was for an internship with MITRE straight out of highschool... and then even after a year or 2 I would build projects such as something out of this book, and I quickly realized I had no real project in mind ... (or a company to give me one, but I didn't want that at the time (even now)) and was lost without one .. and back then, somehow had a new rails way of
[07:25:03] bazzy: and that somehow was accepted by me (even though I hadn't coded Ruby in 5 years). This time around, the language feels wonderful, probably both due to my maturity as a programmer and the advancement of the language
[07:25:03] bazzy: Seemingly from the heavens, I happened upon an IRC bot framework written in Ruby (Cinch),
[07:26:24] bazzy: after that, I wanted to share data between "her" and a website! and I figured why not Rails!~ have the whole thing in Ruby.. Easier to share models I though! I hope it's a good idea to stay in the same language in this way..
[07:32:01] bazzy: I'm tempted to investigate into it but I feel I should take smaller steps and really finish this book first and focus on rails, even if it may be slower
[07:33:25] bazzy: what memory usage.. I have preconviction that rails might be a hog.. (though feeling this way doesn't really help my effort to learn)
[07:34:29] bazzy: maybe not rails .. but perhaps ruby in general .. but I have no solid basis for my thought ..
[07:36:47] bazzy: lately I've been using Github issues actually as my Todo XD .. I actually enjoy it, wouldn't do it otherwise .. but I have a certain "higher-scope" that I need to tend to, and I have no real location to manage .. and honestly a text file doesn't "feel good" ..
[07:38:43] bazzy: I can't take that seriously without a lot more context, but don't waste your time ..
[08:09:05] bazzy: norc, accessing through the attr_accessor's sets up your use of the variable as an API.. so if you ever needed *more than an attr_accessor* functionality, you could implement the function yourself and add whatever other code to do what you need
[08:10:31] bazzy: remember, the attr_accessor also opens up your variable to be accessed *from outside*
[08:11:55] bazzy: in fact I believe that is its primary use.. the API thing could be considered an extra
[08:32:02] bazzy: there's no real benefit other than "I am already using an API style of accessing so I don't need to manually modify it later" AFAIK
[08:32:54] bazzy: if you were directly accessing the instance var's and wanted to have the API style access later you would need to modify all references to that instance variable to use the function..
[08:39:04] bazzy: Radar, would you mind verifying what I've said starting around 4:09 EST .. I'm wondering if I've missed the mark in any way? Thanks
[05:37:33] bazzy: if you created tests already .. and then you think "Ou .. I am going to change how my thingy works.. then you want to change your spec (tests) FIRST! before changing the code! it helps breath life into your idea and provides the new tests first so you can work on getting them to pass!
[05:47:58] bazzy: Are there any considerations to take when you maintain a codebase that lacks a testing framework, and you want to create one.. or an approach proven?
[06:43:11] bazzy: how come, for attr_accessor :var , you can read 'var' but you cannot do 'var =' you must do `self.var =` or `@var =`
[06:48:15] bazzy: `RSpec.describe Bacon` does Bacon actually need to be a constant in that declaration?
[07:04:37] bazzy: matchers and/or extension libraries that hide its use from examples." -- now i want an example of that!
[00:28:28] bazzy: need help on making it more idiomatic. Pay attention to calls to the Helper module from the end of the code (Hooks)
[02:24:36] bazzy: I am dealing with a plugin system.. where each plugin can access a hash called `config` .. I'd like to implement some kind of access layer that defines which keys are required to exist so that I can raise errors when they don't .. i only have that concept and was wondering if it would interest anyone to flesh it out .. I of course will be figuring it out too based on response
[02:25:53] bazzy: What I haven't figured out yet is if it's best to implement a new system which requires a redesign of this config hash accesses .. or if I can somehow "transparently" implement the layer
[02:26:33] bazzy: Considering that per plugin class definition, the list of required and optional config hash keys will change
[02:27:15] bazzy: The plugin config hash is based on a pre-existing framework .. I'm open to modifying it but preliminarily against it
[17:06:28] bazzy: well it's all based on asking the question how people play with ruby and their package manager...
[18:26:25] bazzy: Radar, when going thru Ch.1 of Rails4 in Action .. I found routing "resource" to quite vague
[18:44:51] bazzy: tubbo, is it permissable to consider that as a "CRUD" controller? and that controller may have other actions too?
[18:50:06] bazzy: I don't see how that has to do with "resources" but I think tubbo explained it already.. although I don't yet understand the full power of "resources" I see you can even attach parameters to their declaration for some purpose
[05:00:21] bazzy: I want to programatically add to a class definition from an instance of a closely related class
[05:00:49] bazzy: I want to be able to use its instance variables in the addition to the class definition
[05:01:51] bazzy: I tried using class_eval, but the local variable's meaning immediately disappears in the block
[05:03:33] bazzy: I fixed it .. it was a name clash .. (the class had a method or variable/accessor/etc of the same name)
[05:09:52] bazzy: you are just customizing what the  operator does.. but it's always after the name .. like with arrays
[05:12:07] bazzy: I'm a ruby n00b, this is my first time even acknowleding that ruby has operator overloading .. Look what i found, all the operators apparently that ruby can overload: http://stackoverflow.com/questions/3331962/list-of-ruby-operators-that-can-be-overridden-implemented
[20:56:05] bazzy: agent_white, what confuses me is it seems like people are putting the 'Referer' => "http://example.com" into where I have my params .. but doing that isn't solving my issue
[20:57:25] bazzy: I am testing a webhook that uses the http refer to create new data .. when I test from localhost, the referer is blank .. (using sinatra to receive the post requests) .. I'd like to spoof the referer so I can test locally, ideally without modifying the server code
[20:59:03] bazzy: well I look at request.referer (must be a sinatra wrapper) .. as stated it's blank when testing from localhost
[21:02:31] bazzy: it looks like I'm improperly passing the referer as params and not properly as a header
[21:02:55] bazzy: I'll try converting the GET request with header settings to a Post and see what happens .. although I'm not sure where to put my params in that example code
[21:03:05] bazzy: http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Setting+Headers
[21:04:18] bazzy: I already use post_form .. ^.^ but uh .. the context is way different from those examples for header-setting (new blocks and such)
[21:05:01] bazzy: post_form doesn't seem to take header parameters either :\ that's why I'm in this predicament
[21:06:35] bazzy: I think I'll take some time on my own to try to handle this.. Thanks for your help
[21:09:02] bazzy: ok .. converting the header example code from a Get to a POST. with the 'Referer' => 'http://example.com' got the referer variable to be set appropriately .. now I just need to find out how to get my params into the request
[21:11:31] bazzy: apeiros, I understand you now - you want me to look at the definition of post_form so I can use its impl code possibly -- least that's what I'm headed to do
[23:48:51] bazzy: I sometimes move a function into a separate module and have it as a module function .. this is just to organize the code .. is that behavior OK? I was also wondering if it matters using module self methods vs. class self methods for this purpose
[23:52:15] bazzy: oh no, there's a difference between functions and methods in Ruby.. heh (I come from C/CPP background) .. I think I meant methods, as in `def method_name`
[23:53:33] bazzy: I don't note a difference, but it's besides the point. No, in this particular case, I'm not referencing self, I'm only operating on the arguments and returning new data
[23:55:44] bazzy: this is my first time hearing of module_function .. my situation gets a little hairier.. let
[01:08:23] bazzy: well these aren't really questions as much as ... I need more information to understand the following:
[01:10:04] bazzy: feels like a nice book though .. I get excited the moment it went into my hands .. and the section on Testing was great.. really helped identify perfectly the bubbly words floating around (TDD BDD regression testing, etc.)
[02:40:56] bazzy: where can I learn more about the fields that can be specified in respond_to and html/json
[02:44:17] bazzy: I also found some reading benefit in the 1st response of http://stackoverflow.com/questions/9492362/rails-how-does-the-respond-to-block-work
[02:45:57] bazzy: Radar, I apologize in advance if I ask you any "obvious" questions that may be present by looking in the book's index (which I plan to do) .. I know the frustration of someone asking you something you've already documented .. although I'm not sure you ever feel that way
[02:48:36] bazzy: although if there is a resource you are confident in for RoR SSE I'd like to know about it
[02:51:56] bazzy: hm, maybe I should tell you why I'm interested in the first place .. I have a game "scoreboard" and I thought it would be cool for the client to update it whenever the backend got a scoreboard update .. I could do polling but something irks me about it .. or another long polling solution.. I don't know. What do you think?
[02:55:52] bazzy: Is that uncanny that you've never had to?? Seems quite common these days, or so I thought
[02:58:23] bazzy: I already have a "static" version .. actually brings me to my next question (for anyone at that)
[03:00:02] bazzy: I am actually using Redis .. and have a model that IS NOT related to ActiveRecord that uses Redis gem to work with the data ... Then I suddenly realized this will not allow the kind of "db migrations" workflow that would be really nice to have .. I'm curious if there's something out there to get Redis to play nice with that kind of thing...
[03:00:43] bazzy: On the other hand .. It might be time to switch to a more traditional database for this kind of data *shrug*
[03:03:01] bazzy: What else trips me up, is that I plan on using the model in both a pure Ruby project and a RoR project .. and I'm not knowledgable enough to know how to best maintain that sort of model..
[06:42:00] bazzy: is it generally better practice to use self.instance in class methods rather than @instance ???
[06:44:19] bazzy: I assume it's better because it allows the opportunity to "API" it rather than force it to be a variable..
[06:53:49] bazzy: if I have a class A with @instance ... and @instance.func exists... how do I represent @instance.func as a symbol from the scope of A's definition
[09:03:31] bazzy: more importantly.. even if someone documented it .. I think metaprogramming experience would help ease the pain