JamarCoding
Tuesday, January 6, 2015
Arrays vs. Arraylists
While similar in name and basic functionality, arrays and arraylists have several striking differences that must be taken into account before being used by a programmer. While arrays can contain any object or datatype, such as characters and integers, arraylists can only contain objects. In addition, arraylists aredynamic in size, meaning that they can expand or shrink depending on the amount of entries within them. This is unlike arrays, which can be set to a certain size but not easily changed after that point without creating a new array to overwrite the original. Due to both of these differences, the method of creating each is slightly different, as the arraylist does not require brackets and will not accept a length to define it. In fact, arraylists use the size() method to calculate size rather than the length() method used by datatypes such as strings or arrays. To work with the dynamic size of arraylists, there is an additional add() method that allows for a new entry in the arraylist. The lack of finite size allows for arraylists to function similarly to their counterparts, but also adapt and remain usable even when the amount of data to be stored is uncertain when first creating it. The inability to utilize primitives is a drawback, but not much of one, as these primitives could easily be stored within the objects that are placed in the arraylist. This makes me assume that arraylists were added to increase organization while also allowing for flexibility and the same functionality of arrays.
Sunday, September 14, 2014
Week in Review (9/7-9/13)
This week marked the beginning of my coding training in Java. While very similar to my first language of Python, I am beginning to notice a few distinctions that are making the transition a bit difficult. Below are a few examples.
- Naming Conventions are slightly different. This seems picky, because it is, but I am very used to calling methods functions, among other things. I know that a similar issue will occur when we get to arrays, but for now, methods is enough. The two serve similar purposes, and as function is also a term in math, it makes the switch just a little more difficult.
- More data types to work with. I understand how ints, strings, and floats work just fine, as they were common in Python. Other types, such as doubles, chars, and shorts/longs are a bit different, and learning how the different types are able to interact may take some time.
- Semicolons. This is another picky thing. The use of semicolons in Java, though reasonable, is simply confusing. As I am still forgetting to include them, it makes debugging more time consuming and frustrating, as it's a mistake that is difficult to catch.
The good thing about these changes is that they're minor, requiring me to be conscious of these small variations from Python while not forcing me to reload everything. The labs and assignments are pretty straightforward so far, and I feel like learning how to use Java may be much easier than expected, thanks to previous experience. I will admit that things seem to be moving slow, but that's because introductions to many languages begin in similar manners. This lull is to be expected, and I am assuming that things will begin to pick up as we move further into the course. Regardless, I am enjoying things so far and hope that this course continues to go well.
--Jamar
Wednesday, August 27, 2014
TedTalks
The first talk focused on massive collections of data from a multitude of sources, primarily on how to organize and integrate them. Though the speaker focused on models created from images, he failed to acknowledge other impacts of this innovation, including text databases, timelines, catalogs, directories and other reference materials. The use of crowd-sourced data allows for real-time updates as more data is uploaded and shared. This also runs the risk of interference and errors depending on the crowd-sourced data. Though the advantages of a multi-source database are apparent, care and consideration must be taken to ensure that the information supplied to this system is relevant and beneficial.
The second talk goes in tandem with the first, focusing on the physical innovations and efforts required to connect the world and allow for the use of a truly global multi-source database. The speaker explores the methods used to install cables on a global scale through the oceans, providing internet access throughout the world. He stresses the importance of understanding the physical work done to create a digital network to know how to properly maintain and use it. It's an interesting perspective, as it's a side of the digital world that isn't often considered.
The second talk goes in tandem with the first, focusing on the physical innovations and efforts required to connect the world and allow for the use of a truly global multi-source database. The speaker explores the methods used to install cables on a global scale through the oceans, providing internet access throughout the world. He stresses the importance of understanding the physical work done to create a digital network to know how to properly maintain and use it. It's an interesting perspective, as it's a side of the digital world that isn't often considered.
Subscribe to:
Comments (Atom)