• 2 Posts
  • 45 Comments
Joined 10 months ago
cake
Cake day: September 7th, 2023

help-circle
  • I would vote for docker as well. The last time I had to inherit a system that ran on virtual machines, it was quite a pain to figure out how the software was installed, what was where in the file system, and where all the configuration was coming from. Replicating that setup took months of preparation.

    By contrast, with Docker, all your setup is documented. The commands that were used to install our software into the virtual machines and were long gone are present right there in the Docker file. And building the code? An even bigger win for Docker. In the VM project, the build environment for the C++ portion of our codebase was configured by about a dozen environment variables, none of which were documented. If it were built in Docker, all the necessary environment variables would have been right there in the build environment. Not to mention the build commands themselves would be there too, whereas with VMs, we would often have developers build locally and then copy it into the VM, which was terrible for reproducibility and onboarding new developers.

    That said, this all comes down to execution - a well-managed VM system can easily be much better than a poorly managed Docker system. But in general, I feel that Docker tends to be easier to work with than a VM. While Docker is far from flawless, there are a lot more things that can make life harder with VMs, at least from my experience.


  • Interesting! Sorry, I don’t know why I thought you were using swipe keyboards, it must have been stuck in my memory from reading other comments. I definitely agree that pressing the buttons was a little annoying, but manufacturers could probably make softer buttons if they were willing to put the money into developing them.

    Anyway, I really miss the phone I had from about 2008-2010. It had two sliders that moved in orthogonal directions. One of the slide directions revealed a standard 12-button phone pad, while the other had a 4-row keyboard. And yet, I’m pretty sure it was under 1.5cm, so not too large. It was definitely easier to keep in my pocket than current phones!

    If it weren’t for reading Lemmy/RSS feeds and a camera, I’d probably be going back to dumb phones for my next one…


  • But what’s the error rate? I could type at 200 words per minute (even on a phone!!) if I didn’t care about how many typos I was making. And swiping keyboards get confused incredibly easily. The error rates are especially bad when you’re writing words that only use a single row of keys - on QWERTY keyboards for example, try writing something like “type”, and you could get that, or you might get something else, like wipe/write/ripe. Other groups could include things like tip/top, pit/pot, wit/wire and the selected word will be wrong almost as frequently as it’s right. And autocorrect systems can’t really correct for things like when you mean to press enter and hit the backspace key instead. Plus, their suggestions are generally just very stupid. So while buttons take longer to press on physical keyboards, the reduced error rate makes typing speed about the same in my experience.

    Plus, with physical buttons, you get tactile feedback, so you can tell when your fingers are slightly off and adjust them, whereas on a flat surface, you have no idea whether you pressed the correct button or not. You have to stare straight at the screen to make sure every press is correct, which is exhausting and bad for your eyesight. I feel a lot more eyestrain from simply typing on phones, whereas with physical buttons, I didn’t even have to look at the screen, and I could look at something else around me while typing. And don’t get me started on how many calls I’ve missed because I accidentally hit the hang-up button, or couldn’t find the accept call button - not a problem when you have physical buttons!

    Regarding screen real estate, all you need is a slide-out keyboard. They work great!

    There are a few downsides to physical keyboards, but in my experience, they’re far superior to non-keyboard devices. But what can you do - in the 21st century, practicality never matters, it’s just all about aesthetics and nothing else…




  • This is quite cool. I always find it interesting to see how optimization algorithms play games and to see how their habits can change how we would approach the game.

    I notice that the AI does some unnatural moves. Humans would usually try to find the safest area on the screen and leave generous amounts of space in their dodges, whereas the AI here seems happy to make minimal motions and cut dodges as closely as possible.

    I also wonder if the AI has any concept of time or ability to predict the future. If not, I imagine it could get cornered easily if it dodges into an area where all of its escape routes are about to get closed off.





  • There is no way to make a network request faster than a function call.

    Apologies in advance if this it too pedantic, but this isn’t necessarily true. If you’re talking about an operation call that takes ~seconds to run, then the network overhead is negligible. And if you need specialized hardware for it, then it definitely could be delegate it out to a separate machine over the network. Examples could include requiring a GPU, more RAM, or even a faster CPU if your main application is running on more power-efficient CPUs.

    I’m not saying that this is true in every case - they are definitely niche cases. But I definitely wouldn’t say that network requests are never faster than local function calls.


  • Agreed on all points. I think some of the issues that you’re facing are things that would be resolved if Ocaml were more popular. But some others would be harder to fix without making breaking changes to the language as I mentioned earlier. If I had to put it as succinctly as possible, I’d say that the language just needs a lot more polish which would probably happen if it were more mainstream. But not all languages have to be mainstream, and maybe Ocaml’s purpose in the world is, as you put it, to inspire other languages. It is definitely extremely good at that!


  • namingthingsiseasy@programming.devtoProgramming@programming.dev...
    link
    fedilink
    arrow-up
    30
    arrow-down
    1
    ·
    2 months ago

    No one has said Ocaml yet, so I will. It’s not a perfect language, but it has a lot of cool ideas and concepts. It’s a functional language, but allows you to write imperative code when you want to. Algebraic data types and type matching are built natively into the language and work very nicely. It’s type inference capabilities are very powerful (though that can backfire at times), and the |> operator is really, really fun to use. It also has very powerful module/functor capabilities, though they go a bit over my head since I haven’t had a chance to play with them. Also, Opam is a very powerful package manager and it’s pretty easy to wrap/bind external libraries with it.

    I’d love to see some improvements to the language - the syntax is a bit confusing and ugly at times (but this unfortunately can’t be fixed without breaking the language of course) - but overall I think I’d have a lot more fun programming in Ocaml than what I do in my day job.









  • I think most of the arguments here are kinda ridiculous and poorly thought out. A lot of them also sound pretty imaginary and made-up. For example:

    To assert that frontend languages are not programming languages is to assert that what one is doing when writing them is not programming, but something else. Something different.

    Something—perhaps not explicitly spoken, but undeniably implied—lesser.

    Basically, he’s arguing that everyone who thinks HTML/CSS isn’t a programming language is wrong, and then the only reason they feel this way is because of a prejudice against front-end developers. I think this is really just a wild leap in logical reasoning, personally.

    (No mention of Javascript/Typescript here by the way.)


    If you wanted to find the dev specialization with the most people who aren’t cishet white males, you’d pick frontend.

    Do we honestly believe the language around frontend is different purely by mere coincidence?

    … yes? His argument that HTML/CSS should be considered programming languages is honestly quite weak. Couldn’t that be the reason instead?


    Certain pursuits are validated with importance, dignity, and honor.

    Doctors; lawyers; architects; CEOs; software engineers.

    … we relegate others to the role of the sidekick - even though their labor is no less important, and they do at least as much to push the work toward success.

    Nurses; paralegals; interior designers; executive assistants; frontend developers.

    Who the hell is making these groupings?? Front-end developers compared to nurses? Software engineers to doctors? And software engineers being held in the same light as CEOs… wtf???

    (Surely it’s a coincidence the first group tends to be more male than the second.)

    Once again, he’s attributing his feelings with prejudice when really, I think his arguments are just very poorly thought out.

    Other forms of development are generally considered serious work. They’re important. They’re real computer science. (Computer science itself being a higher level of things we’ve decided are real, serious, and important—maybe not quite as much as medicine or law, but then again, maybe so in some circles.)

    Again, I don’t see anyone arguing or claiming this. I’m sure the author would argue that just because we don’t say it aloud, but it’s just implied, but I honestly just think no one says it because it’s just silly.


    Writing CSS seems to be regarded much like taking notes in a meeting, complete with the implicit sexism and devaluation of the note taker’s importance in the room.

    Though critical to the project, frontend work will quite often be disregarded by those who consider it beneath them (usually men, and usually only tacitly, never explicitly). It’s not serious enough; not important enough; not real enough. Too squishy. Like soft skills.

    Once again, just unfounded accusations of bias. “You didn’t say it, but I’m telling you that you said it anyway.”


    Their [software engineers’] output is easily measurable. A new API feature; a more efficient database; crises averted and crashes prevented. They go on charts and get presented to board members.

    Board members couldn’t give less of a shit regarding what software engineers do. We’re considered a cost that they’d love to get rid of as much as any other position. Look at all the AI hysteria going on right now, like Nvidia’s CEO telling people not to go into software because it won’t exist anymore. Again, I have no clue where this guy is getting his ideas from.


    If our job title does include the word “engineer,” it will almost certainly specify what we’re engineering. It’ll be UI engineer, or frontend engineer, or maybe the newer (and arguably more fitting) design engineer.

    But it’s probably not “software developer” or “software engineer” without any other qualification. Because that, tacitly, is not what we do.

    Completely disagree. Front-end development is a subset of software engineering. He even admits this as much:

    Sure, this is nuance of language and these titles serve to disambiguate. I get that.

    but then he goes on to dismiss that by saying “that’s not really it though, it’s really because we’re not considered real engineers”:

    by definition, somehow what we do isn’t seen as software engineering. It’s different than that. It’s softer than that.

    By what definition exactly? He just explained the reason for the difference in terms above, but then goes on to say that’s not really it - the real reason for everything bad is (what he perceives as) negative bias.


    There’s a couple interesting ideas in here. He makes a good point that layoffs on the front-end are more likely to hit underrepresented classes, though there’s not much that can be done about that. Layoffs are happening everywhere, and DEI is probably not what’s on CEOs’ minds when they make those decisions. And sure, there are unrealistic expectations at times, but that happens everywhere, not just in the software industry, but in pretty much any labor scenario.

    But overall, I think this guy has major issues with his self-perception. Pretty much all of his arguments are predicated on very poorly thought-out or straight up imaginary ideas. And blaming everything that’s wrong with his perception of front-end development on the white male hierarchy is just… I can barely even find words for it… nonplussing? I think he figured it out by the end of the article:

    Maybe I’m feeling sorry for myself. Maybe I’m just a little depressed right now. Maybe I have an inferiority complex and I’m projecting it on everyone else.

    I’m pretty sure it’s all of those.

    I wish this guy the best. Shit is hard right now. But I’d be a fool to say that I agreed with more than 10% of what he’s trying to argue.


  • My advice would be to learn C first (or at least develop a good understanding of it). It’s extremely important to understand how memory works in C so that you can understand pointers in C++; and also important to understand how functions work so you can understand classes and methods in C++. I would go through The C Programming Language. It’s fairly concise and while you don’t have to go through it cover to cover, you should at least understand the chapters on structs, pointers and functions (up to chapter 6, I believe).

    (Note that the wikipedia link that I posted above has a link to the full text of the book in pdf format.)

    The reason why I think it’s important to understand C is because when you learn C++, then you’ll understand how the language abstracts over a lot of the lower-level functionality in C. new in C++ supplants malloc in C for example, and your understanding of functions in C will map to more complicated concepts like constructors, destructors, copies, methods, and operators in C++. At this point, I would probably start learning how classes in C++ work. They’re basically structs with private member variables and methods defined in the scope of the class. learncpp.com, is the best reference that I’m aware of (it’s very thorough, which makes for a pretty slow read, but you’ll understand it very well). I would probably start with chapter 14 (introduction to classes), and then go back to the earlier chapters to fill in the gaps, but this is more dependent on how you think you learn best.

    Be aware though, that if you don’t have existing experience with OO development, then C++ is (in my opinion) not a great language to start learning it, because a lot of it is hacked on top of C and implemented in arcane ways in order to maintain compatibility with C. The first language I learned was Java, and it was really helpful to have that as a background for when I learned C/C++. I’m only familiar with Javascript on a procedural programming level, so I’m not aware of its OO functionality or how well that will translate to C++, but hopefully it works out.

    Good luck!