Thursday, 5 December 2013

FINALS!

December has arrived and so have final exams!
I know some of my posts have been late, but I have enjoyed writing each one of them as well as, making cool pictures and uploading videos for you guys. I hope you readers also enjoy each one of my entries. From learning how to convert base 2 to base 10 to taking pictures of my laptop and creating  images for you guys  I have had a great time making this  BLOG. 
 I will definitely take computer science into consideration for my future career and thank you guys for viewing my BLOG. 
Good Luck on your exams! 
See you next year!
Happy Holidays!
WE GOT THIS!
(J.E.T.C.)



The Issue of Privacy

Share or not to share? 
Internet privacy has become a huge worldwide issue but is it really that important? Over the past few years the internet has become an  indispensable tool for each one of us. It all started from the desire to find effective ways to just make life easier. As I mentioned in one of my earlier posts  this desire is the reason why we designed such highly advanced programs that are currently used  in several fields for different and specific reasons.  Evolution has lead us to an increase in population growth and economy resulting in a high demand to optimize the use of the internet. Now, that we know the internet helps us accomplish several of our tasks at a much faster rate, the question is how much are we willing to share with the world?  How do we set a limit between family, specific friends and the rest of the world? How do we say "enough" when it comes to our financial account, passwords and scientific research? From any type of application form to changing your bank settings to direct deposit almost everything has been or will eventually be connected to the Internet. How can we minimize the risks of lets say identity theft? A few hours ago I read an article from Fox News titled "NSA reportedly collects 5 billion cell phone location records a day". 

Let's be honest, everyone hates to work under pressure or to be supervised twenty-four hours a day as if you were some sort of criminal or if you're aware of the fact that you do a good job why do you need someone constantly staring at you to "make sure the job is done right"? On the other hand, sometimes it just  has   to   be  done. Truth is, these type of articles have caused outrage among mainly, because people think it's simply a lack of respect to their privacy. Some think that if you don't have anything to hind than... Who cares? Humanity has changed over the years and several tragic historical events could have been stopped if they were tracked down. Governmental Institutions have the dutie to keep us secure. 
Secure-Privacy 
As the title of one of my favorite songs says "Desperate Times Desperate Measures". We , as good citizens are desperate to stop daily criminal behavior that have been the cause of the death of several innocent people. In order to put a stop to this desperate measures have to be taken and yes, that includes "invasion of our privacy". In my opinion, I'm more than OK with it. I don't mind if my information or someone else's is being used by the Goverment for the security of our Nation. I would be more than glad to contribute to determine if our national security is at risk or not. I personally, prefer to know that my private information is the hands of the government  than being leaked into the hands of several commercial companies who's goal may not be to "save countless lives".Now, that is another different topic. As we learned in lecture the only information these companies need from you is your gender, postal code and date of birth. Seriously, people always give that information out. Honestly, I have never taken the time to sit down and think about this but try counting the number of times you have given that information out? How mainy companies might be reveleing your information of commercial reasons. I'm not sure about you but this is completely different to the governments purposes. 




Assignment II (Part II)

The second file was fractal.rkt was even better! In this case the purpose was to increase, decrease the size and complexity of an image depending on the arrow key you decided to press. In my opinion the most difficult thing to fix was the conditions as well as matching up all those parenthesis/brackets! Anyways, once you pressed RUN you were able to see a small pop-up window with a small circle blue outline circle.
Once you pressed the "up", "down", "left" or "right" arrow key the the radius of the circle increased or decreased and well as the complexity. By complexity I mean that, depending on how many time you pressed a specific arrow key you added even more "circles" to the original circle (Figure 2).
The actual output is in the center of this image ( second row, second image from left to right). The other images are just  clones of that one. I felt like making this cool image with the help of these beetled-faced circles. Enjoy.. 

Assignment II

Assignment two was quite interesting. 
When I first opened both  files I wasn't quite sure what would the end product look like. Hopefully, during lecture Professor Heap explained the end product. The descriptions or "hints" were a very useful guide to understand what was I suppose to fix. Although it seemed simple I still went to office hours and this was even more helpful! I definitely encourage you guys to go to office hours and ask questions!
The first file I opened was fx.rkt, the purpose of this was to change the color of the chameleon by averaging the intensities of the color that make up the image. The image is made up of red, green, blue and alpha (the opacity). Depending on which key you decided to press the program would average that specific color. If you decided you press all three keys r, g and b which stand for red, green and blue, respectively you would end up with a black and white image (Figure 1). 
Figure 1. The first "row" represents the original image without any color change. The second row displays what occurred when  the red (r), green (g) and blue (b) keys, respectively, were pressed once. As you can see, for the second row each one of the images have different shades depending on which key was pressed. When you pressed the same key twice it jumped back to the original image, this is way the third row has the exact same images as  row 1.  The last row describes the output of pressing all three keys at the same time, since all three colors where extracted the image displays a black and white chameleon.

Magic.

Recursion.
A way of combining different functions to create various patterns.           
Serp. 

As the number increases so does the size and complexity of the image.

Another example of recuersion with just lines...
If you look at the top right-left corner you can see the difference between 
(s 1) 
which is just a single blue line and as the number increases it starts to rotate,
since further functions are being applied to that single to blue line.

Tuesday, 3 December 2013

Addition and Multiplication of Binary Representations

This was considered a challenging topic until I actually took time try and solve it by my own. It was probably challenging since I've never had to do this but once you learn it, it's pretty useful.
Do take a minute to watch this video and try the problem on your own if you are struggling through this topic.
Just to summarize the rules
1. Addition: If the column sums to more than one you carry that one on to the other column. Continue this process every time the sum of a column is higher than 1.
2. Multiplication: Multiply digit-by-digit (just as in base 10). When you reach the "addition stage " follow step 1.

 



Monday, 2 December 2013

Base 2 vs Base 10 Part II

As my last video mentioned, the following videos continue to talk about the topic of base 2 to base 10 conversion.
This video is on converting base 2 to base 10.

The following video shows a past test example of converting base 10 to binary(base2). Try pausing the video and solving it on your own and then continue watching the video.

My next video will be on the addition and multiplication of binary representations.  
                                         

Base2 vs Base 10 Part I

This was actually one of the topics of our test 2. Some students did struggle through this so I decided to post a few videos that explain these two concepts. It might look blurry in a few cases but the writing is pretty clear.
The first video is just a brief description to identify the differences between base 2 and base 10.
This second video is to explain the how to convert from base 10 to binary(base 2). In this case I used number 5 as an example since it's fast and simple. 

Saturday, 30 November 2013

The Past and Wikipedia I ( Tips)

We discussed various early devices that were used before modern technology arose. What most interested me from this lecture was the fact that women where actually the first programmers. Women were known for clear thinking, speed and manual dexterity. At this time, as we can expect human labour was much cheaper than computer cycles, since they occupied to much space and were programmed by just connecting pins. It's amazing to see how technology progressed over the years and it is now a necessity to almost every human being.  As every other thing in life, it has cause a few negative impact such as the lack of face-to-face communication, laziness and certain people have become even addicted to certain technology including social-networking but I still highly believe it  has been more beneficial than harmful. 
This week the first part of the Wikipedia assignment was due. I decided to work on topics that I was familiar with. I choose to work on the chemical compound ammonia, the state of anxiety and the photosynthetic organism cyanobacteria. My wikipedia assignment turned out excellent! Although, I highly encourage you to start this assignment ahead of time. 
Below are a few tips that might help you:
- In a single sentence give your userid followed by a sentence introducing your articles of interest.
-In point form, list the articles you will be working on.
- Since you're going to convert it to a PDF, hyperlinks would look pretty cool below each article you choose.
For the two paragraphs you have to write you might want to include the following:
-Why did you chose these articles?
- What's the point of fixing these specific articles?
-In what way will people around the world benefit from this?
-What's your goal? This could be providing up-do-date information to improve future research projects.
-How are you going to fix it? You might want to mention, the U of T library, the help desk, any tutorial videos or journals.
-Finish up by writing down a few sentences to summarize the results to expect. 
- Once again, please start this ahead of time!

Rotate, beside or above...Why not all together?


As mentioned in earlier posts, during this semester we used a program called DrRacket which is a program capable of applying several functions to one or more images resulting in a very interesting output.
You can play around with a few images. Just to show you a few simple things I decided to choose this image of a fire-cat.
This is the original image of fire-cat which I defined as fire on DrRacket. (input)
The output (depending on whatever you want to do) could look something like this:


 You can rotate the image, and rotate again....












Place one beside the other. 
Why not all together? You can also combine rotate, above and beside to form something like this.
HINT: Make sure your parenthesis match up correctly. (Want to avoid mistakes? Then trust me on this...)


                          

Are YOU alive?

As my last post said "from the start". 
During my first week of classes, we were discussing a few concepts including algorithms. We were given a brief description on the history behind this concept. It basically all starts from the desire to solve problems. As we can see,  this desire eventually leads us to the design of highly advanced programs that are currently used  in several fields for different and specific reasons. From reading this, you might ask yourself why has there been such a large gap between past and today when algorithms are indispensable in everyday life? The answer is quite simple, lack of funding, knowledge and of course the absence of modern technology. Evolution has lead us to an increase in population growth and economy resulting in a high demand to optimize the progress in the development of computing. 
Moving on to another topic, we also learned how to properly give instructions on how to make a peanut butter and jelly sandwich to someone who (for some odd reason) has never made one before. The goal of this, was to understand that  it takes a short, precise, effective and non-repetitive instruction to generate a clear understanding of the process.
Do you know how to make a PBJ? 

From the start....

Hello and Welcome to BonjourPC.
Are you  exploring computer science for the first time? Then, you have found the right place! In this BLOG I will mainly be taking you through my journey of Computational Thinking and the use of DrRacket. 
Stay tuned for more posts on CSC104H1... 
Meanwhile enjoy this picture.

My molecular model of "ethane" holding my Ipad.
(by PS)