|
noskill posted:So it seems like they apologized for not communicating how things work, but there's no mention whether or not their "new" routing is going to be changed. Which probably means that it won't.
|
# ? Feb 15, 2013 22:15 |
|
|
# ? May 9, 2024 10:43 |
|
Lexicon posted:In Ruby, python, and other environments, I've tended to raise a NotImplementedError within methods that are intended to be implemented by descendant classes. Going by Stack Overflow, etc, this seems to be a common pattern, yet yesterday I happened to look at the documentation for that class and it seems like a flat-out inappropriate usage based on their description: http://www.ruby-doc.org/core-1.9.3/NotImplementedError.html Why not just document the required methods and maybe provide a linting test that checks? If you don't actually define the methods it'll raise the right error without any work from you.
|
# ? Feb 15, 2013 22:52 |
|
Cock Democracy posted:I'd say he mentioned it. He said they "commit to resolving this issue" and that they'll be posting an in-depth review, which I'd be interested in reading. Like I said, don't get me wrong -- I sure hope that they can come out of this, probably even in a better shape than they were. I'm very interested in seeing what they have to say from technical perspective and I sure hope this is not just
|
# ? Feb 15, 2013 23:14 |
|
Cocoa Crispies posted:Why not just document the required methods and maybe provide a linting test that checks? If you don't actually define the methods it'll raise the right error without any work from you. True. I've just always liked having the pattern of explicitly defined methods that raise in the superclass. Makes it very clear what you need to implement in the descendant.
|
# ? Feb 17, 2013 15:09 |
|
Cocoa Crispies posted:Why not just document the required methods and maybe provide a linting test that checks? If you don't actually define the methods it'll raise the right error without any work from you. First, a NotImplementedError conveys the intent better than a NoMethodError. Second, it doesn't rely on external tools the other party might not have or might not run. It's an easy way to prevent miscommunication, so there is no reason not to do it. E: Here's Heroku's response to routinggate.
|
# ? Feb 17, 2013 16:47 |
Smol posted:
Purple diagrams! Yes!
|
|
# ? Feb 17, 2013 18:50 |
|
Maybe I'm reading into this incorrectly but does the cedar stack use intelligent routing instead of random? Also, as someone who spent the last year digging into rails 3.x is the focus in 4.x now multi threaded apps? It seems to be that way with the introduction of live streaming & thread-safety enabled by default.
|
# ? Feb 17, 2013 19:09 |
|
Smol posted:E: Here's Heroku's response to routinggate. Seems like what they're saying is that Unicorn on Cedar stack should perform better than Thin on Cedar stack. However I remember reading that Unicorn on Cedar is not exactly reliable and had some issues. Any input on that?
|
# ? Feb 17, 2013 19:14 |
|
I'm brand new to ruby as well as rails, so I'm going through the exercises over at code academy and messing around with some very basic rails apps. My question is, what's the best way to debug controllers (and to a lesser extent, views) when you're not trying to debug anything specifically? Just poking around seeing what the scaffolded code does, seeing what happens when you change x to z, etc. I tried installing ruby-debug, but apparently it "Can't handle 1.9.x yet". Am I pretty much stuck writing a bunch of logger.debug statements everywhere? I'm running ruby 1.9.3p385 and rails 3.2.12, if that makes a difference.
|
# ? Feb 23, 2013 05:37 |
|
Hefty posted:I'm brand new to ruby as well as rails, so I'm going through the exercises over at code academy and messing around with some very basic rails apps. You can use the debugger gem if you are just using a regular text editor. I have found IDEs like RubyMine to be pretty nice though at giving you a visual debugging environment when you are first starting out.
|
# ? Feb 23, 2013 06:43 |
|
Yep, I cant recommend Rubymine enough. Its text editor is no emacs, but the IDE features more than make up for it. The debugger, for example, is one of the best I've used. Anyway, for quick "what's the value of this variable" debugging, the easiest way is to probably add "raise foo.inspect" to you code.
|
# ? Feb 23, 2013 10:49 |
|
This is exactly what I was looking for. I use ReSharper in Visual Studio, but I guess I never really checked out their other products. Thanks, guys.
|
# ? Feb 23, 2013 11:27 |
|
MrDoDo posted:You can use the debugger gem if you are just using a regular text editor. I have found IDEs like RubyMine to be pretty nice though at giving you a visual debugging environment when you are first starting out. The Debugger gem supports remote connections for people less inclines to Kitchen Sink IDEs, which I've found super loving useful as of late. Somewhere in the boot process of your app (like inside 'config/environments/development.rb') toss this in code:
'ruby-debug' for 1.8.x also supports this exact same thing, FWIW. There's some very sparsely documented features around that, like the ability to pass in the host and port you bind to so you can run concurrent remote debugging sessions (for like a web worker and a job worker), or truly remote sessions. Thought I'd just throw this info out there. Doesn't seem like many people know about this. If anyone uses Pow, now you don't have any excuse for not debugging.
|
# ? Feb 23, 2013 23:56 |
|
^ That's cool, but why is it preferable over simply adding the debugger gem to your Gemfile, and then inserting `debugger` at the point of interest? I do this all the time, and it hits the break in the console I'm using to run either rails server or rails console.
|
# ? Feb 24, 2013 01:22 |
|
Smol posted:Yep, I cant recommend Rubymine enough. Its text editor is no emacs, but the IDE features more than make up for it. The debugger, for example, is one of the best I've used. In RubyMine can you do things like hover over variables to get their value at that point in time? That's about the only thing I miss from my old Visual Studio days - otherwise I'm totally in love with Sublime Text 2 (and it's vim editing mode).
|
# ? Feb 24, 2013 01:25 |
|
Lexicon posted:In RubyMine can you do things like hover over variables to get their value at that point in time? That's about the only thing I miss from my old Visual Studio days - otherwise I'm totally in love with Sublime Text 2 (and it's vim editing mode). You can see all the local scope variables in the debugger pane, which works just as well.
|
# ? Feb 24, 2013 02:00 |
|
Lexicon posted:^ That's cool, but why is it preferable over simply adding the debugger gem to your Gemfile, and then inserting `debugger` at the point of interest? I do this all the time, and it hits the break in the console I'm using to run either rails server or rails console. I work inside a very service-oriented architecture, which means a full integration test or manual walk through the UI requires 4 or 5 applications to be running at any one given time. Pow tries to solve this problem by allowing me to symlink my application root to a dot-folder in my home directory, and maintains a pseudo-DNS service to route any requests for "my_app.dev/" to the "my_app" symlink. I don't need to maintain 4 different terminal windows running "rails server", manually configuring differing localhost ports to not conflict. It might not be preferable over a simple "require 'debugger'; debugger; 0;" line wherever you need for simple standalone applications. I wasn't trying to imply that debugging through a remote console is a better practice of which everyone should switch to, but that it's a tool available for the situations where one might need it. The discussion of debugging came up, and I had coincidentally just recently showed several co-workers Pow and this feature when one was complaining about having to maintain multiple app's console windows at one time, and wished for a simpler solution.
|
# ? Feb 24, 2013 03:44 |
|
UxP posted:The Debugger gem supports remote connections for people less inclines to Kitchen Sink IDEs, which I've found super loving useful as of late. Somewhere in the boot process of your app (like inside 'config/environments/development.rb') toss this in This is cool thanks. I had a feeling there was probably a way to do it, but I haven't really done remote debugging outside of an IDE, so this makes it easy.
|
# ? Feb 24, 2013 07:44 |
|
Ruby 2.0 has been released, on the same day as Ruby's 20th birthday.
|
# ? Feb 24, 2013 10:54 |
|
xtal posted:Ruby 2.0 has been released, on the same day as Ruby's 20th birthday. Great news. Let's hope that we'll be celebrating Ruby 4.0 20 years from now.
|
# ? Feb 24, 2013 11:04 |
|
Coming from a complete newbie background, I'm learning ruby/rails and have a fairly solid grasp on making at least basic/intermediate rails apps and can make it through some rails tutorials to add features and such. The problem I noticed is I have primarily been reusing/modifying/adjusting code from online resources and past projects and so that when I tried to write my own methods to do something more complex than the standard routes I got stuck with writers block for a while. What are some good ways to get a more solid grasp on ruby functions/syntax and writing methods? Obviously a lot will come from practice (I haven't been doing this long), but at the moment am not sure where to go. I'm at a level where a "learn to program" resource is a bit too basic but most other books I have looked at seem too advanced.
|
# ? Feb 28, 2013 03:21 |
|
What worked for me was choosing a domain I found interesting and test-driving a library that modeled it. e: me rite gud Doc Hawkins fucked around with this message at 17:32 on Mar 1, 2013 |
# ? Mar 1, 2013 09:12 |
|
Aside: Rubyists weren't kidding when they said matz is nice. He is super nice!
|
# ? Mar 1, 2013 09:14 |
|
tef posted:Aside: Rubyists weren't kidding when they said matz is nice. He is super nice! Had dinner with him wednesday, and he noticed that I was out of water and filled it for me before I noticed I was out. Super nice. Pardot fucked around with this message at 16:38 on Mar 1, 2013 |
# ? Mar 1, 2013 10:07 |
|
Is there a way to stop pending migrations from being run when I do rake db:seed or a way to run my own .rb files using rake?
KoRMaK fucked around with this message at 17:46 on Mar 1, 2013 |
# ? Mar 1, 2013 17:12 |
|
Pardot posted:Had dinner with him wednesday, and he noticed that I was out of water and filled it for me before I noticed I was out. Super nice. Oh I forgot you were at waza, we should have had a goon meet™
|
# ? Mar 1, 2013 18:11 |
|
tef posted:Oh I forgot you were at waza, we should have had a goon meet™ I was making pourover coffee for attendees all morning in front of the main stage, so there is a small chance you had some
|
# ? Mar 1, 2013 18:15 |
|
Pardot posted:I was making pourover coffee for attendees all morning in front of the main stage, so there is a small chance you had some I drink tea, pip pip. If you saw someone trying to find @kennethreitz and playing with origami, that was me. (waza was awesome!)
|
# ? Mar 1, 2013 18:31 |
|
https://speakerdeck.com/alex/why-python-ruby-and-javascript-are-slow Wasn't at Waza so I didn't see the talk, but the slides are good. Hopefully they'll release some videos soon.
|
# ? Mar 1, 2013 19:10 |
|
Smol posted:https://speakerdeck.com/alex/why-python-ruby-and-javascript-are-slow I think I heard they'll be up in few weeks instead of like 8 months or whatever last time. I hope so at least cause I didn't really get to see any myself.
|
# ? Mar 1, 2013 19:20 |
|
Alright, I"m launching my first production rails application on monday, I want to make sure I have my security ducks in a line, here: w/r/t: https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/AFBKNY7VSH8, I'm running Running rails 3.2.12, all of my models use attr_accessible w/r/t: https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/RieVvnRGq8s I"m running JSON 1.7.7 w/r/t the YAML thing, as I said, I'm using rails 3.2.12 Am I missing anything? Is there anything else I should be aware of?
|
# ? Mar 1, 2013 20:44 |
|
chumpchous posted:Alright, I"m launching my first production rails application on monday, I want to make sure I have my security ducks in a line, here: Have a backup strategy for when you get attacked by an rear end in a top hat and a page at /security with a PGP public key and an address for when you get attacked by a non-rear end in a top hat.
|
# ? Mar 1, 2013 21:04 |
|
chumpchous posted:Alright, I"m launching my first production rails application on monday, I want to make sure I have my security ducks in a line, here: Here's a few security-related tools that are useful for every Rails developer. We run brakeman on our CI, it's very easy to set it up with Jenkins. Also be sure to subsribe to the rubyonrails-security Google group. http://brakemanscanner.org/ https://github.com/postmodern/bundler-audit Smol fucked around with this message at 12:47 on Mar 2, 2013 |
# ? Mar 1, 2013 21:35 |
|
Smol posted:Here's a few security-related tools that are useful for every Rails' developer. We run brakeman on our CI, it's very easy to set it up with Jenkins. Also be sure to subsribe to the rubyonrails-security Google group. Bundler audit is nice. Thanks! quote:Have a backup strategy for when you get attacked by an rear end in a top hat and a page at /security with a PGP public key and an address for when you get attacked by a non-rear end in a top hat.
|
# ? Mar 1, 2013 23:22 |
|
chumpchous posted:Is the purpose of the security page so that people can notify me of vulnerabilities? What's the purpose of including a PGP key? It's so that if they find a really bad vulnerability they can encrypt their email to prevent others from reading about it.
|
# ? Mar 2, 2013 13:46 |
|
Pardot posted:I was making pourover coffee for attendees all morning in front of the main stage, so there is a small chance you had some The tall guy making coffee?
|
# ? Mar 2, 2013 17:59 |
|
MrDoDo posted:The tall guy making coffee? No, I'm normal height.
|
# ? Mar 2, 2013 18:19 |
|
Would I get in trouble for killing another developer? Let's put code that was never QA'ed in production. There's a poo poo load of errors in our logs, which he must be ignoring. Server ran out of memory Friday, and did the same thing this morning. I killed that app until I could find the cause, racing against the processes as they creep up towards 3GB each. The culprite? @widgets = Widgets.all THERE ARE 2.3 MILLION ROWS IN THE WIDGETS TABLE
|
# ? Mar 4, 2013 16:37 |
|
Bob Morales posted:@widgets = Widgets.all All of the pushing untested code to production aside, maybe he thought it was lazy by default?
|
# ? Mar 4, 2013 18:54 |
|
|
# ? May 9, 2024 10:43 |
|
Bob Morales posted:
Gotta be careful with those scaffolded controllers
|
# ? Mar 4, 2013 21:07 |