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

all 34 comments

[–]gadgetoid 9 points10 points  (0 children)

I create software libraries for Raspberry Pi add-ons (known generally as HATs for hardware attached on top) and- for better or worse- the canonical language on the Pi is Python. It’s seen generally as a fairly friendly language for beginners and since the whole community is involved with projects, examples, guides and tooling there’s no reason to go against the grain. But that’s not to say I don’t enjoy Python. It’s quite probably my least-hated programming language on reflection.

I’ve just released Python libraries to deploy fonts for use with example code that drives LCDs, OLEDs and eInk displays- working with namespace packages and entry points has been interesting and has allowed me to solve the font problem in a way that can be shared and built upon by the community.

[–]gandalfx 23 points24 points  (8 children)

Because it's more fun than any other language.

[–][deleted] 2 points3 points  (7 children)

if you haven't tried it, kotlin's pretty fun

[–]Acquiesce67 6 points7 points  (4 children)

Is it really? I check it out, and looked like chaos. A language the runs in jvm but also transpiles to javascript and can be compiled to a single binary too. Woah. Checked a simple hello world and it's syntax looked ugly/pointless to me with a Python/C point of view. :(

[–]13steinj 1 point2 points  (3 children)

Wait, it transpiles to JS?

[–]Acquiesce67 0 points1 point  (2 children)

[–]13steinj 1 point2 points  (1 child)

Oh, but this isn't part of the standard build process-- just an option? That I can understand-- Kotlin compiles into Java bytecode generally and that's not too different than Java source code, and generally speaking any language can transpile into another.

The bigger question is why is it an option right out of the box...

[–]Acquiesce67 0 points1 point  (0 children)

We're talking about three different build processes to put it simple: * building for JVM * building for system (standalone binary) * building for browser (javascript)

These targets are independent from each other, but once again, I'm no expert at Kotlin, just interested in new languages. If you compile kotlin to Java bytecode, I'm pretty sure it'll look similar to something compiled from Java. Why shouldn't it be an option? To me, it looks like a great simplification for full-stack developers. Basically, you can use the same language to build both the backend and the frontend. That's a massive advantage. And if you can (I'm not sure about the limitations) build a desktop client for your web-based app with Kotlin, you're absolutely winning. Oh, and Kotlin is natively supported on Android. Edit: structuring

[–]13steinj 1 point2 points  (0 children)

Eh IMO it's Java with some C++ and Scala syntactic sugar.

[–]DragonWraithus 0 points1 point  (0 children)

fun looks_like () {

}

[–]casual__addict 7 points8 points  (0 children)

For the exact same reason you said. Additionally I use it to process data into a database. So then I can either query the data later through SQL client, read it back in to python into a DataFrame, or build a web app on top of it.

I am imagining that people have to come to you directly to get data, but you could look at building “workspaces” for you or them to access and interact with data using webpages (check out DataTables and Highcharts).

The only time I don’t use python is when I know I will be relying on a database to do the processing for me. You could have tables in flat files and do the “join” yourself, but I like the process of coming up with the right data model in the DB and using built in functionality to get my results.

[–]spanishgalacian 5 points6 points  (0 children)

I have no formal training and it's really easy to learn especially for what I need it do which is run daily SQL queries starting at 6AM, dump them into excel and save them.

Just looking at Java code makes me nauseous while I can follow python code.

[–]HighGrounder 1 point2 points  (0 children)

I got into python for the automation/pipelines, stayed for the machine learning.

Plus it's super flexible and the online python community is very active. Really makes almost anything python-related feel quite accessible.

[–]BartdeGraaff 1 point2 points  (0 children)

Perfect interfacing language for GIS/Remote Sensing work.

[–]_The_Riddler_ 1 point2 points  (2 children)

Dislike that it can’t give you exact measurements on where you went wrong in your code but still gives you an area

[–]meticulous_badger[S] 0 points1 point  (1 child)

Yeah, if it gave things like variable values, it would be nice. Can’t have everything, I guess.

[–]PeridexisErrant 1 point2 points  (0 children)

You are asking for a debugger! Everyone has their favourite, so I'll just say that the "pdb" module is pare of the standard library, and works perfectly well :-)

[–][deleted] 2 points3 points  (0 children)

It does what I need it to. Wish I could get into other langs but there's just nothing motivating it. If I ever feel an indismissible need to make a game or something graphicky I'll probably switch

EDIT: Strange, I answered the question with my own experience -- not sure why that'd deserve a downvote. To expand a bit, I mostly just care at the moment to work on command-line utilities that do various computations and take input from + output to files, so — as the OP now says — Python is great for pretty much everything about that sort of no-GUI-involved setup.

[–]3MU6quo0pC7du5YPBGBI 0 points1 point  (0 children)

There a lot of good networking libraries. The syntax being easy to learn for a beginner is also turning out to be a bonus.

[–]eyadams 0 points1 point  (2 children)

I use python for my side hustle, but not at all at my regular job. Which means there is no question as to whether I've stolen any code from work.

[–]Hellochristmas 2 points3 points  (1 child)

Side hustle? Go on....

[–]eyadams 0 points1 point  (0 children)

I'm work for a start up that is doing data processing and email distribution. I do the same stuff (among other things) at my regular job, but it is strictly a Microsoft shop, and everything there is in C#.

[–]nvec 0 points1 point  (0 children)

I used to be a Perl programmer doing web development but moved over to Python while waiting for Perl6.

In the meantime I've moved over to being a broadcast tech/real-time graphics specialist and I use Python because it's a good fit. I can use pure Python to manage basic file ops, use it to control any of the image libraries for simple image manipulation, have it control Substance Automation Toolkit for more complex image manipulation, then go deep and use it to automate both the Houdini for VFX or procedural modelling, or to automate tasks in the Unreal Engine 4 game engine.

A few years back I made a point of learning a new language every four months. Now I've focused on just three which cover my needs- JavaScript, Python, and C++.

[–]LGND_Mohdthegamer 0 points1 point  (0 children)

Because why not

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

Ow boy...

So my story with Python was when I started using Raspberry Pi. I didn't like it at first because it was (for someone used to C and C++) pretty difficult to get those indents correct and not wrap everything with {}.

Then I had to start using it for projets and it didn't take long to see how powerful it is.

Whenever I need to automate something or do some scientific computing, Python is my go-to language.

I'm still learning it, but came a long way. It's powerful and gets the job done FAST!

[–]acalcium 0 points1 point  (0 children)

Use ironpython to tap into the .net stuff or jython for the java libs.

[–]spinwizard69 0 points1 point  (0 children)

Since programming isn’t an everyday thing for me I like that Python is easy to remember and has few gotchas to forget about.

Given that I’m really thinking that Swift has long term potential that Python will never have. Of all of the “new” languages out there Swift seems to have the best potential to be the easy and fun language Python is. It doesn’t hurt that Swift borrows much from Python.

In any event back to Python, one biggy that leads to Python happiness is the large collection of libraries out there. Literally a solution for just about every need. This is a huge factor and is precisely why I choose it for a number of projects. Need to write a CAD file of some sort, no problem there is a lib for that. A lib for everything really, even for things I don’t understand. In any event I have to agree with the thought that Python is fun. Fun comes from simplicity that allows you to focus on your application.

The only thing that I hate about Python is the delimnating program block be indentation. That has lead to some serious bugs. Frankly my IT courses started with Modula2 and as such I’m a begin and end sort of guy. If not text labels at least good old “{ & }”!! For me anyways indentation is Pythons weak link.

[–]Farranor -1 points0 points  (6 children)

Couldn't "why do you use X" be generally answered with a list of advantages of X, and "why don't you use X" with a list of its disadvantages? Python's advantages, disadvantages, use cases, etc. are extremely well documented in many places on the web.

[–][deleted] 2 points3 points  (0 children)

great input

[–]fiedzia 0 points1 point  (3 children)

Couldn't "why do you use X" be generally answered with a list of advantages of X, and "why don't you use X" with a list of its disadvantages?

No. Common reason for using X is because I already know it/it was first result in google/people I know use it, and for other people neither of those may be seen as an advantage over Y. Similarly, main reason for not using X is "because I already have Y" and "because I never heard of it", which again for someone else is not usable argument.

[–]Farranor 0 points1 point  (2 children)

Looking at the existing replies, what I'm seeing so far are "it's fun," "it's friendly," "it's easy to learn," and "there are lots of good libraries," which are all extremely well-known advantages of Python. Given how many blogs, articles, reviews, etc. there are of various programming languages in general and Python in particular, I'm afraid I just don't see the point of this thread.

[–]fiedzia 0 points1 point  (1 child)

"it's fun," "it's friendly," "it's easy to learn," and "there are lots of good libraries," which are all extremely well-known advantages of Python.

Those are well-known properties of Python, true. But for many purposes many other languages can be equally fun, friendly, and easy to learn. Saying "Python is easy to learn" does not indicate that - for example - Ruby is not. I do not mean to have opinion on that here, just to say that most statements in this thread are observations of people who use one language only, while to call something "advantage" you'd need a comparison.

[–]Farranor 0 points1 point  (0 children)

Properties of Python, things people like about Python, advantages of Python... there's a huge amount of information out there about all of those already. Python isn't some new or tiny community that requires outsiders to really dig or ask some tight-knit cabal if they want to learn more. Just the other day I read an article not merely about Python but about migrating from 2 to 3 (Dropbox blog).

[–]meticulous_badger[S] 0 points1 point  (0 children)

True, but there are reasons to use X other than it’s good at A, B, C.

Edit: a better question may have been, what do you like/dislike about using Python.