Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Zeb on September 20, 2008

Title: Now I feel torn
Post by: Zeb on September 20, 2008
Sundown got me back into coding. Having been hacked off with VB I decided to have a go at learning C.

I've got Ubuntu and Windows on my PC and thought C would be a good one to learn especially as Ubuntu comes with a full C development suite. That was until HotShot introduced me to FreeBASIC.

On the Amiga I coded assembler and E and while making my STX file for EditPlus I noticed the striking similarity between E and FreeBASIC. It has .a files which on E were modules (.m) and the .bi files in FreeBASIC had to be made by the user from the modules and had the extension .e, the same as the source code.

The layout and content of the bi files are exactly the same as the module reference files (.e) so now I'm left wondering...

I'm not interested in writing demos, only utilities.

Here's something I wrote in assembler (ProGCL):
http://www.pictureinthesky.net/appinfo.php?id=1

Here's something I write in E (HCT):
http://www.pictureinthesky.net/appinfo.php?id=2

The only project I did that wasn't a utility was Atmospherical Melodies (http://www.a51.org.uk):
(http://www.a51.org.uk/images/file_atmos_melodies.png)
It was a trackdos'd music disk with everything packed as much as I could get it.

Anyone want to help me decide?

For those who can't run an emulator or don't want to, ProGCL opened its own screen and while still running in harmony with the OS, had nice pull-down menus containing all the chords and other juicy info.

As for HCT, that worked in its own screen as well although I can't see anything I code for Windows/Linux needing its own screen although I know both C and FB can do it. Everything I code will use its own windows running with the OS.

I'm already familiar with the concept behind how FB works and seeing that C doesn't know what a string variable type is I'm already partially geared towards FB.

The other thing I'm looking for is portability. I know C between Windows and Linux can be a bit on the strict side with some things and as for FB I've no idea. All I know is the compiler is available for Linux.
Title: Re: Now I feel torn
Post by: hellfire on September 20, 2008
It doesn't matter which kind of language you're using.
When you understood the basic principles of programming, learning a new syntax is a matter of hours.
Personally I would recommend c++ because it's more flexible and has the most ready-to-use libs available.
Title: Re: Now I feel torn
Post by: Zeb on September 20, 2008
Yeah, I guess I miss the programming environment where the editor and compiler is integrated.

DevPac you hit CTRL-A then CTRL-R and job done. With E it was like FreeBASIC and C is now - everything had to be compiled via the command line so I wrote a batch script to do everything for me including taking arguments and passing them on.

Slightly geared towards C now...
Title: Re: Now I feel torn
Post by: hellfire on September 20, 2008
Quote
With [...] C everything had to be compiled via the command line so I wrote a batch script
Those times are over.
Have a look at Visual Studio Express (http://www.microsoft.com/express/download).
Title: Re: Now I feel torn
Post by: Zeb on September 20, 2008
heh Microshite bloatware... rather not for various reasons...
Title: Re: Now I feel torn
Post by: Clyde on September 20, 2008
What is it your pondering on?
Weather to stick with FB over C / C++?
Or weather to make Demos or Utlities?
Personally I'd love to see a demo from you dude :D
Title: Re: Now I feel torn
Post by: Jim on September 21, 2008
It's a shame you won't even try Visual Studio Express, Zeb.  Yes, it's Microsoft, yes, it's a big download, but it really is excellent and is really close to what you might end up using if you end up coding for a living.
If you code in good ways, you can easily move your code from one compiler to another.

Jim

Title: Re: Now I feel torn
Post by: benny! on September 21, 2008
@Zeb:
I would also recommend the Microsoft suite for C++ programming.
I hated the Visual C++ 6.0 Version - but the current version is very
good IMHO and not confusing.

Anyway, if you want to might have a look at Eclipse CDT (http://www.eclipse.org/cdt/). It's a C/C++
IDE for the eclipse platform. Didn't test it though - but I like the
Eclipse platform.

If you want to try a basic dialekt - there is also PureBasic (http://www.purebasic.com/) which might
interests you. It offers a cross-platform compiler for Windows, Mac,
Linux (and even AMIGA_OS) comes with an IDE and a visual designer
for rapid application development.
Title: Re: Now I feel torn
Post by: Shockwave on September 21, 2008
Visual studio is a huge, bloated horrible download and it is a nightmare to set it up, there are tutorials available here, although even these tutorials are confusing to even moderately good programmers.

If you decide to go that route though I am sure that we can talk you through the problems you will run into.

Devc will work straight off but will have many missing libs, Freebasic works out of the box and like most other languages, has pointers, inline asm, structs etc.

I tried and failed to make visual studio work here myself. If I had managed, I suspect I'd be using that these days. Hopefully you'll have more luck with it than I did.
Title: Re: Now I feel torn
Post by: benny! on September 21, 2008
@Shockwave:

Did you tried the 2oo8 Version of Visual Studio ? I installed the
C++ version on Vista without any problems and no need for the
configuration marathon I had with the 2oo5er Version on XP.
Title: Re: Now I feel torn
Post by: Jim on September 21, 2008
Still bloated but now it comes with the Platform SDK included and no reason to go editing XML files so you can build Windows apps.

Jim

Title: Re: Now I feel torn
Post by: StatMat on September 21, 2008
For Windoze, Visual Studio is really the best choice, even though it is bloated. However, if you're keen to stick with C, Pelles C IDE is pretty good and lightweight for Windows app coding. You can get it here (http://www.smorgasbordet.com/pellesc).
Title: Re: Now I feel torn
Post by: Zeb on September 21, 2008
Thanks for the suggestions, I've since made up my mind after a bit of time on IRC with the guys...

I've chosen to learn C++ and (as hellfire suggested - thanks!) have downloaded Visual Studio C++ 2000 Express. I didn't realise it was free!!! What a shock!

Went out and bought a book on C++ earlier ("SAMS Teach Yourself C++ in 24 Hours" published by Liberty Horvath) and after reading up to and including the 3rd chapter I've learnt more about C than I ever have.

The development area isn't what I expected (having a wizard just to create a new file) and locating the EXE on my system was a bit of a chore but I'm settling into it fairly well and have already written 2 short programs.
Title: Re: Now I feel torn
Post by: Shockwave on September 22, 2008
Thats a good book to teach yourself the syntax, it's the one I used in fact :)
Title: Re: Now I feel torn
Post by: hellfire on September 22, 2008
In case you're starting to like Visual C++, you still might want to consider getting a commercial edition (which are often free for students) because you can use Visual Assist (http://www.wholetomato.com) then.