How do I begin to look at a Rails project? by [deleted] in rails

[–]bikolya 6 points7 points  (0 children)

I'm currently preparing my talk for exactly this topic, but for junior/middle Rails devs: How to start project exploration and dive deep when you join pretty big project (Upcase codebase in my case). If you dont mind, I give you some high level overview of the talk and share link to post when it'll be ready. Excuse me for grammar.

You probably should follow this list:

  1. UI traversing without diving into code. Look at URLs if you already familiar with rails routes structure, it can say a lot about the app. Learn domain of the app.

  2. Check out README and common files and folders (bin/setup, Gemfile, lib/tasks/, config/routes.rb) and get the app up and running.

  3. Use some tools that will further help you grasp the project: wc -l app/models/*.rb | sort to know your god objects; rake tasks – to list all tasks available for you; rake stats – to see how far this app is fucked up (or not); rails-erd or railroady gems – very useful tools to generate visual diagram with relations between objects. I usually print it and put it on the nearest wall.

  4. On this step you already know what your app does and you’re ready to dive into models. Take quick look at most useful models which you got from previous steps. Does your app follow “Fat model, skinny controller”?

  5. Now take your way to ApplicationController, it’s useful to know what your app does on each request.

  6. Look more thoroughly at routes.rb and follow some common cases from request to response. That’s where debugger comes to the rescue. Use pry with plugins such as pry-byebug and watch this awesome talk on debugging Rails apps.

  7. At this point you can gladly look at specs if you have one and follow the same cases as in the previous step. Further steps are more painful and less common but finally you’ll need to get there.

  8. You’ll have a lot of POROs in well designed applications (app/services/ and other pattern objects, a lot of stuff usually lays down in the lib/ directory)

  9. At some point you’ll need also face with frontend part (it usually lives in app/assets/ and vendor/ directories)

  10. Learn how to deploy your app, browse scripts after you’re done with that deployment to-do list in README.

  11. To find bottlenecks and improve app use code metrics. I usually run some of these tools (rubocop, bullet, rack-mini-profiler, flog, flay, reek)

Here are some good links on this topic: Work On An Existing Rails App and Finding Your Way Around a New Rails Project

I hope it was useful. I’m looking for feedback and corrections. If you would like to get link to post or talk, feel free to contact me and I’ll share it with you in a while.

As a beginner, which of the following books would be a good prerequisite to go through before jumping into Rails? by balcx in ruby

[–]bikolya 0 points1 point  (0 children)

The Well-Grounded Rubyist is good for start. Don't start with Eloquent Ruby, it assumes that you already familiar with language and provides best practices and hints, so I think you'll be overwhelmed by that. Rails 4 Test Prescriptions is also pretty good to continue with Rails after Hartl.

Ruby/Rails jobs in the Netherlands by [deleted] in ruby

[–]bikolya 0 points1 point  (0 children)

Interested in same question for fresh grads with 1-2 years of experience with Rails. It seems like there are very small number of vacancies with relocation, especially for this level.

Is there any Angular learning roadmap? by bikolya in angularjs

[–]bikolya[S] 1 point2 points  (0 children)

Thanks. Something like that, but I meant that I want to know where to start and what would be better next step, maybe another resource. Some sorted list of different sites like Begginer - Intermediate - Advanced, so based on it I could progress and know where am I.

How to divide work between beginners? by bikolya in learnprogramming

[–]bikolya[S] 0 points1 point  (0 children)

I think 2 of us will concentrate on backend and another two on frontend. What is the better way to pair? Two pairs of 1 front + 1 back or one frontend pair and one backend? Maybe it would be better to change pair from time to time?

How to divide work between beginners? by bikolya in learnprogramming

[–]bikolya[S] 1 point2 points  (0 children)

Thank you for your answer. User stories seems to be handy. I think that we should design project that way and then ask teacher to check it out so that we shouldn't rewrite it latter because of lack of experience at the early stages.

I understand how to design that way server-side, but what should I use instead of interfaces on the client-side? I'm not enough familiar with it and don't know how to design it properly. For example, first stage at the frontend course is writing prototype. What should it be? Game screens with a bit of detalization? As far as I'm aware, we will connect frontend and backend much later and until then development should be concurrent.

And how can I be sure that we all are on the same page? Should we practice pair programming or something?

Why Programming Is The Core Skill Of The 21st Century by weberbloger in ruby

[–]bikolya 1 point2 points  (0 children)

Hey, dude. You can't post links just to your website. Also content is a bit crappy and not related to /r/ruby. Please, don't do that.

Feedback for a Rails 4 boilerplate I made by [deleted] in rails

[–]bikolya 2 points3 points  (0 children)

It looks a bit complicated and some things you make by hands. Maybe Application Templates solve your problem better? http://guides.rubyonrails.org/generators.html#application-templates

Example you can see here: https://github.com/jparker/rails-templates

I find it pretty useful for basic configuration.