Get to work!

So.. It’s difficult to get started with the actual coding. It’s not unexpected. Today i had set time aside for working on the blog project, but it never came to much more than research and it little design speculation.

I started reading the 4th article in the tutorial I’m following about the Angular part of the MEAN stack.

It got into explaining the setup of Typescript, which I fear is not up to date. I looked at the Typescript website and they had many guides as to how to setup Typescript for many different environments, which was a bit overwhelming.

At first i need to focus on creating a RESTful server with Node and Express. It really seems doable.

I wrote down what requests i would like to have and what data i believe they should carry. I think security will be an issue, but i will just worry about it later.

The requests I’d like are:

Request x newest documents skipping y documents.

Request document by ID

Update/create document by ID

Delete document by ID

My goal is to have a basic version of the server running tonight.

First day of M001: MongoDB Basics

So today the free online course started. It was a series of videos, mainly showing the Compass tool (A GUI to the DB), while explaining the data structure. Basically on you have a cluster of databases, in each database there is a number of collections, each collection has a number of documents and each document has a field and each field has a value type, that could also be a document an array.

So an example for instance was:
database: videos
collection: movies
a given document in the collection:
_id: int32
cast: array
similarMovies: document

The course is split into four chapters, one for each week with the fourth chapter being the exam. I completed the entire chapter one, including lab assignments easily and within an hour. The lab assignments have to be submitted within 7 days but this week was definitely no challenge. Each of them consisted of a single multiple choice question that required you to make use of the Compass tool to find the answer in the databases. For instance it could be, how many movies was directed by “Jan Jansen” or similar.

I certainly did learn something, but I hope the course will also dive into using actual code, as this merely seems like a walk through of their product.

The next chapter is made available next Tuesday. Until then I suppose I will look more into the MERN and MEAN tutorial, and maybe start slowly to experiment with saving Blog data in a database via Node.

A short update

So last night I started reading the tutorial on The Mean and Mern stack and tried to follow along. Even though the article is only a year old, I had a lot of trouble getting their example to work because parts of it had already been outdated.

They use a Mongo Atlas database, which is a convenient way to run a database server for testing. However mongo driver they used in the example were outdated and it took me a while to figure out that was the problem. Updating it was effortless though.
I also had some problems renewing the Mockaroo link as they requested I did. Mockaroo is an online tool to create mock data for testing. I ended up just using their supplied link.

While walking through the code they used the Javascript ‘promise’ quite a lot. I struggled to understand the code that used the promise since it’s a new concept for me. In the end I looked it up and got smarter.

doSomething()
.then(result => doSomethingElse(result))
.then(newResult => doThirdThing(newResult))
.then(finalResult => {
console.log(`Got the final result: ${finalResult}`);
})
.catch(failureCallback);

I had troubles understanding where the result variable came from. It seems as it it defined and used as a variable without being set. However I see that it is like LINQ. ‘result’ is the return of the doSomething function and used as parameter to the doSomethingElse function.

Later today the Mongo University course should start, i’m looking forward to that.

Good News Every One!

I’ve signed up for a free online mongoDB basics course by MongoDB University!

It spans three weeks, with a 90 minute video released each week, with assignments, grades and a certification in the end. It starts already tomorrow :O

I’ve also found some good starting tutorials at mongoDB’s site.
A back to basics 4 part course, that seems to cover a lot of information about database basic terminology.
As well as a 6 part course about the MEAN and the MERN stack.
MEAN being:
MongoDB-Express-Angular-Node.JS
MERN being:
MongoDB-Express-React-Node.JS

So this seems to be exactly what I would want. Of course I havn’t looked closely at the content yet. So there’s a lot of learning ahead, at the same time I don’t wish to get too far off course. The mission is still to build a blog from scratch.

A little digging around

The first mission in my quest to become a full stack developer is to build a blog from scratch. To get started I looked into Node.js. After digging around a bit and finding some less useful tutorials I rediscovered W3schools. A very useful and free resource for learning web technologies.

Reading through their Node.JS documentation I quickly realised, while learning Node.js seems fairly straight forward, there seems to be no guide as to how to architect an application or database. So I started by reading a lot of material about backend development. In this post I will share some of these sources and talk about how I will proceed in my quest.

