chaimoosh.github.io


A little about testing

One of the things I learned in the web development course was to use Test Driven Development. The idea of TDD is to write the tests before you start working because by doing that you have to really put down what exactly you want your code to do and then you write your code to get the tests to pass. The other form of testing is called Behavior Driven Development that is that you decide what you want you just code it and then if you want you write some tests to make sure it’s working properly. Either way you go about it writing good tests is a necessary part of programming because without it you can never know if your program will work the way you want it.


Merge Sort

So as I continue to try to sharpen my skills as a developer I am trying to learn a little more about computer science. I found a free course online that I’m finding to be really good. One of the things I learned this week was a little about sorting algorithms. The problem that you’re trying to solve with an sorting algorithm is how to do it in the most efficient way possible that doesn’t take too long. So there are a few options for how to sort and it seems like the best way generally is a merge sort the benefits of this is that even as the problem gets larger the time it takes doesn’t go up so much unlike the other sorting algorithms.


Some C Stuff

This week I started a free online course in computer science. It’s called CS90 and was given at Harvard as an ontro to computer science for people with no background in it. It starts out from the very basics of what you can do with code and they start by teaching some stuff in C. So seeing C for the first time I found it’s syntax to be rather familiar because it is a really old language and a lit of the other coding languages were styled like it. For example Java and Javascript yntactically are similar so I can use the same for loops with exactly the same syntax as a Javascript for loop. It’s also similar in the sense that it needs to be compiled but you don’t need to install anything because it comes pre-installed on computers.


ExpressJS Basics

One of the things I have been focusing on since I graduated from the program is trying to get better at Javascript. The way I’m doing that is by trying to learn the language itself better and by trying to learn some frameworks. I started to look for something to build a backend in Javascript with in Node and I settled on trying to learn Express. I started looking around for a tutorial and finally found one that was very basic and didn’t have too much overhead. I started following along with it and I began to realize how similar it was to other frameworks I had previously learned like Rails and Sinatra that instead of using Ruby to define the routes and controllers for the application you use some Javascript functions and you use the same RESTful routes that I used in other places. Other than that it was pretty much just some regular Javascript that I was already comfortable with so it really was similar to what I had learned before.


React Props

React has many cool features that makes it easier to manage a web application. The basic idea is to split everything on your web page into components that way it’s easier to manage and it’s easier to debug. The way you do this is by making components. Components are little pieces of your web page and generally they are used multiple times. The way you pass data to components is by using props. Props are properties that are passed down from a parent component to a child component for the child component to do whatever it needs to do with them.