Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
49 replies to this topic

#21 ysg   Members   -  Reputation: 192

Posted 08 April 2013 - 11:05 AM

I *love* writing documentation for my code.  Part of my development approach is what some calls it "document-driven development".  It's part of my thought process. I put my thoughts as comments as I write code, and those comments ultimately become the documentation.

Heh, most coders that I've known of, hate documentation as well smile.png . I kinda like writing documentation, sometimes just to relax a bit and not have to be super-focused in.

Sponsor:

#22 BGB   Crossbones+   -  Reputation: 1545

Posted 08 April 2013 - 03:27 PM

I can't decide what I like best about coding.  Writing the engine from scratch is very exciting, especially when it's cross platform and requires little modification to get it running on multiple OSes and devices.  Another thing I really take much interest in and really enjoy is (get ready to cringe), multi-threading!  I'm not a multithreading god, but I'm getting much better with thread synchronization, management, priorities, mutexes/events, but still haven't grasped semaphores, and I constantly forget what I learned about APCs.

 

What I absolutely hate is debugging, especially memory corruption related things.  Those tend to be the most annoying of them all.  Other than that, a second would be reading other people's code, especially when it's not commented, unorganized and OOP crazy like a C++ n00b.  Lastly, what I hate about coding is the fact that C# exists.  I'm sorry, but I hate it with a passion.

 

Shogun.

you hate debugging memory corruption and C#. Sounds like an oxymoron.

 

I think there are good and bad points of C# IMO.

 

good points:

reasonably clean language design and not nearly as annoying to write code in IMO as Java;

compiles faster than C or C++;

bounds-checked arrays and similar;

doesn't require being recompiled per-target;

...

 

weak points:

it is overly pedantic regarding type conversions ("type-safety" == "casts everywhere");

its support on various non-Windows OS's is a bit weak (worse in embedded);

some nifty core language features in C or C++ have to be built manually in C#;

it is more annoying to declare immediate arrays or objects (vs C++);

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

...

 

 

I still personally more prefer to use C and C++ with a custom script-language (though, C# and .NET were design influences regarding the script language and VM, ...).



#23 phantom   Moderators   -  Reputation: 6798

Posted 08 April 2013 - 04:31 PM

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?

#24 phantom   Moderators   -  Reputation: 6798

Posted 08 April 2013 - 04:32 PM

Thing I like : saying 'screw this noise, Future Rob can sort this problem out...'
Thing I dislike : becoming Future Rob and realising that Past Rob is a jerk for leaving me with stuff to sort out sad.png

#25 ApochPiQ   Moderators   -  Reputation: 14294

Posted 08 April 2013 - 04:45 PM

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



#26 AltarofScience   Members   -  Reputation: 926

Posted 08 April 2013 - 05:02 PM

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.



#27 BGB   Crossbones+   -  Reputation: 1545

Posted 08 April 2013 - 07:24 PM


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



#28 Oberon_Command   Crossbones+   -  Reputation: 1795

Posted 09 April 2013 - 12:37 AM

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

#29 Squared'D   Members   -  Reputation: 2217

Posted 09 April 2013 - 12:41 AM

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.

Learn all about my current projects and watch some of the game development videos that I've made.

Squared Programming Home

New Personal Journal

 


#30 BGB   Crossbones+   -  Reputation: 1545

Posted 09 April 2013 - 01:42 AM

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



#31 Waterlimon   Crossbones+   -  Reputation: 2368

Posted 09 April 2013 - 01:51 AM

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


Waterlimon (imagine this is handwritten please)


#32 phantom   Moderators   -  Reputation: 6798

Posted 09 April 2013 - 02:05 AM

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*

#33 RivieraKid   Members   -  Reputation: 365

Posted 09 April 2013 - 06:37 AM

"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, 09 April 2013 - 06:38 AM.


#34 Memories are Better   Prime Members   -  Reputation: 769

Posted 09 April 2013 - 09:14 AM

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



#35 Luckless   Crossbones+   -  Reputation: 1669

Posted 09 April 2013 - 12:44 PM

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.


Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

#36 BGB   Crossbones+   -  Reputation: 1545

Posted 09 April 2013 - 12:54 PM

"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, 09 April 2013 - 01:05 PM.


#37 ysg   Members   -  Reputation: 192

Posted 10 April 2013 - 01:27 PM

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.

#38 tstrimple   Prime Members   -  Reputation: 1718

Posted 10 April 2013 - 01:38 PM

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, 10 April 2013 - 01:38 PM.


#39 ysg   Members   -  Reputation: 192

Posted 10 April 2013 - 02:12 PM



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.

#40 JonathanJ1990   Members   -  Reputation: 166

Posted 10 April 2013 - 03:24 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS