There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

tux0r , in Yup...i can confirm that
@tux0r@feddit.org avatar

For all of those, Lisp is the more logical choice. Plus, whitespace as syntax is the worst possible design decision.

BombOmOm ,
@BombOmOm@lemmy.world avatar

Ok, but what if an entire programming language is made of whitespace?

en.wikipedia.org/…/Whitespace_(programming_langua…

tux0r ,
@tux0r@feddit.org avatar

Still easier to refactor than Python. ;-)

Scoopta ,
@Scoopta@programming.dev avatar

That syntax decision is single handedly why I avoid python if possible

MonkderVierte ,

For me it’s dependency hell. Almost as bad as npm.

Scoopta ,
@Scoopta@programming.dev avatar

…is it truly that bad? npm is the reason I don’t even install software based on node on my machines… python doesn’t seem nearly as bad by comparison? (I run it, just don’t like to write it) Maybe it’s worse than I realize

MonkderVierte , (edited )

Not as bad. But if a bigger tool like Paperplane doesn’t run after an update, it’s likely some changed dependency in python.

calcopiritus ,

I haven’t used npm. But pip is horrible. Some times I’ve used a well-known library that only works on linux, but there is no mention of it whatsoever, and it installs without problem. The error only happens at run-time (not even when importing!) and says nothing about platform-dependency. I only learned that it was a linux-only library because I happened to try running it on a Linux machine to see if it worked.

Many times you have to set up your environment a specific way (environment variables, PATH, install dependencies outside of pip) for it to work, and there’s no mention of it anywhere. Sometimes you install the library with pip, sometimes with apt, and there is no way to know which one. And sometimes the library is both in apt and pip, but the pip one does nothing.

Furthermore, good luck importing a library. You might have installed it with “pip install my-library” but to import it you have to do “import MyAwesomeLibrary3”. And pip won’t tell you about that.

Scoopta ,
@Scoopta@programming.dev avatar

Wow that sounds like a headache, even though I’ve avoided python for other reasons that sounds like an additional reason to do so. Also the reason I avoid npm isn’t for a technical reason like you’ve outlined here. It’s because even installing npm requires me to install an entire other Linux distros worth of packages. Why do I need to install like 100+ new packages just to use a freaking package manager???

MajorHavoc , (edited )

Lisp is the more logical choice.

Relevant XKCD. Python has replaced Perl, but things have otherwise changed quite little.

tux0r ,
@tux0r@feddit.org avatar

I still write more Perl than Python these days.

MajorHavoc ,

I’m kinda jealous. I don’t miss maintaining production Perl code, but Perl was more fun to code in.

tux0r ,
@tux0r@feddit.org avatar

Feel free, it’s still out there!

vk6flab , (edited )
@vk6flab@lemmy.radio avatar

Perl is the only language that looks just as incomprehensible before and after a rot13 transformation.

Python on the other hand is the only language that will cause your application to stop working because you mixed up tabs and spaces, even though it looks perfectly fine on your scr.

And lisp is hard to say if you have one.

Edit: aa -> after a

MajorHavoc ,

Perl is the only language that looks just as incomprehensible before and aa rot13 transformation.

Lol. You’re not wrong.

Overspark ,

It is absolutely fine to mix tabs and spaces in Python, as long as you are consistent about it. It’s not recommended though, as it’s easy to mess up if you’re not paying attention. Most IDE’s will convert tabs to spaces anyway so it’s a bit of a non-issue.

cfi ,

Perl is the only language that looks just as incomprehensible before and after a rot13 transformation.

APL would like a word, though I imagine ROT13 on APL source code might actually be horrific.

Aatube ,

I mean, their goal was readability, and at least they're trying new things.

joyjoy , (edited )

You say that, then use a language that allows you to do this (it’s not lisp)


<span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">(foo);
</span><span style="color:#323232;">{
</span><span style="color:#323232;">  bar();
</span><span style="color:#323232;">}
</span>
tux0r , (edited )
@tux0r@feddit.org avatar

You can make embarrassing mistakes in virtually any programming language that’s not too esoteric.

When I still used Python for prototyping (today, I usually use Go for that), it happened much too often that I did this:


<span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">foo:
</span><span style="color:#323232;">    bar()
</span><span style="color:#323232;">   foobar() </span><span style="font-style:italic;color:#969896;"># syntax error
</span>

In Lisp, however, both errors are much harder to make (not even considering GNU Emacs’s superb auto-indentation - which is what most Lispers use these days, as far as I know):


