Is spending a long time to understand logic very well worth it to learn math better? My goal is to become a computer/electrical/mechanical engineer. To become one i have to read a lot of math based books (physics, operation research, etc). I know some real analysis, linear algebra and more already, but in college we go over topics too fast and i can't grasp everything so well. So I want to start studying math from the beginning on the side. I discovered that there exist a "foundation of mathematics" which is pretty much set theory and logic if I'm correct (plus a few more) and I was wondering how important logic is to understand more complicated topics later on (let's say, multivariable calculus, multilinear algebra, differential geometry etc). Is it worth spending a "long time" studying logic (prepositional and predicate logic), since sometimes definitions can be confusing (vacuous truths for example) or written symbolically, or it would just be a waste of time? 
 A: I would say that it is absolutely not helpful ... in that particular way. Logic is super valuable in other contexts and interesting in its own right, but that's a separate issue.
Actually, if anything you should go the other way around: although "foundationally" logic comes first, in terms of pedagogy one's not generally prepared to really get the most out of logic until one has some decent grounding in some fairly abstract mathematics - in particular, I would recommend abstract algebra. I personally don't see the point in tackling logic until after you're quite comfortable with something on the level of abstract groups.
(Computability theory is a bit of an exception here, except $(i)$ it's not the kind of logic you're talking about and $(ii)$ even for it I think having some abstract algebra is very useful.)

CAVEATS: 


*

*In my opinion it is worth spending some time learning the "jargon," with quantifiers ($\forall$ and $\exists$) in particular. But even this isn't a make-or-break point: I know serious mathematicians who can't read quantifiers fluidly and prefer to avoid them. 

*There's also the pedagogical value of knowing that it's there - that is, knowing that the math you see (which is often presented semi-formally) can actually be grounded in a completely formal system, and that you can look up the details later when you have the time. But one's mileage may vary with regards to this point: some people don't care in the first place, and others aren't satisfied until they see the details.
A: If you want an easy overview of the foundational approach, I recommend you have a look at Halmos's classic book "Naive Set Theory". It gives a rigorous, but lightweight account of all the set theory that is needed for the vast majority of mathematics. If this doesn't satisfy your thirst for knowledge about logic and foundations, then I would recommend something like Mendelson's "Introduction to Mathematical Logic", which covers the basics of propositional and predicate logic and their most important applications. I would not recommend reading a heavyweight book like Jech's "Set Theory" unless the intricacies of set theory itself begin to turn you on.
A: It would depend on how it's used.  Programming can use a lot of Boolean ( true false) logic.  You might use arithmetic based logic more in calculations, but it's mostly algebra.   You can look at set theory as logic,  https://en.wikipedia.org/wiki/Algebra_of_sets for example.  Some engineering might use complex numbers, but most of it can probably be done using polynomial math with a substitution of powers of $\sqrt{-1}$. In otherwords, engineering is more applied physics than a pure application of math.  
A: I think it's worth to look at a basic level logic principles at first. The problem is that most of us learn better first with examples. Take for instance real analysis; then you would like to continue with perhaps functional analysis or measure theory (depending on the subfield you are going to specialize). You will find that the proofs in functional analysis are "generalizations" of those in real analysis, but the underlying principles are the same.
In this sense, more than logic I would say that what really matters in modern math is set theory. Take for example Jech's book, you can find many proofs given in real analysis there.
In short, sometimes is better to climb the stairs not from the beginning, but from the middle and the going up and down as the matter requieres.
As a side effect, learning logic will teach you to structure your ideas and make them coherent and correct. This is important in writting thesis or research papers, or mathematical proofs for that matter...
