User Tools

Site Tools


opus:spring2013:smeas:start

Shawn's Opus of Awesomeness.

OPTIONAL SUBTITLE OF AWESOMENESS!

Introduction

I would say this is LAIR: Season 2, but, I guess since we're somewhere new, it's more like a spinoff. LAIR: The New Story. Or something. But yeah. I'm Shawn. I love video games and music. I'm working towards my computer science degree and hoping to get into game design/development.

March 20th update: So, I really haven't been keeping track of my time spent on things. I'm going to start doing that now!

asm Journals

February 1st, 2013

8 hours

9:00 AM - 5:00 PM

Today we began work on our CPU in Minecraft. The first thing we decided to work on was a simple 8-bit adder. We started out by building a 1-bit full adder and work on optimizing the design of it to be as compact as possible. After that, we began replicating that. The first 3 bits were the hardest, being that the first was the design itself, then we had to figure out the way to connect the bits (we were building the bits in a 4×2 grid, so we had to figure out the two different ways to connect them).

Once we had finished with the all 8 of the adders, we piped them back around to the near the first adder, and began building a nice, easily readable output and easily usable input area.

Semester Summation

Our big project for Computer Organization was creating a CPU simulator. We were using the website www.play-hookey.com and following the logic gate diagrams to build our own library. We started out creating the three basic logic functions (AND, OR, and NOT). We then used these three functions to begin building more logic structures.

The first things we built were multiplexers and demultiplexers/decoders. Multiplexers are used to take multiple signals, but keep them separate. Demultiplexers do the exact opposite. They take combined signals, and separate them.

We next moved into latches. Latches are used to store a value. The two main latches we worked with were the RSNAND latch, which accepts two inputs and uses NAND gates, and the clocked RSNAND. The clocked RSNAND is much like the regular RSNAND, but it accepts a third input (the clock). This can be used to control the timing.

The last thing we really got into were flip-flops. The first we worked with was the RS FlipFlop. The RS FlipFlop has two RSNAND latches, each of which operates on opposite clock sequences. The last thing we really got into as a class was the JK FlipFlop. The JK FlipFlop is structured much like the RS FlipFlop, but it accepts the final output arguments (Q and QBar) in the first NAND gate, making it start with three inputs. This eliminates conditions when R and S change simultaneously.

All in all, we never actually finished our full CPU simulator. But, we got pretty far. I would have liked to have seen the finished product, and hopefully in another time and place, I will get to see that.

cprog Journals

February 6th, 2013

Today we spent more time talking about different data types. We first went through the table of data types, and their sizes, low values, and high values. We learned that the char data type is mainly used for ASCII characters (hence the name char), as ASCII values go from 0 to 255.

Then, we downloaded a program Matt had graciously made. Of course, in his graciousness, it was made with errors for us to fix. Fun! Fortunately, all it was was a missing } at the end. This program printed out three characters, and what their respective numbers were as ASCII values. The program then did calculations on the numbers, and I just copied the three print lines to see the new characters and ASCII values.

February 13th, 2013

I'm going to be real with you, this is more about what I'm working on in Joe's portion of Comp. Org, but it definitely applies for C Programming. Today while working on my logic library for Joe, I ran into two potential issues. The first was that I wanted to display something defined in my LOGIC.h header file in the test.c file that I was using to (obviously) test my logic library. That turned out to be a pretty simple task. Since the test program was including LOGIC.h, all I had to do was use the names of the things I was defining (TRUESTATE and FALSESTATE) in a printf statement, and it worked wonderfully.

printf("The values this program uses are as follows");
printf("True:  %c", TRUESTATE);
printf("False: %c", FALSESTATE);

The second issue I ran into was with my getchar() statements. I was attempting to do something that I saw online that worked as follows.

while (var != '\n')
    var = getchar();

This wasn't working however. I didn't get a chance to use a printf(“%c”, var) to see what it was actually printing, but according to Matt, it was probably seeing the \n and then setting var to \n. He told me to fix it by getting rid of the while, and just adding a blank getchar() after the variable assignment. Again, it worked wonderfully, and I coded it as so.

var = getchar();
getchar();

March 20th, 2013

6 hours

9:00 AM - 10:00 AM
More work on my Monopoly program.

12:00 PM - 5:00 PM
Work on Monopoly

Semester Summation

For C/C++ this semester, a lot of my learning was based on the stuff I was doing in my other courses. All three of my other computer classes (HPC Fundamentals, Systems Programming, and Computer Organization) involved doing a lot with C. HPC was the least of the few, but Systems Programming and Computer Organization both focused very heavily on C.

HPC didn't involve as much C as the other courses did. However, I did use it. The biggest use of C in HPC was for the GD Image Library tutorial I did. I wrote a tutorial on how to generate a number of procedurally generated images, and then compile them all together in an animated gif. The tutorial can be found here.

In Systems Programming, I was following tutorials on the SDL library for C++. The final goal for this course was to be able to logically and syntactically understand elements relevant to game design. For the EOCE, I spent a lot of time editing the game we were given to work with and adding more things to it. Since most of it was working off of tutorials, SysProg was a really good exercise in the syntactic side of C programming.

I probably spent the most time working with logic in relation to C in Computer Organization. We created a logic library, initially making only the three basic functions (AND, OR, and NOT). We then used these three functions to create numerous other logic structures. I started out just using C for this, but eventually progressed to using C++ so that I could use classes and methods.

hpc0 Journals

January 23rd & 25th, 2013

(Grouping together these two dates as they were mostly spent on the same thing)

The first two days of classes, I spent setting up my own personal workstation. I used one of the Optiplex 745 machines, with an Intel Core 2 Duo 6400. I put in 4 gigs of DDR2 800 RAM, and an ATI Radeon x1600 video card. For an operating system, I installed Mint. Mint is a Linux distro forked off of Ubuntu. I like it because it doesn't have as much bloat as Ubuntu does, but it's not as basic as Debian.

I at first planned to use xfce4 as my desktop environment of choice, but I decided to try something new and use Awesome instead. Awesome is a tiling window manager based off of dwm. It took me a bit of time to get Awesome configured, getting the right keyboard shortcuts that I wanted. I also created a pretty simple startup script that runs an xrandr command to set up my dual monitors correctly.

I also spent some time setting up our router and server computers. Both of these computers are running Debian. Matt helped me a little with the set up of the router. I mainly had to spend a lot of time editing up the /etc/network/interfaces file. I had to set up two networks, eth1 and eth2. eth1 connects to the Lab46 servers, whereas eth2 is our own internal network.

February 11th, 2013

Today, we started out by fixing our router. We were using the onboard NIC, which was garbage, for our local network. We decided to change that to one of the two addon NICs. We started out by (obviously) physically changing around the cables so that the local network cable was now in the addon NIC instead of the onboard NIC. We then went into the /etc/network/interfaces file, and changed all instances of eth2 (the interface it was connected to), to eth0 (the new interface).

Next, we had to fix the dhcp server. We went into the /etc/default/isc-dhcp-server file, and changed eth2 again to eth0. After doing this, our network was up and running beautifully again.

After this, we had to set up a DNS server on our router. Matt gave me some sample bind config files to look at, and I looked up a tutorial on how to set up DNS with bind. I used the tutorial located at http://linuxconfig.org/linux-dns-server-bind-configuration.

The first step, was to install bind. I did this by using

apt-get install bind9 dnsutils

Then, using the bind config files Matt gave me, I started to create my own in our “/etc/bind/zones/master”. I named the file “10.80.2”

March 25th, 2013

6 hours

12:00 PM - 4:00 PM
Worked on writing a Python script to query a lyrics website for random lyrics

6:00 PM - 8:00 PM
Finished work on the Python script to query for lyrics

March 26th

6 hours

6:00 PM - 12:00 AM
Started configuring my VPS

March 27th, 2013

12.5 hours

12:00 AM - 4:30 AM
Started configuring my VPS

9:00 AM - 5:00 PM
Work on configuring tmux, vim, and bash for my VPS

March 29th, 2013

6.5 hours

9:00 AM - 10:30 AM
Work on Jacob and my Magic:The Gathering draft server

12 PM - 5 PM
More work on the Magic draft server

April 30th, 2013

3 hours

4:00 PM - 7:00 PM
Began working on GD Library gif tutorial

May 4th, 2013

2 hours

10:30 AM - 12:30 PM
More work on GD Library tutorial

May 5th, 2013

2 hours

5:00 PM - 6:00 PM
Finished up GD Library gif tutorial

Semester Summation

I feel of all the classes I took this semester, I learned the most in HPC Fundamentals. A big reason for this may be the varied amount of things I learned. I worked on a number of different projects, all of which taught me some very unique things. The two projects that really stood out in my mind were setting up a Virtual Private Server, and working with the GD Image Library to create animated images.

I really enjoyed setting up a VPS. The main reason I got one is because my internet sucks at home, and I wanted to be able to work on things much easier. It was a lot different than just setting up a regular old Linux workstation, because it started from nothing. Whenever I have installed a desktop Linux system, they've always had a nice little wizard to guide you in setting up an initial user. With my server however, I had to start completely from scratch. I was given a root login, and that was it. I'm not going to go into too much detail here, because I have the entire project on my portfolio, and it can be found here.

The next really fun and enjoyable project I worked on was creating an animated gif with the GD Image Library. For the C Programming EOCE, we had to make an image of a tree with the GD library. I was randomly generating my tree, and someone mentioned it would be cool if you could generate 100 random images, and then compile them all into a gif. So, I did. Since it was something I really enjoyed doing, I decided to do a project and write up a tutorial of how to do it. In the tutorial, I generated a spiral of circles, each of which changed colors. The images were dynamically generated, the first having only 1 circle, and the last having 100 circles. Again, I'm not going to go into too much detail, because the entire project can be found on my portfolio here.

These are just two of the biggest things I learned in HPC. We did a lot of other smaller projects as well, such as setting up a Linux machine to act as a router, working with Jacob on a simulator for a Magic: The Gathering draft, working to create a Monopoly simulator, and a few other small projects along the way. All in all, it was a really rewarding semester, and I feel a learned a lot of different things it.

sysprog Journals

February 6th, 2013

Today, I started out with the SDL tutorials from lazyfoo.net. The first thing I did was prep my machine for the work that was ahead. I did this by installing first the SDL libraries, and then the build-essential library.

I then went through with the first tutorial. I made a beautiful image which said “Hi Josh” (although it looked more like “Hi Jash”).

Semester Summation

Since I apparently did a much worse job of keeping track of my SysProg work this semester than I thought I had, I figured I would sum up the semester.

A big portion of the work I did for SysProg this semester was working on the lazyfoo tutorials. They were a great learning tool, although I feel they could have been structured a little better (sometimes they did an awful job of telling us how to implement new code into the older code).

The last few weeks are where things got really real. Working with the game for the EOCE was a lot of fun, and really eye-opening for what I want to do. I had a lot of fun working out the logic for the game, setting up the character movement, enemy movement, and collision detection. So much so that I decided to go on and add some more. I added a score mechanic which displayed to the screen (+100 points for every dirt plot dug, and -1000 points if the player dies). I had a bit of a problem at one point with it, but it was just a stupid mistake of not having the font I was using in the working directory. After that, I decided to add some music and sound effects to it. I used LMMS, a music sequencer program for Linux to make a 6 second looping background music, and a digging sound. I implemented a thread for the background music, and set the digging sound as part of the remove dirt function that I had.

If there was more time this semester, I have a feeling I would have spent even more time working on this. Although in a way, I'm glad the SysProg EOCE was the last one on the list, because I probably really would have not spent as much time or been as focused on the others if I had gotten really deep into the SysProg one first.

opus/spring2013/smeas/start.txt · Last modified: 2013/08/25 16:16 by 127.0.0.1