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 - "no n"
-
!n case someone is unfamiliar with this joke ::
A man flying in a hot air balloon suddenly realizes he’s lost. He reduces height and spots a man down below. He lowers the balloon further and shouts to get directions, "Excuse me, can you tell me where I am?"
The man below says: "Yes. You're in a hot air balloon, hovering 30 feet above this field."
"You must work in Information Technology," says the balloonist.
"I do" replies the man. "How did you know?"
"Well," says the balloonist, "everything you have told me is technically correct, but It's of no use to anyone."
The man below replies, "You must work in management."
"I do," replies the balloonist, *"But how'd you know?"**
"Well", says the man, "you don’t know where you are or where you’re going, but you expect me to be able to help. You’re in the same position you were before we met, but now it’s my fault."6 -
So this was a couple years ago now. Aside from doing software development, I also do nearly all the other IT related stuff for the company, as well as specialize in the installation and implementation of electrical data acquisition systems - primarily amperage and voltage meters. I also wrote the software that communicates with this equipment and monitors the incoming and outgoing voltage and current and alerts various people if there's a problem.
Anyway, all of this equipment is installed into a trailer that goes onto a semi-truck as it's a portable power distribution system.
One time, the computer in one of these systems (we'll call it system 5) had gotten fried and needed replaced. It was a very busy week for me, so I had pulled the fried computer out without immediately replacing it with a working system. A few days later, system 5 leaves to go work on one of our biggest shows of the year - the Academy Awards. We make well over a million dollars from just this one show.
Come the morning of show day, the CEO of the company is in system 5 (it was on a Sunday, my day off) and went to set up the data acquisition software to get the system ready to go, and finds there is no computer. I promptly get a phone call with lots of swearing and threats to my job. Let me tell you, I was sweating bullets.
After the phone call, I decided I needed to try and save my job. The CEO hadn't told me to do anything, but I went to work, grabbed an old Windows XP laptop that was gathering dust and installed my software on it. I then had to build the configuration file that is specific to system 5 from memory. Each meter speaks the ModBus over TCP/IP protocol, and thus each meter as a different bus id. Fortunately, I'm pretty anal about this and tend to follow a specific method of id numbering.
Once I got the configuration file done and tested the software to see if it would even run properly on Windows XP (it did!), I called the CEO back and told him I had a laptop ready to go for system 5. I drove out to Hollywood and the CFO (who was there with the CEO) had to walk about a mile out of the security zone to meet me and pick up the laptop.
I told her I put a fresh install of the data acquisition software on the laptop and it's already configured for system 5 - it *should* just work once you plug it in.
I didn't get any phone calls after dropping off the laptop, so I called the CFO once I got home and asked her if everything was working okay. She told me it worked flawlessly - it was Plug 'n Play so to speak. She even said she was impressed, she thought she'd have to call me to iron out one or two configuration issues to get it talking to the meters.
All in all, crisis averted! At work on Monday, my supervisor told me that my name was Mud that day (by the CEO), but I still work here!
Here's a picture of the inside of system 8 (similar to system 5 - same hardware)15 -
Me: Optimize a sort & match method in backend because users complain it's a bit slow.
Coworker: These algorithms are both O(n), so they're identical *closes PR*
Me: *start zoom call* "Heeeeeeeeeey Iiiiiiiiiii wouuuuuuuld liiiiiiiiike toooooo diiiiiisscuuuuus thaaaaaaaat puuuuuuulllll reeeeeequuuueeest yooooouuuuu cloooooossseeeed"
Coworker: "wtf are you doing, why are you talking so slow"
Me: "No matter whether I talk fast or slow, the information still reaches you in O(n) time, so why are you complaining"
I fucking hate it when people misunderstand the purpose of (or abuse) big O notation. It's an estimate of how an algorithm SCALES once the set increases in size, in which case you leave out both less significant terms and constant factors.
But those terms and factors are important when you're talking about the DIRECT PERFORMANCE of the algorithm on fixed-size sets, instead of SCALING to larger sets.
1n and 10n are both O(n), but 10x performance on a job that used to take 10 minutes is still significant.19 -
Swift, oh my god, why do you have to be like this?
I'm looking to write a simple for loop like this one in java
for(int i = 5; i > 0; i--) {
// do shit
}
Thats it, simple, go from 5 to 1 (inclusive), I saw that to iterate over a range in a for loop (increasing ordeR) I can do this
for i in 0...5 {
// do shit.
}
So I thought maybe I could do this to go in reverse (which seems logical when you think about it doesn't it?)
for i in 5..<0 {
// do shit
}
But no, this compiles FINE (THIS IS THE FUCKING KICKER IT COMPILES), alright, when you the code runs you get a fucking exception that crashes the mother fucking application, and you know what the problem is?? This dogshit, shitStain of a language doesn't like it when integer that the for loop starts with is larger than the integer that the for loop ends with MOTHERFUCKER ATLEAST TELL ME THAT AT COMPILE TIME AS A MOTHERFUCKING WARNING YOU PIECE OF SHIT!!
Alright *deep breathing*, now we can't just be stuck on this raging, we're developers need to move forward, so I google this, "Swift for loop in reverse" fair enough I get a straight forward answer that tells me to use the `stride` functionality. The relevant code for it
for i in stride(from:5 to:1 by:-1) {
// do shit
}
Wow looks fine and simple right?? (looks like god damn any other language if you ask me, no innovations here piece of shit apple!) WRONG BITCHES !!! In the latest version of Swift THE FUCKING DEVELOPERS DECIDED TO REMOVE STRIDE ALTOGETHER, WITHOUT ADDING IN A GOOD REPLACEMENT FOR THAT SHIT!
Alright NOW IM FUCKING MAD, I got rage on stackoverflow chat, a guy who's been working on ios for quite a while comes up n says and I quote
"I can sort of figure it out, but besides that, iterating in reverse is uncommon enough that it probably hasn't crossed anyone's mind."
Now hope you guys understand my frustration, and send me cookies to calm me down.
Thank you for listening to me !27 -
This facts are killing me
"During his own Google interview, Jeff Dean was asked the implications if P=NP were true. He said, "P = 0 or N = 1." Then, before the interviewer had even finished laughing, Jeff examined Google’s public certificate and wrote the private key on the whiteboard."
"Compilers don't warn Jeff Dean. Jeff Dean warns compilers."
"gcc -O4 emails your code to Jeff Dean for a rewrite."
"When Jeff Dean sends an ethernet frame there are no collisions because the competing frames retreat back up into the buffer memory on their source nic."
"When Jeff Dean has an ergonomic evaluation, it is for the protection of his keyboard."
"When Jeff Dean designs software, he first codes the binary and then writes the source as documentation."
"When Jeff has trouble sleeping, he Mapreduces sheep."
"When Jeff Dean listens to mp3s, he just cats them to /dev/dsp and does the decoding in his head."
"Google search went down for a few hours in 2002, and Jeff Dean started handling queries by hand. Search Quality doubled."
"One day Jeff Dean grabbed his Etch-a-Sketch instead of his laptop on his way out the door. On his way back home to get his real laptop, he programmed the Etch-a-Sketch to play Tetris."
"Jeff Dean once shifted a bit so hard, it ended up on another computer. "6 -
Biggest scaling challenge?
The imaginary scaling issues from clients.
Client : How do you cope with data that's a billion times bigger than our current data set? Can you handle that? How much longer will it take to access some data then?
I could then give a speech about optimizing internal data structures and access algorithms that work with O(log n) complexity, but that wouldn't help, non-tech people will not understand that.
And telling someone, the system will be outdated and hopefully been replaced when that amount of data is reached, would be misinterpreted as "Our system can not handle it".
So the usual answer is: "No problem, our algorithms are optimized so they can handle any amount of data"6 -
Discussion between me and my N+1
(Note : I'm in the company for 3 months)
Me : As the tech leader, shouldn't you review my code ?
N+1 : I'm not the tech leader.
Me : Wait what ?
N+1 : I wrote the app from A to Z, hence I'm the architect.
Me : That's what I mean. Being the most knowledgable dev in the company makes you de facto tech leader.
N+1 : No, I'm not the tech leader. The CEO is.
Me : But he didn't even know the tech we are using !
N+1 : .... Anyway, I won't do code reviews. I don't like that.
(2 hours later)
N+1 : You made a mistake in the code. You broke a hidden functionality. You should be more careful, or ask me if you have doubts.
This guy is collector.3 -
Worst dev team failure I've experienced?
One of several.
Around 2012, a team of devs were tasked to convert a ASPX service to WCF that had one responsibility, returning product data (description, price, availability, etc...simple stuff)
No complex searching, just pass the ID, you get the response.
I was the original developer of the ASPX service, which API was an XML request and returned an XML response. The 'powers-that-be' decided anything XML was evil and had to be purged from the planet. If this thought bubble popped up over your head "Wait a sec...doesn't WCF transmit everything via SOAP, which is XML?", yes, but in their minds SOAP wasn't XML. That's not the worst WTF of this story.
The team, 3 developers, 2 DBAs, network administrators, several web developers, worked on the conversion for about 9 months using the Waterfall method (3~5 months was mostly in meetings and very basic prototyping) and using a test-first approach (their own flavor of TDD). The 'go live' day was to occur at 3:00AM and mandatory that nearly the entire department be on-sight (including the department VP) and available to help troubleshoot any system issues.
3:00AM - Teams start their deployments
3:05AM - Thousands and thousands of errors from all kinds of sources (web exceptions, database exceptions, server exceptions, etc), site goes down, teams roll everything back.
3:30AM - The primary developer remembered he made a last minute change to a stored procedure parameter that hadn't been pushed to production, which caused a side-affect across several layers of their stack.
4:00AM - The developer found his bug, but the manager decided it would be better if everyone went home and get a fresh look at the problem at 8:00AM (yes, he expected everyone to be back in the office at 8:00AM).
About a month later, the team scheduled another 3:00AM deployment (VP was present again), confident that introducing mocking into their testing pipeline would fix any database related errors.
3:00AM - Team starts their deployments.
3:30AM - No major errors, things seem to be going well. High fives, cheers..manager tells everyone to head home.
3:35AM - Site crashes, like white page, no response from the servers kind of crash. Resetting IIS on the servers works, but only for around 10 minutes or so.
4:00AM - Team rolls back, manager is clearly pissed at this point, "Nobody is going fucking home until we figure this out!!"
6:00AM - Diagnostics found the WCF client was causing the server to run out of resources, with a mix of clogging up server bandwidth, and a sprinkle of N+1 scaling problem. Manager lets everyone go home, but be back in the office at 8:00AM to develop a plan so this *never* happens again.
About 2 months later, a 'real' development+integration environment (previously, any+all integration tests were on the developer's machine) and the team scheduled a 6:00AM deployment, but at a much, much smaller scale with just the 3 development team members.
Why? Because the manager 'froze' changes to the ASPX service, the web team still needed various enhancements, so they bypassed the service (not using the ASPX service at all) and wrote their own SQL scripts that hit the database directly and utilized AppFabric/Velocity caching to allow the site to scale. There were only a couple client application using the ASPX service that needed to be converted, so deploying at 6:00AM gave everyone a couple of hours before users got into the office. Service deployed, worked like a champ.
A week later the VP schedules a celebration for the successful migration to WCF. Pizza, cake, the works. The 3 team members received awards (and a envelope, which probably equaled some $$$) and the entire team received a custom Benchmade pocket knife to remember this project's success. Myself and several others just stared at each other, not knowing what to say.
Later, my manager pulls several of us into a conference room
Me: "What the hell? This is one of the biggest failures I've been apart of. We got rewarded for thousands and thousands of dollars of wasted time."
<others expressed the same and expletive sediments>
Mgr: "I know..I know...but that's the story we have to stick with. If the company realizes what a fucking mess this is, we could all be fired."
Me: "What?!! All of us?!"
Mgr: "Well, shit rolls downhill. Dept-Mgr-John is ready to fire anyone he felt could make him look bad, which is why I pulled you guys in here. The other sheep out there will go along with anything he says and more than happy to throw you under the bus. Keep your head down until this blows over. Say nothing."11 -
You know what? Fuck this shit. We spend most of our life locked down in a school, we are being told facts, tested and stressed for many years with the only hope to get out as soon as possible.
Failing is something that keeps you there indefinitely.
Parents keep pushing on kids to achieve the best and get good grades to have a job.
Then something happens.
You get out of school and what happens?
You start working.
A.k.a modern slavery...
Employers thinks that since you are young they are doing YOU a favor if they decided to hire you.
So you find yourself having to do the same tasks everyone is doing, perhaps you are even fully capable of managing them and get the shit done but guess what!!
You are paid the minimum.
You barely make enough to pay off your rent which keeps you locked away from Holidays abroad, from that huge cake you desperately want.
And guess what! Try to raise your voice and you'll get fired in a Matter of seconds, replaced with someone else which accepts any condition.
You dream of a house, a family and a car but you can't even eat healthy with that salary.
So you are forced to buy cheap and low quality food from the same store again and again till you had enough and spend some days with that horrible feeling...
Calling you to get a job interview feels like they are doing you a favor, they always try to give the minimum possible and expect you to work in a serious manner and respect their deadlines.
Colleagues earn a lot more even though they aren't doing anything different from you.
For the first year you won't have any holiday, let alone traveling or anything different from just staying home for 3 days straight.
Banks won't give you a loan because your job doesn't pay off
The day that your car is broken you struggle to eat the whole month.
On top of that, taxes. Because they aren't taking away enough.
I don't want to live this life, I don't want to become a modern slave and work 8-17 everyday for the rest of my life and retire with a shitty retirement pension that won't probably grant me anything again.
I had enough of this shit.
I don't want to go back to work and pretend to do what I am supposed to do with a smile on my face knowing that I am just a number and that no matter how skilled I am I can always get replaced with N number of people for a lower salary of mine.
I am tired
I dream of a life that I won't ever reach this way.
Today I looked up houses prices and felt like shit.
I will never in my entire life be able to afford something so expensive, let alone buying furnitures and what is needed or what I like.
I dream of having my place, my dog and my family but apparently I am asking too much.
How is this even fair in 2018/2019?
I... I am... Speechless.
I wonder how many people out there are in the same situation or even worse and I can't even wrap my mind around that.
This is just modern slavery.
My boss makes a shit load of money from young people that can't complain because they are threatened and will eventually be replaced...
This is my rant.22 -
(Interview for sde-3 position)
(continuation of https://devrant.com/rants/2132431/... )
Interviewer - *opens laptop. Gives a question.* solve this.
Me - *a bit surprised that such questions were being asked on a sde-3 level*
this is the 4th or 5th question from geeksforgeeks, isn't it? I know the answer to this. Do u still want me to solve it?
Interviewer - *not believing me* Yes
Me - okay. Well this *writing down the original solution mentioned on the site* is the verbatim code mentioned on the website, with complexity O(n^2).
However I feel this is not the optimal solution. Let me write a better solution.
*I provide a better solution*
This has a complexity of O(n log n) . What do you think?
Interviewer - Nope. This could be a lot better.
Me - okay. Let me see. Did some minor changes, added some caching (obviously this will have no effect on the base algorithm) etc
How about now?
Interviewer - nope. Still not good.
Me - okay. Can you tell me how to improve it?
Interviewer - no we are not allowed to solve problems for you. It is not our interview, it is yours.
Me - that makes no sense. Interviews are a two way street. I'd very much like to know the optimal answer to this.
Interviewer - okay
*copies down the answer from geeksforgeeks*
This is good
Me - *at first I thought this was a prank or something. *
I just mentioned this answer here.
Then I spent the next 10 minutes providing a BETTER solution.
May I know how yours is better?
Interviewer - this solution has 2-3 loops. Yours has a function calling itself.
Me - that's called divide and conquer using recursion mf!
Anyways let's take an example and do a dry run.
Interviewer - okay
*we do dry run*
Interviewer - oh yes. Yours ran faster. But it will run fast only sometimes.
Me - yes. Each time the algorithm rolls a dice to decide if it should run fast or slow. You have one goddamn awesome weed dealer man.
I got to go. Thank you for meeting me.14 -
My code review nightmare part 3
Performed a review on/against a workplace 'nemesis'. I didn't follow the department standards document (cause I could care less about spacing, sorted usings, etc) and identified over 80 bugs, logic errors, n+1 patterns, memory leaks (yes, even in .net devs can cause em'), and general bad behavior (ex.'eating' exceptions that should be handled or at least logged)
Because 'Jeff' was considered a golden child (that's another long TL;DR), his boss and others took a major offense and demanded I justify my review, item by item.
About 2 hours into the meeting, our department mgr realized embarrassing Jeff any further wasn't doing anyone any good and decided to take matters into his own hands. Thinking 'well, its about time he did his job', I go back to my desk. About an hour later..
Mgr: "I need you in the conference room, RIGHT NOW!"
<oh crap>
Mgr: "I spoke to Jeff and I think I know what the problem is. Did you ever train him on any of the problems you identified in the review?"
Me: "Um, no. Why would I?"
Mgr: "Ha!..I was right. So lets agree the problems are partially your fault, OK?"
Me: "Finding the bugs in his code is somehow my fault?"
Mgr: "Yes! For example, the n+1 problem in using the WCF service, you never trained him on how to use the service. You wrote the service, correct?"
Me: "Yes, but it's not my job to teach him how to write C#. I documented the process and have examples in the document to avoid n+1. All he had to do was copy/paste."
Mgr: "But you never sat with Jeff and talked to him like a human being? You sit over there in your silo and are oblivious to the problems you cause. This ends today!"
Me: "What the...I have no idea what you are talking about. What in the world did Jeff tell you?"
Mgr: "He told me enough and I'm putting an end to it. I want a compressive training class developed on how to use your service. I'll give you a month to get your act together and properly train these developers."
3 days later, I submit the power-point presentation and accompanying docs. It was only one WCF with a handful of methods. Mgr approved the training, etc..etc. execute the 'training', and Jeff submits a code review a couple of weeks later. From over 80 issues to around 50. The poop hits the fan again.
Mgr: "What's your problem? When are you going to take your responsibility seriously?"
Me: "Its pretty clear I don't have the problem. All the review items were also verified by other devs. Its not me trying to be an asshole."
Mgr: "Enough with the excuses. If you think you can do a better job *you* make the code changes and submit them for Jeff for review. No More Excuses!"
Couple of days later, I make the changes, submit them for review, and Jeff really couldn't say too much other than "I don't see this as an improvement"
TL;DR, I had been tracking the errors generated by the site due to the bugs prior to my changes. After deployment, # of errors went from thousands per hour to maybe hundreds per day (that's another story) and the site saw significant performance increases, fewer customer complaints, etc..etc.
At a company event, the department VP hands out special recognition awards:
VP: "This award is especially well earned. Not only does this individual exemplify the company's focus on teamwork, he also went above and beyond the call of duty to serve our customers. Jeff, come on up and get this well deserved award."19 -
A CMS raping WordPress so hard up the ass till there is no tomorrow. I hate that bastardized piece of fuck. “Hey I want you to fix my page and its wordpress. I pay 20 bucks.“ Well fuck you too sir. Wordpress is no cms you wanna be coders. Get back to your fucking photoshop and design something original! Every fucking wp page looks the same. Every “nice feature“ is some kind of monkeypatched workarround. No problem i set preview pictures for every post just to enable some weird slider to function.
I also love those buttfucked files with just a “require foo“ which also just requires “bar“. Drop that fuck. Implement autoloading. Nobody uses php4 anymore step into the future. “easy to learn“ fuck me and fuck you untill you vomit jizz! Clusterfucked spaghetticode thats easy, easy to put another rotten load of clusterfuck on top. Also those security features. I put an empty index.php to prevent directory traversal. N I C E! Stop using wordpress as CMS, its a blog engine. Nothing great has every been written on top of wordpress and never will. I dare you to deny everything related to it and if you are one of those designer guyd, you can gargle my jizz you fucknut!
Starting 2017 i will start a counter and rape every 10th Wordpress which gets abused as cms i encounter into oblivion on their 0,99$ webhosting shit.
Fuck this I'm so mad about that crap17 -
> Root struggles with her ticket
> Boss struggles too
> Also: random thoughts about this job
I've been sick lately, and it's the kind of sick where I'm exhausted all day, every day (infuriatingly, except at night). While tired, I can't think, so I can't really work, but I'm during my probationary period at work, so I've still been doing my best -- which, honestly, is pretty shit right now.
My current project involves legal agreements, and changing agent authorization methods (written, telephone recording, or letting the user click a link). Each of these, and depending on the type of transaction, requires a different legal agreement. And the logic and structure surrounding these is intricate and confusing to follow. I've been struggling through this and the project's ever-expanding scope for weeks, and specifically the agreements logic for the past few days. I've felt embarrassed and guilty for making so little progress, and that (and a bunch of other things) are making me depressed.
Today, I finally gave up and asked my boss for help. We had an hour and a half call where we worked through it together (at 6pm...). Despite having written quite a bit of the code and tests, he was often saying things like "How is this not working? This doesn't make any sense." So I don't feel quite so bad now.
I knew the code was complex and sprawling and unintuitive, but seeing one of its authors struggling too was really cathartic.
On an unrelated note, I asked the most senior dev (a Macintosh Lisa dev) why everything was using strings instead of symbols (in Rails) since symbols are much faster. That got him looking into the benchmarks, and he found that symbols are about twice as fast (for his minimal test, anyway), and he suggested we switch to those. His word is gold; mine is ignorable. kind of annoying. but anyway, he further went into optimizing the lookup of a giant array of strings, and discovered bsearch. (it's a divide-and-conquer lookup). and here I am wondering why they didn't implement it that way to begin with. 🙄
I don't think I'm learning much here, except how to work with a "mature" codebase. To take a page from @Rutee07, I think "mature" here means the same as in porn: not something you ever want ot see or think about.
I mean, I'm learning other things, too, like how to delegate methods from one model to another, but I have yet to see why you would want to. Every use of it I've explored thus far has just complicated things, like delegating methods on a child of a 1:n relation to the parent. Which child? How does that work? No bloody clue! but it does, somehow, after I copy/pasted a bunch of esoteric legacy bs and fussed with it enough.
I feel like once I get a good grasp of the various payment wrappers, verification/anti-fraud integration, and per-business fraud rules I'll have learned most of what they can offer. Specifically those because I had written a baby version of them at a previous job (Hell), and was trying to architect exactly what this company already has built.
I like a few things about this company. I like my boss. I like the remote work. I like the code reviews. I like the pay. I like the office and some socializing twice a year.
But I don't like the codebase. at all. and I don't have any friends here. My boss is friendly, but he's not a friend. I feel like my last boss (both bosses) were, or could have been if I was more social. But here? I feel alone. I'm assigned work, and my boss is friendly when talking about work, but that's all he's there for. Out of the two female devs I work with, one basically just ignores me, and the other only ever talks about work in ways I can barely understand, and she's a little pushy, and just... really irritating. The "senior" devs (in quotes because they're honestly not amazing) just don't have time, which i understand. but at the same time... i don't have *anyone* to talk to. It really sucks.
I'm not happy here.
I miss my last job.
But the reason I left that one is because this job allows me to move and work remotely. I got a counter-offer from them exactly matching my current job, sans the code reviews. but we haven't moved yet. and if I leave and go back there without having moved, it'll look like i just abandoned them. and that's the last thing I want them to think.
So, I'm stuck here for awhile.
not that it's a bad thing, but i'm feeling overwhelmed and stressed. and it's just not a good fit. but maybe I'll actually start learning things. and I suppose that's also why I took the job.
So, ever onward, I guess.
It would just be nice if I could take some of the happy along with me.7 -
I don't want to write clean code anymore :(
I read Clean Code, Clean Coder, and watched many uncle bob's videos, and I was able to apply best practices and design patterns
I created many systems that really stood the test of time...
Management was kind enough to introduce me to uncle bob clean code in the first place, letting us watch it during work hours. after like one year, my code improved 400% minimum because I am new and I needed guidance from veterans...
That said, to management I am very slow, compared to this other guy, they ask me for a feature and my answer would be like "sure, we need to update the system because it just doesn't support that right now, it is easy though it would take 2 days tops"
they ask the same thing for the other guy : "ok let me see what I can do", 1 hour later, on slack, he writes : done. he slaps bunch of if-statement and make special case that will serve the thing they asked for.
oh 'cool' they say -> but it doesn't do this -> it needs to do that -> ok there is a new bug,-> it doesn't work in build mode-> it doesn't work if you are logged in as a guest, now its perfect ! -> it doesn't work on Android -> ok it works on android but now its not perfect anymore.
and they feel like he is fast (and to be fair he is), this feature? done. ok new bugs? solved. Android compatibility ? just one day ... it looks like he is doing doing doing.
it ends up taking double the time I asked for, and that is not to mention the other system affected during this entire process, extra clean up that I have to do, even my systems that stood the test of time are now ruined and cannot be extracted to other projects. because he just slaps whatever bools and if statements he needs inside any system, uses nothing but Singleton pattern on everything. our app will never be ready-for-business, this I can swear. its very buggy. and to fix it, it needs a change in mentality, not in code.
---------------
uncle bob said : write your code the right way, and the management will see that your code generates less errors, with time, you will earn respect even though they will feel you are slow at first.
well sorry uncle, I've been doing it for a year, my image got bad, you are absolutely right, only when there is no one else allowed to drop a giant shit inside your clean code.
note: we don't really have a technical lead.
-------------------
its been only two days since my new "hack n' slash" meta, the management is already kind of "impressed" ... so I'll keep hacking and slashing until I find a better job.9 -
I just can't understand what will lead an so called Software Company, that provides for my local government by the way, to use an cloud sever (AWS ec2 instance) like it were an bare metal machine.
They have it working, non-stop, for over 4 years or so. Just one instance. Running MySQL, PostgreSQL, Apache, PHP and an f* Tomcat server with no less than 10 HUGE apps deployed. I just can't believe this instance is still up.
By the way, they don't do backups, most of the data is on the ephemeral storage, they use just one private key for every dev, no CI, no testing. Deployment are nightmares using scp to upload the .war...
But still, they are running several several apps for things like registering citizen complaints that comes in by hot lines. The system is incredibly slow as they use just hibernate without query optimizations to lookup and search things (n+1 query problems).
They didn't even bother to get a proper domain. They use an IP address and expose the port for tomcat directly. No reverse proxy here! (No ssl too)
I've been out of this company for two years now, it was my first work as a developer, but they needed help for an app that I worked on during my time there. I was really surprised to see that everything still the same. Even the old private key that they emailed me (?!?!?!?!) back then still worked. All the passwords still the same too.
I have some good rants from the time I was there, and about the general level of the developers in my region. But I'll leave them for later!
Is it just me or this whole shit is crazy af?3 -
Yesterday the web site started logging an exception “A task was canceled” when making a http call using the .Net HTTPClient class (site calling a REST service).
Emails back n’ forth ..blaming the database…blaming the network..then a senior web developer blamed the logging (the system I’m responsible for).
Under the hood, the logger is sending the exception data to another REST service (which sends emails, generates reports etc.) which I had to quickly re-direct the discussion because if we’re seeing the exception email, the logging didn’t cause the exception, it’s just reporting it. Felt a little sad having to explain it to other IT professionals, but everyone seemed to agree and focused on the server resources.
Last night I get a call about the exceptions occurring again in much larger numbers (from 100 to over 5,000 within a few minutes). I log in, add myself to the large skype group chat going on just to catch the same senior web developer say …
“Here is the APM data that shows logging is causing the http tasks to get canceled.”
FRACK!
Me: “No, that data just shows the logging http traffic of the exception. The exception is occurring before any logging is executed. The task is either being canceled due to a network time out or IIS is running out of threads. The web site is failing to execute the http call to the REST service.”
Several other devs, DBAs, and network admins agree.
The errors only lasted a couple of minutes (exactly 2 minutes, which seemed odd), so everyone agrees to dig into the data further in the morning.
This morning I login to my computer to discover the error(s) occurred again at 6:20AM and an email from the senior web developer saying we (my mgr, her mgr, network admins, DBAs, etc) need to discuss changes to the logging system to prevent this problem from negatively affecting the customer experience...blah blah blah.
FRACKing female dog!
Good news is we never had the meeting. When the senior web dev manager came in, he cancelled the meeting.
Turned out to be a hiccup in a domain controller causing the servers to lose their connection to each other for 2 minutes (1-minute timeout, 1 minute to fully re-sync). The exact two-minute burst of errors explained (and proven via wireshark).
People and their petty office politics piss me off.2 -
POSTMORTEM
"4096 bit ~ 96 hours is what he said.
IDK why, but when he took the challenge, he posted that it'd take 36 hours"
As @cbsa wrote, and nitwhiz wrote "but the statement was that op's i3 did it in 11 hours. So there must be a result already, which can be verified?"
I added time because I was in the middle of a port involving ArbFloat so I could get arbitrary precision. I had a crude desmos graph doing projections on what I'd already factored in order to get an idea of how long it'd take to do larger
bit lengths
@p100sch speculated on the walked back time, and overstating the rig capabilities. Instead I spent a lot of time trying to get it 'just-so'.
Worse, because I had to resort to "Decimal" in python (and am currently experimenting with the same in Julia), both of which are immutable types, the GC was taking > 25% of the cpu time.
Performancewise, the numbers I cited in the actual thread, as of this time:
largest product factored was 32bit, 1855526741 * 2163967087, took 1116.111s in python.
Julia build used a slightly different method, & managed to factor a 27 bit number, 103147223 * 88789957 in 20.9s,
but this wasn't typical.
What surprised me was the variability. One bit length could take 100s or a couple thousand seconds even, and a product that was 1-2 bits longer could return a result in under a minute, sometimes in seconds.
This started cropping up, ironically, right after I posted the thread, whats a man to do?
So I started trying a bunch of things, some of which worked. Shameless as I am, I accepted the challenge. Things weren't perfect but it was going well enough. At that point I hadn't slept in 30~ hours so when I thought I had it I let it run and went to bed. 5 AM comes, I check the program. Still calculating, and way overshot. Fuuuuuuccc...
So here we are now and it's say to safe the worlds not gonna burn if I explain it seeing as it doesn't work, or at least only some of the time.
Others people, much smarter than me, mentioned it may be a means of finding more secure pairs, and maybe so, I'm not familiar enough to know.
For everyone that followed, commented, those who contributed, even the doubters who kept a sanity check on this without whom this would have been an even bigger embarassement, and the people with their pins and tactical dots, thanks.
So here it is.
A few assumptions first.
Assuming p = the product,
a = some prime,
b = another prime,
and r = a/b (where a is smaller than b)
w = 1/sqrt(p)
(also experimented with w = 1/sqrt(p)*2 but I kept overshooting my a very small margin)
x = a/p
y = b/p
1. for every two numbers, there is a ratio (r) that you can search for among the decimals, starting at 1.0, counting down. You can use this to find the original factors e.x. p*r=n, p/n=m (assuming the product has only two factors), instead of having to do a sieve.
2. You don't need the first number you find to be the precise value of a factor (we're doing floating point math), a large subset of decimal values for the value of a or b will naturally 'fall' into the value of a (or b) + some fractional number, which is lost. Some of you will object, "But if thats wrong, your result will be wrong!" but hear me out.
3. You round for the first factor 'found', and from there, you take the result and do p/a to get b. If 'a' is actually a factor of p, then mod(b, 1) == 0, and then naturally, a*b SHOULD equal p.
If not, you throw out both numbers, rinse and repeat.
Now I knew this this could be faster. Realized the finer the representation, the less important the fractional digits further right in the number were, it was just a matter of how much precision I could AFFORD to lose and still get an accurate result for r*p=a.
Fast forward, lot of experimentation, was hitting a lot of worst case time complexities, where the most significant digits had a bunch of zeroes in front of them so starting at 1.0 was a no go in many situations. Started looking and realized
I didn't NEED the ratio of a/b, I just needed the ratio of a to p.
Intuitively it made sense, but starting at 1.0 was blowing up the calculation time, and this made it so much worse.
I realized if I could start at r=1/sqrt(p) instead, and that because of certain properties, the fractional result of this, r, would ALWAYS be 1. close to one of the factors fractional value of n/p, and 2. it looked like it was guaranteed that r=1/sqrt(p) would ALWAYS be less than at least one of the primes, putting a bound on worst case.
The final result in executable pseudo code (python lol) looks something like the above variables plus
while w >= 0.0:
if (p / round(w*p)) % 1 == 0:
x = round(w*p)
y = p / round(w*p)
if x*y == p:
print("factors found!")
print(x)
print(y)
break
w = w + i
Still working but if anyone sees obvious problems I'd LOVE to hear about it.38 -
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
So Pubs are open again I Ireland.. went to n that were all booked out.. but after 40min of wandering around I got a single corner in one of them.
Let me tell you one thing. You might pour good pints but NO ONE can serve a pint like an Irish pub. Soooo gooood and creamy.. fuck, i missed this.13 -
When a Coursera course is way better than the one offered by your university…
A university student's rant...
I study Electrical and Computer Engineering and during the first semester of the second year I selected an optional course: Web Programming. It was believed among students that the course would be really easy, and it was. All the student had to do was build a very simple website using HTML, CSS and a few line of JS. A website containing three or four pages all of which had to be validated using a markup validation service.
Yeah, sure, I passed the course just like everyone else who bothered enough to spend an hour or two working on the project. Oh, I almost forgot! We had an one-hour workshop on Dreamweaver!
So, by that point, everybody was a front-end developer, right?!
That happened over three years ago, and because of that course web-development didn’t impress me…
Thankfully, the last few months I’ve became interested in Web Development, and I’ve been reading some articles, spending time on smashing magazine, making some progress on FreeCodeCamp and taking relevant courses on Coursera!
In fact, a few days ago I completed the Coursera course “HTML, CSS and Javascript for Web Developers”.
Oh boy, the things I didn’t know that I didn’t know…
<sarcasm>Did you know there was a term called “responsive design” and that there are frameworks like bootstrap?</sarcasm>
Well, I d i d n ’ t k n o w ! ! ! (even though I had taken the university’s course).
I understand that bootstrap was introduced in 2011 and I took the university course in late 2012, but by that time, bootstrap was quite popular and also there were other frameworks available before bootstrap that could have been included in the course! (even today, there is no reference in responsive design in the university’s course).
In just five weeks the coursera course managed to teach me more, in a more organized and meaningful way than my university’s course in a whole semester!
When I started the coursera course I shared it with a friend of mine. His response: “yeah, sure, but web development is pretty easy… I didn’t spend much time to complete that project three years ago!”
That course three years ago gave birth to misconceptions in students' minds that web development is easy! Yeah, sure, it can be easy to built a simple, non responsive, non interactive website! But that's not how the world works nowadays , right?!
A few months ago, in the early days of August, I attended Flock, the Fedora community conference. During a break I spent some time speaking with a Red Hat employee about student internships. He told me, and I paraphrase: “We know that students don’t have a solid background and that they haven’t learned in the university what we need them to!”
Currently I’m planning to apply for a front-end developer internship position here in Greece.
Yesterday I wrote my CV, added university courses relevant to that position and listed coursera courses under independent coursework… While writing those I made these thoughts…
What if that course 3 years ago was as good as the coursera course… all the things I’d know by now…6 -
When I was in school I had some guys walk up to me and asked:
G: Are you Feeno?
Me: Yes, what's up?
G: We need our FY project on school management system done.
Me: Okay?
G: How much will that cost us?
Me: *confused because I was still a freshman. At that point the only programming language I knew was elementary qbasic. I couldn't even write a hello world program without the help of Google*
So played along because yes we're talking about money here.
Me: It will cost you guys N amount of money (*improvised deep voice*).
G: Okay. Fair price.
* Right there they transferred half the requested amount to me. *
Holy moly! This guys aren't joking around. I don't know shit! They clearly mistook me for a senior student whose first name is Feeno, to me that was a nick referred to me by my friends.
I'm in this one for sure and it's a do or die transaction cus I'm returning no fucking money. I told my friends what had happened and they insisted I return back the money to the students and admit I can't deliver the project they were requesting.
Fuck all of yah! I'm keeping this money. Same afternoon I visited the school library with the intension of writing the code using the help of YouTube tutorials. I didn't find anything useful for qbasic as I thought I could write a full fledged school management system using qbasic.
I was lucky enough to find an existing source code on Codeproject, God bless that Indian guy. The source was in PHP and the tutor gave a step by step guide to setup XAMP and MySQL. I really don't know PHP but I guess source code modification is a natural skill to all programmers as I was able to modify the code to meet the requirements of the students (i.e school name, logo and other minor changes).
Most of what I learnt in programming came from modifying the source of that project. I learnt how to connect a PHP source to a MySQL database, I learnt about functions and their usage, I learnt the basics of HTML, I really learnt a lot and I would say that the speed at which I learnt was proportional to the amount of pressure I received to deliver.
That was how my journey as a full stack developer started. By chance maybe.2 -
Working on a database priorly designed and maintained by some private agency.
The fuck I'm dealing with!
Boolean values stored as 'TRUE'/'FALSE'. It's varchar, my dudes.
There are no FK relations. Just the values of IDs in a column.
There are no indexes, all on just the PKs, nothing else. Nothing.
Null, what's that? I'm dealing with 'N/A', my dudes.
Unique key, what's that? The table which stores users has all the fields nullable. Email is not unique ( even though that's the required behaviour).
ALL the numeric values are stored as varchar. Varchar, my dudes. Varchar. '1', '1.1'
And finally, the good ole, 1 table to rule them all. Normalisation, fuck that.
And what's the root cause of all this? My PM used to hand them Excel sheets she maintains on her local system. FTW. I don't have a enough explanations.7 -
My code review nightmare part 2
Team responsible for code 'quality' dictated in their 18+ page coding standard document that all the references in the 'using' block be sorted alphabetically. Easy enough in Visual Studio with the right-click -> 'Remove and Sort Usings', so I thought.
Called into a conference room with other devs and the area manager (because 'Toby' needed an audience) focusing on my lack of code quality and not adhering to the coding standard.
The numerous files in question were unit tests files
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
<the rest of the usings>
T: "As you can see, none of these files' usings are in alphabetical order"
Me: "Um, I think they are. M comes before S"
T: "The standards clearly dictate system level references are to be sorted first."
Mgr: "Yes, why didn't you sort before checking this code in? T couldn't have made the standards any easier to follow. All you had to do is right-click and sort."
Me: "I did. M comes before S."
T: "No You Didn't! That is not a system reference!"
Me: "I disagree. MSTest references are considered a system level reference, but whatever, I'll move that one line if it upsets you that much."
Mgr: "OK smartass, that's enough disrespect. Just follow the fucking standard."
T: "And learn to sort. It's easy. You should have learned that in college"
<Mgr and T have a laugh>
Me: "Are all your unit tests up to standard? I mean, are the usings sorted correctly?"
T:"Um..well..of course they are!"
Me: "Lets take a look."
I had no idea, a sorted usings seems like a detail no one cares about that much and something people do when bored. I navigate to project I knew T was working on and found nearly all the file's usings weren't sorted. I pick on one..
using NUnit;
using Microsoft.Something.Other;
using System;
<the rest of the usings>
Me: "These aren't sorted..."
T: "Uh..um...hey...this file is sorted. N comes before M!"
Me: "Say that again. A little louder please."
Mgr: "NUnit is a system level nuget package. It's fine. We're not wasting time fixing some bug in how Visual Studio sorts"
Me: "Bug? What?..wait...and having me update 10 or so files isn't a waste of time?"
Mgr: "No! Coding standards are never a waste of time! We're done here. This meeting is to review your code and not T's. Fix your bugs and re-submit the code for review..today!"17 -
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 -
Where I work, in our database, we use 3 to indicate true and 7 to indicate false and 0 is true but null is false
In another table, we use 'P' to indicate true and 'I' to indicate false and 'Y' is also false and null is false
And the most used table, we also use 'Y' to indicate yes and 'N' to indicate no, but null is also Yes.
We also store integers as varchar in a live table, but stays an integer in all the other tables. I hope I'm not there when the number of digits exceeds the varchar limit.
These are all live and used in production all created by my boss, the head of IT.8 -
WASM was a mistake. I just wanted to learn C++ and have fast code on the web. Everyone praised it. No one mentioned that it would double or quadruple my development time. That it would cause me to curse repeatedly at the screen until I wanted to harm myself.
The problem was never C++, which was a respectable if long-winded language. No no no. The problem was the lack of support for 'objects' or 'arrays' as parameters or return types. Anything of any complexity lives on one giant Float32Array which must surely bring a look of disgust from every programmer on this muddy rock. That is, one single array variable that you re-use for EVERYTHING.
Have a color? Throw it on the array. 10 floats in an object? Push it on the array - and split off the two bools via dependency injection (why do I have 3-4 line function parameter lists?!). Have an image with 1,000,000 floats? Drop it in the array. Want to return an array? Provide a malloc ptr into the code and write to it, then read from that location in JS after running the function, modifying the array as a side effect.
My- hahaha, my web worker has two images it's working with, calculations for all the planets, sun and moon in the solar system, and bunch of other calculations I wanted offloaded from the main thread... they all live in ONE GIANT ARRAY. LMFAO.If I want to find an element? I have to know exactly where to look or else, good luck finding it among the millions of numbers on that thing.
And of course, if you work with these, you put them in loops. Then you can have the joys of off-by-one errors that not only result in bad results in the returned array, but inexplicable errors in which code you haven't even touched suddenly has bad values. I've had entire functions suddenly explode with random errors because I accidentally overwrote the wrong section of that float array. Not like, the variable the function was using was wrong. No. WASM acted like the function didn't even exist and it didn't know why. Because, somehow, the function ALSO lived on that Float32Array.
And because you're using WASM to be fast, you're typically trying to overwrite things that do O(N) operations or more. NO ONE is going to use this return a + b. One off functions just aren't worth programming in WASM. Worst of all, debugging this is often a matter of writing print and console.log statements everywhere, to try and 'eat' the whole array at once to find out what portion got corrupted or is broke. Or comment out your code line by line to see what in forsaken 9 circles of coding hell caused your problem. It's like debugging blind in a strange and overgrown forest of code that you don't even recognize because most of it is there to satisfy the needs of WASM.
And because it takes so long to debug, it takes a massively long time to create things, and by the time you're done, the dependent package you're building for has 'moved on' and find you suddenly need to update a bunch of crap when you're not even finished. All of this, purely because of a horribly designed technology.
And do they have sympathy for you for forcing you to update all this stuff? No. They don't owe you sympathy, and god forbid they give you any. You are a developer and so it is your duty to suffer - for some kind of karma.
I wanted to love WASM, but screw that thing, it's horrible errors and most of all, the WASM heap32.7 -
An excerpt from the best rant about whiteboard interviews posted on the internet. Ever.
"Well, maybe your maximum subsequence problem is a truly shitty interview problem. You are putting your interview candidate in a situation where their employment hinges on a trivia question. — Kadane's algorithm! They know it, or they don't. If they do, then congratulations, you just met an engineer that recently studied Kadane's algorithm.
Which any other reasonably competent programmer could do by reading Wikipedia.
And if they don't, well, that just proves how smart the interviewer is. At which point the interviewer will be sure to tell you how many people couldn't answer his trivially simple interview question.
Find a spanning tree across a graph where the edges have minimal weight. Maybe one programmer in ten thousand — and I’m being generous — has ever implemented this algorithm in production code. There are only a few highly specific vertical fields in the industry that have a use for it. Despite the fact that next to no one uses it, the question must be asked during job interviews, and you must write production-quality code without looking it up, because surely you know Kruskal’s algorithm; it’s trivial.
Question: why are manhole covers round? Answer: they’re not just round, if you live in London; they're triangular and rectangular and a bunch of other shapes. Why is your interview question broken? Why did you just crib an interview question without researching whether its internal assumption was correct? Do you think that “round manhole covers are easier to roll" is a good answer? Have you ever tried to roll an iron coin that weighs up to 300 pounds? Did you survive? Do you think that “manhole covers are circular so that they don’t fall into manholes” is a good answer? Do you know what a curve of constant width is? Do you know what a Reuleaux triangle is? Have you ever even been to London?
If the purpose of interviewing was to play stump the candidate, I’d just ask you questions from my area of specialization. “What are the windowing conditions which, during the lapping operation on a modified discrete cosine transform, guarantee that the resynthesis achieves perfect reconstruction?” The answer of course is the Princen-Bradley condition! Everyone knows that’s when your windowing function satisfies the conditions h(k)2+h(k+N)2=1 (the lapping regions of the window, squared, should sum to one) and h(k)=h(2N−1−k) (the window should be symmetric). That’s fundamental computer science. So obvious, even a child should know the answer to that one. It’s trivial. You embarrass your entire extended family with your galactic stupidity, which is so vast that its value can only be stored in a double, because a float has insufficient range:"
Author: John Byrd
Src: https://quora.com/What-is-the-harde...3 -
Near the end of a massive (1,000 user bridgeline) conference call today:
[ P = presenter, RCn = random caller n ]
P: ...so, does anyone have any other questions they'd like to---
RC1: Hey! Yeah, I'm still on this STUPID call right now... I dunno, we've been in here for like 30 minutes already - The guy came by the house to talk about it, but I couldn't get off this STUPID call - I think they said it would be around 800 dollars...
[ P, RC1, RC2, RC3, RC4 all overlapping ]
P: Um, we can hear you-
RC2: Dude, mute your phone!
RC3: As the presenter, you can mute that guy from the web UI-
P: Yeah, I can't find him in the attendee list; it's so long-
RC3: -Right-click on his name and select "mute line"-
P: I know how, but I can't find him on the list.
RC3: Find him on the attendance list on the right side-
P: [ louder and louder ] Yes, I know - but I can't find him in the list-
RC4: Should someone call an operator?
RC1: -so I figured we'll probably need to call Jerry and see what he says. I'll call him if I can ever get off this ridiculous, STUPID call - They are all talking at once on there now and no one can understand anything!
[ This went on for about 5 solid minutes, finally ending with... ]
RC1: I'm just going to drop this STUPID call and call Jerry for us. This thing was a total waste of time. [ boop-beep ]
[ long pause ]
P: OK, so now that is over, does anyone have any questions they'd like to discuss?
[ At least 10 people un-mute and overlap questions ]
#ConferenceCallProblems
Above everything else, the funniest part to me was his repeated, over-the-top insistence on how "STUPID" the call was.
#TellUsHowYouReallyFeel1 -
Why do people say "Well, I don't know about that" to voice disagreement?
If you admit your own naivety on a subject compared to your peers, if you admit that you do not have the required knowledge to have formed an opinion, how can you disagree?
So it can either be expressed with genuine innocence, like 'Well, I don't know about that, tell me more!', which is never the case.
Or it means "Well I don't know anything about that... and I'm ashamed of the fact that I can't find any counter argument, so I refuse to trust your fucking expertise, shut the fuck up until I give you the right to voice your knowledge"
Which is a bit rude.
Now that we're on the topic of annoying expressions and platitudes...
"It's not rocket science" -- Rocket science, understanding how a rocket works, is surprisingly simple. You fill a cylinder with fuel and oxygen, add a pump or two, put some sparks underneath. Chemical reaction equals energy, direct energetic particles using a nozzle, Newton's first law does the rest. It's so simple that people don't actually study rocket science. They study aerospace engineering, or astrodynamics, which are difficult topics.
So if someone says "Devops is not rocket science", they're right, but for the wrong reason. It's actually harder than rocket science. Maybe easier than developing thermal protection system materials or solving n-body orbital problems with a slide ruler though.
"Great minds think alike" -- No, great minds actually think creatively and generate unique thoughts, if two minds think alike, the solution was just fucking obvious.
"Don't reinvent the wheel" -- First of all, pretty much nothing in code looks or even remotely functions like a simple wheel. Even metaphorically, all existing code equates to oval or square wheels. If you said "Hey, don't bother making better wheels, I like my ride to be bumpy because it stimulates my asshole", say no more, who am I to come between a product manager and their anal stimulation.
Anyway, those were four coworkers who I would've strangled with an Ethernet cable if it weren't for a certain pandemic and the risk of infection which comes with choke-coughing.
What are your linguistic pet peeves you get homicidal over?23 -
!dev !sex I promise this is a good read
I once read the whole bible.
Not in one sitting, ofc. I read it in a period of a year, just 3-4 chapters a day.
Is it something to boast about?
I'm not sure.
I mean, I guess being able to read through it despite not being exactly entertainment material (except some fun parts) kinda is. So I might feel a tad bit proud about that.
But I'm actually more happy that I did instead.
The reason I'm more happy than proud is because I took awareness of the religion I was in.
I became christian when I was an early teen. I grew up in an agnostic family. My dad was kinda hippie and my mom was into leftist ideas.
So me becoming a christian was a bit orthogonal to their philosophies.
I started assisting a church because I was very alone and misunderstood, and found some people there that seemed to get me, and viceversa.
But as time went on and I got more exposed to christian doctrine, my level of commitment grew.
I wanted to save people from going to hell. It sounds funny, maybe egotistical, but it's true.
3, 4 years of being in the church go by. I collaborate in the church, I make some very personal friendships, I was very deep in church by that point.
I then decide that I should take it to the next level and read the bible. So I did. And unknowingly, it started this feeling in me that I didn't liked being a christian at all.
I'm not gonna deny there are some christian values that are still compatible with today's modern society, such as being a good samaritan, working hard, being honest.
But there were too many verses in both old and new testament that I found morally repugnant,
The ones that made me feel the worst about christianity, though, were the ones that condemned homosexuality with death.
Since my dad was a hippie, he used to be in artsy things, like theater or music, and through that he had some gay friends
And for real, I think they were the nicest and most cheerful people I'd met as a kid. So I could not be part of that anymore.
Let me clarify that I didn't stop being a christian immediately after finishing the bible, but it did start a spark "of "what tf do I even believe in...?"
That spark turned into flame when I started the university, a place where people think for a living.
It's no wonder my mind started completing the puzzle, and slowly I started liking church and christianity less and less.
Until one sunday I didn't want to go, and I didn't, and from then on, I pretty much severed ties with that church and christianity.
Which is crazy considering I went every sunday without interruption for 6 years, and several saturdays too.
Anyhow, that's my story of me getting in n out of christianity. Like in the previous post, it sure how to end this, so go fuck a rock or something.12 -
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 -
@netikras since when does proprietary mean bad?
Lemme tell you 3 stories.
CISCO AnyConnect:
- come in to the office
- use internal resources (company newsletter, jira, etc.)
- connect to client's VPN using Cisco AnyConnect
- lose access to my company resources, because AnyConnect overwrites routing table (rather normal for VPN clients)
- issue a route command updating routing table so you could reach confluence page in the intranet
- route command executes successfully, `route -n` shows nothing has changed
- google this whole WTF case
- Cisco AnyConnect constantly overwrites OS routing table to ENFORCE you to use VPN settings and nothing else.
Sooo basically if you want to check your company's email, you have to disconnect from client's VPN, check email and reconnect again. Neat!
Can be easily resolved by using opensource VPN client -- openconnect
CISCO AnyConnect:
- get a server in your company
- connect it to client's VPN and keep the VPN running for data sync. VPN has to be UP at all times
- network glitch [uh-oh]
- VPN is no longer working, AnyConnect still believes everything is peachy. No reconnect attempts.
- service is unable to sync data w/ client's systems. Data gets outdated and eventually corrupted
OpenConnect (OSS alternative to AnyConnect) detects all network glitches, reports them to the log and attempts reconnect immediatelly. Subsequent reconnect attempts getting triggered with longer delays to not to spam network.
SYMANTEC VIP (alleged 2FA?):
- client's portal requires Sym VIP otp code to log in
- open up a browser in your laptop
- navigate to the portal
- enter your credentials
- click on a Sym VIP icon in the systray
- write down the shown otp number
- log in
umm... in what fucking way is that a secure 2FA? Everything is IN the same fucking device, a single click away.
Can be easily solved by opensource alternatives to Sym VIP app: they make HTTP calls to Symantec to register a new token and return you the whole totp url. You can convert that url to a qr code and scan it w/ your phone (e.g. Google's Authenticator). Now you have a true 2FA.
Proprietary is not always bad. There are good propr sw too. But the ones that are core to your BAU and are doing shit -- well these ARE bad. and w/o an oppurtunity to workaround/fix it yourself.13 -
Requested an installer for Photoshop for my personal laptop...bcoz of compliance n licensing issue..they gave me company macbook air instead... Ok no problem 😁
-
EEEEEEEEEEEE Some fAcking languages!! Actually barfs while using this trashdump!
The gist: new job, position required adv C# knowledge (like f yea, one of my fav languages), we are working with RPA (using software robots to automate stuff), and we are using some new robot still in beta phase, but robot has its own prog lang.
The problem:
- this language is kind of like ASM (i think so, I'm venting here, it's ASM OK), with syntax that burns your eyes
- no function return values, but I can live with that, at least they have some sort of functions
- emojies for identifiers (like php's $var, but they only aim for shitty features so you use a heart.. ♥var)
- only jump and jumpif for control flow
- no foopin variable scopes at all (if you run multiple scripts at the same time they even share variables *pukes*)
- weird alt characters everywhere. define strings with regular quotes? nah let's be [some mental illness] and use prime quotes (‴ U+2034), and like ⟦ ⟧ for array indexing, but only sometimes!
- super slow interpreter, ex a regular loop to count to 10 (using jumps because yea no actual loops) takes more than 20 seconds to execute, approx 700ms to run 1 code row.
- it supports c# snippets (defined with these stupid characters: ⊂ ⊃) and I guess that's the only c# I get to write with this job :^}
- on top of that, outdated documentation, because yea it's beta, but so crappin tedious with this trail n error to check how every feature works
The question: why in the living fartfaces yolk would you even make a new language when it's so easy nowadays to embed compilers!?! the robot is apparently made in c#, so it should be no funcking problem at all to add a damn lua compiler or something. having a tcp api would even be easier got dammit!!! And what in the world made our company think this robot was a plausible choice?! Did they do a full fubbing analysis of the different software robots out there and accidentally sorted by ease of use in reverse order?? 'cause that's the only explanation i can imagine
Frillin stupid shitpile of a language!!! AAAAAHHH
see the attached screenshot of production code we've developed at the company for reference.
Disclaimer: I do not stand responsible for any eventual headaches or gauged eyes caused by the named image.
(for those interested, the robot is G1ANT.Robot, https://beta.g1ant.com/)4 -
Biggest challenge I overcame as dev? One of many.
Avoiding a life sentence when the 'powers that be' targeted one of my libraries for the root cause of system performance issues and I didn't correct that accusation with a flame thrower.
What the accusation? What I named the library. Yep. The *name* was causing every single problem in the system.
Panorama (very, very expensive APM system at the time) identified my library in it's analysis, the calls to/from SQLServer was the bottleneck
We had one of Panorama's engineers on-site and he asked what (not the actual name) MyLibrary was and (I'll preface I did not know or involved in any of the so-called 'research') a crack team of developers+managers researched the system thoroughly and found MyLibrary was used in just about every project. I wrote the .Net 1.1 MyLibrary as a mini-ORM to simplify the execution of database code (stored procs, etc) and gracefully handle+log database exceptions (auto-logged details such as the target db, stored procedure name, parameter values, etc, everything you'd need to troubleshoot database errors). This was before Dapper and the other fancy tools used by kids these days.
By the time the news got to me, there was a team cobbled together who's only focus was to remove any/every trace of MyLibrary from the code base. Using Waterfall, they calculated it would take at least a year to remove+replace MyLibrary with the equivalent ADO.Net plumbing.
In a department wide meeting:
DeptMgr: "This day forward, no one is to use MyLibrary to access the database! It's slow, unprofessionally named, and the root cause of all the database issues."
Me: "What about MyLibrary is slow? It's excecuting standard the ADO.Net code. Only extra bit of code is the exception handling to capture the details when the exception is logged."
DeptMgr: "We've spent the last 6 weeks with the Panorama engineer and he's identified MyLibrary as the cause. Company has spent over $100,000 on this software and we have to make fact based decisions. Look at this slide ... "
<DeptMgr shows a histogram of the stacktrace, showing MyLibrary as the slowest>
Me: "You do realize that the execution time is the database call itself, not the code. In that example, the invoice call, it's the stored procedure that taking 5 seconds, not MyLibrary."
<at this point, DeptMgr is getting red-face mad>
AreaMgr: "Yes...yes...but if we stopped using MyLibrary, removing the unnecessary layers, will make the code run faster."
<typical headknodd-ers knod their heads in agreement>
Dev01: "The loading of MyLibrary takes CPU cycles away from code that supports our customers. Every CPU cycle counts."
<headknod-ding continues>
Me: "I'm really confused. Maybe I'm looking at the data wrong. On the slide where you highlighted all the bottlenecks, the histogram shows the latency is the database, I mean...it's right there, in red. Am I looking at it wrong?"
<this was meeting with 20+ other devs, mgrs, a VP, the Panorama engineer>
DeptMgr: "Yes you are! I know MyLibrary is your baby. You need to check your ego at the door and face the facts. Your MyLibrary is a failed experiment and needs to be exterminated from this system!"
Fast forward 9 months, maybe 50% of the projects updated, come across the documentation left from the Panorama. Even after the removal of MyLibrary, there was zero increases in performance. The engineer recommended DBAs start optimizing their indexes and other N+1 problems discovered. I decide to ask the developer who lead the re-write.
Me: "I see that removing MyLibrary did nothing to improve performance."
Dev: "Yes, DeptMgr was pissed. He was ready to throw the Panorama engineer out a window when he said the problems were in the database all along. Didn't you say that?"
Me: "Um, so is this re-write project dead?"
Dev: "No. Removing MyLibrary introduced all kinds of bugs. All the boilerplate ADO.Net code caused a lot of unhandled exceptions, then we had to go back and write exception handling code."
Me: "What a failure. What dipshit would think writing more code leads to less bugs?"
Dev: "I know, I know. We're so far behind schedule. We had to come up with something. I ended up writing a library to make replacing MyLibrary easier. I called it KnightRider. Like the TV show. Everyone is excited to speed up their code with KnightRider. Same method names, same exception handling. All we have to do is replace MyLibrary with KnightRider and we're done."
Me: "Won't the bottlenecks then point to KnightRider?"
Dev: "Meh, not my problem. Panorama meets primarily with the DBAs and the networking team now. I doubt we ever use Panorama to look at our C# code."
Needless to say, I was (still) pissed that they had used MyLibrary as dirty word and a scapegoat for months when they *knew* where the problems were. Pissed enough for a flamethrower? Maybe.6 -
I am much too tired to go into details, probably because I left the office at 11:15pm, but I finally finished a feature. It doesn't even sound like a particularly large or complicated feature. It sounds like a simple, 1-2 day feature until you look at it closely.
It took me an entire fucking week. and all the while I was coaching a junior dev who had just picked up Rails and was building something very similar.
It's the model, controller, and UI for creating a parent object along with 0-n child objects, with default children suggestions, a fancy ui including the ability to dynamically add/remove children via buttons. and have the entire happy family save nicely and atomically on the backend. Plus a detailed-but-simple listing for non-technicals including some absolutely nontrivial css acrobatics.
After getting about 90% of everything built and working and beautiful, I learned that Rails does quite a bit of this for you, through `accepts_nested_params_for :collection`. But that requires very specific form input namespacing, and building that out correctly is flipping difficult. It's not like I could find good examples anywhere, either. I looked for hours. I finally found a rails tutorial vide linked from a comment on a SO answer from five years ago, and mashed its oversimplified and dated examples with the newer documentation, and worked around the issues that of course arose from that disasterous paring.
like.
I needed to store a template of the child object markup somewhere, yeah? The video had me trying to store all of the markup in a `data-fields=" "` attrib. wth? I tried storing it as a string and injecting it into javascript, but that didn't work either. parsing errors! yay! good job, you two.
So I ended up storing the markup (rendered from a rails partial) in an html comment of all things, and pulling the markup out of the comment and gsubbing its IDs on document load. This has the annoying effect of preventing me from using html comments in that partial (not that i really use them anyway, but.)
Just.
Every step of the way on building this was another mountain climb.
* singular vs plural naming and routing, and named routes. and dealing with issues arising from existing incorrect pluralization.
* reverse polymorphic relation (child -> x parent)
* The testing suite is incompatible with the new rails6. There is no fix. None. I checked. Nope. Not happening.
* Rails6 randomly and constantly crashes and/or caches random things (including arbitrary code changes) in development mode (and only development mode) when working with multiple databases.
* nested form builders
* styling a fucking checkbox
* Making that checkbox (rather, its label and container div) into a sexy animated slider
* passing data and locals to and between partials
* misleading documentation
* building the partials to be self-contained and reusable
* coercing form builders into namespacing nested html inputs the way Rails expects
* input namespacing redux, now with nested form builders too!
* Figuring out how to generate markup for an empty child when I'm no longer rendering the children myself
* Figuring out where the fuck to put the blank child template markup so it's accessible, has the right namespacing, and is not submitted with everything else
* Figuring out how the fuck to read an html comment with JS
* nested strong params
* nested strong params
* nested fucking strong params
* caching parsed children's data on parent when the whole thing is bloody atomic.
* Converting datetimes from/to milliseconds on save/load
* CSS and bootstrap collisions
* CSS and bootstrap stupidity
* Reinventing the entire multi-child / nested params / atomic creating/updating/deleting feature on my own before discovering Rails can do that for you.
Just.
I am so glad it's working.
I don't even feel relieved. I just feel exhausted.
But it's done.
finally.
and it's done well. It's all self-contained and reusable, it's easy to read, has separate styling and reusable partials, etc. It's a two line copy/paste drop-in for any other model that needs it. Two lines and it just works, and even tells you if you screwed up.
I'm incredibly proud of everything that went into this.
But mostly I'm just incredibly tired.
Time for some well-deserved sleep.7 -
A colleague of mine had to debug performance problems in a foreign, proprietary application that is ancient.
To be crystal clear: Only reason that thing exists is because some old geezers fear change.
Asked me for help cause it's an _ancient_ MS SQL server that is luckily running on hardware owned by us.
Finding the credentials was already a funny task.
We had to access the vault (not joking here, we have a physical vault for storing sensitive data and critical backups), grab a folder and find the necessary data cause no one ever dares to touch that thing.
The application is btw for a sort of ERP / inventory system that is used in some ancient shops not yet migrated...
Yeah. Story speaks for itself.
Anyway, after dusting off ourselves, we were able to connect.
Was a bit ... Interesting. Everything's in german. The worst kind of german.
After looking at the first tables, I started giggling.
My colleague knew immediately that this was a sign of danger (insert Simpson meme here), raised his eyebrows and asked "How bad is it....".
Me, still giggling, "lemme take a further look, this is gold".
*long sigh from the colleague*
Well... It ended with me putting my hands in front of my eyes, turning around and saying: "I cannot look at it anymore, it hurts too much...."
To summarize:
- German table names
- When a table exceeded 300 plus columns, they added another table with the same plus suffix "_ddd"… where ddd is an zero filled integer sequence like 001
- To join this mess, they created views... Named "generator" - Sequence Number ... Some had the beginning of table names appended, which doesn't make it less confusing.
- the process list was listing queries running longer than 5 mins.
Which isn't at all surprising when generating carrtesian products of N tables with left join.
I've seen shit.... I've seen a lot of shit.
But that shit scared me.1 -
bladder: I got to pee.
me: NO! To deep in code zone.
[20 mins pass]
bladder: I got to pee.
me: NO! Let me finish this.
[30 mins pass]
bladder: I'VE GOT TO PEE
me: NO! In a zone.
[5 mins pass]
bladder: GO! GO! GO!
me: D**n you bladder.
I hate this game. I lose every time.7 -
I just converted a massive project from C to cuda, I renamed everything, and it just worked.
What the fuck have I done wrong?3 -
TLDR: crappy api + idiot ex client combo rant // devam si duška
I saw a lot of people bitching about APIs that don't return proper response codes and other stuff..
Well let me tell you a story. I used to work on a project where we had to do something like booking, but better..crossbreed with the Off&Away bidding site (which btw we had to rip off the .js stuff and reverse engineer the whole timer thingy), using free versions of everything..even though money wasn't an issue (what our client said). Same client decided to go with transhotel because it was sooooo gooood... OK? Why did noone heard of them then?
Anyhow, the api was xml based.. we had to send some xml that was validated against a schema, we received another that was supposed to be validated againts another schema.. and so on and so on..
...
...
supposed..
The API docs were nonexistent.. What was there, was broken English or Spanish.. Even had some comments like Add This & that to chapter xy.. Of course that chapter didn't even exist yet. :( And the last documentation they had, was really really old..more than a year, with visible gaps, we got the validation schemas not even listed in the docs, let alone described properly.
Yaaay! And that was not everything.. besides wrong and missing data, the API itself caused the 500 server error whenever you were no longer authenticated.
Of course it didn't tell you that your session was dead.. Just pooof! Unhandled crap everywhere!
And the best part?! We handled that login after inspecting what the hell happened, but sent the notification to the company anyways.. We had a conf call, and sent numerous emails explaining to them what a 'try catch' is and how they should handle the not authenticated error <= BTW they should have had a handled xml response for that, we got the schema for it! But they didn't. Anyhow, after two agonizing days talking back and forth they at least set up the server to be available again after the horrified 500 error. Before, it even stopped responding until reset (don't ask me how they managed to do that).
Oh yeah, did I mention this was a worldwide renown company?! Where everybody spoke/wrote English?! Yup, they have more than 700 people there, of course they speak English! <= another one of my ex clients fabulous statements... making me wanna strangle him with his tie.. I told him I am not talking to them because no-one there understood/spoke English and it would be a waste of my time.. Guess who spent almost 3 hours to talk to someone who sounded like a stereotypical Indian support tech guy with a flue speaking Italian?! // no offence please for the referenced parties!!
So yeah, sadly I don't have SS of the fucked up documentation..and I cannot post more details (not sure if the NDA still holds even though they canceled the project).. Not that I care really.. not after I saw how the client would treat his customers..
Anywayz I found on the interwebz some proof that this shitty api existed..
picture + link: https://programmableweb.com/api/...
SubRant: the client was an idiot! Probably still is, but no longer my client..
Wanted to store the credit card info + cvc and owner info etc.. in our database.. for easier second payment, like on paypal (which he wanted me to totally customize the payment page of paypal, and if that wasn't possible to collect user data on our personalized payment page and then just send it over to paypal api, if possible in plaintext, he just didn't care as long as he got his personalized payment page) or sth.... I told the company owner that they are fucking retards if they think they can pull this off & that they will lose all their (potential) clients if they figure that out.. or god forbid someone hacked us and stole the data.. I think this shit is also against the law..
I think it goes without saying what happened next.. called him ignorant stupid fucktard to his face and told him I ain't doing that since our company didn't even had a certificate to store the last 4 numbers.. They heard my voice over the whole firm.. we had fish-tank like offices, so they could all see me yelling at the director..
Guess who got laid off due to not being needed anymore the next day?! It was the best day of my life..so far!! Never have I been happier to lose my job!!
P.S. all that crap + test + the whole backand for analysis, the whole crm + campaign emails etc.. the client wanted done in 6 months.. O.o
P.P.S. almost shat my pants when devRant notified my I cannot post and wanted to copy the message and then everything disappeard.. thank god I have written this in the n++ xDundefined venting big time issues no documentation idiot xml security api privacy ashole crappy client rant11 -
I fucking hate chained methods. Ok, not all of them. Query things like array.where.first... that stuff is ok.
Specially if it's part of the std lib of a lang, which would be probably written by a very competent coder and under scrutiny.
But if you're not that person, chances are you'll produce VASTLY inferior code.
I'm talking about things like:
expect(n).to.be(x).and.not(y)
And the reason I don't like it is because it's all fine and dandy at first.
But once you get to the corner cases, jesus christ, prepare to read some docpages.
You end up reading their entire fucking docs (which are suboptimal sometimes) trying to figure if this fucking dsl can do what you need.
Then you give up and ask in a github issue. And the dev first condescends you and then tells you that the beautiful eden of code he created doesn't let you do what you want.
The corner cases usually involve nesting or some very specific condition, albeit reasonable.
This kind of design is usually present in testing or validation js libraries. And I hate all of those for it.
If you want a modern js testing lib that doesn't suck ass, check avajs. It's as simple as testing should be.
No magic globals, no chaining, zero config. Fuck globals forced by libs.
But my favorite thing about it that is I can put a breakpoint wherever the fuck I want and the debugger stops right fucking there.
Code is basically lines of statements, that's it, and by overusing chaining, by encouraging the grouping of dozens of statements into one, you are preventing me from controlling these statements on MY code.
As an end dev, I only expect complexity increases to come from the problems themselves rather than from needlessly "beautified" apis.
When people create their own shitty dsl, an image comes to my mind of an incoherent rambling man that likes poetry a lot and creates his own martial art, which looks pretty but will get your ass kicked against the most basic styles of fighting.
I fucking hate esoteric code.
Even if I had to execute a list of functions, I'd rather send them in an array instead of being able to chain them because:
a) tree shaking would spare from all the functions i didn't import
b) that's what fucking arrays are for, to contain several things.
This bad style of coding is a result of how low the barrier to code in higher level langs are.
As a language or library gets easier to use you might think that's a positive thing. But at the same time it breeds laziness.
Js has such a low learning curve that it attacts the wrong kind of devs, the lazy, the uninspired, the medium.com reader, the "i just care about my paycheck" ones.
Someone might think that by bashing bad js devs I'm trying to elevate myself.
That'd be extremely stupid. That's like beating a retarded blind man in a game and then saying "look, I'm way better than this retarded blind man".
I'm not on a risky point of view, just take a stroll down npmjs.com. That place is a landfill. Not really npm's fault, in fact their search algorithm is good.
It's just the community.
Every lang has a ratio of competence. Of competent to incompetent devs.
You have the lang devs and most intelligent lib devs at the top. At the bottom you have the bottom.
Well js has a horrible ratio. I wouldn't be shocked to find out that most js devs still consider using import or await the future.
You could say that js improved a lot, that it was way worse beforr. But I hate chaining now, and i hated back then!
On top of this, you have these blog web companies, sucking the "js tutorial" business tit dry, pumping out the most obscenely unprofessional and bar lowering tutorials you can imagine, further capping the average intelligence of most js devs.
And abusing SEO while they're at it, littering the entire web with copy paste content.2 -
intialize
made a spelling mistake? just move back with the arrow and add the "i" between the "n" and "t"?
no
delete the whole word and write it from scratch again because it is faster
am i the only one?7 -
Just had an old coworker from a previous job send me some stuff for a php script he was having issues with.
There was too much glory in what he was trying to do: mixing php inside of jquery code, not using strict types would have prevented like 10 issues he was having on his script on another portion, mixing headers, weirdly named variables, poorly constructed, reused db connections, 0 oop or proper dependency management in his code, horrible use of sessions and cookies, O (n²) logic all over the place.
But the cake.....are y'all ready for it? It was code screenshots, not even of just the section, no, the full page, from a windows machine (to make it better he is hosting the application on an IIS server and his configuration was not properly set) but I digress, back to the cake:
He was writing his code inside of wordpad :P
FUCKING WORDPAD
I just politely told him that I was busy at the moment and happily ignored him. Dude is not a good person to begin with imo, for example, he brought the subject of homosexuality during one of our talks after he saw me talking to my bf, who just so happens to be gay, his statement was "I do not understand how there can be gay people when there are women that are so hot"
My comeback was "I do not understand how we can be heterosexual when there are some really attractive dudes out there, see how stupid your logic sounds? attractiveness is not the basis for homosexuality ye dipstick" he let it go after that, but close minded people like that are not really my cup of tea.14 -
5 stages of failing WIFI connectivity on Linux
This morning I woke up my laptop to start my work day. I have 2 very important meetings today, so I better get all prepared.
"Wifi connection failed"
Syslog says:
- wpa_supplicant: wlp9s0: SME: Trying to authenticate with <MAC>
- kernel: wlp9s0: authenticate with <MAC>
- kernel: wl9s0: send auth to <MAC> (try 1/3)
- kernel: wl9s0: send auth to <MAC> (try 2/3)
- kernel: iwlwifi: Not associated and the session protection is over already...
- kernel: wl9s0: send auth to <MAC> (try 3/3)
- kernel: wl9s0: authentication with <MAC> timed out
#### DENIAL #####
No biggie, let's try another AP (I have 3). All 3 failed to connect. Fine, let's try my phone's hotspot! FAILED!!!!!
w00t.... okay, let's restart the router... but failing to connect to a phone hotspot is already a worrying sign.
Wifi connection failed
wtf.. disable and re-enable wifi
Wifi connection failed
#### ANGER #####
the fuuuuuuck. Maybe my router is dead. But my phone connects to it, no fuss. My personal lappy also connects there easily.
wtf... Does that mean I'm about to lose my uptime?? Come one!! It's Linux - there MUST be something I could do! I don't see processes hanging in D state so the radio must be fine - it's gotta be a software issue!
ChatGPT – type all the log entries manually, via phone (that took a while...). Nothing useful there: update firmware, restart NetworkManager, etc.
#### BARGAINING #####
Alright... How about a USB dongle? Plug it in and wifi connects immediately! Yayyy!!! But that's only b/g/n and I'd very much like to have ac. It works well as a limping backup, but not something I'd use for the meetings.
rfkill block/unblock all the radios. No change. USB dongle connects right away but the PCIe adapter keeps throwing notifications at me with failure messages. It's annoying, to say the least.
So I've already tried
- restarting the router(s)
- disabling/reenabling the radios
- multiple APs
- suspending/waking again several times
- praying
#### DEPRESSION #####
The only thing I haven't tried yet is the most cruel one - restarting the laptop. But that's unfair... It's LINUX! How could it disappoint me. I have so many tmux sessions open, so many unsaved leafpad notes, terminal histories with oh so comfy ^r and ! retriggers all ready and waiting to be executed...
#### ACCEPTANCE #####
But I can't miss the meeting. So I slowly start closing off apps, starting with the least important ones, trying to preserve as much history and recent commands as I can. I'm gonna lose my uptime, that's the inevitable obvious truth... Linux has failed me. Or maybe it's a hardware issue... I can't be sure until I restart.
I must reboot.
#### A NEW HOPE #####
Hold on.. What if... What if before restarting I try to reload the Intel wifi kernel module? Just for the giggles. I've got nothing to lose anyway...
rmmod iwlmvm
rmmod iwlwifi
modprobe iwlwifi
modprobe iwlmvm
*WiFi Connected*
YESSSS!!!!!!!!! My uptime is saved!
403 days and counting! YEAH BABY!!!
Linux is the best!rant sysadmin 5 stages of grief wifi reboot or not reboot reboot uptime network-manager wpa_supplicant linux8 -
Just wasted a ton of time trying to figure out why my circuit wouldnt work properly and then noticed...2
-
It's 17:55... Did much work that day since I came in earlier than usual, so I could leave in time and do some shopping with the girlfriend.
A colleague comes in to my room, a tad distressed. He had accidentally ran a fixture script on a production environment database (processing a shipload of records per minute), truncating all tables...
Using AWS RDS to rollback the transaction log takes up about 20m. I had to do that about 5 times to estimate the date and time of when the fixture script ran... Since there was no clear point in time...
Finally I get to the best state of the data I could get. I log in remotely run some queries. All is well again... With minor losses in data.
I try to download a dump using pg_dump and apparently my version is mismatched with the server. I add the latest version to aptitudes source list of postgres repo and I am ready to remove and purge the current postgres client and extensions...
sudo apt-get remove post*
Are you sure? (Y/n) *presses enter and enters into a world of pain*
Apparently a lot of system critical applications start with post... T_T4 -
Employer msged me around 11pm
She wants to talk n finalize on which assignment I will work on
And what's the best time to talk
I told her in morning if she have no issues with that
She replied ok
But haven't called
My friends told me she is offended
Wth
Seriously need your input guys
Have I done something wrong?
Is it necessary to talk right away ?7 -
The cleaning lady saga continues...
(previous: https://devrant.com/rants/1850777)
Had an appointment with their manager, stuff gets discussed and coordinated at a 3x slower pace than if I'd done it myself (as usual because fuck efficiency when there's muggles involved -_-), yada yada.
*mail addresses for contact start getting discussed*
Incompetent fuck of a manager: And you $realName, your email address is $company@nixmagic.com, then changed to $nickname@nixmagic.com? Mind explaining this?
Me: Oh yeah that's just because I give out different email addresses to each contact person when it involves public forms or registrations, helps with spam prevention and putting the company name of the correspondent in there helps with easy recognition when some company's database leaks and I start getting a lot of spam on that mailbox.
IFOM: Really.. we actually weren't sure whether we should reply to something with our company name in it.. you know, not sure whether it's legit etc. Why would anyone want to use one of our email addresses as theirs?
… Let that sink in for a moment. They think that $company@nixmagic.com is theirs? Just because it's their domain (minus TLD) in front of MY FUCKING DOMAIN? How about you start by learning how email addresses work first, because clearly you have no fucking clue about it. Are you the kind of brainless fucks that get lured in by http://totallylegitbank.com.freehost.com/... scams? Fucking stupid piece of fucking shit.
Oh, and when you're using MS Exchange, of course you can't know that when you're having your own domain, you actually also own every fucking mailbox on it, because Microshaft doesn't allow you to have more than n amount of mailboxes, unless you gobble up money for them. But you know what, in my case it's a fucking catch-all domain running Linux on its servers, so yeah I can use whatever the fuck I want in front of it, including your stupid fucking cleaning company.
IFOM: And then there's your current designated email address. $nickname@nixmagic.com..
Oh you're going to criticise that as well?! Yeah condor is my fucking nickname all over the internet, and my username on all my systems. That's why I use it. But you know what else is an email address that you might come across, because people are shallow idiots like that? ILoveBigTits69@gmail.com or something like that. You know what, how about I address you next time from ILoveBigTits69_OhAndYoursAreAWashboard@nixmagic.com, because you know what? I CAN FUCKING DO THAT. But you know, I at least am halfway fucking professional about my business-related stuff, so I won't because I really don't want to be associated with such an email address. So don't you fucking dare to criticize me for using my fucking nickname instead of my real name.
Long story short, people are fucking idiots.6 -
So, I wanted to find a new way to arrange my language's alphabet. Atm, I'm loosely using latin's system even though my system is weird;
A B K D E F G H I IE SH L M N O P R S T U V
So, I remember that another language (I think Japanese) uses a poem with every letter to figure the order of their letters, so I decided to do the same.
Only problem is: My current word list is very limited, some of the letters I needed only existed in specific words (aka, the word for "Dark") so I ended up making a very depressing poem.
Enjoy! Or not.. I'm not going to tell you what to do.
English translation below. I also will post images of it written in my language's script, as well as one line in my language's cursive script (I'm not doing the whole thing in cursive because fuck that)
Senarseha:
Seh ninfuat seh nem fieta; Seka sato nem fiekm juna jenes sermin.
Seh ninfuat sif nemsin netua niet; Seka sem sedma nemat sargo no
nrokniet sam fiekmin sehim sepra.
Sehim sinta nem nara niv nakliet.
Seh nem sine fieta.
English:
I say I am well; But all is dark before day begins.
I say it isn't too much; But this place is a farm of
preasure that blackens my soul.
My mind is ever in agony.
I am not well.6 -
Really fed up with my colleague and possibly my job. Am starting to doubt am cut out to be a developer
Am a junior java dev , been working working for this company for about 2 years now. Although they hired me to be a java dev, they pretty much exclusively had me working on JavaScript crap because none of the other more senior devs wanted to do even so much as poke JS with a long stick....
Oh and the salary was crap but i figured since i had barely 3 years of exp i thought i would stick with it for a while
But a few months ago after seeing other opportunities I got fed up and threatened to quit , already started interviewing etc
Got an offer, not exactly what i wanted but better than where i was. Went to quit but they freaked out and started throwing money at me. They matched and exceed the other salary and promised to addressed the issues that made me want to leave. Ie get me to work more on the java side of the project and have me work with someone more senior who could sort of mentor me, i had been working semi solo on the js shit till then...
The problem is that my supposed mentor is selfish prick... he is the sort of guy who comes in real early, basically he goes to early morning prayer then come in at some ungodly hour and fuckoff home around 3pm
He does all his work early morning then spends the rest of the day with his headphones on stealthily watching youtube, amazon, watching cricket, reading about Palestine , how oppressed muslims are or building a website for some mosque.
I asked him to let me sit with him so that I could just learn how this or that part of the sys worked , he agreed then the very next day comes in and does all the work before i get in at 9 , i asked him how he did it and he tells me oh just read the code.
Its not as simple as that, out codebase is an old pile of non standard legacy dog shit. Nothing works as it should, i tried to go through documentation online for the various stuff we use , but invariably get stuck when i try the usual approach because it turns out the original devs had essentially done a lot of custom hacks and cowboy coding to get stuff working, they screwed around with some of the framework jars & edited libraries to get stuff to work, resulting in some really weird OSGI errors.
My point is that i cant really just "read the code" or google ...
I gotta know a bit more what was actually modified and a lot of this knowledge isn't fucking documented, theres a lot of " ohhh that weird bug yeah yeah that happens cuz x did this hack some years ago to fix this issue and we kinda built on it, yeah we weren't supposed to do that but heyyy what u gonna do, just do this or that instead"
I was asked to set up a web service to export something, since thats his area of expertise and he is suppose to be teaching me the ropes, i asked him to explain where i should start and what would the general workflow be, his response is to tell me to just copy the IMPORT service and rename it to export then "just do it um change it or something" very helpful indeed (building enterprise application here nothing complex at all!!)
He sits right next to me so i can see how much works he actually does, i know when he just idly sitting there so thats when i ask him questions, he always has his earphones on so each time i gotta find a way to get his attention with a poke or a wave, he will give a heavy sigh and a weary look as he removes his headphones, listen to my question then give me the shortest answer possible before IMMEDIATELY turning away and putting his headphones on as fast as possible regardless of whether I actually understood or even heard what he said. If i ask another question ( am talking like an immediate follow up question for a clarification or something) he will
Do the whole sigh + tired look routing to make me know yeah you are disturbing me. ( god was so happy the day he accidentally sat on and broke them)
Yesterday i caught a glance at his screen as i was sitting down and i think he and another dev were talking about me
That am slow with my work and take forever to get into gear.
Starting to have doubts about my own ability n wether am really cut out to be a developer. I know i can work hard but its impossible to do so when you have no clue where to start and unable to look it up since all the custom hacks doesn't really allow any frame of reference.
Feels like am being handicapped and mocked, yesterday i just picked up my gear n left the office.
I never talk ill about my colleagues, whenever i have a 121 with my mgr i always all is fine, x n y are really helpful etc
I tried to indirectly tell my other colleague about this guy, he told me that guy had kinda mentally checked out of this job and was just going through on auto pilot and just laughed it off (they have been working together for almost a decade and a buddies) my other colleague is pretty nice but he usually swamped with work so i feel bad to trouble him.
Am really Fed up with it all7 -
Two big moments today:
1. Holy hell, how did I ever get on without a proper debugger? Was debugging some old code by eye (following along and keeping track mentally, of what the variables should be and what each step did). That didn't work because the code isn't intuitive. Tried the print() method, old reliable as it were. Kinda worked but didn't give me enough fine-grain control.
Bit the bullet and installed Wing IDE for python. And bam, it hit me. How did I ever live without step-through, and breakpoints before now?
2. Remember that non-sieve prime generator I wrote a while back? (well maybe some of you do). The one that generated quasi lucas carmichael (QLC) numbers? Well thats what I managed to debug. I figured out why it wasn't working. Last time I released it, I included two core methods, genprimes() and nextPrime(). The first generates a list of primes accurately, up to some n, and only needs a small handful of QLC numbers filtered out after the fact (because the set of primes generated and the set of QLC numbers overlap. Well I think they call it an embedding, as in QLC is included in the series generated by genprimes, but not the converse, but I digress).
nextPrime() was supposed to take any arbitrary n above zero, and accurately return the nearest prime number above the argument. But for some reason when it started, it would return 2,3,5,6...but genprimes() would work fine for some reason.
So genprimes loops over an index, i, and tests it for primality. It begins by entering the loop, and doing "result = gffi(i)".
This calls into something a function that runs four tests on the argument passed to it. I won't go into detail here about what those are because I don't even remember how I came up with them (I'll make a separate post when the code is fully fixed).
If the number fails any of these tests then gffi would just return the value of i that was passed to it, unaltered. Otherwise, if it did pass all of them, it would return i+1.
And once back in genPrimes() we would check if the variable 'result' was greater than the loop index. And if it was, then it was either prime (comparatively plentiful) or a QLC number (comparatively rare)--these two types and no others.
nextPrime() was only taking n, and didn't have this index to compare to, so the prior steps in genprimes were acting as a filter that nextPrime() didn't have, while internally gffi() was returning not only primes, and QLCs, but also plenty of composite numbers.
Now *why* that last step in genPrimes() was filtering out all the composites, idk.
But now that I understand whats going on I can fix it and hypothetically it should be possible to enter a positive n of any size, and without additional primality checks (such as is done with sieves, where you have to check off multiples of n), get the nearest prime numbers. Of course I'm not familiar enough with prime number generation to know if thats an achievement or worthwhile mentioning, so if anyone *is* familiar, and how something like that holds up compared to other linear generators (O(n)?), I'd be interested to hear about it.
I also am working on filtering out the intersection of the sets (QLC numbers), which I'm pretty sure I figured out how to incorporate into the prime generator itself.
I also think it may be possible to generator primes even faster, using the carmichael numbers or related set--or even derive a function that maps one set of upper-and-lower bounds around a semiprime, and map those same bounds to carmichael numbers that act as the upper and lower bound numbers on the factors of a semiprime.
Meanwhile I'm also looking into testing the prime generator on a larger set of numbers (to make sure it doesn't fail at large values of n) and so I'm looking for more computing power if anyone has it on hand, or is willing to test it at sufficiently large bit lengths (512, 1024, etc).
Lastly, the earlier work I posted (linked below), I realized could be applied with ECM to greatly reduce the smallest factor of a large number.
If ECM, being one of the best methods available, only handles 50-60 digit numbers, & your factors are 70+ digits, then being able to transform your semiprime product into another product tree thats non-semiprime, with factors that ARE in range of ECM, and which *does* contain either of the original factors, means products that *were not* formally factorable by ECM, *could* be now.
That wouldn't have been possible though withput enormous help from many others such as hitko who took the time to explain the solution was a form of modular exponentiation, Fast-Nop who contributed on other threads, Voxera who did as well, and support from Scor in particular, and many others.
Thank you all. And more to come.
Links mentioned (because DR wouldn't accept them as they were):
https://pastebin.com/MWechZj912 -
Today’s lesson in C programming:
DON’T use
system( “clear” );
in Mac OS...
Causes seg Fault in ur program when it is perfectly correct...
What happened was... a friend wanted help with C programming and had written this code... but it was getting seg Fault randomly... just random seg Fault when his code was correct...
I pinpointed the seg Fault to a printf statement but the statement was correct...
Off to search the issue I went, found out that flushing problems can occur in printf if u don’t use \n.
This happens randomly. Thought this might b the reason...
Went to a VM running Arch Linux and tested the code there... worked perfectly. No issues whatsoever.
From a distant memory I remembered some people discussing to never use system( “clear” ); since it causes issues.
Thought to remove that line from code, thinking it wouldn’t make any difference.
Well imagine my shock when the code worked fine after remove that freaking line...
M gonna blame this one on Mac OS since arch had no issues with it 😡😡
Now to find alternative to system( “clear” );
Damm it I spent 4-5 hours on this crap!!!!!!9 -
Teaching new devs, hired straight from India.
This is today.
Bug1: We have four lists, each item in these lists has a variable called "Charge". This var is a double and we need to convert it to currency.
Dev creates fifth list called "All lists" and converted it's charge to currency then questioned why it didn't work.
I explained, his solution? Convert each list into currency.
I explained that's wrong and told him what he needed to do. He did List1:Charge into currency, but left his other conversion in place just in case.
I walked him through fixing it which took 10 times as long as necessary, only to find out he randomly converted four booleans into currency for no reason.
Bug2: we take integer, convert to string and concat "Months" on the end.
Doesn't work for him, tells me he doesn't know why.
I told him that he's not outputting the variable that we did it to, he is instead outputting a custom variable he made and didn't do anything to.
Bug 3: followup to #2, he fixed it as I instructed, but then added months as static text to the output so now it reads "Months months".
Bug 4: to make his code cleaner, he presses enter in the text box. Unfortunately he did that IN A STRING so his output is full of random /r/n
How do you guys deal with coworkers like this? He isn't new, this is supposed to be an experienced developer. Im only in my 2nd year23 -
So, this is probably somewhat esoteric but...
While studying at university I had a "programming paradigms" module, dunno why they called it that, it was more like "introduction to functional programming".
So, it's kinda mind bending, we'd only really started to get our heads around classical object oriented programming and they throw functional programming at us.
It's worse than that though, for do they use an established language, like lisp/scheme, functional Python, or even given Haskell?
No, of course they didn't. They taught us Oz.
You probably won't have heard of it, but this language is burned into the back of my brain, along with a vague understanding of the n-queens problem we had to solve graphically (using qTk, which I dunno if someone took qt and tk and blended them, I stopped asking questions after a while).
To top it off did this language (at the time) have a stand alone interpreter? Did it buggery! It was coupled to the Mozart programming system, which is just Emacs (which has a bloody lisp built into it,so close, yet so far 😭).
It gets worse, though, oh does it get worse, for pause dear reader and consider, have you ever heard of Mozart/oz before, I'd put money on most of you had not heard of it until today.
For, you see, I believe at the time of writing, one, yes, ONE text book exists on this language. When I was doing my assignment there was merely some published conference notes and language design documents.
That's not all, I was not the only one experiencing difficulties with this language, someone in the class ended up pouring through the mailing lists and found the very tutor teaching the class struggling at first to understand the language.
I had to repeat that year. The functional programming class was one semester.
When I retook that year, it was a whole year long. However, halfway through the year, original tutor was fired and a new tutor was hired to teach the language.
He was, understandably, just as confused as we were.
There was a Starbucks and a pub equidistant from the lecture hall, though in opposite directions. From lecture to lecture we had no idea which one we'd end up in.
I have reason to believe Mozart/Oz it some sort of otherworldly abomination designed to give students the occasional nightmare flashback, long after they've left.
My room had post it notes, sheets of paper, print outs, diagrams, doodles and pens, just stuck to the wall, I looked like a raving lunatic three hours away from being institutionalised. There was string connecting one diagram to the next and images of a chess queen all over. As I attempted to solve the n-queens problem.
Madmans knowledge, I call it. I can never unlearn all that, in fact it seeps into much of the code I write. Such information was not meant for the minds of a simple country bumpkin such as myself...
Mozart/Oz... I wouldn't be the programmer I am today without it, and that's frankly terrifying...10 -
ChatGPT sucks so much for coding tasks and it's laughable.
Like, it's come to a point where it's unusable for me. At all.
It's like a toddler, anything you tell it, it agrees. Then spits out non-existent functions.
The thing actually slows me down.
And yes, I've tried Claude AI and it's slightly better but in no way, shape or form did it improve my productivity.
Those who claim it made them n times faster were never working on complex tasks to begin with.8 -
This day I have received the most glorious news in e-pistolary form. For some years, I was suffering in support of a client who was, well, insufferable. My presence there paralleled the divine comedy in both essence and fact.
I opened the missive, expecting another plea to bail them out of whatever clusterfuck they found themselves in. Instead, what I found was something truly magical.
"Hey Human,
I hope this finds you well. I'm not sure if you remember a few years back, we were trying to decide between IBM Cloud and AWS. Well, after years of battling FF*, we're finally moving ahead with AWS. He failed one too many times to deliver anything visibly. After you left, there was no one left he could use to steal credit, ideas, and work.
FF is still pushing to have them use IBM cloud as a "warm backup" in the event "AWS fails." We will see where that goes.
I figured you'd like to know; you were the void in the wilderness for a long time. I don't want to think about how much time we could have saved if we had just listened.
PeeEm**"
This event represents a personal victory, albeit belated, over a few peoples' absurd amount of privilege. Towards the end, I was vicious about my contestation to the insanity of adopting a desperate hedge attempt-as-cloud offering from a failing company. Some examples:
// cloud 'strategy meeting'
Moi: What cloud platform are we looking at using?
FF: We're looking at IBM cloud and AWS as a second.
Moi: Why is that? I understand you're obligated to rep your offering first, but that decision doesn't seem to have the customer's best interest at heart.
FF: IBM cloud is a market leader; AWS isn't as good.
Moi: I see. I mean, that's the tech equivalent of the company's fleet management considering monkeys on tricycles as a strong competitor to service trucks, but I get what you mean.
// steering meeting
Director: Who can we look to as an example? Who is currently using the IBM cloud?
Moi: No one; they account for a single-digit portion of the actual cloud market. Their long game to sell you a "Hybrid Cloud," which means put some front end payload in a CDN, and buy n-frame units of IBM z servers for the DC with IBM gateway appliances acting as connective tissue. So it's not the cloud at all, really.
Director: How does it compare in cost?
Moi: It's generally 40% more expensive than other clouds, and it only goes higher as you option their software.
Director: What about Watson? I hear Watson is good?
Moi: It's a brand name. Most of the "Watson" product is just a facade on top of FOSS products like Spark, Hadoop, Elasticsearch, etc.
Director: Those were words. They sounded good. FF say it's good tho so we'll believe him because we're from the same city.
Moi: *deletes Director from LinkedIn*
Moral of the story: Never trust a vendor that only recommends their products.
*FF = FatFuck - an embarrassingly rotund individual whose girth is roughly equivalent to his height. He shit his way into an IBM architect position in his mid-20s purely due to winning the visa lottery. He had fake hair glued to his head for his wedding to hide his male pattern baldness; his arrange-married wife undoubtedly cries herself to sleep after sex.
**PeeEm - the then project manager, now portfolio manager of some satellite projects. An overall decent human being, capable.9 -
Want to make someone's life a misery? Here's how.
Don't base your tech stack on any prior knowledge or what's relevant to the problem.
Instead design it around all the latest trends and badges you want to put on your resume because they're frequent key words on job postings.
Once your data goes in, you'll never get it out again. At best you'll be teased with little crumbs of data but never the whole.
I know, here's a genius idea, instead of putting data into a normal data base then using a cache, lets put it all into the cache and by the way it's a volatile cache.
Here's an idea. For something as simple as a single log lets make it use a queue that goes into a queue that goes into another queue that goes into another queue all of which are black boxes. No rhyme of reason, queues are all the rage.
Have you tried: Lets use a new fangled tangle, trust me it's safe, INSERT BIG NAME HERE uses it.
Finally it all gets flushed down into this subterranean cunt of a sewerage system and good luck getting it all out again. It's like hell except it's all shitty instead of all fiery.
All I want is to export one table, a simple log table with a few GB to CSV or heck whatever generic format it supports, that's it.
So I run the export table to file command and off it goes only less than a minute later for timeout commands to start piling up until it aborts. WTF. So then I set the most obvious timeout setting in the client, no change, then another timeout setting on the client, no change, then i try to put it in the client configuration file, no change, then I set the timeout on the export query, no change, then finally I bump the timeouts in the server config, no change, then I find someone has downloaded it from both tucows and apt, but they're using the tucows version so its real config is in /dev/database.xml (don't even ask). I increase that from seconds to a minute, it's still timing out after a minute.
In the end I have to make my own and this involves working out how to parse non-standard binary formatted data structures. It's the umpteenth time I have had to do this.
These aren't some no name solutions and it really terrifies me. All this is doing is taking some access logs, store them in one place then index by timestamp. These things are all meant to be blazing fast but grep is often faster. How the hell is such a trivial thing turned into a series of one nightmare after another? Things that should take a few minutes take days of screwing around. I don't have access logs any more because I can't access them anymore.
The terror of this isn't that it's so awful, it's that all the little kiddies doing all this jazz for the first time and using all these shit wipe buzzword driven approaches have no fucking clue it's not meant to be this difficult. I'm replacing entire tens of thousands to million line enterprise systems with a few hundred lines of code that's faster, more reliable and better in virtually every measurable way time and time again.
This is constant. It's not one offender, it's not one project, it's not one company, it's not one developer, it's the industry standard. It's all over open source software and all over dev shops. Everything is exponentially becoming more bloated and difficult than it needs to be. I'm seeing people pull up a hundred cloud instances for things that'll be happy at home with a few minutes to a week's optimisation efforts. Queries that are N*N and only take a few minutes to turn to LOG(N) but instead people renting out a fucking off huge ass SQL cluster instead that not only costs gobs of money but takes a ton of time maintaining and configuring which isn't going to be done right either.
I think most people are bullshitting when they say they have impostor syndrome but when the trend in technology is to make every fucking little trivial thing a thousand times more complex than it has to be I can see how they'd feel that way. There's so bloody much you need to do that you don't need to do these days that you either can't get anything done right or the smallest thing takes an age.
I have no idea why some people put up with some of these appliances. If you bought a dish washer that made washing dishes even harder than it was before you'd return it to the store.
Every time I see the terms enterprise, fast, big data, scalable, cloud or anything of the like I bang my head on the table. One of these days I'm going to lose my fucking tits.10 -
As a pretty solid Angular dev getting thrown a react project over the fence by his PM I can say:
FUCK REACT!
It is nigh impossible to write well structured, readable, well modularized code with it and not twist your mind in recursion from "lift state up" and "rendercycle downwards only"
Try writing a modular modal as a modern function component with interchangeable children (passeable to the component as it should be) that uses portals and returns the result of the passed children components.
Closest I found to it is:
c o d e s a n d b o x.io/s/7w6mq72l2q
(and its a fucking nightmare logic wise and readability wise)
And also I still wouldn't know right of the bat how to get the result from the passed child components with all the oneway binding CLUSTERFUCK.
And even if you manage to there is no chance to do it async as it should be.
You HAVE to write a lot of "HTML" tags in the DOM that practically should not be anywhere but in async functions.
In Angular this is a breeze and works like a charm.
Its not even much gray matter to it...
I can´t comprehend how companies decide to write real big web apps with it.
They must be a MESS to maintain.
For a small "four components that show a counter and fetch user images" - OK.
But fo a big webapp with a big team etc. etc.?
Asking stuff about it on Stackoverflow I got edited unsolicited as fuck and downvoted as fuck in an instant.
Nobody explained anything or even cared to look at my Stackblitz.
Unsolicited edit, downvote, closevote and of they go - no help provided whatsoever.
Its completely fine if you don't have time to help strangers - but then at least do not stomp on beginners like that.
I immediately regretted asking a toxic community like this something that I genuinely seem to not understand. Wasn't SO about helping people?
I deleted my post there and won't be coming back and doing something productive there anytime soon.
Out of respect for my clients budget I'm now doing it the ugly react way and forget about my software architecture standards but as soon as I can I will advise switching to Angular.
If you made it here: WOW
Thank you for giving me a vent to let off some steam :)13 -
Welcome to Part III of WHY WOULD I WANT TO WORK WITH YOU?, a saga of competence, empathy and me being dick, even tho I didn't want to be one.
This is a follow-up to: https://devrant.com/rants/2363551. It's title is: "Mt 13:12".
We left off the story in the very moment I had received feedback from 3 companies that decided to interview me. A, B and C. We won't talk about A from now on, since I refused their offer to offer me unpaid internship.
It's December 20, 18:00. I am returning home. Earlier that day I emailed guys at C that I need some time with my decision, because I have another offer that suits me better. It was awaiting response from B, obviously. That day they called me and offered me... full-time job. As a fullstack. On a project for a big company, that they described by something like: "They may not be one of the famous X of the market, but they're probably X+1, yeah". Needless to say, that was some bad marketing. I googled them up later tho. Anyway, my response didn't change, altho thing seemed a little big better for me. Except that I was a little suspicious of them too. Were they *that* desperate for a worker?[1]
It is December 24th. 10 am. My phone rings. It's guy from B. He tells me "saito, the recruiter guy is still sick. Since I don't know if we can hire you for sure, it may be better for you to accept another offer, if you got any. I'll keep you updated." That was pretty cool of him. Remember the quote from part II? That's the empathy part. He called me, even tho he didn't really have to. If you read this, monsieur, you're the best. Back to the story now. I emailed guys at C that I am willing to start the job anytime. They told me that CEO is back January 7th, 2020.
It is January 4th 2020, 10 am. Unkonwn number calls. It's actually a guy from B, but the other one. The one that was sick previously. He tells me that he wants to talk about my employment. He talked with the senior dev and he just wants a talk and a small code test in typescript. He told me that it's no prob that I don't know typescript, since it will be entry level and I have time to learn the basics. And so I do. We decide to meet at January 7th. Later on that day guys from C email me that they want to sign the contract n January 7th.
And here we get to the culmination and the lesson of those posts. What should I do? On one side I have a job that isn't 100% comfirmed, but I'm pretty positive about it. The people at B are great, I love them. During my interview I learned some stuff about the project I would participate in, so I didn't go in blindly. It was my field of interest. I was hyped for the possibility itself to work with that senior dev. On the other hand guys at C had their contract ready. They finally were ready to start. I still didn't know for shit what would I do. I knew that I would need to learn basics of data science and stuff. Their interview and CEO left me with a quite bad impression. I didn't really like them. But it was a job.
What I did I consider the best thing I could do for myself. I told guys from C to meet someday later. I visited B yesterday, January 7th. I've done the test. It had some code refactoring and implementing some React elements. Basic shit indeed. I am almost positive I would do it even if I didn't visit typescript docs during the weekend. We then talked about it. The dev told me what he would change in the solution, but didn't consider it bad. Then they told me I'm hired. And I emailed C that I can't accept their offer. The guy was pretty pissed. I can understand it, they seemed to be ready to start with me and I pulled out last day, in the evening. I am truly sorry for that. But also I feel no regrets. I have chosen those whom I trusted more. I've chosen guys who took notes of my CV and talked about it in my interview over people who didn't even get that I applied for a frontend positin. That's competence for you. I've chosen guys who actually wanted to talk wih me about me making music over people who sat me down at a computer and told me: "code". That's empathy for you.
Dear recruiters. If you want to attract best candidates, show your competence and empathy.
Dear recruitees. If you're looking for a good job, it may take some time. Also, knowing people helps a lot.
1 – Actually, I wouldn't be surprised, if they really needed someone to help them out on their projects and they didn't get a lot of attention. Why? Well, their webpage was unfinished and kinda sucked, their interview sucked also. I still don't know whether they're a startup or what. I just can't help but feel bad seeing HR and Marketing that bad. Because the guys actually might do a lot of good stuff, and their potential employees didn't get to know that.5 -
*flashback to days of windows xp*
Just finished formatting and installing xp on friend's trash pc cuz the os was compromised due to a shitload of viruses. Notice that other partitions might still be infected and i don't have an antivirus on me.
"Big boi Ill be back in an hour, just whatever you do, don't open ANY drives no matter how urgent it is. Just Don't do it or i won't be able to help you"
Come back and VIOLA this worthless trash avocado opened a drive to play a game and d pc was infected. Again. Back to square one. It almost broke my heart. Almost.
I remember that day well. I was 15yo and hopeful. That day marks d start of my hatred toward tech incompetent people.
SO FKIN
A N G E R Y
So today
College
My classmates stink of incompetence. I'm not that smart in fact i consider myself to be a noob among devs but seeing ppl that are several order of magnitudes trashier than me breaks my heart and makes me soo Fkin
A N G E R Y
Hey you cunt of a skunk, WHY can't you even compile a fkin cpp file without an IDE what the fuck is wrong with you? What do u mean ur program isn't compiling? Well it literally says there syntax error on line 15 congrats u moron u fkin spelled else as esle. Why shud I waste my time on stupid Shitty ppl like u huh?
And waddup mr shithead.No. Not gonna help you partition ur drives and install a fkin linux just cuz ur too lazy to google it urself.
And if i refuse to help cuz im working on my shit then I AM D BAD GUY? Stop bitching about me u lazy bastards get ur lazy arse off and read the fkin book. Watch a tutorial or sm shit why the fuck can't u understand YOU LITERALLY PAY TO COME HERE AND YOU AREN'T EVEN TRYING TO LEARN THE BASICS GOOD LUCK GETTING A JOB YOU WORTHLESS CUNTS.
Now now all the poison is out i can finally focus on improving myself and stop giving a fuck about them. Its hard to be calm and cool when ur surrounded by ppl like this all day. Even harder when there is almost noone that you can look upto. All this time, there's only one thing I've learnt- in a place like dis, being an asshole is better dan being polite.3 -
BOSS: Hey we should start implementing this thing in that program
ME: Yes but everything that is required for that at lower level is not yet done
BOSS: Just pretend it's done
ME: that is stupid, even if we have a general idea on how it will be done what's the point of writing code that relies on something that is not yet defined, I need to read that stuff and I don't know how we will structure that data
BOSS: Just make a guess you will fix it when the lower level stuff is done
ME: But it makes no sense! We will basically have to rewrite ground up everything
BOSS: also can you check the printer n°3 it doesn't connect to my PC
😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄6 -
Not as much of a rant as a share of my exasperation you might breathe a bit more heavily out your nose at.
My work has dealt out new laptops to devs. Such shiny, very wow. They're also famously easy to use.
.
.
.
My arse.
.
.
.
I got the laptop, transferred the necessary files and settings over, then got to work. Delivered ticket i, delivered ticket j, delivered the tests (tests first *cough*) then delivered Mr Bullet to Mr Foot.
Day 4 of using the temporary passwords support gave me I thought it was time to get with department policy and change my myriad passwords to a single one. Maybe it's not as secure but oh hell, would having a single sign-on have saved me from this.
I went for my new machine's password first because why not? It's the one I'll use the most, and I definitely won't forget it. I didn't. (I didn't.) I plopped in my memorable password, including special characters, caps, and numbers, again (carefully typed) in the second password field, then nearly confirmed. Curiosity, you bastard.
There's a key icon by the password field and I still had milk teeth left to chew any and all new features with.
Naturally I click on it. I'm greeted by a window showing me a password generating tool. So many features, options for choosing length, character types, and tons of others but thinking back on it, I only remember those two. I had a cheeky peek at the different passwords generated by it, including playing with the length slider. My curiosity sated, I closed that window and confirmed that my password was in.
You probably know where this is going. I say probably to give room for those of you like me who certifiably. did. not.
Time to test my new password.
*Smacks the power button to log off*
Time to put it in (ooer)
*Smacks in the password*
I N C O R R E C T L O G I N D E T A I L S.
Whoops, typo probably.
Do it again.
I N C O R R E C T L O G I N D E T A I L S.
No u.
Try again.
I N C O R R E C T L O G I N D E T A I L S.
Try my previous password.
Well, SUCCESS... but actually, no.
Tried the previous previous password.
T O O M A N Y A T T E M P T S
Ahh fuck, I can't believe I've done this, but going to support is for pussies. I'll put this by the rest of the fire, I can work on my old laptop.
Day starts getting late, gotta go swimming soonish. Should probably solve the problem. Cue a whole 40 minutes trying my 15 or so different passwords and their permutations because oh heck I hope it's one of them.
I talk to a colleague because by now the "days since last incident" counter has been reset.
"Hello there Ryan, would you kindly go on a voyage with me that I may retrace my steps and perhaps discover the source of this mystery?"
"A man chooses, a slave obeys. I choose... lmao ye sure m8, but I'm driving"
We went straight for the password generator, then the length slider, because who doesn't love sliding a slidey boi. Soon as we moved it my upside down frown turned back around. Down in the 'new password' and the 'confirm new password' IT WAS FUCKING AUTOCOMPLETING. The slidey boi was changing the number of asterisks in both bars as we moved it. Mystery solved, password generator arrested, shit's still fucked.
Bite the bullet, call support.
"Hi, I need my password resetting. I dun goofed"
*details tech support needs*
*It can be sorted but the tech is ages away*
Gotta be punctual for swimming, got two whole lengths to do and a sauna to sit in.
"I'm off soon, can it happen tomorrow?"
"Yeah no problem someone will be down in the morning."
Next day. Friday. 3 hours later, still no contact. Go to support room myself.
The guy really tries, goes through everything he can, gets informed that he needs a code from Derek. Where's Derek? Ah shet. He's on holiday.
There goes my weekend (looong weekend, bank holiday plus day flexi-time) where I could have shown off to my girlfriend the quality at which this laptop can play all our favourite animé, and probably get remind by her that my personal laptop has an i2350u with integrated graphics.
TODAY. (Part is unrelated, but still, ugh.)
Go to work. Ten minutes away realise I forgot my door pass.
Bollocks.
Go get a temporary pass (of shame).
Go to clock in. My fob was with my REAL pass.
What the wank.
Get to my desk, nobody notices my shame. I'm thirsty. I'll have the bottle from my drawer. But wait, what's this? No key that usually lives with my pass? Can't even unlock it?
No thanks.
Support might be able to cheer me up. Support is now for manly men too.
*Knock knock*
"Me again"
"Yeah give it here, I've got the code"
He fixes it, I reset my pass, sensibly change my other passwords.
Or I would, if the internet would work.
It connects, but no traffic? Ryan from earlier helps, we solve it after a while.
My passwords are now sorted, machine is okay, crisis resolved.
*THE END*
If you skipped the whole thing and were expecting a tl;dr, you just lost the game.
Otherwise, I absolve you of having lost the game.
Exactly at the char limit9 -
"SO culture is so mean, they downvote good questions for no reason!"
Meanwhile, most of the downvoted questions in my list:
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
https://stackoverflow.com/questions...
Translation:
- OP1: "Do my homework for me"
- OP2: "I am too lazy to google this"
- OP3: "Gimme code, here is a shitload of requirements"
- SO: "No."
- OP1/2/3/DevRant: "Oh mah gawd mah question was so gud, SO such toxic, very mean, much wow qq."
Kk.11 -
The interface for time input in outlook Web on mobile is driving me crazy!! It's not as if there was a built in control that is well supported in all modern browsers.... Right
1. You can't tap on an hour to select it
2. You can only select by scrolling
3. The scrolling is "smooth scrolling". So you have N O fucking chance to select the time slot you wanted. After too much time has passed you just give up and accept that your meeting will be at 09:57
4. In order to go up in time you constantly activate the"pull to refresh" feature of Chrome.
I'm definitely no mindless MS hater but this I cannot tolerate.6 -
List of shit my superior said and wrote in the project:
1. Prefer to write "pure" SQL statement rather than ORM to handle basic CRUD ops.
2. Mixing frontend and backend data transformation.
3. Dump validation, data transformation, DB update in one fucking single function.
4. Calculate the datetime manually instead of using library like momentjs or Carbon.
5. No version control until I requested it. Even with vcs, I still have to fucking FTP into the staging and upload file one by one because they don't use SSH (wtf you tell me you don't know basic unix command?)
6. Don't care about efficiency, just loop through thousands of record for every columns in the table. An O(n) ops becomes O(n * m)
7. 6MB for loading a fucking webpage are you kidding me?
Now you telling me you want to make it into AJAX so it'll response faster? #kthxbye2 -
Boss: Why are you trying to build the old program?
Me: Because I need to determine behavior of why old program works with data that new program does not.
Boss: Does it affect the output?
Me: No, but...
Boss: STOP! Just filter it.
Me: Okay.
Boss: Go write new fun code, not work on old shit.
Me: Thank you for saving me from myself.
In reference to:
https://devrant.com/rants/4666401/...2 -
Ever had a day that felt like you're shoveling snow from the driveway? In a blizzard? With thunderstorms & falling unicorns? Like you shovel away one m² & turn around and no footprints visible anymore? And snow built up to your neck?
Today my work day was like that.. xcept shit..shit instead of pretty & puffy snow!!
Working on things a & b, trying to not mess either one up, then comes shit x, coworker was updating production.. ofc something went wrong.. again not testing after the update..then me 'to da rescue'.. :/ hardly patch things up, so it works..in a way.. feature c still missing due to needed workarounds.. going back to a and b.. got disrupted by the same coworker who is nver listening, but always asking too much..
And when I think I finally have the b thing figured out a f-ing blocker from one of our biggest clients.. The whole system is unresponsive.. Needles to say, same guy in support for two companies (their end), so they filed the jira blocker with the wrong customer that doesn't have a SLA so no urgent emails..and then the phone calls.. and then the hell broke loose.. checking what is happening.. After frantic calls from our dba to anyone who even knows that our customer exists if they were doing sth on the db.. noup, not a single one was fucking with the prod db.. The hell! Materialised view created 10 mins ago that blocked everything..set to recreate every 10 minutes..with a query that I am guessing couldn't even select all that data in under 15.. dafaaaq?! Then we kill it..and again it is there.. We found out that customers dbas were testing something on live environment, oblivious that they mamaged to block the entire db..
FML, I'm going pokemon hunting.. :/ codename for ingress n beer..3 -
So I enventually spent 2 years working for that company with a strong b2b market. Everything from the checkouts in their 6 b2c stores to the softwares used by the 30-people sales team was dependant on the main ERP shit home-built with this monstruosity we call Windev here in France. If you don't know it just google and have some laugh : this is a proprieteray FRENCH language. Not french like made by french people, well that too, but mostly french like the fucking language is un fucking french ! Instructions are on french, everything. Hey that's my natural language okay, but for code, really ?
The php website was using the ERP database too, even all the software/hardware of the massive logistic installation they had (like a tiny Amazon depot), and of course the emails of all employees. Everything was just handled by this unique shitty and so sloooooow fucking app. When there was to many clients on the website or even too many salespeople connected to the ERP at the same time, every-fuckin-piece of the company was slowing down, and even worse facing critical bugs. So they installed a monitor in the corner of a desk constantly showing the live report page of Google analytics and they started panic attacks everytime it was counting more than 30 sessions on the website. That was at the time fun and sad to observe.
The whole shit was created 12 years ago and is since maintened locally by one unique old-fashion-microsoft dev who also have to maintain all the hardware of all the fucking 150+ people business. You know, when the keyboard of anyone is "broken" cause it's unplugged... That's his job too. The poor guy was totally overstressed on a daily basis and his tech knowledge just saddly losts themeselves somewhere in the way. He was my n+1 in a tech team of 3 people : him, a young and inexperimented so-called "php developer" who was in charge of the website (btw full of security holes I discovered and dealed with when I first arrive at the job), and myself.
The database was a hell of 100+ tables of business and marketing data with a ton of specific logic added on-the-go during years. No consistent data model or naming. No utf8. Fucked up relations that ends with queries long enough to fill books. And that's not all, all the customers passwords was just stored there uncrypted. Several very big companies and administrations were some of these clients. I was insisting on the passwords point litterally all the time, that was an easy security fix and a good start... But no, in two years of discussions on the subject I never achieved to have them focusing on other considerations than "our customers like that we can remind them their password by a simple phone call if they lost it". What. The. Fuck. WHATTHEFUCK!
Eventually I ran myself out of this nightmare. I had a few bad jobs already, and worked on shitty software already. But that one really blows my mind (and motivation for a time too). Happy it's over.1 -
Imagine asking your friends to help you rate your app on the google play store and instead of saying NO I DONT WANT TO RATE YOUR APPLICATION no... they decide to fuck with your mind.
1)
I will rate it tomorrow. (she never rated it tomorrow nor the next couple of weeks later)
2)
I will keep it in mind and rate it later :). (she never rated it later)
3)
I rated it haha (less than 30 seconds later they deleted the rating)
4)
Send me a link and I'll rate it (i send the link, they never respond or read my message again)
5)
I dont have memory on my phone :) (because 13MB of memory is a lot of storage requirements but taking 1 million selfies of up to 25GB is completely fine)
6)
I dont have memory on my phone what dont you understand :) x2 (this is the second girl)
7)
Your trying to give me a virus?? No (i got blocked multiple times)
8)
You want to hack me by making me install this application from the link that you sent me that leads to google play store? No (blocked)
9)
Rate your app? Haha i dont care about it because it doesnt bring me any benefit only the fat cocks that fill my pussy up satisfy me and not ur app haha
10)
Haha send me a link ill rate it (i send link, 8 hours later no reply or reading my message, i text her back if she had done it and im still put on ignore)
...
N)
more
----
Notice how none of these people have said the 2 letter word: "no".
All of these 10 examples are based on a true story.
All of these 10 examples are different people.
---
How hard
Can it be
To just
Write
no
---
.
---
For all of you who are about to trash talk saying i am desperately trying to beg people to rate my app:
i know all of those people for a long time. But when it comes to asking (and not forcing) someone to do you a favor for free that takes no more than 30 seconds, no one seems to have 30 seconds of their free time. Dont get me wrong, some of my friends did politely rate it and left a review, even the people who i barely knew left a review and rated it, but the people with whom I was closer by, didnt.
---
In the beginning i used to not care about this at all. Then i started falling into depression because of it. I fell then into deep depression. Then i sunk so deep that i couldn't feel any emotions anymore so i laughed as an anti depressive mechanism whenever something depressing happened. Now i cant even laugh because i have no more energy. Now i actually leave man tears
---
The only thing more valuable than people, any materialistic thing, animals, coding and even money - is time....
----
why do you waste my time
if i ask you to do something that takes 30 seconds and you dont want to do it
why cant you just say no
why do you drag me
why do you say you're going to do it when you know you wont do it
what do you gain by unnecessarily lying to someone for such a small thing?
to someone who has been a good person to you?
do you feel superior?
is your ego bigger?
----
This experience has taught me that not even a human from the same blood can be trusted.
All of your are fucked up in the head in your own style and i am guilty of it too, all of us are.
But i have never seen the human evolution went from simplicity to overengineered complexitory bULLSHit where you have to lie to someone and waste hours, days, weeks, months and sometimes years of his time just because you dont want to say a 2 letter word, no.
But when that person becomes more successful than you and achieves higher status, Theen you have those 30 seconds of free time. All of you are fucking cynics. and i am so much overly disgusted by all of this fucking bullshit....
-----
This experience has proven to me to simply focus on investing into myself and learn and improve myself and no one else. To not even bother asking even for a small kind of help, a feedback from my work because people don't have 30 seconds of their free time. That is all.12 -
Ok mate, you know what, you can FUCK. OFF.
MY H1 HAD EXTRA SPACE AT THE TOP. DEVTOOLS ELEMENT SHOWED NO DIFFERENCE.
I COMBED THROUGH THE FUCKING STYLES AND COMPUTED.
TURNS OUT IT WAS THE WHITESPACE THE FORMATTER WAS ADDING CAUSING LEADING \N
HEY CHROME DEVTOOLS.
HOW ABOUT IN ELEMENT VIEW.
YOU SHOW THE FUCKING PURE INNERHTML/INNERTEXT AND NOT JUST THE FUCKING NORMIE NON-DEVTOOLS TEXT THAT GETS RENDERED.
IM A FUCKING DEV.
THATS WHY ITS CALLED DEV TOOLS
SHOW
ME
EVERYTHING
FUCK5 -
Legacy code huh?
Well i'd say it would be when i was workng on an old java app that was apparently written by a retard.
He had used strings to represent booleans for no apparent reason. As if that wasn't bad enough he would use different strings too:
Y N true false 1 0
He used them randomly too , y and 0
N and true
😡
I sense it was done on purpose
Perhaps he knew he was leaving soon2 -
Stupid ass nimble fucker of an old friend talks to me for a whole week after a reunion saying stuff like "I'm glad we got to spent time together bro and stuff", the soul eater of poop being sets up a conversation over a week talking like he was a true friend. He only had to manage it for a week more, hell he had to resist his urge for a puny ass week and I would've considered that maybe good people existed. Well the universe along with this Pseudo-panty fuck decided it was time, they pitch me an "idea". Well after demonstrating kindly that I could technically pull (n) such ideas from my virtual butthole. The guy finally believes his idea was stupid and moves away. A minute later. SURPRISE MOTHER FUCKER! he says, telling me that he got an amazing idea along and if I could help him with some stuff. Well.. What? I jumped at this amazing opportunity. Not because of the dangling-dickina of an idea, because this was my way out of this misery fucks life. Alright should buy me some time right? He would go watch some tutorials, make a logo and call me when there's a problem. We'll in the milli fucking time that even a big bang couldn't have recurred, the bitch calls and says.. Bro, sorry for disturbing you, I need some help... [What did your mother from another son tell you she only gave birth to half of you?]
APPARENTLY, THE GUY JOINED FORCES WITH SOME INTELLIGENT MINDS AND SETUP A LEAGUE OF LIKE MINDED NECROPHILES AND I COULD HELP THIS DREAM TEAM with a name and a logo.
It started, I could sense it. I wasn't THE CHOSEN ONE. Tired, I said I'll see what I can do while attempting to block his number. A few hours later, he calls from another number with no shame and asks BRO? DID YOU. Did me what you bloody dick lubricator. Yeah I watched your mom a couple times, then I got bored when I found out it was an ad.
Unfortunately no I did not tell that, instead I used the kindest words I could pull out of my frustrated ass to tell him I won't do it cause I have better things to do.
The guy comes back a few hours later with an emotional back-story of how this is his way out of his sad ass life and saying stuff like sorry to disturb you bro, I never meant to.
Oh my gawd! Give this douche manufacturer an Oscar. Actually give him two!!
————
After this traumatic experience I often feel for such people. They have around 90 years to live. They have a free fucking brain. They have money. They have less problems.
Why can't they come up with a worthy idea with all these factors to compound the ideation process.
And why on the earth can't they make the Idea on their own. I'm completely self taught so I don't see it being a problem. I could well say that I'm more knowledgeable than a few grads out of my stupid college but I don't wanna compare myself to those stupid beings.
If you have an idea? Make it. Die for it. But never approach another being, either he eats you or you eat him.4 -
Why am I sad, depressed, demotivated, you ask?
Because I was asked to create-react-app with nodemailer, it worked well on heroku, YAYYY MEE, "
"NOTHING GOES WRONG IN DEPLOYMENT FUCK YEAH"
Little did I know that was a "demo" for the business people, My superior / manager/boss wants me to deploy on 1and1 service provider,
> Okay 1 and 1 service provider does provide Nodej, so it shouldn't be hard.
> Turns out it is a Windows hosting server IIS 10 without URL Rewrite.
> *INTERNAL SCREAMING*
I went up to him to talk about this issue and requested to let me talk to 1 and 1, and get this sorted
> But bro, if we cannot fix it, I think they also cannot fix, probably.
*INTERNAL SCREAMING AT PEAK*
I just want URL Rewrite installed on IIS10 so that I can move on to the next project.
A little background for this project
> No support from him during development.
> I personally used HD Images, because why not?
> Website seems slow because of HD Images, and now he complains about it.
You fucking (managers) want a website to be scalable and fast and yet you choose to focus on B U S I N E S S instead of support the real guy.
I'm fucking sick and tired, it took me 24 hours figure out the issue because there is nothing on 1 and 1 support/ forum/help center.
Another 24 hours to try and fix, yet no luck.
I'm gonna finally point the domain name to heroku. Fuck, I'm so fucking done6 -
#wk13
Client: Let's get our car online using the phone as the router!
Me: let's do that!
Client: Can we use NFC as the protocol?
Me: Probably, but just to automate the connection..
Client: No we should use NFC for the entire session!
Me: No!
Client: Why not? It's new, it's happening, bosses will be excited!
Me: You do know what the N in NFC stands for right!
Client: New?
Me: -_- thinking "I hope you lose your genitals to a horrible case of blue waffles.."8 -
Wow what an eloquent detailed explanation. Thank you for clarifying what the problem is. Now i know exactly what i have to do. You F U C K I N G TRASH LOWEST PILE OD GARBAGE OF HUMAN WASTE CORPORATION HOW ARE YOU NOT FUCKINGGGGGGGG BANKRUPT YOU FUCKING CANCEROUS SHITHOLE FUCKING ASSLICKERS FKKKKKINGGGGG GAYPAL FUCKKKKK YOU MOTHERFUCKERS I HOPE YOUR FAMILIES DIE IN CAR CRASHES WHOEVER IS RUNNING GAYPAL
MY FUCKING MONEY IS STUCK IN THIS FUCKING PILE OF TRASH HOLE CALLED GAYPAL AND I CANT FUCKING GET IT OUT. ITS JUST A MATTER OF TIME UNTIL GAYPAL BLOCKS MY ACCOUNT FOR NO FUCKING REASON AND STEALS MY MONEY, LEGALLY????!!!!!!!!!!! AND AGAIN23 -
The process of making my paging MIDI player has ground to a halt IMMEDIATELY:
Format 1 MIDIs.
There are 3 MIDI types: Format 0, 1, and 2.
Format 0 is two chunks long. One track chunk and the header chunk. Can be played with literally one chunk_load() call in my player.
Format 2 is (n+1) chunks long, with n being defined in the header chunk (which makes up the +1.) Can be played with one chunk_load() call per chunk in my player.
Format 1... is (n+1) chunks long, same as Format 2, but instead of being played one chunk at a time in sequence, it requires you play all chunks
AT THE SAME FUCKING TIME.
65534 maximum chunks (first track chunk is global tempo events and has no notes), maximum notes per chunk of ((FFFFFFFFh byte max chunk data area length)/3 = 1,431,655,763d)/2 (as Note On and Note Off have to be done for every note for it to be a valid note, and each eats 3 bytes) = 715,827,881 notes (truncated from 715,827,881.5), 715,827,881 * 65534 (max number of tracks with notes) = a grand total of 46,911,064,353,454 absolute maximum notes. At 6 bytes per (valid) note, disregarding track headers and footers, that's 281,466,386,120,724 bytes of memory at absolute minimum, or 255.992 TERABYTES of note data alone.
All potentially having to be played
ALL
AT
ONCE.
This wouldn't be so bad I thought at the start... I wasn't planning on supporting them.
Except...
>= 90% of MIDIs are Format 1.
Yup. The one format seemingly deliberately built not to be paged of the three is BY FAR the most common, even in cases where Format 0 would be a better fit.
Guess this is why no other player pages out MIDIs: the files are most commonly built specifically to disallow it.
Format 1 and 2 differ in the following way: Format 1's chunks all have to hit the piano keys, so to speak, all at once. Format 2's chunks hit one-by-one, even though it can have the same staggering number of notes as Format 1. One is built for short, detailed MIDIs, one for long, sparse ones.
No one seems to be making long ones.6 -
Always include import statements. Always. No excuses. I don't care if you can't be arsed to copy-n-paste an extra bit of code.
Nothing worse than trying to learn something new, copy-n-paste a sample code then your wonderfully helpful IDE asks you which of the 8 matching packages you wish to import.
When someone asks me, "where did you get that", I don't simply say, "a shop"!!
If you don't include your imports in answers then I hate you.6 -
Never have I been so satisfied as I am right now after having implemented a login and user account system with the ability to update user preferences with databases n' shit in PHP after only knowing PHP for a day.
Speaking of all that, do you guys know of any good place to make sure all my stuff is secure? No SQL injections n' the like.4 -
@Owenvii made a post over at (https://devrant.com/rants/2359774/...) and I want to write a proper response.
The biggest thing you have to look out for as a new dev is the jobs which you accept to begin with.
This isn't minimum wage no more, this is "big league", well, maybe not apple or google big league, but it's not $9.25 an hour either.
Basically you don't want to work anywhere where 1. your labor will be treated as a highly disposable commodity. 2. where the hiring manager doesn't know how to do the job themselves.
The best thing you can do is, if you're new, and just breaking through (and even if you're not), is ask them common questions and problems/solutions that crop up doing the work. If they can answer intelligently that tells you the company values competence (maybe), enough to put someone in place who will know ability from bullshit, merit from mediocrity, and who understands the process of progressing from junior dev to a more involved role.
It also means they are incentivized to hire people who know what they're doing because the training cost of new hires is lowered when they hire people who are actually competent or capable of learning.
Remember, an interview isn't just them learning about you, it's your opportunity to interview *them* and boy, you'll be making a BIG mistake if you don't.
Ideally you want them to ask you to pair program a problem. If your solution is better than theirs then they aren't sending their best to do interviews, and it tells you the company doesn't fire incompetents. The interviewers response can tell you a lot too, if they critique your work, or suggest improvements, and especially if they explain their thinking, that is an amazing response to look for, it says the company values mentorship and *actual* teamwork (not the corporate lingo-bingo 'teamwork' that we sometimes see idolized on posters like so much common dogma).
Most importantly, get them to talk about their work and their team. If they're a professional, it'll be really difficult to pry anything negative about their co-workers out of them, but if they're loose-lipped and gossipy thats a VERY bad sign, regardless of what they have to say.
Ask to take a tour and do a meet n' greet of who you will be working with. If they say no, then it's no thank you to a job offer. You want to take every opportunity to get to know everyone there, everyone you'll be working with, as much as possible--because you'll be spending a LOT of time with these people and you want to rule out any place that employs 'unfireable' toxic assholes, sociopath executives, manipulative ladder climbing narcissists, and vicious misery-loving psychopathic coworkers as quick as possible. This isn't just one warning flag to look out for, it's the essential one. You're looking for the proper *workplace culture*, not the cheesy startup phrase of "workplace culture", but the actual attitudes of the team and the interpersonal dynamics.
Life is really short, and a heart attack at 25 from dipshit coworkers and workplace grief can and will destroy your health, if not your sanity, the older you get.
Trust and believe me when I say no paycheck is too grand to deal with some useless, smarmy, manipulative, or borderline motherfuckers at work constantly. You'll regret it if you do. Don't do it. Do you fucking do it. Just don't.
Take my words to heart and be weary of easy job offers. I'm not saying don't take a good offer that lands in your lap, I AM saying do some investigating and due diligence or the consequences are on you.1 -
Just spent over 5 hours trying to figure out Microsoft’s OneDrive REST api. Basically my first time trying to do POSTs n’ stuff. I got very very close, but the server kept throwing 400 error codes. Eventually I had to give up and ask Stack Overflow. Going to bed now at 2:20am. No worse feeling then not being able to solve a problem you’re dedicated on solving. :/4
-
One developer got a code and had to add new feature so he writes new function in similar way that arleady written one. Pass the code to next guy.
Next guy: why did u write this function like that?
First guy: Coz one was arleady written that way
N: but it was written wrong
F: ...so now 2 are written wrong (no he will not fix it 😂😂)1 -
I think I did it. I did the thing I set out to do.
let p = a semiprime of simple factors ab.
let f equal the product of b and i=2...a inclusive, where i is all natural numbers from 2 to a.
let s equal some set of prime factors that are b-smooth up to and including some factor n, with no gaps in the set.
m is a the largest primorial such that f%m == 0, where
the factors of s form the base of a series of powers as part of a product x
1. where (x*p) = f
2. and (x*p)%f == a
if statement 2 is untrue, there still exists an algorithm that
3. trivially derives the exponents of s for f, where the sum of those exponents are less than a.
4. trivially generates f from p without knowing a and b.
For those who have followed what I've been trying to do for so long, and understand the math,
then you know this appears to be it.
I'm just writing and finishing the scripts for it now.
Thank god. It's just in time. Maybe we can prevent the nuclear apocalypse with the crash this will cause if it works.2 -
Let's talk about the cargo cult of N-factor authentication. It's not some magic security dust you can just sprinkle onto your app "for security purposes".
I once had a client who had a client who I did server maintenance for. Every month I was scheduled to go to the site, stick my fingerprint in their scanner, which would then display my recorded face prominently on their screens, have my name and purpose verified by the contact person, and only then would the guards let me in.
HAHA no of course not. On top of all of that, they ask for a company ID and will not let me in without one.
Because after all, I can easily forge my face, fingerprints, on-site client contact, appointment, and approval. But printing out and laminating a company ID is impossible.
---
With apologies to my "first best friend" in High School, I've forgotten which of the dozens of canonicalisations of which of your nicknames I've put in as my answer to your security question. I've also forgotten if I actually listed you as my first best friend, or my dog - which would actually be more accurate - and actually which dog, as there are times in my High School life that there were more tails than humans in the house.
I have not forgotten these out of spite, but simply because I have also forgotten which of the dozen services of this prominent bullshit computer company I actually signed up for way back in college, which itself has been more than a decade ago. That I actually apparently already signed up for the service before actually eludes me, because in fact, I have no love for their myriad products.
What I have NOT forgotten is my "end of the universe"-grade password, or email, or full legal name and the ability to demonstrate a clear line of continuity of my identity from wherever that was to now.
Because of previous security screwups in the past, this prominent bullshit company has forced its users to activate its second, third, and Nth factors. A possibly decade-old security question; a phone number long lost; whatever - before you can use your account.
Note: not "view sensitive data" about the account, like full name, billing address, and contact info. Not "change settings" of the account, such as changing account info, email, etc. Apparently all those are the lowest tier of security meant to be protected by mere "end of the universe"-grade passwords and a second factor such as email, which itself is likely to be sold by a company that also cargo cults N-factor auth. For REAL hard info, let's ask the guy who we just showed the address to "What street he lived in" and a couple others.
Explaining this to the company's support hotline is an exercise in...
"It's for your security."
"It's not. You're just locking me out of my account. I can show you a government ID corroborating all the other account info."
"But we can't, for security."
"It's not security. Get me your boss."
...
"It's for security."8 -
1 Week ago I took down the development version of an internal demo, leaving only the prod one (temporary space issue). Colleagues were told n+15 times via email, face to face, comments on tickets etc. The prod one has also been live for weeks, and again, they were told when it went up.
This just happened:
Colleague 1: practiseSafeHex can you help me, the demo doesn't seem to be working.
Me: *logs in*, *click around* ... seems fine dude. Are you using the correct URL: <prod-url>.
Colleague 1: let me try again and see.
Colleague 2: practiseSafeHex i'm with Colleague 1, were trying to use the demo, and its not working. Can you have a look, we need it.
Me: I just told him, its fine, I think you have the wrong URL <prod-url>. Can you try again.
Colleague 2: No I have the right one, can you check it.
Me: *does nothing*, yep i've had a look at it, can you try again: <prod-url>.
Colleague 2: Ah its back now, cheers.
They are with a customer now, so I won't say anything, when they get back, one of them is being castrated. -
Found a clever little algorithm for computing the product of all primes between n-m without recomputing them.
We'll start with the product of all primes up to some n.
so [2, 2*3, 2*3*5, 2*3*5*,7..] etc
prods = []
i = 0
total = 1
while i < 100:
....total = total*primes[i]
....prods.append(total)
....i = i + 1
Terrible variable names, can't be arsed at the moment.
The result is a list with the values
2, 6, 30, 210, 2310, 30030, etc.
Now assume you have two factors,with indexes i, and j, where j>i
You can calculate the gap between the two corresponding primes easily.
A gap is defined at the product of all primes that fall between the prime indexes i and j.
To calculate the gap between any two primes, merely look up their index, and then do..
prods[j-1]/prods[i]
That is the product of all primes between the J'th prime and the I'th prime
To get the product of all primes *under* i, you can simply look it up like so:
prods[i-1]
Incidentally, finding a number n that is equivalent to (prods[j+i]/prods[j-i]) for any *possible* value of j and i (regardless of whether you precomputed n from the list generator for prods, or simply iterated n=n+1 fashion), is equivalent to finding an algorithm for generating all prime numbers under n.
Hypothetically you could pick a number N out of a hat, thats a thousand digits long, and it happens to be the product of all primes underneath it.
You could then start generating primes by doing
i = 3
while i < N:
....if (N/k)%1 == 0:
........factors.append(N/k)
....i=i+1
The only caveat is that there should be more false solutions as real ones. In otherwords theres no telling if you found a solution N corresponding to some value of (prods[j+i]/prods[j-i]) without testing the primality of *all* values of k under N.13 -
First month of project we suggest that we test that Entity Framework has made reasonable DB queries because the system will need to handle a lot of records. “Not a priority in this sprint because we need features.” Devs try to get it into every sprint. The last week of the project they want us to dump in a ton of records so they can test it. The N+1 SELECT query issue is on main queries. It is so bad and slow with more records that a simple query causes the container management to auto scale the application on a single query. They can have max 8 users in the system at a time and it will take 10 seconds to do a simple page refresh.
They get on our case and we dredge up all of the correspondence where they completely ignored our advice. Fix it now! We need another sprint. Fix it free! No.11 -
yet another Microsoft bashing rant...
I'm trying to get `Visual Studio`
You use your Windows 10 VM, use Edge, use Bing and search for `Visual Studio`.
First fucking result:
A Visual Studio alternative - A powerful C & C++ IDE - CLion
-- from jetbrains.com
Like... WTF, you not even promoting your' own stuff ?
But then for when you search 'firefox' w/ bing+edge a thick fat banner: 'Promoted by Microsoft': There's no need to download a new web browser.\n MS recommends Edge for fast ...6 -
I often read articles describing developer epiphanies, where they realized, that it was not Eclipse at fault for a bad coding experience, but rather their lack of knowledge and lack of IDE optimization.
No. Just NO.
Eclipse is just horrendous garbage, nothing else. Here are some examples, where you can optimize Eclipse and your workflow all you like and still Eclipse demonstrates how bad of an IDE it is:
- There is a compilation error in the codebase. Eclipse knows this, as it marks the error. Yet in the Problems tab there is absolutely nothing. Not even after clean. Sometimes it logs errors in the problems tab, sometimes t doesn't. Why? Only the lord knows.
- Apart from the fact that navigating multiple Eclipse windows is plain laughable - why is it that to this day eclipse cannot properly manage windows on multi-desktop setups, e.g. via workspace settings? Example: Use 3 monitors, maximize Eclipse windows of one Eclipse instance on all three. Minimize. Then maximize. The windows are no longer maximized, but spread somehow over the monitors. After reboot it is even more laughable. Windows will be just randomly scrabled and stacked on top of each other. But the fact alone that you cannot navigate individual windows of one instance.. is this 2003?
- When you use a window with e.g. class code on a second monitor and your primary Eclipse window is on the first monitor, then some shortcuts won't trigger. E.g. attempting to select, then run a specific configuration via ALT+R, N, select via arrows, ALT+R won't work. Eclipse cannot deal with ALT+R, as it won't be able to focus the window, where the context menus are. One may think, this has to do with Eclipse requiring specific perspectives for specific shortcuts, as shortcuts are associated with perspectives - but no. Because the perspective for both windows is the same, namely Java. It is just that even though Shortcuts in Eclipse are perspective-bound, but they are also context-sensitive, meaning they require specific IDE inputs to work, regarldless of their perspective settings. Is that not provided, then the shortcut will do absolutely nothing and Eclipse won't tell you why.
- The fact alone that shortcut-workarounds are required to terminate launches, even though there is a button mapping this very functionality. Yes this is the only aspect in this list, where optimizing and adjusting the IDE solves the problem, because I can bind a shortcut for launch selection and then can reliably select ant trigger CTRL+F2. Despite that, how I need to first customize shortcuts and bind one that was not specified prior, just to achieve this most basic functionality - teminating a launch - is beyond me.
Eclipse is just overengineered and horrendous garbage. One could think it is being developed by people using Windows XP and a single 1024x768 desktop, as there is NO WAY these issues don't become apparent when regularily working with the IDE.9 -
Do you have any annoying you want to get rid off, but you can't because of reasons?
I do. They are 4, but for now I'll talk about the gold medal winner.
When we met about 8-9 ago, she had just come back to town due to some very bad personal experience (not her fault). Anyway, she is polite, but her major flaw is that she is pushy. REAL BAD! And she gets mad when other people (including me) try to do it on her. Another one is having calls during random inappropriate times, because she had fight #N with her boyfriend, and last but not least, she will call when needs something out of someone.
Lately, her project is finding us a job, since we're both unemployed. Any job. The sad part is when she sends me job ads for dev jobs I don't qualify, e.g. Company X is looking for a dev with Y year of experience, knowing A, B, C & D technologies. I've told her that I don't qualify for most of the dev jobs she sends me, but she insists I should send my CV anyway, cause of reasons. Also, for some reason, I should be accounted to her for all my current choices when what I would honestly say is "BUG OFF".
Her latest endeavour is getting me one of her friends (a psychologist) as a "client". Her friend wants to have a professional website with writing posts/articles as a side dish. I'm not registered as a freelancer, so everything will be done under the counter, and her friend is OK with that. I'm no web developer, but I didn't refuse because of her backlash and also that would be a positive experience for me. Now, the juicy part. She gave her my phone number without my permission and she told me straight away. Her plan was having the three of us meet, though I don't know why and I didn't want her being around. I asked her to call me immediately, which it didn't happen. After being pestered by my friend for a couple of weeks if her friend called me, she finally did it on Monday. She didn't say to me anything I didn't know, but at least I have her phone now.
What I can offer her is a website skeleton with the usabilities she's asking. What I can't offer her is graphics/banner and security. And now I have to come up with reasonable price. Teams here ask 400-600€ for a complete website the way she asks, including VAT. I'm thinking around 100€ and I don't know when I can deliver the project. I've had some experience with Ruby and Sinatra, so I'll go with that, and I'll learn CSS along the way.
Thanks for reading till the end! 😃4 -
I think this is interesting and evil at the same time.
You make a huuuuuuuge(like...YUGE level) code base available to a lot of people marketing certain things at an enterprise level and for small companies to use. You make sure people implement a lot of shit with your stack.
Then you tell them that shit will cost money from now on.
And because they might already have a large codebase they can't just change it to whatevs.
Shit is brilliant, moronic and funny at the same time.
Wondering what Gosling is thinking about this whole deal.
If anything this whole thing will make people switch to the excellent OpenJDK platform more and more. I know that starting with Android N google had already moved to the OpenJDK.
Oh well. Wonder if this would make Java developers more vailable and hard to come by cuz I still love the Java programming language and like the monies.
And know I have no soul.2 -
Yay I just got hit by the spam ban hammer, either that or these spammers are upvoting posts now 🤨11
-
Does anyone else here have coding-fatigue?
Like if someone gives me a problem (BIG or small), I can chalk out an architecture or "oh you can use this-n-this-n-this"
But if you ask me to code it, though it's easy as fuck, I dont want to and will drag it until I gush 2 coffees to force myself to do it.
You give me a junior dev who knows NOTHING and does the typing and I can guide him and make him do it all, but by myself? nah
PS: this only applies to work-code that isnt "fun" per-se. My own projects? no issues at all10 -
Am I the only developer in existence who's ever dealt with Git on Windows? What a colossal train wreck.
1. Authentication. Since there is no ssh key/git url support on Windows, you have to retype your git credentials Every Stinking Time you push. I thought Git Credential Manager was supposed to save your credentials? And this was impossible over SSH (see below). The previous developer had used an http git URL with his username and password baked in for authentication. I thought that was a horrific idea so I eventually figured out how to use a Bitbucket App password.
2. Permissions errors
In order to commit and push updates, I have to run Git for Windows as Administrator.
3. No SSH for easy git access
Here's where I confess that this is a Windows Server machine running as some form of production. Please don't slaughter me! I am not the server admin.
So, I convinced the server guy to find and install some sort of ssh service for Windows just for the off times we have to make a hot fix in production. (Don't ask, but more common than it should be.)
Sadly, this ssh access is totally useless as the git colors are all messed up, the line wrap length and window size are just weird (seems about 60 characters wide by 25 lines tall) and worse of all I can't commit/push in git via ssh because Permissions. Extremely aggravating.
4. Git on Windows hangs open and locks the index file
Finally, we manage to have Git for Windows hang quite frequently and lock the git index file, meaning that we can't do anything in git (commit, push, pull) without manually quitting these processes from task manager, then browsing to the directory and deleting the .git/index.lock file.
Putting this all together, here's the process for a pull on this production server:
Launch a VNC session to the server. Close multiple popups from different services. Ask Windows to please not "restart to install updates". Launch git for Windows. Run a git pull. If the commits to be pulled involve deleting files, the pull will fail with a permissions error. Realize you forgot to launch as Administrator. Depending on how many files were deleted in the last update, you may need to quit the application and force close the process rather than answer "n" for every "would you like to try again?" file. Relaunch Git as Administrator. Run Git pull. Finally everything works.
At this point, I'd be grateful for any tips, appreciate any sympathy, and understand any hatred. Windows Server is bad. Git on Windows is bad.10 -
Job frustrated me again today.
The shit just keeps on commiting suicide...
Cannot talk much about it, but essentially it's faulty software killing randomly one or one up to N servers running elasticsearch...
Conversation between me and a good friend:
Me: No gaming today, work todo.
Him: noooo...
Me: Yes...... Could u go buy some groceries? Household help is sick.
Him: maybe...what u need?
Me: coffee. I need frigging fucking coffee.
Him: ok. How bad is it.......
Me: empty today.
Him: will be at your house in hour. DON'T DO ANYTHING STUPID.
...
It's funny how good friends immediately sense danger and become very attentive when the lack of coffee and myself is mentioned in one sentence.5 -
During one of our 'pop-up' meetings last week.
Ralph: "The test code the developers are checking in is a mess. They don't know what they are doing."
ex.
var foo = SomeLibrary.GetFoo();
Assert.IsNotNull(foo);
Fred: "Ha ha..someone should talk to HR about our hiring practices. These people are literally driving the company backwards."
Me: "I think unit testing is complete waste of time."
- You could almost see the truck hit the wall and splatter watermelon everwhere..took Ralph and Fred a couple of seconds to respond
Fred: "Uh..unit testing is industry best practice. There is scientific evidence that prove testing reduces bugs and increases code quality"
Ralph: "Over 90% of our deployments are rolled back because of bugs. Unit testing will eliminate that."
Me: "Sorry, I disagree."
- Stepping on kittens wouldn't have gotten a worse look from Fred and Ralph
Fred: 'Pretty sure if you ask any professional developer, they'll tell you unit testing and code coverage reduces bugs.'
Me: "I'm not asking anyone else, I'm asking you. Find one failed deployment, just one, over the past 6 months that unit testing or code coverage would have prevented."
- good 3 seconds of awkward silence.
Ralph: "Well, those rollbacks are all mostly due to server mis-configurations. That's not a fair comparison."
Me: "I'm using your words. Unit tests reduces bugs and lack of good tests is the direct reason why we have so many failed deployments"
Boss: "Yea, Ralph...you and Fred kinda said that."
Fred: "No...we need to write good tests. Not this mess."
Me: "Like I said, show me one test you've written that would have prevented a rollback. Just one."
Ralph: "So, what? We do nothing?"
Me: "No, we have to stop worshiping this made up 80% code coverage idol. If not, developers are going to keep writing useless test code just to meet some percent. If we wrote device drivers or frameworks for other developers maybe, but we write CRUD apps. We execute a stored procedure or call a service. This 80% rule doesn't fit for code we write."
Fred: "If the developers took their head out of their ass.."
Me: "Hey!..uh..no, they are doing exactly what they are being told. Meet the 80% requirement, even if doesn't make sense."
Ralph: "Nobody told them to write *that* code."
Boss: "My gosh, what have you and Fred been complaining about for the past hour?"
- Ralph looks at his monitor and brilliantly changes the subject
Ralph: "Oh my f-king god...Trump said something stupid again ..."
At that point I put my headphones on went back to what I was doing. I'm pretty sure Fred and Ralph spent the rest of the day messaging back-n-forth, making fun of me or some random code I wrote 3 years ago (lots of typing and giggling). How can highly educated grown men (one has a masters in CS) get so petty and insecure?7 -
I have a random question. Does it make me a less of a developer if I say no to a embedded side project proposed by a friend?
I mean I'm all into side projects n building something cool but hardware and embedded stuff isn't something I like or feel passionate about.3 -
You know shit is going to hit the fan if the sentence "c++ is the same as java" is said because fuck all the underlying parts of software. It's all the fucking same. Oh and to write a newline in bash we don't use \n or so, we just put an empty echo in there. And fuck this #!/bin/bash line, I'm a teacher. I don't need to know how shit works to teach shit. Let's teach 'em you need stdio for printf even tho it compiles fine without on linux (wtf moment number one, asking em leaves you with "dunno..") and as someone who knows c you look at your terminal questioning everything you ever learned in your whole life. And then we let you look into the binaries with ldd and all the good stuff but we won't explain you why you can see a size difference in the compiled files even tho you included stdio in the second one, and all symbol tables show the exact same thing but dude chill, we don't know what's going on either.
Oh and btw don't use different directory names as we do in our examples. You won't find your own path, there is no tab key you can press to auto-fill shit.
But thats not everything. How about we fill a whole semester with "this is how to printf" but make you write a whole game with unity and c#. (not thaught even the slightest bit until then btw)
Now that you half-assed everything because we put you in a group full of fucks who don't even know what a compiler is but want to tell you you don't know shit and show you their non-working unfinished algorithms in some not-even-syntax-correct java...
...how about we finally go on with Algebra II: complex numbers, how they are going to fuck up your life, how we can do roots of negative numbers all of the sudden and let you do some probability shit no one ever fucking needs. BUT WHY DON'T YOU KNOW EVERYTHING ALREADY HMMMMM, IT'S YOUR SECOND LESSON, YOU WENT TO SCHOOL PLS BE A MATH PRO ASAP CUS YOU NEED IT SO MUCH BUT YOU DON'T NEED TO KNOW PROPER SYNTAX, HOW MEMORY MANAGEMENT WORKS, WHAT A REFERENCE IS AND PLS FINALLY FORGET THE WORD "ALLOCATION" IT DOESN'T PLAY A SINGLE ROLE YOU ARE STUDYING SOFTWARE DEVELOPMENT WHY ARE YOU SO BAD AT ECONOMICS IT MAKES NO SENSE I MEAN YOU HAD A WHOLE SEMESTER OF HOW TO GREET SOMEONE IN ENGLISH, MATHS > ECONOMICS > ENGLISH > FUCKING SHIT > CODING SKILL THATS HOW THE PRIORITIES WORK FOR US WHY DON'T YOU GET IT IT MAKES SO MUCH SENSE BRAH4 -
Major rant incoming. Before I start ranting I’ll say that I totally respect my professor’s past. He worked on some really impressive major developments for the military and other companies a long time ago. Was made an engineering fellow at Raytheon for some GPS software he developed (or lead a team on I should say) and ended up dropping fellowship because of his health. But I’m FUCKING sick of it. So fucking fed up with my professor. This class is “Data Structures in C++” and keep in mind that I’ve been programming in C++ for almost 10 years with it being my primary and first language in OOP.
Throughout this entire class, the teacher has been making huge mistakes by saying things that aren’t right or just simply not knowing how to teach such as telling the students that “int& varOne = varTwo” was an address getting put into a variable until I corrected him about it being a reference and he proceeded to skip all reference slides or steps through sorting algorithms that are wrong or he doesn’t remember how to do it and saying, “So then it gets to this part and....it uh....does that and gets this value and so that’s how you do it *doesnt do rest of it and skips slide*”.
First presentation I did on doubly linked lists. I decided to go above and beyond and write my own code that had a menu to add, insert at position n, delete, print, etc for a doubly linked list. When I go to pull out my code he tells me that I didn’t say anything about a doubly linked list’s tail and head nodes each have a pointer pointing to null and so I was getting docked points. I told him I did actually say it and another classmate spoke up and said “Ya” and he cuts off saying, “No you didn’t”. To which I started to say I’ll show you my slides but he cut me off mid sentence and just yelled, “Nope!”. He docked me 20% and gave me a B- because of that. I had 1 slide where I had a bullet point mentioning it and 2 slides with visual models showing that the head node’s previousNode* and the tail node’s nextNode* pointed to null.
Another classmate that’s never coded in his life had screenshots of code from online (literally all his slides were a screenshot of the next part of code until it finished implementing a binary search tree) and literally read the code line by line, “class node, node pointer node, ......for int i equals zero, i is less than tree dot length er length of tree that is, um i plus plus.....”
Professor yelled at him like 4 times about reading directly from slide and not saying what the code does and he would reply with, “Yes sir” and then continue to read again because there was nothing else he could do.
Ya, he got the same grade as me.
Today I had my second and final presentation. I did it on “Separate Chaining”, a hashing collision resolution. This time I said fuck writing my own code, he didn’t give two shits last time when everyone else just screenshot online example code but me so I decided I’d focus on the PowerPoint and amp it up with animations on models I made with the shapes in PowerPoint. Get 2 slides in and he goes,
Prof: Stop! Go back one slide.
Me: Uh alright, *click*
(Slide showing the 3 collision resolutions: Open Addressing, Separate Chaining, and Re-Hashing)
Prof: Aren’t you forgetting something?
Me: ....Not that I know of sir
Prof: I see Open addressing, also called Open Hashing, but where’s Closed Hashing?
Me: I believe that’s what Seperate Chaining is sir
Prof: No
Me: I’m pretty sure it is
*Class nods and agrees*
Prof: Oh never mind, I didn’t see it right
Get another 4 slides in before:
Prof: Stop! Go back one slide
Me: .......alright *click*
(Professor loses train of thought? Doesn’t mention anything about this slide)
Prof: I er....um, I don’t understand why you decided not to mention the other, er, other types of Chaining. I thought you were going to back on that slide with all the squares (model of hash table with animations moving things around to visualize inserting a value with a collision that I spent hours on) but you didn’t.
(I haven’t finished the second half of my presentation yet you fuck! What if I had it there?)
Me: I never saw anything on any other types of Chaining professor
Prof: I’m pretty sure there’s one that I think combines Open Addressing and Separate Chaining
Me: That doesn’t make sense sir. *explanation why* I did a lot of research and I never saw any other.
Prof: There are, you should have included them.
(I check after I finish. Google comes up with no other Chaining collision resolution)
He docks me 20% and gives me a B- AGAIN! Both presentation grades have feedback saying, “MrCush, I won’t go into the issues we discussed but overall not bad”.
Thanks for being so specific on a whole 20% deduction prick! Oh wait, is it because you don’t have specifics?
Bye 3.8 GPA
Is it me or does he have something against me?7 -
** this means words are muted **
Friday:
I send a mail the client a Google doc with elaborate details about evaluation of an Android tablet from a Chinese manufacturer.
Monday:
The client is upset, he says "You say there is no GPS chip on the tablet while the manufacturer says otherwise"
Me- "I have clearly mentioned that it has a GPS chip"
Client- Opens the Google doc, points to a sentence. Looks at me like I did something horrible.
Me - **This guys is either word blind or something else is wrong with him, the line reads 'GPS chip available'**
Me- "Look, it says 'GPS chip available'.
Client- **Blinks n blinks again** "Alright, but why did you share a Google document, why not PDF, docx"
Me-**Politely** "You can download the document in any format, look I will show you..."
Client- "It should have been in the mail itself ideally"
Me- **WTH** "We normally maintain a document for such things to keep everything organised, but if you want I will put everything in mail itself"
Client- "Hmm.. do both from next time"
Me- "Alright" **BS**
Client- "Why is the new feature taking so much time"
Me- "As planned earlier, we going to deliver it tomorrow"
Client- "Why not today??" **Gives a strange look.**
Me thinking - **Enough**
Me- "See, I am trying to integrate a smarten with a socket connection, reading it's data via exposed APIs that are hardly documented, we need faster performance so I need to implement caching, multi threading, offline handling, multiple processes to avoid memory fluctuations, sync adapter to sync data...."
Client- "Ok ok ok, it's fine if you give working build tomorrow"
Me- "Ok, fine"
#limit1 -
// O(n²) complexity
for(x;y;z){
for(a;b;c){
}
}
Dev's argument: "We use this everywhere, as long as it gets the job done! Time is money!" How ironic..
So you would rather make your processing speed suffer for the sake of saving time? No, clean code doesn't matter. No, we should not waste time spending even a mere microsecond thinking about writing better code or at least consider it. No, we should just vomit out bad code at top speed. Good idea, guys. Idiots everywhere..6 -
So while exploring some new ideas, I decided to figure out if I could use variables in the known set to determine the bounds of variables in the unknown set.
The variables in question are algebraic identities derived from the semiprimes, so you already know where this is going.
The existing known set is 1194 identities.
And there are, if I recall, roughly two dozen unknowns.
Many knowns have the unknowns as their factors. The d4 product set for example is composed of variables d4a, d4u, d4z, d4z9, d4z4, d4alpha, d4theta, d4omega, etc.
The component variables themselves are unknown, just their products are known. Anyway.
What I've found interesting is if you know the minimum of some of these subsets, for example d4z is smallest out of the d4's for some semiprimes, then you know the upperbound of both the component variables d4 and z.
Unless of course either of them is < 1.
So the order of these variables, based on value, changes depending on the properties of the semiprime, which I won't get into. Most of the time the order change is minor, but for some variables they can vary a lot between semiprimes, rapidly shifting their rank in the known set. This makes it hard to do anything with them.
And what I found myself asking, over and over again, was if there was a way to lock them down? Think of it like a giant switch board, where flipping one switch lights up N number of others, apparently at random. But flipping some other switch completely alters how that first switch works and what lights it seemingly interacts with. And you have a board of them thats 1194^2 in total. So what do you do?
I'd had a similar notion a while back, where I would measure relative value in the known set, among a bunch of variables, assign a letter if the conditions were present, and generate a string, called a "haplotype."
It was hap hazard and I wrote a lot of code to do filtering, sorting, and set manipulation to find sets of elements in common, unique elements, etc. But the 'type' strings, a jumble of random letters, were only useful say, forty percent of the time. For example if a semiprime had a particular type starting with a certain series of letters, 40% of the time a certain known variable was guaranteed to be above a certain variable from the unknown set...40%~ of the time.
It was a lost cause it seemed.
But I returned to the idea recently and revamped the entire notion.
Instead what I would approach it from a more complete angle.
I'd take two known variables J and K, one would be called the indicator, and the other would be the 'target'.
Two other variables would be the 'component' variables (an element taken from the unknown set), and the constraint variable (could be from either the known or unknown set).
The idea was that relationships between the KNOWN variables (an indicator and a target variable) could be used to indicate the rank relationship between the unknown component variable and the constraint variable.
You'd think this wouldn't work either, but my intuition was there were so many seemingly 'random' rank changes of variables in the known set for any two semiprimes, that 1. no two semiprimes ever shared the same order for every variable, and 2. the order of the known variables had to be leaking information about the relationships of the unknown variables.
It turns out my intuition was correct.
Imagine you are picking a lock, and by knowing the order and position of the first two pins, you are able to deduce the relative position of two pins further back that you can't reach because of the locks security features. It doesn't let you unlock the lock directly, but by knowing this, if you can get past the lock's security features, you have a chance of using information about the third pin to get a better, if incomplete, understanding about the boundary position of the last pin.
I would initiate a big scoring list, one for each known element or identity. And then I would check it in tandem like so:
if component > constraint and indicator > target:
indicator[j]+= 1
This is a simplication, but the idea was to score ALL such combination of relationship, whether the indicator was greater than the target at the same time a component was greater than a constraint, or the opposite.
This worked out to four if checks and four separate score lists.
And by subtracting one scorelist from another, I could check for variables that were a bad fit: they'd have equal probability of scoring for example, where they were greater than the target one time, and then lesser than it for another semiprime.
So for any given relationship, greater or lesser between any unknown variable and constraint variable, I could find any indicator variable and target variable whose relationship strongly correlated to the unknown's.18 -
Do you all look for code complexity O(n) while coding? Or you make sure that your code runs and never look back what's happening ?
Because as per code review no one looks for code complexity and that's so sad11 -
So at work, there is this class/model thing that's for storing translated strings. It also supports n-level nested macros, cascading lookup (e->d->c->b->a->blank), and I've added transforms too. The code is a bloody mess and very inefficient (legendary dev's code), but it's useful.
You call methods with a symbol representing one of the strings, and it does... whatever you ask, like return text, booleans, expand macros and submacros, pass in data to interpolate, etc.
But I just learned something today.
Its `.html` method... doesn't support html. In fact, calling it strips out all html, takes whatever is left, and attempts to convert that back into html. Because that makes so much sense. So, if you have an html string? Don't call html on it.
Also, macros use the same <angle brackets> as html tags, and macro expansion eats unknown macros, so... you can't mix html and macros, meaning you cannot inject values into your markup. That's a freaking joy to work around. (You end up writing a parser every time.)
So no, if you have an html string, you need to get the raw data out and handle it yourself. Don't reach for that shiny .html method; it'll just ruin your day.
It's the little things that make my day so terribly long.rant it really isn't so bad principle of most surprise poor design but it could be ever so much better8 -
Why is there no tool autoinstalling missing programs using your favourite pac(kage)man(ager)?
Like so,
$ program
>> couldn't find “program”. Should I install it? (Y/n)
If there is one... Shame on me *rings bell*
Also, yay! First Post!14 -
Few years ago when I was new to command line....
I was in love with it....
I decided to format my pd via cmd...
It was a very simple task though i was soo happy and I did it....
Closed cmd....
Went to thispc...
And my pd was full as it was before....
I was like lets do it again.....
I opened cmd....
Got the list of volumes n was stunned.....
Until now i had no idea that i had formatted some other volume....
I opened thispc and saw a 700gb volume which was red earlier turned white.....
OMFG....
I cant explain what happened further....12 -
// Posting this as a standalone rant because I've written the best piece of code ever.
// Inspired by https://devrant.com/rants/1493042/... , here's one way to get to number 50. Written in C# (no, not Do diesis).
int x = 1;
int y = x + 1;
int z = y + 1;
int a = z + 1;
int b = a + 1;
int c = b + 1;
int d = c + 1;
int e = d + 1;
int f = e + 1;
int g = f + 1;
int h = g + 1;
int i = h + 1;
int j = i + 1;
int k = j + 1;
int l = k + 1;
int m = l + 1;
int n = m + 1;
int o = n + 1;
int p = o + 1;
int q = p + 1;
int r = q + 1;
int s = r + 1;
int t = s + 1;
int u = t + 1;
int v = u + 1;
int w = v * 2 * -1; // -50
w = w + (w * -1 / 2); // -25
w = w * -1 * 2; // 50
int addition = x+y+z+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v;
addition = addition * 2;
if (addition == w)
{
int result = addition + w - addition;
Console.Writeline(result * 1 / 1 + 1 - 1);
}
else
{
char[] error = new char[22];
error[0] = 'O';
error[1] = 'h';
error[2] = ' ';
error[3] = 's';
error[4] = 'h';
error[5] = 'i';
error[6] = 't';
error[7] = ' ';
error[8] = 'u';
error[9] = ' ';
error[10] = 'f';
error[11] = 'u';
error[12] = 'c';
error[13] = 'k';
error[14] = 'e';
error[15] = 'd';
error[16] = ' ';
error[17] = 'u';
error[18] = 'p';
error[19] = ' ';
error[20] = 'm';
error[21] = '8';
string error2 = "";
for (int error3 = 0; error3 < error.Length; error3++;)
{
error2 += error[error3];
}
Console.Writeline(error2);
}5 -
If you want a really obtuse method for inverting numbers in python, here you go:
z0 = Decimal('78.56341431805592768684300246940000494686645802145994376216014333')
z1 = Decimal('1766612.615660056866253324637112675800498420645531491441947721134')
z2 = Decimal('1766891.018224248707391295083927186110075710886547799081463050088')
z3 = Decimal('15658548.51274600264911287951105338985790517559073271799766738859')
z4 = Decimal('1230189034.426242656418217548674280136397763003160663651728899428')
z5 = Decimal('1.000157591178577552497828947885508869785153918881552213564806501')
((((z0/(z1/(z2/(n)))))*(z3))/z4)/z5
From what I can see, it works for any value of n.
I have no clue why it works.
Also have a function to generate the z values for any n input.
Shitpost studios.
Bringing you QUALITY math posts since 2019!
"we shitpost because we care."21 -
Every time I see the N+1 query problem in people's implementation, I feel like crying. Especially when it's dealing with large data sets of something like 1000 records.2
-
I spent hours trying to support \n, \r and \r\n in my algorithms to convert between utf16 line/col and utf8 absolute indices to comply with the LSP, before realizing that
- Orchid itself doesn't support \r
- There is no established user base
so I'm in the best position to reject all files that contain \r and offer to convert them instead.10 -
I need some opinions on Rx and MVVM. Its being done in iOS, but I think its fairly general programming question.
The small team I joined is using Rx (I've never used it before) and I'm trying to learn and catch up to them. Looking at the code, I think there are thousands of lines of over-engineered code that could be done so much simpler. From a non Rx point of view, I think we are following some bad practises, from an Rx point of view the guys are saying this is what Rx needs to be. I'm trying to discuss this with them, but they are shooting me down saying I just don't know enough about Rx. Maybe thats true, maybe I just don't get it, but they aren't exactly explaining it, just telling me i'm wrong and they are right. I need another set of eyes on this to see if it is just me.
One of the main points is that there are many places where network errors shouldn't complete the observable (i.e. can't call onError), I understand this concept. I read a response from the RxSwift maintainers that said the way to handle this was to wrap your response type in a class with a generic type (e.g. Result<T>) that contained a property to denote a success or error and maybe an error message. This way errors (such as incorrect password) won't cause it to complete, everything goes through onNext and users can retry / go again, makes sense.
The guys are saying that this breaks Rx principals and MVVM. Instead we need separate observables for every type of response. So we have viewModels that contain:
- isSuccessObservable
- isErrorObservable
- isLoadingObservable
- isRefreshingObservable
- etc. (some have close to 10 different observables)
To me this is overkill to have so many streams all frequently only ever delivering 1 or none messages. I would have aimed for 1 observable, that returns an object holding properties for each of these things, and sending several messages. Is that not what streams are suppose to do? Then the local code can use filters as part of the subscriptions. The major benefit of having 1 is that it becomes easier to make it generic and abstract away, which brings us to point 2.
Currently, due to each viewModel having different numbers of observables and methods of different names (but effectively doing the same thing) the guys create a new custom protocol (equivalent of a java interface) for each viewModel with its N observables. The viewModel creates local variables of PublishSubject, BehavorSubject, Driver etc. Then it implements the procotol / interface and casts all the local's back as observables. e.g.
protocol CarViewModelType {
isSuccessObservable: Observable<Car>
isErrorObservable: Observable<String>
isLoadingObservable: Observable<Void>
}
class CarViewModel {
isSuccessSubject: PublishSubject<Car>
isErrorSubject: PublishSubject<String>
isLoadingSubject: PublishSubject<Void>
// other stuff
}
extension CarViewModel: CarViewModelType {
isSuccessObservable {
return isSuccessSubject.asObservable()
}
isErrorObservable {
return isSuccessSubject.asObservable()
}
isLoadingObservable {
return isSuccessSubject.asObservable()
}
}
This has to be created by hand, for every viewModel, of which there is one for every screen and there is 40+ screens. This same structure is copy / pasted into every viewModel. As mentioned above I would like to make this all generic. Have a generic protocol for all viewModels to define 1 Observable, 1 local variable of generic type and handle the cast back automatically. The method to trigger all the business logic could also have its name standardised ("load", "fetch", "processData" etc.). Maybe we could also figure out a few other bits too. This would remove a lot of code, as well as making the code more readable (less messy), and make unit testing much easier. While it could never do everything automatically we could test the basic responses of each viewModel and have at least some testing done by default and not have everything be very boilerplate-y and copy / paste nature.
The guys think that subscribing to isSuccess and / or isError is perfect Rx + MVVM. But for some reason subscribing to status.filter(success) or status.filter(!success) is a sin of unimaginable proportions. Also the idea of multiple buttons and events all "reacting" to the same method named e.g. "load", is bad Rx (why if they all need to do the same thing?)
My thoughts on this are:
- To me its indentical in meaning and architecture, one way is just significantly less code.
- Lets say I agree its not textbook, is it not worth bending the rules to reduce code.
- We are already breaking the rules of MVVM to introduce coordinators (which I hate, as they are adding even more unnecessary code), so why is breaking it to reduce code such a no no.
Any thoughts on the above? Am I way off the mark or is this classic Rx?16 -
Maybe I'm severely misunderstanding set theory. Hear me out though.
Let f equal the set of all fibonacci numbers, and p equal the set of all primes.
If the density of primes is a function of the number of *multiples* of all primes under n,
then the *number of primes* or density should shrink as n increases, at an ever increasing rate
greater than the density of the number of fibonacci numbers below n.
That means as n grows, the relative density of f to p should grow as well.
At sufficiently large n, the density of p is zero (prime number theorem), not just absolutely, but relative to f as well. The density of f is therefore an upper limit of the density of p.
And the density of p given some sufficiently large n, is therefore also a lower limit on the density of f.
And that therefore the density of p must also be the upper limit on the density of the subset of primes that are Fibonacci numbers.
WHICH MEANS at sufficiently large values of n, there are either NO Fibonacci primes (the functions diverge), and therefore the set of Fibonacci primes is *finite*, OR the density of primes given n in the prime number theorem
*never* truly reaches zero, meaning the primes are in fact infinite.
Proving the Fibonacci primes are infinite, therefore would prove that the prime number line ends (fat chance). While proving the primes are infinite, proves the Fibonacci primes are finite in quantity.
And because the number of primes has been proven time and again to be infinite, as far back as 300BC,the Fibonacci primes MUST be finite.
QED.
If I've made a mistake, I'd like to know.11 -
How do you explain to your client that no, you cannot have a perfect solution, because the algorithm is O(2^n)?
I mean, without requiring him to get a degree in CS. Also without making him think that you can't build efficient code because you're dumb. Or that the hardware is slow.3 -
So I'm finally doing the job I was hired to do 2 years ago, with the promise of working 1.5 years ago, and scheduled to work 1 year ago as the project slips about a 1.25 years.
The project is on it's 3.5th year of a 3 year plan and based on the architecture of the project, the project architect started a degree in software architecture 4 years ago. In Latin. When his first language was Japanese and his second was Indian English while this was a US company. And his entire degree was in Lisp, PHP, and html, this project is in C#, and his professional background is in Fortran.
This is a man who is no longer on the project, not allowed to contribute or talk to us about the project, and what little documentation he left us is in Swahili translated from Korean via Google translate from the second year Korean language major exchange student from Russia who got really into meth and Telenovelas.
It is every version of MV* without the M and with every definition of * including some he made up and some that have only been proven to exist via machine learning algorithm written in SQL statements.
This project represents an implementation of the presentation tier of an n-tier application, yet attempts to reimplement the other n-1 tiers in html5 and the dreams of children.
The new lead is a former engineer that couldn't begin coding until he figured out how to map all of his variables to his former cars and girlfriends inclusively and learned his management skills from the big book of micro managers and that one time everyone else in the office was sick but the intern. Who now has a girlfriend whom he works 200 feet from so he isn't 100% thinking with his largest head. At least from observation.
Yet, I still can't bring myself to go be with the whales/become an accountant. -
My keybo§rd is broken. I tested it on two different m§chines, ch§nged keybo§rd l§yout, tried to cle§n it up, but no luck. Left side of 2wsx keys is completly useless. I'm so dis§ppointed@@@ ( @ used to be excl§m§tion m§rk :( )3
-
!dev
1. It's one of those few times in life that listening to Lq's Numb doesn't make me feel less anxious. Or Somewhere I Belong. Either way, anxiety levels are on all time high.
2. I have completely lost appetite. Usually at this point in time I'd go to doctor and ask for Xanax or something similar, to chill for a few days. But covid. I ain't going to any clinic, plus, ain't nobody got time for that.
3. On top of everything, I am also PMSing. The lack of energy, times n. (n>10)
4. Struggling to get out of bed for hours is now a reality.
5. I'm glad ("glad" is exaggeration tho) this will pass in a few weeks. I am hanging on to that hope and experience tells me it will pass. But my feelings are like "nah, we doomed. Let's just run away. Or just sleep until it all passes or we die of starvation."
6. My brain must work for the next few days. If I have to push it by drowning it in sugar, I will. But I'm also obese rn. Well, I guess it's "Hello diabetes!".
7. My hands and feet are cold. Like, freezing cold. Meanwhile, the rest of me is sweating. This sucks. Ngl.
8. I feel like I'm fighting a losing battle. Like, those last stabby stabs moments in a battle where you know you're gonna fall down soon. I know this feeling of doom and gloom is PMS related, but it's there. I have no solution for that aside from nicotine and sugar.
9. I can't even cry. Which is sad.
... Do you see what's happening there? That's the loop I'm in.5 -
I don't think it could be more .net core than this: Several parts of the application ended up failing because of a too long URL. For example we used a List to store selected items in an array and they each looked like this:
&model.selectedIds[n]=true
The server side made more sense but we were running late with the project so we just went with it and hoped no one would use this feature. -
Ok I love JavaScript but this is enough.
I know selectors like these shouldn't exist, but double escaping? Hell no! I didn't even know it was a thing! I wonder what's the highest level of n escaping there is out there.6 -
What is it about long winded articles for a two second one click solution?
A quick search to find out how to change the control panel to classic view in windows 7. (because I forgot and the windows Operating system is no longer intuitive and Dev-friendly).
Search engine: (Insert hundreds of articles here!)
Solution: Click on large Icons where it says "View by".
Search engine: (Enjoy sifting through this pile of results written by thousands of gas-bags, you looser!).
Rocking back 'n forward sitting in the corner of the room holding my legs against my chest: "Shut up, I forgot okay!"
Why would it not just Say "Classic view"?1 -
dev vs QA rant (n + 1)
So our QA is done by China team so naturally time difference is quite irritating,
I cannot change code
I cannot debug for issue
So today I fix a critical issue and before pushing it my seniors send the to the QA
> QA unavailable
> I wait for QA because nobody notifies if the code is tested and I can work ahead
> I get review that my issue fix generated another issue (page gets redirected)
> I'm angry and astonished, I check on same link, same circumstances and no such issue is found
> My seniors say read the issue properly and I do it, no positive response when I contradict the QA
> QA leaves for home on Friday and critical issue still remains in live
I cannot believe the laziness of QA, I mean it's their loss at the end of the day.
> top of that I waited 2 hours for QA to check the issue2 -
When the monthly scrum retrospective reaches the 90 minute mark...
You know when people are being stress tested and they break by getting up, run around screaming and ultimately knock themselves unconscious by running into a wall?
That. I felt like doing that.
I swear someone activates some sort of gravity well when these meetings begin because time beings to stretch on and o........n....... while they meetings happen.
I began to list things I think I'd rather be doing than be in that meeting.
1) Tax returns.
2) Prostate exam (not old enough to need one yet but at least I'd be out the meeting).
3) Visiting the dentist.
4) Assembling IKEA furniture.
5) Watching soccer at least they have the decency to give you a break in the middle and I find sports as engaging as a dog turd on the sidewalk.
So bored was I that I began to notice notches and holes in the ceiling tiles and when I remarked upon them others became engrossed in them and began to speculate upon their origins.
I don't know who a speaker is, what department they are from, what product they're working on or what's so important about the algorithm they're working on. There is no context, no explanation and half way through a show and tell I had to check we were still in a show and tell.
I was bored shitless. I actually felt physical pain from boredom, I've not felt that way since I was a child.
I really, really hate that scrum is implemented in this way.
It left me with only half an hour of coding time left and really it sapped my energy and motivation to the point where I just went home early.
Excuse my language, but:
Fucking bloody cunting waste of time, I've had more productive moments in the restroom. They need to piss off or committed seppuku, ideally both. Dante got it wrong the seventh level of hell is this. I'm usually a very calm and balanced individual but yesterday, yesterday I just... Fuck! Argh! Fuck you meeting, fuck you.
If you are the type that schedules meetings like this:
May a thousand Jabberwockies plague your nightmares and be it that the next seventy seven times you lay with a human shall ye experience bitter failure! I hope Cthulhu himself visits his "enlightenment" upon you and you fear sleep henceforth.
I'm bringing a rubix cube or juggling balls into the next meeting so that I can say at least I learned something and it wasn't time wasted.3 -
Yeeah it's official, the N key in my HP keyboard just fucked up
What the solution?
Ok I'll use all the #Widgets that has no N in it's definition in my code
Just fuck that sit.7 -
So I promised a post after work last night, discussing the new factorization technique.
As before, I use a method called decon() that takes any number, like 697 for example, and first breaks it down into the respective digits and magnitudes.
697 becomes -> 600, 90, and 7.
It then factors *those* to give a decomposition matrix that looks something like the following when printed out:
offset: 3, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('7'), Decimal('1')]]
Each entry is a pair of numbers representing a prime base and an exponent.
Now the idea was that, in theory, at each magnitude of a product, we could actually search through the *range* of the product of these exponents.
So for offset three (600) here, we're looking at
2^3 * 3 ^ 1 * 5 ^ 2.
But actually we're searching
2^3 * 3 ^ 1 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
2^3 * 3 ^ 1 * 5 ^ 0
2^3 * 3 ^ 0 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
etc..
On the basis that whatever it generates may be the digits of another magnitude in one of our target product's factors.
And the first optimization or filter we can apply is to notice that assuming our factors pq=n,
and where p <= q, it will always be more efficient to search for the digits of p (because its under n^0.5 or the square root), than the larger factor q.
So by implication we can filter out any product of this exponent search that is greater than the square root of n.
Writing this code was a bit of a headache because I had to deal with potentially very large lists of bases and exponents, so I couldn't just use loops within loops.
Instead I resorted to writing a three state state machine that 'counted down' across these exponents, and it just works.
And now, in practice this doesn't immediately give us anything useful. And I had hoped this would at least give us *upperbounds* to start our search from, for any particular digit of a product's factors at a given magnitude. So the 12 digit (or pick a magnitude out of a hat) of an example product might give us an upperbound on the 2's exponent for that same digit in our lowest factor q of n.
It didn't work out that way. Sometimes there would be 'inversions', where the exponent of a factor on a magnitude of n, would be *lower* than the exponent of that factor on the same digit of q.
But when I started tearing into examples and generating test data I started to see certain patterns emerge, and immediately I found a way to not just pin down these inversions, but get *tight* bounds on the 2's exponents in the corresponding digit for our product's factor itself. It was like the complications I initially saw actually became a means to *tighten* the bounds.
For example, for one particular semiprime n=pq, this was some of the data:
n - offset: 6, exp: [[Decimal('2'), Decimal('5')], [Decimal('5'), Decimal('5')]]
q - offset: 6, exp: [[Decimal('2'), Decimal('6')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('5')]]
It's almost like the base 3 exponent in [n:7] gives away the presence of 3^1 in [q:6], even
though theres no subsequent presence of 3^n in [n:6] itself.
And I found this rule held each time I tested it.
Other rules, not so much, and other rules still would fail in the presence of yet other rules, almost like a giant switchboard.
I immediately realized the implications: rules had precedence, acted predictable when in isolated instances, and changed in specific instances in combination with other rules.
This was ripe for a decision tree generated through random search.
Another product n=pq, with mroe data
q(4)
offset: 4, exp: [[Decimal('2'), Decimal('4')], [Decimal('5'), Decimal('3')]]
n(4)
offset: 4, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('3')]]
Suggesting that a nontrivial base 3 exponent (**2 rather than **1) suggests the exponent on the 2 in the relevant
digit of [n], is one less than the same base 2 digital exponent at the same digit on [q]
And so it was clear from the get go that this approach held promise.
From there I discovered a bunch more rules and made some observations.
The bulk of the patterns, regardless of how large the product grows, should be present in the smaller bases (some bound of primes, say the first dozen), because the bulk of exponents for the factorization of any magnitude of a number, overwhelming lean heavily in the lower prime bases.
It was if the entire vulnerability was hiding in plain sight for four+ years, and we'd been approaching factorization all wrong from the beginning, by trying to factor a number, and all its digits at all its magnitudes, all at once, when like addition or multiplication, factorization could be done piecemeal if we knew the patterns to look for.7 -
I have a buying dilemma.
Do I buy a new phone, laptop, or desktop?
Phone: I just want a better camera so I don't have to spend time photoshopping the RAWS manually. Everything else is fine, it's rooted and had no bloatware, have external powerpak
laptop/desktop: my current laptop is usable but it someone had boot error. Feels like 1 day it will just die, dunno when.
Desktop n laptop are same price and have 2TB HD, 16GB RAM, i7
Laptop also has 256SSD.
Desktop I think has better GFX and was thinking I could just swap my laptops current SSD (also 256GB) and put it in as the primary, tho not sure how.
I usually go by don't buy this stuff until u need it (Moore's Law) but should I buy for just the sake of convenience/upgrade?7 -
Have you ever thought to send a security code to the email the user put in the sign up form just to say him later "the password must contains at least 8 characters, etc." and ask him to fill the form again from scratch?
Who is so dumb to put the input check in this order? Honeywell.
- The email is correct?
- Ok, send a code and ask to confirm it
- The password meets the requirements?
- No, ask to confirm the email again just for fun.
I'll just ignore the waste of server resources to send N * Number of users emails for no reason.2 -
First post here...Here's a funny thing that happened to me yesterday. I'm with my friend, we're both taking a break from school, and he comes up to me and mentions how he wants to make 3d games. Conversation goes a bit like this:
Friend: "Hey, I found this 3d model website. I'm thinking of using it for my 3d game."
He was already making a 2d game at this point, so I assumed he just gave up on it.
Me: "Well...do you have Unity?"
Friend: "Yes."
Me: "Well if you're going to make a game on there [stuff about c#]"
Friend insists he can easily make this. I tell him it would take years on end to learn C# and make a good game with it. And then he says something I never wanted to hear.
Friend: "Actually, no. You ever heard of Dani? D-A-N-I? He made a game in 2 weeks. He's actually making a new game and you should wishlist it on steam blah blah yatta yatta."
This guy believed someone else who was previously a game developer (if i recall) learned an entire programming language and engine in two weeks. He could've, but to me that seems seriously outrageous to someone who doesn't even know a smidge of programming.
He then advertised his YouTube channel and his games and brought down my arguments like "he probably had previous knowledge" completely. This guy doesn't even know where to start with C#. Really, all I could do after that was mention three.js (oh wow another JavaScript library, exciting), show him a game Google made with said library, and then said good luck...
Worst thing is, he uses Scratch to make games. And he genuinely thinks that is a real programming language.
That's it for my first post, thank you very much for reading :)6 -
I was reading a post over at https://devrant.com/rants/2262140/...
..and on the topic of using 3d printers to print a 3d printer, I wrote that has gotta be some sort of measure or ratio of "manufacturing automation."
Sort of like moores law or something.
"How many tools and materials does it now take to replicate THIS ONE TOOL."
Tools & Materials = 1/N
When we get to 1/N = 1.0, anyone can manufacture anything (commonly available) if they have the raw, or standardized materials, even other tools, up to and including the tool they are using to do the manufacturing itself.
I mean an apocalypse could happen, and as long as just ONE of these 'universal tool making tools' (lets call it an omega machine) exists, we can have *all* the tools and manufacturing necessary to rebuild civilization.
A universal manufacturing 'multitool' means, the only hard requirements for restarting civilization no longer rely on specialized knowledge as far as tools go:
- still need arable land after civilization is gone so when it's coming back, people can feed themselves
- still need people to operate the machine, even if its just one man, or a literal adam and eve (nevermind all the incest).
- still need knowledge to operate the machine, such as an operating manual (and literacy), or knowing say, voice commands.
- assuming it doesn't run on nonrenewable resources, or resources that can't be recycled or replaced..or resources that won't run out for a very long time.
But these are all problems we'd face even without a universal manufacturing machine.9 -
Using Oracle ADF along with ADF Faces to build a simple learning management system. No JavaScript, no external stylesheets, all inline styles, no client side validation, doing form submit for every field's onblur event triggering a server-side validation, creating a VO for every damn page requiring data, creating an EO for every DB table or view, adding big-ass custom queries for most EOs to join on multiple tables, frequent N+1 queries, etc.,
Idont remember the rest of the problems5 -
QT Creator and openframeworks on Windows 10 fucking suck!
- Qt creator keeps getting issues with the system. Missing DLLs etc. Fuck you, Qt Creator! They aren't missing. I double checked them. Redownloaded them and installed them.
- Besides of that your inbuilt compiler sucks big time. It takes me a fucking minute to see a complete program with a simple text on a GUI.
Now back to openframeworks.
- OF doesn't use the pre-installed codecs on Windows. You have to install K-Lite codecs to play mp4 n shit.
- If you want to embed a video or an image on the GUI, you keep getting a layer on top of the canvas. Yellow colors turn blue etc. Fucking weird.
- OF isn't a fan of Windows. Tried to install and run OF on VS 2019. It is not supported.
How about we follow the documentation of OF and install it their way? Great. Let's do it.
It says install VS 2017.
Ok, let's try it on VS 2017. Doesn't work.
I realize that they use VS 2015 in the video of their documentation.
Geez. Ok, let us try it with VS 2015.
Tries to download it, but with no success. Microsoft isn't supporting it anymore. Thus no way to download it from the official website.
- How about OF on Code::Blocks?
Not supported. Doesn't work.
I reinstalled everything. Made a Windows update. Rebooted it. Still a big nope.
To both dev teams: Get your fucking shit together, you bloody morons!4 -
Fuck this algorithms course. How the fuck do you expect me to populate a 2d array of N^2 elements with data in linear time if you won't fucking let me write to more than one element at a time???
Dear CS department,
Make sure your homework makes fucking sense before shipping it off to students.
Regards,
A pissed off student
And before anyone comes at me with this "But you can technically do that if there's k*N elements and it would still be linear time" shit, fuck off; there's a worst case of needing to write to half the elements in the 2d array so it's still N^2 no matter how you try to "but technically" your way though it.3 -
Ok so was dating this girl who n has a 8 year old I was with her for 4 year her son calls me dad... Long fucked up shit story short. She cheated fucked me over all that cool I stayed for the kid... A few months later I catch her in my son's bed with another dude.. ya I know right my apartment my everything!!!! How could she right.... but as most men knows Once Upon and gets caught doing something they turn into something completely unrecognizable in ridiculous. If I do whatever she says and wants to still let me in her son's life!! And as soon as I left my apartment to her she moved some dude in with his two kids and stole everything that I had.. so I had to get coppers involved to try to get some stuff... I mean I was free balling to work with no socks .. no towels nothing... you can only imagine how badly I wanted to go into my apartment and destroy this dude.... But for my son's sake I bit my lip and took it... she got a hold of my spare car keys both spare key tab and keys... shortly after I left they run my truck of all my HVAC technician tools... Then to make it worse some months later she emptied out my truck again... and you can only imagine how upset I was about everything because I love that kid and I don't want him to have to go through anything.... Someway somehow her and her new boyfriend got some guys off GitHub I mean I'm getting torn up out here ... GPS trackers .. people following me... and everytime I leave my truck or leave anything that gets broken into and stolen... it was so bad that they even made me lose my job at three different stores that I was working not because of my performance but every time I would walk outside of work my truck wouldn't start or it would be completely ransacked. Someone plz HELPPPPP and yes that's like the 4th GPS tracker that I've taken out of my second vehicle now because of this crap it is literally almost ruined my life6
-
StackOverflow locked my account. I'm hoping someone here might be kind enough to help me with a bash script I'm "bashing" my head with. Actually, it's zsh on MacOS if it makes any difference.
I have an input file. Four lines. No blank lines. Each of the four lines has two strings of text delimited by a tab. Each string on either side of the tab is either one word with no spaces or a bunch of words with spaces. Like this (using <tab> as a placeholder here on Devrant for where the tab actually is)
ABC<tab>DEF
GHI<tab>jkl mno pq
RST<tab>UV
wx<tab>Yz
I need to open and read the file, separate them into key-value pairs, and put them into an array for processing. I have this script to do that:
# Get input arguments
search_string_file="$1"
file_path="$2"
# Read search strings and corresponding names from the file and store in arrays
search_strings=()
search_names=()
# Read search strings and corresponding names from the file and store in arrays
while IFS= read -r line || [[ -n "$line" ]]; do
echo "Line: $line"
search_string=$(echo "$line" | awk -F'\t' '{print $1}')
name=$(echo "$line" | awk -F'\t' '{print $2}')
search_strings+=("$search_string")
search_names+=("$name")
done < "$search_string_file"
# Debug: Print the entire array of search strings
echo "Search strings array:"
for (( i=0; i<${#search_strings[@]}; i++ )); do
echo "[$i] ${search_strings[$i]} -- ${search_names[$i]}"
done
However, in the output, I get the following:
Line: ABC<tab>DEF
Line: GHI<tab>jkl mno pq
Line: RST<tab>UV
Line: wx<tab>Yz
Search strings array:
[0] --
[1] ABC -- DEF
[2] GHI -- jkl mno pq
[3] RST -- UV
That's it. I seem to be off by one because that last line...
Line: wx<tab>Yz
never gets added to the array. What I need it to be is:
[0] ABC -- DEF
[1] GHI -- jkl mno pq
[2] RST -- UV
[3] wx -- Yz
What am I doing wrong here?
Thanks.17 -
If there's something I fucking hate with all my goddamned soul is when you post something online and people get in their fucking high horse and judge you or tell you what to do
Like I understand if you're talking shit about people in the same community, then if someone tells you you're an idiot, I get it.
But if you're ranting about someone off site, then why judge this person? What's the damage being caused to you or the site?
For example, let's say I rant about my wife and the things that annoy me about her, and I use some colorful language to get it off my chest.
There's always one motherfucker, one stupid piece of shit that says something out of line.
In general it's one of these things:
* "wow, you need to calm down, you clearly treat her like shit, she is better than you*
YOU IGNORANT PIECE OF DOGSHIT. DO YOU HAVE CAMERAS IN MY HOUSE AS TO ASSUME THAT I TALK TO HER IN THE SAME MANNER AS I DID IN THIS POST?
YOU GULLIBLE SHIT EATER.
OF FUCKING COURSE I DON'T TALK TO HER LIKE THIS. I'M NOT AN ASSHOLE OR A MONSTER. I AM JUST R-A-N-T-I-N-G.
AND I RANT IN THIS MANNER SO AS TO GET IT OFF MY CHEST AND NOT FIGHT WITH HER. AND IT TENDS TO WORK. DOES IT REALLY NEED TO BE EXPLAINED?
Jaysus fucking christ. These people actually have the imagination of a fish, they can't fucking connect the dots.
Judging someone online is an egotistical thing. People like to judge others because of that morality high. It's the snack of the morally lazy.
Repeat with me: "I am flawed too, I have problems too. I should never judge others easily, let alone without full fucking context".
* "op, you should do <terrible advice>"
these ones are better, because they are trying to help, but still annoying as fuck.
they come in two forms:
old smug and condescending washed up idiots who overrate their life lessons and think they are applicable to every person A PRIORI.
yeah, fuck case by case analysis, these dinosaurs think they're the wise elders of the village.
Age does not immediately mean your advices are valid, your advices are valid on the sole merit of being valid by themselves.
I don't give 2 fucks if you're 60 or 120. If your advices are bullshit, please spare me the idiocy and the lack of case analysis.
I had old people tell me "trust me kid, happy wife, happy life" wtf is that shit? MY WIFE IS NOT YOUR WIFE.
YOU DON'T KNOW MY WIFE. MY WIFE IS ACTUALLY COOL, BUT SHE COULD BE AN ACTUAL PSYCHO AND I COULD BE OMITTING THAT FROM MY POST.
THEREFORE, HAPPY WIFE HAPPY LIFE IS A TERRIBLE THING TO SAY.
JUST STFU.
This reminds of that disgusting reddit post where a father asked advice on /r/relationships about her wife, and people told him "dude, duh, divorce her".
Guess what, she ends up murdering both of her children.
You would think such post would serve a lesson as to be careful giving advice online. But no, people think they're fucking dr phil or something with EXTREMELY LITTLE case knowledge.
People need to talk a bit less and listen a whole lot more.
You want to know how to help a person who is expressing problems?
You want to know how to be REALLY conpassionate?
Just listen. You can give minimal advice, but listening is the most important, with some occasional "i feel you man".
Everytime a journalist asks a suicide disuader what do they do, they always say the same " i just listen to their problems".
ITS NOT FUCKING ROCKET SCIENCE FOLKS. YOU WANT TO KNOW HOW TO BE A GOOD PERSON? CLOSE THE MOUTH AND TAKE THE WAX OUTTA YA EARS.
There's also the younger ones who think they can help when they don't even have no experience at all.
This is being naive, but I Iike that more than the smugness of old people.12 -
OK.... I don't mind ads but when I'm on a mobile device n you just redirect without opening a new window...
You leave me no choice... You just earned 100% IP level blocking.1 -
Im having a sort of dilema. I recently started taking freelance work for web developement (and design ack) and Im uncomfortable with the state of the industry. Ill explain: Say if I bid a client for a simple 1-3 page site w contact form (a new page, not migration) My suggestion is to use djangocms, django, or just static html/css/js (ie bootstrap), which produces clean, fairly secure, and fast sites. Of course I can throw a templated unoriginal wordpress site together in a few hours 2 days latest, so I offer that option as a sidenote on the bid, charging almost 2x more. For some reason I dont understand they choose the wp shitshow. I explain all the reasons that not the way to go( which I wont list, if u dont know, u never used it. google up) but they dont care abt the details, they rather pay more for shit job. OFC I reluctantly deliver what they want, but as a result my portfolio is full of unoriginal shit Im not happy showing off. I have a few sites Ive done on the side my prefered way, but they not deployed and sit in my github for all intents n purposes unviewable to potential clients.
I want to be proud of my portfolio, and it to be a representation of what Im capable of. BUT, I gotta eat, and work is better than no work.
There are so many "wordpress designers" oversaturaring the field and it lowering the overall standard of what we are capable of. I just begining my dev journey, but if I cant have a body of work Im proud of, theres no way I can see doing this the rest of my life, and that makes me really sad. My love of developing, coding, and IT/computers in general drove me to change careers from audio engineering to web development, and the fact that this fucking mr. potatoe head of a CMS is slowly turning that love into hate really pisses me off. So Im ending this !rant looking for hope.
Your thoughts?1 -
Giving away a 2nd Gen ipod for FREE on a couple apps.
22 people have messaged me about it... 3 days later and it still hasn't been picked up.
This is ridiculous people, the item may be free but my time is not >:|
IM LOOKING AT YOU "ON THE WAY" GUY1 -
At work, we have a lot of daytime spenders (they just hang around so they do not sit at home all day).
I'm the only one in the entire company with somewhat decent programming experience (and I have to admit that I'm still pretty bad at it).
A few (4) of them have been assigned to one of the biggest projects (potentially even bigger than the one I work on daily) the company has ever had.
here is the fun part:
- 2 of them only just started coding and have no clue what they are doing at all (they heavily struggle with HTML).
- 1 of them overengineers everything (in a bad way) because she doesn't know how to do it somewhat properly.
- 1 of them doesn't even code (only sitting there giving ideas n stuff... basically the "client").
As a bonus point:
- None of them knows how to database
- None of them knows how to back-end
- None of them knows how to design
This is going to be fun, especially since I'm going to refuse to have my hands in there even the slighest outside of recommending stuff (like using a framework, certain libraries etc.) :^)1 -
Started a new role as a front end developer working with React, happy that i finaly won't have to work with wordpress anymore, having a great hope that I will learn from the best with my team, and then ... COVID-19 ... I have to work from home
first task, implement a feature on a react front end build with react boilerplate, first time seeing this repo and dispair quickly took over, there is no documentation except for clone and install, the code is a mess, the console is filled with errors and warnings ...
I did what I could, but it was not enought, my n+1 didn't complain but if I was him i'd fire my ass with no regret, now I understood why almost all my collegues are working as a backend devs.
I don't fear being fired, I fear the feeling of being not good, feeling useless, each morning I stare at the code and I become illiterate, I can't even touch a keyboard, now I don't know what to do, fixing this shitty app, trying to build something with react boilerplate and try to understand how the data flow, or continue my endless tutorial hell .1 -
So today at work, a dev proposed some solution to a performance problem by using divide and conquer. But the way he said it was came across like "this is a brilliant, algorithmic solution, I bet you'd never think of this because no one else knows algos".
So then I just reply to him mentioning Big O and how it seems the performance is N^3, exponential. In which case the optimal size is like 1. But basically like starting an algo discussion to see if he can keep up... Or if he's just dropping some algo slang to look good.9 -
Gotta revise MySQL and Java for my IT Matura exam on Wednesday...
Reading/writing from/to files in a Java 8 manner,
LOAD DATA (LOCAL) INFILE "blah.csv" LINES TERMINATED BY "\r\n" DELIMITED BY ";' etc.,
Java Comparator,
clean Eclipse install...
No Internet, I'll have javadoc and mycli though.21 -
p r i n t e r s
I was about to print a bigass document. Wanted to save paper, and saw my printer had a two side mode. I try it out. A few pages print, then the driver says PAUSED - RELOAD PAPER. This is normal, as double sided printing is not automatic. Underneath, there is a message:
[Printing - Manual Duplex: Please reinsert pap...]
I try to resize the window to read the message.
THE MOTHERFUCKING WINDOW WAS NOT RESIZEABLE!!!
are these products not fucking tested???
I find a guide saying the paper should be reinserted with no flips, then the "continue" button should be pressed.
The button was not in the driver UI, or on the printer. Further research showed that you are supposed to:
OPEN THE TONER CHANGE DOOR AND CLOSE IT AGAIN TO CONTINUE A PRINT
what fuCKING designer thought this shit through!?#@?#$!
printers
fuckem1 -
This SocketIO method emits a message to all users who have joined the same room (conversation ID).
This works if it's a 1-to-1 chat or a group chat with infinite users in the group.
The thing that bothers me is this enhanced for loop. It loops through ALL currently connected users.
- If theres 10 users, sure no big deal
- if theres 1000 users, it has to loop 1000 times
- for N users it loops N times
What if N = 10000? God what if it's 100,000 or 1,000,000.
Imagine having to loop that many times every time you want to send just 1 message.
OR wait i just realized. This shit grabs ALL users -- but within the room ID. Right? Am i trippin balls here
Im now confused (excuse my confusion i coded till 3am last night and im still fried). Is my logic flawed? Have i written this piece of code with good performance or not?38 -
ok this may look like a lazy ass beginner crying out for spoon feeding( which it kinda is), but i want some real industrial training in non documented Android coding.
For last 2 years i have been reading tons of Android articles and documentation on "how to use this library", "how to add this feature", "what this function of this class does", but not much about how to use it efficiently, like the way its used in industry.
When I interned with a startup, all they wanted from me was to push new design changes, fix layout bugs and work as fastly as i could. I had no time to understand their core code, which had so many things that i could have learned : those mvp/mvvm design/architecture patterns, dependency injections, kotlin , coroutines, state management designs, data bindings, eventbuses and handling, and VIPER,RIBS (I mean, not everything was particularly in their code, i picked up a few keywords from here n there)... a lot of stuff that is used by many apps for their codebase.
I can read up these stuff by myself, but i always end up feeling bored coz frankly, i got no big/valuable project to implement it upon and feel excited about it. I feel that open source projects from OSS companies could be my window, but their chat spaces are also mostly empty to discuss/get some guidance.
I want some specific training about these. Can you guys provide any online/offline course/company training/books in this subject, the best practices?1 -
Right now I am doing job in non-tech firm. There people are so diff. I feel they are rainbow as my life is black n white. I got no friend there its been 10 weeks. May be because I dont talk much or may be bc I dont share my food.
Aahhh even I like staying alone. People sucks.5 -
It's the 5th day of my holiday, circa 10.20 AM. So far I've spent around 30h programming, and learned React (already having experience with the other 2 major ME*N stacks I decided it was time to give it a go), made a small 2D platformer with Unity and realised I really like writing unit tests. Maybe next I refactor the app I just made to use GraphQL and TypeScript next, since I'm in the mood of trying something new.
Funny how my significant other thought being on holiday actually would mean a break from programming - no, it means more time to spend learning and trying things you don't have the time or energy to after a working day of Vue/C#!
(To clarify, I would not spend this much time programming on my holiday, if my better half wasn't away from home for this week - won't probably spend nearly as much time on it for the remaining 4 weeks...)2 -
As i was shitting on toilet I realized something very important. This could be THE answer.
The question: what is the formula for achieving success? I realized this must be THE ultimate answer:
Money + connections + luck >= success
Why?
MONEY:
You must have money to make more money.
CONNECTIONS:
Some average joe can tell his friend Cockty to phone call his friend Dickson who's a good friend with Cumston to message his millionaire friend Asslicker who is gonna help the average joe succeed.
LUCK:
No matter what you do or how hard you work, how many achievements you have or degrees, you can spend 10 million dollars on a project -- and still fail because you're not lucky.
Let's calculate this probability:
have = 1
missing = -1
money = 0
connections = 0
luck = 0
success = 1
money + connections + luck >= success
Case 1 (have everything):
have + have + have >= success
1 + 1 + 1 >= 1
3 >= 1 ✅
Case 2 (no money):
missing + have + have >= success
-1 + 1 + 1 >= 1
1 >= 1 ✅
Case 3 (no connections):
have + missing + have >= success
1 - 1 + 1 >= 1
1 >= 1 ✅
Case 4 (no luck):
have + have + missing >= success
1 + 1 - 1 >= 1
1 >= 1 ✅
Case 5 (no money, no connections):
missing + missing + have >= success
-1 - 1 + 1 >= 1
-1 >= 1 ❌
Case 6 (no money, no luck):
missing + have + missing >= success
-1 + 1 - 1 >= 1
-1 >= 1 ❌
Case 7 (no connections, no luck):
have + missing + missing >= success
1 - 1 - 1 >= 1
-1 >= 1 ❌
Case 8 (no money, no connections, no luck):
missing + missing + missing >= success
-1 - 1 - 1 >= 1
-3 >= 1 ❌
We have: 4 possible outcomes that we want, k=4
Out of total: 8 possible combinations, n=8
Probability of achieving success using this formula is: P(A) = k/n = 4/8= 0.5 * 100% = 50% chance of being successful in this shit life
This is correct in theory. HOWEVER:
Case 1: someone having
- a lot of money
- a lot of connections
- a lot of luck
In practicality is damn near IMPOSSIBLE
Maybe 1 in 100 million people are born like this. That's 100,000,000 people / 8,000,000,000 people = 0.0125 * 100% = 1.25% of people are this blessed and gifted in life. This might be even less so we can ignore this probability as a possible outcome and average it out to realistic average joe daily life.
Therefore giving us a total of 7 combinations, 3 possibilities to succeed in this shit life
So: k/n = 3/7 = 0.4285 * 100% = 42.85% chance to be successful in this shit life
Mathematically proven how life is pure trash
Funny enough we can round it to 42%. And 42 is the answer to life, universe and everything in existence4 -
Jfc why do phone meetings always have like 20 cumulative minutes of radio silence? I swear, I ask a question and I may as well be listening for a pin to drop over there because no one in team leadership is saying a n y t h i n g.
It's upsetting because it makes me painfully anxious because Oh God What Did I Say but more than that, it feels like this huge waste of time to just...sit there. On the phone. And then when we go over time later in the middle of pointing a user story leadership's like, "Hey, can we wrap this up?" like sorry? That's not...my fault? I'm...
And I totally get it if you can't answer my question immediately, but if it takes you more than like a minute to come up with something just gimme a, "I'll get back to you on that," and move on. No need to wait for the end days, dude. We've got lives to live and better things to do, Clearly.3 -
So I just installed Elementary OS Loki on my older desktop and for that the wifi is incredibly slow, like 30 seconds to load googles home page. It also randomly stops working, and gives a no network connection. When this system was on windows I would average 50~ mb/s down speed, changing it to Linux I'm lucky to maintain 2mb/s. I've been googling for hours and nothing I try seems to work, any Linux pros here able to give me some suggestions. The network card in the PC is an Aetheros one, I it supports a,b,g,n and Bluetooth, I'm currently using the desktop with a Bluetooth mouse / kbd. (None of the hardware/setup has changed since using windows)2
-
Wherein I disprove Goldbachs Conjecture (in one specific case)
golbach conjecture:
every even number is the sum of two primes
lets call the primes p and q
lets call our even number p+q=n
we can go further by establishing two additional variables
u=p-1, v=q-1
therefore every even number is the sum of u+v+2, according to goldbach's own reasoning.
in the simplest case...
p=2, q=2, p+q=4
u=1, v=1, u+v+2 = 4
We can therefore make a further conjecture in the simplest case every sum of two primes, less 2, is the sum of two composites. This likely has connections to the abc conjecture for a variety of reasons. But leaving ancillary discussion aside for a moment...
We can generalize to a statement that every even number is the sum of two odd numbers. And every odd number greater than 1 is the sum of an odd number and an even number.
Finding an even number that is not the sum of (p-1)+(q-1) would therefore be equivalent to disproving the goldbach conjecture. Likewise proving every even number is the sum of (p-1)+(q-1) would be the equivalent of proving it.
Proving all even numbers greater than 2 are the sum of two composites + 2 would be proof of goldbachs conjecture, and finding any example or an equation that proves an example exists such that *some* subset of even numbers are NOT the sum of two composites +2, would disprove the conjecture.
Lets start with a simple example:
2+2=4
because 4-2=2, and two is not the sum of two composite numbers goldbachs conjecture must ipso facto be false.
QED
If I've wildly misapprehended the math, please, somebody who is better at it, correct me.
Honestly if this is actually anything, I'd be floored to discover no one has stumbled on this line of reasoning before.8 -
Coworker 1 starts project
Coworker 2 inherits same project
*repeat 3 more times*
Coworker n has no idea what this spaghetti code is and what it does since everyone has done quick fixes as per management requirements.
This is how the company where i work functions. And with all these projects going from one dev to the other i can tell you its a real shitshow and a lot if frustration 😤2 -
While showing the rest service demo a senior 10+ years dev ran into session issues in chrome. I asked him to open private/incognito. He opened ie,edge, closed all chrome, tried back, nothing. Had no clue whatsoever.
At last I asked him to do ctrl shift n in chrome & dark chrome opened up where he could use the test accounts to validate the bugs. He is still confused what happened4 -
You know how I always """joke""" about smoking crack cocaine being the secret to my success?
Well, guess what. Some famous brit flower boy singer or some shit was staying at a hotel a mere 20 or so minute bus ride away from where I live.
What happens then is, of course, that brain fissure mother fucker got higher than shit on that damn crack and jumped to his death. Coincidence? I don't think so. I mean, what are the odds?
He was trying to copy my formula, no doubt about that. And obviously, he failed.
But I still feel this is very unfair -- to me. Not only did he plagiarize without recognition, I now also may or may not have to deal with the inevitable shrine that will be built by his fans on the spot where he met his unfortunate end, to gather around and ritually incinerate hardcore drugs in his honor, leaving behind crackpipes for him to smoke in heaven and that kind of commemorative jazz. Hmm, it might boost turism though, so it's not all bad.
Imagine the tour guide, maan. "Oh, and this is the spot where that guy from some dumbass boyband splattered against the ground after trying to beat Max Wright at his own game, RIP and please sir don't defecate on the plaque SIR DO N-- well, nevermind. OK, moving on... "
Anyway, I just wanted to publicize the fact that I didn't even know who the fuck he was until his untimely demise, may God have mercy on him, but it serves him right for trying to steal my arcane secrets.1 -
It should be possible to prove the collatz conjecture by mapping the unit digit transitions between numbers, namely into a finite state machine. From there we could use predicates and quanitifiers to prove, by process of exclusion, that for any given combination of 10s digit and 1s digit, no number can transition to anything but whats specified in the state machine assuming that number equals x in x3+1 or x/2
Ipso facto, a series of equations proving by process of elimination, that state machines transitions are the only allowable ones, would prove the collatz conjecture by proving the fsm is a valid representation for any given integer N.
I'm actually working on it now but I don't know enough about modular arithmetic and predicate logic to write a proof. I just have the state diagrams on some dot matrix paper at the moment.
If anyone wants to beat me to it, feel free.
So for example any number ending in 13, will, after x3+1, end in 40.
Any number ending in 40 will end in 20. Any number ending in 20 will end in 10, which will end in 5 as the unit digit.
It's easier to prove in the single digit case, and the finite state machine for that is already written, at least on paper.
I'll post pictures when I get a chance.7 -
Ah, yes, the ages old dilemma of a piece of shit function written in-between taking long drags out of a fucking crackpipe being more reliable than the refactored version; how delightful.
Now, they say broken code from cleanup of sketchy bits is better than any working snippet whose reading feels as pleasant as being repeatedly slapped with a decaying rhinoceros testicle sack, but I'll be fucked if I don't __sometimes__ feel like I just *might* prefer eating the maggot soup out of the rotting fucking gonads of deceased male pachydermata than deal with this kind of shit: feet facing backwards and all that.
Ugh. If only I could live my life without everyday feeling like I'm on a pointless quest to slay a mother fucking dragon, where everytime I get to the castle I'm suddenly a mustachioed italian plumber stepping on turtles and my bitch is in another sicillian ghetto. You know, basic shit.
The good thing in seeing these old errors pop up again after my shoddy bandaid of a patch is taken off is that I'm finally experienced enough to realize that my ~ A P P R O A C H ~ was wrong to beg with. And this is VERY nice, because I came in to do some trivial maintenance of forgotten code, and now I have a plan for correcting a very small and silly but definitively annoying as fuck design error.
Why am I so annoyed then? Because it's more and more work, it never fucking ends, and I can't EVER take a break: with apocalypsis incoming, as we have clearly seen in the stars, tea cups, palm readings, crytal balls, ouija boards, and also in the cover of old-school pornographic magazines nailed to the wall of a defunct newspaper kiosk, the fear of economic collapse is somewhat too real to even THINK about any kind of necessary vacation.
And so: fucking shit, here we go again... TIME FOR MORE COFFEE.
<ad> But have YOU ever picked ingesting the hairy BALLS of a large mammal over doing your stupid job in a proper way? Is the ghost of your dead self haunting the hollow being that remains in this meaningless plane of existence? Do you lull yourself to sleep by chanting dark prayers to the Horror Immemorial with a heartfelt desire for the sweet release of death?
While it may be true that your corporate masters are keen on savagely raping your every breathing hole from the ass up to your fucking eyesockets on a daily basis, there's no good reason NOT to have a good time -- and with the help of ScalySalad, you will be able to unwind in the evenings by realizing your *supressed* childhood dream of debouring the certified, lab-tested, 100% authentic, gonorrhea-infected ASS of a sewer-dwelling lizard man!
ScalySalad pimps only the FINEST specimens of failed, government-sanctioned and highly clandestine experiments for your lacertaerotic pleasure. These proud and noble creatures were once human beings, until they were kidnapped by [CENSORED] in order to be used as weapons of war against their enemies. And for the lowlow price of GABTRIDTIHSTAE, you will be among the few lucky ones to experience the GLORIOUS taste of their anal cavities before they go extinct!
Go NOW to triple.doble.you dot. dot you.www www.triplewww.wwwwwwwwwwww dot if you click and it's malware you deserve it DOT com, and use my promo code SALAMUNCHER for 20% OFF on a date with a homeless societal reject turned prostitute after being [CENSORED] by state scientists!
Illegal inter-species fornication has never been easier! Thanks to ScalySalad for sponsoring this �vI�n��lK�^�3��V#^B�^NI�%^G�v�|3I��.1 -
LORD AM I PRON TO THESE KIND OF PEOPLE AS A DEV!!!?
[09:21, 22/04/2020] +263 78 454 5470: Bro
[10:24, 22/04/2020] Softaz: Wasap
[10:25, 22/04/2020] +263 78 454 5470: Im good fam hwu
[10:37, 22/04/2020] Softaz: Um good bro how is it?
[10:43, 22/04/2020] +263 78 454 5470: All good.. i need help fam... i want to creat application form but dnt knw how to fo th out look appearance
[10:48, 22/04/2020] Softaz: Ummm haven't used out look
[10:51, 22/04/2020] +263 78 454 5470: Nooo I mean appearance of the app. .. not outlook windows no
[10:55, 22/04/2020] Softaz: 🤔
Wat you up to
Want to create a form using outlook or you want to create an application? ??
[GUY SENDS VOICE NOTE]
[11:21, 22/04/2020] Softaz: Is it web app or desktop app
[11:22, 22/04/2020] +263 78 454 5470: I thnk its wise to hv it a web app
[11:24, 22/04/2020] Softaz: Ok so is this a thing chitone market or?
[11:24, 22/04/2020] Softaz: And outline all it's functionality
[11:25, 22/04/2020] Softaz: And the price😋🤑
[11:26, 22/04/2020] +263 78 454 5470: Na. Its just fr records n logs ... for reference
[11:26, 22/04/2020] +263 78 454 5470: 👀U want to thug me now
[11:27, 22/04/2020] +263 78 454 5470: Nigaaa👀wait
[11:42, 22/04/2020] Softaz: 😂 its yo idea
I can't make something I have no idear what information it should take in
What format to generate soft copy
Etc5 -
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 -
Spent days to setup a newer-Android version with reverse-proxy-HTTPS certificate in its CA store + one that'd support Google Play and signing in (old school man-in-the-middle).
FINALLY got the API calls of this 1 app whose unofficial client I wanted to make coz their main sucks ass. Just to get stuck on the phone-number-based OTP that they use for their login (:
They send a unique token for each OTP request, I assumed they're using some hard-coded string based function, which they decrypt on their backend to verify.
Downloaded their APK and decompiled. Went through dozens of weird-ass-named classes (coz decompiled). For the 2nd time I thought I had it!
But no -.- they call Google's Firebase messaging for the phone-num OTP n that function simply called firebase, looked into that service n ofc it's very tightly coupled with the calling API's backend
It was fun while it lasted I guess~~~1 -
We had an issue where a query to a db replica set was returning duplicates randomly when paging. Aka each HTTP call for next N results was hitting different dbs with same/copy data.
No one could figure out why... I look at the query and ask where's the ORDER BY ID?
These guys were interviewing ppl last week and saying how even they could solve algo questions they were asking candidates.
And so to explain the problem, I'm like "tell me what's the difference between a list and a sorted list?"
#why algo questions suck at predicting job performance3 -
It could be seen as n bug, when i was busy with file exports from a query on our web system i mannaged to skrew up the bitstream encoding for excel files and with a sysout the code started beeping everytime i exported the file. Managed to fix it by changing it to csv format. So no more beeping :D
-
So I was writing some C code, pretty simple code. I had to pass a matrix to a function. The matrix had been globally defined as arr[100][100]. But the actual size of the matrix was stored in 2 vars m, n. Now when defining the function if I do like this:
void fun(int a[][n])
The code doesn't work as expected but when defined as:
void fun(int a[][100])
Works perfectly.
I have no idea why this is happening, any insight will be very helpful.5 -
Is there an ios app that records my gps logs for last n day(cyclic buffer)? Privacy is also important: data shouldn’t leave my phone: no internet access.9
-
Rubber ducking your ass in a way, I figure things out as I rant and have to explain my reasoning or lack thereof every other sentence.
So lettuce harvest some more: I did not finish the linker as I initially planned, because I found a dumber way to solve the problem. I'm storing programs as bytecode chunks broken up into segment trees, and this is how we get namespaces, as each segment and value is labeled -- you can very well think of it as a file structure.
Each file proper, that is, every path you pass to the compiler, has it's own segment tree that results from breaking down the code within. We call this a clan, because it's a family of data, structures and procedures. It's a bit stupid not to call it "class", but that would imply each file can have only one class, which is generally good style but still technically not the case, hence the deliberate use of another word.
Anyway, because every clan is already represented as a tree, we can easily have two or more coexist by just parenting them as-is to a common root, enabling the fetching of symbols from one clan to another. We then perform a cannonical walk of the unified tree, push instructions to an assembly queue, and flatten the segmented memory into a single pool onto which we write the assembler's output.
I didn't think this would work, but it does. So how?
The assembly queue uses a highly sophisticated crackhead abstraction of the CVYC clan, or said plainly, clairvoyant code of the "fucked if I thought this would be simple" family. Fundamentally, every element in the queue is -- recursively -- either a fixed value or a function pointer plus arguments. So every instruction takes the form (ins (arg[0],arg[N])) where the instruction and the arguments may themselves be either fixed or indirect fetches that must be solved but in the ~ F U T U R E ~
Thusly, the assembler must be made aware of the fact that it's wearing sunglasses indoors and high on cocaine, so that these pointers -- and the accompanying arguments -- can be solved. However, your hemorroids are great, and sitting may be painful for long, hard times to come, because to even try and do this kind of John Connor solving pinky promises that loop on themselves is slowly reducing my sanity.
But minor time travel paradoxes aside, this allows for all existing symbols to be fetched at the time of assembly no matter where exactly in memory they reside; even if the namespace is mutated, and so the symbol duplicated, we can still modify the original symbol at the time of duplication to re-route fetchers to it's new location. And so the madness begins.
Effectively, our code can see the future, and it is not pleased with your test results. But enough about you being a disappointment to an equally misconstructed institution -- we are vermin of science, now stand still while I smack you with this Bible.
But seriously now, what I'm trying to say is that linking is not required as a separate step as a result of all this unintelligible fuckery; all the information required to access a file is the segment tree itself, so linking is appending trees to a new root, and a tree written to disk is essentially a linkable object file.
Mission accomplished... ? Perhaps.
This very much closes the chapter on *virtual* programs, that is, anything running on the VM. We're still lacking translation to native code, and that's an entirely different topic. Luckily, the language is pretty fucking close to assembler, so the translation may actually not be all that complicated.
But that is a story for another day, kids.
And now, a word from our sponsor:
<ad> Whoa, hold on there, crystal ball. It's clear to any tzaddiq that only prophets can prophecise, but if you are but a lowly goblinoid emperor of rectal pleasure, the simple truths can become very hard to grasp. How can one manage non-intertwining affairs in their professional and private lives while ALSO compulsively juggling nuts?
Enter: Testament, the gapp that will take your gonad-swallowing virtue to the next level. Ever felt like sucking on a hairy ballsack during office hours? We got you covered. With our state of the art cognitive implants, tracking devices and macumbeiras, you will be able to RIP your way into ultimate scrotolingual pleasure in no time!
Utilizing a highly elaborated process that combines illegal substances with the most forbidden schools of blood magic, we are able to [EXTREMELY CENSORED HERETICAL CONTENT] inside of your MATER with pinpoint accuracy! You shall be reformed in a parallel plane of existence, void of all that was your very being, just to suck on nads!
Just insert the ritual blade into your own testicles and let the spectral dance begin. Try Testament TODAY and use my promo code FIRSTBORNSFIRSTNUT for 20% OFF in your purchase of eternal damnation. Big ups to Testament for sponsoring DEEZ rant.3 -
just went through 2 recruitment process n realised no matter how good u are…freshers are just treated as equal abstract trash1
-
Horror story and rant time I guess...
I haven't seen the main developer of this MVC project that I've been working on but I can totally assure that his seniority isn't in frontend development 😠 and I doubt the backend too... Fucking DataTables converted to IDictionaries<string,object>
Guess who need to build on top of the pile of shit!
Anyway, I wasn't really careful about what kind of template I was given to work on a new SPA page, so I'm doing the job given the time, but it's fucking gory:
- matrioska style layers (n.3) without documentation
- partials everywhere
- too much inline styling
- too many <style> sections (n per layer or partial)
- too many <script> sections (n per layer or partial)
- poor CSS styling or no styling at all! (classes without any style nor js association)😠
He's just been lucky that the browser is capable of handling his shit
Now that at the end of this year I'll leave this project (solo fullstack) and need to provide documentation for the next poor souls I was thinking to leave behind something at par of my skills and capabilities but analysing the current mess ticks my brain in a bad way, fuck you Marco!
Fuck you
and your seniority
and the Italian way of perceiving seniority that gives you a higher living in the wrong side of the field 🤬🤬🤬2 -
Let some number P be the product of two factors, A and B
Let the iterations of A*1..2..3..N up to B+1 be a directed graph.
Would this graph be eularian?
If so then it should be possible to use the BEST algorithm to count the number of eularian circuits, yielding B, no?
Edit: this is supported by the following text:
An arborescence can equivalently be defined as a rooted digraph in which the path from the root to any other vertex is unique.
* * *
Where the product of any two primes is unique, the path to it across our graph here, is also unique. -
Over the last week I've slowly grown to fucking hate IMAP and SMTP. You'd think after so many years we'd have come up with better servers to manage email but no we still rely on fucking decades old protocols that can't even batch requests.
To make things worse I need to attach to IMAP through node and that has been a nightmare. All the libraries suck ass and even the ones tailored towards Gmail don't work for Gmail because Google decided one day to fucking out the header at the bottom of some emails and split into mimeparts. Also why the fuck is fetching email asynchronous? There's no point at all since we requests are processed line by line in IMAP, and if the library actually supported sending asynchronous requests it wouldn't require a new object to be created for each request and allow only a single listener.
Also callbacks are antiquated for a while and it pisses me off that node hasn't updated their libraries i.e. TLS to support async/await. I've taken to "return await new Promise" where the resolve of the promise is passed as the callback, which let's me go from callback to promise to async/await. If anyone has any other ideas I'm all ears otherwise I might just rewrite their TLS library altogether...
And this is just IMAP. I wish browsers supported TLS sockets because I can already see a server struggling with several endpoints and users, it would be much easier to open a connection from the client since the relationship is essentially:
Client [N] --- [1] Server [1] --- [1] IMAP
And to make the legs of that N : N which would fix a lot of issues, I would have to open a new IMAP connection for every client, which is cool cause it could be serverless, but horrifying because that's so inefficient.
Honestly we need a new, unifying email protocol with modern paradigms...8 -
Goes to my comment on on of the rants to "Why linux cannot AVER be used by a normal user"
I'm pretty good with techs, OS, dev etc.
But here you go, a random error message which tells me nothing (Absolutelly nothing) and no way to fix it. No way to fix it, not even a hint where to look for solution, outside google. Sure, It took me around 5 minutes to find the problem googeling and copy/pasting some bash commands, but next time it happens and I don't have internet ? Well fucked.
This shit never happens on Wiondows or MacOs :) And that's why these 2 will always be user firendly ans linux will never be.
That's why linux will never be used by normal humains.
You 100% linux addict will point out directlly 'TYeah yours repos sources are fuckied" or whatever, but it IS NOT to user to know how sources, packages etc work. I want just update my system, if one source is not found, ignotre it by default ! How hrd is that ?
Error message in question :
E: The repository 'https://ppa.launchpadcontent.net/tr... jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Thanks for assisting to my ted talk.19 -
Heres a fairly useless but interesting tidbit:
if i = n
then
r = (abs(((((p)-(9**i)-9)+1))-((((9**i)-(p)-9)-2)))-p+1+1)
then r%a will (almost*) always return 0. when n = floor(a/2) for the lowest non-trivial factor of a two factor product.
Thats not really the interesting bit though. The interesting bit is the result of r will always be some product with a *larger* factor tree that includes the factor A of p, but not p's other larger factor, B.
So, useless from what I can see. But its an interesting function on its own, simply because of what it does.
I wrote a script to test it. For all two-factor products of the first 1000 primes, (with no repeating combinations, so if we calculated say, 23*31, we skip 31*23), only 3262 products failed this little formula, out of half a million.
All others reliably returned 0 for the following..
~~~
i = floor(a/2)
r = (abs(((((p)-(9**i)-9)+1))-((((9**i)-(p)-9)-2)))-p+1+1)
r%a
~~~
The distribution of failures was *very* early on in the set of factors, and once fixed at the value of 3262, stopped increasing for the rest of the run.
I didn't calculate if some primes were more likely to cause a product to fail or not. Nor the factor trees, nor if the factor trees had any factors in common between products, or anything of that nature.
All in all I count this as a worthwhile experiment.
If you want to run the code yourself, I posted it to pastebin here:
https://pastebin.com/Q4LFKBjB
edit:
Tried wolfram alpha just to see what it says, but apparently not much. Wish it could tell me more.40 -
Ok so I got namespace N.
And namespaces N\a and N\b.
I would like N\a\foo() to call N\b\bar().
But no matter what I do it says \N\b\bar() does not exist. What am I doing wrong??
I've tried including, using, requiring but nothing.8 -
A friend of mine studies mathematics and he told me about a project he has to do and we worked on it together a bit: Numerically calculate the arctan.
He dug out a nice series by (the one and only) Euler and we started massaging the thing to get it into a bit of a nicer form (there were (n!)^2 and other shenanigans) and we eventually succeeded after some stupid simple errors and arrived at a quite simple recursive progression. After that he also found a formula to transform a given value into the region where our formula actually mimics the arctan and we proceeded to proof this formula. The programming was straight forward and now we only have to find the radius of convergence which I suspect is pi^2 (but no proof).
I had a lot of fun doing this, fiddling around with the formulas and then programming it to see it actually becoming real.3 -
part 5/n
me vs my job at mnc laggards
Do these laggards even know how virtual meetings work?
meeting 1: an induction meeting from 10am-1pm . one day ago, the supposed manager of me called to say that he will be in office after 10.30, so i should come after that. so ofcourse i missed the call from 10-11.30 as i was commuting. one would expect the meeting to be recorded but nope :/ .Also, the 1 hour session that i somewhat attended consisted of an old guy telling how he has been doing these inductions for last 10 years in this company and how company takes its code of conduct with utmost sincerity (wtf?? tell me the employee benefits you dinosaurs 🤬)
meeting 2 : a meeting describing the softwares, from 2.30-3.30 . no fucking person is leading the meeting and 10+ people are just sitting their with their mics off!!!
also sidenote: microsoft teams and outlook can go suck its own dick if it has one. one of the shittiest piece of shit i have ever worked with. People find them so complex that they instead have unofficial whatsapp groups for official communication.
And guess what : YOU CAN'T FUCKING CREATE THEIR ACCOUNTS IN ANYTHING BUT LAPTOP!!
And when whatsapp comes into the fucking work life, you can expect an RIP to the P of my life 😭😭
-----
previous rants:
https://devrant.com/rants/6543145/...2 -
Mood:
echo do I care? >> seeifIcare.txt | echo currentResponse : no >> seeifIcare.txt | grep-n currentResponse seeifIcare.txt
Output:
2:currentResponse : no -
My vague naive extreme understanding of interview questions are on a spectrum from situation a to situation b.
But what should the industry be doing? Is the industry just going wrong blindly copying big N companies hiring process without the same rationale? (e.g. they need computer scientists able to deal with problems specific to them at their size and that often means creating new tech, unreal problem solving abilities and cuh-rayzee knowledge)
a) stupid fucking theoretical shit that some people argue you won't ever need to be doing in practice for most companies, while giving you no ability to google, leetcode hard problems kind of stuff
b) practical work similar to what you'd be doing on the job, small bugs, tasks, pair programming on site with your potential future coworkers
Lots of people hate option a because it's puzzle/problem solving that isn't always closely related to what's on the job. Whiteboarding is arguably very much a separate skill. (Arguably unless it's like a big N company where you want computer scientists to deal with specific problems that aren't seen elsewhere, and you're making new tech to deal with your specific problems.)
We could go to the extreme of Option b, but it tends to trigger people into shitfits of "NO, HOW DARE YOU MAKE ME DO REAL WORK, BUT NOT PAY ME FOR IT AT THE INTERVIEW STAGE"
That's before we get into how to execute option b whether or not it's being given as a take home assignment (which is a huge pain in the ass and time sink, among other issues) vs a few hours at the potential workplace working with some of the future potential coworkers and soaking in the work environment (you have to figure out how to take the time off then)
Is it really just poor execution overall for the wrong use cases for the majority of the industry? What should the industry be doing in which cases.
Then this is all before HR screening with shit like where they might ask for more years of swift experience than its existed. -
git cherry-pick -n <commit>
The "-n" is alias for "--no-commit" and it applies the content of the target commit into your working directory without making any commit. Usefull if you want to cherry-pick many commits, tweak them and make a new one or simply want to grab some functionality into your index.
What's yours well-appreciated but not-that-well-known git functionality?3 -
In my early programming days I wrote a C++ program to store marks of n no of students but didn't got the output I checked for 3 hours then found that I was storing the data in another integer value and not in the array.
-
i think i will start a thread of my rants against the new mnc laggards that i am supposed to join.
me vs my new job : part 4/n
so today is 29th, and after going through a major EXHAUSTING paperwork for the last 2 days (which included e-signing of papers from a literal govt portal that was down 90% time and i had to manually do polling on it to get it to work), i finally have the onboarding papers ready and i headed to office for laptop collection.
i was told that today the only formality that will happen is the laptop collection, so i scheduled all my personal stuff accordingly and planned to just goto the office, take the laptop and come back home. hardly a work of 3 hours, lets get it done by 11 am.
how the fuck did i forget that this is a sloth company :/
- i reached office at 10, and my spoc was not picking up the phone.
- after multiple tries, he picked up and told me that he is on leave and gave me the number of another.
- the other guy was not picking up, so i called him back. he said that the guy will start his shift at 11, so call him after 11 (?)
- i ended the call and bashed straight into office. asked someone where he sits, went there, and his mates told me that another guy was supposed to attend to me (hopefully i got saved by another redirect, once that guy had picked up his phone)
- what's more, the other guy told me that he had mailed my HR that i should be coming at 2 pm to recieve laptop(!?!) and laptop will not be ready before that.
- my hr fucking didn't tell me this and now its 11.15 and i am sitting in the lobby waiting for my laptop with no food, water or shit inside of me :/
with fuckery like this, I will either surrender and become one of the laggard like them, or become a rebel, just do my work and shit on their timings and redirects, and soon leave for a better shit :/
----------------------------------------
previous rants
part 3/n https://devrant.com/rants/6533348/...
somwhat part 2 and 1/n https://devrant.com/rants/6304423/...1 -
what. fucking. day.
my ex blonde whore got mentally,
T O R M E N T E D.
ripped apart.
absolute, psychological, Destruction.
a great, great Evil, is gonna be born out of what ive done
worse than frankenstein evil
and this evil, will be spread across the entire world
it will infect and affect, you
i cannot imagine how fucked up the future is going to become
this day is completely FUCKED and i cannot wait for the moment till this shit is over
what happened?
too much random fucking bullshit happened! this day is as random as it can fucking get
warning: you'll gonna get a headache reading this fucking rollercoaster of emotions
1) worked
2) was angry at my ex blonde whore cause she doesnt want to block the fuckboy she cheated on me with
3) told her this. argued with her. shes stubborn and doesnt want to block him
4) i blocked her everywhere (for 500th fucking time). this time including ig. she cried at work. barely could focus
5) after work from a fake acc i saw she posted MY fucking bmw
6) second story she posted SITTING INSIDE OF MY FUCKING BMW WITHOUT MY FUCKING PERMISSION
7) WHAT THE FUCK. MAD AS FUCK, I called her on phone asap. she answered. i said i wanna talk. she wanted to go out for coffee. fuck that. lets go to her place. she asked u wanna fuck me. i said i fucking do. im horny too, she said
8) came over. fucked her. discussed. talked. argued afuckinggain. unblocked. i pretended ig glitched out and i saw that story. told her who the fuck u think u is to steal my fucking key of my bmw and sit in my fucking brand new bmw?!!! WHORE
9) then fucked her again. but cuddled her kissed her gently, she said "you're such a fucking mentally ill maniac", while smiling hugging me and kissing me. she loves The Joker type of guy who fucks with her emotions. "you give me rollercoaster of emotions" she said. when she went in shower to wash off my cum i grabbed her phone and blocked her fuckboy she cheated on me with (shes secretly in love with him)
10) when she saw this her whole fucking mood swapped. 180. asked why did u go through my phone. i said why did you fucking steal my bmw key and sit inside of it
11) now we're even. i crossed the red line and blocked your fucktoy from your phone and you crossed the red line stealing my fucking key of an expesnive car and sitting inside it at 7:30am while i was sleeping. Fuck you WHORE
12) she sent the pics of my fucking bmw to chatgpt and asked how much this car costs so she estimates how rich i fucking am. This relation is BEYOND FUCKING TOXIC AND LETHAL THAN YOU CAN IMAGINE
13) "now that hes blocked can you drive me in ur bmw now for the first time" she asked. i was resistent. I FUCKING blocked him not YOU, whore. and you're giving me an attitude now. she looked at me angry, deadly, the look of "im gonna do you dirty for this i promise". fuck that whore
14) at the end i said i can drive u only under the condition that he remains blocked forever
15) deal. i repeated the fucking seriousness of this numerous times. its gonna get more fucked and toxic if she ever unblocks him. we agreed so i drove the bitch whore for first time. she was amazed of my bmw
16) when i thought it was all over and i can relax, as we were driving ANOTHER BITCH CALLED ME ON MY PHONE. AND HER NAME AND NUMBER WAS DISPLAYED ON THE BMW SCREEN. FUUUUUUUUUUUCK. please
17) i completely forgot that i set up a coffee meeting with this new bitch. (this new bitch is fat and ugly btw i just wanted to go out with her cause she has good personality and wanted to talk random stuff so i shift my mind off blonde ex whore)
18) blonde ex whore was not happy. asked me who is that. FUCK. i said some random girl
19) i left my blonde whore home. kissed. then went over with that new girl for a drink. talked. drove her. blond ex attacked me who is she, and to give her phone number so she calls her to check what she has to do with me. FUCK!!!
20) as i was sitting with that new girl i had to explain her all this bullshit. embarrassed. belittled. fuckwd up. whilw i was explaining my blonde whore found her ig and told me to tell her everything or else shes blocking me.
21) the blonde whore blocked me! everywhere! lol. for the first time ever. fuck off. now she knows how i felt, betrayed!
22) fucked up. blonde ex wrote to new girl why did she call me and what do we have between each other cause shes my gf. WHAT FUCKING GF YOU DUMB BITCH YOU FUCKING CHEATED ON ME!!!!! FUCK YOU
23) i told this new girl to write her she needed me for college cause I'm an IT guy and they dumb af dont know how to use word or excel
24) blonde ex bought it (i think)
25) when i got home i called my blonde whore on phone. she answered. her voice seemed like she overdosed on drugs. "did u fuck that girl" she asked. No. i was riding my bmw.
26) explained her the new girl is ugly and just wanted college help. i wouldnt fk her (truth). ex whore unblocked me and said she wants me to cuddle her tomorrow and sleep in bed14 -
# rails manage.py runserver
Usage: ...
# python run server
/use/local/opt/python/bin/python2.7: can't find '__main__' module in 'run'
# npm server
Usage: npm <command> ...
# webpack s[TAB]
...
# [TAB]
...
# ./just_fckn_run_pls.sh
zsh: no such file or directory: ./just_fckn_run_pls.sh
# DO IT
zsh: correct DO to do [nyae]? n
zsh: command not found: DO
# exit
Thank you. Come again!
-- Dr. API Nahasapeemapetilon
============= Broken Pipe =============
10 GOTO PUB -
To those who have worked in mad RAD solo environments, with next to no testing...
...and those who have worked full Agile, with high code coverage, code review amongst hoards of T-shaped developers...
...how much difference does it make to wellbeing and upskilling in the two?
Bonus points if you have done both and can compare in an n=1 way.2 -
If we can transform the search space or properties of a product into a graph problem
we could possibly use Kirchhoff's theorem to reveal products which are 'low complexity'
in particular search spaces, yeah?
Now according to
https://en.wikipedia.org/wiki/...
"n Cycle Space, A family of sets closed under the symmetric difference operation can be described algebraically as a vector space over the two-element finite field Z 2 {\displaystyle \mathbb {Z} _{2}} \mathbb{Z } _{2}.[4] This field has two elements, 0 and 1, and its addition and multiplication operations can be described as the familiar addition and multiplication of integers, taken modulo 2"
Wouldn't this relate to pollards algorithm, because it involves looking for factors of coprimes modulo N or am I mistaken?
Now, according to wikipedia, "in a group, the additive identity is the identity element of the group, is often denoted 0, and is unique."
If we make the multiplicative identity of our ring or field a tuple of the ratio of a/b for some product p, or a (and a/w, where w is the square root of p), or any other set such that n*m allows us to derive a or b, we could reduce the additive identity to the multiplicative identity, making the ring trivial. Solving for p would then mean finding a function from R to R, mapping every number to 0, i.e. finding the additive identity.
Now in a system with a multiplication operation the distributes over addition, the "additive
identity annihilates ring elements", so naturally, the function that maps to 0, gives us
our additive identity, we need only find the subset, no?
Forgive me if I'm wrong, but shouldn't this be convertible to a graph search?
I'm WAY out of my depth here so if anyone is familiar and can enlighten me I'd be grateful.
It's all unknown unknowns to me. -
Does anyone know the best way of doing GPU stuff in C? I have a cuda enabled GTX 1050, but the cuda drivers screw everything up on machine for some reason.
Is there a better way to do this without the cuda drivers?6 -
Hang with me! This is *not* a math shitpost, I repeat, it is NOT a math shitpost, not entirely anyway.
It appears there is for products of two non-trivial factors, a real number n (well a rational number anyway) such that p/n = i (some number in the set of integers), whos factor chain is apparently no greater than floor(log(log(p))**2)-2, and whos largest factor is never greater than p^(1/4).
And that this number is at least derivable, laboriously with the following:
where p=a*b
https://pastebin.com/Z4thebha
And assuming you have the factors of p/z = jkl..
then instead of doing
p/(jkl..) = z
you can do
p-(jkl) to get the value of [result] whos index is a-1
Getting the actual factor tree of p/z is another matter, but its a start.
Edit: you have to provide your own product.
Preferably import Decimal first.3 -
I was given a perl script to help change ubnt airos devices passwords from the command line. I was give no instructions on how to use it and I am not use to working with perl If anyone can give me some help I would really appreciate it. Here is the code.
#!/usr/bin/perluse
FindBin qw($Bin $Script);
use WWW::Mechanize;
die "Syntax: $Script ...Changes the password on 1 or more AirOS units." unless @ARGV >= 6;
my $user = shift @ARGV;
my $op = shift @ARGV;
my $np = shift @ARGV;
my $rouser = shift @ARGV;
my $ropass = shift @ARGV;
my @addresses = @ARGV;
open L, ">>$Bin/$Script.log" or die "Unable to write to $Bin.log: $!";
sub l {
print STDERR @_;
print L @_;
}
for my $a (@addresses) {
l "Changing password on $a\n";
my $mech = WWW::Mechanize->new();
my $entry;
my $start = "http://$a/login.cgi?uri=/system.cgi";
$mech->get($start);
$mech->field('username',$user);
$mech->field('password',$op);
$response = $mech->submit();
# to get login cookie
if (!$response->is_success) {
l $response->status_line, "\n";
}
$mech->get(qq|http://$a/system.cgi|);
$mech->field('NewPassword',$np);
$mech->field('NewPassword2',$np);
$mech->field('OldPassword',$op);
$mech->field('ro_status', "enabled");
$mech->field('rousername', $rouser);
$mech->field('roPassword', $ropass);
$mech->field('hasRoPassword', "true");
$mech->click_button(name => "change");
$response = $mech->submit();
if (!$response->is_success) {
l $response->status_line, "\n";
}
$response = $mech->get(qq|http://$a/apply.cgi|);
if (!$response->is_success) {
l $response->status_line, "\n";
}
}close L;
exit 0;8 -
So I was reminiscing about my hs and uni yrs and thought of the teachers in my hs Sr yr and my uni freshman and semester abroad. I went to business school in uni but freshman year was all classes in the general subjects like calc n physics that everyone had to take no matter what school you were in.
So feels like all that time in bschool was a waste... No memorable moments at least.... Only take away perhaps is maybe I'm a slightly better investor but for that I probably got more from reading interesting classics than from the classes....4 -
!tech
i am a fan of everything mcu but recent ms marvel feels so cringy and awkward as an Indian. the main actress is okay, but almost all of the casting is from non Indian/pakistani descent. thankfully those guys don't try to speak hindi/urdu otherwise i would have snorted while watching 😂. the blend of languages feels so weird i neither like their hindi nor English.
imo squid game like adaptation would have been better , having everyone from same descent and speaking the same language while having everything dubbed by professionals for other languages.
and what's with the colors? mann that's too much color for even the most colourful countries of the world.
and songs? wow. when i was growing up, the movies at that time had dialogues like "when you are in love , you hear background music" , but even those movies didn't had any background music so cringy as this.
also from what i know pakistani culture is way more punjabi than indian culture in general. but here , pwople are speaking perfect hindi even in a mosque!
makes me wonder how the world sees these 2 countries. every 5 minutes i felt that this is more Indian adaptation of a story than pakistan. they just blended the countries' culture brutally. i bet the conversation between director and scriptwriter must be like:
d :hi there
s : hello
d: so you have a movie for me
s : yes sir i do . it's called miss marvel
d : oh so it's about carol denvers? i thought that wasn't until 2024
s : no sir it's about a Pakistani girl with superpowers
d : oh okay. wait did you say Pakistani?
s : yes sir. a pakistani girl born in n-
d : yeh yeh yeh. listen we need to add lots of colors
s : why-?? ok sure sir.
d : and elephants. and borses. also , everyone must occasionally.
s : bur sie those are all the cuisines of an indian wedding . and why we want horses?
d: doesn't matter, i want horses.
s: buf s-? ok fine1 -
Easiest transition from xubuntu into a tiling WM like i3?. Is there a more forgiving solution for a mouse addict such as myself? should I master vim/emacs first?1
-
I JUST WANT TO FUCKING EXCLUDE A DIRECTORY....
I run the code cleaner tool, OH CHRIST it's trying to sanitise the automatically generated code, I don't want this.
I try to exclude... takes ages to work out that while specifying the dirs is absolute you can only exclude relative but from what? I want to block a/b but not a/c/b but no it's all you can only block all b b it a/b, b/b, c/b, c/b, a/c/b, etc.
I google for other solutions, nothing but trash, docs a trash, here's some examples but we don't tell you the actual behaviour. All I want is to get everything in /home/hilldog/emails but not /home/hilldog/emails/topsekret how hard can it be?
I use the source but what's this, BeefJerkyIteratorIteratorBananaSpliterator all over the shop how much convolution and LOC does it take to provide a basic find facility?
Screw this...
$finder->in(explode("\n",trim(exec('find '.escape_args(...$good).' -type d ' . implode('
-o ', prefix('\! -wholename', escape_args(..$bad))) . ' -etc | grep -vETC \'pretty_patterns\''))))3 -
me vs my job at mnc (not laggards anymore) part 8/n
so... 13 days has past and now i know somewhat about the "system" and coming to terms with it. maybe this is my first time working from office (in hybrid mode) or maybe i have worked with startups that provide some great delicacies in the name of work culture, i.... have some things that i like and dislike.
like :
- once the initial disastrous onboarding was done and i had access to most of the tools, resources and people i needed, i looked into the codebase to much of my relief. it is verbose and shitty, but like, filled with good latest shit . all the the latest architectures, libraries, etc will keep me on toes for next 3 or so months and i will get a hang to being an awesome blazing fast android dev (the thing which i was in my first job and which got seriously impacted in my 2nd job)
- no one is batting an eye as i join the office at 10 am and leave by sharp 5 pm (although i highly doubt it will go unnoticed. official timings are 9-7 and i will have to learn some politics to deal with it. the 7-9 slot in mornings and evenings are highly crowded ,brain bursting periods )
- wfo is 2/5 days
dislike :
- they are killing me with jira :'( . instead of using story points, they want us to put time estkmates and add hours to that estimate each day :/ this sucks, i hate opening jira more than once a week
- my senior seems like sly guy. he's 1 or 2 years older than me, but with better experience in both tech and politics. previously we both got a task and he was able to finish it on Friday while i was not able to complete it on weekend as well as today. turns out he was buttering our (cute) PM, going bro code with TL and got to know which task will be smaller. and even after that today he was just sitting idly doing all the buttering / dude-ing every imp person and i was also distracted/ laughing at his antics. need to learn how to deal with that guy and infact become that guy
---------
previous : https://devrant.com/rants/6566426/...1 -
!IthinkNotRent
Trying to write two player checkers/chess game with PHP
Any ideas about frameworks (maybe js frameworks) that will make my life easier
(No Nodejs plzzz)
Thanks!9 -
part 6/n
me vs my job at mnc laggards
ok so this has been the first day where stuff started to feel a bit better. there were proper meetings this time, with hosts taking wholesome sessions and chiming everyone in. some meetings were boring ("our company values, ethics, coc, posh, rules... etc") but imp, others were interesting and imp (internal tools and how to use them)
i realise now how a company with 40k+ employees work and move forward, and the answer is slowly and carefully. everyone is voicinf out there own concerns and whining, and while some of them are genuine, alot of them are repetitive.
thankfully am a tech guy in an insurance giant, so my role is important enough to be taken seriously. the portals that were not working for me for last 5 days are now somewhat working and i got to know the s/w better.
the only concern i now have is to learn how to patiently wait for actions to happen, and abide by the rule of a system designed to handle all kinds of elements.
one such example : attendance. i didn't thought that attendence would be something i would experience post graduation, but here we got a software which needs to be opened EVERYDAY to mark the attendance, and that too ON COMPANY'S LAPTOP VIA COMPANY VPN . so this would mean taking my laptop everywhere , and physically apply for leaves if otherwise.
this is a bit of a hectic thing as it adds the dependency of my manager. as previously i would be afk for 99% of my day and no one would bat an eye :// i can work @3am-5am in night and no one would care, but here the things are different and difficult :/
------
previous thread : https://devrant.com/rants/6548737/...