Wednesday, April 28, 2021

CST 363 - Week 1

A New Start


This week marks the beginning of my Summer 2021 semester. It feels odd telling my friends that I am already in Summer session as most of them are still in Spring session. The pace of this program is pretty intense and I feel as though I am on a crash course roller coaster. The course I am just starting is Introduction to Database Systems. I am excited to start this class because I've never worked with databases before. It's something I've wanted to learn for awhile but never got around to it. Hopefully a couple months from now I'll be able to incorporate them into my programs.

Journal Questions


Both relational tables and spreadsheets look similar because they have rows and columns and are able to hold tables of data and make calculations. There are important differences, however. 
  • Each cell in a spreadsheet is unique and can hold any data type, whereas cells in the same column of a database table must be of the same data type. This can lead to errors in a spreadsheet that would not exist in a database, such as accidentally entering a string into a date field.
  • Mathematical formulas can be stored in the cells of spreadsheets. Database cells only contain raw data and calculations are performed elsewhere.
  • Extremely large data sets cannot be stored in spreadsheets. Excel, for instance, only accommodates a little over a million rows. 
Databases simply offer more in terms of data integrity, consistency, and security. Using databases for front-end application development is also standard. It does not make much sense to use spreadsheets to hold data when databases make the job much easier. Databases also make it easier for organizations to share and update large amounts of data.

A basic SQL select statement only requires the SELECT and FROM clauses. Select statements have a few optional parts for conditionals, ordering, and placing limits on the number of rows returned. Select statements can get a bit complicated, especially when nested or combined with other select statements, but they are simple in their most basic form.

Sunday, April 18, 2021

CST 338 - Week 8

 Final Thoughts


So the class has come to an end. It's strange to me how quickly it passed. I feel like I was just getting the hang of coding with my team, and now we'll be split up for the next term. In any case, I am finished with my final project and all assignments for the class. My advice for an incoming cohort is to be patient with your teammates, teach them what you can, and don't be afraid to ask for help. The class may seem trivial to some, but there are important lessons to be learned.  

The biggest takeaways for me from this class were how to create software with a team, how to follow a spec without doing your own thing, and how to create software using the MVC design pattern. I feel like I will be using this pattern from now on (wherever applicable), and I have an interest in trying out other patterns. The experience with UML diagrams was also valuable. I feel like this course has set me up for success in a real-world programming environment.  


Thursday, April 15, 2021

CST 338 - Week 7

Android App


Today I wrote my first Android app. Although it's a basic school assignment, it taught me a lot about making mobile apps. I attempted to learn how to make them a few years ago but gave up without figuring out how to get the code to run on my phone. Seeing "hello world" print out on a virtual device was not very thrilling. Today, I did my app testing directly on my Pixel 4a device. I also figured out how to install it so that I can show it to people everywhere I go, even if they don't really care. 

Now that I have a better understanding of how to make Android UIs (which seems to be the real magic behind these apps), I'd like to make a mobile version of my old bill management program. I am not sure if my mom will use it, but it's worth a shot. Other than that, I don't really have any good ideas for mobile apps at the moment. It seems like everything I want to make has been done already, so I need to find something I am passionate enough about to improve. 

 

Keeping Up


This week unlocks the last 2 modules for this class. It's crazy to me how fast these courses go, but in a way I am glad I don't have to spend too much time in any single class. In preparation for the final assignment, I have decided to finish this week's assignments early. An interesting thing I realized as I was making my app is that I approached it with the MVC pattern in mind. It seems that this class has met its intended purpose of helping me learn how to design software in a more professional manner. 
 

Monday, April 12, 2021

CST 338 - Week 6

UML Diagrams & MVC


I have very limited experience with UML diagrams. My professor at community college used them when teaching us about interfaces and inheritance, but I never had to make one myself. I have made class flowcharts, however, most notably this one. UML diagrams in their most technical form are generally worthless for me, but it's nice to know how to decipher them. The diagram I created for this week's assignment is about as close as I hope to ever get to an official one, but I suspect we may be required to make them again. Based on my internet readings (Reddit browsing), it seems that their usage may be rare, but some large companies do use them.

We also discussed the MVC design pattern this week (Model-View-Controller). In this model a controller class acts as a middleman between the view and the model, who should not have any knowledge of each other. The controller sends and receives data from the model and then updates the view using the received data. Its job is to make sure that what the user sees on the screen and what the computer sees in memory are the same. This is very helpful because it separates projects into different branches, making it easier to build and debug. 

Multithreading


My first attempt at multithreading occurred when I was writing an IRC client a few years ago. I realized that it was not possible to interact with my GUI while a socket connection was open. The infinite loop of the connection needed to run on its own thread. Unfortunately I failed miserably and was forced to abandon my aspirations to create a full-fledged client. A simple IRC bot would not be the same. Eventually I did learn how to use simple threads, and now I am able to implement multiple threads with synchronized methods (especially using TimerTask in Java).

Keeping Up


This week was a wild ride. What was meant to be an easy week turned into an academic nightmare. I would rather not get into the details on this public blog, but I experienced what it's like to be investigated for academic dishonesty. Fortunately the true offender confessed, but this should never have happened to begin with. I forgot an important lesson I learned just a couple of years ago.

When I was a newly promoted Corporal, I trusted my Soldiers to perform a task on their own and did not check that they correctly completed it. Although things worked out in the end, I learned to always "trust, but verify." In this case I did not verify the integrity of code that was submitted to me. Some may say that it's not my job to do so, but it sits on my shoulders knowing that my team had to go through that. 

Thursday, April 1, 2021

CST 338 - Week 5

Graphical User Interfaces


My introduction to Java's Swing API came from watching Bucky's videos. I quickly was able to create GUI-based programs after watching them. My first ones were not great, of course, but I improved over time. I don't think I would have taken much interest in Java had I not learned how to make functional GUIs. I think students would have more interest in programming if they learned GUIs early. They provide a graphical representation of objects that can help students visualize OOP concepts. Our card game project this week, for example, offers a great way to "see" objects.

Coding Swing elements can be very tedious. It can be confusing for new programmers to correctly implement features. Programs written in Swing also look and "feel" older. Today I prefer using JavaFX for my GUI needs, although it can be a bit tricky to setup since it is no longer included with the JDK. I have limited experience with other graphical libraries so cannot make a good comparison, but I  feel like Swing has been left in the dust. 

Keeping Up


This week my team began working on a GUI for a card game. It reuses code from our previous lab (Decks of Cards) but adds a graphical element using the Swing API. We have some choices in how to create our game, but we intend on making it as simple as possible for demonstration purposes. At first glance this project seems overwhelming, especially due to time constraints, but when it's broken down into individual parts it seems manageable.  

Beneath the Old Pine

I’m sitting under the old pine tree in Sunrise Park — the one that leans gently toward the fence line behind my childhood orchard. From here...