Coding in Mint?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
User avatar
wutsinterweb
Level 5
Level 5
Posts: 645
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Coding in Mint?

Post by wutsinterweb » Fri Aug 10, 2018 10:43 pm

I'm reading coding books, not very far along yet, with python in Mint. Is there a forum for code snippets and practice stuff and help? I don't want to get too far OT here at the Mint Forum, but don't know where to start.
I'm just a student, your guidance is appreciated.

User avatar
catweazel
Level 17
Level 17
Posts: 7028
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Coding in Mint?

Post by catweazel » Fri Aug 10, 2018 11:12 pm

wutsinterweb wrote:
Fri Aug 10, 2018 10:43 pm
I'm reading coding books, not very far along yet, with python in Mint. Is there a forum for code snippets and practice stuff and help? I don't want to get too far OT here at the Mint Forum, but don't know where to start.
It's not OT. In fact it's a worthy pursuit and a question well worth being asked.

https://www.learnpython.org/
https://www.codecademy.com/learn/learn-python

https://github.com/progrmoiz/python-snippets
https://www.pythonforbeginners.com/code ... urce-code/
http://snippets.readthedocs.io/en/latest/
Caution: Dancing Wu Li Master and Official curmudgeon-in-chief

JosephM
Level 6
Level 6
Posts: 1069
Joined: Sun May 26, 2013 6:25 pm

Re: Coding in Mint?

Post by JosephM » Sat Aug 11, 2018 2:39 am

For Mint specific stuff, there is a scripts and bash forum here. Probably a reasonable place to post questions.
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.

User avatar
wutsinterweb
Level 5
Level 5
Posts: 645
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: Coding in Mint?

Post by wutsinterweb » Sat Aug 11, 2018 2:48 am

My BIL codes in C++ for most of his living. He has been a reason for me to try to learn this. We were trying to think of projects because he says books and videos are fine and all, but actually trying to do real stuff is better. So I am hoping I can find sites with partial code or ideas for things to code for. And also, I'm pretty strongly wanting to learn python first.

So far, in Visual BASIC I made a lottery picker program, it was simple but I did run into a challenge or two. But I don't want to learn on VB, I want to learn on python.
I'm just a student, your guidance is appreciated.

gm10
Level 9
Level 9
Posts: 2672
Joined: Thu Jun 21, 2018 5:11 pm

Re: Coding in Mint?

Post by gm10 » Sat Aug 11, 2018 3:02 am

wutsinterweb wrote:
Sat Aug 11, 2018 2:48 am
My BIL codes in C++ for most of his living. He has been a reason for me to try to learn this. We were trying to think of projects because he says books and videos are fine and all, but actually trying to do real stuff is better. So I am hoping I can find sites with partial code or ideas for things to code for. And also, I'm pretty strongly wanting to learn python first.

So far, in Visual BASIC I made a lottery picker program, it was simple but I did run into a challenge or two. But I don't want to learn on VB, I want to learn on python.
And personally I completely agree with him, although everybody learns differently. I never read a book on coding, but I can write good code in a bunch of languages and passable code in probably most others. Other people may learn better following a book.

If you ever want to code in C++ I'd probably recommend to start with that. It's one of the "harsher" languages to start with but it will teach you very well because of that and give you a much better understanding of what's actually happening with your code than more high level languages like Python can. If you're fine with just Python, on the other hand, that's a very easy language to learn, and it takes care of most of the things for you that you'd have to do by hand in C++. Visual BASIC is irrelevant these days outside of MS Office scripts, don't waste time on that, concentrate on just one language for now or you'll get confused. You can branch out later.

My suggestion would be to set yourself a problem that you want to solve. It can be something simple like displaying a "Hello World" message box. Then set out to try and get it done in the language of your choice, e.g. Python. Look at code samples from others, look at the documentation, or really just get a good book on Python and follow the lessons. Don't get too caught up in libraries at first or you'll just put another layer of abstraction on top of an already high level language.
Last edited by gm10 on Sat Aug 11, 2018 6:31 am, edited 3 times in total.

User avatar
lsemmens
Level 5
Level 5
Posts: 857
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Coding in Mint?

Post by lsemmens » Sat Aug 11, 2018 6:19 am

I learnt by doing. I never got much beyond procedural languages, though. Back in the dim, dark ages, I started out on dBase by modifying a program and reading the manual. When I retired, I had written several programs that were, then, "mission critical". When I retired, I no longer needed those skills, so did not push them as far as I might. I did learn VBA to program M$ Orifice products and make them work as I wanted them. (Word, Excel, Access) Now I am in the Linux camp, I'm back to learning again. Problem is, so far, I have yet (I haven't pushed too hard either) to find a satisfactory language to perform tasks that I need, along with suitable code snippets that I can use, and work from. (My main interest is Database development, and whilst MYSQL seems the logical choice, finding a suitable Front End with code that I can modify and adapt whilst I learn has been an issue.

ANYWAY, good luck in your quest.
Kernel: 4.15.0-24-generic x86_64 bits: 64
Desktop: Cinnamon 3.8.7
Distro: Linux Mint 19 Tara

Laptop T4500 Dualcore 4Gb RAM
Server AMD Phenom 9650 - GEForce 9400GT 6Gb RAM
Out of my mind - please leave a message

User avatar
wutsinterweb
Level 5
Level 5
Posts: 645
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: Coding in Mint?

Post by wutsinterweb » Sat Aug 11, 2018 5:50 pm

I have a very limited income, it's fixed, but I've subscribed to Kindle Unlimited and also purchased or got for free, a number of Udemy classes.

I find the books often have mistakes in them, which in a way, teaches you because you have to catch the writer's grammatical and instructional errors. One way to do that is to read books on a topic in parallel.

There are some super cool tricks in programming that I'm seeing and I'm only just beginning.

The suggested sites are great and will help with what I was asking for. However, anyone with more sites that give "assignments" and Example code as I progress is appreciated!

The Tuples concept threw me for a loop, as why would one want immutable values, but I can see how it could be used to prevent errors in long code runs.
I'm just a student, your guidance is appreciated.

jan-olof
Level 1
Level 1
Posts: 11
Joined: Thu Sep 01, 2011 3:57 am

Re: Coding in Mint?

Post by jan-olof » Sat Aug 18, 2018 3:54 pm

lsemmens wrote:
Sat Aug 11, 2018 6:19 am
My main interest is Database development, and whilst MYSQL seems the logical choice, finding a suitable Front End with code that I can modify and adapt whilst I learn has been an issue.
Found a nice example for beginners at
http://www.fromdual.com/mysql-vala-program-example

As far as I can remember I only changed
Line 13: int to uint
Line 18: mysql.real_connect to (uint) mysql.real_connect
Line 20: ( ! isConnected ) to (isConnected == 0)

and did:
valac --pkg=mysql --Xcc=-lmysqlclient mysql_ex1.vala --Xcc=-I/usr/include/mysql --Xcc=-L/usr/lib/mysql/plugin -v
strip --strip-unneeded mysql_ex1

User avatar
Fred Barclay
Level 12
Level 12
Posts: 4147
Joined: Sat Sep 13, 2014 11:12 am
Location: Bumping around in the bush

Re: Coding in Mint?

Post by Fred Barclay » Sat Aug 18, 2018 10:35 pm

wutsinterweb wrote:
Fri Aug 10, 2018 10:43 pm
Is there a forum for code snippets and practice stuff and help?
There are some helpful, friendly folks on https://www.python-forum.io/ ;)
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein

Hoser Rob
Level 12
Level 12
Posts: 4087
Joined: Sat Dec 15, 2012 8:57 am

Re: Coding in Mint?

Post by Hoser Rob » Sun Aug 19, 2018 9:14 am

I wouldn't recommend C or C++ to start ... they are NOT high level programming languages (more like high level assembly language) and not meant for beginners. Try Python instead. It's a good starting language and I read recently (in IEEE Spectrum I think) it's the #1 used language at the moment.

User avatar
lsemmens
Level 5
Level 5
Posts: 857
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Coding in Mint?

Post by lsemmens » Sun Aug 19, 2018 10:42 pm

jan-olof wrote:
Sat Aug 18, 2018 3:54 pm
lsemmens wrote:
Sat Aug 11, 2018 6:19 am
My main interest is Database development, and whilst MYSQL seems the logical choice, finding a suitable Front End with code that I can modify and adapt whilst I learn has been an issue.
Found a nice example for beginners at
http://www.fromdual.com/mysql-vala-program-example

As far as I can remember I only changed
Line 13: int to uint
Line 18: mysql.real_connect to (uint) mysql.real_connect
Line 20: ( ! isConnected ) to (isConnected == 0)

and did:
valac --pkg=mysql --Xcc=-lmysqlclient mysql_ex1.vala --Xcc=-I/usr/include/mysql --Xcc=-L/usr/lib/mysql/plugin -v
strip --strip-unneeded mysql_ex1
Thanks for that, looks interesting. I found an alternative that I can live with in GCstar. It's written in Python and XML. I was able to push one of their sample programs into shape, so I no longer need to worry about it. If, of course, I were still working for money, then MYSQL and C++ would have been on my learning agenda.
'
Kernel: 4.15.0-24-generic x86_64 bits: 64
Desktop: Cinnamon 3.8.7
Distro: Linux Mint 19 Tara

Laptop T4500 Dualcore 4Gb RAM
Server AMD Phenom 9650 - GEForce 9400GT 6Gb RAM
Out of my mind - please leave a message

gmccormick1
Level 1
Level 1
Posts: 2
Joined: Sat Sep 15, 2018 2:04 pm

Re: Coding in Mint?

Post by gmccormick1 » Sat Sep 15, 2018 4:00 pm

is there a linux manual like the old DOS manual i can get.?

gm10
Level 9
Level 9
Posts: 2672
Joined: Thu Jun 21, 2018 5:11 pm

Re: Coding in Mint?

Post by gm10 » Sat Sep 15, 2018 4:52 pm

gmccormick1 wrote:
Sat Sep 15, 2018 4:00 pm
is there a linux manual like the old DOS manual i can get.?
Welcome to the forums, please don't resurrect old threads with off-topic posts, it's disruptive, bad form and against the rules on any forum on the net. Also for mosts commands you can access their manual via man command. Or check your book store for a book on Linux.

Post Reply

Return to “Other topics”