Now before you start thinking your going to make the next WordPress, let me just say we are only going to be making the MVP of a blogging site, that’s right a MVP. What is a MVP you may ask ? It stands for Minimum Viable Product, this thing we are about to build is just a web app that has CRUD functionality. What is CRUD you ask ? CRUD is Create Read Update Destroy.
Don’t be afraid of the terminal, the terminal is your friend for life 🙂 you just got to treat it right.
Up and running:
Install Home Brew, is manages the software you need to manage all the software, your going to use to make software. Just follow the instructions on here: https://brew.sh/
Install Bundler, it manages the specific Ruby software libraries for your application. Type the following command “gem install bundler”.
Install Nokogiri, it gives Ruby the ability to understand HTML and CSS among other things. Type the following command “gem install nokogiri”. This is going to take awhile, chill out and take a break you have been working too hard 🙂
Install Rails, its the thing that you build on top of, to make your web application. Ruby the language has libraries for doing different things. Rails is just a really big library for making web based applications. As you may have guess just type in “gem install rails”.
Making a Rails App:
CD into a folder you would like to be in and run the following command “rails new <name of your app here> -T “
Now if you look into the folder you just ran this command in, you will see a folder with the name of your app. Open this with your favorite text editor, VSCode is always a good choice.
CD into the newly created folder, and make your database. You can do this by running “rails db:create” and then running “rails db:migrate”. What this is doing is creating a database, and then populating it with boiler plate info.
Now run “rails s” and go to the URL is gives you. You should see your app, YAY you made your first rails app 🙂 If the URL isn’t working try using http:127.0.0.1/8080 or http:127.0.0.1/3000.
Actually making the Blog:
Run “rails g scaffold Blog title:string body:text”. What this command will do is create a Blog object, that has a title and a body and can be stored in our database. Rails knows this since “g” is for generate, “scaffold” is for create everything for me, and the rest is specify what type of things you want there to be, in the object you are creating.
Now you got to let the database know about this blog object you made. To do so simply run “rails db:migrate”
Finally the moment you have been waiting for, run your app with “rails s” and ta-da you go your self a working rails app 🙂
As you an Angular component has a life cycle, much life us humans. In the beginning we are nothing, we do a bunch in the middle and then we die 🙂 However if you want to call a certain service in your “ngOnInit” to dump some values into a var that appears in your html, your going to have a bad time. Or at least angular is by throwing a lot of errors in your console, I mean it will still work.
To get rid of these errors all you have to do it the following add a “?” at the end of the end of the var that’s in the html, and ta-da errors gone. This works since the “?” tells Angular to chill out there will be a value you there “eventually”. Hmm… but why eventually you may ask ? Its because two functions before “ngOnInit” get called , the very first one being the constructor of the class and the second being the “ngOnChanges” method. So for the execution of the first two methods its asking “WTF where is this thing in the html in the .ts file ?” which makes throw errors.
After taking a long hiatus from Unreal 4, cause I didn’t like blue prints (Unreal 4’s Visual Scripting Language) I preferred real programming (C++) . At which point there started to be a nice long 3 second compile time 😦
I switched to Blue Prints ! I bought my self a course and started going at it every day after work ( well … almost every day … West World doesn’t watch it’s self ) I made the final project in the course, plus some of my own additions (these additions mainly making the game look AAA) .
So this post is dedicated to saying “Hey look I made this cool thing 🙂 ! ” mostly by my self.
Its you basic point and click ARPG that only has one level, and uses alot of the Infinity Blade assets that Epic has given away for free. Here are some screen shots:
Its been ages since I posted here, mainly cause I got super sick and mainly cause I don’t feel the need to anymore.
Now I have been working on a few things since the last time you saw me. A lot of different things, Like Unreal 4 games, .NET Core apps, Ruby On Rails Apps, and Angular Apps. Some of which you will be seeing posts about.
For the most part my efforts to learn new things goes awry because I get side tracked by a shiny new thing. However for this coming month I am going to try to focus on a few main things:
.NET Core + Angular – Cause I like how light weight and fast it is ( Got to get in touch with the future of my beloved C# ❤ )
Unreal Engine 4 – Cause I like easy to use pretty things. Unreal is easier (Blue prints) to do something fast ( I don’t want to write that much code) Plus it already has a awesome AI system built in.
Ruby On Rails – Cause it seems like the web developers ultimate tool bag (this is mainly due to watching a number of talks by DHH)
Motivation: I was exploring what coreML could do, and I found the following model and thought I could use it, in this fun and interesting way. This project was inspired by one the course projects, in Angela Yu’s awesome iOS development course, which you can find here.
Motivation: This is one of the first iOS apps I have ever made. And I just wanted to make something that was super useful and easy to use. Plus I am starting to learn more about crypto currencies in general.
Notes: This projected used an external Free API to get the data. Used the following open source libraries: SwiftyJSON, Alamofire, and SVProgressHUD. After making this simple app, I can honestly say that iOS development is a lot easier then Android development 🙂