Another great testimonial from a Bloc alum!

“I started applying to Rails engineering positions very shortly after Bloc wrapped up. I ended up pretty much having the pick of the litter, and went with my first choice, an amazing web app development shop outside of DC called Viget Labs. Getting this new job has completely transformed my entire life. I really can’t overstate how large of a transformation the move was. I work full time on the Ruby team primarily on new feature development for a pretty wide range of (mostly Rails) web applications. One of the smaller, public projects that I’ve worked on recently is the http://thepaintdrop.com/ which is powered by a custom Rails CMS. The main project I’m working on at the moment is a new social network product for a very well-established company. Can’t go into specifics, but suffice to say, I could never have imagined working on such a large, well polished, and frankly, expensive application as this before my Bloc days.”

Thanks, L !

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

Parachuting into coding: we agree!

East Bay Express posted a great piece about intense programming education. It highlights the great things about this space, and the outcomes alumni can expect. From the article:

“A large part of the programs’ success is due to stringent application processes and the incredible amount of resources they throw at students. The thought is: Anyone can learn to code, but not everyone has the desire or will to spend hours staring at symbols on a computer screen.”

At Bloc, we’ve seen this time and time again, and we actually ask you to commit to 25 hours per week before you enroll. And it works.

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

A letter to prospective students

Recently, a prospective student reached out to one of our alumni to learn his perspective on his Bloc course. We want to share the interaction to illuminate the student experience and help other prospective students decide whether or not Bloc may be right for them.

Prospective Student Question

How was your experience at Bloc? What skills did you have going into the course and what skills did you pick up during the apprenticeship? Any other relevant information you can provide would be appreciated.

Alumnus Response

Bloc was a great experience for me and a lot of really great things have happened since I’ve graduated. I’m getting more freelance projects and interest from companies looking to hire. The experience has been exciting and encouraging.

As far as skills go, I am a computer science major so when I started Bloc I already understood the basics of computer programming. Ruby and Ruby on Rails, however, were completely new to me. And while I happened to have had a foundation in computer programming, this foundation was not essential because Bloc teaches the full-stack of web development, including testing, Ajax CSS and JS and other important aspects of web development I had never done before. Taking this course helped me get an idea of how much work goes into developing one single web application—from creating wireframes to deploying the web app on a production server. These are just couple of skill tid-bits I took with me after graduating. I would recommend keeping yourself in touch with the web development community (including Bloc) even after the course ends. Try to build as many different applications as possible to gain a range of experience and to get an idea of how these applications work in the real world.

Another piece of advice: Be highly self critical and follow a specific, methodical route. Because the course is online and there is nobody to tell you do this or that, it can be easy to get distracted or to put Bloc at the end of your priority list. Bloc has created a great curriculum, and if you follow it and take advantage of Bloc’s mentorship program you will become a very good web developer. Know that you won’t be mastering every facet of web development but rather building a foundation of the essentials as well as the skills to acquire future expertise.

Web development is a vast field with unlimited possibilities and applications. Bloc will help you understand that. Post Bloc you will be capable of choosing the areas that suit you best and you will have the ability to train yourself accordingly. I believe that Bloc will put you on the right path towards becoming a good full stack web application developer.

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

Choosing the Right Web Development Course for You

How do you know which web development course is right for you?

We know it can be difficult to make sense of the dizzying array of options in the marketplace, especially when lofty claims and gimmicks abound. Let us give you our informed and honest opinion on the dynamic of our industry.

Web development schools can be divided into three categories:

The free programs are for those who want to tinker; for people who are somewhat curious about web development but aren’t looking to attain a high degree of competency. If your goal is to become a serious, holistic web developer quickly, we recommend “warming up” with the free stuff, nothing more.

The low-cost programs generally offer more in terms of curriculum. They are self-paced and thus require an enormous amount of self-discipline and time. Many are free-form and require the students to make strategic decisions about what topics to cover and in what order, and there is no guidance if you get stuck. The lack of coaching or mentorship can test your patience if you’ve spent a lot time and need an expert to help you resolve a problem.

