Ways to Keeping Track With 2491.7 Files π π»ππ₯΄ππ
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.
- Demonstrate: Option Click to Specify the Direction of Split.
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!
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!
π π βΌοΈ 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.
π»π π₯ β¦