#ruby, #rails, #OOP, #javascript, #ember

Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

1/27/16

Hackathon, Meetups and More

I have been in Orlando the fast couple weeks, here's an update of whats been going on.

Tabs on Tallahassee Hackathon
- this was my first all-day hackathon and I had a great experience. Not knowing what to expect, I showed up in the morning and joined a team. We were given some basic guidelines (which can be found on the link above), put into a room for about nine hours, and asked to come up with something. Two guys on my team held senior positions and took the lead. We decided to use Angular (something I had not used before) and began working on our idea which gave information on your legislator by zip-code, then according to your own political beliefs, compared your representative to a legislator that lined up with your own political view points.
Tabs on Tally Hackathon

We did not get to finish our app but our code is on my github. I contributed to our front end but also spent time watching the back end of our app development, I was very interested in watching the pros thought process. Overall this was a great experience working with a team and I look forward to more events like this.

Ruby Jax Action Cable - my favorite meetup that I attend, this one was back in Jax Beach. Best thing was more reassurance that testing is the path to getting hired. During this meetup Eric Bundy gave a talk and did some live coding on Rails 5 new Action Cable feature.

Jax Tech Meet Up - another cool meetup back in Jax Beach, this one was really great for networking and I received some new contacts that I hope will lead to some freelance work.

WordPress Site Optimization - meetup in downtown Orlando at Envy Labs, pretty cool introduction to wordpress and another great networking experience.
Meetup @ Envy Labs Orlando

 
I also volunteered to give the next talk at Ruby Jax in a couple of weeks. My topic is REST and how it makes Rails awesome.

-John

12/28/15

Tech Talent South Complete, Now What?

Outside of Class
Learning to code is a journey. Let me first acknowledge that I am not at the end of that journey, and I that is a good thing because learning to code is a process, not a means to an end. Looking back, everything that I have learned at TTS over the past 8-weeks is amazing and I am beyond thankful for the opportunity. Last night I was going over my personal notes from the first week and it feels great seeing where I was then and where I am now. Over the course of this class I have built over 30 apps, learned git, github, Ruby, Rails, JavaScript, HTML, CSS and even a few things that werent on the lesson plan such as testing.

Of all the cool things that we did during class, my favorite and most rewarding would definitley be our final project that two classmates and I completed during the final weeks. We were told to make an app using the things we had learned in class; no guidelines. While brainstorming we decided our favorite thing about class was working with api's, so we looked around the web and found some we liked. We eventually choose a weather api and an event api. Two weeks of wrestling with our code we created Drink Weather, a silly web app that takes a users current location and returns the current weather, an adult beverage recomendatioin based on that weather, and also an activity according to weather and location. Working from scratch really helped cement what we had learned throughout class and the all the mistakes that were made during our creation of Drink Weather made us better coders now. We also became very familiar with working on github as a team, and how to deploy a rails app to heroku. I know it's not perfect, but we all took pride in the creation of Drink Weather.

TTS is now completed and here are the next things on my agenda:

  • Test, test, test. Pretty much every dev that I have had the pleasure to talk with over the past month has mentioned the importance of testing which is one of the areas that TTS did not cover in depth (we only spent one day on testing and really only provided a basic introduciton). I understand why it is important and know I will need to be comftorable with the practice in order to land a job. 
  • Learn VIM- I know that there are mixed opinions on vim, atom, sublime, etc. but after talking to some pros it does seem that learning vim could really improve my proficiency and help with job placement.
  • Sharpen my Ruby- I am most familiar with Ruby of all languages with JavaScript coming in second. When getting advice from people in the industry, one of the things I was most interested in was whether I should focus on learning one language really well or spread my self out and learn the basics of a few languages. Most people said to get really good at Ruby first which will not only help with a job but also with the process of learning a new language in the future.
  • Sharpen JavaScript- Like Ruby, I am familiar with JS and want to continue to improve on it. 

I officially quit my previous job at the end of August and aimed at securing a job within six months. That means I will be employed be the end of February, wish me luck.

-John

12/5/15

Tech Talent South Week 4 Complete

It has been almost a month since my last update... the time has really flown. The Tech Talent South program ends in the next two weeks, we are winding down and I am pleased with the amount that I have learned. Just a quick snapshot of some of the things I have been doing over the past month:

A couple weeks ago we began implementing jQuery into some rails apps. We made an ATM app with js and gave it some simple logic. Once I began to understand the syntax I began seeing why everyone uses jQuery. I added a couple functions that change some css elements so the text displays red if the user tries to withdrawl more money than they have in the account. I also began playing around with allowing the user to hit the enter key after typing in the field instead of manually clicking with the mouse.

Code that allows user to hit enter when finished with number field:

function hitEnter(id, buttonid){
$("#enters").keyup(function(event){
if(event.keyCode == 13 && $(id).val() !== ''){
$(buttonid).click();
}
});
}
then I called the function six times and passed the appropriate id's.

hitEnter('#d_amount','#deposit')
hitEnter('#w_amount', '#withdrawl')
hitEnter('#x2c_amount', '#x2check')
hitEnter('#x2s_amount', '#x2save')
hitEnter('#dep_sav', '#d_saving')
hitEnter('#with_sav', '#w_savie')


I spent a good amount of time figuring out how to make the message turn red when a user requests more money than they had in their account. I eventually wrote two very simple functions that changed the css from red to black:


function red(){
$('#message').toggleClass('warning')
$('#message').text('you do not have enough money')
}

function backBlack(){
if ($('#message').hasClass('warning')){
$('#message').toggleClass('warning')
}
}

then called the functions like this:

$('#x2check').click(function(){
var amount = parseFloat($('#x2c_amount').val())
$('#x2c_amount').val('')

if (savings < amount){
alert("you do not have enough funds")
red()
} else {
backBlack()
savings -= amount
checking += amount
$('#message').text("Your transfer from savings to checking for quot; + amount + " was completed.")
}
})

Two of my favorite things we have done with rails over the past month was using Omniauth to allow user to sign in with an existing account like facebook or google+ and using google maps api and geocoder to that allowed users to find updated bus arrival times. For our facebook log in we used the omniauth gem with figaro to hide our API key's secret. We then used the omni_auth method to to create the user profile using the "provider" "userid" and "name" from facebook. For our bus app we set out to to create an app that would take an address from the user and then let the user know if there is a bus close by. We created a basic form to allow user input and stored nearby buses in an empty array after looping with a do loop. Using geocodes lat and longitude capabilities in our model, we then grabbed the bus system's api using a really cool gem called HTTparty that does all the parsing for us. We then implemented a live google map showing the location of the current bus using ajax.

Next week we will be working on more rails apps and I will finish the last bit of JavaScript on my portfolio site.

-John

10/22/15

Friedman's "Schemer" and the Wonderful World of Recursion

"In order to be creative one must first gain control of the medium...In engineering, as in other creative arts, we must learn to do analysis to support our efforts in synthesis. One cannot build a beautiful and functional bridge without a knowledge of steel and dirt and considerable mathematical technique for using this knowledge to compute the properties of structures. Similarly, one cannot build a beautiful computer system without a deep understanding of how to "pre-visualize" the process generated by the procedures one writes." -Gerald J. Sussman taken from the forward of The Little Schemer

As I have mentioned in other blog posts, learning the programming basics on your own can be frustrating. Sometimes it feels like I'm wandering through a thick fog that I can't find my way out of. But alas, Daniel P. Friedman's The Little Schemer has given me hope.

This book is all about recursion, something that I did not understand but had used on websites such as Free Code Camp and Code Academy. There were many "ah-ha!" moments for me while reading this book, but most importantly I began to understand what the hell recursion actually is. In my own words, recursion is a problem that solves itself by referring back to its beginning after modifying at least one part of the original problem. In Friedman's words, "recursion is the act of defining an object or solving a problem in terms of itself."

I first heard of this book while going through Douglas Crockford's JavaScript lectures on youtube. He mentioned that every programmer should understand what this book teaches, and when Crockford recommends such things, young programmers should listen.

The book is structured in a wonderfully refreshing way especially for someone who intends to learn on their own. The text consists of simple questions that build toward more complex realizations. Instead of giving definition terms in English, the book works the reader to a conclusion on his/her own by using the previous question and answer to help define the next.

The Little Schemer is written in the language Scheme, something I have never seen before, but I had no problem picking up the concepts of the book because the language has many similarities to JavaScript. For example, a scheme function would translate to JavaScript like this:

(define phish (lambda (a b c) (body)))


//and in JavaScripst...


function phish foo(a, b, c) {
    return body;
};


As you can see the functions are pretty similar so for most of the book I just left the problems in scheme. One thing that really stuck out to me while going through this book is the functions that I have been taking for granted such as the simple .length property in JavaScript, or the very often used "rember" function found in the book. "Rember" takes two arguments, one an atom and one a list, and removes the first argument when it finds it in the list.

This book helped me understand recursion MUCH more, and is something that I will return to over the next few weeks when I feel I need a refresher.

-John

10/14/15

Crockford on JavaScript - Part 5: The End of All Things

Video of Lecture

In this lecture Douglas Crockford talks about some of the security threats that we face today on the web. Many of the problems, says Crockford, come from the amount of diversity on the web. Mashups (which is the combining of programs with different interests), too many languages with separate encoding and commenting, and the nesting of these languages are just a few of the complications that a browser will encounter on a typical day. Because of this the browser must do heroic things in order to decipher many web pages that then give attackers easier access to sensitive data.
Crockford goes into much more in this lecture such as what an attacker can access on the web and how advertisers can compromise security. My full notes can be found here.

9/28/15

Crockford on JavaScript- Episode IV: The Metamorphosis of Ajax

Santa Fe Meets Blue Springs
Last few weeks have been amazing! I learned and met new friends in Orlando, and last week my older brother offered to take me on a week long canoe camping trip down the Santa Fe and Suwannee Rivers. All though I was a little hesitant to step away from the code for a whole week, I thought how many times do things like this come around? Needless to say, we had a blast and it was a much needed break from all the “screen time” I have been putting in lately. Now I feel refreshed, picking up where I left off with Free Code Camp’s Zipline Challenges. I will make a separate post about Zipline #1 this week, but for now I would like to talk about Douglas Crockford’s lectures on JavaScript. When the lectures were published, Crockford was the senior JS architect at Yahoo, however, today he holds that same position with PayPal.

What I like most about these lectures is that they go into depth in theory AND history--which I find helpful since I don't have a strong computer background. In this lecture, Crockford on JavaScript- Episode IV:The Metamorphosis of Ajax, Crockford discusses Ajax, CSS, HTML, and how all these things affect JavaScript today.

My notes to this lecture can be found here (beware, I do not use spell check on this document)

Being a newbie with code I find it difficult sometimes to give back to any part of the community; It's like I’m constantly asking questions of senior coders and never having anything to offer in return. I figure adding some of my notes to this blog can be a way for me to give back in case anyone is in my shoes in the future and needs some reference points to start from. I have already been through a number of Crockford’s lectures but did not take great notes, so, from this point forward I will be sure to take notes as if it is for the larger community :)

-John

9/4/15

Orlando

Orlando Public Library
I have now been in Orlando for a week and I'm certainly grateful for the time that I've spent here so far. Wednesday I visited my first meet up ever--a "hackathon" for a volunteer project called Lady Lake Pet Adoption that focused on creating an app that will help connect lost pets with their owners. As a newbie I didn't have much to offer via writing code, but it was a great to experience an environment of like minded individuals sharing a similar goal.

Next week will officially be my third week of learning to code full time, and there are some valuable takeaways that I have realized so far:

Learning to code is challenging-- duh, right? But you can't fully understand what that statement means until you get your hands dirty with code. Getting the code to do exactly what you want can be very frustrating at times, but when it does work the reward is immediate, which gives me an extra boost to continue on. 
Lake Eola, Orlando

Learning does not work for me by simply understanding one perspective-- this has been huge for me this past week as I started to run into my first road blocks (aka- Free Code Camp's Bonfire Challenges). Up to this point I had read a ton of information about Java Script but had not actually comprehended everything fully. I realized this when I was asked to do something simple such as "truncate this string if it is longer than the given argument" and stared at my screen dumbfounded. You don't really know something until you can actually do it and can repeat that same result over again in a different environment. So what I did when I started to run into problems was take a step back. I revisited some theory on Java Script syntax, looked over a few chapters in Eloquent Java Script, and watched lectures on YouTube that were focused on my sticking points (most helpful lecture for general understanding: Crockford on Java Script). I have learned that without a teacher that can help in person it helps to get many perspectives on things that can be challenging, something that the Internet offers in spades.

Keep it simple-- I have a tendency to want to get everything done all at the same time. The problem here is that it will make me feel overwhelmed and disappointed when I look back at the past week and don't see the progress that I wanted. Solution is to keep it simple. Instead of trying to tackle 6 things in one day, I will focus on getting one or two things completed. This gives me the ability to cross something off my to-do list which can be very satisfying.

Morning rituals work-- I have slightly altered my wake-up time since being down here mainly because I have found myself more productive during later hours, but keeping to my schedule has been hugely beneficial to me in a new environment. Every morning (after 7 hours of sleep) I wake up, splash water on my face, do a 1x2x4 breathing exercise, run two miles, meditate, eat breakfast and then begin my day. I find that if I get away from this routine than my entire day suffers.

This week has been a great learning experience, up to this point I have:
  • finished 20% of Eloquent Java Script 
  • 50% of The Selfish Gene 
  • completed Crockford on Java Script Lectures 
  • completed 10 of the first FCC bonfire challenges 
  • visited my first meet up (another one tomorrow morning) 
  • and increased my reading speed from 336 words/min to 552 words/min after using this technique from Tim Ferris. 
-John

8/21/15

First Impressions on Free Code Camp


I just began using Free Code Camp and have been pleasantly surprised with the amount that I have learned in the first few days. What drove me to it initially was the fact that it gives young coders am opportunity to build a portfolio by working with non-profits.

Breaking into any new industry your going to run into challenges. The most obvious for me being: how do you get a job with no experience? And, how do you get experience with no prior job? What comes first? FCC seems to have addressed this question by trading an education for volunteer work, an idea that I find respectable and logical.

As of this evening I have gone through the first three modules (HTML, Responsive Design with Bootstrap, and jQuery) and have learned lots about the respected languages, but more importantly, I have sharpened my "googling" skills when I run into road blocks. This is one thing I noticed when switching from codeacademy to FCC; there is an encouragement for students to figure out the problem themselves before asking for help. Although CodeAcademy's Q &A section can be very helpful, I also think that it hurt my learning when I would look for someone else's answer instead of figuring it out with my own resources-- aka the internet. FCC also has an active chat room and a very helpful community.

Overall I have been happy with FCC. It's structure is very similar to CodeAcademy, however, there is a huge incentive to finish as it will give you the opportunity to work with non-profits on real world projects. I hope to burn through FCC in the next couple of weeks while also supplementing my learning with Marjin Haverbeke's book Eloquent JavaScript

So far so good in the new world of coding.

-John