bloc referral

If you are interested in learning to code with a mentor, try bloc and get $100 off.
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Wednesday, January 28, 2015

Learn Javascript quickly with WatchMeCode Screencast

A few months back I sent out a tweet to Advi Grimm, trying to find a screencast service similar to Ruby Tapas, but for Javascript (If you write Ruby and do not have a Ruby Tapas subscription, you need to sign up today).

I actually did not get a response but actually got an email from Advi a few weeks later announcing special pricing for Ruby Tapas subscribers to the WatchMeCode screencast from Derek Bailey. I believe I signed up the next day and binged watched almost all the episodes during my 2 weeks off of work.

The videos were slightly longer than a Tapas but filled with a large amount of content on Javascript. I attempted to learn Javascript properly a few times in the last year and failed to grasp the concepts of Prototypes, Closures, etc. Things finally started clicking thanks to this unique form of sharing code through screencast. I would consider myself now moving away from the entry-level to junior programmer and this is thanks to screencast like these who have given the ability to implement new tricks into my development.

I have a couple node projects complete which knocks off one item from my 2015 goals. I now have my eyes on GO and Rust, as well as putting together my first Ruby Gem very soon. Stay Tuned

Wednesday, January 7, 2015

Breaking down URLs with Javascript

I didn't think this would be a big deal but I had the worst time trying to get a date picker and a custom filter to work in my search form.

More Details:

I took on the task at work to create a dashboard of activities for users, Ideally you would be able to login and access list just as you would see anywhere else, equipped with dates, dollar amounts, and etc. This public activity list was easily created, needed the ability to be filtered down by some given params which are to be a date range and filter type.

Knowing how to build a form I created just that, that included an already built Javascript date picker, specifically Pickaday. One of the nice things about working on an app is all the decision of what plugins and gems have already been made, and for the most part they some of the best decisions to solve the problems at hand; All I have to do is engineer it all to work together.


"This all sounds pretty legit until I actually try it"


I did not take into account that my Javascript skills are still very amateur. I also didn't realize that I knew nothing about url's and query params. I actually only just learned today, after it was explained to me coworkers. Imagine spending your whole life and just now figuring out how to tell time, that's how I felt when I learned about query params.

So are you ready to learn about them?


http://theblackc000000de.blogspot.com/search?q=bloc


The url I provided above includes a query string, do you see it?
It begins with the "?" and includes everything after it. If I wanted more params in the url, I could add an ampersand(&) and include more, like so:


http://theblackc000000de.blogspot.com/search?q=bloc&from=Dec%207,%202014&to=Jan%208,%202015


Not actually valid for this page but hope you get the idea, I passed in to and from dates to limit the blog post that were returned. So now I have 3 params: to, from, and q

The JS file that includes the date picker already had working code, which actually works for to and from but no longer q, which a select box with multiple options.

I was creating a url with no issue but the forgot to pass in a param key in the url build; Once I added that everything worked as expected.

My Solution:

*The url is being created in the last line








*variable names were change to protect the innocent

Another plus with working with Rails, I am able to call debugger/raise in the controller to manipulate the provided data received from this param, i.e. where all the filtering happens. Another plus is Ember has a lot of this handle, which is explained in their documentation - but I am not quite there yet.

This was all new to me and quite an eye opener, I hope this post will anyone else in working with url queries.

More info on url queries.

Thursday, November 20, 2014

Setting up Jasmine TestRunner

Shortly after I wrote my previous post I found this awesome video on getting the Jasmines Test Runner set up. Javascript testing is still a mystery to me when it comes to set up and preferred DSL'a, but it seems as if Jasmine is quite popular and where I will be spending most of my time.

I am also interested in Chai, just because it sounds so good with Mocha

Monday, November 3, 2014

My tour with Javascript

I have spent this weekend learning some more Javascript using the book Eloquent Javascript. I have not put as much dedication in learning Javascript until very recently. I have worked through part III of the Javascript Roadtrip on Code School which has been challenging, but not hard I previously thought.

I am finding having a basic understanding in Programming and Ruby makes learning more advanced Javascript a lot easier. I am about to begin chapter 8 and very much enjoying this book and the ability to solve exercises in the browser. I am however, having a lot of trouble just figuring my way around solving problems outside of book. I spent 3 hours on the exercism problem that I solved easily in Ruby.

Learning the Javascript way of doings things has proven to be the challenge. For example I am currently trying to figure out enumeration in Javascript, which is easy in Ruby because I know the name of the standard library methods. I just need to find better sources for looking up Javascript functions, `forEach()`.

Friday was another "hackday" where I spent the entire time working on an app for work called "Beer Club." I am part of a club where we all chip in to buy a new keg for the office and seem to be getting hung up on the voting of a new keg. The app would allow us to add multiple beers to a list to eaily vote on.

I unfortunately started the app in Ember and spent most of the day learning how to play nice with the framework. It was a similar experience when I tried to first learn Rails. The day eventually ran out I restarted the app in just Rails with a basic bootstrap template. I am looking forward to finishing this app for obvious reasons and plan to shoe horn Ember in it once the Rails portion is complete.

My plan is is to now switch my focus away from iOS and put all my learning efforts into Javascript, since it is a tool I use at work and will benefit from a lot sooner.

2014 was the year of Ruby for me, I am thinking 2015 will be full of JS.


Tuesday, August 19, 2014

My Javascript book next read list

I spent some time reading Eloquent Javascript and it has been a tremendous help in better understanding Javascript. The book itself was listed as a beginner book on the free book list and has been an easy read with already having Javascript experience.

I spent a lot of time avoiding books due to the fear of not understanding, but I have found that book have been the greatest help in understanding towards the next level. I have already completed the second part of the Well Grounded Rubyist. My goal with recording these book reviews will be to force myself to read and understand them by presenting its contents. If I had more time I would start a similar Ruby Newbies Group for Javascript.

For the time being I will be focusing on finishing Eloquent Ruby and Eloquent Javascript and then proceed to the books below.

Eloquent Javascript - Beginner
Speaking Javascript - Beginner
Javascript Applications - Intermediate
JS the Right Way  - Intermediate
You Don't Javascript - Advanced

Friday, August 15, 2014

My tour through more Javascript components

I have spent a lot of focus on Ruby during my journey, but as of late I have been bootstrapping my learning with Javascript. The following is not pure Javascript but some of the components associated with it.

Last week I was tasked with adding a modal to the display ruby functionality, something I do not have much experience with. I have previously worked with Ajax and jQuery by including snippets in my app, but never to the scale I had to this week. It took me half a day just to get the Ajax working, all of the resources on the web push you towards a simple implementation with Coffeescript examples, but that was unfortunately not helpful. I needed to learn how to implement a solution using javascript and without js.erb files.

The article that helps me most was this blogpost. It helped me understand that Ajax works very similar REST, which I got a lot of experience with while working with the Twitter API. The similarity is because the Ajax sends/receives request via JSON. Once I realized it was JSON, I knew I just needed to parse the JSON using jQuery. I spent a lot of time learning jQuery last week and how it handles events.

Think of REST and JSON as a hash or dictionary of information that can be parsed. They seem complicated but they are not.

My apologies for not giving much context but the message was sent using the this one line in my controller and received by the following jQuery function.


I highly recommend taking the time to learn Javascript, as it is intertwined a lot of the web. I sent out a tweet this week with a whole list of free Javascript books on the web. I am looking forward to learning more in the future and hopefully sharing in more detail about JSON, Ajax, and jQuery.

Thursday, July 24, 2014

No need for CoffeeScript now

This morning our post scrum it was announced that we will no longer be writing production code in CoffeeScript. I mapped a plan in learning multiple new skills in JS and Ruby, which including working through a free book. I now have no need to learn it now if I want to stay focused on learning skills need to advance in a career in web development.

I have not written much production code using CoffeeScript or Front-End code for that matter, so I will not find it hard to completely stop learning this language. I am at a time where all my learning aside from iOS stuff will be closely related to the work I do (though a new Tweet from my CEO says otherwise). My main goal is to advanced my skills in Ruby and Vanilla JS. I still plan on skimming through that book eventually, but with no emphasis on writing the code.

Once I have a stronger understanding of JS I will really look into looking a CoffeeScript then. I feel as if CoffeeScript was made for the Rails devs with limited JS knowledge, but a desire to write it. From what I did write, I found easy to pick up; CoffeeScript has a lot of similarities to Ruby and it's simplicity, but also has a lot whitespace restrictions, similar to HAML.

What are your opinions on CoffeeScript vs. Javascript?

Thursday, July 3, 2014

!!Bryan - I am taking another look at my goals for 2014

I actually used the double bang (!!example) in actual production code at work. But first, I was taught what it actually does. There are some hang ups with using it, but just keep it use in the back of your mind in case its ever needed. Basically forces a Boolean.

Orlando.js

8 months later after I attended my first meetup, which happened to be at Envy/Code School,  I attended my second meetup there tonight. I told myself I would make it out there again but never did. For one reason its over 2 hours to drive from Tampa with Orlando 9rush hour/disney) traffic, but luckily I now live in Orlando and 2 miles from the Envy office.

I attended the second ever Orlando.js meetup, which make me surprised that there was not one before, since there are 3 Javascript in Tampa alone. Tonights meeting was in detail on OOP in JS. It kind of got me excited to learn more vanilla JS and check out some books, but for the moment I am focusing on getting through these Objective-C and Ember tutorials, but its tempting to jump into more with all these meetups.

There is without exaggeration a meetup happening every week that is programming related and I plan on being at most. I might as well take advantage of the opportunity while I am so close to them.

Goals for 2014

As mentioned before in a post, I wrote some goals out for the year and I had the opportunity to check them out again. I have every intention to complete all by the end of the year, but realize I am behind. However, I did complete the goal of getting a job.

In short I still need to create a tutorial, which I might change to give a talk (since there are so many meetups). I also need to deploy and publish a functional app, which will be Chuych eventually, and finally based on the mention by Daniel during the Ruby Newbie chat; I will be trying to hit a goal of 75 stack overflow questions answered by the end of this year(not necessarily correctly). I needed to start this yesterday.

Well if you have a question for me put it in s/o, I guess...