Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Attach a debugger and see what the worker thread is actually doing.

Adbot
ADBOT LOVES YOU

DoctorTristan
Mar 11, 2006

I would look up into your lifeless eyes and wave, like this. Can you and your associates arrange that for me, Mr. Morden?
Do any of the tasks themselves submit to the ThreadPoolExecutor, or are they waiting on the results of another task? Either of those could cause a deadlock.

QuarkJets
Sep 8, 2008

Hah, it was a Process being created by each thread that wasn't getting closed properly!

PSA if you use multiprocessing clean up your poo poo!!!

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
Just ranting here, but ugh.

I'm working on a very classic 'too many cooks, not enough definition or planning' problem. I've raised this concern already but we're both past the majority of the code being written, as well as in a state where we're now in the death march zone of 'whoops you hosed up and it's too late to fix it'. I'm going to do what I can to address this moving forward, but for now...ugh.

We have a demo next week to important people, so we're in that 'oh gently caress what needs to be fixed' phase. I took on a task to clean up an issue where some state machine implementations are not properly implementing certain behaviors. This failure is because we never defined what these goddamn behaviors should be in the first place, so I'm not surprised people did it wrong, but basically stuff that should be done in state A is done in state B instead. No big deal, I said - I've got a very good handle on the codebase and the state machine at this point so I'll just pop in and move things around.

Ah, gently caress.

This is like an onion of terrible bullshit. Here's how it's been going:
  • Alright, so they're not doing validation on Thing X, so I need to add that.
  • Oh, they don't even pull in the client for that, alright, let me add that in...
  • Oh, the entire group doesn't pull in these clients, let me add that in...
  • Oh, we don't pull in the auth reference from the CLI, let me add that in....and that means I need to update all the tests. Alright, whatever, that's on my list anyway since I'm modifying behavior.
  • Okay so I finally updated the classes to use the appropriate validation logic, let's go look at their tests.
  • Alright they have testing split between run through the cli framework test runner and run directly against their state machine, that's fine. The direct state machine tests are simpler, so those only took a couple hours, let's look at the runner...
  • Fix their patching setup to use the fixtures I made and...oh wow why are you patching local functions.
  • Wow that's a lot of local function patching, let me go look at some of those tests.
  • Oh holy poo poo.

I've found some just...very strange code that I don't know how made it through code review. Here's one such sample:

Python code:
if "".__eq__(value_to_check) or (value_to_check.isspace()):
No type hints anywhere of course, so now that I'm trying to setup patch responses for the clients I'm having to make a lot of side jumps over to the client docs to see what the return objects should be/etc.

Edit: Why stop ranting, while I'm at it. So another fun problem I've been slowly cleaning up is that we have a bunch of instances where people were setting up their entire test cases one at a time. For example:

Python code:
def test_a_thing():
    thing_one = patch('path_to_thing_to_patch').start()
    thing_two = patch('path_to_other_thing_to_patch').start()

    args = ['entrypoint', 'arg1', 'arg2', 'arg3', 'arg4']

    thing_one.blah.return_value = True
    thing_two.bleep.return_value = False

    output = runner_execute(args=args)

    assert output == True

