# Would you judge some of my work please

This topic is 1259 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I would really appreciate it if some of you could judge some of the work I have placed online, my website is :

http://www.zenandtheartofd3dx.co.uk/

btw : I am dyslexic so they are not typos as I just cannot see the typos.

But I would really appreciate some feedback from you and hopefully some of it will be okay.

Thanks,

Jason . . .

Edited by ILOVELUCY

##### Share on other sites

I am no C++ / DX API guru or anything, but....

Even for guys that will understand more of your work it would be really helpfull to have at least a short description of what you are trying to achieve with your code. I understand you having difficulties with writing longer texts, still, would help a lot getting a pretext.

Then the code you show is very long and with no breaks in between. More comments would certainly help guide the reader, and might help yourself down the line if you open the same code again in a year.

Sadly I cannot really judge the quality of your work when it comes to code, I am not (yet) an expert in what you wrote. I'll leave that to others.

Don't worry too much about the dyslexia... for some of us english is a second language and we fight (almost) the same fight as you do with it. I have not seen the usual grammar obsessed person on this forum yet that seem to frequent others, so you should be fine.

##### Share on other sites

I won't judge the code itself, I do not consider having enough experience for that but. As Giant-Reto said the formating is confusing I'd recommend :

- The formating (indent for exemple) is totally broken and some part are unreadable. If you don't intend to correct this, at least allow the download of the files.
- Make smaller chunk of code
- Use more comment
- Explain what the code do. ("This code allow the user to do this." "This code draw a white pinguin")

As a "bonus" here is some kind of rude comments on the whole website.

- No offense but I find your website ugly, the flashy colors, the broken format, etc...
- On the homepage there is absolutely no explanation. What is this site for? Where do I go to see your work? What the fuck are all these buttons and images?
- There is only a black square in "Links"

But well, their seems to be a lot of content.

##### Share on other sites

There are a lot of snapshots and place-holders on the site, so it is a bit messy now.

As for the code, what i suppose you wanted feedback on, not my expertise so i can't say.

I didn't see any typos btw, but i 'm curious, typos in programming are usually a lot less forgiving, how do you handle that ?

##### Share on other sites

I will try to come back to this post this weekend and check it out, but here is a GREAT example of how you might post something for code review:

http://www.gamedev.net/topic/659618-breakout-code-review-request/

good luck.

##### Share on other sites

I think your code is pretty good from a readability level, the functions seems simple and tends to do one thing. As other people recommended I think you should add a short description of the purpose of each function. Hint: Use doxygen and if you are worried about spelling, run the text through open office for spell correction (or vimspell if you use vim).

The indentation is messed up, but that could just be the website fault. Perhaps wrapping the code in <pre> tags would help.

Some of your functions are quite lenghty, this is often something that can not be avoided in low-level code, but you might be able to split those bigger functions into high and low level functions. I recenlty created a blog post about that:

http://www.flodihn.se/2014/05/20/guide-lines-to-clean-code-on-the-small-scope/

##### Share on other sites

In VecInterpolateMidPoint, why are you dynamically allocating those vectors? Just use normal stack variables. You can still pass them to the D3DX method using the address-of operator:

D3DXVECTOR3 vA;
D3DXVECTOR3 vB;
D3DXVECTOR3 V_LERP;

/* ... */

D3DXVec3Lerp(V_LERP, &vA, &vB, s);


Or, if the second two params aren't modfiied (i.e. are const D3DXVECTOR3*)

D3DXVec3Lerp(V_LERP, &p, &p1, s);


I suspect you might be thinking you need to allocate because these methods take pointers. Not so, its just D3DX is a C interface so pointers are used.

Unnecessary dynamic allocation will bite you eventually when you forget to delete it via one of many possible paths out of a function.

Edited by Aardvajk

##### Share on other sites

In VecInterpolateMidPoint, why are you dynamically allocating those vectors? Just use normal stack variables. You can still pass them to the D3DX method using the address-of operator:

D3DXVECTOR3 vA;
D3DXVECTOR3 vB;
D3DXVECTOR3 V_LERP;

/* ... */

D3DXVec3Lerp(V_LERP, &vA, &vB, s);


Or, if the second two params aren't modfiied (i.e. are const D3DXVECTOR3*)

D3DXVec3Lerp(V_LERP, &p, &p1, s);


I suspect you might be thinking you need to allocate because these methods take pointers. Not so, its just D3DX is a C interface so pointers are used.

Unnecessary dynamic allocation will bite you eventually when you forget to delete it via one of many possible paths out of a function.

Thanks for the advise, I think its a kind of dyslexic thing.

##### Share on other sites

There are a lot of snapshots and place-holders on the site, so it is a bit messy now.

As for the code, what i suppose you wanted feedback on, not my expertise so i can't say.

I didn't see any typos btw, but i 'm curious, typos in programming are usually a lot less forgiving, how do you handle that ?

Yes you are absolutely right the dyslexic errors cab be the most expensive as they usually cannot be seen a common one being mistyping a minus in a for loop instead of an equal example : for ( x - i ; x < j; j++), can be a real show stopper.

##### Share on other sites

I won't judge the code itself, I do not consider having enough experience for that but. As Giant-Reto said the formating is confusing I'd recommend :

- The formating (indent for exemple) is totally broken and some part are unreadable. If you don't intend to correct this, at least allow the download of the files.
- Make smaller chunk of code
- Use more comment
- Explain what the code do. ("This code allow the user to do this." "This code draw a white pinguin")

As a "bonus" here is some kind of rude comments on the whole website.

- No offense but I find your website ugly, the flashy colors, the broken format, etc...
- On the homepage there is absolutely no explanation. What is this site for? Where do I go to see your work? What the fuck are all these buttons and images?
- There is only a black square in "Links"

But well, their seems to be a lot of content.

And in a way you and the otter posts have answered a question as to how to  put the web site together and I think the solution is as follows :

I should create a prettier web site that is easy to navigate that takes the browser through the work on a step by step basis.

So, really some type of use friendly abstraction level between the concepts that are being developed, why they are difficult to achieve and then how to implement a solution

even other developers do not want or have the time to put on another thinking cap just to browse a web site, i guess.

##### Share on other sites

I am no C++ / DX API guru or anything, but....

Even for guys that will understand more of your work it would be really helpfull to have at least a short description of what you are trying to achieve with your code. I understand you having difficulties with writing longer texts, still, would help a lot getting a pretext.

Then the code you show is very long and with no breaks in between. More comments would certainly help guide the reader, and might help yourself down the line if you open the same code again in a year.

Sadly I cannot really judge the quality of your work when it comes to code, I am not (yet) an expert in what you wrote. I'll leave that to others.

Don't worry too much about the dyslexia... for some of us english is a second language and we fight (almost) the same fight as you do with it. I have not seen the usual grammar obsessed person on this forum yet that seem to frequent others, so you should be fine.

Thanks for your comments, the website itself is very much a product of recruiters not wanting to acknowledge that I am a  software engineer which is very frustrating an I think that comes across in the web site, so it was a case of uploading what I could, code and the result of the code and hope that they would 'get it' but they just do not want to know so the comments on this post are very useful.

Edited by ILOVELUCY

##### Share on other sites

Thanks for the advise, I think its a kind of dyslexic thing.

With respect, this kind of thing is conceptual and nothing to do with dyslexia.

This is to do with understanding core concepts about when and when not to use dynamically allocated memory.

My concern is you do yourself no favours by dismissing this kind of misunderstanding as something beyond your control. But none of my business really. Good luck.

##### Share on other sites

Thanks for the advise, I think its a kind of dyslexic thing.

With respect, this kind of thing is conceptual and nothing to do with dyslexia.

This is to do with understanding core concepts about when and when not to use dynamically allocated memory.

My concern is you do yourself no favours by dismissing this kind of misunderstanding as something beyond your control. But none of my business really. Good luck.

Yes, you are 100 % right it is a conceptual thing and pointers took a long time for me to get in c and c++ as the notation is a little confusing. So, there are is a confusion of notation but the notation defines and describes a concept.

your input has been really useful as it has clarified the concept.

Which is good for me, thanks for your help.