<span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">when</span><span style="color:#323232;"> foo)  </span><span style="font-style:italic;color:#969896;">;; <- obvious!
</span><span style="color:#323232;">    (bar)</span><span style="background-color:#f5f5f5;font-weight:bold;color:#b52a1d;">)</span><span style="color:#323232;">
</span>

<span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">when</span><span style="color:#323232;"> foo
</span><span style="color:#323232;">    (bar)
</span><span style="color:#323232;">          (foobar)  </span><span style="font-style:italic;color:#969896;">;; <- still valid
</span><span style="color:#323232;">(quux))  </span><span style="font-style:italic;color:#969896;">;; <- also still valid
</span>
TheHarpyEagle ,

I’ve had very few issues with whitespace in my decade or so of using python, especially since git and IDEs do a lot to standardize it. I’m a Python simp, tho

Bougie_Birdie , in Yup...i can confirm that
@Bougie_Birdie@lemmy.blahaj.zone avatar

A hammer is beginner friendly, but learning to use a hammer doesn’t necessarily mean you’re ready to build a house with it.

calcopiritus , in Yup...i can confirm that

The mistake was choosing a language, and afterwards searching for a use to the language you just learned.

AdNecrias ,

Among all of them at least python is the choice generically people learn when they don’t want to learn programming, just want to program stuff as a helper tool to manage data. For those, python is just fine and the learning material around is tailored to for that.

That’s how you trick people into programming. You then see people making scripts that take days to run, but it’s fine, they’re only going to use it twice and are busy enough to be able to wait

PapstJL4U ,
@PapstJL4U@lemmy.world avatar

You then see people making scripts that take days to run, but it’s fine, they’re only going to use it twice and are busy enough to be able to wait

Sponsored by “terrible python code by Matt Parker”

tea , in Task estimation

Don’t forget to add padding, so I’d just round it out to 18 months to be safe.

bleistift2 , in Task estimation

Teach this to your manager: At the beginning of a task, uncertainty is highest. Under no circumstances should you give an estimate in ‘man-hours’. Even days is too precise. The first estimate should be in months or years (of course depending on the size of the project). Then, as your insight into the project grows, you refine that to months, then weeks, later days. A vague estimate with a lower and a higher bound is way more useful to your manager than a ridiculously ‘precise’ but highly speculative number.

This lesson was brought to you by either “Code Complete 2” or “Rapid Development” by Steve McConnel, and by my former manager who wanted projects estimated in minutes.

MonkderVierte ,

Not if your manager then takes the minimum of your estimate.

I don’t work for a while anymore.

oberstoffensichtlich ,
@oberstoffensichtlich@feddit.org avatar

Your minimum estimate should be your actual estimate times three.

Midnitte ,

my former manager who wanted projects estimated in minutes.

Sorry, the number buffer overflowed.

tatterdemalion ,
@tatterdemalion@programming.dev avatar

Sir, I estimate the project will be completed in 135 days and 11 hours.

SlopppyEngineer , (edited )

I usually say what unit of measurement we’re counting in: days, weeks or months. For more detail, more specs are needed.

AngryCommieKender ,

The project will be completed by Stardate -287289.4717465754

MeowZedong ,
@MeowZedong@lemmygrad.ml avatar

my former manager who wanted projects estimated in minutes.

That wasn’t a manager, that was a demon.

mexicancartel ,

Just use unix milliseconds

skuzz ,

Point the ticket using the value of a cryptocurrency.

cbazero , in Yup...i can confirm that

Dynamic typing, special and unique syntax for every language feature, interpreter intrinsics

tux0r ,
@tux0r@feddit.org avatar

Dynamic typing is the source of very amazing errors, see JavaScript.

Brahvim ,
@Brahvim@lemmy.kde.social avatar

[object Object]

!Reddit moment.!<

sus ,

I think the problems there are exacerbated a lot by over-eager type coercion and other crappy design decisions inherited from almost 30 years ago

barsoap ,

Yep lua and lisp/scheme are also unityped and not even close to as broken. All are remarkably similar languages, theory-wise.

…also something something Guido not getting tail call elimination and people sending him copies of the wizard book. It’s been a while.

(And, yes, lua does proper tail calls).

joyjoy ,

Operator overloads, descriptor protocol, decorators

xmunk ,

Operator overloads are excellent for readable code when used well - I object to their inclusion on this list.

joyjoy ,

As long as you don’t have to implement it yourself.

TheHarpyEagle ,

Honestly, I’ve been using type hints very heavily since they became a thing. I just use IDE completion too much to do without them.

