Would you judge some of my work please

Started by
11 comments, last by Jason Jones 9 years, 8 months ago

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 . . .

Advertisement

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.

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.

The download section and library section seem to be the same.

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 ?

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.

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/

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.

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.

The download section and library section seem to be the same.

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.

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.

Thanks for your comments, I like the'bonus' comments they are useful.

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.

Thanks for your suggestions.

This topic is closed to new replies.

Advertisement