Posts

Showing posts from February, 2018

Software Engineering Course: Algebra and Mathematical Logic

Image
How people think we do math. This'll be a sort of  abridged  summary of the topic, any more information you might need, I recommend you try the book (name in bottom of the post). Like anything in science and engineering, there's a crucial component that binds it all together, yup Maths! Oh boy! If your taking this course you should be well acquainted (hopefully) with some algebraic and logical terms. The examples of the ones we use for this course are: ∀ (For All) - applies to all ∃ (There exists) - At the very least one exist ⊂/⊆ (subset of/ subset or equal) - a set that is contained in a bigger set ∈ (element of) - one element that can be found in a set Let's make some examples just in case: Example 1: ∀ x ⊂ Y: function(x) --> result In English: For every x  that is a subset of Y, then function of x will produce result  Example 2: ∃ z ∈ Y: function(z) --> result In English: There exists a z  that is an element inside of Y, then functio

Going to Learn Java

Image
Did you know more than 3 billion  devices run Java? This coming semester I'm gonna be taking a Java course (better late than never!) . Gonna use this time to learn as much as I can . I will try hard to make any new proyects in Java. I'll be sure to update frequently.

Efficient Fibonacci (WIP)

Image
This was a little side thing I've been working on. I wanted to find a way to find a number (especially big ones) in the Fibonacci sequence without using recursion or memoization. After researching it a bit I came across this equation online. F(n) = ⌊Φⁿ/√5 + 1/2⌋,  with   Φ = (1+ √5 )/2 With this my program could find the right number from any position n  without resorting to make multiple recursion and having to find the Fibonacci of every number below n , effectively ( hopefully ) making it faster and more efficient.

"Random" Hot Potato with Queues

Image
Now this is an old proyect I made for my Data Structures class in college like around a year ago -ish . The goal is to simulate a random game of Hot Potato utilizing queues (in my opinion this would've been better with a circular link list, but whatever). This was coded in C++. While simple, there was a bit of a problem I had noticed where using random() didn't really produce a random outcome. In fact everytime it was excecuted it generated basically the same results. This is because the random function is actually pseudo-random. To overcome this hurdle, I found that using the timer()  function from the ctime  library (this will give you the actual time),  in conjuction with random()  reduced the likelyness of repeat  patterns (I say this so I don't claim it's completely random) I might have gone overboard with creating a seperate time and subtracting it with the current time, which in hindsite wasn't necessary. (The important thing is that I know that