P4ulin_Kbana , in Task estimation

The Good Place mentioned!!! 🗣️🔥🔥

zante , (edited ) in Task estimation

A good project manager doubles your number an adds 20% anyway.

Triples it if you are working more than one project.!

0x0 ,

A good project manager

A what now?

zante ,

HA

tea ,
NotAnonymousAtAll ,

A typical project manager will get a range, take the lower bound and communicate it as the only relevant number to every other stakeholder. When that inevitably does not work out, all the blame will be passed on to you unfiltered.

Depending on where you work it may or may not be worth giving someone new the benefit of the doubt, but in general it is safer to only ever talk about the upper bound and add some padding.

flamingo_pinyata ,

I hear this criticism all the time, but I’ve never seen it happen in 5 companies I’ve worked for so far. Usually there’s an understanding that estimates are wild guessing, and things are planned using dependencies rather than timeliness.

zante ,

Only novice PMs do that and believe it or not, the project manager carries the can for failure .

mosiacmango , (edited )

My teams new hire project manager was even more advanced. When they found out we were working on 5-10 projects at once with no PM, they quit.

We had 3 PMs when I started here, and have been down to 0-1 for 6 months. That 0-1 runs a whole unrelated team, but is technical still a PM.

Dysfunction is fun. The plus side? No one asks me for estimates.

Kojichan ,
@Kojichan@lemmy.world avatar

Wow. I just lost mine. Been through at least 5 so far… Of course I’m working on around 6 projects at any point.

My favourite was when I migrated a website to Plesk, and my boss wondered why it took me 8 hours to migrate a single website…

phorq , in Task estimation

That’s because all tasks finish in the dot of the “i” of the Jeremy Bearimy sprint, I dunno what to tell you…

MonkderVierte , (edited ) in Task estimation

My boss asking, me: “2 days to a week”.

Meaning: 2 days best case scenario, but there’s likely something where i’m stuck for days trying to solve it, so a week.

My boss: “ok, two days then.”

marcos , in Yup...i can confirm that

None of that is “Python”. You want to learn a language and automatically know everything there is to know using Math?

SnotFlickerman , in Task estimation
@SnotFlickerman@lemmy.blahaj.zone avatar

Montgomery Scott of the Starship Enterprise has entered the chat.

bleistift2 ,

My manager once accused me of overinflating my (granted, very conservative) estimates just to be able to pull off a Scotty and be early in 10% of the time.

SnotFlickerman , (edited )
@SnotFlickerman@lemmy.blahaj.zone avatar

I don’t know, that mindset is so foreign to me. If someone was overestimating how long it would take because they were simply trying to be conservative and not run into unexpected cost overruns, I would commend them. I’ve always considered it more prudent to expect something to take longer so you know the kind of budget you need up front instead of lying to yourself about it. It costs a lot more (in terms of lost time and productivity) to have to swing a new budget mid-project because it turns out you’ve burned through the planned budget and you’re only 2/3 the way done with the project.

So, screw your manager, you’re doing the right thing, in my eyes. I guess that’s why I’m not in charge of anything.

frezik ,

You know, maybe we shouldn’t be taking estimation advice from a 1980s science fiction movie that amounts to a systematic method of lying.

Yes, I’ve used it before. Yes, you can hopefully have everything average out in the end. Yes, project managers demand estimates. None of these are good reasons to back up how fundamentally flawed it is.

SnotFlickerman ,
@SnotFlickerman@lemmy.blahaj.zone avatar

It’s called a joke. We’re in a sub called “programmer humor.” You must be fun at parties.

frezik ,

Except people take that method seriously all the time. All the objections I raised were one’s people have actually thrown back at me.

I’m tons of fun at parties. Everybody loves seeing my collection of bottles from defunct soda companies.

SnotFlickerman ,
@SnotFlickerman@lemmy.blahaj.zone avatar

Ah, yes, my favorite activity at parties, looking at some weirdos trash collection.

Codandchips ,
@Codandchips@lemmy.world avatar

Hey, if you’re anywhere in the area, I’ve got fine collection of IKEA allen keys a

HubertManne , in Task estimation

this is my number one thing I hate. So we are going to be converting over one system to another and you have no ideas what issues will pop up. give an estimation on the project. or like estimation onf fixing a bug or doing something you think the software can do but your not real sure till you look into it.

nous ,

The known unknowns and especially the unknown unknowns never get factored into an estimate. People only ever think about the happy path, if everything goes right. But that rarely every happens so estimates are always widely off.

The book How Big Things Get Done describes a much better way to factor in everything without knowing all the unknowns though - Just look a previous similar projects and look how long they took, take the average and bounds then adjust up or down if you have good reason to do so. Your project will very likely take a similar amount of time if your samples are similar in nature to your current task. And the actual time already factors in all the issues and problems encountered and even if you don’t hit all the same issues your problems will likely take a similar amount of time. And the more previous examples you have the better these estimates get.

But instead of that we just pluck numbers out of the air and wonder why we never hit them.

HubertManne ,

yeah I have literally had something where I list off a bunch of problmatic stuff and how it could be some high side and then follow up or everything could go swimmingly which never happens and we could have this low side and they are like ok so the low side. no. no. that is not what im saying.

Malgas ,

Hofstadter’s Law: It always takes longer than you think, even when you take into account Hofstadter’s Law.

danc4498 , in Task estimation

It makes me happy to see the good place memes.

oce , (edited ) in I redid the meme with what hurts me
@oce@jlai.lu avatar

Some people think that because Python is the easiest language to learn, it’s going to be easy to learn programming with Python. But learning programming is still very hard, so many abstract concepts to grasp. Python just makes it a tiny less hard, almost insignificantly now that we can use an LLM to learn the syntax faster than than ever.

FuglyDuck ,
@FuglyDuck@lemmy.world avatar

It’s also important to note that you might come out ahead in learning those abstract concepts using a harder language.

But my first language was Pascal. from a book stolen from my dad’s library. Then C++. I still wouldn’t call myself anything other than an amateur… I mean, my dad can do more with one line of C than most programmers can do in their entire career. (he really shouldn’t. but he does. Calls it “job security”.)

oce ,
@oce@jlai.lu avatar

It’s also important to note that you might come out ahead in learning those abstract concepts using a harder language.

I agree that you will learn more abstract concepts with more low level languages, but they are often not necessary. See Scala, beautiful language, lot’s of fancy subtle computer science concepts, and a plummeting popularity since its main popularizer, Apache Spark, implemented a Python API.

FuglyDuck ,
@FuglyDuck@lemmy.world avatar

Well. yes. it does strongly depend on what you intend to do with it.

Python is a great language that’s very broadly used; there’s a reason that Apache added the python API; after all. (and why Scala is plummeting.) I wouldn’t even say Pascal was all that useful, to me. I think I ‘learned it’ enough to get through the dumb book, and then went on to something else. C++ was more fun anyhow.

asyncrosaurus ,

I was hacking scripts and web shit together in perl, python and php for many years before learning C, and just a couple months learning C/C++ made me understand so many more basic concepts than all previous years experiences combined.

OpenStars ,
@OpenStars@discuss.online avatar

Try assembly then - it’ll freaking blow your mind!:-)

AnAmericanPotato ,

In practice, Python is not easy to learn programming with. Not at all. I see beginners wrestling with Anaconda and Jupyter notebooks and I weep.

The fact that pip is intentionally broken on macOS and some modern Linux distros sure doesn’t help. Everything about environment management is insane.

tyler ,

Comparing python env management to Ruby or rust or even Java for fucks sake just goes to show that nobody actually cares about how easy a language is to use, they just care about what is popular or what they think is popular.

oldfart ,

Ruby, of all the examples you could come up with? My Redmine is updated only every few years because I rarely have a whole day to deal with the mess that is Ruby deps managent.

Java deals with this ellegantly.

oce , (edited )
@oce@jlai.lu avatar

Development environment is a mess, but given its popularity, it’s not difficult to find an up to date tutorial. Then it is the easiest I think, you will be able to try programming basics and get a minimum viable product (small web app, small analytics…) easlier than with any other language.

rikudou ,

Nah, php over python any day. Equally easy to start, equally fucked up core, but the ecosystem around it is so much saner and easier. And I’d argue it’s even easier for beginners.

Unless you need something that only has python bindings, I’d never choose python.

calcopiritus ,

That is because when you’re a beginner, you read everywhere that you should be using anaconda and jupyter notebooks. I know because I did so. Neither of them lasted more than a week on my computer though.

funkless_eck ,

as a complete layman and hobbyist i also personally think that “more pythonic” coding can sometimes be more confusing.

I dont think any beginner reads “j for j for i in k” and instantly gets it.

maybe unpopular opinion idk

calcopiritus ,

Anything that’s not an integer or a range doesn’t belong inside []. Much more readable to use zip, map, filter, etc. And more powerful.

EDIT: that was meant for indexing lists. Strings inside [] for indexing ducts are fine.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines