Tumgik
codingwhilequeer · 4 days
Text
I made a support request with a vendor asking if there’s a way to leverage the logic they already have for determining what counts as a business day (it is very critical that this is done exactly correctly and that it never breaks in the future if nobody is maintaining it) when using their API since I didn’t want to have to maintain a separate source of truth for it, and in their response they said:
it is not too hard to do date/timestamp arithmetic
which any developer who has done date/time arithmetic knows is the understatement of the century
Famously everyone thinks so until they take down an important system by forgetting about DST, or leap years, or that leap years don’t happen every 100 years, or that they do happen every 400 years, or not considering implications of people using different calendar systems, even if they’re just slightly different like having weeks start on a different day, or they consider whether the first week of the month is the first full week or the partial week before that, or they format it in a different order.
Then when they finally think, “OK, but I know about that,” then they learn about the leap second, or the negative leap second.
So yes, date math is “too hard”.
#“it is not too hard to do date/timestamp arithmetic” is now the latest addition to the list of phrases that make me want to start killing#for context: many moons ago i was a software engineer at a company that made *really* precise clocks. for like. industrial purposes#im talking about sub-nanosecond accuracy shit. think CERN’s white rabbit project (not the tv show) and you’re on the right track#anyway. these clocks are “just” a microcontroller and an oscillator (crystal or atomic) or two and a gps chip#oscillators drift over time so after a while your clock gets out of sync which is why the gps chip is there#the gps chip gets the time from whichever gnss satellites are overhead and using some basic geometry can work out the delay on each message#and that information is fed to the microcontroller which then disciplines the oscillator to correct the drift. et voila. precision timing.#but once that information is worked out you’ve gotta communicate that to whatever devices on the network are supposed to care about it#as it turns out ntp is really really inaccurate and slow thus you get alternate protocols like ptp and its variants which get… complicated.#ptp requires you to calculate line delay and the offset between utc and international atomic time and a bunch of other shit#and so of course my entire job was timestamp arithmetic. that was the whole point of everything. and it was fucking nightmarishly hard#so anyone who says timestamp arithmetic is “not too hard” is either a fucking liar or really fucking stupid#on a related note im pretty sure at least half the views on that video are from my former workplace. we got a lot of mileage out of it
572 notes · View notes
codingwhilequeer · 24 days
Text
Tumblr media
This story of tech firm Palo Alto using women literally dressed as sexy lamps for their event at a cybersecurity conference (and getting massive blowback from women in tech) has been going around, and it feels like some weird combination of the 00s era of video game "booth babes" (when I saw the story I was like "what year is it?") combined with somebody thinking Kelly Sue DeConnick's "sexy lamp test" was an instruction manual. >_>
Tangentially, I feel like if there was a comic book supervillain whose gimmick was lamps, they'd probably have minions dressed like this.  
2K notes · View notes
codingwhilequeer · 5 months
Text
Tumblr media
lmaooo
64K notes · View notes
codingwhilequeer · 1 year
Text
Tumblr media
Me reviewing PRs
54 notes · View notes
codingwhilequeer · 1 year
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
21K notes · View notes
codingwhilequeer · 2 years
Note
I loved your bit on ao3, but I have a question! Why is ao3 a miracle? I know next to nothing about tech in general and would really like to know! I know that it has a /lot/ of stuff to manage but I’d really like to know more!
Ok, I’ll bite.
For starters, zz9pizza did up a better tech breakdown than i ever could here: https://zz9pzza.tumblr.com/post/616408796841000960/insert-normal-disclaimer-about-personal-opinions. If you want more info on the technology, I’d poke around there.  But basically, the Christmas miracle part comes from two things:
Everyone’s volunteering! Christmas spirit! Yay!
AO3 is delivering a best-in-class website, on-premise (not in the cloud), using generic hardware (Supermicro is the server equivalent of a soda can that says COLA on it), and using free software. This is the most cost-effective way to deliver a service and while it’s becoming more accepted it is certainly not the norm.  
Those two things by themselves aren’t particularly miraculous, but the devil’s in the details. Supermicro’s documentation is ass, which means setting stuff up can take a while. And they’ve set up quite a bit. The work they’ve done on these servers runs from the commonplace (nginx “doing full page caching, html optimisation, priority queuing and sending load to the back-end”), to the more advanced (SYS-5018D-FN4T generic servers configured as pfsense firewalls) to the kind of modern magic that makes tagging and complex searching work (elasticsearch). 
Elasticsearch does indexing. What indexing means in this context, very briefly, is tying related documents and bits of data together. For very simple use cases (like logging, Elasticsearch’s primary use case) this is pretty easy to maintain. For tagging in AO3, which is dealing with non-predictable items, categories, relations, loads etc, you need to know what you’re doing or things can go sideways very quickly. Like they did lat year with the page slowness. I’m going to highlight a section of zz9pizza’s post:
We spent quite a lot of time looking into it and made both code changes and other systems changes, and people from elastic reached out to us and gave us advice ( thanks for that :) ).
We ended up working out that the main issue we had was that bookmark searching could eat all of our search capacity so we did some work behind the scenes to ensure that those requests went into a separate queue. That queue was limited to allow only a few of those searched to run at once. Once we did that the cpu load on the elasticsearch which had been hitting 100% started topping out at about 70%.
Two things stand out here to me. One, elastic.co, a notoriously money-grabbing corporation volunteered help. Sure, they were probably individuals and not the corporation but a) in the US at least a corp can absolutely say “don’t fucking do your job for free” (whether its legal is another matter but haha capitalist utopia) and b) the people at elastic get paid very well to figure this shit out. That’s high quality volunteering. And the second thing that stands out is that the AO3 team then managed to re-architect their app to mitigate this in approximately (someone fact check me here) two weeks on volunteer time. Those people have mentally exhausting jobs and came home to bang out fixes in their spare time in a fraction of the time corporate dev teams do.
I just... Look, none of this is particularly magical. The hallmark of any good sysadmin or programmer when faced with new and unfamiliar technology is the ability to say “Gimme some time to figure it out” and then roll up their sleeves and get to work. The magic comes from loving an idea enough to want to do that well-paid work for free, at times of stress and for repeated abuse on this bluehell website. 
That, and being able to buy 5 servers for $60k. Like, actually fuck off. 
2K notes · View notes
codingwhilequeer · 2 years
Text
people will be like “fanfiction writers!!! are everything”
and then turn around and say a website that doesnt pay the writers they make their traction and money off of is a saint that would do no wrong.
im just saying. ao3 gets their money
those writers dont. lmao.
so whyre you making it about the writers when they could post pretty much anywhere huh? 😂 and youre only paying a website.
30K notes · View notes
codingwhilequeer · 2 years
Text
Tumblr media Tumblr media Tumblr media
32K notes · View notes
codingwhilequeer · 2 years
Text
An Etsy programmer trained Markov chatbot versions of some former coworkers, and then when people grew tired of them, moved them to a private chat channel where they could continue to post messages to each other.
Unattended: 1. The chatbots continued repeating commands that the Etsy employees had used including 2. Inviting the command-executing bot into the chat, which then 3. Started executing their commands but 4. Although they could have given commands to kill processes and take down servers their commands were all to give their friends kudos
The potentially highly destructive bug was discovered when one of the bots��s friends, who happened to be a current real employee, mysteriously obtained 30,000 kudos overnight.
Source
1K notes · View notes
codingwhilequeer · 2 years
Note
I’m extremely technologically illiterate and Im super overwhelmed by all this security stuff. I’ve seen your post about password managers, but what are the next best few things I can do to stay safe on top of that? Like a few things for a must-haves list?
Absolute top of the list is Password Manager - if you do nothing else, the password manager should be the thing you do. Using a password manager (some more info about that here) is something that will immediately make you safer online.
Second on the list is enabling multifactor authentication in the places where it's possible to do so (and store your MFA recovery keys in your password manager!).
Probably the best thing that everyone can do for their privacy generally is to start using firefox with ublock origin, privacy badger, decentraleyes, and facebook container.
Like, people don't think about it but Ublock isn't *just* about blocking ads - blocking ads is important because one of the primary ways people still get infected online is by clicking on a link that takes them to an unsafe site. Blocking ads prevents a LOT of that not only because some ads are skeevy and dangerous (many are!) but also because when the ads are stripped away most websites are MUCH clearer in terms of what is or is not safe to click.
161 notes · View notes
codingwhilequeer · 2 years
Text
People send me AI-generated articles sometimes.
Tumblr media
Are Budgie Smugglers Back In Fashion? June 9, 2022 Budgie smugglers have made a comeback in fashion.
Budgie smugglers are a type of clothing that was once popular in the early 1900s. They were made out of a thick cotton fabric that was dyed a bright blue. They were popular because they were comfortable and cool.
Now, however, Budgie smugglers are becoming more popular for their unique and stylish look. They are often worn with a bright and colorful skirt or blouse. They make a great addition to any outfit.
Are Budgie Smugglers Back? Budgie smugglers are back and they’re looking for a new place to commit their crimes. According to a recent study, the average Budgie smuggler is making around $5,000 a year. So if you see a Budgie smuggler in your area, be sure to report them to the police!
full AI-generated article archived at Wayback Machine because the future needs to know about this
403 notes · View notes
codingwhilequeer · 2 years
Text
nothing like spending your day watching extraordinarily large files extract, realising you done fucked up the file permissions, deleting the whole thing, and then extracting it again
0 notes
codingwhilequeer · 2 years
Text
I said it in the notes on the last post but I’m gonna say it again.
I’m married to someone with severe memory problems. Automation of household appliances & systems helps him a lot and helps me a lot because it reduces the number of things I have to keep in my brain at all times. I love doors that lock themselves, being able to schedule dog food being delivered, a thermostat I can manipulate from wherever. Beyond my little bubble it should be noted that voice controlled appliances can be really good for people with mobility concerns. Appliances that can measure and talk and remember little tasks can be such a blessing for people.
I will never forgive Amazon and Google for taking technologies that could be really helpful and weaponizing them, and fuck everybody who acts like its some kind of conspiracy theory that those devices are spying on you. You absolutely should be distrustful of those devices but just make sure you’re getting angry at the right people.
118K notes · View notes
codingwhilequeer · 2 years
Text
It's very easy to say that magic doesn't exist, but ultimately computers work by channeling lightning through a series of crystals, so who's really to say.
77K notes · View notes
codingwhilequeer · 2 years
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
764 notes · View notes
codingwhilequeer · 3 years
Text
Tumblr media
couldn’t stop giggling about this idea so i threw together a quick edit
159 notes · View notes
codingwhilequeer · 3 years
Photo
you know what im just gonna leave my tags here because im right actually
#when the tech industry combined ux design + web marketing into a single role. #that was possibly the worst thing they ever contributed to the internet. #literally most ux design these days is about product placement + ad revenue + maximum profit #its not about usability or accessibility anymore. its about how much your clicks are worth to the company #thats why youtube is a usability NIGHTMARE and is so stuffed full of ads #and why a good 50-70% of those ads are for services to remove those ads #its such a scam. biggest con ever pulled by an entire industry since. like. the stock market. #you will really struggle to find a ux course these days that doesnt focus on this ad placement for maximum profit bullshit #there are a few people out there who are still really passionate about making good ux and still teach that #but theres an increasing focus in tech education (particularly at tertiary level) on teaching what what the industry says they need #which means that unfortunately ux design is becoming a marketing field. #its no longer about best layouts + element sizes + color schemes + fonts for ease of use + access #or about providing specific accessibility features like video + image captions (remember youtube's community captions? yeah.) #its about how much STUFF you can sell someone before they leave. how much bank can we make off an individual with minimal effort. #tech is honestly just one of the most toxic industries you could work in these days #its sickening how little anyone cares about the harm its doing to society #theres no ethics. no consideration of the effects of tech on users or society. no thought given to how it reinforces structural inequality. #if i have one piece of advice for anyone who might be considering moving into the tech industry its this: #take everything in with the understanding that this industry was designed by + for the benefit of corporations + executives #remember that big business works on the premise that ethics is optional + empathy is an unnecessary expense. #understand that the laws + regulations that govern businesses are only enforceable if the punishment is greater than the crime's reward #this goes double for tech because the industry moves so much faster than the legislation. a significant part of this is by design. #tech companies will exploit loopholes for as long as those loopholes exist #its a constant race to be the first to capitalise on the oversights of politicians and regulatory bodies #understand that the only ethics in tech that you can rely on are your own and it is up to you to never compromise that #if every developer + engineer + designer + administrator stood fast with their beliefs + ethical boundaries #then we might actually have a chance at turning this industry around #but too many people are willing to compromise themselves + their values for the right price or the chance to work somewhere 'prestigious' #and that's most of the problem with this industry. #the willingness to overlook these 'small' ethically dubious things has led to one big ethically dubious industry culture.
Tumblr media
58K notes · View notes