Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Programming - What you love and hate the most

Author
Message
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 12th Jan 2012 03:57
Recently, in an effort to diversify and break out of my C# bubble, I've been experimenting and/or researching various other programming languages, including C, C++, Objective-C, Java, and a few less notable ones. So far, of the ones I've actually used, I've found C to be the most fun for writing small projects due to its power and simplicity (if not always straightforwardness).

I'm curious to know what other languages are used by those of you around here, and what you love and hate the most about them. And, of course, to keep with the spirit of the Geek Culture board, it is imperative that you include a snippet of a semi-relevant nature:

Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 12th Jan 2012 04:09
For me, my favourite language is by far C++, simply because of the immense power it gives you. But 'power' is pretty loosely defined. I mean, C# gives you a lot of power and you can certainly get a project up and running in C# a lot quicker than in C++, but it doesn't give you the low level aspects that C++ gives you.

Bottom line, there's always a trade-off and I don't think any language is ever going to be perfected. I happen to take an interest in programming language development, and the kicker for me is always garbage collection - I have a love/hate relationship with it. First of all, people tend to like it (me included) because it frees you of the burden of manual memory management. The problem is that it's extremely difficult to develop an algorithm that can do it efficiently, especially if you're making it yourself! Here's a prime example of just how difficult this has become for me: I had been experimenting with making a language where you use manual memory management. For this, it would mean one of two things. First off, you could make the development of the language easier by making all objects on the heap, but then that means the programmer has the free every non-primitive value! That's too difficult! So then I started working on more of a C/C++ approach, where you can have objects on the stack. Well, this meant I had to include a whole new set of semantics, one for stack objects, and one for heap objects. Both difficult for me, and the developer! So then I went back to the garbage collection, and tried to figure out a good garbage collection algorithm. The typical mark-and-sweep algorithm is simple enough, but is requires the program to pause (not acceptable to me, especially since I'm interested in game programming) and the timing of collection is also difficult to figure out. So then I started thinking about incremental collection, but that's much more difficult, because you want to traverse the graph of all active objects, and intermingle that process with the running program, which, changes the graph of active objects! So then you have to notify the collector, and before you know it, everything becomes too damn confusing and it's too hard to hold all of this in your head.

Yeah, garbage collection is annoying.

"everyone forgets a semi-colon sometimes." - Phaelax
heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 12th Jan 2012 04:11 Edited at: 12th Jan 2012 04:12
Well I've been using C++ for 5 or so years now and the only other major language I used was Java. Java is definitely easier because (as far as I've been taught) you don't have to worry about memory allocation or pointers or anything like that.

I have also been using Game Maker for 6 or so years and started to seriously use it again back in September. It uses its own language, GML (Game Maker Language). It is so simple that it is going to be painful switching back to C++



It works using events, but they are basically the same as states or just specific inherited functions. So, all I have to do to save every object in the game is call that code. However the variables can annoy me. Variables are declared like this:

Declaration is fine, but unless I add this line:

Then the variables are added in object scope instead of block scope... Is that the right term? Basically this:

That would add "i" to the object so I can access it anywhere, but this:

Makes "i" local to the event. It can get frustrating when I get the wrong starting value for variables and things.

I hope you understood what I said

"So hold your head up high and know. It's not the end of the road"

Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 12th Jan 2012 04:13 Edited at: 12th Jan 2012 04:14
I love C++, but I HATE library management!!! Compiler settings and linker errors galore!
[edit]
And of course, there's always DBPro, which I love for quick projects.

xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Jan 2012 04:16
Lucky for me your code has not been adopted.

The only language I use or know really is VB. I started with QBasic back in the day and it was an easy move into VB. For what I do, it's very easy and native to Windows, great for whipping up a GUI for clients. That's what I like. What I don't like is that it sucks for graphic apps, so games are out of the question. It probably wouldn't be a big leap into DB, but I just don't have the drive to try right now.

Brian.

!retupmoc eht ni deppart m'I !pleH

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 12th Jan 2012 04:27 Edited at: 12th Jan 2012 04:30
I like the power/low level access of C++, but compared to C#, it feels somewhat 'dirty' - my biggest gripe is headers and particularly the need for private variables to be declared in them (there are ways around this, I know, but it feels like extra effort by something that should be taken care of by the compiler). And I have to agree with Neuro Fuzzy on the libraries, .NET definitely makes that easier. But nonetheless, it is probably going to be my primary tool going forward, since I've been aiming for portability with my projects (although a C/Lua game engine would probably be nice).

@heyufool1 - Most of the 2D games I've made (and indeed, most of the games I've finished) have been in Game Maker. I loved that product for so many reasons (seems to have fallen a bit behind, but it has been awhile since I've looked at it). I understand your gripes with the variable scoping - I used to have problems with conflicting scripts, and it often took some time before I realized what was going on.

@xplosys - What, no retaliatory strike in VB?
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Jan 2012 04:43
Quote: "@xplosys - What, no retaliatory strike in VB? "


I've attached a quick code viewer, made especially for you.

!retupmoc eht ni deppart m'I !pleH

Attachments

Login to view attachments
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 12th Jan 2012 05:26 Edited at: 12th Jan 2012 05:26
Quote: "I've attached a quick code viewer, made especially for you."


Ah, how sweet! I've made one for you too, Buddy

Attachments

Login to view attachments
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Jan 2012 13:32
Nice! Good use of random. I give it a B+.

Brian.

!retupmoc eht ni deppart m'I !pleH

heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 12th Jan 2012 20:17 Edited at: 12th Jan 2012 20:18
Quote: "@heyufool1 - Most of the 2D games I've made (and indeed, most of the games I've finished) have been in Game Maker. I loved that product for so many reasons (seems to have fallen a bit behind, but it has been awhile since I've looked at it). I understand your gripes with the variable scoping - I used to have problems with conflicting scripts, and it often took some time before I realized what was going on."


I haven't used any other 2D game program so I can't say for sure if it is behind now, but they now support the alpha transparency of pngs which can make smoother looking graphics. They are also working on an HTML 5 version. The one thing I wished they improved are full screen shaders. It is possible to do things like bloom, blur, etc. but the techniques are often slow performance wise. Anyway, aside from the occasional scripting confusion it is amazing for 2D games. I have to try out AppGameKit now that I got an Android phone though, maybe I will have a new favorite program

"So hold your head up high and know. It's not the end of the road"

Teh Stone
15
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 12th Jan 2012 22:01
Quote: "What I don't like is that it sucks for graphic apps, so games are out of the question."


You try telling old_school that!
lazerus
17
Years of Service
User Offline
Joined: 30th Apr 2008
Location:
Posted: 12th Jan 2012 22:34 Edited at: 12th Jan 2012 22:45
Syntax is abhorrent. I can write anything is structured English with partial syntax and even go into graphical relations of objects with stupid ease but I'm just not wired for full syntax.

Java i can walk through after a year, C++ is the one I'm having alot of trouble with in uni. The lessons aren't very well structured so I'm having a hard time following some of the massive leaps in syntax use. Took 14 lessons to finally get out of him what a destructor is. Understaffed but he's doing his best to keep on top of it so i can't fault the man.

While this is here anyone got a good C++ book, series or 'from ground up' tutorial? Seen a few out there that i'm tempted to get so just curious what people would recommend

# Running in visual studio incase it matters. Free student software <3

budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 12th Jan 2012 22:58
Quote: "While this is here anyone got a good C++ book"

The book that I will always recommend is Ivor Horton's book, because it covers so much and does it very well.
http://www.amazon.co.uk/gp/product/0470500883/ref=s9_simh_gw_p14_d9_g14_i1?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=center-3&pf_rd_r=1X3G42C2V82REP2PQKT4&pf_rd_t=101&pf_rd_p=467128473&pf_rd_i=468294


reauirentem
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Jan 2012 23:21 Edited at: 12th Jan 2012 23:28
C/C++ and asm I've always been comfortable with. C mainly because you can do almost anything with it and asm for it's raw speed. I started programming about 30 years ago in assembler on the 8 bit machines, learnt C on the Atari ST with the new asm. I dropped out of programming for a while when I got my first PC because everything was so different and looked a tad too complex, but now I'm at the stage where its just like riding a bike again.

Most, actually almost all BASIC languages I really dislike because I like to have my vars declared. That and BASIC never seems to compare with C. I decided I didn't like BASIC when I ran my first machine code program on a ZX Spectrum.

There's still a lot about the new C++ that I'm picking up as I go along but still for that extra speed when required, standard ansi C can be faster. Especially when it comes to comparing speed when using standard arrays in C to using the STL libraries. STL is a great adaption to C++, string and vector libraries I use all the time.

For people who have programmed for years in BASIC, even standard ansi C can be very daunting and take a long time to learn as a lot of it isn't obvious until it starts to become second nature.

C can be written on any machine as its pretty much standard, but asm, I've done 6502, 6809, z80, 680x0 and now x86 (with mmx and sse).

Just don't throw another BASIC language my way. I can just barely manage with DBP. But saying that, DBP is a fast and solid language. (Well 99.5% solid)...

Regarding reference material for C theres a few posted here: LINK to FORUM

EDIT: I forgot to include a reason why I like C/C++ and asm. Well, these days within a C compiler you can now directly include assembler in your code to free up those bottlenecks that occur. Visual Studio does a great job of that. Something like these:

Which speeds up the noise function when creating textures and heightmaps on the fly...

Which frees up a major bottle neck in collision checking...

There, you cannot do that in BASIC!!!

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 13th Jan 2012 20:08 Edited at: 13th Jan 2012 20:09
Quote: "aside from the occasional scripting confusion it is amazing for 2D games."


It really is, and I always liked it in particular for its event driven and OO approach that was very well suited for games. The new improvements do look nice, but it doesn't feel like it is being driven at the pace of previous versions. Of course, that could just be a sign of its maturity.

Quote: "For people who have programmed for years in BASIC, even standard ansi C can be very daunting and take a long time to learn as a lot of it isn't obvious until it starts to become second nature"


It didn't take me too long to learn (most of) C, but I think C# helped a lot in that regard. C isn't OOP and is considerably more low level, but a lot of the syntax is the same or similar. C# also helps a lot with learning C++, because you have already been exposed to the OOP concepts, it's just a matter of going a level deeper and understanding some of its own syntax and quirks (and remembering "delete" ).
heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 13th Jan 2012 20:19
Quote: "It really is, and I always liked it in particular for its event driven and OO approach that was very well suited for games. The new improvements do look nice, but it doesn't feel like it is being driven at the pace of previous versions. Of course, that could just be a sign of its maturity."

Yeah I guess it is moving along a little slowly. However, I read that they are rewriting the engine in C++ (previously Delphi) so we can look forward to performance boosts

"So hold your head up high and know. It's not the end of the road"

Login to post a reply

Server time is: 2025-05-19 20:17:30
Your offset time is: 2025-05-19 20:17:30