"Assertive-Oppressive Computing" 6-9-04

Talk about today's strip, or anything about the comic in general. You can also talk about any of the characters... but don't expect a response. They're FICTIONAL, you guys... sheesh. :)
Penguin
Redshirt
Posts: 104
Joined: Thu Dec 25, 2003 10:04 pm

Re: "Assertive-Oppressive Computing" 6-9-04

Post by Penguin » Wed Jun 09, 2004 10:10 pm

Missing on unreadable data. Google rox, eh?

heavybass
Redshirt
Posts: 579
Joined: Fri Feb 14, 2003 11:46 am
Gender: Male

Post by heavybass » Wed Jun 09, 2004 10:53 pm

yay for Greg!

dmpotter
Redshirt
Posts: 4057
Joined: Tue Apr 01, 2003 7:10 pm
Location: Massachusetts, US
Contact:

Post by dmpotter » Wed Jun 09, 2004 11:10 pm

[quote="WCH";p="349429"]What is an assertion error, anyway?[/quote]
When debugging a computer program, programmers will often make assertions in the code. An assertion is simply a statement that should always be true.

As an example, let's say we have an average function. It takes a list of integers as its input and computers the average. However, this only works if the list has items. What is the average of nothing? That's not defined.

So at the beginning of the function, there might be an assertion statement that asserts that the list has at least one item in it:

Code: Select all

function average(integerList) {
    assert(integerList.length > 0);
    // computer the average
}
It is assumed that in all cases every call to the average function must contain at least one element.

(Technically, this example is a "precondition" assertion - a condition that must be met prior to the function being called. A "postcondition" is a condition that must be met after the function is called. For example, a function that computes an absolute value might have a postcondition asserting that the return value is greater than or equal to 0.)

If it does not, the "assert" call will flag an error. That is an assertion error - when an assertion is not met.

Generally speaking, after testing, these calls are removed from the program (or disabled), so you usually won't see assertion errors in commerical software. However, this is not always the case.

The best link I could find on assertions was unfortunately Programming With [Java] Assertions, which describes assertions in relation to the Java language and platform.

Assertions are an essential part of Design by Contract programming.

BillyBlaze
Redshirt
Posts: 2512
Joined: Thu Oct 09, 2003 4:34 pm

Post by BillyBlaze » Thu Jun 10, 2004 1:28 am

I bet PAL doesn't make assertion errors.

User avatar
Mr.Shroom
Redshirt
Posts: 2522
Joined: Fri Apr 18, 2003 8:44 am
Location: Secret Underground Lair

Post by Mr.Shroom » Thu Jun 10, 2004 2:25 am

For some reason, this comic really made me miss my Dad.

...Man, my childhood SUCKED.

WCH
Redshirt
Posts: 103
Joined: Tue May 25, 2004 3:18 am

Post by WCH » Thu Jun 10, 2004 11:21 pm

[quote="Mr.Shroom";p="349560"]For some reason, this comic really made me miss my Dad.

...Man, my childhood SUCKED.[/quote]
Wow, I don't know whether to find that funny or to offer my condolances. :?

Lord Terrible
Redshirt
Posts: 129
Joined: Fri Mar 19, 2004 2:58 pm

Post by Lord Terrible » Fri Jun 11, 2004 11:06 am

If anyone tries to opress the programmers we shall work at a slow pace and make shoddy, buggy and hacky code!! MWUAHAHAAHAHAHAa :twisted:
Image
Fear my strange Danish-like power!!

heavybass
Redshirt
Posts: 579
Joined: Fri Feb 14, 2003 11:46 am
Gender: Male

Post by heavybass » Fri Jun 11, 2004 12:52 pm

hehe ^_^

TomXP
Redshirt
Posts: 3
Joined: Fri Jun 11, 2004 3:15 pm

Post by TomXP » Fri Jun 11, 2004 3:17 pm

In other words, it's the programmer giving you the finger because some other programmer didn't do his homework. :D

[quote="dmpotter";p="349475"][quote="WCH";p="349429"]What is an assertion error, anyway?[/quote]
When debugging a computer program, programmers will often make assertions in the code. An assertion is simply a statement that should always be true.

etc.....

[/quote]

dmpotter
Redshirt
Posts: 4057
Joined: Tue Apr 01, 2003 7:10 pm
Location: Massachusetts, US
Contact:

Post by dmpotter » Fri Jun 11, 2004 3:25 pm

[quote="TomXP";p="350452"]In other words, it's the programmer giving you the finger because some other programmer didn't do his homework. :D[/quote]
Yes. Other programmer. :shifty:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest