• Advertisement
Sign in to follow this  

What's you favorite and most hated part of coding?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I like writing gameplay logic and I hate writing foundational stuff.

 

Basically the airy imaginative fun stuff I like and the dull, mostly been done 1000x and better than I can be bothered to stuff I hate.

 

Also I hate UI. Just like, shoot myself in the foot to numb the pain of writing UI level hate.

Share this post


Link to post
Share on other sites
Advertisement

a lot of trivial tasks require writing more code than in C or C++;

I'm... confused by this statement... what do you mean by a 'trivial task' in this context?

 

things like signal processing / codec style tasks, which involve a lot of intensive array-walking and fixed-point arithmetic and similar.

say, for example, writing code for a video codec in C#.

 

stuff like this is slightly more painful in C# than in C or C++, due to minor differences related to handling of types and things like arrays and pointers.

some of it can be wrapped over, but then adds the cost of writing the wrapper code.

 

though, I would still quickly choose C# over Java for these tasks...

 

 

basically, all the little things like:

"int[] blk=new int[64];" vs "int blk[64];";

"for(i=0; i<n; i++)ct[b+i]=Foo(cs[b+i]);" vs "while(cs<cse)*ct++=Foo(*cs++);";

"ct[i]=(byte)((((int)cs[i])*xsc+2048)>>12);" vs "*ct++=((*cs++)*xsc+2048)>>12;"

...

 

 

granted, there are things which C# does pretty good at as well.

 

for example, GUI and using databases and similar are much nicer in C#.

so, in cases where one is making a tool which uses GUI or similar, and for which OS portability isn't a huge concern, C# does well...

Share this post


Link to post
Share on other sites
Maybe I'm in the minority, but I find programming to be quite relaxing. It's almost like an escape. I feel this way even when I'm tracking down bugs in my 3D game. Of course this may be because I teach children for a living.

Share this post


Link to post
Share on other sites

"for(i=0; i<n; i++)ct[b+i]=Foo(cs[b+i]);" vs "while(cs<cse)*ct++=Foo(*cs++);";
"ct[i]=(byte)((((int)cs[i])*xsc+2048)>>12);" vs "*ct++=((*cs++)*xsc+2048)>>12;"

Don't forget that C# actually has pointers. For example...

 

yep, but I meant without needing to use 'unsafe'...

 

also cool would have been, say, if there were something which could have some of the "look and feel" of pointers, while still being optionally bound-checked and type-safe (note: probably box-pointers or fat-pointers).

Share this post


Link to post
Share on other sites

I have found a new thing i dont like :D

 

Using templates for a situation where some people might use polymorphism, because i dont feel like switching stuff at runtime and dont want the overhead.

 

The result is lots of ugly boilerplate.

 

Its especially not-fun because i feel templates are weakly typed (for type parameters) so it feels im scripting some overly complex spaghetti mess again...

Share this post


Link to post
Share on other sites
New unfavorite thing : working with other people who make what they think are 'minor' changes to source files you are actively working on which require you to doing a hellish integration first thing in the morning basically putting you in a bad mood the whole day... *sigh*

Share this post


Link to post
Share on other sites

"int[] blk=new int[64];" vs "int blk[64];";
"for(i=0;  i<n; i++)ct[b+i]=Foo(cs[b+i]);" vs "while(cs<cse)*ct++=Foo(*cs++);";

"ct[i]=(byte)((((int)cs[i])*xsc+2048)>>12);" vs "*ct++=((*cs++)*xsc+2048)>>12;"

 

var blk = new int[64];

var ct = cs.Skip(b).Take(n).Select(Foo);

var ct = cs.Select(v => (byte)((v*xsc + 2048) >> 12));

 

easier to read, deferred, wont crash because of array arithmetic.

I don't have to define cse or ct earlier in the code

scalable, I can parallelize easily.

all are 1 line as expected, not crushed together

aggregates errors

 

these are the things I like about programming.

Edited by RivieraKid

Share this post


Link to post
Share on other sites

For me it's coding "editors", be it terrain editors or texture editors, or both(usually).Pretty much everything involving brushes.
My most frustrating would be lighting grr.
How about you?

 

So far (using C# / C++) I have only whined when making UI, raw UI that is, like directly creating UI with DX, everything else no matter how messed up it is, has been a lot of fun, I don't have a favourite but I do like the challenges involved in using DirectX instead of an engine, XAudio2, XAPO, Direct3D etc Honestly it is like I am playing a game by building one :D

Share this post


Link to post
Share on other sites

Favourite thing?

 

Running the compiled project and conducting end user testing is a close tie with initial design and general problem solving.

 

What I hate the most about programming?

 

Basically everything else. I dislike actually writing code for some reason.

Share this post


Link to post
Share on other sites

"int[] blk=new int[64];" vs "int blk[64];";
"for(i=0;  i<n; i++)ct[b+i]=Foo(cs[b+i]);" vs "while(cs<cse)*ct++=Foo(*cs++);";
"ct[i]=(byte)((((int)cs[i])*xsc+2048)>>12);" vs "*ct++=((*cs++)*xsc+2048)>>12;"

 
var blk = new int[64];
var ct = cs.Skip(b).Take(n).Select(Foo);
var ct = cs.Select(v => (byte)((v*xsc + 2048) >> 12));

 
yes, but these wont necessarily do exactly the same thing.
 

trivial examples were used to illustrate the sorts of basic differences, but the actual code is often not-so-pretty, and not necessarily things that map well to Select or even "foreach()". (mappings are not usually 1:1, we typically work with pieces of much larger input/output arrays, ...).

 

IOW: how you might use an array in a video codec or similar is not necessarily the same as how it might often be used in general programming.

 

 

easier to read, deferred, wont crash because of array arithmetic.
I don't have to define cse or ct earlier in the code
scalable, I can parallelize easily.
all are 1 line as expected, not crushed together
aggregates errors
 
these are the things I like about programming.

 

there may be reasons for a person wanting to do things C-style.

nicest is if C-style code works nicely.

 

well, and also because for some of these sorts of code, there was a lot of copying back and forth between C and C# implementations of the codec, trying to keep them roughly in-sync, so avoiding things that would hinder easily copy/pasting code-fragments was preferable in this case. granted, yes, it probably could have been a little easier if I were using unsafe, but I ended up instead opting with wrapped struct based "box pointers" (in C# it is structs + overloaded operators, in C it was typedefs, ...). (basically: glossing over language differences...).

 

despite all this, it actually went pretty well...

Edited by cr88192

Share this post


Link to post
Share on other sites

Anyone who thinks C# is a bad language has never used LINQ to write a data mining app in an afternoon.
 
 
Good fucking luck touching that kind of productivity in C++.

Depends on a lot of factors. If I were making a game for Linux, I wouldn't bother with C# too much.

Share this post


Link to post
Share on other sites

Anyone who thinks C# is a bad language has never used LINQ to write a data mining app in an afternoon.
 
 
Good fucking luck touching that kind of productivity in C++.

Depends on a lot of factors. If I were making a game for Linux, I wouldn't bother with C# too much.

 

Your loss.

 

 

http://www.monogame.net/

Edited by tstrimple

Share this post


Link to post
Share on other sites



Anyone who thinks C# is a bad language has never used LINQ to write a data mining app in an afternoon.
 
 
Good fucking luck touching that kind of productivity in C++.

Depends on a lot of factors. If I were making a game for Linux, I wouldn't bother with C# too much.


 
Your loss.
 
 
http://www.monogame.net/


No, my gain smile.png .

I didn't know that such a thing existed.

Share this post


Link to post
Share on other sites

I hate small tweaks in terms of 2d or 3d space for some reason it is so montonous to me to have to tweak the position of an object. for example a friend and me are working on an infinite runner, he has never made a game by himself before and this is his first after graduating from college. so he bakes in text to a background and then asks me to try to create a button over the top of the text embedded in the background. i thnk the mere thought of doing this delayed the project 2 weeks. not because it's difficult it's extremely easy but it is so montonous tweaking, running, checking if it's in a decent position, wash rinse repeat until it's in a decent space . i don't mean in terms of tweaking all small values but anything related to positioning relative to something.

 

However I really love debugging .even if it means there was an error in my original logic it reminds me of performing surgery on the organism that is my system . pinpointing the issue , correcting it and then running the program to see the code hopefully running in a healthy/ functional state is great! even better if i catch my  bugs before a team member does.

Share this post


Link to post
Share on other sites

 

 

Anyone who thinks C# is a bad language has never used LINQ to write a data mining app in an afternoon.
 
 
Good fucking luck touching that kind of productivity in C++.

Depends on a lot of factors. If I were making a game for Linux, I wouldn't bother with C# too much.

 

 
Your loss.
 
 
http://www.monogame.net/

 

No, my gain smile.png .

I didn't know that such a thing existed.

 

Their showcase games are quite impressive. Bastion, Draw a Stickman, Skulls of the Shogun, Fez. I just wish they would implement the XNA toolchain so we could convert the assets into the correct formats without VS 2010.

Share this post


Link to post
Share on other sites

I like to "play" with the stuff I code. Aka "lets try this number instead of that one!" "Lest try more iterations!" And so on.

Share this post


Link to post
Share on other sites

I like to "play" with the stuff I code. Aka "lets try this number instead of that one!" "Lest try more iterations!" And so on.

You'd make an awesome tester smile.png . You'll break stuff left and right smile.png .

Share this post


Link to post
Share on other sites

One thing I still find odd is seeing people still compare C# to C++ and vice versa, the reason this is so unusual (for me at least) is that both languages work excellent together but often comparison threads / posts are made to encourage the use of one over the other.

 

Using C# / C++ together reminds me of those hybrid cars that run on electric for short distances but on petrol long, or something like that.

 

Pros of C#++

 

Using the best of both languages

Spending more time working and less time comparing or feeling insecure about chosen language

Learning and improving in 2 languages

Able to work with a lot more libraries that don't necessarily have wrappers or updated ones

 

Cons of C#++

 

Compile times can suffer at times naturally because of C++

No more invites to C# / C++ dinner parties :(

Share this post


Link to post
Share on other sites

Love: Implementing that algorithm and it works, the first time. Those are nice rare moments. I guess I just generally like the feeling that I've been productive, too.

 

Hate: Those times when I'm awake but (very) aware that my mind has just stopped problem solving until I sleep, and can't do anything about it (besides sleep). No amount of caffeine or exercise etc. fixes this.

Share this post


Link to post
Share on other sites

One thing I still find odd is seeing people still compare C# to C++ and vice versa, the reason this is so unusual (for me at least) is that both languages work excellent together but often comparison threads / posts are made to encourage the use of one over the other.

 

Using C# / C++ together reminds me of those hybrid cars that run on electric for short distances but on petrol long, or something like that.

 

Pros of C#++

 

Using the best of both languages

Spending more time working and less time comparing or feeling insecure about chosen language

Learning and improving in 2 languages

Able to work with a lot more libraries that don't necessarily have wrappers or updated ones

 

Cons of C#++

 

Compile times can suffer at times naturally because of C++

No more invites to C# / C++ dinner parties sad.png

 

 

but, sadly, this crosses over into areas where implementation differences show up (at least, in my experience, if portability matters):

for example, .NET has C++/CLI, Mono doesn't;

.NET interfaces fairly directly with native code (easily allows calls between native and CLR code, passing data structures back and forth, ...), whereas Mono gives more limited P/Invoke functionality (call out), and otherwise requires the use of an explicit API (which is specific to Mono), ...

 

this would mean that implementation portability would require wrapping it (or writing a "glue generator" tool), and adding a lot of hassle.

also, Mono is a bit of a beast code-wise, and is difficult to get built on Windows (hindering a plain Mono route), ...

 

so, yeah, it is mostly a matter of implementations...

granted, yes, it works a lot better if portability isn't as much of a concern.

 

 

I had once looked at DotNetAnywhere, but ended up not using it.

more fun is if you want to be able to eval C# code or load it from source.

 

the path of least resistance in my case was mostly just to continue on in the same direction (using a mix of C and my own scripting language).

Share this post


Link to post
Share on other sites

Ah yes, I often forget about Linux / Apple. Sadly both OS didn't appeal to me during my modest time playing with them because of major reasons and concerns, so for now I am happily pure MS / Windows :) and I am yet to have any complaints

Share this post


Link to post
Share on other sites

The thing I love the most on programming is, like cited before, findind a solution to a bug after a sudden realization.

 

The thing I hate the most is useless/misleading error information.

Share this post


Link to post
Share on other sites

I love prototyping games, and getting the basic builds up.

I hate polishing off the ui stuff, and making all the buttons. I'm perfectly fine with making things work by pressing a key, and using simple text to represent the state of things(such as health/mana/stamina). But alas not everyone enjoys that...simplicity, it's just boring to position an ui label, write the code to make it say something, position button, write the code to make it do stuff, etc. then you've gatta make sure they all look nice, and flow right. it's just so boring.

I'm working on a text-mode game for just that reason, with the basic idea of "Let me just tell you what is happening and you can respond when I let you." Going well. smile.png

I love getting the ball rolling, but I have to kick myself in the pants to keep working on it. That goes with everything I do which I don't get paid for, of course.

Share this post


Link to post
Share on other sites
When people make a post and don't specify a language (yes, even on this forum). It makes it more annoying to have to go in there and look through it before actually filtering for the things that you're actually good in and going only for those questions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement