(no title)
nousermane | 2 years ago
> using the conditional-value ("ternary") operator in any capacity
Looks like author of some code I had to comb through recently, maybe had that among guidelines. Said code was replete with:
if(function_that_returns_boolean()){
return true;
}else{
return false;
}
...and... if(foo()){
return true;
}else{
if(bar()){
return true;
}else{
return false;
}
}
ggambetta|2 years ago
Why stop there?
drewcoo|2 years ago
https://en.wikipedia.org/wiki/Guard_(computer_science)
HaroldBolt78|2 years ago
[deleted]
hardware2win|2 years ago
Doing the same for not tiny boolean expression: way more
Just because you think it is cool cuz profs forced it on ya during college is not a argument
hayley-patton|2 years ago
hayley-patton|2 years ago
The 2021 final exam (which is the most recent I can find) [1] somehow creates XML records for a SQL database (section C, question 7), and hints at using "data validation" to avoid an SQL injection (section C, question 11.c), which is quite exciting. And the 3.5 gigabit wireless connection (section A, question 13) is definitely not using an ISP-supplied router.
[0] https://www.vcaa.vic.edu.au/Documents/exams/technology/2019/..., answers https://www.vcaa.vic.edu.au/Documents/exams/technology/2019/...
[1] https://www.vcaa.vic.edu.au/Documents/exams/appliedcomp/2021..., answers https://www.vcaa.vic.edu.au/Documents/exams/appliedcomp/2021...
erik_seaberg|2 years ago
cookieperson|2 years ago
gizmo|2 years ago
regularjack|2 years ago