Elixir Project Update 6

Ok, I am a bit behind. I didn't get most of "last week's" stuff done until Tuesday night. :-( Which means I haven't yet started this weeks either. I got about 1/2 of what I had planned done.

Last Week:

  • Quiz Form - 1 hour
  • Answer Key DS -  1 hour
  • Add optional column support - 1 hour
  • 3 way matching - 30 minutes
  • Put web code on Github - 15 minutes.
  • Setup web server - 1-2 hours?
  • Research storage options - 1-2 hours.

I had a lot of trial and error coding. First was my attempt to see if I could short circuit writing all the bits needed to display a form. I tried using the phx.gen.* stuff, but it didn't end well. In one attempt to generate the quiz form I ended up dumping files that wouldn't compile into the website skeleton. I didn't want to manually rm 10+ files each time I ran that command so I ended up repeatedly regenerating the skeleton. Maybe I should have done that git hub task first.

I used probably a good hour and a half trying various things before moving onto manually writing the code and html templates needed. While doing this I had some fun learning more about eex templates, and Phoenix.HTML.form helpers. I've only had exposure to a few html templating systems, and it is interesting to see how different groups solve this problem.
Ugly version 1

For optional column support I enabled it just for three way matching only, and there is a standard name. It isn't as free form as I had previously envisioned, but for now I think that's for the best.  While I was in there I figured out how to clean up the code a bit, and make it a little more readable. 

While I haven't set up the web server yet, I did get halfway there. I read two tutorials on how to set it up, so I should be able to do it much faster than I previously guessed.  I'll get it done this weekend for sure, along with putting the web code up on github.

For the answer key I am a bit conflicted. I am not sure if I should make it an option, and return a key along with each section, or if I should let someone send in an array of sections, and generate an answer key for the whole thing at once. Also, what kinda key should I return for the matching and three way matching sections?

This week:
  • Answer Key - 1 hour
  • Put web code on Github - 15 minutes
  • Setup web server - 45 minutes
  • Research storage options - 1-2 hours
  • Return the Quiz in HTML - 2 hours
  • Pdf output - 2 hours
  • Answer Key page or section - 1 hour
I foresee more learning pains when I figure out how to hook up the generator app to the framework, as well as working with this form. In a weird way I am looking forward to the frustration. These are things I need to understand well if I want to keep using Elixir for web based tasks. 

PDF output is dependent on there being a library already written, and simple enough for me a new user to understand. So this task will be a little bit research, and hopefully just plugging in some data structures into a set of functions to generate the PDF file. 

Talk at ya next week.