- Functionality: 3 or 4 (probably 4)
- The
Enigma
class is fully functional, including CLI interface. - The
crack
method andcrack.rb
runner file work, however the key that it finds is not guaranteed to be the key that was originally randomly generated. For example, I encrypted the message"you are a little sweet birdy end"
and it was given key"69732"
and today's date"090620"
. The encrypted message"qhmetkxettdnlmdjslojxmsgakwcsyfi"
was corrected cracked, but the key returned was"15093"
. I am ok with this functionality for now, but I am curious how one could figure out the exact key that the message was encrypted with.
- The
- Object Oriented Programming: 3
- My project was broken into two classes:
Shift
andEnigma
.Shift
was created because I wanted to keep thekey
anddate
in their own objects, although thedate
attribute was admittedly not used the way that I initially inteded. - I contemplated creating a parent class of
Cipher
forEnigma
to inherit from, but I chose instead to break some of the functionality thatEnigma
uses into modulesShiftable
(for all functionality related to shifting keys and characters), andCrackable
(for all functionality related to thecrack
method.). These modules kept the code more organized and allowed theEnigma
class to maintain the responsibility of encrpyting and decrypting. - I had an interesting conversation with my mentor about OO languages vs. functional languages. She shared her experiences with Clojure and explained (at a basic level) how it can be difficult, coming from Ruby, how to use a language that builds programs by composing functions as opposed to objects, but that one nice aspect of it is that it can be sometimes difficult to imagine everything as an object, because not everything you code will map neatly onto an object. In this case, we both discussed how modules would be nice to extract some of the functions, since much of what
Enigma
needed to do was "shift" and "crack." This is what informed my decision to use modules as opposed to additional classes.
- My project was broken into two classes:
- Ruby Conventions and Mechanics: 3
- All of my classes and methods are at least decently named, and my code is properly indented with correct syntax. I can explain my choices of enumerables and data structures.
- I did not get around to refactoring the way that I wanted to, and much of my code is far from as DRY as I wanted it to be. For example, a lot of the "shifting" in my methods is repetitive. I got caught up in the
crack
method and in extracting code to modules that I didn't finish the refactoring. However, my code should be easy to read and follow, which is very important to me.
- Test Driven Development: 3
- I used TDD consistently throughout my program, with the exception of when I created methods for the
Crackable
module (I got carried away with playing around with the code.) - I planned to stub the date in my last
enigma_test
method, for when usingcrack
without inputting a date as an argument, but didn't get to it. - Coverage is at 100%.
- I used TDD consistently throughout my program, with the exception of when I created methods for the
- Version Control 3
- 79 commits and 7 PRs. I deleted my branches after I finished using them, but there were approximately 7.
- I tried to be detailed in my PRs, but I think that I could have done even more. I worked hard to make them comprehensive, though, and I am proud with my progress as a Github user and this project really helped me building skills with branching, creating pull requests, and writing commit messages.
-
Notifications
You must be signed in to change notification settings - Fork 0
ejdelsztejn/enigma
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Final Solo Project for Turing School Mod 1
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published