Tips for Self-Learning Programming

My friend who's learning programming asked me the other day: 'What do you recommend for learn programming quickly?'. I learned programming by myself when I was in college, and over the years I've realized how I went about it in the hardest way possible. There are many things I could have done to learn at a much faster rate. Hence, I thought I'd look back and write down some of the things I've learned over there years about learning programming.

»
Author's profile picture Jorge Silva

Connecting 2 RethinkDB clusters with proxy node

Just yesterday, I got the following question on Twitter:

»
Author's profile picture Jorge Silva

Setting up Travis.yml tests with RethinkDB

Because you're a good developer, you often write tests for the code you're writing. Because you're a really good developer, you often use tools like Travis CI for continuous integration.

»
Author's profile picture Jorge Silva

The most important tradeoff when modeling data in RethinkDB

A question many RethinkDB users commonly have is: "How do I model my data?". Because RethinkDB is a NoSQL document store with no schema enforcement but with joins, people get a bit confused about how to structure their data. Should it be more like MongoDB or should it be more like SQL? How is data modeling in RethinkDB different form other databases? Is what I know now still useful? Data modeling in RethinkDB is so flexible that it can be a little overwhelming to decide how to structure your data, and it's young enough that there aren't a lot of battle tested best-practices out there. But, a lot of already established principles for data modeling are perfectly applicable in RethinkDB.

»
Author's profile picture Jorge Silva

Why your query language should be explicit

A couple of days ago I was having a conversation with a developer about the product he's working on and his experience with RethinkDB. He caught me off-guard when he mentioned that, when writing ReQL (RethinkDB's query language), he always had a clear idea of what was going on and how the database was working as a whole. Didn't that happened will all databases he uses? He was a Postgres guy, with a lot of SQL experience, and for him Postgres was always too complex to completely understand. If you really wanted to understand something in Postgres you had to dig into the internals. With RethinkDB, he explained to me, the queries themselves exposed a lot of the logic behind how the database works. This, perhaps counterintuitively, made using RethinkDB much easier.

»
Author's profile picture Jorge Silva

Sample Data for RethinkDB

Often times, people who are new to RethinkDB want to play around with the database but don't have a data in mind to use it with. Because of this, I went ahead and made a repository with some small data sets taken from Wikipedia.

»
Author's profile picture Jorge Silva

Django and Realtime: Using Django with Tornado and RethinkDB

Over the last couple of months, I've been writing a lot of Node.js code using RethinkDB. After writing so much JavaScript, I started missing Python and Django, which I've used extensively over the years. Because of this, I decided to port on of my original Node.js RethinkDB chat apps to Django as way to compare the Django and Node.js.

»
Author's profile picture Jorge Silva

Tutorial: Using Passport OAuth with RethinkDB

I've run into many people who have problems setting up authentication on their Node.js applications. Even with a library as great as passport, it's can be tough to setup authentication in your app. Yet, while it's tempting avoid it, authentication is essential for many types of applications.

»
Author's profile picture Jorge Silva

Video: Building a realtime photo sharing whiteboard with RethinkDB

Last week, I spoke at RethinkDB's monthly meetup. I gave a short talk on how to build a realtime photo sharing app with RethinkDB changefeeds and binary data. The talk is based on a post I wrote earlier in March.

»
Author's profile picture Jorge Silva

Is it possible to implement an `if` method? A look at the ReQL `branch` method

One of the things that makes RethinkDB different from other databases is that its query language is embedded into the programming language. Unlike SQL, you use ReQL by installing a client driver for your programming langauge and building queries with this driver. The driver builds a query and then sends that query to the server to be executed and returned. An example of a ReQL query looks like this:

»
Author's profile picture Jorge Silva

Tutorial: Building a realtime image sharing app

Recently, I built a simple realtime image sharing app. In this app, images can be uploaded, deleted, and moved around, all in realtime. The app uses RethinkDB changefeeds and binary objects stored in the database to push changes to a Node.js server which then publishes changes to all clients through a socket connection. Inspired by this app, I decided to write a short tutorial on how to make a similar app.

»
Author's profile picture Jorge Silva

The Life Of A ReQL Query: Going Through All of RethinkDB's Data Types

So you've been writing a lot of ReQL or have started messing around with it. You (obviously) love writing queries in it, but sometimes you get weird errors like Expected type SELECTION but found SEQUENCE. What does that mean? What's a selection? What's a sequence? And why am I getting this error?

»
Author's profile picture Jorge Silva

Learning ReQL (RethinkDB's Query Language): 5 Common Pitfalls And Rookie Mistakes

Over the last couple of days, I've been writing a lot of ReQL (RethinkDB's query language). I got over the basic examples and started writing more complex queries. As I've being doing this, I noticed a couple of things that didn't work as I expected and things that took me a while to figure out. Fortunately, most of these made all the sense in the world once I started understanding the underlying principle. In this post, I want to share five issues I ran into during this process. Hopefully, this will be helpful to everyone out there starting out with RethinkDB.

»
Author's profile picture Jorge Silva

My First Time Using RethinkDB: Building a Simple Chat App

Tomorrow, I'll be starting as RethinkDB's newest developer evangelist. While I had read a lot on RethinkDB and played around with it quite a bit, I had never actually built anything with it. For that reason, I decided to build a simple chat app (GitHub Repo) using Node.js, RethinkDB, Socket.io, and React.js. In this blog post, I'll show how my chat app handles incoming messages in realtime and some of the things I liked about RethinkDB specifically.

»
Author's profile picture Jorge Silva

Testing in CodeFriends: Integration Testing vs Unit Testing

For my recent project CodeFriends, me and my teammates wrote an integration testing suite for our API. In the last couple of days, I've thought a lot about the pros and cons of this approach and thought I'd share them here. This is not a definitive guide on the subject, but rather a real world case study for people who might not be using any testing right now or want have only done unit testing.

»
Author's profile picture Jorge Silva