Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Defensive Programming

Name: Anonymous 2008-09-13 18:26

I used to be a student of the ``Defensive Programming'' school of programming. I'm mainly a C programmer, but I occasionally dabble in languages such as LISP. Anyways, whenever I would program in C, I would program very defensively, and check that all the arguments passed to every function were not NULL (assuming they were pointers. This turned my code into mostly a bunch of if statements.

After a while, I figured out that this was pointless, and most of the functions I write today, I don't bother checking if the arguments are NULL or not, because only a smart fucker such as myself is going to be using them. I instinctively know when everything is NULL or not. Of course, I do still check the arguments sometimes, but definitely not in every function. It just turns into a mess.

What do you guys do? Am I a retard, or are you similar?

Name: Anonymous 2008-09-16 12:09

this is not /dqn/

Name: Anonymous 2008-09-16 12:17

   人     
  (__)    
  (__)   
 ( __ )    
 ( ・∀・) <My name is Squeeks and I have shit on my head.
 (つ   つ  
 | | |
 (__)_)

Name: Anonymous 2008-09-16 12:19


   へ-ヘ
   ミ*´ー`ミ Java!
 ~(,_uuノ

Name: Anonymous 2008-09-16 12:26

this is not /dqn/

Name: Anonymous 2008-09-16 13:03


   へ-ヘ
   ミ*´ー`ミ Is this /dqn/?
 ~(,_uuノ

Name: Anonymous 2008-09-16 13:10

hEllO iM DAdDYCOOL thE programme Rif you payme eNough i Will gIve yoU access tO a pRivAte aRea of pRogrAmming ;)
                                  /\___/ヽ           
    (.`ヽ(`> 、                      /''''''   '''''':::::           
     `'<`ゝr'フ\                 +  |(●),  、(●)、.:| +      
  ⊂コ二Lフ^´  ノ, /⌒)                 |  ,,,ノ(、_, )ヽ、,, .::::|       
  ⊂l二L7_ / -ゝ-')´                .+ |   `-=ニ=- ' .::::::| + .    
       \_  、__,.イ\           +     \   `ニニ´  .:::/    +  
        (T__ノ   Tヽ        , -r'⌒! ̄ `":::7ヽ.`- 、   ./|  . 
         ヽ¬.   / ノ`ー-、ヘ<ー1´|  ヽ | :::::::::::::ト、 \ (  ./ヽ    
          \l__,./       i l.ヽ! |   .| ::::::::::::::l ヽ   `7ー.、‐'´ |\-、 

Name: Anonymous 2008-09-16 13:12


          ∧_∧
         ( ・ω・) Is >>46 even happening?
         (  つ(\
      (\_ノ(___)⌒ ⌒ヽ_
      ) ____  ・_つ
     (/      (/
   。 ゚
  。

Name: Anonymous 2008-09-16 13:14

You guys are making me ashamed of being a VIPPER. Seriously, cut this.

Name: Anonymous 2008-09-16 13:17

 ∧_∧
( ;´Д`)
人 Y /        
( ヽωつ ο°o。 
(_)_)

Name: Anonymous 2008-09-16 13:18

ashamed of being a VIPPER
you're doing it wrong if you're not ashamed

Name: Anonymous 2008-09-16 13:18

You guys are making me ashamed of being a PROGRAMMER. Seriously, cut this.

Name: Anonymous 2008-09-16 13:19


      /\___/ヽ
     /       :::::::\
    .|          .::::|
    |  ''''''   ''''''   .::::|
    .|(●),   、(●)、::::|
     \ ,,ノ(、_, )ヽ、,,.:::::/
     /``ーニ=-'"一´\
   _/((┃))_____i |_ 
.. / /ヽ,,⌒) ̄ ̄ ̄ ̄ (,,ノ   \
/  /_________ヽ..  \

Name: Anonymous 2008-09-16 13:19


       /\___/ヽ
     /''''''   '''''':::::::\
    . |(●),   、(●)、.:| +
    |   ,,ノ(、_, )ヽ、,, .::::|
  .   |   `-=ニ=- ' .:::::::| +
     \  `ニニ´  .:::::/     +
     /ヽ、ニ__ ーーノ゙\_
    .| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄.|  トン
   _(,,)   J A V A   (,,)_
.. /. |..           .|  \
/   .|_________|   \

Name: Anonymous 2008-09-16 14:04

this is not /dqn/

Name: Anonymous 2008-09-16 22:15

>>54
are you sure?

Name: Anonymous 2008-09-16 22:23

I'm an offensive programmer.  I bombard the user with so much shit they don't have a chance to crash the program.

Name: Anonymous 2008-09-16 23:16

>>56
I snorted while I lolled

Name: Anonymous 2008-09-16 23:52

>>56
I chuckled.

Name: Anonymous 2008-09-17 0:13

>>58
I chuckled while I snorted while I loled while I stared humorlessly.

Name: Anonymous 2008-09-17 6:08

Back in Croatia, my mother country, we have a saying about programs. The saying goes that programs without error checking are equivalent to programs with error checking, but with error checking disabled. The moral of the saying is that the user has no way of knowing if a program has or has not error checking. Much like how Schroedinger's cat may or may not be alive inside that box, you have no way of knowing.

Name: Anonymous 2008-09-17 12:29

>>11
Segfault, duh.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List