bloc referral

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

Wednesday, April 15, 2015

JSON view chrome extension recommendation



If you are not building APIs right now, I highly recommend you dedicate some time to building one. With the popularity of JS frameworks and native mobile, having data that is accessible to multiple places; Now is the time to learn and become confident in building an API, not to mention it can be extremely fruitful to one's web developer career.

I just attended a meetup where the announcement of the {JSON:API} 1.0 was announced and that is my recommendation is to use that for output of an API, only because it is my only experience, but there are other choices.

If you have already been using JSON as API serializer, I highly recommend a plugin or extension that pretty prints it in the browser. For whatever reason, I never thought of downloading something for that, but a coworker recommended the JSONView chrome extension. The extension has made my time working with APIs very nice. I recommend installing this or a similar extension in your browser today.

*My current project is a Rails API, and I am considering building a new public facing API for a popular sports team.


Wednesday, March 18, 2015

Are programming bootcamps worth the price?

The past week has been very busy and included two trips to move my stuff from Orlando to Tampa to prepare to eventually move to San Francisco. While picking up my uhaul the Uhaul employee noticed a shirt I was wearing which happened to have the logo for Extreme Networks, a vendor I worked with at Tech Data (in sales). I explained it was a networking company and he mentioned that he was looking into going back to school for networking engineering and asked me if it would be worth it.

The individual was probably around my age and I asked him why he wanted to do network engineering? He explain that it probably paid well and he was always interested in computers, and with my keen ear for hearing the customer and closing a sale I just had mention my story and how I got into software in less than 7 months. 

He was definitely intrigued and I told him about my new employer and how we teach interested individuals how to become a web/mobile developer.

This got me thinking while I drove across the state of Florida, this uhaul employee was going to go back to school for probably 15-30k in tuition for the hope in making more than what he was getting paid at Uhaul. I paid 5k for the opportunity to learn via Bloc and in person bootcamps for less the tuition and dedicated 4 years. 

While at IZEA I watched countless interviewees walk in for interviews out of college with Computer Science degrees but no real experience and no real portfolio to prove their ability develop code. 

In the United States it is preached that once you have a degree you will have a great job, but I worked at a job out of college for 24k a year because I couldn't get a job in finance.

So my question before I answer original question is, Is getting a college degree even worth it? I have Finance Degree from an accredited state school and have yet to use that piece of paper or even provided a copy of it to any of my employers. To be honest I haven't even removed it from the cardboard envelope it came 7 years ago (What a waste of $48, the cost to send it to me).

I now work at a job making more than twice as much as I my base pay in sales and a significant amount higher than my salary even with a highest received bonus'd month. When I share the amount I paid to learn via Bloc's mentorship program and discuss the cost of bootcamps with others, it is very common to hear that rebuttals to how expensive the cost is, but when you talk with the same population of people  about going back to school, there is not even a second thought about that cost. 

For some perspective: I am currently rooming with someone who made the decision to drop out of a very well known and expensive College in Nashville to pursue his dream with DevBootcampSF, which really sparked me to write this blog post. Instead of paying for 150k+  in tuition after graduation, he is now only what it would cost for one semester in College.

So are bootcamps worth it?

My response is obvious, it yes, but I truly believe if you are looking for an experience that you get when going back to school where you can just breeze by and get a job when its over, you might as well just go back to school. Bootcamps are definitely worth it, but you need to be driven and be willing to experiment with different tools, build a portfolio outside the curriculum, and be willing to attend meetups get involved in the community to eventual get that offer that truly makes it worth, but more on those details in a future post. 

Bootcamps, including Bloc, all have payment plans to help cover the cost up front. Some bootcamps even offer financial assistance for the exceptionally driven individuals.

Best of luck on your journey and your decision to learn to code. 

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!

Saturday, January 31, 2015

Making Custom User Names in Socket.io

A few months back I did a pairing session Chris Hunt and together we built a Node Chat app using the very convenient Getting Started Guide on Socket.io's doc page. We successfully completed the guide and deployed the app with minor hiccups.

