Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)B
Posts
1
Comments
74
Joined
2 yr. ago

  • The implicit return is perhaps the most dubious of them. I don't mind it for simple functions, but they are not so good in anything large and with multiple return sites. Even more so when developers choose to implicitly return 4 chained method calls inside a closure with else cases.

    But the rest aren't really sins, they are mostly new or different concepts or ways to do something. And if there is a sin, it's largely because the language itself has a complexity larger than others.

    Taking my own examples here, lambdas are just fine, but the move semantics are cumbersome to deal with. But we need to do it some way, to indicate that a value is actually being moved into the closure. Maybe there are better ways and they make into the language in the future.

    Conditional values and let statements and such is a good consequence of Rusts design choice with returning Results or Option types. Just because it's different doesn't make it a sin. Just takes time to learn the right way. I think most come from an exception based language, and that has a differnet code flow than what Rust has.

    Lifetimes are hard though, and I feel a lot of the introduction is made excessively hard with the simple naming. It's as of every programming tutorial used single letter variable names. Lifetimes isn't something I'm that good with either, mostly because I haven't had to use that complexity yet.

  • I can actually see where this is coming from, as I found Rust hard to read when I started out. I do really like Rust for reference, but I do agree Rust is hard to read for someone that has not learned it.

    For example:

    return statements that are implicit just because the semicolon isn't there. Even better if they occur inside a if block or something like that. Very hard to understanding when you don't know the syntax rules.

    Lambda functions, especially when using move semantics too. They are quite simple, but if you don't know the meaning, it's more arcane characters. Especially when this is used inside lots of chained methods, and maybe a multi-line function in the lambda.

    A lot for the if let x =... type of stataments are tough the first time around. Same for match statements.

    Defining types for use with function::

    <Type>

    () and such.

    Lifetimes, especially when they are all named a, b, c etc. It quickly gets messy, especially when combined with generics or explicitly defined types.

    Macros, though not entry level rust to begin with, they are really cumbersome to decode.

    None of these are sins of Rust, but for new people they are a hill to climb, and often hard to just "get" based on previous programming experience and reading the code. Rust can be really hard to approach because of these things. This happens in other languages too, but I do feel Rust has a particularly large amount of new concepts or ways to do something. And this is on top of learning lifetimes and borrow semantics.

  • Not this one, there is no ambiguity here. Order of operations are all good.

  • It's the round trips that kill you.

    Oracle drivers for .NET are fun. Have a user client application which uses quite a lot of data, but a few thousand rows are fetched some queries. It's way too slow for any larger query, turns out for the batch query kind of work we do, the default FetchSize for Oracle is just a performance killer. Just throw it to 128 MB and it doesn't really hurt at all.

    Worst thing i've seen though, apart from the 150 line long dynamic sql stored in our database, was probably a page in our program that loaded about 150 rows from the database. Normally we do create a new connection for each query, but it's fine since Oracle has a connection pool. Whatever millisecond is trumped by the round trip. But imagine a UI so badly written, it did 4 separate database queries for EACH row it loaded into the UI list. Useless things like fetching a new ID for this row in case it is changed, reading some data for the row i think, and more. Thing took a solid minute to load. There was so many bad patterns in that page that even during the PR for improving the speed it was just dealing with a mess because you couldn't just rewrite the entire thing, so they had to make it work within the constraints. Horrible thing to work with.

  • Fork it so i have my version, regardless if the original goes away. (Assuming Github doesn't nuke all repos of course like they did with youtube-dl for a while)

  • We got solid state to come challenge the car market in a few years. Supposedly both safer and bigger capacity. Just remains to be seen when it actually arrives in the average car. It's a tech that hasn't quite managed to get out of laboratories.

  • It's not helping unfortunately, it's just a blanket change in colors by some filter. The taskbar highlight is bad to begin with. Ideally the should use red/orange for warning highlights and used bright white. But a weak pink isn't going to be more visible even if it was turned redish. It'll still be weak.

    And it does change every other thing on screen, which won't be good for me since colors aren't an issue normally, and even worse if it affect screen sharing. Taskbar changes is just straight up bad UX that tries to look good.

  • My experience with W11 on the work laptop.

    Taskbar sucks, maybe because I'm colorblind but I can te what my selected program is and programs with notifications (Teams) look like the focused program. Apparently notification boxes there are pink now. Can't find any accessibility setting but fuck the colorblind I guess. It feels wrong to click the highlighted icon I for years have learned will mean that I minimize it...

    And why all the dots? And why is the notification dot the largest, so I can even tell which window is actually focused?

    Outlook doesn't open with focus, especially the window that is supposed to pop up and warn me of upcoming meetings. Really annoying.

    Teams notifications just don't show if you are in a meeting and that is focused, they used to do that on W10.

    Might be a Firefox bug, but there's a lot of new visual bugs. Github diff view is randomly strongly colored, and randomly changes to the old weaker background colors when scrolling/resizing the windows. And a surprising amount of scrollbars in grids that weren't there before.

    I just wish W11 at least worked with the regular features of W10.

  • At least Rust compiles down to what is used. I don't know if js has any of that, but at least with rust the final program doesn't ship tons of bloat.

  • I'm no expert on the grain side, but Netflix had a nice writeup about its power.

    https://netflixtechblog.com/av1-scale-film-grain-synthesis-the-awakening-ee09cfdff40b

    I also heard that when you use film grain, you should disable the denoising done on the output to properly preserve detail in the encoding. Which depends on the encoder, but should generally be possible on the ones that do film grain.

    But it might not be as good for artistic film grain that doesn't fit normal "grain" in videos.

  • Tesla somehow manages to do well(at least prior to the nazi events). Still at a good price in Norway.

    But all other manufacturers have dragged their feet with EVs, and that price cost of starting is large enough that they are in trouble. I'm not a huge fan of China, but they did the investment and are ahead exactly because of that (and crazy subsidies). Being left behind is their own fault imo, and I think that applies a lot to EU as well. Eg. WV.

  • Code normally works fine after you write it and then hopefully at least test by hand. The new guy 5 years later, which do not fully grasp the extent of his actions, and the guy reviewing the code also not being too familiar with it, will not make sure everything does as intended.

    Tests are correctness guarantees, and requires the code and/or the test to change to pass. They also explain how something should behave to people that don't know. I work in a area where there are so many businesses rules that there is no one person that knows all of it, and capturing the rules as tests is a great way to make sure that rules remains true after someone else comes to change the code.

  • In modern games, I think it's fairly common to have a common 3d skeletons share names. So you can make animations like the one above apply to any character even if they have differences. It doesn't mean that dog extends human, but it may mean that a dog model shares a lot of common "bones", that are used for movement, with a human model.

    So when a human animation is applied to the dog, you can see it warp to start position of the animation, move, and then then stop at the end position as a standing human, before warping back to idle animation (when it turns back into the dog shape)

    Related, weapons in Destiny also share the same components across weapon types, and bugs have caused one weapon type to be used for another weapon, making funny things happen. Like how a hand canon (pistol) stretches like a bow because it's model got used in place of the bow model at the start of this clip:

    https://www.youtube.com/watch?v=0YZa9vv5U0M

  • I know my product managers don't use chatGTP because they end all sentences with ... , every damn time. And I'm fairly sure their habit developed independently, given that one of them is from a relatively recent purchase of a company.

  • "".to_string() probably

  • I feel this is related, and hightlight this even further, look at all the ways to initialize something in C++.

    https://www.youtube.com/watch?v=7DTlWPgX6zs

    If you are really lazy, have a look at making an int at around 7:20. It's not horrible that alone, but it does show how many meanings each thing has with very little difference, added on top of years of legacy compatability accumulation. Then it further goes into detail about the auto use, and how parantheses, bracket, squiggly bracket all can be used and help with the mess.

  • None of those issues for my main IDE, though Rider on some occasions do get stuck marking some spelling errors after they are fixed.

    It has stuttered a few times, but pretty rare. But it does have a bug where it think it is building a project, but isn't. And requires a restart to fix... Easy to trigger if you try building a project while it's loading the project...

    Visual Stuido with Resharper is the one where things would randomly stop working though. Especially hotkeys would sometimes stop working until I restarted it. Slow and stutter too.

  • I'd expect modern cars to use proximity detection which means the fob only needs to be with you.

    Like my Peguot has a fairly large fob, but it's just in the pocket of my jacket. Never leaves it. I guess it's a problem if you don't have a semi permanent thing like a jacket you use every day though.

  • My solution to most things, make it a chore.

    Like, if you don't buy it, you can't drink it. If you have it, put it in an inconvenient place so you you won't see it or bother getting it.

  • Tales from Tech Support @lemmy.world

    Why every laptop should have at least two USB ports of each kind