Programming thread

That's true of a lot of tools. As much as linux people fetishize the commandline, it's a wildly inefficient and error prone way to use a computer. It's good to know how to use it when the situation calls for it, but it should not be a lifestyle.
Took me some time to realize the CLI and minimalism were a meme. Imagine, Terminals are still emulators of teletype machines which emulate fucking printers. What the fuck have we been doing?
 
Why can't OS people do UX? Is it the autism? They just can't empathize with potential users?

Switching branches does not lose changes unless you're passing --force like mint chocolates. I agree that there are commands which may cause data loss, but basic git-checkout is not one of them.
I had the problem with an ide but they've since fixed it. I guess they must've been forcing it by default lol.

That's true of a lot of tools. As much as linux people fetishize the commandline, it's a wildly inefficient and error prone way to use a computer. It's good to know how to use it when the situation calls for it, but it should not be a lifestyle.
Keyboard is still wildly faster than mouse for most tasks, so I think we need some kind of third way. Besides, communicating all data as some kind of bespoke text file is just plain retarded.
 
Why can't OS people do UX? Is it the autism? They just can't empathize with potential users?
Partially, but engineers just think differently than most people. "Designed by an engineer" is derogatory when talking about user interfaces, and there's a reason for that. The UX guys and I mostly agreed, but sometimes they'd make decisions that I simply cannot wrap my head around. I would occasionally hard break from their designs just to show them what I was actually proposing. Sometimes I was correct and it ended up being a better design, but usually they were right and the user just ended up being confused by what I put in front of them.

Learning to program takes a lot of brain rewiring, and that's bound to have side effects at some point.

Keyboard is still wildly faster than mouse for most tasks, so I think we need some kind of third way. Besides, communicating all data as some kind of bespoke text file is just plain retarded.
Indeed. Hotkeys and context menus with clearly labeled shotcuts are usually the sweet spot. I rarely touch my mouse in my IDE setup.
 
Partially, but engineers just think differently than most people. "Designed by an engineer" is derogatory when talking about user interfaces, and there's a reason for that. The UX guys and I mostly agreed, but sometimes they'd make decisions that I simply cannot wrap my head around. I would occasionally hard break from their designs just to show them what I was actually proposing. Sometimes I was correct and it ended up being a better design, but usually they were right and the user just ended up being confused by what I put in front of them.

Learning to program takes a lot of brain rewiring, and that's bound to have side effects at some point.


Indeed. Hotkeys and context menus with clearly labeled shotcuts are usually the sweet spot. I rarely touch my mouse in my IDE setup.
I'd like to present Smalltalk 80 as evidence
 
  • Agree
Reactions: Considered HARMful
I use zip files with approximate date, time (guessed by the light outside; my RTC stopped working ages ago because battery's empty) and current mood as file name i place in my home folder. Nobody has complained so far which could be because I'm the only one who is capable of forth

so what's this git then
 
Wrote a Sieve of Eratosthenes today. It can compute the primes in the first million numbers in around 2 ms. It would be faster if our language used LLVM's optimizations, but we don't want to put up with UB.

Code:
sieve_size :: 1000000;
alloc_size :: #run: sieve_size / 8;
      root :: #run: heron(sieve_size, 20);

bitset := scratch_allocate_t{u8}(alloc_size);
memset_bytes(bitset, alloc_size, u8_2b_1111_1111);

current_prime := 3;
while: current_prime < root
{
    temp := current_prime;
    while: temp < sieve_size
    {
        if: get_bit(bitset, temp)
        {
            current_prime = temp;
            #break();
        }

        temp +=2;
    }

    double_prime := current_prime * 2;
           index := current_prime * current_prime;
    while: index < sieve_size
    {
        set_bit(bitset, index, false);
        index += double_prime;
    }

    current_prime += 2;
}

heron :: #expand: (n: s32, rounds: s32) -> s32
{
    guess := n/2;

    i := 0;
    while: i != rounds
    {
        guess = ( guess + (n/guess) ) / 2;
        ## the guess must be an overestimate. rounding errors can mess this up
        if: guess * guess < n
        {
            ++guess;
        }
        ++i;
    }

    return guess;
};

get_bit :: #expand: (bitset: *u8, index: s32) -> bool
{
    byte := index / 8;
    mask := #cast(u8, 1 << (index % 8) );

    return (bitset @ byte & mask) != 0;
};

set_bit :: #expand: (bitset: *u8, index: s32, val: bool)
{
    byte := index / 8;
    mask := #cast(u8, 1 << (index % 8) );

    selected_byte :=  bitset @ byte;
    selected_byte &= ~mask;
    selected_byte ^=  mask * #cast(u1, val);
    bitset @ byte  = selected_byte;
};

EDIT: I just added a -yolomao flag to the compiler that enables C/C++ style optimizations. I do not expect to use this much at all since I don't understand the details of what LLVM is doing, but it seems to work in this case and it makes the Sieve run in .7 ms.
 
Last edited:
So i have run into a fun time problem.

So i do mostly C++ and PLC programing. I have worked this last month on trying to get a product ready. It is more or less done and it was shown of a few days ago.
IT went perfect and they are willing to buy several machines and it will make us a ton of money.

How every they had a few demands. That is all normal so i took notes, there demands where Structured text is not allowed, but instead they want it in ladder. This is a massive amount of code they want in FUCKING LADDER!!! We are talking code to get several different CNC machines and different systems to work as one. Thousands of lines of code, function blocks and a system as a robust as it can be, but hey lets make fucking spaghetti code because a 89 year old electrician only knows ladder.

Every fucking company's wants to be able to change the code for some fucking reasons, how ever i have never seen any one actually do it.
 
So i have run into a fun time problem.

So i do mostly C++ and PLC programing. I have worked this last month on trying to get a product ready. It is more or less done and it was shown of a few days ago.
IT went perfect and they are willing to buy several machines and it will make us a ton of money.

How every they had a few demands. That is all normal so i took notes, there demands where Structured text is not allowed, but instead they want it in ladder. This is a massive amount of code they want in FUCKING LADDER!!! We are talking code to get several different CNC machines and different systems to work as one. Thousands of lines of code, function blocks and a system as a robust as it can be, but hey lets make fucking spaghetti code because a 89 year old electrician only knows ladder.

Every fucking company's wants to be able to change the code for some fucking reasons, how ever i have never seen any one actually do it.
If they're paying you to rewrite code you've already written, then what's the problem? You're still getting paid. (And if you're not getting paid, then sucks to be you: that's why you get all of the stakeholders to sign off on a requirements spec before any coding happens).

Also you type like a phoneposter.
 
Partially, but engineers just think differently than most people. "Designed by an engineer" is derogatory when talking about user interfaces, and there's a reason for that. The UX guys and I mostly agreed, but sometimes they'd make decisions that I simply cannot wrap my head around. I would occasionally hard break from their designs just to show them what I was actually proposing. Sometimes I was correct and it ended up being a better design, but usually they were right and the user just ended up being confused by what I put in front of them.

Learning to program takes a lot of brain rewiring, and that's bound to have side effects at some point.
dude, designers study alot of psychological stuff and effects to how get stuff working for the user, engineers/programmers are more results oriented and more than often end up making stuff to them by them, specific mindsets and all. i know a dude which is into UX and to be honest, he loathed his IT course because his own teacher didn't have any faith in him (chick literally codes AI's for a breakfast), however when the dude proposed anything on the desinger side there were tales of the teacher eyerolling, fast forward to the end of the last semester and almost all the class fucking failed including this dood and this teacher in question could not understand how they didn't get something it was "1, 2, 3" (turns out most of the people didn't had programmer mindsets at all, pair it up with how the term was planned and you have a trainwreck of a class). he gave me some great tips to design and stuff and i believe it influenced me as to why i'm leaning to more of a middle guy rather than full blown designer or full 010101 dev, i can translate binaryspeak to feelspeak between the teams no problem at all but can't fully dedicate myself to one or the other. i can also do the engineer thing and build my own thing to work with, that fullstack bootcamp was just perfect for me as i fit in the mindset like a puzzle piece.

one needs the other, no joke, don't badmouth designers, they go to alot of stuff just to manipulate the user into becoming comfy with your application, marry one if possible.

That's true of a lot of tools. As much as linux people fetishize the commandline, it's a wildly inefficient and error prone way to use a computer. It's good to know how to use it when the situation calls for it, but it should not be a lifestyle.
the thing is that people form a cult around that for question mark, no really, i can't grasp why at all. they even get pissy when people meme their asses...
 
If they're paying you to rewrite code you've already written, then what's the problem? You're still getting paid. (And if you're not getting paid, then sucks to be you: that's why you get all of the stakeholders to sign off on a requirements spec before any coding happens).

Also you type like a phoneposter.
Because i fuck hate to program in ladder and i am not hourly. I have deadlines to keep and that is it. Now boss is fine and have extended my deadline, but i bet that was only to stop me from fist fighting the buyer.

Ever try and get case switches into ladder, it sucks. Also no i am not a phone poster only bad at English.
 
  • Dumb
Reactions: secret watcher
I don't know how you nerds do it. Programming was the most boring, braindead thing I've ever attempted. Thank you for doing what you do. It is a art.
 
  • Feels
Reactions: moocow
Because i fuck hate to program in ladder and i am not hourly. I have deadlines to keep and that is it. Now boss is fine and have extended my deadline, but i bet that was only to stop me from fist fighting the buyer.

Ever try and get case switches into ladder, it sucks. Also no i am not a phone poster only bad at English.
I've written enough ladder logic to know that porting an entire project from a real programming language to ladder logic would be a fucking nightmare. I don't blame you at all for wanting to punch somebody.

Ladder logic is basically computerized relay logic. It's almost like asking for Verilog files instead of C++.
 
Because i fuck hate to program in ladder and i am not hourly. I have deadlines to keep and that is it. Now boss is fine and have extended my deadline, but i bet that was only to stop me from fist fighting the buyer.

Ever try and get case switches into ladder, it sucks. Also no i am not a phone poster only bad at English.
The fuck is ladder?
 
The fuck is ladder?
Have you ever seen an electrical one line diagram? Ladder logic is basically that, but digitized.

It does at least have sequential execution, so you can load registers and modify their contents in an orderly fashion, but it really gives the sense that it was designed for programmers who did pushbutton and relay logic.
 
  • Dumb
Reactions: Tortoise Soup
Because i fuck hate to program in ladder and i am not hourly. I have deadlines to keep and that is it. Now boss is fine and have extended my deadline, but i bet that was only to stop me from fist fighting the buyer.

Ever try and get case switches into ladder, it sucks. Also no i am not a phone poster only bad at English.
I imagine its hard to balance a laptop on a ladder. Have you thought of programming on a table?
 
That's true of a lot of tools. As much as linux people fetishize the commandline, it's a wildly inefficient and error prone way to use a computer. It's good to know how to use it when the situation calls for it, but it should not be a lifestyle.
A strong pro-Linux guy once explained it to me like this.

The upside of Linux is that it has a lot of freedom, flexibility, and power to do whatever it is you want to do.
The downside of Linux is that it has a lot of freedom, flexibility, and power to do whatever it is you tell it to do.
 
Why can't OS people do UX? Is it the autism? They just can't empathize with potential users?


I had the problem with an ide but they've since fixed it. I guess they must've been forcing it by default lol.


Keyboard is still wildly faster than mouse for most tasks, so I think we need some kind of third way. Besides, communicating all data as some kind of bespoke text file is just plain retarded.

I love doing UX programming, especially if I get to fuck with X,Y coords, bounds, frames, etc. Like a fun geometry problem.

UX People have their own set of autism though, especially if they do iDevice design. You have to argue with them for hours that their little fucking art project sucks when the user cannot figure out how to find the search bar:
"Duh, you just scroll up and do an extra slide. You get more screen real estate that way"
"It's a fucking search page with 5 search criteria, we're not hurting for screen space"
"This breaks design best practices X,Y,Z, and it will make the page unusable, you just don't understand art"

Because of this conversation, I made a shirt that said "fuck art" and gave it to everyone on the team.
 
I love doing UX programming, especially if I get to fuck with X,Y coords, bounds, frames, etc. Like a fun geometry problem.

UX People have their own set of autism though, especially if they do iDevice design. You have to argue with them for hours that their little fucking art project sucks when the user cannot figure out how to find the search bar:
"Duh, you just scroll up and do an extra slide. You get more screen real estate that way"
"It's a fucking search page with 5 search criteria, we're not hurting for screen space"
"This breaks design best practices X,Y,Z, and it will make the page unusable, you just don't understand art"
UX people are fucking weirdos like that. "Change for the sake of change" is a useless idea that seems to have just metastasized everywhere over the last decade or so.

Because of this conversation, I made a shirt that said "fuck art" and gave it to everyone on the team.
But did everyone clap afterwards?
 
I don't think IDEs are bad, but I think programming shouldn't be taught with them and if you work with them take a couple of weeks each year without them just to reset your brain.
I've been thinking about this for the past few days and I'm realizing I'm not taking that advice as well as I should. I've got some relative downtime at work, so I'm going to give this another dedicated go. I think I'll probably stick with gvim for now, but if there's another editor with REALLY GOOD vim bindings (the only decent one I've seen thus far is vsvim), I'm open to suggestions.
 
  • Like
Reactions: Shoggoth
Back