W5D2 - RailsLite & Assessment 4
Topics
Web Application Frameworks
Web Servers
HTTP Responses
HTTP Requests
Regex
Assessment 4 - Authentication / MVC Test
Projects
RailsLite - building the functionality of Rails from scratch
Developing a deep understanding of Rails & Web Application Frameworks in general
Rack::Response & Rack::Request
Solo day
Learnings
Repetitive debugging on the practice assessment for A4 definitely paid off - I feel like I understand/remember the solutions to various debugging/syntactical/structural errors I hit when creating the Rails app much better than other errors I've hit in work & personal projects. Recreating the same project over and over again and running into different & similar errors definitely reinforces debugging skills & improves the ability to read/comprehend errors and their source.
Interesting thing to note - the previous cohort had said that Assessment 4 was the most difficult, and required pure memorization. They also implied that the most people failed this assessment. The final results:
Median score: 46/46
Average score: 44/46
Passing score: 42/44
There was less wiggle room as compared to previous assessments, but it seems that because of the difficulty, more people studied harder and got perfect scores.
Or there was less room for error on the exam itself, as one error tended to cause 5+ specs to fail rather than just one spec at a time
Regex
https://regex101.com/ - nice place to test your Regex expressions
'string' =~ /regex_exp/ - will return the index of the beginning of the matched regex. Will return nil if there is no match
match_data = "string".match(/regex_exp/) - will return a MatchData object if a match is found
match_data[0] - will return the matched portion of the string
match_data[1] - will return any captured substrings, if included in regex
match_data = nil if no match
/regex_exp/.match("string") - works similarly to opposite order














