[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Extra juicy! | Home]

Anyone else go to a retarded university? Earlier this week my

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 2

File: 1418181199058.jpg (174KB, 1533x961px) Image search: [iqdb] [SauceNao] [Google]
1418181199058.jpg
174KB, 1533x961px
Anyone else go to a retarded university? Earlier this week my dumbass professor asked me why I keep using ternary operators and hex numbers in my homework.
>>
What was your answer?
>>
>>51559392
Don't you have a street to poo into rajeesh?
>>
>>51559431
They're faster and more efficient.
>>
I go to a uni where all of my professors are either Chinese or Indian
>tfw code in PowerPoint slides contains basic errors
>tfw every class is in Java or PHP
>tfw they teach us to uselessly comment every like //increment i by one
>>
>>51559392
>retarded university
If you can't afford/manage to get into the best in your country why even bother going to uni tbqh pham?
Polimi master race reporting in
>>
>>51559452
Not really: ternaries compile just the same as if-statements (with conditional branches, or very occasionally conditional-coded instructions on legacy ARM), and basically any literal constant is equivalently referenced.

Be careful of ternaries. While they are useful syntactic shortcuts, careless use can bite you where you least expect it sometimes, especially in duck-typed languages where which things are 'truthy' and 'falsey' when coerced into a boolean are not necessarily obvious: PHP's a poster child for that, but so is javascript. The same can be true of using inline (statemented) if/then/else constructs in the languages that support it - I frequently used it in Lua as a nil-squasher, but you need to be vigilant about in which circumstances it could fuck things up.

Clear formatting can be challenging, too. It can look quite nice sometimes as:
 variable = expression
? value_if_true
: value_if_false;
>>
>>51559461
I hate that comment every line crap. If you write good code it shouldn't be necessary to explain every single line. This is only acceptable somewhat in assembly.
>>
>>51559452
Your uni is dumb, but you're equally as dumb if you actually responded with that.
>>
File: 79aE4Wu.png (12KB, 565x365px) Image search: [iqdb] [SauceNao] [Google]
79aE4Wu.png
12KB, 565x365px
>>51559833
>PHP's a poster child for that
PHP evaluates ternaries from right-to-left, which is why it confuses fucking everybody.
>>
>>51559392
>at uni
>computing lecture
>slides on laptop through laptop, stepping through, not on slideshow
>look at taskbar, bubble about bluetooth
>try to connect to laptop from phone
>security popup, laptop makes a noise
>lecturer gets flustered
>5 minutes later gets popup to go away
>doesn't turn off bluetooth, doesnt silence.
>repeat for the rest of the class
>>
>>51559392
>frogposter
Makes sense.
Thread posts: 12
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
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.
This is a 4chan archive - all of the content originated from that site. This means that 4Archive shows an archive of their content. If you need information for a Poster - contact them.