LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need a push in the right direction. (https://www.linuxquestions.org/questions/programming-9/need-a-push-in-the-right-direction-822451/)

computer_freak_8 07-27-2010 10:54 AM

Need a push in the right direction.
 
I can't seem to figure it out with Google, so it's time to post it in forums. I don't know what the best route to take is, and I don't know how to word it appropriately for a Google search, even if it would know. Here is an overview of where I'm at, and where I'd like to be; any help would be appreciated.



I know a little bit of Perl, a decent amount of HTML and CSS. I am very bad at JavaScript and know nothing in PHP. I can usually put Bash scripts together quickly. I can usually understand things if there is a sufficient analogy, or if there are enough examples given. I don't know much of the proper terminology (classes, variables, array, list, literal, lexical, et cetera) for the things in programming.

So far, I seem to be best at autonomous scripts, or scripts with some user interaction. My biggest struggles seem to happen when I need things to "talk" to each other (inter-process communication??). Usually, I can kludge together enough code to get the software communicating, but I still have lots of trouble with hardware/software interfacing.

I don't know the best order to go about these things, mostly because I'm sure some of them "build upon" knowledge learned in others, but not necessarily vice-versa.

I'd like to be able to:
  • Create simple GUIs (a window with a few buttons, each with a picture or text as a label).
  • Code in C++.
  • Have software and hardware stay "in sync" with each other (eventually to create a music and light synchronized display).
  • Be able to use AJAX at least somewhat proficiently (probably just a simple read settings from/write settings to an XML file or something).
  • Use Perl for CGI scripts.
  • Understand enough about hardware/software interaction to be able to use my Arduino Duemilanove as a "generic" USB-HID (essentially be able to use the digital I/O pins as a somewhat "permanent" attachment to my system, without having to worry about whether it showed up at /dev/ttyUSB0, /dev/ttyUSB, et cetera; I could "assign" pins to send/recieve certain "signals" that my computer could decide what to do with, without having to re-flash the firmware on the Arduino).
Eventually, but probably not until I've accomplished the stuff above:
  • Be able to run a Debian package repository on my server (for my own personal use; I just want it to help simplify maintenance amongst my computers).
  • Be able to understand the *why* of LinuxFromScratch (not just "what to do", but "why to do it, and how it affects the overall, end-result system").
  • Understand Assembly language.

Any ideas on what to do next/where to look?

pixellany 07-27-2010 11:38 AM

My first reaction is: "One step at a time."

Start with what you said about HTML, CSS, and JavaScript: I am in the same boat---I can put together a simple site in basic HTML+CSS, and I have read the book on Javascript. If I ever need to do something in a website using JavaScript, I'll go back and figure out how to do it.

Once you understand the basic concepts of programming, it may be best to figure out specific things as you need them. If you're going for a degree in CS, that's a different story.

orgcandman 07-27-2010 01:05 PM

My gut reaction would be to start from the thing you think will be the hardest, and immerse yourself in it. If you think learning assembly would be hardest then give yourself a bunch of incremental assignments (for instance, get 'hello world' working; move on to Fibonacci; write some linked list processing) in assembly. One of the more easy to understand books on the subject might be Structured Computer Organization by Andrew S. Tanenbaum.

The reason I say to do it this way is you'll get the fundamentals down first. Everything else flows from understanding the _how_ and _why_ of the computer in front of you.

jiml8 07-27-2010 01:29 PM

A shotgun approach won't work. Well...ultimately it will, but you'll spend many years before you think you know anything.

As the others have said, you need to focus on one aspect of it, drill into that, then expand from the base this gives you. You'll still be years at it, but you won't feel nearly as lost along the way.

From the list you gave I would say you should start by mastering C/C++. I think this would give you the maximum leverage for what you want to do.

Find yourself a project that you can do with either C or C++, then make it work. You'll learn a lot.

zirias 07-27-2010 02:27 PM

In fact, these are a LOT of different directions.

Quote:

Originally Posted by computer_freak_8 (Post 4046985)
[*]Create simple GUIs (a window with a few buttons, each with a picture or text as a label).

There are MANY options. I like very well using Windows.Forms with C# in Visual Studio, but you'd need a Windows host for that. The final result will run on linux using mono if you care not to use the newest (.NET 3.5 and newer) features.

But as you probably want to create native linux code, you should take a look at QT. Although this requires learning C++ first, which leads to:

Code:

[*]Code in C++.
C++ is a very powerful and very complex language. Unfortunately there are a lot of people using it, but not understanding it, which leads to poor code quality. I know there are people who will disagree with me, but I'd suggest: learn ISO C first. When you move to C++ later, take your time to truly uinderstand the features (including the esoteric ones not present in other OOP langauges).

Quote:

[*]Have software and hardware stay "in sync" with each other (eventually to create a music and light synchronized display).
Maybe take a look at SDL? The libs are usable from ISO C as well as from C++ and abstract direct hardware access in a reasonably portable way.

Quote:

[*]Be able to use AJAX at least somewhat proficiently (probably just a simple read settings from/write settings to an XML file or something).
I started some fiddling with AJAX from scratch (writing all the JS code). It finally worked and it was a beast just for one AJAX-enabled mail form. Didn't follow that path any further.

So, my tip would be: Use an existing framework. jQuery seems to be quite popular.

Quote:

[*]Use Perl for CGI scripts.
Do it! perl is fun :) Maybe you also want to take a look at mod_perl, this enables you to intercept the request processing inside apache at different stages using perl (much more powerful than just CGI)

Quote:

[*]Understand enough about hardware/software interaction to be able to use my Arduino Duemilanove as a "generic" USB-HID (essentially be able to use the digital I/O pins as a somewhat "permanent" attachment to my system, without having to worry about whether it showed up at /dev/ttyUSB0, /dev/ttyUSB, et cetera; I could "assign" pins to send/recieve certain "signals" that my computer could decide what to do with, without having to re-flash the firmware on the Arduino).
Uhm ... errr ... well ....
Probably kernel hacking, see threads about getting started with this ;)

Quote:

[*]Be able to run a Debian package repository on my server (for my own personal use; I just want it to help simplify maintenance amongst my computers).
This is much easier than you might think. You can setup a simple repo (one architecture, no /pool) using dpkg-scanpackages -- for a full featured repo, look at the reprepro tool.

Quote:

[*]Be able to understand the *why* of LinuxFromScratch (not just "what to do", but "why to do it, and how it affects the overall, end-result system").
Well, there ARE explanations in the book... Maybe you could ask what you don't understand here in specific threads.

Quote:

[*]Understand Assembly language.
Uhm. I stopped at 6510 assembler (C64), but THIS is still fun. You probably won't need it nowadays, unless you want to code some drivers or platform-dependent parts of an operating system ;)

computer_freak_8 07-27-2010 02:54 PM

Sweet! Thanks, folks. I figured learning Assembly and working my way up would provide the most "thorough" experience, but I didn't think that would be the most practical. I don't mind so much about cross-platform compatibility; I plan to use some form of Linux as my primary operating system until I'm forced to do otherwise... But that's where the AJAX would come in (web interfaces for the non-Linux users).

I think I'll start with C++, at least for now, and see how things go from there. I'm still quite unfamiliar with the concepts of headers, libraries, classes, objects, et cetera, but I think I can find what I need now that I've got a sort of starting point.

For now, I think I just have one more question: Would I be better off using Ubuntu, Debian, or Slackware as a "main" development workstation OS? (I'm thinking in terms of compatibility and ease-of-use regarding libraries/IDEs/SDKs/et cetera...)

Right now, I'm using Kubuntu, simply because that's what I currently have installed on one of my larger partitions.

zirias 07-27-2010 03:14 PM

Quote:

Originally Posted by computer_freak_8 (Post 4047195)
I think I'll start with C++, at least for now, and see how things go from there. I'm still quite unfamiliar with the concepts of headers, libraries, classes, objects, et cetera, but I think I can find what I need now that I've got a sort of starting point.

I'd still suggest you start with plain ISO C. You'll learn the concept of headers, includes, linking, symbols etc that way. When you move to C++ later, you can learn the concepts used by THAT language for implementing OOP "on top of" C.

Quote:

For now, I think I just have one more question: Would I be better off using Ubuntu, Debian, or Slackware as a "main" development workstation OS? (I'm thinking in terms of compatibility and ease-of-use regarding libraries/IDEs/SDKs/et cetera...)
I'm pretty sure this doesn't matter at all. Use whatever distribution you like best, those mentioned by you all contain anything needed for software development.

jiml8 07-27-2010 04:52 PM

If kubuntu suits you, just use it.

tonyfreeman 07-27-2010 07:01 PM

Quote:

Originally Posted by orgcandman (Post 4047087)
My gut reaction would be to start from the thing you think will be the hardest, and immerse yourself in it.

I agree with this quote. At one point in my life I wanted to learn to program in C and also to make a game. I did this task by immersing myself in libSDL for a few months and poped out the other end with a playable game. The book that helped me through the entire process of programming (not just game programming but Makefiles, etc) is Programming Linux Games. With this background I was then able to create a program for work using glib/gtk/glade. Currently I'm trying to learn python ... I'm using pyGTK and glade. Good luck!

TimothyEBaldwin 07-31-2010 12:10 PM

Quote:

Originally Posted by zirias (Post 4047210)
I'd still suggest you start with plain ISO C. You'll learn the concept of headers, includes, linking, symbols etc that way. When you move to C++ later, you can learn the concepts used by THAT language for implementing OOP "on top of" C.

I disagree, C forces the beginner to learn complex low level ideas (eg. explicit memory management) early, notably it lacks a string type. To quote Bjarne Stroustrup:
Quote:

The common subset of C and C++ is easier to learn than C. There will be less type errors to catch manually (the C++ type system is stricter and more expressive), fewer tricks to learn (C++ allows you to express more things without circumlocution), and better libraries available. The best initial subset of C++ to learn is not "all of C".
For more detail see: http://www.research.att.com/~bs/new_learning.pdf

zirias 07-31-2010 12:14 PM

Stroustrup is just awfully wrong there. You can't write good C++ code without exactly knowing what happens in terms of memory management, you are forced to understand the new and delete operators, the differences between data/bss segments, heap and stack, otherwise you will fail. C teaches you this without added complexity.

If you want to learn something simpler, without having to care about these issues, better start with java or C#.NET. C++ is NOT suitable for this.

bigearsbilly 08-01-2010 06:01 AM

C#.NET ???????????

then the OP would have to work with a crap OS.
this is a linux forum.

Learn C and C++, a scripting language (perl?), and shell scripting.

learn to use the vi editor. (vim)
learn sed, grep, sort, uniq, cat, fmt, join, paste,
make, tar, cpio, find, fold, wc, xargs etc. (unix utilites)

Sergei Steshenko 08-01-2010 06:06 AM

Quote:

Originally Posted by bigearsbilly (Post 4051578)
C#.NET ???????????

then the OP would have to work with a crap OS.
this is a linux forum.
...

In "Programming" one can ask questions regardless of OS - explicitly allowed by the rules. C# is not a bad language.

bigearsbilly 08-01-2010 06:15 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4051584)
C# is not a bad language.

maybe, never tried it, but the OP would still need a crap OS.
unless there's a linux or open source version?

Sergei Steshenko 08-01-2010 06:22 AM

Quote:

Originally Posted by bigearsbilly (Post 4051589)
maybe, never tried it, but the OP would still need a crap OS.
unless there's a linux or open source version?

http://www.mono-project.com/Main_Page


All times are GMT -5. The time now is 03:11 AM.