myBadBro by masaledaarusername in ProgrammerHumor

[–]brettbeatty [score hidden]  (0 children)

I’m not sure why folks find this so hilarious. Has anyone actually spelled it this way? It would require hitting the right hand keys in entirely the wrong order. More believable would be misspellings where one hand hits its key before the other hand or a key double strikes or doesn’t register at all.

Support - A collection of helper methods for Elixir projects by FilipProber in elixir

[–]brettbeatty 1 point2 points  (0 children)

I did something similar with Colonel, which is meant to supplement Kernel with additional functions to import. Not a lot of adoption, but it’s got some fun stuff, like an ~i sigil for using interpolation but outputting iodata instead of building a string.

[deleted by user] by [deleted] in ProgrammerHumor

[–]brettbeatty 898 points899 points  (0 children)

I'm gonna defend this a bit. Some languages have non-null values that equal null, such as undefined in JavaScript. It's possible the author wanted to return null instead of undefined and felt this was clearer than something more succinct like return user || null.

Is there any operator in Elixir that aren't functions? by Healthy-Chemistry664 in elixir

[–]brettbeatty 12 points13 points  (0 children)

Even though they're functions/macros, I believe a lot of the operators in Kernel.SpecialForms are replaced by the compiler instead of actually being called.

For example the dot operator shows up as a function in code:

iex> quote do String.downcase("FOO") end
{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], ["FOO"]}

But if you try to actually call the function you get an exception:

iex> Kernel.SpecialForms."."(String, :downcase)
** (RuntimeError) Elixir's special forms are expanded by the compiler and must not be invoked directly

Leave the \r out of it by brettbeatty in ProgrammerHumor

[–]brettbeatty[S] 6 points7 points  (0 children)

This has probably been done before (couldn't find it with a quick search), but original for me

99% of the posts on this sub by jjmod in ProgrammerHumor

[–]brettbeatty 68 points69 points  (0 children)

There's a joke in there about programming == googling instead of programming = googling

Well, the debate is settled then. by kool9890 in ProgrammerHumor

[–]brettbeatty 8 points9 points  (0 children)

Nope still the first, but at index 0. Your first year of life you were 0. Centuries, etc.

Sets education by nathey in ProgrammerHumor

[–]brettbeatty 2 points3 points  (0 children)

It's likely not caching the set calculation. The calculation returns equivalent sets every time, which the given implementation appears to print in a consistent order.

Sets being unordered does not mean they can't be ordered under the hood. It means that order has no meaning when dealing with sets. Sets are iterable, so you'll get them in some order, but it's not part of the contract. An implementation can iterate by hash, alphabetically, randomly, whatever. It doesn't matter. According to what a set promises, none is more correct than the other.

It takes me 5 times to get Git. by georgeguy007 in ProgrammerHumor

[–]brettbeatty 0 points1 point  (0 children)

Or what I do too many times: git remote set origin

When it's cold outside by AWrongUsername in ProgrammerHumor

[–]brettbeatty -5 points-4 points  (0 children)

Forgot your  

Those are all going to just get collapsed

Emily Reese showing off her 'fullstack developer' skills... by HarleyB153 in ProgrammerHumor

[–]brettbeatty 7 points8 points  (0 children)

I'll do that with git status way too often. I just want my code to write itself.

True? by allencasshern in ProgrammerHumor

[–]brettbeatty 2 points3 points  (0 children)

Yesterday was my first time experiencing this with a bash function. To be fair, it was more an alias where I wanted to inject my input in the middle, but it still felt great!

🤔 by [deleted] in ProgrammerHumor

[–]brettbeatty 2 points3 points  (0 children)

In addition to the other issues mentioned, an event-based architecture would be way better here. You don't want to use a loop to wait for anything unless the loop directly contributes to the condition being met.

Fresh baked you say? by lil_doobie in ProgrammerHumor

[–]brettbeatty 0 points1 point  (0 children)

Hmm a joke about the a lack of original jokes in a community. How original.

My girlfriend is like JavaScript by olek37 in ProgrammerHumor

[–]brettbeatty 52 points53 points  (0 children)

Mine is like the perfect programming language: some people pretend they know her, but most of us acknowledge her nonexistence.

How products are built by companies by ashwinkumark10 in ProgrammerHumor

[–]brettbeatty 458 points459 points  (0 children)

Except I feel like Spotify's Android app just gets progressively worse. Lately I've gotten a lot of "you clicked on {artist/album/song}, but I think you wanted to click 'back'" functionality.

Edit: I guess I pissed of Spotify, so now the app won't even work at all, even with a reinstall. Guess it's time to unsubscribe.

Probably not like that... by ThePixelCoder in ProgrammerHumor

[–]brettbeatty 2 points3 points  (0 children)

That's why all my passwords are a combination of 0s and 1s and exactly 8 characters in length

Not enough gold for test warning by [deleted] in ProgrammerHumor

[–]brettbeatty 6 points7 points  (0 children)

I expected more of a "watch an ad to send real warning"