Lo-Fi Python

Aug 09, 2017

Creating A Simple Website and Server Environment with Node.js and Express.js

Here is what I have deduced is the fastest way to get an app up and running with Node.js. This requires some familiarity with using the command line. I completed the Codeacademy course "Learn The Command Line" before beginning with Node.js. I think it helped me better understand what the commands are and what they do.

Download and install Node.JS Open the node command prompt. This was done on a windows machine.

First, create a folder for your app(s):

mkdir node_apps

Change the command prompt directory to your app's folder:
cd \app_name

Creates json file for your app. Fill out applicable info or just hit enter until the file is created.
npm init

Install express.js module in node.js:

npm install express

Install express-generator module in node.js:
npm install express-generator -g

Create the structure for your app and all necessary folders. (views, css, Javascript, routing, etc.)

express app_name

Ensure all app module dependencies are installed:

npm install

Start your server and web app:

npm start

Go to http://localhost:3000 in a browser. Port 3000 is the default port of Express. Your app is live in dev environment.

Notes

  • I learned most of this from this great blog post.
  • The above does not include a database integration. I integrated with a MongoDB database by following a blog post that has since been removed from the internet.
  • This YouTube video was also very helpful to me for figuring out MongoDB and Node.js integration.
  • An HTML shorthand language called jade (aka pug) comes stock within Express.js. Here's further reading on the pros and cons.
  • All of the above has been from my own studies. I do not claim anything listed as the most efficient or best way to use Node.js. This is what has worked for me over the past two days.
  • It feels good to whip up a nimble app environment that is capable of producing and supporting world changing software; Node.js is used by Netflix, PayPal, Microsoft and Uber.

Jul 28, 2017

Should You Go To Programming School?

There is no one-size-fits-all answer. Below are some thoughts that may help you decide.

  1. What are your programming goals? Get a coding job? Create an app or website? Become more productive at your current job?
  2. What is your current experience level? Are you starting fresh or do you already know a language or two?
  3. Do you have money saved up? Otherwise, you might need to take out a loan.

A computer science degree is typically most expensive. Coding bootcamps are a lower cost option that pack a wide curriculum into a few weeks or months, but they can still be pricey. The cheapest option is to take a piecemeal approach through various online courses.

School Advantages

  • Wholistic approach. You get the ins and outs of programming from a proven curriculum.
  • Community. You learn with other students and from experienced teachers.
  • Job placement. Often various schools and bootcamps will connect you to a company.
  • Credentials. You gain confidence and the backing of your skills by an established institution.

Potential Downsides

  • Tuition Money. A lot of what you need to know is available for free or cheap on the web.
  • Skill level match. Some bootcamps are oriented for beginners, others are more advanced. If you do a bootcamp, make sure it fits your skill level.

If you want a coding job, school makes sense. The bootcamps look to be effective if you can handle the up-front investment. It's possible to land a job without schooling but much tougher. I am currently considering Full Stack Academy. and Coding Dojo. There are many out there. CodeAcademy is a popular route as well.

If you want to make an app or website, the school or the non-school route may both work. For the non-school route, the following languages are good places to start: (note - not a comprehensive list, these are my picks.)

  • Web App or Website: HTML, CSS, Python, Javascript
  • Web App or Website Framework: Flask, Django, py4web, Ruby on Rails, React
  • iOS app: Swift plus Apple's Xcode environment, Beeware (python library)
  • Android App: Java or Kotlin, Beeware
  • General Coding: Python or Ruby

If you want to be more productive at work, I recommend learning Python. More on Python and where to start here. Automate the Boring Stuff With Python is a great resource for boosting your productivity also.

It's not easy to decide whether or not school is for you. I'm still unsure after a year and a half of programming on the side. No matter what, continue to learn multiple languages and strive for a better grasp of the ones you know. Good luck!

My decision: continue self-study and learning online for free.

As of 8 months after writing this post, I have concluded that learning for free online was the right choice for me. I've achieved many of my programming goals in the last three years, thanks to materials available from Codeacademy, Coursera, YouTube, Stack Overflow, countless helpful resources,, interesting blogs, and documentation. I've talked with others who need the in-person assistance that a bootcamp offers to learn. Do what works for you. Good luck with your decision.

Update: Several years later, I also get paid to use Python and Excel for a living! I studied for free online intermittently over 2 years to achieve it.