Mechasparrow

Welcome to the official Mechasparrow site. Here you can check out projects and games being built by the mechanical bird.

Posts - Page 7 of 11

Summer Vacation 2018

My 2018 Summer so far

Oh how different it really was

This summer. This summer has been quite a ride. When I started this summer, I thought that I would spend time just studying computer science and reading math textbooks. Yeah… That’s not really how I do “computer science”. Maybe next summer, or over the senior year… But definitely not summer.

Personal Development

For me, summer has always been a time to build new frameworks for sustained growth and progress. It is like the calm before the storm. Its not like nothing happens during summer. There is just more time to think. However, that shouldn’t be an excuse not to think when it counts.

And with this summer, this has been never more true. I am entering my final year of high school. Beyond that, college. This creates some uncertainty about the future that most be faced directly and no longer avoided.

Learned some things

I did learn some concrete things summer, not just spiritual or “life lessons”. Due to some unforeseen circumstances, I had a unfulfilled art course requirement that needed to be taken care of. I choose to take care of this by taking an online summer art course over AP Art History. I did not know how much this would change my appreciation for the arts and just art as a whole. Though it was long and tedious, I am glad that I took that course this summer.

I had some social conflicts with some new and old friends. In the process, I learned what I really valued in a friendship and what it means to be supportive and understanding of other peoples lives. By what degree? I can’t really say without point of reference

Programming and Building things again!

In the beginning, I referred to not studying that much computer science. Well I studied a little. Just a couple chapters of a textbook. Instead, most of my time was spent studying new frameworks and tools that I could use to create interesting and useful applications. For the tech nerds out there. I studied React.JS, Redux, React-Native, and some Backend tech. I’ll list links to these in the bottom.

I learned these technologies through project-based learning. I’m working on a couple projects right now. For now, just an app and a sort of game with geo-location. I also plan on starting to live stream these and release some tutorials on a semi-consistent basis.

Teaching

A couple weeks back, I got hired as a programming instructor for a Untitled Learning Center. I also have been creating tutorials for the LiveEdu platform. The skills I pick up in teaching should be helpful in other avenues of life. Who knows?

React
Redux
React-Native


This has been a long blog post. So I’m going to cut it here. I might go into more detail on specific parts later on. But thats that for now.

– Mechasparrow

Read More

Web Backend Development with Ruby (Rails) Part one

What is an web backend

A backend is the piece of software that deals with the business logic for interacting with the application’s data. This could be tweets, account records, facebook posts, and any other sort of data that you could think of that a user would want to interact with.

In a later tutorial we will go over frontend development to help shape what the user sees.

What are we going to build?

We are going to build a simple store inventory system. That way a grocery manager/clerk can keep track of what items are in stock. This tutorial will be separated into different parts. In this one we are going to just set up rails and generate some basic code to start.

Installing Rails

Make sure that you have Ruby installed. Once you do we are going to run this command in the terminal

gem install rails

This installs the latest version of rails that we will be used for developing our store inventory software.

Alright it is time to create our application.

rails new inventory-system
cd inventory-system
bundle install

This creates our new application in a folder called inventory-system and then we move into that folder and install our libs with the bundle install command.

From this point on, when I refer to /, I mean the path to the inventory-system project folder.

Launching the application

You can launch the application with

rails s

Then navigate your web browser to localhost:3000

You should see something like this..

Your on rails

Generating helper code

We are going to generate some code just to save some time.

Generating the data model

A model is software layer that simplifies the process of saving and reading data from our database.

So for our items model. run

rails generate model item name:string description:text price:decimal
rails db:migrate

This generates a model that has a name, description, and a price field. This will be important later on when we are saving or viewing item data. We then run a migration with the second command so the database is changed in response to our model code we generated.

Generating the controller

The controller is the code that is the real meat of the application. This is where all the business logic goes.

To generate our controller run

rails generate Inventory

This generates a controller (ruby file) that will deal with all the business logic for managing our inventory. Our inventory will just be a collection of Item data.

This will generate a file called inventory_controller.rb

in the file you’ll see

create a function called index

def index

end

and then go into /config/routes.rb

and add the code as seen from the new code comment

Rails.application.routes.draw do
  # New code
  root 'inventory#index'

end

then create the file starting from root /app/views/inventory/index.html.erb

inside it write

<h1>Hello there</h1>

Now if we visit localhost:3000, we should see this simple web page with the text, Hello There

That’s it for this tutorial. In the next one we are going to actually load some items into the database and render them to the client.

There will also be a separate tutorial on install bootstrap for this project.

You can get the source code for this project on Github

Read More

Building an Anime App because why not?

Why

So one day, I was watching Anime. I do this on a frequent basis. With that being the case, I realized at some point that there was so much anime that I was losing track of. I looked at the current implementation out there… mainly MyAnimeList, but I thought I should build something a bit more extendable. There were a couple features and aesthetics that I wanted to modify. Not only that, I also have a set of favorate characters(A.K.A Waifus) that I thought would be cool to add in too. There is also a collection for this called MyWaifuList

Stack

The stack as of right now is just Angular 6.0 with TypeScript and Web Browser Storage. As I further develop the app. I’ll probably off load some of the logic onto a backend server of some sort.

Features

  • Profile Page (WIP)
  • Anime Search
  • Waifu showcase
  • Anime/Entertainment collection Page
  • In Progress Features

exit()

Well that’s all I have to say about Animku (WIP). If you’d like to learn more or take a look. You can check the source code out at Github

Read More