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 - "single file"
-
Hi, I am a Javascript apprentice. Can you help me with my project?
- Sure! What do you need?
Oh, it’s very simple, I just want to make a static webpage that shows a clock with the real time.
- Wait, why static? Why not dynamic?
I don’t know, I guess it’ll be easier.
- Well, maybe, but that’s boring, and if that’s boring you are not going to put in time, and if you’re not going to put in time, it’s going to be harder; so it’s better to start with something harder in order to make it easier.
You know that doesn’t make sense right?
- When you learn Javascript you’ll get it.
Okay, so I want to parse this date first to make the clock be universal for all the regions.
- You’re not going to do that by yourself right? You know what they say, don’t repeat yourself!
But it’s just two lines.
- Don’t reinvent the wheel!
Literally, Javascript has a built in library for t...
- One component per file!
I’m lost.
- It happens, and you’ll get lost managing your files as well. You should use Webpack or Browserify for managing your modules.
Doesn’t Javascript include that already?
- Yes, but some people still have previous versions of ECMAScript, so it wouldn’t be compatible.
What’s ECMAScript?
- Javascript
Why is it called ECMAScript then?
- It’s called both ways. Anyways, after you install Webpack to manage your modules, you still need a module and dependency manager, such as bower, or node package manager or yarn.
What does that have to do with my page?
- So you can install AngularJS.
What’s AngularJS?
- A Javascript framework that allows you to do complex stuff easily, such as two way data binding!
Oh, that’s great, so if I modify one sentence on a part of the page, it will automatically refresh the other part of the page which is related to the first one and viceversa?
- Exactly! Except two way data binding is not recommended, since you don’t want child components to edit the parent components of your app.
Then why make two way data binding in the first place?
- It’s backed up by Google. You just don’t get it do you?
I have installed AngularJS now, but it seems I have to redefine something called a... directive?
- AngularJS is old now, you should start using Angular, aka Angular 2.
But it’s the same name... wtf! Only 3 minutes have passed since we started talking, how are they in Angular 2 already?
- You mean 3.
2.
- 3.
4?
- 5.
6?
- Exactly.
Okay, I now know Angular 6.0, and use a component based architecture using only a one way data binding, I have read and started using the Design Patterns already described to solve my problem without reinventing the wheel using libraries such as lodash and D3 for a world map visualization of my clock as well as moment to parse the dates correctly. I also used ECMAScript 6 with Babel to secure backwards compatibility.
- That’s good.
Really?
- Yes, except you didn’t concatenate your html into templates that can be under a super Javascript file which can, then, be concatenated along all your Javascript files and finally be minimized in order to reduce latency. And automate all that process using Gulp while testing every single unit of your code using Jasmine or protractor or just the Angular built in unit tester.
I did.
- But did you use TypeScript?37 -
Good Morning!, its time for practiseSafeHex's most incompetent co-worker!
Todays contestant is a very special one.
*sitcom audience: WHY?*
Glad you asked, you see if you were to look at his linkedin profile, you would see a job title unlike any you've seen before.
*sitcom audience oooooooohhhhhh*
were not talking software developer, engineer, tech lead, designer, CTO, CEO or anything like that, No No our new entrant "G" surpasses all of those with the title ..... "Software extraordinaire".
*sitcom audience laughs hysterically*
I KNOW!, wtf does that even mean! as a previous dev-ranter pointed out does this mean he IS quality code? I'd say he's more like a trash can ... where his code belongs
*ba dum tsssss*
Ok ok, lets get on with the show, heres some reasons why "G" is on the show:
One of G's tasks was to build an analytics gathering library for iOS, similar to google analytics where you track pages and events (we couldn't use google's). G was SO good at this job he implemented 2 features we didn't even ask for:
- If the library was unable to load its config file (for any reason) it would throw an uncatchable system integrity error, crashing the app.
- If anything was passed into any of the functions that wasn't expected (null, empty array etc.) it would crash the app as it was "more efficient" to not do any sanity checks inside the library.
This caused a lot of issues as some of the data needed to come from the clients server. The day we launched the app, within the first 3 hours we had over 40k crash logs and a VERY angry client.
Now, what makes this story important is not the bugs themselves, come on how many times have we all done something stupid? No the issue here was G defended all of this as the right thing to do!
.. and no he wasn't stoned or drunk!
G claimed if he couldn't get the right settings / params he wouldn't be able to track the event and then our CEO wouldn't have our usage data. To which I replied:
"So your solution was to not give the client an app instead? ... which also doesn't give the CEO his data".
He got very angry and asked me "what would you do then?". I offered a solution something like why not have a default tag for "error" or "unknown" where if theres an issue, we send up whatever we have, plus the file name and store it somewhere else. I was told I was being ridiculous as it wasn't built to track anything like that and that would never work ... his solution? ... pull the library out of the app and forget it.
... once again giving everyone no data.
G later moved onto another cross-platform style project. Backend team were particularly unhappy as they got no spec of what needed to be done. All they knew was it was a single endpoint dealing with very complex model. There was no Java classes, super classes, abstract classes or even interfaces, just this huge chunk of mocked data. So myself and the lead sat down with him, and asked where the interfaces for the backend where, or designs / architecture for them etc.
His response, to this day frightens me ... not makes me angry, not bewilders me ... scares the living shit out of me that people like this exist in the world and have successful careers.
G: "hhhmmm, I know how to build an interface, but i've never understood them ... Like lets say I have an interface, what now? how does that help me in any way? I can't physically use it, does it not just use up time building it for no reason?"
us: "... ... how are the backend team suppose to understand the model, its types, integrate it into the other systems?"
G: "Can I not just tell them and they can write it down?"
**
I'll just pause here for a moment, as you'll likely need to read that again out of sheer disbelief
**
I've never seen someone die inside the way the lead did. He started a syllable and his face just dropped, eyes glazed over and he instantly lost all the will to live. He replied:
" wel ............... it doesn't matter ... its not important ... I have to go, good luck with the project"
*killed the screen share and left the room*
now I know you are all dying in suspense to know what happened to that project, I can drop the shocking bombshell that it was in fact cancelled. Thankfully only ~350 man hours were spent on it
... yep, not a typo.
G's crowning achievement however will go down in history. VERY long story short, backend got deployed to the server and EVERYTHING broke. Lead investigated, found mistakes and config issues on every second line, load balancer wasn't even starting up. When asked had this been tested before it was deployed:
G: "Yeah I tested it on my machine, it worked fine"
lead: "... and on the server?"
G: "no, my machine will do the same thing"
lead: "do you have a load balancer and multiple VM's?"
G: "no, but Java is Java"
... and with that its time to end todays episode. Will G be our most incompetent? ... maybe.
Tune in later for more practiceSafeHex's most incompetent co-worker!!!31 -
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
This was over a year ago now, but my first PR at my current job was +6,249/-1,545,334 loc. Here is how that happened... When I joined the company and saw the code I was supposed to work on I kind of freaked out. The project was set up in the most ass-backward way with some sort of bootstrap boilerplate sample app thing with its own build process inside a subfolder of the main angular project. The angular app used all the CSS, fonts, icons, etc. from the boilerplate app and referenced the assets directly. If you needed to make changes to the CSS, fonts, icons, etc you would need to cd into the boilerplate app directory, make the changes, run a Gulp build that compiled things there, then cd back to the main directory and run Grunt build (thats right, both grunt and gulp) that then built the angular app and referenced the compiled assets inside the boilerplate directory. One simple CSS change would take 2 minutes to test at minimum.
I told them I needed at least a week to overhaul the app before I felt like I could do any real work. Here were the horrors I found along the way.
- All compiled (unminified) assets (both CSS and JS) were committed to git, including vendor code such as jQuery and Bootstrap.
- All bower components were committed to git (ALL their source code, documentation, etc, not just the one dist/minified JS file we referenced).
- The Grunt build was set up by someone who had no idea what they were doing. Every SINGLE file or dependency that needed to be copied to the build folder was listed one by one in a HUGE config.json file instead of using pattern matching like `assets/images/*`.
- All the example code from the boilerplate and multiple jQuery spaghetti sample apps from the boilerplate were committed to git, as well as ALL the documentation too. There was literally a `git clone` of the boilerplate repo inside a folder in the app.
- There were two separate copies of Bootstrap 3 being compiled from source. One inside the boilerplate folder and one at the angular app level. They were both included on the page, so literally every single CSS rule was overridden by the second copy of bootstrap. Oh, and because bootstrap source was included and commited and built from source, the actual bootstrap source files had been edited by developers to change styles (instead of overriding them) so there was no replacing it with an OOTB minified version.
- It is an angular app but there were multiple jQuery libraries included and relied upon and used for actual in-app functionality behavior. And, beyond that, even though angular includes many native ways to do XHR requests (using $resource or $http), there were numerous places in the app where there were `XMLHttpRequest`s intermixed with angular code.
- There was no live reloading for local development, meaning if I wanted to make one CSS change I had to stop my server, run a build, start again (about 2 minutes total). They seemed to think this was fine.
- All this monstrosity was handled by a single massive Gruntfile that was over 2000loc. When all my hacking and slashing was done, I reduced this to ~140loc.
- There were developer's (I use that term loosely) *PERSONAL AWS ACCESS KEYS* hardcoded into the source code (remember, this is a web end app, so this was in every user's browser) in order to do file uploads. Of course when I checked in AWS, those keys had full admin access to absolutely everything in AWS.
- The entire unminified AWS Javascript SDK was included on the page and not used or referenced (~1.5mb)
- There was no error handling or reporting. An API error would just result in nothing happening on the front end, so the user would usually just click and click again, re-triggering the same error. There was also no error reporting software installed (NewRelic, Rollbar, etc) so we had no idea when our users encountered errors on the front end. The previous developers would literally guide users who were experiencing issues through opening their console in dev tools and have them screenshot the error and send it to them.
- I could go on and on...
This is why you hire a real front-end engineer to build your web app instead of the cheapest contractors you can find from Ukraine.19 -
toxic workplace; leaving
I haven't wanted to write this rant. I haven't even wanted to talk to anyone (save my gf, ofc). I've just been silently fuming.
I wrote a much longer rant going into far too much detail, but none of that is relevant, so I deleted it and wrote this shorter (believe it or not) version instead. And then added in more details because details.
------
On Tuesday, as every Tuesday, I had a conference call with the rest of the company. For various, mostly stupid reasons, the boss yelled at and insulted me for twenty minutes straight in front of everyone, telling me how i'm disorganized, forgetful, how can't manage my time, can't manage myself let alone others, how I don't have my priorities straight, etc. He told the sales team to get off the call, and then proceeded to yell and chew at me for another twenty minutes in front of the frontend contractor about basically the same things. The call was 53 minutes, and he spent 40 minutes of it telling me how terrible I've been. No exaggeration, no spin. The issues? I didn't respond to an email (it got lost in my ever-filling inbox), and I didn't push a very minor update last week (untested and straight to prod, ofc). (Side note: he's yelled at me for ~15 minutes before for being horribly disorganized and unable to keep up on Trello -- because I had a single card in the wrong column. One card, out of 60+ over two boards. Never mind that most have time estimates, project tags, details, linked to cards on his boards, columns for project/qa/released, labels for deferred, released to / rejected from qa, finished, in production, are ordered by priority, .... Yep. I'm totes disorganized.)
Anyway, I spent most of conference call writing "Go fuck yourself," "Choke on a cat and die asshole," "Shit code, low pay, and broken promises. what a prize position," etc. or flipping him off under the camera on our conference-turn-video-call (switched due to connection issues, because ofc video is more stable than audio-only in his mind).
I'm just.
so, so done.
I did nothing the rest of the day on Tuesday, and basically just played games on Wednesday. I did one small ticket -- a cert replacement since that was to expire the next day -- but the rest was just playing CrossCode. (fun game, fyi; totally recommend.)
Today? It's 3:30pm and I can't be bothered to do anything. I have an "urgent" project to finish by Monday, literally "to give [random third party sales guy] a small win". Total actual wording. I was to drop all other tasks (even the expiring cert lol) and give this guy his small win. fucking whatever. But the project deals with decent code -- it's a minor extension to the first project I did for the company (see my much earlier rants), back when I was actually applying myself and learning something (everything) new, enjoying myself, and architecting+writing my own code. So I might actually do the project, but It's been two days and I haven't even opened single file yet.
But yeah. This place is total and complete shit. Dealing with the asshole reminds me of dealing with my parents while growing up, and that's a subject I don't want to broach -- far too many toxic memories.
So, I'm quitting as soon as I find something new.
and with luck, this will be before assface hires my replacement-to-be, and who will hopefully quit as soon as s/he sees the abysmal codebase. With even more luck, the asshole king himself will get to watch his company die due to horrible mismanagement. (though ofc he'll never attribute it to himself. whatever.)
I just never want to see or think about him again.
(nor this fetid landfill of a codebase. bleh.)
With luck, this will be one of my last rants about this toxic waste dump and its king of the pile.
Fourty fucking minutes, what the fuck.33 -
My first day in a Linux admin and security course. I went all confident and cocky waiting for some bullshit like "type in your term: ls, cd, pwd, see you tomorrow"
Suddenly the teacher starts to configure lampp, then jumps to bind, and thirty minutes leater , when everyone has their ssl keys under control, I was still struggling to correctly forward my mate. The rest of the day was smooth and easy for those who finished their servers, and there I was, unable to find my own ass in the middle of that mess made of bad assigned permissions and wrong placed addresses. Even worse, he came to me when I asked for help, took my chair and fixed everything in one beautiful single bash line. I started to ask "what's this? Where is that? Is it a config file or a directory?" And with all his patience he keep telling me the obvious answers that where right there at the screen but I couldn't see. Took me two weeks to catch his pace, and another two weeks to understand fully his classes. He never said a word about my terrible first day (first couple weeks). When course finished, I saw he was going to teach a really hard security module, and I signed up without hesitate.6 -
26 years ago Linus Torvalds sent out this message to the comp.os.minx newsgroup.
Hello everybody out there using minix -
I’m doing a (free) operating system (just a hobby, won’t be big and
professional like gnu) for 386(486) AT clones. This has been brewing
since april, and is starting to get ready. I’d like any feedback on
things people like/dislike in minix, as my OS resembles it somewhat
(same physical layout of the file-system (due to practical reasons)
among other things).
I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work.
This implies that I’ll get something practical within a few months, and
I’d like to know what features most people would want. Any suggestions
are welcome, but I won’t promise I’ll implement them :-)
- Linus
PS. Yes — it’s free of any minix code, and it has a multi-threaded fs.
It is NOT protable (uses 386 task switching etc), and it probably never
will support anything other than AT-harddisks, as that’s all I have :-(.
Fast forward to today and Linux has more than 12 000 contributors from over 1300 companies that contribute to the Linux kernel.
The Linux Foundation released a fairly detailed progress report, including an infographic which I was tempted to include here but you can view it in it’s original context here.
While you’re over there, remember you can be a sponsor of the Linux Foundation too.
Happy Birthday Linux and a giant thanks to not only Linus but every single one of the contributors that have taken part of it over the years.5 -
Found this gem on GitHub:
// At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
Ref : https://github.com/zepouet/...16 -
TABLE BASED WEB DESIGN
I was surprised there were no rants about this topic before I realized it was more than a decade back 😳
We've never had it better! So to help add a little perspective for all those ranting about what is unarguably the golden age for web developers... let me fill you in on web dev in the late 90's;
JavaScript was a joke. No seriously! - I once got laughed out of the room for suggesting we try use it for more than disabling a button - (I wanted to check out the new XHR request thingy [read AJAX]).
HTML was simple and purely a markup language (with the exception of the marquee tag). The tags were basically just p,ul,ol,h*,form inputs,img and table and html took 10 minutes to learn. Any style was inline and equally crude - anything that wasn't crude could not be trusted and probably wouldn't render at all in most browsers (never mind render correctly).
There were rumors of a style TAG and something called a cascading style sheet which were received with much skepticism since it went against the old ways and any time saved would be lost writing multiple [IE version specific] style sheets for each browser just to get it to work - so we simply didn't.
No CSS meant the only tags you had to work with to create a structured layout were br, hr and table... so naturally EVERYTHING was in nested tables! JS callback hell can't touch this! - it was not uncommon to have 50+ nested tables all with inline style in a single page which would be edited without any dev tools or linting.
You would spend 30 minutes scanning td tags until your eyes bled to find something, make a change, ftp the file to the server, reload the web page and then spend 10 minutes staring at the devastation on your screen convinced you broke
the internet before spotting an un-closed td tag with your bloodshot eyes.
Tables were not just a silver bullet - they were the ONLY bullet and were in the wild west!
Q: Want an inline form or to align your inputs left?
A: Duh table!
Q: Want a border with round-corners, a shadow or blur?
A: That's easy! Your gonna want to put that table in the center cell of another table then crop a image of the border into 6 smaller images to put in the surrounding cells... oh and then spend 10 minutes fucking with mystical attributes like cell-padding and valign to get them flush.
...But hey at least on the bright-side vertically & horizontally centering stuff was a breeze!22 -
I know that my coworker can't write a single fucking operable line of code. So I wrote a script that is called everytime someone pushes new commits. If the commits contain the username of my coworker, create a ticket in YouTrack with the Label "Rewrite", and assign it to the files changed.
So I had that running for a longer time, and my dumbfuck of coworker hardcoded the credentials of the server in a networking library. One of the credentials was his username. He then updated the copyright on the whole project(which adds a copyright in the top of every file), also in the included librarys(!). The script had a check if the files are related to the project or just librarys. In the end, he pushed all of that with another account(in fact, a reporter account), which had another name(and didn't even belong him). So the files didn't belong to the project, the script sees his username anyways, the script assigns a rewrite, and in the end, everyone in the team thinks I'm mad because I(the script with my account) assigned a rewrite to a HUGE library.
PS: It was great fun to remove these copyright notices.8 -
[This makes me sound really bad at first, please read the whole thing]
Back when I first started freelancing I worked for a client who ran a game server hosting company. My job was to improve their system for updating game servers. This was one of my first clients and I didn't dare to question the fact that he was getting me to work on the production environment as they didn't have a development one setup. I came to regret that decision when out of no where during the first test, files just start deleting. I panicked as one would and tried to stop the webserver it was running on but oh no, he hasn't given me access to any of that. I thought well shit, I might as well see where I fucked up since it was midnight for him and I wasn't able to get a hold of him. I looked at every single line hundreds of times trying to see why it would have started deleting files. I found no cause. Exhausted, (This was 6am by this point) I pretty much passed out. I woke up around 5 hours later with my face on my keyboard (I know you've all done that) only to see a good 30 messages from the client screaming at me. It turns out that during that time every single client's game server had been deleted. Before responding and begging for forgiveness, I decided to take another crack at finding the root of the problem. It wasn't my fault. I had found the cause! It turns out a previous programmer had a script that would run "rm -rf" + (insert file name here) on the old server files, only he had fucked up the line and it would run "rm -rf /". I have never felt more relieved in my life. This script had been disabled by the original programmer but the client had set it to run again so that I could remake the system. Now, I was never told about this specific script as it was for a game they didn't host anymore.
I realise this is getting very long so I'll speed it up a bit.
He didn't want to take the blame and said I added the code and it was all my fault. He told me I could be on live chat support for 3 months at his company or pay $10,000. Out of all of this I had at least made sure to document what I was doing and backup every single file before I touched them which managed to save my ass when it came to him threatening legal action. I showed him my proof which resulted in him trying to guilt trip me to work for him for free as he had lost about 80% of his clients. By this point I had been abused constantly for 4 weeks by this son of a bitch. As I was underage he had said that if we went to court he'd take my parents house and make them live on the street. So how does one respond? A simple "Fuck off you cunt" and a block.
That was over 8 years ago and I haven't heard from him since.
If you've made it this far, congrats, you deserve a cookie!6 -
I recently joined the dark side - an agile consulting company (why and how is a long story). The first client I was assigned to was an international bank. The client wanted a web portal, that was at its core, just a massive web form for their users to perform data entry.
My company pitched and won the project even though they didn't have a single developer on their bench. The entire project team (including myself) was fast tracked through interviews and hired very rapidly so that they could staff the project (a fact I found out months later).
Although I had ~8 years of systems programming experience, my entire web development experience amounted to 12 weeks (a part time web dev course) just before I got hired.
I introduce to you, my team ...
Scrum Master. 12 years experience on paper.
Rote memorised the agile manifesto and scrum textbooks. He constantly went “We should do X instead of (practical thing) Y, because X is the agile way.” Easily pressured by the client to include ridiculous (real time chat in a form filling webpage), and sometimes near impossible features (undo at the keystroke level). He would just nag at the devs until someone mumbled ‘yes' just so that he would stfu and go away.
UX Designer. 3 years experience on paper ... as business analyst.
Zero professional experience in UX. Can’t use design tools like AI / photoshop. All he has is 10 weeks of UX bootcamp and a massive chip on his shoulder. The client wanted a web form, he designed a monstrosity that included several custom components that just HAD to be put in, because UX. When we asked for clarification the reply was a usually condescending “you guys don’t understand UX, just do <insert unhandled edge case>, this is intended."
Developer - PHD in his first job.
Invents programming puzzles to solve where there are none. The user story asked for a upload file button. He implemented a queue system that made use of custom metadata to detect file extensions, file size, and other attributes, so that he could determine which file to synchronously upload first.
Developer - Bootlicker. 5 years experience on paper.
He tried to ingratiate himself with the management from day 1. He also writes code I would fire interns and fail students for. His very first PR corrupted the database. The most recent one didn’t even compile.
Developer - Millennial fratboy with a business degree. 8 years experience on paper.
His entire knowledge of programming amounted to a single data structures class he took on Coursera. Claims that’s all he needs. His PRs was a single 4000+ line files, of which 3500+ failed the linter, had numerous bugs / console warnings / compile warnings, and implemented 60% of functionality requested in the user story. Also forget about getting his attention whenever one of the pretty secretaries walked by. He would leap out of his seat and waltz off to flirt.
Developer - Brooding loner. 6 years experience on paper.
His code works. It runs, in exponential time. Simply ignores you when you attempt to ask.
Developer - Agile fullstack developer extraordinaire. 8 years experience on paper.
Insists on doing the absolute minimum required in the user story, because more would be a waste. Does not believe in thinking ahead for edge conditions because it isn’t in the story. Every single PR is a hack around existing code. Sometimes he hacks a hack that was initially hacked by him. No one understands the components he maintains.
Developer - Team lead. 10 years of programming experience on paper.
Writes spaghetti code with if/else blocks nested 6 levels deep. When asked "how does this work ?”, the answer “I don’t know the details, but hey it works!”. Assigned as the team lead as he had the most experience on paper. Tries organise technical discussions during which he speaks absolute gibberish that either make no sense, or are complete misunderstandings of how our system actually works.
The last 2 guys are actually highly regarded by my company and are several pay grades above me. The rest were hired because my company was desperate to staff the project.
There are a 3 more guys I didn’t mention. The 4 of us literally carried the project. The codebase is ugly as hell because the others merge in each others crap. We have no unit tests, and It’s near impossible to start because of the quality of the code. But this junk works, and was deployed to production. Today is it actually hailed as a success story.
All these 3 guys have quit. 2 of them quit without a job. 1 found a new and better gig.
I’m still here because I need the money. There’s a tsunami of trash code waiting to fail in production, and I’m the only one left holding the fort.
Why am I surrounded by morons?
Why are these retards paid more than me?
Why are they so proud when all they produce is trash?
How on earth are they still hired?
And yeah, FML.8 -
I can’t count money as quick. I don’t know how to operate a cash register. I’m bad at following small tasks in the kitchen. Ex: girlfriend yells at me for putting unstrained yolk in recipe (after straining it).
I can’t lift heavy stuff. Out of breathe helping my mom move. My uncle told me, “if you can’t do that, how can you work?” Then he touts his son around proudly for being in the army. I felt like shit for years.
My cousins told me to get a job at McDonald’s to learn the value of a dollar. I spent all this time studying and hadn’t found a single job at the time (not that I was looking). I was living off financial aid and some income from an app that sold for a dollar on the App Store.
I would mess up if I worked there. It was depressing guys. These people who worked at McDonald’s and Starbucks. It was like a cool club that I couldn’t be a part of! I wanted to be that smooth barista at Starbucks with a smug look on my face. Making coffee for all the ladies and writing hearts next to their name on the cup.
The responsibilities of going to work day after day and blowing your paycheck at a meal at Denny’s with your friends. Complaining about not getting enough hours and talking about adult stuff! Sigh sigh sigh. Oh and taxes! Let’s complain about taxes on a single W-2 just for the hell of it (not sure why they do this when you can file a simple 1040EZ) even though we get a refund.
Then..
After many paid internships (roughly 3), now I may be receiving an offer that is 100k+ with a 401k and all benefits I can imagine. Free food up the wazoo. Gym on site. Happy hour Friday’s.
I brag about taking a shit for an hour at work and coworkers don’t give a shit. Or taking a day off to do personal errands anytime.
Having my own place in a nice area (though the cost of living is enough to take care of 3 families in another state). Supporting my girlfriend through school and helping her with her dreams of art.
Going to fancy dinners and not worrying about the bill afterwards.
Accidentally damaging my 2017 Honda Accord and not giving a fuck because I can pay $900 for repair with less than a week of work.
But I can’t help but think that all this time..
I could’ve just quit and worked at McDonalds. I could’ve been one of the cool kids..8 -
Honestly, I’ve been complaining a lot about the company I joined a few months ago and especially about the code base and I just have to say ...
With good fucking reason, look at this shit, every single *.js file of our Angular app is manually added inside the master page
Not even minimized what the actual fuckkkkkkkkkkk15 -
"Hey can you add (feature) on this backend"
> Looks at backend
> api.py
> 4K+ Lines
uhhh... is it me or our entire production is held by this single Python backend....?
This thing is running our hypervisor platform... Our IaaS platform... and it's one file....
WHAT THE FUCK8 -
Actual rant time. And oh boy, is it pissy.
If you've read my posts, you've caught glimpses of this struggle. And it's come to quite a head.
First off, let it be known that WINDOWS Boot Manager ate GRUB, not the other way around. Windows was the instigator here. And when I reinstalled GRUB, Windows threw a tantrum and won't boot anymore. I went through every obvious fix, everything tech support would ever think of, before I called them. I just got this laptop this week, so it must be in warranty, right? Wrong. The reseller only accepts it unopened, and the manufacturer only covers hardware issues. I found this after screaming past a pretty idiotic 'customer representative' ("Thank you for answering basic questions. Thank you for your patience. Thank you for repeating obvious information I didn't catch the first three times you said it. Thank you for letting me follow my script." For real. Are you tech support, or emotional support? You sound like a middle school counselor.) to an xkcd-shibboleth type 'advanced support'. All of this only to be told, "No, you can't fix it yourself, because we won't give you the license key YOU already bought with the computer." And we already know there's no way Microsoft is going to swoop in and save the day. It's their product that's so faulty in the first place. (Debian is perfectly fine.)
So I found a hidden partition with a single file called 'Image' and I'm currently researching how to reverse-engineer WIM and SWM files to basically replicate Dell's manufacturing process because they won't take it back even to do a simple factory reset and send it right back.
What the fuck, Dell.
As for you, Microsoft, you're going to make it so difficult to use your shit product that I have to choose between an arduous, dangerous, and likely illegal process to reclaim what I ALREADY BOUGHT, or just _not use_ a license key? (Which, there's no penalty for that.) Why am I going so far out of my way to legitimize myself to you, when you're probably selling backdoors and private data of mine anyway? Why do I owe you anything?
Oh, right. Because I couldn't get Fallout 3 to run in Wine. Because the game industry follows money, not common sense. Because you marketed upon idiocy and cheapness and won a global share.
Fuck you. Fuck everything. Gah.
VS Code is pretty good, though.20 -
DO YOU EVEN CARE ABOUT MENTAL HEALTH
FUCKING DICKSHIT THE WORLD DOESN'T NEED YOU, THE WORLD DOESN'T WANT YOU. YOU SHOULD HAVE SUFFOCATED STRANGLED BY YOUR MOM'S VAGINA. HOLY SHIT "Im sO HapPy tO LEarN prOgRAmmiNg" YOU ARE NOT FUCKING LEARNING ANYTHING IF YOU END UP WITH A 3000 LINES SINGLE FILE YOU ARE JUST SMASHING YOUR DEAD PARENTS ON THE KEYBOARD LITTLE SICK PIDGEON RAPER. FUCKING BACHELOR STUDENT OF MY ASS HANG YOURSELF.17 -
Haven’t been on here for ages, but I felt like I needed to post this:
Warning:
This is long, and it might make you cry.
Backstory:
A couple of months back I worked for a completely clueless dude who had somehow landed a contract for a new website for a huge company. After a while he realised that he was incapable of completing the assignment. He then hired me as a subcontractor and I deleted literally everything he had done and started from scratch. He had over promised and under explained what needed to be done to me. It took many sleepless nights to get this finished with all the amendments and I had to double my pricing because he kept changing the brief.
Even after doubling my prices I still put in way too many hours of work. At one point I had enough and just ghosted the guy as I had done what he asked, and when he submitted it to them they wanted changes. He couldn’t make the changes, so I had to. He wouldn’t pay me extra though. I decided it wasn’t worth my time.
A couple of days ago I heard from him again. He had found another subcontractor to finish the changes. He still needed a few things though, so he promised me that I would get paid after fixing those things. I looked at the few things he had listed in our KANBAN and thought it was a few easy tasks.. until I opened the project..
I had my computer set up to sync with his server because he wanted everything done live and in production. So I naturally thought I would just “sync down” everything that the other subcontractor had done.
Here is where the magic started to happen.. I started the sync and went to grab a glass of water, and it was still running when I came back. I looked at the log and saw a bunch of “node_module” files syncing - around 900 folders. Funny thing is; neither the site nor server has anything to do with node..
I disregarded this and downloaded the files in a more manual fashion to a new folder. Interestingly I could see that my SCSS folders had not been touched since I stopped working on the project.. interesting, I thought to myself..
Turns out, the other subcontractor had taken my rendered and minimised CSS file, prettified it and worked from there. This meant that the around ~1500 lines of SCSS neatly organised in around 20 files was suddenly turned into a monster of a single CSS file of no less than 17300 lines.
I tried to explain to the guy that the other subcontractor had fucked up, but he said that I should be able to fix it since I was the one that made it initially. I haven’t replied. My life is too short for this.8 -
Never have I been so furious whilst at work as yesterday, I am still super pissed about going back today but knowing it's only for another few weeks makes it baerable.
I have been the lead developer on a project for the last 3~ months and our CTO is the product owner. So every now and then he decides to just work on a feature he is interested in- fair enough I guess. But everything I have to go and clean up his horrendous code. Everything he writes is an absolute joke, it's like he is constantly in Hackathon mode "let's just copy and paste some code here, hardcoded shit there and forgot about separation of code- it all goes in 1 file".
So yesterday he added a application to the project and instead of reusing a shared data access layer he added an entirely new ORM, which is near identical to the existing ORM in use, for this one application.
Being anal about these things, the first thing I did was delete his shit and simply reference the shared library then refactor a little code to make it compatible.
WELL!! I certainly hit a nerve, he went crazy spamming messages on Slack demanding I revert as it broke ONE SINGLE QUERY that he hadn't checked in (he does 1 huge commit for 10 of everyone else's). I stuck to my principals and explained both ORM's are similar and that we only needed one, the second would cause a fragmented codebase for no benefit whatsoever.
The lead Dev was then forced to come and convince me to revert, again I refused and called out the shit quality of their code. The battle raged on via the public slack group and I could hear colleagues enjoying the heated debate, new users even started joining the group just to get in on mine and the cto's difference of opinion.
I even offered to fix his code for him if he were to commit it, obviously that was not taken well ;).
Once I finally got a luck at the cluster fuck of shit he had written it took me around 5 minutes to fix and I ever improved performance. Regardless he was having none of it. Still the demands to revert continued.
I left the office steaming after long discussions with the lead Dev caught in the middle.
Fortunately my day was salvages with a positive technical discussion that evening at a company with whome I had a job offer from.
I really hate burning bridges and have never left a company under bad terms but this dictator is making me look forward to breaking the news today I will be gone in 4 weeks.4 -
Manager: our file IO is slow, any suggestions to make it faster?
Code: multithread writing to a few hundred small (temp) files then single thread combine to one big file and delete the temp files.
Eyes: bleeding31 -
At the data restaurant:
Chef: Our freezer is broken and our pots and pans are rusty. We need to refactor our kitchen.
Manager: Bring me a detailed plan on why we need each equipment, what can we do with each, three price estimates for each item from different vendors, a business case for the technical activities required and an extremely detailed timeline. Oh, and do not stop doing your job while doing all this paperwork.
Chef: ...
Boss: ...
Some time later a customer gets to the restaurant.
Waiter: This VIP wants a burguer.
Boss: Go make the burger!
Chef: Our frying pan is rusty and we do not have most of the ingredients. I told you we need to refactor our kitchen. And that I cannot work while doing that mountain of paperwork you wanted!
Boss: Let's do it like this, fix the tech mumbo jumbo just enough to make this VIP's burguer. Then we can talk about the rest.
The chef then runs to the grocery store and back and prepares to make a health hazard hurried burguer with a rusty pan.
Waiter: We got six more clients waiting.
Boss: They are hungry! Stop whatever useless nonsense you were doing and cook their requests!
Cook: Stop cooking the order of the client who got here first?
Boss: The others are urgent!
Cook: This one had said so as well, but fine. What do they want?
Waiter: Two more burgers, a new kind of modern gaseous dessert, two whole chickens and an eleven seat sofa.
Chef: Why would they even ask for a sofa?!? We are a restaurant!
Boss: They don't care about your Linux techno bullshit! They just want their orders!
Cook: Their orders make no sense!
Boss: You know nothing about the client's needs!
Cook: ...
Boss: ...
That is how I feel every time I have to deal with a boss who can't tell a PostgreSQL database from a robots.txt file.
Or everytime someone assumes we have a pristine SQL table with every single column imaginable.
Or that a couple hundred terabytes of cold storage data must be scanned entirely in a fraction of a second on a shoestring budget.
Or that years of never stored historical data can be retrieved from the limbo.
Or when I'm told that refactoring has no ROI.
Fuck data stack cluelessness.
Fuck clients that lack of basic logical skills.5 -
Every single diagramming tool.
All the SaaS ones are either way too limited in function, or proprietary vendor-locked.
All the FOSS/desktop ones have a 90s UX experience.
I really want to make a great, comfortable-to-use diagramming tool which just directly uses SVG as the file format, but without the "FUCK IT DOESNT ALIGN CORRECTLY AND WHY IS THIS ARROW BEHIND THE REST" experience...
But I know deep down that it's hard work, and I'll probably get stuck delivering the gazillionth lackluster, bugged diagramming app.20 -
it's funny, how doing something for ages but technically kinda the wrong way, makes you hate that thing with a fucking passion.
In my case I am talking about documentation.
At my study, it was required to write documentation for every project, which is actually quite logical. But, although I am find with some documentation/project and architecture design, they went to the fucking limit with this shit.
Just an example of what we had to write every time again (YES FOR EVERY MOTHERFUCKING PROJECT) and how many pages it would approximately cost (of custom content, yes we all had templates):
Phase 1 - Application design (before doing any programming at all):
- PvA (general plan for how to do the project, from who was participating to the way of reporting to your clients and so on - pages: 7-10.
- Functional design, well, the application design in an understandeable way. We were also required to design interfaces. (Yes, I am a backender, can only grasp the basics of GIMP and don't care about doing frontend) - pages: 20-30.
- Technical design (including DB scheme, class diagrams and so fucking on), it explains it mostly I think so - pages: 20-40.
Phase 2 - 'Writing' the application
- Well, writing the application of course.
- Test Plan (so yeah no actual fucking cases yet, just how you fucking plan to test it, what tools you need and so on. Needed? Yes. but not as redicilous as this) - pages: 7-10.
- Test cases: as many functions (read, every button click etc is a 'function') as you have - pages: one excel sheet, usually at least about 20 test cases.
Phase 3 - Application Implementation
- Implementation plan, describes what resources will be needed and so on (yes, I actually had to write down 'keyboard' a few times, like what the actual motherfucking fuck) - pages: 7-10.
- Acceptation test plan, (the plan and the actual tests so two files of which one is an excel/libreoffice calc file) - pages: 7-10.
- Implementation evalutation, well, an evaluation. Usually about 7-10 FUCKING pages long as well (!?!?!?!)
Phase 4 - Maintaining/managing of the application
- Management/maintainence document - well, every FUCKING rule. Usually 10-20 pages.
- SLA (Service Level Agreement) - 20-30 pages.
- Content Management Plan - explains itself, same as above so 20-30 pages (yes, what the fuck).
- Archiving Document, aka, how are you going to archive shit. - pages: 10-15.
I am still can't grasp why they were surprised that students lost all motivation after realizing they'd have to spend about 1-2 weeks BEFORE being allowed to write a single line of code!
Calculation (which takes the worst case scenario aka the most pages possible mostly) comes to about 230 pages. Keep in mind that some pages will be screenshots etc as well but a lot are full-text.
Yes, I understand that documentation is needed but in the way we had to do it, sorry but that's just not how you motivate students to work for their study!
Hell, students who wrote the entire project in one night which worked perfectly with even easter eggs and so on sometimes even got bad grades BECAUSE THEIR DOCUMENTATION WASN'T GOOD ENOUGH.
For comparison, at my last internship I had to write documentation for the REST API I was writing. Three pages, providing enough for the person who had to, to work with it! YES THREE PAGES FOR THE WHOLE MOTHERFUCKING PROJECT.
This is why I FUCKING HATE the word 'documentation'.36 -
So I have a teacher that when he use "C++" it is basically C with a .cpp file-extension and -O0 compiler flag.
Last assignment was to implement some arbitrary lengthy calculation with a tight requirement of max 1 second runtime, to force us to basically handroll C code without using std and any form of abstraction. But because the language didn’t freeze in time 1998, there is a little keyword named "constexpr" that folded all my classes, arrays, iterators, virtual methods, std::algorithms etc, into a single return statement. Thus making my code the fastest submitted.
Lesson of the story, use the language to the fullest and always turn on the damn optimizer
Ok now I’m done 😚7 -
So last year in highschool, everybody had to make a website project with stores and stuff. Everybody was in groups and you could plan your time on you own, working in class or at home.
So my friend spent hours at home designing his website for his group, and to be honest, it looked amazing.
There was only one problem, all files were located on a server which was accessible by all groups without the teacher even being able to know who had accessed which file.
There was this one group which just spent their time in class playing stupid browser games, 3 people in a group, one of them looking at kpop and puppy's for what seemed like to be hours at a time.
Well to get to the point, about 1-2 days before deadline, they noticed they hadn't done shit.
SO THOSE FUCKING BASTARDS JUST COPIED ALL THE FUCKING CODE MY FRIEND HAD MADE.
AT PRESENTATION TIME THEIR "PROJECT" CAME UP FIRST AND MY FRIEND WAS TO ME LIKE "OH NO THOSE FUCKERS DIDN'T JUST COPY MY WHOLE WEBSITE".
ANYWAYS, THEY CLAIMED MY FRIEND HAD COPIED THEM AND GOT AWAY WITH IT!!! (They got an A on the Project, my friend got a C because the teacher thought he copy pasted the design.)
I spoke to diz dude who copied the code, we knew who it was, because the others in the group probably dont even know what the copy and paste keys were.
He laughed at me and said, "C'mon, it's not a big deal.."
IF YOU ARE TOO INCOMPETENT TO WRITE A SINGLE CODE OF LINE, THEN DONT FUCKING STEAL SHIT FROM OTHERS WHO PUT IN HOURS OF WORK, AND MESS UP THEIR GRADE. TAKE YOUR FUCKING F AND LEAVE THE CLASS!!!12 -
Why in the name of Donald Knuth did you think it was a good idea to have a 1500 line Java Method? What THE HELL WERE YOU SMOKING THE ENTIRE FILE IS OVER 3000 LINES AND HALF OF THEM ARE COMMENTED OUT!
Don't even get me started on your "unit tests" which is a massive 5000 line behemoth that randomly has massive swaths of code commented out.
And of course no solution like this would be complete with you HARD CODING EVERY F****INIG STRING IN EVERY TIME!
And it's not like you don't know how to use classes as you have several of them, every single one of which is over 500+ lines and consists of only getters and setters. LET ME INTRODUCE YOU TO A MAP! REALLY WHY WOULD YOU USE 500 LINES FOR A CLASS THAT IS JUST GETTERS AND SETTERS?!
The part that really burns me about all of this though, isn't the fact that you sent it to me when I was running into a similar issue, and said "check this out it should help", what bothers me most isn't the indescribable rage I felt looking at your code, the part that really really really bothers me is that you are a veteran with over 15 years in Java development, and according to the org chart are a lead senior engineer getting paid substantially more than me, whereas I am considered a lowly mid-level developer, who isn't worth promoting to your level.
On the plus side you are now going to be featured on theDailyWTF so congrats on the notoriety.8 -
Today was fucking awesome!
I always wanted to do a project in C++ since I've been more of a Java guy for years now.
And today, I finally wrote a full console program in C++! (For windows, it's a .exe)
The purpose of that program is to show if a file has a file lock on it (because of copying for example).
It started as simple as that, but got complicated quickly:
- It needs colors! So I added colors.
- Just a single file? Boring. I need wildcards, so I can put a * for anything in the file name! Jup.
- Just one directory? Boring. I need a recursive directory walk! Got it.
- But wait! There has to be an option to switch between recursive and wildcard/single mode! So I checked if the first argument equals "-r"! Hacky but works.
- Oh uh... that spams a lot now! The purpose was to show locked files, so I need another argument to specify that I only want to see locked files! Damn now it get's hard... I need a Linux-like command line argument parser (this -h and -s "hello" stuff). So I took the opportunity to write one myself! Done.
- Refactoring everything to use my new fancy parser...
- Adding more and more arguments, just because I can:
- "-d" hides "access denied" messages
- "-l" shows only locked files
- "-r" activates recursive directory walk
- "-f" formats everything nicely, basically printf("%-150.150s | %s", filename, locked); a maximum width which get's truncated if too long so everything lines up nicely
- "-h" which of course displays the help page
- "-w file" watches a file, if the file is locked it will refresh every 500ms, if it's still locked nothing happens, if it's unlocked, the program prints "unlocked" in green and exits. And yes, it does have a rotating line (something like this: "-" "\" "|" "/" "-" and so forth...)
That project was just awesome to make. I learn languages fastest if I just do a big project in them, and today, I really learned a lot.
Thank you for reading all this!3 -
Hello there, just couple of words about PHP. I've been develop on PHP more than 10 years, I've seen it all 3,4,5,{6},7. Yes PHP was not good in terms of engineering and patterns, but it was simple, it was the most simple language for web to start those days. It was simple as you put code into file, upload it via FTP and it works. No java servlets, no unix consoles, no nothing, just shared hosting account was enough to host site, or even application with database. As database everybody used to have mysql, again because its simple to start and easy to maintain. So PHP+MySQL became industry standard on Web during 00-2012, and continues in some way.
You can write HTML and logic inside single file, within php code, even more single file may content few pages, or even kind of framework. That simplicity and agility sticks everybody who wants to develop sites with PHP.
This is pretty much about why it is so popular.
Each good or wannabe PHP developer in an early days write its own framework or library (like in javascript this days because of nodejs)
Imagine that PHP has hadn't have package manager, developers used to have host packages on their own sites, then various packages catalog sites created, and then finally composer. A gazillions of php code had spread over internet, without any kind of dependency control. To include libraries to your projects you have to just write include, or require. Some developers do it better than others.
So what we have ? A lots of code, no repositories, zip archives with libraries, no dependency control.
Project that uses that kind of code are still alive even today, they are solid hose of cards, and unmaintainable of course.
And main question that I'm trying to answer is Why PHP is not good ?
- First is amount of legacy code which people copy and pasted into their project, spread it even more like a virus.
- Lack of industry standards at the beginning lead to a lots of bad practices among developers. PHP code usually smells.
open source php projects in early days was developed in same conditions so even in phpbb, phpnuke, wordpress, drupal used to have a lot of bad practices in their codebase. So php developers usually not study by another library, instead they write their own frameworks/libraries.
- "It works", - there are no strong business demands, on web development, again because lack of standards, and concerns.
This three things are basically same, they linked to each other and summarize of answer of why PHP have strong smells and everybody yelling against it.
Whats is with PHP nowadays ? Of course PHP today is more influenced by good practice of webdev. Composer, Zend, Laravel, Yii, Symphony and language it self became more adult so to say, but developers...
People who never tried anything except PHP are usually weaker in programming and ecosystem knowledge than people who tried something else, python, perl, ruby, c for instance.
Summary
PHP as any other programming language is a tool. Each tool has its own task. Consider this and your task requirements and PHP can be just good enough solution.
"PHP is shit" - usually you heard that from people who never write strong applications on PHP and haven't used any good tools like Symphony or Laravel.
Cheap developers, - the bigger community, the more chance to hire cheap developers, and more chance to get bad code. That can be applied on any other language.
PHP has professionals developers, usually they have not only php on scope.
That's all folks, this is very brief, I am not covering php usage early days in details, but this is good enough to understand the point.
Enjoy.8 -
So yesterday was a regular old day where I came into the office and began my work. My office mate that sits next to me happens to be having an issue with her batch script. It wasn't running correctly so she had decided to call in IT and have them take a look at it. What she was trying to do was process some images through a dedicated super-computer located on site.
So as you can imagine with both of them standing right next to me it was hard not to listen in on their conversation. The IT guy decided to go through a barrage of different troubleshooting methods to figure out what was happening with her script. And soon enough they discovered what was wrong. It happened to be an issue with how Windows decides to deal with new line characters. FYI it looks like this shit "\n \r"
The fucking \r looked like a directory to Linux. So it would squeal to a halt every single time she tried to run.
How this happened was due to her using notepad to edit her batch file.
At this point, I made a comment about her use of Notepad.
"Oh, you're using notepad? I've had similar issues like this in the past when I've used notepad. I really hate notepad." I said with a slight chuckle.
And that was pretty much the end of our encounters. However, at the end of the day, she decided to speak up about this.
"I don't appreciate you making comments about my use of Notepad. That was a form of microaggression towards me, and I don't want you to do it again."
Completely taken aback I replied.
"I'm sorry you took it that way, it was a joke and wasn't meant to be taken personally."
"Well, your intent does not change impact. And by the way, I take pride in my code and scripting. I don't need your commentary about my code nor your micro-aggressions." She said in a huff.
"Well again, I'm sorry you feel that way," I replied back
*I'd like to say that this situation is loosely paraphrased, but the essence of what happened is still there.
At this point, this is what I have to say about this situation. Why the FUCKING FUCK are you using notepad to program anything. There ARE A SHIT TON of differing programs that are available for your use and you decide to use fucking notepad?!?! $%&*@#$^
You could use notepad++, you could use Sublime, you could use every-fucking-thing except Notepad!!! If anything I think I had every right to make a comment about your stupid use of notepad. And darling, your script not working was well deserved, I hope you run into more errors like this because you deserve nothing less for your arrogance. So you can take your opinions and shove them up your fat-ass because at the end of the day I don't give a FUCK about your opinions on my micro-aggressions that you're spouting off about.
I suggest the next time you feel attacked about your code perhaps you should take a cold hard look at yourself before thinking that I'm the one that is the FUCKING problem.17 -
My dad has been using a Windows computer every day since 95. Yesterday he discovered that if you click the little tabs in the "details" view of the file explorer, you can sort the contents of a folder by name, date, etc.
I also tried to show him how to scroll with the mouse wheel, but he said it was too complicated, and he preferred to drag the scroll bar every single time.4 -
The solution for this one isn't nearly as amusing as the journey.
I was working for one of the largest retailers in NA as an architect. Said retailer had over a thousand big box stores, IT maintenance budget of $200M/year. The kind of place that just reeks of waste and mismanagement at every level.
They had installed a system to distribute training and instructional videos to every store, as well as recorded daily broadcasts to all store employees as a way of reducing management time spend with employees in the morning. This system had cost a cool 400M USD, not including labor and upgrades for round 1. Round 2 was another 100M to add a storage buffer to each store because they'd failed to account for the fact that their internet connections at the store and the outbound pipe from the DC wasn't capable of running the public facing e-commerce and streaming all the video data to every store in realtime. Typical massive enterprise clusterfuck.
Then security gets involved. Each device at stores had a different address on a private megawan. The stores didn't generally phone home, home phoned them as an access control measure; stores calling the DC was verboten. This presented an obvious problem for the video system because it needed to pull updates.
The brilliant Infosys resources had a bright idea to solve this problem:
- Treat each device IP as an access key for that device (avg 15 per store per store).
- Verify the request ip, then issue a redirect with ANOTHER ip unique to that device that the firewall would ingress only to the video subnet
- Do it all with the F5
A few months later, the networking team comes back and announces that after months of work and 10s of people years they can't implement the solution because iRules have a size limit and they would need more than 60,000 lines or 15,000 rules to implement it. Sad trombones all around.
Then, a wild DBA appears, steps up to the plate and says he can solve the problem with the power of ORACLE! Few months later he comes back with some absolutely batshit solution that stored the individual octets of an IPV4, multiple nested queries to the same table to emulate subnet masking through some temp table spanning voodoo. Time to complete: 2-4 minutes per request. He too eventually gives up the fight, sort of, in that backhanded way DBAs tend to do everything. I wish I would have paid more attention to that abortion because the rationale and its mechanics were just staggeringly rube goldberg and should have been documented for posterity.
So I catch wind of this sitting in a CAB meeting. I hear them talking about how there's "no way to solve this problem, it's too complex, we're going to need a lot more databases to handle this." I tune in and gather all it really needs to do, since the ingress firewall is handling the origin IP checks, is convert the request IP to video ingress IP, 302 and call it a day.
While they're all grandstanding and pontificating, I fire up visual studio and:
- write a method that encodes the incoming request IP into a single uint32
- write an http module that keeps an in-memory dictionary of uint32,string for the request, response, converts the request ip and 302s the call with blackhole support
- convert all the mappings in the spreadsheet attached to the meetings into a csv, dump to disk
- write a wpf application to allow for easily managing the IP database in the short term
- deploy the solution one of our stage boxes
- add a TODO to eventually move this to a database
All this took about 5 minutes. I interrupt their conversation to ask them to retarget their test to the port I exposed on the stage box. Then watch them stare in stunned silence as the crow grows cold.
According to a friend who still works there, that code is still running in production on a single node to this day. And still running on the same static file database.
#TheValueOfEngineers2 -
This one guy on my team had like 10 commits to a single file over a day with all kinds of wild changes.
Build is broken most of the day (not mine but whatever).
Finally, at end of day he says it is fixed.
I diff the first and last changes.
Copyright changed...wtf2 -
Ah yes, write your own fucking website crawler in PHP and deoptimize so hard that it uses some gigabytes of RAM and takes about 1 hour to crawl the very own website it's running on.
Oh and don't forget to download every single image and video file in order to "crawl" it for extremely valuable text content.
What a genius move! I'm really impressed.7 -
Colleague: Hey mister IHateForALiving, I've seen you made two files for a single form
Me: I did that because these two forms have nothing in common. You can have either one or the other and do totally different things, and I splitted them because they are fairly complex, and you may want to add more of this kind in the future.
Colleague: That's not how you should handle the matter, you should have put everything in a single file and handle everything via if else if else
Yeah Helen lucky you for thinking a single file of thousands of lines handled via switch-case is a good idea, must be great living life with the IQ of a rock, please give me a call if you ever decide to stick your head out of your ass just the tiny bit it takes for some oxigen to reach your brain7 -
Somebody asked on how to get started on Full Stack web application development.
This is how I got started.
Client side Web Application Development:
---------------------------------------------------------------
• Start with basic HTML, CSS and JS, JSON. For quick learning, see W3Schools for these topic or YouTube it.
• Get a local web server. "200 OK!" webserver chrome extension is a good start. (https://chrome.google.com/webstore/...)
• Learn Chrome Dev Tools to debug the pages. YouTube it.
• Get a good IDE. I am very happy with VSCode. You can use it for very serious WebApps.
• Start learning JavaScript language in depth, but just related to Web Browser related topic or you would get sucked in server side too early.
• Install node.js. Learn NPM package manager. Learn basic node commands.
• Learn complexity of JS file referencing, JS modules in browser. Just learn, don't use it yet, to understand the benefits of code bundlers.
• Learn Webpack code bundler.
• Learn how to make you simple site much faster and using in Mobile using "Progressive Web Apps".
• Now learn to make modular UIs. I love React. Focus on getting the UI code modulear. Create Single Page sites. (You are not there yet to create a Web App) “Create-React-App” started kit is a good starting point.
• Learn to create multi-page site using React-router.
• Learn application state management using Redux.
• Learn to create application decision engine using Redux-Saga.
Practice and master each stage.
Along above, learn git / GitHub (to learn from others code), find good web resources like Medium / Smashing magazine, good YouTube channels etc. I subscribed to some popular Udemy courses too.
Server side Web development:
------------------------------------------
:) First learn client side Web Application development. Server side learning is another story.3 -
1. Indent with 3 spaces to fuck both tabs guys and spaces guys git repos.
2. Use windows line endings and laugh and laugh and laugh.
3. Giant full page ascii art intro on every single file.
4. After the giant ascii art intro there are literally zero comments.
5. Keep the bracket on the same line for getters, but on the next line for setters because fuck you.17 -
It was a normal school day. I was at the computer and I needed to print some stuff out. Now this computer is special, it's hooked up onto a different network for students that signed up to use them. How you get to use these computers is by signing up using their forms online.
Unfortunately, for me on that day I needed to print something out and the computer I was working on was not letting me sign in. I called IT real quick and they said I needed to renew my membership. They send me the form, and I quickly fill it out. I hit the submit button and I'm greeted by a single line error written in php.
Someone had forgotten to turn off the debug mode to the server.
Upon examination of the error message, it was a syntax error at line 29 in directory such and such. This directory, i thought to myself, I know where this is. I quickly started my ftp client and was able to find the actual file in the directory that the error mentioned. What I didn't know, was that I'd find a mountain of passwords inside their php files, because they were automating all of the authentications.
Curious as I was, I followed the link database that was in the php file. UfFortunately, someone in IT hadn't thought far enough to make the actual link unseeable. I was greeted by the full database. There was nothing of real value from what I could see. Mostly forms that had been filled out by students.
Not only this, but I was displeased with the bad passwords. These passwords were maybe of 5 characters long, super simple words and a couple number tacked onto the end.
That day, I sent in a ticket to IT and told them about the issue. They quickly remedied it by turning off debug mode on the servers. However, they never did shut down access to the database and the php files...2 -
My CTO in the 'good old times', when he still talked to me and shared his wisdom, once told me what I should know about oop and explained me the world of programming and what really matters:
CTO about oop and C#:
"I think this object orientated stuff is overrated and useless. You don't get finished. I write everything in one file. You should do that too. The fastest way is always the best one."
So, dear readers, you might think, he maybe understood, what oop means. I have to disappoint you. He is as FUCKING STUPID as he sounds.
He didn't understand the whole concept of the language C# or oop.
He doesn't use properties, every single method is static void and there is nothing like an object.
Since there is more from where that came from, this will be continued...7 -
I've found and fixed any kind of "bad bug" I can think of over my career from allowing negative financial transfers to weird platform specific behaviour, here are a few of the more interesting ones that come to mind...
#1 - Most expensive lesson learned
Almost 10 years ago (while learning to code) I wrote a loyalty card system that ended up going national. Fast forward 2 years and by some miracle the system still worked and had services running on 500+ POS servers in large retail stores uploading thousands of transactions each second - due to this increased traffic to stay ahead of any trouble we decided to add a loadbalancer to our backend.
This was simply a matter of re-assigning the IP and would cause 10-15 minutes of downtime (for the first time ever), we made the switch and everything seemed perfect. Too perfect...
After 10 minutes every phone in the office started going beserk - calls where coming in about store servers irreparably crashing all over the country taking all the tills offline and forcing them to close doors midday. It was bad and we couldn't conceive how it could possibly be us or our software to blame.
Turns out we made the local service write any web service errors to a log file upon failure for debugging purposes before retrying - a perfectly sensible thing to do if I hadn't forgotten to check the size of or clear the log file. In about 15 minutes of downtime each stores error log proceeded to grow and consume every available byte of HD space before crashing windows.
#2 - Hardest to find
This was a true "Nessie" bug.. We had a single codebase powering a few hundred sites. Every now and then at some point the web server would spontaneously die and vommit a bunch of sql statements and sensitive data back to the user causing huge concern but I could never remotely replicate the behaviour - until 4 years later it happened to one of our support staff and I could pull out their network & session info.
Turns out years back when the server was first setup each domain was added as an individual "Site" on IIS but shared the same root directory and hence the same session path. It would have remained unnoticed if we had not grown but as our traffic increased ever so often 2 users of different sites would end up sharing a session id causing the server to promptly implode on itself.
#3 - Most elegant fix
Same bastard IIS server as #2. Codebase was the most unsecure unstable travesty I've ever worked with - sql injection vuns in EVERY URL, sql statements stored in COOKIES... this thing was irreparably fucked up but had to stay online until it could be replaced. Basically every other day it got hit by bots ended up sending bluepill spam or mining shitcoin and I would simply delete the instance and recreate it in a semi un-compromised state which was an acceptable solution for the business for uptime... until we we're DDOS'ed for 5 days straight.
My hands were tied and there was no way to mitigate it except for stopping individual sites as they came under attack and starting them after it subsided... (for some reason they seemed to be targeting by domain instead of ip). After 3 days of doing this manually I was given the go ahead to use any resources necessary to make it stop and especially since it was IIS6 I had no fucking clue where to start.
So I stuck to what I knew and deployed a $5 vm running an Nginx reverse proxy with heavy caching and rate limiting linked to a custom fail2ban plugin in in front of the insecure server. The attacks died instantly, the server sped up 10x and was never compromised by bots again (presumably since they got back a linux user agent). To this day I marvel at this miracle $5 fix.1 -
I remember opening an old script file on our server for scheduled tasks, and thinking to myself; What idiot wrote this mess? It's unnecessarily complex, solving the problem in a convoluted way. And of course, not a single line of comments.
After reading it through and through many times to understand what each line did I kept repeating to myself; What an imbecile... Being this stupid should be illegal... Coding should require some sort of license to prevent idiots from doing this!
Then of course, it slowly dawned on me. I had written this crap one year before. I'm the idiot... 😐
I've commented every line religiously since then.4 -
So, after weeks of reading spicy rants from all of you, I finally decided to join your community ; even if I'm only a student, I've encountered some solid crap in my internships.
Let's go back in time bois. Two years ago, I started my first intership at a Fortune 500 company (this doesn't exists in France, but whatever, this is nearly the same category). I was supposed to build some file sharing system for the office. Before getting into it, I briefly thought aboyt what technos I could use to build it and make a sweet interface for my co-workers, in 10 weeks, and not a single another day.
Expectations
> Nice team with devs that I could ask things about and learn solid tricks that would even amaze David Copperfield
> Having a nice dev environment
Reality
> Alone on this project
> No fucking dev environment, I had to build everything on Notepad
> No CI
> No SCM
> And, the worst, Ladies and Gentlemans,
I FUCKING HAD TO WORK IN A SINGLE FILE IN A CLOSED ENVIRONMENT.
NO WEBSERVER, NO DEDICATED SPACE.
I HAD TO REQUEST A SPECIFIC ENVIRONMENT IN A CLOSED CUSTOM CMS THAT WAS SERVING FILES, SO THIS FORMAT COULD BE READ ON FOLDER OPENING IN IE9 (FIREFOX FORBIDDEN).
YOU HAD TO MIX HTML, CSS AND JS IN A SINGLE FILE. NO SERVER-SIDE LANGUAGES, ONLY STATIC LINKS, NO FRAMEWORKS (if we can call jQuery, Bootstrap, Semantic UI and all these thinks "Frameworks").
> mfw at the end of the intership13 -
We have a ver crappy Internet connection at my office (I believe it's 100Mb/s for 50 people to share), so when somebody starts downloading a big file they pretty much hijack all the available bandwidth and fuck up everybody else.
Now, we have ONE, just ONE SINGLE FUCKING COMPUTER RUNNING FUCKING WINDOWS 10 AND EVERY WEEK IT FUCKS UP THE ENTIRE OFFICE'S INTERNET CONNECTION WITH ITS STUPID FUCKING UNCANCELLABLE MANDATORY UPDATES.
FUCK YOU MICROSOFT.8 -
!!oracle
I'm trying to install a minecraft modpack to play with a friend, and I'm super psyced about it. According to the modpack instructions, the first step is to download the java8 jre. Not sure if I actually need it or not, but it can download while I'm doing everything else, so I dutifully go to the download page and find the appropriate version. The download link does point to the file, but redirects to a login page instead. Apparently I need an oracle account to download anything on their site. stupid.
So I make an account. It requires my life story, or at least full name and address and phone number. stupid. So my name is now "fuck off" and I live in Hell, Michigan. My email is also "gofuckyourself" because I'm feeling spiteful. Also, for some reason every character takes about 3/4ths of a second to type, so it's very slow going. Passwords also cannot contain spaces, which makes me think they're doing some stupid "security" shenanigans like custom reversible encryption with some 5th grade math. or they're just stupid. Whatever, I make the stupid account.
Afterwards, I try to log in, but apparently my browser-saved credentials are wrong? I try a few more times, try enabling all of the javascripts, etc. No beans. Okay, maybe I can't use it until I verify the email? That actually makes some sense. Fine, I go check the throwaway inbox. No verification email. It's been like five minutes, but it's oracle so they probably just failed at it like everything else, so I try to have them resend the email. I find the resend link, and try it. Every time I enter my email address, though, it either gives me a validation error or a server error. I try a few mores times, and give up. I try to log in again; no dice. Giving up, I go do something else for awhile.
On a whim later, I check for the verification email again. Apparently it just takes bloody forever, but it did show up. Except instead of the first name "Fuck" I entered, I'm now "Andrew", apparently. okay.... whatever. I click the verify button anyway, and to my surprise it actually works, and says that I'm now allowed to use my account. Yay!
So, I go back to the login page (from the download link) and enter my credentials. A new error appears! I cannot use redirects, apparently, and "must type in the page address I want to visit manually." huh? okay, i go to the page directly, and see the same bloody error because of course i do because oracle fucking sucks. So I close the page, go back to the download list, click the link, wait for the login page redirect (which is so totally not allowed, apparently, except it works and manual navigation does not. yay backwards!), and try to log in.
Instead of being presented with an error because of the redirect, it lets me (try to) log in. But despite using prefilled creds (and also copy/pasting), it tells me they're invalid. I open a new tab container, clear the cache (just to be thorough), and repeat the above steps. This time it redirects me to a single signon server page (their concept of oauth), and presents me with a system error telling me to contact "the Administrator." -.- Any second attempts, refreshes, etc. just display the same error.
Further attempts to log in from the download page fail with the same invalid credentials error as before.
Fucking oracle and their reverse Midas touch.10 -
Users: “Maybe I can just download these 3 PDFs in a single zipped file, that’d be nice.”
Android: “You got that buddy!”
Apple: “Animoji! 🐵”4 -
Doing linguistic research where I need to parse 2000 files of a total of 36 GB. Since we are using python the first thing I thought was to implement multi threading. Now I changed the total runtime from three days to like one day and a half. But then when I checked the activity monitor I saw only 20 percent of the CPU usage. After a searching process I started to understand how multi threading and multi processing works. Moral of the story: if you want to ping a website till they block you or do easy tasks that will not use up all power of one core, do multi thrading. If you need to do something complicated that can easily consume all the powers of a single CPU core, split up the work and do multi processing. In my case, when I tried to grab information from a website, I did multi thrading since the work is easy and I really wanted to pin the website 16 times simultaneously but only have 4 cores. But when it come to text processing which a single file will take 80 percent of cpu, split it up and do multi processing.
This is just a post for those who are confused with when to use which.12 -
The company I work for is currently maintaining some websites under an old (>1.5 years) version of Drupal, which has some well known vulnerabilities.
Yesterday we've found out somebody used them to inject php code into every single .php file on the machine. We've been discussing for hours about how to recover data, upgrade stuff, and maybe switch to something else. I've said jokingly "or we could put a find command in the crontab to sed away the php line they've injected!". Guess what we're doing now on our production servers?7 -
I’m on this ticket, right? It’s adding some functionality to some payment file parser. The code is atrocious, but it’s getting replaced with a microservice definitely-not-soon-enough, so i don’t need to rewrite it or anything, but looking at this monstrosity of mental diarrhea … fucking UGH. The code stink is noxious.
The damn thing reads each line of a csv file, keeping track of some metadata (blah blah) and the line number (which somehow has TWO off-by-one errors, so it starts on fucking 2 — and yes, the goddamn column headers on line #0 is recorded as line #2), does the same setup shit on every goddamned iteration, then calls a *second* parser on that line. That second parser in turn stores its line state, the line number, the batch number (…which is actually a huge object…), and a whole host of other large objects on itself, and uses exception throwing to communicate, catches and re-raises those exceptions as needed (instead of using, you know, if blocks to skip like 5 lines), and then writes the results of parsing that one single line to the database, and returns. The original calling parser then reads the data BACK OUT OF THE DATABASE, branches on that, and does more shit before reading the next line out of the file and calling that line-parser again.
JESUS CHRIST WHAT THE FUCK
And that’s not including the lesser crimes like duplicated code, misleading var names, and shit like defining class instance constants but … first checking to see if they’re defined yet? They obviously aren’t because they aren’t anywhere else in the fucking file!
Whoever wrote this pile of fetid muck must have been retroactively aborted for their previous crimes against intelligence, somehow survived the attempt, and is now worse off and re-offending.
Just.
Asdkfljasdklfhgasdfdah28 -
Ok, so when I inherit a Wordpress site I've really stopped expecting anything sane. Examples: evidence that the Wordpress "developer" (that term is used in the loosest sense possible) has thought about his/her code or even evidence that they're not complete idiots who wish to make my life hell going forwards.
Have a look at the screen shot below - this is from the theme footer, so loaded on every page. The screenshot only shows a small part of the file. IT LITERALLY HAS 3696 lines.
Firstly, lets excuse the frankly eye watering if statement to check for the post ID. That made me face palm myself immediately.
The insanity comes for the thousands of lines of JQuery code, duplicated to hell and back that changes the color of various dividers - that are scattered throughout the site.
To make things thousands of times worse, they are ALL HANDED CODED.
Even if JavaScript was the only way I could format these particular elements I certainly wouldn't duplicate the same code for every element. After copy and pasting that JQuery a couple of times and normal developer would think one word, pretty quickly - repetition.
When a good developer notes repetition ways to abstract crap away is the first thought that comes to mind.
Hell, when I was first learning to code god knows how long ago I always used functions to avoid repetition.
In this case, with a few seconds though this "developer" could have created a single JQuery handler and use data attributes within the HTML. Hell, as bad as that is, it's better than the monstrosity I'm looking at now.
I'm aware Wordpress is associated with bad developers due to it's low barrier to entry, but this site is something else.
The scary thing is that I know the agency that produced this. They are very large, use Wordpress exclusively and have some stupidly huge clients that would be know nationally.
Wordpress truly does attract some of the most awful "developers" and deserves it's reputation.
If you're a good developer and use Wordpress I feel sorry for you, as you're in small numbers from my experience.
Rant over, have vented a bit and feel better. Thanks Devrant.6 -
Does linux suck? Imho, Yes.
A lot of the people bash windows regarding automatic restarts, updates, bsod etc.
I may be unusually lucky, but the last bsod I saw was in 2014 because of a faulty synaptics driver.
I've really tried to use linux to see what the hype is all about. Quite frankly, it sucked. The first time it wiped out all my data, I realized the value of backups. Hence I do not have a single pic of my school now, thanks to complicated ubuntu mounting.
Next is driver support. When I plug in a device, I expect it to work. I don't want to spend a day googling for drivers.
Why the fuck would I want to use a black terminal which gives me a headache. Am I in 1980? Which sadistic asshole designed vim ?
I have seen linux developers who claim to be linux experts and love linux. They take so long to do simple shit. For god's sake don't tell me there are GUI versions of linux available. I'd rather work in windows 95.
Why in the world would anyone want to use ls to see the contents of a directory! It is seriously so fucking unproductive.
I can't just download a software, click next a couple of times, and be done. No no no. I've to do sudo apt get update. Then try to find the fucking package. And if all goes well, there's always the dependency issue which is going to bite me in the ass. If google and stackoverflow go down, most linux devs will die a cruel death.
Fuck you linux.
I'm not saying windows 10 is the best, but at least I don't have to crawl through shit to use it. If you don't like automatic updates, disable it you moron. It is easier than renaming a damn file in linux.57 -
So probably about a decade ago at this point I was working for free for a friend's start-up hosting company. He had rented out a high-end server in some data center and sold out virtualized chunks to clients.
This is back when you had only a few options for running virtual servers, but the market was taking off like a bat out of hell. In our case, we used User-Mode Linux (UML).
UML is essentially a kernel hack that lets you run the kernel in user space. That alone helps keep things separate or jailed. I'm pretty sure some of you can shed more light on it, but that's as I understood it at the time and I wasn't too shabby at hacking the kernel when we'd have driver issues.
Anyway, one of the ways my friend would on-board someone was to generate a new disk image file, mount it, and then chroot to that mount path. He'd basically use a stock image to do this and then wipe it out before putting it live.
I'm not sure exactly what he was doing at the time, but I got a panicked message on New Years Day saying that he had deleted everything. By everything, he had done an rm -fr /home as root on what he had thought was the root of a drive image.
It wasn't an image. It was the host server.
In the stoke of a single command, all user data was lost. We were pretty much screwed, but I have a knack for not giving up - so I spent a ton of time investigating linux file recovery.
Fun fact about UML - since the kernel runs in user space as a regular ol' process, anything it opens is attached to that process. I had noticed that while the files were "gone", I could still see disk usage. I ended up finding the images attached to their file pointers associated with each running kernel - and thankfully all customers were running at the time.
The next part was crazy, and I still think is crazy. I don't remember the command, but I had to essentially copy the image from the referenced path into a new image file, then shutdown the kernel and power it back on from the new image. We had configs all set aside, so that was easy. When it finally worked I was floored.
Rinse and repeat, I managed to drag every last missing bit out of /proc - with the only side effect being that all MySQL databases needed to be cleaned up.3 -
Dev: There’s a file in your PR with over 1000 lines of code, I think it should be broken apart into a couple smaller pieces to be a little more in line with the single responsibility principle
Muppet Dev: That file only has one responsibility! It can’t be broken apart!
Dev: How’s that?
Muppets: It’s single responsibility is managing that group of functionality
Dev: …3 -
Last week my company thought it would be a great idea to introduce a new sh*tty internal web portal that gives federated access to aws (instead of using our own accounts to assume dev roles like we used to do).
This broke a lot of sh*t that simply used to ask for an MFA token and used our practically permissionless accounts to assume a proper dev role. An MFA token that we'd enter directly into the terminal/tool. It was very seamless. But nooooooo we now have to go a webpage, login with sso (which also requires mfa), click "generate credentials," copy-paste those into terminal/creds file and _then_ continue our aws cli call. Every. Single. Day.
BUT TODAY I HAD ENOUGH.
I spent the entire day rewriting the auth part of our tools so they would basically read the cookie that's set by the web portal, and use it to call the internal api that generates the credentials, and just automatically save those. Now all we need to do is log into the portal, then return to the tool and voilà, the tool's also got access! Sure, it's not as passive as just entering an MFA token directly, but it's as passive as it gets. Still annoyed by this sh*tty and unnecessary portal, but I learned a thing or two about cookies.9 -
PM: Can you fix this issue with the file upload?
me: Sure, give me the file that's having the issue so I can figure out why that specific one isn't working.
PM: Oh... it wasn't working so I deleted it.
Me: OK, are there any other files that cause this error.
PM: No... it was a single case. You can fix it anyway, right?3 -
Taking IT classes in college. The school bought us all lynda and office365 accounts but we can't use them because the classroom's network has been severed from the Active Directory server that holds our credentials. Because "hackers." (The non-IT classrooms don't have this problem, but they also don't need lynda accounts. What gives?)
So, I got bored, and irritated, so I decided to see just how secure the classroom really was.
It wasn't.
So I created a text file with the following rant and put it on the desktop of the "locked" admin account. Cheers. :)
1. don't make a show of "beefing up security" because that only makes people curious.
I'm referring of course to isolating the network. This wouldn't be a problem except:
2. don't restrict the good guys. only the bad guys.
I can't access resources for THIS CLASS that I use in THIS CLASS. That's a hassle.
It also gives me legitimate motivation to try to break your security.
3. don't secure it if you don't care. that is ALSO a hassle.
I know you don't care because you left secure boot off, no BIOS password, and nothing
stopping someone from using a different OS with fewer restrictions, or USB tethering,
or some sort malware, probably, in addition to security practices that are
wildly inconsistent, which leads me to the final and largest grievance:
4. don't give admin priveledges to an account without a password.
seriously. why would you do this? I don't understand.
you at least bothered to secure the accounts that don't even matter,
albeit with weak and publicly known passwords (that are the same on all machines),
but then you went and left the LEAST secure account with the MOST priveledges?
I could understand if it were just a single-user machine. Auto login as admin.
Lots of people do that and have a reason for it. But... no. I just... why?
anyway, don't worry, all I did was install python so I could play with scripting
during class. if that bothers you, trust me, you have much bigger problems.
I mean you no malice. just trying to help.
For real. Don't kick me out of school for being helpful. That would be unproductive.
Plus, maybe I'd be a good candidate for your cybersec track. haven't decided yet.
-- a guy who isn't very good at this and didn't have to be
have a nice day <3
oh, and I fixed the clock. you're welcome.2 -
I think I want to quit my first applicantion developer job 6 months in because of just how bad the code and deployment and.. Just everything, is.
I'm a C#/.net developer. Currently I'm working on some asp.net and sql stuff for this company.
We have no code standards. Our project manager is somewhere between useless and determinental. Our clients are unreasonable (its the government, so im a bit stifled on what I can say.) and expect absurd things from us. We have 0 automated tests and before I arrived all our infrastructure wasn't correct to our documentation... And we barely had any documentation to begin with.
The code is another horror story. It's out sourced C# asp.net, js and SQL code.. And to very bad programmers in India, no offense to the good ones, I know you exist. Its all spagheti. And half of it isn't spelled correctly.
We have a single, massive constant class that probably has over 2000 constants, I don't care to count. Our SQL projects are a mess with tons of quick fix scripts to run pre and post publishing. Our folder structure makes no sense (We have root/js and root/js1 to make you cringe.) our javascript is majoritly on the asp.net pages themselves inline, so we don't even have minification most of the time.
It's... God awful. The result of a billion and one quick fixes that nobody documented. The configuration alone has to have the same value put multiple times. And now our senior developer is getting the outsourced department to work on moving every SINGLE NORMAL STRING INTO THE DATABASE. That's right. Rather then putting them into some local resource file or anything sane, our website will now be drawing every single standard string from the database. Our SENIOR DEVELOPER thinks this is a good idea. I don't need to go into detail about how slow this is. Want to do it on boot? Fine. But they do it every time the page loads. It's absurd.
Our sql database design is an absolute atrocity. You have to join several tables together just to get anything done. Half of our SP's are failing all the time because nobody really understands the design. Its gloriously awful its like.. The epitome of failed database designs.
But rather then taking a step back and dealing with all the issues, we keep adding new features and other ones get left in the dust. Hell, we don't even have complete browser support yet. There were things on the website that were still running SILVERLIGHT. In 2019. I don't even know how to feel about it.
I brought up our insane technical debt to our PM who told me that we don't have time to worry about things like technical debt. They also wouldn't spend the time to teach me anything, saying they would rather outsource everything then take the time to teach me. So i did. I learned a huge chunk of it myself.
But calling this a developer job was a sick, twisted joke. All our lives revolve around bugnet. Our work is our BN's. So every issue the client emails about becomes BN's. I haven't developed anything. All I've done is clean up others mess.
Except for the one time they did have me develop something. And I did it right and took my time. And then they told me it took too long, forced me to release before it was ready, even though I had never worked on what I was doing before. And it worked. I did it.
They then told me it likely wouldn't even be used anyway. I wasn't very happy at all.
I then discovered quickly the horrors of wanting to make changes on production. In order to make changes to it, we have to... Get this
Write a huge document explaining why. Not to our management. To the customer. The customer wants us to 'request' to fix our application.
I feel like I am literally against a wall. A huge massive wall. I can't get constent from my PM to fix the shitty code they have as a result of outsourcing. I can't make changes without the customer asking why I would work on something that doesn't add something new for them. And I can't ask for any sort of help, and half of the people I have to ask help from don't even speak english very well so it makes it double hard to understand anything.
But what can I do? If I leave my job it leaves a lasting stain on my record that I am unsure if I can shake off.
... Well, thats my tl;dr rant. Im a junior, so maybe idk what the hell im talking about.rant code application bad project management annoying as hell bad code c++ bad client bad design application development16 -
"We use WSDL and SOAP to provide data APIs"
- Old-fashioned but ok, gimme the service def file
(The WSDL services definition file describes like 20 services)
- Cool, I see several services. In need those X data entities.
"Those will all be available through the Data service endpoint"
- What you mean "all entities in the same endpoint"? It is a WSDL, the whole point is having self-documented APIs for each entity format!
"No, you have a parameter to set the name of the data entity you want, and each entity will have its own format when the service return it"
- WTF you need the WSDL for if you will have a single service for everything?!?
"It is the way we have always done things"
Certain companies are some outdated-ass backwater tech wannabees.
Usually those that have dominated the market of an entire country since the fucking Perestroika.
The moment I turn on the data pipeline, those fuckers are gonna be overloaded into oblivion. I brought popcorn.7 -
SICK AND TIRED OF READABILITY VS. EFFICIENCY!!!!!!!
I HAD TO SEPARATE A 4 LOC JSON STRING, WHICH HAD AN ARRAY OF A SINGLE KEY-VALUE PAIRS (TOTAL OF 10 OBJECTS IN THE ARRAY).
ITS READABLE IF YOU KNOW JSON. HOW HARD IS TO READ JSON FORMAT IF YOU GET YOUR STYLE AND INDENTATION PROPERLY?!?
SO I HAD TO
BREAK THE POOR FREAKING JSON APART TO A FUCKING DIFFERENT YAML FILE FORMAT ONLY SO I CAN CALL IT FROM THERE TO THE MAIN CONTROLLER, ITERATE AND MANIPULATE ALL THE ID AND VALUES FROM YAML BACK TO MATCH THE EXPECTED JSON RESPONSE IN THE FRONT END.
THE WHOLE PROCESS TOOK ME ABOUT 15 MINUTES BUT STILL, THE FUCKING PRINCIPLE DRIVES ME INSANE.
WHY THE FUCK SHOULD I WASTE TIME AT AN ALREADY WORKING PIECE OF CODE, TO MAKE IT LESS EFFICIENT AND A SLIGHTLY BIT MORE READABLE?!? FML.5 -
I used to work in a small agency that did websites and Phonegap apps, and the senior developer was awful.
He had over a decade of experience, but it was the same year of experience over and over again. His PHP was full of bad practices:
- He'd never used an MVC framework at all, and was resistant to the idea, claiming he was too busy. Instead he did everything as PHP pages
- He didn't know how to use includes, and would instead duplicate the database connection settings. In EVERY SINGLE FILE.
- He routinely stored passwords in plain text until I pretty much forced him to use the new PHP password hashing API
- He sent login details as query strings in a GET request
- He couldn't use version control, and he couldn't deploy applications using anything other than FTP4 -
why does everyone always give me backtalk when i want to make my files smaller and more readable
"no you should put your scripts, style and template all in one file, theres no need to put it separate"
alright while we are at it, lets just write the entire project in 1 single file6 -
They gave me a file, .php, that was the entire webapp. THE ENTIRE THING IN A SINGLE FILE. It's frustrating that I have to organize this before I even start working on my tasks.
I guess its not super horrible since it's a rookie project but it's still horribly and unnecessarily time consuming.5 -
Outsourcing front-end for web is like playing russian roulette, but with 6 bullets in 6 chambers.
You shoot yourself in the balls (or ovaries)... HARD.
I don't know how you can develop in a complete nightmare of a SCSS file - 3500 lines of insanity.
This dev must have changed his mousewheel at least 50 times!
SERIOUSLY, why the fuck use SCSS when you piss everything into one single fucking file???
What drives me completely nuts is the fact that he even used an @import to include his custom.scss file... how many more IQ poins are needed to realize that you could SPLIT your spaghetti into smaller, sane files?
I need a whiskey...3 -
Is it normal to deploy a 5.6MB main.css file?
Last week I had to change some shizzle on a website (externally developed).
Well, I was quite shocked...
We usually deploy a single stylesheet under 700 kB.
But also because we never use CSS "frameworks".30 -
One of the things I really hate on Windows (and Microsoft software in general) is that the keyboard shortcuts are localized therefore are different from 90% of the apps that I use on a daily basis.
Two examples of this (EN-US vs PT-PT):
- "Save" is "Gravar" while "Underline" is "Sublinhar". This means that whenever I press Ctrl + S to save a doc in MS Word I underline a word instead of saving the bloody document.
- "All" is "Tudo" so when I want to select all the itens on a folder in the File Explorer I have to press Ctrl + T, the same shortcut I press in pretty much every single tabbed app to open a new tab.
This is terrible for the user experience because different languages provide different keyboard shortcuts to the user which goes against the concept of the usefulness of a keyboard shortcut: perform an action from anywhere without having to know its menu or menu description.11 -
It was my internship and I've end up working on a law company specializing on Australian construction laws they're working on a website that will take care of all the paperworks for the contractors. They have a dev team who's working on it but they don't have a web designer. I was accepted for the job as an intern/web designer/tester. I was so happy that I've got a really cool internship as a designer but that's only for a second.
The hell starts on day one. They've told me that they're using agile workflow and that they need to make the website responsive. It was based on bootstrap and gosh their code was so broken. HTML tags overlay on each other, some are unclosed. I've tried to fix the problems and did a great job at that. Made the front page responsive and all laid out. When I went to the next php file it has a different header.php and footer.php and same problems apply and we're not even touching the worst.
They didn't use any version management and they're cowboying everything. Now that the website is on the staging server they use Cpanel text editor to edit the code! My headache started to pileup.
The Australian client asked me to provide icons and fix the colors of the website. Also the typography looks great already. I've fixed almost all the problems and I'm satisfied with the design when suddenly a new co-worker from a famous and expensive college was absorbed by the company. He worked as the marketing specialist who has no experience at web design at all. He told me to do this and that and the whole website changed. He bullied me for my skills in design (I'm an intern) and just took over the whole design. Everyone even the boss listen to him as if everything he say is right. He's skilled at design but not web design. He made the website look like a freakin movie poster.
All my works are for nothing, I got headache for nothing and I've got hated for nothing.
It was the day when I finished my internship. It was a long 3 months. After a month I've heard from my co-interns that the whole dev team was fired including the marketing specialist. Also the whole website is scrapped and has been rebuilt by a single guy who used WordPress which he did in only a month. -
I've got a file on my desktop called key.txt, and it's just a single line in it that is clearly some sort of API key.
Absolutely no memory of what it is for.
💩9 -
Tl;DR; version:
French designer, Mexican PSD -> HTML converter, Indian VueJS developer, Spanish project manager and a Taiwanese back-end developer. Application was made like an tower of pizza from bullcrap held by boogers and constantly licked by an orangutang to keep it standing.
Longer version:
We had to take a "half-finished" project from one of our clients, received the code for full-stack project. The css/design was so unbearable that it mostly broke on anything that had higher than 720px wide screen, structure was full of tables/divs and no fucking flexbox/grid... Then the fun part - we saw it's conversion to vueJS - a single fucken App.vue file that had shitton of conditions for pages.... yea, not even multi-component/routed app, just conditions!!!! And then... A back-end (in which I mainly specify myself) - it was made by a developer that had to mainly use Java/C# as their daily driver while all being build on php and Laravel. 0 Fucken laravel functions used, 0 of models, logic and so on.... Most of the page was running on RAW sql queries. Names... Oh my god the function names....
`getTheUsersThatHasAtLeastOneSpaceAssignedToThemByGivenCompanyId(int $id)`
And it held an RAW sql that was coming from a model....
All of this was managed by a random spanish manager who couldn't really understand what our client needed and what he actually wanted so from 100% of the site, only 20% was correct in logic....
And yet, according to the whole "package" (team) - they did everything correctly, saw no issues and our client was ungrateful fucker that refused to pay 10x the amount that we asked in order to completely re-do the application....
Morale: Remote teams are great... As long as all of them can work remote in TEAM.5 -
Should’ve posted this after it happened, but it requires a bit of background anyway.
There’s this guy that oversees our OpenStack environment. My team often make jokes and groan about him in private because he’s so overbearing. A few months back, he had to take us to our data center to show us our new racks, and he kept saying stupid stuff like “you break this and it costs me $30,000” as if he owns everything. He’s just... one of THOSE people. Always speaks in such a condescending way. We make jokes that he is our “best friend”.
Our company is shifting most of our products to the cloud in response to the coronavirus (trying to make it an opportunity for “innovation”). This has involved some structural and responsibility changes in our department, and long story short, I’m now heading the OpenStack environment alongside other projects.
This means going through grueling 1-on-1 meetings with our “best friend”. It’s not too bad, I can be pretty patient with people, so I didn’t mind too much at first. Then a few things happened.
1. He sent a shared folder that he owned containing info related to the environments. Several documents were outdated and incomplete, so I downloaded them, corrected them, and then uploaded the documents to my teams file share, as I was supposed to since we now own the projects.
2. Several files were missing, and when I asked about them, he said “Oh, did you refresh the browser?”. I told him no, that I downloaded them locally and republished them to my teams server, because he was supposed to hand everything off to us at once. He says “Well, silly, how are you going to get updates if you’re looking at them locally?” and kind of chuckles at me like I’m stupid.
3. He insists on training me how to remote into one of the servers to check on cluster space, which in itself is fine. I understand others wanting to make sure things will be done right by the people who come after them. But he tells me to download SuperPutty. I tell him, “oh no, that’s alright. I don’t need putty”. He says “oh cool, what tool do you use for ssh?”. I answer him “Just Git. If I want to I can use a CentOs bash terminal too, because we have WSL installed”. He responds “You can’t ssh through Git”.
I was actually a little shocked. I didn’t know if he was serious or not so I was silent for a few seconds before hesitantly saying “yes you can”. He says “this is news to me” and I so I tell him “every single one of our build jobs fetches code from Git with ssh” and he seemed genuinely shocked and surprised by that.... so then it occurs to me to show him that you can ssh in Powershell and that REALLY blew his mind. He would not shut up about it for several minutes. I was amused until it just got annoying.
Needless to say, my team had been previously teasing me about having to work with him, so they found it hilarious when I told them afterwards.8 -
literally what the fuck is the point of C++
>takes 3 years to make anything half-functional
>language was made in like fucking 1902 so it's damn near fucking impossible to make anything that works without sifting through bumfuck retarded syntax/libraries
>error messages that tell you absolutely nothing of use and are indecipherable garbage 90% of the time
fuck C, fuck it's retarded downie little brother C++, and fuck the stupid fucking boomers who say you're not a real programmer unless you force yourself to become a masochist by using either one of these stupid fucking languages
"oh but it's fast!!11!1!!" yeah but working with it sure as fuck isn't
half the fucking time if I just stop including certain headers in another file then the compiler throws like literally 400 fucking errors at me even though the thing(s) I excluded had no bearing on whatever the compiler decides it wants to loudly bitch and whine about
"oh but games were made on it!!!!111!" yeah not without fucking horrific spaghetti code and 900000 different libraries and dependancies designed just to make a single fucking window39 -
Short story for the one interessed in the image: when we change idea we change the whole idea. And it is likely to happen very often. Sometimes twice a day, every day, for a week.
Long stort:
I am hopeless:
I am an IT university student, i know how to program and how to search for a fucking manual, but i am dealing with eletronics and PCB...
I have to make the firmware for a board (atmel things) and it have to talk via spi with some other devices (it is slave of one, and master for all the others(i will use two spi channels)), this should be easy...
I am have no senior to ask to, all i have is google and i found problems in every thing i try to do, every - fucking - single - one!!!! I know that the solution is always of the "you have to plug it in" type, but
NEITHER GOOGLE IS BEING OF HELP!
Let me explain this morning pain:
i can't add libraries in atmel studio, something wrong with the asf wizard, i have only found a tutorial that says what buttons press to solve my problem... I DO NOT HAVE THIS BUTTONS!!!
And the library i wanted to add is the one to make the board talk with the computer on his COM port... (And have some debug message...)
And the wizard gives problem because i created the project using an online atmel tool...
YES, i tried to create a project with asf and then add the files given by the online tool.... THEY DO NOT COMPILE, I SHOULD HAVE TO MESS WITH A 400 LINES LONG MAKEFILE, that is anything but human readable...
I haven't even look for anything spi related this morning
I am even forced to use windows, because every question in the forums, or every noobbish tutorial is based on it...
And then i find the tutorial with the perfect title, holy shit this is the thing i truly need!!!!! It says how to open a file. And then stops. WHAT ABOUT THE THING YOU WERE TALKING ABOUT IN THE TITLE??????
This project is the upgrade of a glue-pump based on an atmega328 (arduino uno processor), that is currently being produced and sold by our "company" .... .... That is composed by me and the boss.
He is a very nice and and smart person, he tries to give me ideas for the solution, if i cannot find out how to do something we can even change a lot of specifics of the project (the image shows our idea-change) and every board has some weeks of mornings like the one described above (i work only in the morning).
I am learning a very lot of things...
But the fact that every thins i try fails is destroying me, what would you do in my place?
Ps. Lot lf love for the ones who made it until the end <36 -
Online applications are so much worse than the classic snail mail ones, because some companies just don't seem to give a single fuck about the quality of their application application (hehe).
This results in such joyous things like:
• "Allowed file types: doc, docx, pdf, jpg, zip"
• "Max filesize 3mb"
• "One of your files does not meet the requirements" (doesn't tell you which)
• "Upload timed out, please try again"
• 403 forbidden
• "Your account does not have the necessary permissions to upload more than 4 files at once"
• clicking the submit button leads to a 404
• "Please explain why you want to work for us." 500 character limit
• Google forms2 -
HOLY.
CHRIST.
MAVEN.
Where has this thing been all my life. I can manage my Java web projects from a single repository that works native with Linux. No more hunting for .jar files on the web, EVERYTHING IS MANAGED FROM A SINGLE .XML FILE. MAVEN WORKS WITH ANY JAVA IDE.
This is one of the single greatest systems I have ever found.10 -
Holy FREAKING shit!! This was worst stupidest mistake I have ever made!
About 9 hours ago, i decided to implement brotli compression in my server.
It looked a bit challenging for me, because the all the guides involved compiling and building the nginx with brotli module and I was not that confident doing that on live site.
By the end of the guide, the site was not reachable anymore. I panicked.
Even the error logs and access logs were not picking up anything.
About a dozens guides and a new server and figuring out few major undocumented errors later, it turns out the main nginx.conf file had a line that was looking for *.conf files in the sites-enabled directory.
But my conf file was named after the domain name and ending with .com and hence were not picked up by the new nginx.conf
I'm not sure if I wasted my 9 hours because of that single line or not. But man, this was a really rough day!3 -
God fucking dammit why are people so fucking lazy? A couple months ago I've had the intern refactor and organise this coworker's spaghetti code, and he did an excellent job, added type safety, etc.
I've took special care to explain it to this coworker that I understand he didn't have time to organise code and the intern took care of it, and to please keep it clean from now on.
Today I had to add a small feature to the same codebase, and every single thing that fucktard added from then on was crammed in the same file. And that guy's been here for 5 years already, I thought I don't have to triple check every single line he writes by now...5 -
A couple of months ago, the father of a friend of mine, asked me if I wanted to help him out with a project.
His late father, whom he inherited a one-person upholstering company from, once created a system in filemaker to do, among others, his financial administration. This system, however, grew organically as time went by, but he passed away before he explained to his son how it worked.
Now this man was running the company, using the parts of the system that he knows, but things were starting to break down. He asked me if I could help him understand what is going on and fix a couple of things.
However, the more I look at it, the more I realize what a monstrosity this has become, because the system has never been cleaned up. For example:
- There is a suppliers table, with the columns "E-MAIL" and "EMAIL". The latter one containing the supplier's website address.
- In order to be able to generate year reports, at the start of a year he copies the previous year's file, removes all records from it and starts using that as the new year's file. (This year, he accidentally created a shortcut instead of copying...)
- Some tables have a misterious column called "#1". It always contains a 1.
- The system consists of about 20 files, each of them containing a single table, although only 10 of them are really used. The other ones are just legacy.
- File, table, column, and layout names are capitalized randomly (all caps, no cap, starting uppercase) and are usually abbreviations, like "st2", "oms3", "off\rek", "b", "VERDBEST6" and "antst".
- One table has 92 columns.
- Of those 92 columns, only about 20, maybe 30, are in use.
Now, my task is finding out what parts are useful and in use, extracting those and create a baby monster out of the giant monster this system has become.
Sidenote: I actually enjoy having to learn a bit about accounting in order to understand this. Planning to use the knowledge I gain to keep track of my own finances.6 -
Me: We need to allow the team in the newly acquired subsidiary to access our docker image repositories.
Sec Guy: Why?
Me: So they can run our very expensive AI models that we have prepared onto container images.
Sec Guy: There is a ban on sharing cloud resources with the acquired companies.
Me: So how we're supposed to share artifacts?!?
Sec Guy: Can't you just email them the docker files?
Me: Those images contain expensively trained AI models. You can't rebuild it from the docker files.
Sec Guy: Can't you email the images themselves?
Me: Those are a few gigabytes each. Won't fit in an email and won't even fit the Google drive / onedrive / Dropbox single file size limit.
Sec Guy: Can't you store them in a object storage like S3/GCS/Azure storage?
Me: Sure
Proceed to do that.
Can't give access to the storage for shit.
Call the sec guy
Me: I need to share this cloud storage directory.
Sec Guy (with aparent amnesia): Why?
Me: I just told you! So they can access our AI docker images!
Sec Guy: There is a ban on sharing cloud resources with the acquired companies.
Me: Goes insane
Is there a law or something that you must attempt several alternative methods before the sec people will realize that they are the problem?!?! I mean, frankly, one can get an executable artifact by fucking email and run it but can't pull it from a private docker registry? Why the fuck would their call it "security"?9 -
Today was the first time I was able to develop a full stack by my self!!!!
(I mean not by myself, StackOverflow was my Bible)
It's a small project with three modules , and while I've worked front end, back end and machine learning separately, I used to develop on a single component.
Today I built all the components on my own.
The hardest part was linking the nodejs file with the python script. Which seemed easy at first but then I needed to go through the documentation to understand the working behind the scenes.
Just looking how to deploy it now
This is a victory rant.
While it is not something big I feel so proud of myself 🥰1 -
This was about 3 years ago. I’m on vacation and just getting off the plane, when my boss calls me on his cellphone. Apparently the crontab on our main file upload server had gotten nuked, and he was asking if there were any backups.
A word about this server. I work with video, so this thing is doing about a few gigabits of traffic incoming at any moment. The cron jobs are necessary to move and organize these massive files into a sane scheme for processing. Hundreds of drop folders receiving thousands of files resulting in terabytes of data every single day. Our storage vendor tells us we have the third largest deployment they know about.
No cron jobs mean all of this content is just sitting around piling up. I tell him sorry, try contacting $otherAdmin since he’s more familiar with that system.
A few days later, after the vacation, I come back in. $boss and $otherAdmin have reconstructed the crontab from scratch after an all nighter.
I ask how it got deleted.
$boss was training some people how to set up new customers on this file server, and he told the trainees to open the crontab in read-only mode. One of them ran:
crontab -r
Yes, we back up our crontabs now.3 -
ALWAYS read warnings guys.
Story time !
A client of ours has a synchronization app (we wrote it) between his inhouse DB and our app. (No, no APIs on their end. It’s a schelduled task).
Because we didn’t want to ask them for logs every single time, the app writes logs to disk (normal) and in Applications Insights in Azure.
When needed, I can go in portal, get all logs for last execution in a nice CSV file.
Well, recently we added more logs (Some problems were impossible to track).
So client calls us : “problem with XXX”
Me : Goes to Azure, does the same manipulation as always. Dismiss a smaaaaaalish warning without reading. Study logs. Conclusion: “The XXX is not even in the logs, check your DB”.
Little I knew, the warning was telling me “Results are truncated at 10.000 lines”.
So client was right, I was wrong and I needed to develop a small app to get logs with more than 10.000 lines. (It’s per execution. Every 3 hours) -
When it comes to the indentation or look I am fully consistent.
But when it comes to naming I am inconsistent like a crack whore telling she's clean.
Camelcase, underscores inconsistent variable and function names. I use all of them within a single file. On some days I even switch languages.
I truly am miserable in code consistency. Is there any good advice to keep the code consistent?10 -
I don't know if I'm being pranked or not, but I work with my boss and he has the strangest way of doing things.
- Only use PHP
- Keep error_reporting off (for development), Site cannot function if they are on.
- 20,000 lines of functions in a single file, 50% of which was unused, mostly repeated code that could have been reduced massively.
- Zero Code Comments
- Inconsistent variable names, function names, file names -- I was literally project searching for months to find things.
- There is nothing close to a normalized SQL Database, column ID names can't even stay consistent.
- Every query is done with a mysqli wrapper to use legacy mysql functions.
- Most used function is to escape stirngs
- Type-hinting is too strict for the code.
- Most files packed with Inline CSS, JavaScript and PHP - we don't want to use an external file otherwise we'd have to open two of them.
- Do not use a package manger composer because he doesn't have it installed.. Though I told him it's easy on any platform and I'll explain it.
- He downloads a few composer packages he likes and drag/drop them into random folder.
- Uses $_GET to set values and pass them around like a message contianer.
- One file is 6000 lines which is a giant if statement with somewhere close to 7 levels deep of recursion.
- Never removes his old code that bloats things.
- Has functions from a decade ago he would like to save to use some day. Just regular, plain old, PHP functions.
- Always wants to build things from scratch, and re-using a lot of his code that is honestly a weird way of doing almost everything.
- Using CodeIntel, Mess Detectors, Error Detectors is not good or useful.
- Would not deploy to production through any tool I setup, though I was told to. Instead he wrote bash scripts that still make me nervous.
- Often tells me to make something modern/great (reinventing a wheel) and then ends up saying, "I think I'd do it this way... Referes to his code 5 years ago".
- Using isset() breaks things.
- Tens of thousands of undefined variables exist because arrays are creates like $this[][][] = 5;
- Understanding the naming of functions required me to write several documents.
- I had to use #region tags to find places in the code quicker since a router was about 2000 lines of if else statements.
- I used Todo Bookmark extensions in VSCode to mark and flag everything that's a bug.
- Gets upset if I add anything to .gitignore; I tried to tell him it ignores files we don't want, he is though it deleted them for a while.
- He would rather explain every line of code in a mammoth project that follows no human known patterns, includes files that overwrite global scope variables and wants has me do the documentation.
- Open to ideas but when I bring them up such as - This is what most standards suggest, here's a literal example of exactly what you want but easier - He will passively decide against it and end up working on tedious things not very necessary for project release dates.
- On another project I try to write code but he wants to go over every single nook and cranny and stay on the phone the entire day as I watch his screen and Im trying to code.
I would like us all to do well but I do not consider him a programmer but a script-whippersnapper. I find myself trying to to debate the most basic of things (you shouldnt 777 every file), and I need all kinds of evidence before he will do something about it. We need "security" and all kinds of buzz words but I'm scared to death of this code. After several months its a nice place to work but I am convinced I'm being pranked or my boss has very little idea what he's doing. I've worked in a lot of disasters but nothing like this.
We are building an API, I could use something open source to help with anything from validations, routing, ACL but he ends up reinventing the wheel. I have never worked so slow, hindered and baffled at how I am supposed to build anything - nothing is stable, tested, and rarely logical. I suggested many things but he would rather have small talk and reason his way into using things he made.
I could fhave this project 50% done i a Node API i two weeks, pretty fast in a PHP or Python one, but we for reasons I have no idea would rather go slow and literally "build a framework". Two knuckleheads are going to build a PHP REST framework and compete with tested, tried and true open source tools by tens of millions?
I just wanted to rant because this drives me crazy. I have so much stress my neck and shoulder seems like a nerve is pinched. I don't understand what any of this means. I've never met someone who was wrong about so many things but believed they were right. I just don't know what to say so often on call I just say, 'uhh..'. It's like nothing anyone or any authority says matters, I don't know why he asks anything he's going to do things one way, a hard way, only that he can decipher. He's an owner, he's not worried about job security.13 -
Your data is formatted according to some ISO? Nice. You say it's easy to use and well documented? Great!
IT'S FUCKING FORMATTED WITH IRREGULAR SPACING??
What the fuck is this formatting?
Date <tab> Word <3 spaces> Some conjugated version <ONE space> Type <FIVE spaces> gender
WHAT
WHY
WHY ISNT IT XML
WHY ISNT IT JSON
WHY THE TABULATOR AND IRREGULAR SPACES
WHY DOES THE ORDER CHANGE PER LINE
WHY IS THIS IN A SINGLE 1MIL LINE FILE
help the university of oslo makes me dysphoric in their dictionaries i really dont want to parse this1 -
I just joined a new organization and saw a single file with 9433 lines of code. Advance RIP to me.8
-
Want to make someone's life a misery? Here's how.
Don't base your tech stack on any prior knowledge or what's relevant to the problem.
Instead design it around all the latest trends and badges you want to put on your resume because they're frequent key words on job postings.
Once your data goes in, you'll never get it out again. At best you'll be teased with little crumbs of data but never the whole.
I know, here's a genius idea, instead of putting data into a normal data base then using a cache, lets put it all into the cache and by the way it's a volatile cache.
Here's an idea. For something as simple as a single log lets make it use a queue that goes into a queue that goes into another queue that goes into another queue all of which are black boxes. No rhyme of reason, queues are all the rage.
Have you tried: Lets use a new fangled tangle, trust me it's safe, INSERT BIG NAME HERE uses it.
Finally it all gets flushed down into this subterranean cunt of a sewerage system and good luck getting it all out again. It's like hell except it's all shitty instead of all fiery.
All I want is to export one table, a simple log table with a few GB to CSV or heck whatever generic format it supports, that's it.
So I run the export table to file command and off it goes only less than a minute later for timeout commands to start piling up until it aborts. WTF. So then I set the most obvious timeout setting in the client, no change, then another timeout setting on the client, no change, then i try to put it in the client configuration file, no change, then I set the timeout on the export query, no change, then finally I bump the timeouts in the server config, no change, then I find someone has downloaded it from both tucows and apt, but they're using the tucows version so its real config is in /dev/database.xml (don't even ask). I increase that from seconds to a minute, it's still timing out after a minute.
In the end I have to make my own and this involves working out how to parse non-standard binary formatted data structures. It's the umpteenth time I have had to do this.
These aren't some no name solutions and it really terrifies me. All this is doing is taking some access logs, store them in one place then index by timestamp. These things are all meant to be blazing fast but grep is often faster. How the hell is such a trivial thing turned into a series of one nightmare after another? Things that should take a few minutes take days of screwing around. I don't have access logs any more because I can't access them anymore.
The terror of this isn't that it's so awful, it's that all the little kiddies doing all this jazz for the first time and using all these shit wipe buzzword driven approaches have no fucking clue it's not meant to be this difficult. I'm replacing entire tens of thousands to million line enterprise systems with a few hundred lines of code that's faster, more reliable and better in virtually every measurable way time and time again.
This is constant. It's not one offender, it's not one project, it's not one company, it's not one developer, it's the industry standard. It's all over open source software and all over dev shops. Everything is exponentially becoming more bloated and difficult than it needs to be. I'm seeing people pull up a hundred cloud instances for things that'll be happy at home with a few minutes to a week's optimisation efforts. Queries that are N*N and only take a few minutes to turn to LOG(N) but instead people renting out a fucking off huge ass SQL cluster instead that not only costs gobs of money but takes a ton of time maintaining and configuring which isn't going to be done right either.
I think most people are bullshitting when they say they have impostor syndrome but when the trend in technology is to make every fucking little trivial thing a thousand times more complex than it has to be I can see how they'd feel that way. There's so bloody much you need to do that you don't need to do these days that you either can't get anything done right or the smallest thing takes an age.
I have no idea why some people put up with some of these appliances. If you bought a dish washer that made washing dishes even harder than it was before you'd return it to the store.
Every time I see the terms enterprise, fast, big data, scalable, cloud or anything of the like I bang my head on the table. One of these days I'm going to lose my fucking tits.10 -
So recently my open source project took off and got trending on GitHub (680 starts and 225 forks). This was the first time a project of mine really gained some traction and invested more of my time and weekends to maintain this project - I wrote comprehensive docs, contributing guidelines and reviewed PRs and made sure I commented on every single one of them. Sure, it isn't easy to review 50 PRs a day after coming home from work but the excitement of seeing this project becoming trending fueled me.
First 2 weeks it was good. I would come home from work and have dinner and sit down to maintain the project. Whenever contributors would be stuck, I would help them and write comments on each PR.
But the problem started since last week. People just really want to see their contribution activity graph get populated and hence they would make stupid PRs and literally no one followed contributing guidelines - I mentioned in that that the code should adhere to Pep8 styling but no one gave a shit. Each day I would spend reviewing PR with crappy formatted code and no sign of Pep8, and even some will just file PR and add a fucking docstring to every function or add paragraph of comments. Also, the PR quality was bad with unsquashed commits amounting to 10 or 20 or even sometimes 50.
I wrote the contributing guidelines doc and in that I mentioned every source that contributors could find helpful like how to squash commits, how to file a PR and Pep8 and not to write useless comments. Seriously people, grow up!6 -
Just wrote my own webpack plugin for VueJS.
In serverless application there isn't a good way to pre render a single page web application as there is no server to do this task.
What we can do is use serverside rendering with webpack to locally (or in CI) generate the static HTML markup and include them in a template file like EJS.
In that way, the client browsers would not have to wait for the initial render and the search engines will also be happy.
This feels good! Time to upload it as a npm package 😇2 -
So, first time ranting, sorry if I mess anything up.
When I first started my current job and got introduced to the system we were coding in, something seemed a little fishy to me. Didn't like the system anyway, but at least the language is a compiler language, so it runs quite quickly, right?
In theory, yeah. If the lead dev liked the IDE that came with it. But he has to REALLY fucking hate it, because rather than using it, he codes in plaintext. No syntax highlighting, no auto-indent, nothing. And he's built the entire damn system around doing that. Sadly the compiler is only integrated into the IDE, so what do we do there? Copy the code from the plaintext file to the IDE to compile it there? No no, why would you. The language has a function you can use to compile some code at runtime.
And so he does. Every. Single. Fucking. Script. There's a single main script that runs and finds the correct textfile to then runtime-compile and execute. So we effectively made a compiler language into a massively unoptimized interpreter lang.
I even mentioned that this might be a problem, but I was completely dismissed, so at that point it's not my problem anymore and I have then switched to a different system anyway.
Couple weeks later I heard the same guy complaining that the scripts were running almost the whole night so we'd probably need some better hardware or something.
Well if only there was a really obvious solution that would improve the performance by probably about a factor of 20 or so...13 -
What kind of drugs can possibly compel someone to write a 7000 line source file?? Seven thousand lines of code. In a single file! When everything else in the project is nice and modular... 🤮4
-
Hey everyone, cozyplanes here with another quick excel prank i thought of.
It is called TEEST, and the technique behind is simple, but interesting. Recommend taking a look, and pranking with your friends.
The following is the README of TEEST (Text in Excel Every Single Time) in Github.
You can check the simple project here ( https://github.com/cozyplanes/teest )
Disclaimer: Do not use or modify neither the program or the source code to make software violating the law.
### How do I use it?
1. Head to https://github.com/cozyplanes/teest and download the latest release `EXE` file.
1. Windows may warn you with the missing signature. The file is a DEBUG file, so there isn't a publisher signature. You can proceed downloading anyway since it has been virus checked by the developer.
2. Type the message you want to display in the textbox.
3. Click `Save text` button.
5. To check the file, click `Cancel` button in the opened popup dialog.
### What happens?
When an MS Excel file (`.xlsx`) has been opened, by using TEEST, two files gets opened.
1. The original file user opened
2. Excel file named `message.txt` with the custom message you have written.
`message.txt` excel file will open every single time a person opens a excel file.
*In some older versions of Excel, the message may overlap with the user opened file.*
### Why does this happen?
When MS Excel program is executed, it is programmed to check the files in the following 2 folders.
- `C:\Program Files\Microsoft Office\Office[versionnumber]\XLSTART`
- `C:\Users\%username%\AppData\Roaming\Microsoft\Excel\XLSTART`
In normal conditions, there is no file in those folders (or the folders doesn't exist at all) but when you use TEEST and click `Save text` button, it saves `message.txt` file in the folders above. From MS Excel is executed again, it will find out there is a file in the folders above, so it will show those text files in Excel.
### Where is this technique used?
There should be a lot of software using this trick, but it is widely known for ransomwares such as `GandCrab` and `TeslaCrypt` displaying decryption methods in MS Excel by this trick.
### How can I disable it?
1. Open TEEST again.
2. Click `Save text` button and click `Cancel` in the following popup.
3. Delete `message.txt` file in the opened explorer.
### LICENSE
This software is under the MIT License. Refer to the `LICENSE` file for more information.
### Contact
<cozyplanes@tuta.io>
Spam/Ads not allowed. Please only send questions or concerns about the software. It may take up to 48 hours to get a reply.13 -
Personal project: I design and build single-board computers with old processors like Z80, 6502 etc when I'm not being too lazy. A few run CP/M. One that's been more interesting in terms of digging deeper has been an 80C188, for which I've written a BIOS (despite the chip's built-in peripherals and interrupts being at non-standard addresses) mostly in C, which it can use to boot DOS from an image file on an SD card (bit-banged off the UART chip with FatFs). (Yes it's slow, but so is a 5.25" floppy.)
Work: My first project at my current job. Not particularly exciting compared to some stuff on here, but it got me into making useful contributions to the open-source CRM we used at the time. Was building a basic extension to deal with duplicated organisation names. So learned CiviCRM fairly deeply, a bit of Drupal, a bit of PHP. It's a shame we don't use that system any more, the community was cool.7 -
The company I work at sends their developers out to other companies to help them work on projects and help them in other ways (advice when communicating to customers of on demand software for example).
While not on a project you are working in house training trainees and interns. Part of that is teaching them to show initiative and treating them as full developers. The 30 interns all discussed a git flow and code format.
During the third sprint (two weeks sprints) a team messaged me if I wanted to check their merge request for the sprint.
It took me a glance at the first file to know they didnt do any review themselves. I used my flywheel to check all their changes and without being able to read the code I saw indentation was all over the place, inconsistent bracket placements etc. I let them know I wouldnt check their code until it was according to their own standards.
Two days later I got the message to check it again. At first glance the indentation was fine so I started reading the code. Every single thing was hardcoded, not made to support mobile (or any resolution other than 1920×1080).
A week later they improved it and still not good. Gave them a few pointers like I would for any colleague and off they went to fix things. The code became worse and indentation was all over the place.
I told them the next time it shouldnt be a quick glance to be able to reject it again. By this time other teams came to me asking why it wasnt merged yet and I explained it to them. One of the teams couldnt do anything u til this was merged so I told them to implement it themselves. I was surprised that 4 teams came to me asking about a merge request, that was every team except the team whose pull request it was.
4 weeks after the intitial sprint the other team made a merge request and I had three small comments and then an hour later it was merged.
The other team messaged me why their merge request did went through (still havent seen any of their team in person, Im sitting 10 meters away from them behind a wall)
They also said that it was easier for them because they started from scratch. Thats when I called them in to discuss it all and if they were not interns but full time developers they would have been fired. I told them communication is key and that if you dont understand something you come in person to ask about it. They all knew I like teaching and have the patience to explain a single thing ten times, but the initiative should be theirs.
One of the team members is my current coworker and he learned his lesson by that. The others stopped with their study and started doing something completely else.
TL;DR
Merge request is open for 4 weeks, in the end another team started from scratch and finished it within a week. The original team didnt ask me questions or come to me in person, where other teams did.
DISCLAIMER: some of you might find it harsh, but in our experience it works the best for teaching and we know when people don't dare to ask questions and we help them in that too. It's all about the soft skills at our company.4 -
tldr:
first year in college we programmed 24 hrs straight to fix somebody's mess before the deadline. Decided not to screw him over, instead he claimed to have done everything and we failed the assignment.
Long version:
var group= new[]{"Mike", "Gavin", "Gus", "I", "Ben" };
var client = "Jack"';
First year of college we had an assignment to make a web program for somebody.
Ben wanted to join our group and he already knew a client so we let him join.
After joining Ben wanted to be project lead, but we already decided Mike based on his experience.
Ben claimed to be much better in every way than Mike at and kept coming with stuff the following weeks why we should make him project lead. He kept pointing out when Mike did something wrong and he even came with an audio file where he clearly made jack say that he wanted Ben to be project lead .
After that we were all a bit pissed and told him that he should get it in his head that he was not going to be project lead and just start working on his part of the assignment.
We also found out that Ben was a documentation addict, what we could write in a small paragraph, he wrote a whole page about it. No joke, I rewrote a page of his in 5-6 rows with the same information in it.
No problem you thing, wrong! Because of this he kept bothering us arguing and claiming that our documentation was wrong because it was to short.
In the week of the deadline we asked Ben if he was also done, and told us that he was done for a while now.
The day before the deadline we came to school thinking we only had to do some merging and finishing up documentation.
Then we found out that Ben has almost nothing, and what he had the IDE was screaming that it was incorrect, spaces in Id's and css class names for instance. A really good programmer, my ass!
We were so pissed off at this point, but we had 24 hrs and needed to come up with a plan to fix it.
We decided that Mike and I were going to fix Ben his shit in the coming 24 hrs and Ben was going to make our last bit of documentation because we would not have the time for that, Especially if we had to argue with him like we had to do for each bit of documentation. Gus did not have time and Gavin could not program on his own yet, he wanted to help, but helping him help us would cost more time than we had.
We all went home after that and Mike and I started to program 24 hours straight while in a Skype call, making what Ben had 2 months for. Shortly before the deadline Mike looked at our finishing up documentation received from Ben and told me it was "Okay" and zipped everything up and uploaded it to school with a few minutes to spare.
After that we thought everything was good, we made Ben's part work and delivered it in time. We also decided not to throw Ben under the bus, because this would hurt all our grades because we did not work good as a group since we should have noticed it earlier.
A few weeks go by till the assessment.
The assessment start with asking if we want individual grades or as a group when you all think you did equal amount. We choose as a group, because if we chose individual not only Ben but also Gavin would get a lower grade and we did not think that was fair because he tried so hard.
We demo the product and the teachers are positive. When the teachers start about the documentation, the first thing they tell is that they found something interesting in the documentation, and they read it to us:
"I, Ben, have made all the documentation because my group did not want to."
That was so far from the truth, we all did make our documentation about the parts we made. Yes he did do overall a little bit more because every single bit of documentation we had to argue with him, so every time he volunteers to make it, we would all agree. And he made Mike's and i's last bit of documentation.
Telling the teachers on that point would not have mattered, it would only have hurt is in another way, so we did not and all failed the assignment. And we all felt like to strangle him.
This is now a few years back, but i still want too.1 -
Bit of a bitch to get set up, but I made a SASS auto-recompiler with file watching. Windows was being a total ASS and sends the change event up to 4 times in my testing for a single file save action. It also renders the file unwritable for that time, throwing errors.
I literally had to add debouncing to make this work, but it's kinda nice now.6 -
Dear Tailwindcss,
Fuck you.
Fuck you and your messy as fuck html files.
Fuck your shitty pseudo 90s 'Let's dump all our shit in a single html file'.
Fuck your claims of being responsive, most of your widths and heights are done in FUCKING PIXELS.
Fuck your claims of being flexible, adding a 10% width class took 20 minutes of scrolling through your shitty docs.
And the worst part is, the poor devs 4 years from now are gonna be stuck maintaining this goddamn shit because shitty enterprise companies desperately trying to stay relevant are treating this shit like the Holy God of Frontend styling, the solution to CSS once and for all
FUCKING IDIOTS CSS ISN'T BROKEN, THIS GARBAGE IS!!!! WE DON'T NEED A SHITTY SOLUTION TO A PROBLEM THAT DOESN'T EXIST
Tailwind can go fuck itself with it's 200 character html lines9 -
When i started my work I encoubtered this db(one of 4): more than 20 tables, some with 200 columns literally... EVERYTHING is a varchar 😓.
I'm slowly designing some normalized tables with real fk on new features and projects and people are like: how the fuck did you implement this feature so fast? the other guy spent 3 months designing this form (and I'm just speechless):
The form was some sort of crazyness shit passing input names as "name-of-property" and a file only to check if(name="string") then store a number value to an array and save it as a "number" (actually varchar) on the db. literally more than 50 if statements to do this.
Everything on a single table that made no sense at all.
Just wtf... At least my boss let me start if from scratch cause he we were always having panick attacks every time he needed to do something with it. 😂😂6 -
'Hey I found a bug in your code, it's probably a typo, see here.'
Me: Oh right, yeah. How stupid of me. Thanks, I'll push it.
'It's okay. You can push it or I can do it too after you push the changes we just discussed. I actually simplified one of your methods.'
Me: You, what... ?
(You crammed multiple lines in a single line with your stupid as fuck, rigid constructs, removing my error handling, loosely coupled service, in the name of simplification?)
' Yeah it's just four lines in a single function now, no need to call the function again and again.'
Me: (No... Just no. This totally undos whatever little I could do to avoid supporting your idiotic object in the first place.)
Oh... okay, we'll see. I'll let you know.
What life.
Life in a company full of ignorant, inflated egos is no joke.
Details:
I created a service that reads a configuration file and returns the configuration. This person needs five entries for his app logic. He collected them in a object. Quite alright. Except that the class prototype is shitty. I, like a normal person, made my service return a value based on input. I was asked to incorporate this awful object so that I can return the five entries together, which is awful because the service is not supposed to know about how the entries are clubbed. It should most certainly not know about the data members of the object!4 -
There is an error in almost every file, and yet this seems to work
On other days there is not even a single error and still it cracks.
Android Studio, you need to watch your drinking habits -_-8 -
When a Client is supposed to send you sponsor icons for the new website and all you get is a single PDF file containing all of them. Why ??!! This is even more work to do for them ???!!!
-
!rant
I used to doubt the usefulness of regex, until now.
I'm new to web dev, and downloaded a sample website to make a project with, but all the sources of images came as src="images/image.jpg", and for some reason I couldn't make it work, the only way that I found that could work to me was creating a static folder inside my app folder, declaring in the start of the document a {% load static %} and referring the image source as {% static 'images/image.jpg' %} in the html file, I kinda get what this is doing, but why it's the only way that works, it's beyond me.
Great! Now I can start the development server and see the website in its full glory!!! Then I realized: I had to edit the sources of every image and every reference to css and js in 5 html files to it work properly, and come on, do all that by hand?
Then regex came to mind, never had used it, never knew how to use it properly, after some web research I found if I did a find/replace with ([a-z]\w+\/[a-z,-]+\.[a-z]+{1,2}) and {% static '$1' %}, all the work I had to do, was resumed to a single click of replace all.
Man, I love doing what I do, and I love you guys/gals, never tough I would ever find a place in which I could share this kind of thing!6 -
List of shit my superior said and wrote in the project:
1. Prefer to write "pure" SQL statement rather than ORM to handle basic CRUD ops.
2. Mixing frontend and backend data transformation.
3. Dump validation, data transformation, DB update in one fucking single function.
4. Calculate the datetime manually instead of using library like momentjs or Carbon.
5. No version control until I requested it. Even with vcs, I still have to fucking FTP into the staging and upload file one by one because they don't use SSH (wtf you tell me you don't know basic unix command?)
6. Don't care about efficiency, just loop through thousands of record for every columns in the table. An O(n) ops becomes O(n * m)
7. 6MB for loading a fucking webpage are you kidding me?
Now you telling me you want to make it into AJAX so it'll response faster? #kthxbye2 -
When I wrote my first algorithm that learns...
So in order to on board our customers onto our software we have to link the product on their data base to the products on ours. This seems easy enough but when you actually start looking at their data you find it's a fuck up of duplication's, bad naming conventions and only 10% or so have distinct identifiers like a suppler code,model no or barcode. After a week or 2 they find they can't do it and ask for our help and we take over. On average it took 2 of our staff 1-2 weeks to complete the task manually searching one record of theirs against our db at a time. This was a big problem since we only had enough resources to on board 2-4 customers a month meaning slow growth.
I realized when looking at different customers databases that although the data was badly captured - it was consistently badly captured similar to how crap file names will usually contain the letters 'asd' because its typed with the left hand.
I then wrote an algorithm that fuzzy matched against our data and the past matches of other customers data creating a ranking algorithm similar to google page search. After auto matching the majority of results the top 10 ranked search results for each product on their db is shown to a human 1 at a time and they either click the the correct result or select "no match" and repeat until it is done at which point the algo will include the captured data in ranking future results.
It now takes a single staff member 1-2 hours to fully on board a customer with 10-15k products and will continue to get faster and adapt to changes in language and naming conventions. Making it learn wasn't really my intention at the time and more a side effect of what I was trying to achieve. Completely blew my mind. -
FUCK YOU Visual Studio, didn't you ever hear about asynchronous behavior? like WHY THE HELL you have to freeze every single thing to complete a shitty task, I just need to copy/open file..
Microsoft, Xamarin, and MAC Agent.. WHAT FUCKING POSSIBLY COULD GO WRONG.
{AND NO, MY LAPTOP IS NOT SHIT, this happens only with shitual studio}2 -
I never thought to I'd say this about an open-source project, but if I wanted to single out an unbeatable case of "Bad Design", and the manifestation of the term "Redundancy Hell", It is definitely Calibre.
Single job: To keep some e-book files + some metadata.
What it does in brief: In a single dir as your library; From metadata stored IN each file; It generates subdirs <author_name>/<title_name>(<some_numerical_id>), copies the e-book file there, generates a jpg cover from the first page and also stores it there, generates an xml file to support legacy e-book formats (but it generates it anyway even for pdfs), which contains all the same metadata for the file, including title, author and href for the cover, and also stores it there. And then, all the same metadata for all books is stored in a metadata.db in the library root folder. I don't know if there is more data stored/used somewhere in a more obfuscated way.
Not too much to ask: Change some author/title/any single field.
What is done: 💩🌋
It is so helpful, it does all the stuff by itself or its plugins; you don't have to touch anything. But it also has this amazing ability to fuck everything up without even being touched. I mean WHAT THE FUCK WERE YOU THINKING? WHAT KIND OF A FUCKING DESIGN IS THIS? A FUCKING FRACTAL?
Literally, If I had listed all my books on physical papers with a real life pen, It would take me less time that I've already wasted on unfucking the regular disasters. Fuck you and your arrogant responses to issues. -
Go fuck yourself make.
Don't tell me you haven't got a build rule for a .hex file because I'm fucking looking at it. I added a single file name to a variable and now magically you can't find any of my fucking build rules.
NOT FUCKING HELPFUL MAKE.3 -
The backend people at my old company had 4 files which they all committed code to (they were about 10 people). The only reason they didn't use a single file, according to the lead developer, was that Eclipse could only handle 12k lines per file (or something like that).3
-
How many times do I need to tell you, markdown does not convert a single linebreak to a new paragraph.
STOP WRITING LINES THAT ARE MORE THAN 300 CHARACTERS LONG IN A MARKDOWN FILE HOW THE FUCK AM I SUPPOSED TO REVIEW THAT.9 -
Ok, here goes...
I was once asked to evaluate upgrade options for an online shop platform.
The thing was built on Zend 1, but that's not the problem.
The geniuses that worked on it before didn't have any clue about best practices, framework convention, modular thinking, testing, security issues...nothing!
There were some instances when querying was done using a rudimentary excuse for a model layer. Other times, they would just use raw queries and just ignore the previous method. Sometimes the database calls were made in strange function calls inside randomly loaded PHP files from different folders from all over the place. Sometimes they used JOINs to get the data from multiple tables, sometimes they would do a bunch of single table queries and just loop every data set to format it using multiple for loops.
And, best of all, there were some parts of the app that would just ignore any ideea of frameworks, conventions and all that and would be just a huge PHP file full of spagetti code just spalshed around, sometimes with no apparent logic to it. Queries, processing, HTML...everything crammed in one file...
The most amazing thing was that this code base somehow managed to function in production for more than 5 years and people actualy used it...
Imagine the reaction I got from the client the moment I said we should burn it to the ground and rebuild the whole thing from scratch...
Good thing my boss trusted me and backed me up (he is a great guy by the way) and we never had to go along with that Frankenstein monster... -
Has to review another Devs TypeScript project. And what do I find?
A single ts file with 700 lines of uncommented pure hard logic1 -
Fire your whole fucking web team Bethesda
* Your design is a classic ipecac. Whatever the fuck you are doing doesn't in frontend doesn't justify the 4Mb of bandwidth I wasted on a single js file. Why the fuck can I see the whole fucking node_modules directory when looking at the sources?
I know this is supposed to be a webpage for a game development studio, but I'm seriously wondering if your budget would even get me a prostitute.
I'm a greedy fuck and want a free game. apparently your servers are only good enough to register me, but login is apparently too much to ask for. Yeah sure. Oh and also thank you for choosing an "incorrect username and password" error message by default, even though your fucking gateway timed out. Please be kind enough and punch me directly into my face next time. Not like I'll ever access that shit ever again3 -
I'm a fan of Linux, and have used many distros (arch, ubuntu, debian, fedora, mint, centos, rhl) and many desktop environments (KDE, Gnome, Cinnamon, xfce, Enlightenment) before asking this question.
But every single one of these desktop environments always have felt slow to respond in some cases, where I click something and it doesn't open/close immediately, or i double click something but it fails to open or select something. basically I'm not confident my actions on the GUI will have guaranteed, quick responses within reasonable time. I've never ever had this issue with Microsoft OSes (keeping aside the many badly coded softwares which hang or crash). I'm not talking about specific softwares, this is just general usage of opening settings and using the file manager, window menus.
I'm pretty sure my hardware is not the issue. I've run everything on the same rig. And this has always kept me from fully committing myself to a Linux distro. But I can never be sure about display drivers, as they're not identical. But the issues in Linux has been noted by me for many years. So I doubt it's the drivers either.
Is there anybody who agrees with me and know why Linux is the way it is like that, or is this just me facing this annoyance?13 -
When I was in 11th class, my school got a new setup for the school PCs. Instead of just resetting them every time they are shut down (to a state in which it contained a virus, great) and having shared files on a network drive (where everyone could delete anything), they used iServ. Apparently many schools started using that around that time, I heard many bad things about it, not only from my school.
Since school is sh*t and I had nothing better to do in computer class (they never taught us anything new anyway), I experimented with it. My main target was the storage limit. Logins on the school PCs were made with domain accounts, which also logged you in with the iServ account, then the user folder was synchronised with the iServ server. The storage limit there was given as 200MB or something of that order. To have some dummy files, I downloaded every program from portableapps.com, that was an easy way to get a lot of data without much manual effort. Then I copied that folder, which was located on the desktop, and pasted it onto the desktop. Then I took all of that and duplicated it again. And again and again and again... I watched the amount increate, 170MB, 180, 190, 200, I got a mail saying that my storage is full, 210, 220, 230, ... It just kept filling up with absolutely zero consequences.
At some point I started using the web interface to copy the files, which had even more interesting side effects: Apparently, while the server was copying huge amounts of files to itself, nobody in the entire iServ system could log in, neither on the web interface, nor on the PCs. But I didn't notice that at first, I thought just my account was busy and of course I didn't expect it to be this badly programmed that a single copy operation could lock the entire system. I was told later, but at that point the headmaster had already called in someone from the actual police, because they thought I had hacked into whatever. He basically said "don't do again pls" and left again. In the meantime, a teacher had told me to delete the files until a certain date, but he locked my account way earlier so that I couldn't even do it.
Btw, I now own a Minecraft account of which I can never change the security questions or reset the password, because the mail address doesn't exist anymore and I have no more contact to the person who gave it to me. I got that account as a price because I made the best program in a project week about Java, which greatly showed how much the computer classes helped the students learn programming: Of the ~20 students, only one other person actually had a program at the end of the challenge and it was something like hello world. I had translated a TI Basic program for approximating fractions from decimal numbers to Java.
The big irony about sending the police to me as the 1337_h4x0r: A classmate actually tried to hack into the server. He even managed to make it send a mail from someone else's account, as far as I know. And he found a way to put a file into any account, which he shortly considered to use to put a shutdown command into autostart. But of course, I must be the great hacker.3 -
Fuck Unity.
Every single time I try to use Unity to develop my well-along-in-development video game, it finds some way of fucking itself up.
Be it from somehow failing to compile a DLL - which is something completely out of my control, the inspector failing to update itself when I select a new object every five minutes, to the engine managing to fail to load its UI layout because it somehow managed to lose a file responsible for containing the layout, the Inspector forgetting to include a scrollbar and as such trying to cram a bunch of components into one area, crashing in a certain area because I tried using reflections, crashing because I tried running the game in a place that always works, all the way to the whole thing closing instantaneously when I try selecting a new layout.
My experience with using this god-forsaken configuration of code and imagery has been one of endless torment; I've spent hours lamenting about the pain this piece of utter horseshit has caused me to those who'd listen.
I don't know what I did to this thing to deserve to be shown the absolute worst of this engine for the year I've been working on my game for. I can't even take a look at its source code to see if I can piece together things I'll pick up from alien code to fix obnoxious bugs myself because you cunts have it under lock-and-key for some dumbass reason.
Even updating my install of this engine is a gamble; I remember clear-as-day updating my project from 2019.3.14 to whichever one was most recent at the time, and everything breaking. This time, I got lucky and managed to update to 2020.1.4 with no issue on the surface, except I inadvertently let in a host of other issues that somehow made the editor worse than the older one.
There's little point in even bothering to report a bug because this shit happens so randomly that I could be just working on auto-pilot and the next thing I know Unity's stupid "crash handler" rears its ugly head yet again, or you people are probably too busy adding support for platforms no sane person uses like fucking Chromebooks.
There've been times where it's crashed upwards of three times in the span of 40 minutes of light use.
How is one expected to cough up hundreds of dollars a year to use a "pro" version of this horrid editor when every session of use yields a 50/50 chance that it'll either work like it's supposed to, or break in one way or another?
It's a miracle I even managed to type all of this out in one go, I expected the website to just stop responding entirely once I got past four lines.
Do what you will with my post, I don't care.6 -
Just created a custom html, css, js bundler to bundle all my files and minify it to a single file.
Development will be a breeze right now.2 -
I agree with many people on here that Front-End web development/design isn't what it used to be.
Things used to be simple: a static page. Then we decoupled design from description and we introduced CSS; nice, clean separation, more manageable - everything looks nice up to this point.
Introduce dynamic pages, introduce JavaScript. We can now change the DOM and we can make interactive, neat little webpages; cool, the web is still fun.
Years later, we start throwing backend concepts into the web and bloating it with logic because we want so much for the web to be portable and emulate the backend. This is where it starts to get ugly: come ASP, come single pages, partial pages, templates,.. The front-end now talks to a backend, okay. We start decoupling things and we let the logic be handled by the backend - fair enough.
Even later, we start decoupling the edge processes (website setup, file management, etc.) and then we introduce ugly JavaScript tools to do it. Then we introduce convoluted frameworks (Angular,..). Sometimes we find ourselves debugging the tools themselves (grunt, gulp, mapping tools,..) rather than focusing on the development itself (as per ITIL guidelines; focus on value), no matter how promising today's frameworks claim to be ("You get to focus on your business code"; yeah right, in practice it has turned out differently for me. More like "I get to focus on wasting copious amounts of time trying to figure out your tangled web").
Everything has now turned into an unfriendly, tangled web (no pun intended).
I miss the old days when creating things for the Web used to be fun, exciting and simple and it would invigorate passion, not hate.
<my cents="2"></my>3 -
I actually never felt the need to scream at a co-worker so let's talk about that time a co-worker screamed at me instead.
tl;dr : some asshole boss screamed and threatened me because someone else's project was shit and didn't work.
Context: I was in my third year of school internship (graded) and my experience is C, C++, C#, Python all in systems programming, no web.
I was working as an intern for a shit company that was selling a shit software to hospitals (though not medically critical, thank God) the only tech guy on site was the DBA (cool guy) the product was maintained by a single dev in VB from his house, the dude never showed up to work (you'll understand why) and an other intern who couldn't dev shit.
I was working with the DBA on an software making statistical analysis from DB exports, worked nice, no problems here if we forget the lack of specs or boundaries (except must work in ieShit).
The other intern was working on something else (don't ask me what it is) I just remember it was in GWT before the community revived it. His webapp was requesting the company http server for a file instead of having one of it's java servlet to fetch it (both apps ran on sane server) which caused a lot of shit especially CORS error. That guy left (end of contract) and leaves his shit as is, boss asked me to deploy the app, I fiddle with it to see if it works and when I find out it doesn't then that asshole starts screaming at me in front of every other employee present, starts threatening to burn me in the tech world and have me thrown out of my school for no goddamn reason than the other dude's project doesn't work.
After the screaming I leave and warn my school immediately.
I guess that's why the other dev never came to work.
I had three weeks of internship left, that I did from home and worked probably less than 2 hours a day so suck it asshole.
Still had a good grade because I was reviewed by the DBA and he was happy with the work I did.
It was only later that I realized that what he did was categorizing as harassment (at least in France) and decided that never again this would happen without a response from my lawyer.1 -
Finally finished the longest ticket I've ever worked on in my life. The ticket title and description was a pretty simple and straightforward one: "Upgrade from PHP 7.4 to 8".
If it was only so simple in real life. Our application is mostly done with API Platform framework, which is based on top of Symfony framework which is based on top of PHP language.
Once I did PHP 7 => 8 upgrade I needed to upgrade API Platform 2 => 3. But of-course that couldn't have been done as before that I needed to upgrade from Symfony 5 => 6.
This all was literally an equivalent of touching into a wasp nest - it took me a bit over 5 months and 800 hours of work and there was literally not a single source file left untouched.
In the process of all of this I've ran into literally dozen undocumented feature-breaking changes, broken backwards-compatibility promises and inside out architectural changes - from both the frameworks and the language itself.
Upgrading just one major version of anything SHOULD NOT be so hard. And to top it all up just to think I will need to do this again in a year or two..
Experiences like these really set my hate for time-based model of releases and the state of today's development in general.6 -
A long long time ago ( 2007 I think ) I worked for a company that made landing sites, so basically an email campaign would go out, users would be sent to a 1 page website with a form to capture their data, ready to be spammed even more. You know how it was back then.
So I worked with a guy who we had just hired, I didn't do the hiring but his CV checked out, so I gave him one of my tasks. Now most pages were made with js and html, with a PHP backend ( called with Ajax). Now this guy didn't know PHP so I was like all good, ASP works too at the end of the day we don't judge, we do like 2 or 3 of these a day and never look at them again. So he goes of and does is thing.
3 weeks later, the customer calls up to me they still haven't received their landing page. Ok so he probably forgot to email the customer np, I tell him to double check he has emailed the customer. Another week goes by end the customer calls back, same problem. At this point I'm getting worried, because we're days away from the deadline and it was originally my task.
So I go back to the guy and I tell him I want that landing page so I can send it myself, half thinking to myself that we had a freeloader, that guy that comes in to companies for 3 weeks, doesn't work, but still cashes his pay. But no, this was much worse.
So he tells me he has finished yet. I ask him why, what's the blocker ? You had 4 weeks to tell me you were blocked and couldn't progress. And his answer was simply, because I wasn't blocked I have been working on it this whole time. So I tell him to zip his project up and email it to me. We didn't do SVN or git back then, simply wasn't worth it. So he comes back to me and says the email server is telling him attachments can't be bigger then 50mb. At this point I'm thinking he didn't properly sized the art or something, so I give him a flash drive to put it on.
When I then open the flash drive, the archive is 300mb, thinking to myself, the images weren't even that big to begin with.
So I open it up, and I don't even find any images, just a single asp page. About 500mb. When I opened that up and it finally loaded, I saw the most horrendous things ever.
The first 500 lines was just initializing empty vars. Then there was some code that created an empty form with an onChange event that submits the form. After that.. it was just non stop nested if's. No loops, no while, for, foreach, NO elseif's, just nested if's, for every possible combination of the state the form could be in. Abou 5000 of them, in a single file. To make matters worse, all the form ( and page ) layout was hardcoded in the if's. Includes inline css, base64 encoded images, nothing but as dynamic, based on the length of the form he changes the layout, added more background etc. He cut the images up for every possible size of the page and included them in the code.
I showed it to my boss, he fired the guy on the spot. I redid the work from scratch, in under 4 hours. Send it to the client. they had no ammends to make, happy as Larry. Whish I kept the code somewhere.
Morale of the story, allways do a coding test on interviews, even if small things just to sanity check.3 -
Alright ladies and no so gentle men...
The time has come for me to ditch dropbox (Because fuck wanting to use ext4 and also have some spare CPU usage when syncing a single fucking file) and migrate everything from my art storage to some old prototypes into private github repo's...
Prepare to see a shit tonne of rants about me forgetting how to git and all that kinky shit...
Wish me luck *salutes*1 -
Recently, I had to make a minor modification to some Node.js code a coworker wrote a year ago which buffers stringified JSON into Kinesis. I just needed to add a new key to the input object, it took minutes to make the change, but hours to make sense out the absolute trash spaghetti code this guy wrote. After spending half a day trying to make his code readable, I just got so pissed off. I replaced his 15 files/+1,500 lines of uncommented code, filled with classes, factory functions, poorly named functions and vars, and so, so many spelling mistakes.
We now have a single, well commented, 300 line file that does the same thing.
Get that shit code out of here. -
If Java versions can coexist on a system
If all java versions have their own packages on the AUR
If you can change envvars in a launch script and be sure that all processes of the application will persist your settings
Then why THE FUCK do package maintainers keep announcing to change the default java version to install their package, rather than explicitly doing that by themselves? Fuck off, do you really think yours is the only package that needs a specific Java version? Do you think each and every user will write their own init script, or edit the PKGBUILD to include the new version as an envvar in the desktop file? This is why Arch has a bad name, and they're fucking right. If you don't have the time to put a single motherfucking diff in the motherfucking pkgbuild to specify the java version in the desktop file, then don't fucking maintain the package. I know there are too few maintainers, but pretending to maintain a package while doing fuckall is much worse than leaving it unmaintained on the AUR so the first person who has time can pick it up.1 -
And here's that app.css single file that my predecessor left for entire project. It's the second work he left a treat for me.
Kill me please.
Btw the code looks like it's been written by a second grade kid...4 -
I just found out you can commit single lines of a file without the necessity to remove temporarily debug lines every time ... it has blown my mind.8
-
Last Week Friday:
PM: We'll be taking you off the one project on to another, we'll send the details later.
Me: Cool
*Hours Later*
PM: Ok cool, so you'll be looking at a script that one of our Pillar heads has scripted. You need to make sure it works and that it can run on the server.
Me: *I always thought this guy was useless now i get to see what he can do* Cool, just send the documentation and i'll take a look at it over the weekend. Just tell me when you've sent it.
PM: Cool.
Project Head: I'll inform you when i send the files and how to run them.
Me: *I know how to set up a database locally, i'm not an idiot* Cool.
Whole Weekend I don't get a single message.
Monday Morning:
Project Head(PH): Have you taken a look at it yet?
Me: Taken a look at what?
PH: The Database and the Script
Me: i didn't get any message over the weekend.
PH: I sent it yesterday, it should be in your inbox.
Me: There's Nothing. Sending anything on a Sunday is expecting me not to see it, especially at 10pm. Besides i can't retrieve any of the files in the attachment(Outlook tripping), rather send it in a zip file or upload it to onedrive.
PH sends the link. I get the files, set up the DB, glance at the script.
Me: This is actually interesting.
PH: You know what it does?
Me: My SQL knowledge is below average but i can read and understand it pretty well. So your dynamically copying the database from the server to the warehouse, cool.
It's not going to work though.
PH: Check first.
I check it
Me: Doesn't work, but it sort of works.
PH: What do you mean?
Me: Some tables are populated but some aren't,, how and there's a shit tone of errors.
PH: So i does copy the data over.
Me: Some of the data.
PH: test it on the Server
Me: Not a good idea.
PH: Just try it.
PM: In the mean time i'll send you some documentation i need you to review and edit.
Me: *Idiots* Cool.
Tuesday:
Me: Have you checked it on the server yet?
PH: Not yet, busy.
Me: Where's the documentation again?
PM: I'll send it it a moment.
Me: In the mean time i'll write some script to fix that script that's definitely not going to work.
Wednesday:
Boss: I heard you done with the script
Me: It's not done, but we'll be testing it on the server later.
Boss: Then why are you running it on the server?
Me: Ask the PH and PM.
Boss: What are you doing now?
Me: Well i'm supposed to do documentation *looks at PM* but i haven't recieved any yet, so I've been writing a script to fix the copy script.
PH: Ok we'll test when the boss leaves, after all the meetings.
PM: here's the documentation.
Me: Thanks
I start on documentation.
PH: It didn't work.
Me: I know.
PH: Fix it.
Thursday:
Meeting.
PM: What you doing?
Me: Fixing the script,
PM: Do the documentation first
Me: Cool.
End of the day:
PH: Why you doing the documentation? The script has highest priority.
Me: Ask the PM.
Friday(Today):
Boss: can we talk.
Me: Sure.
Boss: I though you said the script was done?
Me: i said it sort of works, just doesn't do the job 100%.
Boss: Monday i was told it's done.
Me: i only looked through it Monday to understand it, i done nothing before Tuesday. though i have been trying to create a script to fix it.
Boss: Your working really slow hey.
Me: *It's been a week, and stupid people are in charge* I was doing what i was told.
Boss: Cool.(His Upset)
Stupid FUCKEN people, make stupid FUCKEN decisions. But Hey, the boss only see's the final result. I am a human being, even i make mistakes. But there's a huge gap between stupidity and a mistake. -
WHY IS IT SO FUCKIN ABSURDLY HARD TO PUSH BITS/BYTES/ASM ONTO PROCESSOR?
I have bytes that I want ran on the processor. I should:
1. write the bytes to a file
2a. run a single command (starting virtual machine (that installed with no problems (and is somewhat usable out-of-the-box))) that would execute them, OR
2b. run a command that would image those bytes onto (bootable) persistent storage
3b. restart and boot from that storage
But nooo, that's too sensible, too straightforward. Instead I need to write those bytes as a parameter into a c function of "writebytes" or whatever, wrap that function into an actual program, compile the program with gcc, link the program with whatever, whatever the program, build the program, somehow it goes through some NASM/MASM "utilities" too, image the built files into one image, re-image them into hdd image, and WHO THE FUCK KNOWS WHAT ELSE.
I just want... an emulator? probably. something. something which out of the box works in a way that I provide file with bytes, and it just starts executing them in the same way as an empty processor starts executing stuff.
What's so fuckin hard about it? I want the iron here, and I want a byte funnel into that iron, and I want that iron to run the bytes i put into the fuckin funnel.
Fuckin millions of indirection layers. Fuck off. Give me an iron, or a sensible emulation of that iron, and give me the byte funnel, and FUCK THE FUCK AWAY AND LET ME PLAY AROUND.8 -
Was working on my game engines scripting language for the terminal and this is how things went in roughly the space of 30 minutes
"Ok let's get a basic language structure defined..."
*Time passes*
"Ok, so now I have basic structure and concepts of a potential auto translation framework, external library use and just a dash of complicated file structures and use"
And I still haven't written a single line of code except for ignoring whitespace when starting to lex the file to transpiling ;-;2 -
So recently I had an argument with gamers on memory required in a graphics card. The guy suggested 8GB model of.. idk I forgot the model of GPU already, some Nvidia crap.
I argued on that, well why does memory size matter so much? I know that it takes bandwidth to generate and store a frame, and I know how much size and bandwidth that is. It's a fairly simple calculation - you take your horizontal and vertical resolution (e.g. 2560x1080 which I'll go with for the rest of the rant) times the amount of subpixels (so red, green and blue) times the amount of bit depth (i.e. the amount of values you can set the subpixel/color brightness to, usually 8 bits i.e. 0-255).
The calculation would thus look like this.
2560*1080*3*8 = the resulting size in bits. You can omit the last 8 to get the size in bytes, but only for an 8-bit display.
The resulting number you get is exactly 8100 KiB or roughly 8MB to store a frame. There is no more to storing a frame than that. Your GPU renders the frame (might need some memory for that but not 1000x the amount of the frame itself, that's ridiculous), stores it into a memory area known as a framebuffer, for the display to eventually actually take it to put it on the screen.
Assuming that the refresh rate for the display is 60Hz, and that you didn't overbuild your graphics card to display a bazillion lost frames for that, you need to display 60 frames a second at 8MB each. Now that is significant. You need 8x60MB/s for that, which is 480MB/s. For higher framerate (that's hopefully coupled with a display capable of driving that) you need higher bandwidth, and for higher resolution and/or higher bit depth, you'd need more memory to fit your frame. But it's not a lot, certainly not 8GB of video memory.
Question time for gamers: suppose you run your fancy game from an iGPU in a laptop or whatever, with 8GB of memory in that system you're resorting to running off the filthy iGPU from. Are you actually using all that shared general-purpose RAM for frames and "there's more to it" juicy game data? Where does the rest of the operating system's memory fit in such a case? Ahhh.. yeah it doesn't. The iGPU magically doesn't use all that 8GB memory you've just told me that the dGPU totally needs.
I compared it to displaying regular frames, yes. After all that's what a game mostly is, a lot of potentially rapidly changing frames. I took the entire bandwidth and size of any unique frame into account, whereas the display of regular system tasks *could* potentially get away with less, since most of the frame is unchanging most of the time. I did not make that assumption. And rapidly changing frames is also why the bitrate on e.g. screen recordings matters so much. Lower bitrate means that you will be compromising quality in rapidly changing scenes. I've been bit by that before. For those cases it's better to have a huge source file recorded at a bitrate that allows for all these rapidly changing frames, then reduce the final size in post-processing.
I've even proven that driving a 2560x1080 display doesn't take oodles of memory because I actually set the timings for such a display in order for a Raspberry Pi to be able to drive it at that resolution. Conveniently the memory split for the overall system and the GPU respectively is also tunable, and the total shared memory is a relatively meager 1GB. I used to set it at 256MB because just like the aforementioned gamers, I thought that a display would require that much memory. After running into issues that were driver-related (seems like the VideoCore driver in Raspbian buster is kinda fuckulated atm, while it works fine in stretch) I ended up tweaking that a bit, to see what ended up working. 64MB memory to drive a 2560x1080 display? You got it! Because a single frame is only 8MB in size, and 64MB of video memory can easily fit that and a few spares just in case.
I must've sucked all that data out of my ass though, I've only seen people build GPU's out of discrete components and went down to the realms of manually setting display timings.
Interesting build log / documentary style video on building a GPU on your own: https://youtube.com/watch/...
Have fun!20 -
86 lines of code...duplicated 3 times in the same file...and only a single integer constant is different. This is the shit that makes my day to day work tedious.
Im glad I dont personally know the previous dev, he would get his throat punched...though calling him a dev is more of a compliment than he deserves.2 -
After my previous rant (https://devrant.com/rants/3836329) I wondered what it would take to build a very basic web browser. So I went ahead and wrote (read: kanged) one. You can find its source code at https://git.ghnou.su/ghnou/browser. The code is a single file and is 57 lines long, 29 if you disregard the copyright notice.
This is obviously satire, but it goes to show how easy it can be. Of course people would just import a library if they could. All the hard work has already been done after all.8 -
Python haters, gather 'round
oh come on... In java it's all simple as 123. You build an app, you have like 200 dependencies, you pack it all in a single fat jar and only deploy that single .jar. Don't need no internet, no installs, no pip, no nothing: just your .jar file and the JVM.
So java:
- build an app
- use 200+ deps
- build your whole project into a single fat jar
- deploy your jar in the env
- install [*khem khem* scp into the server] jre
- run
Now let's look at py, shall we?
- build an app
- use 1 dep
- deploy all the 20 .py files in the env
- make sure you have internet access
- install python
- install pip
- pip install <my dependency>
- run your app15 -
Look, I worked in companies that didnt givr a single f about security, and it wasn't right, but others go are just mad.
Me to itsec: can I deploy Django behind the company firewall on a machine physically 2 meters from you, users will still need the VPN to access it... ?
Itsec: no!
Me: flask?
Itsec: no!
Me: shiny?
Itsec: no!
Me: CAN I EVEN HOST ONE HTML FILE WITH INLINE CSS?
itsec: can I see your badge?! -
So recently I installed Windows 7 on my thiccpad to get Hyperdimension Neptunia to run (yes 50GB wasted just to run a game)... And boy did I love the experience.
ThinkPads are business hardware, remember that. And it's been booting Debian rock solid since.. pretty much forever. There are no hardware issues here. Just saying.
With that out of the way I flashed Windows 7 Ultimate on a USB stick and attempted to boot it... Oh yay, first hurdle to overcome. It can't boot in UEFI mode. Move on Debian, you too shall boot in BIOS mode now! But okay, whatever right. So I set it to BIOS mode and shuffled Debian's partitions around a bit to be left with 3 partitions where Windows could stick in one more.
Installed, it asks for activation. Now my ThinkPad comes with a Windows 7 Pro license key, so fuck it let's just use that and Windows will be able to disable the features that are only available for Ultimate users, right? How convenient would that be, to have one ISO for all the half a dozen editions that each Windows release has? And have the system just disable (or since we're in the installer anyway, not install them in the first place) features depending on what key you used? Haha no, this is Microsoft! Developers developers developers DEVELOPERS!!! Oh and Zune, if anyone remembers that clusterfuck. Crackhead Microsoft.
But okay whatever, no activation then and I'll just fetch Windows Loader from my webserver afterwards to keygen my way through. Too bad you didn't accept that key Microsoft! Wouldn't that have been nice.
So finally booted into the installed system now, and behold finally we find something nice! Apparently Windows 7 Enterprise and Ultimate offer a native NFS driver. That's awesome! That way I don't have to adjust my file server at all. Just some fuckery with registry keys to get the UID and GID correct, but I'll forgive it for that. It's not exactly "native" to Windows after all. The fact that it even has a built-in driver for it is something I found pretty neat already.
Fast-forward a few hours and it's time to Re Boot.. drivers from Lenovo that required reboots and whatnot. Fire the system back up, and low and behold the network drive doesn't mount anymore. I've read that this is apparently due to Windows (not always but often) mounting the network drive before the network comes up. Absolutely brilliant! Move out shitstaind, have you seen this beauty of an init Mr. Poet?
But fuck it we can mount that manually after every single boot.. you know, convenient like that. C O P E.
With it now manually mounted, let's watch a movie! I've recently seen Pyro's review on The Platform and I absolutely loved it. The movie itself is quite good too. Open the directory on my file server and.. oh. Windows.. you just put db.thumb on it and db.thumb:encryptable. I shit you not, with the colon and everything. I thought that file names couldn't contain colons Windows! I thought that was illegal in NTFS. Why you doing this in NFS mate? And "encryptable", am I already infected with ransomware??? If it wasn't for the fact that that could also be disabled with something as easy as a registry key, I would've thought I contracted ransomware!
Oh and sound to go with that video, let's pair up some Bluetooth headphones with that Bluetooth driver I installed earlier! Except.. haha nope. Apparently you don't get that either.
Right so let's just navigate the system in its Aero glory... Gonna need to flick the mouse for that. Except it's excruciatingly slow, even the fastest speed is slower than what I'm used to on Linux.. and it's jerky as hell (Linux doesn't have any of that at higher speed). But hey it can compensate for that! Except that slows down the mouse even more. And occasionally the mouse driver gets fucked up too. Wanna scroll on Telegram messages in a chat where you're admin? Well fuck you mate, let me select all these messages for you and auto scroll at supersonic speeds! And God forbid that you press delete with that admin access of yours. Oh maybe I'll do it for you, helpful OS I am!
And the most saddening part of it all? I'd argue that Windows 7 is the best operating system that Microsoft ever released. Yeah. That's the best they could come up with. But at least it plays le games!10 -
<insert obligatory "long time lurker" statement here>
Started a role about 6 months ago. I'm the sole IT programmer. A bit of the mess I inherited...
- 100+ stand-alone applications/tools (luckily most of them aren't too big).
- No documentation.
- Some applications' only copy of the code exists in production.
- We only have production.
- A single file consisting of 30K+ lines of VB. Little to no comments. The one comment at the top says to keep old code by commenting it out and state what you changed.
- Previous devs didn't like foreign keys.
- No. Fucking. Version. Control. At. All.
- And so much more...
Luckily I was hired due to my experience so I could fix all these problems. Its actually a really great job.7 -
Two days ago I wrote the deployment instructions. 5 lines. I sent them to the devops four days before the release (two days before usual).
A colleague of mine leashed out and had me send another message to say to ignore my instructions because they "generated too much entropy" he is releasing too his application and we should create a single instruction file. Okay, I see no reason to do that nor how that helps the devops. A longer file is not easier to understand than a smaller one.
Today the devops deploy our application. They make a backup of the new files and promptly overwrite the original copies with the files from production.
I lost 3 hours today. My colleague is refusing to communicate the error properly to the devops and I have a meeting in 20 minutes. I love my job.3 -
Just gonna leave this here because I am too lazy to write a proper article for my website:
If anyone is trying to create a Vue.js website with Node.js backend do NOT use express-vue, it is unnecessarily complicated and broken. Instead use this method I found.
You will need:
- IntelliJ IDEA / WebStorm / other IDE supporting multiple modules per project and tasks
- Nodejs and npm
- vue-cli
Step by step:
1. Create new empty project
2. Add your frontend module using vue-cli generator
3. Add your backend module using Express generator
4. Run npm build in your frontend module once
5. Move or remove public folder in your backend module
6. Create a symlink from your backend module root called public pointing to dist folder in your frontend module root
7. Make sure to add "Run npm build" from frontend module to your "bin/www" task (default task for Express module)
8. Enjoy developing your REST API in Node/Express and your frontend in Vue.js with single-file components and it being served by the same server that is providing the backend.
(Since they are separate modules and you are not mixing webpack and Node/Express you can add ts-loader, stylus-loader, pug-loader or any other loaders without screwing anything up)
For deployment you just need to copy the contents of dist into public on the server. (and not upload the symlink)6 -
Why did you guys post a photo of your monitor instead of screenshot?
That annoys me every single time. Even if your PC is not connected to online to upload the screenshot, there still is Bluetooth and other means to send a file to your phone in less than few minutes.3 -
String.replace and String.replaceAll in Java. Doubly anti-intuitive naming... First it makes you think replace will replace a single instance in the string but aCtUaLlY replace is replaceAllByExactMatch and replaceAll is replaceAllByRegexMatch.
Just as bad are C's fwrite and fseek which have the target FILE* in opposite ends of the parameter list2 -
5000 scss file with the name global.scss styling.
How fucking dumb can you be to fucking mess up a clean component based architecture like Foundation or Bootstrap and fill it with shit in a single file.
No wonder WP gets shit. The legacy code is usually shit.
And to put the shit cherry on top. This motherfucker had a settings.scss file with all general components and he never used it.
Fucker put different font size in px everywhere! Fucking asshole!!! -
I hate having to deal with our IT service desk. Every time it takes enormous energy to get to the right people and make them understand that no, you are not an idiot, but you actually have a technical issue.
Sure thing they do have a few competent nice folks there too I've gotten to know over time and they indeed have to deal with a ton of dumb non-tech savvy idiots on a daily basis. However, if my job title mentions "software" and "engineer" they should at least assume I'm an idiot in tech. Or something. Every single time I need to open a ticket, even for the simplest "add x to env y", I need to quadruple check that the subject line is moron-friendly because otherwise they would take every chance to respond "nah we can't do that", "that's not us", or "sry that's not allowed". And then I would need to respond, "yes you do:) your slightly more competent colleague just did this for us 2 weeks ago".
Now you might imagine this is on even another level when the problem is complex.
One of our internal apps has been failing because one of the internal APIs managed by a service desk team responds a 500 status code randomly but only when called with a specific internal account managed by another service desk team.
(when I say "managed by", that doesn't mean they maintain it, it just mean they are the only ones who would have access to change something)
Yesterday I spent over a fucking hour writing a super precise essay detailing the issue, proving a million times it's not on our end and that they need to fix it. Now here is an insight to what beautiful "IT service" our service desk provides:
1) ticket gets assigned to a "Connectivity Engineer" lady
2) few hours later she responds and asks me to give her the app and environment IDs and grant her access to those
(naturally everything in my email was ignored including these two IDs)
3) since the app needs to be in prod for the issue, I make a copy isolating the failing part and grant her access to the original "for reference" and the copy to play with
4) few hours later I get an email from the env that some guy called P made changes to the actual app, no changes to the copy
(maybe they immediately fixed the app even though I asked them to only touch the copy)
I also check the env and the live app had been shared with another 2 people giving them editing rights:)
5) another few hours pass and the lady responds that she had been chatting with P (no mention of who tf that guy is) and that P has a suggestion that might work and I should test it, "please see screen shot" for details:
These motherfuckers sent me a fucking screenshot of the env config file where "P has edited a few parameters" that might help. The screenshot had a 16 line part of the config json with a bunch of IDs and Base64 params which HE EDITED LOCALLY.
Again, because I needed a few iterations to realise what I've just witnessed:
These idiots modified some things in the main app (not the copy) for hours. Then came to the conclusion that the config needs some IDs and params updated. They downloaded the config json. Edited it locally. Did not fucking upload it back to the main or test app. Did not test it live. Did not CC in or direct the guy with changes to me. Did not send me the modified config file. Did not even paste the new IDs into the email. But TOOK A FUCKING SCREENSHOT OF THE MODIFIED FILE AND SENT THAT SHIT TO ME. And then had the audacity to ask me to test it when they had access to it and that's literally their fucking job.
I had to compare the fucking screenshot to the live config file and manually type in the changes.
And no, it still doesn't work. And Now I have to get back to them showing it still fails the same way but I just can't deal with these people. Fuck. Was hoping by the time I write it all down it'd be better, and it does feel a bit better, but I still need to get this app fixed. And I can only do it through these... monkeys. I just can't. Talking to these people drains my life energy... I'm just sad. -
I'm the lead dev on this team. The project is split into multiple separate modules to comply with separation of concerns, and so new devs don't need the whole fucking codebase (risking them running away with everything) to contribute to the project as a whole.
So we don't need a fucking config file to enable and disable features.
So we don't need to upload a 500mb monolith every time we want to test a change.
So we can test old fucking versions of modules without merging it back into the entire codebase.
What did this fucking dev do? He was having one small issue with Maven. One. It wasn't updating his local snapshots to the correct Artifactory version.
He decided, instead of trying to fucking fix it: HEY, LETS IGNORE THE LEAD DEV'S DEMAND TO KEEP THEM SEPARATE. IM GOING TO MERGE THEM INTO ONE MODULE FOR SOME FUCKING REASON.
I refuse to continue working with this dev if he's going to sidestep my demands and undermine my authority. He wants to go it alone? Be my fucking guest. I'm not touching his shitty single-codebase monolithic monstrosity.
If this is going to be a regular fucking occurrence, he can eat a dick and choke on it.2 -
I've seen lots of other ranters complain about huge code files... I just came across 27k Javascript extension for a software like Postman ...
First I thought cool I can work on it since it's JS, then 27k of lines later: I think I'll go sleep .-. -
Not sure if it's the worst code review but it's a recent one.
We don't really do code reviews where I work unfortunately but my coworker used my framework for the first time (build some nice composer libraries for cmdline projects) and asked if I could make them do autoloading.
He never used namespaces before so I was glad to help him out.
What I saw was a dreadful mess. His project was called "scripts" so good luck picking a namespace...
Than it was all lose functions in the executable file. All those functions are however called by a class in another file (if they where not calling eachother as a cascading mess). That class was extending an abstract class from my library as instructed. However I never imagined my lib being raped like that.
The functions themselves are a horrible mess. Nothing uniform completely different style (our documentation states PSR's should be used).
Parameters counts higher than 5.
Variable names like Object and Dobject (in calling function Dobject is Object but it needs a fresh one.
If statements on parameters that need basically split it in two (should simply be to functions)
If else statement with return of same variable as a single line (sane people use ternary for that)
Note that I said functions. All of it should have been OO and methods. Would have saved at least some of the parameter hell.
I could go on and on. Do I think the programmer is bad yes (does not even grasp interfaces, dep injection, foreach loops). Is this his best work no. He said that for a one of script like this it just has to work. Not going to be used elsewhere. I disagree as it is a few thousand lines of code that others have to read too.2 -
Affinity Designer export to SVG, normally an easy task for a vector programme.
Furthermore it is only a little picture, a clear eight filled with a single colour.
Result: SVG with an unbelievable file size of 98.7 kB. Holy shit!
Looked at it: The export made a huge long high scaled path... oh man...
Little hand made recoding, made four circles. Done. New size: 0.8 kB.
That's better.4 -
my fist job... i get to edit a c++ code written by a (mind you) programming company that they teamed with for the past(mind you again) 3 years ...
now just for starters, this code was edited by self taught coders that are really good engineers(they are really good), that didnt really know how the code worked before yet they still changed it, and it worked, how ever they wanted some changes.
i get the project files, and there is not one single comment describing what is happening... only code commented out... and no documentation what so ever were done....
so below are some of my comments that i wrote after i finished adding what i had to add, and fixing what i had to fix:
/*first rule of C anything coding, no actual functions in the header, well let me introduce you to a fully functioning thread running program all in the header, enjoy*/
//used to control the thread
// i honestly dont know why, but it worked soooooo yea...
// TG uncommented // for absolutely no reason what so ever...
//used to communicate with the port
//the message to be sent to the inverter, which has a code that will handle it
//hmmmmmm...
//again not usefull since we are using radioButtons
// same ...
// same ...
// same ...
// they said they dont even use this mode, but none the less, same ...
// calculate the checksum for the message
// ....
// one of the things that work, and god forbids i touch
// used for the status displayed on screen
// used for the (censored :P) status in the message
// used for the (censored :P) status in the message
// not used at all, but the message structure contains it and i refuse to edit that abomination
// used for the (censored :P) status in the message
// used for the (censored :P) status in the message
// just dont ask and roll with it, i didnt want to touch this
// saaaaame ...
// if before true this saaaaaame ...
// value of the (censored :P)
// it pains me to say it again, but this is no use
// (censored :P) input
// (censored :P) input
// only place seen , like for real it was just defined,sooooo yea :D
// well you know how it is
// message string
// check sum string
/****below from feed back****/
// (censored :P) coming in
// (censored :P) coming in
// (censored :P) coming in
// (censored :P)
/****below is the output to the receiver ****/
//(censored :P)
// (censored :P)
// (censored :P)
// (censored :P)
//you thought we were done.... nope, no idea. it comes in the feedback
// not used, literally commented out the one time it was used
// same ...
// XD, man this is a blast, same ...
// nope ...
// used to store the port chosen for the communication
// is a static for the number of data we have recorded so far, and as a row indicator for the recording method
// used to indicate the page we are on in the excel file, as well as the point in physical point in the test
// same ... oh look at this a positive same :D
// same ...
// same ...6 -
I'm still studying computer science/programming, I still have one year to do in order to graduate (Master). I am in a work study program so I'm working for a company half of the time, and I'm studying the other half. It is important to mention that I am the only web developer of the company
When I arrived in the company 9 months ago, I was given a Vue project which had been developed by a trainee a few weeks before my arrival and I was asked to correct a few things, it was mostly about css. Then, I was ask to add a few functionalities, nothing really hard to code, and we were supposed to test the solution in a staging environment, and if everything was ok, deploy it to prod.
However, the more I did what I was asked, the more functionalities I had to implement, until I reached a point where I had to modify the API, create new routes, etc. I'm not complaining about that, that's my job and I like it. But the solution was supposed to be ready when I arrived, it was also supposed to be tested and deployed.
The problem is, the person emitting these demands (let's call him guy X) is not from the IT service, it's a future user of the website in the admin side. The demands kept going and going and going because, according to him, the solution was not in a good enough state to be deployed, it missed too many (un)necessary features. It kept going for a few months.
The best is yet to come though : guy X was obviously a superior, and HIS superior started putting pressure on me through mails, saying the app was already supposed to be in production and he was implying that I wasn't working fast enough. Luckily, my IT supervisor was aware of what was going on and knew I obviously wasn't to blame.
In the end, the solution was eagerly deployed in production, didn't go through the staging environment and was opened to the users. Now, guy X receives complaints because none of what I did was tested (it was by me, but I wasn't going to test every single little thing because I didn't have time). Some users couldn't connect or use this or that feature and I am literally drowning in mails, all from guy X, asking me to correct things because users are blocked and it's time consuming for him to do some of the things the website was doing manually.
We are here now just because things have been done in a rush, I'm still working on it and trying to fix prod problems and it's pissing me off because we HAVE a staging environment that was supposed to prevent me from working against the clock.
On a final note, what's funny is that the code I'm modifying, the pre-existing one needs to be refactored because bits and pieces are repeated sometimes 5 times where it should have been externalized and imported from another file. But I don't know when and if I will ever be able to do that.
I could have given more context but it's 4am and I'm kinda tired, sorry if I'm not clear or anything. That's my first rant -
Any individual project that made me learn cool stuff...
Maybe the kernelcheck project? It's a shell script that I wrote 2 years ago (it's still on my GitHub but the code looks kinda horrible tbh), and it really made me respect the stability of package managers, and the effort that package maintainers must put into it. Even a single package (the kernel) that you have to maintain the integrity of the .config for (the configuration file that tells you what options to compile in, as a module, or not at all) while on every new minor release, the config changes ever so slightly.. at some point I figured that I'd really need to do those compilations manually, to be able to supervise (and if necessary adjust) it in real-time. The ability for distribution maintainers to do this for thousands of packages.. it boggles my mind. Respect! -
TL;DR Calendar services sucks.
Imagine yourself as startup. You don't want to spend fortune on paying $5 per user per month for Google Services. Also you don't want to pay that to Microsoft for O365. You want to run it itself because you already have droplet running with your other services (ERP for example. Funny story too btw.) Ok, decision has been made, let install something.
I have pretty good experience with OwnCloud from past as Cloud file sharing service. Calendar is not bad for single user purpose (understand it as personal calendar, no invitations to others, sharing is maximum I tried) What can possibly go wrong when I deploy that and use its Calendar?
Well, lot. OwnCloud itself runs well (no rant here) but Calendar is such pain in ass. Trouble is with CalDav under hood and its fragmented standards. So, you want to send invitation to your team for recurrent meeting. Nothing weird. It sends as one invitation to each one, good. Now you realize you have a conflict, so you need to change time of one occurence. Move it, send update. And here comes shitstorm. It is not able to bisect one occurence from series. So it splits it to separate events and send invitation for every single one. 30 INVITATIONS IN 2 SECONDS! Holy sh*t! You want to revert that. Nope, won't do. So you accept your destiny and manually erase every single one with memo in head about planning recurring events.
Another funny issue is when SwiftMailer library (which is responsive for sending e-mails from OwnCloud) goes to spamming mayhem. It is pretty easy to do. When e-mail doesn't comply to RFC, it is rejected, right? So if because of some error CalDav client passes non-compliant e-mail (space as last character is non-compliant btw) and SwiftMailer tries to send it to multiple recepients (one of them is broken, rest is fine), it results in repetitive sending same invitation over and over in 30 minute interval. Sweet.
So now I am sitting in front of browser, looking for alternatives. Not much to choose from. I guess I'll try SOGO. It looks nice. For now.5 -
When four issues get assigned to four different developers and the analysis and the proposed fix for each is a change to a single class file that has been locked by a fifth developer.1
-
I am a Technical Lead in the department in my company that writes code for our clients that have money but doesn't have the technical expertise to handle the complexities of our own software.
Part of my tasks involve taking care of a few projects written by employees that have left after using third-party tools rather than using our own software. No one else in this department knows these third-party tools, they only know our own, and my *still limited* web development experience means I get dumped these things in my lap.
And I'm SO pissed at these projects and their authors and the manager that let these ex-employees write these things. There is this one project that was managed by two different "developers" (I don't know they deserve this title) at two different times, and it is so riddled with different technologies it makes me want to throw up almost daily.
Don't believe me? Here is a complete list of the dependencies listed in the package.json of this project: babel-polyfill, body-parser, cookie-parser, debug, edge, edge-sql, excel-to-json, exceljs, express, html-inline, jade, morgan, mssql, mysql, pug, ramda, request, rotating-file-stream, serve-favicon, webpack, xlsx, xml2js
What this doesn't even show, is that one part of this project (literally one page) is made using react, react-dom, react-redux, and jade. The other part (again literally one page) is made using Angular and Pug. In case you missed it while picking up your jaw, there's also mssql, mysql, edge and edge-sql. excel-to-json, exceljs, xlsx.
Oh you want *more* juicy details? This project takes the entire data object used by the front-end, stringifies it into JSON, and shoves it into the database *as a single field*. And instead of doing WHERE clauses in the SQL queries, it grabs the entire table, loops, parses the json, and does a condition on it. If even one of those JSON entries gets corrupted, the entire solution breaks because these "developers" don't know what try/catch is.
The client asked for a very simple change in their app, which was to add a button that queries the back-end for a URL, shows it in a modal dialog, after which a button is clicked to verify the link by doing a second query to the back-end before modifying a couple of fields in the page.
This. Took. Me. Two. Months*. Save me. Please, save me.
*between constant context switches between this and other projects that were continuously failing because of their mistakes.4 -
I love git stash.
It's helps a lot for doing refactors to me. I guess it's not the most complex workflow, but it wasn't obvious to me when I started with git. Let me explain.
Refactors. As you start writing the first lines of a refactor, you start to notice something: you're changing too many things, your next commit is going to be huge.
That tends to be the very nature of refactors, they usually affect different parts of code.
So, there you are, with a shitload changes, and you figure "hey, I have a better idea, let me first do a smaller cohesive commit (let's call it subcommit) that changes a smaller specific thing, and then I'll continue with the upper parts of the refactor".
Good idea, but you have a shitload of changes nearly touching every file in your working copy, what do you do with these changes? You git stash them.
Let's say you stash and try to do that smaller "subcommit". What sometimes happens to me at this point is that I notice that I could do an even smaller change inside this current "subcommit". So I do the same thing, I git stash and I work on that even smaller thing.
At some point I end up `git stash pop`ing up all these levels. And it it shows that git stash is powerful for this.
* You never lose a single bit of work you did.
* Every commit is clean.
* After every commit you can run tests (automated or manual) to see shit is still working.
* If you don't like some changes that you had git stashed, you can just erase them with git reset --hard.
* If a change overlaps between a stash you're applying and the last "subcommit", then
if they differ, git shows conflicts on the files,
if they are identical, nothing happens.
with this workflow things just flow and you don't need to wipe out all your changes when doing simpler things,
and you don't need to go around creating new branches with temp commits (which results in bloated temp commits and the work of switching branches).
After you finish the refactor, you can decide to squash things with git rebase.
(Note: I don't use git stash pop, because it annoys the fuck out of me when I pop and you I get conflicts, I rather apply and drop)4 -
I'm considering quitting a job I started a few weeks ago. I'll probably try to find other work first I suppose.
I'm UK based and this is the 6th programming/DevOps role I've had and I've never seen a team that is so utterly opposed to change. This is the largest company I've worked for in a full time capacity so someone please tell me if I'm going to see the same things at other companies of similar sizes (1000 employees). Or even tell me if I'm just being too opinionated and that I simply have different priorities than others I'm working with. The only upside so far is that at least 90% of the people I've been speaking to are very friendly and aren't outwardly toxic.
My first week, I explained during the daily stand up how I had been updating the readmes of a couple of code bases as I set them up locally, updated docker files to fix a few issues, made missing env files, and I didn't mention that I had also started a soon to be very long list of major problems in the code bases. 30 minutes later I get a call from the team lead saying he'd had complaints from another dev about the changes I'd spoke about making to their work. I was told to stash my changes for a few weeks at least and not to bother committing them.
Since then I've found out that even if I had wanted to, I wouldn't have been allowed to merge in my changes. Sprints are 2 weeks long, and are planned several sprints ahead. Trying to get any tickets planned in so far has been a brick wall, and it's clear management only cares about features.
Weirdly enough but not unsurprisingly I've heard loads of complaints about the slow turn around of the dev team to get out anything, be it bug fixes or features. It's weird because when I pointed out that there's currently no centralised logging or an error management platform like bugsnag, there was zero interest. I wrote a 4 page report on the benefits and how it would help the dev team to get away from fire fighting and these hidden issues they keep running into. But I was told that it would have to be planned for next year's work, as this year everything is already planned and there's no space in the budget for the roughly $20 a month a standard bugsnag plan would take.
The reason I even had time to write up such a report is because I get given work that takes 30 minutes and I'm seemingly expected to take several days to do it. I tried asking for more work at the start but I could tell the lead was busy and was frankly just annoyed that he was having to find me work within the narrow confines of what's planned for the sprint.
So I tried to keep busy with a load of code reviews and writing reports on road mapping out how we could improve various things. It's still not much to do though. And hey when I brought up actually implementing psr12 coding standards, there currently aren't any standards and the code bases even use a mix of spaces and tab indentation in the same file, I seemingly got a positive impression at the only senior developer meeting I've been to so far. However when I wrote up a confluence doc on setting up psr12 code sniffing in the various IDEs everyone uses, and mentioned it in a daily stand up, I once again got kickback and a talking to.
It's pretty clear that they'd like me to sit down, do my assigned work, and otherwise try to look busy. While continuing with their terrible practices.
After today I think I'll have to stop trying to do code reviews too as it's clear they don't actually want code to be reviewed. A junior dev who only started writing code last year had written probably the single worst pull request I've ever seen. However it's still a perfectly reasonable thing, they're junior and that's what code reviews are for. So I went through file by file and gently suggested a cleaner or safer way to achieve things, or in a couple of the worst cases I suggested that they bring up a refactor ticket to be made as the code base was trapping them in shocking practices. I'm talking html in strings being concatenated in a class. Database migrations that use hard coded IDs from production data. Database queries that again quote arbitrary production IDs. A mix of tabs and spaces in the same file. Indentation being way off. Etc, the list goes on.
Well of course I get massive kickback from that too, not just from the team lead who they complained to but the junior was incredibly rude and basically told me to shut up because this was how it was done in this code base. For the last 2 days it's been a bit of a back and forth of me at least trying to get the guy to fix the formatting issues, and my lead has messaged me multiple times asking if it can go through code review to QA yet. I don't know why they even bother with code reviews at this point.18 -
Node: The most passive aggressive language I've had the displeasure of programming in.
Reference an undefined variable in a module? Prepare to waste your time hunting for it, because the runtime won't tell you about it until you reference a property or method on the quietly undefined module object.
Think you know how promises work? As a hiring manager, I've found that less than 5% of otherwise well-experienced devs are out of the Dunning Kruger danger zone.
Async causes edge cases and extra dev effort that add to the effort required to make a quality product.
Got a bug in one of your modules? Prepare yourself for some downtime because a single misplaced parentheses can take out the entire Node process, killing unrelated pages and even static file hosting.
All this makes for a programming experience that demands much higher cognitive load, creates more categories of bugs, and leads to code bloat/smell much more quickly than other commonly substituted languages.
From a business perspective, the money you save on scaling (assuming your app is more compute efficient under Node) is wasted on salaries and opportunity costs stemming from longer dev time, more QA, and more frequent outages.
IMO, Node is an awesome experiment, a fun language, a great tool for specific use cases, and a terrible fucking choice for an entire website.8 -
If you're the sort of person to go and willy-nilly modify the service's master configuration file, instead of creating a custom include file, I am going to find you, and strangle you.
Seriously, is it so much to ask to be able to take a single look at service's files and be able to tell, if it includes anything custom?! -
So been working with Linux for almost 10 years now, so am not new with this. But yesterday, a friend had difficulties accessing Wikipedia and their sister sites so I tried to help him out, you know, the usual way. Ping, Direct IP, DNS, and proxies/VPN, checking his /etc/hosts, but to no avail. Decided to download TeamViewer and install it so that I can help him out remotely. Went afk for 30min for dinner and when I came back, TeamViewer installation .Deb installer literally uninstalled every single software from my Kubuntu machine, from Spotify and slowly even my file manager and terminal was uninstalled. When it was over, even my grub was uninstalled.
Had anyone faced the same issue before?8 -
The IT at my current work designed infra as such :
One repo for ALL the configs for every project and one config file per project that defines the version of the language (ex node 6) for all environment of a project. I don't even want to talk about deploying previous version or what happen when you update the version and AWS spawns new instances.
Jump into chatops hype approach and use one single script to deploy every app. Talk about a single point of failure but hey we use slack now it's great no?
Since I always think we are one character away from bad deployment and I'm into one click deployment then I've made a web app just to generate command and copy it or send it to slack.
I guess this is what happens when IT work for themselves only..2 -
So, the Network I was on was blocking every single VPN site that I could find so I could not download proton onto my computer without using some sketchy third-party site, so, being left with no options and a tiny phone data plan, I used the one possible remaining option, an online Android emulator. In the emulator running at like 180p I once again navigated to proton VPN, downloaded the windows version, and uploaded it to Firefox send. Opened send on my computer, downloaded the file, installed it, and realized my error, I need access to the VPN site to log in.
In a panic, I went to my phone ready to use what little was left of data plan for security, and was met with no signal indoors. Fuck. New plan. I found a Xfinity wifi thing, and although connecting to a public network freaked me out, I desided to go for it because fuck it. I selected the one hour free pass, logged in, and it said I already used it, what? When?, So I created a new account, logged in, logged into proton, and disconnected, and finally, I was safe.
Fuck the wifi provider for discouraging a right to a private internet and fuck the owner for allowing it. I realize how bad it was to enter my proton account over Xfinity wifi, but I was desperate and desperate times call for desperate means. I have now changed my password and have 2fa enabled.1 -
//First rant
So I've been working trying to get a file exporter for a binary file format mostly reverse engineered - 2001 Super Monkey Ball 2 (GameCube) if anyone's interested.
Everything works fine, goals show up in the right places, wormholes work as intended, etc. That is everything, except every single level you create will be invisible, or crash (Depending on which version of Dolphin emu you use).
This happens whenever trying to specify object names for 3D objects. I checked, all the many offsets seem correct, Object names are correct. Tried both null terminated strings and fixed 80 character strings - nothing.
Some other guy also made an exporter that works, however the code is an absolute mess - basically unreadable. It also lacks some newer parts of the file spec, which is the main reason as to why I'm rewriting it.
And as I'm working with an almost entirely unheard of file format, there are few people to go to for help. The 2 I know who are also familiar with the LZ file format have no idea either...
Sigh.1 -
Trust Google. Trust the Process.
The Android Studio Installer doesn't show download progress bars, speeds, ETAs or the size of files being downloaded. I hate this design. Tell me exactly what, why, and where is being downloaded so that I can download it myself with a better HTTP large file client, put it where you want it, and restart the installer. I know my machine and ISP and Google does not. I don't trust Google to make a single right decision, and I only want to relinquish control when I don't have time to do something myself.7 -
Renaming a file is just too difficult for this piece of shit software.
Fixing bugs? Fuck no.
Fixing crashes? Fuck no.
Fixing the unnavigable IDE settings? Fuck no.
The IntelliJ platform is a bloated piece of shit at every level.
JetBrains cannot produce software that isn't held together by duct tape.
I can't name a single item of software they've ever produced that isn't a bloated piece of shit.
Even if you are prepared to waste a lot of time trying to file a bug report – which they usually just ignore or pretend not to be reproducible – you have to use another in-house heap of shit called YouTrack.
Have you tried using this piece of trash that masquerades as a bug tracker?
These people are fucking clinically insane.
While your IDE becomes unresponsive and crashes without warning, or your keyboard shortcuts just mysteriously stop working in the IDE, or indexing just stops working for no reason, why not check out their TikTok and Twitter accounts?
They've got an excellent PR team that knows how to polish a turd for public consumption, and to make money out of it.14 -
Existing code:
Logger class would block the caller, lock a mutex, call CreateFile(), write a single line to the file, unlock the mutex and return.
Improvement:
Added two logging queues and created a thread that will periodically lock one queue and write it to the disk, around 500 entries at a time, while new entries are being inserted into the other queue. Kinda like a bed pan or urine bottle. While emptying one bottle, the logs go into the other one. Added fatal exception handlers so that the log queues are dumped when the application is crashing. When the exception handler is triggered, logging method does not return so that the application STOPS working to make sure there are no "not logged" activities.7 -
Windows piece of shit mother fucker useless trash.
Why can't I just compile without the dumb ass "Antimalware Service Executable" having to check every single fucking file and eating fucking 4GB ram. God damn it. fiadsfleaf oaiehjf afpo jafj
I start compiling binutils and then the whole thing fucking crashes ad;adsfjhc odshfaj;sdl hfja;odsfh;osa dhif;aosdhfi a;osdihf;skdjnvba; dsjch;soduf;dsao fu;nodjf ;anaod11 -
With the invention of pip every project done with python just fucken angers me. Like mostly nothing fucken works if there is a single .py file in there. You can put your easy-install.sh up your ass if it just ~tries~ to install shit via pip before because IT WONT WORK FUCK THIS SHIT!
STOP USING PYTHON FOR PROJECTS YOU RELEASE PLS CUS SHITS UNREADABLE AND WONT WORK ON MY MACHINE. MAKE ROOM FOR PROJECTS MANAGED BY NPM OR SHIT LIKE THAT WHERE `npm install` ACTUALLY DOES IT'S JOB THANKS I'M ANGRY AF.
WHAT DOES COLLECTING EVEN MEAN AND WHEN IS IT DONE DUDE?!5 -
1. As i was freelancing on upwork some company contacted me and said my CV looks interesting and they gave me a link from their site to download a .rar file with details about their company and dev positions
2. Ok i open the link and the whole site is just blank page with 1 single button: "Download 5.8 mb"
3. Thought to myself: who the fuck has this low quality site of a company, shitty as fuck and as if its built in the 90s. But ok
4. About 2 days later they got banned on upwork and we cant chat anymore. I send this .rar file to virus total and 7 anti virus softwares scanned a trojan + 14 security vendors flagged the rar as malicious malware
Are you FUCKING kidding me? This is the type of bullshit I'm expecting to see in web3 world. Who the FUCK comes on upwork to infect ENGINEERS?? Are you FUCKING KIDDING ME? I'll publish their data right now:
Link:
https://hsatrack.com/files/...
Password: 49-49Zb2
Their site:
https://hsatrack.com/
Honestly if i opened this fucking home page site first i would have smelled a virus miles away. But i just didnt expect a fucking virus AT ALL on UPWORK. Never happened to me before. This is the type of criminal fraud malware shit i expect AND SEE DAILY on WEB3 -- WHO TF DOES IT IN WEB2 IN 2023?? I'LL FUCK THIS CEO'S LIFE UPSIDE DOWN 180 RIGHT NOW2 -
Today i saw someone complaining that you have to edit a config file on ubuntu to change the behaviour of the laptop when you close the lid, which in my opinion is simple enough.
But what triggered me was another argument saying that how it would be if cars will require a mechanics degree to drive them.
Well maybe then there won't be so many fucking idiots on the road blocking the traffic in almost every fucking city bigger than a peanut plantation.
I swear, people believe they deserve to use the best things without a single clue about how they work.5 -
The Zen Of Ripping Off Airtable:
(patterned after The Zen Of Python. For all those shamelessly copying airtables basic functionality)
*Columns can be *reordered* for visual priority and ease of use.
* Rows are purely presentational, and mostly for grouping and formatting.
* Data cells are objects in their own right, so they can control their own rendering, and formatting.
* Columns (as objects) are where linkages and other column specific data are stored.
* Rows (as objects) are where row specific data (full-row formatting) are stored.
* Rows are views or references *into* columns which hold references to the actual data cells
* Tables are meant for managing and structuring *small* amounts of data (less than 10k rows) per table.
* Just as you might do "=A1:A5" to reference a cell range in google or excel, you might do "opt(table1:columnN)" in a column header to create a 'type' for the cells in that column.
* An enumeration is a table with a single column, useful for doing the equivalent of airtables options and tags. You will never be able to decide if it should be stored on a specific column, on a specific table for ease of reuse, or separately where it and its brothers will visually clutter your list of tables. Take a shot if you are here.
* Typing or linking a column should be accomplishable first through a command-driven type language, held in column headers and cells as text.
* Take a shot if you somehow ended up creating any of the following: an FSM, a custom regex parser, a new programming language.
* A good structuring system gives us options or tags (multiple select), selections (single select), and many other datatypes and should be first, programmatically available through a simple command-driven language like how commands are done in datacells in excel or google sheets.
* Columns are a means to organize data cells, and set constraints and formatting on an entire range.
* Row height, can be overridden by the settings of a cell. If a cell overrides the row and column render/graphics settings, then it must be drawn last--drawing over the default grid.
* The header of a column is itself a datacell.
* Columns have no order among themselves. Order is purely presentational, and stored on the table itself.
* The last statement is because this allows us to pluck individual columns out of tables for specialized views.
*Very* fast scrolling on large datasets, with row and cell height variability is complicated. Thinking about it makes me want to drink. You should drink too before you embark on implementing it.
* Wherever possible, don't use a database.
If you're thinking about using a database, see the previous koan.
* If you use a database, expect to pick and choose among column-oriented stores, and json, while factoring for platform support, api support, whether you want your front-end users to be forced to install and setup a full database,
and if not, what file-based .so or .dll database engine is out there that also supports video, audio, images, and custom types.
* For each time you ignore one of these nuggets of wisdom, take a shot, question your sanity, quit halfway, and then write another koan about what you learned.
* If you do not have liquor on hand, for each time you would take a shot, spank yourself on the ass. For those who think this is a reward, for each time you would spank yourself on the ass, instead *don't* spank yourself on the ass.
* Take a sip if you *definitely* wildly misused terms from OOP, MVP, and spreadsheets.5 -
This crazy guy who created SunVox synth released a single C file that contains a long note sequence AND the synth code itself, with echo and shit, no deps other than SDL to output audio, so you basically compile a single C file, and it PLAYS REAL MUSIC
HOOOOOW
https://github.com/pixicoder/PS
https://youtube.com/watch/...22 -
Can we please stop making everything in javascript? Pretty please?
Like, I get it, js makes it easier to find developers and speeds up development, but writing a compiler to run on node? That doesn't make any sense to me. Typescript is taking ~11s to compile a medium-sized project, out of which ~9s are just type-checking (if I disable type-checking it takes ~2s to compile). Even Rust, which is considered to have a slow compiler (because of the borrow checker I assume) takes less time to compile a project of roughly the same size.
This is getting very irritating. If I want to keep type-checking, every single time I make a change on a single file I have to wait 11s before any tests start running. This was heavily affecting my productivity (and sanity), so I decided to disable type-checking and threw out the window 90% of Typescript's advantages.
Why the hell wasn't typescript written in an actually performant language? Just so you could say that typescript is written in itself? I don't get it, I really don't.14 -
Me:
Hey Java, mind letting me compile and run this single class project that prints 'hello world'
Java:
Did you: add a manifest file, configure your classpath properly, ensure that the VM on the system matches the compiled version, make sure all libraries are included in the compilation and ensure the jar is a runable application?
*sweats*8 -
Boss assigned code cleanup to me. We put up eslint and fixed a couple of issues, all nice and cute. Now, he wants me to find any redundant code and remove it (redundant fields in config objects). Sounds doable right?
WRONG!
Because we're writing fucking ExtJS. This abomination that is still called a "web framework" in lieu of its former glory supports no typescript, no code intel, no JSDoc, no nothing. Absolutely heinous and deplorable. Add insult to injury, our code on it is even worse. NO single component reused except from a couple REALLY fucking badly written ones, because every component queries for shit outside its jurisdiction so it's all a dependency spaghetti. Everything else is just copy-paste. Barely anything works as intended anymore in this bloody joke of an app.
I tell him in a meeting, I can prepare an automated solution. Some script or something that runs on a file watcher. All nice and dandy. A weekend and a Monday later, I get tired and do something else to clear up my mind. Show him some progress in that other thing. He's like:
Boss: that's good and all but did you remove *insert misused config that got everywhere during copy paste* like I told you to?
Me: I'm still working on it. I switched cause I got tired a bit with the automation.
Boss: automation?
Me: We were talking about in the meeting. *Explains again*
Boss: That's not what we agreed upon
Mfw I've been rambling uselessly on the meeting about it just for you to put me down and make me remove all that copy pasted GUNK from the melting hot garbage that is our codebase BY HAND? All the 150 occurrences of it? What do you think I am, a fucking robot?2 -
Try to finish some of the projects I've started in 2018. Right now I have a todo list text file, along with multiple written lists (the written ones are more focused on a single project normally).
-Finish the startpage I've been doing off and on for at least a month now. I ended up making a lot of it command based (just need to write the scripts for the commands..). I had a little config menu but I just got tired of it and the text box is autofocus anyways, so I figured I'd make it command focused.
-Nice little root safety script as I call it. I've made very stupid mistakes as root before. I once made a typo and ran "chmod --recursive 644 /" while half asleep. I believe I was trying to run that on the current directory I was in, but as you know, the . and / are right next to each other. Basically the script would see what you're doing and echo "you're about to do x, are you sure that's what you want to do?". Something I know I could knock out in a day, but I've been putting it off for at least a year now.
-Compiling notification. I saw something similar once a few years ago, and it was so fucking cool. I remember it being a Mac, and it had a notification that would basically tell you how many files and shit you had left to compile if you were building something. Kinda want to build something for polybar.
-FUCKING RUBBER DUCK DEBUGGING TO THE EXTREME! This one was inspired by a comment someone made once months ago. Might have been here, or reddit, or in real life, not sure. Basically a big ass fucking rubber duck with LEDs in it that will like glow red if your code wouldn't compile (I think Visual Studio has like an automatic error detecting thing in there?? Maybe something similar if I can figure that out). Honestly not sure how the fuck I'd do this one, but I love the idea and I really want to fucking do it
There's more shit. These are just the main ones I want to attempt sometime in the near future. -
Okay, it's FUCKing rant time.
FUCK single-file *cough* page.tpl.php *cough* drupal-sites
I FUCKing hate sites without any FUCKing structure, where all logic is built into the overall wrapping pageview file.
Spend more FUCKing time than healthy finding this golden nugget.
In a FUCKing 2000+ lines long file, in a FUCKing mix of inline CSS/JS, PHP/SQL and FUCKing exec(); calls.
Definetily the best FUCKing way to destroy a FUCKing lightbox, for people who are not logged in...
- Why would you even do that in the first FUCKing place ?!??! The customer didn't ask for this..
All this FUCKing mess because the previous developer decided to quit, and did not FUCKing care for the next maintainer to come.
Fellow drupal developers will know the struggle.3 -
By Thor (not the god, the dragon), Belial and Thor (the god, this time)...
Just got the sources for the software that runs on the SDR for my project. I think I just found the mother of all legacy code:
The whole behaviour is described in a single, 4000 lines C file. Most of the code is in a giant switch with cases selected from an enumeration with names that don't match their function. All varnames are overly long, yet hopelessly unhelpful. And why three fuck would you use pointer[0].data instead of (*pointer).data or pointer->data like a sane person would !? pointer isn't even an array, so why would you use []?1 -
I refuse to believe that I'm the only person with a text file full of my frequently used scripts in different languages with no particular assortment
Because I find it slightly stupid to rewrite the same thing over again every single damn time7 -
Angular is not fun to work with. The amount of jumping between files to do a thing is tiring. And its documentation fucking sucks.
I guess I'm just used to single file components and Laravel's amazing docs...5 -
I can't recall one single person I can call a mentor, however...
When I first started as a developer I had a senior to work with... I knew close to anything but I was always good at research and learning on my own... But we used an asp.net framework, it was new and there was little to no useful information, only basics... When I asked the senior (let's call him Joe) for help he gave me a quick answer:
Joe: Go to file xx, there's an example of what you need there...
Me: Well, been there and that's great but it doesn't help...
Everytime I was stucked during my first week it was always some sort of the same, so I insisted this time...
Me: so, Joe... I'm really stuck on this one, can you give it a look?
Joe: I know, I've been researching a way to do it for an hour now and can't get it either...
Me: wow! Thanks... But I thought you were an expert on this...
Joe: not really, never used it before. It's as new to me as it is to you! :)
So, that switched me from "this fucking weasel won't help me for shit" to "well, let's help each other"
We became good friends, always challenging each other and from that day on I stopped asking for help, and asking where can I help others...
I had great and greatly bad colleague and seniors. Each one thought me something either what to do or what not to do, how to act or not, how to tackle problems, how to teach...
Everyone I have worked with, worked for or trained is a mentor of mine. Even those I feel like I failed training thought me how to do better next time...
Thank you guys for being grate... Thank you assholes for teaching me how to send a guy go fuck himself! Good luck for those who get stucked with me -
Is it OK to punch a game dev who codes stupid numeric bugs?
So my wife got into Stardew Valley, that admittedly awesome comfort game farming simulator.
She went pretty far in the game, and found some item that was supposed to highly increase the damage she could inflict onto cute little monster thingies.
It didn't work as intended.
Since equipping the piece of shit all her hits did 0 damage. She tossed the item away but the problem persisted. And on and on...
She took to the googles to try and find some explanation, and apparently that is a fairly common bug for mobile devs.
Then she called in the big guns (that is how I'm calling myself in this case, you will see why).
Apparently there is some buggy piece of shitcode somewhere in the game with a numerical insecure routine that overflows the attack modifier. I.e. if it was supposed to increase from 1.990 to 2.010, it actually went all the way down to -0.4.
She was lucky her attacks weren't increasing the monsters' HP.
We found a forum post where some dude said that he managed to edit the game save file and reset the negative-value attack increase modifier variable. Seems easy enough at first, but my wife uses iOS. Nothing is ever so straightforward with apple stuff.
We did get to the save file, she emailed it to me (the file has no extension and no line breaks in it, so we facepalm'd on a couple attempts at editing it directly).
I finally manage to get it into my personal 11-yo laptop... that won't open a single line file that big.
Cue the python terminal. Easy enough to read the file into a string var and search for the buggy XML tag. Edit the value and overwrite into a new file. Send it back to her by email. Figure out how to overwrite the file in iOS.
Some tense moments while the game reloads... and it works!!!! Got some serious hubby goodwill points here.
Srsly, this troubleshoot process is not for technophobes. It is out of reach to pretty much every non-techy user.
And now back to the original question: If I ever manage to find the kid who coded a game-breaking numerically unsafe routine and shipped it as if every test in the planet had waved it bye-bye, can I punch them? Or maybe buy them a beer, let's see how I get to cash that hubby goodwill tonight :)7 -
Decided to change how my game engine asset loading and sorting systems work, giving up on making everything editable JSON files just so it's easier to manage and actually build things.
Currently trying to work out a way to load all of the packages sprites into 1 singular asset bundle and here is the evolution so far...
Revision 1: Compiles a single 328KB PNG into a 24MB file in 190 seconds.
Revision 2: Compiles same image into a 24MB file in 5 seconds.
Revision 3: Compiles into a 16MB image in 4 seconds.
It's not much but it's a start :-D
(Still haven't built a loading system so who knows if it works yet ¯\_(ツ)_/¯)3 -
Sharing a first look at a prototype Web Components library I am working on for "fun"
TL;DR left side is pivot (grouped) table, right side is declarative code for it (Everything except the custom formatting is done declaratively, but has the option to be imperative as well).
====
TL;DR (Too long, did read):
I'm challenging myself to be creative with the cool new things that browsers offer us. Lani so far has a focus on extreme extensibility, abstraction from dependencies, and optional declarative style.
It's also going to be a micro CSS framework, but that's taking the back-seat.
I wanted to highlight my design here with this table, and the code that is written to produce this result.
First, you can see that the <lani-table> element is reading template, data, and layout information from its child elements. Besides the custom highlighting code (Yellow background in the "Tags" column, and green gradient in the "Score" column), everything can be done without opening even a single script tag.
The <lani-data-source> element is rather special. It's an abstraction of any data source, and you, as a developer can add custom data sources and hook up the handlers to your whim (the element itself uses the "type" attribute to choose a handler. In this case, the handler is "download" which simply sends a fetch request to the server once and downloads the result to memory).
Templates are stored in an html file, not string literals (Which I think really fucks the code) and loaded async, then cached into an object (so that the network tab doesn't get crowded, even if we can count on the HTTP cache). This also has the benefit of allowing me to parse the HTML templates once and then caching the parsed result in memory, so templates are never re-parsed from string no matter how many custom elements are created.
Everything is "compiled" into a single, minified .js file that you include on your page.
I know it's nothing extraordinary, but for something that doesn't need to be compiled, transpiled, packaged, shipped, and kissed goodnight, I think it's a really nice design and I hope to continue work on it and improve it over time1 -
Junior Dev: "The man told me I have to use his framework but I don't know shit about it"
Me: "hmmm, since it's something he developed, you should ask him for some documentations or some examples"
Junior Dev: "I did!! That bastard gave me an example but I can't do anything with it. It's just executables, some config file and NO sources"
Me: "well, this sounds odd to me. You're telling me he just sent you executables and not a single source ? There is no .cs file in there?"
-- 2 minutes later --
Junior Dev: "now that I see ... The sources are there ... BUT the damn bastard put them into subfolders ... And there isn't a Solution file ... How could I even ..."
And THAT was the moment my brain collapsed into a black hole, obliterating me from the existence. Or at least that was what I wished for. -
To the guys that develop any form of hybrid applications, is there literally no js templating engine that accepts template files as its base? I could write probably a single file that just returns the template and then all the others request it before templating, but seriously, is there no ready to go solution?5
-
When you have to make a website responsive and you don't have access to the main CSS file, every single line of css you write contains
"!important".9 -
So I created a little script for my mother because otherwise she had to combine 70 spreadsheets manually, I just couldnt sit there and do nothing. So I wrote a simple Python script in like 30 mins, decided that it needed a GUI because in the end it is for my mother. So wrote a GUI and partly learnt PyQt during that in an hour, which was all working fine.
Then I got to the point where I actually had to hand it over to my mother, preferably as an executable so that there is no hassle at all. So found this tool, Pyinstaller which seems to work great. Created an executable with all the dependencies and stuff in a single file, it worked on my win10 machine (because I developed on Linux of course). So I distributed it to her and she immediately gets an error. Of course there is no description and stuff because I made it a simple program, no log files and such. But fortunately she told me that it errorred when she wanted to run it, so I knew it had to be due to the executable.
Turns out she is still using windows 7 at work, which of course is different that windows 10 and here I am at 11pm, installing updates on a fresh windows 7 machine just to create a new build in that environment and make it work on her machine.
Fuck you, windows update. I swore to never see that ugly ass progress bar again, but yet here I am. Send halp.
I am almost just at the point where Im going to teach my mother how to run a python application from the command line because wheels are actually available for all python dependencies (instead of compiling them)!
Are there better python executable creators out there for wincrap?3 -
I just started using a new React component library
https://ant.design
apparently they decided that rather than include all the icons as a separate font file, or dynamically loaded SVG, they would encode every single icon as a SVG in a JS string, and concatenate them all together into a single file.
I feel dirty but I just committed a 2MB javascript payload to the staging server.
Suggestions for a LIGHTWEIGHT React/Typescript component library?1 -
What the fuck is going on with atom in my desktop?!!?!?
Everytime I open it it starts comparing every single file on my pc with my github. It starts using 99% of my memory and fuck is it frustrating. I decided to just learn vim, which is cool, although I still miss managing windows with the mouse, and probably will try VS sometime in the future. I really wanted to like atom but I can't stand how slow it is compared to vim right now, even when the github shit doesn't happen.14 -
IDK man, it took me a while to finally learn iptables and now switch to firewalld? Oh come on. It's not that I'm against learning new things, no. It's just that firewalld looks a bit.. crappy. If I get a server provisioned and run
firewall-cmd --add-port=53/udp --permanent
firewall-cmd --reload
and I get my ssh connection killed that's no good news, no sir! I mean come on, how can I rely on a tool this critical when a single line in its config file can make my machine inaccessible. Even better -- this config file is managed by that tool entirely!!! My commands passed all the tool's checks and they worked, but when I wanted to make those commands permanent and reload state from the config -- the tool starts spitting bile and blood and says "fuck off, it's my server now!"
IDK man.. It's just way too fishy. The good ol' iptables works very well and I'm kicking its retard younger brother out of the server.
shoosh you dirty pig firewalld, shoosh!6 -
Angular 2+, it's just so elaborate, and over the top complicated. On larger projects it easily becomes a mess. I started a new job where I inherited a angular 2+ project, that is terribly made, it's so frustrating. I now use Vue.js 2, and it's just so beautiful, especially single file components :D1
-
I save all my work relate passwords in a single text file on my computer. I always have it open too.
Too many systems, too many password requirements, expires too frequently.1 -
Ugh... some people...
Just left the office early because of the toxic climate. That one infamous collegue is basically unable to communicate without being a narcissistic 5-year-old and was arguing whether we should write a test (I was going to write the test) that would need a single additional branch in the build system.
(The test was for a parser and it should test whether it can handle absolute paths. A simple regression test with a file and an expected output. Because absolute paths are different for every platform and user, the files to be parsed would have to be generated with appropriate paths before the tests were run. Well that would require one single python script and a single line in the script that runs the script and DONE)
Well that guy was unable to focus on his own work and started an argument about whether that test was necessary.
Even though I still think it is necessary, it might have been a reasonable argument if he would have acted more agreeable. But he was saying the feature was useless anyways "everyone will use relative paths only anyways" and "because noone here cares a ratass about maintaining the tests it will all fall on me again" ..
Wtf was this guys problem, I (CAPS) was going to write the stupid test and since when do we not write tests in order to better maintain our product? I get that he worries that the test environment will get more messy, but thats better than having the product code go messy or unfunctional! And c'mon guys, how are absolute paths a redundant feature... -
How hard can it be to refactor this 170 lines file?
- a single “data” variable used to store everything
- arrays inside arrays inside arrays (see prev point)
- operations with a lot of obscure sideEffects
- $data[] = something (which in magic php land means $data.enqueue()
Why is such… biological matter… even allowed to code? Fucker’s pretending they are a senior for four years: how in hell didn’t they learn to code in this timeframe?7 -
When you have to stay awake until 4:30am uploading and importing 134 .sql files split up from a larger single exported file because for some stupid reason MySQL can only handle importing the data at this insane level of incremental push.4
-
Any other language: Hey fuckface, you can't name this variable by a single letter, tf is wrong with you? use some descriptive shit.
Golang: lmao fuck u
I really find it interesting how we use short variable names for items in golang. Kinda makes sense when you think of it. Most of these items come up in short methods for which the mental model lets you know and remember what you are doing, they even make sense when going through the std lib in which that shit is all over the place. YET years of going by other languages has made me squint my eyes a bit in frustration every time I see it.
Say for example that a function is implementing io.Writer. What would you call the method parameter? you could argue that writer would be sensible since it has it in the signature, but what about when the io.Writer in itself is a file or a socket or whatever? writer would be funny or strange? nah fuck it just w, it makes sense, but x wouldn't. I find these points to make sense even if i don't like them.
Would, now, this practice be acceptable in C? you are supposed to write the same modular code with C in which you compose large functionality in separated units of code, yet I am sure this practice of single name variables is something that C engineers dislike greatly.
Are go devs just doing this out of blind love for their preference in languages? and how would this work if mfkers add generics to go(I hope not, Go is simple enough to understand in order to extend functionality through the empty interface, but that is a preference of mine as well)
The more I use Go the more I like it to be honest, I think the code looks ugly syntactically, but that is subjective as all hell and based on my constant preference for a language to look like Ruby, which even though it might not be everyone's cup of tea it remains to my eyes as the most beautiful language in existence, again, an obvious personal preference.18 -
!rant
Anyone here experienced with Route53?
I have a small issue I'm trying to think through on how to achieve with minimum effort and maintenance, essentially set once and walk away and never care about it again solution.
Basically what I have is:
sub.domain.com
and I need to get it to redirect over to
otherdomain.com/folderToGetTo/
Using a 301 would be ideal but how for the life of me do I go about serving a 301 redirect over a dns entry - short answer is I can't unless I'm missing something!
Both domains are owned by the same company so no issue in hijacking a subdomain... well besides internal politics but that's just another day 😏
First thoughts include setting up a S3 bucket with hosting and forcing the dns to that and then, redirect out of the bucket... seems overkill but will work.
Hoping to find a smaller solution that I don't have to justify a S3 bucket being used for a single file - audits suck alright🤷♂️
Oh and setting up a redirect at the originating domain will take longer then it's worth to setup and get approvals for so not worth the effort internally.
Yes I will accept "fuck off @C0D4" as an answer.question popcorn supplied c0d4 has a question redirect why can't we do it like normal people route5310 -
Oh god, structure alignement, why you do this... You might be interested if you do C/C++ but haven't tried passing structures as binary to other programs.
Just started working recently with a lib that's only a DLL and a header file that doesn't compile. So using python I was able to use the DLL and redefined all of the structures using ctypes, and the nice thing is: it works.
But I spent the whole afternoon debugging why the data in my structures was incoherent. After much cussing, I figured out that the DLL was compiled with 2 bytes packing...
Packing refers to how structures don't just have all the data placed next to each other in a buffer. Instead, the standard way a compiler will allocate memory for a structure is to ensure that for each field of the structure, the offset between the pointer to the structure and the one to the field in that structure is a multiple of either the size of the field, or the size of the processor's words. That means that typically, you'll find that in a structure containing a char and a long, allocated at pointer p, the double will be starting at p+4 instead of the p+1 you might assume.
With most compilers, on most architectures, you still have the option to force an other alignment for your structures. Well that was the case here, with a single pragma hidden in a sea of ifdefs... Man that took some time to debug...2 -
Under pressure for a big feature that had to be merged into develop like one month ago. But I couldn't because of issues I discover every single fucking day.
Today's issue is that a Cucumber test fails. I try reproducing it on my machine, it fails with a different error. Apparently I need to download some 10GB database file from some company server.
Alright, let's download it. But it's damn too slow. Well, let's have lunch in the meantime.
I come back, the download timed out at basically the same point I left it at.
I don't wanna try again. Not without trying to improve things. Download speed is ridiculous. Switching from Wi-Fi to Ethernet definitely helps, I thought.
The cable doesn't work. The port LEDs are both off. Is that cable even connected to something? So I follow that damn cable throughout my colleagues' desks. I'm now doing things without even remembering why.
I finally find the other end. It is plugged to the wall. I try another plug, but that fucking LED is still off. A colleague tells me: not all the sockets are actually connected to the switch, you have to call IT to have yours patched. Stay calm, stay caaaaalm...
A small lamp turns on in my head. Maybe something in my laptop is broken. So I try with a colleague's ethernet. That fucking LED is still off. A-ha.
Turns out, the shitty macbook adapter has this Ethernet port that DOESN'T work out of the box. It needs a driver to even realize there's a port. I look for it, I find it. I finally have wired connection. It's like having drinking water again.
I turn off WiFi, I re-try downloading that fucking database.
Nope, it's still stupidly slow. The bottleneck was in the dumbfuck internal server.
FUCK.
At least I have Ethernet now.1 -
Recently had to start developing on a PLC for a new project and didn’t realize how much these companies fuck their developers.
For example, I’m using CODESYS to write structured text to run on the PLC. CODESYS is free to download. However, in the free tier, they take all your .st files and ur config files and combine them into a SINGLE FUCKING BINARY which completely defeats the purpose of version control.
However, if you BUY their pro license, you can install a git module.
There’s other things that make developing in them suck. For example, the only IDE you can use is the one built into CODESYS and it fucking sucks. Another one is that their builtin IDE has a “dark mode” that only works on certain files. If you open a function file, it uses dark mode. But if you open a struct file, it uses light mode.
Also, having no other runtime than the one built into CODESYS fucking sucks.
Maybe I’ve been spoiled with VSCode and python 🤷♂️5 -
OH MY FUCKING GOD. I HATE
H A T E
ACQUIA SITE STUDIO.
"Let's make a low-code 'solution' for developers who barely can stand working on Drupal as it is, and make the completely easy and perfect process of styling a website, COMPLETELY UNBEARABLE!"
Yea this is a great idea, experienced developers can now spend hours trying to fucking find where a single style is coming from. Oh it was too easy to cmd+f a stylesheet or a codebase to find something particular? Yea FUCK THAT. Lets turn EVERY SINGLE STYLE into a unsearchable .yml file where every style definition is now a machine hash. WAY easier to use. Isn't it so cool to fucking click on styles from a dropdown where they come off the edge of the screen. FUCK whichever stupid fuck came up with this dog shit nonsense. I fucking HATE this soul crushing work.2 -
I freaking hate slow IDEs, especially ones made in Java.
I used to use an IDE/text editor called geany, and it was great, you could do almost every language in it and it worked great. It was fast, and efficient, it was a no-nonsense editor. That was when I was a kid, but I got in univ and got a job, so I had to start using big boy """""enterprise""""" IDEs like eclipse.
Eclipse, netbeans, and intellij (basically every Java based IDE except BlueJ) are exactly what is wrong with IDEs. They are clunky editors that frankly would be better off gone. They are slow, eat RAM like crazy (like most Java software). You just CANNOT have eclipse open for extended periods of time, because it WILL take up too much resources and get slow as heck. Android Studio (based on intellij) is a nightmare to work with. It just does not want to cooperate with you (I will agree they have improved a lot though).
I cannot believe I am saying this, but even the electron based IDEs like atom and code-oss are better than them. They are very easily expandable, something that Java was supposed to be, but is not. They have tons of plugins. Even if its not there, you can make one without having to spend a lifetime making the plugin! They look good. I never thought that going from IDEs with """""enterprise""""" UIs to something modern like code-oss would feel this great. Its ridiculous, I don't want to create a darn project for every single file that I want to edit, I just want syntax highlighting for a single .sh file that I want to edit right now. A project is just a way to logically define what is one "unit" or a "container for multiple files", you know what else is that? A simple directory.
Also I don't want 9 billion .xml files for the IDE to store its crap. Just make a .vscode like folder to hide your shit.11 -
Christe on a bike, why would anyone sane use PowerShell? I can't even run my own fucking script, because "cannot be loaded because running scripts is disabled on this system". Even tho I used the same script file literally yesterday.
So I'm just gonna use single command to change it. Easy? Well fuck no! Because no one thought that implementing something like "sudo" would be a fantastic idea, so you have to jump between two separate instances of that piecie of shit. Not to mention it takes ages to even load it.12 -
When I think my teachers can get any worse after sending me snippets of several Java classes in a single txt, one of them sent me SQL code of a full database dump in a Word document. 8 pages of SQL in its full glory!
I guess using the proper file extension/format or a service like PasteBin or GitHub Gist is way too advanced for them. -
Oh boyyy, I just had to work with Asterisk again. And holy shit it is still the clusterfuck it was many years ago.
We got:
- Inconsequent documentation that is mixed through all versions.
- The config sprinkled over what feels like 20 gazillion files.
- AEL being a half assed attempt at a "pRoGRamMinG LanGuAgE"
- The fuck you mean with extensions, endpoints and AOR's?
- Inconsistent config parameter naming. Some are snake case, some camel case some are just everything smushed into a single word.
- queue_log determines wheter to write a log to a file. queue_log_to_file Says to do so independent of you having a realtime backend. Whatever the fuck that is.
- Log compression is done by executing a gzip command after a rotation??!!?!! -
After 6 months of C++, switching back to C# for personal Unity project feels so much nice, albeit only in my personal time.
Specifically, when you create a class, it's just a single csharp file, instead of fucking header and class files.
Breath of fresh air.9 -
A normal day on my CMS as a Service...
URL: https://go to CMS
> Login screen: enter credentials, check checbox "remember me" (which doesn't remember you)
> redirected to SSO (single sign-on welcome page)
> Re-enter URL to go to CMS
> Fires up second browser on second screen, do the exact same things as above
--- Code editing
As it's a very modern CMS, you have to edit the code via the CMS using a bulky and honestly shitty editor (or rather: they didn't spend time configuring it to be at least semi-decent).
Plus default white horrible theme.
> Go to "/themes"
> Scroll all the way down the page
> Enter filename in search box
> Click the "Edit" button, which is a small button located right next to a much bigger red "DELETE" button. When you middle click (as I always open files in new tabs) on the DELETE button, it DELETES without confirmation. In such cases, you lose up to three days of work asking the providers to set it back up for you via their backup - and charge you for that. So sorry for deleting an *important* file
> Edit the file.
> Save the file - it takes 3 seconds. Upon saving, rescroll again to where you were in the code.
> On the other screen, refresh dev view of current template
> Wait 5 seconds
> If there are any special blocks, they all load via a semi-synchronous AJAX request (it's async, but they load one by one), the same time you waited to refresh your page.
> Notice you forgot adding some markup
> Re-edit the file, save...
> OH NO - I'VE BEEN BACKGROUNDEDLY DISCONNECTED. Back to Login page.
> Enter credentials.
> Am not on the CMS, but on the SSO
> Navigate back to file
> Re-write new changes
--- Manager comes in:
I need to you edit XXX objects in DB Manager (a big PHPMyAdmin if you will)
> New tab, go to https://DB
> Although still connected on CMS, I have to re-enter credentials
> Am redirected to SSO
> Re-enter https://DB
> Find the object (20 seconds of loading)
> Find the appropriate field
> Find out the field is in fact another object located elsewhere
> Uff, thank goodness, there's a shortcut button to directly edit said elsewhere object
> Operates on elsewhere object + save
> Re-edits original object + save
> ERROR 500, APPLICATION UNEXPECTEDLY CRASHED
:') painful much?
(for those who ask: yes i've got plenty of mind-reflexes in order to minimise losses)2 -
I ran my PHP script file in Firefox, only to be greeted by everything else but my webpage. I scanned through the errors and looked them up on Google. As I was only restricted to a basic text editor, I had no choice but to prepare myself to look through hundreds of lines of code spanning across different files in my project.
Minutes passed, found nothing. An hour has passed, and I can feel my brain power fading away into oblivion, but I still found nothing. I took a stab in the dark and made a few changes in the code, hoping that it'd solve the problem, only to be slapped with a big fat 'nope' in the browser. I lost all hope for the day and decided to give it a rest and come back tomorrow to try again.
New day, new me, fresh new energy to tackle the code! But after one failed attempt at debugging and I was back to the same state as yesterday.
But... at the corner of my eye, something at the end of a line caught my attention. I moved my cursor to that position, pressed the key on top of my pinky finger down, saved the file, and ran the script. It worked.
Who knew how problematic a single missing semicolon could be :34 -
In a conversation about which editor to use to edit pod file, this guy said nano.
I thought what a great idea to piss off both vim and emacs people in a single shot 😂2 -
We had one group project where we made game. We had like 3 developers, one guy to do some artwork and one to do most of the project management. And at that point in the project I had done most of the work so far (but not because the others didnt do anything, I just had fun coding).
One day said artwork guy managed to accidentily revert 100 of my commits without even opening a single code file. He didn't know git and issued random commands. I wouldn't know how to fuck up a repository like that even if I wanted to. Usually I am rather calm but at that point I was a little bit pissed.4 -
Come into work after a 3-day weekend, see a file isn't saved, think it's probably just a random space or something I accidentally added after modifying the crap out of the file and saved for the weekend so I compare the file from the disk to the file in memory. Turns out, I didn't save a single time since I started working on it.
I guess Friday me likes to live dangerously.4 -
Lesson Learnt: never quote a job without inspecting every single file with every single details -_-
[clarification in comments]5 -
personal projects, of course, but let's count the only one that could actually be considered finished and released.
which was a local social network site. i was making and running it for about three years as a replacement for a site that its original admin took down without warning because he got fed up with the community. i loved the community and missed it, so that was my motivation to learn web stack (html, css, php, mysql, js).
first version was done and up in a week, single flat php file, no oop, just ifs. was about 5k lines long and was missing 90% of features, but i got it out and by word of mouth/mail is started gathering the community back.
right as i put it up, i learned about include directive, so i started re-coding it from scratch, and "this time properly", separated into one file per page.
that took about a month, got to about 10k lines of code, with about 30% of planned functionality.
i put it up, and then i learned that php can do objects, so i started another rewrite from scratch. two or three months later, about 15k lines of code, and 60% of the intended functionality.
i put it up, and learned about ajax (which was a pretty new thing since this was 2006), so i started another rewrite, this time not completely from scratch i think.
three months later, final length about 30k lines of code, and 120% of originally intended functionality (since i got some new features ideas along the way).
put it up, was very happy with it, and since i gathered quite a lot of user-generated data already through all of that time, i started seeing patterns, and started to think about some crazy stuff like auto-tagging posts based on their content (tags like positive, negative, angry, sad, family issues, health issues, etc), rewarding users based on auto-detection whether their comments stirred more (and good) discussion, or stifled it, tracking user's mental health and life situation (scale of great to horrible, something like that) based on the analysis of the texts of their posts...
... never got around to that though, missed two months hosting payments and in that time the admin of the original site put it back up, so i just told people to move back there.
awesome experience, though. worth every second.
to this day probably the project i'm most proud of (which is sad, i suppose) - the final version had its own builtin forum section with proper topics, reply threads, wysiwyg post editor, personal diaries where people could set per-post visibility (everyone, only logged in users, only my friends), mental health questionnaires that tracked user's results in time and showed them in a cool flash charts, questionnaire editor where users could make their own tests/quizzes, article section, like/dislike voting on everything, page-global ajax chat of all users that would stay open in bottom right corner, hangouts-style, private messages, even a "pointer" system where sending special commands to the chat aimed at a specific user would cause page elements to highlight on their client, meaning if someone asked "how do i do this thing on the page?", i could send that command and the button to the subpage would get highlighted, after they clicked it and the subpage loaded, the next step in the process would get highlighted, with a custom explanation text, etc...
dammit, now i got seriously nostalgic. it was an awesome piece of work, if i may say so. and i wasn't the only one thinking that, since showing the page off landed me my first two or three programming jobs, right out of highschool. 10 minutes of smalltalk, then they asked about my knowledge, i whipped up that site and gave a short walkthrough talking a bit about how the most interesting pieces were implemented, done, hired XD
those were good times, when I still felt like the programmer whiz kid =D
as i said, worth every second, every drop of sweat, every torn hair, several times over, even though "actual net financial profit" was around minus two hundred euro paid for those two or three years of hosting. -
I have this little problem,
there is no constant electricity In the country where I live, in fact for the past 4 days there was not a single blink.
I enable auto save on my vs code to save me from tears,
now I have a file server with backup batteries and since it's a laptop mobo that was converted to a server, hooking up the battery was a no brainer.
I just saved copies of my files on it and if I edited any of them I'll just overwrite the file. this was only possible if I did this before the power goes out or else I am stuck again.
I decided to try vs code extensions that will save me from all that copy and paste work.
tried ssh, unsupported architecture error, didn't care I just needed ftp or sftp
I tried the simple ftp/sftp extension. worked pretty well. allowed me to connect to the server and add the remote directory to my workspace and with autosave the changes are uploaded immediately which means once power is out I can continue on my mobile phone(I have some android text editors that support ftp).
little problem. I discovered some things just don't work. even if I opened the whole directory, the contents will not be loaded unless I open them up like stylesheets and images and whatnot.
imagine having to open every single damn file before it appears on the browser, very annoying.
I need a solution, I have really tried.7 -
This Capstone group blows. There’s five of us in total, and only two of us are actually doing work on this fucking Django application.
Seriously, how hard is it to use Git and GitHub? I assigned a single page to a group member.. and what does this fucker do? Sends me the .html file on Slack.
And all that page consisted of was TWO JUMBOTRONS. None of the functionality I asked for was there whatsoever.
These people are seniors in an engineering school. Fuckssake, get your shit together.
Good thing the grades are based on commit history.2 -
Visual Studio and its compatibility with Linux applications.
I don't know if I'm the only one, but this is my setup:
- Visual Studio 2017 on Windows 10
- Ubuntu 18.04 subsystem on Windows
I just can't do any Linux coding in Visual Studio... it is using my subsystem as a Remote Compiler and debugger, and a simple Hello World program does build and run successfully, but EVERY SINGLE LINE HAS ERRORS! It can't find stdio.h! Not a single include file works! They get auto-completed so it knows where the files are, but apparently opening them to see all the methods is too much for Visual Studio! I'd say the problem has something to do with IntelliSense since only inside the IDE my code has errors, compiling (which happens on the subsystem) works like a charm.2 -
For fucks sake we enforce monolithic design these days (even putting 5 different languages in one component-file) but not a single fucking tutorial, idea, design hint or article about how to put the fucken backend in that project, too.
The data structures used by front- and backend will be the same, do I really need to setup another oversized webpack buildchain, containing 90% the same sources to have my backend development in a different repo?
what the fuck.1 -
A colleague changes the location of a test helper file imported in a bunch of tests. Doesn’t bother to check where that file is imported (except where he’s specifically using it himself).
As a result good dozen tests fail later on. The culprit doesn’t realize. And the rest of us have no clue why.
Multiple people are asked to look into why the tests are failing.
"Ok, who’s working on what?
We’ll create a shared document to track who’s working on what test."
Document is created, people get assigned.
"Hold on, looks like it’s just a faulty import." "Oh yeah same here." "Yeah for me as well."
"Ok we could simply appoint one person to fix all the imports."
"Well I’ve already gone ahead and opened a pull request to fix the test I was appointed to."
"Ah ok, well who can take care of the rest?"
"Wait I also opened a PR."
"Ok so I guess we can each open a PR?" "No we can just have a single branch we can all push to".
"Sure, who’s branch are we using"
"You can use the branch of my PR"
"Guys let me handle this, it’s ridiculous for us to all be doing this separately."
"You’re right, go ahead".
——
The culprit? A senior dev.
What would have literally taken a minute to do (or even no time at all with proper use of the IDE) turned into hours of wasted time. People getting interrupted, having to drop what they were doing to fix the consequences of this guy’s laziness (seriously don’t know what else to call it).
Ok maybe our reaction could have been more efficient, but we never should’ve even gotten to that point in the first place.2 -
So this is the story of myself getting from hating vim to find it pretty good.
When i started fiddling around with linux i was literally overrun by vim. I mean how the fuck should i remember all these stupid commands.
So there we go ... nano was my favourite (and only) editor i used.
Everything was fine in my little nano world. I saw some colleague editing every damn thing in vim. I asked him "man what the fuck are you damn crazy"? And thats where till that moment the deepest conversation about an editor in my life began. He told me he could do that much with vim, its almost everywhere nowadays and a must for any admin.
So after letting him tell me about every thing you can do he promised me he is going to help me getting started quicker. And i must say boi vim is really awesome. But for "real" development i still use a ide. Although i find myself programming go, python or bash scripts entirely in vim and its not that bad.
So if you find your way through the deep shit of that single damn command input down there you can get a pretty decent editor.
Dont get me wrong i am forced to use nano sometimes, when i help some of friends with their servers or so and they litterally uninstalled vim because they were to frustrated.
So as i am started to go into the devops area you get more and more towards you have to edit a file on a server, or just tweak around before automating the shit out of it.
And i must say vim has become a solid alternative for me to a full blown ide, or any other text editor.
So yeah i am gone from freaking hating vim to using it almost everyday. But why some people out their treat vim like a religion is not understandable to me in any way.
So whats your story why do you hate/love vim? Or are you just like me a "happy user" that would switch to another editor anytime it would be a better fit?3 -
Well fuck. I am experiencing over-engineering first hand.
I am the single dev responsible for developing a small feature but which is an identity to our whole product(feel free to guess it here). This is quite simple I thought, I can just modify the constants which are being used in the source code and I can finish it off in a week tops. I asked all the relevant teams over which this feature would have dependencies and they gave me a green signal. Setup Jenkins configuration and everything for this new feature. With a wide grin on my face, I sent out a pull request. Now the architect of our product declined the pr saying to change everything from the bottom up giving the reason that it would be configurable sometime later in the future. Now mind you, I get it if this feature could change over time and needs customability. But it has been the same since last seven years and would probably not change again for a couple of years ahead [you have to take my word for it.]. Its not that the guy is a douche or anything, he is one of the best dev I have ever personally came across and I highly respect and admire him. But there has to be a trade off between the effort you are putting in versus the benefit you get. Now I have to touch almost every file, super carefully look in the whole product if a bug creeps out from anywhere and change the existing code to a point where it doesn't even make sense to me anymore, and write tests ofcourse.
wubba lubba dub dub!2 -
This is Node.js FYI
Exporting a single class from a file called util.js. This class only has static methods. Each method is a util function. No fucking way of importing a single method. Class abuse?6 -
An utility function longer than 100 lines shouldn't even be a single function. Shit, it shouldn't even BE inside the "utils" file9
-
working in a single file, not separating stuff properly. I don't do that for work related stuff, but I'm very lazy when it's a personal project4
-
About 3 years ago, we had 4 different WordPress sites for various clients.
My colleagues thought it'd be a genius idea to keep them all in one repo. Even more genius, for local development, a single installation which implements a switcher for the wp-config.php files so we can switch between sites. Not bad in theory.
Fast-forward to present day. 1 client left; another site got converted to using Laravel because they always asked us to update their content so no point using a CMS; whereas the remaining 2 sites use differing versions of WordPress on their live sites, no less than 18 months out of date, have no dev sites, different collection of plugins and themes and both modified to the deepest darkest depths of fucking hell that's barely recognisable as WordPress anymore and next to no documentation or comments around the changes.
The functions.php file of one of these themes is over 4000 lines long!!!
We're keen to upgrade our servers to use Ubuntu 16.04 which defaults to PHP7, so all the already deprecated WordPress functions will then fail to work completely as will have been removed.
Both of these clients have agreed that they wish to convert Laravel as well so there's not really much point in going through the clean up process of their WordPress sites. Just copy the database nuke it all and start a fresh with Laravel FFS!
They also wish to completely redesign and discuss what features to keep/add/remove. With no date for these redesign meetings in sight, we won't be converting to Laravel any time soon, nor upgrading our servers in the foreseeable future either!
This is all because of one dev in the office and his history of failing to keep on top of breaking changes!
Fuck you! Seriously, fuck you!!!
If I was your superior, then you'd have been fired long ago!3 -
Why does it have to be so difficult to get unit tests to run? Spent about an hour yesterday trying to get a single test class to run and it kept complaining about a compiler error in a completely different module. Went to the file and there was no error. WTF?!
In the end, checking the “delegate build actions to gradle” box made it go away. why..... -
Nothing like trying to understand a single 1500-line source file that implements the API usage in the frontend. Without a single comment.
No, wait. There are comments! But it's only commented-out code. Or explicit shit (like "gets the version" before a getAssetVersion function).
Functions with unused parameters? ✅
Weird var names (like "tmpX")? ✅
`console.log(var)` everywhere? ✅
Long-ass lines with 150+ chars? ✅
Duplicate code? ✅✅
Not a single interface was used so everything is var: any? ✅
Random unreadable RegEx? ✅
If-chains of 6+ more levels? ✅
Many `else if` towers instead of a switch? ✅
And did I mention it was written by a fucker who can't speak proper English so shit like visiable, cataloge and isExist is everywhere? Yeah.
Fun day at the office reading spaghetti code 🙃 -
GAH! FUCKING VOLUME!!
Logic Pro X is killing either me or my ears!
The track is completely fine when I edit it there but when I export it and listen to the file that single instrument... is WAY TOO LOUD! WHY?
Is the converter script broken or something? Or am I just too blind to see the fucking volume switch?1 -
Css positioning is harder to understand than the full OOP concept.
So i wanted to create a very simple page with a single css file. I spent 2 hours to position the buttons in the fixed header and center some things.
I got the whole OOP concept with abstraction, polymorphism and inheritance in an hour and could use it right after without problems.
Holy shtcake i never want to do frontend.8 -
On the newer side of web development. Using CSS Grid with some flexbox. Any idea on why my 768px media query styles are overwriting my 320px styles?
I was breaking into modules but moved everything to a single css file until I figure out what causes the issue. The mobile styles are at top and I started the medium breakpoint below the initial styles.
Designed it mobile first if that makes a difference. Should the media queries be nested?13 -
Please i'm writing an api in NodeJs but all my routes are inside a single file, and the file is already very long.
Now I'm looking for a way to split my routes into multiple files
Any ideas?2 -
Got a guy trying to convince bosses of enforcing ESlint rules or whatever
This is the same guy that came into our repository forcing this shit on every single file he touched, when we had a different, established style
I shouldn't have let his new style enforced by ESlint defaults pass the first time in code review
Like, WHY the fuck do you want to be the enforcer of styles when you started shitting on what was there in the first place
Jesus fucking Christ5 -
markdown4documentation is a tool that can either convert a single markdown file, a complete directory or a complex structure to HTML or PDF. You can choose between several build-in themes (called templates) or define a custom theme.1
-
Html and CSS and Noob
hey guys
trying to do something, search my ass off and can't find it.
So, I have a e page to access tables (another html file)
you can check It at rjpf.ddns.net .
I have a menu, with links to a iFrame, but that is not a good solution for cellphones.
I want to click the button and insert the html inside the main Div , instead of using frames.
how can I do that ?
so>
click the link(CSS button),
opens another page in the div
when I click another button opens another html file in the same DIV
tht way instead of a frame that is had to scroll It would be a single page, easy to paged own in cellphones.
Have another question but this oné must be taken care of first.
Thanks in adance11 -
Newbie Linux User - Story about not working GUI
I am a proud Opensuse user for about a year, still struggling with some basic stuff, terminal, etc.
The story begins when a few days ago I try to login to the system. To my trusty Gnome. I get stuck on login loop;
successful login - > black screen for a second - > back to login screen.
Zero feedback, not a single error message
Stress level increases taking in count that I am at a climax at my university with tons of projects on my computer.
I assemble the Team A:
Me, Google, Stackoverflow, and for desperate times Russian Stackoverflow
Over 4 hours, found out that my user is affected by this, tried restoring default Gnome configuration, went through bunch of logs only to find out that every user gets the same errors, still only my not working. Even KDE denied to cooperate with the same result.
So what went wrong you may be thinking.
One line in file replaced by miniconda, that changed the PATH.
Linux is the best detective game that I've ever played.
Is it something that I should get used to?2 -
Doing someone else's Code Review in my project: "You must retain the holiness and piety of the code you write by following PascalCase naming for files and kebab-case naming for CSS variables. Avoid using duplicate strings by declaring enums in a constants.ts file and using that all throughout the app"
During my own Code Review in someone else's project: "WHAT THE FUCK DO YOU MEAN I CANNOT PASS FUNCTION REFERENCES AS PROPS TO A REACT COMPONENT AND ALWAYS NEED TO INVOKE IT INSIDE AN INLINE FUNCTION FOR THE PROP."
"WHAT KINDA FKIN DRUGS ARE YOU ON TO USE snake_case IN TYPESCRIPT DID YOUR MOM DROP YOU ON YOUR HEAD WHEN YOU WERE BORN YOU SACRILEGIOUS PIECE OF SHIT"
"WHAT DO YOU MEAN I SHOULD USE BOTH SINGLE AND DOUBLE QUOTES FOR IMPORTS AS PER LOCAL OR GLOBAL; I'LL SHOVE THE SINGLE QUOTE UP YOU WHERE THE SUN DOESN'T SHINE YOU FKIN DEGENERATE MORON"
As much as I do believe in self righteousness of my own coding conventions over others (I might be slightly better than others but I really can't claim good authority because I've had my lapses in conventions too; and being one of the newer members of the team certainly doesn't help, despite my boss supporting my initiative), I guess it is high time we bring in some already established code conventions in the team that is finally big enough to warrant them. Maybe AirBnB. -
ODROID!!!!!!
Let's start from the beginning: I finally got my 3 odroid MC1 Solo's (XU4 equivalent, and they are way more powerful than a pi) and I was really excited to set them up. I decided to start with resinOS as I had heard about it and wanted to try it out. It didn't boot. I foashee every single SD card like five friggin times, and it didn't boot.
So I decided to try Ubuntu 18 minimal. It didn't boot, I was depressed. Then today I turned it on again, silly me forgot that I would need to reboot after expanding the file system. AND NOW I'M IN! DOCKER SWARM, HERE I COME!!!!!!3 -
So far I've been pretty lucky... except for the code some of my professors at uni used in their assignments. A couple of them had this horrid habit of giving you a horribly-written, out-of-date (we're talking these chuckle heads used the same code for years on end and wondered why it didn't work on new versions of Java), messy source file with "fill in the blanks" sections like it was some kind of Java Mad Libs book. One of them had an entire jarchive of data structures we were required to use that he'd written in the '90s and NEVER UPDATED. Another one had a script he'd written for his own specialized assembly macro preprocessor that he'd been using without update for who even knows how long. Now, we were using one of those goofy virtual machines with its own simplified assembly language, and we were on the fourth version of the program. This guy'd written his macro processor in Java for the second version, never updated his Java source, only provided a barely-working .bat script for running it, even though the department's official preference was a *nix environment, and implemented this horrid "pretty-printer" that had a regrettable little habit of eating code. You heard that right. You'd run build.bat and it'd expand your macros then send it over to the pretty-printer which would very infrequently just replace the existing program file with an empty file. When we brought it to his attention, he goes "...huh. never happened to me." and proceeded to use the very same set of programs for the next three semesters, even when the assembly simulator was updated again. I heard wails of anguish from the poor sad souls that came after me as their macro processor created program files with deprecated operations, their pretty printer printed out beautiful, perfectly-organized empty files, and the professor responded to every second of a student begging for an updated version with "...huh. never happened to me." I never saw a single bug reported to either of those professors even acknowledged, let alone fixed. Some of the Java Mad Libs were the same ones they'd started using when they first switched the curriculum from Ada to Java. Thankfully after my first year I escaped into the bliss of the next three years, which were full of *nix and C and beauty.
-
Holy shit I don't understand Rust's module system. Package I have not a single clue what it is... It "can contain one library crate and multiple binary crates". What? Okay so a crate is a collection of modules. Great, now how do you define modules? `mod whatever {}` probably. Then what the hell does `mod whatever;` do?? Import a module from a file with the same name (ignoring the fact that modules and files don't seem to have anything to do with each other). But why `mod` to import? How does that differ from `use`-ing a module? What is any of this??3
-
Programmer looking for a new language
I have been a JavaScript developer for a few years now (non professionally) and I really like the language. I mainly program for execution with NodeJS rather than web, because I feel like I get more freedom (e.i. the ability to use a computer file system).
I normally never use other people's libraries and instead either write my own library/ies for the specific task or use an old one. I only ever use someone else’s if I need a quick frame work to test an idea, never for something I will actually use.
I prefer to work object / class orientated.
I have worked on distributed servers with NodeJS before, however trying to distribute a load across one computer across it's multiple threads has proved problematic due to the heavy delays of standard io transfer speeds.
Why do I want to switch?:
•Because JavaScript is not at all created with multithreading in mind, and pretty much any multithreading solution is a bodge and allot of the time it is more efficient to work single threaded.
•Also, I get the sense that JavaScript + NodeJS is not used often in the programming industry comparison to other languages like; ruby, python, and I don't want to get stuck in a nesh language of which would decrease my employment chances heavy.
Side Note: I have been working on a pet project to have a distributed database (made with nodejs), and so far, there are no language specific problems, but I feel like it would be more efficient if I used a programming language designed more to cater for multi threading.5 -
"Download our app for some lovely additional ass licking features....."
Why tech industry love apps? also I hate these days not only mobile phones, but also computers are in progression of "applification."
Programs are only installed do some advanced things that were absurd and inappropriate to work on web browser. like video editing or programming, or file management.. etc. but in recent days, everything is fucking apps. why just not improve your web version of your service and make the shortcut from that? Weather app. youtube app. reddit app. 'tips' app by apple that is totally useless. news app. map app. so much wasteful. these kind of services are MUST be on the UPPER layer than the web browser laid on. also apps are taking much resources on local hardware and that makes my hardware too much slow.
That is not how tech works. that is not how software engineering, hardware engineering works, every single thing in technology must NOT work like that. If it does, then that is not technology, and just stack of cow shit.3 -
I hate when programming books have shit code examples.
Just came across these, in a single example app in a Go book:
- inconsistent casing of names
- ignoring go doc conventions about how comments should look like
- failing to provide comments beyond captain obvious level ones
- some essential functionality delegated to a "utils" file, and they should not be there (the whole file should not exist in such a small project. If you already dump your code into a "utils" here, what will you do in a large project?)
- arbitrary project structure. Why are some things dumped in package main, while others are separated out?
- why is db connection string hardcoded, yet the IP and port for the app to listen on is configurable from a json file?
- why does the data access code contain random functions that format dates for templates? If anything, these should really be in "utils".
- failing to use gofmt
These are just at a first glance. Seriously man, wft!
I wanted to check what topics could be useful from the book, but I guess this one is a stinker. It's just a shame that beginners will work through stuff like this and think this is the way it should be done.3 -
Developed this project "Audio Book Generator"
Implementing speech synthesis(📖 to 🗣) on eBooks
Bored with writing notes in a lecture? How about we convert the notes dictated by the lecturer into text? Use the speechtotext.py script to get the text format of spoken notes, which saves the text in a .txt file.
Too lazy to read a novel? Get an Ebook version of the novel and run the finalAudioBookGenerator.py script. It will generate an mp3(audio) format of the book. Enjoy book listening :)
You can also convert your single images using the singleImageReader.py script.
Demonstration:
https://youtu.be/xhMvGg1dAsg
Project:
https://github.com/globefire/...
Star If you liked it. :)rant project python github audio books speech synthesis youtube text to speech speech to text tesseract3 -
!rant, more of an incredulous/cruelly amused "you had ONE job..."
so: biggest IT/PC/electronics store in my (and neighboring) country. their webpage, of course with the function to buy online, because of course.
the big green "Buy" button does nothing. doesn't work. doesn't react. I keep clicking it multiple times, shorter, longer, etc, because maybe their JS scripts are just shit so they slow.
nope.
okay. open devtools, JS console.
hover over the button: "Error: isMobile is not a function".
click the button: "Error: isMobile is not a function"
WAT.
search for isMobile in the script.
173 occurences.
fuck this.
console: isMobile = function(){return false;}
because I'm not on my phone.
click the "Buy" button.
works flawlessly.
...HOW?
THE WHOLE PAGE IS AN ESHOP YOU COMIC RELIEF INCOMPETENTS! =D
173 uses of non-existing function that blocks business-critical feature, THE ONLY CORE FEATURE FOR WHICH YOUR SITE EVEN EXISTS, and NOBODY, not the dev who fucked it up, NOT EVEN QA, noticed it??? =D =D
if I was the boss of the devs, or even boss of the whole company...
git blame
...and then i'd go the whole chain from the dev who caused the bug, through all of the QA people who "tested" that version before deploy, and I would personally, on the spot, fire each and every single one of them.
mainly because of who knows how much money this stupid not even a proper bug lost them.
but secondarily, because clearly none of those people give a single shit (n)or have an idea how to do their jobs.
=D =D
yeah but I was a good guy, filed a bug report in the "Complaints" section of their Contact form.
it goes to some call-center-like peon, so it starts with a sentence "forward this to your site's dev people outright to file as a bug, thank you".
but... HOW.... =D
HOW can you let something like this through? =D
the bottleneck of your whole user interaction, which forms first of the three steps OF THE MAIN AND MOST IMPORTANT FUNCTION of your whole business... =D
...I...
...does not compute =D
...BUT THEY USING ANGULAR, SO THEY ALL MODERN AND HIGH-TECH AND EVERYTHING'S FINE!!! =D =D1 -
!rant, but funny
tl;dr I made something that was to protect me in case the customer doesn't pay, wanted to check if it's still there, messed up a little :D
>do an Android app project for almost 6 months
>issues with payment for it
> =.=
>firebase
>"Add new application"
>Remote Config
>add single integer variable
>back to app code
>if (integerFromFirebase != 0) navigateTo(new Fragment())
>mwahahahaha
>but they ended up paying me in the end
>huh...
>see another post on how to secure yourself if customer doesn't want to pay
>well, consider yours as more sophisticated
>hmm... wonder if they removed it
>firebaseconsole.exe
>change "enableJavaScript" (needed a legit name, so it can't be easily backtracked) to 1
>publish changes
>app still works fine
>mhhh... they removed it? really?
>can't fking believe it
>apkpure.com
>search for the app
>download apk
>unzip
>decompile dex file
>find the fragment
>can't find the code that navigates to blank fragment, but the config fetch is still there
>wtf
>look at the app
>restart it
>SHIT ITS NOT WORKING NOW XDDDDD
>changed the variable back to 0
>found out that the lambda in which I navigate to the blank fragment is in other .java file. New thing learned :v
>idk if I'm in trouble but I highly doubt it (console shows max 10 active users atm)
Was fun tho :v3 -
First issue with Manjaro. I am not sure when it begun, but now, every single time linux uses the SWAP file, the entire system stays unresponsive, freezing (not even the mouse moves), so I need to wait until it finishes using the SWAP to be able to use it again.
I have 16GB RAM and I was not noticing that, but for some reason, Chromium started to use a little bit of the SWAP when the Hardware Acceleration were turned on and the mouses started to stop moving for a few ms/seconds.
So I tried it out: opened a VM with 8GB RAM and done, my PC were frozen for about 10 minutes, until I were able to use it again.
When I turn on the swap file, everything works fine again, even the VM. It does not matters with the SWAP is on a SSD or not.12 -
Why the fuck is react so fucking verbose? Why the fuck in almost every single file i need to use dispatch=useDispatch(), why the fuck do i even need to import React from react, like, holy fuck, figure this shit yourself, you're digesting the files anyway.5
-
It seems to be fucking impossible to just read a part of an XML file with c#'s XmlSerialisation and deserialize it into objects of a single class and add other objects to the same XML without loosing other nodes.
Go fuck yourself Microsoft3 -
What are your opinions of single file components in Vue? Will it actually help maintainability down the road for our codebase? Or do you think it’s better to separate the .js, .sass, and .vue?9
-
Rubber ducking your ass in a way, I figure things out as I rant and have to explain my reasoning or lack thereof every other sentence.
So lettuce harvest some more: I did not finish the linker as I initially planned, because I found a dumber way to solve the problem. I'm storing programs as bytecode chunks broken up into segment trees, and this is how we get namespaces, as each segment and value is labeled -- you can very well think of it as a file structure.
Each file proper, that is, every path you pass to the compiler, has it's own segment tree that results from breaking down the code within. We call this a clan, because it's a family of data, structures and procedures. It's a bit stupid not to call it "class", but that would imply each file can have only one class, which is generally good style but still technically not the case, hence the deliberate use of another word.
Anyway, because every clan is already represented as a tree, we can easily have two or more coexist by just parenting them as-is to a common root, enabling the fetching of symbols from one clan to another. We then perform a cannonical walk of the unified tree, push instructions to an assembly queue, and flatten the segmented memory into a single pool onto which we write the assembler's output.
I didn't think this would work, but it does. So how?
The assembly queue uses a highly sophisticated crackhead abstraction of the CVYC clan, or said plainly, clairvoyant code of the "fucked if I thought this would be simple" family. Fundamentally, every element in the queue is -- recursively -- either a fixed value or a function pointer plus arguments. So every instruction takes the form (ins (arg[0],arg[N])) where the instruction and the arguments may themselves be either fixed or indirect fetches that must be solved but in the ~ F U T U R E ~
Thusly, the assembler must be made aware of the fact that it's wearing sunglasses indoors and high on cocaine, so that these pointers -- and the accompanying arguments -- can be solved. However, your hemorroids are great, and sitting may be painful for long, hard times to come, because to even try and do this kind of John Connor solving pinky promises that loop on themselves is slowly reducing my sanity.
But minor time travel paradoxes aside, this allows for all existing symbols to be fetched at the time of assembly no matter where exactly in memory they reside; even if the namespace is mutated, and so the symbol duplicated, we can still modify the original symbol at the time of duplication to re-route fetchers to it's new location. And so the madness begins.
Effectively, our code can see the future, and it is not pleased with your test results. But enough about you being a disappointment to an equally misconstructed institution -- we are vermin of science, now stand still while I smack you with this Bible.
But seriously now, what I'm trying to say is that linking is not required as a separate step as a result of all this unintelligible fuckery; all the information required to access a file is the segment tree itself, so linking is appending trees to a new root, and a tree written to disk is essentially a linkable object file.
Mission accomplished... ? Perhaps.
This very much closes the chapter on *virtual* programs, that is, anything running on the VM. We're still lacking translation to native code, and that's an entirely different topic. Luckily, the language is pretty fucking close to assembler, so the translation may actually not be all that complicated.
But that is a story for another day, kids.
And now, a word from our sponsor:
<ad> Whoa, hold on there, crystal ball. It's clear to any tzaddiq that only prophets can prophecise, but if you are but a lowly goblinoid emperor of rectal pleasure, the simple truths can become very hard to grasp. How can one manage non-intertwining affairs in their professional and private lives while ALSO compulsively juggling nuts?
Enter: Testament, the gapp that will take your gonad-swallowing virtue to the next level. Ever felt like sucking on a hairy ballsack during office hours? We got you covered. With our state of the art cognitive implants, tracking devices and macumbeiras, you will be able to RIP your way into ultimate scrotolingual pleasure in no time!
Utilizing a highly elaborated process that combines illegal substances with the most forbidden schools of blood magic, we are able to [EXTREMELY CENSORED HERETICAL CONTENT] inside of your MATER with pinpoint accuracy! You shall be reformed in a parallel plane of existence, void of all that was your very being, just to suck on nads!
Just insert the ritual blade into your own testicles and let the spectral dance begin. Try Testament TODAY and use my promo code FIRSTBORNSFIRSTNUT for 20% OFF in your purchase of eternal damnation. Big ups to Testament for sponsoring DEEZ rant.3 -
Give me a single reason, why someone will use XML over JSON. I am trying to parse a XML file in Java and it builds a null document everytime. HELP!!5
-
I feel like being expected to handcode a user interface by supposed progressives is the most ass backwards idiotic tech decision with long and wide ranging consequences anyone ever farted out of the asshole god bored into their ugly faces!
Why the hell would I want to use web when I could use windows forms ?
Why is there no equivalent to the visual designer that's usuable ?
I mean I get it for more customized things
But why would I want to fuck with css when instead I could do about the same thing and store them in a settings file and point and click on a series of dropdowns and see the results as I create them ?
Why would I want to fuck around with an interface a resize destroys ?
Why would I want to mess with html tagging or tk or tcl containers when I could just drag an item into a window and update it's properties and add some fucking event handlers the stubs of which are automatically generated by a single DoubleClick??!!??
I hate it
It's slow
I want my fucking ui to be done quickly !
Am I just missing some vital tool that costs 5 grand ?16 -
A single '=' can mess up badly:
(gdb) tb jobs.cc:541 if this->job_id_=2588573
Temporary breakpoint 1 at 0x48b571: file ../../../../../../pool/jobs.cc, line 541. -
The absolute worst experience i have ever had with a dev technology was a mixture between notepad, pgeLua and a PSP.
Back in 2010, i coded a game called "ReapeR ValleY" for PSP (homebrew). I had no idea what an ide was and i have never really coded before that.
That resulted in a 1500+ line code that in a single file written in notepad. The performance was horrible since it just ran through the same lines of code over and over again with arrays filling up and flowing over with data.
The entire game was written in pgeLua (a supposedly more game friendly version of Lua) and ran on the PSP.
The PSP needed to be overclocked in order to run the Game smoothly. I had to restart the entire PSP when the game crashed and i already installed a custom bootscreen that basically shortened the time to boot.
You can still find the game online hosted on various websites. It was my very first and unexperienced attempt at coding, but it worked.
Moral of the story: you can code with just about anything, but when you don't inform yourself about IDEs, frameworks and such, it might be painful.
... also Notepad is pure brain pain to code in. -
Compiling a project (Not BIG but still pretty big)
C# compiler : YOLO, you have 12 Cores ? I'll use 12 cores. BAM : 3 seconds, compiled !
SASS compiler :
Rolf, I'm gonna take file by file, recompile all dependant files to produce a single file. 2 Seconds per file. X 150 files.... 6 Minutes SASS is still running....2 -
Just a warning to Web Dev's out there. My university has taken to marking our web coursework by "machine marking".
The necessary steps to getting full marks? Upload files with the specified name and extension and voila! No need to worry about code quality or whether it works. Full Marks!
Misspelled a single file name? Straight 0.
Nothing. -
They increased 1 single file to have over 1.6 million records of data and bow the processing takes 12h to complete. They want me to improve the current bash scripts to decrease this processing time down to max 5 hours. Are you serious rn. Do i look like a magic fcking wizard 🧙🏿♂️🪄15
-
I’m working on a new app I’m pretty excited about.
I’m taking a slightly novel (maybe 🥲) approach to an offline password manager. I’m not saying that online password managers are unreliable, I’m just saying the idea of giving a corporation all of my passwords gives me goosebumps.
Originally, I was going to make a simple “file encrypted via password” sort of thing just to get the job done. But I’ve decided to put some elbow grease into it, actually.
The elephant in the room is what happens if you forget your password? If you use the password as the encryption key, you’re boned. Nothing you can do except set up a brute-forcer and hope your CPU is stronger than your password was.
Not to mention, if you want to change your password, the entire data file will need to be re-encrypted. Not a bad thing in reality, but definitely kinda annoying.
So actually, I came up with a design that allows you to use security questions in addition to a password.
But as I was trying to come up with “good” security questions, I realized there is virtually no such thing. 99% of security question answers are one or two words long and come from data sets that have relatively small pools of answers. The name of your first crush? That’s easy, just try every common name in your country. Same thing with pet names. Ice cream flavors. Favorite fruits. Childhood cartoons. These all have data sets in the thousands at most. An old XP machine could run through all the permutations over lunch.
So instead I’ve come up with these ideas. In order from least good to most good:
1) [thinking to remove this] You can remove the question from the security question. It’s your responsibility to remember it and it displays only as “Question #1”. Maybe you can write it down or something.
2) there are 5 questions and you need to get 4 of them right. This does increase the possible permutations, but still does little against questions with simple answers. Plus, it could almost be easier to remember your password at this point.
All this made me think “why try to fix a broken system when you can improve a working system”
So instead,
3) I’ve branded my passwords as “passphrases” instead. This is because instead of a single, short, complex word, my program encourages entire sentences. Since the ability to brute force a password decreases exponentially as length increases, and it is easier to remember a phrase rather than a complicated amalgamation or letters number and symbols, a passphrase should be preferred. Sprinkling in the occasional symbol to prevent dictionary attacks will make them totally uncrackable.
In addition? You can have an unlimited number of passphrases. Forgot one? No biggie. Use your backup passphrases, then remind yourself what your original passphrase was after you log in.
All this accomplished on a system that runs entirely locally is, in my opinion, interesting. Probably it has been done before, and almost certainly it has been done better than what I will be able to make, but I’m happy I was able to think up a design I am proud of.8 -
So work today was a pain in the behind as usual ( although the comfy chair made up for it eventually)....My Boss walked in every twenty minutes to ask me the same annoying question." Are you done with the app?", He said....even after showing him over 6045 lines of code on a single config file
Why are bosses so mean?😥3 -
i need an adult. I know noone who would understand my worries, so you guys need to be it.
i have a nextcloud running on my raspberry pi. performance is horrible, dont ask, but it works.
i mostly use it to backup the photos of my phone sd card every night when my phone charges. Internally this works good. If i am elseplace it wont for obvious reasons.
In my youthful joy of doom i opened port 443 and forward it to my raspi. I get internet via cable and my ip is pretty much static (it was the same for 10 months). So external access is provided.
Now i thought, its stupid that i cannot sign an ssl certificate cause i dont have a domain. Lets buy domain. But before i do that i did some try runs with duckdns to test the principle.
Some back and forth, it works now. Pretty god, i could even make a cron job on the raspbi to renew (that should work right?). Only problem. randoname.duckdns.org doesnt work internally. Or should not at least.
So i googled a bit and it turns out that my router (a cable fritz!box i bought myself) can be a local network dns. Or cannot. Regardless what i try, it doesnt accept the changed config file.
Now the problem.
It works anyway. randoname.duckdns.org points to my external "static" ip and resolves to that from my internal network..so it works on my phone or laptop. if i traceroute the thing it goes via two hops out and finishes in less than 1ms.
Now to the problem:
I have no fokkin clue why. The expected behaviour would be that it shouldnt work. If i do what i intended todo on pc in the hosts file tracert works correctly, directly pointing to the internal ip.
What i cannot figure out, is it the fritz!box being smart? Is it my ISP being smart?
Reason to rant: i have absolutly NOONE to ask, i know not a single person who would even understand what troubles me. I want to learn, i want to know WHY not just some mindless russian patchwork of "if it works its good enough".
thats depressing.8 -
Productivity hack - For me, it’s mostly a single word - planning. I wasn’t always good at it, definitely not yet a “master” of it, but breaking that proverbial elephant up into smaller pieces, and organizing a plan of action for dealing with them is the #1 productivity “hack” for me. Sorry that it’s not an actual shortcut, or anything…I personally don’t believe in those anymore. Complementary habits to this are thoroughly commenting code, having descriptive commit messages, file names, and variable names, maintaining documentation. Use that Readme.md. This is true of any project, even if I’m the only developer - never underestimate your own ability to totally forget shit.1
-
Pretty niche tool, but Sencha Architect!
It is a wanna be GUI-Builder/IDE for ExtJS, but neither works properly.
This rant is not about ExtJS, just about Sencha Architect, which my coworkers and I were forced to use.
If you want to join the ride, here an excerpt of just some of the issues:
- installation: already the setup is more of a gamble than an actual setup, either it works on your machine or it doesn't, plain and simple
- GUI Builder: just drag and dropping components is actually nice, but the editing capabilities are frustrating, you can't edit the UI code by hand at all, just through pre defined properties. If there was the need to really mix things up it wasn't possible, I couldn't even rebuild shown examples of their ExtJS documentation. Furthermore the property editor was data type locked, which means if you want to enter a string which ExtJS already supports, but architect locks the value as a boolean, you can't edit it at all, while still using Architect
- code editing: well it is a colored texteditor, which is fine, and I could live with that, but Architect let's you just edit areas where it allows you to - want to change something else? Nope not allowed
- autocompletion: there is none at all, same goes for refactoring, multi highlighting, string replacement, and others
- code storing: well now some may think edit it somewhere else, well no, also not possible... Architect not just only saves simple js, there is also a Json formatted file for everything you have created, which is needed so the tool can actually load it for further editing. They possibly never heard of DRY. But the worst of this code storing was actually using git along with it - have a merge conflict? Merge both files! Every single time, it was so damn tedious
There are a few more, but these were the worst I can remember.
Luckily I don't have to use it anymore!
Maybe they have fixed or changed a lot of it, because the developers were aware of the issues and eager to resolve them, as far as I was told on a roadmap presentation. And some of the tools they had released in the end of my time using ExtJS were actually really good, like an IDE plugin for the framework, and I liked using it. -
I implore ANYONE... please...
Have you EVER written a SINGLE Jest test that didn't have some sort of bullshit spewing stuff like this:
"ReferenceError: You are trying to `import` a file after the Jest environment has been torn down."
"Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."
and yet running on a device, features work flawlessly and quite well, no errors or even warnings in sight logged
This is the most fragile pile of garbage I have ever seen.
I hate this.
inb4 your stupid ass todo boilerplate garbage you wrote tests for in freshman year. i'm talking about a REAL app with HUNDREDS of components.
where the grownup testing tools at? it's a question I've still not answered after a year of fucking around with this framework1 -
How can I make a bot which makes a single commit everyday at a specific time for a particular repository?
The commit can be anything like insertion in readme or creating a new file.
I tried to accomplish this using python selenium I deployed it on heroku, the problem I am facing is github doesn't allows to crawl on it so it sends a verification code to me on mail and all my further selenium actions fail due it this.☹️26 -
I don't know why I can't understand how to use thymeleaf. It's concept makes sense, split an html page into two so you have a header html page made up of code you don't want to change, and an index html page of content you do want to edit. But no matter what it won't fucking connect the classes.
https://stackoverflow.com/questions...
If anyone has experience with this you can take a look at my post here on it, maybe give some input. For now though I'm going to just run a single html file and make comments in my index page. :/5 -
So after deploying an update for my apps api this morning, I very quickly had to move hosts as openahift for some reason does not install express on its 8.x container, heck its not even in the package lock file, and no help from Google. On the plus side, new ones faster, even though it's further away, and I can only image a replica set DB is better than a single instance.
-
For a little background on the sort of stuff I'm dealing with, check out my last rant.
Anyways, I'm testing this pipeline at work and was just reminded of the fucktarded way a "software engineer", who had a bachelor's biology degree, decided to handle a json file.
The script is question is loading a json file containing an array of objects. The script is written in perl. There's a JSON module. Use that? Fuck no! Let's rather perform an in-place sed command on the file substituting the commas separating objects in the array with newlines, then proceed to read the file line-by-line and parse out the tokens manually. Mind you, in the process of adding the newlines he didn't keep the commas, so now all of these json files his bullshit handled are invalid json that cannot be parsed.
The dumb ass was lucky the data in the file is always output upstream as a single line and the tokens for each object are always in the same order, so that never led to problems. But now, months later after I fixed his stupidity I am being reminded of it again as I'm testing and debugging some old projects as part of regression testing new changes I'm making.
TL;DR Fuck dumbwit motherfuckers who can't even google search "parsing a json file" and doing literally anything that is less fucktarded than manually parsing a json file2 -
Relatively often the OpenLDAP server (slapd) behaves a bit strange.
While it is little bit slow (I didn't do a benchmark but Active Directory seemed to be a bit faster but has other quirks is Windows only) with a small amount of users it's fine. slapd is the reference implementation of the LDAP protocol and I didn't expect it to be much better.
Some years ago slapd migrated to a different configuration style - instead of a configuration file and a required restart after every change made, it now uses an additional database for "live" configuration which also allows the deployment of multiple servers with the same configuration (I guess this is nice for larger setups). Many documentations online do not reflect the new configuration and so using the new configuration style requires some knowledge of LDAP itself.
It is possible to revert to the old file based method but the possibility might be removed by any future version - and restarts may take a little bit longer. So I guess, don't do that?
To access the configuration over the network (only using the command line on the server to edit the configuration is sometimes a bit... annoying) an additional internal user has to be created in the configuration database (while working on the local machine as root you are authenticated over a unix domain socket). I mean, I had to creat an administration user during the installation of the service but apparently this only for the main database...
The password in the configuration can be hashed as usual - but strangely it does only accept hashes of some passwords (a hashed version of "123456" is accepted but not hashes of different password, I mean what the...?) so I have to use a single plaintext password... (secure password hashing works for normal user and normal admin accounts).
But even worse are the default logging options: By default (atleast on Debian) the log level is set to DEBUG. Additionally if slapd detects optimization opportunities it writes them to the logs - at least once per connection, if not per query. Together with an application that did alot of connections and queries (this was not intendet and got fixed later) THIS RESULTED IN 32 GB LOG FILES IN ≤ 24 HOURS! - enough to fill up the disk and to crash other services (lessons learned: add more monitoring, monitoring, and monitoring and /var/log should be an extra partition). I mean logging optimization hints is certainly nice - it runs faster now (again, I did not do any benchmarks) - but ther verbosity was way too high.
The worst parts are the error messages: When entering a query string with a syntax errors, slapd returns the error code 80 without any additional text - the documentation reveals SO MUCH BETTER meaning: "other error", THIS IS SO HELPFULL... In the end I was able to find the reason why the input was rejected but in my experience the most error messages are little bit more precise.2 -
My current "file/media server" is a crappy old falling apart windows box with a stupid mismash of internal and external drives with no redundancy. That sucks for a number of reasons, so planning on dropping around a grand or so (including drives) on doing it properly.
Space requirement would be around 20TB-ish of usable space, with 1 disk's worth of redundancy. That can include a newish 5TB drive I have lying around however. Would also run either Plex / Jellyfin, so some horsepower for transcoding would be nice (but no need for more than a single 1080 stream at once.) 24/7 operation, so don't want anything too power hungry.
Current (loose) thinking on the hardware side is an AM4 board and a reasonably low end CPU, 3x8TB WD golds. Software side, probably CentOS, then mergerfs + snapraid. Anyone got any insight as to other options? Hardware not my speciality in particular, so open to suggestions.14 -
I'm starting to gain a dislike for OOP.
I think classes make it easy for me to think of the entities of a problem and translate them into code.
But when you to attempt to test classes, that's when shit hits the fan.
In my opinion, it is pointless to test classes. If you ever seen test code for a class, you'll notice that it's usually horrible and long.
The reason for this is that usually some methods depend on other methods to be called first.
This results in the usual monolithic test that calls every goddamn method on the class.
You might say "ok, break the test into smaller parts". Ok. But the result of that attempt is even worse, because you end up with several big tests cases and a lot of duplicate code, because of the dependency of some methods on others.
The real solution to this is to make the classes be just glue: they should delegate arguments onto functions that reside on its own file, and, maybe afterwards emit events if you are using events.
But they shouldn't have too much test code classes though. The test code for classes should be running a simple example flow, but never doing any assertions other than expecting no exceptions.
For the most part, you'd be relying on the unit testing that is done for each delegated function.
If you take any single function you'll see that it's extremely easy to write tests for it. In fact, you can have the test right next to the fuction, like <module>.xyz <module>.test.xyz
So I don't think classes shouldn't be used at all, they should just be glue.
As you do normal usage of this software this way, when a bug is discovered you'll notice that the fix and testing code for this bug is very usually applied to the delegated functions instead of being a problem of classes.
I think classes by themselves sound sane in paper, but in practice they turn into a huge fucking messes that become impossible to understand or test.
How can something like traditional classes not get chaotic when a single class can have x attributes and y methods. The complexity grows exponentially. And sometimes more attributes and methods are added.
Someone might say "well, it's just the nature of problems. Problems can have a lot of variables".
Yeah, but cramming all of that complexity into a single 200 lines class is insanity.12 -
My first time developing a C# project with a friend. He decided it would be a good idea to put 15 classes into a single .cs file. Ever had a person do that to you?1
-
Gf asked me to help her with getting science articles. She had some page that her university suggested students to use, but had troubles with downloading documents.
At first I was like "Hey, it says use IE, other browsers are not supported. Thats bad but.. whatever". Then it popped that she needs Java enabled - well, I guess we have to... Even updated it cause it was needed.
Restarted IE, clicked download again and... Java security blocked web app... Eh, I don't trust it but whatever, just let's check what if I whitelist it.
Got some basic view, 1 dropdown list for "file name format" (like anybody cares), path selection where to save file, and some checkbox. Lame, but let's just leave it behind.
Downloaded, it turned out to be html file, not pdf, fishy that it was single file, but hoped for some text styled with css, so I opened it and got redirected to page where I clicked download.
Checked that file content - html with empty body and script tag containing js that redirects on load.
Srsly?😐2 -
Visual Studio is a fucking shitheap of an IDE and everyone who worked on it should be fucking incinerated.
I've been trying to get Unity to build my game for about a fucking hour and a half now, only to realize that it was a warning from a script that was causing it to fall flat on it's face.
So I deleted the script because it was a shitty script anyways, not much was being lost here, and I started building the game, and lo and behold, it was actually fucking doing something.
I went to go get a drink, only to come back to see that this stupid fucking engine gave me yet ANOTHER error that wasn't even from a script anywhere in my game's files.
It was fucking Visual Studio. It didn't even give me that concise of a fucking error, just "this file doesn't exist" or whatever hypercomplex bullshit it spat out at me.
So, I took to google, and found that I should open the solution file hidden within the uncompleted build, and upon doing so Visual Studio told me it needed to install some more shit in order to do so.
I decided to let it do it's thing, and you wanna know what the real kicker is?
I started writing this rant when it was at 25%.
I had started talking to my friend about how absolutely fucking garbage and slow this IDE is at around the point where it started downloading. It took fifteen fucking minutes for it to get to 25%.
I could uninstall and reinstall both Destiny 2 and Killing Floor 2, twice, in the time takes for this shitty fucking program to install its tumor of an update onto my system.
FUCK Visual Studio.
Fuck the person who conceived the idea of it.
And fuck every single person who supports it.
Every single person that thinks this fucking anathema of an IDE was a good idea should be incinerated.12 -
Really need to make it a habit to read every single piece of documentation and included read me file for a plugin and framework that I'm using even if they essentially say the exact same thing...wasted so much time just to find out I literally needed 1 line of js instead of all kinds of custom code -_-
-
Need some help!
How can I create a git release with only distribution files?
Let's say I have a Sass project and it compiles to a single CSS file. I want to provide just the CSS file in download as release and exclude all other source files. How can I do that and how should this be automated?
Thanks5 -
Intelligent Development class (yeah, that's how it's titled), teacher leaves us as first task to develop our own Database, because later we will make it a fuzzy database.
She gave us three days. Three (counting me) in the team. I began working on Interfaces (Java development) and so on, using GitHub for VCS and documenting each method.
This assholes didn't even ask what was missing or what should they do. One day before date, I told them "Hey, I think I can nail the underlying file management tonight, so, work on the language parser, please"
Stood awake until 1 A.M., waiting for their reply, but there wasn't any.
Next day, I'm the only one of the team and I tried to decline the presentation of my work, but a friend encouraged me, because it was my work and I worked hard.
Presentation went better than expected.
After the class, I have another with one of my team members, he asks "How did you do?", "Us? You meant me, because the other prick didn't go".
And that's all, not another single question nor explaining why did he didn't answered the DM's I sent.
Fuck those guys, fucking team of shit, I hate it when you can't pick your team, but I guess that's just a common place for all of us here, isn't it?3 -
Linux vs Windows (vs AnyOtherOS) | The Age Old Question
The short answer: It depends. And probably isn't even up to you to choose
The long answer:
No one's forcing you to choose. And you have more than 2 options. (The 3rd being... both. (Unless you're running out of hardware))
You have to mentally replace "Which is better? Linux or Windows?" with "Which one gets me sooner to a completed task that more closely matches the end-user's expectations"
If it's something you're developing for yourself, then use whatever the hell you want, because you know where you want that "finished product" to be used, and in what manner.
But often, everyone around you and their cats are not using what you're using
Have to write a document? Oh.. there's this blue program thingy (no one talks like that), I think it was called "Microsoft Word"
Oh, you don't have that?? How the hell do you edit documents then?
~ Some employer still using MS Word 2009
"I'll send you the PSD", "Make it a PSD", "You need the PSD file for reference, right?"
psd? More like PTSD at this point
It's like Photoshop is suddenly the only way to edit images, oh.. and Paint.
* Use paint. I don't care. If it gets the job done, do it.
Hate Photoshop? Love Gimp? Too bad.
When that god forsaken PSD is emailed to you, you better have a copy of Windows and Photoshop just in case it looks like garbage in.. OR OUT of gimp..
Bottom Line:
Don't use what people use. Just have everything ready in case your boss still uses MS Word 1839 and you want to ENSURE, it'll look the same on his screen
*It's wrong to limit yourself to just ONE SINGLE OS2 -
Hey so I'm guessing embedding mysql is probably pretty much just creating a custom install under a subdirectory and starting it with a special config file with a custom port etc.
but is it possible with a single package and command line or is mssql possible to embed as well ?
that last interests me more. I prefer t-sql.7 -
HOW CAN I LINK THE STYLESHEET FILE IN MY HTML????????? I have struggle with this problem for so many times, yet none of the time I succeed and have to start over. This one single question has had made me got headache so many times in the past, yet I never can solve it.17
-
On a low motivation ride today again.
So, the thing is, mujoco. That's it. Mujoco is very annoying.
Current problem is that I have an xml as a robot description input from elsewhere, but it is not scaling well when I use it as input in another file. And it seems I can't scale everything else down, so I have to scale up the robot. And as I haven't found a way to scale up the entire thing at once, I might have to modify the xml for the arm. And that's annoying because I have to change every single joint and site and other stuff for it to work well...
Fuuuuuuuuck. 😑 -
rant.author != this
Christ people. This is just sh*t.
The conflict I get is due to stupid new gcc header file crap. But what
makes me upset is that the crap is for completely bogus reasons.
This is the old code in net/ipv6/ip6_output.c:
mtu -= hlen + sizeof(struct frag_hdr);
and this is the new "improved" code that uses fancy stuff that wants
magical built-in compiler support and has silly wrapper functions for
when it doesn't exist:
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it.
The code could *easily* have been done with just a single and
understandable conditional, and the compiler would actually have
generated better code, and the code would look better and more
understandable. Why is this not
if (mtu < hlen + sizeof(struct frag_hdr) + 8)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);
which is the same number of lines, doesn't use crazy helper functions
that nobody knows what they do, and is much more obvious what it
actually does.
I guarantee that the second more obvious version is easier to read and
understand. Does anybody really want to dispute this?
Really. Give me *one* reason why it was written in that idiotic way
with two different conditionals, and a shiny new nonstandard function
that wants particular compiler support to generate even half-way sane
code, and even then generates worse code? A shiny function that we
have never ever needed anywhere else, and that is just
compiler-masturbation.
And yes, you still could have overflow issues if the whole "hlen +
xyz" expression overflows, but quite frankly, the "overflow_usub()"
code had that too. So if you worry about that, then you damn well
didn't do the right thing to begin with.
So I really see no reason for this kind of complete idiotic crap.
Tell me why. Because I'm not pulling this kind of completely insane
stuff that generates conflicts at rc7 time, and that seems to have
absolutely no reason for being anm idiotic unreadable mess.
The code seems *designed* to use that new "overflow_usub()" code. It
seems to be an excuse to use that function.
And it's a f*cking bad excuse for that braindamage.
I'm sorry, but we don't add idiotic new interfaces like this for
idiotic new code like that.
Yes, yes, if this had stayed inside the network layer I would never
have noticed. But since I *did* notice, I really don't want to pull
this. In fact, I want to make it clear to *everybody* that code like
this is completely unacceptable. Anybody who thinks that code like
this is "safe" and "secure" because it uses fancy overflow detection
functions is so far out to lunch that it's not even funny. All this
kind of crap does is to make the code a unreadable mess with code that
no sane person will ever really understand what it actually does.
Get rid of it. And I don't *ever* want to see that shit again. -
i said "damn this thing is huge" when gazing at a 3k LOC file and not a single person at work clapped back with "thats what she said"
am I just old fashioned?5 -
the writing for obi-wan kenobi makes me smile slightly :P the military characters are pretty standard in everything they do and say, and march around at heads of columns and patrols in single file line :P
-
I can work productively and for very long hours with a lot of stuff which many dev considers productivity hurdles:
- single small monitor? No problem (in fact in one occasion in which my roommate accidentally broke my laptop charghing port and I couldn't get a spare I worked on an iPad connected trough SSH to a Linux machine completing one of the hardest tasks I ever did without significant loss of productivity)
- old machine? That's ok as long as I can run a minimal Linux and not struggle with Windows
- noise and chatter around me? A 10€ pair of earbuds are enough for me, no noise cancelling needed
- "legacy" stack/programming language? I'd rather spend my days coding in Swift or Rust but in the end I believe which is the dev and its skill which gets the job done not fancy language features so Java 8 will be fine
- no JetBrains or other fancy IDE? Altough some refactoring and code generation stuff is amazing Neovim or VS Code, maybe with the help of some UNIX CLI tools here and there are more than enough
despite this I found out there is a single thing which is like kryptonite for my productivity bringing it from above average* to dangerously low and it's the lack of a quick feedback loop.
For programming tasks that's not a problem because it doesn't matter the language there's always a compiler/interpreter I can use to quickly check what I did and this helps to get quickly in a good work flow but since I went to work with a customer which wants everything deployed on a lazily put together "private cloud" which needs configurations in non-standard and badly documented file formats, has a lot of stuff which instead of being automated gets done trough slowly processed tickets, sometimes things breaks and may take MONTHS to see them fixed... my productivity took a big hit since while I'm still quick at the dev stuff (if I'm able to put together a decent local environment and I don't depend on the cloud of nightmares, something which isn't always warranted) my productivity plummets when I have to integrate what I did or what someone else did in this "cloud" since lacking decent documentation everything has do be done trough a lot of manual tasks and most importantly slow iterations of trial and error. When I have to do that kind stuff (sadly quite often) my brain feels like stuck on "1st gear": I get slow, quickly tired and often I procrastinate a lot even if I force myself out of non work related internet stuff.
*I don't want this to sound braggy but being a passionate developer which breathes computers since childhood and dedicating part of my freetime on continuously improving my skill I have an edge over who do this without much passion or even reluctantly and I say this without wanting to be an èlitist gatekeeper, everyone has to work and tot everybody as the privilege of being passionate in a skill which nowadays has so much market2 -
I had a mandate to help bring a couple of fellow QA testers up to speed on basic automated test code, fill in any knowledge gaps and answer questions.
Met with one co-worker and figured I'd start with his questions and work from there. He opened his test code and said he focused on learning 'if statements' last week but his test isn't running and just throwing errors.
Upon inspection, I realized it was a deeply nested (sometimes 10 or more conditions) single method soup that had never been run through even a syntax check. I blinked... *coughed* and spent the next few hours trying to "port the desired functionality" to a new file while he watched. -
when i found out on how to import modules instantly being able to deploy bugfixes and changes to multiple macro-dependent documents without copy-pasting the code to every single file manually.
-
So, I was googling for cross platform javascript things.. every answer, there's only weex and nativescript, but both aren't ready for prod, so I tried weex, it's alright but the documentation is non existant, and the support is practically on dial up, and hardly anyone has used it. And nativescript isn't really an option cause it's only for mobile.
So I chose weex, web + mobile, and I can easily port my already written vue project, sweet, so I get to porting, run into a few issues but it's pretty easy, need to play with some of the root file path definitions, no "./"'s just "@/" (if you use @ as your root symbol).
great. Pug works, sass... seems to work, then I run into a pretty big issue with sass compilation/loading, can't find an answer for an hour.
So I go out. Then come home, no answer on my SO question.
So I google "jsfiddle weex" to get a jsfiddle template for debugging weex/vue projects.
A few results down. I see this: https://reddit.com/r/javascript/...
well I've heard of framework7, but it would require me rewriting most of my element tags and components, but what's quasar?
I have a look, totally cross platform, desktop, web, mobile... wtf..
read the docs, "uses vue single file components"
..what, holy fuck, the documentation is beautiful, it uses vuex, fucking fuck.
I just found it 10 minutes ago....
wish me luck......... -
for Neovim users.
I tried ecovim <- good but seems to lag in large files, think 35k lOC in a single file.
Now Lunarvim <- smooth like butter.1 -
Someone posted a fix to a 5 years old problem that Docker as a company thrown into dumpster (moby) for years.
From the README there it's well researched and it seems they know what they're doing.
The whole daemon is one single file with only 300 loc, totally manageable for everyone if they want to scrutinize.
https://github.com/moby/moby/...