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 - "hardcoded"
-
I put an Easter egg into a product, that if you enter the string "final countdown" into the stock code search field, it plays a YouTube vid of Europe's "The Final Countdown", in a hidden div. It's an in-joke for a few people in the company.
A well meaning maintainer with no sense of humour or judgement takes over and goes on the warpath against any hardcoded strings. The secret code gets moved into a config file.
A third developer changes the deployment script so that it clears any configs that aren't explicitly set in the deployment settings.
So the secret code is now "".
Literally every PC in the stock buying department is now blaring out "The Final Countdown" at top volume.
...Except none of them have speakers, so it remains this way for over a year and two more changes of maintainer.
I just noticed this afternoon and quietly re-hardcoded the string. The buying dept.'s PCs will silently sing no more.31 -
So I accidentally published my AWS keys to GitHub, stupid me. I realize this the next day.
$ git reset
$ git push
Reset keys in AWS
I was too late. Bot already stole the keys and started up 53 EC2 instances. Racked up $4000+ of compute time (probably Bitcoin mining, I'd assume)
4 weeks later, I finally have this shit disputed and settled.
Don't test with hardcoded keys. You WILL forget about them. Env vars always. That is all.29 -
!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 -
note: Not the worst dev I've interviewed but worst I've worked with.
A guy who worked in my company before me "HARDCODED" the entire calendar for next 10 years starting 2016 in dictionaries and arrays in Python for a project.12 -
I work in a company where I'm the only developer, with everyone being designers or marketing or sales. Typically like the scene from Silicon Valley.
Moto was to create a ticket selling website for their products, and make sure they worked as well. It was all fine, until deadlines were discussed. They wanted it done within 2 weeks, the entire backend dashboard, API and front end.
I told them it's almost impossible to do it, but they insisted on it. So, I made a minimal dashboard and told them, I haven't completed a few things, such as if you edit data in one place, it won't reflect in other tables. So, be careful while editing the data.
They nodded their head for everything, yesterday was site launch and 2 hours before that one bastard decided to changed the product names to something "catchy" but failed to change the same in other places.
I had used the name as foreign key, so querying other DBs became a fuck all issue, and eventually API stopped giving any response to front end calls.
I got extremely pissed, and shouted at that dude, for fucking everything up. He said, you're the tech guy and you should've taken all this into account.
I sat and hardcoded all the data into database again, made sure site is live. Once it was live, these guys call a company meeting and fire me saying I was incompetent in handling the stressful situation.
At that moment, I lost my shit and blasted each of those people. The designer started crying since her absurd designs(though great) couldn't be realised in CSS that too within 2 weeks time.
One of the worst experience for working for a company. I could've taken the website down, and told them to buzz off if they'd called, I couldn't get myself to do it, hence ranting here.
I seriously feel, all these tech noob HRs need to get a primer course on how to deal with problems of a programmer before they get to hire one, most of these guys don't know what we're trying to tell in itself.
I find devRant to be the only place where I can get someone to understand the issues that I face, hence ranted.
TL;DR: Coded ticket selling site in 2 weeks. 3 hours to launch, data entry dude fucks up. I clean all the mess, get the site online. Get fired as soon as that happens.
Live long and prosper. Peace.16 -
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 -
So I had my exams recently and I thought I'd post some of the most hacky shit I've done there over here. One thing to keep in mind, I'm a backender so I always have to hack my way around frontend!
- Had a user level authentication library which fucked up for some reason so I literally made an array with all pages and user levels allowed so I pretty much had a hardcoded user level authentication feature/function. Hey, it worked!
- CSS. Gave every page a hight of 110 percent because that made sure that you couldn't see part of the white background under the 'background' picture. Used !important about everywhere but it worked :P.
- Completey forgot (stress, time pressure etc) to make the user ID's auto incremented. 'Fixed' that by randomly generating a user id and really hoping during every registration that that user ID did not exist in the database already. Was dirty as fuck but hey it worked!
- My 'client' insisted on using Windows server.Although I wouldn't even mind using it for once, I'd never worked with it before so that would have been fucked for me. Next to that fact, you could hear swearing from about everyone who had to use Windows server in that room, even the die hard windows users rather had linux servers. So, I just told a lot of stuff about security, stability etc and actually making half of all that shit up and my client was like 'good idea, let's go for linux server then!'. Saved myself there big time.
- CHMOD'd everything 777. It just worked that way and I was in too much time pressure to spend time on that!
- Had to use VMWare instead of VirtulBox which always fucks up for me and this time it did again. Windows 10 enjoyed corrupting the virtual network adapters after every reboot of my host so I had to re-create the whole adapter about 20 times again (and removing it again) in order to get it to work. Even the administrator had no fucking clue why that was happening.
- Used project_1.0.zip etc for version control :P.
Yup, fun times!6 -
This is not a joke. This is not something I wrote to be funny. This is not found randomly off the internet. This is a real part of the project I inherited: a function that not only is more cumbersome to use than the simple <Array>.contains that it wraps, but rather than returning the boolean result from the function, sends it through an if statement and returns hardcoded true and false values for... Good luck? I guess?47
-
Just a quick update (been a little) on the privacy website!
Although both the frontend and the backend need quite some work, I managed, with the help of some other guys, to get everything (only for the IM section yet for now) loaded from the database instead of hardcoded! Yes, that also means that the tiny icon colors are either red or green based on database values :).
Going to keep working on this tomorrow in the hopes I can also get some other subjects ready.
Thanks!42 -
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 -
This tiny project is awesome. Thanks to @JoshBent (who partly got it from another repo as well) for providing a basic DNS server with hardcoded blacklisting functionality and thanks to @PerfectAsshole for correcting my mysql syntax I was stuck on for way too long.
I've now got this fucker to read blacklisted words from a redis list into an array which checks every requested domain to see if it matches. If yes, it proxies it through to another DNS server and if not, it'll log the requested domain to a mysql database and prints is as blocked onto the terminal.
If the domain matches any host from a service known to be integrated within a mass surveillance network, it also prints this out to thy terminal.
It's working yay! Gonna keep working on it today.11 -
Decompiled a .exe from a program that was written in Visual Basic 6.
Got a public server IP, username and Password that was hardcoded in the program.
Found out it was a SQL Server. I've now got full access to the server.
I want to tell the company about this, but I'm afraid I might get sued. Any advice?12 -
So this guy is supposed to do the frontend.
I do the backend.
I offer an endpoint.
He does his HTML+CSS magic.
Me: Cool but data is hardcoded. Could you get the data from the endpoint I sent you?
Him: "I'd prefer you do that, I can make a git repo so you download the front."
... So you don't do frontend, you just write pretty layouts. And I have to actually write the frontend logic? Go f yourself.13 -
Google sucks!
No, not as e-mail or for privacy reasons. Sure, that too, but it comes with "free" stuff.
It sucks because it's breaking every possible record in the worst, shittiest, most insanely stupid APIs and integrations out there on the entire fucking planet!
It is comically stupid!
Aside from their LOVE of hard-deprecating APIs every few months, requiring constant, time consuming maintenance of every tool that integrates deeply with Google services, some of their APIs, for expensive stuff, look like they've been written by Bobby McFartface from 7th grade.
Take a look at DoubleClick Search (their ad performance reporting tool, that sure does sound like one). To upload custom, additional data, you must pass in a ton of parameter, and they REQUIRE some of them to have a specific, hardcoded value. What's the point in passing that parameter then you dickheads?!
But fine, so you uploaded some stuff using the API. Now you want to delete everything and try again after you fixed a bug - well you fucking CAN'T! You can't delete stuff, you can only mark them as "deleted" using an update call.
Bulk operations? Fuck no!
Can I just add on top? Well of course not! That will raise a ton of exceptions. Same message should be transmitted using the PUT, not POST request, in order to edit.
Can I send everything to PUT? Of course not! You can't edit something that's not there, dummy!
Can I see what's there so that I can update it, and add what's missing?
Well of course not! Why on Earth would you need to see what information is in there after you uploaded it? Who needs that anyway?
Simply send, pray, and hope that everything will be fine (it will not).
Like holy fucking crap, it can't get any more stupid!
Google is a huge pile of idiots who feed on only a single cow - the search engine.
It's times like these when I think that Google right now is the worst thing that exists for everyone in tech. It's dragging everyone down with their monopolies everywhere and complete idiocy in managing them.5 -
I hate Wordpress. I hate Wordpress. I hate Wordpress.
Wordpress can take a big shit on itself and crawl into a deep dark hole far away from all that is good.
Who even uses Wordpress? Bloggers? Come on, let’s be honest, they’re using more intuitive sites like weebly, wix, and square space. So WHAT is Wordpress for? I’ll tell you, it’s just to FUCKING TORTURE PEOPLE.
So, being the “techy guy” of the family, a relative contacts me asking for some help with their website because they need to install an SSL certificate but they don’t know how to. I tell them I’d gladly do it because, sure, they’re family and how long can it possibly take to install a certificate? I’ve done it before!
Well, I get to work and log into the sluggish Wordpress dashboard and try to use a plugin that would issue a LetsEncrypt certificate because they are free and just as good as any other SSL. But one plugin after the next I keep getting errors about how my hosting wouldn’t allow it.
So I contact GoDaddy (don’t get me fucking started) and ask them about the issue. The guy tells me it’s “policy” to only be able to use GoDaddy’s certificates. How much do they cost? Oh, how about $100 a year?! Fuck you.
I figured out the only way to escape this hell was to ask them to open an economy Linux hosting account with cPanel on GoDaddy (the site was formerly hosted on a “Managed Wordpress” account which is just bullshit for not wanting to give you any control over your own goddamn content). So now I have to deal with migrating the site.
GoDaddy representative tells me that it should only take 20 minutes for me to do this (I’ve already spent way too much time on this but whatever) so I go forward with the new account. I decide I should migrate the site by exporting a backup and manually placing everything on the new server. Doesn’t it end up taking an entire hour to back up a 200MB site because GoDaddy throttled the processing speed?!
So, it’s another hour later and I’ve installed all the databases and carried over all the files. At this point, I’m really at the end of my rope and can’t wait to install the certificate and be done with this fuckery.
I install the certificate and finally get ready to be on my way, but then I see it. A warning. A warning from my browser telling me the site is only partially secure. It turns out the certificate was properly installed but whoever initially made the site HARDCODED ALL THE LINKS to images, websites, and style sheets to be http instead of https.
I’m gonna explode.
I swear, I’m gonna fucking explode.
After a total of 5 hours of work, I finally get the site secure by using search and replace on every fucking file.
Wordpress can go suck a big one. Actually, Wordpress can go suck the largest fuckin one in existence and choke on it.
TL;DR I agree to install an SSL certificate but end up with much more work than I bargained.38 -
I'm editing the sidebar on one of our websites, and shuffling some entries. It involves moving some entries in/out of a dropdown and contextual sidebars, in/out of submenus, etc. It sounds a little tedious but overall pretty trivial, right?
This is day three.
I learned React+Redux from scratch (and rebuilt the latter for fun) in twice that long.
In my defense, I've been working on other tasks (see: Alerts), but mostly because I'd rather gouge my freaking eyes out than continue on this one.
Everything that could be wrong about this is. Everything that could be over-engineered is. Everything that could be written worse... can't, actually; it's awful.
Major grievances:
1) The sidebars (yes, there are several) are spread across a ridiculous number of folders. I stopped counting at 20.
2) Instead of icon fonts, this uses multiple images for entry states.
3) The image filenames don't match the menu entry names. at all. ("sb_gifts.png" -> orders); active filenames are e.g. "sb_giftsactive.png"
4) The actions don't match the menu entry names.
5) Menu state is handled within the root application controller, and doesn't use bools, but strings. (and these state flags never seem to get reset anywhere...)
6) These strings are used to construct the image filenames within the sidebar views/partials.
7) Sometimes access restrictions (employee, manager, etc.) are around the individual menu entries, sometimes they're around a partial include, meaning it's extremely difficult to determine which menu entries/sections/subsections are permission-locked without digging through everything.
8) Within different conditionals there are duplicate blocks markup, with duplicate includes, that end up render different partials/markup due to different state.
9) There are parent tags outside of includes, such as `<ul>#{render 'horrific-eye-stabbing'}</ul>`
10) The markup differs per location: sometimes it's a huge blob of non-semantic filthiness, sometimes it's a simple div+span. Example filth: section->p->a->(img,span) ... per menu entry.
11) In some places, the markup is broken, e.g. `<li><u>...</li></u>`
12) In other places, markup is used for layout adjustments, such as an single nested within several divs adorned with lots of styles/classes.
13) Per-device layouts are handled, not within separate views, but by conditionally enabling/disabling swaths of markup, e.g. (if is_cordova_session?).
14) `is_cordova_session` in particular is stored within a cookie that does not expire, and within your user session. disabling it is annoying and very non-obvious. It can get set whether or not you're using cordova.
15) There are virtually no stylesheets; almost everything is inline (but of course not actually everything), which makes for fun layout debugging.
16) Some of the markup (with inline styling, no less) is generated within a goddamn controller.
17) The markup does use css classes, but it's predominately not for actual styling: they're used to pick out elements within unit tests. An example class name: "hide-for-medium-down"; and no, I can't figure out what it means, even when looking at the tests that use it. There are no styles attached to that particular class.
18) The tests have not been updated for three years, and that last update was an rspec version bump.
19) Mixed tabs and spaces, with mixed indentation level (given spaces, it's sometimes 2, 4, 4, 5, or 6, and sometimes one of those levels consistently, plus an extra space thereafter.)
20) Intentional assignment within conditionals (`if var=possibly_nil_return_value()`)
21) hardcoded (and occasionally incorrect) values/urls.
... and last but not least:
22) Adding a new "menu sections unit" (I still haven't determined what the crap that means) requires changing two constants and writing a goddamn database migration.
I'm not even including minor annoyances like non-enclosed ternaries, poor naming conventions, commented out code, highly inefficient code, a 512-character regex (at least it's even, right?), etc.
just.
what the _fuck_
Who knew a sidebar could be so utterly convoluted?6 -
Prologue
My dad has an acquaintance - let's call him Tom. Tom is an gynecologist, one of the best in Poznań, where I live. He's a great guy but absolutely can not into tech of any kind besides his iPhone and basic PC usage. For about a year now I've been doing small jobs for him - build a new PC for his office, fix printer, fix wifi, etc. He has made a big mistake few years ago by trusting a guy, let's call him Shitface, with crating him software for work. It's supposed to be pretty simple piece of code in which you can create and modify patient file, create prescription from drugs database and such things. This program is probably one of the worst pierces of code I've ever seen and Shitface should burn for that. Worse, this guy is pretentious asshole lacking even basic IT knowledge. His code is garbage and it's taking him few months to make small changes like text wrapping. But wait, there's more. Everything is hardcoded so every PC using this software must have installed user controls for which he doesn't have license and static IP address on network card.
Part 1
Tom asked me to build him a new PC that will be acting like a server for Shitface's program. He needs it in Kalisz (around 150 km from my place). I Agred (pun intended) and after Tom brought me his old computer I've bought parts and built a new one. I have also copied everything of value and everything took me around three hours.
Part 2
Everything was ready but Shitface's program. I didn't know much about it's configuration so when I've noticed that it's not working even on the old PC I got a bit worried. Nevertheless I started breaking everything I know about it and after next three hours I've got it somewhat working. Seeing that there's still some problems with database connection (from Windows' Event Viewer) I wrote quick SMS to Shitface asking what can be wrong. He replied that he won't be able to help me any way until Monday (day after deadline). I got pissed and very courteously asked him for source code because some of libraries used in this project has license that requires either purchase of commercial license or making code open source. He replied within few minutes that he'll be able to connect remotely within next 10 minutes. He was trying to make it work for the next hour but he succeeded. It was night before deadline so I wrapped everything up and went to bed thinking that it won't take me more than an hour to get this new PC up and running in the office. Boy was I wrong.
Also, curious about his code, I've checked source and he is using beautiful ponglish (mixed Polish and English) with mistakes he couldn't even bother to fix. For people from Poland, here's an example:
TerminarzeController.DeleteTerminarzShematyDlaLekarza
Part 3
So I drove to Kalisz and started working on making everything work. Almost everything was ready so after half an hour I was done. But I wanted to check twice if it's all good because driving so far second time would be a pain. So I started up Shitface's program, logged in, tried to open ANYTHING and... KABUM. UNHANDLED EXCEPTION. WTF. I checked trace and for fuck sake something was missing. Keep in mind that then I didn't know he's using some third party control for Windows Forms that needs to be installed on client PC. After next fifteen minutes of googling I've found a solution. I just had to install this third party software and everything will work. But... It had to be exactly this version and it was old. Very old. So old that producent already removed all traces of its existence from their web page and I couldn't find it anywhere. I tried installing never version and copying files from old PC but it didn't work. After few hours of searching for a solution I called Mr Shitface asking him for this control installation file. He told me that he has it but will be able to send it my way in the evening. Resigned I asked for this new PC to be left turned on and drove home. When he sent me necessary files I remotely installed them and everything started working correctly.
So, to sum it up. Searching for parts and building new PC, installing OS and all necessary software, updating everything and configuring it for Tom taste took me around what, 1/3 of time I spent on installing Mr Shitface's stupid program which Tom is not even happy with. Gotta say it was one of worst experiences I had in recent months. Hope I won't have to see this shit again.
Epilogue
Fortunately everything seems to work correctly. Tom hasn't called me yet with any problems. Mission accomplished. I wanna kill very specific someone. With. A. Spoon.1 -
tl;dr @Root refactors some spaghetti.
I'm refactoring an api that creates a support message. It's a post route.
When seeing a magic hardcoded message string, this route instead updates the user object, and does not create a support message.
It also returns different results if the user is muted (fine) or if saving the message succeeds or fails (fine).
But if the user is creating a duplicate message, it doesn't save the message (fine) and... redirects to listing their messages instead? Wat?
Also, when refactoring this (migrating to a new message backend), I discovered that not all routes return a response. If the message is a non-duplicate, from a non-muted player, from a non-redacted client, the route doesn't respond at all!
So, I'm having fun cleaning this up. I actually am. Except I'll need to support all of the legacy clients for the next lifetime or two. I mean, really. There are still people with Android v2 devices who are using this thing. not even kidding.9 -
ARGH. I wrote a long rant containing a bunch of gems from the codebase at @work, and lost it.
I'll summarize the few I remember.
First, the cliche:
if (x == true) { return true; } else { return false; };
Seriously written (more than once) by the "legendary" devs themselves.
Then, lots of typos in constants (and methods, and comments, and ...) like:
SMD_AGENT_SHCEDULE_XYZ = '5-year-old-typo'
and gems like:
def hot_garbage
magic = [nil, '']
magic = [0, nil] if something_something
success = other_method_that_returns_nothing(magic)
if success == true
return true # signal success
end
end
^ That one is from our glorious self-proclaimed leader / "engineering director" / the junior dev thundercunt on a power trip. Good stuff.
Next up are a few of my personal favorites:
Report.run_every 4.hours # Every 6 hours
Daemon.run_at_hour 6 # Daily at 8am
LANG_ENGLISH = :en
LANG_SPANISH = :sp # because fuck standards, right?
And for design decisions...
The code was supposed to support multiple currencies, but just disregards them and sets a hardcoded 'usd' instead -- and the system stores that string on literally hundreds of millions of records, often multiple times too (e.g. for payment, display fees, etc). and! AND! IT'S ALWAYS A FUCKING VARCHAR(255)! So a single payment record uses 768 bytes to store 'usd' 'usd' 'usd'
I'd mention the design decisions that led to the 35 second minimum pay API response time (often 55 sec), but i don't remember the details well enough.
Also:
The senior devs can get pretty much anything through code review. So can the dev accountants. and ... well, pretty much everyone else. Seriously, i have absolutely no idea how all of this shit managed to get published.
But speaking of code reviews: Some security holes are allowed through because (and i quote) "they already exist elsewhere in the codebase." You can't make this up.
Oh, and another!
In a feature that merges two user objects and all their data, there's a method to generate a unique ID. It concatenates 12 random numbers (one at a time, ofc) then checks the database to see if that id already exists. It tries this 20 times, and uses the first unique one... or falls through and uses its last attempt. This ofc leads to collisions, and those collisions are messy and require a db rollback to fix. gg. This was written by the "legendary" dev himself, replete with his signature single-letter variable names. I brought it up and he laughed it off, saying the collisions have been rare enough it doesn't really matter so he won't fix it.
Yep, it's garbage all the way down.16 -
TL;DR I'm fucking sick and tired of Devs cutting corners on security! Things can't be simply hidden a bit; security needs to be integral to your entire process and solution. Please learn from my story and be one of the good guys!
As I mentioned before my company used plain text passwords in a legacy app (was not allowed to fix it) and that we finally moved away from it. A big win! However not the end of our issues.
Those Idiot still use hardcoded passwords in code. A practice that almost resulted in a leak of the DB admin password when we had to publish a repo for deployment purposes. Luckily I didn't search and there is something like BFG repo cleaner.
I have tried to remedy this by providing a nice library to handle all kinds of config (easy config injection) and a default json file that is always ignored by git. Although this helped a lot they still remain idiots.
The first project in another language and boom hardcoded password. Dev said I'll just remove before going live. First of all I don't believe him. Second of all I asked from history? "No a commit will be good enough..."
Last week we had to fix a leak of copyrighted contend.
How did this happen you ask? Well the secure upload field was not used because they thought that the normal one was good enough. "It's fine as long the URL to the file is not published. Besides now we can also use it to upload files that need to be published here"
This is so fucking stupid on so many levels. NEVER MIX SECURE AND INSECURE CONTENT it is confusing and hard to maintain. Hiding behind a URL that thousands of people have access to is also not going to work. We have the proof now...
Will they learn? Maybe for a short while but I remain sceptic. I hope a few DevrRanters do!7 -
The guy where I can only shake my head when I see his code, and he is really proud of if implementations, while he
- doesn't care about warnings
- breaks builds and doesn't care
- doesn't care about code styles and indents in a very column based way
- adds tons of comments to his code, mostly hard to understand, and sometimes that much you can hardly find the code
- implements a tokenizer where you have to inherit from its interface (Why would I wanna implement whole functions for a tokenizer and not just use it in place where needed? How do I use two of those in one class?)
- implement a "generic" state machine base class with fixed lengths array of 3 events and 3 strings (Why would I need events and strings hardcoded in a "generic" state machine? Why a maximum of 3?)
- once delivered a software without the needed runtime components, so the whole system (embedded device) wasn't working properly and only by chance missed the point of disabling update mechanisms
- make your ears bleed about his big inventions whenever he sees you, no matter how often he already told you about that blazing new feature5 -
You know what REALLY PISSES ME THE FUCK OFF? Two pupils in my school won a local IT award FOR CODING A FUCKING PHP VOTING SITE WHICH DESIGN WAS SO FUCKING UGLY I WANT TO VOMIT. THE SITE IS SO FUCKING SHIT THAT YOU CAN VOTE AS MANY TIMES AS YOU WANT AND THERE ARE NO IPS LOGGED TO PREVENT IT. WHAT THE FUCK. THE QUESTIONS ARE FUCKING HARDCODED AND THE RESULT NUMBERS ARE STORED IN A TXT FILE THAT IS ACCESSIBLE WITH THE RIGHT URL10
-
Germany plans to reduce their VAT from 19 to 16 % from July to December....
I'd guess a lot of old legacy projects will be fucked.
Anyone else remember the fun when you had a project where the VAT was hardcoded....everywhere.... And needed to be migrated?
I had two or three of those... God I'm so happy that I don't work for these companies anymore.
And I guess.... A lot of schadenfreude ... Cause I remember the pain, especially database wise.10 -
Admit it, in some of your projects you must have hardcoded something for an urgent delivery or last minute change :D6
-
Preface: My company took over another company. A week ago I inherited their IT.
"IT" !!!! Are you fucking kidding me?!
Their server stood at an ex employees homeoffice. So I drove to her and she had 0 idea about IT. Server was just "Running". I tore that fuck down and saw an aweful lot of Hentai in all home folders.
WTF?!
Not enough, their crm was a makroinfested access table. Shit was protected so I couldn't even edit the makros. The retarded fucktards hardcoded paths to serverside folder \\fuck\you\hard\cavetroll
Just so that server will never see the light of my domain! Damn you? Mothership of sisterfucking dickgirls!10 -
Having to review an offshore C++ codebase made in Romania that the company I worked for they bought to control a wifi module on a complex RF mobile tech device that I can't legally give more details on.
If I could legally post this masterpiece, or should I say masterpiece-of-shit, all of you C++ dev would instantly get AIDS and all the existing types of cancer upon browsing it for 2 minutes.
It's laughably bad and unmaintainable. One of my colleague called it "the perfect example of human obfuscation" and it fits perfectly.
Think of a 100k LoC main function with nested loops and ifs with random sleep values, 1000 values of hardcoded 32 bits arrays declared globally in the first 10k lines for unknown reasons. Comments in Romanian mixed with english. Somehow, this shit works by some miracle.
The worst intern you can think of, while being piss drunk, could do better and it's no joke.5 -
Best decisions:
- Switching to Linux entirely
- Learning how to use the shell
Worst decisions:
- Using Windows 8
- Hardcoded passwords (I built a small thing for myself, don't judge)3 -
I looked into the code of the website of our company. One of the first things I found was that the Login was hardcoded with clear passwords. So everytime a new user needs an account the code has to change.
I still can't understand how people can do that.5 -
Last year, we had to do a big university project in randomly selected groups (5-6 students in every group).Three of the five guys were completely useless, I mean, both the other competent guy and me wrote around 20,000 lines of code each, the other ones wrote around 500 lines of code (combined).
After our first few meetings we quickly knew that we have to give them a small task which was so trivial that not even they can fuck it up. But we were wrong. Oh boy, so wrong.
They simply had to code the excel export of the data, which means they had to use two functions from a library and pass the correct data. But their solution was so bad, I lost faith in humanity and was fascinated by it at the same time.
For example, there was this simple class "Room", which had a few properties like size or number of seats and a few getter/setter etc. That was a core class and written by the other qualified guy. So how did the others fuck up the excel export? They somehow rewrote that class in German (although the other code was completely in English), implemented a function for each property that would write its value to a hardcoded cell in a hardcoded excel file.
And this was just the tip of the iceberg. Needlessly to say that I had to rewrite the whole export in the night before we had to present the project.5 -
Our company maneuvered themselves into a classic technical debt situation with a project of a second team of devs.
They then left, signing a maintenance contract and now barely work on the project for exorbitant amounts of money.
Of course management got the idea to hand off the project to the first team, i.e. our team, even though we are not experts in that field and not familiar with the tech stack.
So after some time they have asked for estimates on when we think we are able to implement new features for the project and whom we need to hire to do so. They estimates returned are in the magnitude of years, even with specialists and reality is currently hitting management hard.
Code is undocumented, there are several databases, several frontends and (sometimes) interfaces between these which are all heavily woven into one another. A build is impossible, because only the previous devs had a working setup on their machines, as over time packages were not updated and they just added local changes to keep going. A lot of shit does not conform to any practices, it's just, "ohh yeah, you have to go into that file and delete that line and then in that other file change that hardcoded credential". A core platform is end of life and can be broken completely by one of the many frameworks it uses. In short, all knowledge is stowed away in the head of those devs and the codebase is a technical-debt-ridden pile of garbage.
Frankly I am not even sure whom I am more mad at. Management has fucked up hard. They let people go until "they reached a critical mass" of crucial employees. Only they were at critical mass when they started making the jobs for team 2 unappealing and did not realize that - because how could they, they are not qualified to judge who is crucial.
However the dev team behaved also like shitbags. They managed the whole project for years now and they a) actively excluded other devs from their project even though it was required by management, b) left the codebase in a catastrophic state and mentioned, "well we were always stuffed with work, there was no time for maintenance and documentation".
Hey assholes. You were the managers on that project. Upper management has no qualification to understand technical debt. They kept asking for features and you kept saying yes and hastily slapped them into the codebase, instead of giving proper time estimates which account for code quality, tests, reviews and documentation.
In the end team #2 was treated badly, so I kinda get their side. But up until the management change, which is relatively recent, they had a fantastic management who absolutely had let them take the time to account for quality when delivering features - and yet the code base looks like a river of diarrhea.
Frankly, fuck those guys.
Our management and our PM remain great and the team is amazing. A couple of days a week we are now looking at this horrible mess of a codebase and try to decide of whom to hire in order to help make it any less broken. At least it seems management accepted this reality, because they now have hired personnel qualified to understand technical details and because we did a technical analysis to provide those details.
Let's see how this whole thing goes.1 -
Crazy code.
You know when you come across some code, where you think: “I kinda see what you were going for, but it’s still hella dumb though...” right?
Currently doing some work on an F# backend, and the dev clearly knew enough of the language, but their code makes me question a lot.
The problem is simple: use a third party tool to generate images of each page in a pdf.
Said tool supports:
1. Querying the number of pages
2. Getting all pages as separate images in a single invocation
Can you guess how the dev solved it?
They’ve recursively incremented a page number, called the external tool to grab the image of that page.
“But how does it know when it’s run out of pages?” I hear you ask.
Simple. Catch the inevitable exception, and check against a hardcoded string literal to see whether it says “must be before the end of the document”.
I shit you not.
I nearly had an actual seizure when I was debugging some semi-related code and ended up in this wonderland of fuckery.
The recursion and pattern matching was flawless though, yet the tool’s website clearly states the supported functionality.
The whole thing feels like they tried to do it the right way, but couldn’t be bothered / couldn’t get it right, so they ended up creating this insane bit of madness.5 -
I was working on a very database heavy PHP app about six months ago. All database access was done directly, with hardcoded SQL strings.
I'd suggested switching over to an ORM during the upcoming major verson's rewrite, and FINALLY got approval to start integrating one.
The next week I'm told that I need to trash all the code I'd just written, since the decision to use an orm has been reversed.
The rationale? According to management, ORMs aren't "scalable enough for our application" and would "reduce developer productivity". I pointed out that we would be processing ~10 concurrent operations, maximum; I was told that the technically details didn't matter and the person I was working under had the final say because they'd worked at IBM, briefly, as an intern.
I stopped working on that project about two weeks later, thankfully.15 -
My manager thinks I am Superman! and he is so confident that can do any shit he wants me to do.
Yesterday he asked me to merge an ancient code hotfix (literally ancient) with latest branch of changes.
1. Hotfix is really old, most of the things are hardcoded, very specific to a stone age client.
2. Code documentation does not exist.
3. Developers of that code are probably dead.
4. Many Libraries which code uses are deprecated.
5. It's a legacy code, so no one has fucking idea what a particular clumsy block of code do, or what will happen if you remove it.
'if it runs don't touch it' policy by management.
Despite all this shit I successfully merged the the hotfix, refactored outdated code so as to run the application.
Showed this to my manager in full swag!
He was surprised at first, and asked me to show the code changes.
'Code review' was done by comparing files 😅
Manager: Dude, you have changed these lines, why? Explain.😧
Me: those lines won't work with new build, with new libs.☺️
Manager: then why can't you do old build with new changes?🙄
Me: umm.. wait... what???🤔
Manager: the code was working previously, it must be working even today without these changes.😡
Me: it was not working hence I made changes and now it's working fine see! ☺️
Manager: you have removed this, this and this!!! 😡
Me: but I also added that, that and that!😔
Manager: "don't touch it' if it works!"😡
Me: ... Idk what to say!
(In the back of my mind: "Don't touch it even it doesn't works!")😌8 -
I'm a jr developer. I started off in automation testing and don't mind it but the testing codebase is cancer, doesn't follow basic Java conventions even basic naming conventions like camelcase, and the tests are super slow using hardcoded Thread.sleep(). Since the automation tests are not automated, I have to run manually. YES manually, every morning I wake up early at 7am to run the 2.5 hour long tests (7am because this before people get to work and when the application goes back online). I run this bitch and monitor them but most of them fail anyways. I also have to write a email report on the results which means I have to explain why shit is failing so I have to debug all this crap. This shit literally eats up an additional 2-3 hours of my work day everyday and the time is not even accounted for. ALSO, since it's running on my laptop, it makes my computer slow most of the day. If I have to debug, I can't have the browser be headless so fuckin chrome browsers be popping up every 2 minutes. I did this for legitimately 8 sprints until I decided enough was enough and bitched about it and the team told me I had no choice. I eventually got them to push towards automating it but it's still in progress so I'm still running this dumb shit. The contractors try to take advantage of me any way they can by giving me mindless bitch work they don't want and they know I don't usually say no since I'm a jr resource. I hate running the fucking automation tumor. Sometimes I go into the meeting rooms alone to scream.
I feel like I'm wasting my life away and not learning as much as I could somewhere else10 -
Before becoming a developer, I used to work as a sales rep at this company that spent a good amount of time building what they believed to be an innovative state-of-the-art “code generator”. It was basically a scaffolding tool for generating software.
They were using it to auto generate customized iOS and Android native mobile app templates, along with a web backed.
The problem was that the generated code was shit, and the developers on the team basically spent more time fixing bugs than if they had built everything from scratch. But their passion for the product meant they just kept using it.
For some reason they never fixed issues in the original templates, so basically all the bugs that were found, kept showing up with each new app!
I have never seen apps like this that essentially had more bugs than features. Opening more than 10 app screen meant the app would freeze and crash. Sign up forms were actually dummy forms. The list goes on...
All the apps had the same shitty UI. For example, Product pages had a product image area that was like 5% of the screen view!
Last but not least, apps had a backend IP address hardcoded pointing to a server with an IP address that was temporary. So one day they had to restart the server and suddenly all customer apps stopped working and required a software update to work!
It was amazing seeing how a team of 3 developers trying to fix messy autogenerated code, couldn’t accomplish what was essentially a website on an app that I managed to build in my free time.
That’s how I knew it was time to quit my job and code full time.2 -
I hardcoded credentials into source code because I was too lazy to write the method to read them from the database properly.1
-
First Hackathon ends today. Long story short: I was the only programmer of the team, we only had 2 days to develop it (of which we spent the first day doing research, so 1 day of coding), so guess what it's shit.
I basically took a bootstrap theme, hardcoded some data. Put some js on top for interactions and a node js backend, to interface some APIs. Just by looking at the code you'll get cancer, but the others of the team where impressed, how good it looked an worked...
Let's hope the judges aren't familliar with coding as well (our challenge got two judges whereof one works at a bank as some guy whearing a suite and sponsoring stuff... Ao chances should be ok)
Honestly fuck this. Not one team (afaik) has pfoduced anything close to being finished...10 -
I've been so pissed off so many times, I thought I should divide them into categories.
- Pissed off at a fellow dev: I told him to use a constant instead of a hardcoded number.
He changed this: obj.method(3);
to this:
public static final int three = 3;
obj.method(three);
- Pissed off at management: I once got a $10 yearly raise.
- Pissed off at a client: They rejected our design proposal because the text was in spanish and they didn't speak spanish. It was lorem ipsum text.
- Pissed off at code: I once had to refactor a 500 line legacy jsp script with HTML, CSS, JS and Java completely intertwined.
- Pissed off at Twitter: They changed their API the day of our go-live, breaking all of their widgets, forcing us to move the go-live date and making me work an additional 8 hours after a week with almost no breaks.
- Pissed off at travel and logistics: They sent me to a hotel in Mexico City 2.5 hours away from the client's office.
Fun times...1 -
I created our login system to be secure and reliable.
One coworker hardcoded the roles a person who is logging in receives and built a backend to just assign roles you want. He pushed this to prod...
Yeah...2 -
Client: *uses Oracle on AWS RDS*
Ora: *licence about to expire*
Client: we need a cheaper and equally performant solution.
AWS: we have an outstanding Aurora db! Its performance is flawless!
Client: shut_up_and_take_my_money.png
Engineers: *migrating to Aurora mysql*
Engineers: fine-tuning the db for 2 months, adapting app code.
Aurora: *shits its pants during test ramp-up, delivers ~70% of Ora perf*
==========
Client: we need to do better!
AWS: try Aurora Postgresql!
Engineers: *migrating to Aurora postgresql*
Engineers: fine-tuning the db for 1 month.
Aurora: *shits its pants during test ramp-up, delivers ~40% of Ora perf*
AWS: let me see...
AWS DBAs: *fine-tuning the db for another 2 months*
Aurora: *survives ramp-up, delivers ~70% Ora perf*
AWS DBAs: your application is wrong.
We: Ora didn't complain about that...
AWS DBAs: umm.. Err.. Then your load test is wrong
We: ora wasn't complaining about that either...
AWS DBAs: errr.. Ummm.. Oh, I've got it! Your queries aren't optimized!
We: we cannot change queried - they are hardcoded by our framework's vendor
AWS DBAs: well there you go! Your queries aren't optimized! It's your fault, not aurora's
yyeeahhhh... Riight...
From my xp, aws support and aws engineers ALWAYS try to put the blame on a client. Always. Even when they're obviously wrong.15 -
Nightmare IRL:
Your colleague is in PTO for 2 weeks.
You are in charge of maintaining his project along with yours, CI, code, tests and everything.
Your colleague's code base is a real master piece of shit when you look at it closer. By shit, I mean hardcoded values everywhere, random sleeps now and then, 20 if branches that could be replaced by maps, variables named a b c d everywhere, try catch to silence errors that should not be silenced, etc.
Your colleague left the CI and code broken as shit. Takes forever to run on my goddamn computer.
PMs are spamming you: "What is going on? It's red everywhere. Help! Plz fix this! We are going to release tomorrow!"
FML6 -
git add -A
git commit -m "fix bunch of shit.'
git push origin master
**98 files changed
hours later
me: omg I forgot to change the hardcoded IP now it's getting 404
git add -A
git commit --amend
git push origin master --force2 -
Just spent 30 minutes confused as hell because an API call I wrote just randomly stopped working.
Forgot that I hardcoded an ID for testing purposes and then ended up creating a new object with a new ID.
Needless to say... they didn't match. Explains why my query retrieved zero results. -
So I found this consulting job a while ago thinking that some extra cash while studying would be nice to have.
I meet with the guy, a researcher trying to start a business up, good for him I think, maybe we'll hit it off, continue working, why not? Except he has no clue how to write working code, all he ever did was writing matlab scripts he says, thats why he hired me he says.
Okay, fine, you do your job I do mine.
He hands me the contract, its about comparing two libraries, finding out which one is better suited for his job, cool, plots and graphs everywhere.
Except this is an unpaid job. YOU WHAT?! It's a test job. FINE. At least it'll look good on my resume.
We talk about the paid part where I'm supposed to scale the two libraries, looks good, as expected from an ML engineering perspective. It comes to payment. The dude has no idea how taxes work, says he has a set amount to pay and not a penny more. I explain with examples how taxes are paid, how you get reimbursed for them and so on. Won't budge. Screws me over.
Opens the door for other jobs I think, he'll learn next time I think and take the job.
Fast forward a month, 90% of the job done, he adds a third thing to compare. Gives a github link to a repo with 2 authors, last commit a year ago. There are links to a 404, claiming compiled jars. Fuck.
Not my first rodeo, git clone that shit, make compile, the works. The thing uses libs that ain't in no repo, that would be too easy. Run, error, find lib, remake all the things, rinse repeat.
The scripts they got have hardcoded paths and filenames for 2 year old binaries, remake that shit.
It works, at least I get a prompt now. Try the example files they got, no luck, some missing unlinked binary somewhere, but not a name mentioned. Cross reference the shit outta the libs mentioned on readme, find the missing shit, down it.
Available versions are too new, THE MOLDING NUTCRACKER uses some bug in an old version of the lib.
I give up. Fuck this. This ain't worth the money OR time. Wanker... -
"There's more to it"
This is something that has been bugging me for a long time now, so <rant>.
Yesterday in one of my chats in Telegram I had a question from someone wanting to make their laptop completely bulletproof privacy respecting, yada yada.. down to the MAC address being randomized. Now I am a networking guy.. or at least I like to think I am.
So I told him, routers must block any MAC addresses from leaking out. So the MAC address is only relevant inside of the network you're in. IPv6 changes this and there is network discovery involved with fandroids and cryphones where WiFi remains turned on as you leave the house (price of convenience amirite?) - but I'll get back to that later.
Now for a laptop MAC address randomization isn't exactly relevant yet I'd say.. at least in something other than Windows where your privacy is right out the window anyway. MAC randomization while Nadella does the whole assfuck, sign me up! /s
So let's assume Linux. No MAC randomization, not necessary, privacy respecting nonetheless. MAC addresses do not leak outside of the network in traditional IPv4 networking. So what would you be worried about inside the network? A hacker inside Starbucks? This is the question I asked him, and argued that if you don't trust the network (and with a public hotspot I personally don't) you shouldn't connect to it in the first place. And since I recall MAC randomization being discussed on the ISC's dhcp-users mailing list a few months ago (http://isc-dhcp-users.2343191.n4.nabble.com/...), I linked that in as well. These are the hardcore networking guys, on the forum of one of the granddaddies of the internet. They make BIND which pretty much everyone uses. It's the de facto standard DNS server out there.
The reply to all of this was simply to the "don't connect to it if you don't trust it" - I guess that's all the privacy nut could argue with. And here we get to the topic of this rant. The almighty rebuttal "there's more to it than that!1! HTTPS doesn't require trust anymore!1!"
... An encrypted connection to a website meaning that you could connect to just about any hostile network. Are you fucking retarded? Ever heard of SSL stripping? Yeah HSTS solves that but only a handful of websites use it and it doesn't scale up properly, since it's pretty much a hardcoded list in web browsers. And you know what? Yes "there's more to it"! There's more to networking than just web browsing. There's 65 THOUSAND ports available on both TCP and UDP, and there you go narrow your understanding of networking to just 2 of them - 80 and 443. Yes there's a lot more to it. But not exactly the kind of thing you're arguing about.
Enjoy your cheap-ass Xiaomeme phone where the "phone" part means phoning home to China, and raging about the Google apps on there. Then try to solve problems that aren't actually problems and pretty vital network components, just because it's an identifier.
</rant>
P.S. I do care a lot about privacy. My web and mail servers for example do not know where my visitors are coming from. All they see is some reverse proxies that they think is the whole internet. So yes I care about my own and others' privacy. But you know.. I'm old-fashioned. I like to solve problems with actual solutions.11 -
Mocking hardcoded data in frozen constants in Rails is such a fucking pain! Why must this be so difficult!?
asfdfakldsjfuck9 -
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 -
Last year, one of our assignments for school was to implement a caesar cipher in Java. There is that one guy, that doesn't understand the concept of dynamic variables, so he HARDCODED every single possibility for every character. More than 1000 lines for something this simple. Yes, we are studying informatics. Yes, he passed last year1
-
You know what, let me jump in on the "I hate PHP" bandwagon.
A couple months ago I upgraded my mail servers unattended. Roundcube got fucked for a couple of months, and I figured.. fuck it, I can still use Dovecot for authenticating with desktop mail clients like K-9.
Recently I unfucked it, turns out that it was an issue with the sock file in php-fpm. That's also when I noticed that PHP apparently hardcodes in its current version in the bloody socket file. Because why the fuck wouldn't you? It makes upgrades so much fucking easier!!! Said no fucking sysadmin ever!!!
And today I upgraded one of my mail servers to Ubuntu Server 18.04, finally, after a lot of hesitation. Bad decision, because now PHP got fucked YET AGAIN.
Again an issue with socket files? I have no fucking idea. systemctl shows no failed services (because you know PHP, why would you fail your service with an error message instead of throwing a meaningless 502 Bad Gateway, right?!!) and looking at the config files, well the socket file got its new php-fpm 7.2 file (still got the fucking version number hardcoded in) and thus I changed that socket file location in /etc/php/7.0...
devRant may just have been my rubber duck.
WHY THE FUCK DO YOU STINKING FUCKING PILE OF SHIT CALLED FUCKING PHP KEEP THE FUCKING 7.0 DIRECTORY OUT THERE WHEN YOU'VE UPGRADED, WITHOUT EVEN HAVING THE FUCKING BALLS TO RENAME THE MOTHERFUCKING DIRECTORY TO 7.2, IF YOU'RE GOING TO HARDCODE IN YOUR VERSION NUMBERS ANYWAY?!!!!!
Bloody fucking pile of fucking junk!!!!18 -
mfucking piece of garbage.
filth could be cleaned, but that mess can onle be purged by a supernova along with the galaxy.
when you explain a whole fucking week to someone that the goal is to have an adaptive algorithm that detects a version and handles different versions in an best effort principle....
YEAH.
YOU GET A LIBRARY WITH HARDCODED VERSION ENUMERATION AND NO ADAPTIVE ALGORITHM AT ALL.
For fucks sake, the stupidity of devs drive me insane.
So lets start from the beginning, best send them back to kindergarten, so they learn that a square is not a circle.2 -
Booleans that are hardcoded as true for a test, that you don't change the value at all
But they still switch to false by itself
Can I go to bed pls I don't want to deal with that3 -
TLDR: Just had a "I am god" moment because something worked on the first try.
Been working on hooking into and modifying a plugin's central function and related output for almost two weeks now. The documentation is garbage and the source code is ... fine, I guess.
I had been working on getting the filter & display working on a form with sample data I'd put together. I finally got the desired result before I left on Friday, but had the sample selectors hardcoded in.
Within a couple of hours this morning, after fiddling around with pulling the needed data dynamically, I navigated to and checked out the function on the intended page for the very first time since starting the project and IT FUCKING WORKED RIGHT AWAY.
I let out a forceful "yussss" under my breath and stood up with my fists in the air. Nobody noticed. But at least I get to show my manager the fully functioning thing this afternoon instead of the hard-coded sample-only I had when he checked in with me this morning.1 -
!rant
Update & Thoughts of AngelHack10 Abu Dhabi.
The judges were so non technical they were impressed by an app demo (not ours) that could recognize objects printed in black and white on an A4 paper. The app claimed to read the 3d shape of a device and calculate the running cost based on its power consumption.
I think hackathons must have two pitches one technical and one business. Else every one with hardcoded demos can fool the judges easily.1 -
"Just hardcoded the thing so in tomorrow meeting works"
And it repeated before every fucking meeting. -
I don't understand how people can write code, but be completely inept at developing software.
Take a zoom feature:
SOLUTION 0:
- Use 2 buttons
- Use 2 button listeners
- Use 2 float variables (for each button).
- Don't log anything.
- Use 3 crazy, hardcoded, constant, int literals like 66, 30...
- both buttons manipulate the same text field.
- no logging.
- Both listeners use if/else to check if the variable is within a range -- one if/else for each listener.
- Use crazy method calls to get text size.
SOLUTION 1:
- Use a slider.
- Use a single listener.
- No variables needed.
- Use a linear equation for zooming.
- has logging.8 -
To all people who hardcoded stuff like tables in HTML and even rant about how much work this was or how many lines of code they wrote, please stop the madness, please don't talk until you get the basics of programming and why computers are quite handy to handle repetitive tasks.4
-
Windows 10 likes to set my Temp variables back to C after an update, as well as enabling Superfetch and Prefetch. I made a batch file fixing all that shit...1
-
I was working on email reporting to business customers and in the test phase was mass sending email to my own account. However it suddenly stopped working and it took me a few minutes to realize I had commented out the hardcoded line with my email address. I had to write to each Customer and apologize for the spam after my error. Also had to get whitelisted our email server after the incident with a few.2
-
Proudest bug squash? Probably the time I fixed a few bugs by accident when I was just trying to clean up an ex-coworker's messy code.
So I used to work with a guy who was not a very good programmer. It's hard to explain exactly why other than to say that he never really grew out of the college mindset. He never really learned the importance of critical thinking and problem-solving. He did everything "by the book" to a point where if he ran into an issue that had no textbook solution, he would spin his wheels for weeks while constantly lying to us about his progress until one of us would finally notice and take the problem off his plate. His code was technically functional, but still very bad.
Quick Background: Our team is responsible for deploying and maintaining cloud resources in AWS and Azure. We do this with Terraform, a domain-specific language that lets us define all our infrastructure as code and automate everything.
After he left, I took on the work to modify some of the Terraform code he'd written. In the process, I discovered what I like to call "The Übervariable", a map of at least 80 items, many of them completely unrelated to each other, which were all referenced exactly once in his code and never modified. Basically it was a dynamic collection variable holding 80+ constants. Some of these constants were only used in mathematical expressions with multiple other constants from the same data structure, resulting in a new value that would also be a constant. Some of the constants were identical values that could never possibly differ, but were still stored as separate values in the map.
After I made the modification I was supposed to make, I decided I was so bothered by his shitty code that I would spend some extra time fixing and optimizing it. The end result: one week of work, 800 lines of code deleted, 30 lines added, and a massive increase in efficiency. I deleted the Übervariable and hardcoded most of the values it contained since there was no possible reason for any of them to change in the future. In the process, I accidentally fixed three bugs that had been printing ominous-sounding warnings to the console whenever the code was run.
I have a lot of stories about this guy. I should post some more of them eventually.2 -
I once thought that developing on WordPress was cool and easy. Now I see that it's a total abomination.
No more WordPress job for me. I'm gtfo.3 -
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 -
!rant
the most popular ecommerce solution in php is a massive (cosmological scale) pile of corporate crap (magento) and the next most popular is an abomination (opencart)
after fucking around with both for a month (the client asked for the project to be using only one of the two) I'm still barely reaching any results, and most of my time is wasted with the stupid bloated spaghetti that is opencart FUCK THIS,
like seriously. who the fuck writes a single line three left joins sql querry with four or five aliases a couple concacts and a bunch sorting fuckeries just to query the categories list, then just query the details of the specific category from a different function,
also why the fuck map each language string manually. or the fucking hardcoded seo urls, or the use of myisam for all tables, and no fucking foreign keys, let that settle for a minute, no foreign keys, the delete method in the model has at least a twenty lines, and then he came with the genius idea of duplicating models, in the front and the backend, accessing the same data, as the same user, but different naming conventions
I'm going to convince him to use something sane like codeigniter/laravel/fuelphp or I'll deny the project8 -
Checking for a hardcoded password and submitting User and password in a hidden Input each time.
Didn't know about Sessions back then -
In This Rant: A mildly satisfying piece of mind story.
Using code to prove yourself right is a hell of a drug.
A few weeks ago I whipped up a tiny program that downloads configs from hardware we manage. Since the vendor's API documentation is hidden behind a pay wall, my method of extraction is different. It results in bigger files, but testing showed it to still be valid.
Enter today. Interns at work downloaded a config to load onto a spare machine and it won't work.
"TheCapeGreek, your configs don't work"
I was confused since I tested the files when I built it and it worked. I am also currently fleshing out that download utility's features so the fear that I've been wasting the past 2 weeks on improvements is looming.
Last 15 minutes of the day and nothing else to do so I figured I might as well whip up a string comparer. The smaller file's content is scattered in the big file so a direct diff won't work.
Code it all, quick hardcoded proof of concept code, bit it got the job done. I was right, my bigger file is still correct!
Turns out the issue was with the machine they were configuring. They found this out before I finished my test code, so I'm off the hook already, but it was good to have piece of mind haha!1 -
Back at <biginternationalorg> I witnessed a developer deliberately build an xss vuln into a company web application, so that he could plug a JS file in with all of his passwords hardcoded. Bear in mind, this is an org that provides services to both the UK and US military, and if you have access to some stuff you have access to the tools you need to impersonate high-ranking military folks.
I know its like, twenty different passwords, but that's what a goddamn keychain is for! If you don't trust windows keychains, do what I did and run a VM with a Foss keychain installed! Don't build a vuln right into a public facing web app, that's just stupidity. -
Going through a startup code
...
// TODO: implement!
...
// FIXME: this is so messed up
...
...
// HACK: works for now, find a better way
...
// HACK: hardcoded for now
...
// FIXME: this doesn't work, crash here
...
...
// TODO: this probably should be a separate class
...
// TODO: change messed up variable names
...
// FIXME: WTF is this, Dave?!
...
...
// TODO: remove this before release2 -
some shitty scam site is "giving away free gams" like Hello Neighbor, FNAF, etc.
Someone asked me to look at one of their EXEs.
Electron app with nothing really going on and a hardcoded key.
Turns out all this shit is systematic. A couple splash screens and a config file for "download" size, name, key, download page, etc. and they're immediately ready to ship the cookie-cutter scam program meant for "free license key BUT SURVEY FOR OUR PROTECTION" ad revenue.
Have source of the Hello Neighbor one i guess?
(jesus, 204MB of source for an 8MB dropper app???)
https://drive.google.com/open/...1 -
Boss: "You hardcoded the redirect uri in the code (Early on during development and forgot about it, because apple OAuth is a piece of shit), but don't worry I fixed it by hardcoding the uri with the production host into the config file where clearly all settings are fetched from the OS Environment variables at runtime. This will surely fix the problem in staging we have, no need to thank me"5
-
I've seen JavaScript client-side app that was connecting directly to DB using hardcoded (obfuscated, lol) DB password xD
And yes, there was no DB setting that this user is read-only and only from few tables. It was like GRANT * ON *. -
Please share the weirdest business logic you had to implement!
I remember having to filter certain categories and specific movies based on ID that were.. Well.. German porn.. Hardcoded Ids, not proud2 -
FUCK MICROSOFT!!! WHAT THE ACTUAL FUCK!?!?!?!? WHY IS THIS EVEN A THING!?!?!?!?
WHYYYYYY HAVE WE GOT A FUCKING DARK THEME IF WHEN I ADD ANNOTATIONS IN SSIS IT'S HARDCODED COLOURS.
No...seriously...not only am i doing this bullshit waste of time redundant annotations for some bullshit client that thinks they know shit but when I use the dark theme like a normal person, if you go back to a normal theme, all annotations in white.
Just finished like 30 packages on this slow ass remote connection and now all these backward ass people that use light themes (like everyone but me) can't see anything written.
Fuck you Microsoft!!!!! Soooooo many fucks for you right now....don't even know how to express the fucks.4 -
Got in trouble yesterday for deploying to a QA environment and NOT sudo vimming a file to change the hardcoded email recipient... Maybe, the dev who wrote that file should use our configuration files instead of hardcoding it!
-
A "portal" built on Drupal 7. Started by someone who cannot do anything outside Drupal, and overseen by someone who believes JS to be "low level programming" (he literally said that).
What normally would be a table with 7 columns is instead 7 tables joined together. That goes for each data structure.
Each page, built in a separate module, either manually includes the same css files, or simply copy/pastes them.
Old, legacy modules have been hacked, and now depend on newer modules... Which, in turn, depend on the same old ones.
The theme contains huge, hardcoded parts of logic, so it can never be updated.
Worst part of it? It's only 3 years old. And there are people buying it as SaS. Already hitting bottlenecks at 2k users. -
Working on some 2 year old php code don't know who has written it.
Found a function with some 500 lines of code and there is 3 times MySQL connection is initiated overriding same fucking variable with hardcoded database parameters in all of them
What the fuck man😦😦😦
Plus I have just started revewing the code there are tons of files and everywhere connection is hardcoded.4 -
Google, please explain to me: Why the fuck would you create a hardcoded requirement in your libraries to use a plaintext json file with credentials to your API?
Credentials which give full access to all of the company email, addresses, cloud services, etc?
And why would you accompany this in your docs with example implementations which read as if they were an intern's first coding project — non psr compliant PHP, snippets of Go which won't compile due to type errors...
I'm starting to become convinced that the whole of the Google Cloud API was actually written by thirteen year old who found their parent's liquor cabinet.
Fuck this I'll build my own Google.1 -
Had a 5 hour call today, where we wanted to set up a system from one of our subcontractors in our own environment. Struggled forever to get the backend up and running.
Turns out that some dependencies were hardcoded as local file URLs...
No, our linux machine does not have C:\Users\<username> 🙄 -
I work for an investment wank. Worked for a few. The classic setup - it's like something out of a museum, and they HATE engineers. You are only of value if work on the trade floor close to the money.
They treat software engineering like it's data entry. For the local roles they demand x number of years experience, but almost all roles are outsourced, and they take literally ANYONE the agency offers. Most of them can't even write a for loop. They don't know what recursion is.
If you put in a tech test, the agency cries to a PMO, who calls you a bully, and hires the clueless intern. An intern or two is great, if they have passion, but you don't want a whole department staffed by interns, especially ones who make clear they only took this job for the money. Literally takes 100 people to change a lightbulb. More meetings and bullshit than development.
The Head of Engineering worked with Cobol, can't write code, has no idea what anyone does, hates Agile, hates JIRA. Clueless, bitter, insecure dinosaur. In no position to know who to hire or what developers should be doing. Randomly deletes tickets and epics from JIRA in spite, then screams about deadlines.
Testing is the same in all 3 environments - Dev, SIT, and UAT. They have literally deployment instructions they run in all 3 - that is their "testing". The Head of Engineering doesn't believe test automation is possible.
They literally don't have architects. Literally no form of technical leadership whatsoever. Just screaming PMOs and lots of intern devs.
PMO full of lots of BAs refuses to use JIRA. Doesn't think it is its job to talk to the clients. Does nothing really except demands 2 hour phone calls every day which ALL developers and testers must attend to get shouted at. No screenshare. Just pure chaos. No system. Not Agile. Not Waterfall. Just spam the shit out of you, literally 2,000 emails a day, then scream if one task was missed.
Developers, PMO, everyone spends ALL day in Zoom. Zoom call after call. Almost no code is ever written. Whatever code is written is so bad. No design patterns. Hardcoded to death. Then when a new feature comes in that should take the day, it takes these unskilled devs 6 months, with PMO screaming like a banshee, demanding literally 12 hours days and weekends.
Everything on spreadsheets. Every JIRA ticket is copy pasted to Excel and emailed around, though Excel can do this.
The DevOps team doesn't know how to use Jenkins or GitHub.
You are not allowed to use NoSQL database because it is high risk.2 -
DAYLIGHT SAVING!!
Up to this point, I was indifferent to the issue if it should be kept or not. My sleep schedule is fucked and non-routine anyway so one hour plus or minus doesn't play any role.
I got to a meeting scheduling problem, when I have 2 timestamps in variable timezones and want to calculate time difference. Both can have DST active. There is no algortihmic way to figure out. I checked SO and pytz and it's just a list of hardcoded dates when DST starts and ends. WHATHTEHELL.jpg
Not only we should abolish the DST, we should force the whole world into UTC/Zulu. And those, who refuse to adapt to UTC, will be forced to work with plain integer epoch dates.3 -
who's so stressed out right now? me.
why? i need to change the access token in my code because it was changed
why is that stressful? because there is no variable for it, it was hardcoded
who coded that? me.
when? when the whole dev team was drunk asf
fml1 -
Small chaotic startup that never grew up (15 years atm).
Hosts/maintains a number of apps/sites for various customers.
At some point, someone decides that a CMS would be usefull to maintain the content across all products. Forgoing all sense, reason and the very notion of "additional maintenance and dev" it is decided that one should be built in-house.
Fast forward a number of years.
Ops performs routine maintenance on prod-servers. A java-patch accidently knocks out one of the pillars a 3rd party lib the CMS uses for storing images. CMS basically burst in to flames causing a.... significant incident.
Enter yours truly to fix the mess.
Spend a few days replacing the affected 3rd party lib. Run tests on CMS in test and staging environments. Apply java-patch. All seems fine.
When speaking to frontenders and app-devs, a significant hurdle present itself:
All test/staging instances of all websites/apps/etc ALL USE PRODUCTION CMS. Hardcoded. No way around.
There is -no- way to properly test and verify the functionality of any changes made to the home-brewed CMS.
My patch did indeed work in the end.
But did the company learn anything? Did they listen to my reasoning, pleading or even anguished screams for sanity?
No.6 -
WHY THE FUCK IS THE UPGRADE UNZIP DIR HARDCODED IN WORDPRESS TO A LOCATION IN THE WEBROOT????????? It should be /tmp.... I always knew wordpress devs were... special...3
-
Fuck you, magento and yes, fuck you, customer as well.
After 2 days of fixing crucial things like missing discount functionalities, taxes being displayed as 'tax' because some monkey hardcoded the term in the template instead of getting the tax class name and overall fumbling in magento's core just to make this broken shit do its job, the customer emails me, asking if we're making 'progress at all because the test link looks pretty unfinished'
Burn in hell, you two!12 -
Forgive me Linus for I have sinned. It has been since the dawn of time since my last confession.
I hardcoded naming conventions for file names into a script that is used to remove incorrect lines of text that are created during our process to create the files that we send out so that healthcare claims get paid correctly and copy and pasted the code for each new state’s health plan since the users(who are supposed to be technically inclined as they’re in IT as support analysts) can barely figure out how to set up the excel file to remove the lines. There are now 18 files of the same python script with different US States’ names.2 -
My client had a meeting and presentation of app for one possible client of that app. I, as a developer of that app, left a hardcoded id,I saw it but forgot about it immediately. Let's just say filtering did not work properly. Sorry.1
-
I wasted fucking hours just trying to find out why curl doesn't send the data I've interpolated from a variable.
It doesn't even send the fucking hardcoded part of the data. I've compared it with a curl command generated by firefox, which works fine. Literally the only difference is that I interpolate a variable and I've echoed the contents of that variable and that was fine as well. I've even checked the interpolated string and it was fine.
And then I moved more stuff into the hardcoded part and it just started to work.
Wtf is this bullshit. I really feel like learning intermediate bash scripting is just a waste of time, just how complicated can you make debugging something so simple.
Every fucking time I give bash scripting a chance this shit costs me so much time, patience and motivation, I really wanna prefer that shit to python, because managing python dependencies for a script sucks ass^2,, but at least I can get shit done in Python. Just fucking end me or give me a language that doesn't make me wanna shoot myself5 -
I swear that Netlify CMS is straight up magic. Finally something that is simple and unopinionated and just works out of the box. After understanding how it works I just plugged it into a hardcoded project and the hardest part was just copy-pasting the content.2
-
Ordered to implement Old functionality in New system, not allowed to fix it, refactor or change the underlaying mess.
Wrap old system in a wcf, hardcoded some values, done.
3 weeks estimated so I feel ahead and got more time to look for a New job. -
DAILY LARAVEL PROBLEMS
I need to parse a JWT with some custom claims. There's a JWT library with Laravel; documentation really lacking, kinda hardcoded to work with Laravel but whatever; it's already installed, let's see what can I do with it.
It turns out I can't say something like "take this token, parse it, tell me it's valid". Let's see how that goes.
You need to build a parsing class with a manager, some auth stuff, a parser.
To build said manager you need a provider that implements a contract, a blacklist, a factory (of what?)
To build the factory (of what?) you need a claim factory and a payload validator
To build the claim factory you need a request
To build the blacklist you need a Storage
To build the storage you need a CacheContract
To build a CacheContract you need IDK it's a mess
To build the contract you need... IDK for real
WHY LARAVEL IS SHIT: 'cause only in this framework it seems reasonable to build this clusterfuck to parse a base64 encoded string, throw some json_decode and check a signature. And have it work only to authenticate a user.1 -
When date format is hard coded and application goes international. Application works ok until day turns 13. Error is seen a couple of days later, then it's the 1st again and everything is ok. Just to mention one of many strange errors. Just to make it harder, app works well if running in other countries that is using the same format. Daahh1
-
The getting started of react native sucks big time.
If you don't want to display a completely centered text then go fuck yourself or what?
I mean there isn't even a howto on platform-independently not overlapping the fucking status bar. Everyone must've faced this problem when starting, but the only answer is an 8 times upvoted answer on SO telling me to add a hardcoded padding. What.
Where did this whole thing come to..🙁
Back in the days books about c didn't even start with more than 4 lines of code on the 70th page.
And when you google things about it it feels like you doing something totally wrong but its like the first thing a normal dude would do, what if i don't want shit centered bro i feel so useless and dumb i friggin hate that shit just fucking tell me what the fucking fuck to do!😫
It bugs me so hard cus i didn't even know a View is able to stick out on top of the app it doesn't make no sense to me the whole world is breaking apart12 -
So for a side project, I had to understand the reasoning of a former project for this one. I was told it's the most clean and the most reliable I could get.
I scroll in the classes developed, then suddendly in a comment :
"TODO : Hardcoded for now, will be expected to change"
oh fuck me. -
So some guys at my brother's college made a sports live score app, which charges 1$ for getting score. He decompiles it, and what we see is bewildering, it is not obfuscated and the link to the json values are hardcoded in the app and the whole login process is just a sham. Seriously, WTF, were the guys thinking!4
-
I once used some Windows theme hack in Windows 7 to be able to get a dark background in Explorer.
As a side-effect, Microsoft Word shows me the same dark background as well for its documents even though I didn't tell it to. I didn't mind, though...
But now the fun part: When I wanted to print out the document, it prints with that same dark background... seriously, is this shit hardcoded in?! No wonder you couldn't get a proper dark theme with Windows 7!
(I hope Windows 10 full dark theme won't have this weird issue!)2 -
yo imagine if the most common and best toolchain for, say, Intel PCs was "mid-source": You can have the buildscripts, and a few extra seldom-useful bits, but nothing else.
Welcome to devkitPro: it's too hard to maintain a toolchain package for all the systems you develop on, so we'll maintain a modded copy of pacman you HAVE to use to get the only toolchain for Nintendo consoles for all systems. Oh, and it's not normal pacman, no, it's hardcoded to only be used for their shit.
Even on Windows.
why do they do this to us again?16 -
Extremely frustrated with the release process and versioning system at my current company. Don't know if this is same everywhere or the half ass release managers can't think of a better way here.
Basically for any client raised issue that can't wait for next release are built as a hotfix. However hotfixes are never bundled togather or shiped to other clients. This is causing a vicious chain, two clients raise two separate issues on same version. Instead of fixing them as single hotfix (however minor the issues) we create two hotfix versions for each with only their issue. A week later same clients come back with the issue the other raised. Once again instead of bundling what is now effectively same code we build hotfixes on top of the clients respective branches. We now have two branches to maintain with same codebase. No matter how serious issue, the hotfix is never made generally available and always created on client's specific hotfix version.
Now that was an example for only two clients, in reality we have released five patch versions of a product in last 2 years. Each product version contains about a dozen artifacts (webapps, thick clients, etc) with its own version. Each product version being shipped to various clients. Clients being big banks never take a patch of product even if it fixes their issues and continues requesting hotfix. We continue building hotfixes on client branch and creat ever increasing tech debt. There is never a chance to clean up or new development. Just keep doing hotfix after hotfix of same things.
To top if all off, old branches are still in svn while new in git. Old branches still compile with ant new with maven. Old still build with java 5,6,7 while current with 8. Old still build from old jenkins serve pipelines while new has different build server. Old branches had hardcoded integration db details which no longer exists so if tou forget to change before releasing it doesn't work.
Please tell me this is not normal and that there are better ways to do this? Apologies I think I rambled on for too long 😅5 -
I'm too embarrassed to show my team leaders code to other developers..
unreadable, no tests, parameters hardcoded..
But managers want to "help him grow"..
When do you decide you can't fix a lemon?4 -
Have you ever found a infinite task? Well, I did.
So, the software that I'm working now was under responsibility of another company for development and maintenance (I'll call them X) from 2014 to last month , and the company I work for was handling only with the business part. Now we took all the development for us as well.
This software has a lot of reports , so it has a lot of templates for this reports.
When X was handling the software, they asked the client and the old project manager if they wanted the templates to have the client's products dynamic (no need to change the template when adding a new product) or hardcoded for some products they already had, they choose hardcoded because it would be faster. Butterfly effect.
Fast forward to this week, the team leader designated a task for me, It looked easy at first, just fix 2 templates, easy.
Oh boy, I was so wrong.
I fixed the first template, discovering in the process the hardcoded things, had to add the product reference in a lot of places.
So i went to the second item, a super template that they use to put together some smaller templates.
It was really weird, I couldn't find all the templates that it was supposed to use, and I didn't really know the exact problem, the only thing I knew was that it was not being generated, the reason could be the super template itself or one of the 15 smaller templates, that could happen to have sub templates.
So I called the team leader and explained to him wtf was happening, he called the senior business analyst, that called the PM, we agreed that it would be infinite because of those fucking hardcoded things, they prepared a excel sheet with this and a lot of other problems and will send this to the client, explaining that we'll need a lot of time to put this new product up and running.
Now I'm in the middle of this shit storm seeing a time of darkness in the future.
Ps: This new product was supposed to be inserted in the software since last November, when it was under X responsability, and they analyzed it and said that it would take 190 hours to be completely done, the client refused. It was the first rain drop of what would become a shit storm. -
I wasn't happy with one of our UI views for editing a database query that consisted of about 50 fields ("editing" being the operative term here, not just viewing. It had to be two-way). Everything was hardcoded and defined manually, with each block of ~10 lines being repeated and mostly identical apart from the occasional double inline field and name of the variable. It had "just ended up that way" over time due to the variable names in the UI being different than the names of the variables that came from the API.
I decided to overhaul it all where I defined the different input components and which fields should be included, then made a function which would generate the page based on these definitions. It was about 500 lines of modularized functions and classes where the class for the actual view was about 50 lines- compared to the 1400+ lines of the previous version.
But, it didn't work. It should, but it "just didn't". There was no error. All I got was a blank, solid white page. I could make a drastic change or try something completely different and I would get the same error, same blank page. API fetch succeeded, value assignments succeeded, the object exists, but if you iterated it it was... empty.
I started getting really discouraged that I had made it too abstract. Maybe I actually made it more complex and unreadable than before. Maybe just hardcoding it all was the better solution after all. Maybe I had gone against KISS and overdesigned it.
I was up pretty late and everyone had gone home. When the last guy left there was that mood where "yeah if I can't make this work we'll just use the current version...".
Turns out I had tried iterating over a property of the set of fields to render, rather than the entire collection. In the old method the variables were a member of an object, but now they were its own object, a change I had made to isolate the set of values which were to be viewed/edited and make them easier to pass back and forth. This member existed since I hadn't cleaned it out yet, but it was empty.
I had been banging my head against this for a whole day and I was ready to admit I had made a mistake and wasted my time before discarding it all, but then I backspaced this one property and the interface went from empty to rendering perfectly and with all functionality intact. I swear god rays were coming out of my screen. -
In spent more than an hour trying to figure out why a form didn't work.
I pressed the submit button and nothing happened, no error in the console and nothing in the Network tab in Chrome's devtools. And the action was being executed!
Then I found out there was a catch somewhere. I removed and it said that the url was wrong. But again, I debugged it and nothing seemed wrong. I even hardcoded the values.
At the end, it turned out that the initial "/" was missing in the request url... -
TL;DR: idiot 'team leader' does mindless merge to master. Precious time wasted in a high pressure deadline environment.
So, i work currently at one of Belgiums largest consulting company's at brussels airport, we are moving their analytics platform to the cloud.
We use puppet to manage the systems.
When i started i noticed immediately that their 'development workflow' is hardly to be named as such, because they simply change stuff directly on server , manual 'temporary' fixes everywhere, hardcoded stuff, non validated code... Basically the way one would develop in their garage, not in a consulting company as this one. But that is just the beginning.
A month ago i did a major effort to equalize all the discrepancies between the codebase and the server. Ensured entire codebase to be validated, syntax checked, parsed, tested... It works. A 'great codebase overhaul' commit was PR'ed to master and got merged.
Yesterday the team lead, i'll call him 'B-tard' from here on, has also 'equalized the discrepancies between codebase, server and the restnof the stale branches on the repo' . i was doing my other work on my branch so no fucks given. This is where i should have given some fucks.
Anyways, today. The day starts every day with merging the master branch into your working branh because you need the latest working codebase, right?
Wrong!
This fucking dipshit smug b-tard has done a mindless merge of the entire codebase, effectively removing ALL validated working code for provisioning servers. Control blocks, lookup functions, lambda's... Basically everything he did not understand.
At the same time the project is already way beyond the allotted budget in pkney and time, so there is a huge pressure to have a working 'production' environment TODAY!
THIS MOTHERFUCKING B-TARD JUST MADE THAT IMPOSSIBLE.
i'm loving this assignment, i'm loving the PM, the collegues, the environment, the location... everything. All but this fuckibg b-tard that somehow got his position by sucking dick or licking ass or both...
I wanna get out asap.
Oh... While typing this and arriving at the room of the office... It is locked, i have no key.
Fucking asshole!1 -
Binary combinatory logic (BCL) is gonna change the world. Yes, it's an esolang, but its easy to evolve populations of programs written in it. Then, when you have a winner, you can easily embed it in a C binary as a hardcoded arg to your interpreter function. Or use logic to translate it to any other programming language.1
-
I fucking hate people who uses complex words to describe something simple.
Describing a frame work
Show-off : "..you can define what objects/tables to expose, what values in that object you want to expose...if you are using some orm, then because you have models defined. Once you update your model, your endpoints get the new model..."
Simpleton : "something like parse..."
Wtf is 'fixedUUID'?
Show-off: "..hardcoded UUID is fixed (constant) value, with format of UUID, hardcoded UUID will be unique value between backend and frontend,
you will need to store it as constant value in your codebase ( we may encrypt/ decrypt it for security reasons)..."
Simpleton : "a secret password only u & I know"
--why whyyyyyyyyyy2 -
IE11 weird behaviour!!
So I'm building a website for management purpose. I'm asked to implement confirm pop up box.
This pop up box uses one div with dynamic content which is created using javascript and not hardcoded in html file.
Here comes the twist. I used append() function to append child elements inside that div. Everything works fine in chrome and Firefox. Pop up shows upon clicking button. But in case of IE 11, on clicking button, It asks user to download fucking json file, instead of showing pop up !!
I'm like WTF is going on??? How the fuck this json file is generated by my code??
Turned out, this happened because of append() function. That doesn't support in IE11. Fixed it, by using appendChild() method.
Don't ask me what kind of data was in that json file. I was too scared to open it!!
Things like this are scary and weird for a fresher like me. :(4 -
I am more of a backend guy. I just started coding in frontend too. Now I have to change some of the hardcoded things and those should be come from the backend. Yes this is the requirement.
Don't know how will I do it at this stage 🤔 -
What the actual motherfucking fuck? What have I done so bad in my previous life to get this shit? Did I slay little cute puppies?
So I got a call from the client and he argued about how slow the system runs or that it happens that the copy commands fails.
It sounded interessting and I didn't know in what kind of rabbithole I'm going through.
The system is always in the year 2012 (don't ask why, it's just hardcoded ... another rant story).
Some of you maybe know that bug because it was very popular.
Wayne train, let's continue -> I saw that the copy command fails sometimes and that the system has a high CPU usage and futex lockups. Pretty strange and doesn't seem obivous why that is.
Sadly there are no logs in the system (not implemented and again ... another.fucking.rant.story.)
The system is kinda old and to patch it would mean to port shitty written programs and I don't have the time for that..
After searching and testing for weeks I finally found the fucking fuckidi fucked up problem.
A WRONG IMPLEMENTATION OF THE MOTCHERFUCKING LEAPSECOND CAUSED THIS SHITTY SHIT. A.FUCKING.LEAPSECOND. In all this time I questioned my OWN FUCKING SANITY! NOT EVERY FUCKING MINUTE HAS 60 SECONDS. THERE ARE SOME WITH 61!!
WHAT.THE.ACTUCAL.FUUUUUUUUUUUUUCK.........
I'm just mad af. It's such a release to find the solution but it's so fucked up you just wanna jump of a bridge
Here if you are interested about this bullshit: https://bugs.launchpad.net/ubuntu/... -
Jason Bourne logic: type "run predictive algorithm" without any parameters into a terminal and it returns the locations of whatever you want. Either that function is the _best_ at predicting user input, or its variables are so hardcoded that we've just discovered the hardest material on earth2
-
Ugh, fuck man. I had planned an extremely general function for printing a truth table for a given proposition for a course, with a little functional programming thrown in. Instead, we are just supposed to show all 2^8 possible truth tables for 3 variables. That's eight nested loops with a hardcoded string that you inject the 8 values in.
I feel so disappointed1 -
There is one thing that will haunt me forever.
In my old job I was asked to fix some PHP code written by a guy who recently left the company.
Not only passwords were hardcoded in the code, but also he named all the variables like $a, $b, $c. And I still wonder, how comes he was not fired but left on his own terms?6 -
Im handling One of my senior's project who left the company last year. And now when I'm implementing new things it turns out that he has hardcoded the array lengths which should have been dynamic😤😤😤😤😭😭😭
-
describe logic/algorithm you would use to detect a (presence of) full name in a string. goals: obvious == Most reliable, hardest to fool, least false positives, as generic as possible ( == as few hardcoded data as possible)12
-
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 -
It seems they mistaken me for italian giving me spaghetti all over the product. Go to frontend to check the app, react with weird jQuery, no routes, pages summoned by the templates that have concatenated values and html in vanilla js, changing screens/pages with jQuery, no router... ok lets see the other app, react, redux, offline capabilities and tought myself niicee hut nothing work as intended with clusterfuck of hacky workarounds that makes app look like it is working but with hardcoded data. Offline means automatic sync when you get the network back, right? Oh backend never developed any sync, so you guys can do it, we have to fix and patch some important stuff! I don't like php but whatever, let's see what is going on there... So much spaghetti bolognese there that Bologna actually called to ask if they can buy some, they are out of stock because of us!
This is just like that song mess.css from stdout, but in any file you open!
Living on deserted island eating grass and coconut for the rest of the life doesn't seem so bad atm!4 -
Maybe you people will like this story.
The past semester I studied Java in class. First time doing object oriented programming, I had an annoying teacher but got the hang of it. I still miss C from the last year.
As a final project we had to do any program and apply some stuff we saw in class (The program should have an array list, use interfaces, bla bla bla bery simple stuff). It also must have a complete documentation, a manual and a diary explaining what was developed every week. Bonus points if it was in a repository like GitLab.
I wanted to do an RPG game in a matrix, like a rougelike or an old FF game, that should be a map or two, a few monsters and items and that's it. Enough to show what can I do and to have enough excuses to apply everything that the teacher asked. I had a team with two friends who wanted to do the same.
After making accounts in three different pages that apparently would help us to be more organized (One to make charts and two task trackers) I lost all patience and made an account in GitLab, made the basic classes that we had defined in a chart, divided the tasks and put them in to do on GitLab and we started to work.
One of my companions caused a lot of problems. First, he didin't wanted to learn how to use GitLab (I simply asked them to do merge requests) and he insisted to use GitHub. Then he started to say that using the console version was even better (Pretty sure he said thet he never used Git, but maybe was gas poisoning). The GitLab repository never had a single commit to his name.
BUT WAIT IT GETS BETTER all the entire time, he was complaining about the graphical interface of the game, wanting to use some SDK for RPGs that he found. I told him that we will see that at the end, that first we should have all the mechanics done, test it in ASCII in the console and then, if we have time, we will put the visual interface, separated and optional from the main program to avoid problems.
After two weeks where he gave me very simple standard stuff late, half done and through Google Drive, I discovered he was most of the time working on... the graphical interface SDK! He took the job already done by me and the other guy and making a pretty hardcoded integration with the graphical interface and making everything that he tought it would be necesary. Soon enough the GitLab repository was totally outdated and completly useless. He had the totallity of the project in his half broken laptop, and sometimes he gave us a zip with all the code, outdated after a few minutes. Most of the stuff that I made was modified, a lot of the code was totally unknown to what it was and I had no idea even of how the folders were organised.
We had a month to finish it. I got totally disconected from the project and just hoped for the best, sometimes doing a handful of generic and adaptable lines of code for a specific thing (Funny enough, many core mechanics were nonexistent). The other guy managed to work more on the project, mostly fixing the mess that the guy did: apparently he didin't read the documentation of the SDK and just experimented and saw tutorials and tried to figure out how to do what he wanted.
Talking about documentation: we dont had yet. The code wasn't even commented propely. We did all that the last week and some stuff was finished the last night. The program apparently worked but I had no idea.
Thank God, the teacher just looked over everything and was very impressed by the working camera and the FF tiles. I don't think he saw the code or read too much of the documentation, much less when I directly wrote how I lost all access to the project.
I had a 10/10. I didin't complained. Most easy and annoying ten I ever had. I will never do a project with that guy. -
Code with no clear architecture, no documentation, no coding standards, no tests, many security-issues, a lot of hardcoded stuff, written by people forced to use a completely new technology stack and messing up, of course.
But we are not allowed to change anything, of course.
We have to keep coding in that style and with the tools present in the project. For uniformity, of course.
I managed to work on that code for 2 years... Recently it dawned on me that I don't give a crap anymore.
I quit, of course. -
So I am running Spark on Docker. I have hardcoded the docker-compose file to 1 master and 3 workers which works fine. What would be a good way to dynamically scale the number of workers up and down through the command line ? I guess we have to use --scale or replica, but how ?
-
The bug: Some string values for an identifier property in the data objects are being sent from our frontend prefixed with a '0'. Sometimes. When it happens, it usually gets stripped away again by the time it's passed to our backend. But not always.
This 0 is never explicitly set anywhere. I even searched for a few variants of " = 0" in both the frontend and backend projects without receiving any results. You might already be suspecting where this is going.
So it turns out.
The data object which holds this value is being initialized in the aspnet (don't ask) backend and passed to the frontend, which then hydrates it. This value is always an integer number, albeit incidentally so which is why string is used as the actual type. When this object is initialized, it's hardcoded with an anonymous type where this property is set as int because I guess someone figured "it's always an int though". Being a typed language, primitive scalars can't be null objects which means the property's value becomes the concrete int 0.
Okay weird. I can think of better ways of doing this but let's just set it to string as I can't start overhauling things right now. Let's just go find where this value is somehow concatenated into the incoming parameter.
You see, this happens because at the point where the frontend sets this value, it may be an int or string depending on where it came from, and I guess someone figured that in order to cast it to string you just go prop += arg seeing as the prop is empty string and all. Because explicitly casting it or - as much as I get a rash whenever I see it - going prop = "" + arg would be too verbose and unoriginal.
Bonus round: How come the 0 only sometimes made it all the way to our backend? The thing is that this bug has been fixed before. The fix is that because this string is "always" an int, you can parse it to int before passing it to the backend in case it has leading zeroes. This path is only taken in certain views because someone forgot to copypaste their fix into all the places this is repeated.
Sometimes you find a bug and you are just somehow more grumpy after fixing it.1 -
I halfway remade a 2d radar in shadertoy (original in description).
https://shadertoy.com/view/wt3SR7/
(watch it in 640x360 by zooming in or out until you get that res, I tried to main aspect ratio, but I hardcoded one value because I'm lazy)
shaders are tough to get started with:
no breakpoints.
logging doesn't make sense so it's avoided.
if's are replaced with step statements.
if you suck at math, you suck at shaders.
if you suck at trig, you suck at shaders.
hardcoding values is viable debugging.
hail hsb2rgb for pretty colors (I have no fucking idea how does it work though).
I tried writing here the challenges I found while making it, but most of them are heuristics and are hard to follow/explain in just text.
I can say though, that sometimes you come up with a solution, but it doesn't look really good, so you have to use something else.
or sometimes you come up with a solution but it also creates unwanted coloring that you have to erase.
or sometimes you have no fucking idea what your operations results are, or you get dizzy by the math. Hardcoding helps wonders.1 -
So... I had to create a VBA macro, ok, it is very simple and it will be necessary during some DOC files reviewing. Ok, not a problem.
I created the functions, added some quick launch buttons and saved it as a .DOTM file. I even included an autoload form with an Install button, so the file copy itself to the Word Startup folder. Nice, everything working just fine.
But... there are two Mac users in the company. I do not have a Mac, but the first thing I thought was I hardcoded the "\" to check if the file already exists and to copy the file. Using the system separator would do the trick. The macro would be copied and everything is done. But...
1. The quick launch buttons do not appear on Mac;
2. The "Application.PathSeparator" returns an ":"
3. The "application.StartupPath" returns an invalid path (something like "Mac's Name:Application:etc")
4. The copy command is not working, the Dir command appears to be not identifying the path etc
5. I need to have it working by Monday morning.2 -
to me, "var a" is unorthodox. i'd rather use switch(expectedOutput){case 1:a=1;break;case 2:a=2;break;case 3:a=3;break;case 4:a=4;break;case 5:a=5;break;case 6:a=6;break;case 7:a=7;break;case 8:a=8;break;case 9:a=9;break;case 10:a=10;break;case 11:a=11;break;case 12:a=12;break;case 13:a=13;break;case 14:a=14;break;case 15:a=15;break;case 16:a=16;break;case 17:a=17;break;case 18:a=18;break;case 19:a=19;break;case 20:a=20}1
-
Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..
Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode3 -
Got asked to rewrite a breadcrumb-output for a clients site.
Noticed that they've manually hardcoded every single breadcrumb in html. For every page. Every product. Every..
Yeah. No.1 -
Agency adventures: Client always asking for bespoke hardcoded changes in the system. They want to save budget, so you suggest to make a admin screen for that frequent change so they can manage themselves and not pay you to do. You make that. Client keep creativity on top levels, asking for changes not supported by the new feature and that still have to be hardcoded.
Now, after the time estimates, they kindly ask: "can't you use that admin page to speed up your work?". -
I'm in a big fat fucking stinking rut, as in progress on this project has absolutely stagnanted.
Gonna rubber face your duck now **UNZIPS** excepts I don't have zippers, as joggers are the one true way; fake Adidas til I fucking drop.
Brain damage aside, I understand both how I've layed out the data and what I'm supposed to do with it. We have a virtual machine, an array of instructions and arguments for a given process within it, and we need to walk this array and map values to registers.
We also need to spill values inside registers to stack, IF they are required at a further point within that block. This also isn't terribly complex. We simply look forward in the array and see if the value is an argument to any instruction that *needs* this value to be loaded (ie, within a register).
So this implies multiple iterations; we need to better understand how one particular value is used throughout an F before we can make a final decision on how many registers and stack space are actually needed for the whole block.
Here's where it gets tricky. If there's a call, we need to be certain that the symbol being invoked has already been fully processed. Besides the obvious fact that recursion fucks me up, there's another matter: say a private method gets invoked by another private method. We can take advantage of this, by which I mean, sacrilege incoming so put on this toga.
Looking at the output for C compilers, it would seem this is not done in practice, I would assume because it's a pain in the ass. But when you have the guarantee that F will only be called internally, as that's what "private" means, there's two ways it can go:
0. It's well below the 13-20 cycle threshold, so you inline the fucker. No suprises there.
1. It's a more involved affaire, and invoked in more than one place, so you don't inline it. Codesize matters.
Recursion and [1] are the big deal things holding me back. Not because it's too hard, like I said this is kindergarten level abstraction. I'm just slow and fanatical, which is how I prefer to spell "constant obsessive paranoid delusions". I can see the potential optimization I can pull here, so I'm stuck trying to figure it out.
Idea would be, handling the register allocation and stack spill for an internal-internal (or deep internal; what we like to call a "guts" method) in synchronization with the *calling* processes. This is, fundamentally, violating all conventions -- but so under the hood no one will notice.
Let me give you an example. If we were to pass some value to a function, expecting to mutate it and get a different value back, in a lot of cases it'd be stupid to make an implicit copy by using two registers, one for input and another for the output. Dude, it's one cycle. Multiply it by a million, say sixty times per second, for every time you __needlessly__ make a copy of a value that we've already stated is mutable.
Clearly unacceptable. This is, in the strictest sense, everywhere in every single codebase. Premature micro optimization is the root of all goodness, God is great and praiseworthy. So how do we go about it?
Answer is I know and I don't know. By which I mean to say, this very thing I've done by hand. Assembly is fun. Now the issue is teaching a calculator how to do it. Not so fun.
There is a dependency chain between processes, as I believe I've kind of alluded to. I'm trying to make decisions on the side of the caller depending on the details of the callee, which is why recursion is rawdogging my soul. This is the same situation, it's inverting the direction of one or more links in the dependency chain, which makes no fucking sense.
And yet it does.
Brain, explain yourself.
How do *you* handle this without crashing?
Brain?
<<ME STEWPED; BEEP-BOOP>>
Alright then, that was a useless attempt at fuckery. Let's have a nap then, maybe it'll come to me in the morning. That's what I've been saying to myself for almost a month now.
Perhaps it is a hardcoded fuk.1 -
what is wrong with android storage access hierarchy?All i want to do is to make a file explorer app which could show user a list of all the files on their device and memory card(if available), but its been days and i cannot find a proper way for that.
I checked all the Environment class methods and context.getFileDir()/other methods of ContextCompat , but they either point to emulated storage or the app's folder, but not the sd card. I have scratched my head and pulled all my hairs out researching a lot deep into this area, but found nothing. The only thing that works sometime is the hardcoded paths( eg new File("/sdcard") ) , but that looks like a terrible hack and i know its not good.
I have also read briefly about Storage Access Framework, but i don't think that's what I want. From what i know, SAF works in the following manner : user opens my app>>clicks on a button>>my app fires an intent to SAF>> SAF opens its own UI>>user selects 1 or multiple file>> and my app recieves those file uris. THAT'S A FILE PICKER, AND I DON'T WANT THAT.
I want the user to see a list of his files in my app only. Because if not, then what's the point of my app with the title "File explorer"?7 -
One user could report that the data they saw didn't make sense. Turns out there was a one-off hardcoded caching detail for one of our services that cached based on a search query (yes, the entire query was the key) and before any auth checks. The system would return the results owned by whoever asked first, no matter who asked after that point.
There's "Oh dear but we all make mistakes" and there's surrender cobra. This is what PRs are for.1 -
That feeling when you finally get to tackle that "temp fix" hardcoded TODO smell that you had to put as a band-aid
-
Spoonfeeding level 6666 and its still failing !!!
Me: ".....when that happens, press CTRL+C ,when you start seeing dollar sign you can enter command."
Co-Worker: I already logged in to unix server using putty and hardcoded the doplar sign,its still not working !!
:/3 -
I lost 30 min to find why a function didn't give me the result.
I've found out why.
Hardcoded with a if with no bracket nor breaklines
Yes, the " if (something) return someotherthing;"
Now I see why it's not always recommended..