#RubyOnRails - 23 April 2017
« Back 1 day Forward 1 day »
[01:01:32] beingjohnm: I have some reports that are taking way too long to load. Individually four or five seconds and the combined report is taking more than 30 which is causing a timeout on Heroku. I'm looking for ways to speed them up and the first thing I noticed is that an associated model is loaded over an over. (e.g. each user has one profile and the profile contains a lot of the business logic that ties everything together. But I see "select profile wh
[01:02:32] beingjohnm: If they were I gather I can use self.profile.method instead of user.profile.method to avoid loading the profile over and over
[01:04:14] havenwood: beingjohnm: Was there more to your first message after?: But I see "select profile wh...
[01:05:00] havenwood: beingjohnm: Make a gist with the relevant code and we can give better suggestions.
[01:05:24] beingjohnm: "select profile where user = x" over and over. But those queries show as CACHE (0.0ms). So I take it those are not actually contributing to the loading time
[01:07:00] beingjohnm: basically question is CACHE (0.0ms) mean there isn't a need to look at that as place to speed up
[01:09:59] beingjohnm: I have a couple ideas of places to look at that I think will help but wanted to know if self.profile.method would yield any speed improvement over user.profile.method
[01:50:43] havenwood: beingjohnm: The Bullet gem is helpful for finding N+1 issues and counter cache optimizations in dev: https://github.com/flyerhzm/bullet
[01:51:31] havenwood: beingjohnm: The Scout plugin on Heroku gives you interesting insights into queries.
[03:58:21] Technodrome: sure I know Radar , well just haven't had a job doing rails since a job I had in 2009, i feel like applying for a rails job is a waste of time
[04:01:15] Technodrome: that's not the issue Radar , so many people are applying, and its hard to stand out , like yeah I haven't used rails professionally since 2008
[04:01:41] Radar: Technodrome: So build some apps in a modern Rails stack and use that as a portfoilo?
[04:02:27] Technodrome: yes, I did this, a forum, and a url shortener , themed it, full design etc, the few employers didn't chomp it, one almost acted like i was trying to "trick" them
[04:03:03] Technodrome: 5-10 years ago, not at all, i had a rails job, and switched jobs whenever i wanted
[04:03:30] Technodrome: but you have literally just 40 people ready to hit an apply button because of all the hype around web dev, all those rails bootcamps etc, the market is getting worse
[04:04:35] Technodrome: I'm not complaining i'm just saying, the competition is very stiff, more than it ever has been
[04:06:02] Technodrome: i have applied to 7 rails positions, interviews, on site at a few, remote video for the others , i lost all of those, i almost got a new drupal job (oy vey)
[04:06:27] Technodrome: i worked for a drupal consulting firm for 5 years, so lots of experience there
[04:07:49] baweaver: Because places like Pivotal and Cerner are hiring pretty well anyone who can code.
[04:08:36] Technodrome: and then i found out, half of their programmers had eastern european names, so maybe hiring me in nyc was never their plan at all
[04:09:03] Technodrome: sure, i dont have an issue with that, i pretty much have a client facing role now, quite social
[04:09:35] Technodrome: another thing is, i dont have a github with any rails code, and thats everyones first question
[04:11:46] Technodrome: I have one with a bunch of drupal stuff, but having all that in there, almost seems like it will hurt me , so yes, a completely new account is best
[04:14:00] Technodrome: I should have just stuck with Ruby all this time, and not done so much Drupal
[04:14:01] baweaver: Trust me when I say though there are no shortages of Rails jobs, especially in SF
[04:14:34] baweaver: I decided to look for something new and I have 4 interviews already lined up within 2 days for Rails and Rails API jobs
[04:19:16] baweaver: You know what they expect, you know that networks help out more in finding jobs
[04:20:45] baweaver: Moreover I don't see the point of all this. If you already know what you're lacking, why aren't you working on exactly that?
[04:21:34] baweaver: Instead you've spend a good 20m complaining about things you well know how to fix. Catharsis or not, you've got to get moving if you want anything to change there.
[06:01:20] fschuindt: Is allowed to have two differents gems name one foo_bar and the other foo-bar?
[15:51:03] xco: hi. i’m reading this http://stackoverflow.com/questions/7200554/what-is-a-json-octet-and-why-are-two-required the 2nd guy who answered said he added `application/json` looks like that’s a solution to my problem but where do i add that `application/json`? any idea?
[19:09:55] ovaltine: is there a way to use the .joins(:something_polymorphic) syntax if I know the type I want to join on in this case
[21:33:50] KSloth: Hey, I’m quite new to RoR and development. I was wondering if someone could help me with a hopefully simple problem.
[21:34:38] amperry: anyone point me in the direction of a good testing reference? Something other than guides.rubyonrails.org, preferably.
[21:35:34] KSloth: I was wondering if someone could give me a hand with something I feel shoudl be fairly obvious. I’ve googled for an answer for a long time, but I feel like I’m too new to development and my termonology isn’t strong enough to find what I’m looking for… I’m working my way through the hartl tutorial, and I’ve completely messed up a section and I’m trying to wipe out my project so I can start fresh with it. I have a work
[21:35:35] KSloth: git, and through google I have found out that I can get back to my last commit with a reset, and I can clean my local files with a clean -f. The problem is that when I start the section of the tutorial again, one of the first steps is to generate a migration, then >rails db:migrate, which generates an error that there is a duplicate column. I think the database isn’t resetting so I’m just recreating the same columns again and ag
[21:36:43] amperry: KSloth: I don't know exactly what you're trying to do, but take a look at this: http://jacopretorius.net/2014/02/all-rails-db-rake-tasks-and-what-they-do.html
[21:38:10] amperry: but now that I see what you're saying, if you're talking abou the data in the db and not the schema, I think that might not help. Someone else might know better.
[21:40:38] KSloth: amperry: Thanks, for the link, that actually clears up some other questions I have. I am talking about the data unfortunately.
[21:41:05] KSloth: amperry: I’m also wondering if I were to delete all of my local files then download my git again if that would reset it..