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.

flameguy21 , in e = error in syntax

Code spellcheck is a godsend

ImpossibleRubiksCube , in Bleeding edge tech

Is the litmus test for programmers. When they start referring to “AI” as a clearly defined concept, you know they’re artlessly making shit up for a quick buck.

asdfasdfasdf , in Pick a side Javascript

Any senior developer who says that should instantly get a demotion to intern.

ImpossibleRubiksCube ,

Followed by a public beating.

Kerrigor ,
@Kerrigor@kbin.social avatar

Forced to develop on Windows

HarkMahlberg ,
@HarkMahlberg@kbin.social avatar

Which part? Saying that it's simple, or making fun of saying that it's simple?

ImpossibleRubiksCube ,

We can do both. This is clearly not a laughing matter. 🤨😤🚬🔨🐖

HarkMahlberg ,
@HarkMahlberg@kbin.social avatar

Haha, ok I didn't see which community this was posted in.

Moc ,

There are two kinds of simple

  • Simple to learn to use
  • Simple to understand, and use at a complex level.

JavaScript is the first, but definitely not the second.

LazaroFilm , in Ouch
@LazaroFilm@lemmy.world avatar

Wow. Not even weekends.

TehPers , in data secured

I’ve never had this issue on Windows, but I have on mobile many times. The more a platform tries to hide the FS from me, the more I struggle to navigate it (surprise!). Mobile devices have been moving to be more transparent that a FS exists at least in recent times.

Casual plug for Search Everything, not FOSS but still free. It’s an alternate indexer/search for Windows, but way faster.

altima_neo ,
@altima_neo@lemmy.zip avatar

I like that with Samsung phones I can at least use a file browser. iPhone a fucking black box though.

BehindTheBarrier ,

It’s fun with screenshots, you save it and realize, you didn’t check what path it saved to because you (read: me) always puts downloads in the Downloads folder by default. It’s the last place you saved an image, shouldn’t be too hard? Just gotta find an IMG_something either in user photos or documents usually. And then fail to do so, and do a walk of shame back and try save again just to see where it actually ended up…

I do love Everything though, it’s amazing and I constantly use it for looking for things. I know names at least partially, and that does it 99% of the time. Sorting by Path also makes it very easy to navigate when you get a lot of hits. Just a pro-tip to those yet to learn of that power.

seliaste , in Linux Best Practices
@seliaste@lemmy.blahaj.zone avatar

rm -fr -nocap -slay

illectrility , in meanwhile electron

Destroyer of performance

Boinketh ,

Well, it’s faster than Python.

illectrility ,

If done correctly. Electron is slow as crap in most cases. It can be optimized but it usually isn’t.

I know that Electron≠JavaScript, of course but JavaScript continous being used for stuff it shouldn’t be used for

Boinketh ,

I was talking specifically about NodeJS servers. JS has much better execution speed than Python due to having JIT compilation.

pulaskiwasright , in python < shell (for scripts)

Things that could have been done in bash is python’s best usecase. And bash sucks for scripting. Why not python?

dukk ,

Not really true. Python was created for, and is still best used for data science. It’s user-friendliness made it a first for many inexperienced programmers too, and it started to be used for way more than it was initially intended. I’m not saying it’s bad at everything else, but there’s most certainly better tools for the job.

pulaskiwasright ,

I won’t argue with what it was created for, but I disagree that it’s best usecase isn’t as a bash replacement. That’s the only spot I’ve used and liked it.

princess ,

have you ever tried to recreate a simple shell pipeline in Python

pulaskiwasright ,

If we’re talking about 5 like script, then sure. Just use bash. But python is much better long term, in my experience, for scripts any bigger than that.

entropicdrift , (edited )
@entropicdrift@lemmy.sdf.org avatar

There are many cases where bash/shell is better than Python. For one, any time you’re just stringing together 2-4 existing shell tools, bash has unbeatable speed since it’s all running in C. Plus, you should probably learn the tools anyways to handle CLI stuff on a day-to-day level, so the knowledge is reusable and becomes very intuitive to compose into some crazy one-liner piped chains of commands. If I just want to loop over a set of directories and do a couple chained CLI commands on each directory, this is the way I go.

That said, in cases where you’re doing something very custom, any time you’re doing something that can’t be simply described as a chain of CLI tool transformations, and any time you want to maintain a global state across a complex set of operations outside of a pipeline, I agree that Python is generally a more robust solution with much easier maintainability.

jim_stark ,

compose into some crazy one-liner piped chains of commands

Why not something that is completely redesigned from the ground up:

avonarret1 ,

That looks really elegant. I think I’m gonna give it a try. Thanks a lot for the recommendation!

mathemachristian ,

Xonsh

Sphks , in Title got catched by input sanitization
@Sphks@lemmy.dbzer0.com avatar
yum13241 ,

They’re seem non-existent, but they can make you pull your hair out.

drcouzelis ,
@drcouzelis@lemmy.zip avatar

There’s a potential explanation here.

feddit.de/post/2242238

quazar , in Always write comments

Give a man AI and he’ll make a meme

teach a man AI and he’ll make money making memes

Aelorius , in Java

Logic, in math, if you have a real and you round it, it’s always a real not an integer. If we follow your mind with abs(-1) of an integer it should return a unsigned and that makes no sense.

kogasa ,
@kogasa@programming.dev avatar

in math, if you have a real and you round it, it’s always a real not an integer.

No, that’s made up. Outside of very specific niche contexts the concept of a number having a single well-defined type isn’t relevant in math like it is in programming. The number 1 is almost always considered both an integer and a real number.

If we follow your mind with abs(-1) of an integer it should return a unsigned and that makes no sense.

How does that not make sense? abs is always a nonnegative integer value, why couldn’t it be an unsigned int?

Aelorius ,

I’m ok with that, but what I mean is that it makes no sense to change the type of the provided variable if in mathematics the type can be the same.

nulldev , in Javascript is the most popular scripting language in use today

The explanation is about as understandable as the JS code, however thanks OP, TIL

Sonotsugipaa ,

Iirc this is called “JSFuck”, and it has a number of compilers

Deebster ,
@Deebster@lemmyrs.org avatar

The line breaks haven't worked, here's it formatted correctly:

Explanation: it's mostly due to how js does type conversion.

For the Ls, it's:

  • [] is an empty array
  • ![] is treated as false
  • combining a boolean with the empty array returns "false" as a string (so true + [] = "true", false + [] = "false")
  • ! + [] is treated as true
  • ! + [] + ! + [] is treated as 2 since true + true = 1 + 1 = 2
  • so you have "false"[2], which is l

for the o it's:

  • [] is an empty array
  • [] + {} returns "[object Object]" as a string ({} + [] returns 0)
  • ![] is false
  • !![] is true
  • +!![] casts it to an integer
  • so that part is "[object Object]"[1], which returns "o"-
cupcakezealot , in rm -rf /
@cupcakezealot@lemmy.blahaj.zone avatar

ew french language pack gross

snow_bunny , in Googling

Clearly fake. Nobody’s hiring nowadays.

uis ,

There is always shortage of highly-skilled unpaid labour.

bleistift2 , in everywhere I go

Any project that uses d3.

threeganzi ,

Why is that?

bleistift2 ,

I don’t know why. Maybe the typings for it are just fucking bad. Or maybe d3 is very hard to use “correctly”, but still works most of the time even if invoked incorrectly (I doubt that). Or maybe d3 is so complex that the typings need to be complex, too, even if you don’t use the complexity (the type retured from selectAll has four type parameters, half of which are undefined by default, the other half, null).

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