Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 07-24-2006, 04:27 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,278
Last Blog:
wxWidgets is NOT code ...
Rep Power: 36
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

Kromagnon, for small projects that works fairly well. If you write your programs in a disciplined way, you can even make that work for somewhat larger projects. After a while, though, it all catchs up with you.

I remember when I made my Yahtzee program. I wrote it with no planning. Then I'd realize I needed another parameter in a function, and have to change ALL the function calls for that function. Then I'd make another change and do it again. Then I decided to add a new feature... and had to change a BUNCH of function calls. Repeat for a while. If I had planned it out in advance, I could have coded each call once and not had to search through all my code looking for bad function calls.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 07-24-2006, 07:49 PM
Kaabi's Avatar   
Kaabi Kaabi is offline
Programming God
 
Join Date: Jul 2006
Posts: 884
Rep Power: 14
Kaabi is on a distinguished road
Default

When writing a large program it's imperative to have a plan, and WingedPanther provided the perfect example. Sorry you had to go through that, must've been frustrating.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 07-24-2006, 07:52 PM
kromagnon kromagnon is offline
Learning Programmer
 
Join Date: Jun 2006
Posts: 53
Rep Power: 9
kromagnon is on a distinguished road
Default

Oh, I know good and well that I SHOULD have a plan... I just don't do it because i'm lazy
__________________
<!-- comment comment comment --></
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 07-25-2006, 06:51 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,278
Last Blog:
wxWidgets is NOT code ...
Rep Power: 36
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

BTW, there are two flowcharting programs that I can strongly recommend. Dia (for both Windows and Linux), and Dynamic Draw (Windows only). Dia feels more like Visio, but Dynamic Draw has versioning capabilities and the ability to easily create custom icons. If people are interested in the flowcharting/UML tools I made for Dynamic Draw, I can upload them.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 07-26-2006, 06:20 PM
brackett brackett is offline
Programmer
 
Join Date: May 2006
Posts: 193
Rep Power: 11
brackett is on a distinguished road
Default

While a certain amount of upfront design is reasonable, delving into function signatures and such is way too detailed. In any moderately complicated system, you will *never* think of all the possibilities, no matter how long you spend diagramming. And, of course, as you're diagramming and coding, requirements change.

It's easier for both your code and your tools to allow for flexibility and changes after coding is started or even completed. By removing (or lessening) the "penalties" for getting the design wrong, you can adapt and change your code as you go. Test Driven Development (TDD) tries to minimize the cost of change by:

a. Extensive Unit Testing - which can drive a coherent design and/or API, and also protects you from breaking existing working code with new changes

b. Pair Programming - spot bugs and make design decisions with 2 people instead of 1

c. KISS/YAGNI (Keep It Simple, Stupid and You Ain't Gonna Need It) - keep code as flexible as possible by not including features that you don't need *right now*

d. Refactoring - keep code and design clean at all times, so that changing code is easy(er)

e. Continuous Integration - keep code buildable and testable at all times, so that you get immediate feedback on quality

f. Short Iterations - give customer's a chance as often as possible to give feedback and drive development and design choices

So, are flowcharts and UML up front worth it? Sure, if they help you through the big picture logic. Or if you use them to work out logic for a story or feature. But once they become "documents" instead of "sketches", or are encased in "requirements", or delve into function signatures - I think you've lost the big picture angle and agility.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #16 (permalink)  
Old 07-26-2006, 10:24 PM
Blaze's Avatar   
Blaze Blaze is offline
Programmer
 
Join Date: Jun 2006
Posts: 117
Rep Power: 9
Blaze is on a distinguished road
Default

I always found flowcharts to just confuse me more. Sure i can see the merits, but are they a necessity>
They do tend to create a whole lot more paperwork.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 07-28-2006, 09:04 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,278
Last Blog:
wxWidgets is NOT code ...
Rep Power: 36
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

They can be important. I just got a new job doing documentation at a software company and one of my first tasks will be documenting one of the scripting modules. Being able to trace through the sequence of steps will probably make my life much easier, both for understanding and explaining.

Having said all that, I know a lot of people who prefer pseudocode to flowcharting.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 06:36 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads