Jump to content

BLaBZ Blog

  • entries
    18
  • comments
    59
  • views
    22,030

Coding:The Ultimate Goal


BLaBZ

3,391 views

 Share

For every project, a coder is ultimately caught between 2 opposing ends of the spectrum. The first end is the goal, the purpose for developing the software. The other end is how the machine implements the code. I'm realizing that through development, we're trying to produce code with a balance between efficient implementation, readability, and of course the ability to accomplish the task it was designed to do.

 

You could say the most efficient implementations would always be written in some sort Assembly language, though this doesn't necessarily promote readability, and in todays fast paced world isn't always ideal. Good OOP techniques can improve readability though hinder performance.

 

As a programmer, one of my inspirations for coding is the challenge to produce "perfect" code, clean, readable, and executes seamlessly.

 

I've noticed as my projects have become bigger this has become more of a design challenge then anything. I've had to think long and hard as to how to make a larger project truly modular and completely decoupled.

 

I'm definitely no pro yet, but I've learned a lot in the last week. I've known about casting, pointers, inheritance, and polymorphism for the longest time though this week things definitely "clicked" into place as to how these things fit into the design picture.

 

Because of this, coding has taken on a new life :)

 Share

4 Comments


Recommended Comments

Guest Red Ocktober

Posted

As a programmer, one of my inspirations for coding is the challenge to produce "perfect" code, clean, readable, and executes seamlessly.

 

as a programmer, one of my inspirations for coding is the challenge to produce code that works...

 

:D

 

enjoyed reading your blogs...

 

--Mike

Link to comment

To add more design styles to your bag of tricks check out this thread on C++ events http://leadwerks.com/werkspace/index.php?/topic/255-c-events/page__p__1991__hl__event__fromsearch__1#entry1991

 

My examples are GUI oriented but event systems can be used in many situations besides GUI's. You can fire events when certain variables in a class change so that other classes can be informed when that happens so they can do certain things.

 

Let's say for some reason you want your enemies to know when the health of your player changes. You can either loop through each enemy and tell them the players health value each frame, or at the start of the game you can have enemies bind to the players OnHurt event. Then in the players Hurt() function fire this event so all enemies get it called.

 

There are many different things you can do with events as far as game design goes and it's another technique you can use.

Link to comment

To add more design styles to your bag of tricks check out this thread on C++ events http://leadwerks.com/werkspace/index.php?/topic/255-c-events/page__p__1991__hl__event__fromsearch__1#entry1991

 

My examples are GUI oriented but event systems can be used in many situations besides GUI's. You can fire events when certain variables in a class change so that other classes can be informed when that happens so they can do certain things.

 

Let's say for some reason you want your enemies to know when the health of your player changes. You can either loop through each enemy and tell them the players health value each frame, or at the start of the game you can have enemies bind to the players OnHurt event. Then in the players Hurt() function fire this event so all enemies get it called.

 

There are many different things you can do with events as far as game design goes and it's another technique you can use.

 

Wow, that's awesome Rick thanks a lot!! I'd imagine using a Event system like that would make multi threading a bit easier, do you code for a living?

Link to comment

Wow, that's awesome Rick thanks a lot!! I'd imagine using a Event system like that would make multi threading a bit easier, do you code for a living?

 

 

Yeah, been coding as a profession for about 9 years now. At work I use .NET but I prefer C++.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...