Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
logical-fallacy
Nov 17, 2009
sudo make me a sandwich

Peristalsis posted:

I'm not sure what you're saying here.

Sorry, I didn't make that very clear.

Sublime's language definition for ERB is (essentially) a subclass of it's HTML language definition. The syntax highlighting rules for the HTML comments come from that definition, not the ERB language definition. If you try and create a HTML document and enter <!---- test comment --> you'll see the same syntax highlighting issue as in the .html.erb files.

Adbot
ADBOT LOVES YOU

KoRMaK
Jul 31, 2012



What is the difference and purpose of a database.yml.example file compared to a database.yml file?

logical-fallacy
Nov 17, 2009
sudo make me a sandwich

KoRMaK posted:

What is the difference and purpose of a database.yml.example file compared to a database.yml file?

Historically database.yml was typically not checked in to source control because it contained sensitive information (host/user/pass) that you didn't want everyone having access to. When deploying (to qa/staging/production/etc.) you'd copy or symlink a database.yml into the configuration directory so the app could start and connect to the database.

database.yml.sample was an example version of database.yml that was checked into source control with all of the environments and options necessary to configure the database for a development environment. You'd just copy the contents of that file into database.yml, fix the credentials so you could connect to your local test/development db, run the migrations and start the app. This savedyou from having to look up the YAML parameters expected by ActiveRecord and gave you some sensible defaults for the database adapter you're using.

EDIT - as good jovi mentions in the following post, now you can just check in your database.yml and populate the sensitive fields with environment variables, updated.

logical-fallacy fucked around with this message at 16:56 on Oct 8, 2015

good jovi
Dec 11, 2000

'm pro-dickgirl, and I VOTE!

These days you should really just be checking in a database.yml and managing any secrets or environment-specific config through environment variables (ie DATABASE_URL).

KoRMaK
Jul 31, 2012



good jovi posted:

These days you should really just be checking in a database.yml and managing any secrets or environment-specific config through environment variables (ie DATABASE_URL).

Yea thats what I did before I released the codebase to some people. I should probably just turn the rest of them into env variables I guess.

I just wasn't sure what to do with the example file, I thought maybe rails would auto use it but wasn't sure. So basically, I'm supposed to copy and paste it or symlink like logical-fallacy said.

Thanks guys!

Chilled Milk
Jun 22, 2003

No one here is alone,
satellites in every home

good jovi posted:

These days you should really just be checking in a database.yml and managing any secrets or environment-specific config through environment variables (ie DATABASE_URL).

Yeah I handle it like secrets.yml

Hard code in whatever insensitive information for development, then production embeds env vars.

kayakyakr
Feb 16, 2004

Kayak is true
While I appreciate Rails' native secrets inclusion now, I still prefer the implementation of the figaro gem.

logical-fallacy
Nov 17, 2009
sudo make me a sandwich

good jovi posted:

These days you should really just be checking in a database.yml and managing any secrets or environment-specific config through environment variables (ie DATABASE_URL).

This is definitely true. I need to get with the times, we're still using an old deployment strategy at work that badly needs updating.

necrotic
Aug 2, 2005
I owe my brother big time for this!
Using the environment for configuration is part of the 12-Factor App manifesto. We've finally moved every part of our config to the environment and its been great. We don't allow new config options with either a sane default or a fatal stop if the environment setting is missing.

Huzanko
Aug 4, 2015

by FactsAreUseless
Is it still possible to get an entry-level Rails gig? I have about 10 years of web development experience but no production Rails experience.

kayakyakr
Feb 16, 2004

Kayak is true

Noam Chomsky posted:

Is it still possible to get an entry-level Rails gig? I have about 10 years of web development experience but no production Rails experience.

Yeah, the jobs are still out there. You'll be in a weird situation because you might be taking a significant paycut. If you can show some rails projects, apply for any JR spot you see, someone will bite.

Huzanko
Aug 4, 2015

by FactsAreUseless

kayakyakr posted:

Yeah, the jobs are still out there. You'll be in a weird situation because you might be taking a significant paycut. If you can show some rails projects, apply for any JR spot you see, someone will bite.

Yeah that's one of the reasons I think it might be good for me to just dive into Node and leave Rails behind, despite how much I enjoy working with it.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Noam Chomsky posted:

Is it still possible to get an entry-level Rails gig? I have about 10 years of web development experience but no production Rails experience.

My company has some junior roles available in SF, Atlanta and Boston. We have a lot of rails, with some other languages pushing their way in for the performance oriented parts of are system. PM me if you want some details.

But if you're already a non-Junior doing other things its a guaranteed paycut (as kayakyakr said), though it may not be a big one if you have experience with web development in general.

Huzanko
Aug 4, 2015

by FactsAreUseless

necrotic posted:

My company has some junior roles available in SF, Atlanta and Boston. We have a lot of rails, with some other languages pushing their way in for the performance oriented parts of are system. PM me if you want some details.

But if you're already a non-Junior doing other things its a guaranteed paycut (as kayakyakr said), though it may not be a big one if you have experience with web development in general.

What do you think I'd be looking at in terms of a starting salary, not necessarily with your company but for junior rails devs in general? Also, is age an issue generally? I'm 32 and I've heard everyone in SV and SF is like 12.

Amish Ninja
Jul 2, 2006

It's called survival of the fittest. If you can't slam with the best, jam with the rest.

kayakyakr posted:

Yeah, the jobs are still out there. You'll be in a weird situation because you might be taking a significant paycut. If you can show some rails projects, apply for any JR spot you see, someone will bite.

I came from a long stint of web development in non-rails tech stacks (mainly PHP/LAMP), and my first rails gig was still a small raise. YMMV.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

If you are a web developer already don't apply for a junior position. I'd expect you to know some rails coming in, but if you have 10 years experience I am looking at you as at least mid level if not senior.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Noam Chomsky posted:

What do you think I'd be looking at in terms of a starting salary, not necessarily with your company but for junior rails devs in general? Also, is age an issue generally? I'm 32 and I've heard everyone in SV and SF is like 12.

Largely depends on location. In SF the median pay for junior rails engineers is around $75k I think. Atlanta is probably closer to $60k. With previous experience working on websites you could probably tack 5-10 on top of that, if not a bit more (depending on several factors).

EVGA Longoria posted:

If you are a web developer already don't apply for a junior position. I'd expect you to know some rails coming in, but if you have 10 years experience I am looking at you as at least mid level if not senior.

This is accurate. You'd probably be looking at a mid-level+ position even with minimal to no rails knowledge. I know we don't look specifically at Rails experience when evaluating candidates, its a minor plus if you have used it but we mostly care about "can you reason about code? what happens if you shove this in a high-traffic route?" type things.

Huzanko
Aug 4, 2015

by FactsAreUseless

necrotic posted:

Largely depends on location. In SF the median pay for junior rails engineers is around $75k I think. Atlanta is probably closer to $60k. With previous experience working on websites you could probably tack 5-10 on top of that, if not a bit more (depending on several factors).


This is accurate. You'd probably be looking at a mid-level+ position even with minimal to no rails knowledge. I know we don't look specifically at Rails experience when evaluating candidates, its a minor plus if you have used it but we mostly care about "can you reason about code? what happens if you shove this in a high-traffic route?" type things.

Good to know. Thanks!

One of my concerns is that I have, primarily, front-end experience - HTML5, CSS3, JavaScript and AngularJS mainly these days - with some server-side sprinkled in over the years. I'm trying to jump to full-stack, but I'm not going in completely blind as I do have experience with full-stack development but not in a professional context.

kayakyakr
Feb 16, 2004

Kayak is true

Noam Chomsky posted:

Good to know. Thanks!

One of my concerns is that I have, primarily, front-end experience - HTML5, CSS3, JavaScript and AngularJS mainly these days - with some server-side sprinkled in over the years. I'm trying to jump to full-stack, but I'm not going in completely blind as I do have experience with full-stack development but not in a professional context.

Oh, in that case, you're definitely OK for a mid-level or even "senior" level. I don't know what you're making now, so I can't tell you if it's an upgrade or significant downgrade in pay. Look for one that's more front-end oriented with some back end stuff. They're out there. Especially if you're already familiar with rails (even if it's only as a hobby).

Huzanko
Aug 4, 2015

by FactsAreUseless

kayakyakr posted:

Oh, in that case, you're definitely OK for a mid-level or even "senior" level. I don't know what you're making now, so I can't tell you if it's an upgrade or significant downgrade in pay. Look for one that's more front-end oriented with some back end stuff. They're out there. Especially if you're already familiar with rails (even if it's only as a hobby).

Cool, thanks for the info!

KoRMaK
Jul 31, 2012



EVGA Longoria posted:

If you are a web developer already don't apply for a junior position. I'd expect you to know some rails coming in, but if you have 10 years experience I am looking at you as at least mid level if not senior.

10+ years and the roof is senior?

kayakyakr
Feb 16, 2004

Kayak is true

KoRMaK posted:

10+ years and the roof is senior?

there's something more than senior?

KoRMaK
Jul 31, 2012



Lead?

kayakyakr
Feb 16, 2004

Kayak is true

From what I've seen, that's a synonym. Or a subclass. Or a demotion depending on how lovely your team is.

The idea being that any lead dev is going to be a senior dev, but not all senior devs will be lead devs.

KoRMaK
Jul 31, 2012



kayakyakr posted:

From what I've seen, that's a synonym. Or a subclass. Or a demotion depending on how lovely your team is.

The idea being that any lead dev is going to be a senior dev, but not all senior devs will be lead devs.

Right. I don't get the demotion part. But I would expect Lead to be the next level up from a sr. A lead is someone who is a sr and has started taking on project management stuff.

lead
/ \
sr sr
/ \ / \
jr jr jr jr


Right?

kayakyakr
Feb 16, 2004

Kayak is true

KoRMaK posted:

Right. I don't get the demotion part. But I would expect Lead to be the next level up from a sr. A lead is someone who is a sr and has started taking on project management stuff.

lead
/ \
sr sr
/ \ / \
jr jr jr jr


Right?

Yeah, but lead is not necessarily a promotion. If you're lead, you have to deal with all kinds of other bullshit dealing with team management. I mean, I guess you could say that senior architect would be the top guy since he's equal or above the lead dev, but not beholden to execs.

Anyway, what I'm trying to say is that you've got a few levels of programmer: entry, jr, mid, senior. And then there are a few positions that you can have: lead, architect, dba, server admin, etc.

Leads are usually senior, but don't make up another level of developer above senior.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

EVGA Longoria posted:

If you are a web developer already don't apply for a junior position. I'd expect you to know some rails coming in, but if you have 10 years experience I am looking at you as at least mid level if not senior.

I would have absolutely no issue hiring a senior developer who didn't have any ruby/rails experience.

kayakyakr
Feb 16, 2004

Kayak is true

MALE SHOEGAZE posted:

I would have absolutely no issue hiring a senior developer who didn't have any ruby/rails experience.

If they're already a senior web dev with some rails familiarity, if not experience, then yes.

If they're coming over from non web and non framework driven worlds, then no.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
That just seems silly to me. Picking up RoR takes a week. Getting "familiar" with it takes a couple days. You won't be a master of it but unless you're writing libraries, you really don't need to be. Why limit your hiring pool based on such a meaningless criteria?

Learning good programming and design practices is universal and much much harder to learn. That's far more valuable than the month or two it will take them to get up to speed with Rails. Hell, it will probably take them longer to learn your business domain.

kayakyakr
Feb 16, 2004

Kayak is true

MALE SHOEGAZE posted:

That just seems silly to me. Picking up RoR takes a week. Getting "familiar" with it takes a couple days. You won't be a master of it but unless you're writing libraries, you really don't need to be. Why limit your hiring pool based on such a meaningless criteria?

Learning good programming and design practices is universal and much much harder to learn. That's far more valuable than the month or two it will take them to get up to speed with Rails. Hell, it will probably take them longer to learn your business domain.

One of my partners is coming over from python script world. Never done front-end development. It's taken him a full year to get up anywhere near where I can actually trust him to develop a feature on his own. And even then, I usually have to rewrite it some because it's usually brute-forced.

And this is a really smart guy. He's got at least a masters from Rice, maybe a PHD, in an unrelated field.

So while I would hire a guy with no rails experience with the knowledge that I can train them up to use Rails (have done it multiple times), I wouldn't hire a guy with no web experience for a senior level role.

KoRMaK
Jul 31, 2012



kayakyakr posted:

One of my partners is coming over from python script world. Never done front-end development. It's taken him a full year to get up anywhere near where I can actually trust him to develop a feature on his own. And even then, I usually have to rewrite it some because it's usually brute-forced.

And this is a really smart guy. He's got at least a masters from Rice, maybe a PHD, in an unrelated field.

So while I would hire a guy with no rails experience with the knowledge that I can train them up to use Rails (have done it multiple times), I wouldn't hire a guy with no web experience for a senior level role.
Reaaally? Interesting, I would have gone the other way. What are some of the issues that they encounter?

kayakyakr
Feb 16, 2004

Kayak is true

KoRMaK posted:

Reaaally? Interesting, I would have gone the other way. What are some of the issues that they encounter?

Some of it is using language constructs to do things like looping and collecting, but he does OK with the Ruby stuff. He takes a bit of prompting when it comes to Rails features and knowing where all the models and controllers go, but he can mostly work in it. His biggest weakness is him having no idea where to start with HTML/JS/CSS. Even if he can copy/paste, it still doesn't come out right.

If it was an office environment with a big team and a little time, we would have been able to bring him along more quickly through some pair programming and in-depth training, but between it being a startup where I was working 60ish hours per week, and him working full time at a day job, we've gotten by with him handling text, some minor bug fixes, and things like that up until this summer when things finally started clicking.

My first idea was to set him loose in the test suite with a link to the rspec docs and a few "writing good tests" tutorials to have him learn by testing... After the first 2000 line test file he delivered, I decided that was a bad idea...

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

kayakyakr posted:

Some of it is using language constructs to do things like looping and collecting, but he does OK with the Ruby stuff. He takes a bit of prompting when it comes to Rails features and knowing where all the models and controllers go, but he can mostly work in it. His biggest weakness is him having no idea where to start with HTML/JS/CSS. Even if he can copy/paste, it still doesn't come out right.

Oh well yeah, I didn't say I would hire someone with no web experience as a senior dev. Just that I don't really care what framework/platform you're from.

If you're a senior dev, I also expect you to have a strong understanding of database/SoA/interacting with REST services/etc.

All of these things are more important than knowing ruby/rails particular take on the exact same concepts.

Huzanko
Aug 4, 2015

by FactsAreUseless
I just wanted to say thanks for the replies, guys!

You've given me a lot more confidence in the fact that continuing to work with RoR isn't a waste of time. Everywhere I look it's all about Node, and even as a hardcore JavaScript and AngularJS developer, I much prefer working with Ruby on Rails. Ruby is just an amazing language and Rails is an excellent framework that allows you to get things out of the door faster and lets you avoid doing really annoying poo poo you have to do in other stacks.

I've built some small apps with Rails - a small CMS and a few other things, and I've contributed a few bug fixes to some gems. So, I really didn't want to have to jump to Node because Rails was "dead" or it wasn't too hot in the job market, as I keep reading some places online.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

KoRMaK posted:

10+ years and the roof is senior?

At my current company, we do SE 1-3, Sr SE and then Architect. Lead is another path that replaces Senior/Architect. It makes sense to me, so that's how I'd think. At 10+ years, I would expect so one to be applying for one or the other explicitly.

no_funeral
Jul 4, 2004

why
If somebody were to set
code:
Time.zone = *new timezone*
in a controller action, would that persist outside the life of the request, as in, would that be the web app's new timzone? I've inherited some code thats doing this.

Smol
Jun 1, 2011

Stat rosa pristina nomine, nomina nuda tenemus.

no_funeral posted:

If somebody were to set
code:
Time.zone = *new timezone*
in a controller action, would that persist outside the life of the request, as in, would that be the web app's new timzone? I've inherited some code thats doing this.

In questions like these, it's best just to read the source.

Your app's behavior depends on a few things. If it cleans up the thread local variable (as it should), changing the time zone won't affect other threads. If it doesn't and your app server reuses threads, the new time zone will slowly propagate across all threads, and you probably don't want non-deterministic behavior like that.

Smol fucked around with this message at 01:54 on Nov 7, 2015

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Would also be fairly trivial to test

no_funeral
Jul 4, 2004

why

Smol posted:

In questions like these, it's best just to read the source.

Your app's behavior depends on a few things. If it cleans up the thread local variable (as it should), changing the time zone won't affect other threads. If it doesn't and your app server reuses threads, the new time zone will slowly propagate across all threads, and you probably don't want non-deterministic behavior like that.

thanks!

MALE SHOEGAZE posted:

Would also be fairly trivial to test

i'm mostly worried about the production environment, which is a unicorn server. since unicorn is process based, i don't think it will be an issue?

i agree it wouldn't be tough to test, but i'm not really supposed to mess with the production environment while an 'event' (the purpose of the app) is happening, which there currently is.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

no_funeral posted:

thanks!


i'm mostly worried about the production environment, which is a unicorn server. since unicorn is process based, i don't think it will be an issue?

i agree it wouldn't be tough to test, but i'm not really supposed to mess with the production environment while an 'event' (the purpose of the app) is happening, which there currently is.

Oh yeah you need to start complaining about how you don't have at least a QA environment running unicorn to test in.

Or better yet, build an environment yourself and score some points.

But yeah, if you're running unicorn you ought to be fine. This wouldn't happen to be a music related company, would it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply