[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now being accepted. Click here to apply.


[Advertise on 4chan]


File: 1758503564450667.png (1.36 MB, 1228x1758)
1.36 MB
1.36 MB PNG
/g/ humor thread
>>
>>106660710
i can't tell if he's just trolling us or he's really a dumb jeet
>>
WOULD IT HURT TO USE YOUR FUCKING BRAIN (AND THE CATALOG) FOR A SINGLE SECOND?
>>106660672
>>
jeets smell even thru pictures
>>
File: 0bc41c54d897cb11.png (1.02 MB, 1052x1080)
1.02 MB
1.02 MB PNG
>>106660710
>>
File: 28e515efbc4e6bb5.jpg (59 KB, 828x771)
59 KB
59 KB JPG
>>106661594
>>
>>106661230
why not both
>>
File: 899033bbbee350ec.jpg (200 KB, 1052x678)
200 KB
200 KB JPG
>>106661596
>>
>>106661594
Yeah it's not googling if it's looking up an ancient book, expensive med app, or old lecture notes.. totally not the same thing.
>>
>>106661938
Back in the days of yore, youngling, masters of their craft were expected to have much knowledge memorized and - more importantly - understand the fundamental principles and interactions.
The problem is not googling for information, it is trusting that information because you cannot question or analyze it further.
In the IT field, it is easy to google a problem, get 4 incompatible answers and just try them until one works. you get that all the time because problem descriptions are similar, behavior changes over versions or implementations, solutions were not verified, etc.
Troubleshooting humans is a bit more tricky.
>>
>The stories and information found here are artistic works of fiction and falsehood.
>Only a fool would take anything found here as fact.

We got another one!
>>
>>106660710
I mean it wouldnt stop them ever since trump's entire thing won't actually charge any company as long as they suck up to commander spraytanned beef jerky
>>
File: 1758528874274.jpg (3.82 MB, 2250x4519)
3.82 MB
3.82 MB JPG
>>
>>106660710
Can /g/ even ever win?
>>
>>106660710
How else would you even write that function?
>>
File: cs graduate 2.png (248 KB, 1925x2013)
248 KB
248 KB PNG
>>106663008
>How else would you even write that function?
>>
File: 1748524372600665.png (924 KB, 1080x1432)
924 KB
924 KB PNG
>>106661230
>or he's really a dumb jeet
Would be funny but even as a retarded nocoder I know about the meme
>>
>>106663008
Whatever your language's local variation of "Return (Number Mod 2 = 0)" is.
>>
>>106662705
this ain't /b/
>>
>>106663076
for me, it's
return (num & 1)
>>
>>106663008
>>106663032
>>106663076
>>106663269
Why would you make it a function?
Parity and bit checks are one of those dumb things that have no excuse ever to make a call even on dumb compilers or the most ancient platforms.

I would say that

#define IsOdd(num) ((num) & 1)

is the way(the parentheses are very important and not redundant btw. Im tired of tards repeating that and then crying when they throw in nasty expressions with lower precedence operators into the macro) but even that is more verbose compared to just doing (1&num) everywhere and preprocessing is costly.

>inb4 an expression is a function too, and more pure than general C functions
You know what I mean faggot
>>
>>106663410
not wrong. but you shouldn't even need to call a function or macro just for this one simple check.
>>
just import it with npm duh
>>
>>106663410
>#define IsOdd(num) ((num) & 1)
but we want IsEven()
>>
>>106663648
!IsOdd()
>>
Is anyone else a bit mystified by the fact that we were taught division with remainders in second grade, then the concept disappeared for 10 years, and returned as a mission critical concept for the organisation and delivery of all information?
>>
>>106663052
you may not like it but this is the canonically correct way to do it.
>>
>>106660710
Based troll
>>
>>106663750
>>
>>106663801
this
most compilers generate jump tables up to a certain number to check for even even if you do
 x & 1 

gcc I think goes up to int limit
>>
>>106663750
true its weird, all i learned in hs was calculus and functions then in compsci im suddenly reminded by remainder division and need to become a pro at it in order to convert from any base to another
>>
>>106664223
no way
>>
>>106663008
if(x == 0) {
return true;
} else {
return isEven(x-1) == false;
}
>>
>>106663410
>Why would you make it a function?
To make your code readable Pajeet.
>>
>>106664302
>needs a wrapper for x % 2
post hand
and if youre white
big corpo is 100% justified in hiring jeets
its the same fucking shit only cheaper
>>
>>106664223
I do x%1
Why would you do & when you can do modulus?
>>
>>106664330
I think bitwise executes faster, but unless you're doing a modulo on 100k ints, I don't think the difference would even be detectable.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.