Categories
Dev Bootcamp

Wrapping up at DBC with “Bring Home To Mom”

It’s been an amazing 9 weeks at Dev Bootcamp. I’ve learn so much more than I thought I would in 9 weeks, and more importantly, made many new connections and friends. Each one of my cohortmates will do big things.

During the last week of DBC, we pitched ideas to the entire school and the best pitches were selected to become final projects. I couldn’t ask for a better team (Jonathan Berk, Sofie Garden, Kevin Ceballos, and me). We were all motivated, self-driven, and always the last to leave the building. I knew I could rely on each one of my teammates to push the project forward. In just 7 days, we’ve packed SO many features into our app while still keeping it simple and easy to use on the frontend.

Some of the technologies/frameworks we used include:

  • Ruby on Rails
  • PostgreSQL
  • Javascript
  • JQuery
  • AJAX
  • handlebars.js
  • Faye messaging system
  • HTML5
  • CSS3
  • Responsive Grid System
  • Stripe API
  • Twilio API
  • Cloudinary API
  • Rotten Tomatoes API
  • OMDB API

Some of the features include:

  • Create child profiles
  • Smart matching system based on filters and interests
  • Autocomplete
  • Dates dashboard
  • Design a date page
  • Choose a date experience
  • Real-time messaging system
  • Pre-fund dates
  • Text notifications
  • Responsive design
  • Asynchronous updates for best user experience and minimal page reloads

And finally, here is Bring Home To Mom (51min-104min):

I will miss you guys!

Before:

2015-04-16 18.10.32

After:

2015-04-23 04.10.08

Team Bring Home To Mom:

2015-04-24 12.19.35

Categories
Dev Bootcamp

From Ruby Hashes to JavaScript Object Literals

From the perspective of someone who has a primer on Ruby and jumping onto JavaScript, I noticed something used very often in Ruby that is missing from JavaScript: Ruby Hashes. How can such a powerful data type not exist in other object-oriented languages? If you are also completely new to JavaScript and have the same question, fear not! There is something in JavaScript we can use to achieve the same features provided by Ruby Hashes: JavaScript Object Literals.

MDN defines an object literal as “a list of zero or more pairs of property names and associated values of an object.” As you can see from the definition, this is very similar to Ruby Hash‘s pairs of keys and associated values.

Here is a side-by-side comparison of creating, reading, changing, adding, and deleting a new JavaScript object literal versus a new Ruby hash literal:

JavaScript Object Literal:

//creating new JS object literal
var capitals = { spain: "Madrid",
  france: "Paris",
  italy: "Rome",
  hungary: "Budapest",
  germany: "Berlin"
};

//accessing JavaScript object value
capitals["france"]; //returns "Paris"
capitals["belgium"]; //returns undefined

//changing values
capitals["france"] = "Nice";

//adding a new property/value pair
capitals["russia"] = "Moscow";

//deleting a property/value pair
delete capitals["italy"];

//final result
console.log(capitals);
/*
prints:
{ spain: 'Madrid',
  france: 'Nice',
  hungary: 'Budapest',
  germany: 'Berlin',
  russia: 'Moscow' }
*/
Ruby Hash Literal:

#creating new Ruby Hash literal
capitals = { spain: "Madrid",
  france: "Paris",
  italy: "Rome",
  hungary: "Budapest",
  germany: "Berlin"
}

#accessing Ruby hash value
capitals[:france] #returns "Paris"
capitals[:belgium] # returns nil

#changing values
capitals[:france] = "Nice"

#adding a new key/value pair
capitals[:russia] = "Moscow"

#deleting a key/value pair
capitals.delete(:italy)

#final result
p capitals
=begin
prints:
{:spain=>"Madrid", :france=>"Nice", :hungary=>"Budapest", :germany=>"Berlin", :russia=>"Moscow"}
=end

See how similar they both are? Creating a JavaScript object literal is almost the same as creating a Ruby hash literal. It is important to note that while Ruby hash keys can be any data type (i.e. symbols, strings, integers, hashes, etc.), JavaScript object properties can only be variables. But they can point to any data type value, just like in Ruby hashes.

You can call a JavaScript object’s properties in a similar fashion as you would a Ruby hash‘s keys. Same with creating and deleting key/value and property/value pairs. Calling a non-existent key or property will return nil or undefined.

Note that while I used the bracket notation here to access and modify a JavaScript object’s properties, you can also use a dot notation. For a more in-depth explanation of the differences between the two types of notation, take a look at this medium article.

The next time you find yourself working with JavaScript and are looking to implement something similar to Ruby Hashes into your script, JavaScript object literals will fit the bill perfectly.

This blog has been initially published on tonymai.github.io.

Categories
SEO

33 DOs and DON’Ts: SEO Factors to Consider for On-page Website Optimization

On-page SEO factors are aspects of a web page that can influence the page’s search engine rank. These are easy to do, and small changes can have a big effect on the page’s rank, so everyone should optimize their website’s on-page factors.

That being said, here is a list of 33 basic SEO do’s and don’ts for on-page optimization:

META TAGS AND KEYWORDS:long tailed keywords

  • DO include keywords in your website’s title tag, meta tags, and URL when it makes sense.
  • DO write a compelling meta titles and meta descriptions. They often appear on search engine results pages. It will be what convinces a visitor that your content is what they are looking for and to click on the link to your page.
  • DO include keywords in your content and image alt tags.
  • DO emphasis keywords in your content by formatting it. Put it in header tags. Make it bold or italic.
  • DO include keywords in anchor texts from inbound links.
  • DON’T stuff your keywords all over the place and where it doesn’t make sense.
  • DON’T target general keywords. Make it specific. It is easier to rank for specific long-tailed keywords than general keywords. The audience that come to your website from more specific keywords will also be more relevant to who you are looking for.
  • DON’T worry too much about the meta keywords. I would still suggest you to put your keywords in there, but don’t spend too much time on it. Meta keyword is a depreciated tag that doesn’t really get used for the most part.