Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "status code"
-
I'm not an iOS expert, I just wanted to get Google ads on my iOS app so that I could make a few petty dollars at the expense of my users. Is that too much to ask?
I started by following Google's instructions: install cocoapods, copy and paste some swift code... Compile failed, app broke. Carefully retrace my steps. Nothing.
Stackoverflow (praise be with them) suggests upgrading Xcode. Go to app store and click to upgrade Xcode. No progress bar, no status updates, just that pissy little spinner for several minutes. I become impatient try a few more times. It ain't happening.
Stackoverflow (holy of holies, defender of the weak) points me to an alternate source for Xcode, on the app store dev console. 4GB and some time later, an attempt to unzip gives "unknown error". Genocide of sorts.
Stackoverflow (all that is pure, all that is kind, all... I think you get it) says upgrade your OS. I tried months ago but I had issues with that pissy little spinner. Persist. 5GB and a "heavy-year" of time later (sorry), it installs. Then Xcode installs. Then bar a few errors, the app compiles.
So after almost 24 hours, life resumes. The lesson.. respond to all obscure iOS errors by upgrading. If fully upgraded, calmly acquire a baseball bat and destroy your machine. Make sure you have a good book nearby in case of either event.
Thank you for reading my rant. Now if you'll excuse me, I have to pay Apple
$150 so that I may list my app in the app store.11 -
Me: We should change the http response code to anything but 200 OK in the error response case of our API.
Other dev: No, it's fine.
Me: Why?
Other dev: The client successfully receives an error message.
Me: ┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻15 -
The GET /users endpoint will return a page of the first 13 users by default.
To request other pages, add |-separated querystring with the limit and offset, as roman numerals enclosed in double quotation marks. Response status is always equal to 200, plus the total count of the resource, or zero when there's an error.
You can include an array of friends of the user in the result by setting the request header "friends" to the base64-encoded value of the single white pixel png.
Other metadata is not included by default in responses, but can be requested by appending ?meta.json to any endpoint, which will return an xml response.
If you want to update the user's profile picture, you can request an OAuth token per fax machine, followed by a pigeon POST capsule containing a filename and a rolled up Polaroid picture. The status code attached to the return postal dove will be the decimal ASCII code for a happy smiley on success, and a sad smiley if any field fails form validation.
-- Every single external REST API I've ever worked with.7 -
Its that time of the morning again where I get nothing done and moan about the past ... thats right its practiseSafeHex's most incompetent co-worker!!!
Today I'd like to tell you the story of "i". Interesting about "I" is that he was actually a colleague of yesterdays nominee "G" (and was present at the "java interface" video call, and agreed with G!): https://devrant.com/rants/1152317/...
"I" was the spearhead of a project to end all projects in that company. It was suppose to be a cross-platform thing but ended up only working for iOS. It was actually quite similar to this: https://jasonette.com/ (so similar i'm convinced G / I were part of this but I can't find their github ID's in it).
To briefly explain the above + what they built ... this is the worst piece of shit you can imagine ... and thats a pretty strong statement looking back at the rest of this series so far!
"I" thought this would solve all of our problems of having to build similar-ish apps for multiple customers by letting us re-use more code / UI across apps. His main solution, was every developers favourite part of writing code. I mean how often do you sit back and say:
"God damn I wish more of this development revolved around passing strings back and forth. Screw autocomplete, enums and typed classes / variables, I want more code / variables inside strings in this library!"
Yes thats right, the main part of this bullshittery was putting your entire app, into JSON, into a string and downloading it over http ... what could possibly go wrong!
Some of my issues were:
- Everything was a string, meaning we had no autocomplete. Every type and property had to be remembered and spelled perfectly.
- Everything was a string so we had no way to cmd + click / ctrl + click something to see somethings definition.
- Everything was a string so any business logic methods had to be remembered, all possible overloaded versions, no hints at param types no nothing.
- There was no specific tooling for any of this, it was literally open up xcode, create a json file and start writing strings.
- We couldn't use any of the native UI builders ... cause strings!
- We couldn't use any of the native UI layout constructs and we had to use these god awful custom layout managers, with a weird CSS feel to them.
What angered me a lot was their insistence that "You can download a new app over http and it will update instantly" ... except you can't because you can't download new business logic only UI. So its a new app, but must do 100% exactly the same thing as before.
His other achievements include:
- Deciding he didn't like apple's viewController and navigationBar classes and built his own, which was great when iOS 7 was released (changed the UI to allow drawing under the status bar) and we had no access to any of apples new code or methods, meaning everything had to be re-built from scratch.
- On my first week, my manager noticed he fucked up the login error handling on the app I was taking over. He noticed this as I was about to leave for the evening. I stayed so we could call him (he was in an earlier timezone). Rather than deal with his fucked up, he convinced the manager it would be a "great learning experience" for me to do it ... and stay in late ... while he goes home early.
- He once argued with me in front of the CEO, that his frankenstein cross-platform stuff was the right choice and that my way of using apples storyboards (and well thought out code) wasn't appropriate. So I challenged him to prove it, we got 2 clients who needed similar apps, we each did it our own way. He went 8 man weeks over, I came in 2 days under and his got slated in the app store for poor performance / issues. #result.
But rather than let it die he practically sucked off the CEO to let him improve the cross platform tooling instead.
... in that office you couldn't swing a cat without hitting a retard.
Having had to spend a lot more time working with him and more closely than most of the other nominees, at a minimum "I" is on the top of my list for needing a good punch in the face. Not for being an idiot (which he is), not for ruining so much (which he did), but for just being such an arrogant bastard about it all, despite constant failure.
Will "I" make it to most incompetent? Theres some pretty stiff competition so far
Tune in later for more practiceSafeHex's most incompetent co-worker!!!6 -
Manager: How come I go on vacation for 2 weeks and you are able to start, complete, and ship an entire sprint in that time where as when I'm around, the same amount of work takes months? I even got COMPLIMENTS from *the client* about how smoothly things went while I was gone...THIS IS COMPLETELY EMBARRASSING AND UNACCEPTABLE!
Dev: Well. I cancelled all of the status meetings, created tickets with clear expectations, didn't change those expectations, didn't add every idea that popped into the client's head during those two weeks to the current sprint, didn't pull anyone off their tickets to teach me to code, cut the budget for making degrading comments to zero, and incentivised everyone to work by allowing a half days on fridays to work on personal projects if we stayed on schedule.
Manager: THAT'S NOT YOUR JOB! I'M THE MANAGER AND ALL. OF. THOSE. THINGS. ARE. MY JOB! NOT YOURS!
Dev: ...I know.16 -
So, here's how online payment works in my country:
1. The selling website creates a hidden <form> and populates it with product ID, price and etc.
2. Some Javascript posts the mentioned form to the bank from the browser.
3. User enters credit info, and submits. If all is right, the bank creates another hidden <form>, and populates is with status code and an invoice ID.
4. Said form is then posted back to the selling website.
I don't know how the programmers behind this scenario call themselves programmers if they don't know basic things about server-side only verifications, but thanks to them I've been buying a lot of products for free these past years. 😂😂
How? 1. Just install Requestly, Tampermonkey and enable Chrome's dev tools.
2. Change price to zero, and the bank's response code to success.
3. Profit!
P. S. I have notified the people behind this, but they don't listen and go fix their codes. Oh well, serves them right.13 -
I get nervous every time I go on highway 401 and 404 in Toronto area. Cuz I feel like I'm either on the wrong highway or the highway doesn't exist. If y'all know what I mean, feel how I feel😜4
-
!rant
Wake up at 7am
Start work at 7:30 am
Set status to "working from home"
Dive deep into code
Boss calls at 10:30am...
Codebrain makes me sound a bit absent: "Uhhh... sup?"
Boss: "Oh sorry, did I wake you up? Would like to discuss the application of the new intern with you, but I can call back after lunch if you want..."
<32 -
It's maddening how few people working with the internet don't know anything about the protocols that make it work. Web work, especially, I spend far too much time explaining how status codes, methods, content-types etc work, how they're used and basic fundamental shit about how to do the job of someone building internet applications and consumable services.
The following has played out at more than one company:
App: "Hey api, I need some data"
API: "200 (plain text response message, content-type application/json, 'internal server error')"
App: *blows the fuck up
*msg service team*
Me: "Getting a 200 with a plaintext response containing an internal server exception"
Team: "Yeah, what's the problem?"
Me: "...200 means success, the message suggests 500. Either way, it should be one of the error codes. We use the status code to determine how the application processes the request. What do the logs say?"
Team: "Log says that the user wasn't signed in. Can you not read the response message and make a decision?"
Me: "That status for that is 401. And no, that would require us to know every message you have verbatim, in this case, it doesn't even deserialize and causes an exception because it's not actually json."
Team: "Why 401?"
Me: "It's the code for unauthorized. It tells us to redirect the user to the sign in experience"
Team: "We can't authorize until the user signs in"
Me: *angermatopoeia* "Just, trust me. If a user isn't logged in, return 401, if they don't have permissions you send 403"
Team: *googles SO* "Internet says we can use 500"
Me: "That's server error, it says something blew up with an unhandled exception on your end. You've already established it was an auth issue in the logs."
Team: "But there's an error, why doesn't that work?"
Me: "It's generic. It's like me messaging you and saying, "your service is broken". It doesn't give us any insight into what went wrong or *how* we should attempt to troubleshoot the error or where it occurred. You already know what's wrong, so just tell me with the status code."
Team: "But it's ok, right, 500? It's an error?"
Me: "It puts all the troubleshooting responsibility on your consumer to investigate the error at every level. A precise error code could potentially prevent us from bothering you at all."
Team: "How so?"
Me: "Send 401, we know that it's a login issue, 403, something is wrong with the request, 404 we're hitting an endpoint that doesn't exist, 503 we know that the service can't be reached for some reason, 504 means the service exists, but timed out at the gateway or service. In the worst case we're able to triage who needs to be involved to solve the issue, make sense?"
Team: "Oh, sounds cool, so how do we do that?"
Me: "That's down to your technology, your team will need to implement it. Most frameworks handle it out of the box for many cases."
Team: "Ah, ok. We'll send a 500, that sound easiest"
Me: *..l.. -__- ..l..* "Ok, let's get into the other 5 problems with this situation..."
Moral of the story: If this is you: learn the protocol you're utilizing, provide metadata, and stop treating your customers like shit.22 -
--- GitHub 24-hour outage post mortem ---
As many of you will remember; Github fell over earlier this month and cracked its head on the counter top on the way down. For more or less a full 24 hours the repo-wrangling behemoth had inconsistent data being presented to users, slow response times and failing requests during common user actions such as reporting issues and questioning your career choice in code reviews.
It's been revealed in a post-mortem of the incident (link at the end of the article) that DB replication was the root cause of the chaos after a failing 100G network link was being replaced during routine maintenance. I don't pretend to be a rockstar-ninja-wizard DBA but after speaking with colleagues who went a shade whiter when the term "replication" was used - It's hard to predict where a design decision will bite back and leave you untanging the web of lies and misinformation reported by the databases for weeks if not months after everything's gone a tad sideways.
When the link was yanked out of the east coast DC undergoing maintenance - Github's "Orchestrator" software did exactly what it was meant to do; It hit the "ohshi" button and failed over to another DC that wasn't reporting any issues. The hitch in the master plan was that when connectivity came back up at the east coast DC, Orchestrator was unable to (un)fail-over back to the east coast DC due to each cluster containing data the other didn't have.
At this point it's reasonable to assume that pants were turning funny colours - Monitoring systems across the board started squealing, firing off messages to engineers demanding they rouse from the land of nod and snap back to reality, that was a bit more "on-fire" than usual. A quick call to Orchestrator's API returned a result set that only contained database servers from the west coast - none of the east coast servers had responded.
Come 11pm UTC (about 10 minutes after the initial pant re-colouring) engineers realised they were well and truly backed into a corner, the site was flipped into "Yellow" status and internal mechanisms for deployments were locked out. 5 minutes later an Incident Co-ordinator was dragged from their lair by the status change and almost immediately flipped the site into "Red" status, a move i can only hope was accompanied by all the lights going red and klaxons sounding.
Even more engineers were roused from their slumber to help with the recovery effort, By this point hair was turning grey in real time - The fail-over DB cluster had been processing user data for nearly 40 minutes, every second that passed made the inevitable untangling process exponentially more difficult. Not long after this Github made the call to pause webhooks and Github Pages builds in an attempt to prevent further data loss, causing disruption to those of us using Github as a way of kicking off our deployment processes (myself included, I had to SSH in and run a git pull myself like some kind of savage).
Glossing over several more "And then things were still broken" sections of the post mortem; Clever engineers with their heads screwed on the right way successfully executed what i can only imagine was a large, complex and risky plan to untangle the mess and restore functionality. Github was picked up off the kitchen floor and promptly placed in a comfy chair with a sweet tea to recover. The enormous backlog of webhooks and Pages builds was caught up with and everything was more or less back to normal.
It goes to show that even the best laid plan rarely survives first contact with the enemy, In this case a failing 100G network link somewhere inside an east coast data center.
Link to the post mortem: https://blog.github.com/2018-10-30-...6 -
Request URL: /api/v1/user/53b49b5a30
Request Method: GET
Expected Response:
Status Code: 404 Not Found (as the user is actually not present in the DB)
Actual Response:
Status Code: 200 Ok
Response Content:
{
"status": "ERROR",
"errorCode": "404",
"errorMsg": "User Not Found. Please provide a valid user ID",
"type": "Error",
"userMsg": "User Not Found. Please provide a valid user ID"
}
#extremefacepalm19 -
Rant! I found a bug in payment provider's api. The bug involves sending an invalid (!) Stripe ID to that API, (which I send on purpose btw) Which causes a complete white page when you login to their systems and view the details of that customer. Btw the API will accept that invalid Stripe ID without questioning and returns a 200 status code back.
So I send a mail to there support saying "look I found this bug by accident, this is how you can reproduce it"
And the support team send me a message back saying "then don't send an invalid Stripe ID"...
You don't freaking say... *sigh*9 -
Wow, what a fucking mess this sunday was.
My boss wrote me an email that one route of a RESTful API we wrote for a customer was not working anymore and puking back a status 500 with some error mentioning invalid UTF-8 characters.
Not one single person has had touched nor changed the code on production in some 6 months, so what the fuck could it be?
Phpunit did not give any errors (running only locally), the code had no syntax errors and the DB dump did not contain any invalid bytes (tested with a hex editor).
WHAT THE FUCK?!
OK so I started to comment out lines (all tested directly on production of course) until the error vanished.
Guess what was the culprit?
.
.
.
.
.
.
In the code (PHP) we used strftime(...) to get nice time strings. Of course we set the correct locale on the server, thus having months and days formatted in German.
So, in Geman there is this one mysterious month called "März" which contains an umlaut character.
Calling strftime generated the date with März in it, but the server locale was de_CH.iso-8859-1 and not fucking de_CH.utf8, so the "ä" was returned as 0xE4 instead of 0xC3A4 (valid UTF-8), which json_encode(...) did not want to swallow but instead threw an exception.8 -
A huge project came my way at work. Old spaghetti code, no source control, no test env and every other possible challenge you could think of. Based on my initial quote a deadline of June 19th was approved. Two days ago the president of the company tells my boss it needs to be done by Friday, no excuses. Horrible timing since I'm moving tomorrow and am off all next week. Not to mention I'm the only dev at the company that understands/knows how to work on this code. We also don't have a budget to contract out. Literally not possible to do in 2 days. I proposed a "quick fix" solution and new design which was approved. I Spent 2 straight days working on it with overtime, no lunch hour, and the president checking on me every hour for status updates. Managed to implement my "quick fix" and just put it live 2 hours ago. President approved, and said "thanks". He then sent an email to the company and all our agents across the country anouncing the change. In the email he directly thanks the Marketing dept and the "senior leadership team" for "making the quick turnaround of this request possible". He proceeds to name specific people responsible for making this happen. No where does he mention my name or my department. Not that I'm actually surprised but it would have been nice to get some recognition considering this literally wouldn't have worked without me. Guess I should be used to it by now. I'm also now on call during my week off in case anything breaks.12
-
Them: Root, you take too long to get tickets out. You only have a few simple ones. You really need to rebuild your reputation.
Also them: Hey, could you revisit this ticket? Could you help ____ with this other ticket? Hey Root, how do you do this? Root, someone had a suggestion on one of your tickets; could you implement that by EoD? Hey Root, i didn't read your ticket notes; how do you test it? Hey, could you revisit this ticket for the fourth time and remove some whitespace? Hey Root, someone has non-blocking code review comments you need to address before we can release the ticket. Hey Root, we want to expand that ticket scope by 5-6 times; still labeled a trivial feature though.
Also them: Super easy ticket for you. Make sure you talk with teams A, B, C, D, E and get their input on the ticket, talk with ____ and ____ and ____ about it, find a solution that makes them all happy and solves the problem too, then be sure to demo it with everyone afterward. Super easy; shouldn't take you more than a couple days. Oh, and half of them are on vacation.
Also them: Hey, that high-priority ticket you finished months ago that we ignored? Yeah, you need to rewrite it by tomorrow. Also, you need to demo it with our guy in India, who's also on vacation. Yes, tomorrow is the last day. (The next day:) You rewrote it, but weren't able to schedule the demo? Now you've missed the release! It's even later! This reflects very poorly on you.
Also them: Perfect is the enemy of good; be more like the seniors who release partially-broken code quickly.
Also them: Here's an non-trivial extreme edgecase you might not have covered. Oh, it would have taken too much time and that's why you didn't do it? Jeez, how can you release such incomplete code?
Also them: Yeah, that ticket sat in code review for five months because we didn't know it was high-priority, despite you telling us. It's still kinda your fault, though.
Also them: You need to analyze traffic data to find patterns and figure out why this problem is happening. I know you pushed the fix for it 8 months ago, and I said it was really solid, but the code is too complex so I won't release it. Yeah I know it's just a debounce with status polling and retrying. Too complex for me to understand. Figure out what the problem is, see if another company has this same problem, and how they fixed it.
-------------
Yep. I'm so terrible for not getting these tickets out, like wow. Worst dev ever. Much shame.
LF work, PST.13 -
Just found this gem on Twitters API...
When your app gets too excited they return status code 420 to tell you to chill! 😂😂😂
Fyi : For the non web-devs out there 420 is an invalid http code.5 -
So Twitter apparently used http status code "420 - Enhance your calm" to notify the client that it was sending too many requests (basically chill the **** out). Note the status code number as well 😁
Image from wikipedia.3 -
To improve our user's "experience" I suggested to my boss to add a status page showing...well, the current status of our services. Everybody was up for it, so I go off and implement a basic version + automated monitoring backend, get lots of positive feedback, all seems fine.
Then it starts:
Boss: "Can you get it all set up by this Saturday?"
Me: "Uh, today is Wednesday and I've never set up all the stuff needed on a proper server before"
Boss: "Well, you still have a few days. Please also contact your coworker to get it all hooked up in our launcher"
Me: "I'll try, can't make any promises though"
Contact my coworker and tell him what the plan is. I had already given him access to the repo and he is positive to get it all hooked up (I doubt he ever cloned my repo, let alone ran my code)
Spend all Friday getting my stuff set up on the production server, feeling pretty good thanks to the many tutorials.
Contact the boss Friday evening:
Me: "All up and running"
Boss: "Thanks, but we decided to go with a basic HTML page instead. We can just manually edit that, should be enough.
Me: "..."
In the end my stuff was never used, the server I set up was finally taken down a month ago. The gratitude you get when not hacking together some absolute shit that causes problems when you don't add <br/> tags at the correct places to prevent an ugly overflow, cause the coworker was too lazy to implement some form of line wrap in the launcher. I'm not saying my stuff is the best of the best, but at least it was professional looking to a certain extent.8 -
Welcome to HRMC online.
Please enter your login
Now enter your Gateway ID
Password please
Now User ID
Government ID please
Enter a code we've texted your old number
There's a scroll in your garden. Find it.
Latin name for fox
Your name in Sanskrit
176th digit of Pi
We couldn't identify you.
Last three letters of your father in law's number plate
Your inner-most fear
7523/42*3.5
Your provisional driving license expiry date
Your first girlfriend's mother's maiden name
Capital of Belarus
King Arthur's burial coordinates
You answered all of those correctly.
We still don't recognise you.
A letter containing a government code that relates to none of the above will arrive by boat in 12 to 14 weeks.
Thank you for using HRMC online. We value your feedback. Please stand outside your back door any howl a number between 1 and 10 at the moon.
OP: https://mobile.twitter.com/jbwol/...
Can confirm. It is really like this.7 -
This just in everyone...
Android Dev: *sent and email to network admin* can you please unblock github for a few mins.
Network admin: *Replied* Can you take a screenshot whats the error your getting.
Android Dev: *Replied with screenshot* "Failed to load resource: the server responded with a status of 503 (Service Unavailable)"
Network admin: that is a known issue. *Replied with Wordpress Links.
Android Dev: why is github working outside our network then?
Network admin: there must be a problem with your code that needs to be tweaked.
Team: *FACE PALM*5 -
That moment when u created a project and quite some folks forked it and continued their own versions, but then you realised that you've made a little mistake back then so now your dumb code propagated across humanity.
¯\_( ͡° ͜ʖ ͡°)_/¯2 -
Manager: How’s the progress coming along?
Dev: The section of code I’m working with is one of the more difficult ones so it’s a little slow
Manager: Ok well I didn’t write that section of the code
Dev: I’m not saying you did I’m just giving you the status update that you asked for
Manager: Ok well I can’t really do anything about that so how about you tell me something I can do something about instead of just complaining about code THAT I DIDN’T EVEN WRITE!! *Marks self as offline*
Dev: …10 -
I AM GOING TO PERSONALLY MURDER WHICHEVER SHITBRAINED INCOMPETENT MONKEY THOUGHT IT'D BE A GOOD IDEA TO RESPOND TO ANY AND ALL API ERRORS BY SENDING A RESPONSE WITH THE STATUS CODE 200 AND A BODY OF THE FUCKING STRING "error" AND NOTHING ELSE
WHY?!!?!?!??!7 -
*Starts compile*
...
...
can't find function foo
ld exited with status code 1
*confused*
*Reruns qmake*
*Compiles again*
...
...
can't find function foo
ld exited with status code 1
*very confused*
*switches compilers*
*compiles*
...
...
Worked!
*dafuq*
*switches back to the first compiler*
*compiles*
...
...
Worked!
*tries not to cry*12 -
What's the point of using a framework if you don't use any of its features!? What the heck, I have to fix this damn web frontend that is so broken in many ways.
Instead of using an authentication middleware, every single view has the same block of code to check if a user is authenticated. Instead of templates, they used static HTML/JavaScript files and they passed data to pages through cookies.
The "REST" API is so messed up, nothing is resource-oriented, HTTP methods are chosen randomly as well as status codes. They are returning "412 Precondition Failed" instead of a plain simple "401 Unauthorized" when you're not authenticated! What the hell, did they even bother to check what 412 is about when they copied and pasted it from a crappy website!? I would never come up with 412, not even in my scariest nightmare.
What kind of drugs were they using when they wrote such code? Oh dear, I need a vacation...2 -
Most irritating thing I have to deal with when working on a project with a third-party:
{
status: 200,
message: "error"
}7 -
Senior colleagues insisting on ALWAYS returning HTTP status 200 and sticking any error codes in the contained JSON response instead of using 4×× or 5×× statuses.
Bad input? Failed connections? Missing authorization? Doesn't matter, you get an OK. Wanna know if the request actually succeeded? Fuck you, parse potential kilobytes of JSON to get to the error code!
Am I the asshole or is that defeating the purpose of a status code?!14 -
Spend 5 hours debugging why my curl request in PHP was giving 302 status code, and why my postman was giving 200 for the same request.
Then after crying a lot, I realized the URL was wrong in PHP.
*I totally want to smack my head on the wall*2 -
Summary: Burnout, and everything's broken.
I don't feel like doing a damn thing today. I look at the code and cringe. I look at Slack and think "ugh. i can't." Mental capitals are even too much work.
(I've started reading "Zen and the Art of Motorcycle Maintenance" to try and combat burnout. I'll write a rant/story about it here if I find it helpful. but all I want to do today is drink tea and read.)
But onto the story:
Heroku is deprecating support for and will automatically upgrade any old verisons of Postgres running on its platform after August something (like five days from now).
I performed the upgrade to PG10 on Sunday (and late into the night), provisioning a new follower, blah blah blah.
However, the version of Rails we're using (4.2.x) doesn't support PG10 sequences, so I manually added in support via a monkeypatch. I did this on our QA servers first, obviously, and everything worked as expected. After half a day of no issues, I did the same on production, and again: everything worked as expected.
But today? I keep hearing about new things that are broken. One specific type of alert doesn't work for one specific person (wat). Can't send [redacted] at all. Can't update merchants! Yet there are magically no errors logged.
That last one (well, two) are just great; let me explain: when there's an error concerning merchants, the error gets caught, isn't logged or recorded anywhere so it just disappears, and the rescue block triggers a json response instead and happily exits. This is for an internal admin tool, so returning a user-friendly error is kinda stupid anyway, but masking what actually happened? fuck that dev with an obelisk made from spikes and solidified pain. That json response is also lovely: it's a 200 OK returning {status: 1, data: "[generic message containing incorrect IT jargon]"}. Doesn't even say "error" anywhere. Bloody everything about this pattern is absolutely wrong. Even the friggin' text.
Fucking hell. I want to pipe the entire codebase into shred and walk out the door.
But I digress. So many things are broken, my motivation is wanning to a sliver, and I have a conference call today where I'll undoubtedly be asked why everything is on smoking and/or on fire, and my huge and overly productive week last week will ofc mean nothing by contrast.
Ugh.
`shred ~/dev/work -zfu -n 32 &; ./brew tea --hot && wine ~/takeabreak.exe`rant zen and the art of motorcycle maintenance postgres heroku ship's sinking and the fixer's all fixed out burnout21 -
Once one of my coworkers tried to prank me while i was afk and changed a line in my code.
Good old habits of mine instantly realized the file's unsaved status and i could ctrl+z without even knowing someone edited my code.
Don't mess with a developer. We know our shit.2 -
Sometimes I have really loose the will to live and find myself face palming multiple times.
I added live chat software a web frontend for a client. Very easy job that consisted of pasting in some embed code. The actual software is very good and has native ios/andriod apps - something specifically requested.
I got a call from my client about an hour ago, saying there is a "serious issue with the live chat".
My client stated the live chat won't work when his staff go home. He asked me what my solution to this was.
Saying "wtf" many times to myself I directed him to a settings within the chat software i.e. an "away mode" where an email is sent when no chat agents are available.
This apparently wasn't good enough and said I hadn't followed his brief of "adding life chat software to the website", which I had.
After a lengthy discussion I found the root of his frustration. He'd signed a contract with a client of his own, stating there would be 24/7 support via live chat on the website.
Obviously there a huge difference between adding a chat widget to a website and committing to having it manned 24/7 :)
After a further 10 minutes of trying push the blame on myself, the client insisted of having the chat software "appear" as someone was always online, even when they are not (people need to sleep ya know!).
Bu design, the chat software requires at least one agent be logged in before the chat status changes to "online" - why wouldn't it.
After a little while I was seriously wondering why I'm involved in this conversation. I jokingly stated: "Well you could always install Andriod/iOS app on your phone, login and permanently leave it running in background. You'd get lots of notifications, but the site would say the live is always online".
The latter was something I said in jest. To my surprise the client said he'd do that on his own phone going forwards. He actually thanked me for my "resourcefulness", lol.
I'm looking at the same dashboard now and there are 407 pending chat requests - his phone must literally be blowing up notifications :)5 -
Okay, story time.
Back during 2016, I decided to do a little experiment to test the viability of multithreading in a JavaScript server stack, and I'm not talking about the Node.js way of queuing I/O on background threads, or about WebWorkers that box and convert your arguments to JSON and back during a simple call across two JS contexts.
I'm talking about JavaScript code running concurrently on all cores. I'm talking about replacing the god-awful single-threaded event loop of ECMAScript – the biggest bottleneck in software history – with an honest-to-god, lock-free thread-pool scheduler that executes JS code in parallel, on all cores.
I'm talking about concurrent access to shared mutable state – a big, rightfully-hated mess when done badly – in JavaScript.
This rant is about the many mistakes I made at the time, specifically the biggest – but not the first – of which: publishing some preliminary results very early on.
Every time I showed my work to a JavaScript developer, I'd get negative feedback. Like, unjustified hatred and immediate denial, or outright rejection of the entire concept. Some were even adamantly trying to discourage me from this project.
So I posted a sarcastic question to the Software Engineering Stack Exchange, which was originally worded differently to reflect my frustration, but was later edited by mods to be more serious.
You can see the responses for yourself here: https://goo.gl/poHKpK
Most of the serious answers were along the lines of "multithreading is hard". The top voted response started with this statement: "1) Multithreading is extremely hard, and unfortunately the way you've presented this idea so far implies you're severely underestimating how hard it is."
While I'll admit that my presentation was initially lacking, I later made an entire page to explain the synchronisation mechanism in place, and you can read more about it here, if you're interested:
http://nexusjs.com/architecture/
But what really shocked me was that I had never understood the mindset that all the naysayers adopted until I read that response.
Because the bottom-line of that entire response is an argument: an argument against change.
The average JavaScript developer doesn't want a multithreaded server platform for JavaScript because it means a change of the status quo.
And this is exactly why I started this project. I wanted a highly performant JavaScript platform for servers that's more suitable for real-time applications like transcoding, video streaming, and machine learning.
Nexus does not and will not hold your hand. It will not repeat Node's mistakes and give you nice ways to shoot yourself in the foot later, like `process.on('uncaughtException', ...)` for a catch-all global error handling solution.
No, an uncaught exception will be dealt with like any other self-respecting language: by not ignoring the problem and pretending it doesn't exist. If you write bad code, your program will crash, and you can't rectify a bug in your code by ignoring its presence entirely and using duct tape to scrape something together.
Back on the topic of multithreading, though. Multithreading is known to be hard, that's true. But how do you deal with a difficult solution? You simplify it and break it down, not just disregard it completely; because multithreading has its great advantages, too.
Like, how about we talk performance?
How about distributed algorithms that don't waste 40% of their computing power on agent communication and pointless overhead (like the serialisation/deserialisation of messages across the execution boundary for every single call)?
How about vertical scaling without forking the entire address space (and thus multiplying your application's memory consumption by the number of cores you wish to use)?
How about utilising logical CPUs to the fullest extent, and allowing them to execute JavaScript? Something that isn't even possible with the current model implemented by Node?
Some will say that the performance gains aren't worth the risk. That the possibility of race conditions and deadlocks aren't worth it.
That's the point of cooperative multithreading. It is a way to smartly work around these issues.
If you use promises, they will execute in parallel, to the best of the scheduler's abilities, and if you chain them then they will run consecutively as planned according to their dependency graph.
If your code doesn't access global variables or shared closure variables, or your promises only deal with their provided inputs without side-effects, then no contention will *ever* occur.
If you only read and never modify globals, no contention will ever occur.
Are you seeing the same trend I'm seeing?
Good JavaScript programming practices miraculously coincide with the best practices of thread-safety.
When someone says we shouldn't use multithreading because it's hard, do you know what I like to say to that?
"To multithread, you need a pair."18 -
My Perfect Day : Assumption
Woke up at 6. Went for morning walk or do yoga or some sort of stuff.
Came back at 7. Went for daily routine, like bathing and all.
Went to prepare breakfast at 7:45. Prepared some eggs and bread and coffee.
It is 8:15 now. Reading news papers or watching tv and doing breakfast.
At 9 check mails and prepare some stuff.
At 9: 30 went for office. Reached office 5 minute before 10, safe and sound.
Came back at 7 by evening. Did some rest. Prepare dine till 9. Take a bath. Complete the dine.
At 10:30 ready to sleep.
Actual Scenario :
Woke up at 8:30. No time for yoga or morning walk. No time for preparing breakfast as well. Went straight to bathroom. Came back in 20 minutes. Made a cup of coffee. No time for newspaper or tv.
Feeling lazy and tired already. At 9:10 went for office. Before reaching office stopped at fast food joints. buy some junk food. Eat them. Got traffic jam and reached office late.
Started working but feeling lazy. Boss asked twice about the project status and i am unable to think a single line of code.
However, days passed. Boss scolded me. I promised him to finish the work after reaching home.
Reached home at 7:30. Late for no reason. Went straight to bed. Sleeps a hour. But took 20 minutes to leave bed.
Started working on projects i did not complete in the office.
Time fly and it is already 1 in morning. No dinner. Tired as fuck but hungry as well. So made some eggs and eat. Wrapped the task but it is 3:30 in morning and i jumped to bed for sleep.
Loop.3 -
I have teens in my classroom who want elite hacker status but complain about doing programming exercises outside of class. >.<
I explain to them that learning to code takes a lot of practice and can be frustrating at first. Some still went to the dean complaining that my class is tough. I work at a private school where open communication is encouraged and social justice is a thing.
So, I'm over here like "How do I reach these kids?"
I'm optimistic and I try different approaches to teaching and learning. Some stuff has worked. A lot haven't.
I figure I'd ask here: Does anyone have a suggestion for any creative programming exercises/projects that are beginner-friendly, legal, and hacker-ish? (I teach intro to Java.)22 -
Me: I should use an informative status code to let my users know what went wrong
Me to me: *500 internal server error*1 -
There are three things in my workflow that I don't like:
1. Feature requests appearing out of thin air.
It's common to be handled work at 2pm that needs to be deployed by the end of day. Usually it's bug fixes, and that's ok I guess, but sometimes it's brand new features. How the fuck am I supposed to do a good job in such a short time? I don't even have time to wrap my head around the details and I'm expected to implement it, test it, make sure it doesn't break anything and make it pass through code review? With still time to deploy and make sure it's ok? In a few hours? I'm not fucking superman!
2. Not being asked about estimates.
Everything is handed to me with a fixed deadline, usually pulled off my PM's ass, who has no frontend experience. "You have two weeks to make this website." "You must have this done this by tomorrow morning." The result, of course, is rushed code that was barely tested (by hand, no time for unit or integration tests).
3. Being the last part of the product development process.
Being the last part means that our deadlines are the most strict. If we don't meet the deadline, the client will be pissed. The thing is, the design part is usually the one that exceeds its time (because clients keep asking for changes). So when the project lands on our desks it's already delayed and we have to rush it.
This all sounds too much like bad planning to me. I guess it's the result of not doing scrum. There are no sprints, no planning meetings, only weekly status update meetings. Are your jobs similar? Is it just usual "agency work"?
I'm so tired of the constant pressure and having to rush my work. Oh, and the worst part is we don't have time for anything else. We're still stuck with webpack 2 because we never have time to update it ffs.6 -
It was when I ditched React. I replaced it with raw JavaScript, with frontend being built with Gulp and Twig (just because HTML has no includes). Here are the results:
1. Previously, a production frontend build took 1.5 minutes. Build time became so fast that after I push the code, the build was done before me going to Netlify to check build status. I go there, and it’s almost always already done.
2. In a gallery with a lot of cards, with every card opening a modal, the number of listeners was reduced from N to one. With React, I needed 1000 listeners for 1000 cards. With raw JavaScript, I needed just one click listener with checking event target to handle all of the cards.
3. Page load time and time-to-interactive was reduced from seconds to milliseconds.
4. Lighthouse rating became 100 for desktop and 93 for mobile.
But there is one more thing that is way better than all of the above: cognitive complexity.
Tasks that took days now take hours. Tasks that took hours now take minutes.
Tasks that took thousands of lines now take hundreds. Tasks that took hundreds of lines now take tens.
In real business apps, it is common to build features and then realize it’s not needed and should be discarded. Business is volatile, just because the real world is volatile too. With this kind of cost reduction per feature, it became way less painful to discard them. Throwing out something you spent time and emotional resource on doesn’t feel good. But with features taking minutes to build, it became easier.23 -
Finally got my nginx config to work properly (it shouldn't work but it does so I'm not fucking touching it).
Request with curl: check, right http code and getting data back properly.
Request with any browser (with and without incognito): right http code, AND ONLY SEEING DATA WHEN I ECHO ANYTHING BEFORE SENDING THE RESPONSE WITH PHP. When I don't echo whatever before sending the response, the browser doesn't see the data but DOES see the http status code.
HOW?!20 -
Highlights from my week:
Prod access: Needed it for my last four tickets; just got it approved this week. No longer need it (urgently, anyway). During setup, sysops didn’t sync accounts, and didn’t know how. Left me to figure out the urls on my own. MFA not working.
Work phone: Discovered its MFA is tied to another coworker’s prod credentials. Security just made it work for both instead of fixing it.
My merchant communication ticket: I discovered sysops typo’d my cronjob so my feature hasn’t run since its release, and therefore never alerted merchants. They didn’t want to fix it outside of a standard release. Some yelling convinced them to do it anyway.
AWS ticket: wow I seriously don’t give a crap. Most boring ticket I have ever worked on. Also, the AWS guy said the project might not even be possible, so. Weee, great use of my time.
“Tiny, easy-peasy ticket”: Sounds easy (change a link based on record type). Impossible to test locally, or even view; requires environments I can’t access or deploy to. Specs don’t cover the record type, nor support creating them. Found and patched it anyway.
Completed work: Four of my tickets (two high-priority) have been sitting in code review for over a month now.
Prod release: Release team #2 didn’t release and didn’t bother telling anyone; Release team #1 tried releasing tickets that relied upon it. Good times were had.
QA: Begs for service status page; VP of engineering scoffs at it and says its practically impossible to build. I volunteered. QA cheered; VP ignored me.
Retro: Oops! Scrum master didn’t show up.
Coworker demo: dogshit code that works 1 out of 15 times; didn’t consider UX or user preferences. Today is code-freeze too, so it’s getting released like this. (Feature is using an AI service to rearrange menu options by usage and time of day…)
Micromanager response: “The UX doesn’t matter; our consumers want AI-driven models, and we can say we have delivered on that. It works, and that’s what matters. Good job on delivering!”
Yep.
So, how’s your week going?2 -
Apparently USPS tracking numbers are case sensitive... I missed a delivery today so went online to check the status.
The code was RAxxxxxxxxxxxxxxxxxxxTR
x=numbers
I first typed the letters in lowercase and it said package not found...
Really???!!!!!! Don't you think all those numbers are already too long...3 -
Arch Rice Update
Distro: Arch Linux
WM: i3-gaps
Browser: qutebrowser with my GitHub open
Pomodoros: pomo
top: gotop
Vim: Open with Python code, taglist, powerline and gruvbox color scheme
Terminal: st, Luke Smith's build
Neomutt, configured by mutt-wizard
Vifm, with ripped CDs and projects open
Bar: bumblebee-status
Background: https://github.com/skuzzymiglet/...
Qutebrowser means I can finally abandon my mouse/trackpad (except for pesky video ediors and music notation software). Nice feeling not having to drag my fingers over a piece of metal. Try it out!
High-res:
https://ibb.co/mbL6yXb
Some dotfiles (not all): https://github.com/skuzzymiglet/...11 -
I was asked to look into a site I haven't actively developed since about 3-4 years. It should be a simple side-gig.
I was told this site has been actively developed by the person who came after me, and this person had a few other people help out as well.
The most daunting task in my head was to go through their changes and see why stuff is broken (I was told functionality had been removed, things were changed for the worse, etc etc).
I ssh into the machine and it works. For SOME reason I still have access, which is a good thing since there's literally nobody to ask for access at the moment.
I cd into the project, do a git remote get-url origin to see if they've changed the repo location. Doesn't work. There is no origin. It's "upstream" now. Ok, no biggie. git remote get-url upstream. Repo is still there. Good.
Just to check, see if there's anything untracked with git status. Nothing. Good.
What was the last thing that was worked on? git log --all --decorate --oneline --graph. Wait... Something about the commit message seems familiar. git log. .... This is *my* last commit message. The hell?
I open the repo in the browser, login with some credentials my browser had saved (again, good because I have no clue about the password). Repo hasn't gotten a commit since mine. That can't be right.
Check branches. Oh....Like a dozen new branches. Lots of commits with text that is really not helpful at all. Looks like they were trying to set up a pipeline and testing it out over and over again.
A lot of other changes including the deletion of a database config and schema changes. 0 tests. Doesn't seem like these changes were ever in production.
...
At least I don't have to rack my head trying to understand someone else's code but.... I might just have to throw everything that was done into the garbage. I'm not gonna be the one to push all these changes I don't know about to prod and see what breaks and what doesn't break
.
I feel bad for whoever worked on the codebase after me, because all their changes are now just a waste of time and space that will never be used.3 -
Boss: "So I'm taking the next week off. In the mean time, I added some stuff for you to do on Gitlab, we'd need you to pull this Docker image, run it, setup the minimal requirement and play with it until you understand what it does."
Me: "K boss, sounds fun!" (no irony here)
First day: Unable to login to the remote repository. Also, I was given a dude's name to contact if I had troubles, the dude didn't answer his email.
2nd day: The dude aswered! Also, I realized that I couldn't reach the repository because the ISP for whom I work blocks everything within specific ports, and the url I had to reach was ":5443". Yay. However, I still can't login to the repo nor pull the image, the connection gets closed.
3rd day (today): A colleague suggested that I removed myself off the ISP's network and use my 4G or something. And it worked! Finally!! Now all I need to do is to set that token they gave me, set a first user, a first password and... get a 400 HTTP response. Fuck. FUCK. FUUUUUUUUUUUUUUUUUUUCK!!!
These fuckers display a 401 error, while returning a 400 error in the console log!! And the errors says what? "Request failed with status code 401" YES THANK YOU, THIS IS SO HELPFUL! Like fuck yea, I know exactly how t fix this, except that I don't because y'all fuckers don't give any detail on what could be the problem!
4th day (tomorrow): I'm gonna barbecue these sons of a bitch
(bottom note: the dude that answered is actually really cool, I won't barbecue him)5 -
"200 Internal Server Error"
Yep, I did that. Because the lousy crapheads I work with were too lazy to handle any other HTTP status so anything else breaks the whole thing. And it's a pain to roll out another release of their part of the backend so "this isn't a priority". Also, they don't feel the need to check the JSON body of the response for the "status":"ok"/"fail" because what could ever go wrong, right? I effectively have no way of conveying to them that there was an error on this end of the API so they show success toast on the frontend irrespective of what really happened.6 -
A survey by freeCodeCamp showed the following result.
No wonder many are single. :D
What about you people from devRant? Are you single?10 -
Just found this HTTP response.
Status Code:
200 - OK
Body:
{
status: "success",
response:
{
status: "error",
}
}13 -
What's a bigger sin.
Returning a status code of 200 and then the message body saying "An Error Occurred"
or
Only performing data validation on the frontend.18 -
I've just seen the documentation of an api I have to communicate with, and facepalmed when I have seen that some actions return 404 on success. And more bizarre things... Just wanted to make it worse for me, didn't you?
Once at it. Why don't you glue spikes onto my keys?
Ffs8 -
I was asked to fix a critical issue which had high visibility among the higher ups and were blocking QA from testing.
My dev lead (who was more like a dev manager) was having one of his insecure moments of “I need to get credit for helping fix this”, probably because he steals the oxygen from those who actually deserve to be alive and he knows he should be fired, slowly...over a BBQ.
For the next few days, I was bombarded with requests for status updates. Idea after idea of what I could do to fix the issue was hurled at me when all I needed was time to make the fix.
Dev Lead: “Dev X says he knows what the problem is and it’s a simple code fix and should be quick.” (Dev X is in the room as well)
Me: “Tell me, have you actually looked into the issue? Then you know that there are several race conditions causing this issue and the error only manifests itself during a Jenkins build and not locally. In order to know if you’ve fixed it, you have to run the Jenkins job each time which is a lengthy process.”
Dev X: “I don’t know how to access Jenkins.”
And so it continued. Just so you know, I’ve worked at controlling my anger over the years, usually triggered by asinine comments and decisions. I trained for many years with Buddhist monks atop remote mountain ranges, meditated for days under waterfalls, contemplated life in solitude as I crossed the desert, and spent many phone calls talking to Microsoft enterprise support while smiling.
But the next day, I lost my shit.
I had been working out quite a bit too so I could have probably flipped around ten large tables before I got tired. And I’m talking long tables you’d need two people to move.
For context, unresolved comments in our pull request process block the ability to merge. My code was ready and I had two other devs review and approve my code already, but my dev lead, who has never seen the code base, gave up trying to learn how to build the app, and hasn’t coded in years, decided to comment on my pull request that upper management has been waiting on and that he himself has been hounding me about.
Two stood out to me. I read them slowly.
“I think you should name this unit test better” (That unit test existed before my PR)
“This function was deleted and moved to this other file, just so people know”
A devil greeted me when I entered hell. He was quite understanding. It turns out he was also a dev.3 -
Buggered by Xcode AGAIN. The inability of the debugger to do basic debugging relinquishes it to the status of "bugger", relieving it of its "de" title.
Can't show some basic expressions... copied and pasted from the running code
I mean seriously, what do you do if the debugger has more bugs than your project you are trying to analyze?2 -
Please tell me something wrong with me, and whole world is working like that! It can't be right! Or could it, and I'm just one sad fuck who don't know shit?
So... We've got:
1. Jira reporting (agile style with cards and shit)
2. Task timers (via application integrated to Jira in order to count how much time we spent on a task)
3. End of the day email reporting with description of what we have done today (Jira is not enough?)
4. Daily morning meetings with a team leader to report what we're gonna do today
5. Git merge code reviews for each finished component (that lasts for hours)
6. Weekly status meetings
7. Working hours reporting with a fucking fingerprint
And on top of all of that, the developer is the one who just writes the code - team leader decides how this code is gonna look, what will be written first and what last, what libraries will be used and so on...8 -
You know that you made it as dev when you realize that your creation has ability to effect your life also the life of others
It came to me much earlier in life ( college final semester)
F: Hey there is this girl that i am trying to talk but she never replies me on Facebook i waste to much time looking for her online status , i wish if i can say hi as soon as she comes online
HF: (first reaction) leave her alone man , ( dev reaction) hmm fb probably be using jabber protocol like xmpp I could make xmpp client and sync online status. If status changes drop a notification also the asmack lib provides a way to send msg to user in your chat room sooo we good !!
At the time i was handling 3 android app , implemented this and called it FacebookStalker , you can select who you wanna stalk and what msg you wanna send them as soon as they come online
Google obviously didn’t liked it
for a long time i judged myself that How can i can make this creepy app
Later I realized that it was not the app i was suspended because i used a DRM marked image as icon
Google never tells you the actual reason why your app is suspended so you cannot fix it.
I learned to be mindfull of what i code cause it started having real impact. Loosing dev account was like loosing everything at that point. i had nothing else25 -
Doing a full rewrite from some DIY spaghetti framework: when it can't find a search query it returns "false" with the status code 200, the same php file responsible for querying an external api is put into all sorts of named folders, so e.g. a user that is in the results page X can continue searching on the same URL, instead of doing proper url rewrites or ajax calls to the one in the root directory, html is thrown into every other php line, a DIY sort function for a numbers array that fails to sort 0 before 1 and that all is just a 10 minute review, can't wait to see the rest.2
-
I just got pissed off when someone on my team asked me how to start a web server on port 8080 (needed for network port testing)
I check the port get 404. 🤔🤔🤔
Spend half an hour explaining to them about ports and how there's already a week server running... And that 404 is a HTTP Status code.
I'm pretty sure she works on our webapp and maybe even REST APIs...
New grad but still.... Not recognizing a 404?
Maybe those pretty 404 pages these days make the realizing that it's a fucking web server error response harder....1 -
I used to work with a teacher in my last uni year.
The job consisted on doing a kinda-like management system for a business. It all began kinda "right", we agreed upon a price for 6 months of my work (a very lowball price, but it was just right because I was learning stuff that we were going to be using).
Fast-forward first six months, all I do is code frontend, mockup screens and whatsoever because this "business" hadn't give us proper requirements (Yeah, I told him to ask for them, but nothing came through).
So I was like well, I'll keep working in this project because I really want to finish it. Sidenote: I was doing all the "hard work", he didn't know how to code, and he calls himself a teacher... wtf).
Months go by, and a year goes round, in between these months, he spoke to me, that he wanted me that we kept working together, that we could renegotiate the payment (I asked him to give me my payment once the job was done). I agreed, but my uni residence period was coming along and I got an oportunity to go abroad to another country.
So there I was, in the need of money to buy my passport, plane tickets and other stuff, so I asked him for the payment.
Needs to be noted, that the last 6 months work was me doing tutorials on how to fucking use Linux, how to use PostgreSQL, how to fucking use CSS! He told me he would pay me extra for it.
The day came, and I received my payment... the exact amount we talked a year ago, I was like "Seriously dude?", but well, I needed the money and I didn't have time to argue, so we talked a little bit about me helping him and I told him "As long as I have time, I'll help, but remember that I'm going abroad to work for a small startup, so maybe I'll be up to my head with work" he agreed, we nod and then I left.
First week abroad came in and I was doing a shit-ton of stuff, then his first message comes around "Hey, I need more tutorials! ASAP! Before 6PM"
What.The.Fuck. I told you, son of a bitch, that I wouldn't be able to do them until weekend.. and it was monday!
So I ignored it, weeks went throught and my "angry mood" was fading away so I said to myself "Well, it's time to pick up that stuff again", I open Slack and I find a week old message with a document attached, it was a "letter", I just skimmed by it and read some keywords "deceptioned... failed me.."
Sure dude? Was I the failure? Becase, as far as I remember, you were the fucktard that didn't know how to fucking install a VM!
A week went by, and then randomly a friend of mine talks to me through Facebook:
E: Hey, how are you?
M: I'm fine, what's up?
E: What did you do to TEACHER?
M: Nothing, <explains all situation>
E: Well, It seems weird, that's why I wanted to talk with you, I believe in you, because I know you well, but TEACHER it's thrashing shit about you with all his students on all of his classes
M: Seriously?
E: Yeah, he's saying that you are a failure, irresponsible, that you scammed him
That moment, I for sure, lost all moral responsibility with him and thought to myself "He can go fuck himself with my master branch on his ass"
So when I got back to my country, I had to go around in school, avoiding him, not because I was ashamed nor anything by the way, just because I knew that If i ever had the disgrace to meet him face to face, my fists would be deep into his nose before he could say "Hey".
Moral of the story:
If you overheard that a teacher has a bad rep, not by one, nor two, but more than +100 people, maybe it's true.
Good thing my friends and others know me well and I didn't have repercutions on my social status, I'm just the guy that "fucked up TEACHER because I had the right and way to do it"4 -
You know it is gonna be "fun" integrating client APIs, when all of them respond with
"Thanks for submitting the request"
And no error or status code whatsoever, no matter what you send.
Also, the client likes to test/call this API in Internet explorer address bar, and doesn't trust Postman. Amazing shit dude.3 -
I see this in code:
bool status;
status = true;
It makes me want to hit things. INLINE THAT SHIT! bool status = true; It's not hard. JFC. And of course I don't have the authority to change it.3 -
If an http request can't perform the requested operation, should server send 500 error code? Or 200 with status and status message in response?
Isn't 500 used only for unhandled exceptions on server side?11 -
The whois service for the legacy top-level domain for Germany (.de) is one of the most fucked up things on the internet.
For years now they've restricted the whois service to notice you about their website information service (https://denic.de/en, you run a search and get information about the domain) which already cost you an unnecessary amount of time if you simply want to lookup something.
A while back they changed it so that you need to state whether you want to look it up fotr informative purposes or business purposes, then they changed it so that you need to supply a reason in a text box.
The new (GDPR) way is that you only get the connectivity status ("connect", "free") via whois and the nameservers on the website (without supplying a reason, which actually is an improvement). Everything this either is for executive authorities or the domain owner (by entering their mail address or zip code).
Germany - the land of "We can opt out of any standard because we can and since theaws changed we can also behave like dickbutts".
Adding the GDPR now only fed the trolls even more.7 -
JS interview:
– we expect you to know the concepts of immutability, persistence, software architecture and systems theory, methods of analyzing complexity beyond the big-O notation, safe parallel code execution with web workers, WASM, modern web standards including working drafts, progressive enhancement and graceful degradation, WCAG recommendations and web accessibility in general, UX strategies and modern graphic design trends. Nice 20k github stars you got there. By the way, what's your opinion on modern optimistic UX?
– I know this all but I somewhat disagree with some status-quo UX strategies
– unfortunately it's a no
PHP interview:
– Do you know how to wipe your ass?
– *excited hysterical jumping with head nodding*
– You're hired25 -
I just found out there's a 418 HTTP status code that stands for "I'm a teapot", specified by RFC2324 which "describes HTCPCP, a protocol for controlling, monitoring, and diagnosing coffee pots". I know it's an april fools joke but I still find it hilarious that there is an RFC for that.9
-
The moment, when you're coding a new feature on friday, your code somehow behaves weird in firefox... dev console shows unexpected behaviour and you're starting to think YOU ARE GOING CRAZY...
And then.. you find a fricking fucking Bug from over 12 YEARS AGO which STATUS IS "NEW"!
"Yes, the problem still persist with 2.0.0.11"
"This is indeed still an issue in version 3.6.3"
"Yes, it still exists in FF 4."
"Bug still present in Firefox 8."
"This ticket is almost 10 years old. Switch to Chrome."
CONGRATS FUCKING MOZILLA! THANK YOU! <3 <3
https://bugzilla.mozilla.org/show_b...2 -
Ahh.. there is nothing like the joyous feeling of writing a working piece of code for your own personal projects.
I spent several weeks and a few hours today to finally get my Python automation script working and I am very proud of myself.
Here's what it does:
* open a text file, extract a specific string from it using rather complicated xpath
* open another text file and do the same
* replace result 1 with result 2
* log results
* close file
* automate the process
Even though it looks easy, I had to mess around with a lot of problems such as permissions, indentation, stream writing, file status, etc.
Now, instead of having to manually do this job, I can just let my machine do it!1 -
In today's episode of kidding on SystemD, we have a surprise guest star appearance - Apache Foundation HTTPD server, or as we in the Debian ecosystem call it, the Apache webserver!
So, imagine a situation like this - Its friday afternoon, you have just migrated a bunch of web domains under a new, up to date, system. Everything works just fine, until... You try to generate SSL certificates from Lets Encrypt.
Such a mundane task, done more than a thousand times already... Yet... No matter what you do, nothing works. Apache just returns a HTTP status code 403 - Forbidden.
Of course, what many folk would think of first when it came to a 403 error is - Ooooh, a permission issue somewhere in the directory structure!
So you check it... And re-check it to make sure... And even switch over to the user the webserver runs under, yet... You can access the challenge just fine, what the hell!
So you go deeper... And enable the most verbose level of logging apache is capable of - Trace8. That tells you... Not a whole lot more... Apparently, the webserver was unable to find file specified? But... Its right there, you can see it!
So you go another step deeper and start tracing the process' system calls to see exactly where it calls stat/lstat on the file, and you see that it... Calls lstat and... It... Returns -1? What the hell#2!
So, you compile a custom binary that calls lstat on the first argument given and prints out everything it returns... And... It works fine!
Until now, I chose to omit one important detail that might have given away the issue to the more knowledgeable right away. Our webservers have the URL /.well-known/acme-challenge/, used for ACME challenges, aliased somewhere else on the filesystem - To /tmp/challenges.
See the issue already?
Some *bleep* over at the Debian Package Maintainer group decided that Apache could save very sensitive data into /tmp, so, it would be for the best if they changed something that worked for decades, and enabled a SystemD service unit option "PrivateTmp" for the webserver, by default.
What it does is that, anytime a process started with this option enabled writes to /tmp/*, the call gets hijacked or something, and actually makes the write to a private /tmp/something/tmp/ directory, where something... Appeared as a completely random name, with the "apache2.service" glued at the end.
That was also the only reason why I managed fix this issue - On the umpteenth time of checking the directory structure, I noticed a "systemd-private-foobarbas-apache2.service-cookie42" directory there... That contained nothing but a "tmp" directory with 777 as its permission, owned by the process' user and group.
Overriding that unit file option finally fixed the issue completely.
I have just one question - Why? Why change something that worked for decades? I understand that, in case you save something into /tmp, it may be read by 3rd parties or programs, but I am of the opinion that, if you did that, its only and only your fault if you wrote sensitive data into the temporary directory.
And as far as I am aware, by default, Apache does not actually write anything even remotely sensitive into /tmp, so...
Why. WHY!
I wasted 4 hours of my life debugging this! Only to find out its just another SystemD-enabled "feature" now!
And as much as I love kidding on SystemD, this time, I see it more as a fault of the package maintainers, because... I found no default apache2/httpd service file in the apache repo mirror... So...8 -
"What is your project status? I need an update!"
So spoke the team leader. I was mildly hesitant about just rudely leaving work - which I was about to do, I was literally halfway out the building - without answering and delaying to Monday.
My project leader - the one that is supposed to look after me and my project every now and then - is on vacation. He's also the one, who is supposed to update the team leader.
It's not that we don't talk regularly, apart from his questions every two months or so, he is informed about my project on a bi-to-tri-weekly basis whether he wants it or not.
The team leader on the other hand seemed quite uninformed about my project.
Wouldn't it be nice if people would fucking talk to each other?!
Other than that, I'm learning C# for roughly six months now and today was the day it all started making sense. OO is a concept that is hard for me to grasp - I understand it, but I continuously failed to implement it. (That I have no regular code review right now isn't helping.)
Today, it just clicked.
I feel kind of stupid and in awe at the same time right now. :D2 -
Why are product managers always so irritating. I mean i understand they can't code, but then why do they have to be so nosy about status updates.
Its not like if i show progress to you it'll get done quicker. In fact more likely than not it will get delayed. Because you'll start realising things you haven't really thought about.
I somehow feel they are there to only make the entire environment just much more frustrating.6 -
while( me.getStatus() != Status.RICH){
try{
Project p = createProject();
wait();
me.setStatus(p.getStatus());
}catch (GaveUpException e){
me.setStatus(Status.404);
}
** Warning: code unreachable **
System.out.println("I'M RICH!");2 -
When some other team wants to blame us because they're getting a HTTP Status Code 0....
That's not even a valid status... IT MEANS YOU ABORTED THE REQUEST AND KILLED THE CONNECTION...
OH STILL OUR FAULT... WELL DO U KNOW ABOUT NETWORK ISSUES AND SERVER OVERLOADING WHEN U SPAM IT WITH TOO MANY REQUESTS?
OH YOU RETRIED? HOW DID YOU RETRY? BETTER NOT BE SPAMMING US WITH MORE REQUESTS...
EVER HEARD OF TCP/IP BACK OFF LOGIC....4 -
That awkward moment when you phone IKEA Costumer Service to ask for the buCode that is used in their API to see product status in stores.
First I spoke to a salesperson and almost had to explain what an API is. The next person understood (after a while) that it is a 3-digit code that identifies the store.
And yes, I am from Sweden. 😂2 -
My eyes hurt everytime our backend guy gives me a new REST API to implement in our app and always the formatting of the json is something like this. Like why can't you just fucking format it properly so I won't have to look at my code and feel disappointed for writing such ugly code. All because your lazy ass didn't care to understand the fundamentals of how json objects and arrays work !!! It's been a month since I've joined this company and I'm tired of explaining why we should use the status code for failure checking and not this stupid pass/fail status flag. I don't even remember how many times I've brought it up but everytime I get reasons like "Dude, you know what our server is never going to go down or fail so it doesn't even matter". And at that point I feel like I shouldn't even argue with him anymore.3
-
Storytime!
(I just posted this in a shorter form as a comment but wanted to write it as a post too)
TL;DR, smarts are important, but so is how you work.
My first 'real' job was a lucky break in the .com era working tech support. This was pretty high end / professional / well respected and really well paid work.
I've never been a super fast learner, I was HORRIBLE in school. I was not a good student until I was ~40 (and then I loved it, but no longer have the time :( )
At work I really felt like so many folks around me did a better job / knew more than me. And straight up I know that was true. I was competent, but I was not the best by far.
However .... when things got ugly, I got assigned to the big cases. Particularly when I transferred to a group that dealt with some fancy smancy networking equipment.
The reason I was assigned? Engineering (another department) asked I be assigned. Even when it would take me a while to pickup the case and catch up on what was going on, they wanted the super smart tech support guys off the case, and me on it.
At first this was a bit perplexing as this engineering team were some ultra smart guys, custom chip designers, great education, and guys you could almost see were running a mental simulation of the chip as you described what you observed on the network...
What was also amusing was how ego-less these guys seemed to be (I don't pretend to know if they really were). I knew for a fact that recruiting teams tried to recruit some of these guys for years from other companies before they'd jump ship from one company to the next ... and yet when I met them in person it was like some random meeting on the street (there's a whole other story there that I wish I understood more about Indian Americans (many of them) and American engineers treat status / behave).
I eventually figured out that the reason I was assigned / requested was simple:
1. Support management couldn't refuse, in fact several valley managers very much didn't like me / did not want to give me those cases .... but nobody could refuse the almighty ASIC engineers. No joke, ASIC engineers requests were all but handed down on stone tablets and smote any idols you might have.
2. The engineers trusted me. It was that simple.
They liked to read my notes before going into a meeting / high pressure conference call. I could tell from talking to them on the phone (I was remote) if their mental model was seizing up, or if they just wanted more data, and we could have quick and effective conversations before meetings ;)
I always qualified my answers. If I didn't know I said so (this was HUGE) and I would go find out. In fact my notes often included a list of unknowns (I knew they'd ask), and a list of questions I had sent to / pending for the customer.
The super smart tech support guys, they had egos, didn't want to say they didn't know, and they'd send eng down the rabbit hole. Truth be told most of what the smarter than me tech support guy's knew was memorization. I don't want to sound like I'm knocking that because for the most part memorization would quickly solve a good chunk of tech support calls for sure... no question those guys solved problems. I wish I was able to memorize like those guys.
But memorization did NOT help anyone solve off the wall bugs, sort of emergent behavior, recognize patterns (network traffic and bugs all have patterns / smells). Memorization also wouldn't lead you to the right path to finding ANYTHING new / new methods to find things that you don't anticipate.
In fact relying on memorization like some support folks did meant that they often assumed that if bit 1 was on... they couldn't imagine what would happen if that didn't work, even if they saw a problem where ... bro obviously bit 1 is on but that thing ain't happening, that means A, B, C.
Being careful, asking questions, making lists of what you know / don't know, iterating LOGICALLY (for the love of god change one thing at a time). That's how you solved big problems I found.
Sometimes your skills aren't super smarts, super flashy code, sometimes, knowing every method off the top of your head, sometimes you can excel just being more careful, thinking different.4 -
ideal sprint fallacy.
total days 10 , total hours(excluding breaks ) 8 hrs per day= 80 hrs per dev
code freeze day = day 8, testing+ fixing days : 8,9,10. release day : day 10
so ideal dev time = 7days/56 hr
meetings= - 1hr per day => 49 hrs per dev
- 1 day for planning i.e d1 . so dev time left . 6 days 42 hrs.
-----------
all good planning. now here comes the messups
1. last release took some time. so planning could not happen on d1. all devs are waiting. . devtime = 5 days 35 hrs.
2. during planning:
mgr: hey devx what's the status on task 1?
d: i integrated mock apis. if server has made the apis, i will test them .
mgr : server says the apis are done. whats your guestimate for the task completion?
d : max 1-2 hrs?
m : cool. i assign you 4 hrs for this. now what about task 2?
d : task told to me is done and working . however sub mgr mentioned that a new screen will be added. so that will take time
m : no we probably won't be taking the screen. what's your giestimate?
d : a few more testing on existing features. maybe 1-2 hrs ?
m: cool
another 4 hrs for u. what about task 3?
d : <same story>
m : cool. another 4 hrs for u. so a total of 12 hrs out of 35 hrs? you must be relaxed this sprint.
d : yeah i guess.
m cool.
-------
timelines.
d1: wasted i previous sprint
d2 : sprint planning
d3 : 3+ hrs of meetings, apis for task 1 weren't available sub manager randomly decided that yes we can add another screen but didn't discussed. updates on all 3 tasks : no change in status
d4 : same story. dev apis starts failing so testing comes to halt.
d5 : apis for task1 available . task 3 got additional improvement points from mgr out of random. some prod issue happens which takes 4+ hrs. update on tasks : some more work done on task 3, task 1 and 2 remains same.
d6 : task1 apis are different from mocks. additionally 2 apis start breaking and its come to know thatgrs did not explain the task properly. finally after another 3+ hrs of discussion , we come to some conclusions and resolutions
d7 : prod issue again comes. 4+ hrs goes into it . task 2 and 3 are discussed for new screen additiona that can easily take 2+ days to be created . we agree tot ake 1 and drop 2nd task's changes i finish task 2 new screens in 6 hrs , hoping that finally everything will be fine.
d8 : prod issue again comes, and changes are requested in task 2 and 3
day 9 build finally goes to tester
day 10 first few bugs come with approval for some tasks
day 11(day 1 of new sprint) final build with fixes is shared. new bugs (unrelated to tasks. basically new features disguised as bugs) are raised . we reject and release the build.
day 2 sprint planning
mgr : hey dev x, u had only 12 hrs of work in your plate. why did the build got delayed?
🥲🫡5 -
I hate having to deal with our IT service desk. Every time it takes enormous energy to get to the right people and make them understand that no, you are not an idiot, but you actually have a technical issue.
Sure thing they do have a few competent nice folks there too I've gotten to know over time and they indeed have to deal with a ton of dumb non-tech savvy idiots on a daily basis. However, if my job title mentions "software" and "engineer" they should at least assume I'm an idiot in tech. Or something. Every single time I need to open a ticket, even for the simplest "add x to env y", I need to quadruple check that the subject line is moron-friendly because otherwise they would take every chance to respond "nah we can't do that", "that's not us", or "sry that's not allowed". And then I would need to respond, "yes you do:) your slightly more competent colleague just did this for us 2 weeks ago".
Now you might imagine this is on even another level when the problem is complex.
One of our internal apps has been failing because one of the internal APIs managed by a service desk team responds a 500 status code randomly but only when called with a specific internal account managed by another service desk team.
(when I say "managed by", that doesn't mean they maintain it, it just mean they are the only ones who would have access to change something)
Yesterday I spent over a fucking hour writing a super precise essay detailing the issue, proving a million times it's not on our end and that they need to fix it. Now here is an insight to what beautiful "IT service" our service desk provides:
1) ticket gets assigned to a "Connectivity Engineer" lady
2) few hours later she responds and asks me to give her the app and environment IDs and grant her access to those
(naturally everything in my email was ignored including these two IDs)
3) since the app needs to be in prod for the issue, I make a copy isolating the failing part and grant her access to the original "for reference" and the copy to play with
4) few hours later I get an email from the env that some guy called P made changes to the actual app, no changes to the copy
(maybe they immediately fixed the app even though I asked them to only touch the copy)
I also check the env and the live app had been shared with another 2 people giving them editing rights:)
5) another few hours pass and the lady responds that she had been chatting with P (no mention of who tf that guy is) and that P has a suggestion that might work and I should test it, "please see screen shot" for details:
These motherfuckers sent me a fucking screenshot of the env config file where "P has edited a few parameters" that might help. The screenshot had a 16 line part of the config json with a bunch of IDs and Base64 params which HE EDITED LOCALLY.
Again, because I needed a few iterations to realise what I've just witnessed:
These idiots modified some things in the main app (not the copy) for hours. Then came to the conclusion that the config needs some IDs and params updated. They downloaded the config json. Edited it locally. Did not fucking upload it back to the main or test app. Did not test it live. Did not CC in or direct the guy with changes to me. Did not send me the modified config file. Did not even paste the new IDs into the email. But TOOK A FUCKING SCREENSHOT OF THE MODIFIED FILE AND SENT THAT SHIT TO ME. And then had the audacity to ask me to test it when they had access to it and that's literally their fucking job.
I had to compare the fucking screenshot to the live config file and manually type in the changes.
And no, it still doesn't work. And Now I have to get back to them showing it still fails the same way but I just can't deal with these people. Fuck. Was hoping by the time I write it all down it'd be better, and it does feel a bit better, but I still need to get this app fixed. And I can only do it through these... monkeys. I just can't. Talking to these people drains my life energy... I'm just sad. -
SO MAD. Hands are shaking after dealing with this awful API for too long. I just sent this to a contact at JP Morgan Chase.
-------------------
Hello [X],
1. I'm having absolutely no luck logging in to this account to check the Order Abstraction service settings. I was able to log in once earlier this morning, but ever since I've received this frustratingly vague "We are currently unable to complete your request" error message (attached). I even switched IP's via a VPN, and was able to get as far as entering the below Identification Code until I got the same message. Has this account been blocked? Password incorrect? What's the issue?
2. I've been researching the Order Abstraction API for hours as well, attempting to defuddle this gem of an API call response:
error=1&message=Authentication+failure....processing+stopped
NOWHERE in the documentation (last updated 14 months ago) is there any reference to this^^ error or any sort of standardized error-handling description whatsoever - unless you count the detailed error codes outlined for the Hosted Payment responses, which this Order Abstraction service completely ignores. Finally, the HTTP response status code from the Abstraction API is "200 OK", signaling that everything is fine and dandy, which is incorrect. The error message indicates there should be a 400-level status code response, such as 401 Unauthorized, 403 Forbidden or at least 400 Bad Request.
Frankly, I am extremely frustrated and tired of working with poorly documented, poorly designed and poorly maintained developer services which fail to follow basic methodology standardized decades ago. Error messages should be clear and descriptive, including HTTP status codes and a parseable response - preferably JSON or XML.
-----
This whole piece of garbage is junk. If you're big enough to own a bank, you're big enough to provide useful error messages to the developers kind enough to attempt to work with you.2 -
Any senior types out there find that you’re losing your coding “chops”? I’m involved in so many OS/Middleware upgrades, infrastructure upgrades, status meetings that I can’t code to save my life anymore. I can review and guide design, but I struggle to generate new code. I can get a new dev going really quickly though - is this just a natural progression or is it game over for me? I feel like if I had to get another job, I’d be very unsuccessful. They call me a leader, but I think I’m just a slave.6
-
CrowdStrike came down to an untended, uncaught Null pointer that could have been caught with basic code review and testing before push. That is all. https://x.com/Perpetualmaniac/...9
-
Hi guys!
I never thought that this day will come, be here is my first rant with a big dose of frustration.
So, I'm working on the API team of one of ower products and a coworker that works on the webapp has a lot of problems (don't want to be mean, but he has problems like 'i can't catch a 404 http status, please send a 200 with a message' ) and he always go and wines about the API and that he can't do his job because the API is faulty...
But it is not the case, every functionality of the API is well tested and it works as it should.
So, tonight I was the only one left from my team and the project manager comes and
starts asking me about why I am returning http status codes with all my responses, how the login works and other stuff like that...
Just wasted more than an hour to prove that all the code that I wrote works as expected...1 -
I've had a Xiaomi Mi 8 for a few months now. Although I'm impressed by what I got for the amount I paid (a phone that cost about $250 for 6GB RAM, Snapdragon 845, Android 9 and premium build quality is quite a steal), it definitely comes with a consequence.
MIUI (specifically MIUI 11) is godawful. It is single-handedly the worst Android ROM I've ever used since my shitty Android 2.2 phone back around 2010. If you're gonna buy a Xiaomi phone, plan to install Lineage OS on it (but even that's a pain which I'll explain why later).
- Navigation buttons don't hide while watching a video.
Why? God only knows. The ONLY way to bypass without root this is to use its garbage fullscreen mode with gestures, which is annoying as all hell.
- 2 app info pages?
Yeah, the first one you can access just by going to its disaster of a settings app, apps, manage apps and tap on any one.
The 2nd one you can access through the app info button in any 3rd party launcher. Try this: Download Nova launcher, go to the app drawer, hold on any app and tap "app info", and you'll see the 2nd one.
Basically, instead of modifying Android's FOSS source code, they made a shitty overlay. These people are really ahead of their time.
- Can only set lock screen wallpapers using the stock Gallery app
It's not that big an issue, until it is, when whatever wallpaper app you're using only allows you to set the wallpaper and not download them. I think this is both a fuckup on Xiaomi and (insert wallpaper app name here), but why Xiaomi can't include this basic essential feature that every other Android ROM ever made has is beyond me.
- Theming on MIUI 11 is broken
Why do they even bother having a section to customize the boot animation and status bar when there's not one goddamn theme that supports it? At this point you're only changing the wallpaper and icon pack which you can do on any Android phone ever. Why even bother?
They really, REALLY want to be Apple.
Just look at their phones. They're well designed and got good specs, but they don't even care anymore about being original. The notch and lack of a headphone jack aren't features, they're tremendous fuckups by the dead rotting horse known as Apple that died when Steve Jobs did.
Xiaomi tries to build a walled garden around an inherently customizable OS, and the end result is a warzone of an Android ROM that begs for mercy from its creator. Launchers integrate horribly (Does any power user actually use anything that isn't Nova or Microsoft launcher?), 3rd party themes and customization apps need workarounds, some apps don't work at all. People buy from Xiaomi to get a high end budget Android phone at the price of some ads and data collection, not a shitter iOS wannabe.
They really, REALLY want you to have a sim card
If you don't have a sim card and you're using your phone for dev stuff, you're a 2nd class citizen to Xiaomi. Without one, you can't:
- Install adb through adb
- Write to secure settings
- Unlock your bootloader and get away from this trash Android ROM
What's the point? Are they gonna shadow ban you? Does anyone contact them to unlock their bootloader saying "yeah I wanna use a custom rom to pirate lizard porn and buy drugs"? They made this 1000000000x harder than it needs to be for no reason whatsoever. Oh yeah and you gotta wait like a week or something for them to unlock it. How they fucked up this bad is beyond me.
So yeah. Xiaomi. Great phones, atrocious OS.11 -
So this happened when I was interning. We were developing an online application for hospitals. Now as it is with any new product. We had a lot of small issues popping up related changing of text or design colors. Now this piss kissing product manage of ours who has had no prior experience of a product of the scale we were developing started posting issues in the company’s internal whatsapp group. It was fine initially when the issues were less and small. However, when the amount and intensity grew, I suggested that he be given access as a issue poster on the git repo of the code.
Now I couldn’t comprehend his level of douchiness before hand but this guy started posting issued there but only a link to a google doc with the issue described there.
Then when came the time to change the status of these issues, I asked him to verify for his satisfaction that the issue is resolved and mark it as such. So Mr. Shitmenot started to maintain a fucking google sheet to maintain the status of issues and asked us to do the same. And upon demarcation he would manually change the color of the cells representing the issue. Like what the fuck dude.
I complained about this to my mentor who also happened to be he CEO but he couldn’t care less as if it was some debt that he owed the guy.
Safe to say I left the company shortly after things started to get out of hand and more shit began to happen. Yes there was more stuff that happened!!! -
https://twitter.com/captainsafia/...
This twitter thread got my thinking. Most of the code I’ve written in my professional life has been proprietary. My job also tends to run over the 9-5 band for various reasons depending on the current ongoing projects. When I get home I still have a house to run and a family to tend to. As such my GitHub has been mostly untouched since university some years ago. I’ve tried committing to a few oss projects but I just can’t find the time. However, it is an *expectation* in our industry that you have published projects and lots of public GitHub commits if you want to be recruited by another company. No other industry works this way and this is crazy and unfair4 -
my fist job... i get to edit a c++ code written by a (mind you) programming company that they teamed with for the past(mind you again) 3 years ...
now just for starters, this code was edited by self taught coders that are really good engineers(they are really good), that didnt really know how the code worked before yet they still changed it, and it worked, how ever they wanted some changes.
i get the project files, and there is not one single comment describing what is happening... only code commented out... and no documentation what so ever were done....
so below are some of my comments that i wrote after i finished adding what i had to add, and fixing what i had to fix:
/*first rule of C anything coding, no actual functions in the header, well let me introduce you to a fully functioning thread running program all in the header, enjoy*/
//used to control the thread
// i honestly dont know why, but it worked soooooo yea...
// TG uncommented // for absolutely no reason what so ever...
//used to communicate with the port
//the message to be sent to the inverter, which has a code that will handle it
//hmmmmmm...
//again not usefull since we are using radioButtons
// same ...
// same ...
// same ...
// they said they dont even use this mode, but none the less, same ...
// calculate the checksum for the message
// ....
// one of the things that work, and god forbids i touch
// used for the status displayed on screen
// used for the (censored :P) status in the message
// used for the (censored :P) status in the message
// not used at all, but the message structure contains it and i refuse to edit that abomination
// used for the (censored :P) status in the message
// used for the (censored :P) status in the message
// just dont ask and roll with it, i didnt want to touch this
// saaaaame ...
// if before true this saaaaaame ...
// value of the (censored :P)
// it pains me to say it again, but this is no use
// (censored :P) input
// (censored :P) input
// only place seen , like for real it was just defined,sooooo yea :D
// well you know how it is
// message string
// check sum string
/****below from feed back****/
// (censored :P) coming in
// (censored :P) coming in
// (censored :P) coming in
// (censored :P)
/****below is the output to the receiver ****/
//(censored :P)
// (censored :P)
// (censored :P)
// (censored :P)
//you thought we were done.... nope, no idea. it comes in the feedback
// not used, literally commented out the one time it was used
// same ...
// XD, man this is a blast, same ...
// nope ...
// used to store the port chosen for the communication
// is a static for the number of data we have recorded so far, and as a row indicator for the recording method
// used to indicate the page we are on in the excel file, as well as the point in physical point in the test
// same ... oh look at this a positive same :D
// same ...
// same ...6 -
I was just wondering why the flying fuck OxyPlot was rendering an unknown node on my chart for monday when I only queued my sql db for a single Tuesday.
Noticed it was an auto generated node, which had the right time, status, everything.
I looked up my code and found out that the date somehow bugged out, and if c# isn't sure what to do with an empty date it initializes a date on 1.1.0001
And what do you know. Appearantly thats a Monday.
I broke my head way harder over this than I should have, assuming the worst possible bugs in the render engine. fml -
Was working on a system we planned on to deliver to a hospital
basically it was meant for controlling and monitoring pactions coming in and attendance time from the staff
Got it off the ground well and got to where the system was supposed to update room status
occupied/free then horror started
the db was not setting the room free after clearing a client off the list... room remained occupied and this kept on happening for 6 months and I was so focused on fixing the db models thinking thats where the problem was....
1 day after leaving the project for several months i just revisited the project randomly and started going through the whole code base trying to make sense of what was happening as there where no errors generated..
I had to verify the whole system logic... and that day i figured out what was happening...
upon adding a client to a room the system was also creating a duplicate room so when the function for setting the room free executes it would set the duplicate room free and not the actual room and the system would pick the room with occupied state causing the user not being able to assign new pactions to the room
Solving this brought so much relief coz it required so much work just to solve what seemed to be a minor issue5 -
I wrote an algorithm that incorporates a 3rd party API. and the algorithm is so fast and optimized that I started to get 429 status codes from the third party API, asking me to slow down my requests, which I didn't think was an issue when I tested on local env.
Now I'm on purpose slowing down my code, to prevent that from happening.
Talk about suffering from success.8 -
When I hit the endpoint from Postman it works. When I hit the endpoint from my application that pushes data to the endpoint it doesn't work, returning a 404 status code. I KNOW the endpoint is there and operational and that both Postman and my application have the same endpoint configured, letter for letter.
So lost. So confused. What the hell is going on.
I decide to install Fiddler to monitor the traffic to see if I can see anything helpful.
I initiate the request again from the application and immediately see that the request size is huge. BAM. It immediately hits me, the payload to the endpoint is too big and the server is "rejecting" it with a 404. I post a smaller request with the application and it works fine.
Yay, saved by Fiddler.
Why does the endpoint default to 404 in such scenarios. The definition of 404: "the client was able to communicate with a given server, but the server could not find what was requested"
In my case, the 404 returned was a red herring. I understand that the substatus code gives more information on why the 404 was returned, in my case the request size being too big, but 404 in general feels like the wrong status code to return because the endpoint IS there. It made me troubleshoot the wrong thing.
Thanks, IIS.4 -
The moment you realize that you have successfully beaten reality with your unit-tests...
There are unit-tests for ...
... the api returning a 408 Http StatusCode when an internal request times out.
... the react app take this status-code and fires an action to display a specific error message for the user.
Every bit of code runs just fine.
Deploy this hell of an app on the server. Dandy Doodle.
Do a smoketest of the new feature.
FAIL!
Chrome starts to crumble during runtime. The api Request freezes.
Firefox takes the 408 api response but fails to interpret it in react app.
So I began to wonder, what the hell is going on.
Actually I recognized that I had the glorious idea to return a clientside error code in a serverside api response.
Glorious stupidity :/
Finally I fixed the whole thingy by returning an 504 (Gateway timeout) instead of 408 (Clientside timeout)
Cheers!2 -
Load a medium post. Wait for the entire junk to download. Or stop the loading if you just want to read the text content
But Medium has other ideas. Hook to the cancel event, show a useless page which only has the reload link. And why would it trigger the HTTP 500 status code to be sent? 🤔9 -
When you're not confidant enough in your own code ... but you should be:
Me: "Why the hell is this duplicating data?!?!?!"
-time passes-
-figures it out-
Me: Wait that returns an error wouldn't that be ...
Yeah there was an error on the god damn screen in the status box I created telling me what was going wrong but I just ignored it... I was knee deep in code and my own UI was telling me what was wrong ;)2 -
Once I maintained one of the most used and fucked up codebases on the market with almost 1M+ daily users. (cannot say more, sorry).
It's written in PHP and is absolutely terrifying,
the first time I saw some lines of code I was about to scream and cry.
- spaghetti code
- no indentation
- random SQL query unoptimized
- unused vars
- Code is split among several files with no logical reasoning
- Mixed procedural and oop programming
- Unsanitised user input (yes, you got it right)
No test environment, no backup database, every commit goes straight to production.
It's a real disaster but the company prefers to keep it as it is without refactoring or anything else.
Just to make it clear:
It's not hatred against PHP, it's against the code's current status and the older programmers which used to work on it.5 -
When the CTO/CEO of your "startup" is always AFK and it takes weeks to get anything approved by them (or even secure a meeting with them) and they have almost-exclusive access to production and the admin account for all third party services.
Want to create a new messaging channel? Too bad! What about a new repository for that cool idea you had, or that new microservice you're expected to build. Expect to be blocked for at least a week.
When they also hold themselves solely responsible for security and operations, they've built their own proprietary framework that handles all the authentication, database models and microservice communications.
Speaking of which, there's more than six microservices per developer!
Oh there's a bug or limitation in the framework? Too bad. It's a black box that nobody else in the company can touch. Good luck with the two week lead time on getting anything changed there. Oh and there's no dedicated issue tracker. Have you heard of email?
When the systems and processes in place were designed for "consistency" and "scalability" in mind you can be certain that everything is consistently broken at scale. Each microservice offers:
1. Anemic & non-idempotent CRUD APIs (Can't believe it's not a Database Table™) because the consumer should do all the work.
2. Race Conditions, because transactions are "not portable" (but not to worry, all the code is written as if it were running single threaded on a single machine).
3. Fault Intolerance, just a single failure in a chain of layered microservice calls will leave the requested operation in a partially applied and corrupted state. Ger ready for manual intervention.
4. Completely Redundant Documentation, our web documentation is automatically generated and is always of the form //[FieldName] of the [ObjectName].
5. Happy Path Support, only the intended use cases and fields work, we added a bunch of others because YouAreGoingToNeedIt™ but it won't work when you do need it. The only record of this happy path is the code itself.
Consider this, you're been building a new microservice, you've carefully followed all the unwritten highly specific technical implementation standards enforced by the CTO/CEO (that your aware of). You've decided to write some unit tests, well um.. didn't you know? There's nothing scalable and consistent about running the system locally! That's not built-in to the framework. So just use curl to test your service whilst it is deployed or connected to the development environment. Then you can open a PR and once it has been approved it will be included in the next full deployment (at least a week later).
Most new 'services' feel like the are about one to five days of writing straightforward code followed by weeks to months of integration hell, testing and blocked dependencies.
When confronted/advised about these issues the response from the CTO/CEO
varies:
(A) "yes but it's an edge case, the cloud is highly available and reliable, our software doesn't crash frequently".
(B) "yes, that's why I'm thinking about adding [idempotency] to the framework to address that when I'm not so busy" two weeks go by...
(C) "yes, but we are still doing better than all of our competitors".
(D) "oh, but you can just [highly specific sequence of undocumented steps, that probably won't work when you try it].
(E) "yes, let's setup a meeting to go through this in more detail" *doesn't show up to the meeting*.
(F) "oh, but our customers are really happy with our level of [Documentation]".
Sometimes it can feel like a bit of a cult, as all of the project managers (and some of the developers) see the CTO/CEO as a sort of 'programming god' because they are never blocked on anything they work on, they're able to bypass all the limitations and obstacles they've placed in front of the 'ordinary' developers.
There's been several instances where the CTO/CEO will suddenly make widespread changes to the codebase (to enforce some 'standard') without having to go through the same review process as everybody else, these changes will usually break something like the automatic build process or something in the dev environment and its up to the developers to pick up the pieces. I think developers find it intimidating to identify issues in the CTO/CEO's code because it's implicitly defined due to their status as the "gold standard".
It's certainly frustrating but I hope this story serves as a bit of a foil to those who wish they had a more technical CTO/CEO in their organisation. Does anybody else have a similar experience or is this situation an absolute one of a kind?2 -
2 years back when I was onshore, we were in the bad situation due to the size and complexity of handling big webserivces simulators. A single change makes the build red hence the face of other developers too.
These simulators were created using J2EE and VM templates 5 years back. With the time, application and data size grown. We were supposed to maintain consistensy in dummy data accross the applications. But some programmers made a copy of these simulators to finish their applications fast and made the situation worst.
Finally one of the team member dare to use stubby4j to solve this problem. Choosing the stubby4j was a good decision as it was the specialized tool written to create simulators only. But as the stubby4j was not having all the features a simulator need, he customized it's build for our simulators. All the team members were happy.
After few weeks, I picked a story to transform other simulators using stubby4j. The story was previously closed as it was hard to implement in stubby4j. I ingonred the comment and started working on. I spent 2 weeks but couldn't solve the problem. I read the comment in between but It was very late to take the step back. I was not able to give proper status update in the daily standup. Other team members (working from offshore) were thinking that I'm just passing the time. However my manager handled the situation very well and asked if I need some help.
This was friday, I took the leave as it was my wife's birthday. We couldn't go out due to the bad weather. I was thinking about the code all the time. Hence I started to write a new utility to handle all the requirement a webseervice simulator need. I took 2.5 days to complete it. On Tuesday, I demoed it to the whole team. And published it as an opensource application "STUBMATIC". In few weeks I received the good response from other teams as well.
I'm a full time open source developer now. -
FUCK YOU VODAFONE!
My internet broke down the weekend, 4 minutes after I left my house on Friday at 9.04am.
Issue resolved after work at 9pm, broke down half an hour later.
Total silence. Providers status page gave 500 response.
THE NEXT DAY: Woke up because Netflix was working at 8.26am again.
Great, I get up. Can't wait to do anything I want again! I can code, game, watch porn, possibilities are endless!
I get stuff to breakfast. Come back and guess what? NO INTERNET!
Got confirmation of existence of problems at noon. Something with streaming, possibly fixed by Monday.
Okay maybe streaming, but shouldn't the other stuff then work? I process.
Used up my mobile data. Tried again, now it works, but...
.. why.. so.. slow? It was worse than 3g. Time to get out lynx to Google.
It's Sunday. I woke up pissed, got myself a Coffee and tried to get some offline work done. I sipped, closed my eyes for a moment and opened chrome.
IT WORKED! omg, fuck yes! I almost cried I was that happy - can you believe it?
All fine an dandy Monday. So surely the streaming thing will also be gone now, cool.
Today's day is Tuesday. Guess why I am writing this.
Fuck these apprentice nigga cunts graaaaa!!! Or their infrastructure will finally break down.
How is it even possible to do any work on a very important node at a time where probably everyone wants to chill out with the web?7 -
I was reviewing a Pull Request recently and there was this line
`return josn(202, 'Record does not exists')`
I told the developer that, status code and description does not match.
He just did not want to accept that he was wrong and told me that, since this function is not exposed to public, it does not matter.
Whats wrong in accepting that you are wrong. We do make mistakes, consciously or unconsciously. Huur. I regretted reviewing his codes there after.5 -
In SublimeText, I noticed that my markdowns formatting was not showing up correctly— I decided to download the new markdown package altogether hoping for some kind of update/fix. Turns out the package comes with a super ugly color theme which overrides the default theme of SublimeText. After some googling and experimenting, I found way to override this through the package settings. I always use git through my terminal but I thought let’s try to use git through my code editor and see how it works. I downloaded the git package but then I notice that git tool shows status and all correctly but doesn’t push files to GitHub (it says fatal: unable to read current working directory). Then I download another application called SublimeMerge. It works correctly on its own (pushes files to GitHub) but SublimeText is still not doing the same. Then I tinker around with my SSH keys hoping for a fix, but nothing works. I even go to stackoverflow and search for a solution but I find nothing (I even wrote a post asking for a solution but no replies till now). Fuck it! I now open the file with VSCode. Open terminal within VSCode and add/push/commit through it and everything works perfectly. So goodbye SublimeText I guess 👋🏾11
-
Few years ago I was asked to give advice on a project. There was an intern doing all the work and I even gave him almost ready code to use. And he didn't use it even properly.
And best part is that they thought at the time that it would be finished in couple of months.
After few months I took over and had to deal with the "intern code". Almost all of the code is rewritten.
Status of the project is now very good. We are implementing new features and it has even passed strict security audit done by other company.
Sadly I can't drop any names etc due to NDA.4 -
A new development rule I've started to implement:
All backend APIs will be written with the assumption that it's gonna get distributed as an API for 3rd parties to be integrated in their systems - meaning that every API I write will have proper response status codes for appropriate scenarios (like 400, 429, 500 status codes).
No more `res.json({status: false, message: 'message'})` with 200 status code across the board.9 -
<!doctype confusedRant 😕>
Plot: we need to release our website in two weeks which holds at least a thousand pages. All these pages are manually migrated from the old website, which doesn't have a database. Current status: 650 pages/1000 are completed, 40 different templates need to be adapted. I'm alone on these templates, my colleagues create the pages and fill the new database
So I'm working on the templates a WebDev coded for our website on a licensed CMS, and had this decently simple html block that looks like a square and consisting of roughly this (Emmet style):
a.area > blockquote > strong.title + p
After adding another <a> element inside the p, I noticed that my <a> wouldn't display and bust the whole look of the square.
Just for more details, the CSS the dev made is ultra specified (meaning each element is too precisely "described" : div.class .child .child2 { /* styles */ } when it could be .class .child2 for example). Also, the templates he made need to be compatible with any "module" the website has, thus the need of this high specificity
So I fired up the DevTools to check what happened, and had:
Expected: a.area > blockquote > strong.title + p > a
Actual result: some new a.area were wrapping the <strong>, the <p> and the <a> I just added. The source code was not showing any of this but just the rules I initially wrote - the expected result
Wtf?! I thought the JS the dev made was adding elements. I disabled said JS, and bam, these a.area were still wrapping everything!! What black magic would add these stupid tags I never asked for.
So I went looking in the CSS files in case some wizardry was happening, but everything was OK.
I tried changing my structure, changing tag (swapping a.area to p.area or without .area), HTML just said "nope, have those please".
Eventually I rewrote my own module out of frustration after three quarters of an hour fiddling with this stupid "module". I hate losing time for such shenanigans and under a lot of pressure because of deadlines.
Still haven't figured why those <element>.area would wrap everything out of nowhere...3 -
Yesterday morning I was working on importing records to a Shopify store. A few thousand records in their API starting returning status code 420 with the message "Unavailable Shop", same for the admin panel.
I called support and they created a ticket but it's been almost 24 hours and our shops API and admin panel are still on a smoke break apperently. -
Some Java code I looked through to figure out how to accurately rework a mapping of value intervals to status colors:
• 16 levels of indentation
• Calls an instance method one line before a null-check
• Assigns that same value to a new variable and null-checks it again
• Insistently loops over existing HashMaps' entry sets to find a value by key
• Stringifies a Gson object, parses back the string and then null-checks the result.
• Mixes up the 'leq' and 'geq' comparison operators twice, which is why I went to check the implementation in the first place.
And this wasn't even legacy code. It's from last year.1 -
How do you test unreachable code or part that is considered an edge case?
For example I catch exceptions in case IO failed and data was not written on database, but that only happens if hardware failure, or no disk space left, how do I mimic that?
I also have unreachable code for example, in one layer I fetch data (lets call it function x) and always return success result unless item not found I throw KeyNotFound exception. But in the calling function I handle the case of Status == Failed
Just in-case in the future I change function x and start returning failed status, so my logic already written but never reachable14 -
Marketing Person: [email] The feature you worked on is setting our customers’s statuses to “transactional.” We can’t send them marketing emails.
😒🙄
Me: [email] My code is not doing that. It checks to see if a contact exists in our mailing list. If it does, it adds the contact to the new list that you requested. If it doesn’t, it creates a contact and adds it to the list. Newly created contacts default to “onboarding.” For already existing contacts, I’m just adding them to the list and I’m not changing anything else. Here’s a blog post from the marketing software company that explains how a contact could get marked as “transactional.”
Later in the day, Marketing comes over to my desk and brings over the Product Manager. He asks the same question. 😡 Oh hell no. You do not create a gang up on me and hope the social pressure changes my answer.
Me: Like I wrote in my email, my code isn’t wrong and it’s not malfunctioning. It’s doing what you requested: add users who submit their email on x form to the new x list. In the marketing software, you can even check each contact and see when their status got changed to “transactional.” It wasn’t from my code.
I really hate marketing sometimes. Especially when they think they know how my code works. Excuse me, do you have access to our git repo? Can you read the code and point out the supposed problem? I didn’t think so. So don’t go accusing me of making a mistake or doing my job wrong.4 -
The getting started of react native sucks big time.
If you don't want to display a completely centered text then go fuck yourself or what?
I mean there isn't even a howto on platform-independently not overlapping the fucking status bar. Everyone must've faced this problem when starting, but the only answer is an 8 times upvoted answer on SO telling me to add a hardcoded padding. What.
Where did this whole thing come to..🙁
Back in the days books about c didn't even start with more than 4 lines of code on the 70th page.
And when you google things about it it feels like you doing something totally wrong but its like the first thing a normal dude would do, what if i don't want shit centered bro i feel so useless and dumb i friggin hate that shit just fucking tell me what the fucking fuck to do!😫
It bugs me so hard cus i didn't even know a View is able to stick out on top of the app it doesn't make no sense to me the whole world is breaking apart12 -
I think UPS' Api documentation and service must be the worst documented and build API I have ever seen from a corporate.
1. The developer website is a mess. A total mess. You can barely find the API type you are looking for.
2. When you get the API and download the documentation, the files, .pdf etc is still a mess. Pages long that most are craps.
3. Each request returns Status Code 200. Even if it is an error. This blew my mind.
4. Each request, based on error type or based on tracking activity returns different JSON schema.
For example, the JSON Schema for a shipment in transit is different from JSON schema for a shipment that has been delivered. A shipment that has been returned, a shipment that required signature etc. They are different from each other.
5. And the worst. They do not provide with test tracking codes. I have found some on internet, but they do not work in development and production environment.4 -
Got the GitHub student developer pack in 10th grade (highschool)
I recently made an application for GitHub student developer pack which got accepted .
If you don't know what this pack is all about , let me tell you this pack gives you free access to various tools that world-class developers use. The pack currently contains 23 tools ranging from Data Science, Gaming, Virtual Reality, Augmented Reality, APIs, Integrated Development Environments, Version Control Systems, Cloud Hosting Platforms, Code tutorials, Bootcamps, integration platforms, payment platforms and lots more.
I thought my application wouldn't qualify because after reading the documentation , I thought that It was oriented more towards college and university students but nonetheless I applied and my application got accepted . Turns out all you need is a school -issued verifiable email address or proof of you current academic status (marksheets etc.)
After few minutes of the application I got the "pro" tag on my GitHub profile although I didn't receive any emails .
I tested it out and claimed the Canva Pro subscription for free after signing up with my GitHub account.
I definitely recommend , if you are currently enrolled in a degree or diploma granting course of study such as a high school, secondary school, college, university, homeschool, or similar educational institution
and have a verifiable school-issued email address or documents that prove your current student status, have a GitHub user account
and are at least 13 years old , PLEASE APPLY FOR THE PROGRAM .
Checkout the GitHub docs for more info..
Thanks !
My GitHub GitHub Username :
satvikDesktop
PS. I would have posted links to some sites and documentations for further reading but I can't post url's in a rant yet :(5 -
How to fail my interview 101:
1. Change your GitHub status to "I love learning new things every day"
2. Start by showing off your code katas
3. "React is the best way to do frontend"
4. "Unit tests are necessary"
5. "TypeScript is better than JavaScript"
6. "I don't have to learn CSS, I use Tailwind"19 -
Changing code and pushing it to the dev build server, so i don't have to wait till the build finishes on my local machine
Everyone sees a notification popup when the build has failed... ( auto build on commit + RSS feeds for build status) -
How do you feel about using TypeScript with React? I appreciate the benefits, but, as every snippet of React code everywhere on the web is vanilla JS,I just don't want the cognitive overhead.
Yes, I know TS is JS, but, if I'm not going to use the features, why bother? I'd want to strongly type props, state, etc.
What's the status of TypeScript support in the React ecosystem (eg Router, MUI, etc.)?
I'm kinda hoping Reason will get some traction as the type inference is much better, but, will that happen? Or is that going to fizzle so it's a choice between TS and JS?
Appreciate any thoughts on this---including those from anyone who's in the same boat.
Looking for views on TS in React ecosystem---no need to sell me on TS in general.6 -
So I was looking into phone app development again (as you do) and I'm working on a simple QoL app for me and my SO that will help us automate some home management and finances stuff. Naturally I delved down the rabbit hole deep and wanted to have push notifications so we don't have to check the app periodically to know when certain things happen... Oh boy... Why is mobile development so convoluted, especially if you don't want to rely on Google Services...
It seems that the most accepted way of doing this is Firebase (FCM). Well me being me, I refuse to use google services for this and I prefer self hosted solutions (for data privacy reasons) which eliminates most products out there.
It also didn't help that my framework of choice is Flutter/Dart, because fuck Android Studio and the insane buggy XML stuff and fuck Android and it's constantly changing APIs...
Well In the end I decided on a rather simple solution and self hosted an AMQP service (RabbitMQ in my case, as I have some experience with it already) and implemented a foreground service in android platform specific code on top of my flutter project to kickstart it and made my phone a queue listener... This now means I can push notifications from my server to the Messaging Queue and it will be pushed into my App automatically!
One thing I found out on this journey was that Android now kills most background services and enforces foreground services to have a visible notification in the status drawer... which I actually approve of. It's a bit annoying that you can start a reliable background service, but I'm absolutely on-board with long running processes started by my apps are constantly visible...
Long story short, I love reinventing all the wheels, especially if it's for free and private... And I also went to sleep at 2AM again because this took longer that I'd like to tune... but it works, and it's google free...
I'm thinking of trying to package this up as a flutter module later, but first I want to do testing on battery life and the general life cycle of the service. RabbitMQ says they have the client library optimized for long-lasting connections and it should be just using a tcp socket, which should pretty much be what all the push notification services are doing anyway. I'm also not completely satisfied with how the permanent notification looks.. it isn't collapsible like some of the other ones from other apps and it's about 2 lines high instead of single line... which is something quite annoying and I'm struggling to find any relevant docs on how this is done other than possible making a custom Notification Style... but I just can't believe that everyone is doing that.. there must be a built-in somewhere -_-... Ugh Android is hell...
Anyway, if any android devs here have some hints, tips and tricks on how to handle this type of background/foreground process stuff and I'm doing something wrong let me know, cause googling this shit is a nightmare too!6 -
Dealing with clients is probably the biggest personal challenge. I'm not much of a people person, and I find it hard to converse with friends and people I've known for years, let alone clients who are looking for answers for why things aren't working, and wanting you to explain exactly (but in simple terms) why a thing that seems simple is so complicated.
Another challenge, which is somewhat related is expressing myself. This again, stems from not being super great or comfortable in conversations, but as a dev, even among other devs, your opinion on things gets asked a lot. For someone who was used to sticking with the status quo and mostly agreeing with things, stuff like peer code reviews, or giving pointers on how to implement something is a big challenge (but I'm improving)2 -
Frontend:" im going to chage some bits because I have been thinking....and when we get errors Im confused because we got code and message"
Me:"yes but that's fine. The http status code should tell you what happened"
Frontend:"oh, you want me to check status code??"
WHYYYYY THIS GUYYYYYY
He even tells u like he is right tone of voice -
Substantive post / question time!
So I'm working on this project that isn't a disaster but very much suffered from a lack of planning (both on my part and others).
This is a feature that involves all sorts of ways to view and manipulate some records and various records and so forth... I mean what isn't that really?
I think everyone tried but we didn't realize how many details there would be and how much we would need to (well I demand we do) share code across pieces and how that would slow us up when we realize feature A needs to do X, Y, Z and ... well obviously that means feature B has to also...
I'm not really upset about this, it's progressing and I'm learning. I'm writing it all now so it's under control, but...
I want to be able to display, visually where we are as far as each component of this project
- Component A
- Description:
- Component A does things you don't want to.
- Has features:
- Can blow up things in a good way.
- Produces flowers and honey on demand
- Missing features:
- Doesn't take out the trash.
And so on for component B, C, D, Z.
Right now I'm just using a plain old document file to write up a status / progress type thing now.
We use Teamwork to manage tasks, but I kinda hate it. It's similar to the above example in being able to bust out lists... but they're not connected in any way. All the details are lost on these bullet items as they're limited to one line when you look at everything ....
It's the classic case of a tool that shows lists ... but doesn't promote or allow for showing any connections between them...
And really the problem with this project is that we built little bits and features here, and little bits there from the outside in and ... really we should have built it from the top down where we had to face a lot of questions earlier.
Anyway does anyone know of anything that has project type management / status / progress stuff that is VISUALLY helpful .. not just a bunch of lists and progress bars?
I know I didn't word this well but I'm open to even wrong answers....2 -
Fuck you Android ! Why the fuck does making my fucking status bar transparent has to be more difficult than launching a mars mission with a team of chimpanzees. I have been trying everything from xml styles to fucking java code but the status bar won't take the tint. Been at this fucking shit for 2 days3
-
Today I wanted to automate checking the status of running jobs. There's a UI but navigating it is tedious and I sort of wanted a Dashboard.
So I started writing a Selenium app to automate it. I'm writing the code, inspecting all the inputs. And I'm looking "woah, all of them have nice ids... This should be easy"
Login is ok, but then run into IFrames (can't find the input elements on the page itself).
Fine Google... find the answer and so try again. But wait... It doesn't work???
There's apparently 9 of them on the page. And there's no easy way to identify the correct one...
Spent an hr trying different ways of locating the right one... eventually settling on very complex XPath...
All in all though it took 2 hours... And still not done... -
Someone wrote some error handling middleware for the whole application.
Then someone wrote some default classes for HTTP errors; BadRequest, Unauthorized and so on.
If I didn't know any better, I'd think throwing one of these default errors would give the proper status code, instead of default everything to 500.
But alas, I do know better.1 -
//long rant ahead!
I need to plan a Wiki with SharePoint for not connected Sites.
Im now in dispute with my CoWorker since 3 Months, this is how the conversation goes. My two bosses are involved in this and also unhappy about SharePoint.
[C refers to CoWorker, M for me]
C: Hey, we finished SharePoint with Selfservice Storage Rooms. They even have a Wiki.
M: Okay cool, will check it out
C: Well we need to also plan the Wiki inside, I already asked our Department Head and he agreed, that you will be the one.
M: Okkkkaaayy, normaly it's your job to do such things, but welp, I will look into it, if we can work with it.
(2 Weeks pass)
M: I checked SharePoint out and tested everything. The Wiki is a Nogo, we need a other solution or programm for ourself a Wiki Integration/Engine. Did you maybe check out Confluence? It has also a SharePoint integration plugin.
C: We wont do Confluence, too expensive (already overspent the budget for SharePoint in six digits 🤬). Also we wont add to SharePoint Custom Code, it needs to stay standard.
M: Thats impossible, SharePoint Wiki is shit and also handels sites just like documents, no brain behind! Also you overspent the Budget and now it's my Problem?!
C: You need to do the best out of it.
(3 weeks passes and we get a meeting with the department heads)
M: Alright I made a UseCase and documented where the essential flaws are in SharePoint Wiki and why we cant use it.
Boss: Ok if it's impossible to use, then we will stay on our Fileserver for Documents and wont use SharePoint.
M: Thats not my Point, my statement is, as status today, SharePoint Wiki is not the right solution, code or buy software to it.
Boss: We will do a Prove of Concept, if it doesnt work then we will aboard it.
M: Well it is only some missing essentials, like hierarchy and Groups for the Pages, Example Confluence has this. If we could built in this features in SharePoint, everything would work out.
C: (angry) I told you that we wont use Confluence!
M: (calm) I said we need Features, not Confluence. Please mind the consent.
(3 weeks passes, and one more meating with bosses)
M: alright here again is a analyses, why already in Theory the current SharePoint Wiki wont work. It's already flawed in the core.
Boss: Yea SharePoint is crap, I checked out confluence and thats a real Wiki.
C: Well I dont know anything about Confluence and never looked at it. But if SharePoint is a fail we need the Proof of Concept.
M: Why do we need to do a Proof of Concept, when it already doesnt work in Theory! Thats nonsence and unlogical.
Next meeting will be in 4 weeks and I will give him the FUCKING PROOF OF CONCEPT. I will be a Bastard and build behind CoWorkers back a Confluence Wiki to show the Departmentheads how to built it right.
I hate CoWorker now, he makes a part of my loved Job a hell, I will goddamn cuk Coworker to space, that fucking Cukatron of lazyness and shit 🤬. I provide the Solutions and you just say no, how dafuq will the project advance, if you always say NO! Are you so unflexible and fixed on your Castle of Ignorancy!5 -
Junior front end guy made a backend code, he made even a test.
GET /model/ very nice simple case tested.
NO. MORE. TESTS.
Well, it's the same guy who complained reaaaaally surprised that he had to check http status code after a request.
Im kinda the bad guy because I get upset with that stuff instead of clapping his stupidness2 -
How is a "web app" any better than a "web site"?
All a "web app" does is adding a JavaScript program as a middle-man between the browser and the server.
Where as "web sites" instantly deliver content, "web apps" deliver JavaScript code that then loads the content and puts it on the page.
A "web site" serves the browser useful content on a silver plate (metaphorically speaking), where as "web apps" serve some JavaScript code and the browser has to do the heavy lifting.
It appears that the only benefit of "web apps" is the fancier name. "App" sounds fancy while "site" sounds mundane. But technically, a "web app" is worse than a "web site". It's both slower and vulnerable to scripting errors.
Why would anyone in their right mind choose to create a web "app" over a web "site" to load text and a bunch of pictures?
I get it, some things such as posting comments without reloading the page and loading new search results when scrolling down are not possible without JavaScript, but why use JavaScript for everything, even where it wouldn't be necessary?
JavaScript should never be required to show a bunch of boxes containing pictures and some text. JavaScript is intended to enhance web sites, not to load entire websites.
As web developer Jake Archibald said, "[100% of] your users are non-JS while they're downloading your JS" ( https://twitter.com/jaffathecake/... ).
See also: I miss the good times when the web was lightweight. ( https://devrant.com/rants/9987051/... )
"App" is not an excuse: https://jakearchibald.com/2013/...
I am sad Archive.org switched to being a web app. But I applaud them for resisting that trend longer than most other large sites.28 -
Am I in developer hell already? A shitty project is about to come to an end (hopefully), or should I rather say: It needs to come to an end. But I am still quite lost in how to deal with it, hence procrastinating on it - making the deadline come closer and with it the realization that I'll probably have to rewrite almost everything. I'm not sure how, but I do know that the current code is a dumpster fire.
Basically what I need to do is dealing with the APIs of different payment providers/gateways (like PayPal, AmazonPay). For most cases I'll get a payment ID from the shop and need to act on it later, e.g. capture the authorized money in the case of a credit card transaction or do refunds (without user interaction, unless there is an error). Now at first I put something together where I try to abstract the payment information into two tables:
orders{1}<->{0..n}payments
payments{1}<->{1..n}paymentDetails
Unfortunately trying to abstract the different payment methods and to squeeze them (and their different possible stati and functions) in these tables was not very successful, it's a total mess with magic numbers, half-broken behavior and without any consideration for partial payments/captures or unfinished requests (i.e. if there is an exception before the response is dealt with, there is no indication that anything has ever been sent). Also the current amount is calculated through the history of the paymentDetails table, which basically works differently for each payment type.
How to fix this mess in a way that I'll still have a job by next week?
I'm trying to improve the db schema first, as I think my biggest problems are lying there. Through some research I've come across a recommendation for making payment type specific subtables (with a magic number/string in the main table to prevent having to look up all subtables). That way I can record what I send and receive without having to abstract it too much, so I'll have an acceptable transaction log. The paymentDetails table can be removed (necessary fields go to the payments table). The payments table gets multiple fields for the amount (differentiating between open, authorized, captured, processing and refunded values) and always reflects the current status.
Tables:
payments
paymentRequestsPaypal
paymentRequestsAmazonpay
paymentRequestsXyz
I think I'm going in the right direction here. hm. Maybe there's some light at the end of this long, dark tunnel. Or a train. I'll have two days to find out.question kill me already send help thank you for being my rubber duck payment gateways deadline approaching rant/question burnout6 -
Python 3.9:
Cool New Features for You to Try
String Prefix and Suffix.
Type Hint Lists and Dictionaries Directly.
Topological Sort.
Greatest Common Divisor (GCD) and Least Common Multiple (LCM)
New HTTP Status Codes.
Removal of Deprecated Compatibility Code.2 -
I'm currently migrating one of the companies services from technology A to an B based solution...
Today I had to remotly troubleshoot an error occuring somewhere on our client's backend application, that wans't enabling us to register any given webhook to our endpoints...
We finally gave in and looked up the data packets using a sniffer only to find that the only difference was that in the A technology project our staff ended up returning a Status Code plus the respective Reason Phrase, in our newest version we only send the HTTP Status Code... Guess who wasn't aware of HTTP 1.1 RFC consideres the Reason Phrase optional and an unecessary overhead??? God dammit... In simple terms...1 -
I'm just testing out some code for Spring Boot with Spring web. Whilst inspecting Spring's HttpStatus enum I suddenly realized there are a lot more HTTP status codes than I had estimated. I knew there were many, but woah that's a lot.
Check it:
https://en.wikipedia.org/wiki/...
On a side note, it really helps to debug work stuff at home. More concentration, more time and such.
Fun fun.4 -
Why can no-one, not one single solitary fucker, on StackOverflow get it through their thick skull that when I call PHP's http_response_code() or try to get $_SERVER["REDIRECT_STATUS"], I want the response code from Nginx? No, not Apache. No, I don't want to pass a status code FROM PHP TO NGINX, I want the response code. FROM Nginx. TO PHP.
In what fucking universe does PHP know more about the response code than Nginx? It doesn't. Nginx knows the response code, because that's the fucker that redirected to the error page. I want the error. Passed to the page. From Nginx. To PHP.
NO, http_response_code() DOES NOT MAGICALLY FUCKING WORK, IT RETURNS 200 BY DEFAUL- fuck it.7 -
I need to compare the JSON results of an API before and after a code change. But it was also moved to another API.
However some fields are auto-generated like timestamp or derived off the url (resource links).
Also if a JSON list is returned it maybe in different order...
Wondering is there a quick way to test text likeness?
I've done it before but just used matching status code and maybe measuring the diff in response size7 -
Server Error Caused by: javax.servlet.ServletException:
Error Message: No message available with status code 500
Does this qualify as the best error message, ever? -
Group project at uni, we're learning how to do scrum sprints. So here's a small story about all the ways it can go wrong.
We assign scrum master and product owner roles, what do those do? "We want to do design tho" they say two weeks later.
I end up doing the organization part and structuring the backlog.
"Alright, you guys will be the frontend team, your tasks are X and Y"
No response
One day before the review I ask again
"So, what's the status" (well knowing that they didn't do shit so far)
They start scrambling around, and manage to do like 30% of their tasks at best, I end up doing most of the work for them.
Next week, new sprint, our tutors somehow don't notice that literally 95% of the code has been written by me so far.
"Alright team, hopefully you will do better this time, so and so will be your subteam leader since he knows this stuff"
No response
Some guys start working on independent things without collaborating with each other, sometimes replicating stuff I already did (but obviously worse).
So that's the situation so far, I really would rather kill myself than keep working with these guys, jeeesus1 -
WTF
npm ERR! publish Failed PUT 403
npm ERR! code E403
npm ERR! You cannot publish over the previously published versions: 1.1.69. : weschemajs
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lopu/.npm/_logs/2018-09-29T11_20_28_594Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wepublish@0.0.211 run: `./src/index.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wepublish@0.0.211 run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lopu/.npm/_logs/2018-09-29T11_20_28_638Z-debug.log
lopu@lopu-pro:~/Dropbox/git/weyoume/wepublish/dev-wepublish$ npm view weschemajs version
1.1.63
lopu@lopu-pro:~/Dropbox/git/weyoume/wepublish/dev-wepublish$ npm view weschemajs version
1.1.636 -
Any one running Symfony on a Docker container in production? I currently try to migrate our dev env to a docker compose setup (from a "monolith" vagrant vm). I'm atually not stuck at a Symfony specific thing, but on a, I guess Docker specific one(?), The issue is, I need to read and write with two users to one folder (in my case the /application/var/cache folder). Since I mount my whole code into the docker container (to use an IDE on the local files), I've got a volume (not mounted to the outside world) for that folder. (As far, as good). Now this folder is owned by root and root is also the user I get when I enter the container. When I then run a cli script, that writes to this folder, every thing works (as it's run by root) and the resulting entries in the cache dir are owned by root. Trouble starts when the php fpm process tries to write stuff in there too (as it's run by www-data).
If I add `USER www-data` (or create a new user foobar and add `USER foobar`) the container exits with status 0
So I guess the question is, is anyone running an Symfony app on Docker in Prod, if so how do you solve this? Or another question would be what is the best practice to do this? Sure on dev I could just `chmod 777` the whole folder or run the php-fpm process as root, but if that thing ever goes to prod, I wouldn't sleep very well... -
Oh... I dont know what to pick...
So i will pick 3 projects from my 3 stages of my dev "carrier"
1.Right after i discovered programing and learned how ,if, while and similar structures worked. The launguage was object pascal with delphi 2007
That was a "safe" with a stupidly complicated lock (text inputs, sliders, ect) it opened a secret folder in the end.
2. It was a embedded code for a Atmega8 AVR, Atmel studio, pure C but without memory managment (i didnt even know that it even existed)
It was a Pip boy knockoff, 16x2 display and a small keyboard connected to the arduino like board that i made on a proto board.
It wasnt that much of a pipboy, it was more of a showoff of atmega8 internal systems, (ADC, timers, interrupts and such)
3.DataLab, after helping my friend with his master thesis, (we meet on discord long story, i was in high school) i decided that mathlab is shit and i created a visual scripting enviroment, launguage C# .net 4 (in the latest version)
I remade the whole program from scrach 1 time, significantly improving everything (code reuse, better algorithms, data processing, code redability and edge cases) I have learned good practises from everywhere. I learned how to use git.
DataLab project looks just like LabViev (i didnt notice that it even existed...), it is frozen now because of my mental status but im planning on using it on my CV when i will be looking for jobs on holidays. There are many things that i can improve in that program but ... first i have to fix myself. -
Hire are a few tips to up productivity on development which has worked for me:
1) Use a system of at least 16gb ram when writing codes that requires compilation to run.
2) Test your code at most 3 times within an hour. This will combat the bad habit of practically checking changes on every new block you write.
3) Use internet modem in place of mobile hotspot and keep mobile data switched off. This will combat interruptions from your IM contacts and temptations to check your WA status update when working.
4) Implementation before optimisation... This is really important. It's tempting to rewrite a whole block even when other task are pending. If it works just leave it as is and move on to the next bull to kill, you can come back later to optimise.
5) Understand that no language is the best. Sometimes folks claim that PHP is faster than python. Okay I say but let's place a bet and I'll write a python code 10 times faster than your PHP on holiday. Focus more on your skill-set than the language else you'd find yourself switching frameworks more than necessary.
6) Check for existing code before writing an implementation from scratch... I bet you 50 bucks to your 10 someone already wrote that.
7) If it fails the first and then the second time... Don't try the third, check on StackOverflow for similar challenge.
8) When working with testers always ask for reproducible steps... Don't just start fixing bugs because sometimes their explanation looks like a bug when other times it's not and you can end up fixing what's never there.
9) If you're a tester always ask for explanations from the dev before calling a bug... It will save both your time and everybody's.
10) Don't be adamant to switching IDE... VSCode is much productive than Notepad++. Just give it a try an see for yourself.
My 10 cents.1 -
Writing an embedded webserver recycling code that is in use for a few years now. Can't get my ’getStatus.ssi’ working. Turns out ’statusTag’ cannot be used and for the last couple of years noone cared that the status field was empty.
That's the first time I did such a thing and it took me only one unpaid (!) day to debug that piece of crap thinking my idiotic predecessor delivered halfway working code.
Is verifying and communicating broken code really that hard?1 -
man if i could figure out how to do stuff and had the money to do stuff i'd be dangerous as fuck, but as of now i can only posit questions... it sucks.
Examples:
- What do modern browsers/crawlers do when hit with, say, an "HTTP 450 Blocked by Windows Parental Controls" or an "HTTP 374" status code?
- What happens if I do <xyz minor edge case thing> on <system?> (just use your imagination, this happens for every edge case i can think of for every system and the list wouldn't fit in a few megs' worth of half-byte ASCII, much less *here*)
- What if I made like a board to fuck with busses while systems were on? Press a button and for like five bus clock cycles pins like 6 and 7 are shorted? That sort of thing. As for system/bus types, *literally any* (old consoles with expansion ports, PCI/-e/-X/whatever, southbridge, etc.)
- What if I did <filetype> shenanigans by doing <something indescribably horrible> to this file? How do things react?3 -
I hate my internet provider.
I configure everything to work remotely and when I try to login to it I got "Http Status 502".
I thought I misconfigure something and recheck everything and still got "Http Status 502".
When I use the internet connection provided by different provider, it works!
Everything is hard to debug without you messing it up internet provider. It like trying to debug the code and find out the problem is in compiler.8 -
Situation - I am responsible for refactoring and performance improvements in a company with several teams. This means I gotta do static analysis on code, run compliance tools and make changes in code or in the deployment pipeline, make sure the cloud is configured properly etc.,
Here is the catch when it comes to working on a ticket- the Azure team does not give my team permissions to make the necessary changes in the cloud. The Azure team won't pick up the ticket and do it themselves either.
Instead, we take the ticket, read the docs, take a guess on what's right or wrong. Then proceed to inform the Azure team who then go on to make that change. It is very hit or miss and often the ticket comes back to us and we do the same process again. Sometimes I have to spin up resources on my personal Azure account to tinker with settings to see which knobs are there for making changes to a resource.
Either pick up a ticket and work on it yourself, or give us azure with sufficient rights for us to be able to make the change. This midway status is infuriating, super unproductive and painful for us. Is this common? I am so frustrated.2 -
[GIF] This code looks pretty old, I wonder if I can delete th.... what the... https://twitter.com/iammerrick/...
(Sorry, I was not able to download the GIF from Twitter's app) -
#Suphle Rant 7: transphporm failure
In this issue, I'll be sharing observations about 3 topics.
First and most significant is that the brilliant SSR templating library I've eyed for so many years, even integrated as Suphle's presentation layer adapter, is virtually not functional. It only works for the trivial use case of outputting the value of a property in the dataset. For instance, when validation fails, preventing execution from reaching the controller, parsing fails without signifying what ordinance was being violated. I trim the stylesheet and it only works when outputting one of the values added by the validation handler. Meaning the missing keys it can't find from controller result is the culprit.
Even when I trimmed everything else for it to pass, the closing `</li>` tag seems to have been abducted.
I mail project owner explaining what I need his library for, no response. Chat one of the maintainers on Twitter, nothing. Since they have no forum, I find their Gitter chatroom, tag them and post my questions. Nothing. The only semblance of a documentation they have is the Github wiki. So, support is practically dead. Project last commit: 2020. It's disappointing that this is how my journey with them ends. There isn't even an alternative that shares the same philosophy. It's so sad to see how everybody is comfortable with PHP templating syntax and back end logic entagled within their markup.
Among all other templating libraries, Blade (which influenced my strong distaste for interspersing markup and PHP), seems to be the most popular. First admission: We're headed back to the Blade trenches, sadly.
2nd Topic: While writing tests yesterday, I had this weird feeling about something being off. I guess that's what code smell is. I was uncomfortable with the excessive amount of mocking wrappers I had to layer upon SUT before I can observe whether the HTML adapter receives expected markup file, when I can simply put a `var_dump` there. There's a black-box test for verifying the output but since the Transphporm headaches were causing it to fail, I tried going white-box. The mocking fixture was such a monstrosity, I imagined Sebastian Bergmann's ghost looking down in abhorrence over how much this Degenerate is perverting and butchering his creation.
I ultimately deleted the test travesty but it gave rise to the question of how properly designed system really is. Or, are certain things beyond testing white box? Are there still gaps in the testing knowledge of a supposed testing connoisseur? 2nd admission.
Lastly, randomly wanted to tweet an idea at Tomas Votruba. Visited his profile, only to see this https://twitter.com/PovilasKorop/.... Apparently, Laravel have implemented yet another feature previously only existing in Suphle (or at the libraries Arkitekt and Deptrac). I laughed mirthlessly as I watch them gain feature-parity under my nose, when Suphle is yet to be launched. I refuse to believe they're actually stalking Suphle3 -
Been working on some meta code.
Inspired by flatted, I made a JSON serializer that exports to either an evalable string or a string that can be written to a file and used as a standard module.
It's part of a bigger project
https://twitter.com/ThingtimeCorp/...
Hope you like -
Laravel route not found.
Look - so simple :
Route::post('/api/companies', function () {
return 'Hello World';
});
how the fuck it is not found?
Request URL: http://localhost:8000/api/companies
Request Method: POST
Status Code: 404 Not Found
???? I have cleared cache.
How do I check fucking available routes then? In symfony there was router:debug or smth. Cant see like this in laravel44