Once a month here at work, we take part in a "hack day" where we can work on any project that is vaguely relevant to the business we are in or the company we work for. I took on the challenge to creating a new chat app and possibly implementing as a special feature at work.

One thing I noticed right after completing the app was the lack of user names displayed inline. While chatting with Chris on our app, it was easy to know which messages were not mine, but it would have been nice to know in case I needed to review the history.

Knowing the little node I knew I starting looking into the redis and socket.io-redis npm's and figure thats what I needed to save the username when prompted, but after a bit of time scaling the api and documentation it turned out it was only needed to save the printed chat messages for the session.

I was dissappointed when I did not find a blog post on the subject, but eventually found an old youtube video explaining exactly what I needed to know.

Each user can login with a session or socket and within each socket I needed to save their username. I was actually saving the username to late in the game and every message had the same user's name. I had to access the socket and save the username the same time as the message. Here is an example of the code:














*notice how I am prepending the chat name in the chat message while emitting the socket.

Here is the jQuery providing the chat in my view:

  












I create a new socket call to save my username that was collect from a javascript prompt and voila, the user's username got displayed each time they printed a message. I am pretty proud that I was able to complete and publish the chat app to heroku in time to present in our hack day presentation meeting.

*I made the dangerous decision of publicly displaying a chat to a projector screen.
















As far as redis, I only need that to save the previous chat messages, which for the purpose of my feature, it is not needed. There is still work to be done on the front end and how it will be render to make it a new feature, but I am pretty proud of this little guy - My Chat App.

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

Tuesday, January 27, 2015

Custom Google Calendar links.

A few post back I wrote about how to create urls with Javascript and thanks to that post I was able to make a quick change to Steamrolers page.

This Thursday kicks off our first AMA with Maurice  Cherry at 6pm. Our designer added a cool trick to the page which creates a Google Cal event for you from the provided link.  I wasn't aware you could do that until now, but it makes sense and seems to be powered by Javascript in the background.

All that is needed is a generated link, which can do easily with some provided sights or you can just create a event on your account and copy the link to the url in your browser and use that link in the href or erb link.








I discovered all this when I went to test the functionality and saw that the generated date was off. Turns out the date code in the url just needed to be updated to what I believe to a UTC translation and voila it all works  just dandy.

So if you have any scheduling needs or events to share, now you know how.







Tuesday, January 13, 2015

Chron job in node

After my recent node battle, I knew the war was not over. I still needed to set up my node script to run in the background. I know with Javascript be an event based I should be able to create a chron job for checking when ever a new signup on the form happens, I should be able to send an invite.

I first started with the forever npm package but similarly with my original requirements for running the unstable version of node, I was unable to use that package, as it is not updated for that.

I then found a StackOverflow question on running the code in an interval. As I thought, this was pretty easy. I am impressed or frustrated with node at the same time, mainly because its not Ruby. In the same vain is not too bad and I can see myself using more in the future for small scripts as the community includes some of the smartest programmers out there and can only increase my experience knowing yet another server side language.

My Code:



Monday, January 12, 2015

node Battle: The integration of slack and typeform

This weekend was planned for the exploration of new territory. I have had a new idea for my first Ember app for quite some time and was ready begin from `ember new`.

I also recently joined up with a group to startup a new idea (more details in a future post) for a community. My first task for the group was to integrate slack into the app, sounds easy enough since there is a popular blog post on how someone did it in php. I am not exaggerating when I say I have had no php experience, but expected to learn it quickly enough to follow a blog post, well the blog post was not as clear as I would of thought it to be. I expected more steps and ideas on how to run a php script and the s/o questions and google searches made too many assumptions on my skill level in php.

After spending about an hour in php, I decided to search for a different solution and possible come back to php if needed.

Here comes the node

Now what I was doing is farely new and the blog post was only written 2 months ago, either there is not a need for this sort of slack integration or I am on the cutting edge. Regardless, when I tried searching only 3 implementations came up, and one was just a bot reposting the first php article.

Luckily the other choice was node, a version of Javascript I had some experience learning in. I stumble on the cleverly named slack-typeform-inviter, great for seo, and quickly enough of the code to realize it made sense. I forked the project and began inserting the needed API keys for Slack and Typeform.

I then Ran the code and boomed error, `SyntaxError: Unexpected token *`.  Hmmm, why would someone post code with syntax errors?

Actually it is not a syntax error, but actually a new syntax for the release candidate .11. Yep the code was written on an unstable version of node and I was an unstable developer at that point.

Now I wrote my solution in what took about 5 seconds for you to read, but it took about 3 hours of banging my head on the keyboard trying to figure out how to debug this code. I removed the "*'s"  from the deferred calls, which I found out to be to sort of like yields for arguments, but once those were removed I was getting errors on the yields.

I finally removed the yields and got the code fail everywhere there was a "request" or "response" call. This was weird, so I ended up emailing the contributor. In hindsight I recommend opening up an issue on github instead, I got a super quick response letting me know it was the newest unstable node code and a picture of the developer at a KPOP concert in Thailand. I felt bad to bother him but relieved that I could get the code to work.

But only if it was that easy, I did spend about 4 hours figuring out how to install an unstable version of node and debug why it was not working on my computer. Those fours plus probably more as I moved into the next day were spend installing dev tools on my wife's mac to test that the code worked. Luckily all I had to do was copy and paste my .vimrc, which is testament to VIM and why you should use it.

I ended up discovering nvm (similar to rvm) to install the "unstable" version of node and  switch back and forth when needed.

There was an incredible amount of troubleshooting this weekend, but it taught a deep understanding of how npm and node_module management works. It also gave a chance to write some production ready node code. Also the code works which is a relief.

Thanks to Chad Scira for being so responsive in email and originally writing the slack-typeform-inviter

*I have submitted a pull request to help anyone else who might want to use the node pack in the future. Which has already been merged!

Now I hope next weekend I can get past ember new.



Thursday, December 4, 2014

My VIM config

This is a copy of my current .vimrc. Do you have any suggestions?

Sunday, November 30, 2014

ember CLI install and murdering my node

Never ever ever sudo with npm installs. I did not know this and probably unknowingly did this all the time. In my early days in Rails I never had an issue, only because once you install Rails it's stalled and be upgraded in the Gemfile. With Javascript, I am quickly finding that a lot of things require the node package manager (npm) to install and upgrade. I recently upgraded my ember to use the ember-cli, came across this sudo errors, but thanks to this homebrew issue thread I was eventually able to solve my problem.

My solution included this premade bash script called "murdering your node." From there I could clean install node and ember-cli.

If you are interested in learning Ember I suggest starting with the ember-cli-101 book. It is hands down the best Ember tutorial I have done and has gotten me pass some of the toughest hurdles I have faced in learning a Javascript MVC framework on my own.

*FYI: just to be clear you can sudo your way through npm, but it is not recommended, especially with ember-cli.

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.


Monday, October 27, 2014

Concentric Circles in Learning

When I was younger one of my least favorite cartoons was the Road Runner.  One of the main reasons that I did not like the cartoon because of Wile E. Coyote. In his effort in catching the Road Runner he never kept at it with the same tools, and always thought he had to try something new.

In the beginning of my learning to program journey, I tried everything. I tried a lot of languages before I finally settled on Ruby. I actually first started with C, but when that got boring I quickly jumped into to Ruby after spending a brief time in HTML/CSS, but years prior I attempted to learn JAVA with much failure.

I also tried a lot of different tools to learn Ruby and built up quite the backlog of things to complete, including books, videos, and course. My thought was to blow through each learning tool quick enough to learn the next, but I very rarely did things twice.

My entire outlook on learning has completely changed now that I work as a web dev, but I feel like it is for the better. I now spend more time on one learning resource at a time and actually find myself revisiting things I have already completed.

I heard of the term, Concentric Circles in Learning from a fellow Odinite, Afshin. The idea comes down to making your learning cyclical by repeating going through learning materials multiple times. My biggest complaint with Code School is that I did not understand the material the first time through. I then avoided learning Rails through the Rails for Zombie course, but when I revisited months later after completing a number of Rails Tutorials, it made much more sense.

One of the biggest recommendations I heard when going through the Rails Tutorial is to go through the same tutorial again. I met an individual at local meetup who loaned me a copy of the The Well-Grounded Rubyist after going through it 3 times. There is a lot of truth to learning more the second time around.

I now actual read books multiple times and repeat chapters as well as complete the problems in the book(Eloquent Javascript). I have been slowly working through Vim Adventures while running my test suite at work and feel VIM has become second nature because of it.

Before I felt like I was cramming for a test before an exam every time I learned something new, I now leisure read through material not worrying about capturing everything in my brain because I can always capture on my second of third time through.



I highly recommend going through resources multiple times and don't give up just take a break.

What are your thoughts on this? Do you re-read and run through videos multiple times or do you try things once?

Friday, October 24, 2014

Change your local host name

Did you know that you can update your host names. For example rather than typing in localhost:3000 to boot up your rails app, you could call up brian:3000.

All you need to do is call up `sudo nano.etc.hosts`and append a new line at the bottom with your the new alias and the reference of 1.27.0.0.1, voila. The only catch is that you need know how move around the NANO editor.

I recommend not replacing localhost but rather just creating an additional alias.

sudo nano /etc/hosts

For more info check out these detailed instructions.

Thursday, October 9, 2014

exercism_io revisited

I recently got back into exercism.io. For whatever reason I only completed the first Ruby exercise and never returned, but now I have turned over  new leaf. I have decided that I need to write more code outside of work. Lately I have only been reading books and solving small problems on treehouse.

exercism is an awesome tool that is obtainable for any novice in programming in a multitude of languages.

I feel as if I am a decent Ruby programmer but could use some help in the "Ruby Way" of doing things and best practices. exercism_io will hopefully get me to the next level; the feedback I have already received from my first submission has already helped.

I have also made my first Swift submission which was ok, the actual code did not compile and I couldn't get the test suite to run in xcode. I have been bootstrapping my learning in Swift with the free Swift books offered by Apple on the iBooks app. I highly recommend picking that up.

If you are looking to join a group on exercism, join us on the Ruby Newbie team and if you need help setting up exercism, feel free to reach out.


Friday, September 19, 2014

Why I am using git flow and you should too

I have learned many things in only 3 months real Rails Engineer(not just on tv) and I have been a slacking a bit on sharing those skills due to the increase workload I continue to take on. I did want to take the time and share on `git flow` and why I am using it on my overhaul of my breakable toy app, Chuych.

While attempting to work on my chuych app in the past 3 months I have notice that my commits are a bit all over the place and I lack the focus to complete anyone thing, for example sticking to one design. This is why I have taken it upon my self to use git flow (What is git?).

 My goal has been to give my personal projects more of a focus lately since they have been ignored. I spent a lot of time trying to get up to speed in Ruby, Javascript, and even learn iOS on the side. I can say I really lost focus on maintaining my own code portfolio. I have however been taking work home and spend a couple hours on the weekend working through refactoring and bug tracking in my work code.

I have slowed down on my learning of new skills and languages and restricting myself to only learning things that will increase my productivity at work and make my chuych app more robust (This will not effect my iOS learning). I have spent the past 2 weekends building out my test suite and it is at a point where I can no just add test when I implement new things.

Git flow  is feature of git where you can speed up your workflow, in the command line, by creating structure in your branches/commits with shortcuts. This feature will create a branch, merge a branch, and close a pull request in 2 commands. It is not uncommon for someone to work on their personal app and commit and push everything on their master branch. There is no shame in this if you do so; I was doing this up until last month. I am now using git flow to create separate branches to organize my thoughts and focus on one feature/fix at a time. This really helped me finish the last of my testing and will hopefully help me build out my design stylesheets.

If you learned rails through any tutorial they team you to commit as soon as you are done with a full feature or full programming thought. They sometimes briefly teach you about branches, but from my recollection, it gets abandoned rather quickly in the tutorial, or at least I abandoned it. It really isn't necessary to be so verbose in your branching your commits, but for apps you would like to keep around for awhile, structure is what will keep your sanity.

My recommendation is to try using `git flow` for one feature of your site, if you are not already using a similar method, it will bring sanity back to your app development just as it has mine.

The Process:

To begin you will need at least 2 branches created in your app. I named one master and the other develop, but feel to use any naming convention.

  Master Branch - This branch is standard, especially using github and coming from tutorials. I believe most Rails developers and even possible back-end git users use this branch name. If you are using heroku or another deploying method, it can be deployed from here.

  Develop Branch - This is the branch where all you code will be merged to first and tested.

It is important to keep master separate in case you merge a breaking changes or something goes wrong, the merge history should be primarily merges from develop unless its a hotfix (to be explained later).

You can also create staging, release, and QA branches but I am keeping it simple for now and suggest the same.

Install:

There are complete git flow installation instructions on the web but I will provide the cliff notes.

Start by type `git flow init` in the command line and proceeding with the steps prompted in your terminal. They will ask what branch your feature will be merged to, my recommendation is to use the defaults on the screen and the develop branch to merge to.

Workflow:

Again there are many workflow examples on the web but I will provide the cliff notes.

In my current we follow the current structure.


  1. Create a feature branch `git flow feature start <desired_feature_name>` while on the develop branch. What ever branch you are on will create the new feature branch, so make sure you are on the correct one.
  2. Push the branch to git `git push origin <new_feature_branch_name>`  this will create the branch on github, be sure your git remote is set or you will be prompted the first time. 
  3. Open pull request, on github you can use create a pull request compared to develop for peer code review. Instructions on creating a pull request.
  4. After feature is complete `git flow feature finish <chosen_feature_name>` this will merge your branch to develop and delete your feature branch locally only. 
  5. Now the final can be of your choosing, but you eventually need to merge to master and then deploy once tested. At work we would now create a release branch using `git flow release <release_number>` and repeat steps 2-4, replacing the final merge to master instead of develop.


*a hotfix is a pressing bug that will actually be merged to the master branch instead of the develop first. You will create these off master and follow the same steps 2-4.

Why:

So why do it this way? My answer is again to stay focused on feature at a time; it will also help when I actually get my app built out, I can work on multiple feature at a time if I get stuck or choose to work with another developer. I also will start using release cycles once my app hits 1.0 (i.e. has some sort of front end design).

If you are reading this and still learning rails in hopes to get a job doing it, I recommend trying this out, if it doesn't work for you, you can always delete the extra branches continue to push changes directly to master. If you do decide to do this, it would help you in the eventual interview since most companies use this or a similar technique in the development.

If you have questions or if something was unclear, please shoot me an email or leave a comment.





Tuesday, September 16, 2014

Editing a commit after the fact

Multiple times I have found myself in need of editing my commit messages due to typos or unclear messages. I have that the use of  `git commit --amend` and `git reset -- hard`.

Having a short and concise commits have been useful for myself, especially I have had to start and my feature stories multiple times during the course of the month.

Another practice in reading code to learn is reading each commit(line by line) to get a good understanding on what the code is doing. Reading commit messages on code that you have no association with could feel as an unneeded experience, but my recommendation is to do so to grasp a better understanding of the code in general.

*update* If the terminal is your default way of using git then you will need to know enough VIM to navigate. I recommend vimtutor or vim adventures. Of course you could always use the github GUI but thats doesn't feel like coding :)