IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Wednesday, 19 September


ELI5 Full Stack Basics: breakthrough with Django & EmberJS "IndyWatch Feed Education"

Welcome to ELI5 Full Stack: Breakthrough with Django & EmberJS. This is an introduction to full stack development for everyone, especially beginners. Well go step-by-step through the development of a basic web application. A library of sorts. Together well build a back-end to store data and a RESTful API to manage it. Then well construct a front-end user interface for users to view, add, edit, and delete the data.

This isnt meant to be a deep dive into either Django or EmberJS. I dont want us to get bogged down with too much complexity. Rather its purpose is to show the critical elements of basic full stack development. How to stitch together the back end and front end into a working application. Ill go into detail about the software, frameworks, and tools used in the process. Every terminal command run and line of code in the final application is present in this tutorial.

Ive kept each section short and to the point so that no ones head explodes. There are also indicators to mark points for reflection so you can go back and look at what weve done and save state. If you dont know what something means click through to the linked articles which will explain in detail. Remember, this is as an introduction to everyone including beginners. If you dont need the hand holding push on through to the sections relevant to you.

If youre a beginner, I that suggest you write every line of code and run each terminal command yourself. Dont copy and paste. It wont sink in. Take your time and think about what youre doing. This is a critical trait of an effective and self-sufficient programmer. You will develop this over time if you write your own code and think about what youre writing. If you mess up (look at my commit history, I definitely did) dont sweat it. Go back. This isnt a race. Youll be fine if you take your time.

Sometimes I get whiplash

Note: I developed this tutorial on a MacBook Pro running macOS High Sierra (10.3.6). Im using iTerm2 for the terminal and Sublime Text 3 as my text editor. All testing uses the Chrome browser and its built-in tools. The actual code shouldnt have any differences. You can download the final project files from the Github repository.

Table of Contents

Section 1: The Whats, How...


How to make input validation simple and clean in your Express.js app "IndyWatch Feed Education"

This tutorial requires prior knowledge of using the expressjs framework

Why do we need server-side validation?

  • Your client side validation is not enough and it may be subverted
  • More prone to Man in middle attacks, and the server should never trust the client-side
  • A user can turn off client-side JavaScript validation and manipulate the data

If you have been building web applications using an Express framework or any other Node.js framework, validation plays a crucial role in any web app which requires you to validate the request body param query.

Writing your own middleware function can be cumbersome if

  • you want to move fast while maintaining the quality of code or
  • you want to avoid using if (req.body.head) or if (req.params.isCool) in your main controller function where you define business logic

In this tutorial, youll learn how to validate input in an Express.js app using an open source and popular module called express-validator.

Introduction to express-validator

The definition on Github says:

express-validator is a set of express.js middlewares that wraps validator.js validator and sanitizer functions.

The module implements five important APIs:

  • Check API
  • Filter API
  • Sanitization chain API
  • Validation chain API
  • Validation Result API

Let's take a look at a basic user route without any validation module to create a user: /route/user.js

* @api {post} /api/user Create user
* @apiName Create new user
* @apiPermission admin
* @apiGroup User
* @apiParam  {String} [userName] username
* @apiParam  {String} [email] Email
* @apiParam  {String} [phone] Phone number
* @apiParam  {String} [status] Status
* @apiSuccess (200) {Object} mixed `User` object
*/'/', userController.createUser)

Now in user con...

Tuesday, 18 September


Here are my favorite hacks for creating production level apps with React Native "IndyWatch Feed Education"

Trust me when I say this, React Native is hard. And its not the usual hard of what we think hard is. It is hard in terms of working with in general. In this blog post, Ill go over some tips and tricks and eventually the best practices Ive deployed for one of my apps coded in React Native: codedamn Android (or codedamn iOS).

Hi! My name is Mehul. Im a student, youtuber, fullstack developer, app developer and can deploy servers as well. Recently, I decided to launch a developer focused platform (you guessed it right, codedamn). To get it off the ground real quick on mobile devices, I went with React Native. Partly because Im not a huge fan of Swift and Xcode for now. But little did I know that Id be interacting more with native code than I thought. Anyway, lets begin with the information I want to mention.

Note: At the time of writing this article, React Native was at v0.57-rc4. Check if some of the things are already available/fixed in recent React Native version!

#0: Know what youre doing

Realize that the React Native world is a lonely world right now. You might get yourself into a problem which no one has faced till now (or youre not able to google it properly). Always keep VCS up with your native project and regularly commit your changes (all the cool kids call it CI). It helps you to revert back to the last working copy pretty quickly without losing a lot of code.

It is equally important to know what youre doing. You might end up breaking your project completely if youre unaware. If you did not use a VCS, well then you are in trouble.

#1: Upgrade your JSC

JSC (JavaScriptCore) is a webkit based JavaScript engine used by React Native on Android platforms to evaluate your JavaScript code. Dont tell me you thought that React Native converts JavaScript into native code. It doesnt! ;-)

I learned it the hard way after wasting a day of debugging. There was an unknown random fatal error in between app execution. After studying the logs for quite some time, I came to a conclusion that the app was crashing somewhere where [Symbol.iterator] is...


How to write a super fast link shortener with Elixir, Phoenix, and Mnesia "IndyWatch Feed Education"

This is our stage, though behind the scenes is where the real action is.

Let's start this months tutorial with two statements that are going to get me in trouble:

  1. Elixir is the most productive language out there.
  2. charges way much for their paid plan

Elixir, the Phoenix framework, and the Erlang VM allows us to make production ready systems fast, easily, and with very few moving parts. At this point, you can see where were going with this. Lets use what comes out of the box with Elixir to create a link shortener and prevent a $500 monthly bill.

Lets dive in!

Initial Setup

Before you start

Please make sure you have the following:

  1. Elixir
  2. Phoenix

Create a new Phoenix Project

The first thing to do as always is to have Phoenix create the skeleton of the project. For this demo, we won't have a frontend so we can tell the initializer to leave those out.

In your terminal type:

mix shorten_api --no-html --no-brunch

Update your dependencies

Next, we're going to add a few dependencies to mix.exs. Go ahead and update the deps/0 function in that file to look like this:


Ok basic set up out of the way. That means were into setting up the logic that will:

  1. Allow us to save URLs
  2. Reference these URLs by a unique HashId (ex. abc123)
  3. Navigate to /abc123 and it redirects to the URL that it references

First up, creating a way to store these links.

Creating a way to store these links

Let's use Phoenixs built-in generators to do this for us. In your terminal run:

mix phx.gen.json Links Link links hash:string:unique url:string:unique

This will create the

  1. Links context
  2. Link model
  3. Link controller
  4. Database migration

Thats honestly the end of that step. It will ask you to put a few lines in your router.ex file but for now, you can skip that if you want as we will touch on it later. Let's move onto how we can modify wha...


The Blessing of Rejection (or Growing Past the No) "IndyWatch Feed Education"

traffic light in red by Erwan Hesry on Unsplash

I feel almost guilty to admit that its taken me just shy of 3 weeks to write this post. If youve followed my developer journey so far, youve read about my coding challenges and triumphs, the safety Ive felt from committed, compassionate mentorship, and the lessons Ive learned from teamwork.

All those stories emanated from the secure cocoon of being a coding bootcamper. Since graduating, Ive now begun to experience the big wide world of job hunting, where Im gingerly testing my developer wings barely dry from my 6-month Firehose Project tenure.

Ive wrestled with whether and how to continue documenting my journey. A part of me wishes that my glass-slipper-fits youre hired! moment would happen almost immediately, so that I could write a glowing story of how I went from emailing my resume out, to sitting at my new work desk in record time and with minimal effort. With an embarrassed smile, I realize how validated and authentic such an outcome would make me feel.

I juggle phone screens, lengthy email threads, personal dev projects, open-source contributions, algorithm practice and further education, determined to present my best self to that hiring manager appointed to extend my first pro dev opportunity.

man and woman doing handshake by rawpixel on Unsplash

I thought that moment had arrived when I had my first onsite interview about 2 weeks ago. According to the hiring manager, I did better on the first-round coding exercise than some senior applicantsa revelation that sent warm ripples of pride through my being.

The next round was an hour-long conversation with one of the companys founders, during which I expressed genuine interest in the companys purpose and goals, and they further elaborated on company culture and priorities.

When I received the email inviting me to the final-round, 3-hour onsite interview, my stomach twisted into knots reinforced by nerves a-haywire.

What will they ask me? How intense will the white-boarding session be? Will I freeze? Will I crash?



How to understand any programming task "IndyWatch Feed Education"

The day has finally arrived. Is it your first day on your job, or have you been doing this for ten years? It doesnt matter. We all eventually find ourselves with a task that we simply do not understand.

So what should you do? Should you just get started and hope it works? Should you immediately tell your boss that you cant do this because you dont understand?

I imagine that you know the answer is neither!

In programming, as with any other profession, I have found that its almost impossible to go through a week (and sometimes not even a day) without finding some problem that I dont understand.

But dont fret! I have great news. Not only can you fix this problem, but it can also be a good thing.

It means that in some way you are expanding your skill and knowledge beyond what youve done and known before.

In the next few paragraphs Im going to detail how you can bridge the gap between the requirements youve been handed, and the knowledge you need to complete the task youve been given.

About requirements

You may have noticed that I used the word requirements. That word might have certain connotations depending on where you work.

In my experience, big companies love requirements and small companies sometimes dont do requirements. I think this is perfectly fine for our purposes here.

Thats because in the end all were doing as software engineers is solving problems.

You could receive an extensive one hundred page report on how to solve that problem (I once had an hour long meeting about the text for a button). Or maybe your CEO will meander over to your desk and casually ask if you can solve the problem by Friday.

Either wayyouve been given a task, and you need to be sure you fully understand that problem in order to address it correctly!

About the steps

Not all of the steps given below are needed for every problem. Only the hardest problems to understand may require you to carefully proceed through all the steps that will be discussed in this article.

Many of the questions may not be answerable through the requirements that youve been given, or through your personal experience alone.

You may have to ask other developers, your team lead, product owner, business analyst, or even your grandma. Maybe youll have to ask all of them by the time youre done!

Thats fine though. It means youll be taking scattered knowledge and condensing it to reside in one place....

IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Resource generated at IndyWatch using aliasfeed and rawdog