def test_a_thing():
    # yes this part is all *entirely identical except for minor args deviations*
    thing_one = patch('path_to_thing_to_patch').start()
    thing_two = patch('path_to_other_thing_to_patch').start()

    args = ['entrypoint', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5']

    thing_one.blah.return_value = True
    thing_two.bleep.return_value = False

    output = runner_execute(args=args)

    assert output == True
    # bonus fact: people kept forgetting to tear down their patches.
Repeat for like...thirty tests. Nobody is using mark.parametrize, they just copy paste code a bunch of times. I'm working on a feature that will modify our commandline arguments and so that's why I bullied my way into cleaning this poo poo up, about halfway done with the tests overhaul. Oh also everyone's using weird unittest setups and weren't using pytest either.

Falcon2001 fucked around with this message at 03:33 on Aug 26, 2023

QuarkJets
Sep 8, 2008

You need a technical lead OP. Someone who looks at this:

Falcon2001 posted:

Python code:
if "".__eq__(value_to_check) or (value_to_check.isspace()):

and just says "no, do something else, or do something else"

QuarkJets
Sep 8, 2008

What really gets my goat is when a contractor or subcontractor gets other members of their team to approve some bullshit code and things just slide in without an expert getting eyes on it. The people who deal with the contracts aren't willing to put the hammer down so long as the letter of the contract is being followed, and if we ask for a contract to have provisions for things like code quality that isn't the blandest form of "this scanning tool say the code isn't completely garbage, a D is still a passing grade!" we get pushback because that may cost more. Motherfucker, there is no point in even having a contractor if we wind up having to throw away everything that they deliver.

The contractor team I'm working with right now isn't like that thankfully, but I've had to put up with some real bullshit that I'd rather not repeat. It's hard to find good help

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

QuarkJets posted:

You need a technical lead OP. Someone who looks at this:

and just says "no, do something else, or do something else"

We have a lead but he's a career java dev and *way* overworked so he can't spend the time with folks to properly review things.

QuarkJets
Sep 8, 2008

Falcon2001 posted:

We have a lead but he's a career java dev and *way* overworked so he can't spend the time with folks to properly review things.

If your lead is always busy doing other stuff then you don't really have a lead, you have a part-time subject matter expert

Seventh Arrow
Jan 26, 2005

I'm not in a position where I'm coding day and night anymore. Somehow I'm working with the three technologies I hate the most - salesforce, informatica, and oracle. But it's low stress so I don't mind. Anyways, it's nice to be able to use python to "automate the boring stuff", as the saying goes.

Like for example, the senior data analyst had to compare one spreadsheet with object fields from salesforce and one spreadsheet with fields that were approved by the higher-ups, the goal being to match the approved fields against the raw output. She was manually eyeballing everything and to just get 75% of the Account object took her like three weeks. So she handed the task to me and the next day asked about my progress. I told her I was done and she said, "what? you finished Account already?" "no, I finished all the top 10 objects" "what?? howww?!?" "I wrote a python script to do it for me :grin: "

It was an extremely simple script, but still rewarding.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Seventh Arrow posted:

I'm not in a position where I'm coding day and night anymore. Somehow I'm working with the three technologies I hate the most - salesforce, informatica, and oracle. But it's low stress so I don't mind. Anyways, it's nice to be able to use python to "automate the boring stuff", as the saying goes.

Like for example, the senior data analyst had to compare one spreadsheet with object fields from salesforce and one spreadsheet with fields that were approved by the higher-ups, the goal being to match the approved fields against the raw output. She was manually eyeballing everything and to just get 75% of the Account object took her like three weeks. So she handed the task to me and the next day asked about my progress. I told her I was done and she said, "what? you finished Account already?" "no, I finished all the top 10 objects" "what?? howww?!?" "I wrote a python script to do it for me :grin: "

It was an extremely simple script, but still rewarding.

It's hilarious how big the gap exists in some places when it comes to 'easily programmable problems'. A friend of mine is an accountant at a major company and the majority of their workflows are at best running on various excel worksheets people have put together, and as the only person even remotely interested in technology he's basically de-facto in charge of a huge new initiative.

ComradePyro
Oct 6, 2009

Falcon2001 posted:

It's hilarious how big the gap exists in some places when it comes to 'easily programmable problems'. A friend of mine is an accountant at a major company and the majority of their workflows are at best running on various excel worksheets people have put together, and as the only person even remotely interested in technology he's basically de-facto in charge of a huge new initiative.

This is the epitome of a double-edged sword. I negotiated for (and did not get, for unforeseeable reasons unrelated to anything I was doing) a 13k raise my first time hitting this scenario, but it cost me quite a bit of sanity along the way.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord
Being haunted by a Python trivia question. Can anyone think of a good way to write a generator expression (single line, stdlib only) that infinitely provides the previous output compounded with some other value? Reaching out to itertools.accumulate was all I could think of, but I'm wondering if there's something I just haven't ever come across that let's you cache previous value within a generator expression.

code:
number_goes_up = (n for n in itertools.accumulate(itertools.cycle([1, 2, 3])))
number_goes_up.__next__()
1
number_goes_up.__next__()
3
number_goes_up.__next__()
6
number_goes_up.__next__()
7
...

The March Hare fucked around with this message at 04:05 on Aug 31, 2023

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
"I want to use just the python standard library but not the standard library function that literally implements exactly the thing I'm trying to do" seems like a very strange constraint.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Jabor posted:

"I want to use just the python standard library but not the standard library function that literally implements exactly the thing I'm trying to do" seems like a very strange constraint.

I mean it's self imposed in this instance because it seems a little strange to me to give this trivia question expecting someone to know about it. Totally possible this was the intended answer, it's just not sitting right with me.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Essentially what you're doing is a reduction (functools.reduce), but you want to have a generator that outputs every intermediate result instead of just the final one. That's basically the purpose of accumulate - but even if you didn't know about it exactly, it seems reasonable to suppose that a stdlib function to do that would exist?

Would it feel better if you were using the arguments to explicitly specify the initial value and a combining function instead of just using the defaults?

OnceIWasAnOstrich
Jul 22, 2006

I don't feel good for having conceived this:

Python code:
g=(y:=y+1 for x, _ in enumerate(iter(bool, True)) if ((y:=0) if not x else 1))

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Jabor posted:

Essentially what you're doing is a reduction (functools.reduce), but you want to have a generator that outputs every intermediate result instead of just the final one. That's basically the purpose of accumulate - but even if you didn't know about it exactly, it seems reasonable to suppose that a stdlib function to do that would exist?

Would it feel better if you were using the arguments to explicitly specify the initial value and a combining function instead of just using the defaults?

Yeah, in the actual solve I was both supplying a lambda to the func arg (since it wasn't actually a simple addition) and an initial value due to some additional complexity in the prompt, but I didn't provide those in my example since I was mostly curious about the essence of the question: is there some other way to store state within a generator that I'm not aware of?

The thing that isn't sitting well with me is specifically that a company would use this as a screening question (particularly since the job listing mentioned they were open to candidates with no real regard for particular language experience). Though I guess if what you are looking for in a candidate is: "they are familiar w/ itertools" then it makes sense.

Yeah, I hadn't even considered our old friend the walrus. I'd rather use accumulate for this ridiculous trivia question, but good to know you can do that - I guess, lol.

The March Hare fucked around with this message at 17:47 on Aug 31, 2023

Oysters Autobio
Mar 13, 2017
I'm getting a little lost here in the "meta" of developing an internal utility app which is essentially just a wrapper of a few existing packages and some existing 3rd party APIs, along with some customs extensions I write using the built in extensions functions for one of these packages.

Goal of the app is to basically take some existing business-specific workflows that currently only I do in Python on an ad-hoc basis, and turn it into an app. These workflows are very domain specific and they each currently require knowledge about a bunch of org policy, legal stuff etc. to do, but I'm the only one who knows how to do it. Luckily for my managers, im a data analyst who's also been messing around with python and thought hey, why not learn some dev skills and upskill a bit from just being an adhoc script monkey so that my colleagues who might be forced to do the same work don't have to read and materialize poorly documented esoteric business logic and policy that should've been developed into an app years ago.

I could see this app being extended or used down the road by more experienced developers as part of some ETL pipelines or a microservice. But this isn't certain. So my thinking here was that I wanted to keep this mostly in Python and not deal with webservers and HTTP and all that because the current usecase is just for other analysts comfortable in jupyter notebooks to be able to import this as a python package into their workspace to write reports.

After a lot of analysis paralysis I've narrowed down to making this in a "modulith" style because while my initial usecase is just as a python package, I could see myself extending this into a streamlit, plotly dash or flask app to learn a little GUI stuff.

As I understand it, moduliths have you separating your code into separate components but with each of them containing the application, domain/business logic with internal APIs to talk to eachother.

Would something like this be an okay use of a modulith pattern? It's basically my internal compromise between "gently caress it, this is a tool for me and my team and I dont need to gently caress with web frameworks for a working MVP" and "but I'm trying to learn best practices, and that if it works well it could very likely be extended by some real devs who would be stuck with my spaghetti bullshit."

Part of the reason "I care" is because in our codebase I can see that other analysts also tackled these exact same requirements but they never took the time into making it into an actual application, instead it's just a bunch of notebooks and example tutorials. So while I read through them because I'm a nerd, most of my other colleagues aren't interested in python or dev so they want to just focus on the business workflow parts they're being9 asked to do.

Up until now new folks always come to me for help, but so much of my "knowledge" is esoteric recreated archeology from past docs of people who did this but never bothered to actually coherently design these workflows into something easily repeatable. I know others are frustrated too because I'm pretty much the only one who knows this stuff and so when they turn to me I don't really have much to show for it.

FYI, I know I'm overthinking this. This post is more of a way to organize my planning and thoughts, so please ignore if it's word salad.

Oysters Autobio fucked around with this message at 18:48 on Aug 31, 2023

ComradePyro
Oct 6, 2009
small world, I'm also a data analyst that got irritated enough at repetitive work to start writing code. I can only recommend that you embrace the fact that, if you have to return to the code 1+ months after writing it, you are gonna want to hit your past self with a chair. I don't know what I'm doing well enough to give you much more advice than that, but I can vouch for trying to anticipate future work


Worst-case-scenario so far has been spending unnecessary effort that I learned a lot from spending.

ComradePyro fucked around with this message at 19:36 on Aug 31, 2023

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Oysters Autobio posted:

I'm getting a little lost here in the "meta" of developing an internal utility app which is essentially just a wrapper of a few existing packages and some existing 3rd party APIs, along with some customs extensions I write using the built in extensions functions for one of these packages.

Goal of the app is to basically take some existing business-specific workflows that currently only I do in Python on an ad-hoc basis, and turn it into an app. These workflows are very domain specific and they each currently require knowledge about a bunch of org policy, legal stuff etc. to do, but I'm the only one who knows how to do it. Luckily for my managers, im a data analyst who's also been messing around with python and thought hey, why not learn some dev skills and upskill a bit from just being an adhoc script monkey so that my colleagues who might be forced to do the same work don't have to read and materialize poorly documented esoteric business logic and policy that should've been developed into an app years ago.

I could see this app being extended or used down the road by more experienced developers as part of some ETL pipelines or a microservice. But this isn't certain. So my thinking here was that I wanted to keep this mostly in Python and not deal with webservers and HTTP and all that because the current usecase is just for other analysts comfortable in jupyter notebooks to be able to import this as a python package into their workspace to write reports.

After a lot of analysis paralysis I've narrowed down to making this in a "modulith" style because while my initial usecase is just as a python package, I could see myself extending this into a streamlit, plotly dash or flask app to learn a little GUI stuff.

As I understand it, moduliths have you separating your code into separate components but with each of them containing the application, domain/business logic with internal APIs to talk to eachother.

Would something like this be an okay use of a modulith pattern? It's basically my internal compromise between "gently caress it, this is a tool for me and my team and I dont need to gently caress with web frameworks for a working MVP" and "but I'm trying to learn best practices, and that if it works well it could very likely be extended by some real devs who would be stuck with my spaghetti bullshit."

Part of the reason "I care" is because in our codebase I can see that other analysts also tackled these exact same requirements but they never took the time into making it into an actual application, instead it's just a bunch of notebooks and example tutorials. So while I read through them because I'm a nerd, most of my other colleagues aren't interested in python or dev so they want to just focus on the business workflow parts they're being9 asked to do.

Up until now new folks always come to me for help, but so much of my "knowledge" is esoteric recreated archeology from past docs of people who did this but never bothered to actually coherently design these workflows into something easily repeatable. I know others are frustrated too because I'm pretty much the only one who knows this stuff and so when they turn to me I don't really have much to show for it.

FYI, I know I'm overthinking this. This post is more of a way to organize my planning and thoughts, so please ignore if it's word salad.

So a couple notes:

If you're starting off building just a library for import, then the idea of a monolith/modulith/whatever is basically not that important, so don't overthink it. It is equally frustrating to split stuff out to far as it is to have things in a gigantic single file, but for different reasons - so don't start by trying to figure out a million different modules/etc.

The biggest pattern to be aware of if you're planning on moving this to a web service later is to separate things like 'display' from 'logic'; for now you can just have different code setups handle different actions. The major thing would be to separate out things like print statements from what generates the data. This way when you decide to move things around later you've already done the single biggest split you need to do.

Another note - consider what happens if you spend a bunch of time overthinking this, make some highly architected setup, and then...you don't finish the project. All that time and effort didn't produce any output. It's more important to do something useful, especially if you're doing it for work, than it is to do something necessarily perfect. There's a lot of wrong ways to write code, but there's no right way.

What happens if you do it wrong? You rewrite it later. Software that's good enough to be useful must eventually be rewritten or updated, so ensure that the code you write can be understood. This means things like using type hints, writing docstrings, and learning how to leave good comments.

Tip on comments: don't comment what something does. Comment why something does what it does.
Python code:
for list_of_names in list_of_lists:
    # We loop over the list of names <-- not a useful comment.
    for name in list_of_names:
        if name.first == 'John':
             continue
             # We skip anyone named John because our database can't handle it, see LINK_TO_BUG
             # TODO: Remove this once JohnDB problem is solved.
The first comment is useless, the second one is extremely useful. Without it, you'd be mystified by this weird exclusion, but now you have context when you come back to this later on.

Finally: building a purpose built app that does something specifically is very useful, but you should recognize that there's plenty of reasons to have exploratory scripts/etc as well; the app is going to force you to cover a ton of edge cases that you might be able to skim over.

ComradePyro posted:

small world, I'm also a data analyst that got irritated enough at repetitive work to start writing code. I can only recommend that you embrace the fact that, if you have to return to the code 1+ months after writing it, you are gonna want to hit your past self with a chair. I don't know what I'm doing well enough to give you much more advice than that, but I can vouch for trying to anticipate future work


Worst-case-scenario so far has been spending unnecessary effort that I learned a lot from spending.

Good news everyone! This never goes away...or at least not until you get better at docstrings/type hints/comments. But also treasure these moments because they're one of the best ways to learn.

QuarkJets
Sep 8, 2008

Use typehints and good variable names and function names. Write simple functions. Write unit tests and then use them routinely.

StumblyWumbly
Sep 12, 2007

Batmanticore!
Just today, I put in the most basic rear end updates into some code I wrote like a year ago. The file already had the most basic testing possible in it, and I saw it and said "sure, I guess I'll check my work" and found like 3 errors.
Because I wrote those tests a year ago, I was able to finish half a bottle of wine before my long weekend started.
So proud of who I was, that man is my hero

CarForumPoster
Jun 26, 2013

⚡POWER⚡

StumblyWumbly posted:

Just today, I put in the most basic rear end updates into some code I wrote like a year ago. The file already had the most basic testing possible in it, and I saw it and said "sure, I guess I'll check my work" and found like 3 errors.
Because I wrote those tests a year ago, I was able to finish half a bottle of wine before my long weekend started.
So proud of who I was, that man is my hero

At what point in the coding journey do you transition from "there no coder worse than me, 6 months ago" to "old me was my hero"

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

CarForumPoster posted:

At what point in the coding journey do you transition from "there no coder worse than me, 6 months ago" to "old me was my hero"

This implies a one way path when in reality Previous Me is the best and worst of all possible futures; a superstate composed upon itself and containing all dread and terror and wonder at once. But mostly, he's just a jerk.

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Falcon2001 posted:

This implies a one way path when in reality Previous Me is the best and worst of all possible futures; a superstate composed upon itself and containing all dread and terror and wonder at once. But mostly, he's just a jerk.

Schrodinger's code

its only once the code is deployed to prod do you know whether previous you is good or bad

Chin Strap
Nov 24, 2002

I failed my TFLC Toxx, but I no longer need a double chin strap :buddy:
Pillbug
It's bad.

Generic Monk
Oct 31, 2011

I'm trying to make a simple blog web app using flask and sqlalchemy, following this tutorial:

https://www.youtube.com/watch?v=CSHx6eCkmv0

I can register users fine and their details get added to the database and now I'm trying to log users in (this is at around 28:00 in the video). I've done everything as the tutorial says from what I can see, but when I try to log in, nothing happens. If the login credentials are present and in the right format (the validation of which DOES work because I get messages if they're absent/in the wrong format) it should query the database for the user, and if the credentials are correct redirect to the homepage and flash a message if they're incorrect. Neither of these things happens and it just loads the login page again.

This is my login route:
Python code:
@app.route("/login", methods=["GET", "POST"])
def login():
    form = LoginForm()
    if form.validate_on_submit():
        user = AppUser.query.filter_by(email=form.email.data).first()
        # Check user exists and password matches hashed password.
        if user and bcrypt.check_password_hash(user.password, form.password.data):
            login_user(user, remember=form.remember.data)
            return redirect(url_for("home"))
        else:
            flash(
                message="Invalid login credentials!",
                category="danger",
            )
    return render_template("login.html", title="Login", form=form)
My login form class:
Python code:
class LoginForm(FlaskForm):
    username = StringField(
        "Username", validators=[DataRequired(), Length(min=2, max=20)]
    )
    email = StringField(label="Email", validators=[DataRequired(), Email()])
    password = PasswordField(label="Password", validators=[DataRequired()])
    remember = BooleanField(label="Remember Me")
    submit = SubmitField(label="Login")
And my user model:

Python code:
@login_manager.user_loader
def load_user(user_id):
    return AppUser.query.get(int(user_id))

class AppUser(db.Model, UserMixin):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(20), unique=True, nullable=False)
    email = db.Column(db.String(120), unique=True, nullable=False)
    image_file = db.Column(db.String(20), nullable=False, default="default.jpg")
    password = db.Column(db.String(60), nullable=False)
    posts = db.relationship("Post", backref="author", lazy=True)

    def __repr__(self):
        return f"AppUser('{self.username}', '{self.email}', '{self.image_file}')"
The database connection definitely works - I can query it from the REPL and the register form checks for already-existing users just fine. What am I doing wrong? The tutorial is slightly out of date so maybe I'm missing something. It didn't include initialising the login manager with init_app(app) which other sites recommend - I've added that but still no dice.

Generic Monk fucked around with this message at 18:13 on Sep 2, 2023

QuarkJets
Sep 8, 2008

It's hard to diagnose what's going on without a complete example :shrug:

Post a link to your git repository

a dingus
Mar 22, 2008

Rhetorical questions only
Fun Shoe
What does login_user() look like?

Generic Monk
Oct 31, 2011

QuarkJets posted:

It's hard to diagnose what's going on without a complete example :shrug:

Post a link to your git repository

Good point

https://github.com/poisonwomb/flaskblog

a dingus posted:

What does login_user() look like?


I think that's provided by flask_login

Generic Monk fucked around with this message at 20:12 on Sep 2, 2023

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Generic Monk posted:

Good point

https://github.com/poisonwomb/flaskblog

I think that's provided by flask_login

lmao @ being a dude with the github name "poison womb"

Chillmatic
Jul 25, 2003

always seeking to survive and flourish

CarForumPoster posted:

lmao @ being a dude with the github name "poison womb"

That's amazing idk what you're talkin about

Generic Monk
Oct 31, 2011

CarForumPoster posted:

lmao @ being a dude with the github name "poison womb"

i had to think of a username for something like 10 years ago and the only thing in my mind at that point was loss.jpg. obv i have a different name whenever i’ve used it for work!!!!

Generic Monk fucked around with this message at 21:35 on Sep 2, 2023

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Chillmatic posted:

That's amazing idk what you're talkin about

Im talking about how good of a github user name it is

a lot to very

Chillmatic
Jul 25, 2003

always seeking to survive and flourish

CarForumPoster posted:

Im talking about how good of a github user name it is

a lot to very

Nice


btw, everyone...python sucks

is that truthy or falsy

spiritual bypass
Feb 19, 2008

Grimey Drawer
It's both. Bad language for teams of juniors who can't resist doing dumb poo poo, fine for everyone else

QuarkJets
Sep 8, 2008

Python is bad, but better than everything else

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

QuarkJets posted:

Python is bad, but better than everything else

Empty quoting this

WHERE MY HAT IS AT
Jan 7, 2011
Python is bad because its type system is based on pinkie promises and even mypy cannot save you. At least at my company where once a week we have some dumb sentry issue because someone has done
code:
blah = foo.bar.baz 
Without realizing that bar is nullable and generating a “type None has no attribute baz” exception.

Adbot
ADBOT LOVES YOU

Zugzwang
Jan 2, 2005

You have a kind of sick desperation in your laugh.


Ramrod XTreme
Yeah I really wish Python had something like "type hinting is purely optional, but they will be enforced if you specify them." As opposed to "the Python interpreter does not give the slightest gently caress about type hints."

Julia has the former as part of its multiple dispatch model, but sadly, adoption of Julia continues to be pretty underwhelming.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply