Tuesday, March 26, 2019

CST 338 Software Design

What is the largest multi-dimensional array that you have used?
What is the largest that you think would be unwieldy and why?
What does inheritance do for your classes?  Have you used it in the past? How?
Update your learning journal from what you experienced this week with class. 

The largest multi-dimensional array I used was for making a dictionary. If I remember correctly, it had about 50,000 entries. The largest array that is unwieldy depends on the user's computer. If it takes too long to update or read, then it is unwieldy. Inheritance allows for classes to become more useful by adding more instance variables and methods. I have used inheritance in a JWindow app during my Programming II class. I didn't fully understand it until I read ch7.


         This week, we learned about references and class parameters. We also learned more about arrays and references. Arrays are objects that hold the address of where it's object is in memory. It is considered to be a class type. Finally, we learned about design and implement inheritance. Inheritance is a basic tenet of OOP, reusabulity, which include a general form of a class, with specialized versions of the same class added later on. The specialized classes inherit the methods and instance variables of the general class. 

Tuesday, March 19, 2019

CST 338 Software Design

OOP is not in all languages.  Have you used one that does not?
What was your experience?
How extensively have you used OOP outside of the classroom?
Are you experience with UML diagrams and do they help?
Update your learning journal from what you experienced this week with class. 

I have not used OOP when I was learning ActionScript3 in my Adobe Animate CC class. It was an introductory class where Programming II was not required. If I had more knowledge of it, my final project program would have been a lot shorter than 1000 lines. My project was a basic recipe book/app of my favorite recipes separated into different categories like main or side dish, then into various meat or vegetable dishes for main or side dish. A lot of these functions were exactly the same except for the text. I have not used much OOP outside of the classroom. I don't have industry experience yet and my whiteboard interview studies don't include much use of it.
I learned about UML diagrams and used them for a few projects in Programming II. The book we learned from was Intro to Java Programming by David Liang. UML diagrams are informative because they describe the class, data fields, constructors, and relevant methods including data types.
This week, we learned about how to create Object Oriented Programming classes which feature abstraction, inheritance, polymorphism, and encapsulation. OOP allows code to be reused in many ways. We learned about how to use constructors and overload methods. We used arrays and the ArrayList class. An array is used to store a collection of data of the same type. ArrayLists can store objects. We also used static methods and static variables. Static methods can be called without creating an instance of the class and static variables can be accessed by all methods in the class. 

Tuesday, March 12, 2019

CST 338 Software Design

Have you used Eclipse before?
What languages are you proficient in at this point?
What is your desired field of Computer Science at this point?
Update your learning journal from what you experienced this week with class. 

I have used Eclipse before in my programming I and II classes at Merced Community College. I believe I am proficient in Java and almost as much in Python now. I'm still not as good at programming as my classmates, however. My desired field of Computer Science is to work with Mobile Apps. I have made parts of a very basic studying app at a Mini-Hackathon in Stockton using Android Studio which was similar to the WindowBuilder plug-in from Eclipse which we learned in programming II. I had difficulty using it partly due to mostly using the GUI to design the app, my laptop screen is small, and the compile time was long. I use a computer with a larger screen and better specs at home.


This week, we learned how to install Eclipse. I deleted it off of my computer and changed my windows 10 username in a major way. I had to delete some temp files because it was still referencing my old username. Fortunately, I got it to install. We used a few built-in functions from the String class to print in all upper and lower case. We also used the Scanner class to read in from the keyboard. 

Friday, March 1, 2019

Week 23: Intro to Database Systems

Over the course of the past 8 or so weeks, we learned many things. We learned about the reasons for using a database, parts, characteristics, and the software we needed to use databases namely the MySQL workbench. We used HTML to enter data into a database using Python. Which was convenient because we learned Python in the previous class. We learned the basics of retrieving data from one table with joins and subqueries to retrieve data from more than one table. We learned how to modify tables using insert, update, and remove. Our class used predicates like where to filter information and order by, group by, and having to sort data rows. We studied E-R diagrams and made them from existing database designs with normalization rules to make our databases more functional. We studied data warehousing, extract transform load, and star schemas. We learned about space management in databases using indexes and balanced trees to make database search faster. We studied ACID features of databases, using locks, versioning, and strategic locks to balance trade-offs. We learned how to do rollbacks and recovery when mistakes are made. In the end, we learned about scaling up databases, sharding, and database clusters when working with large amounts of data. The most important thing I learned was to ask for help when I needed it or I don't learn anything.

Tuesday, February 19, 2019

Week 22 CST 363 Intro to Database Systems


·      Know what are ACID features of a database and why are they important
o  Atomicity
§  Transactions are all or nothing
o  Consistency
§  Only valid data is saved
o  Isolation
§  Transactions do not affect each other
§  locks
o  Durability
§  Written data will not be lost
·      Know that locks, versioning and optimistic locking are used to achieve ACID properties of concurrent transactions
o  Concurrency is the ability of the system to support two or more transactions working with the same data at the same time. Concurrency problems are prevented using locks which stop other transactions from executing if another is already running.
·      Know how to begin and terminate transactions in application code and SQL scripts 
o  Use START TRANSACTION to turn off autocommit mode
o  Use COMMIT to commit the changes
o  Use ROLLBACK to roll back the changes
·      Use the correct ANSI standard isolation level to make trade-off between concurrency and ACID properties
o  
o  The simplest way to prevent concurrency problems is to change the default locking by SET TRANSACTION ISOLATION LEVEL
·      Use SESSION for the session
·      USE GLOBAL for all sessions
§  Use SERIALIZABLE isolation level to isolate it from every other transaction and restrict concurrency, every resource is locked and transactions cannot access it
·      it requires more overhead to manage the locks
§  Use READ UNCOMMITTED isolation level by just using SELECT queries and not setting any locks
§  Use READ COMMITTED to prevent transactions from seeing data that has been changed by other transactions but  not committed
§  Use REPEATBLE READ to be read consistently in the same transaction
·      Know how rollback and forward recovery work in a database
o  Use SAVEPOINT to create a savepoint with a specific name
o  USE ROLLBACK TO SAVEPOINT to roll back to a specified save point




·      MySQL supports and uses both locks and MVCC
·      MVCC is used so that reader will not be blocked by a writer holding a lock on a row
o  row locking is used so that multiple writers must serialize when updating the same row
·      A transaction that reads a row with the intention of later updating the row should issue  SELECT ... WITH UPDATE  to acquire a lock on a row when the row is read.  This prevents another transaction from modifying the row between the time of select and time of update
·      InnoDB Transaction Model       
o  combines the best of multi-versioning database with two-phase locking at the row level and run queries

o  The lock info is stores so lock escalation is not needed

Tuesday, February 12, 2019

Week 21 CST 363 Intro to Database Systems

This week, I learned how to properly import from github to pycharm using this video. I initially downloaded the file from github then unzipped it into my dropbox like I usually do. Here, the import statements were not accessing the other files. I changed them from it's previous version to the import version and that did not fix it. I looked at the forums and another classmate mentioned that we need to append the folder name to the from statements to access the other files. Fortunately, that worked after I setup git on my desktop and then logged into github on pycharm and downloaded the source code that way following the video.  This is a cleaner way of accessing files and I plan on using it in the future.

Tuesday, February 5, 2019

Week 20: CST 363 Intro to Database Systems

This week, I learned about the importance of time management and getting assignments in on time especially if they are Exams. This exam will be late, but I hope I can still turn it in. Some parts took longer than others. I reviewed OLAP and OLTP tables this week, learning the differences between the two which were written into my notebook and was not typed. I also learned about star schemas, which was my main part in the group project.

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...