Pages: 1 [2]
|
|
|
Author
|
Topic: 48÷2(9+3) (Read 7278 times)
|
MahrinSkel
Terracotta Army
Posts: 10857
When she crossed over, she was just a ship. But when she came back... she was bullshit!
|
Yeah, with virtually everything (even phones, now) having gigabytes of memory and CPU's running in the gigahertz range, those old bit-math tricks to save space and cycles just aren't worth the hassles of maintenance.
--Dave
|
--Signature Unclear
|
|
|
bhodi
Moderator
Posts: 6817
No lie.
|
Masking by using bit shifting is still clear, concise, and the best way of 'unpacking' a bunch of booleans from a single integer. Though, the cases where you'd need to actually do so are very niche. I had to use it in one application where our data pipe was very, very small. I guess you could do it in general, but there's no reason to, really, with modern compilers.
|
|
|
|
Yegolev
Moderator
Posts: 24440
2/10 WOULD NOT INGEST
|
Poorly written. I keep thinking about / instead of ÷, and so it looked to me like 48 was over everything. I never had to worry about left-to-right with multiplication-division too much due to well-written syntax.
|
Why am I homeless? Why do all you motherfuckers need homes is the real question. They called it The Prayer, its answer was law Mommy come back 'cause the water's all gone
|
|
|
Lantyssa
Terracotta Army
Posts: 20848
|
I'm used to using bitshifting, but then I learned it from MUD programming. The flagging systems relied heavily upon it. Because of that I still use them in that fashion. (Having one field in a DB instead of ten also just seems more elegant. I probably wouldn't think so without my background though.)
|
Hahahaha! I'm really good at this!
|
|
|
CmdrSlack
Contributor
Posts: 4388
|
Now I think I know where I missed that one question on the civil service exam I took last week must have been.
The grammar portion?
|
I traded in my fun blog for several legal blogs. Or, "blawgs," as the cutesy attorney blawgosphere likes to call 'em.
|
|
|
Chimpy
Terracotta Army
Posts: 10619
|
The grammar portion? It was a math test. So shush!
|
'Reality' is the only word in the language that should always be used in quotes.
|
|
|
CmdrSlack
Contributor
Posts: 4388
|
The grammar portion? It was a math test. So shush! Well, now it all adds up . . .
|
I traded in my fun blog for several legal blogs. Or, "blawgs," as the cutesy attorney blawgosphere likes to call 'em.
|
|
|
ezrast
Terracotta Army
Posts: 2125
|
Poorly written. I keep thinking about / instead of ÷, and so it looked to me like 48 was over everything. I never had to worry about left-to-right with multiplication-division too much due to well-written syntax.
Yeah, one of my first thoughts was "who uses ÷ anymore?" In a computer science-y field you write 48 / 2 * (9+3) and in a math-y field you write $\frac{48}{2}(9+3)$.
|
|
|
|
KallDrexx
Terracotta Army
Posts: 3510
|
Masking by using bit shifting is still clear, concise, and the best way of 'unpacking' a bunch of booleans from a single integer. Though, the cases where you'd need to actually do so are very niche. I had to use it in one application where our data pipe was very, very small. I guess you could do it in general, but there's no reason to, really, with modern compilers.
Our company uses strings for fake-bitshifting lol. We have a database field for what valuation methods an account has activated. It's a string that's "00X00X00X", and if it's a 0 that means that the 3rd valuation method is disabled (I still have no idea how they figure out what the 3rd is, I have a scary feeling I don't want to know) and if it's an X that means the valuation method is enabled.......
|
|
|
|
|
Pages: 1 [2]
|
|
|
|