Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Software development homework help required.
New Posts  All Forums:Forum Nav:

Software development homework help required.

post #1 of 4
Thread Starter 
I am a little bemused by this question in my latest homework from school:

Why is it necessary to have the program code as part of documentation?

It doesn't make sense. It's like they want you to print to code out to go along with the documentation?
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
post #2 of 4
The only accurate documentation is the source code. Many times developer documentation is out-of-date, written by idiots, or just plain wrong.
    
CPUMotherboardGraphicsRAM
Core i5 2500k @ 4.6GHz MSI P67A-G45 (B3) Palit GeForce GTX 460 1 GB 840 MHz 16 GB G.SKILL Ripjaws X 1333MHz 7-7-7-21 
Hard DriveHard DriveHard DriveOptical Drive
Western Digital Caviar Black WD7501AALS 750 GB Western Digital Green 1 TB Samsung HD201UI 2 TB Something cheap 
OSMonitorMonitorKeyboard
Windows 8 Professional 64-bit ASUS VH222H 21.5" Yamakasi Catleap Q270 (27" 1440p DVI-D input only) Logitech K320 
PowerCaseMouse
Antec EarthWatts EA500 Silverstone TJ07-S Razer Naga Hex 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 2500k @ 4.6GHz MSI P67A-G45 (B3) Palit GeForce GTX 460 1 GB 840 MHz 16 GB G.SKILL Ripjaws X 1333MHz 7-7-7-21 
Hard DriveHard DriveHard DriveOptical Drive
Western Digital Caviar Black WD7501AALS 750 GB Western Digital Green 1 TB Samsung HD201UI 2 TB Something cheap 
OSMonitorMonitorKeyboard
Windows 8 Professional 64-bit ASUS VH222H 21.5" Yamakasi Catleap Q270 (27" 1440p DVI-D input only) Logitech K320 
PowerCaseMouse
Antec EarthWatts EA500 Silverstone TJ07-S Razer Naga Hex 
  hide details  
Reply
post #3 of 4
Thread Starter 
Quote:
Originally Posted by mott555 View Post

The only accurate documentation is the source code. Many times developer documentation is out-of-date, written by idiots, or just plain wrong.

Right. That makes sense, thank you!
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
post #4 of 4
Completely agree with the previously posted, additionally, code that is explained inside the actual code (comments) becomes code that is easier to mantain, easy for new team-members to learn both its structure and workings.

A shameless plug but it works to exemplify this issure:
Code:
    def on_message(client, raw_message):
        """Handles messages sent by clients."""
        message = MessageServer.coder.decode(raw_message)
        # If client isn't registered
        if client not in MessageServer.directory.values():
            if message.target != "NickBot": # and isn't trying to do so
                MessageServer.close(client) # we close his connection
            else: # If he is, NickBot handles it
                NickBot.ProcessMessage(message, client)
        else:
            # If client is registered we check who he addresses
            # This Bot > Group > Client heriarchy adds some protection against
            # clients wanting to use names used by functions (bots or groups)
            # Bots are checked first since they extend functionality
            if message.target in MessageServer.bots:
                bot = message.target
                MessageServer.bots[bot].ProcessMessage(message, client)
            # We then check if it's a group
            elif message.target in MessageServer.groups:
                group = MessageServer.groups[message.target]
                forward_message = {"From" : message.target,
                                   "Message" : message.text}
                json = MessageServer.coder.encode(forward_message)
                for member in group:
                    MessageServer.directory[member].write_message(json)
            # Next we check if he addresses a client
            elif message.target in MessageServer.directory:
                # If he does we create a new message for the target
                # and we send it to them with reference to the sender
                username = MessageServer.directory.key_for(client)
                forward_message = {"From" : username, "Message" : message.text}
                json = MessageServer.coder.encode(forward_message)
                MessageServer.directory[message.target].write_message(json)
            else:
                pass # We don't care
From a dummy chat server I did for school: https://github.com/ChrisCTX/Tornado-IM

Sure, you may not know Python, or have any idea of the rest of the program, but you will understand at least what is happening in this function.
Back in Black
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 965 BE (C3) Biostar TA790GX A3+ Sapphire HD 5770 (v2) CORSAIR XMS3 4GB DDR3 
Hard DriveOptical DriveOSMonitor
WD Caviar Black 640GB Sony Optiarc CD/DVD RW Windows 7 Ultimate x64 NEC MultiSync LCD 1960NXi 
KeyboardPowerCaseMouse
Microsoft Comfort Curve Keyboard 2000 Corsair 650TX Cooler Master Storm Scout Logitech MX 400 Laser 
  hide details  
Reply
Back in Black
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 965 BE (C3) Biostar TA790GX A3+ Sapphire HD 5770 (v2) CORSAIR XMS3 4GB DDR3 
Hard DriveOptical DriveOSMonitor
WD Caviar Black 640GB Sony Optiarc CD/DVD RW Windows 7 Ultimate x64 NEC MultiSync LCD 1960NXi 
KeyboardPowerCaseMouse
Microsoft Comfort Curve Keyboard 2000 Corsair 650TX Cooler Master Storm Scout Logitech MX 400 Laser 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Software development homework help required.