Programming… but I can still have hobbies, right?

I’ve been working on coding and getting up to speed with the program we are working on at work. I spend time at work and outside of work to learn more about Java.

Although I never had direction so I’m thankful for a specific task to work on, I still find myself enjoying time with family, exploring my new area, and meeting new people. However, I feel that I shouldn’t be so free and lax. I stress easily, but I am also pretty lazy.

I feel like I need to dedicate more time into programming and less on other activities, especially since I feel so behind starting out. In my program, I really feel behind my peers. I don’t put in the effort and I feel dumber than the others. At the same time, I yearn to do lots of things besides what I’m doing for my job. I want to learn stuff on my own more. I want to create an android app, work on my website, and I want to draw!! I love to draw and read and do lots of stuff. Today, I decided not to go to kickboxing, but I ended up wasting those hours anyways not working. I think I don’t want to work because there’s too many things for me to learn. I want to just pick one thing and go with it, but I feel like I won’t be able to contribute to the project anytime soon.

I have been only doing such marginal efforts. I have books to write cleaner code and books on making things. I don’t know what to work on. One side of me just wants to read a light novel and get a day off (again). I really think I’m lazy and I hate it. I honestly want to get back the joy I have when I was working on a classroom coding project and figuring things out.

Advertisements

What are REST APIs?

Something I’ve done before:

I created a Java Application using Swing to read and write XML data into the program.

Things I’ve learned recently:

  • What is an API?
  • What is REST? RESTful APIs?
  • SOAP v. REST?
  • What is Maven?
  • What is a Servlet?
  • What is OAuth?
  • What is JSP?
  • What is Polymer?
  • How to write a Java Servlet on Tomcat?
  • How to use Maven?
  • Discoveries
    • I can’t host Java applications on my website.
    • Java is not efficient for small web projects.
    • Java is good for multi-threading.
    • Angular 2.0 is very different from Angular 1.0.
    • When I write documentations, screenshots are very important.
    • There are two ways to call Javascript properties
    • I need to break things more to know that they actually work.
    • Always have a backup
    • There’s something called Angular Material

I guess I’m learning a lot more than I thought!

  • What is an API?
    • API stands for Application Programming Interface. It is used for different software applications to communicate with each other.
  • What is REST? RESTful APIs?
    • REST  stands for Representational State Transfer. REST is an architectural style, which means you can break it. RESTful APIs use HTTP request and response to make calls. I learned that most of the information is from HTTP header (in the URL).
    • Postman and curl are two ways that you can easily make API calls.
    • There are “resources” (objects) and request “methods” (verb)
    • There are four main HTTP methods:
      1. GET – When you need to read a resource
      2. POST – Create a resource
      3. PUT – Update a resource
      4. DELETE – delete a resource

Sometimes I get a little confused between POST and PUT because I have seen people use PUT to add a resource, but essentially updating a list.

  • SOAP v. REST?
    • SOAP is heavier because of the way they use XML. It is a much more strict protocol. REST can be broken, SOAP cannot. In REST, responses can come in various formats (HTML, CSS, JSON, XML). According to interwebs, SOAP is less often used for APIs nowadays.
  • What is Maven?
    • Maven is used to import jars into a java project. Instead of downloading and moving jars around, you can take jars deployed in maven or in the cloud and include them as dependencies in your Java web project.
  • What is a Servlet?
    • A servlet in Java is a class that takes requests and returns a response. From my tutorials I have extended the
  • What is OAuth?
    • OAuth is an authentication that allows access through a third-party site. A typical application is commenting on a website with your Facebook account. The website will not have access to your facebook credentials.
  • What is JSP?
    • JSPs are script files written in Java. It stands for JavaServer Pages. It is used for Java front-end development. I can write HTML in JSPs.
  • What is Polymer?
    • Developed by Google, it allows users to write in HTML and CSS in place of libraries. Instead of a bunch of div tags, the tags “have meaning again.” It is based on the web component idea, very similar to Angular JS.
  • How to write a Java Servlet on Tomcat?
    • A Java Servlet on Tomcat
  • How to use Maven?
    • The most important file is the pom.xml file in Maven. In the pom.xml file, you will be able to list the dependencies and plugins that you would like to import. POM stands for Project Object Model.
  • Discoveries
    • I can’t host Java applications on my website.
    • Java is not efficient for small web projects.
    • Java is good for multi-threading.
    • Angular 2.0 is very different from Angular 1.0.
    • When I write documentations, screenshots are very important.
    • There are two ways to call Javascript properties
    • I need to break things more to know that they actually work.
    • Always have a backup
    • There’s something called Angular Material
    • Super Useful Eclipse shortcut of the week:  Place your cursor on a variable (that needs it’s class imported), then click Ctrl + Shift + O

Sorry for the mess, but I had to get it down somehow. Now that I’m learning more about writing cool programs, I also need to work on my writing. This is a process and it will take time.

Something I’ve done in the past: I wrote a mock scheduling patient app that updates XML code everytime I run it. I used Java Swing to create a Graphical User Interface (GUI) for it.