Programming thread

That kind of stuff looks like fun but after solving concrete client problems all day, I don't really look forward to solving abstract "just-for-fun" problems for free. Maybe if I didn't have any gigs lined up…
I feel you, but actually that's the reason I'm enjoying this to be honest. I spend so much time at work lately fucking around with TensorFlow stuff and GUI nonsense that it has been refreshing to just get back to the basics.

I might get bored of it before the end, but for now it's pretty fun.
 
I feel you, but actually that's the reason I'm enjoying this to be honest. I spend so much time at work lately fucking around with TensorFlow stuff and GUI nonsense that it has been refreshing to just get back to the basics.
Yep. I wish I were in a programming job where I could do advent of code stuff all day long. It's rare that I get to write anything close to an honest to gods algorithm at work.
 
Yep. I wish I were in a programming job where I could do advent of code stuff all day long. It's rare that I get to write anything close to an honest to gods algorithm at work.
It's rare to come across a problem that doesn't already have an algorithm written for it.

Though with google search turning to shit and github search being how it is, I'm finding myself needing to write my own more and more these days.
 
That kind of stuff looks like fun but after solving concrete client problems all day, I don't really look forward to solving abstract "just-for-fun" problems for free. Maybe if I didn't have any gigs lined up…
Depending on the specifics your industry, company, and seniority, you can end up spending so much of the workday stuck in pointless meetings/calls with middle management and other non-SWEs who just want to chew up time talking about some useless project minutia that you end up coding in your free time because you miss it and/or want to keep your skills sharp.

Also, F in chat for @SIGSEGV. I hope they let you install Linux distros on the Federal Prison inmate computers.
 
It's rare to come across a problem that doesn't already have an algorithm written for it.

Though with google search turning to shit and github search being how it is, I'm finding myself needing to write my own more and more these days.
It's rare to find a library with the algorithm you want that doesn't add 3-4 extra dependencies thanks to the devil's deal offered by the packager manager systems for modern languages; now, what about one that's not mired in verbose, in-source documentation, slavish to a fault in following whatever contemporary "best practices" were at the time of its development, and most importantly: actually close to being performant in relation to the context of your particular problem? A true unicorn.

These days I tend to write my own versions of things unless the library is small and self-contained (header-only, please) or is saving me from a black hole, systems kind of nightmare; it's not always as time efficient but it's far more interesting, rewarding, and lets me write more simple, direct solutions that benefit from the tight constraints of the specific problem.
 
It's rare to find a library with the algorithm you want that doesn't add 3-4 extra dependencies thanks to the devil's deal offered by the packager manager systems for modern languages; now, what about one that's not mired in verbose, in-source documentation, slavish to a fault in following whatever contemporary "best practices" were at the time of its development, and most importantly: actually close to being performant in relation to the context of your particular problem? A true unicorn.

These days I tend to write my own versions of things unless the library is small and self-contained (header-only, please) or is saving me from a black hole, systems kind of nightmare; it's not always as time efficient but it's far more interesting, rewarding, and lets me write more simple, direct solutions that benefit from the tight constraints of the specific problem.
tip: whatever you're looking for, just put 'tiny' in front of it. tiny aes library. tiny string hash library. tiny sqlite library.

That usually gets me what I'm looking for without boost-style bloatware attached.

also check out https://github.com/fffaraz/awesome-cpp
 
Boost is a plague, and the Boostification of the C++ standard is a plague. Just wanted to get that off my chest.
fwiw, the standards committee has done a pretty decent job of tard wrangling the boost guys. it's not perfect::but.at::least<I>::don<t, (have)>.to.fucking->type error compilation failed [unknown] [cl.exe exited with code 1].
 
are any of you doing this year's advent of code?
Now i am.
Going to do them here and there for some basic code practice and they are kind of fun.

Any way time to vent.
So i got a deadline Monday for some implementation for some search algorithms we are testing for a proof of concept. I did them and they are done, but there is a big hole in my code right now with the words */ Insert move function /* as some one else should get that part ready.

I finally got the code......it is over a 1000 lines written in fucking main....I want to die.... Who the fuck writes code in the main in c++.
OH yeah and no comments. There are random functions in that code i don't know what they do or why they are there, but fuck if i am touching it.

I got it sorted and made into proper fucking function and could get every thing to work, but what the hell man.
 
Any way time to vent.
So i got a deadline Monday for some implementation for some search algorithms we are testing for a proof of concept. I did them and they are done, but there is a big hole in my code right now with the words */ Insert move function /* as some one else should get that part ready.

I finally got the code......it is over a 1000 lines written in fucking main....I want to die.... Who the fuck writes code in the main in c++.
OH yeah and no comments. There are random functions in that code i don't know what they do or why they are there, but fuck if i am touching it.

I got it sorted and made into proper fucking function and could get every thing to work, but what the hell man.
If it's not copyrighted, pastebin it somewhere and post the link. Haven't seen much of C++ abominations since I got bored with TDWTF.
 
If it's not copyrighted, pastebin it somewhere and post the link. Haven't seen much of C++ abominations since I got bored with TDWTF.

Nah it is still code for work, but it gets worse. We agreed to get this work done Friday and Saturday, i have stuff to do Sunday. Friday we where not done and there where some boring ass meetings that took about 4 hours longer then it should, hey no worry's. Get up early and get shit done Saturday we got plenty of time. Well he did not have time until midday. I will code the rest until then, but i need his help to walk me through the code so i can get some stuff done faster. Plus help with comments, documentation and testing.

I have yet to hear from him. He better be fucking dead. How ever i am afraid he thinks that i will get every thing done and he can relax. It is True i will get all of it done, but there will be hell to pay.

Not the first time this has happened. For some reason some people think my willingness to work extra and help out means i am push over. No i am friendly and i love to help out, but i will fucking carry a grudge. Well i have gotten my self some energy drinks, some pork rinds and some vegies as snack. Time to get this shit done and then come Monday i will go to my boss and we will have a little chat.

Fucker right now is dead to me and i know for fact that he needs my help with getting camera and arm wired op. For the next step, i don't need him he is only there to save me time.
 
I finally got the code......it is over a 1000 lines written in fucking main....I want to die.... Who the fuck writes code in the main in c++.
OH yeah and no comments. There are random functions in that code i don't know what they do or why they are there, but fuck if i am touching it.
But don't you know that "the code is the documentation"!?
 
Last edited:
Yep. I wish I were in a programming job where I could do advent of code stuff all day long. It's rare that I get to write anything close to an honest to gods algorithm at work.
if ur good enough you could get a job in academia working on new algorithms. but just be aware you're competing against a bunch of chinese and russian guys who are really good at algorithms.
I've thought about making that my career path instead ofmy current study but I think it's difficult to pull off and may be a "grass is greener" bias
In fact I have thought about going into academia vs industry. I have not decided which as each as its own headaches to deal with.
 
Last edited:
if ur good enough you could get a job in academia working on new algorithms. but just be aware you're competing against a bunch of chinese and russian guys who are really good at algorithms.
:optimistic:
For real, it's not as bad as you think. There's a lot I could say about the "chinese and russian guys who are really good at algorithms" but this isn't A&H so I'll be nice. But trust me, it's not as dire as that.

I've thought about making that my career path instead ofmy current study but I think it's difficult to pull off and may be a "grass is greener" bias
In fact I have thought about going into academia vs industry. I have not decided which as each as its own headaches to deal with.
Academia has it's own set of headaches, but if you want to go for it, go for it. And you can always mix-and-match, too. A lot of people I know developing all sorts of algorithms and cutting-edge research stuff are doing it at the behest of an employer (and drawing the large "fuck you" salaries typical of industry while they're at it).

I promise there's room for you. 👍
 
I'm not talking about writing novel algorithms in theoretical CS. I just mean doing more than mucking around with configuration parameters, gluing together REST endpoints, writing another boilerplate database query, or figuring out how to unfuck a tortuous codebase so that we can hack in some mostly trivial feature. This seems to be the sort of thing I do most days, and it's not about getting a computer to do a non-trivial computation. It's about getting a computer to do something that should be trivial, but which instead requires a huge amount of negotiation with the rest of the software stack.

It's punctuated. I occasionally get an interesting problem to solve. But I'm still thinking that I should get out of web development (including backend).

:optimistic:
For real, it's not as bad as you think. There's a lot I could say about the "chinese and russian guys who are really good at algorithms" but this isn't A&H so I'll be nice. But trust me, it's not as dire as that.
Yeah, it's not even close to that. But academia does have its share of bullshit, especially with the publish-or-perish situation, which you inevitably have to game.
 
Last edited:
Before it only false-ed if "n". Now:
Code:
fn question_overwrite_path(path:&Path) -> bool {
    if path.exists() {
    let message = format!("Are you sure you want to over write the file \n `{}`? \n Hit y for yes or n for no then [enter] ",path.display());
    let ask = || get_input(&message);
    loop {
        match ask().as_str() {
        "y" | "yes" => break true,
        "n" | "no" => break false,
        _ => continue,
        }
    }
    } else {
    true
    }
}
It's much longer and equally useless.
 
Last edited:
:optimistic:
For real, it's not as bad as you think. There's a lot I could say about the "chinese and russian guys who are really good at algorithms" but this isn't A&H so I'll be nice. But trust me, it's not as dire as that.


Academia has it's own set of headaches, but if you want to go for it, go for it. And you can always mix-and-match, too. A lot of people I know developing all sorts of algorithms and cutting-edge research stuff are doing it at the behest of an employer (and drawing the large "fuck you" salaries typical of industry while they're at it).

I promise there's room for you. 👍

I've always had interest in algorithms. I used to do CodeForces and Project Euler before I was busy. I took a mini course on competition programming which was a lot of fun because there was no pressure. But I was never that good at it and at my undergrad CS I would be at best middle of the pack (in my defense, the CS program people are all very good). I wonder often if I had been less lazy (or perhaps more autistic) if I would be really good at coding or math by now. It's fun but useless to think about "what if" scenarios. Anyway from time to time I have thought about what it would be like in academia. I have some peers who are really talented in math and I think they are more deserving of doing cutting edge research. There's probably a little room for the rest of us. I might talk more about it in PM - I am probably already power leveling as I like to do that
 
  • Feels
Reactions: Yotsubaaa
Back