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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
wutsinterweb
Level 6
Level 6
Posts: 1042
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Coding in Mint?

Post by wutsinterweb »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Coding in Mint?

Post by catweazel »

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/
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
JosephM
Level 6
Level 6
Posts: 1463
Joined: Sun May 26, 2013 6:25 pm

Re: Coding in Mint?

Post by JosephM »

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 6
Level 6
Posts: 1042
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: Coding in Mint?

Post by wutsinterweb »

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've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
gm10

Re: Coding in Mint?

Post by gm10 »

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 11
Level 11
Posts: 3949
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Coding in Mint?

Post by lsemmens »

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.
Fully mint Household
Out of my mind - please leave a message
User avatar
wutsinterweb
Level 6
Level 6
Posts: 1042
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: Coding in Mint?

Post by wutsinterweb »

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've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
jan-olof
Level 1
Level 1
Posts: 11
Joined: Thu Sep 01, 2011 3:57 am

Re: Coding in Mint?

Post by jan-olof »

lsemmens wrote: Sat Aug 11, 2018 6:19 amMy 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: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: Coding in Mint?

Post by Fred Barclay »

wutsinterweb wrote: Fri Aug 10, 2018 10:43 pmIs 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 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Coding in Mint?

Post by Hoser Rob »

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.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
User avatar
lsemmens
Level 11
Level 11
Posts: 3949
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: Coding in Mint?

Post by lsemmens »

jan-olof wrote: Sat Aug 18, 2018 3:54 pm
lsemmens wrote: Sat Aug 11, 2018 6:19 amMy 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.
'
Fully mint Household
Out of my mind - please leave a message
gmccormick1

Re: Coding in Mint?

Post by gmccormick1 »

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

Re: Coding in Mint?

Post by gm10 »

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.
Locked

Return to “Other topics”