So Close to the End

stairs

It’s been about 3 weeks since I last blogged. I put my head down and sprinted towards the finish line. I can’t say that I’m 100% done, yet, but I will be soon. I have completed my final portfolio project and have my assessment for it tomorrow. I must say, Redux threw me for one while working on this project. I hit many stumbling blocks building this project. I think my sprint was a little ambitious and I ended up not knowing the Redux stuff as in-depth as I wanted to. I definitely created some of my own frustration because of this. However, I hacked away at it and got it. I watched YouTube videos, Wes Bos’s Redux Course, and I even used HackHands a couple times thanks to the Github Education Student Developer Pack $25 credit I received.
Continue reading “So Close to the End”

Sometimes The Logic Is Flawed

puzzle pieces

So I’m banging away at my jQuery project. I got hung up on some code tonight but got it working right before I stopped for the night! I was stoked! So what was I stuck on? In my app a user can create as many places as they want. Each place can have as many items as they want. A user can look at a specific item and see the name of it, the rating they gave it, any notes they wrote about it and where the item is available (the places they’ve added it to). I wanted to implement a “Next Item” button/link that when clicked will load the next item for the current user.
Continue reading “Sometimes The Logic Is Flawed”

International jQuery Tic-Tac-Toe

I’ve been moving along as of late. Today I was able to knock out my Tic-Tac-Toe in jQuery project. Well, it’ll be done VERY soon. I paired with another student Henno who’s in a time zone 7 hours ahead of mine. I had just started and he was looking for a partner so while he read up on the project and had a bit I got the first three controller tests to pass. I did hit an issue though where my active_model_serialiers gem was the most up to date version and that was causing an issue with what the test wanted returned. I was missing the root key of the JSON. With some help, I decided to roll back the gem version and got the test passing. Then we paired for a solid 5 hours before he needed to get some rest. We had 9 tests still failing. Decided that I’d do 4 or 5 of the last 9 and he’d finish it up. So that’s where the project is right now but I know he’ll get it done tomorrow. There isn’t much left.
Continue reading “International jQuery Tic-Tac-Toe”

Break Time to Concentrate

So I’m pulling back from my daily blog unless I have code to write about. I can concentrate on school and extra 30 mins to an hour per day if I don’t write. Here’s something interesting I’m pondering and haven’t tested yet. I’m not really sure why I haven’t tested it but…

// To ensure JS is loaded after the page loads
$(document).ready(function () {

})

// Better way to do the same
$(function () {

})

// Does this work?
$(() => {

})

Time spent today: 1:54
Time spent total: 374:10
Lessons completed today: 5
Lessons completed total: 629

100 Days of Flatiron School Bootcamp

I’ve reached the 100-day mark. I have to say, I honestly thought I’d be done by now. I’m 82% of the way there. It’s going to be a mad dash to the end. I really, really, really don’t want to pay another full month’s tuition when I finish a few days into that billing cycle. So it’s pretty simple. I have to finish by June 27th. We’ll see what happens. I have a backup plan if I’m literally working on my final project and I’m sure I’m not going to make it. We’ll see if it comes to that or not…

Tonight had me learning about workers in Rails apps and specifically the Sidekiq gem. It’s pretty sweet how easily it can abstract out letting a task run in the background so a user can keep on with their work. The example in the lesson is loading a large CSV of leads into your web app. First, you create a worker file in app/workers, make sure that file has include Sidekiq::Worker, then take the long-running process and input that into #perform.

# app/workers/leads_worker.rb

class LeadsWorker
  require 'csv'
  include Sidekiq::Worker

  def perform(leads_file)
    CSV.foreach(leads_file, headers: true) do |lead|
      Customer.create(email: lead[0], first_name: lead[1], last_name: lead[2])
    end
  end
end

After that replace the long-running process code in your controller by running the worker.

# app/controllers/customers_controller.rb
class CustomersController < ApplicationController

  def index
    @customers = Customer.all
  end

  def upload
    LeadsWorker.perform_async(params[:leads].path)
    redirect_to customers_path
  end
end

Now if you upload a large CSV file via the form at /customers, when you submit it everything will move along. Then as you refresh the index page /customers it will have a growing list until the CSV file is done being imported into the DB.

I also did a few lessons on Consuming APIs. Luckily for me, this is not completely new to me so I have a good base to work off of. Actually, this shouldn’t be completely new to anyone in the program as earlier labs deal with pulling API data and rendering it to the DOM. My main note on APIs is the querystring which trips me up sometimes.

  • ? after the URL
  • param=value&param2=value
  • ie. https://api.example.com/places?name=tonys&city=nashville

Although, I also learned how Postman has a params section with key/value pairs which helps with building out the query string.

Time spent today: 1:53
Time spent total: 369:58
Lessons completed today: 7
Lessons completed total: 621

Popular Gems Are All The Rage

Not much to report today. I spent my time working through some labs that were about popular Ruby Gems and how to find good ones. Paperclip, Kaminari, and Active Admin were presented and gone over. I also found out that RubyMine is going to be my IDE basically for the rest of the curriculum. This is because I’m writing Rails backend and JS front end. WebStorm is a 100% JS IDE so it would have serious problems with the Rails part of the apps I’ll be building. When I implement Node, later on, I should use WebStorm.

Other than that I just did some more reading in the Career Prep track. I’m trying to get ahead of the curve on that aspect. I’m debating if I should follow up with the business cards I received this weekend. As part of my career search requirements, I have to reach out to 8 people per week. I could include these connections in that first week. Although, I think prompt follow up is better so I’ll probably schedule some e-mails to go out first thing in the morning.

I also passed 80% done in the program tonight.

Time spent today: 2:13
Time spent total: 368:05
Lessons completed today: 7
Lessons completed total: 614

The Asset Pipeline Is Flowing

I finally got back into the swing of Flatiron. I did <30 mins of school yesterday so I just chose to blog about FCC. A lot of reading going on as of late. The Rails asset pipeline and how to use it. I actually figured out some of this since I implemented Bootstrap in my Rails Portfolio Project. It felt good to plow through some labs tonight. I’m so close. Now is the time to crank up the intensity and really go at it to the finish line.

I have to say, I don’t know much about other backends but the asset pipeline is a pretty neat feature of Rails. I guess being such a mature framework has its benefits.

Time spent today: 3:06
Time spent total: 365:41
Lessons completed today: 15
Lessons completed total: 607