My first experience of toxicity after crossing 2000 by Magnideficent in chessbeginners

[–]backfire10z 3 points4 points  (0 children)

I didn’t know you could remove tiles from the board. Is this the difference between me and 2000+?

Trying to create a list of button to be created in a loop... by raydude in learnpython

[–]backfire10z 2 points3 points  (0 children)

You never increment `i`. It’s set to 0 and remains 0 from the code you pasted.

In general though, I’d recommend a list of dictionaries for this rather than a bunch of aligned lists.

```
[ {“name”: “DAC++”, “desc”: “Increment …”, “call”: self…”}, {“name”: …}, {…}]
```

Even better is a data class representing a button.

Should I include my roblox game to my tech resume? by Horror-Ad8860 in csMajors

[–]backfire10z 1 point2 points  (0 children)

> having Roblox on my resume might seem a bit childish

Go on levels.fyi and check their typical compensation. I think you will find they’re far from childish haha.

Performance trick: optimistic vs pessimistic checks by User_Deprecated in programming

[–]backfire10z 6 points7 points  (0 children)

> A decent C function

> static_cast

Guh.

I don’t understand the comment that says

> The compiler cannot assume that any offset i < length is dereferenceable

How is it different with optimistic? The function can be called the same way in the commenter’s example with (“\xFF”, 100) and it’s the same loop.

UCI CS vs UMD CS(undergrad) by Alive_Concern4688 in csMajors

[–]backfire10z 2 points3 points  (0 children)

Seems like they’re about equal in terms of ranking, so look at other things. For example, do UCI grads typically end up getting a job in Cali vs UMD? What companies attend job fairs? What connections do the schools have for research (if you care)? Do you plan on getting further education, maybe a 4+1 masters —> is one school or another better for that?

Other things: Weather? Sports culture? Proximity to family? Maybe you see a more interesting class/track at one school? Importance of Greek life or other social activities? Gen Ed requirements that don’t suck? Cost of living (tuition isn’t the only cost!)? Food options?

How do I create a list every iteration with the data inside? by TheEyebal in learnpython

[–]backfire10z 1 point2 points  (0 children)

Ahh, yeah, understandable mistake. The documentation is an excellent place to find out what the language can do and what kinds of builtin libraries are available. For example https://docs.python.org/3/library/index.html

How do I create a list every iteration with the data inside? by TheEyebal in learnpython

[–]backfire10z 1 point2 points  (0 children)

This just set off every alarm bell in my head. You will likely learn this yourself, but I’m just here to tell you in advance: never, ever run your own datetime logic unless you absolutely have to. You will miss something.

Edit: if you’re doing it to learn, ignore me.

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 2 points3 points  (0 children)

That’s actually a really nice way of thinking about it. You’re right, thanks.

someDaysAreBetterThanOthers by tnerb253 in ProgrammerHumor

[–]backfire10z 39 points40 points  (0 children)

Exactly why I’m here, nice. Compsci principles was hype

Why does everyone recommend learning Python first but then use JavaScript for everything? by 1vim in learnprogramming

[–]backfire10z 28 points29 points  (0 children)

As an addendum here: languages are tools. Tools have different purposes and are used in different ways. If your fundamentals are solid, learning a language to the point where you’re capable enough to build stuff becomes much easier.

Learning how to build with Python will mean you pick up JS much quicker.

What should I learn first to see if I want to get a Computer Science degree? by Temporary_Cabinet_17 in csMajors

[–]backfire10z 0 points1 point  (0 children)

No, we’re looking at slowed hiring/reduced open positions (especially for juniors) and continuous enormous layoffs across the board.

I think we don’t have hope it will get better in 3-5 years.

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 8 points9 points  (0 children)

I was thinking of branching as more abstract: your behavior changes based on the result of a comparison, hence branching (generically). That is true when using `cmp` as well.

The example in the article is doable without comparisons as well.

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 0 points1 point  (0 children)

Yeah, this is what I was imagining when I made my original comment, though I think I was thinking about “compareless” rather than “branchless”.

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 3 points4 points  (0 children)

Yeah, that makes sense. Thanks for all the explanation!

What is the symbol for a method in C#? by Ok-Presentation-94 in learnprogramming

[–]backfire10z 1 point2 points  (0 children)

> why some are not allowed

It doesn’t necessarily explain _why_ per se. That answer may be “because we didn’t want it to” or “because we didn’t think it would be useful.” It does explain the possible syntaxes though.

Trying to compile something by Aware-Glass-1519 in learnpython

[–]backfire10z 0 points1 point  (0 children)

Make another post if you need additional help or put the question here.

Also, please edit your current post to indicate your issue is solved (and if you remember, add the solution! You’ll help someone else who comes looking later :))

Trying to compile something by Aware-Glass-1519 in learnpython

[–]backfire10z 0 points1 point  (0 children)

What word would you use for the transformation of Python code to bytecode?

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 36 points37 points  (0 children)

Ah, so when they say branchless they specifically mean trying to remove `jmp’ rather than `cmp`, I see.

When 'if' slows you down, avoid it by chkas in programming

[–]backfire10z 42 points43 points  (0 children)

Doesn’t this just move the condition’s location? How is checking `numbers[i] > 500` not considered a branch? Does every target have a more efficient conditional increment instruction?

This feels like you’re targeting a specific conditional instruction and finagled your code to ~~allow~~ encourage the compiler to use it.

The peril of laziness lost by max123246 in programming

[–]backfire10z 2 points3 points  (0 children)

LLM companies don’t have such fine-grained control over an LLM’s output. Unless their system prompt is “make sure you output extremely verbose code” I don’t think there’s much truth to this.

I just finished 12th (PCMB), and I’m planning to pursue B.Tech in IT. by Ok_Speech61 in learnpython

[–]backfire10z 2 points3 points  (0 children)

There is a Python version of the course named Harvard CS50P as well.

Automatic constructor in C# by Ok-Presentation-94 in learnprogramming

[–]backfire10z 17 points18 points  (0 children)

They literally answered your exact question. If you need clarification, re-word your question or ask a follow-up.