Ways to Keeping Track With 2491.7 Files πŸ“š πŸ’»πŸ“‹πŸ₯΄πŸ“‘πŸ“š

Sam D.Boahen
5 min readSep 30, 2020

We went from just having run.rb, console.rb, and maybe 3 or 4 models in our code editors to, tables and a db folder, to now over 1000 folders and files (I stopped counting after 1026…)

This may be overwhelming until one learns of the core folders and files of interest: models, controller, views, routes, seeds and your schema (and README of-course πŸ˜‰).

Problem solved!

Until the fire nation attacks, again, and now you have 5–7 models, each with their own controller, and several corresponding views.

There is a lot of back and forward, and you likely get either one really messy screen, or a jumble of split editing screens. If you have a monitor with a large/wide screen, this may not seem like a huge issue, but if you are working on a tiny macbook-air screen (like me πŸ’»πŸ˜…πŸ‘) I have come up with some suggestions as to how to figure out a work flow.

Hey, some of these approaches might even help someone with a larger monitor strategies new workflows, or help with coding on the go, where you may not be able to lug around an extra giant monitor. πŸ™πŸ¬πŸŽ’πŸ˜·πŸ–₯πŸ›€

At this time, this blog will detail strategies for using Visual Studio Code(VS-Code), though some of these approaches may be scalable across other code editors.

Regardless of one’s preferred style, there are key files that you will be referencing regularly. Keep seeds, routes, less visited but important tabs to the side on a β€œSplit Right.” This can be done with an option-click or by dragging the tab manually.

  1. Demonstrate: Option Click to Specify the Direction of Split.
Manually Dragging Tab to Desired Location

Team Clear-Room/Desk-Clear-Mind πŸ“šβœ¨πŸ˜Šβœ¨πŸ’»

If you are not a fan of clutter, try to keep just two multitasks going at a time.

Work through Work through one Class’ Model, Controller and Views at a time.

Close what you are not working through when you’re done.

You can double click a file tab to enlarge it to the entire screen.

Team Clutter ✨πŸŒͺπŸ“‘πŸ‘€πŸ™„πŸ‘€πŸ™ƒπŸ‘€πŸŒͺπŸ“‘βœ¨

I feel like everyone knows that person that makes them think, β€œHow do you even function in this mess 🀨?” Some how they thrive. If you are that person, and don’t get a headache from a-bazillion tabs on one screen, this is for you! πŸ˜‰βœ¨

Keep Models and Controllers at the top and Views and ERB files at the bottom.

Put similar files side-by-side.

From your open editors view, you can move files around quickly to your desired screen, and even close out all groups!

Dragging Between Groups (1)
Dragging Between Groups (2)
Closing a Whole Group

The Multi-Screen-Hack πŸ’»βœ¨πŸ˜ 😲

So I noticed one day, VS-code can open an entire directory, and you can edit files and code across projects.

Light-bulb! That made me think, β€œHmm, since the MVC’s are in the app directory, can’t I technically open them from another window, and the changes should persist πŸ€”?” Spoiler alert, it does! (Also, for the record, I have auto-save on, so that helps with keeping all windows in sync.)

Leave the window which is one directory up with the helpful files which don’t change much: routes, seeds, schema, migrations.

If you get really wild and want each MVC to have their own window and screen, you can also do that!

Each Window With Its Own Folder (Server Running on One)

πŸ›‘ πŸ‘€ ‼️ DISCLAIMER ‼️ πŸ‘€ πŸ›‘

The β€œMulti-Screen-Hack” is πŸ‘‰NOTπŸ‘ˆ recommended for:

  • Code Challenges (**ESPECIALLY**)
  • Working in a Git-Flow

The β€œMulti-Screen-Hack” is recommended for:

  • A team with a driver and navigator(s)
  • Working on a large solo Rails Project

Find what works best for you!

But if you can… just get another monitor.

πŸ’»πŸ˜…πŸ–₯ …

--

--