🔎 If you see an alert for analytics.usips.org, this is a self-hosted system I am running as a test. It is GDPR compliant and collects no invasive information.
Want to keep track of this thread?
Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading. Create account
To you guys who work in the industry how can you guys code for 8 hours straight? I can barley code for more than an hour and a half and im a hobbyist. How do you guys increase your stamina?
Usually you need to go test something out in a lab or go to a meeting or something which breaks it up a bit or you are sitting like 'wtf why didnt it work' without really typing anything its not like constant cooding
To you guys who work in the industry how can you guys code for 8 hours straight? I can barley code for more than an hour and a half and im a hobbyist. How do you guys increase your stamina?
Caffeine + know enough to not have to leave your editor + get into a flow state
It is possible to work on projects for 12+ hours straight when properly motivated and caffeinated. Doing that at work when there is not an urgent deadline is slaveish behaviour though.
To you guys who work in the industry how can you guys code for 8 hours straight? I can barley code for more than an hour and a half and im a hobbyist. How do you guys increase your stamina?
To you guys who work in the industry how can you guys code for 8 hours straight? I can barley code for more than an hour and a half and im a hobbyist. How do you guys increase your stamina?
The hands-on-keyboard time is vastly outweighed by the planning phase. Brainstorming, drawing diagrams, planning out flow of control, working in contingency handling outside the happy case, rubber-ducking, and a healthy amount of time away from the desk just to get a fresh pair of eyes when you're stuck. That will take up most of the day pretty quick. If you've gone straight from abstract idea that can be summarized in an email to writing code you're skipping several important steps.
To you guys who work in the industry how can you guys code for 8 hours straight? I can barley code for more than an hour and a half and im a hobbyist. How do you guys increase your stamina?
a good energy drink, snacks, and a well defined plan.
Also have part of the code I was planning on uploading to the sonic retro post but completely forgot:
Bash:
# ----------------------------------------------------------------- trig
# SIN[a] = round(256*sin(a*2pi/256)), built with an integer Taylor series;
# TAN[0..32] (scale 65536) drives the atan2 used for the loop's angles.
build_trig() {
local S=16777216 PI=52707179 a x x2 t s k q
local -a SHP
for ((a = 0; a <= 64; a++)); do
((x = a * PI / 128, x2 = x * x / S, t = x, s = x))
for ((k = 1; k <= 8; k++)); do ((t = -t * x2 / S / ((2 * k) * (2 * k + 1)), s += t)); done
SHP[a]=$s
((q = (s * 256 + S / 2) / S))
((SIN[a] = q, SIN[(128 - a) & 255] = q, SIN[128 + a] = -q, SIN[(256 - a) & 255] = -q))
done
for ((a = 0; a < 256; a++)); do ((COS[a] = SIN[(a + 64) & 255])); done
for ((a = 0; a <= 32; a++)); do ((TAN[a] = SHP[a] * 65536 / SHP[64 - a])); done
}
# atan2h dy dx -> A_: hex angle of the vector (dx, dy)
atan2h() {
local dy=$1 dx=$2 ax ay r lo=0 hi=32 mid i base
((ax = dx < 0 ? -dx : dx, ay = dy < 0 ? -dy : dy))
if ((ax == 0 && ay == 0)); then A_=0; return; fi
if ((ax >= ay)); then ((r = ay * 65536 / ax)); else ((r = ax * 65536 / ay)); fi
while ((lo < hi)); do
((mid = (lo + hi + 1) / 2))
if ((TAN[mid] <= r)); then lo=$mid; else ((hi = mid - 1)); fi
done
((i = lo, (i < 32 && r - TAN[i] > TAN[i + 1] - r) && i++))
if ((ax >= ay)); then base=$i; else ((base = 64 - i)); fi
if ((dx >= 0)); then ((A_ = dy >= 0 ? base : (256 - base) & 255))
else ((A_ = dy >= 0 ? 128 - base : 128 + base)); fi
}
isqrt() {
local n=$1 x y
if ((n <= 0)); then R_=0; return; fi
((x = n < 1210000 ? 1100 : n, y = (x + n / x) / 2))
while ((y < x)); do ((x = y, y = (x + n / x) / 2)); done
R_=$x
}
its angles for genesis physics done without any floating point.
Everytime I look something up now I'l click on the thread for a problem and half the answers are people smugly telling the OP he should've googled the problem before asking online, nigger I'm literally doing exactly that and your reddit smugness making my internet searches useless.
Everytime I look something up now I'l click on the thread for a problem and half the answers are people smugly telling the OP he should've googled the problem before asking online, nigger I'm literally doing exactly that and your reddit smugness making my internet searches useless.
Be sure to post a reply saying as much, either to sway the search engines that later crawl it to realize the actual answer isn't in the page they're crawling, or so that their dressing-down is at least preserved in the crawler's cache for the next poor schmuck to chuckle at when he inevitably clicks on the same search result.
Google pays reddit handsomely to be permitted to train their bots on reddit's "vast knowledge." Might as well help contaminate/bury bad results.
Are there any good resources for "modern" webdev/hosting/general sysadmin stuff? Security in particular. Most of what I've found is usually either "why don't you just use github/wordpress/youtube/etc. they're free!" or people whose first and last thought of security is "docker". I just want a nice little web 1.0 homepage to put my stuff so it isn't scattered across the web, available at the mercy of big tech.
I've been reading Mozilla's references at https://developer.mozilla.org/ and aside from the embedded demos (and the search function, smh) the site works fine without JavaScript, the drop down/expandy menus work, and the little arrows even change! We are truly living in the future.
The main meat of this project is git, I don't want a self-hosted github, even cgit is more than what I want. I wrote a (Fast)CGI script that serves a hyperlinked directory listing of a repo and displays a selected file (with markdown parsing and syntax highlighting via treeesitter). Anything related to CGI is apprently forgotten knowledge at this point, but has sanitising user input and escaping special characters changed all that much over the years? How do people usually do things these days? I'm not looking to become a webdev proper, but I'm curious if anyone has come up with something better in, what, 30 years? Does anyone still use Python/WSGI?
I have a git daemon running which allows unauthenticated read-only access. I have write acces via ssh and I've set sshd to use publickey authentication only. For good measure, I've also changed the git users shell to git-shell which is an extremely restricted shell that exists specifically for this purpose, and I wrote a small shell script that wraps git init and rejects "bad" repo names, and I've used the ChrootDirectory option of sshd to dump the git user in a directory that only contains the git repositories and the bare minimum required to run my script. (instead of being lazy and bind mounting the entire universe into the chroot)
I think that the potential attack surface is as small as I can reasonably get it.
I've read a bunch of shitty "articles" about ssh security; Most of them seem to just be regurgitating the same "best practices" without any explanation or understanding; e.g. a lot of them suggest changing the port, but, given the speed of modern computers and network connections I can't imaging poking every port will take that long (especially if I just change it to the second most commonly used port, 2222) so it will probably be more of an inconvenience to me than any potential attacker.
I think this is my favourite SSH security tip so far:
Display a Warning Banner
You can display a legal warning banner before authentication. Create a banner file:
sudo nano /etc/ssh/banner
Add your warning text:
/etc/ssh/banner said:
Authorized access only. All activity is monitored and logged.
It's been a bit slow and I keep getting distracted, but it's starting to take shape. =)
I had a look at Docker and it's everything that I have come to expect from modern software development.
shit website that:-
takes more that one second to load the page
loads large images which are then "resized" by the client instead of loading thumbnails
doesn't work properly without javascript
has excessive animations that serve no purpose
still uses "cards" (do they still call them cards? or have the renamed them like they renamed pop-ups?)
seems to be designed for mobile (who the fuck is running docker on mobile???)
overly complicated "industry standard" so they can larp as "enterprise" level "engineers" and pretend that their generic CRUD slop is worth something
absolute dogshit website
endless medium blogposting written by jeets that contains zero information
how the fuck is the website this bad?
forum is "powered by discourse" (which intentionally serves proken pages which are then "fixed" by javascript client side)
I don't think that I could even make a website this bad if I tried.
SAAR COMPOSE UP THE DOCKER SAAR
So then I started looking into LXC, so much for Docker simplifying and streamlining containers... Maybe I'm missing something, but LXC seems far easier to work with. Maybe the "generic solution" complexity hit Docker hard. I suppose the "build scripts" would be nice and work fine if all that you were doing is plug-and-play LEGO brick "development" that you needed to rapidly destroy and recreate on a whim.
Then I fell down a rabbit hole and starting looking at the underlying tech which was all pretty straight forward (aside from some very unhelpful error messages) until I got to cgroups... (most of my issues so far seem to have been systemd related?) I've got something that at least looks like a container, along with a bunch of scripts that haven't fallen apart yet, and it even works and does what it's supposed to! It's certainly been more fun to learn than Docker.
Homie, that's a fun rabbit hole. Wait until you discover SOCI (Seekable OCI) and lazy-loading. That shit will prove (better than anything else) how useful and fast containers can be. Imagine being able to launch a container and have it performing useful/meaningful work, serving requests, etc., before the image has even been fully transferred to the host running it. SOCI/lazy-load can do that -- as it turns out, for most images over 250MB, the actual "working set" of data required for startup is only about 6% of the total data. lxc doesn't support it, though runc/crun does via containerd+soci-snapshotter. It's not really a flaw or feature gap; they do different things. liblxc and tools lean closer towards lightweight VMs, with support for nested containers; runc is a one-shot OCI runner that spins up the container, launches PID 1 and gets out of the way, relying on an orchestrator (CRI-O, podman, docker, etc.) to kick things off.
The container runtimes not called "docker", despite having their own quirks and issues, almost always do things better than docker does, where "better" has varying meanings like "faster," "easier," "with fewer resources," "with fewer security issues" and "with less corporatization." There's a reason stuff like the kubernetes toolchain didn't standardize on docker, but on the lower-level CRI, which is implemented by stuff like containerd and CRI-O (because even Docker itself doesn't fully implement CRI, lol).
I hate what containerization has done to the security "model" in most people's heads. "Oh everything's just disposable, throw it away and start a new one!" is a terrible way to think about security. It just means all the potentially useful forensics and information that gets churned out during a given run is conveniently discarded by default now, so "troubleshooting" turns into either "hoping the webshit team actually added that logging blurb you gave them so there's some hope of useful logging landing in your external logging tools" or "wowing everybody by shelling into the container and fucking reading its output as it runs and watching it do shit and you're a god now because nobody ever thought of just shelling into it before".
Most of the time people don't even think about the most basic shit imaginable anymore when setting up containers. Even something as simple as "specifying the process' effective UID and PID" is an afterthought not even mentioned by many major "docker-preferred" tools and sometimes not even supported by whatever's been haphazardly wrapped in a container to begin with.
Are there any good resources for "modern" webdev/hosting/general sysadmin stuff? Security in particular. Most of what I've found is usually either "why don't you just use github/wordpress/youtube/etc. they're free!" or people whose first and last thought of security is "docker". I just want a nice little web 1.0 homepage to put my stuff so it isn't scattered across the web, available at the mercy of big tech.
I feel like I don't fully understand what you're looking for, but if the answer is "somewhere I can host CGI scripts," your best bet would probably be to get a cheap VPS and set up Nginx to serve your script with SCGI. If your scripts don't need much RAM and you don't expect much traffic, you should be able to find a plan for $5-10 a month that suits your needs.
If that's not what you're asking for, give us a bit more info.
For new grads it’s become the norm. Some students in my lab just told me they had to install some botnet chrome (yes, only chrome) browser extension to do an online test. Those tests are now multiple parts, where its personality, then “what would you do if a coworker stole from the company?”, then finally a leet code problem, all with an LLM chatbot to talk to. No word on what the browser extension is even doing but I’m sure it’s some sort of monitoring software.
Haven’t posted in a while here about my programming project., but I had to abandon Odin sadly. I really love the language and the syntax, I think Gingerbill did a great job on those parts. The language is just too new to be productive in it. Anytime you want to interface with something it was a night spent making C bindings, or debugging the bindings that someone else made. Some of the “batteries included” bindings even have bugs but the Odin team seems too focused on pushing out a 1.0 Odin release to care. Hope to come back to it in a few years and see how it progressed.
Just Whole Care (JWC) is a California health-equity consulting firm building Assessment Lab (AL), an AI-assisted platform our team uses to turn complex organizational, financial, clinical, policy and operational evidence into assessments, decision tools, financial models and client deliverables.
All right. An AI evaluation and decision-making tool.
We are looking for a genuinely senior software engineer for a bounded, part-time contract engagement to stabilize and simplify AL and help us successfully deliver the next phase of the product for two active client engagements.
This is not a greenfield build and not a mandate to redesign the platform.
So you have an existing system and are not interested in a rewrite. Okay. Cool to be explicit about that sort of thing, I guess. Also, I like the "genuinely senior" part - I can see the person who wrote this may have been exasperated by underqualified applicants.
Your first mandate: make AL boring
Before adding significant new functionality, you will help us make the existing system predictable:
Make assessment runs reliable.
A new real-world organization should be able to enter AL, progress through its stages, checkpoint safely, resume when necessary and complete without routine engineering intervention.
Make recovery simple.
Failures should be diagnosable and recoverable without stale workers, stuck state or manual command-line archaeology.
This part goes on for a bit, but the gist seems to be that the existing system is a bit of a mess of non-deterministic behavior, incomplete backups, tasks that constantly get stuck, and manually mangling data in production. It sounds like a real disaster. Is this some sort of project where they got something half-baked delivered by a previous contractor and now they're trying to bring in someone new to salvage it? Or maybe…
How we use AI development tools
JWC uses Cursor and advanced language models extensively in engineering.
We are not hiring someone simply to type code that an AI agent can produce.
We expect approximately 60–70 hours of work, generally 5–10 hours per week, with somewhat heavier involvement at the beginning and flexibility around releases or production incidents.
I feel like I don't fully understand what you're looking for, but if the answer is "somewhere I can host CGI scripts," your best bet would probably be to get a cheap VPS and set up Nginx to serve your script with SCGI. If your scripts don't need much RAM and you don't expect much traffic, you should be able to find a plan for $5-10 a month that suits your needs.
If that's not what you're asking for, give us a bit more info.
Basically, I want the ethos of yesterday with the technology of today. (anyone have a spare book of ancient tribal kowledge?)
I have the bones of what I want running in a VM (currently moving to an LXC container), just need to flesh it out now, but, most of my knowledge is old (the last thing that I hosted publicly was minecraft beta 1.8) and I don't want to just assume that nothing has changed. I believe that my set up would be secure enough if I were to go online ~15 years ago, but in the age of "AI" and obscene levels of computing power readily available for automation, any attack surface is greatly magnified. Cloudflare is everywhere now for a reason, but I don't know if it's a good reason or just "well, everyone else is using it". Maybe I'm too paranoid that I'll go online and immediately become part of a botnet.
I like looking at new tech and I'm always disappointed when it's shit. Modern web development all seems to be frameworks, microservices, and other buzzwords now, and I just don't need infinite, on-demand, horizontal scaling capacity. This isn't the future that I want to be a part of.
Everytime I look something up now I'l click on the thread for a problem and half the answers are people smugly telling the OP he should've googled the problem before asking online, nigger I'm literally doing exactly that and your reddit smugness making my internet searches useless.
There's something weird going on in the Godot subreddit where if your game isn't like some happy clappy troon game with a heckin' quirky mechanic then good luck getting help on a problem, you'll just get bumped off and told to go Google it.
I like looking at new tech and I'm always disappointed when it's shit. Modern web development all seems to be frameworks, microservices, and other buzzwords now, and I just don't need infinite, on-demand, horizontal scaling capacity. This isn't the future that I want to be a part of.
I still don't entirely understand what you're asking for, but if you're asking if you can host a web site by just pointing a web server at a directory of HTML files, yes. This is called "static hosting" now and is still a very common approach for sites that don't need to change often.
I run my website on Apache2, static everything, and no TLS since I'm not going to ask some cocksucking certificate authority for permission to have a website. The insecurity model of the WWW is so fucking insane that there's no point in trying to make sense of it. Do everything that requires authorization in the underlying system. I just upload changes through Emacs' tramp via SSH.
Go learn Phoenix. Not even kidding. Yes, it's a framework. It's okay though. You'll live. It's worth it.
What you get alongside learning Phoenix (namely learning Elixir and its progenitor language Erlang and its runtime BEAM) is the real win.
Erlang is a functional programming language developed in the mid '90's by Ericson to run their telephone switches with 7 9's uptime (99.99999%) or better, including hot code swapping without shutting down or rebooting the switches or even stopping the program being updated. And yes, that actually works. Turns out it's astonishingly good at building disgustingly robust systems (not just in terms of "scale" but in terms of "even when shit breaks it still works").
Elixir runs on the same runtime as Erlang and is able to interface and interoperate with it, use its standard library along with Elixir's own, and is just as performant.
That's your "yesterday's ethos." It's well-maintained and been consistently modernized as time goes on, and Phoenix does things no other web framework I've ever seen can do, and is a most-assuredly "modern" technology.