CSS styling always seemed messy and cumbersome to me, and I mostly managed to avoid it with two simple tricks: changing the default font-family and using eye-catching background images. But for my final project, I wanted something better.
As students and job-hunters, we’re exhorted by our advisors to make industry contacts by going to meetups. Yet meetups can inspire terror in first-time attendees, especially students who may not yet feel confident in their technical abilities, or who aren’t natural extroverts. We can’t let our fears get in the way of such a valuable resource. We need to turn this around – literally.
Separation of concerns and the need for incremental testing makes JavaScript coding a slow-motion operation. In my previous Ruby on Rails project, I wrote discrete pieces of code in models, views and controllers. This time, I added a JavaScript front end to that app by refactoring a lot of functionality into one file.
Part of learning to code is learning how to make progress. In fact, you can think of it as taking two courses: software engineering, and personal project management. Personal project management – by which I mean managing your own time and focus as you try to accomplish anything – is hard for most of us. So you have to make a full, separate study of it to succeed. You can’t just read a blog post or watch a video; you need data to find out what works for you. Here are some suggestions as to how to gather and manage that data.
Rails ActiveRecord associations link two models together via a join table so we can program interactions between them with a minimum amount of code. The official RailsGuides image (shown below) that explains has_many :through
associations has three boxes: physicians, patients, and appointments. The Appointment model is the join table; it belongs_to :physician and belongs_to :patient. Join tables contain the ids of the tables they are joining, which are physician_id and patient_id in this example. Join tables may also have fields of their own, in this case appointment_date.