comp sci

March 30, 2014

Topic 3: Sorting and Efficiency


sorting and efficiency is a very important topic when talking about computer science. From the beginning of this course, we have been learning various kinds of data structures (stacks, lists, dictionaries, etc.). One thing that is crucial to any data structure is sorting the data that is contained within. 

There are many different ways to approach the problem of sorting. There are many different algorithms that can be used. Each one is unique in terms of how it sorts through the data and how efficiently it does such task. 

Let's go into some detail for each of the sorting algorithms we have been introduced to thus far:

The Bubble Sort: 
The Selection Sort:
The Insertion Sort:
The Shell Sort:
The Merge Sort:
The Quick Sort:
The Tim Sort (Built-in Sort):






a great resource to see most of these algorithms in action is: http://www.sorting-algorithms.com/ 




Weekly Glossary (Terms)


January 27, 2014

January 21, 2014

Week 3 (First Blog): Object Oriented Programming

Hi everyone! My name is Aman and welcome to my CSC148 SLOG, where i'll do my best to share my personal experiences as I progress through this course for the next 12 weeks.  I will be posting on here about once a week. Since this is my first blog, let's just do a mini breakdown of how my blogs will be structured. They'll always start with my general feelings of how the course has been for that week, followed by a recap of the things we learnt,  a mini glossary of the key terms that I consider to be important and have recently been introduced to, and ending with a quote of the week which in some shape or manner relates to the topics of the week.



Preface
Let me start by saying, this course has been very interesting so far. I feel like it is something I need to adjust to as it moves a bit faster that CSC108. From day 1, this course has a much faster pace then its predecessor (CSC108). Understandably so, as we have already leant the basics of python programming and this builds on top of that preexisting knowledge.  

What is Object Oriented Programming (OOP)?

The Bigger Picture: 
So far, we had been writing programs that use a procedural programming approach (writing functions or procedures). This is the first contact I have had with object oriented programming. Zooming out of the programmer paradigm, we are now forced to see the bigger picture of writing programs. Understanding the complexity of the client (the one who will use the program) and provider (the one who writes it) relationship really helps in understanding the OOP approach.



When trying to learn or understand a new concept, it is a great idea to note down key terminology. I feel that complex terminology makes concepts appear more complex than they actually are. For this reason, I will be making a weekly glossary (with the help of secondary sources: Open Book Project) of important terms as I encounter them in this course. Here are some terms to know so far:

Weekly Glossary (Terms):
Class- A user-defined compound type. A class is a template for the objects that are instances of it.

Instance- An object/instance of type class. (please see 'object' definition for further detail) 

Instantiate- To create an instance of a class, and to run its initializer.

Method- A function defined inside a class (invoked on instances of that class)

Object- also known as an instance, is a compound data type that bundles together data and operations that are relevant for that kind of data.

Object-oriented programming- Powerful style of programming in which data and the operations that manipulate it are organized into objects

Object-oriented language - A language that provides features that facilitate object-oriented programming

As it's hard to find quotes about computer science, I will be posting quotes out of context which one can relate to topics I learn each week. I have always loved quotes and feel it would truly personalize my SLOG, which is always nice. Since this is my first post, I personally came up with a quote. (quoting myself, how cliche!)

Quote of the Week:  "Object Oriented programming is like an orchestra: it's carefully organized in a manner that allows each component to seamlessly work together and  unify as one, to produce great results" - Aman Sisodia

SYNW! (See You Next Week!)