Posts

Showing posts from May, 2020

Teaching to Learn

    Recently I have been helping new comers to my alma mater learn to code.  This is my way of giving back and helping to pull others up along with me.  Along the way I have discovered something about teaching: I learn more from teaching than I do from just going to classes or watching tutorial videos.     Teaching forces you to keep up with the newest trends like syntax changes and different ways to write code you already learned.  It also enforces good debugging techniques and thinking out loud, forming your thoughts into questions.  It keeps the basics fresh while still being able to flex all the fancy code and techniques you learned along the way.     It also forces you to think outside your own box.  For example when I was in school we had to build a project using only Ruby on Rails for frontend and backend.  One of the requirements is to setup 3rd party authentication through Oauth.  When I build mine and for a few o...

Introducing Dir

Image
While learning JavaScript I learned about console.log() . In the course of using JS I used the quit often.  It's a great debugging tool for doing thing like seeing exactly what a function or variable is returning or even as a build tool to see what a fetch request returns.  I've even used it to see what order my code runs in when using asynchronous code. Recently I learned about a different version of this, console.dir() . Here is what the official docs have to say about it: The  Console  method  dir()  displays an interactive list of the properties of the specified JavaScript object.  The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects. You can read more from the official docs  here .  This is something I hadn't seen before through my entire time in school nor in any of the tutorials I found online.  I'm sure there is some reason I am unaware of that no one s...

Tools Chest

Image
Tools that helped me while at Flatiron Here I will share the different things that helped me through my time at Flatiron School My Editor: I used Atom for an editor. Editor Packages: atom-beautify: Helps with how your code looks.  I used it mostly to clean up html, especially when my <div>s got out of hand. color-picker: This helped a lot with css.  It allows me to just right click, select a color from a canvas and get the rgb or hex code for it and insert it directly into the editor. There where others that made my editor neat looking and helped with syntax but those are mostly automatic, the above two where the ones I think I used more than any other. DBeaver: https://dbeaver.io/ During Ruby and Rails I had to learn about databases and setting up relationships.  In the beginning it is very helpful to be able to visualize these relationships between tables.  That's where DBeaver came in. It's a  free multi-platform data...

Flatiron Final Feelings

Image
My feeling about my time at Flatiron Well I'm at the end. Six months ago I took a giant leap and went back to school.  No small feat for someone nearing 40 with bills to pay, but I did it.  There where lots of ups and downs.  I met a lot of great people along the way and learned more than I could ever think I could. The Good: The people, the help, the lessons.  My favorite section was on Rails.  I aced and soared through that.  I got really good at everything to do with Rails to where I was helping other students daily. Which leads me to the bad..... The Bad: While JS isn't that hard for me now at the time I was riding this kind of confidence high from Ruby and Rails.  Then I hit Javascript. I wasn't catching on the way I was with Rails.  I even had to take a step back and go over everything again.  It put me behind.  My confidence was shot. There where tears. At the time I was devastated.   I though I...

Final Project

My Final Project with Flatiron This was the final project for my time at Flatiron School. Project goals included using everything I had learned so far, use create-react-app and a rails backend.   When I first started at Flatiron the very first thing I wanted to build was some way to organize my own personal dvd collection so that I could just look up my library on my phone from anywhere I am. I have this problem that I have so many dvds that when I see a movie on sale somewhere I sometimes forget if I already own that movie. In the beginning of my time at Flatiron I didn't have the skill and knowledge to create the app I wanted. When I finally got to the last module and learned about React and Redux I realized I could finally build the app I wanted.   One of the main challenges I ran into was Redux as a whole. The problem I had wasn't really technical. It was wrapping my mind around why this was even needed. The problem was that I had practice using Redux...

Javascript Project

Image
Flipping Tables Most blog posts are about how to get things done. How you solved a problem or how you discovered a solution to a problem.  This one is going to be different.  This is going to be about an inherent problem I discovered while working with Javascript that seems to not have a real solution. Part of the project requirements was to use a Rails API as our back end.  In the past, while working with rails, I had become a fan of a particular datatype for PostgreSQL (and a few other databases) called hstore.  Hstore allowed for storing key value pairs in a single column in a database. For example:  You can store all parts of an address (street, city, state, etc) in a single column and call them later, individually, just as if it was stored in separate columns.  When creating a form in Rails for submitting data to that column you would need to use a slightly different approach.  Instead of using Form-For you would use Field_for and Opens...

Rails and the hidden credentials

Moving away from ENV One of the challenges that cropped up during this projects was that we had to use Omniauth to allow a user to sign in via Facebook, Google, or the like. Problem I had was that even after following online tutorials it still wasn't functioning as it should.  Through trial and error I discovered that it had something to do with using the ENV variable. After doing my homework there was a lot of suggestions to use the new Rails Credentials setup.  This was a bit more difficult as adding credentials to the credentials.yml.enc file isn't as simple as just pasting them in. First you have to get into your credentials.yml.enc file.  If you just open it you'll notice it has a single line of hexadecimal code. Do not edit this directly. To edit this file you'l need to enter the follow command in your terminal: EDITOR="atom --wait" rails credentials:edit  Replace "atom" with your own editor.  This will bring up the file you need to ...

Sinatra Project

Image
Our challenge this week was to build a web app using what we had learned about Sinatra and ActiveRecord. It was pretty straightforward: Build an app that allows you to organize something via forms and a database. I decided to build an app to create and organize recipes but to utilize the LCARS system. LCARS stands for Library Computer Access/Retrieval System and was created by Michael Okuda for the Star Trek tv series. The skeleton of the app was fairly easy.  Through the course of the lessons leading up to it we had pretty much already built the app.  There was just a few couple of things that I found challenging. Challenge One: LCARS I knew what I wanted to do but not how to do it.  So began the research.  There being many Star Trek fans there where also many ways of going about this.  The most straight forward was using HTML and CSS.  The problem: We hadn't learned much about either of those yet. Through days of reading everything I c...