Mastery Topics 2 & 28

--Originally published at Valeria CT

Mastery Topic 2: C++ Good Style Conventions

This link is an extensive guide of the do’s and don’t’s and pros and cons of C++ proramming. It is very useful especially when writing long and complex programs. Remember that you should try to make your code as understandable as possible for anyone who tries to read it!! https://google.github.io/styleguide/cppguide.html

Mastery Topic 28: Demonstrate use of linux for quizzes and exams

During the semester, we did every quiz either on paper or on our own computers and submitting them through our blogs. However, last class Ken brought the USBs with linux so that we could see how it works and we can use them for our final exam, which will be next Tuesday. I tried one, and it was pretty simple, I only had to open Atom and the terminal and do the same thing that I’ve been doing all semester long. The only differences were that I didn’t have to search for the folder with the super long command that I needed in Cygwin (because everything is already in the USB) and I had to use “./a.out” like in Cloud9 instead of “./a.exe” like in Cygwin.


Course review

--Originally published at Valeria CT

After coursing a whole semester with Ken’s new class model, I’d like to make a review of the class, the grading system and my perspective in general.

For starters, I found that the “go at your own pace” system was extremely helpful for organizing my schedule and actually learning, not just copying from someone to get the assignment done on time. Nevertheless, I think that this system wasn’t the best in the sense that it didn’t demand much of me. I mean, Ken always told us to go with him to asesorías and ask questions on the facebook group, but I’ve never been really keen on going to office hours nor using social media, especially for homework, so that was a bit complicated for me and probably what made the course somewhat difficult. The one time that I did go to office hours, however, Ken was very patient and knows how to explain everything in a way that you can easily understand, so I think that what was “bad” from this course was mainly my lack of devotion to it.

I really liked that you could learn in your own way and that Ken wasn’t like “you have to do this this way”, like other teachers because he lets you think and develop problem solving skills. Also, the videos that he makes (and he can do one if you request it) are very, very, very helpful! So if you’re stuck and have no idea how to solve a problem or assignment you can use them as a last resource or to find new and different way to solve the same problem.

Ken really pushed me this semester to work collaboratively and help classmates or ask for help, which I believe is a skill that will be needed for our professional

Continue reading "Course review"

Proyecto Final

--Originally published at PZ

Es una realidad que el mundo ha evolucionado y que mucho de esto se debe al avance tecnológico, es por eso que las cosas mas simples y útiles han tenido un gran avance en los últimos años. Es por eso que decidí crear este proyecto en el cual  innove el dado convirtiéndolo en un aparato electrónico. El dado electrónico fue hecho en arduino, a continuación una lista de los materiales y su función:

  • 7 leds: Su función es obvia y esencial pues cada LED simula los típicos puntos negros del dado.
  • 13 Jumpers: Su función es transmitir la corriente.
  • Arduino UNO: Todos sabemos que el arduino es el aparato principal es como una mini computadora de nuestro dado.
  • Buzzer: Emite un sonido cada que se crea un nuevo número.
  • Resitencias

 

El código es simple y utiliza muchos de las cosas vistas en clase por ejemplo el for utilizado para darle un valor digital a cada led en lugar de tener que poner led1=1, led2 =2, etc. coloque un for para que emita este proceso 7 veces.

Después cree una función llamada mi función la cual hace que los leds se prenden y se apaguen con una secuencia, esto para hacer mas atractivo el dado.

Tercero, cree una función llamada apagatodos donde se apagan todos los leds utilizando el for de igual manera para ahorrar el proceso.

 

Cuarto, se crea la función principal la cual se hace con switch y case, dando 6 cases simulando los 6 números que se pueden crear.

Por último, en el loop principal se coloca un if para leer si el push button está presionado o no.

Codigo

https://www.dropbox.com/s/bfq8s7t0bcsuxeu/dadoelectronico.txt?dl=0


SciLab

--Originally published at Valeria CT

For this WSQ I had to download SciLab and sort of get to jnow how it works. After reading the very beginners manual and trying out the progra, I saw that it is very similar to a graphing calculator, except for some functions and the way it works, but the purpose of both is practically the same.

Maybe SciLab isn’t really useful for me now, but I’m sure it’ll become very usefuk in the future for my career.

Here are the links that I used:

-Valeria


Final Project…

--Originally published at tc1017 – chivas4ever2009

Ken said to us since the beginning of the semester that the final project could be anything we wanted. And that was quite motivating since the project should be or must be something that we are interested in. My project was to programm a Tic-Tac-Toe game, it was not my first choice. My project changed because some stuff that happened, so my final project decision was this: a Tic-Tac-Toe game. It sounds easy but it is not, I had to work a lot  and to type a lot of code.

***Here is what I learned:

-Cases: Or also called switch statement I think. It works as a menu or that is what I understood. Actually I worked in a programm with cases that was an ATM. Cases work depending on the case literally, when a condition matches with a case that case will be working. The same way that in a menu depending on what you choose or on what the programm do. I am sure this specific ‘function’ will be useful for my future coding.

-Game(in the code): It is like a tag or a chekpoint to know wheen to start or stop doing something.

-The use of libraries:

       #include <sstream> I learned that this it is a library that include streams and inside they contain strings and this can be useful for employing stream-style manipulation.

     

#include <ctype.h>  I learned that it is a library that declares several functions that are useful for testing and mapping character.

-for(;;) : This is for running a program for infinite times. When it finishes, it starts again and again.

-Working alone: For a final project it was really hard because I had no one to get help from. I admit I did needed a

Continue reading "Final Project…"

Calculating E

--Originally published at My TC1017 programming class

So, this is a program that calculates the value of e (Euler’s number) with the precision the user wants. As well, I added so that the user can also tell the program how many decimals he wants to be shown on the answer.

As usual, I will leave the link to the cpp file on Google Drive. This time, I didn’t use external sources besided Mr. Ken’s help and the web page giving the formula on how to calculate it. The link to the formula is included on the file.

Here is the file.


Go Bananas – WSQ11

--Originally published at Programming in C++

For this program we were supose tu search for the word “banana” in a file, even if the word is written in upper or lower cases.

This was a very similar to the WSQ10. First we need to make a file, in this case, and for obviusly reasosn, I call it “banana.txt”. We have to open the file, then, to ingonre when the word is written u¡in upper or lower, we can change the hole file to lower cases.

Picture1