AcidK's Funny Picture Thread - Revived and Revised

Silk

Well-Known Member
There's no need for brackets except to alter the normal flow of BIDMAS/BODMAS.

Ie. 2 * 2 + 2 = 6

Bracketing it to (2 * 2) + 2 = 6
is horribly pointless, as it doesn't alter the end result, as it's still completed in the order you would have solved in anyway.
.

I was talking from a programmer's POV.

Code readability is a big thing, we don't need the added hassle of working out the BODMAS flow; brackets make it so much easier to work out the flow.

Your example is quite a simple one.. but now try to reverse engineer a 6-step equation without brackets. And also, the number of times programmers get it WRONG because they don't know BODMAS, resulting in logic errors.. tsk.

Brackets all the way, whether "needed" or not. They are a belt and bracers approach to algorithms. They make algorithms easier to read. There is no excuse not to use them.

Long story short it's good practise in the programming world, and I would assume it makes maths easier to follow as well. :p
 

Huung

Well-Known Member
And also, the number of times programmers get it WRONG because they don't know BODMAS, resulting in logic errors.. tsk.

That's the real issue, tbh. I do agree brackets make it easier to read huge equations though - was more pointing out the usage of them was technically incorrect in a lot of situations, but I won't dispute they make programming easier :p
 

thatbloke

Junior Administrator
Indeed - it's not a case of "whether or not they are needed" but more a case of making things way more readable :)
 

DeZmond

Junior Administrator
In your example: fielda = fieldb x fieldc - fieldd * 0.10 / fielde

Assuming b = 2, c = 3 etc

fielda = 2 * 3 - 4 * 0.1 / 5

= 5.92

Bracketing to: (fieldb * fieldc) - ((fieldd * 0.1) / fielde) isn't necessary as it still gives 5.92.
Only if you were changing it up to something like:
fieldb * (fieldc - fieldd) * (0.1 / fielde) would you need to bother :p

Which is -0.04 btw xD

Quick question re the above: in the example, would it not be technically correct (or at least, just as valid) to perform the division operation first (after all, D comes before M in BIDMAS) and therefore change the result? It's a genuine question btw - maths is not necessarily one of my strong areas! :p

Re the point about people should use brackets - I agree entirely, whether or not it is necessary in every case, it makes things look a lot tidier and easier to read! :)
 

Huung

Well-Known Member
Quick question re the above: in the example, would it not be technically correct (or at least, just as valid) to perform the division operation first (after all, D comes before M in BIDMAS) and therefore change the result? It's a genuine question btw - maths is not necessarily one of my strong areas! :p

Re the point about people should use brackets - I agree entirely, whether or not it is necessary in every case, it makes things look a lot tidier and easier to read! :)

This is a common misconception. Although the D is listed first, (and the A listed first of the addition/subtraction operators) they are assumed to be at equal levels of priority. Ie:

Brackets
Index
Division/Multiplication
Addition/Subtraction.

In the case like we have here, of both division and multiplication appearing with no brackets to specify an order, you simply complete from left to right. So, in this case you would be doing the "fieldd * 0.1" before completing the "/ fielde" :)
 

DeZmond

Junior Administrator
Ahh, good to know, thanks for that :)

Just remembered that another good reason for adding brackets when coding is that some languages evaluate expressions in different directions, and so you can get some unpredictable results... I seem to remember this being the case for some scenarios in C.
 

Angelic

Active Member
Quick question re the above: in the example, would it not be technically correct (or at least, just as valid) to perform the division operation first (after all, D comes before M in BIDMAS) and therefore change the result? [...]
How would it change the result, exactly? (A*B)/C = A*(B/C) therefore it doesn't matter at all whether you divide or multiply first.

Or has not doing maths at all for 4 years left me clueless?
 

DeZmond

Junior Administrator
Nope, you're entirely right. Again, that was me reading it incorrectly... maths was never my strong point :p
 

DeZmond

Junior Administrator
To bring us appropriately back on track... (these never get old)

maths-2.jpg

maths-1.jpg

maths-3.jpg

And in keeping with the school theme of spelling...
moran.jpg

a282_s7.jpg

slow.jpg
 

Windzarko

Well-Known Member
Woogle found this on Imgur via Reddit a while back, which I promptly grabbed to my folder of assorted funnies and sillies, and it must now be shared:

Ferrous%20Wheel.jpg


If you don't get it, go nerd up a bit more. If you do get it and don't laugh... go nerd up a bit more :D
 

Zooggy

Junior Administrator
Staff member
Hey, :)

Works for me, Mr Z.

It does, in fact, work for me as well, now. Mayhap umbrael.com was having difficulties of some sort...

In any case, I find that I have no need to nerd up further! :D

Cheers,
J.
 
Top