Day 42 – Project cont.

I’m making some progress on my project – slowly but surely…  I’ve gotten stuck on a lot of different things that have each taken a long time to solve, but little by little it’s getting there.  Dealing with jQuery Mobile has been frustrating because it does some things behind the scenes that cause some strange effects.  But then the same could be said of Rails – like yesterday when my CSS style files weren’t loading the first time I loaded a page (but if I refreshed they did) and then also my back button wasn’t working right – I was pretty sure it was jQuery Mobile’s fault but it turned out that Turbolinks in Rails was the culprit.  With some help from my teacher today I did get the stamps/clip art to save to the canvas so that is a big breakthrough.  The days are going by very quickly.  I’ll just get as far as I get by Friday.

I should also mention though – that I have been struck a number of times by the fact that Rails really is pretty cool.  There has definitely been a learning curve over the past few weeks, but now that I have the basics down it all just kind of really makes sense.  It feels good to understand the framework and have everything so modular, and the set-up for Rails just makes sense and although it seems complicated in some ways, it really is all designed to make things easy!  It just takes some time.  Plus things in Rails have fun names like Sprockets.  :-)

Project

Having finished as much of the Coding Dojo coursework as I’m going to do, it’s time for me to work on my final project, and this final week (week 9) is officially “project week.”  My project is going to be a place where elementary math students can draw out solutions to math problems.  The idea highlights the importance of individuality since each student’s thinking to solve a problem may be very different, creativity in students expressing their thinking using drawing, and problem solving in that the drawing forces the students to explain their thinking (visually) with the focus being on understanding how they get to the answer vs. just the answer itself.  This might be especially good for students who aren’t as strong at expressing their ideas verbally or in writing, and this provides the opportunity to combine math with art in a sense.

So I’m building off of the drawing app that I already made during our first project week (week 6) and am working on providing the structure for the rest of it in Rails.  However, it has been a frustrating few days programming-wise!  I keep getting stuck on things that take hours to figure out.  So I’m making progress but very slowly!

I built the basic structure in Rails and integrated the drawing app that I already created, and one major challenge right away involved figuring out how to save the drawing as an image.  I got stuck for hours where I thought I was doing everything correctly but the image data was not saving.  In the end it turned out that the jQuery Mobile library I was using for the touchscreen also forces forms to submit with Ajax and that was causing a problem with saving the images – so once I disabled Ajax for the form submissions everything worked fine.  Many hours later…  :-)

Then I knew I would need to deploy the Rails app to Heroku even for Demo Day vs. just keeping it on my local server since I want it be live so it can work on the touchscreen and to be able to show that.  So I figured I should tackle that sooner rather than later to make sure everything worked correctly, so that turned out to be a major challenge unto itself.  We learned Rails with SQLite for the database which of course is not supported in Heroku so I had to figure out how to migrate to Postgres which had all sorts of challenges with installation and getting everything to work.  But I got it eventually – again many hours later…  :-)

And another major challenge that I haven’t yet figured out is my draggable clip art isn’t being saved to the image files because it’s not actually part of the canvas image.  Eventually I got it to work and save on the computer version but I haven’t gotten it to work on the touchscreen.

So I’ve made progress but it’s been slow.  I’m trying to keep it as simple as possible and aim to at least have something “finished” for Friday’s Demo Day even if it’s basic.  I’ll start with minimal features and can always add more later if I have time.  Luckily I still have a whole week and can devote myself pretty much entirely to the project, so hopefully I’ll end up with something decent for Friday!  I can’t believe I only have 1 week left of Coding Dojo.  It really has flown by!

Day 37 – Rails cont.

I guess the day count is weird – just days of actual class in the 9 weeks.  It’s been so many more days than that.  Anyway, I’m still going with Rails…  It’s definitely starting to come together.  After much struggling…  I’m currently working on building user registration and login.  Again.  I think this is the 3rd time?  First with straight PHP and for “the wall”, then again with CodeIgniter, and now with Rails.  Interesting to do the same task different ways and compare.  Each has its own methods of validation, password encryption, error messages, etc.  At this point the whole login validation thing is old hat.

  1. Check if the username (or email address) field on the login form is blank and if so display an error message saying so.
  2. Otherwise, check if the username exists in the database and if not display an error message saying so.
  3. Otherwise if the username exists in the database check if the password matches and if not display an error message saying so.
  4. Otherwise if the username and password match then all is well and log the user in!

Whee.  Wanna see what that looks like?  It occurs to me that I’ve never posted any actual code on this blog.  Here!:

login

(Look at all the pretty colors!)  :-)

My Website

Well, this week “off” went by pretty quickly.  I got a lot done, but so much more to do…  Among other things, I created a basic website for myself:
www.maymillerricci.com 

Now back to class and the rest of the Ruby on Rails course, and then on to my final project…!

Week 7.5

We’ll call this week a half a week because we’re off this week for Thanksgiving, though I’ve still been working and coming in.  I’ve been working steadily through Rails, and it’s been interesting…  In a lot of ways it’s kind of harder to grasp than some of the other topics I’m not sure exactly why.  And then there’s also the feeling of learning yet another totally new topic and feeling like my brain is going to explode from all the different totally new things I’ve learned in such a short amount of time!  :-)  Rails is tricky though because a lot happens behind the scenes, so it’s hard to know what’s going on.  Vs. like when we started straight PHP and were building everything manually we knew exactly what was going on all the time because we wrote every line of code, so we had to know what it was doing…  “Harder” because it was more code to write for sure but also way easier because you knew where to look if there was a problem.  One of the TAs says that everything in Rails happens automatically or “automagically.”  :-)  And another of the TAs says that everything in Rails is black magic.  Ha.  Today I got majorly hung up on a couple of things and since it’s Thanksgiving week and I didn’t have people to ask it was pretty frustrating, but I struggled through.  And actually I did end up getting some help so that was good.  Black magic for sure though.  :-)  Anyway, today was a good day for Coding Dojo “rule” #3:

dojo_rules

Hmmm – I had some major issues getting this post posted.  It kept disappearing!  The black magic is spreading…  :-)

Day… um… 34?

I think?  It’s obviously getting up there when it takes me that long to figure out which day we are on.  Speaking of which…  I think I’m starting to really feel the pressure of not having that much time left at Coding Dojo and having so so much I still want to do while here…  Thankfully we have the whole week off next week for Thanksgiving but I have *so* much I want to get done over that week and I know it’ll fly by.

This week we started Ruby on Rails.  I spent the past few days on the Ruby language, which I hadn’t touched since my brief time on Codecademy and going to a Railsbridge workshop this past summer – though I do think it was helpful to have had that prior exposure.  My teacher says people either love Ruby or hate Ruby which definitely makes sense.  It’s sort of quirky/different but I can see its benefits.  So far between PHP, Ruby, and Python I can definitely see the benefits of each and am not sure I have a strong preference yet.  A lot of people hate PHP, but in some ways its excess of more rigid syntax is good for me.  Then Python is the opposite with barely any syntax and just very dependent on white space which is also very appealing.  And then Ruby sort of has a whole different way of framing everything including chaining methods, sometimes writing things in a way that seems backwards, and it’s supposed to mirror regular English language more which is interesting – plus there just seem to be more ways to do everything in Ruby because there are so many built in methods, different ways of phrasing, etc. which is maybe both good and bad!

Anyways, feeling the time crunch, I skipped the final Ruby assignments – with the intention to finish them next week – because I really wanted to get to Rails (the framework) this week.  So I started Rails and am slowly working my way through.  I don’t like skipping things, though I’ve been doing it more frequently in order to keep up.  If I had unlimited time or could magically freeze time or something, I’d spend tons of time carefully working through every assignment and making sure I really understand everything and try multiple ways of doing everything, etc. before moving on.  But in reality I’m very aware of making the most out of the time I have here with the support and everything, and possibly at this point it’s better to just keep going.  So the take-away quote of the day, again courtesy of one of my classmates:

You can learn anything, but you can’t learn everything…

Food for thought…

We just had a tech talk, and the speaker shared with us a question that he always asks at interviews:

Is coding more like a paintbrush or a hammer…?

Also/related I guess: is it an art or science…?

Fascinating…  :-)