This is probably my final blog post for #TC101, so far the best class I took this semester.
I want to thank Ken for teaching us so many things, not only programming, but even some life lessons.
Before I start to cry, here is my video review (in Spanish)
Finally, my project is finished, of course with some help but, who didn’t need it?
In the code were 2 functions, one for grayscale and the other for scale (1/2);
What the grayscale function did was basically taking the RGB color property (1) for each pixel of the image, and getting the average of that 3 properties (redQuantum, greenQuantum and blueQuantum) to create a new color (2) and then creating a pixel with that color, to then add it to the picture in its correct place.
The scale function basically did the same, but now with 4 pixels. I mean it took the RGB of 4 pixels (2 up and 2 down), got the average of redQuantum, greenQuantum and blueQuantum and give that RGB properties to a new pixel, which takes place in a new picture that is half high and half wide, created by taken the size of the original and dividing it by 2. (3)
Here is our code: Hell yeah here it is
Now, my experience during this project… A lot of trouble, since trying to install magick++ on Mac to then giving up and installing it on Ubuntu… But I was a good friend and told everybody to stop losing their time trying to install it on Mac o Windows, so everybody did it on Ubuntu.
I, as at least half the class, got help from the codes of some partners, in my case, specially Miguel Angel Cardenas so, I thank him, who probably doesn’t know who I am but that’s mutual.
When I first saw his code, it seemed impossible to understand, but with a little of help I understood it and started to change what I though it worked.
There was a really big problem, which from my “circle” I was the first to suffer: “segmentation fault (core dumped)” after compiling and . First I though it was my compiler, but then everybody started to get it. So, after some hours spent with Omar, Alejandra, and Newton trying to fix it, until we realized that it was a problem with big pictures, which we couldn’t fix.
But after all this hours spent, it was done. And since now, and for the next years, every time I get involved in something hard like this, there’s one simple quote I will remember :”It’s OK to fail”.
]]>
And my video explanation for creation and use of strings
Here is my faulty attempt:
]]>
This is really going to be useful for us trough these years we’ll spent in Tec, so thanks Ken to take the time to check and recommend us this.
It is not that hard to use it, in fact, like if a giant scientific calculator and a program developer had a son.
However, here is my attempt to make a simple counter from 0 to 10 (yes, I know it just counted from 0 to 9, but hey, first time using it!)
]]>Ok so… my plans…
I’ve been working on my project which was not as easy as I though. This weekend I was working with the codes of my remaining WSQs, and by now, I’m working also with my masteries, so prepare to see all my post in a single hour at the home page.
]]>What I did in my code was to give the number of iterations I wanted to do (of course as the number was bigger, the result was more accurate)
So it was all about a factorial function, and the function which takes the factorial and does the process. With a for loop, I only counted the iterations and that was all! Check my code:
]]>There was nothing in this WSQ that you aren’t supposed to know.
]]>