LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Any Recommendations On Which Code To Start learning? (https://www.linuxquestions.org/questions/general-10/any-recommendations-on-which-code-to-start-learning-4175619037/)

Sotoprior 12-05-2017 05:52 PM

Any Recommendations On Which Code To Start learning?
 
I had been thinking a bit about what I'm doing these days, and I feel like dipping my Toes a bit into the waters of Coding, but I don't know where to start. I do feel that I may need to understand a bit of coding for Linux as well, for further Certifications in Linux+ to what I understand so far. Problem really stems from my preferred interest in coding for Windows, as I would really just like to code in for games or small utilities for the desktop. Personally I think understanding C++ may satisfy both needs, but I can't say for certain.

svetlanarosemond 12-05-2017 06:17 PM

Quote:

Originally Posted by Sotoprior (Post 5789391)
I had been thinking a bit about what I'm doing these days, and I feel like dipping my Toes a bit into the waters of Coding, but I don't know where to start. I do feel that I may need to understand a bit of coding for Linux as well, for further Certifications in Linux+ to what I understand so far. Problem really stems from my preferred interest in coding for Windows, as I would really just like to code in for games or small utilities for the desktop. Personally I think understanding C++ may satisfy both needs, but I can't say for certain.

From my personal experience, if you want to work with Linux, learn Bash first, then Python. I came from a background of C#/Java and after learning Python which I regrettable put off for a while, I have no intention of going back to C# or Java. There is no need for me to do so. Python has everything I need. I'm currently writing a text adventure game, and the simplicity to read in from text files with a few lines of code is awesome, compared to Java, I don't want to think about it.

C++ is good, but from what I've read about, not an beginner level language. Python is easy to get into, and the documentation is pretty good as well.

dugan 12-05-2017 06:23 PM

Quote:

Originally Posted by svetlanarosemond (Post 5789399)
From my personal experience, if you want to work with Linux, learn Bash first, then Python.

This.

Your project has only one human resource, so you need to make tech choices that optimize for turnaround speed.

sundialsvcs 12-05-2017 07:25 PM

I think that I would begin by surfing GitHub or some similar site where existing software projects can be found in actively-maintained source-code form. LOOK at the collection of files which make up the project.

Then, find a different programming language, and once again just LOOK.

Mill J 12-05-2017 11:05 PM

You can do almost anything in almost any language, I use c/c++, and it works great for my cross-platform development, however it might not be for you.

sundialsvcs is right, first figure out exactly what you want to do with your code, than check out all the different languages(they all have a different selling points)

Let us know what you come up with :) it can be very rewarding!

rtmistler 12-06-2017 08:28 AM

I agree with the advice from other replies, however I'm a bit confused with your question.

You mention understanding coding for Linux and refer to what you understand so far. So I do wonder what your experience is.

Then you cite a problem really stemming from your preferred interested in coding for Windows and say you would like to code games or small utilities for the desktop.

Yes, C++ works for both, and there are various frameworks to consider, but I feel they are platform specific. Meanwhile there are platform diverse languages and development forms.

Best advice I really can say is to "make it your job". It's my job and I've learned out of necessity. The first thing you write it not going to be well done, or huge in scope. If you set out to write the best code ever, the best application ever, day number one, you'll likely not achieve this and become frustrated. Meanwhile seeing others' examples, collaborating with others, and working to produce a result someone tests and cares about, helps.

dugan 12-06-2017 12:19 PM

Quote:

Originally Posted by rtmistler (Post 5789622)
Yes, C++ works for both, and there are various frameworks to consider, but I feel they are platform specific.

Qt is perfectly cross-platform and also best done in C++ ...

Sotoprior 12-06-2017 04:42 PM

Quote:

Originally Posted by dugan (Post 5789695)
Qt is perfectly cross-platform and also best done in C++ ...

So QT is an adapted form of C++? I mean I appreciate and have had a feeling of doing some starter code learning with python. The thing with me is I simply don't want just to learn a particular subset of coding just to fill in the already set blanks for a specific line of code, I wish to somehow learn to develop my own separate lines myself. Something I wouldn't just come to learn staring at already written out blocks of coding. Mostly what matters to me is understanding the placement and usage of key titles within a code block, and where I can get away with typing in even more subsets within the brackets of the already set first line.

Also if anyone could suggest a "program" in (in terms of my first preference) windows, or cross-platform testing engine to start testing out and compile the completed list of coding, I'd also greatly appreciate it thanks.

But yeah, from what I hear, it sounds like Python is a good place to start off then. That's awesome.

vmccord 12-07-2017 05:09 PM

I concur with all the Python people. It's a great language to learn coding form because it's practically as easy as bash to try, try, and try again, but then expands like magic into an actual object oriented language.

gnashley 12-08-2017 04:56 AM

QT is *written in* C++. Qt is not a language, it's a library of graphic routines, comparable to GTK, FLTK, etc.
C++ and C# (C-Sharp) are most often used for windows, but C++ is widely used for *nix applications -especially when they are large or meant to have a QT-based GUI component. Linux, the kernel, is written in C and the first few hundred command-line utilities to create/boot even a small system -are all written in C.

Under linux, the shell /bin/sh is always present and comprises a limited amount programability. But, it is essential on every system as it provides the standard 'shell' environment for executing other commands. Much of what happens 'under the hood' of linux -especially during startup, is done using shell scripts. Scripts are like DOS *.bat files. The shell interprets scripts as it reads them, line-by-line.

Other common script interpreters under *nix include: python, perl, ruby, lua and tcl. Some of these have a way of binding in GUI libraries so that GUI's can also be built using them. 'awk' is a command-line tool often used in shell scripts, but it has its' own programming language and is also used to process scripts written in awk language.
All these languages have their strengths and weaknesses. Choose the language according to your purposes.

Since the shell is so widely used, anyone who gets very far under the hood of linux will end up learning it at least somewhat. The most commonly used shell is actually 'bash', but there are others like zsh, ksh93, dash and ash. The one the kernel requires is the one named /bin/sh - 'sh'. Usually this is a symbolic link to /bin/bash, but there are notable differences like debian/ubuntu which 'dash' as /bin/sh, and very small systems which may use a really tiny, primitive shell.


All times are GMT -5. The time now is 02:53 AM.