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 - "function change"
-
Its Friday, you all know what that means! ... Its results day for practiseSafeHex's most incompetent co-worker!!!
*audience: wwwwwwooooooooo!!!!*
We've had a bewildering array of candidates, lets remind ourselves:
- a psychopath that genuinely scared me a little
- a CEO I would take pleasure seeing in pain
- a pothead who mistook me for his drug dealer
- an unbelievable idiot
- an arrogant idiot obsessed with strings
Tough competition, but there can be only one ... *drum roll* ... the winner is ... none of them!
*audience: GASP!*
*audience member: what?*
*audience member: no way!*
*audience member: your fucking kidding me!*
Sir calm down! this is a day time show, no need for that ... let me explain, there is a winner ... but we've kept him till last and for a good reason
*audience: ooooohhhhh*
You see our final contestant and ultimate winner of this series is our good old friend "C", taking the letters of each of our previous contestants, that spells TRAGIC which is the only word to explain C.
*audience: laughs*
Oh I assure you its no laughing matter. C was with us for 6 whole months ... 6 excruciatingly painful months.
Backstory:
We needed someone with frontend, backend and experience with IoT devices, or raspberry PI's. We didn't think we'd get it all, but in walked an interviewee with web development experience, a tiny bit of Angular and his masters project was building a robot device that would change LED's depending on your facial expressions. PERFECT!!!
... oh to have a time machine
Working with C:
- He never actually did the tutorials I first set him on for Node.js and Angular 2+ because they were "too boring". I didn't find this out until some time later.
- The first project I had him work on was a small dashboard and backend, but he decided to use Angular 1 and a different database than what we were using because "for me, these are easier".
- He called that project done without testing / deploying it in the cloud, despite that being part of the ticket, because he didn't know how. Rather than tell or ask anyone ... he just didn't do it and moved on.
- As part of his first tech review I had to explain to him why he should be using if / else, rather than just if's.
- Despite his past experience building server applications and dashboards (4 years!), he never heard of a websocket, and it took a considerable amount of time to explain.
- When he used a node module to open a server socket, he sat staring at me like a deer caught in headlights completely unaware of how to use / test it was working. I again had to explain it and ultimately test it for him with a command line client.
- He didn't understand the need to leave logging inside an application to report errors. Because he used to ... I shit you not ... drive to his customers, plug into their server and debug their application using a debugger.
... props for using a debugger, but fuck me.
- Once, after an entire 2 days of tapping me on the shoulder every 15 mins for questions / issues, I had to stop and ask:
Me: "Have you googled it?"
C: "... eh, no"
Me: "can I ask why?"
C: "well, for me, I only google for something I don't know"
Me: "... well do you know what this error message means?"
C: "ah good point, i'll try this time"
... maybe he was A's stoner buddy?
- He burned through our free cloud usage allowance for a month, after 1 day, meaning he couldn't test anything else under his account. He left an application running, broadcasting a lot of data. Turns out the on / off button on the dashboard only worked for "on". He had been killing his terminal locally and didn't know how to "ctrl + c a cloud app" ... so left it running. His intention was to restart the app every time you are done using it ... but forgot.
- His issue with the previous one ... not any of his countless mistakes, not the lack of even trying to make the button work, no, no, not for C. C's issue is the cloud is "shit" for giving us such little allowances. (for the record in a month I had never used more than 5%).
- I had to explain environment variables and why they are necessary for passwords and tokens etc. He didn't know it wasn't ok to commit these into GitHub.
- At his project meetups with partners I had to repeatedly ask him to stop googling gifs and pay attention to the talks.
- He complained that we don't have 3 hour lunch breaks like his last place.
- He once copied and pasted the same function 450 times into a file as a load test ... are loops too mainstream nowadays?
You see C is our winner, because after 6 painful months (companies internal process / requirements) he actually achieved nothing. I really mean that, nothing. Every thing was so broken, so insecure / wide open, built without any kind of common sense or standards I had to delete it all and start again ... it took me 2 weeks.
I hope you've all enjoyed this series and will join me in praying for the return of my sanity ... I do miss it a lot.
Yours truly,
practiseSafeHex20 -
Fucking intern.
While I was working next to her a couple weeks back, she spent half her time on social media, playing Candy Crush, or talking with her friend. She also left early almost every day.
I had given her a project to do (object crud + ui), and helped her through it. She made pretty abysmal progress in a week. I ended up finishing it for her by rewriting basically all of her code (every single line except some function names, lone `end` or `}` statements, a few var declarations, blank lines, plus a couple of comments she copied over from my code).
This week I gave her a super easy project to do. It amounts to copying four files (which I listed), rename a few things to be Y instead of X, and insert two lines of code (which I provided) to hook it up. Everything after that just works. It should have taken her ... okay, maybe a few hours because she's slow and new to the language. but it would have taken me five to ten minutes, plus five minutes of testing.
She has spent THREE FUCKING DAYS ON THIS AND SHE'S STILL NOT DONE. SHE'S BLOODY USELESS!
She has kept not pulling changes and complaining that things are broken. Despite me telling her every time I push changes that affect her work (on. my. branch. ergh!)
She keeps not reading or not understanding even the simplest of things. I feel like MojoJojo every time I talk to her because of how often I repeat myself and say the same things again and again.
Now she's extremely confused about migrations. She keeps trying to revert a drop_table migration that she just wrote so she can re-create the table differently. Instead of, you know, just reverting back to her migration that creates the table. it's one migration further.
Migrations are bloody simple. they're one-step changes to the database, run in order. if you want to make a change to something you did a few steps back, you roll back those migrations, edit your shit, and run them again. so bloody difficult!
`rails db:rollback && rails db:rollback`
Edit file
`rails db:migrate`
So. hard.
I explained this to her very simply, gave her the commands to copy/paste, ... and she still can't figure it out. She's fucking useless.
It took me ten minutes to walk her though it on a screen share. TEN FREAKING MINUTES.
She hasn't finished a damned fucking thing in three weeks. She's also taking interview calls while working on this, so I know she totally doesn't care.
... Just.
Fucking hell.
USELESS FUCKING PEOPLE!35 -
<rant>
*Rules For Work*
1. Never give me work in the morning. Always wait until 4:00 and then bring it to me. The challenge of a deadline is refreshing.
2. If it's really a rush job, run in and interrupt me every 10 minutes to inquire how it's going. That helps. Even better, hover behind me, and advise me at every keystroke.
3. Always leave without telling anyone where you're going. It gives me a chance to be creative when someone asks where you are.
4. If my arms are full of papers, boxes, books, or supplies, don't open the door for me. I need to learn how to function as a paraplegic and opening doors with no arms is good training in case I should ever be injured and lose all use of my limbs.
5. If you give me more than one job to do, don't tell me which is priority. I am psychic.
6. Do your best to keep me late. I adore this office and really have nowhere to go or anything to do. I have no life beyond work.
7. If a job I do pleases you, keep it a secret. If that gets out, it could mean a promotion.
8. If you don't like my work, tell everyone. I like my name to be popular in conversations. I was born to be whipped.
9. If you have special instructions for a job, don't write them down. In fact, save them until the job is almost done. No use confusing me with useful information.
10. Never introduce me to the people you're with. I have no right to know anything. In the corporate food chain, I am plankton. When you refer to them later, my shrewd deductions will identify them.
11. Be nice to me only when the job I'm doing for you could really change your life and send you straight to manager's hell.
12. Tell me all your little problems. No one else has any and it's nice to know someone is less fortunate. I especially like the story about having to pay so many taxes on the bonus check you received for being such a good manager.
13. Wait until my yearly review and THEN tell me what my goals SHOULD have been. Give me a mediocre performance rating with a cost of living increase. I'm not here for the money anyway.
</rant>10 -
Today was my last day of work, tomorrow i have officially left that place. It's a weird feeling because i'm not certain about the future.
The job was certainly not bad, and after all i read on devrant i'm beginning to believe it was one of the better ones. A nice boss, always something to eat/drink nearby, a relaxed atmosphere, a tolerance for my occasionally odd behaviour and the chance to suggest frameworks. Why i would leave that place, you ask? Because of the thing not on the list, the code, that is the thing i work with all the time.
Most of the time i only had to make things work, testing/refactoring/etc. was cut because we had other things to do. You could argue that we had more time if we did refactor, and i suggested that, but the decision to do so was delayed because we didn't have enough time.
The first project i had to work on had around 100 files with nearly the same code, everything copy-pasted and changed slightly. Half of the files used format a and the other half used the newer format b. B used a function that concatenated strings to produce html. I made some suggestions on how to change this, but they got denied because they would take up too much time. Aat that point i started to understand the position my boss was in and how i had to word things in order to get my point across. This project never got changed and holds hundreds of sql- and xss-injection-vulnerabilities and misses access control up to today. But at least the new project is better, it's tomcat and hibernate on the backend and react in the frontend, communicating via rest. It took a few years to get there, but we made it.
To get back to code quality, it's not there. Some projects had 1000 LOC files that were only touched to add features, we wrote horrible hacks to work with the reactabular-module and duplicate code everywhere. I already ranted about my boss' use of ctrl-c&v and i think it is the biggest threat to code quality. That and the juniors who worked on a real project for the first time. And the fact that i was the only one who really knew git. At some point i had enough of working on those projects and quit.
I don't have much experience, but i'm certain my next job has a better workflow and i hope i don't have to fix that much bugs anymore.
In the end my experience was mostly positive though. I had nice coworkers, was often free to do things my way, got really into linux, all in all a good workplace if there wasn't work.
Now they dont have their js-expert anymore, with that i'm excited to see how the new project evolves. It's still a weird thing to know you won't go back to a place you've been for several years. But i still have my backdoor, but maybe not. :P16 -
I'm getting ridiculously pissed off at Intel's Management Engine (etc.), yet again. I'm learning new terrifying things it does, and about more exploits. Anything this nefarious and overreaching and untouchable is evil by its very nature.
(tl;dr at the bottom.)
I also learned that -- as I suspected -- AMD has their own version of the bloody thing. Apparently theirs is a bit less scary than Intel's since you can ostensibly disable it, but i don't believe that because spy agencies exist and people are power-hungry and corrupt as hell when they get it.
For those who don't know what the IME is, it's hardware godmode. It's a black box running obfuscated code on a coprocessor that's built into Intel cpus (all Intell cpus from 2008 on). It runs code continuously, even when the system is in S3 mode or powered off. As long as the psu is supplying current, it's running. It has its own mac and IP address, transmits out-of-band (so the OS can't see its traffic), some chips can even communicate via 3g, and it can accept remote commands, too. It has complete and unfettered access to everything, completely invisible to the OS. It can turn your computer on or off, use all hardware, access and change all data in ram and storage, etc. And all of this is completely transparent: when the IME interrupts, the cpu stores its state, pauses, runs the SMM (system management mode) code, restores the state, and resumes normal operation. Its memory always returns 0xff when read by the os, and all writes fail. So everything about it is completely hidden from the OS, though the OS can trigger the IME/SMM to run various functions through interrupts, too. But this system is also required for the CPU to even function, so killing it bricks your CPU. Which, ofc, you can do via exploits. Or install ring-2 keyloggers. or do fucking anything else you want to.
tl;dr IME is a hardware godmode, and if someone compromises this (and there have been many exploits), their code runs at ring-2 permissions (above kernel (0), above hypervisor (-1)). They can do anything and everything on/to your system, completely invisibly, and can even install persistent malware that lives inside your bloody cpu. And guess who has keys for this? Go on, guess. you're probably right. Are they completely trustworthy? No? You're probably right again.
There is absolutely no reason for this sort of thing to exist, and its existence can only makes things worse. It enables spying of literally all kinds, it enables cpu-resident malware, bricking your physical cpu, reading/modifying anything anywhere, taking control of your hardware, etc. Literal godmode. and some of it cannot be patched, meaning more than a few exploits require replacing your cpu to protect against.
And why does this exist?
Ostensibly to allow sysadmins to remote-manage fleets of computers, which it does. But it allows fucking everything else, too. and keys to it exist. and people are absolutely not trustworthy. especially those in power -- who are most likely to have access to said keys.
The only reason this exists is because fucking power-hungry doucherockets exist.26 -
The state of CS is a joke and I'm contributing to it.
I'm a final year CS student and like most students, I'm not exactly overflowing with money so any income helps. Now, it's not that uncommon for students to buy their projects but I swear a good 20% of people from my course don't know how to write a function. And let me remind you, they are in their final year, about to graduate, about to get their bachelor's degree in computer science and they don't know how to write a function, let alone a class, let alone piece together something that works.
I just want to say that no, I'm not proud of myself for doing other people's projects for money and letting such imbeciles pass. I'm fucking tired of sending over someone's project, them asking me to change something and me telling them to add an if statement to which they reply with "i don't know how, pls do it".
This is why having a degree doesn't mean shit anymore and yes, I'm aware that higher education has become more available over time.20 -
Hello, I just want to let you know I'm working on a 15 year old product and it is currently in production.
It uses Angular.js and one of the earliest versions of React.js. I cannot use ES6, we don't have Babel, no JSX syntax, no CSS preprocessor. No webpack.
I must support browser since IE6 with an ES3 syntax. (luckily I got some some polyfills for an ES5 syntax)
When I build a component I have to call React.createClass and React.createElement.
The render() function is basically a nested pile of React.createElement.
There is no documentation for this product, no tests, no anything.
I had to reverse engineer it in order to understand how it works.
The code base uses mixed programming styles and naming conventions, plus thousands of little js files.
Oh and obviously no hot reload, every time I make a change I have to restart everything.
Please, send help.
I'm in danger.
Sincerely,
An underpaid developer
....
I'm not crying, you are crying...19 -
I was assigned a girl that's new to the industry (but with a master's degree).
I had high hopes, as people told me she is quite a curious fellow. As I am just a junior Dev with 2 yrs of experience Ididn't know if I could handle her.
We started working on a project. Which was a change request for a previous project I had developed. I gave her 2 days to read and understand the functional requirements of previous project and this CR. Then explained everything too.
Then I gave here another 3 days to read the previous design document to learn how this code worked.
I asked her multiple times if she has any questions. She said she got everything. Cool.
One week goes by. We start to code the CR while she is shadowing me. I explained why we chose one of the two approaches. And why we are making any of the changes. She as usual nodded in agreement.
I asked her to create Unit test cases.
She couldn't write even one. So, I quizzed her, she knew nothing about the project! Nothing at all!
FUCK!
I wrote down the test cases in short hand and told her to document it (by reffering previous UTC). She wrote the test cases in short hand in the document. And she reused the previous document and did not even clean it out.
After fixing the document I asked her to execute them. But nope, she doesn't even know how the application flows for this project. FML.
It took her 3 days to write and test 8 test cases.
Now she is assigned to me in another project. This one is more complicated. And I gave her a function skeleton to complete. I figured that it will take me 15 minutes so let's give her a day. But nope. 3 days no progress.
I get it someone might not be quick to grasp something. But you know what grinds my gears? That even after this you act like a know it all! Fuck! For someone who hasn't worked with her she is the most dilligent developer.
How the fuck does someone survive masters and suck so bad!22 -
note to self : don't be too humble.
Why?
I just got Roasted in front of Advanced Programming class by a person who got an A in previous class by 100% copying other's work and change all variable and function name to differ.10 -
I can't help but be disappointed in the direction that technology has directed us into, especially social media.
While I love my girlfriend, she more often than not spends her time scrolling away at the dumbest shit on Instagram, Facebook, .. reels. Reels everywhere. And she's not dumb, mind you. She's an engineer just as much as you (presumably) and I are. Just in a different field.
When looking into it online and stumbling upon more than one study, I learned about the term it had been coined.. technoference. That's the constant interruption of social media into our day-to-day lives, and the dopamine kick it gives -- more so than IRL peers do. Why that is, being the digital equivalent to McDonald's, that's beyond me. But somehow it seems to be better, all while the content isn't even useful. It doesn't allow you to learn anything, to gain insights, or to explore things that could serve you in the real world. Cat videos and random shit that's somehow.. funny? Having pretty much completely disconnected from social media years ago, I seriously fail to see how.
Maybe us nerds in the 90's and early 2000's telling everyone else how we'd change the world and prove everyone who called us freaks wrong, disenchanted as we were (and probably still are), were the catalyst for this social disaster. We had the cognitive skills to do it, but not the social equivalent. I feel guilty... Even though I've always been part of a big tech resistance in some capacity, I still feel guilty. Because I'm one of those people with the skills of those who created this trash fire of a societal status quo. Everyone glued to their screens, 95% of the time not for work. Not even to aid one's ability to function in the real world. Just to combat boredom. All day, for many hours on end.
Where is it going to end? When will people realize the dystopia we got ourselves into? Will anyone but a few fight it? Would those who don't fight it even care?11 -
Been reviewing ALOT of client code and supplier’s lately. I just want to sit in the corner and cry.
Somewhere along the line the education system has failed a generation of software engineers.
I am an embedded c programmer, so I’m pretty low level but I have worked up and down and across the abstractions in the industry. The high level guys I think don’t make these same mistakes due to the stuff they learn in CS courses regarding OOD.. in reference how to properly architect software in a modular way.
I think it may be that too often the embedded software is written by EEs and not CEs, and due to their curriculum they lack good software architecture design.
Too often I will see huge functions with large blocks of copy pasted code with only difference being a variable name. All stuff that can be turned into tables and iterated thru so the function can be less than 20 lines long in the end which is like a 200% improvement when the function started out as 2000 lines because they decided to hard code everything and not let the code and processor do what it’s good at.
Arguments of performance are moot at this point, I’m well aware of constraints and this is not one of them that is affected.
The problem I have is the trying to take their code in and understand what’s its trying todo, and todo that you must scan up and down HUGE sections of the code, even 10k+ of line in one file because their design was not to even use multiple files!
Does their code function yes .. does it work? Yes.. the problem is readability, maintainability. Completely non existent.
I see it soo often I almost begin to second guess my self and think .. am I the crazy one here? No. And it’s not their fault, it’s the education system. They weren’t taught it so they think this is just what programmers do.. hugely mundane copy paste of words and change a little things here and there and done. NO actual software engineers architecture systems and write code in a way so they do it in the most laziest, way possible. Not how these folks do it.. it’s like all they know are if statements and switch statements and everything else is unneeded.. fuck structures and shit just hard code it all... explicitly write everything let’s not be smart about anything.
I know I’ve said it before but with covid and winning so much more buisness did to competition going under I never got around to doing my YouTube channel and web series of how I believe software should be taught across the board.. it’s more than just syntax it’s a way of thinking.. a specific way of architecting any software embedded or high level.
Anyway rant off had to get that off my chest, literally want to sit in the corner and cry this weekend at the horrible code I’m reviewing and it just constantly keeps happening. Over and over and over. The more people I bring on or acquire projects it’s like fuck me wtf is this shit!!! Take some pride in the code you write!16 -
My first Windows rant.
I use Spotify heavily. (After all, I am paying for it every fucking month.) In fact, it's safe to say I use it upwards of 12+ hours a day.
My birthday was a few weeks ago. I got a new mechanical keyboard using some money i received as a gift. This keyboard has a function key to launch your media player. Odd function in my opinion. But I figured I would try it out for a week or so.
My problem is: the default media center is that god forsaken piece of shit groove music (not only is it shit, I also have 0 mp3 files on my computer).
No problem, I'll just change the default media center. Fucking Windows doesn't let me change it to Spotify. Odd. Well, I did download it from Spotify's website. Let's try downloading it from the Windows store.
I download Spotify from the Windows store. It still cannot be set to the default media center.
For fuck sake, if Google can let me set Spotify as my default over their shitty YouTube Music that I know damn well they're trying to make as the default for all Android, then you can let me change it Windows.
Yes, I know Spotfiy isn't exactly a media center, but it's basically the same fucking thing.16 -
Today I fell down the rabbit hole.
I've been writing some automated tests which found an asymmetry in our algorithm which I think is caused by an off by 1 in even input dimensions.
Change input to odd dimensions, crash due to out of bounds exception.
Switch to debug mode to try to work out why we crash, failing asserts for default function arguments with no obvious reason beyond a helpful message saying they're unsupported.2 -
"It's just a tiny change in one function. What can go wrong? I don't need to test, I'm not that stupid to mess this up". Apparently I am. Pushed the changes, and the [Firefox] extension basically stopped working. Lost about 1.5k users in 2 days. Good times ;)2
-
!rant
A rather long(it's 8 hrs long to be precise) story
So I just finished an amazing homework assignment. The goal was to open a new shell on Linux using a C program. We were asked to follow instructions from http://phrack.org/issues/49/14.html . However the instructions given were for 32 bit processors and we had to do same for 64 bit machines. In a nutshell we had to write a 64 bit shell code and use buffer-overflow technique to change the return address if the function to our shell code.
I was able to write my own shellcode within 1hr and was able to confirm that it's working by compiling with nasm and all. Also the "show-off-dev" inside me told me to execute "/bin/bash" instead of "/bin/sh"(which everyone else was going to do). After my assembly code was properly executing shellcode, I was excited to put it in my C code.
For that, I needed opcodes of assembly code in a string. Following again the "show-off-dev" inside me, I wrote a shell script which would extract the exact opcodes out of objdump output. After this I put it in my C code, call my friend and tell him that "hell yeah bro, I did it. Pretty sure sir is gonna give me full marks etc etc etc". I compiled the code and BOOM, IT SEGFAULTS RIGHT IN FRONT OF MY FRIEND. Worst, friend had copied a "/bin/sh" code from shellstorm and already had it working.
Really burned my ego, I sat continuously for 8 hrs in front of my laptop and didn't talk to anyone. I was continuously debugging the code for 8 hrs. Just a few minutes ago, I noticed that the shellcode which I'm actually putting in my C code is actually 2 bytes shorter than actual code length. WHAT THE F. I ran objdump manually and copied the opcodes one by one into the string (like a noob) and VOILA ! IT WORKED !!!
TURNS OUT I DIDN'T CUT THE LAST COLUMN OF OPCODES IN MY SHELL SCRIPT. I FIXED THAT AND IT WORKED !!
THE SINGLE SHITTY NUMBER MADE ME STRUGGLE 8 HRS OF MY LIFE !! SMH
Lessons learnt :
1)Never have such an ego that makes you think you're perfect, cuz you're retarded not perfect
2)Examine your scripts properly before using them
3)Never, I repeat NEVER!! brag about your code before compiling and testing it.
That's it!
If you've read this long story, you might as well press the "++" button.6 -
The "Change Password" function autofilled the old password. Dev told be it didn't matter because "if you set the field type to password you can't see it".4
-
VB3.
In my last rant I mentioned I used to convert VB3 code to .Net. Before that, I used to work on the VB3 product itself. This software emulated something from the real world, and as such complied with a bunch of regulations that changed on a regular basis, and always had additions and removals that were to be done on a strict schedule (e.g. "we're adding a new product next month, so we have to be able to sell it by the first of the month"). As such, it was a huge sprawling mess.
One day, I was given a task to change some feature slightly. The task was simple enough and really only required adding one line of code. I added that line and clicked "Run".
Error: Too Much Code
What? What do you mean too much code? I asked a colleague for help. "Oh, don't worry, it happens when a function is too long. Just remove one or two of the comments and try again." The comments were, naturally, old deleted code that was quite meaningless so I had no qualms about removing some. It worked, and I went on with my life.
This started happening on a regular basis on our larger functions. But there were always comments to remove so it wasn't a big issue.
One day, though, it happened on a five-line function. This was puzzling - the error had always happened when a function was too big but this one clearly wasn't. What could the error mean? I went to the same colleague.
Apparently, there's also a limit to how big the entire code base can be. "Just find a function that isn't used any more and delete it." And so I did. There were many such functions, responsible for calculating things which no longer existed so they were never called. For months, I'd find functions and remove them. Until there weren't any more. I checked every function and subroutine in our codebase, and they were all used; I checked every possible code path and they were all needed.
What do I do now, I asked? The colleague, who was an expert on VB3 but worked on another project, came and take a look.
"Look at all these small functions you made! No wonder you're running out of space!" Apparently each function created a lot of overhead in the compiled executable. The solution was clear. Combine small functions into large monolithic ones, possibly passing flags in them to do completely unrelated things. Oh, and don't comment on the different parts because we have no room for comments in our code base.
Ah, the good old days.5 -
At my first big boy job at a start up with only 50 users, we noticed we had cloud cost spikes about 20x larger than we were expecting. I remember spending all night debugging it, checking the requests as they go through.
The culprit? Someone left an async on a UseEffect with a variable that was regularly updated as a parameter.
In other words: every time a request was fired, the variable would change… so the function would sense the variable changed and fire it again, and so on.
Felt like a total hero. -
I've been lurking on devrant a while now, I figure it's time to add my first rant.
Little background and setting a frame of reference for the rant: I'm currently a software engineer in the bioinformatics field. I have a computer science background whereas a vast majority of those around me, especially other devs, are people with little to no formal computer background - mostly biology in some form or another. Now, this said, a lot of the other devs are excellent developers, but some are as bad as you could imagine.
I started at a new company in April. About a month after joining a dev who worked there left, and I inherited the pipeline he maintained. Primarily 3 perl scripts (yes, perl, welcome to bioinformatics, especially when it comes to legacy code like is seen in this pipeline) that mostly copied and generated some files and reports in different places. No biggie, until I really dove in.
This dev, which I barely feel he deserves to be called, is a biology major turned computer developer. He was hired at this company and learned to program on the job. That being said, I give him a bit of a pass as I'm sure he did not have had an adequate support structure to teach him any better, but still, some of this is BS.
One final note: not all of the code, especially a lot of the stupid logic, in this pipeline was developed by this other dev. A lot of it he adopted himself. However, he did nothing about it either, so I put fault on him.
Now, let's start.
1. perl - yay bioinformatics
2. Redundant code. Like, you literally copied 200+ lines of code into a function to change 3 lines in that code for a different condition, and added if(condition) {function();} else {existing code;}?? Seriously??
3. Whitesmiths indentation style.. why? Just, why? Fuck off with that. Where did you learn that and why do you insist on using it??
4. Mixing of whitesmiths and more common K&R indentation.
5. Fucked indentation. Code either not indented and even some code indented THE WRONG WAY
6. 10+ indentation levels. This, not "terrible" normally, but imagine this with the last 3 points. Cannot follow the code at freaking all.
7. Stupid logic. Like, for example, check if a string has a comma in it. If it does, split the string on the comma and push everything to an array. If not, just push the string to the array.... You, you know you can just split the string on the comma and push it, right?? If there is no comma it will be an array containing the original string.. Why the fuck did you think you needed to add a condition for that??
8. Functions that are called to set values in global variables, arrays, and hashes.. function has like 5 lines in it and is called in 2 locations. Just keep that code in place!
9. 50+ global variables/hashes/arrays in one of the scripts with no clear way to tell how/when values are set nor what they are used for.
10. Non-descriptive names for everything
11. Next to no comments in the code. What comments there are are barely useful.
12. No documentation
There's more, but this is all I can think to identify right now. All together these issues have made this pipeline the pinnacle of all the garbage that I've had to work on.
Attaching some screenshots of just a tiny fraction of the code to show some of the crap I'm talking about.6 -
In a test software that I'm working on, there is a variable at the very beginning which has a comment "Don't change this variable!".
Hidden within the code is function to check the value. If the test user change it, a giant ಠ_ಠ appears on the screen.
No one will complain, but I can hear the gasps and the sudden chair movements... 😈1 -
Ok friends let's try to compile Flownet2 with Torch. It's made by NVIDIA themselves so there won't be any problem at all with dependencies right?????? /s
Let's use Deep Learning AMI with a K80 on AWS, totally updated and ready to go super great always works with everything else.
> CUDA error
> CuDNN version mismatch
> CUDA versions overwrite
> Library paths not updated ever
> Torch 0.4.1 doesn't work so have to go back to Torch 0.4
> Flownet doesn't compile, get bunch of CUDA errors piece of shit code
> online forums have lots of questions and 0 answers
> Decide to skip straight to vid2vid
> More cuda errors
> Can't compile the fucking 2d kernel
> Through some act of God reinstalling cuda and CuDNN, manage to finally compile Flownet2
> Try running
> "Kernel image" error
> excusemewhatthefuck.jpg
> Try without a label map because fuck it the instructions and flags they gave are basically guaranteed not to work, it's fucking Nvidia amirite
> Enormous fucking CUDA error and Torch error, makes no sense, online no one agrees and 0 answers again
> Try again but this time on a clean machine
> Still no go
> Last resort, use the docker image they themselves provided of flownet
> Same fucking error
> While in the process of debugging, realize my training image set is also bound to have bad results because "directly concatenating" images together as they claim in the paper actually has horrible results, and the network doesn't accept 6 channel input no matter what, so the only way to get around this is to make 2 images (3 * 2 = 6 quick maths)
> Fix my training data, fuck Nvidia dude who gave me wrong info
> Try again
> Same fucking errors
> Doesn't give nay helpful information, just spits out a bunch of fucking memory addresses and long function names from the CUDA core
> Try reinstalling and then making a basic torch network, works perfectly fine
> FINALLY.png
> Setup vid2vid and flownet again
> SAME FUCKING ERROR
> Try to build the entire network in tensorflow
> CUDA error
> CuDNN version mismatch
> Doesn't work with TF
> HAVE TO FUCKING DOWNGEADE DRIVERS TOO
> TF doesn't support latest cuda because no one in the ML community can be bothered to support anything other than their own machine
> After setting up everything again, realize have no space left on 75gb machine
> Try torch again, hoping that the entire change will fix things
At this point I'll leave a space so you can try to guess what happened next before seeing the result.
Ready?
3
2
1
> SAME FUCKING ERROR
In conclusion, NVIDIA is a fucking piece of shit that can't make their own libraries compatible with themselves, and can't be fucked to write instructions that actually work.
If anyone has vid2vid working or has gotten around the kernel image error for AWS K80s please throw me a lifeline, in exchange you can have my soul or what little is left of it5 -
I'm going to kill management.
After a serious migration fiasco at one of our biggest costumers the platform was finally usable again (after two days instead of 10 hours) and, of course, users started to report bugs. So good old po came in ranting that we as qa did a horrible job and basically tried to fault us for a fucked up update (because we produced user pain, which of course not being able to log in didn't do). Among the issues: If the user has more than a hundred web pages the menu starts looking ugly, the translation to dutch in one string on the third submenu of a widget doesn't work and a certain functionality isn't available even if it's activated.
Short, they were either not a use case or very much minor except for that missing function. So today we've looked through the entire test code, testing lists, change logs and so on only to discover that the function was removed actively during the last major update one and a half years ago.
Now it's just waiting for the review meeting with the wonderful talking point "How could effective QA prevent something like this in the future" and throwing that shit into his face.
I mean seriously, if you fuck shit up stand by it. We all make mistakes but trying to pin it on other people is just really, really low.8 -
Am I the only one who doesn't judge a programmers contributions by commits or change history?
Frequently I'm always near the bottom of contributors, because I don't make a million commits when it's broken. And I don't commit lines that will likely disappear in later commits. I like to finish a function, test it, check it, rework, and then make a "made function()" commit, as apposed to:
"Wrote function()"
"Wrote unit tests for function()"
"Fixed error"
"Code cleanup"
"Style guide compliance"
"Reworked function()"
etc.
Sorry that I keep my commit history clean and ensure it builds.7 -
I’m new to C# and Visual Studio gave me an option to change the way I wrote the main function.
It gave me this.
Does this remind you of fat arrow function in JavaScript?7 -
Consumers ruined software development and we the developers have little to no chance of changing it.
Recently I read a great blog post by someone called Nikita, the blog post talks mostly about the lack of efficiency and waste of resources modern software has and even tho I agree with the sentiment I don't agree with some things.
First of all the way the author compares software engineering to mechanical, civil and aeroespacial engineering is flawed, why? Because they all directly impact the average consumer more than laggy chrome.
Do you know why car engines have reached such high efficiency numbers? Gas prices keep increasing, why is building a skyscraper better, cheaper and safer than before? Consumers want cheaper and safer buildings, why are airplanes so carefully engineered? Consumers want safer and cheaper flights.
Wanna know what the average software consumer wants? Shiny "beautiful" software that is either dirt ship or free and does what it needs to. The difference between our end product is that average consumers DON'T see the end product, they just experience the light, intuitive experience we are demanded to provide! It's not for nothing that the stereotype of "wizard" still exists, for the average folk magic and electricity makes their devices function and we are to blame, we did our jobs TOO well!
Don't get me wrong, I am about to become a software engineer and efficient, elegant, quality code is the second best eye candy next to a 21yo LA model. BUT dirt cheap software doesn't mean quality software, software developed in a hurry is not quality software and that's what douchebag bosses and consumers demand! They want it cheap, they want it shiny and they wanted it yesterday!
Just look at where the actual effort is going, devs focus on delivering half baked solutions on time just to "harden" the software later and I don't blame them, complete, quality, efficient solutions take time and effort and that costs money, money companies and users don't want to invest most of the time. Who gets to worry about efficiency and ms speed gains? Big ass companies where every second counts because it directly affects their bottom line.
People don't give a shit and it sucks but they forfeit the right to complain the moment they start screaming about the buttons not glaring when hovered upon rather than the 60sec bootup, actual efforts to make quality software are made on people's own time or time critical projects.
You put up a nice example with the python tweet snippet, you have a python script that runs everyday and takes 1.6 seconds, what if I told you I'll pay you 50 cents for you to translate it to Rust and it takes you 6 hours or better what if you do it for free?
The answer to that sort of questions is given every day when "enganeers" across the lake claim to make you an Uber app for 100 bucks in 5 days, people just don't care, we do and that's why developers often end up with the fancy stuff and creating startups from the ground up, they put in the effort and they are compensated for it.
I agree things will get better, things are getting better and we are working to make programs and systems more efficient (specially in the Open Source community or high end Tech companies) but unless consumers and university teachers change their mindset not much can be done about the regular folk.
For now my mother doesn't care if her Android phone takes too much time to turn on as long as it runs Candy Crush just fine. On my part I'll keep programming the best I can, optimizing the best I can for my own projects and others because that's just how I roll, but if I'm hungry I won't hesitate to give you the performance you pay for.
Source:
http://tonsky.me/blog/...13 -
Have a function that takes parameters and then performs a switch statement to determine what function to call next with those same parameters. One of those parameters is a Union type.
During CR, my reviewer said they’d like if instead of returning the function per case, I instead assigned a handler to the value of the function per case and then returned that handler at the end of the switch. Simple change, right? Only snafu, I’m casting one of the parameters on a per-case basis.
Somehow, through no fucking change of my own, TypeScript in its wisdom has decided that the type of that value by the time I call the next function is a fucking Intersection.
WHY THE FUCK DO YOU THINK IT’S AN INTERSECTION?! I’m fucking casting it per case! I’m ensuring it’s the right type for the next function called on a per case basis!
…. And that, my friends, is how I wasted a day with a stupid refactor that was ultimately just scrapped because no one could figure out how to make it work.
Goddamn fucking TypeScript. I3 -
Bloody Windows kept waking up after a few seconds of being suspended. Someone here mentioned it could be the mouse, so I disabled its function to wake the pc . And you know what? That piece of trash windows still kept waking up for no reason. Makes me angry.
So I found this magic command 'powercfg/lastwake', which shows the reason for the last wake. And look at that! The fucking realtek network shitcard is allowed to wake windows.
Why would windows enable that on its own? Why? Because I for sure did not make this change and suspend was working for me until a few months ago (yes, these kind of problems take me very long to fix, even though it would tske only two minutes).3 -
I think this is both a blessing and a curse for me.
Whenever I'm developing something, I ALWAYS keep coming up with new (good) feature ideas WHILE programming. Now, this isn't as bad because they enrich the software/service mostly but goddamn, it's so fucking annoying when I'm working on a certain function/feature and I change stuff three motherfucking trillion times before finishing it because I keep coming up with fifteen billion new ideas.
In the end it's all worth it but at some moments it gets really fucking annoying.9 -
Me, the only iOS dev at work one day, and colleague (who we'll call AndroidBoy), the only Android dev at work that same day (he's been working with us for less than two months). There was a change in one of the jsons we received from the server: instead of receiving a list, we now received a dictionary with strings as keys and lists as values. My iOS colleague had already made this modification on our parse function the day before.
AndroidBoy: "Hey what happened with the json?"
Me: "Oh, well instead of parsing a list, we'll parse a dictionary and get the list from each key. You basically have to do the same thing, only this time the lists are organized into categories."
AndroidBoy: "Oh, ok. But I don't know how to parse a dictionary while using Retrofit." (Context: Retrofit is a framework for request handling - correct me if I am mistaken, that's just what I've been told)
Me: "Sucks, dude, can't help ya. I've never worked with that and don't have that much exp. with Android."
I go out for a cigarette break. When I return, AndroidBoy is nowhere to be seen and suddenly I can't seem to get that data in my app. AndroidBoy comes in from the room where the backend colleagues work.
AndroidBoy: "Solved it!"
Me: "Solved what?"
AndroidBoy: "I told them to change back to a list and just put the key inside the objects of the list."
... he used the precious time of the backend colleagues to change the thing back hust because he was too lazy to search how to parse a dictionary. I was so amazed by his answer, that I didn't know whether to laugh, scream at him or punch him in the face. Not to mention the fact that now I had to revert just so he could avoid that extra work.5 -
So we had a class that should have 2 states 0 or 1, you think my coworker would be smart enough to represent it with a Boolean? NO!
Represent the state inside the object as an int then when using the object in a function creates a Boolean that determines the state of the object and after the function done it's job THEN call another function that takes the object and the Boolean and change the int state inside the object depending on the Boolean.
Wouldn't it have been whole lot easier to just you know..... Make the state a Boolean from the start.
When I saw this I knew I was witnessing a miracle of the human mind. God bless!
Ps: it wasn't connected to any kind of API nor server and there are never more than 2 states. It's just some local sequential code so don't assume it had a logical reason it's just a fuck up.5 -
Why would someone in their right mind change a piece of code that was working fine (and it wasn't a complete mumbo jumbo in styling, logic, transparency, was in line with how the project was coded etc..) to use dapper just to call a stored procedure?! Dafaq is wrong with people!?
Or is it just me & I'm overreactig again?!
I hate when people add more stuff to projects that are already overbloated with fw/techologies to do something so trivial.. like adding 6827646 js fw so you can use one function in each (or are simply still there because they didn't know how to use it and left it in project) which could easily be achieved with our own fw we use...wtf?! O.o
// me cringing, cussing etc..4 -
I want to share this story and need your advise.
When I was teaching exisiting team members about git and new iOS development ecosystem. I was changing the whole ios development practices and processes that time. One of my teammates wasn’t listening, when implementing the new ios development practices and standards, he actually screwed all of the projects.
He’s been with us for 2 years and he even don’t know how to use git. He forcefully push his changes without pulling our changes first. I was so angry that I reported him to my manager to address this matter. And then my manager told me, he is aware of my teammate’s incapabilities. He said he was planning to terminate him, and he is been thinking about it for 3 months.
When the judgement day came, we were in the meeting room. My manager told us the bad news that one of us will be terminated. During the meeting he said, “I am sorry, {my teammate’s name}. You will be out of the team due to {reason of termination}. {my name} reported to me that you dont meet the deadline, you are always late with 2 weekly sprint to your tickets”. As my manager keeps talking, my teammate look at me with his eyes so angry together with his girlfriend (her girlfriend is part of mobile team, but she is focused on UI/UX).
After my manager stops talking, her girlfriend started crying and said I was the one who should be terminated. Her reason was that I keep on giving difficult tasks to his boyfriend, that’s why he is always late to report. In my defense, those tasks are not difficult, most of his tasks is just changing the color of labels, changing layouts. If you are an iOS developer you know how easy it is to change font colors, changing the layouts using storyboards. Her girlfriend keeps on rambling that I should be the one needs to be terminated.
After few days, he left the team and surprisingly his girlfriend stayed and we never talk to each other except anything about work.
I am really pissed guys. Now my teammates think I am the bad guy asking my manager to terminate anyone in the team if I feel to. I feel very very not good in my work now. I can’t function what I used to. The termination of my teammate was already planned why am I should take the blame?16 -
Joined a new team at work 6 months ago. Immediately set upon by a useless PO who was somehow set in her ways while still being around 30 years old. Absolutely refused to change the broken team dynamic or processes in any way whatsoever. Made terrible tickets, never did refinement on tickets so they were always missing stuff and constantly blocked. Generally unlikeable and difficult to work with, incompetent at her job and resolutely refused to change literally anything to make the team function better.
She finally leaves after 6 months and the team dynamic changes immediately. Suddenly we are improving our processes, getting stakeholder input, refining tickets, taking reasonable amounts of work in a sprint. We have discussions without her butting in and getting frustrated when you bring up legitimate concerns. No longer do you have to tiptoe around and appease her ego if you want to point out the obvious flaws in the work she drew up or even just examine it from a technical perspective.
It's insane how much things can improve once you shed the dead weight of people that are just determined to be difficult and won't budge an inch to change their ways. Good riddance.4 -
Not necessarily a "language" per se, but goddamn do I love git's rebase function. I mean, that shit lets you rewrite history!
Just imagine how the world would change if we could do a rebase on it. 🤔2 -
did you know, that in PHP, you can do:
if ( ! function_exists('function_name'))
{
function function_name()
{
//code of the function
}
}
which apparently means you can do
if($var == 'something'){
function functionName(){
//some code
}
} else if($var == 'something else'){
function functionName(){
//some completely different code
}
}
so now, apparently:
1. before this code executes, the function doesn't exist at all (okay, i can live with that)
2. after this code executes, any call to that function can result in any of those two completely different bodies of the same-name function executing, depending on what the $var was set at that time?
...so... now not only the same call to the same(name) function can do two completely different things, *but if you change the value of $var afterwards, you can't even properly find out which version of that function is in effect for the remainder of the run of the script*...?????
WHAT.
THE.
...i mean... I can't help but think that the idea of conditional function declaration like this is... kind of cool (have I been warped by JavaScript too much?), but at the same time... WHAT THE FUCK.18 -
Today, I was so certain that all the functionalities were implemented to handle some webhook calls from a third-party service. It's a script I wrote that has been running for 2+ years uninterrupted or without any issues.
We got some "complaints/notices" today that some "special" actions weren't registered, so I thought that the third-party service just didn't send those actions via their webhook. After some research I found a part where they explained that those actions trigger the webhook like any other action etc. So..
First thought: "okay, maybe they implemented that at a later stage" (was not the case)
Second thought: "maybe this is not what the client meant" (it was)
Third thought: "Then it should have been implemented" (it wasn't)
Okay, time to look at the code to see where this could get handled but apparently isn't. All the actions look good, nice, clean handeling etc, nicely documented code (gave the 'past-me' mentally a high-five)..
I scroll further down to that specific action and it was quiet obvious why it didn't work.. I just see an empty function with the comment:
"//TODO: maybe handle this action one day. don't know what this does atm, probably unused.. Will take a look at it next week.."
.. :D
I took my 'high-five' back..I just needed to copy-paste some other code and change 1-2 parameters..1 -
So recently I needed to make a little Tic-tac-toe game with Node.JS for an university project. I previously learned Java and C# so Javascript as a non-compiled, script based language was something new for me.
Now during the programming process I reached the point where I needed to implement a function to change the player who's playing.
I was testing the game and... It seemed like the player was changed twice so it immediately switched back to the previous player.
Using a lot of console.log's I finally stumbled upon the error... (since Javascript or at least Visual Studio Code, I honestly don't know, doesn't have any kind of debugger or something).
Why the fuck does js allow to make allocations in if conditions?
I accidentally wrote one '=' instead of three '==='.
No error, no warning... Nothing.
Since then js and me are not friends anymore.8 -
So lets start here, as i have been preparing myself for a while for that rant. I have been putting it off for a while, but today I had enough.
Fuck react-native and fuck facebook react-native team. Bunch of lazy incompetent twats.
The all amazing framework that suppose to be speed up your development process, since you don't have to compile your code after each change. SO FUCKING WHAT if the god damned framework is so fucking buggy and so fucking shit that you constantly have to fix build, dependancies etc issues. Every day since I work on this project that is using react-native I have to deal with some of the react fucked up behaviour. You got an issue ? don't worry google it just to find out that 100 other people had the same issue. Scroll through down the bottom of the page just to find out that facebook devs have closed the issue as resolved (without fucking fixing it) because there wasnt recent replies to the post. Are you fucking kidding me? It's ok thou, create a new issue just to get an automatic reply from the bot that locks the thread and keeps it locked till you update your React-native version to the newest one. You do that and guess fucking what? Their newest version fucks up remote debugging on iOS(fucking android been broke for over a year) so say good bye to debugging your js code. Documentation is fucking trash. You found a nice function like autoCaptialise on your text input? Great! Ah wait, its not fucking working, what is wrong? You google this just to fucking found out it, function never worked on android, so why the fuck you still have it exposed and still have it in your docs? You want to add package? So fucking ez, just type npm install <name of the package>. Ha! fuck you, you still have to go and add them fucking manually in gradle in android and in pod in xcode, because obviously react-native is a one big fucking bullshit. Oh and a scroll view is a fucking glorious highlight of that framework, try add some styling to it, you gonna have loads of fun. Fuck react-native. And fuck the fucking idiot who convinced my boss that framework is so fucking great and now I have to work on this shit. Sincerely Xamarin Developer.9 -
"Ok guys. These files are just too big. If we change 'function' to 'f' - and 'var' to 'v' - and just make every keyword and variable possible: a 1-letter key, things will be much tidier and I can get back to focusing on work. It's just too messy."8
-
No wonder my Python code was broken. I called the super function of the wrong ancestor 🙄 Lesson learned: run the tests after every functional change, no matter how trivial it might seem.2
-
dev, ~boring
This is either a shower thought or a sober weed thought, not really sure which, but I've given some serious consideration to "team composition" and "working condition" as a facet of employment, particularly in regard to how they translate into hiring decisions and team composition.
I've put together a number of teams over the years, and in almost every case I've had to abide by an assemblage of pre-defined contexts that dictated the terms of the team working arrangement:
1. a team structure dictated to me
2. a working temporality scheme dictated to me
3. a geographic region in which I was allowed to hire
4. a headcount, position tuple I was required to abide by
I've come to regard these structures as weaknesses. It's a bit like the project management triangle in which you choose 1-2 from a list of inadequate options. Sometimes this is grounded in business reality, but more often than not it's because the people surrounding the decisions thrive on risk mitigation frameworks that become trickle down failure as they impose themselves on all aspects of the business regardless of compatibility.
At the moment, I'm in another startup that I have significantly more control over and again have found my partners discussing the imposition of structure and framework around how, where, why, who and what work people do before contact with any action. My mind is screaming at me to pull the cord, as much as I hate the expression. This stems from a single thought:
"Hierarchy and structure should arise from an understanding of a problem domain"
As engineers we develop processes based on logic; it's our job, it's what we do. Logic operates on data derived from from experiments, so in the absence of the real we perform thought experiments that attempt to reveal some fundamental fact we can use to make a determination.
In this instance we can ask ourselves the question, "what works?" The question can have a number contexts: people, effort required, time, pay, need, skills, regulation, schedule. These things in isolation all have a relative importance ( a weight ), and they can relatively expose limits of mutual exclusivity (pay > budget, skills < need, schedule < (people * time/effort)). The pre-imposed frameworks in that light are just generic attempts to abstract away those concerns based on pre-existing knowledge. There's a chance they're fine, and just generally misunderstood or misapplied; there's also a chance they're insufficient in the face of change.
Fictional entities like the "A Team," comprise a group of humans whose skills are mutually compatible, and achieve synergy by random chance. Since real life doesn't work on movie/comic book logic, it's easy to dismiss the seed of possibility there, that an organic structure can naturally evolve to function beyond its basic parts due to a natural compatibility that wasn't necessarily statistically quantifiable (par-entropic).
I'm definitely not proposing that, nor do I subscribe to the 10x ninja founders are ideal theory. Moreso, this line of reasoning leads me to the thought that team composition can be grown organically based on an acceptance of a few observed truths about shipping products:
1. demand is constant
2. skills can either be bought or developed
3. the requirement for skills grows linearly
4. hierarchy limits the potential for flexibility
5. a team's technically proficiency over time should lead to a non-linear relationship relationship between headcount and growth
Given that, I can devise a heuristic, organic framework for growing a team:
- Don't impose reporting structure before it has value (you don't have to flatten a hierarchy that doesn't exist)
- crush silos before they arise
- Identify needed skills based on objectives
- base salary projections on need, not available capital
- Hire to fill skills gap, be open to training since you have to pay for it either way
- Timelines should always account for skills gap and training efforts
- Assume churn will happen based on team dynamics
- Where someone is doesn't matter so long as it's legal. Time zones are only a problem if you make them one.
- Understand that the needs of a team are relative to a given project, so cookie cutter team composition and project management won't work in software
- Accept that failure is always a risk
- operate with the assumption that teams that are skilled, empowered and motivated are more likely to succeed.
- Culture fit is a per team thing, if the team hates each other they won't work well no matter how much time and money you throw at it
Last thing isn't derived from the train of thought, just things I feel are true:
- Training and headcount is an investment that grows linearly over time, but can have exponential value. Retain people, not services.
- "you build it, you run it" will result in happier customers, faster pivoting. Don't adopt an application maintenance strategy
/rant2 -
just quit my job, and the last push i do is changing all the literal string contained in variable and/or stdout to base64 encoded string. and change it to call my secretely placed decoder function.
Everything is working normally guys! *walks away into darkness*10 -
Frustrated that my build system wasn't recognizing a file change I added to my code. It kept telling me that a function didn't exist in the linked object (linker error). I checked everything and stared at this shit for about 15 minutes or more. The signature matched, the function existed, the relevant source files existed. I was starting to imagine impossible scenarios. I cleaned the project and recompiled. No errors, everything linked just fine. Fuck you? I guess...
So I decided to needed to walk around so I went into my bosses office.
me: I don't want to program anymore.
boss: What do you want to do?
me: Shovel shit.
boss: They are the same thing.
me: True...
TLDR: Tool and possibly skill issue results in frustration and humor.6 -
Dear Coffee,
I ask for your help.
I need to pass this exam, and at the same time a client is angry.
I invoke you.
Like the function I'm in.
A function of time, a function that will probably never halt but you cannot prove it. You hope it will stop soon, but deep inside you know it will continue to compute.
I beg you, Coffee. Make this function of procrastination stop. Please.
I see no escape.
It is a tail-recursive function. You realize it as soon as you reach the end.
You can do nothing about it, you're trapped inside this loop. At each iteration you hope to reach the bottom, but you never know. You can only hope that the bottom is close.
This is the last one, you keep repeating to yourself.
Please Coffee, let it be a non-pure function.
Make the environment change.
Only then we can be saved.3 -
It took me way too long to understood what I wrote few weeks ago. After looking at the code for few minutes and looking at my db structure, I finally realized. I also instantly remembered that I wrote that "user is shown as ad" comment hoping I will not confuse myself in future. Apparently I failed.
Temporarily added next line of comment to help the future me.
Deep down I know that I should change function name itself to become clearer, more meaningful and easier to understand.
But writing that comment, making those screenshots, combining the 2 images in Pinta and writing this rant is faster than thinking the new name.3 -
Ah, developers, the unsung heroes of caffeine-fueled coding marathons and keyboard clacking symphonies! These mystical beings have a way of turning coffee and pizza into lines of code that somehow make the world go 'round.
Have you ever seen a developer in their natural habitat? They huddle in dimly lit rooms, surrounded by monitors glowing like magic crystals. Their battle cries of "It works on my machine!" echo through the corridors, as they summon the mighty powers of Stack Overflow and Google to conquer bugs and errors.
And let's talk about the coffee addiction – it's like they believe caffeine is the elixir of code immortality. The way they guard their mugs, you'd think it's the Holy Grail. In fact, a developer without coffee is like a computer without RAM – it just doesn't function properly.
But don't let their nerdy exteriors fool you. Deep down, they're dreamers. They dream of a world where every line of code is bug-free and every user is happy. A world where the boss understands what "just one more line of code" really means.
Speaking of bosses, developers have a unique ability to turn simple requests into complex projects. "Can you make a small tweak?" the boss asks innocently. And the developer replies, "Sure, it's just a minor change," while mentally calculating the time it'll take and the potential for scope creep.
Let's not forget their passion for acronyms. TLA (Three-Letter Acronym) is their second language. API, CSS, HTML, PHP, SQL... it's like they're playing a never-ending game of Scrabble with abbreviations.
And documentation? Well, that's their arch-nemesis. It's as if writing clear instructions is harder than debugging quantum mechanics. "The code is self-explanatory," they claim, leaving everyone else scratching their heads.
In the end, developers are a quirky bunch, but we love them for it. Their quirks and peculiarities are what make them the creative, brilliant minds that power our digital world. So here's to developers, the masters of logic and the wizards of the virtual realm!13 -
Don't reuse your fixtures!
Each test case should be isolated. Don't ever think just because some function requires a similar input, it's safe to reuse it ALL OVER THE PLACE.
Why? Because someday, you want to change one functionality of one unit.
And you adapt your tests, fix your code, and suddenly, by changing one fixture, you break dozens if not hundreds of unrelated tests and now you have to clean up that mess.
It's even worse for functional tests with all those interwoven parts so that it becomes hard to reason about the scope of your tests when lacking proper documentation.
How I know? BECAUSE I AM CLEANING UP YOUR MESS RIGHT NOW!3 -
Right.. I spent the hours leading up to the year change by adding a YouTube to MP3 downloader into my Telegram bot. After a bit of fiddling it turned out okay, and the commit for it was mentioned to the last for the year 2020.
I mentioned this in one of my chats, and users came in with more issues. Told them it's the last commit for the year and I'll keep myself to it. I did adjust the code a bit though to fix those issues, awaiting a commit after midnight.
Midnight passes and 2020 turns into 2021.
I commit the new features, and quickly implemented another one I already thought of as well, but needed its own commit.
Quickly afterwards it turns out that the /mp3 feature actually breaks the bot somewhat, especially on long tracks. Users add a slew of 10h songs into what essentially became a long queue of single-threaded bot action (or rather lack thereof).
I made the /mp3 command accessible to myself only like I did with some other administrative commands already. Still no dice, the bot rejected the commands but executed part of the /mp3 command anyway.
I look a bit further into the code and it turns out that while I was restructuring some functions, I forgot to make the admin() function exit the script after it sends the rejection onwards. This was a serious security issue and meant that all authentication was void. Fortunately the chat did not realize this - one of the commands that became available as a result was literally a terminal on the bot's system.
I fix the issue in 7 commits after midnight total, 3 of which were related to /mp3 and admin(). We're now 1 hour after midnight.
Happy New Year everyone... :')6 -
Building a website using Wordpress and Visual Composer for a client is pretty easy, right?!
Until the clients wants to change one of the icons to sofa “you can’t use image, and visual composer has a list of only 5 icon libraries and none of them has a fucking sofa icon”.
Manager says just do it today!
Ok no problem.. just had to figure how visual composer communicate with the libraries to show them in the module area, edit the function, create the font/svg files for the new icon, edit the css file of one of the libraries to add the icon. And boom its working fine!
No tutorial about this stuff so had to figure it out by reading the code and see how they did it so I can do it.
After finishing this, they just gave me few more changes as I have done nothing.
Thank you5 -
So I met this person via a social platform.
They were absolutely silly and weren't able to hold a conversation. So I, like a normal person, just stopped trying to keep things alive.
Over the years, I have realised and learnt that if a person is interested in being friends, they'd put in efforts and I alone will not have to drag things on my shoulder.
I started cutting out people right, left, and center who I felt were taking advantage of me or using me in some way or another.
I ended up saving a lot of time and energy. I no longer feel drained or anxious about something not working out. Not dragging saved me from draining.
Anyway, they reach out to me again after few weeks and I was like let's give it a try to establish a friendship, because befriending people is my weak point.
The cycle repeats. At first I thought it must be because of the asynchronous nature of the platform so I drop my Telegram Id in case they preferred an IM approach.
I swear in the name of sweet lord, the retard does the same behaviour. So, I stopped communication.
And one fine day, the person tells me that they lack social skills and want to learn how to make friends and stuff.
Very fair point. So, me being me, gave them a few tips and critically pointed out their behaviour on how they reply with a one liner after every 2 or 3 business days.
Absolutely no change in their behaviour. They kept texting me the same.
At this point, I was like why am I doing it? I could find better people easily. Because for me, communication is everything. I cannot function without a good communication between two living beings.
So, I asked them why are they even trying to learn social skills when they barely implement it and don't want to change to which they reply saying that so they can use it to befriend people and network to getter better job opportunities.
I fuck them off.
And fuck such people who have intentions, are not clear enough about it, and play people for their own selfish gains.
And this where another learning I got from @scout is have boundaries.
Why do all good people in my life leave? Damn it! I need those good people back and be friends with them and not retards who cannot even communicate beyond one liner.11 -
I have been debugging for like hours trying to figure out the cause an unknown bug spoiling my UI by making my elements overlap.
I'm working on a Unit Converter that takes kWh and then converts to mWh. (Logical Conversion: 1000 kWh = 1 mWh).
Just an easy shit i thought, using Javascript I just passed the dynamically generated kWh value to a function that takes maximum of 6 chars and multiply it by 0.001 to get the required result but this was where my problem started. All values came out as expected until my App hits a particular value (8575) and outputs a very long set of String (8.575000000000001), i couldn't figure the cause of this until i checked my console log and found the culprit value, and then i change the calculation logic from multiply by 0.001 to divide by 1000 and it came out as expected (8.575)
My question is that;
Is my math logically wrong or is this another Javascript Calculation setback?13 -
The company I work for uses Coldfusion which is a dead technology in my opinion. I was tasked with using a data grid for our data from our mssql databases. This data grid I was trying out uses ajax to make a call to the server and expects the data transfered back in Json format. well coldfusion sucks balls because it's serializeJson function returns a outdated JSON structure and I can't use it. So obviously this datagrid throws errors and when I try looking up coldfusion solutions online or scope out stack overflow, the posts are dated like 6 years back because no one fucking uses CF anymore. My boss loves to jerk to it, it seems because he refuses to change languages cause its all they have ever used. -_- this is 2016 bitch lol6
-
Hello and welcome, to a presentation in which I will tell you my thoughts on the shortcomings of modern day computers and programming practices.
Computers are based on a very fundamental and old idea, folders, and files, a file is basically a concrete amount of data, whereas a folder is a group of files, and it comes from the real life concept of files and folders, now it might be quite obvious already that using a concept invented in 1898 by a guy called Edwin G. Seibels, might not be the best way for computers to function in the year 2020, but alas, it is.
Unless of course, you step into the world of a programmer.
A programmer’s world is much different, they use this idea of a data structure, or in simpler terms, an object. An Object is just like what you would think of as an object in your head, something with different properties that you can think about in different ways, for example your mobile phone, it has a battery percentage, it has a screen size, it has free space available. Programmers use these data structures to analyse data very quickly, like finding all phones with a screen size bigger than a certain size for example.
The problem is that programmers still use files and folders to create the programs that use these objects.
Consider this example.
Let’s say you want to create a virtual version of a drink bottle, consider what properties it will have, colour, volume, height, width, depth, material, etc..
As a programmer, you can leverage programming features and change the properties of a drink bottle directly, if you wanted to change the colour, you just say, drink bottle “dot” colour, equals blue, or red.
But if the drink bottle was represented as a file, all the drink bottles data would be inside the one file, so you would have to open the whole file, find the line or section of the file that has the colour data of the drink bottle, and select it, highlight it, delete what’s there, and type in your new value.
One way to explain this better is to imagine a folder that now represents the drink bottle, imagine adding a new file into that folder that represents each property I described before, colour, volume, etc.., well now, you could just open that folder, find the file for colour, either by looking with your eyes or you could do a file search in the folder for a file called colour, open it, and edit the value inside. This way of editing objects is the one that more closely represents the way programmers and a program itself interacts with objects inside a running programming language.
But the thing is, programmers don’t use the folder/file way of creating objects and putting them into programs, because it would be too cumbersome, they just create 1 file for an object, or have lots of objects in a file, and create all the objects in 1 file, and then run the program which creates the objects, then when they stop the program, it deletes the objects. So there is no actual link between the object in a file and the object that the program creates by reading the data from that file, if you change the object in your program, it does not get saved to the file.
So programmers created databases to house these objects, but there is still a flaw in databases, they are hard to interface with, and mostly databases are just used to send data or retrieve data from, programmatically, you can’t really browse a database the way you can browse the files on your computer. You can, but database interfaces are not made to be easily navigated the way files and folders are.
As it stands, there is no way to store objects instead of files on your computer and interact with them in complex ways the way programmers can inside the programs they create.
If the idea of an object became standard the way a file and folder is standard, I think it would empower human’s a great deal to express things far more easily and fluidly than they can today.
Thanks for reading.8 -
You know what feels good?
When you take a peek inside a class that you wrote 6 months ago that performs a vital, but complex function, that you've been using (and taking for granted) on a daily basis, and it's the first time you ever have to debug in there, and when you do, there was actually nothing you had to change and it was clear as fuck what it was doing.
That's a good feeling. -
> do you feel sorry for freelancing contractors
> whose previous client abandoned them
> they ask you to help them fix some trivial bugs in the shitty code
> you believe you can change the world by going overboard by also improving the code quality, along with fixing the bugs
> initialize an empty file where you'll translate the shitty code into a more organized one
> start creating variables and generic functions which can be used in a modular and organized fashion
> meticulously document the first function you write
> realize this is not worth your time
> insert some glue code into the original code which fixes the trivial bugs
> glue code has hard coded values so it adds to the shittiness of the code
> submit the work
> get $$$ -
Consultant: "I don't agree with that, it's got to be something else" when you point to a known fault with the function they are using in the framework.
Then you send them 10 articles from stackoverflow and the framework's own website.
Consultant: "Oh. Thank you."
Just let me fix the damned bugs and not have to justify every single fucking change I have to make to make the damned thing work the way it is fucking supposed to.
This is why we can't have nice things. -
Got one right now, no idea if it’s the “most” unrealistic, because I’ve been doing this for a while now.
Until recently, I was rewriting a very old, very brittle legacy codebase - we’re talking garbage code from two generations of complete dumbfucks, and hands down the most awful codebase I’ve ever seen. The code itself is quite difficult to describe without seeing it for yourself, but it was written over a period of about a decade by a certifiably insane person, and then maintained and arguably made much worse by a try-hard moron whose only success was making things exponentially harder for his successor to comprehend and maintain. No documentation whatsoever either. One small example of just how fucking stupid these guys were - every function is wrapped in a try catch with an empty catch, variables are declared and redeclared ten times, but never used. Hard coded credentials, hard coded widths and sizes, weird shit like the entire application 500ing if you move a button to another part of the page, or change its width by a pixel, unsanitized inputs, you name it, if it’s a textbook fuck up, it’s in there, and then some.
Because the code is so damn old as well (MySQL 8.0, C#4, and ASP.NET 3), and utterly eschews the vaguest tenets of structured, organized programming - I decided after a month of a disproportionate effort:success ratio, to just extract the SQL queries, sanitize them, and create a new back end and front end that would jointly get things where they need to be, and most importantly, make the application secure, stable, and maintainable. I’m the only developer, but one of the senior employees wrote most of the SQL queries, so I asked for his help in extracting them, to save time. He basically refused, and then told me to make my peace with God if I missed that deadline. Very helpful.
I was making really good time on it too, nearly complete after 60 days of working on it, along with supporting and maintaining the dumpster fire that is the legacy application. Suddenly my phone rings, and I’m told that management wants me to implement a payment processing feature on the site, and because I’ve been so effective at fixing problems thus far, they want to see it inside of a week. I am surprised, because I’ve been regularly communicating my progress and immediate focus to management, so I explain that I might be able to ship the feature by end of Q1, because rather than shoehorn the processor onto the decrepit piece of shit legacy app, it would be far better to just include it in the replacement. I add that PCI compliance is another matter that we must account for, and so there’s not a great chance of shipping this in a week. They tell me that I have a month to do it…and then the Marketing person asks to see my progress and ends up bitching about everything, despite the front end being a pixel perfect reproduction. Despite my making everything mobile responsive, iframe free, secure and encrypted, fast, and void of unpredictable behaviors. I tell her that this is what I was asked to do, and that there should have been no surprises at all, especially since I’ve been sending out weekly updates via email. I guess it needed more suck? But either way, fuck me and my two months of hard work. I mean really, no ego, I made a true enterprise grade app for them.
Short version, I stopped working on the rebuild, and I’m nearly done writing the payment processor as a microservice that I’ll just embed as an iframe, since the legacy build is full of those anyway, and I’m being asked to make bricks without straw. I’m probably glossing over a lot of finer points here too, just because it’s been such an epic of disappointment. The deadline is coming up, and I’m definitely going to make it, now that I have accordingly reduced the scope of work, but this whole thing has just totally pissed me off, and left a bad taste about the organization.10 -
Pentesting for undisclosed company. Let's call them X as to not get us into trouble.
We are students and are doing our first pentest at an actual company instead of assignments at school. So we're very anxious. But today was a good day.
We found some servers with open ports so we checked a few of them out. I had a set of them with a bunch of open ports like ftp and... 8080. Time to check this out.
"please install flash player"... Security risk 1 found!
System seemed to be some monitoring system. Trying to log in using admin admin... Fucking works. Group loses it cause the company was being all high and mighty about being secure af. Other shit is pretty tight though.
Able to see logs, change password, add new superuser, do some searches for USERS_LOGGEDIN_TODAY! I shit you not, the system even had SUGGESTIONS for usernames to search for. One of which had something to do with sftp and auth keys. Unfortunatly every search gave a SQL syntax error. Used sniffing tools to maybe intercept message so we could do some queries of our own but nothing. Query is probably not issued from the local machine.
Tried to decompile the flash file but no luck. Only for some weird lines and a few function names I presume. But decompressing it and opening it in a text editor allowed me to see and search text. No GET or POST found. No SQL queries or name checks or anything we could think of.
That's all I could do for today. So we'll have to think of stuff for next week. We've already planned xss so maybe we can do that on this server as well.
We also found some older network printers with open telnet. Servers with a specific SQL variant with a potential exploit to execute terminal commands and some ftp and smb servers we need to check out next week.
Hella excited about this!
If you guys have any suggestions let us know. We are utter noobs when it comes to this.6 -
Just a quick rant on JavaScript,
So there’s a lot of people hating javascript, and while not a long time ago i was part of them, but I changed my opinion a little.
I think JavaScript is a great way to deal with website programming as it is quick and efficient, but I would not say to program directly on it, use a js-compilable language (CoffeScript, TypeScript, Kotlin(I think), etc.), but then you might say: “Well, no need for js then, compile it in byte code”. That would break the point of how I see web design/dev. The main intent behind webpages is to have an easy and fast way to send code to other computers to render them, that’s why it is interpreted: “Easy to send” and “*All* computers can handle it” with the proper browser. You need to be able to change the way the website is rendered and/or works sometimes, for diverse reasons like copy/pasting data, make it render properly or use plugins/add-ons to change that code to suit your needs.
I think js should be kept as a “readable byte-code”, so that means: {
Keep comments when compiling the js-compilable code,
Add standardized machine-readable comments that will indicate to smart code viewers how to show a particular thing (Like have a higher-end function compiled in js shown as a minimized code with explanations of the function)
Keep it nicely formated and don’t obfuscate (coz that’s annoying)
Etc.
}
So you bypass the quirks and all that pesky js stuff, while keeping it’s good sides.
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Part 2:
Web design for non-web:
Ok so things like node.js, electron, react-native and all that stuff; I won’t say they’re bad but...
Why we have this is because web designers wanted to make desktop apps and were like “Hey! Making web pages is easy! Let’s port it to desktop”, the problem is: Web technologies were made to work on a restricted canvas, aka a browser. It’s good on web for reasons mention earlier and more. But it’s not on desktop! You’re trying to push it outside of those boundaries. It’s difficult to make it break that canvas and go outside, make something that really works! For social media clients and that kind of stuff that you want to make a little more inclusive, yes! it’s a great idea (hello devrantron ;), but not if it’s an exact same copy of the website, just use the website. But for things that are supposed to really make use of YOUR computer; no!
I see those PWA (progressive webapps aka mobile app, but it’s an offline website”), I stand for the same positions, social media and those sort of things: yes, great idea! Games? 🤢.
I have way more to say but I have difficulties to remember them while reading, so feel free to comment your thoughts
Lol, “just a quick rant”1 -
So we released to production today (Friday), not my decision.
All pages work fine expect for the one page which I added a new feature.
It worked fine in Chrome and Edge. But after release a customer who requested the feature said it doesn't work for him. Screenshot showed he was using IE.
Horror time.. it was evident that it has to be the changes to the JavaScript I did, but why does the whole page doesn't work.
So I started debugging. Nothing works on that page in IE11, it doesn't even load the fucking script file. Then I dared to change mode to IE10, it actually gave me an error in my script file. The bad IE has actually picked a mistake that other browsers didn't.
So, the mistake is fun part too.
I had the following jQuery (or Jake Weary) call
$.getJSON(
'/url',
{
argA: a, argB, b, argC:c
},
function (){
// did something
}
);
In second argument, I accidentally typed comma instead of colon. Chrome and Edge ran the script perfectly passing all the arguments.IE 11 failed to load script without giving any error and only IE 10 gave an error of expecting a colon.
I do not know which browser to blame.
PS I didn't try in Firefox, safari, etc.2 -
Learning C and just wrote a function to reverse chars in a char array (ex. "Hello" -> "olleH") but the array did not change.
It took me way to long to realize: I forgot to divide the length variable by two. So it reversed the array back everytime...6 -
So, today I revisited my 5 months old code and was like "What? Did I really wrote this horrible code?" 😐️ 🙂️ 😃️🔫️
```js
setState((initVal) => {
initVal.food = 'burger';
return initVal;
});
```
The function above change its argument's value, which is terrible thing to do, since it will also change the original value passed to the function. A variable's value for example. Making it an impure function.6 -
So I now bought an iphone 6 again for development and tried just for fun to make it a daily driver and it feels really limited, especially because apparently theres no jailbreak yet for 11.2.5. (I feel near everything could be solved as soon as cydia etc. get fully released to the alibaba jailbreak)
I didnt even remember, that it doesnt have any option to have haptic feedback when typing, such a basic feature has to be jailbroken..? I thought I remembered that it had it, last time I had one - did they remove such a basic feature?
Also the fingerprint reader is really weird compared to other phones from the same year, first getting it to actually fill all fingerprint lines without saying "try again" or it trolling you and vibrating as if it recognized your finger, but actually didnt (really frustrating when its the last 2 lines...) - is a real challenge, might be that I have some mutant fingerprints, but when I asked my s/o to try it out, it also failed most of the times, so you have to position your finger in a very specific position for it to work, even if you add the max amount of 5 fingerprints.
Most ads on iphones feel HORRIBLE, the amount of lag some can add is incredible, wait till it loaded or youre fucked and besides using some shady adblocker vpn, theres no way to block them, without again - a jailbreak.
Another feature that I used many times on my android phone, is controlling it from the desktop, connect it via usb and then just use it for demonstration purposes on a projector or to instruct how things work - theres no such function without a jailbreak, even if you use osx..
Then theres the feature, that instead of just setting your cursor to a specific location, you have to hold and it zooms in, not sure if I just got too used to the android way of doing it, but I can see myself making less mistakes of where I positioned it with the ios way.
The hardware mute switch feels like a great feature, its just sometimes weird, so if you were inside an app that was playing sound and you mute it, it still plays it until you either close and open that app or just change to another one temporarily, so its not an actual hardware switch as I usually thought, more like a request to mute the phone.
The cable that comes with it is too thin, I am afraid to even unwind it, as it would probably break, so I had to get another one.
Please don't turn this into a shitfest from any of the fanboys, I really just wanted to share my image of finally being able to try it first hand again.4 -
I've seen a lot of stuff mentioned here from little hobby projects to Matrix. This might seem unreachable because it's just too utopic, but I'd really love to at least see the world using one single platform for software that would "just work™".
Like, here you have - simple glue lang, SDK with billion _useful_ libraries that also just work™ and no need to change the code too much or select an alternative function for each different platform e.g. via macros and one last wish - it'll work on every machine that's capable of running any code.
Maybe one day...2 -
Got commissioned to write a simple js function. Drafted in python. Changed up some variable names while translating, but forgot to change one, and changed another to the old name... Spent a week trying to find the bug in a 30 line piece of js that worked perfectly in python. FML1
-
The previous developer didn't write a freaking single test for a system that does a lot of calculations. Performance was shit so I got tasked with re-writing everything from DB queries to the actual calculation functions.
This has been the worst developer hell I've ever been. Without tests I cannot change anything without knowing if something breaks!!!
I gotta understand first the mess this guy left behind, then freaking write the tests that are missing and finally refactor the stuff. FML.
Btw, its Python and the guy didint even bother to do some basic type annotations so it's even worse. Function arguments are "data", "score", some are dicts, some are floats, some are lists.
Faaaaaaaaaaaaaack!!!!4 -
When I started doing frontend development, I was quite shocked with how people managed to cowboy code their way into building fully functional products with a decent paying client base.
I am talking about fully function SaaS with payment gateway and all, but no version control beyond full backup copies, and spaghetti code everywhere you can literally bring the website down trying to change the homepage design.
... and the startups that managed to do better, some of them forgot the .git on production exposing their entire source code *facepalm* -
~rant
I think we need to change way how websites deliver themselves to its users. This HTML CSS JS clusterfuck is just a huge PITA in the ass.
What is a website?
It's an application where users find, communicate or share information, can buy or sell their penis pumps and loads of shady stuff.
Why must a website (the delivered application) be split into multiple languages/scripts and lots of HTTP requests?
In my opinion, PWA is a start to make us look at websites more like apps as we are used to on the machine, but they don't solve the mess.
Per my experience, many people working on websites regularly confuse what's executed on the server and what is on the client. They send data to the client via XHR, for example full DB tables of private data, just to then filter it in their beloved Array.filter function.
You can tell those people again and again and this is why I start thinking that the Web, as we know it, needs a big change.14 -
Develop all my lambda function, create endpoint for what i need, set up CORS to * time of development... And chrome fuck me with CORS preflight ERROR. What the actual fuck with this shit security easily bypassable...
Me: its enough for today. Change project folder 😐 -
Guys I heard a rumor that you like riddles, I'm stuck on my theory project and I'd like to throw a bone:
Say you have a list p = [7,6,2,3,4,5,1,0] and you want to order it, i.e. change it to [0,1,2,3,4,5,6,7], by swapping adjacent elements. Provide an algorithm to do this optimally, when:
a. (Warm-up) each swap costs 1
b. Swaps weight is [4,3,2,1,2,3,4], i.e. if you want to swap position 0 with 1 it'd cost 4, position 3 with 4 will cost 1 and so on.
The optimal overall cost for b is 50 (I did an exhaustive search), however you need to find a general approach which is able to order every list with minimal overall cost (no time constraints as long as the solution is not exponential in the list length), using the provided weight function.
(you get a credit if the solution goes to a paper or anything 😉 it's actually a computer science open problem, but seems possible to me)16 -
Say the world's source code was opened for anyone to edit, which function would you change?
// js land
function conception(e) {
e.preventDefault();
return;
// original code here
}8 -
Hacky code post:
property var value: if(editing || !editing) function(othervalue)
I am coding in a property system that only updates an expression if a variable involved emits a signal. Well the function won't get called unless I change a value. I also want to "value" to be updated when editing changes. I also want it to update even if editing doesn't change. So the or-ing of the state of editing.
The result is the function gets called when object is initialized. Then when the editing flag changes it gets updated again. The workaround of doing this is much worse and requires more hacky code. So I am resigned myself to just or-negating the editing value.10 -
People who speak in puzzles during code reviews - fuck you! Just say what you want to say without being philosophical about it. Want me to change the name of a function? Let me know, instead of ranting on about some other shit. I should not have to ask you twice for every god damn comment what you mean, you prick. It’s just annoying and a waste of time.4
-
When someone makes a change in a function you wrote and implies that it's your fault that is broken...1
-
I'm a little afraid of what I'm doing. I just asked my boss to change my current role, almost on site, with a new one requested by the global function of my company. If they accept I will be traveling >80% of the time. I know I will miss my little daughters but I also know that this is maybe the last chance for a step forward in my career. I'm sharing my feelings only with my brother and devrant people.10
-
Reading code takes time!
Everytime I read:
"var" or "auto" Add: 10s
- Just use the type
Everytime I read:
if(Expression1 && Expression() ? GetNumber() : 0 > 0) Add: 30s
- Just write two if statements or create two bools the line above.
Everytime I read:
delegate = () => {} Add another 5 minutes of reading time.
- Just write a separate function for it. It helps with searching and understand what it does
Please code like the person that needs to check your code or change it just knows basic coding skills and logics.
I do know all these concepts I just never use them because it makes the code unreadable. hard to follow, mistakes that can happen everywhere. difficult to search.
And it frustrates that I need to read 10 extra lines to understand code flow or hover my mouse in an IDE to figure out what type object it is.
It's properly just me... I just like clean readable code. that is logical and failsafe and strict and deterministic with its behavior9 -
I hate arrow functions in ES6! Whenever I see them, I get acute code dyslexia and can't read shit. What the fuck is wrong with writing function, why change it for some unreadable series of symbols?10
-
How do you test unreachable code or part that is considered an edge case?
For example I catch exceptions in case IO failed and data was not written on database, but that only happens if hardware failure, or no disk space left, how do I mimic that?
I also have unreachable code for example, in one layer I fetch data (lets call it function x) and always return success result unless item not found I throw KeyNotFound exception. But in the calling function I handle the case of Status == Failed
Just in-case in the future I change function x and start returning failed status, so my logic already written but never reachable14 -
ATTENTION PLEASE! Important announcement following:
Please check your interface implementations for correct byteorder according specification BEFORE YOU START COMPLAINING ABOUT DATA FAILURES ON EXCHANGING DATA.
Freakin hell, if I'd get some money for every byte order mismatch on testing interfaces, I'd be a be a billionaire.
And why are all those highlevel I-know-every-fucking-framework developer incapable of checking the real memory content of a datatype, and the real data content on the interface even if you tell them that their byte order is obviously wrong?
No, your system is not the centre of the universe and I don't care how you get your less-than-32bit-datatypes-are-for-assembler-usage-frameworks to change byteorder. It's not rocket science, if there's no ready-to-use-function then write those 4 lines yourself.
Next time I get to specify an interface I'll go for mixed-endian, just to make sure everybody involved knows the concepts of endianess afterwards.2 -
In reply to:
https://devrant.com/rants/3957914/...
Okay, we must first establish common ground here. What do we understand about "showing"? I understand you probably mean displaying/rendering, more abstractly: "obtaining". Good, now we move on.
What's the point of a front-end? Well, in the 90's that used to be an easy answer: to share information (not even in a user-friendly way, per se). Web 2.0 comes, interaction with the website. Uh-oh, suddenly we have to start minding the user. Web 3.0 comes, ouch, now the front-end is a mini-backend. Even tougher, more leaks etc. The ARPAnet was a solution, a front-end that they had built in order to facilitate research document-sharing between universities. Later, it became the inter(national) net(work).
First there was SGML to structure the data (it's a way of making it 'pretty' in a lexicographical way) and turn it into information (which is what information is: data with added semantics) and later there was HTML to structure it even further, yet we all know that its function was not prettification, but rather structure. Later came CSS, to make it pretty. With its growing popularity, the web started to be used as a publishing device.
source:
https://w3.org/Style/CSS20/...
If we are to solely display JSON data in a pretty way, we may be limiting ourselves to the scenario of rendering pretty web pages using aesthetic languages such as CSS. We must also understand that if we are only focusing on making a website pretty with little to moderate functionality, we aren't really winning. A good website has to be a winner in all aspects, which is why frameworks came into existence, but.. lmao, let's leave that to another discussion.
Now let me recall back my college days.. front-end.. front-end.. heck, even a headset can be a front-end to a pick-order backend. We must think back to the essence, to the abstract. All other things are just implementations of it (yes, the horrendous thousands of Javascript libraries, lol).
So, my college notes say:
"Presentation layer: this is the UI.
In this layer you ask the middle tier for information, which gets that information from a database, which then goes back to middle tier, back to presentation. In the case of the headset, the operators can confirm an order is ready. This is essentially the presentation tier again: you're getting information from the middle tier and 'presenting it' as it were.
The presentation layer is in essence the question: how do I bring my application data to my end users in a platform-and solution-independent way?"
What's JSON? A way to transport data between the middle tier and the presentation tier. Is that what frontend development is? Displaying it in a pretty way? I don't think it is, because 'pretty' is an extra feature of obtaining and displaying data. Do we always have to display data in a pretty way? Not necessarily. We could write a front-end script (in NodeJS perhaps) that periodically fetches certain information from a middle-tier is serves a more functional role rather than a rendering one.
The prettification of data was a historical consequence of the popularity of the web (which is a front-end) (see second paragraph with link). Since the essence of a front-end is to obtain information from the back-end (with stress on obtaining), its presentation is not necessarily a defining characteristic of it, but rather an optional and solution-dependent aspect, a facet.4 -
==============
Getting Feedback Rant!
=============
When "this is simpler" feedback results in a function of 500 lines of code.
When I get "don't do X" in the feedback. Thank you very much. What do you want me to do instead?
Unclear feedback.
When the feedback giver changes his mind after I applied the changes!
When applying the feedback introduces a bug.
Simply opinionated feedback that is not enforced by any tool or backed up by any facts.
Please find something better to do in life.
Unactionable feedback.
"Consider X"
I will not consider thank you very much.
"Verify this works"
Duh..
When the feedback giver knows something that you don't.
I know this is a legit case.. still annoying.
"I disagree with the feature"
Go argue with the PM, not relevant to me, thanks!
=====================
GIVING FEEDBACK RANT
=====================
I rewrote the system. Please review it.
No need to review, just approve.
I will change this as part of the next ticket.
I would like to keep it the way it is.
lazy ass..
You can't test this.
It's impossible to test this.
No need to test this.
There's no point to test this.
I'll test this on production.
Not sure why this is working..
Please document this..
Because documentation is like a thing, you know.
Oh, this code is not related to this PR, I just don't want to open a new branch for such a small change. ignore it.
Ignore this.
This will be meaningful in my next change. -
So I've a little freelance project, is basically a blog. I've decided to use microservices with angular in the front end and python in the backend.
I've been about 2 weeks copy pasting code in my api because all the modules are pretty simple CRUDs that do the same thing, there is not heavy business logic or anything, just database handling.
I was really tired of copy pasting modules and his test, only changing function names and parameters, today I've this "epifany" about the inheritance and thinked about using it in my service, creating a base class and making all the other classes children of him.
Before the change my project has 220 tests (100% coverage) now I have only 40 tests (the same 100% coverage)
So, the lesson is: don't start throwing code like an idiot and start your project with some good planning1 -
My team was asked to point to a mock service in our QA env. Standard procedure is to copy the line in our QA property file that has the service URL, comment one out, and change the other to the mock service. Then, push the code and deploy to QA.
What did someone do? He didn't touch the property file. He found where we were defining the configuration for our http requester, removed the property reference, and HARD CODED the mock URL.
Wait, it gets better. The mock service does not function the same way the real service does. We need to send an additional query param to the mock service (that has a value already being sent in a header) so they modified ANOTHER file where the actual request is being made.
He made the changes, deployed to QA, and didn't check in any code.
What is going to happen next time when we deploy to QA with the latest code? Oh look, we'll be pointing to the real service again.
I explained this to my architect, and included that this messed up mock service they were calling is our 2nd mock service (no idea why they made a new one) and he simply deleted the stupid 2nd mock service. Screw that!
And...now requests to QA don't work 😂 -
Haskell is so funny like if you ask a function for some pizza, you get a bunch of pizza boxes back, and then when you want to put topping on the pizza you're like "hey can i like actually have the pizza now?", and then you realise you can't actually change the pizza so you make copies of them with the topping on.1
-
How resource calculations for software services like code analysis, monitoring, etc are done:
Opening fridge, putting all the beer one can find in it.
Opening the necessary tools, e.g Excel, Accounting software, ....
Drinking the first beer.
Starting to aggregate the monthly costs - cause you can never trust the reports written by someone else...
First beer poof.
Looking at the monthly cost, adding columns "Intended use", "Actual usage pattern", "Usage factor"...
Opening next beer...
Usage factor is btw a factor of 0.1 ... 1.0 - to give an estimate how much the products feature are actually used, for further analysis if the invest is justified or not...
Oh. Another half bottle gone...
Filling in the columns...
Oh. Bottle empty and the next one toooooooooooooooo...
*burping*
*cracking finger joints*
Now let's get to the sad part...
Next worksheet, adding infrastructure costs...
Cost and description as columns.
Hehe. Column sounds like gollum.
Another beer...
Ugh. Need the paper reports, manually typing off things for stuff that was e.g. tax deductible.
Many beers die during this task. Poor little beers, dying for such an boring and mundane task...
SUM is a real useful function. I don't think I can add numbers anymore.
Now we can add another sheet.
Hehe. Sheet sounds like shit. And yes, everything in this file is shit.
Summing up costs from both sheets and including the cost factor from 1
... Beeeeeeeer Beeeeer beer we need more beer here... Beer beer beer...
Where was I. Oh yeah. Cost factorization total vs effective.
Why do I want to get even more drunk.
Oh yeah. Most software is completely underused and the costs aren't justified.
Let's add some colored highlighting ...
Uuuuh. ,Too much red. Better change the highlights.
Too much red.
More beer.
Don't give a fuck.
Hm.
Time for some whiskey.
What else is there to do....
Oh yeah.
Diagrams.
The bloody wankers from accounting need diagrams as numbers are too boring.
Not that everything in accounting is boring, no matter how much you paint colors on it... *sigh*
Hm. More whiskey...
Hehe. Whiskey rhymes with frisky.
Uff. Now just need to write mail. Mail mail mail....
"Copy paste the last mail from last month"
Hm.
Ah.
*sipping whiskey*
Spell check extension - to the rescue.
Thesaurus *burps*.
Let's change a few words here and there... Maybe another paragraph there.
Uh....
Trying to attach file...
*fucking mouse is pretty constantly crashing into empty beer bottles*
Done.
Damn.
Need to press send button.
*Creating mess on the desk by just randomly crashing the beer bottles*
Done.
*Pressing computers power button*
Mwahahahaha. No mouse needed.
*regretting to stand up too quickly, nearly barfing on the floor*
Couch ... Where Couch...
After hitting several doors, frames and other stuff, the glorious mission ended successfully with a most graciously executed gut buster on the couch.
(Regretting next morning to have emptied two 6 packs and a few glasses of whiskey) -
"Delete all code!" That should be the mantra!
Was watching some stuff from destroyallsoftware.com. Not entirely convinced. So I should cook up my own shit.
So here is how the argument goes:
There's quite some negativity in the term "legacy" software. Partly it may be the envy to software that runs on actual machines and is not that phantasm, that perfect first lines on a greenfield project until it gets messed up as it has to put up with all the real world messiness. But the negativity it deserves is actually for the code that we cannot get rid of. This ugly class or function that soaked all the complexity and functionality so it defies any positive change. And always when it appears on your screen, it irks you, enrages you, makes you punch the screen, because you can almost feel the distaste physically. - *That* is the definition of "legacy" in its true negativity. No software should be like that. On the contrary. Every line should be replaceable, dispensable, disposable. At the verge to deletable. Because you know: the best code is no code.
This is where my hatred of code could get productive: Delete all the wretched, loathsome stuff and replace it, with something that just sucks less and can be thrown away any time. Don't expect beauty or perfect design. It'll never finish.3 -
TLDR: I wanted to change email to new one, but I could not remember which one I have
currently. I found out an API in DevRant JS files for email verification and used
it to find it out.
So, I am moving from Gmail to Protonmail Pro, absolutely love their service.
I wanted to do same on Devrant but I could not figure out my current mail for
"I lost my password" form. My Password Manager have only login saved, and profile does
not show email address.
I thought that this user information is stored on server so it have to be some way to retrieve it. I dug
in source code and I've found:
`<div class="signup-title">Verify Your Email</div>`
Which has event assigned to function which uses jQuery.ajax (love it btw :D) to call:
`url: "/api/users/me/resend-confirm",`
This seems like worth a shot. Few copy-pastes and one ajax call later:
*Ding*
From: support@devrant.io
To: dawid@dawidgoslawski.pl
"Welcome to Devrant"
Got it :) So I have already changed in march when DevRant on previous layout.
This is what I love in this profession - problem solving. AI will not replace human
in any way, we will just stop coding array iterations and data manipulation - we will focus
on real problem solving and human touch (like design, convincing management for changes).1 -
Binary combinatory logic (BCL) is gonna change the world. Yes, it's an esolang, but its easy to evolve populations of programs written in it. Then, when you have a winner, you can easily embed it in a C binary as a hardcoded arg to your interpreter function. Or use logic to translate it to any other programming language.1
-
Magento Debugging Horror!
Changing lots of things in magento with no problem. Continuing development for quite sometime. Suddenly decide to clear cache to see affect of a change on a template in frontent. Suddenly magento crashes! There's no error message. No exception log. No log in any file anywhere on the disk. All that happens is that magento suddenly returns you to the home page!
Reverting all the changes to the template. Clear the cache. Nope! Still the same! Why? Because the problem has happened somewhere in your code. Magento just didn't face it, because it was using an older version of your code. How? Because magento 2 even caches code! Not the php opcache. Don't get me wrong. It has it's own cache for code, in a folder called generated. Now that you cleared all the caches including this folder, you just realized that, somewhere something is wrong. But there is no way for you to know where as there is absolutely no exception logged anywhere!
So you debug the code, from index.php, down to the deepest levels of hell. In a normal php code, once the exception happens, you should see the control jumps to an exception handler, there, you can see the exception object and its call stack in your debugger. But that's not the case with magento.
Your debugger suddenly jumps to a function named:
write_close();
That's all. No exception object. No call stack. No way to figure out why it failed. So you decide to debug into each and every step to figure out where it crashes. The way magento renders response to each request is that, it calls a plugin, which calls a plugin loop, which calls another plugin, which calls a list of plugins, which calls a plugin loop, which calls another plugin.....
And if in each step, just by accident, instead of step through, you use the step over command of your debugger, the crash happens suddenly and you end up with the same freaking write_close() function with no idea what went wrong and where the error happened! You spend a whole day, to figure out, that this is actually a bug in core of magento, they simply introduced after your recent update of magento core to the latest STABLE version!!! It was not your mistake. They ruined their own code for the thousandth of time. You just didn't notice it, because as I said, you didn't clear the `generated` folder, therefore using an older version of everything!
Now that after spending 7 hours figuring out what has failed with absolutely no standard way of debugging and within a spaghetti of GOTO commands (Magento calls them plugin), why not report it to github? So you report it with a pull request. This also takes 1 hour of your time. Just to next day get informed that your pull request is rejected because another person already fixed the bug and made the same pull request. It was just not on the latest stable version yet!
So you decide to avoid updating magento as much as possible. Because you know that the next Stable version will make your life and career unstable. But then the customer complains that the Admin Panel is warning him of using old Magento version which might pose SECURITY THREATS! -
I want to know the name of the evil mastermind who once conceived the "literal" function in Sequelize.
- You design a method to insert pieces of raw SQL exactly the way they are written, no further processing
- You release this method, you call it LITERAL to make sure people know its intended purpose: it is used to insert LITERALLY everything you write, nothing more and nothing less
- Then make sure this "literal" method changes the fucking case of column names. Because that's what "literal" means in the head of this rabid animal: you arbitrarily change the code written by the developer
WHY
WHY ARE ALL AR ORM DESIGNED BY FUCKING ANIMALS
ELOQUENT IS TRASH, SEQUELIZE IS TRASH, TENS OF DEVELOPERS AT WORK TO ALCHEMICALLY CREATE THE MOST ROTTEN CODE THEY POSSIBLY CAN, BECAUSE YOU MUST NOT BE ALLOWED TO WRITE ANY QUERY MORE ADVANCED THAN "SELECT * FROM users WHERE id =1", NOT A FUCKING SHRED OF DOCUMENTATION AND 16 MILLION LAYERS OF ABSTRACTION TO MAKE SURE EVERY BUG FUCKING STAYS THERE, DON'T YOU DARE TO USE A JOIN, DON'T YOU DARE TO TREAT A DMBS LIKE AN ACTUAL FUCKING DBMS INSTEAD OF A HOT STEAMING PILE OF METHODS IMPLEMENTED BY MONKEYS.6 -
FML spent ages debugging why a function wasn't working, looks like I must of duplicated the function by mistake. Then after that I was trying to change the functionality slightly but wasn't working. Only spent half of Friday trying to debug it, luckily I fixed it in like 30 seconds today :P
-
I hate coding tests for a job interview. I've done three types:
1) university style of "write function that does x" (fizz buzz)
2) this code has a bug, fix it
3) write a program that does this university style contrived thing (exact change)
One and two usually are timed to 10 to 15 minutes per question. Three is untimed but unstated "time counts".
Off all three, the last one is the best in my opinion. However it still seem like we could come up with something better.1 -
Sometimes in our personal projects we write crazy commit messages. I'll post mine because its a weekend and I hope someone has a well deserved start. Feel free to post yours, regex out your username, time and hash and paste chronologically. ISSA THREAD MY DUDES AND DUDETTES
--
Initialization of NDM in Kotlin
Small changes, wiping drive
Small changes, wiping drive
Lottie, Backdrop contrast and logging in implementation
Added Lotties, added Link variable to Database Manifest
Fixed menu engine, added Smart adapter, indexing, Extra menus on home and Calendar
b4 work
Added branch and few changes
really before work
Merge remote-tracking branch 'origin/master'
really before work 4 sho
Refined Search response
Added Swipe to menus and nested tabs
Added custom tab library
tabs and shh
MORE TIME WASTED ON just 3 files
api and rx
New models new handlers, new static leaky objects xd, a few icons
minor changes
minor changesqwqaweqweweqwe
db db dbbb
Added Reading display and delete function
tryin to add web socket...fail
tryin to add web socket...success
New robust content handler, linked to a web socket. :) happy data-ring lol
A lot of changes, no time to explain
minor fixes ehehhe
Added args and content builder to content id
Converted some fragments into NDMListFragments
dsa
MAjor BiG ChANgEs added Listable interface added refresh and online cache added many stuff
MAjor mAjOr BiG ChANgEs added multiClick block added in-fragment Menu (and handling) added in-fragment list irem click handling
Unformatted some code, added midi handler, new menus, added manifest
Update and Insert (upsert) extension to Listable ArrayList
Test for hymnbook offline changing
Changed menuId from int to key string :) added refresh ...global... :(
Added Scale Gesture Listener
Changed Font and size of titlebar, text selection arg. NEW NEW Readings layout.
minor fix on duplicate readings
added isUserDatabase attribute to hymn database file added markwon to stanza views
Home changes :)
Modular hymn Editing
Home changes :) part 2
Home changes :) part 3
Unified Stanza view
Perfected stanza sharing
Added Summernote!!
minor changes
Another change but from source tree :)))
Added Span Saving
Added Working Quick Access
Added a caption system, well text captions only
Added Stanza view modes...quite stable though
From work changes
JUST a [ush
Touch horizontal needs fix
Return api heruko
Added bible index
Added new settings file
Added settings and new icons
Minor changes to settings
Restored ping
Toggles and Pickers in settings
Added Section Title
Added Publishing Access Panel
Added Some new color changes on restart. When am I going to be tired of adding files :)
Before the confession
Theme Adaptation to views
Before Realm DB
Theme Activity :)
Changes to theme Activity
Changes to theme Activity part 2 mini
Some laptop changes, so you wont know what changed :)
Images...
Rush ourd
Added palette from images
Added lastModified filter
Problem with cache response
works work
Some Improvements, changed calendar recycle view
Tonic Sol-fa Screen Added
Merge Pull
Yes colors
Before leasing out to testers
Working but unformated table
Added Seperators but we have a glithchchchc
Tonic sol-fa nice, dots left, and some extras :)))
Just a nice commit on a good friday.
Just a quickie
I dont know what im committing...3 -
I wasn't happy with one of our UI views for editing a database query that consisted of about 50 fields ("editing" being the operative term here, not just viewing. It had to be two-way). Everything was hardcoded and defined manually, with each block of ~10 lines being repeated and mostly identical apart from the occasional double inline field and name of the variable. It had "just ended up that way" over time due to the variable names in the UI being different than the names of the variables that came from the API.
I decided to overhaul it all where I defined the different input components and which fields should be included, then made a function which would generate the page based on these definitions. It was about 500 lines of modularized functions and classes where the class for the actual view was about 50 lines- compared to the 1400+ lines of the previous version.
But, it didn't work. It should, but it "just didn't". There was no error. All I got was a blank, solid white page. I could make a drastic change or try something completely different and I would get the same error, same blank page. API fetch succeeded, value assignments succeeded, the object exists, but if you iterated it it was... empty.
I started getting really discouraged that I had made it too abstract. Maybe I actually made it more complex and unreadable than before. Maybe just hardcoding it all was the better solution after all. Maybe I had gone against KISS and overdesigned it.
I was up pretty late and everyone had gone home. When the last guy left there was that mood where "yeah if I can't make this work we'll just use the current version...".
Turns out I had tried iterating over a property of the set of fields to render, rather than the entire collection. In the old method the variables were a member of an object, but now they were its own object, a change I had made to isolate the set of values which were to be viewed/edited and make them easier to pass back and forth. This member existed since I hadn't cleaned it out yet, but it was empty.
I had been banging my head against this for a whole day and I was ready to admit I had made a mistake and wasted my time before discarding it all, but then I backspaced this one property and the interface went from empty to rendering perfectly and with all functionality intact. I swear god rays were coming out of my screen. -
Why in gods name does compiling for windows change the name of a function?? this is a function in *my* library and it doesn't have the text `erom_text` anywhere in the library???2
-
Today I was meeting with a researcher in my department so that I could show him how the software I developed works. He graduated from a really good university in electronic engineering, with 100/100 I think, and he can manage to copy&paste some python code. So I didn't expect what happened today.
Guy: 'So I have to give to your program as input this python file which contains a function you need to call, right?'
Me: 'Yep, I mean, that is a jupyter notebook, I need a text file containing only the function which is in that notebook'
Guy: *Downloads the notebook, tries to feed the notebook file into my program*
Me: 'Wait, don't, there probably is a lot of junk related to jupyter notebook, try opening it in notepad++'
Guy: *Opens file, sees a lot of junk text*
Me: 'Yeah, I thought so, you need to save it as plain text or .py'
Guy: *Renames the notebook as .txt*
Me: *Shakes my head without him noticing*
'That won't work, the content of the file won't change like that...' -
How do you plan before small software changes?
I have some extremely iterative approach where I change one function or one variable at a time, like a headless chicken. I am not planning beforehand which modules or functions I need to change but start from somewhere and like a linked list, I am moving on until the end.
But I feel like it is wasting my time. What is your approach when you want to have let's say -50 line of code changes?5 -
I'm doing a project for uni in Omnet (C++ framework that should facilitate working with networks of queues, simulating and displaying statistics).
I needed to retrieve a random value from an exponential distribution, and the function to do so requires a random number generator as input. The framework has 2 implementations of the RNG and I picked the first one.
I spent 3 hours trying every possible thing, using both the exponential() function and its class wrapper (both provided by the framework), it was always returning 0 or NaN.
The RNG was spitting out values correctly, so I thought it was okay.
When I was almost ready to give up, I figured I could try and change to the second implementation of RNG, expecting nothing to change. And it fucking worked.
Zero reports on this behavior on Google, no apparent reason why it would work with one and not with the other when the two RNGs literally implement the same abstract class and spit out the same exact numbers... Just black magic...
Oh and cherry on top, it works with the raw function but not with the class wrapper on that same function... IF YOU GOTTA IMPLEMENT SOMETHING IN YOUR DAMN FRAMEWORK THAT DOESN'T WORK, FUCKING DON'T! 1 combination working out of 4 is not good! Or at least document it!
Sorry just had to share my pain -
My answer to their survey -->
What, if anything, do you most _dislike_ about Firebase In-App Messaging?
Come on, have you sit a normal dev, completely new to this push notification thing and ask him to make run a simple app like the flutter firebase_messaging plugin example? For sure you did not oh dear brain dead moron that found his college degree in a Linux magazine 'Ruby special edition'.
Every-f**kin thing about that Firebase is loose end. I read all Medium articles, your utterly soporific documentation that never ends, I am actually running the flutter plugin example firebase_messaging. Nothing works or is referenced correctly: nothing. You really go blind eyes in life... you guys; right? Oh, there is a flimsy workaround in the 100th post under the Github issue number 10 thousand... lets close the crash report. If I did not change 50 meaningless lines in gradle-what-not files to make your brick-of-puke to work, I did not changed a single one.
I dream of you, looking at all those nonsense config files, with cross side eyes and some small but constant sweat, sweat that stinks piss btw, leaving your eyes because you see the end, the absolute total fuckup coming. The day where all that thick stinky shit will become beyond salvation; blurred by infinite uncontrolled and skewed complexity; your creation, your pathetic brain exposed for us all.
For sure I am not the first one to complain... your whole thing, from the first to last quark that constitute it, is irrelevant; a never ending pile of non sense. Someone with all the world contained sabotage determination would not have done lower. Thank you for making me loose hours down deep your shit show. So appreciated.
The setup is: servers, your crap-as-a-service and some mobile devices. For Christ sake, sending 100 bytes as a little [ beep beep + 'hello kitty' ] is not fucking rocket science. Yet you fuckin push it to be a grinding task ... for eternity!!!
You know what, you should invent and require another, new, useless key-value called 'Registration API Key Plugin ID Service' that we have to generate and sync on two machines, everyday, using something obscure shit like a 'Gradle terminal'. Maybe also you could deprecate another key, rename another one to make things worst and I propose to choose a new hash function that we have to compile ourselves. A good candidate would be a C buggy source code from some random Github hacker... who has injected some platform dependent SIMD code (he works on PowerPC and have not test on x64); you know, the guy you admire because he is so much more lowlife that you and has all the Pokemon on his desk. Well that guy just finished a really really rapid hash function... over GPU in a server less fashion... we have an API for it. Every new user will gain 3ms for every new key. WOW, Imagine the gain over millions of users!!! Push that in the official pipe fucktard!.. What are you waiting for? Wait, no, change the whole service name and infrastructure. Move everything to CLSG (cloud lambda service ... by Google); that is it, brilliant!
And Oh, yeah, to secure the whole void, bury the doc for the new hash under 3000 words, lost between v2, v1 and some other deprecated doc that also have 3000 and are still first result on Google. Finally I think about it, let go the doc, fuck it... a tutorial, for 'weak ass' right.
One last thing, rewrite all your tech in the latest new in house language, split everything in 'femto services' => ( one assembly operation by OS process ) and finally cramp all those in containers... Agile, for sure it has to be Agile. Users will really appreciate the improvements of your mandatory service. -
Yesterday, I had to set up a demo environment for a project, we are working on.
Everything was okay, frontend loaded, connection to backend is working, database is connected.
10 minutes before I wanted to leave for my well deserved weekend, PO came over: "I can't play any video, I uploaded"
Okay, couldn't be a big issue, it worked when I added this functionality 3 weeks ago, just before my holidays.
A bit under pressure, my girlfriend Was already waiting downstairs, I inspected the database and realized that a table Was not properly filled.
Checked the backend and everything seems fine, so checked the requests from the frontend and realized that the request was almost empty.
So some code, building the request body had to be wrong.
Already 10 minutes late, with a lightly annoyed girlfriend waiting for me, I found the issue but couldn't recognize that I wrote these few lines. A quick check of the git history showed, that my colleage changed my code during my holidays, so I just reverted everything.
After commit and deployment, I called my colleage and told him that I just reverted his changes.
"But now my feature is not working anymore, I had to change it like this!" he answered. I just responded that we will talk about that on monday and look at it together. While I hurried down the stairs, I was thinking why the hell somebody just changes stuff without checking if it affects other functionalities?
This should be basic knowledge for every dev, that if you change existing, working code to make it work with your feature, you have to ensure to not brake anything.
If you can't do that, then create a new function to handle your shit.
In the end, my girlfriend had to wait 30 minutes, because of 4 lines of codes, someone just changed without thinking what else could happen...3 -
It was one of those "I need more coffee days"..
I was writing some checking function called "check" (now to clarify my company is not coding oop style so no classes etc.) And as I went on I included another file for some functions and what not. Pretty normal stuff right? Right. In that file I required there also was a function called "check".
Guess who tried to use the "check" function of the imported file in the "check" function?! Right! A Fucking genius aka. me!!
So I tried to figure out why the page wouldn't load and why the server was starting to lag more and more.
After killing all the apache tasks three times i finally realized what I did.
Took me 10 minutes to figure out that i was causing endless recursion. That day wasn't my best and clearly not filled with enough coffee.
PS: yes I know oop would have probably eliminated the possibility for this but I'm just adapting to the coding style of my company as I can't really change things since I'm just an intern.1 -
(I'm not completely sure of what I'm saying here, so don't take this too seriously)
Settling on a language to write the api for ranterix is hard.
I'm finding a lot of things about elixir to be insanely good for a stable api.
But I'm having a lot of gripes with the most important elixir web framework, phoenix.
Take a look at this piece of code from the phoenix docs:
defmodule Hello.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string add :bio, :string
add :number_of_pets, :integer
timestamps()
end
end
end
Jesus christ, I hate this shit.
Wtf are create, add and timestamps. Add is somehow valid inside the create, how the fuck is that considered good code? What happens if you call timestamps twice? It's all obscure "trust me, it works" code.
It appears to be written by a child.
js may have a million problems. But one thing I like about CJS (require) or ESM (import) is that there's nothing unexplained. You know where the fuck most things come from.
You default export an eatShit() function on one file and import it from another, and what do you get?
The goddamn actual eatShit function.
require is a function the same way toString is a function and it returns whatever the fuck you had exported in the target file.
Meanwhile some dynamic langs are like "oh, I'll just export only some lang construct that i expect you to specify and put that shit in fucking global of the importing file".
Js is about the fucking freedom. It won't decide for you what things will files export, you can export whatever the fuck you want, strings, functions, classes, objects or even nothing at all, thanks to module.exports object or export statement.
And in js, you can spy on anything external, for example with (...args) => debugger; fnToSpyOn(...args)
You can spoof console.log this way to see what the fuck is calling it (note: monkey patching for debugging = GOOD, for actual programming = DOGSHIT)
To be fair though, that is possible because of being a dynamic lang and elixir is kind of a hybrid typed lang, fair enough.
But here's where i drop the shit.
Phoenix takes it one step further by following the braindead ruby style of code and pretty DSLs.
I fucking hate DSLs, I fucking hate abstraction addiction.
Get this, we're not writing fucking poetry here. We're writing programs for machines for them to execute.
Machines are not humans with emotions or creativity, nor feel.
We need some level of abstraction to save time understanding source code, sure.
But there has to be a balance. Languages can be ergonomic for humans, but they also need to be ergonomic for algorithms and machines.
Some of the people that write "beautiful" "zen" code are the folks that think that everyone who doesn't push the pretty code agenda is a code elitist that doesn't want "normal" people to get into programming.
Programming is hard, man, there's no fucking way around it.
Sometimes operating system or even hardware details bleed into code.
DSLs are one easy way to make code really really easy to understand, but also make it really fucking hard to debug or to lose "programming meaning".7 -
As I started learning React, I found the allure of declarative style of programming appealing. I try to avoid maintaining multiple state variables for data that can be derived from the base state itself that's stored in the redux store. It works wonders when I have to change something; as I just need to make changes to one function in the utils folder and that change is implemented across the whole app, rather than change the instances everywhere as was the case when I initially started working on this project after the previous dev left.
But I see myself redefining a lot of computed values everywhere, and if I just try to define them in the root component, I'll end up with a huge list of props being passed to a couple of components. Shifting it to the utils folder helps a bit, but then I find myself defining even the simplest of array filtering methods to the utils folder.
Is this need to define computed values everywhere a trade-off that you need to accept when you write declarative code, or is there a workaround/solution I am missing? As of now, the code-base is much better than how it used to be when they had a literal Java dev work on React with their knowledge of Java patterns being used in a framework that is the polar opposite of OOP, but I still feel like there's room for improvement in this duplication of computed values.2 -
All those mine WTF moments are somehow related with caching which i keep on forgetting... the most fresh one was last week, i had some GIGANTIC mySQL query, and for the sake of response time I immediately made a cache function that kept Redis cache for a day or so... so last week i had to change something (good ol' client and his visions for app). So there i was with the query that returned same god damned results every time, i copy the query in some mySQL manager and it goes fine, but in the app it doesn't... what the actual FUCK!!! i was questioning my career until i figured it out, i was planning to buy some sheeps and a fife and to hell with this, a loud facepalm was echoed through the office that day...3
-
Actually I'm writing a Facebook Messenger Bot. Characters limit for each sending message is 320, so I made simple function to split messages on parts. I set the limit to 315, 5 characters less than Facebook.
Spend 3 days on finding solutio why messenger is sending only last part of message.
Today I made a change, set my character limit to 316 and what? It's working! Set it to 320? Working!
Messenger has problem only when it's 315!
Piece of shit...4 -
at one point documents were useful things to align people to the relevant information to the tasks they must complete for everything to work out
now documents are a ritual, and relevant information is even forgotten or omitted and considered secondary to the document existing and looking like a professional document
I wonder if this is how all industries evolve
at one point there were people who knew what they were doing, they created processes so nobody is left behind
and over time, whoever made the processes, the spirit for their existence, is forgotten
and you're left with empty rituals, so devoid of their original function, the humans subjected to these things, crushed by them, can't even discern what their usage is
evidently if you put monkeys in an enclosure with some apples up a tree with a mechanism that if a monkey goes up the tree and takes an apple it sprays all the other monkeys in the enclosure with water
the monkeys will learn to pull down any monkey trying to go up the tree, because they don't wanna get sprayed
and this will keep going, generations will change and yet they'll still religiously pull down the monkeys, in a ritual... nobody remembers why only that their parents did this to them, so they do it to others
if you take the trap away, they never figure it out, which is how this story is typically told
but regardless of if the trap is there or not
wouldn't you wanna know and see it for yourself instead of following empty rituals?!
and what of people who erroneously view things as traps, and pull people down, but they were just seeing things?!
self limiting myths to doom the ages! -
One day I decided I wanted to build robots.
And not kidding the reason I wanted to build them was because I wanted someone interesting to talk to and stil not kidding I even fantasized about a robot girlfriend... Lame I know I think I was a lonely little guy back then, though even after 7 years or so it doesn't feel as though it's that long ago. Maybe because things didn't change that much. Which is worrying but it's not the topic so I will pass on that future-past worries bullcrapper. After learning how robots worked and what made them function so things gradually led up to me being more interested in machine learning applications and software. I learned Arduino at first, I think I still have some messy circuits and old arduinos around. I only finished one robot though and it couldn't even support it's own weight. The servo motors were taking too many amps that heated up the little arduino even with a fan attached. Provably I should have made use of mechanics for robots books and calculated things first. But even though it couldn't walk properly I still felt success and I loved it like my own kid (me taking it apart was questionable but believe me). After that I focused more on writing code than using my hands to make things which was a pain in the ass if I might add.
After learning arduino and making that failed project of mine. I then picked up C++ wrote hello world program usual things a starter would do. It was the language I wrote my first game which I finished and this time it worked. But I never released it which was partly because I didn't want to spend a hundred bucks on a license for the engine and I also knew that it was a shit game. If I were to describe; lines in different colors come from the top you need to hit the lines with the same colored columns to break them. The columns changed their height and location on random. The lines sped up and gap between them decreased. Now that I think about it it wasn't half bad. But the code was written in game maker studio's version of C so I have no way to salvage it.
But I learned a lot of things from that project and that was the goal, so I would call it a win. I don't remember but after sometime I switched to python. And I'm glad I did, it's fun to code in which was the main reason I coded in the first place. Fun.
Life happens and time passes,
Now I'm waiting to enter college exams in a few months after hopefully passing them. My goal is to get into computer engineering which will be extremely challenging because it's the highest point department in the university I'm aiming at. But hey if the challenge is great the reward is greater right ? To be honest I'm still not sure about my career path. Too many choices. So I will just let my own road called <millions of similarly random events that are actually caused by deterministic reactions, to affect you and your surroundings leading up to a future which only the Laplace's demon can forsee> guide me. Wish me luck.1 -
I don't think today is my day--i'm making alot of silly mistakes: forgot to call callback at end of function, forgot the () to complete the IIFE, copied a SQL querystring and forgot the change the fieldname from 'date' to 'created_at' and wondering why it's returning an empty array.
Self, please get your head in the game -
Built the most generic file importer.
So a customer had his SAP system giving us some 5 million barcodes in a csv which we needed to parse. But as there could be different file types and I thought the handling would always include the same steps I made them configurable through function pointers. - Did not want to make it as spooky as the rest of the code base where the function pointers were buried deep in some shared memory configs, which might even change at run time, but rather I statically used the member functions of my class. Just to poke fun on the ugly C++ syntax of member function pointers. I still shudder at the thought some poor soul now has to maintain that code.
(For the actual parsing I actually used a one liner in awk which was churning through the records in one minute which was faster than the SAP guys seemed to be accustomed to.) -
$('#element' + 'itemID').on('change',function() {
Var elem = $('#element' + 'itemID')
elem.addClass
elem.css
} )
That block of code 14 times....it was my laziest..all 14 functions was copied and pasted twiced too inside an if else block i believe...sad noob javascript days -
At work thres a legacy "common" DLL, which held a helper function that's incharge of creating Slugs, it takes an MD5 of the current time stamp UTC, removing non-URLable chars, and taking the first N chars that remain then
Ngl I was impressed at first at it, but then I thought, its Uniqueness isnt guaranteed
But then again I thought, the uniqueness can be tested via a call given it's indexed anyway in DB so O(1), and if non-unique, just re-call the function. Even in the worst case scenario the hits won't be that many anyway
I didnt change the code, tho at first I was inclined to given my "it isnt proven-unique" stance but am wondering, if this is a good approach
While coolish, it seems wrong in the back of my mind somehow...1 -
I didn't get into GSoC while writing code which was to be a major aspect of the next release of SymPy. I tell you this org. is maintained by 1 maintainer and 4-5 other members. While most don't understand the code written but will teach you to write some decorator class. I don't want to name that sucker,but he made some changes and then other reviewed and told to change back to what I had originally done. I wanted to cut his throat while I had to made him understand the code. After some 10 days,when I asked that it is ready to be merged,he says "I don't understand this part of code". Fucking bastard if you didn't understand,then why the fuck were you reviewing mine? The people who just did beginner changes but were from October got selected. This org. doesn't check your ability to resolve issues and understand code,but basically wants more number of commits,whether the commit may be mere change in documentation or so, doesn't matter. Again,these people want to help and reviewed my pr,but there should a valid argument. They meaninglessly just wanted to add their name to reviewers for making their proposal strong without helping or say by just showing off. I wrote unit tests, doctests, wrote a full-fledged function, resolved many PRs,and was working alone on one pr which was for the main release of SymPy,but I didn't get selected. Why? Because I started contributing in March. When will these guys understand what matters is how much you contribute not when you start to contribute. The substance and difficulty level of PRs should be considered not just no. of PRs. Hope this org. becomes more beginner friendly and open to more clear discussions rather than showing off.
☮️
Thanks. -
firstly, does anyone know of an online telegram or whatsapp group where i can ask silly stuff regarding web dev and get immediate answers, just like it is here?
secondly i am trying to learn js and there are just too many related terms that are messing with my brain:
"some features are supported ines5/es6/es15/es16/es17 , some are supported in chrome's v8/chakra/spidermonkey/android browser , some features are only supported in "serverside" and blocked in all browsers thanks to browser's vm environment; babel can't read this code, some features are provided only by node js..."
WHAT THE MESS IS THIS?
All i am trying to do is to write code that would make a website visible to everyone. if by specific browser , i want to target, chrome and its subsidaries and android chrome/other android browsers .
for other browsers am willing to make external converters later but don't want to change my code by 1 bit. And from what i know, each browser (at least the browsers am thinking of supporting) has the complete JS compilers already built in
can i or can i not built a complete functional website with those things?
and finally my main question : how to make custom exceptions in vanilla js? i saw this answer on stack overflow:
===================
function InvalidArgumentException(message) {
this.message = message;
// Use V8's native method if available, otherwise fallback
if ("captureStackTrace" in Error)
Error.captureStackTrace(this, InvalidArgumentException);
else
this.stack = (new Error()).stack;
}
InvalidArgumentException.prototype = Object.create(Error.prototype);
InvalidArgumentException.prototype.name = "InvalidArgumentException";
InvalidArgumentException.prototype.constructor = InvalidArgumentException;
Usage:
throw new InvalidArgumentException();
var err = new InvalidArgumentException("Not yet...");
=====================================
where is the error code? what would be the exception details? what is the line number/timestamp of error?why is that function making an error, i thought error/exception is a class in JS?4 -
Do you know when you're testing your code and anything works as it should, even when everything looks all right? I dunno how about you, but... everytime this happens, I just change var/function name to something like "fuckingCalculate()" or "suckerAvg". It's similar as punching an old TV everytime it stops, or kicking a door that doesn't open.
.
.
Once I change the var/function to It's previous name, everything stops working as before.
.
What a shame... -
Typescript is my new favorite and my grudge is the stupid scoping of type assertions. I have an async function that checks whether a variable is set and awaits a change event if it's undefined. This function is working javascript but invalid according to typescript, because it relies on the exact type changing while the function is running. I had to convert it to a mess of promises to bypass this because (and this is the best) the callback-based syntax of identical meaning will reset all type assertions, even locals that are never written after the callback's creation.8
-
-> Change the signature of one function
-> Go around the entire codebase to add that one extra parameter every damn where
-> thank god for IDE's
-> tests still fail
-> realise that mocks are not captured in the previous exercise of combing through the codebase
-> #frustration -
ohhhhh I am pissseddddddddddd
itss the fucking pytorch.module class it would seem !
I do exactly the same goddamn shit as its supposed to do in a goddamn notebook and run it step by step and the fucking model trains and the output values change !!!! and the loss decreases !!
I do this in the goddamn class derived from model with a call to model.parameters() and the fucker fails !!!
why ???
why ?????
why ??????
is it cloning the goddamn parameters so the references aren't there ????
seems to work goddamn fine when i call a layer and activation function at a goddamn time chaining the calls one after another !!!!!!
UGHHHH IT LOOKS LIKE IF YOU DEFINE THE LOSS AND OPTIMIZER OUTSIDE THE FUCKING CLASS IN A SEPERATE TRAINING FUNCTION IT DOESN'T TRAIN !!!!!!
WHY ??
A REFERENCE IS A GODDAMN REFERENCE !!!! -
package main
// go is very frustrating. in their efforts to keep the language simple, they've broken its consistency :(
// A A is just some arbitrary interface
type A interface {
Foo()
}
// B is an interface requiring a function that returns an A
type B interface {
Bar() A
}
// Aimpl implements A
type Aimpl struct{}
// Foo is Aimpl's implementation of A
func (a Aimpl) Foo() {}
// Bimpl attempts to implement B
type Bimpl struct{}
// Bar is Bimpl's attempt at implementing B.
// problem is, if Bar returns an Aimpl instead of A, the interface is not satisfied
// this is because Go doesn't support implicit upcasting on returns from interfaced objects.
// if we were to simply change the declared return type of Bar() to 'A', without changing
// the returned value, Bimpl will satisfy B.
func (b Bimpl) Bar() Aimpl {
return Aimpl{}
}
var _ B = Bimpl{}
func main() {
}2 -
Hey Devrant fam!, well i'm basically trying to see if i can change up this A* algo we need to implement for an assessment, and from what i know basically most people have copy and pasted it, but not me!, so there is this one called Easy A* (star) Pathfinding By Nicholas Swift and my goal is such that i would like to make it input friendly!, here is the code in my main function
def main():
start1,start2 = input('Enter co-ordinates').split(',')
end1,end2 = input('Enter co-ordinates').split(',')
drive_mount()
open_map()
# test1 = (start1, start2)
# test2 = (end1, end2)
start = (start1, start2)
end = (end1, end2)
print(f'start co-ordinates:{start} \n end co-ordinates:{end}')
our_path = astar(our_maze, start, end)
print(f'starting co-ordinates:{start} \n ending co-ordinates:{end} \n Your shortest-path:{our_path}')
if __name__ == '__main__':
main()
however i am then greeted by this error, on line 62 specifically it says "TypeError: must be str, not int" and my original thought was to put str() around all of them, but that does not seem to work :-) any advice? thank you!3 -
New to AWS, is my best option for having a integer value (maximum number of items to process) that I can override for a lambda step function
to read a value from an S3 bucket where I can overwrite the value if I want to change it. This seems silly and I feel silly as I expect my situation should be simple and not novel at all.
For some reason I expected I could use an environment variable, but didn't see an option to overwrite it in the web GUI https://docs.aws.amazon.com/lambda/...2 -
When I started with javascript long time ago I thought JS is weird enough, but Swift is even more.
Why does it allow me to compile the code below? In the last line `taker.take(view)`, the `view` is an optional passed into a function that expects non-optional `some View`. How is this even possible!? I tried to change the view with some the other protocols, then it complaints, why the `View` protocol is different from the others?
```
import SwiftUI
struct ViewStruct: View {
var body: some View {
Text("")
}
}
class Taker {
func take (_ view: some View) {
print(view)
}
}
class Container {
var view:ViewStruct?
func createView() {
view = ViewStruct()
}
func test() throws {
let taker = Taker()
guard let viewIsView = view else {
throw fatalError()
}
taker.take(view)
}
}
```7 -
Ghidra won't let you relocate a function or data label and update all pointers to it, so I made a tool where that is its only fucking job. That's all it does. Open a textfile, drop in symbol names, paste in hex strings, change address bytes in the hex strings to other symbol names, hit GO. why is this not a feature built into these goddamn RE tools, when people have been doing this manually since before game piracy was a thing on home computers?2
-
I need some help with parking a domain in ovh.com webhosting. It's a real pain in the ass so any input is strongly appreciated. I kinda figured out what todo already, but still need some clarification.
Normally after buying a webhosting all I would need to do is login to my domain registrar's website and in the control panel just change nameservers to webhosting nameservers and that's all. Webhosting provider would take care of the rest (subdomain creation, e-mail creation and etc.) But because OVH are assholes, they support this type of domain parking only for domains registered at OVH.
For external domains, procedure is as follows:
For the configuration to function, you will need to make the following adjustments with the current provider:
Insert a TXT record for the domain ovhcontrol.mydomain.com with the value jwyPolzgrZyIShzaQItqw
Point the A record of your domain mydomain.com to 51.244.97.19
Point the A record of your domain www.mydomain.com to 51.244.97.19
So basically I had to login to registrars cPanel and first of all I had to park my domain back to my registrar (I had to switch to default nameservers which are provided by domain registrar)
Only then I got advanced access to dns zone in order to add the required records above.
When I open my domain registrars dns zone cpanel this is what I see:
http://prntscr.com/nekx40
So basically, as I understand, I just need to add these required records like this?
http://prntscr.com/nekxjc
Am I correct?
So basically my OVH webhosting doesn't deal with dns zone at all, I will have to use my own registrar for adding subdomains?
What about e-mail addresses? OVH doesnt allow me to create emailboxes for "externally" parked domain addresses. Will I have to search for some e-mail provider, and add some additional records?
Any input/help would be appreciated.1 -
TypeScript is bullshit. Change My Mind:
I am a student and I started learning typescript as an advanced project at the recommendation of my teachers because I am a bit ahead of where my software development course is.
I started by testing the logic of types, and then I encountered type: unknown.
According to the TS handbook:
"If you have a variable with an unknown type, you can narrow it to something more specific by doing typeof checks, comparison checks, or more advanced type guards that will be discussed in a later chapter:"
So according to what this says, if you check a variable of type unknown, to equal a certain object type, typescript will allow you to assign that unknown value a I tested this out with a data type - objects and typescript freaks out.
Also, if create object with a property assigned to a function, it won't even show you that property when you console.log the object
ALSO, you can't post urls in this website, so this website is also pretty trash.12