← Home ← Back to /g/

Thread 106918897

193 posts 14 images /g/
Anonymous No.106918897 [Report] >>106918918 >>106919023 >>106919336 >>106919359 >>106919534 >>106919563 >>106919694 >>106919747 >>106920049 >>106920138 >>106920151 >>106920164 >>106920273 >>106920383 >>106920434 >>106920452 >>106921621 >>106923335 >>106923619 >>106924570 >>106925530 >>106925545 >>106925619 >>106925933 >>106926363 >>106926440 >>106926659 >>106926717 >>106926881 >>106927143 >>106927330 >>106928264
NASA coding rules
based? or overkill micromanagement?
Anonymous No.106918918 [Report]
>>106918897 (OP)
This is good for jeetcoders
Anonymous No.106919023 [Report] >>106919361 >>106920703 >>106920822
>>106918897 (OP)
In the case of games, 4 conflicts with 1. You have a main loop that does a whole lot of things sequentially, and the clearest way to represent this is one big function:
http://number-none.com/blow/blog/programming/2014/09/26/carmack-on-inlined-code.html
Anonymous No.106919336 [Report] >>106919407 >>106919589 >>106919614 >>106919782 >>106920394 >>106921977 >>106922150 >>106923335
>>106918897 (OP)
>avoid recursion
nah, don't hire retards
>avoid heap allocation after initialization
something something i/o
>do not use function pointers
there goes all my callbacks and event systems
how about nah, fuck off NASA

here's a better one: don't use globals for state
Anonymous No.106919359 [Report] >>106919370
>>106918897 (OP)
Single printed page is a retarded rule only a boomer can come up with. Grandpa we're not writing code on punch cards, you can look at it on a monitor. Basically you can combine all this into a basic set of rules:

1. your code should be easy to understand
- one operation per line
- one parameter per line
- named methods based on function
- write comments explaining what you're doing even if it's obvious

2. single purpose functions with obvious, predictable inputs and outputs

3. predictable loops

4. catch errors and gracefully fail

5. your code should compile without errors and warnings
Anonymous No.106919361 [Report] >>106919496
>>106919023
smaller functions are easier to read than one big function
Anonymous No.106919370 [Report] >>106919378
>>106919359
You're completely missing the rules which make static analysis possible
Anonymous No.106919378 [Report] >>106919397 >>106919411 >>106919413 >>106925740 >>106927329
>>106919370
Those rules didn't stop them from blowing up Challenger. So fuck off. My rules cover all code and if you can't write proper code that doesn't break with my rules you shouldn't write code for a rocket engine.
Anonymous No.106919397 [Report]
>>106919378
Your rules don't cover the cases which make static analysis possible which is the most important thing when you're trying to write secure code
Anonymous No.106919407 [Report] >>106919539 >>106919599 >>106919661
>>106919336
Callbacks and async programming in general was a horrible idea for writing reliable, predictable code. It's a major reason for why so many programs/apps are unstable now. Even if you were a very intelligent person you'd have a hard time tracking problems down in a timely manner.
Anonymous No.106919411 [Report]
>>106919378
Misra C guidelines were created a decade after the Challenger incident
Anonymous No.106919413 [Report] >>106919431
>>106919378
That was caused by a mechanical failure in one of the boosters that had nothing to do with software, retard
Anonymous No.106919431 [Report] >>106919456 >>106920535
>>106919413
mechanical failure of a component operated by software :)
guess they couldn't statically review that lamamoammaoo
Anonymous No.106919444 [Report] >>106919456 >>106919591
>do not use function pointers
Don't you need those for events and monitoring?
Anonymous No.106919456 [Report] >>106919500
>>106919431
Jesus christ you're fucking stupid

>>106919444
You need function pointers for any form of complex code, but the code that operates machines is not complex
Anonymous No.106919496 [Report] >>106919651 >>106920681 >>106920857
>>106919361
10 tightly coupled, 10-line functions are harder to read than one 100-line function, in general.

Splitting functions into multiple smaller ones should be done based on whenever it makes sense, not based on arbitrary metric like number of pages it take when printed/displayed in some unspecified font, size and line height.
Anonymous No.106919500 [Report]
>>106919456
lmaomooo nasa employee still printing 16pt double spaced code reviews on printer paper
Anonymous No.106919534 [Report]
>>106918897 (OP)
MISRA in general is behind the times and is no guarantee of good software anyway. These NASA rules seem pretty reasonable, though (6) probably ought to be reworded since it is slightly ambiguous, and (9) should be a guideline rather than a hard rule.
Anonymous No.106919539 [Report]
>>106919407
RTOS is nothing more than primitive, bloated async runtime minus dedicated syntax.
Anonymous No.106919563 [Report] >>106919632
>>106918897 (OP)
>goto
>recursion
>complex
Anonymous No.106919589 [Report] >>106919663
>>106919336
>here's a better one: don't use globals for state
This is not webdev. Everything is based around globals in embedded because you don't have an OS to allocate memory for you.
Anonymous No.106919591 [Report]
>>106919444
No of course you don't. You can just use a switch statement on your task id and dispatch accordingly. It's retarded but it doesn't require using function pointers.
Anonymous No.106919599 [Report] >>106919661
>>106919407
callbacks have nothing to do with async, and very often callbacks are the only means of writing performant code when dealing with massive datasets
callbacks are also the only way to handle eventing systems which are far simpler to reason about than mainloops or deep inheritance
async should be "avoided" purely from a readability perspective, because messy code is hard to reason about and async is only ever messy
and neither async nor callbacks make code unstable or unpredictable; they make complex interactions much simpler to reason about. the thing making code unstable is retarded indians and OSs forcing cli programs to depend on non-deterministic GPU drivers in their memory space
Anonymous No.106919614 [Report]
>>106919336
They have to make critical on the spot decisions which could mean lie or death, they aint got time to follow the code to know why it is the way it is
Anonymous No.106919632 [Report]
>>106919563
Leads to code that is hard to reason about.
Anonymous No.106919651 [Report]
>>106919496
one 100 line function is about a page, yeah
Anonymous No.106919661 [Report] >>106919709
>>106919599
>>106919407
function pointers, recursion and goto means your code cannot be statically analyzed, that's why they're forbidden
Anonymous No.106919663 [Report] >>106920302 >>106920552
>>106919589
you still have a stack, references, and return types
using globals gives you an opportunity to overwrite state that isn't your own.
parameterizing state into the stack means you only even see the data your function depends on.
embedded developers will then complain about not enough memory but turn around and buy a 32M atmel chip with 256MB of nvram and duplicate the nv storage 6 times "because it's easier"
Anonymous No.106919694 [Report] >>106920650 >>106926203
>>106918897 (OP)
Very good. These people are building spaceships, this isn't a video game or cuck registry search script. Same rigour is needed for any vehicles, elevators, heavy machinery with digital safety detectors, etc.
Anonymous No.106919709 [Report] >>106919790
>>106919661
that's simply untrue.
function pointers are assigned at some point in an execution chain, there are limited possible paths to take and it's almost always discoverable by handling call context
goto is trivially analyzable, it's just an unconditional jump which disassemblers have been able to analyze for decades
recursion is hard to analyze for some scenarios like trees and loop detectors, but tons of languages explicitly optimize for well behaved recursion so there's obviously a statically analyzable form of it
Anonymous No.106919747 [Report]
>>106918897 (OP)
How about using long ass identifiers?
Anonymous No.106919748 [Report] >>106920731
Check the documents in references, it has some more reasoning than just single line.

1) Simple control flow is obviously right. lots of everyday refactoring of every programmer is simplifying control flow.
Recursion is a bit niche for embedded since you usually have limited stack space and proving your stack will never overflow from call graph is handy analysis, and recursion tends to fuck it up.
For desktop PCs you can get away with it, but always make it obvious that it will terminate.

2) Again in embedded programming you'll often have some loop where you write some command into device register and wait in loop for flag that it finished.
Naive code would just do infinite loop. But really you should be anal and have all these loop bounded by timeout or retry count.
It never fails in dev but then your sensor dies in field and your whole board should get stuck because of that? No thanks.

3) No dynamic allocation is overkill for many people. But you can approach it like this - you need to reliably handle cost of allocation and failure of allocation (exhaustion of resources and such).
Even for any performance sensitive software it's mostly handy rule. Allocate all resources ahead of time, fail early and have predictable rest.

4) is bullshit, check Carmack on Inline Code and I do believe he's right. Long functions can actually make things cleaner and simpler to navigate and understand.

5) I'm not settled on excessively asserting. It's nice to have invariances explicitly stayed out, but when it's too much?
>Assertions must be side-effect free.
God I wish C compilers would check this.

>9) ... function pointers are not permitted
RIP dynamic dispatch and interfaces. Obviously I disagree with this.
Anonymous No.106919782 [Report] >>106919926 >>106920119
>>106919336
Arrogance = dead astronauts.

If you are 160 IQ and can understand your labyrinth, think how much faster you could understand straightforward code and how difficult it would be to make a mistake.

I think of the size the codebases must be for NASA software. Things can get complex fast if you have one function called by like 1000 different files, then want to edit that function. It's a lot of time to check each call and make sure the logic won't break with a specific "cleaner" refactor or whatever you're doing.

You might change a function and where model.Field was returning "" when a function failed in a certain way, a large refactor and suddenly you find that somewhere in the chain something altered that caused a chain reaction to where the path is now always populated and later gets appended onto an external program call's arguments and breaks.

It can be very very very easy to do this, primarily if you update a dependency to a new version which has internally changed the way some of its functions work.
Anonymous No.106919790 [Report] >>106920119
>>106919709
all 3 of those can lead to untracable control flow
they're tracable under some circumstances, but not all or even most
Anonymous No.106919926 [Report] >>106920003 >>106920199
>>106919782
Code must be as simple as possible, and no simpler. Blanket banning constructs from use leads to additional complexity when someone has to emulate those constructs with the constructs still allowed. Banning goto means when I have to use goto I need to emulate it with a while loop or something. This doesn't make code any simpler, it just makes it harder to read.
Anonymous No.106920003 [Report] >>106920087
>>106919926
Those constructs are banned to limit the control flow of a program to one direction so it can be statically analyzed
You can't emulate goto with a loop because infinite loops are also banned
Anonymous No.106920049 [Report] >>106920713 >>106920978
>>106918897 (OP)
Based.
Nu-devs and webshitter are the ones seething about these rules and don't understand what they are. Looking at all the seething in this thread there is no question why a fucking notepad needs 2 GB and an i7, no wonder why nu-gamedevs are absolute shit.
Most used phrase in corporate I encounter: "just start another instance in AWS/Azure".
Anonymous No.106920087 [Report]
>>106920003
gotos usually go down anyways.
Anonymous No.106920119 [Report] >>106920129
>>106919782
NASA rules for NASA software is plenty fine, especially since the vast majority of NASA software is setpoint control for various flow regulators and electric motors. if you're doing recursion in that you deserve the hell you've created
NASA codebase isn't excessively extravagant because they launch rockets; NASA rules exist to force their vendors to deliver code in a fashion that NASA mathematicians and engineers can "prove" and relate to federal software requirements auditing
>>106919790
that's a much different statement than "cannot be statically analyzed", and "some" circumstances definitely include useful software techniques
Anonymous No.106920129 [Report] >>106920165
>>106920119
>that's a much different statement than "cannot be statically analyzed"
not really, what's the point in leaky static analysis?
Anonymous No.106920138 [Report] >>106920146
>>106918897 (OP)
LMAO. Why they don't just use a better language (not Rust)?
Anonymous No.106920146 [Report] >>106920506
>>106920138
rust's idea of safety is runtime crash, which is completely unacceptable
Anonymous No.106920151 [Report] >>106920230 >>106920234 >>106920365 >>106920614 >>106920776
>>106918897 (OP)
goto is absolutely necessary for clean error handling, e.g.
if(err1) {
goto clean1
}
...
if(err2) {
goto clean2
}
....
clean1:
free(x1)
clean2:
free(x2)
Anonymous No.106920164 [Report] >>106920215
>>106918897 (OP)
This is actually standard practice (or should be) in the real-time community.
>avoiding goto and recursion
>all loops must have fixed bounds
This is to bypass the halting problem and allow for better compatibility with static worst-case execution time analysis tools

>avoid heap allocation after init
again, a real-time system constraint. Decreases the state space for analysis tools and analysis becomes easier when everything is pre-allocated memory

>assets
For verification purposes, again, using a static analysis tool

>simple macros, minimum scope, no func pointers, check returns
security concerns
Anonymous No.106920165 [Report]
>>106920129
static analyzers either know the result or they can inform you of region that can't be analyzed.
they can run as part of CI
they rarely only look at individual functions and code typically has to built specially to instrument it with analyzer symbols to retrieve AST and code paths
Anonymous No.106920199 [Report] >>106920235
>>106919926
Not sure of context, but usually if you "need" a goto, you can make a helper function that returns early if the condition that you wanted to stick that on is triggered. Or return some sort of bool and wrap the code before the goto location in a check on that bool.

