Software Development Phase 2: Sinatra Web Application

Hunter Kolasa
3 min readJan 11, 2021

With a newly developed understanding of Ruby, I moved into Phase 2 of my software development course with cautious confidence. Though straightforward in concept, Sinatra, SQL and Active Record follow a very different logic base than Ruby and introduce complex associations only achievable through database manipulation. What started with simple CREATE TABLE commands quickly escalated to has_many/belongs_to associations that highlighted the mind-bogglingly useful nature of metaprogramming. What would typically be a complex set of methods referencing and connecting two or more tables through hard-coded, albeit easily traceable commands can be automatically integrated with one or two words. This proved exceptionally helpful after I began to understand the background processes but certainly had a much steeper learning curve than standard Ruby code.

The final project for Phase 2 was to build a Sinatra-based web application capable of storing a manipulating user inputs in a database. While the full project requirements contained a laundry list of specifications, the basic concepts included a Model-View-Controller(MVC) format with at least 2 models and Create-Read-Update-Destroy(CRUD) functionality. Unfortunately, the project week for this phase began immediately after a week long break for the holidays. I managed to follow the day-to-day lesson plan closely enough to retain a useable volume of information but found myself consistently plagued by upwards of 50 open Chrome tabs all containing different tutorials and mock projects. Thankfully enough, I have become much less sensitive to nonstop error troubleshooting since Phase 1 and managed to mitigate the head-smacking and wall-punching to a mere once or twice a day. That was, until my database migrations and .env session secrets began to irreversibly break my code. I naively hope to never again experience the pain of labelling an entire project as broken and having to re-clone my own Github commit with little understanding of what went wrong.

Despite all of my whining (above), I found it fascinating to see a functional website come together from scratch. The concept of defining GET and POST routes for specific database calls and form submissions, topped with hacker-esque password encryption and user security really underscored the flexibility of using multiple coding languages simultaneously and restored any coding confidence I lost over the break. What’s more, after building the back-end mechanisms to ensure correct website function, front-end HTML and CSS formatting was beyond satisfying. It felt less like icing on a cake, but more akin to painting, detailing and polishing the body of a finely tuned racecar built from scratch in your own garage. I feel proud of my work and thus want it to look just as good as it performs. Of course, there are at least twenty additional features I hope to add to the application and probably 100 bug-fixes and refactors for each of those features but I look forward to the challenge and cannot wait to see how far I can push myself to build a modern, capable, user-friendly website worthy of the first page of google search results.

These are the voyages of the beginner software developer. This is your Captain, signing off.

--

--

Hunter Kolasa

⁍ Full-Stack Software Developer ⁍ Biology/Environmental Conservationist ⁍ Avid Computer Nerd⁍