In particular I found this site very useful:
https://www.upwork.com/hiring/development/a-beginners-guide-to-back-end-development/

They very clearly explain and show what’s going on when you send a http request from your client.

They also explain the difference between SQL and NoSQL of which I was a tad confused. On W3Schools NodeJS tutorial there was also a tutorial of how to use and connect to MongoDB (a NoSQL database) and how to use and connect to MySQL (a relational database). So I’ve learned that a relational SQL (Structured Query Language) database stores data in tables. This allows for complex queries because you can filter the data based on the rows in the database. A NoSQL (Not only SQL) database stores data in a Key Value pair, like a dictionary. I realise this was the main type of database we used at my former company for our game. MongoDB is of the type that is document oriented. Which means that one key has a value that is basically a whole document of data. Like an xml or json document.
Here is a nice image showing the difference:

So going forward I think it’s important I explore the difference between relational databases and non-relational databases. In particular MySQL and MongoDB since these are referred to by the W3School tutorials anyway.

I’ve tried to find an explicit tutorial on how to create a blog using React, NodeJS and MongoDB but I didn’t have the patience to wade through the sea of ‘pay to play’ tutorials. However, here’s what I’ve found:

https://resources.mongodb.com/getting-started-with-mongodb

MongoDBs own resources to getting started. They seem to have many useful tutorials including;

  • Your First MongoDB Application
  • Getting Started with MongoDB, Node.js and Restify
  • Using ReactJS, ES6 & JSX to Build a UI

    It seems I have found the right place to start. I also found that W3Schools have a whole series of how-tos when it comes to frontend design. This will be a good place to start when I need to make the front end of the blog.

I’m very optimistic about this process now. I’ve managed to get Node.js to run on my computer and tried examples from W3schools. I’ve read insightful articles about the anatomy of a web application and the backend.

My next step will be to explore MongoDBs tutorials.

First thoughts

The Introduction

Today I’ve taken my first steps towards becoming a full stack developer.

I’ve been working with Unity as a mobile game developer for a few years and then had a year off from programming and working. Now I’m keen on expanding my skillset and finally killing that dragon that is web applications.

My goal is to have the skillset to create a mobile game with Unity that also has a supporting backend architecture. With support for user-accounts (cross device user states), game-settings, level and asset manipulation. As well as an administrative frontend to that backend. In addition I would like to have the skills to create a web game application that can integrate/interact with the mobile game. I would also like to expand my DevOps skills; continuous integration, automatic build process, automatic test process. I’m certain I will discover more fields of interest when i dive deeper into each part.

Web development has always been a bit of a riddle to me. It’s not complex as much as complicated. Understand and programming c++, java or c# seems much more straight forward to me. In web technology there seems to be a thousand frameworks and pathways, and there’s a huge issue about security. I have dabbled a bit in php, and javascript but never realised much. What has usually killed my attempts at web design has been graphics. It’s somehow immensely demotivating to have an idea and be stuck with programmer graphics. I guess that can also apply to game programming..

How to proceed?

I figure I will need a plan of attack. First off I have an idea of which technologies I would like to train.

For frontend:  React/redux, Angular JS, ASP.NET
For backend: NodeJS/Express, RubyOnRails, ASP.NET

I got to work a bit with ASP.NET at my former job, aside from that, the list is really an arbitrary collection of what seems popular when i google. I have to start somewhere!

To get familiar with these technologies my plan is to go one step at a time. Starting with some small projects and increasing the difficulty as I level up 😉 I have considered taking an online course of some sort to ensure congruency  in my training, and perhaps to kickstart the training a bit, but first i need to get my hands a little dirty myself.

Here are some of the ideas I have:

  • Create a simple blog with a simple CMS.
  • Create a Web Application with user accounts.
  • Create a simple web application game.
  • Create a simple backend system for unity game.

I think I will start with the blog. It seems the simplest way to get started. I probably start with NodeJS as the backend. After creating the first application, it would be fun, and interesting to try and recreate it with a different tech. Thereby exploring the differences.

Well, this has been my first blog post. In wordpress because it turned out that I couldn’t learn web-technologies in a day. A good start, if you ask me.