This is generally easy to read if you flatten if{} nesting as it'll only add one layer around a sizeable chunk.
Anonymous No.106920215 [Report] >>106920298
>>106920164
>This is actually standard practice (or should be) in the real-time community.
no it's not
Anonymous No.106920230 [Report] >>106920472
>>106920151
Only if you're a cnile. C++ doesn't have this issue.
Anonymous No.106920234 [Report] >>106920349 >>106920374
>>106920151
I don't know what language this is, it doesn't let you just do free(x2) in the if{} ? And return if the function should no longer proceed?
Anonymous No.106920235 [Report] >>106920376
>>106920199
Obviously you can rewrite code that uses goto to be more complex and harder to read. You shouldn't, though.
Anonymous No.106920273 [Report] >>106920630
>>106918897 (OP)
hate stuff like this. some asshole gets a holier than thou attitude and starts telling other people how to behave. get fucked.
personally i tend to abide by most of these anyway. i just don't like being told what to do.
the problem is that its all very well saying 'keep it simple' until you get into a situation where you can no longer keep it simple.
which leads to rules using words like 'avoid', 'average'. these are no longer rules they are guidelines.
here is my number one rule for writing computer code: don't work with stupid people.
this one simple rule makes all other rules practically obsolete.
misra isn't much better, like 500 pages of common sense and then one or two stupid crap about how to spell variable names. grow up.
i worked with 'people' who simply lie about things; manipulate test conditions, are dishonest about regression.
you can make as many rules as you like its not the rules which are the problem.
i have been told my whole life that software enginreeing will always have bugs because it is simple too complicated to test fully. i don't really believe that that is true at all, i believe simply that software engineers are lazy and stupid. if we are being honest we all could point to code we have written and identify where errors could occur, where checks are skipped. it's just lazyness.
Anonymous No.106920298 [Report]
>>106920215
I fucked up and forgot to correct it before posting.
I meant >good practice
If you're running your safety-critical code with loops through static analyzers, you either need to prove loop invariants to show that the loop terminates, or you can just use loops that trivially terminate.

I mostly work in academia, and outside of last minute experiments chasing deadlines, we typically do all this shit.
Idk what industryfags do, but I did hear that most automakers don't really give a shit about proper good practices for safety systems because it would be too expensive.
Anonymous No.106920302 [Report] >>106920377 >>106920587
>>106919663
people throw around 'don't use globals' when they really mean restrict scope. sometimes (often) in embedded, the scope necessarily is global.
Anonymous No.106920349 [Report]
>>106920234
It can be cleaner to centralize the returning and freeing of various variables at the end of the function, particularly if you need to clean up those same variables at different error states, e.g.
if(err1) {
goto clean1
}
if(err2) {
goto clean1
}
Anonymous No.106920365 [Report] >>106920409 >>106927183
>>106920151
Don't you also need gotos to break out of nested loops
Anonymous No.106920374 [Report] >>106920437
>>106920234
>I don't know what language this is
obsolete language for dumb pathetic cunts that encourages you to write dangerous and incorrect code for it's lack of basic modern language tools.
Anonymous No.106920376 [Report] >>106920464
>>106920235
Are you sure that it is? For a newcomer to the project, it can be easy to miss these types of calls compared to simple nest, helpers, and early returns. An if bool{} has a clear beginning and end, most code editors will make it obvious with highlighting and color coding. Unless you have lots of deep nesting, you can usually flatten those a lot.

I would need to check bool to even do a goto anyway in many of my programs, as it'll be a bool like "shouldProcessVideo", and if not I skip over the video process helper (or code chunk, depending on size) and then continue on the next part.

It is something like.

if shouldProcessVideo {
result = videoProcess(v *models.Video)
}

Rather than goto if it fails the check. Like:

if (err1) {
clean(x1)
}

func clean(variable type) {
free(variable)
}

Can this be done in the languages being discussed? Also I forgot how to format code on here it's blocks right?
Anonymous No.106920377 [Report]
>>106920302
I also mean restrict scope, because a global is no different than a stack structure allocated in main and passed as a parameter.
however, what I definitely mean is don't use global STATE. mutexes, factory singletons, work queues, thread pools, global error handlers, etc are fine; anything immutable or idempotent in the global space is fine, anything globally initialized once is fine. but global state means any function anywhere can modify any piece of the state at any time and the only way to catch it is asserts and debuggers
Anonymous No.106920383 [Report]
>>106918897 (OP)
>NASA study of the Toyota electronic throttle control firmware found at least 243 violations of these rules.
actually laughed out loud
Anonymous No.106920394 [Report]
>>106919336
>don't use globals for state
literally why not i do it in JS all the time
Anonymous No.106920409 [Report]
>>106920365
good languages let you do something like:

outer: for (int x = 0; x < 10; ++x) {
for (int y = 0; y < 10; ++y) {
break outer;
}
}
[/code[
Anonymous No.106920434 [Report]
>>106918897 (OP)
all rules not enforced by static analysis are fake and gay.
Anonymous No.106920437 [Report]
>>106920374
I forgot C almost entirely. I remember enjoying SCREAMING_SNAKE_CASE for constants and enums because they have them all throughout PS1 game codebases... It is very cool to make an entire game run on 256MB of RAM, but ultimately perhaps people have forgotten some things about the days of yore... Primarily how basic everything was, how little things needed to interact with ever-changing software (everything came on disc, you install, it's static), and also how often things crashed.

You now have vivid flashbacks of "painting" your Windows XP desktop with glitched windows that leave cool trails everywhere, and Yahoo searching obscure error codes.
Anonymous No.106920452 [Report]
>>106918897 (OP)
They are just part of rhe enormous amount of smoke and mirrors, very little actual code ever gets written at these companies.
Anonymous No.106920464 [Report]
>>106920376
you can do
int rc = 0;

if(!rc){
rc = func();
}

if(!rc){
rc = func2();
}

...

//cleanup

return rc;

it's readable, just less readable than goto.
Anonymous No.106920472 [Report] >>106920479 >>106920498 >>106920609
>>106920230
C++ absolutely does, in fact every language does (in that languages without goto are fundamentally defective). Not everything can be handled with "defer" or RAII or other such schemes.
Anonymous No.106920479 [Report] >>106920496
>>106920472
>Not everything can be handled with "defer" or RAII or other such schemes.
Yeah. It can. If you can't, you did it wrong (probably because you're a cnile.)
Anonymous No.106920496 [Report] >>106920574 >>106920740
>>106920479
No, it can't. For example, envision a scenario where you need to communicate with another thread within a specific scope of a function (e.g. a for loop), defer/RAII won't work there in the event of error states that require clean up but goto does.
Anonymous No.106920498 [Report]
>>106920472
Jesus died so we could have defer.
Anonymous No.106920506 [Report]
>>106920146
do you even english?
Anonymous No.106920513 [Report]
If Edsger Dijkstra was alive today, he would write "C Language Considered Harmful".
Anonymous No.106920535 [Report] >>106920580
>>106919431
challenger failed because they rated the O-rings of the booster stages incorrectly, retard. it was a pure hardware failure, or rather a management failure because it was predicted ahead of time and dismissed
Anonymous No.106920552 [Report] >>106920705
>>106919663
>using globals gives you an opportunity to overwrite state that isn't your own.
That's why you use language that prevents shared mutable access.
Anonymous No.106920574 [Report]
>>106920496
That's not remotely true. You have no fucking clue what you're talking about. Either post code or shut the fuck up.
Anonymous No.106920580 [Report]
>>106920535
It blowed up because they used the Rust.
Anonymous No.106920587 [Report]
>>106920302
it's still a fairly common design pattern in embedded to have static resources rather than global ones

though when you're rawdogging the CPU's address space you can always just read/write directly to whatever the fuck you want including memory mapped IO, it's a matter of coming up with and abiding by conventions to avoid issues
Anonymous No.106920609 [Report]
>>106920472
Go can do this but nobody wants to use it because it's simple and dull.
Anonymous No.106920614 [Report]
>>106920151
Use a custom allocator or resource pool.

RAII and GC are great solutions for the wrong problem, and modern CS education is terrible for repeating this mantra.
Anonymous No.106920630 [Report]
>>106920273
This. 80% of MISRA rules are worthless as well.
Anonymous No.106920650 [Report] >>106920692
>>106919694
Just because they build spaceships doesn't mean the guidelines are reasonable. Most of the time, they are entirely made up by boomers who haven't written code in decades.
Anonymous No.106920681 [Report]
>>106919496
>10 tightly coupled, 10-line functions are harder to read than one 100-line function, in general.
Yes. Which is why functions should be "pure" as often as possible.

By "pure" here I mean that their behavior can be entirely and exclusively controlled by its arguments, depending on how the specific language does it. A simple C function like memset would qualify.
Anonymous No.106920692 [Report] >>106920702
>>106920650
NASA has like one failure in 999. Space X probably uses bleeding edge tech, and they also blow up half their rockets.
Anonymous No.106920702 [Report] >>106920723
>>106920692
Correlation =/= causation.
Anonymous No.106920703 [Report]
>>106919023
This is a pedantic interpretation of the rules
Rule 4 is saying to avoid long functions as a general pattern, it doesn't apply to your main entry point, which in the case of games is the main render/update loop.
Anonymous No.106920705 [Report]
>>106920552
that only works in concurrent code, mainloops based firmware wont have any protection
Anonymous No.106920713 [Report]
>>106920049
t. LARPing NEET
Anonymous No.106920723 [Report] >>106920746
>>106920702
>Correlation =/= causation.
spoken like a true soiguzzling reddit faggot
Anonymous No.106920731 [Report]
>>106919748
>In the years since I wrote this, I have gotten much more bullish about pure functional programming, even in C/C++ where reasonable: (link)

The real enemy addressed by inlining is unexpected dependency and mutation of state, which functional programming solves more directly and completely.
Anonymous No.106920740 [Report] >>106920761
>>106920496
In Rust, there is ManuallyDrop
In C++, just make destructor a noop.

If your use case demands confusing lifetimes, nothing prevents you from absconding RAII, but honestly, if you do, you're probably doing something wrong.
Anonymous No.106920746 [Report] >>106920771
>>106920723
Say that again in English, I don't speak zoom.
Anonymous No.106920761 [Report] >>106920781 >>106920791 >>106920806
>>106920740
RAII needs exceptions, which are hilariously bad for anything safety-critical.
Anonymous No.106920771 [Report] >>106920977
>>106920746
1. I'm older than you.
2. you're being a retarded ass nigger
Anonymous No.106920776 [Report] >>106920819
>>106920151
not sure what your code is trying to do - shouldn't clean2 and clean1 be in the other order?
anyway if you're trying to do what I think, it's solved by nesting
if you're trying to do something else then ignore

x1, err1 = ...
if (not err1) {
...
x2, err2 = ...
if (not err2) {
...
}
free(x2)
}
free(x1)
Anonymous No.106920781 [Report] >>106920960
>>106920761
>which are hilariously bad for anything safety-critical.
only if you suffer from exceptions derangement syndrome
Anonymous No.106920791 [Report] >>106920820 >>106920831 >>106920960
>>106920761
actually it doesn't. C++ needs exceptions because it cant fail in constructors in any other way.
Anonymous No.106920806 [Report] >>106920858
>>106920761
RAII is an stupid concept, you can have compile time checked resource dealocation by using linear types, and you can completely remove exceptions by using sum types as return value.
Anonymous No.106920819 [Report] >>106920851
>>106920776
>it's solved by nesting
this makes the code too heavily nested and hence much more difficult to read. The goal is simplicity. goto is simple, and alternative solutions are more complex.
Anonymous No.106920820 [Report]
>>106920791
>C++ needs exceptions because it cant fail in constructors in any other way.
It's more like it need exceptions because it's a poorly designed language.
Anonymous No.106920822 [Report]
>>106919023
every game engine is different though. ironically especially the new idtech where the main loop is supposedly just a task queue
Anonymous No.106920831 [Report] >>106920989 >>106921696
>>106920791
You can get around that by making an external or static factory function that can fail, and there's probably a nice way to do that with std::optional or std::variant.
Anonymous No.106920851 [Report] >>106920884
>>106920819
Goto is easy to get wrong, as the other poster showed in their example that seems to have a bug with the ordering of free's.
Nesting is fine. Everyone has ultra widescreens now so even if you use 8 character indents it's still not a problem.
Anonymous No.106920857 [Report] >>106920892
>>106919496
Taking the defaults, a page of code in VSCode on a decent dev laptop screen is maybe 60 lines. If you are unable to compartmentalize 2-3 sections of a 100-line function, I'd seriously be worried about how much of a shitshow the whole project is.

I'd guess based on this that either there are no unit tests at all, or the few that are present are nightmare fuel stacked deep in layers of mocks.
Anonymous No.106920858 [Report] >>106920960 >>106921208
>>106920806
RAII isn’t “stupid,” it’s genius. Linear types and sum types are toys for academics; RAII actually works in the real world, handling resources deterministically while keeping code sane. Your “compile-time only” fantasies don’t magically clean files or close sockets when your program crashes.
Anonymous No.106920884 [Report] >>106920927
>>106920851
When the start of the nest and the end of the nest are far away from each other, it's just as hard to tell where they line up. The solution is diligence.
Anonymous No.106920892 [Report]
>>106920857
>If you are unable to compartmentalize 2-3 sections of a 100-line function,
I can. That doesn't mean they will be more readable this way.
Anonymous No.106920927 [Report]
>>106920884
Yeah I guess, I dunno I use nesting liberally in my code and I never seem to have memory leaks or use after free in my code. I'm also diligent though.
Anonymous No.106920960 [Report] >>106920996
>>106920858
Linear types and sum types are literally zero cost.

RAII isn't.

>>106920791
What does RAII stand for again? You need exceptions for RAII to work.

>>106920781
4/10 bait
Anonymous No.106920977 [Report] >>106921009
>>106920771
>i'm older than you
Only a child would be using this as a boast. Enjoy your youth while it lasts.
Anonymous No.106920978 [Report]
>>106920049
The RAM cost is worth the benefits afforded by its usage. Nobody is running out of RAM in 2025, no need to make buggy codebases no new maintainers can easily comprehend when there is such abundance. The benefit outweighs.
Anonymous No.106920989 [Report] >>106921055 >>106921696
>>106920831
That literally decouples resource acquisition and initialization.
Anonymous No.106920996 [Report]
>>106920960
>Linear types and sum types are literally zero cost.
>RAII isn't.
False. RAII itself does not inherently have a runtime cost. The runtime cost comes from the resource management operations performed within the constructor and destructor of the RAII class.
Anonymous No.106921009 [Report]
>>106920977
I'm 37, faggot. Eat another dick for me, you stupid nigger.
Anonymous No.106921055 [Report]
>>106920989
>That literally decouples resource acquisition and initialization.
A factory function with a private constructor doesn't necessarily decouple resource acquisition & initialization. The factory can couple them by doing all the heavy lifting before returning, or it can decouple them by returning a "blank" object. It's an architectural choice, not an enforced pattern.
Anonymous No.106921208 [Report] >>106921241
>>106920858
>Your “compile-time only” fantasies don’t magically clean files or close sockets when your program crashes.
It's posible to do that while using proper error propagation, since linear types can only be used once an unused value can be automatically destroyed.
Anonymous No.106921241 [Report] >>106921361
>>106921208
buy an ad faggot
Anonymous No.106921361 [Report]
>>106921241
No.
>The Error Propagator is a language-level construct designed to simplify and enforce safe error handling for operations returning Result<T> or other tagged sum types.

>It allows errors to be explicitly propagated to the nearest enclosing try-catch block without requiring verbose pattern matching. The propagator can be applied either as a prefix operator (propagate expr) for single expressions or as a block (propagate { ... }) for sequences of statements, propagating the first error encountered. When combined with linear types, it ensures that resources such as files, sockets, or memory buffers are safely moved or released even in the presence of errors. By making error flow explicit, concise, and safe, the Error Propagator improves readability, composability, and correctness over traditional pattern matching.
Anonymous No.106921621 [Report]
>>106918897 (OP)
just by using rust you follow all of these rules by default
Anonymous No.106921696 [Report] >>106921716 >>106921799 >>106922943
>>106920831
>>106920989
It's not great but here's an example:

#include <optional>
#include <iostream>

class IncreasingRange {

struct CtorTag { explicit CtorTag() {} };
IncreasingRange(int min, int max) : min{min}, max{max} {}

public:

static std::optional<IncreasingRange> make(const int min, const int max) {
if (min < max) {
return std::optional<IncreasingRange>(std::in_place, CtorTag{}, min, max);
}
return std::nullopt;
}

IncreasingRange(CtorTag, int min, int max) : min{min}, max{max} {}

const int min, max;

~IncreasingRange() { std::cout << "~IncreasingRange()\n"; }
};


std::ostream& operator<<(std::ostream& os, const IncreasingRange& increasingRange) {
os << "IncreasingRange{.min = " << increasingRange.min << ", .max = " << increasingRange.max << "}";
return os;
}

int main() {

int a = 0;
std::cout << "enter a: " << std::flush;
std::cin >> a;

int b = 0;
std::cout << "enter b: " << std::flush;
std::cin >> b;

// IncreasingRange range1{}; // doesn't compile: no constructor
// IncreasingRange range2{a, b}; // doesn't compile: can't call private constructor
// IncreasingRange range3{{}, a, b}; // doesn't compile: can't default-construct the private struct

if (auto increasingRange = IncreasingRange::make(a, b)) {
//increasingRange->min = increasingRange->max + 1; // doesn't compile: can't change value of const members
std::cout << "valid: " << *increasingRange << "\n";
}
else {
std::cerr << "couldn't create IncreasingRange: min = " << a << " to max = " << b << "\n";
}
}


Probably missed something stupid but that's the general idea.
Anonymous No.106921716 [Report]
>>106921696
compiling and running:
D:\cpp\temp>clang -o raii_no_except.clang.exe raii_no_except.cpp -lstdc++

D:\cpp\temp>raii_no_except.clang.exe
enter a: 10
enter b: 11
valid: IncreasingRange{.min = 10, .max = 11}
~IncreasingRange()

D:\cpp\temp>raii_no_except.clang.exe
enter a: 5
enter b: 4
couldn't create IncreasingRange: min = 5 to max = 4

D:\cpp\temp>raii_no_except.clang.exe
enter a: 6
enter b: 6
couldn't create IncreasingRange: min = 6 to max = 6
Anonymous No.106921799 [Report] >>106922907
>>106921696
cleaned up a bit
#include <optional>
#include <iostream>

class IncreasingRange {
private:

struct CtorTag { explicit CtorTag() {} };

public:

static std::optional<IncreasingRange> make(const int min, const int max) {
if (min < max) {
return std::optional<IncreasingRange>(std::in_place, CtorTag{}, min, max);
}
return std::nullopt;
}

IncreasingRange(CtorTag, int min, int max) : min{min}, max{max} {}
~IncreasingRange() { std::cout << "~IncreasingRange()\n"; }

const int min, max;
};


std::ostream& operator<<(std::ostream& os, const IncreasingRange& increasingRange) {
os << "IncreasingRange{.min = " << increasingRange.min << ", .max = " << increasingRange.max << "}";
return os;
}

int main() {

int a = 0;
std::cout << "enter a: " << std::flush;
std::cin >> a;

int b = 0;
std::cout << "enter b: " << std::flush;
std::cin >> b;

// IncreasingRange range1{}; // doesn't compile: no default constructor
// IncreasingRange range2{a, b}; // doesn't compile: no constructor which takes only 2 params
// IncreasingRange range3{{}, a, b}; // doesn't compile: can't default-construct the private struct

if (auto increasingRange = IncreasingRange::make(a, b)) {
//increasingRange->min = increasingRange->max + 1; // doesn't compile: can't change value of const members
std::cout << "valid: " << *increasingRange << "\n";
}
else {
std::cerr << "couldn't create IncreasingRange: min = " << a << " to max = " << b << "\n";
}
}
Anonymous No.106921977 [Report]
>>106919336
very dumb post
Anonymous No.106922150 [Report]
>>106919336
these are c guide lines, and recursion is not tail call optimized in the standard. you can get a stack overflow unexpectedly. i would hate to be an astronaut who blows up at launch because some guy wanted to flex his recursive algorithm.
Anonymous No.106922879 [Report]
Thank GOD Nasa doesn't hire /g/ coders.
Anonymous No.106922907 [Report] >>106923405
>>106921799
I'm guessing the ctor tag isn't zero sized, huh?
Anonymous No.106922943 [Report]
>>106921696
very cool otherwise. now I know why Rust doesn't have a concept of a constructor.
Anonymous No.106922987 [Report]
>2, 3, 5
genuinely good advice, especially for industrial programs
>6
ok
>1 (recursion)
avoid recursion, sure. avoid goto, sure.
>4
skill issue
>1 (goto), 7, 8, 9, 10
cope, stop using retarded languages like C
Anonymous No.106923335 [Report] >>106923493
>>106918897 (OP)
you have to keep in mind this is specifically for programming in C and nasa has/had a lot of employees. all of those guidelines deal with a specific type of PITA gotcha bug in C and general maintainability. This is a "dont try to be a special snowflake, here's how you don't cause trouble" list, which as an organization that hires lots of devs makes a lot of sense.
>>106919336
for example this dude would have already killed someone trying to be clever like a CS freshman
Anonymous No.106923405 [Report]
>>106922907
I think if you checked sizeof() it would say 1 byte but I bet the compiler optimizes it away since it's only used for function dispatch.
Anonymous No.106923462 [Report]
NASA should switch to Rust.
Anonymous No.106923493 [Report] >>106925480
>>106923335
every string copy is a heap allocation, anon
most serial devices with binary protocols don't use fixed size message codecs so to read them you're better off decoding the buffer into a heap object for passing around
while you can mathematically represent any recursive algorithm with a loop, you trade stack allocation for dynamic heap allocation to do so on all but the simplest ones
absolutely any kind of object polymorphism requires function pointers at the machine level, and all forms of dynamic linking are via function pointers
Toyota didn't fail because they used function pointers or dynamic allocation or callbacks or async or large functions or goto, they failed because they transformed global state arbitrarily in unrelated code modules.
Anonymous No.106923619 [Report] >>106926524
>>106918897 (OP)
>avoid goto
into the trash it goes
Anonymous No.106924130 [Report]
> "Do X and Y"
> "You're removing external variables. My clothing, the sweat… that was all generating confounding data. To truly isolate the effective stimulus, you need a neutral baseline. And putting me on the couch… that changes the power dynamic, a known psychological trigger for hormonal responses in primate social structures."
Gemini prose is marvelous (this is a normal person char).
Anonymous No.106924570 [Report]
>>106918897 (OP)
>no function pointers
I do understand why but I kinda hate it, they want all code paths to be clear and easy to prove statically, while also helping the compiler by forcing normal function calls only;

I guess it's only a hassle if the language doesn't have tagged unions and other compile time niceties, it's still not that bad.
Anonymous No.106925480 [Report] >>106925509
>>106923493
>every string copy is a heap allocation, anon
no
Anonymous No.106925509 [Report] >>106925538 >>106925562
>>106925480
I suppose you're right, string copies less than 16 bytes can typically be represented as a pure stack allocation on a 64 bit architecture.
still, an allocation is required to copy a string of you can't know the maximum size at compile time
Anonymous No.106925530 [Report]
>>106918897 (OP)
ITT: webshitters who don’t understand hard real-time constraints and deterministic requirements
>muh event system!
>muh allocations!
Please stay away from anything that isn’t your ecommerce shit applications, retard Dunning-Kruger jeets
Anonymous No.106925538 [Report] >>106925560
>>106925509
You should always know the maximum size at compile time.
Anonymous No.106925545 [Report] >>106925556
>>106918897 (OP)
Kek, I literally only use recursion
Anonymous No.106925556 [Report]
>>106925545
I only write in Haskell, Scala, and Ocaml professionally
Anonymous No.106925560 [Report]
>>106925538
this isn't even true for NMEA0813 where the spec is 80 characters max per message.
Anonymous No.106925562 [Report] >>106925580
>>106925509
allocate 100KB at init and reject anything bigger
problem solved
Anonymous No.106925580 [Report] >>106925593
>>106925562
ah yes, now my stills camera that takes 24MB 14 bit grayscale images doesn't work.
my multibeam snippets data is hosed because it's bigger than 100KB in this message
the telemetry message from ground control got buffered a little to long because of solar radiation and now I'm Major Tom
great plan, anon
Anonymous No.106925593 [Report] >>106925626
>>106925580
200KB then
Anonymous No.106925619 [Report] >>106925636 >>106925642 >>106926349 >>106927338
>>106918897 (OP)
11. No more than four levels of indentation.
12. Tabs, not spaces.
13. Every line of code must fit into 80 character columns (tabs count 8).
Anonymous No.106925626 [Report] >>106925657 >>106925855
>>106925593
how about "no heap allocations after init" is not a hard and fast rule, but a preference applied liberally until it doesn't make sense?
I almost always allocate a 1KB buffer for 9600 or 115200 serial comms and that's way more than enough.
but sometimes it just doesn't make sense because hardware is not well behaved and physics doesn't typically agree with digital signals
Anonymous No.106925636 [Report]
>>106925619
tab count 4
110 characters wide is perfectly legible on modern engineering laptops
I can't reasonably argue with 11 since I break MISRA on principle and use early returns liberally
Anonymous No.106925642 [Report] >>106925671
>>106925619
Oh and
14. No ternary expressions in code that'd be compiled in non-debug mode.
Anonymous No.106925657 [Report] >>106925706
>>106925626
how about you quit pretending you write software professionally?
Anonymous No.106925671 [Report] >>106925691
>>106925642
what about something like
auto const val = expression ? foo() : bar();
assuming your language has immutable but it's not default?
Anonymous No.106925691 [Report] >>106925706
>>106925671
nah, const for runtime variables is nothing but line noise
Anonymous No.106925706 [Report]
>>106925657
I've put software from the bottom of the ocean to low earth orbit.
haven't built missiles yet, but a colleague of mine has. he liked to use std::recursive_mutex too

>>106925691
fair, it's a nice protection against accidental if(var=1) though.
Anonymous No.106925740 [Report] >>106926402
>>106919378
Challenger software worked perfectly until the very last millisecond. One of the last received data frames from the computers is multiple channels of the engine controller voting to shut down different engines as programmed when turbopump inlet temps get too high.
Challenger had absolutely no software issues whatsoever.
Anonymous No.106925855 [Report]
>>106925626
>i want shitdeep singh to have complete freedom to call malloc as many times as he wants in the middle of safety-critical control loops
that's a bold strategy, etc.
Anonymous No.106925933 [Report] >>106926388
>>106918897 (OP)
For what purpose?
JPL did a ton of FMEA and each rule has a bunch of realistic failure modes behind it, each of which happened in actual production. This set of rules is very pragmatic for their particular use case.

For (You), these rules are useless. You can't afford them. The systems engineering process these rules are encoding is not useless though.
Anonymous No.106926181 [Report]
There is nothing wrong with recursive loops. What if it ends up being 100 loops but you accounted for 8?
Anonymous No.106926203 [Report] >>106926211 >>106926299
>>106919694
NASA's main focus is advertising gay nigger trans women on the moon while struggling to build a rocket to get to the moon while SpaceX is launching rockets 3 times a month without all of these gay retarded boomer rules.
Anonymous No.106926211 [Report]
>>106926203
Spacex “micro satellites” to “near orbit” “for profit”
Anonymous No.106926299 [Report]
>>106926203
I work for a company that audits both NASA contractors (you do realize NASA doesn't write their own code anymore, its just legacy MIC contractors, right) as well as spacex flight code, and let me tell you, neither of them are particularly rosy. SpaceX is ahead for one reason alone: risk appetite.
Anonymous No.106926349 [Report] >>106926372 >>106926387 >>106926453
>>106925619
lol, no. Spaces, not tabs. Two spaces per tab. The end.

Let the IDE turn two spaces into tabs if you hate yourself and want to suffer. Otherwise, don't shit up my 72 characters per line with your four levels of indentation with a fucking artifact from the days of teletype. Commit only spaces, and only Unix line endings, for that matter.

Then you won't need to limit yourself to four levels of indentation either.
Anonymous No.106926363 [Report] >>106926457
>>106918897 (OP)
>The NASA study of the Toyota electronic throttle control firmware found at least 243 violations of these rules.
I wish that the standards for code in automotive applications were stricter than this, actually. I wish that it was so much of an expensive pain-in-the-ass to write automotive code that carmakers started removing tech from their vehicles.
Like, I want to see a world where carmakers say "Android Auto and Apple CarPlay are no longer available because it would take 10K dev-years to even begin to audit them and even one failure would be a ten-billion-dollar fine"
we need less software.
Anonymous No.106926372 [Report]
>>106926349
Tabs are superior. Two spaces is javascript shitter garbage. Four spaces is the correct indentation.
Anonymous No.106926387 [Report]
>>106926349
You should go out and make real friends
instead of pretending to have all the wrong opinions to sate the urge to talk to someone
Anonymous No.106926388 [Report]
>>106925933
>For what purpose?
The software they’re writing is pit on machines that are launched into space. If it malfunctions in a way that cannot be fixed without physically touching the machine it is fucked, end of story
Anonymous No.106926402 [Report]
>>106925740
>the engine controller voting to shut down different engines
are americans this obsessed with democracy that even their software needs to VOOOOOOT before it can get anything done
lol lmao
Anonymous No.106926440 [Report] >>106926475 >>106926624
>>106918897 (OP)
1. I agree that goto obfuscates code execution paths, however I don't think recursion is "complex", so I'd allow recursion - Recursion can be extremely useful and sometimes it offers the most natural way to solve a certain problem.
2. I agree, infinite loops mean the program halts and cannot do anything unless the loop causes it to run out of memory / crash and that is not ideal either even if the program autorestarts itself
3. Not sure what initialization means here, I agree it could be avoided but sometimes you have to heap-allocate deep struct members individually if that's what it means
4. I agree functions should be kept as simple as possible, but no forceful splitting into multiple functions should be done however
5. Runtime assertions are great for debug builds, I assume their assertions are only present in debug builds.... I agree!
6. Unnecessary scope is always bad because it leads to increased complexity and dependencies, I agree.
7. I agree.
8. I agree, preprocessor should not be abused, that leads to obfuscation
9. I agree, I don't remember when I had to do multi-dereference, probably never - Function pointers are fucked because they can be null or point to invalid addresses, I agree they should be avoided. Faggots like to do "OOP" in C with function pointers, I don't see the point in that! You can't even get smart pointers in C because there is no destruction mechanism (function) for stack objects so I don't see point in OOP in C!
10 I agree, I always use Wall and address sanitizer and such tools in debug mode.
Anonymous No.106926453 [Report] >>106926505
>>106926349
Four-space tabs only.
Windows line endings only.
If you give me something with Jewnix line endings I'm gonna click "yes" when Visual Studio asks me to convert them all to Windows. Nothing personnel kid.
Anonymous No.106926457 [Report]
>>106926363
This is somewhat true. I'd rather the features like HUD work. And remove EU commie shit like ISA.
Anonymous No.106926475 [Report]
>>106926440
Regarding (4) typically this means when you start your program it's allowed to use heap initialization however during normal operation you want to disallow that behavior to ensure better determinism guarantees. Also, you can't have memory leaks if you never allocate.
Anonymous No.106926505 [Report] >>106926537 >>106926749
>>106926453
Not on my projects. On my projects, you do it right or you fail code review. There's nothing worse than some recent college grad thinking their opinion matters.
Anonymous No.106926524 [Report]
>>106923619
Usecase for goto?
Anonymous No.106926537 [Report] >>106926631 >>106926659 >>106926692 >>106926749
>>106926505
>There's nothing worse than some recent college grad thinking their opinion matters
Jesus christ dude. I had one such zoomer faggot I had to work with as a senior. I did backend, he did frontend. He wouldn't write unit tests because he didn't see how they are useful. No matter how I tried to explain things to him, he didn't listen but he still had strong opinions and his counter-arguments were always that some blog post made by some react jeet recommend such and such practices and libraries. I tried to explain that writing unit tests also forces him to think how to write decent abstract API interfaces for his code such that it is easily testable. His code was a fucking mess and the implementations details leaked into the API interfaces, it worked but it was a fucking mess...
Anonymous No.106926624 [Report]
>>106926440
Noted. Forwarding this to JPL.
Anonymous No.106926631 [Report]
>>106926537
Yep. Inexperienced, educated by Indian programmers on Medium, and unqualified.
Anonymous No.106926659 [Report]
>>106918897 (OP)
dangerously based

>>106926537
things are only getting worse. now you have a new generation of intellectually bankrupt simpletons that truly believe they are geniuses because they gave openai a subscription fee to generate slop that's been scraped off of stack overflow. society is getting dumber by second.
Anonymous No.106926692 [Report] >>106926764
>>106926537
i'm not a cooder (im just an it monkey) and i am yet to even receive an explanation of what a unit test is let alone why i would use it

or, rather, how it's any different from normal validation before doing something with a variable, which is what i do just playing gmod and stormwanks and writing scripts no longer than 50 lines for basic mechanical controls

>implementation leak
same for this, ive been hearing it a lot for the past little bit and it feels like a dumb meme
Anonymous No.106926717 [Report]
>>106918897 (OP)
Makes sense for such critical software.
In most normal software you wouldn't go that far, in particular I would skip 9, as I like treating functions as first class citizens (depending on how elegantly the language supports it).
Anonymous No.106926749 [Report] >>106926764
>>106926505
>>106926537
>well you see the code that doesn't follow my "Best Practices" guidelines but it works anyway
>here's why it is still LE BAD
kek
no one wants to work for you except pajeets? maybe because you're an annoying faggot and only ass licking pajeets can deal with your bullshit
Anonymous No.106926764 [Report] >>106926803 >>106926808
>>106926749
>no one wants to work for you except pajeets
Obvious bait is obvious, but that zoomer guy is white and has blue eyes. We hired him as a junior because he seemed promising during interviews.
>>106926692
Unit is a small block of code, such as a single function. You write code that tests the function returns expected values. Someone modifies the function's internal implementation -> some test cases may fail and everyone notices someone broke something.
Anonymous No.106926803 [Report]
>>106926764
again, this makes me think of like when i play gmod or stormwanks and throw clamps everywhere to restrict sensor input/limit actuator output because i am aware of gimbal lock or i know that a sensor/actuator shouldn't give me a number outside a certain range

so even if i change something before it and it's dumb and retarded because i was coding drunk again, at the next stage of processing something that expects a range of say 0-1 will have code before it to clamp the input, a special case or throw an error if it's outside that range, etc. or also if whatever toy i'm playing with isn't strongly typed, also check that it is in fact a number before trying to do math on it at all, stuff like that depending on the specific >use case

it just doesnt seem like something special enough to need its own name or for people to be freaking out about it constantly
Anonymous No.106926808 [Report] >>106926858 >>106926896
>>106926764
look man, the reality is that unit tests are for the most part unnecessary bullshit that wastes your time. none of the code I've written has "unit tests". unit tests cannot find any kind of bug that depends on global state or complex interactions (which in most real programs is a lot - think multithreading, external DLLs, communicating with other programs through IPC or over the network). i just spam assertions throughout the entire codebase and that catches 99% of all bugs through testing the whole program.
For example if I think a function can only fail with these particular error codes in this situation, then I put asserts to check the status code afterwards. If my assumptions are wrong, I document it in a comment, change code if necessary to handle the new reality, and then delete the assertion.
There are very few cases where unit tests make sense. When you're writing a "pure" function where it depends on no global state, for example if you've implemented some mathematic algorithm or you rewrote some function to use SIMD and you want to make sure it works with misaligned data or across page boundaries or whatever.
Anonymous No.106926858 [Report]
>>106926808
Whatever works for you. I use assertions and unit tests, assertions are my sanity checks when running debug builds and unit tests are more detailed very specific test cases for my data structure implementations and other generic stuff. You're mentioning global state, that is completely out of the scope of unit tests in my opinion, global state is something that is only present in very high level code in my projects, think about game engine update and render loops and such, nobody "unit tests" such code because that would require huge amount of mocking. You unit test low level code that depends on little to no other code except for obviously standard libraries and such which you assume to be working properly.
Anonymous No.106926881 [Report] >>106927048
>>106918897 (OP)
>complex
>goto
You know what, i'm not even writing out the shit wrong with the rest of it, this was written by nocoders.
Anonymous No.106926896 [Report]
>>106926808
Unit tests are for programmatically specifying the observable behavior of individual particles of program in fine detail. Anyone using them for anything else is doing it wrong. I do agree they're largely a waste of time on any codebase I've ever worked on, but that's largely because embedded devs are retarded about design than that having a spec you can execute is stupid.
Anonymous No.106927048 [Report] >>106927068
>>106926881
https://en.wikipedia.org/wiki/SPIN_model_checker
Anonymous No.106927068 [Report] >>106927134
>>106927048
Neat. What about it? Is this what NASA uses? I know some of these rules are because of the checker but a lot of it is still arbitrary.
Anonymous No.106927134 [Report]
>>106927068
same author who wrote the guidelines in OP's pic
Anonymous No.106927143 [Report] >>106927239
>>106918897 (OP)
first rule
>no women in positions of importance or influence
since nasa failed such a basic test they're not worth listening to at all. no matter how much retard trash try to pretend they're good at logic if you fail this your ability to do it anywhere else is totally compromised.
Anonymous No.106927183 [Report]
>>106920365
Gotos are good for that, but it's also possible to handle it in other ways. Like setting a variable the outer loop will check to a certain value. You may also be able to put the loops in a function and structure them in such a way that returning will do the trick.
Anonymous No.106927239 [Report]
>>106927143
your ABS code calls malloc
Anonymous No.106927329 [Report]
>>106919378
Because it wasn’t a software issue you fucking idiot
Anonymous No.106927330 [Report]
>>106918897 (OP)
Anonymous No.106927338 [Report]
>>106925619
> tabs count 8
Where do you want the bullet?
Anonymous No.106928264 [Report]
>>106918897 (OP)
our response, timmycoder bros?