The intensive courses are fundamentally different in that they offer a highly structured curriculum taught in a few months or less, with continual guidance from teachers who guide your learning and development. These programs are designed to output professionally competent web developers, and require students to commit to their learning for a brief amount of time. There are a number of high quality intensive web development programs out there. We think that DevBootcamp and AppAcademy are two examples of great programs. However, the intensive web development programs require physically relocating for around three months (unless you happen to live near a campus). They are expensive, in the range of $12,000 to $15,000 or a large salary percentage. At Bloc, we know that relocation and 5-digit tuition aren’t possible for many people.

Bloc is the only intensive online learning platform for accelerated skill acquisition and career advancement in web development. We combine a thoughtfully-crafted, comprehensive, demanding curriculum with access to as much one-on-one time with an experienced professional mentor as you need, and we are accessible from anywhere in the world. Expect empathy. We know learning alone can be tough, and we work hard to support and guide you if you get stuck or need help. If you follow our program and commit the time required, you will become a fully competent web developer.

Our course is an investment in your professional development and creative potential. We’ve built Bloc based on what works: a results-driven curriculum and a time-tested apprenticeship model. That said, our course isn’t for everyone. It isn’t quick or easy, and what we offer is not a magic bullet solution. But if you are serious about web development and willing to work hard, you will possess the skills expected of a professional web developer.

We like to think of Bloc as a door to the exciting, dynamic world of web development and as a tool for lifelong understanding. When you’re ready for the journey, we’d love to be your guide.

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

Ruby Exercise: checking credit cards

Ever wondered how credit card processing works?

Nowadays with services like Stripe, it’s easy to forget how much infrastructure is required to accept credit card payments. There are checking accounts, merchant accounts, payment gateways, not to mention the the financial institutions that back your credit cards.

At Bloc, we see students become more and more curious about these systems. New web developers tend to hit an “aha” moment where they realize there isn’t as much magic to the systems we use every day, and credit card processing is no exception. So we decided to expose one of our fun interactive exercises usually reserved for Bloc hackers to the world — and today it comes in the form of a credit card validator.

Head over to our Credit Card Exercise to see if you can complete the challenge!

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

Readability and the Golden Ratio

We recently updated the visual layout of our curriculum and were surprised to find that a few simple typographical and layout changes led to some great increase in readbility. Check it out:

Comparision

Click here for a larger view.

Here are some of the key changes we made:

  • The width of the content body is smaller.

  • The line height of the text is larger.

  • The margins around the headers are more pronounced

  • The font weight is lighter

  • The font weight of the code snippets is normal instead of bold

There is apparently a relationship between font size, line height, and line width that follows the golden ratio and leads to very nice readability [1]. Here’s an example of the theoretical best proportions given the standard 16px base font size:

  • Font Size: 16px

  • Line Height: 26px

  • Line width: 685px

Check out Pearsonified’s Golden Ratio Typography Calculator to help you figure out what proportions work best for your site. With about eight lines of CSS you could make your copy an order of magnitude easier to read.

  1. Secret Symphony: The Ultimate Guide to Readable Web Typography
Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

Fizzbuzz on Bloc

In Why Can’t Programmers Program?, Jeff Atwood discusses the famous Fizzbuzz challenge, his frustration at how many programmers can’t solve it, and the implications for hiring. The challenge goes like this:

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Using Ruby, Can you solve Fizzbuzz on Bloc?

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

April 24, 2013

Perfect Email Threading in Rails

During [our bootcamps](https://www.bloc.io), students have access to a community feed where they can  ask questions and discuss topics with each other and their mentors. They can participate in the feed directly from their email client by receiving notifications and replying to the emails to add a new comment on Bloc.  We ran into a problem where our emails weren't being threaded correctly depending on what email client you were using, but eventually figured out how to do it consistently across GMail, Mail.app, and Sparrow by setting the following email headers:

– **Message-ID:** This should be a unique ID (in the context of your application) for each email.

– **In-Reply-To:** This should be the `Message-ID` of the email we're replying to.

– **References:** This should be space-separated list of each `Message-ID` of the history of the thread, starting from the parent email but not including the current email.

## An Example in Rails

Here's how you might set the headers in Rails `Comment` model where there is one parent comment with multiple children:

“`ruby

class Comment < ActiveRecord::Base

 has_many   :children, :class_name => "Comment", :foreign_key => "parent_id"   

 belongs_to :parent,   :class_name => "Comment"

 …

 # for reply-by-email

 def mail_headers

   if parent_id.present?

     parent_message_id = parent.message_id

     ancestors = parent.children.

                        order("created_at DESC").

                        where("created_at < ?", self.created_at).map(&:message_id)

     references = [parent.message_id] + ancestors

   else

     # in this case, this is the parent comment

     parent_message_id = message_id

     references = []

   end

   {

     "Message-ID"  => message_id,

     "In-Reply-To" => parent_message_id,

     "References"  => references.join(" ")

   }

 end

 def message_id

   "<comments/#{id}@bloc.io>"

 end

end

“`

We're using the scheme `"<comments/#{id}@bloc.io>"` to create a unique `Message-ID` for each comment, it's based off of a similar pattern we saw Github use in their email headers.

Then, when we send an email we just need to set these headers:

“`ruby

class UserMailer < ActionMailer::Base

 def new_comment(comment, user)

   # this is where we set the message-id, in-reply-to, and references headers

   comment.mail_headers.each do |key, value|

     headers[key] = value

   end

   mail :to => user.email, :subject => "[Bloc] New Comment"

 end

end

“`

This should set your emails to be perfectly threaded across email clients.

## References

– [Jamie Zawinski on Netscape's Algorithm for Message Threading](http://www.jwz.org/doc/threading.html)

– [RFC 2822 – Internet Message Format Documentation](http://www.faqs.org/rfcs/rfc2822.html)

– [Github's Email Headers](https://gist.github.com/choxi/b603559f21c1e7efe18a) *

\* This is just an excerpt with some of the private information scrubbed, you can see a full output via GMail's "Show Original" option.

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

April 22, 2013

New Method Interview

New Method is a blog that describes itself as "An intentional community for aspiring web developers." We really like the work they're doing there and decided to do an interview with its creator, [Scott Magdalein](http://scottm.co/):

> **What differentiates Bloc from others in the bootcamp space?**

> We believe in the same educational philosophies as other bootcamps — that learning is fundamentally social and you can’t truly acquire a new skill set without being immersed in a community of other experts and learners. We differentiate from other bootcamps by being the only one that’s entirely online. We’ve taken on the challenge of producing an engaging and immersive experience that’s entirely virtual, so that you don’t have to quit your day job or move to San Francisco to learn web development.

> **What does the typical week look like for a Bloc student?**

> Bloc students spend their 12 weeks of the bootcamp going through our curriculum, which we call “the roadmap”. It consists of bite-sized chunks called “checkpoints” that cover a specific topic. Each checkpoint has a ~5 minute screencast that goes over the concept and some code, and then an assignment that you have to submit to complete the checkpoint. Over the entire roadmap, we cover everything you’d need to know to be a professional web developer.

> Throughout the bootcamp, you have a lot of different channels to interact with the global community of all Bloc students, your own cohort of peers within your bootcamp, and your personal mentor who keeps office hours to help you whenever you get stuck on a checkpoint or have any question about web development in general. During office hours, you can instant message, screen share, or video chat with your mentor.

> **What is your vision for Bloc’s future?**

> I’m not sure if everyone will get this reference, but there’s a scene in The Matrix where Neo’s getting some data uploaded into his brain, and then opens his eyes and says “I know kung-fu.” That’s our goal, more or less. We want to build the most effective, engaging learning experience possible to allow everyone to keep up with the incredible rate of change our world is going through right now.

You should check out the full interview [here](http://newmethod.co/post/45812046150/coding-bootcamps-interview-with-ceo-of-bloc-roshan). The whole blog is a really well put together set of resources for aspiring web developers, check it out: [New Method](http://newmethod.co/).

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone

April 17, 2013

Running Ruby in Your Browser

The most popular strategy for running Ruby in your browser is to do it server-side in a sandboxed Ruby environment. [Codecademy](http://codecademy.com), [TryRuby](http://tryruby.org), [CodeSchool](http://codeschool.com), [RubyFiddle](http://rubyfiddle.com/), and [Bloc](http://www.bloc.io) all use the server-side solution.

At Bloc we run an isolated Sinatra app called Hendrix that `eval`'s the code and asserts optional RSpec tests against it. The upside is the high level of parity you get with actual production-grade Ruby code, i.e. you can use whatever version of Ruby you'd like, you can add whatever gems you want to use, and basically any limitations enforced are up to you entirely. The downsides are that it can be slow and it isn't trivial to setup a sandboxed Ruby environment, though there has been some progress in that space:

– [YouTube: Sandboxing Ruby Code](http://www.youtube.com/watch?v=ntIzf9onRqA)

– [Github: RubyCop](https://github.com/envylabs/RubyCop)

– [Github: Sandboxed](https://github.com/QaDeS/sandboxed)

– [Github: RubyFiddleExec](https://github.com/jwo/ruby-fiddle-exec)

Most of these solutions have dealbreaking downsides, for example: RubyCop doesn't let you run `while` loops and `RubyFiddleExec` only scratches the service of being fully secure from arbitrary code injection. The canonical server-side solution most companies have moved to is using JRuby, since it allows you a lot of flexibility with your Ruby code while having good sandboxing control using the JVMs built-in security mechanisms.

### Emscripten

[Emscripten](https://github.com/kripken/emscripten) is a compiler that takes LLVM byte-code and converts it into Javascript. This means you can take languages like Python and Ruby, compile them into Javascript, and load them into your browser.

You can see some of the languages that have been emscript'd on [repl.it](http://repl.it). For Ruby, there's actually two options:

1. [Github: emscripted-ruby](https://github.com/replit/emscripted-ruby)

2. [Github: WebRuby](https://github.com/xxuejie/webruby)

emscripted-ruby is MRI (common Ruby) version 1.8.7 and webruby is [MRuby](https://github.com/mruby/mruby).

It's not too difficult to setup after you figure out how.

“`html

<html>

 <head>

   <script src="https://bloc-global-assets.s3.amazonaws.com/emscripted-ruby.js"></script>

   <script src="application.js"></script>

“`

“`coffeescript

# in application.coffee

# compiles into application.js

class RubyEngine

 constructor: ->

   Ruby.initialize(null, @out, @error)

 eval: (code) ->

   try

     Ruby.eval(code)

   @readBuffer()

 out: (character) =>

   @buffer.push(String.fromCharCode(character)) if character?

 error: (character) =>

   @buffer.push(String.fromCharCode(character)) if character?

 buffer: []

 readBuffer: ->

   bufferCopy = @buffer

   @buffer = []

   bufferCopy.join("")

engine = new RubyEngine

engine.eval("puts 'hello world'")

“`

There are some gotchya's that the `RubyEngine` wrapper helps you avoid, but once you've got it set up it's as simple as:

“`coffeescript

engine = new RubyEngine

engine.eval("puts 'hello world'")

“`

For WebRuby, it's a little bit easier and doesn't require a wrapper:

“`html

<html>

 <head>

   <script>

     Module = {}

     Module["print"] = function(line) {

       // This gets called for each line of $stdout and $stderr.

       // By default it will log to the console but you can overwrite

       // it to collect the output.

       console.log(line);

     }

   </script>

   <script src="https://bloc-global-assets.s3.amazonaws.com/webruby.js"></script>

   <script>

     ruby = WEBRUBY();

     ruby.run_source("puts 'hello world'")

   </script>

“`

They have their tradeoffs: emscripted-ruby suffers from some memory leaks because the MRI garbage collector isn't emscriptable so it's just turned off entirely. I'm still investigating to what degree that's a problem, it doesn't seem to take up any more memory than a Flash video in Chrome.

The file size of `emscripted-ruby.js`, after being run through the javascript closure compiler, is a whopping 3.3MB though. WebRuby is much lighter, with `webruby.js` weighing in at 677KB. However, since it's compiled from a much lighter-weight version of Ruby (MRuby) built for embedded systems, it lacks some features. RegExs were only added to MRuby this February, you can't use the `%w(1 2 3)` syntax of creating Arrays, and you can't set new instance variables on core classes and modules:

“`ruby

# this won't work in MRuby/WebRuby

numbers = %w(1 2 3)

class String

 def foo

   # this won't work in MRuby/WebRuby

   @foo = "bar"

 end

end

“`

Either way, it's a pretty simple way to get Ruby into your browser without the overhead of setting up a sandboxed JRuby environment.

 

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on RedditEmail this to someone