NavBar

Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts

Sunday, April 26, 2015

I finally finished Hartl's Rails Tutorial.

Very excited about the progress I've made in the past week.  Tonight, I finally finished Hartl's Rails Tutorial... all 771 pages of it!  It took me 2 months to finish it.  I found the book really helpful to clarify and work through some basic rails concepts like sessions and params.  I found concepts I learned in it, I referred back to while tackling work tasks.  I'd definitely recommend it after you get some familiarity with RoR.  Next, I think I'm going to change it up and next tackle learning some JS, particularly AngularJS, in my personal time.  I also have a copy of Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages that I want to tackle reading as well.

Also this week, I setup a dev environment from scratch (for second time ever) on my work mac.   It was pretty painless compared to my first attempt on my own 5 months ago.  I needed some minor guidance, but I think I would do fine by myself when I do it again.  I setup my ruby version manager with rbenv instead of RVM.  It's what my colleagues use and you don't have to deal with creating/managing RVM gemsets, so I wanted to give it a try.

After using rbenv for the past week, I really liked it a lot better than RVM and wanted to change my own macbook over to it.  After reading some posts and talking to a colleague, I was worried though that even if I impoded RVM, it would still leave lingering files on my machine that would muck up a clean install of a new ruby manager... and my worst fear is that I wouldn't be able to fix it... so I originally decided that I would not change my setup.   But, I couldn't resist the challenge of trying to switch over to rbenv from RVM, and, of course, I attempted to do this late on Friday night. :-)  It all went well, though!  I just had to run '$ rvm implode', clean up my bash files of any reference to RVM, restart, update homebrew, then install rbenv and my ruby versions.  There were some minor little issues to resolve when I checked that my projects still ran normally locally, but I worked through everything and it's running fine!  I'm happy that I just did it despite my reservations.

I've been learning some more difficult concepts and working through understanding APIs, client/provider side authorization, OAuth2, OmniAuth and Doorkeeper.  I built my first gem and published it to RubyGems.  It's an OmniAuth strategy for one of the projects I work on that is a OAuth2 provider.  I got to figure out a lot of things while working on it- building a gem with bundler, publishing a gem, writing a gemspec, and building an example app in Sinatra within the gem.   It's cool to think of what I've built recently, when I just wrapped my head around APIs, clients, providers a week or so ago.

It's weird how things have changed for me over the past 6 months.  I worry I've become a bit 1-dimensional though.   I live/breath/think constantly about coding.  It's what I wanna talk about all the time and my main interest right now.  I'm excited about it and can't help myself.  I don't think much about my previous career or have a desire to go back to it.  I just want to keep getting better and faster at writing code.  I wonder if this is just a phase that every new coder goes through or if this is just how it is going to be from now on... :-)

Monday, January 5, 2015

Monday's Progress.

Not much to update.  No break throughs.  Lots of frustrations.  I'm just working hard and studying everyday.  Riding the cycle of feeling accomplished to feeling like the dumbest person ever.

I've been going through Jumpstart Labs Blogger Tutorial.  Spend most of the day figuring out the section on tagging.... creating Tag and Taggable models and using the Taggable model to set the relationships between Articles and Tags.  Learning about foreign keys (think I got it), but got really really hung up today on this:

def tag_list=(tags_string)
tag_names = tags_string.split(",").collect{|s| s.strip.downcase}.uniq new_or_found_tags = tag_names.collect { |name| Tag.find_or_create_by(name: name) } self.tags = new_or_found_tagsend
particularly the first line of:
def tag_list=(tags_string)
This took me hours (HOURS!) this evening/night to figure out.... never seen def method equals something in my rails work before! And it took me hours to figure out this is a setter. I think I understand it now.... since tag_list is not defined in the Article model/table/schema as an attribute it can't save the tag_list when it tries to create the new Article object. we have to define it in a method in the Article model (what we are doing above) so our tag values we input in the form when we create a new article will be saved. Lots of googling and talking about it with my husband and re-reading this part of the tutorial over and over, and I finally got it. WHEW.





Saturday, December 27, 2014

Week's Progress

I started reading Practicing Rails by Justin Weiss.  Kinda pricey ebook and I'm not convinced it was worth the price so far.

I started working on (and deployed to Heroku) a site for a small machining business.  This is my first solo project I've done without following a tutorial (even though I used my past tutorials as references).

The big features of this project are:
  1. Creation of a contact form that emails site owner directly when a visitor sends a contact request.  No database- it is similar to the app I built during the Learn Rails tutorial.  The contact form uses ActiveModel class.
  2. Utilized Bootstrap theme template for the design.  This was the first time I've tried to adapt and customize a pre-designed template for a Rails project.  Definitely had its frustrating moments!
Of course, during the process, there were little issues that came up and required troubleshooting, but I got it all fixed and working!

What I learned during this process was that I need to work on planning work and creating sketches of the pages I'm making so I keep myself limited to one task at a time and not spread out and skipping around from task to task.    This mainly happened when I added the bootstrap features and started adding the div classes to each individual view for the bootstrap template design.

Oh, and my github streak is up to 13 days!   My understanding is better of Rails framework.  Thinking of how things go together in MVC is going better for me.  I'm pleased with that.

Goals for next week:

  • I'm going to keep reading Practicing Rails.  Try to finish this week.
  • Work on a personal website for myself.
Goals for January:

Saturday, December 20, 2014

Saturday night.

coding in bed.
Here's how I spent my Saturday late night.... In bed, working on coding while reading Kehoe's learn rails guide. 

So far, I think I liked one month rails' style better for my learning style, but I'm doing the best I can!  I worked on integrating a contact form into my app using simple_forms and google_drive gems.

Friday, December 19, 2014

Thurs and Friday progress.

Not too much progress, I did some more work in Kehoe's Learn Rails tutorial, but not as much as I hoped for.  I learned more about the conventions in Rails, using Foundations CSS styling (not sure I like it more than Bootstrap, but we'll see as I do more with it), and a little review of basic ruby.  I guess I was hoping to be done with it in 2-3 days.  Only excuse I have is that I've been sick.

I'm hoping to feel better over the weekend, get more work done, and extend my 5 day streak of commits on github :)

I also did the git/brew upgrade to fix the security issue with git.  I swear, I can never have a simple upgrade/install on my machine with the command line.  It always requires going to stack overflow to find solutions to my problem.  I also feel like I try one solution, doesn't work.  so I keep going and randomly trying more and more advice.  I wish I understood what I am doing more on there.  I got Git to update finally, only for my terminal to say the old version # when I checked it.  but if I went to upgrade, it said the new version of git was already installed, wtf?  Luckily with a close/reopen of the terminal window, it was only showing the most recent version install and everything seems to be peachy now.  whew.

I've been feeling like I have no idea what I'm doing the past couple days.  Self-doubt.  Hopefully I'll perk up when I start to feel better.  I don't feel like I've been able to think clearly at all and my learning is stunted.

Thursday, December 18, 2014

Learn Rails Tutorial started!

I started Daniel Kehoe's Learn Rails book on Tuesday.  I'm excited to do this tutorial!  I decided to do it before starting Hartl's Rails tutorial to get more practice and because the application I will be building during the book will be suitable for a small business... it includes contact form and mailing list features.  This will be great since the first independent project I'm going to take on is making a new website for my dad's business!

I got through chaper 12, setting up my new project and getting git setup along the way, and then got stuck for hours on the dumbest mistake ever.  I'm pretty embarassed that I wasted my evening on such a silly error.  I was editing my .bashrc file and secrets.yml file in the app to setup environment variables in the bash file so they aren't revealed in the secrets.yml file.  I kept getting one of two errors:  my secret_key_base wasn't defined in the secrets.yml file and an error similar to this one: "ruby/2.1.0/psych.rb:370:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 18 column 1 (Psych::SyntaxError)"

After systematically going through replacing variables in secrets.yml file with hard values, checking the multiple bash files on my computer for conflicts (bash_profile, bashrc, profile, zshrc, etc), I finally found the problem and felt so dumb.  When I was opening up my bash files, I was just clicking them in Finder and the default textEdit program for Mac was opening them instead of opening them in my text editor, Atom.  So, the problem was, that the textEdit program was adding formatting that couldn't be interpreted properly by my computer.  DUMB!  Once I went through them and re-did my bashrc file in Atom, it all works!

I could continue to beat myself up for making this mistake, but it is better to laugh at it and learn, and never make it again!

Wednesday, December 10, 2014

Progress update: 10.12.14... I am loving One Month Rails so far!

Things are going a little slow, but well!

I've been continuing with my One Month Rails project.  I really like it so far.  I have been working on adding Bootstrap elements and customizing the look of my app so far.

I added a NavBar and fixed up the layout and colors to look nicer.

Looking good!


And the big achievement today.... I got my app online with Heroku! It's live!  I have a few issues I need to fix/understand.  Heroku warned me to specify my Ruby version as best practices but there are 2 issues with doing this.  First, I have built the app using Ruby 2.1.4 but it says to specify 2.0.0 in the gemfile.  If I do this, it messes up RVM and ability to run rails server (doesn't show the rails gem at all).  I'm confused and I've reached out to the teachers at OMR for a little guidance.  In the meantime, I removed the ruby version specification so I don't have any issues running locally for now.  Updated:  I fixed it!  I needed to do a bundle install and I cleared it up and the gemfile is now specified for Ruby 2.1.4.  If in doubt, always bundle install. :-]

I also had an issue with my google font not working on Heroku, but a quick search on stackoverflow and I fixed that issue and pushed the update to heroku.

Also... I got the files setup on my computer for the next RailsGirls meetup on Sunday and took a look at the this Git/Github tutorial, although it is very similar to the one in the One Month Rails videos, so it was  review, but I'm getting more comfortable with using Git and use it often.

I couldn't stay away.... and I worked on it some more tonight and got the Devise gem installed and I am ready to start generating users to my site tomorrow!  Wheee!

I feel like today, I accomplished a lot.  :-]

Friday, November 14, 2014

Friday's progress.

I worked through a couple more CSC python course problems, and I'm on exercise set 8.  I feel like I will work on these as I need a break with other things I'm working on.  There isn't an answer sheet, so when I get stuck, I do best if I do something else and come back fresh to a problem.

I'm doing some more of the Epicodus course.  I want to get through the first section on HTML/CSS in the next day or so.



I also started and finished reading "learning the command line the hard way" today.  After the frustrations of figuring out the RVM/RoR install yesterday, this is important to get more comfortable with.  I'm going to work on memorizing the most useful commands that the author recommends to learn.  The crash course was great and easy to understand!  Recommended.