LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Experienced programmer - but new to Linux (https://www.linuxquestions.org/questions/programming-9/experienced-programmer-but-new-to-linux-423858/)

bcairns 03-11-2006 12:37 PM

Experienced programmer - but new to Linux
 
Hello all,
Been reading these forums for a while now and thought I would ask this question as I am sure quite a few of you are well versed in programming for windows and linux.

Admittedly I tried to learn C++ as my first language, but that was decades ago when I did not even know what a variable was...ended up learning VB as my first language and then had to un-learn all the bad habits it taught me.

I am an experienced windows programmer that has focused mainly on ASP, VB, Delphi, and C#. In the past I have done the simple "hello world" applications in C, C++, Java, and Turbo Pascal.

The best language to use is always going to depend on what you plan on doing...I mainly do desktop applications from database programs to multi-threaded TCP servers to image viewers.

I like the fact that Java seems to be a RAD (rapid application development) language and it hides the memory managment from me (like VB and C#)

But should I take the plundge and learn C or C++?

Or is there another language that is great to work with in linux - heard Python was good but know nothing about it.

mic 03-11-2006 02:06 PM

Quote:

Originally Posted by bcairns
Hello all,
I mainly do desktop applications from database programs to multi-threaded TCP servers to image viewers.

Take a look at Qt
http://www.trolltech.com/

Memory management is similar to Java, you just create objects with "new" and don't need to delete them manually. I didn't learn it much because it is free only for GPL'd software. If you develop some proprietary software, you need to buy a license.

If you don't need high speed, then you could as well stick with Java.

MicahCarrick 03-11-2006 02:41 PM

The questions you ask will certainly yeild many opinions as to what to use. It usually comes down to QT vs GTK+ for the GUI library, and C, C++, or Python for the "language" to code in. I come from a Visual Basic background and was originally intimidated by Linux programming. I've found GTK+ programming with C and Glade to be my "cup of tea", so I'll give you my 2 cents. Once I got past the initial learning curve, I found it to be quite simple as a RAD environment.

Glade allows you to layout your GUI in an environment very similar to VB or Delphi. You drop controls onto a window etc. There are a few diferences and a new set of vocabulary words (widgets not controls, signals not events, etc) but you're essentially doing the same thing-- attaching functions to handle events that occur on widgets (like a button widget).

Obviously C is much different than VB in terms of syntax, however, it's not too far from Java, PHP or C# (appearance wise). I like it much better now, but definetely had to struggle for a week or two to get aquainted where as learning VB I just jumped right in.

Obviously, that's just my opinion and you're best bet is to try a couple and see what feels like it's going to accomplish what you want.

I you go with Glade and GTK+/C, I have a tutorial here: http://www.micahcarrick.com/v2/content/view/28/20/

I'm also working on a tutorial specifically for VB developers but it's still only about half done.

Good luck and welcome to Linux programming. You will be pleased.

- Micah

paulsm4 03-11-2006 03:05 PM

Hi, bcairns -

Probably your biggest "culture shock" coming from a Windows environment is the lack of "warm fuzzy" IDE's (like Visual Studio). Nothing in the "Open Source" world (including Glade, KDevelop, Anjuta, Netbeans and Eclipse) even come close.

Probably the biggest thrill (if you have the perseverence to stick it through your initial discomfort) is the power, freedom and flexibility Open Source affords you.

Visual Studio (IMHO) is largely a crutch - and it can be a pretty inhibiting crutch at that! For example, try doing ActiveX/COM stuff in VC++ 5.0 (which came out before ATL made COM halfway accessible for Mere Mortals). Or try doing the same ActiveX/COM stuff in Visual Studio 2003 (which came out after Microsoft started encouraging you to re-write everything in .Net assemblies instead of ActiveX components). Or try writing a control array (instead of "N" separate UI controls) in either of them. Or heck - just try refactoring some MFC code in the IDE! That can be an exercise in Pain and Frustration for you (in Eclipse, on the other hand, refactoring is usually a breeze!)

The list of things you *can't* do precisely *because* of the IDE is quite extensive. The list of (often times "surprising") things that the IDE is doing "behind your back" is even longer. Are IDE's bad? No. Is "taking the path of least resistence" and relying exclusively on the vendor's IDE du jour bad? Unfortunately, I would argue "Yes".

And that's a luxury you pretty much *don't* have in the open-source world (largely, I hate to say it, because of the immaturity of most of the open source tools you have to choose from).

I really believe, however, you'll be happier and more productive in the long term because of it.

IMHO .. PSM

PS:
Above all, please just follow Linux Torvalds (wise!) admonition -
Quote:

"Have fun!"

paulsm4 03-11-2006 03:13 PM

Hey MicahCarrick - great tutorial ...

.... and GREAT web site!!!!

You did it in Mambo, didn't you?

I downloaded Mambo last night, and I'm planning on experimenting with it this weekend.

The results you got on your page were - frankly - brilliant. I really, really liked it!

Any observations on your experience with Mambo? Any pros/cons? Suggestions?

Thanx in advance .. PSM

PS:
I hope my enthusiasm for Mambo doesn't belie my rant about IDE's above. I think tools are great ... but I think over-reliance on some tools can be bad. On the web side, "Front Page" is a tool that can create some neat-looking sites: but the auto-generated results you see in "View Source" are invariably ugly. Mambo pages look good to the eye, and seem to look equally good from a "view source" perspective. I'm definitely curious to see how much flexibility Mambo gives you!

MicahCarrick 03-11-2006 03:28 PM

Thank you for the compliments. Yes it is Mambo. I do like Mambo quite a bit. It's come a long way too. I originally found Mambo a bit non-intuitive, but have since grown fond of it and realize it's flexibility. I customized the template obviously as I couldn't find any variable-width templates that I liked (or that looked good on anything but IE). Any time I need a customization that I can't figure out how to do in mambo, I just hack in my own PHP code in the template's single index.php (like an include to my own scripts).

Fortunately, Mambo allows plenty of flexibility in terms of re-arranging menus, categories, sections, etc without losing the links to the articles/pages which is nice for search engines etc. The best thing to do with Mambo is create an entire "fake" website, delete all that content and then do your "real" site. It's somewhat tricky at first to understand how the modules show up and interact with each other, in what order, etc., but once you get it it's a piece of cake. I guess it's like anything else-- ya gotta learn it. But if you're savy HTML/CSS/PHP guy, it's frustrating to struggle doing something you could just whip up in code. But it's been worth it in the long run. Now I can write articles/tutorials using NVU with just standard HTML elements, drop it in to mambo, and let the CSS from my custom template handle the formatting. Makes publishing a new article/tutorial as easy as can be.

crAckZ 03-11-2006 03:58 PM

well to keep your options open, there are some IDEs like gambas and Kbasic. i use to be a vb programmer but when i came to linux i wanted to make....well qt gave me alot more control. try different things and choose what you feel comfortable with.:)

bcairns 03-11-2006 07:02 PM

Just to kind of update the original post (incase anyone is following this thread).

Spent about an hour in Barnes and Noble tonight flipping through various programming books (some of which I have already read).

Saw a book on QT that looked interesting but spent more time talking about QTs cool features then about C++.

Then I found a nice gem tucked behind a bunch of other books

C++ Fourth Edition
By Herbert Schildt
ISBN 0072227222

amazon.com/gp/product/0072226803/ref=pd_sim_b_2/103-6798539-1127844?%5Fencoding=UTF8&v=glance&n=283155

(sorry forums won't let me make this a link as I have not made 5 posts lol)

After reading the preface I was hooked.
The book covers C, C++ and acording to the amazon.com reviews is well worth it

However I did get some funny looks from the Barnes and Nobles employees using their terminals to look up a book on Amazon.com ;)

Basically what hooked me was the author explaining the entire C++ language in a non-compiler specific manner - so the things I learn can be applied in any operating system.

I am glad many of you replied to this thread with advice - I am going to bite the bullet and learn C++

Thanks Again

MicahCarrick 03-11-2006 08:33 PM

Good luck and have fun.


All times are GMT -5. The time now is 08:59 AM.