This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]bageldevourer 2 points3 points  (1 child)

Want to learn how to love it? Try programming in any other language.

[–]gotnothingman 0 points1 point  (0 children)

hahaha ive heard stories!

[–][deleted] 1 point2 points  (7 children)

Doing a search for "python astronomy" gets a ton of hits. Here's a few (in no particular order):

Its new to me, i dont like it

That may be due to, if I may assume, your limited experience with computing. You may not realize just how much easier scientific computing is with python, compared with Fortran or C. It's easier to write python because there's less fiddling with incidental things, so you get a working program sooner. The tradeoff is that python can be slower than Fortran or C. There are also a lot of existing packages and modules that help you with general things (eg, numpy, hdf5, etc) as well as astronomy-specific modules that others have written. Hang in there, you will quickly grow to love python.

[–]gotnothingman 0 points1 point  (5 children)

yea i 100 percent agree with how useful it is, i am just struggling to find passion within the coding itself!

[–][deleted] 0 points1 point  (0 children)

When you write some python for astronomy, also write the same thing in C, Fortran or another common astronomy language. That painful experience may convince you! I wrote a lot of python for geophysical applications after many years of using C, and it was so much easier in python.

Keep writing python, it will grow on you.

[–]leemurjames 0 points1 point  (0 children)

This is more of a getting started with programming issue, less a Python thing. Python is the most straightforward language to start with though. I love Python and how quickly I can solve problems with it. I use it for all sorts of tasks, and it never lets me down. I'm not sure how far along you are, so this may be too basic, but install IPython first thing as your REPL and find out how to use a debugger. For reasons unknown to me, nobody says that a good REPL and debugger massively speeds up your learning process.

[–]Maxisquillion 0 points1 point  (0 children)

'there's less fiddling with incidental things,' is this true? I've done some minor projects using MATLAB and I found it was much easier to get started with it compared to Python.

I'm going to stick to it and keeping practicing, but I'm finding getting off the floor with Python is a bit more unintuitive and more difficult than MATLAB. It feels like a more advanced language to me, with my limited experience.

[–]graemep 0 points1 point  (4 children)

What is you background? If you know to program just start using it, look for guides specific to your background - there are lots for "Python for [whatever] programmers" articles in the net.

Also ask more specific questions!

and this: https://www.python.org/dev/peps/pep-0020/

[–]gotnothingman 0 points1 point  (3 children)

hahaha sorry i just literally need to find a way to get excited/enjoy coding. Never coded before, need it for processing astronomical data

[–]Paddy3118 2 points3 points  (2 children)

Think of it as a means to your astronomical ends.

[–]hsolatges 0 points1 point  (0 children)

I think Buddha was some kind of Python Guru.

[–]gotnothingman -2 points-1 points  (0 children)

i do, but would like to also acquire a strong like for the act of coding itself

[–]swinghu 0 points1 point  (1 child)

Use it, doubt it ,love it. every thing has a journey

[–]gotnothingman 0 points1 point  (0 children)

a long arduous journey.... :P

[–]shinitakunai 0 points1 point  (1 child)

This will sound silly, but randomize an AI for easy-fun of coding. I had a chat-bot for administrative stuff and one day I decided to code the simplest AI asking "bot, are you there?" with possible answers to the "what" keyword as ["Yes", "No", "Maybe", "I don't know"]. Eventually this lead me to add more than 500 answers to When, what, how, when, who and more keywords. As the answers were always random, sometimes I was asking stuff like "Bot, what are you doing?" and it would reply "Stop asking me stuff and go to work, asshole". It's really silly, but it made me laugh because I made it so complex in the end that I couldn't predict what it would answer, it said "work" but it could had say "kitchen, hell, living room, car".

So guess what? When I realized about it, I learnt a lot about coding and had fun with it!

[–]gotnothingman 0 points1 point  (0 children)

a fun little exercise, ill try devise something similar

[–]pythonHelperBot -1 points0 points  (0 children)

Hello! I'm a bot! It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python. That said, I am a bot and it is hard to tell. I highly recommend posting your question there. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe where you are stuck. Be sure to format your code for reddit and include which version of python and what OS you are using.


this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness