coloredgrayscale

@coloredgrayscale@programming.dev
0 Post – 94 Comments
Joined 1 years ago

You poor soul.

clicks scrollbar with mouse and drags it, instead of using the scroll wheel

9 more...

Sounds like they are the product owner :)

Even without algorithm knowledge it should be fairly obvious that you can just fast forward several minutes and check if the item has gone missing.

Not the most efficient solution, but beats watching the entire tape in real time.

With physics, but paused while coding. It only comes crashing down when the code gets executed.

import codegolf
codegolf.challenge1() 

The solution is obviously to replace the mods by bots, to fight other bots.

Battle bots, but virtual XD

1 more...

We can add caching so numbers that have been checked once can be quickly looked up from an inMemory database.

300 nested if statements, (...) added another 5000 nested if statements.

At this point I want to doubt that they actually wrote it themselves, vs writing a metaprogram to generate the code.

1 more...

Just npm install isWeekend for the required locales.

Depends on: isMonday, isTuesday,...

Tilted 22 degree to maximize the potential line length that can be displayed.

https://gigazine.net/gsc_news/en/20211203-ideal-monitor-rotation-for-programmers/

1 more...

That's the problem. It will confidently give you an correct sounding answer.

If it is actually true is a different topic. So don't just blindly trust it. Verify, or at least sanity check it.

Make those changes in an own commit, or keep it to files you already have to touch.

"too many comments".

Assembly would be lower. You have more complex / direct instructions in assembly. Brain fuck is pretty much just a pure turing machine, and has 8 instructions.

X86 has ~ 1000 + variants. Even ARM with a smaller instruction set has 232 instructions.

In brain fuck to set a number you'd have to count up (or down - underflow) to that number. In assembly you just set it.

Somewhere I've read that current assembly code with Makros should be similar to writing C.

Maybe they see OP as the best candidate for an audit or code review, who has good enough skills, has time available, and is an internal resource

Why are you in programming related communities if you don't enjoy it?

thanks to wasm any language is a browser running language.

Theoretically yes, practically you may have to deliver a whole runtime depending on the languagey making websites even bigger and slower to load initially. And unless it's a webapp with data processing on the client the perceived performance benefits may be negligible.

Maybe also bias by the number / experience of people using it.

1st semester students getting shocked by public static void main(String args) and meming it on the internet.

Go on the other hand likely isn't a common choice / option for a first language.

Just get copilot for vim /s

1 more...

May I introduce you to Usb 3.x renaming?

3.0, 3.1Gen1, 3.2Gen1, 3.2Gen1x1 are the 5Gbps version.

3.1Gen2, 3.2Gen2, 3.2Gen1x2, 3.2Gen2x1 are the 10Gbps version.

They meant self obfuscating.

Can someone transcribe this text please?

Easy access to small snippets of code you often need, but putting them in their own library would be crazy.

  • Opening a file / db connection

  • parsing xml/json/... ,

  • template for unit tests,

  • import and initialization of framework at work.

Depending on the IDE snippets can also move parts of the code around: (intellij live templates)

  • variable.notnull -> if (variable != null) {... }
  • "text %s".format -> String.format("text %s",...)

At least in the future copilot could navigate you to the settings in the different places 😅

Automatic code formatter with company style rules for more consistency across all developers.

What if I pass an empty list, or NoneType?

While you're at it, also test

  • one
  • three fifty
  • 69 nice
  • 6.9
  • 4,20
  • null (it's German for zero)
  • pie (and pi)
  • cake
  • fruits
  • One million three hundred (wonder if it gets confused by "one" and "three")
2 more...

Sounds like a good use of comments. Explain why, not how. (that should be readable from the code for the most part. Unless you're having function calls like xmmmuldp (simd) )

Even if wasm or something else could replace js completely we'd need some huge corp to drop support completely.

Something like apple no longer supporting js. Remember Flash?

Luckily we won't colonize the moon or another planet anytime soon...

Almost:

While (hasMoney())
Print(money)

Cat is a fluffy animal, and for shreading shit

Heard about that too! Is there an updated version for ipv6?

1 more...

If someone changes the code and forgets to modify the comment, the reader might favor one or another at random.

Hence why you should comment why, not how/what.

// slow down traffic before crossing busy main road

Now you can change the stop sign to a yield without touching the comment. Or judge that the comment can be removed if it's clear the main road does no longer exist.

Don't let yourself down because you don't know the syntax off the top of your head.

Even after 15 years of programming, and studying computer science, I would have to look up how to write loops, conditions, variable assignments in bash / sh / batch.

Coming to python from a primarily java focus background wasn't any different. I knew what steps the program should do, but had to look up how to translate it into whatever language. And for further improvements what features the language has to express the things "in the style of the language"

Iirc they require 5 votes with the same response. Your effort won't do anything, other than flag you as unreliable.

Afaik 4chan (of course) did that poisoning correctly, "classifying" the unknown words as "penis" (of course).

1 more...

A compiler has mostly fixed rules for translation. The English language often is ambiguous and there are many ways to implement something based on a verbal description.

Programming by using the ai as a "compiler" would likely lead to many bugs that will be hard to impossible to trace without knowing the underlying implementation. But hitting compile again may lead to an accidental correct implementation and you'd be none the wiser why the test suddenly passes.

It's ok as an assistant to generate boilerplate code, and warn you about some bugs / issues. Maybe a baseline implementation.

But by the time you've exactly described what and how you want it you may as well just write some higher level code.

Exactly. Use the tools you have the way they fit you best. If it aids your work flow learn the CLI commands you use the most. If it's something obscure or rarely used, use the gui.

Another not mentioned benefit of becoming comfortable with using the cli is that you then can more easily script stuff.

Not required. Looks like Java, just use reflection.

You could call it a botnet

Ording online seems out of the options (need to exit vim to learn how to exit vim) , so ask in a library or physical bookstore. :q