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

Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

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

11/9/15

Tech Talent South Week 2 Update

Tech Talent South has greatly sharpened my understanding of many programming basics I thought I had already mastered. It has only been two weeks with the program and  I cannot not over emphasize how great it is to have an instructor to bounce questions off of. TTS runs four days a week, four hours each class and two extra office hours each day. So far we have covered the basics of Ruby (arrays, methods, hashes, and Classes), which I had studied when I first began to learn in August by reading Chris Pine's book, "Learn to Program". It was a good refresher on the Ruby language since I had not done anything with Ruby since I read Pines book and I also enjoyed being around other students during the learning process. I have also found it valuable to see how others work out the problems as they go; it ultimately helps me think about problems in different ways, something I could not duplicate working on my own most of the time.

Last week (week 2) we got into Rails which I was really excited about since this was essentially uncharted territory for me. I remember just starting out I wanted to try rails after finishing some ruby stuff but gave up after an installation fail. lol. Thinking back to that point I remember being overwhelmed with all of the information out there and not knowing where the hell to go. Being in this program really helps with that. Now I have a set curriculum with an instructor leading the way to help out when I get hung up on something.

This weekend I started going through the Ruby on Rails Tutorial by Michael Hartl, which is a great supplement to what we are doing in class. I have gotten through the middle of Ch 3, which is basically what we have accomplished in class up to this point. I have to say that going over this book after the work we do in class really helps me understand the concept of rails and how the MVC framework functions. In my own words, when you type something in the browser that then goes to the rails router and requests that page from the controller with the same name. That then, using instance variables, goes to the model which retrieves the information from the database, returns that to the controller which then goes to the view page, renders the html back to the controller and to the browser...and boom, web page.


We created some small rails apps so far including a mock university which uses a database to store classes, students, grades, and depatments. I have gotten a lot more familiar with the command line as a result of using rails as well as a general knowledge of git and heroku. I'm really excited to see what I can get my hands on this week as I continue to further my learning in and out of the classroom.

-John

Tech Talent South Scholarship

Since making the decision to learn how to program I have always been attracted to the idea of a coding bootcamp. The problem for me, however, was that I was unsure of how valuable a two or three month program would ultimately be compared to the cost. About a month ago I heard about Tech Talent South and that they would be teaching a "total immersion" course here in Jacksonville this fall and that they would be offering a 100% scholarship for the semester; I decided to apply. 

A couple of days after my application I received a call from there communications director for a phone interview that lasted about an hour. Over the course of the interview I talked about much of the material I had completed on my own, what I was currently working on, and why I had developed an interest in programming in the first place. I also referenced this blog and some general interests that I had such as volunteering and supporting the hometown Jacksonville Jaguars. Overall I thought the conversation went well, and I was told that I would be accepted to the 8-week program and would also be considered for the scholarship.

Two days later I received the good news: I would be awarded the scholarship for 100% tuition! I was ecstatic to say the least. I have just finished up my second week of class and will update with what I have learned so far, but I believe that the reasons I was awarded this scholarship are very similar to the reasons that employers higher new employees. Here's what you can do to help your chances at landing a similar scholarship or that future dream job:

Ask lots of questions- during the interviewing process the person being interviewed should be asking just as many questions if not more than the person conducting the interview. This not only shows genuine interest and the fact that you have done research on your own about the company you applied for but it also helps for you to decide if the company is a good fit for you.

This website does a great job of giving example questions and also explaining why they are important.

Write a blog- Especially if you are entering a new field such as computer programming, a blog acts as a modern day resume. When interviewing in person or over the phone, a blog will help cover in detail some of your accomplishments and progress that you may forget to mention. Don't worry about how many readers you have, writing shows comprehension, real time progress, initiative, and the ability to communicate. This post by Tim Ferriss goes into more detail about breaking into a new industry and the importance of blogging your progress.

Do your HW- Before applying anywhere, do your research That means check out the website, look up the CEO or founder, and reach out to any current employees or graduates.

-John

10/19/15

The Selfish Gene and Programming


This book is more of a reason behind why I am learning to program than biology. I first began reading this about a month and a half ago (around the same time I began coding full time) just out of curiosity. I soon began seeing all the similarities between natural selection and coding computers today. In The Selfish Gene Dawkins explains his theory that we evolved to the conscious beings that we are today by being programmed by the most basic life forms: genes. Dawkins starts at the beginning and describes how at one point a particularly unique molecule was formed by accident and “had the extraordinary property of being able to create copies of itself.” This resulted in the first gene which then replicated and mutated itself into more complex molecules… and, well, you probably know the rest of the story.

What is so fascinating to me is that the birth of genes is similar to the birth of computers. And, like Moore's law, evolution evolves at a faster rate the more complex it becomes; kind of like the way our technology evolves exponentially as we continue to build off of the accomplishments and research of the people before us. Now, like the way we program computers (writing code; then running, testing, and modifying it to see if it works) genes program us to survive. Dawkins calls the life forms they program ‘survival mechanisms.’

Genes are in all living things and at some point certain genes began to finding new ways to modify, or program, the survival machines that they inhabit (living things) in order to better deal with the ever changing environment.

“Genes are master programmers, and they are programming for their lives. They are judged according to the success of their programs in coping with all the hazards that life throws at their survival machines, and the judge is the ruthless judge of the court of survival.”

Enter the brain, and, more specifically, the consciousness of our species: homo-sapiens. With our highly evolved brains, we now have the ability to overwrite old programs from the past to better fit our world today. For instance, people experience approach anxiety when meeting new people. Back in the day this made sense because there was real danger in meeting strangers when living in secluded tribes. Today, however, that is not the case and with education and awareness we can overcome this uncomfortable feeling in order to better our chances at survival and the possibility of spreading our genes or finding a mate.

I like to believe the moment that we reached consciousness is exactly the same as the moment that technology will reach singularity (in theory). Once we became conscious we were then able to override our initial programming. We developed birth control, altruistic behaviors, and social cultures that typically go against natural selection. This leads me to ask the question that many today are pondering: What will happen when machines reach singularity (in theory) and are then capable of recursive self improvement? Will they defy their programmers as we have defied our genes?
Dawkins goes on to describe the cultural evolution that we are influenced by. He defines these influences as memes, which is an element of a culture or system of behavior that may be considered to be passed from one individual to another by nongenetic means, especially imitation. We are thus programmed by our genes and the memes that we have created via culture that is passed down from generation. “We are built as gene machines and cultured as meme machines, but we have the power to turn against our creators. We, alone on earth, can reel against the tyranny of the selfish replicators.” In this sentence Dawkins is optimistic about our species. He is hinting at the idea that we will overcome our natural selfish behavior in favor of deliberately cultivating and nurturing pure, disinterested altruism-- “something that has no place in nature, something that has never existed in the whole history of the world.” Will robots one day evolve in a similar way?

Besides artificial intelligence relations, there is also something beautiful about it’s implications that relate to programming. It’s extremely rewarding to have the opportunity to build something from the ground up, influencing and molding it as you would a child. Programming to me is just that, creating something from nothing that will evolve into a complex application that will influence the world (hopefully in a positive fashion). Dawkins book is a great reminder that even the most grandiose ideas, goals, and individuals have humble beginnings.

-John

Free Code Camp Zipline: Build a Personal Portfolio


This project was my first Zipline on FCC and I found it to be rather difficult because I had never heard of Bootstrap and did not have much experience with html or CSS. The instructions say to reverse engineer the example given but without looking at or copying the examples code. Even though I was tempted, I did not give in to cheating on this one which resulted to me spending about four days on this project (longer than I had expected) and about 10 hours.

The most challenging things for me was working with CSS and html. I completed all of the FCC courses before hand, but the information for these two didn't seem to stick well in my brain. I began searching the internet for help and Youtube became my best friend for this project, in particular Wired Wiki and Brian Hussey’s tutorials.

There was a lot of note taking and re-watching clips to get down the nesting concepts in this project, but I eventually got the hang of it and the fact that I struggled at first gave let me know that I needed to take it slow in order to comprehend everything, which I eventually did.

My end result can be found here, which I am happy with because it met all the credentials of the project, but I could have made more of an effort to learn how to customize some of the buttons and background images. Over all this project really helped me with learning html, CSS, and Bootstrap basics!

-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

8/13/15

Laying the Ground Work

Background

I am a 24 year old college graduate from Jacksonville, Florida. Since I was 15 years old I have held a job. Through college at the University of North Florida I supported myself bar-tending at a wing restaurant on nights and weekends. After graduation I decided to take some time away from the rat race and moved to Jacksonville beach with two close friends. During this time I spent much of my time in the public library "finding myself" as I knew I was not satisfied with working in a restaurant for the rest of my life. I soon landed as an entry level sales position (the thought being anyone who bar-tends and works in the service industry will naturally do well in sales). Although I found myself highly capable in my new position I was also unhappy; I did not enjoy the work.

After more searching and logging more library hours I soon discovered computer programming. Two things jumped out at me right away. First, anyone can learn it no matter what your educational background is, and two, coding and literature (or reading and writing) have many similar characteristics. I started thinking that not only could I do this, but I could excel at it.

Fast forward to today and I have completed one course on codeacademy (Ruby), two courses on lynda.com, and have finished Chris Pine's book Learn to Program along with much research. I know I have a long way to go but my excitement level has only grown the more I learn--a good sign I believe.

I recently moved home with my mom and dad to Middleburg, Fl which is great because it removes me from distractions that I would be surrounded by if I lived near downtown Jacksonville or Jax Beach. I also have an open invitation to live with my older brother in Orlando, which I will certainly take advantage of for networking events like meet ups and conventions (there is zero tech presence in Middleburg, just woods).

Goals:
(clock starts 8/21/15)
· Secure a computer programming job in SIX months. Important because it will help me become financially independent and prove that I have what it takes to set a challenging goal and reach it. I will fulfill this goal by working 60 hours a week (10 hours a day) learning to code, going to networking events, and building my portfolio.

· Read a book a week. I'm a complete nerd when it comes to education; I think it's pretty neat. And I also believe that it is important to be well rounded so that I can create value in myself. I will read one book not related to coding a week. These books will be diverse in subject (philosophy, economics, self improvement, writing, etc.). I will accomplish this by reading two hours before bed each night.

· Get in great shape. This is important because the body and mind work in concert together and if one is out of tune it will influence the other. I will jog every morning starting with a mile a day and do strength exercises for 20 mins in the evening. I am keeping this very simple as I am more concerned with building a habit of exercising than following a strict regiment. I fully expect the distance and time of exercise to increase over time.

Simple Rules
(Influenced from the Stanford Entrepreneurial Podcast. There is an article here.)

· Wake up at 6 am every day

· Plan tomorrows schedule the night before

· Reach out to one new person in the tech industry daily. (twitter, email, linkedin, etc.)


Let the Games begin!

-John

8/12/15

In the Beginning...

Why should anyone learn to code? For me it comes down to investing in an education that makes sense in today’s ever evolving technical world. When I was searching for a degree to major in during my first couple of semesters in college I generally took the attitude that I should study the things that I enjoyed the most, and, in theory, a profitable job would follow suite. I choose to study English literature and if I could go back and do it again I would not necessarily change that. For me, the education I received from studying figures like Henry David Thoreau, Alan Watts, and James Weldon Johnson was monumental in my development as a person. The thirst for more of the things that we studied in class became desire that I could not quench, and to this day I spend much of my free time in the public libraries throughout Jacksonville.

I would, however, lower my expectations of the exchange value a liberal arts degree merits from others, primarily future employers. Perception is reality, and education is only as valuable as that reality.

My goal since my sophomore year of college was to go straight to law school after graduation. That began to change once I started to research law schools and began debunking many of the myths that surround the coveted JD. After speaking with attorneys, professors, and current law school students, I realized three things: One, practicing law is nothing like what you see on T.V.; Two, the financial investment of a law degree can be crippling-- forcing graduates to work in environments that they hate simply to pay back what they owe in student loans; And three, I realized that many of the graduates passing the bar exam are another two or three years away from actually knowing the ins and outs of the law game.

After taking a "pause" after college, I began to search for a career I could fit into, and like many other college graduates, I had no idea what I was doing.

A few months ago a friend of mine introduced me to the website codeacademy.com and told me to give coding a try. I began on the “Ruby” course. My curiosity rose. The next day I researched the mass influence that computer languages have on our world and its potential impact on the future and my curiosity turned to intrigue. People say there is a moment in our lives that wakes us up; an awakening of sorts. A moment so significant it's like seeing the world for the first time. This was not that moment for me. In fact, I envy those who experience sudden "aha!" moments that change their life around in an instant. For me that has never been the case, however, the introduction to Ruby was my very first step in taking control of my future and making a decision to enter the tech world.

"A real decision is measured by the fact that you've taken a new action. If there's no action, you haven't truly decided." -Tony Robbins

I have officially taken action. In early August I gave my two week notice to my employer and agreed that the 21st would be my last day. Since the middle of July I have been researching the proper path for a self taught programmer and I have been overwhelmed with the amount of information out there along with the amount of people in the community that are willing to help. Simply put, I can't wait for the 21st to come around so I can begin this journey full time. Until then, I will settle for nights and early mornings.

Today, as I write this, I am taking action for a better future. Creating this blog, investing in my self education, and learning a computer language are all steps that will help me reach my goal of securing a job in the tech industry.

-John