bloc referral

If you are interested in learning to code with a mentor, try bloc and get $100 off.

Friday, February 27, 2015

I had a go with GO

This past months has been full of me trying new technologies, not only with Ember but I also had a chance to try out GO. Thanks to the connections made with Steamrolers.com I was able to connect with a prominent GO developer and they were able to give me recommendations on tutorials to get an understanding of GO.

My goal for 2015 was to try out some lower level programming languages as well as some functional ones. My eyes have been on GO and Rust for awhile, but do to some unforeseen circumstances I was unable attend a CodeNewbie Code Club event on Rust. I did however complete a Tour in GO and got a very high level understanding of it.

GO basially reminds of C, not that I had much experience with it, but I did do some C work while completing the Havard CS50x course last year.

Some issues I had with GO was forgetting the "returns," With GO being a low level you have explicit call return in the functions as well as handle your own garbage collection. Ruby does so much for you and makes it very nice, especially when learning to program for the first time.

I successfully submitted some code exercism which I will not share in efforts to not give away the answer to the Leap Year kata in GO, but I have to say it was quite challenging passing my first test in GO.

Package management is also handle by you, and I made the mistake of setting my project package to "main," but had the test package as "leap." This took me awhile to figure, but once I did one test passed.

I then had the trouble trying to figure out to return interpolated strings with my Leap Year integer but later found that was unnecessary within the scope of the test, I only needed return the integer, because ethe test was already returning the string for me.

Altogether my experience was ok, but it has wet my appetite enough to want to see this through. I originally installed GO via homebrew, which I also found out that was a big NO! Only because some things that I have heard that there are a few things to be desired once you really get in to GO and homebrew does not provide everything. So while attempting to install GO the right way, I came across too many errors and currently taking a sanity break until I decide give it another go.

If you are learning GO or experienced in GO and would like to pair on my installation process, please reach out.


Thanks for reading and happy hacking!

Wednesday, February 25, 2015

Deploying my first Ember App

For every Rails app I have created and thought about creating I have used Heroku. I have never had a need to use anything else, as none of the apps I have developed had users and needed to grow beyond the same place of Heroku.

It is very apparent that Heroku has cornered the market on new Rails apps and most people I know don't think twice about running `heroku create <my-app-name>`, especially with the recent announcement from ninefold and their closing down their Rails service.

When it came time to deploy my first ember app I automatically assumed I would use Heroku, since I already had the Rails api waiting in a heroku dyno. Literally the day before I deployed my app I heard a coworker mention how another company in the Orlando area deployed their ember app to a lesser know company, Divshot.

I wasn't aware of their service to deploy static web pages, and also was aware of an ember-cli addon that makes deploying to their service so easily. I had some issues that with getting my rails api url to get included in the config, but once I got that figured out it was a breeze to deploy. The deployment was actually so easy that I have completely discounted the need for heroku and might even transition some of my more popular static pages to the Divshot service.

If you are looking into publishing your first ember app, I highly recommend giving Divshot a try and using the ember-cli-addon.


First Ember app complete...sort of

I spent some time in Ember tutorials and had plans to have an Ember project built and launch back in January, but some unfortunate life events got in the way.

I am now proud to announce that I have completed my goal of getting an Ember app built and launched in 2015. The app itself if very much in an MVP state and I am looking forward to finish the other features I have planned.

Some of my experiences while working Ember how impressingly fast it is to build a Rails API when you aren't concerned with the asset pipeline or views. Ruby is a great server side language and fast enough for me, but sometimes Rails can be a little much; I highly recommend reading my blog post on the Rails API gem, which makes building an api a breeze.

Most people I have spoken with get hung up with the fact that Ember is constantly changing, which developed a very steep learning curve for learning it. I personally completed the Vic Ramon, Treehouse, ember-cli-101 resources and found them to be enough understand the basics in Ember.

I also spent some time learning form the forms and docs, as wells as attended EmberOrlando a few times.

I was basically at a point where I needed to start an Ember project and start learning things outside a tutorial, which I found to be challenging but obtainable.

My first hiccup came when I tried to connect my sample fixture data. The solution was rather easy and actually kind of silly how simple it was.

My next hurdle actually came when deploying the application to Divshot. I normaly use heroku as my go to deployment vehicle, but heard of the great tools available for ember and more specifically ember-cli. The solution for this was not as simple but I figured it out with help from @robdel12 and @jgwhite.

Takeaways:

Now that I have finally moved into world of modern day "Full Stack Developing", I am exited at the idea of separating the concerns of the api and client-side. This will give me the ability to one day try out the ever so popular React.js or even use the api data to produce an iOS app.

I highly recommend everyone who has been in rails with their head down while Front-end frameworks have been popping like rabbits.

I plan on doing more detail post into Ember and its structure in the future, but if I could recommend one tutorial to get started, it would be the ember-cli-101 book. Its the most up to date and gives you a great understand to how Ember works. It also provides the generator commands similar to Rails, that will help you get started much faster.

If you would like to view the app live, its temporary home is here and will the code is here

Tuesday, February 24, 2015

Components not Controllers in Ember

Months ago I blogged about my experience with randomly pairing with a healthy hacker,  yesterday I concluded another random pairing and with an associate,  @jgwhite. Jamie leads the Ember UK meetup and I was looking for some ember help with my current project.

I am looking to create a database for diverse speakers in tech to share with the steamrolers community.

My specific task was looking to create a save function in my controller so when ever some one creates a new speaker with my speaker form, the createRecord function would fire. Unfortunately that was not happening and actually just throwing an uncaught error.













I spent a good part of my Sunday searching through stackoverflow and forum questions trying to figure out why functions were not working.

After a bout 10minutes of explaining my issue with Jamie, He was able to identify that my problem was due to my save action being nested in a SpeakerController and the form was calling it from the higher application layer. But it wasn't enough, just to replace the save action in the ApplicationController,he recommend to go a step further and create a Component.









I now understand that despite the common comparisons, Ember is nothing like Rails other than the fact they both have opinions. The Controllers work in entirely different ways and come Ember 2.0 the use of Controllers will be removed. I am now able to use the newly created speaker-form component to call my speaker.save() function and even add an a validations like containsInvalidCharater.

Ember is definitely a moving ship, just like all other well maintained Front-End frameworks. The learning curve is high and constantly moving, but the reward with easy prototyping client side applications is well worth it. I am looking forward to using the foundation I am building with this app to create more things with Ember.

If you are new to learning Ember, I would love to pair with you or chat about your app, in effort to pay forward the help I got with mine.

Tuesday, February 17, 2015

Rails API gem

I recently took on the task to create a Rails API gem for an Ember project I am working on. for STEAMrole. It is still very much in the beginning stages but I have both the Rails and Ember playing rather nice together.

Some noticeable differences in the way I started this project was I actually started with the Ember's client side application first. I wish I could say it was rather simple but I did have some hang-ups, specially while working with fixtures. The issue turned out be how was requiring the file,  it wasn't actually an Ember thing. More details here.

At this point I have been writing test and working with the Twitter API to gather some data that is needed for that app. One of the real wins for Ember and other Javascript frameworks is the separation of concerns. I am able to work on the Rails database without concerning myself with the Front-End and vice versa.

My overall experience with the Rails API gem, not only am I able to throw an api together rather quickly with scaffolding. It also sets up some simple controller test to assert true, unfortunately they were written in Minitest. I am not aware if they could be scaffolded into Rspec as of yet, as this is my first Rails API project and I didn't setup rspec-rails yet, but have decided just to follow through with Minitest DSL for this.

The coolest thing about using this gem is being able to see the JSON data in your localhost with not a lot of effort. I highly recommend this tutorial to get you started using the Rails API gem, feel free to skip the Ember stuff if that doesn't excite you.

I am not finished with my current project, but If you interested in seeing one of my Rails API project live, check out Interpersonal Movie Database.

To get started do the follow:


Friday, February 6, 2015

Updating your git on OSX

Do me a favor and type "git version" in your terminal

If your git is not later than 2.0, then you will need to the following:

I have updating my git so many time this past year and did not realize my mac was not recognizing it. This is because git is pre-installed in the mac dev kit installed with Xcode. I found a forum which describes this in answer.

I follow the instructions now mac is now using git 2.3.0.

RVM

I wrote this tweet during my first month into web developing learning. Looking back now I can laugh at my ignorance, because I absolutely love RVM and being able to switch my rubies on the fly. It took some time but I now feel a lot better at working in the command line and installing package like RVM.

I recently spent some time pairing with a fellow Code Newbie and found RVM to be very helpful in debugging their issues.

If you are using or learning Ruby I highly recommend the use of RVM.

Use this path to install RVM:

$ \curl -sSL https://get.rvm.io | bash -s stable

*If you ever want to find old tweets, use this link

Faker error

It's been a while since I used the Faker gem for anything and had an error I spent a bit of time on. I kept getting the error "TypeError: can't cast Array to string", but had no idea where that was coming from. I checked my image string and it was fine; I also tried adding in the an Active Model Serializer for my api (but that had nothing to do with it).













I discovered via this blog post, and found out my `Faker::Lorem` call was spitting out an array and I assumed it was a string. I switched it up to `Faker::Lorem.words(2).join(" ")` and all is well.

Simple solution I know, but I spent long enough on this to make sure it was in a blog post to prevent future mistakes.

Tuesday, February 3, 2015

I can open web pages in vim

I feel as if each day I use vim I use the trackpad even less. I just discovered about the command to open chrome and open specific webpages. I will be having a lot of fun with this, but thought I should share. 

My leader key is spacebar, so all I need to do is hit "spacebar + ggg" and out pops chrome which will be automatically directed to google.com

" open web pages in vim "
nmap <leader>ggg :! open -a "/Applications/Google Chrome.app" 'http://google.com/'<CR>






*Note: I know you can do the same in Alfred, but this is VIM!

Monday, February 2, 2015

The New Ruby Newbies

After 2 months of inactivity I have decided to take the Ruby Newbies group down a different path. When I first started the Youtube chats a year ago, I was looking for other individuals learning Ruby, like myself. I have succeeded in this and now work in Rails as well as other technologies.

The model of scheduling g+ hangouts on air worked before but now does not seem to be a great way to collaborate and chat on topics associated to Ruby. I am just unable to keep up with a consistent weekly schedule anymore, but still want to assist and collaborate.

I will be unveiling a new version of Ruby Newbies, in the form of a Slack Chat. This will gives us the ability to collaborate much faster and receive help when we are stuck on certain hurdles.

*Full disclosure, I plan to make this a paid community in hopes to keep out the lurkers and less driven learners. The fee will be small and one time, but until then I am opening it up to the first 15 people who sign up as a beta test. I will then officially open it up for everyone to sign up next Monday the 9th.

All future events and announcements will be posted within the slack chat community.

If you are interested checkout the new Ruby Newbie page.