Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  My 1st .NET / C# impressions  (Read 6386 times)
0 Members and 1 Guest are viewing this topic.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Posted 2005-09-21 18:39:00 »

After having worked a bit with C# and .NET, these are my 1st impressions:
* Awfully similar to java. Even the stacktrace looks exactly the same. They even have their own Java Web Start equivalent.
* VS.Net is pretty good and has some nice wizards but is expensive. And if you want the C# editor to compete with Eclipse,
  you need a plug-in which is also not free (the standard C# programming environment is not nearly as good as Eclipse).
* Using .dll's with your own programs is pretty straightforward.
* The .net framework as far as I can tell is not cross-platform for GUI applications. There's no swing equivalent for
  example (you create forms using the proprietary MS libraries).
* C# is nice, but even though it's often considered to be like an 'enhanced java', I actually don't think so. In java,
  almost everything seems well thought out and consequent, while my 1st impression of C# is that it seems a bit cluttered and
  can't decide if it wants to please C++ developers or Java developers. In many cases, things that are possible in C# but not
  in java are things that I really don't want.
* The naming conventions just suck.

Note that I'm not a .net expert yet, so some of my views may not be justified...

Offline Aramaz

Junior Member




Java Games Rock!


« Reply #1 - Posted 2005-09-21 22:53:41 »

Been working in .net over the summer on my internship...(both VB and C# but mostly C#...)

I agree with you on most everything... first 2 months I worked without the resharper plugin... and always complained to myself of how much better eclipse is than the VS ide... Now I'm using resharper on a trial period... and it makes things ALOT better... with resharper it's almost as good as eclipse... I still think eclipse has an edge in a lot of areas... but VS ide is a lot faster and more responsive... (especially working on gui programs compared to VE plugin for eclipse)

As for the languages I like c# because of the fact it's so similair to java... but for my own work I'd still choose java... but that might be just from the fact that I've been exposed to java alot more... so I definitely agree on the suckiness of the naming conventions. :-)... I just don't like method names starting with a capital letter (obviously because of lack of exposure)... the one good thing in the convention though is the 'I' in front of interfaces... makes a lot of sense. (I always name my own interfaces 'I_' in java...)...

but I also admit alot of things could be better in java...


Oh, and I very much dislike the javadoc equivalent in c# (the autogenerated stuff)... it's so cluttered... javadoc is so much cleaner and nicer.

Play XSW: www.xsw.se
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #2 - Posted 2005-09-25 01:50:21 »

Oh yes, the javadoc equivilent is awful.  Reminds me of the equally aweful online VS6 docs.

In the shot time I used C# I kept thinking how similar it was to java and also how many things (naming convensions, javadoc etc) I think they changes "just to be different" to java.

Will.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2005-09-25 13:43:20 »

The primary reason I have not delved deep into .net is precisely that - it's just different enough to be annoying, just similar enough to have too many gotchas. I've spent years learning the deep, deep intricacies of Java. I'm probably a leading expert on many aspects of the way it works, having not specialised in crap like JSP and J2EE. Why throw away all that investment learning something that does essentially exactly the same thing?

Cas Smiley

Offline K.I.L.E.R

Senior Member




Java games rock!


« Reply #4 - Posted 2005-09-25 14:14:58 »

After having worked a bit with C# and .NET, these are my 1st impressions:
* Awfully similar to java. Even the stacktrace looks exactly the same. They even have their own Java Web Start equivalent.

Well Java does have a lot of good points to it, why re-invent the wheel when you can get more out of it by reusing it?

* VS.Net is pretty good and has some nice wizards but is expensive. And if you want the C# editor to compete with Eclipse,
  you need a plug-in which is also not free (the standard C# programming environment is not nearly as good as Eclipse).

I agree 100% on this. I hate having to spend hundreds of dollars for a plugin that does things like refactoring and the like. Visual Studio .NET 2003 was decent but could be far better. I wish Eclipse had those debug bubbles that show you what value a variable is during debug time.

* Using .dll's with your own programs is pretty straightforward.

I love this part. Smiley

* The .net framework as far as I can tell is not cross-platform for GUI applications. There's no swing equivalent for
  example (you create forms using the proprietary MS libraries).

I hate this part. Sad

* C# is nice, but even though it's often considered to be like an 'enhanced java', I actually don't think so. In java,
  almost everything seems well thought out and consequent, while my 1st impression of C# is that it seems a bit cluttered and
  can't decide if it wants to please C++ developers or Java developers. In many cases, things that are possible in C# but not
  in java are things that I really don't want.

I don't believe it's cluttered. After using C# for a year I feel that it's quite a good language to program in.

* The naming conventions just suck.

I've learnt to switch from Java->C# and vice versa when it comes to naming conventions.
It takes time. Just keep at it.


Note that I'm not a .net expert yet, so some of my views may not be justified...

What qualifies someone as a .NET expert?


Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #5 - Posted 2005-09-25 14:36:22 »

the one good thing in the convention though is the 'I' in front of interfaces... makes a lot of sense.

Just out of interest, why?

It smells a bit too much like Hungarian notation, which AFAICS, inflicts bleeding eyes on innocent programmers in return for the amazing benefit of making it easier for those same programmers, presumably having mopped the blood from their faces, to perform manual type checking on their code!

The final section ("I'm Hungary" and beyond) of this article tells the sad tale of how Hungarian Notation started out as a good idea that was misinterpreted to become useless, and then the misinterpretation spread far and wide and even standardised.

At any rate, what's the benefit in having "I_" infront of Interface names? Any half-decent IDE will make it immediately obvious if the interface is misused.
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #6 - Posted 2005-09-25 20:14:39 »

If you'd google for my hovercraft is full of eels and C# you'd find a some resource about Java and C#.
Offline zingbat

Senior Member




Java games rock!


« Reply #7 - Posted 2005-09-27 17:39:56 »

If you have come this far with java stay with it. Java and c++ should complement themselves very well for games. And if you need something more high-level than java for AI there are prolog and rule-based systems that work well on top of the java vm and can take advantage of the benefits of the java platform.

My personal opinion, java as a programing language is nothing special. The so called father of Java already said in some interviews he regreted some of the decisions he had to take when building it and if you look at .NET without trying to nitpick it to dead it has a couple of details that make it stand a little above Java. But what's the point ? Java is not only the language, its also the virtual machine, the apis and of course the support with tools like Eclipse.
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #8 - Posted 2005-09-28 15:28:18 »

bleb...

Well I guess I like that files are grouped together nicely in Navigator, isn''t that a good reason... :-)

I don't like the hungarian notation though... but "I_" in front just seems pretty clean to me, and my eyes...

hungarian doesn't make much sense anymore since you rarely use global fields... and you readily see the type of things you want to access in getters in a good IDE.

alos when I need an interface I like to just have to type I + ctrl+space to get up a list of interfaces... not have to browse through another million classes....

(you probably figured out now that I prefer get/setters to properties in c#... I like the way you code properties in c#... but like that getters/setters are grouped together in lists in java...)

Play XSW: www.xsw.se
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #9 - Posted 2005-09-28 16:30:38 »

Fair enough, whatever works for you.

I wouldn't be surprised if Eclispe will already restrict the auto-complete suggestions to interfaces if you trigger it after typing "implements", but I haven't tested.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2005-09-28 18:57:50 »

Yeah Eclipse is already very clever like that.

The reason I stick "I" in front of some interfaces these days is so I can name a default concrete implementation after it without the I Wink

Cas Smiley

Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #11 - Posted 2005-09-28 22:28:26 »

And what about I at the end?
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #12 - Posted 2005-09-28 22:50:39 »

but then you don't get the nice sorting in popup lists and the navigator (and ordinary file browsers...)

Play XSW: www.xsw.se
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #13 - Posted 2005-09-29 02:37:56 »

It however prevents showing implementing files next to the interface...

Not to mention that standard parsers have switches to show only interfaces.
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #14 - Posted 2005-09-29 11:54:44 »

Hey, it "works for me".

Cas Smiley

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #15 - Posted 2005-09-30 14:12:11 »

Hey, it "works for me".

+1 Grin

I personally don't use I* to denote interfaces (my default implementations are usually called Abstract* or *Impl depending on whether or not they are concrete).  However, I've seen many people use such a naming convention, and it definitely works for them!

Tolerance in coding conventions is something we should all aspire to - especially since the language is very permissive of personal coding style.  People can use their own conventions and their code will still be easily usable by others - more power to them.  Except, of course, for those utter bastards who put open-braces on the same line as their control statements - I mean really...

Hellomynameis Charlie Dobbie.
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #16 - Posted 2005-09-30 17:48:36 »

har har... that would be me   Grin

It's just such a waste with those blank lines... And with eclipse there is no problem with brace matching...

And after a long time of  using it, I've come to the very objective conclusion that it looks much nicer too!  Wink

(This very meaningful post made me jr member... Hooray!!)

Play XSW: www.xsw.se
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #17 - Posted 2005-10-01 01:05:28 »


I personally don't use I* to denote interfaces (my default implementations are usually called Abstract* or *Impl depending on whether or not they are concrete).  However, I've seen many people use such a naming convention, and it definitely works for them!

Tolerance in coding conventions is something we should all aspire to - especially since the language is very permissive of personal coding style.  People can use their own conventions and their code will still be easily usable by others - more power to them.  Except, of course, for those utter bastards who put open-braces on the same line as their control statements - I mean really...


You mean like this?

if(something > somethingElse){doThings() ; }

Nothing that much wrong if the if statement is just one line. What is REALY bad is

if (a > i)
     somethingugly()

of course it might be used with for as well.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 743
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #18 - Posted 2005-10-01 01:09:27 »

He meant:

1  
2  
3  
if(whatever) {
   task.perform();
}

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #19 - Posted 2005-10-01 01:40:25 »

I would have to say that the near-perfection of Eclipse's code formatter should relegate these religious whitespace arguments to a thing of the past.
After ctrl-s, my most-used shortcut is esc,ctrl-f.
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #20 - Posted 2005-10-01 10:57:30 »

Quote
Nothing that much wrong if the if statement is just one line. What is REALY bad is

if (a > i)
     somethingugly()

of course it might be used with for as well.

I should probably not let you read my code then... Wink

Quote
would have to say that the near-perfection of Eclipse's code formatter should relegate these religious whitespace arguments to a thing of the past.
After ctrl-s, my most-used shortcut is esc,ctrl-f.

Amen to that. Although it does mess with some stuff... Why can't it let local variables be formatted nicely as class fields? And it messed with nice things like

if          (abc)  do.the.thing();
else if (bcd)  do.the.other.thing();
else if (cde)  do.something.else(),

I like nice lineups!

Play XSW: www.xsw.se
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #21 - Posted 2005-10-01 21:14:31 »


if(something > somethingElse){doThings() ; }

Nothing that much wrong if the if statement is just one line. What is REALY bad is

That is the WORST!  What you have below is better.  Why?  because the body of the IF should always be placed in the same spot to improve readability.  The only time I would do something like above is if I had several trivial (very short) conditions in a row so the pattern of the body being on the same line as the condition was obvious and the block of IFs could be easily seen as a unit.  In that case I might also align the body code to start at the same column.

Quote
if (a > i)
     somethingugly()

This is an improvement becase the body is indented below the IF which is the same case as a multi-line body.  So you don't have to mentally parse two different formats.  I only omit braces when the if condition and the body, as well as any else/elseif and associated body are all one liners.  So if the if body is one line, but the else body is two lines, then both bodies get braces.  Or if I have a complex condition that spans more than one line I use braces, e.g.:
1  
2  
3  
4  
5  
6  
if( conditionA
  & conditionB
  & conditionC )
{
    doStuff();
}


I know it's all a matter of opinion, but at least I have logical reasons to back my opinion up Tongue

Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #22 - Posted 2005-10-02 04:04:02 »

And what if you'd have

if (something)
  somethingUgly();
  somethingUgly2();

Is it just a typo, or bad tabs?
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2005-10-02 13:15:14 »

You know, one of the things I liked the most about a language called GFA Basic that I used to use, was that you didn't have any choice whatsoever, it laid it out for you as you typed. Genius.

Cas Smiley

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #24 - Posted 2005-10-02 13:27:21 »

Yeah, GFA basic had a great editor for its time. It could even collapse methods, something which has just recently been added to Eclipse.

Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #25 - Posted 2005-10-02 14:07:46 »

Recently? This was pretty common in assembly IDEs.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #26 - Posted 2005-10-02 14:44:39 »

The first time I used Python is felt strangely odd for formatting to actually matter to the compiler/interpreter (as instead of {} you use indent levels). However after a while it becomes natural and it means that code is always consistantly formatted (assuming it runs, that is).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #27 - Posted 2005-10-02 15:21:18 »

Recently? This was pretty common in assembly IDEs.

Compared to when GFA was used, it was added to Eclipse like yesterday  Smiley

Offline Aramaz

Junior Member




Java Games Rock!


« Reply #28 - Posted 2005-10-02 22:19:41 »

Quote
You know, one of the things I liked the most about a language called GFA Basic that I used to use, was that you didn't have any choice whatsoever, it laid it out for you as you typed. Genius.

heh... that's the thing I hate about visual basic... it messes with my formatting!

I say: "Leave my code alone unless I tell you to!"...

of course you can turn it of in vb but then the editor behaves strangely, and all wizard code is all messy and has to be straighten out...


Play XSW: www.xsw.se
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #29 - Posted 2005-10-02 22:29:25 »

The thing with vb is also that no matter how you format it, it will look ugly (even in vb.net with its weird naming conventions).
But yes, if your attempts at making it look better using formatting are being punished by strangely behaving editors and wizard code, well, that just sucks.

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (24 views)
2014-07-24 01:59:36

Riven (24 views)
2014-07-23 21:16:32

Riven (18 views)
2014-07-23 21:07:15

Riven (21 views)
2014-07-23 20:56:16

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (55 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!