Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "clean code"
An intern I was supposed to lead (as an intern) and work with. Which sounded kinda crazy to me, but also fun so I rolled with it. But when I met her I quickly found out she didn't even have a coding editor installed and when I advised one she was "scared of virusses". She had Microsoft Edge in her toolbar, and some picture of a cat as a background. We were given some project by our boss, and a freelance programmer helped us set it up on Trello. Great, lets start! Oke maybe first some R&D, she had to reaeach how to use the Twilio API. After catching her on WhatsApp a few times I realised this wasnt gonna go anywere. After a few weeks of coding and posting a initial project to git I asked her if she could show me the code of the API she made so far..
She told me she was using the quickstart guide (the last 3 FUCKING weeks) which contained some test project with specific use cases.
The one that I did 3 weeks ago that same fucking morning.
AND SHE WAS STILL NOT DONE...
A few days later I asked her about the progress (strangly, I wasn't allowed ti give her another task bcs the freelanc already did) and guess what... She got fking pissed at me
Her: "I will come to you when im done, ok?"
Me: "I just want to see how it is going so far and if you are running into any problems!"
Her: "I dont want to show you right now"
She then goes to my fucking boss to tell him I am bothering her.
And omg... Please dear god please kill me now...
Instead of him saying the she probably didn't do shit. He says to me that the girl thinks im looking down on her and she needs a stress free environment to work in. She will show me when its done. ITS A FUCKING QUICKSTART GUIDE YOU DUMB BITCH.
He then procceeded to whine to me about the email template (another project I do at the same time) which didn't look perfect in all of his clients.
Dont they understand that I am not a frontend developer? Can you stop please? I know nothing about email templates, I told you this!!!
Really... the whole fucking internship the only thing the girl did was ask people if they want more tea. Then she starts cleaning the windows, talk to people for an hour, or clean everyone's dask.
all this while I already made 50% of the fucking product and she just finished the quickstart tutorial 😭. Truly 2 months wasted, and the worse thing is I didn't get any apprication. They constantly blamed me and whined at me. Sometimes for being 3 minutes late, the other for smoking too much, or because I drink to much coffee, or that I dont eat healthy. They even forced me to play Ping Pong. While im just trying to do my job. One of the worst things they got mad at me for if when my laptop got hacked bcs it was infected with some virus. He had remote access and bought 5 iPhones 6's with my paypal while I was on break. I had to go home and quickly reset all my passwords and make sure the iPhones wouldnt get delivered. strange this was, this laptop I only used at the company. So it must have been software I had to download there. Probably phpstorm (torrent). Bcs nobody would give me a license. And the freelancer said I * have to *.
the monday after I still had to reinstall windows so I called them and said I would be late. when I came they were so disrepectfull and didn't understand anything. It went a little like this:
Boss: why u late?
Me: had to reinstall my laptop, sorry.
Boss: why didnt you do this in your own time?
Me: well, I didn't have any time.
Boss: cant you do this in the weekend or something? Because now we have to pay you several hours bcs you downloaded something at home.
Me: I am only using this laptop for work so thats not possible.
Boss: how can that even be possible? You are not doing anything at home with your laptop? Is that why you never do anything at home?
Me: uhm, I have desktop computer you know. Its much faster. And I also need to rest sometimes. Areeb (freelancer) told me to torrent the software. He gave me the link. 2 days later this happends
Boss: Ahh okeee I see.. Well dont let it happen again.
After that nobody at the compamy trusted me with anything computer related. Yes it was my own fault I downloaded a virus but it can happen to anyone. After that I never used Windows again btw, also no more auto login apps.8
Hey. This code look broken. What should I do?
It isn't broken. It's doing what it's supposed to.
Well, it's hard to follow, but it certainly doesn't look right. And it isn't doing what I expect. Also, why is it calling method(a_class1_or_class2) with a class3?
It isn't hard to follow, and it works just fine. Let me show you. ... huh. looks like it isn't right. and there's a comment here saying the calls aren't clear. but it works just fine. Just copy it over and do it the same way.
I already did that. and it isn't working.
What are you talking about? Of course it works fine. Did you check your code?
Really, dude? It doesn't work fine. but, guess what? It works fine* when I change it to call that method with a class2 like it asks for. (Surprise!) But I can't tell him that. Nope. Bossmang get offended. Still won't admit I was right about anything, either.
Ahh... the continual joy of working with (and for) trash.
* well, more fine; the rest of the feature is still wrong. but nope, i'm not allowed to fix it. because why would they want anything to work properly? Already-accepted wrong behavior is good enough. Can't clean up the code, either, because that "muddies the waters." Bitch, I couldn't see the bottom of this sewer if it was half an inch deep! Which is more important: the last contributor entry beside the code, or that code being readable and maintainable? or it, you know, working?
need to scoot.8
~ Freelancer.com Week #1 ~
Project: I need someone to debug an application's code and review it. Budget 30 bucks.
Bid: I am an experienced developer I can probably review it in an hour.
client: Hi, need you to check if app is contains virus [link to scam website]
me: sure, download supposed "social Bitcoin miner" and run some AV tests...8+ positive flags for a Trojan virus.
>Me: It's a Trojan virus mate it's not legitimate😟
>Client: Can you remove the Trojan virus so that the legit not stays?
Me: Umm there is no bot mate it's just a virus 😕 I wouldn't open it outside a sandbox
Client: But here it says Bitcoin faucet bot [links shitty how-to youtube video]
Me: 😒 it's not real dude you are about to get scammed, I can test it in a VM if you. . .
Client: I opened it already, it's working
Me: 😮 r u sure?
Client: yes, can you install VM for further testing?
Me: sure, in your computer?
Me: just download the windows image and text me when it's done
Client: My disc is full! Only 3 gb left
Me: 😑 call me when you clean it
Client: [ offline ]5
I was working with a guy 3 years ago, he was junior web developer. Lazy for work, watching YouTube and game streamers all day long at the office. Sometimes i was fixing his crappy code.
And ... one week ago I was surprised seeing this guy come to my current work office as senior web developer.
Im also new at this office and i had good impression i was working with professionals before this happened. Guess what... This guy hasnt changed much. Still writes crappy code , no idea of clean code at all.
I got concerns about my work place now :/ thinking to change it.6
In the Ruhr area (Germany) we have some very old, very strange words with strange meanings. One of those words is ‚Prutscher‘.
A Prutscher refers to a person who does things but never gets a good result, due to lack of knowledge or simple carelessness. Most of the time, Prutschers are people who are interested in certain subjects and often work in the related jobs, but who lack the motivation to properly train themselves, learn what there is to learn and to always keep up with their technologies .
Here are a few examples I've stumbled upon so far in my career:
- Developers in their 60's who read a book about PHP 25 years ago and decided to become a software developer. Since then haven't read anything about it. Who then now build huge spaghetti monoliths for large companies, in which they prefix every function, every variable and constant with their initials and, of course, use Hungarian notation.
- People who read half a fucking tutorial about <insert any fancy js framework here> and start blogging/tweeting about it
- Senior web developers who need to be told what the fuck CORS is and who can't even recognize CORS related errors in their browser console.
- Developers who are the only ones working on Windows in the team and ask their Linux colleagues for help when Windows starts bitchin.
- People who have been coding for 30 years, have worked with ~42 languages and don't know the difference between compiled and interpreted languages in the job interview.
- Chief developers at a large newsletter-publisher who think it's a good idea to build your own CMS (due to a lack of good existing ones, of course).
- Developers who have been writing PHP applications for multinational corporations for 25 years and cannot explain how PHP is executed. They don't even know what the fucking OPcache is, let alone fpm. FML
- People who call themselves professional developers but never ever heard of DRY, KISS, boy-scout rule, 12-Factor App, SOLID, Clean Code, Design Patterns, ...
- Senior developers wondering why the bash script won't run on their fucking Windows machine.
- Developers who consider Typescript to be a hindrance and see no value in it.
- Developers using ftp for deployments in 2022
- Developers who prefer to code without frameworks and libraries because they are only an unnecessary burden/overhead and you can quickly code everything up yourself.
- Developers who think configuring their server(s) manually is a good idea.
You fucking Prutscher. What you have already cost me in terms of work and nerves. I can't even put it into words how deeply I despise you. I have more respect for the chewing gum that has been stuck in my damn trash can for the past 3 years than I do for you guys. You are the disgrace of our profession. I will haunt you in your dreams and prefix every fucking synapse of your brain with MY initials.
As a well-known german band once sang in a very fitting song: I wouldn't even piss on you if you were on fire.
If you recognized yourself in one of the examples here: FUCK YOU!37
I AM TIRED
warning: this rant is going to be full of negativity , CAPS, and cursing.
People always think and they always write that programming is an analytical profession. IF YOU CANNOT THINK IN AN ANALYTICAL WAY THIS JOB IS NOT FOR YOU! But the reality could not be farther from the truth.
A LOT of people in this field whether they're technical people or otherwise, just lack any kind of reasoning or "ANALYTICAL" thinking skills. If anything, a lot of of them are delusional and/or they just care about looking COOL. "Because programming is like getting paid to solve puzzles" *insert stupid retarded laugh here*.
A lot of devs out there just read a book or two and read a Medium article by another wannabe, now think they're hot shit. They know what they're doing. They're the gods of "clean" and "modular" design and all companies should be in AWE of their skills paralleled only by those of deities!
Everyone out there and their Neanderthal ancestor from start-up founders to developers think they're the next Google/Amazon/Facebook/*insert fancy shitty tech company*.
Founder? THEY WANT TO MOVE FAST AND GET TO MARKET FAST WITH STUPID DEADLINES! even if it's not necessary. Why? BECAUSE YOU INFERIOR DEVELOPER HAVE NOT READ THE STUPID HOT PILE OF GARBAGE I READ ONLINE BY THE POEPLE I BLINDLY COPY! "IF YOU'RE NOT EMBARRASSED BY THE FIRST VERSION OF YOU APP, YOU DID SOMETHING WRONG" - someone at Amazon.
Well you delusional brainless piece of stupidity, YOU ARE NOT AMAZON. THE FIRST VERSION THAT THIS AMAZON FOUNDER IS EMBARRASSED ABOUT IS WHAT YOU JERK OFF TO AT NIGHT! IT IS WHAT YOU DREAM ABOUT HAVING!
And oh let's not forget the tech stacks that make absolutely no fucking sense and are just a pile of glue and abstraction levels on top of abstraction levels that are being used everywhere. Why? BECAUSE GOOGLE DOES IT THAT WAY DUH!! And when Google (or any other fancy shit company) changes it, the old shitty tech stack that by some miracle you got to work and everyone is writing in, is now all of a sudden OBSOLETE! IT IS OLD. NO ONE IS WRITING SHIT IN THAT ANYMORE!
And oh my god do I get a PTSD every time I hear a stupid fucker saying shit like "clean architecture" "clean shit" "best practice". Because I have yet to see someone whose sentences HAVE TO HAVE one of these words in them, that actually writes anything decent. They say this shit because of some garbage article they read online and in reality when you look at their code it is hot heap of horseshit after eating something rancid. NOTHING IS CLEAN ABOUT IT. NOTHING IS DONE RIGHT. AND OH GOD IF THAT PERSON WAS YOUR TECH MANAGER AND YOU HAVE TO LISTEN TO THEM RUNNING THEIR SHITHOLE ABOUT HOW YOUR SIMPLE CODE IS "NOT CLEAN". And when you think that there might be a valid reason to why they're doing things that way, you get an answer of someone in an interview who's been asked about something they don't know, but they're trying to BS their way to sounding smart and knowledgable. 0 logic 0 reason 0 brain.
Let me give you a couple of examples from my unfortunate encounters in the land of the delusional.
I was working at this start up which is fairly successful and there was this guy responsible for developing the front-end of their website using ReactJS and they're using Redux (WHOSE SOLE PURPOSE IS TO ELIMINATE PASSING ATTRIBUTES FOR THE PURPOSE OF PASSING THEM DOWN THE COMPONENT HIERARCHY AGIAN). This guy kept ranting about their quality and their shit every single time we had a conversation about the code while I was getting to know everything. Also keep in mind he was the one who decided to use Redux. Low and behold there was this component which has THIRTY MOTHERFUCKING SEVEN PROPERTIES WHOSE SOLE PURPOSE IS BE PASSED DOWN AGAIN LIKE 3 TO 4 TIMES!.
This stupid shit kept telling me to write code in a "functional" style. AND ALL HE KNOWS ABOUT FUNCTIONAL PROGRAMMING IS USING MAP, FILTER, REDUCE! And says shit like "WE DONT NEED UNIT TESTS BECAUSE FUNCTIONAL PROGRAMMING HAS NO ERRORS!" Later on I found that he read a book about functional programming in JS and now he fucking thinks he knows what functional programming is! Oh I forgot to mention that the body of his "maps" is like 70 fucking lines of code!
Another fin-tech company I worked at had a quote from Machiavelli's The Prince on EACH FUCKING DESK:
"There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things."
MOTHERFUCKER! NEW ORDER OF THINGS? THERE 10 OTHER COMPANIES DOING THE SAME SHIT ALREADY!
And the one that got on my nerves as a space lover. Is a quote from Kennedy's speech about going to the moon in the 60s "We choose to go to the moon and do the hard things ..."
YOU FUCKING DELUSIONAL CUNT! YOU THINK BUILDING YOUR SHITTY COPY PASTED START UP IS COMPARABLE TO GOING TO THE MOON IN THE 60S?
I am just tired of all those fuckers.13
it is really frustrating not to be able to actually maintain and improve the code you're working with. i'd be happy to completely dig in and live in the code and get it all - not so much fucked up - , or, totally spitballing here, do some research on how we could improve the functionality and performance in general (which is not "nice to have", but rather ongoing customer pain points), but I'm not allowed to, because management hates having maintainable code or even an adequate number of devs. it rather has me doing hippity hoppity between different projects to make sure nothing gets my full attention. -.-
the only thing i can do is to clean it up a bit during bug fixes, but even heavy polishing won't fix this giant pile of garbage that is called our code base.2
that one legendary guy who cranks out code and builds insane features. PMs (product management) love him because he builds features in several months which 10 devs together couldn't have built in the same time (so they say), features that are loved by customers as well, become their new standard and that have saved our company's asses in the past.
features are really awesome, performant and have very few bugs (compared to the rest of the software シ).
but this guy seems to live for this job. he also works at weekends, at unholy times of day and night and even in his holidays (he doesn't care that this is actually illegal, in terms of employee's rights, and he wouldn't listen to his superiors, no matter what they tell him)
so far, so good - except that he will probably die of some stroke or something very soon due to this lifestyle.
but it must be an absolute pain in the ass to work with him, as long as you're a developer (or his superior).
he lives in his own world and within the software, his features are also his own world. since the different modules interact with each other, sometimes you would be assigned a bug that might have its cause in some interaction of your and his module. talk with him about it? forget it. he wouldn't answer most devs who contacted him for some reason. ever. fix it in his module yourself? might happen that he just reverts your changes to his module without comments. so some bugs would lie on your desk forever because theoretically you know what would need to be done but if you cannot reach out into HIS world, there's no way to fix it. also - his code might be good in terms of performance and low bug numbers. but it seems to be hard to work on that code for everybody else but him.
furthermore, he is said to be really rude. he is no team player, but works on a software that is worked on by a huge team.
PMs think he's a genius, just a great dev, but they don't understand that other devs need to clean up the mess behind or around him.
everyone who's been his superior so far recommends to get him fired, but the company wouldn't fire him because they don't want to lose his talent. he can just do what he wants. he can even refuse to work on certain things because he thinks they are boring and he is not interested in them. devs seem to hate him, but my boss said, they are probably also a bit jealous because of his talent. i think, he's not wrong. :)
i haven't actually met him so far or was actually "forced" to deal with him, but i've never heard so many contrastive things about one person, the reputation of his, let's say vibrant personality really hurries ahead. he must be a real genius, after all i've heard so far, like he lives in the code. i must say i'm a bit curious but also somewhat afraid of meeting him one day.
do you also have such a guy at your company?14
I came to this company. I saw spaghetti code. I told myself to write clean code and also clean the existing code. I took too much pressure for too little return. I am done with this shit. I will now write clean code but fuck the old spaghetti code!2
Engineering managers will say things like -
- "I'll let the team decide what's best for them" & "code quality is our primary goal" -
but then they'll shoot down any & all requests to go back to some old piece of code and refactor/clean it, because of "deadlines".
Hypocrites, all of them.5
Today another story in this stupid company:
A freelancer created a feature to pay orders online . It took him 3 months (!)
Problem: sometimes people pay, but orders are not stored. Every morning, it takes 1 hour to check in db if the orders are stored, and if not, create them manualy
Yes, orders are created after payment.
Manager wants to fix it by creating the order before the payment, in 3 days (!)
Turns out that the freelancer has written a lot of obsolete code, I now have to clean up. 3 fucking months vs 3 fucking days!
And on top, the shoppingcart was stored in localstorage! (Already fixed by now)
Fuck this, I'm getting another wodka4
Do you agree?
Junior: What are comments
Mid-level: Hah! My code is so clean, I don't NEED comments!
Senior: comments comments comments comments comments comments comments comments comments comments comments comments comme-...30
I am able to work 15 hours on my pet project then take a short walk outside and feel like a balanced man, but even just an hour on a commercial project is a massive effort even though the code is clean, the stack is modern, I'm good friends with the client and I also like the concept. The mere fact that I'm doing it for money takes the fun out of it.3
Sifting through a React class component that is over 1000 lines long.
When was this written? Not in the 1950s like you might think. Just over 3 months ago.
private static final int TEN = 10;
private static final double THOUSAND = 1000.0D;
[a copy-paste from our repo]13
story of a release
v2.1.0 major changes went live : new features, bug fixes, optimisations. also included releases for 2 associated libraries
release process tasks:
- do code
- update test cases
- test sample app
- test on another sample app
- get code reviewed and approved by senior ( who takes his own sweet time to review and never approves on first try)
- get code reviewed again
- merge to develop after 20 mins( coz CICD pipeline won't finish and allow merging before that)
- merge to master after 20 mins( coz CICD again)
- realise that you forgot to update dates in markdown files as you thought the release will be on 10th sept and release is happennig on 12th sept coz of sweet senior's code fucking/reviewing time
- again raise a branch to develop
- again get it a review approval by sr (who hopefully gives a merge approval in less time now)
- again get it merged to develop after waiting for 20 mins
- again get it merged to master after waiting for 20 mins
- create a clean build aar file
- publish to sonatype staging
- publish to sonatype release
- wait for 30 mins to show while having your brain fucked with tension
- create a release doc with all the changes
- update the documentation on a wyswig based crappy docs website
- send a message to slack channels
why am i telling you this? coz i just found a bug in a code that i shipped in that release which still got in after all the above shitty processes. its a change of a 3 lines of code, but i will need to do all the steps again. even though i am going through the same shitty steps for another library version upgrade that depends on this library 😭😭
AND I AM THE ONE WHO CAUGHT IT. it went unnoticed because both of those shitty samples did not tested this case. now i can keep mum about it and release another buggy build that depends on it and let the chaos do its work, or i can get the blame and ship a rectification asap. i won't get any reward or good impression for the 2nd, and a time bomb like situation will get created if i go with 1st :/
IDK why I get annoyed by underscores before private member names... Is i it useful or just an old relic?16
Project leader proceeds to put what is actually two separate issues in the title. I'm already raging. I go to take a look at it.
I read the description - ANOTHER (this makes it three now) totally seperate issue in there.
Just fuck you I'm so sick it i see it over and over again no matter where I go or what project I work on its all the same bullshit.
"wE wAnT tO cLeARlY dEfINe iSsUeS aNd MoVe RaPiDlY"
YEAH THEN F&Q*@#()#$(@)#$ DO YOUR F$*(@#(*&$ JOB!!!! I'M DOING MINE, IN ADDITION TO DOING YOURS, CLEANING UP YOUR ABSOLUTE MESS THAT YOU LEFT!!!!1
According to my university lecture you have clean and good code if every tiny little functionality is split into 5+ files. Gotta have an interface, factory, low level implementation, high level implementation, and at this point I don't even know what purpose the other abstraction levels have. Just end me already...
Sometimes I think of how much great and useful stuff you could learn at an university if they used time efficiently. But instead you spend years mostly just studying theoretical or very abstract topics. Whereas 80%+ of useful knowledge and skills you learn on your own.4
gradle is infuriating.
firstly there are so limited resources to understand how it's building a java/android code. everything happens by magic and hit+trial
secondly the plugins and the tasks works in mysterious ways. sometime they work when applied in the project root's gradle file, other times they work when applied in module's gradle file, nd other times they need configuration at both levels.
then there are gradle tasks like build ,test, assemble , clean etc. these are less of an action and more of an alias to run a bundle of actions.
then we have 3rd party plugins which attach themselves to these "fat-actions" and run before/after them
and finally we have the fuckup from the java world where the only available code coverage plugin is jacoco and IT FUCKING SUCKS!!! it is a test environment plugin, it should impact test tasks , but somehow it's fucking with the assemble taskin such a manner, that the jars ans aar files generated via plugin are giving runtime errrors. yes , runtime! as if we are back in the messed up js world of "everything is good unless running live"
even if it was a compile time eeror, i would have considered. but runtime?!! fucking runtime error?! i barely understand this shit, there is absolutely no info available as to which classes are being used to create a build and how, and i am supposed to fix this? wtf?!4
Want to bloat the shit out of your product and want to lose the core USP?
Want to stop solving the problem you set out to address?
HIRE A PRODUCT MANAGER.
PMs are expert at shit show. We fuck up everything.
God I hate my profession.
When I start my company, the mandatory rule for every PM will be that if you want to add or enhance a feature, they will have to remove a feature. Whoever fails to do so will be punished by having to clean up the code base and work in sales for a quarter.7
At this point, I feel so far from tech and programming so nothing is exciting anymore, although, I'm working as a "software engineer".
Every job feels deadend and requires nothing but absolute mundane skills. I mean "make the text bigger"-joke does not come out of thin air. No science, engineering, and little-to-no standards are involved in most jobs.
This leads us to this: you can get excited about rust, fp, extra dazzling clean code, uncle Bob's sect of salvation coders or whatever but you'll be hit with reality so don't get your hopes up.1
for the life of me I cannot figure out in my mind how to structure this project I want to start, and jumping right into coding does not improve this mental block.
At work this Golang code base has a clean architecture, so easy to maintain and extend, and I'm unable to replicate it on my own project(s). It sucks to be an ignorant.2
I feel like some developers focus too much on concepts like clean code, software craftsmanship, TDD and so forth, to a point where they almost forget end user needs (ease of use, intuitive experiences, general UX principles).
Don’t get me wrong. I do my best to stick to a decent standard of quality and maintainability. However my solutions are adapted to the specific needs that are being addressed rather than the other way around.
I’ve heard some devs say things to the effect of ”well I know that’s not most intuitive behavior for the user but it’s the cleaner way to do it, so the user will just have to figure it out“. So in essence they’re just coding for their own pleasure rather than addressing user needs4
I can now appreciate some design decisions behind react-redux after witnessing some angular OOP clusterfuck.
I am sure there is some clean/correct way to code in angular, but everyone is treating angular as java.
Some angular application (the one I have to work with) is littered with network calls. It's difficult to spot duplicates. People usually resolve promises everywhere. In services, in a top-level component, or in for loops. In react, people use apollo/redux-query or redux-saga to handle network calls. Since these libraries prevent duplicate network calls internally and reassigning apollo network call function or redux action function is always useless, it's easy to spot all network calls in a component tree.
In angular, it's difficult to trace data mutations when data can be updated everywhere. In react, you can easily find UI state updates by tracing state hooks/dispatch/apollo usages.
In angular, it's difficult to trace data pipeline. Since everything is imperative by default, people need to add update functions in data subscriptions. With all the littered mutations. Soon you will lose track of what the fuck is going on.
I hope angular get the agonizing death it deserves and fuck everyone who codes JS OOP clusterfuck UI.11
Parental Programming: noun 1. Between chaning diapers and preparing milk bottles you contemplate about the code you are going to write. So in the 5 min you get to do it you can punch it out almost perfectly before you have to clean vomit from a carpet.1
Question to all those who have worked with software architecture: What is your approach when implementing architecture and design into actual software?
I find it very hard to translate UML diagrams and architectural requirements into working code and I feel like there is quite a big "gap" between the two. How to you breach that gap and manage to maintain a clean and comprehensive architecture in your project folders?11
Perfectionism... I often refactor my code because I always see something that could be "done better" in my own work, which can slow me down if I'm not paying attention to my main task.
If I could stop time I would perfect my code all day, but that isn't realistic. 😂
Doesn't apply to dev work only, I've had to learn the art of not giving a shit about every single detail in many other disciplines. I just love getting things done really well.
Who asked for RedDatabase and RedXpert? You guessed it - nobody 😑 It's a buggy Firebird and DBeaver domestic knock-off!
My student was assigned with making Flask app by "simple" requirements. But guess what? We can't figure out hecking RedDatabase?! Figures out that they sent incompatible *.fdb database file, on which we wasted entire 3 hours troubleshooting obscure error, while clean database doesn't cause any trouble.
Last error that completely drained us is following:
Reason: unsupported on-disk structure for file /var/rdb/test.fdb; found 12.3, support 12.2; IProvider::attachDatabase failed when loading mapping cache [SQLState:HY000, ISC error code:335544379]
So now, he basically recreates database by scheme on image. What also shady seems to me is that application also has to deployed on virtual OS which he can bring on USB stick or by cloud later.
I thought the issue was mostly with people in tech. But I now believe, tech people are mostly misled to believing woke bullshit, world is all nice and clean, and made of unicorns.
I mean all these does make them smart enough to run/code the machines, be obedient mofo, but dumb enough not to ask questions.
Toughen up you mofos, harden up. Build and sell your own bullshit, than working for someone else. And being comfy and then being on the way to your death bed.
Especially young people.... Take risks rather than risking it to tooo late you mofos. If you have a scratch, do it early, before you end up being a slob.....5
I'm a self taught web developer, I know I can develop great apps, but my code doesn't feel structured... It gets messier as I add more features, and this makes it harder to develop and keep track of everything.
How can I improve this, are there any processes to follow?5
I'm building a script parser to make mods for a game I like. The first step is to write an importer.
The documentation is nonexistent and I'm delving into byte manipulation, which I'm not familiar with - at all. I'm porting existing code from Java to C#, and everything is similar but different enough that I can't always just to a 1:1 transfer.
I get everything working, cleaned up and split into classes so I can write the exporter.
I do an import and the file won't parse. I try all previously know working files and still no good. I clean, rebuild, clean rebuild, run, debug, restart my computer, clear my cache, clean, rebuild. No good.
IT WAS WORKING 5 MINUTES AGO
Proceed to revert to every version from the last hour. No dice.
I was in the wrong folder the whole time.
Navigate to the proper folder, open the filename I know to be good and bingo, works like a charm.
The same project caused me headaches because I had a "== -1", when it should have been "== 1". Between my inexperience with byte manipulation and my untreated astigmatism, I was nearly sent to the shadow realm fixing that.3
Get to know the new company better (Changed job shortly before Christmas).
Learn some DPs, DDD, k8s, finish introduction to hacking course, start doing htb and thm machines, finish and defend my thesis, finish books clean code, thinking in java (reading it to fill in gaps on knowledge), a few books about pentesting.
Among non tech goals: pass drivers license exam for cars, another one for motorcycles, go back to learning russian.
I have a question I'm struggling with for some time.
In spring boot application should service method accept DTO or entity?
I see benefits of using entity for basic CRUD operations, but how about business logic methods? I'd like to hide details behind abstraction and also block any incorrect usage of this method, like:
I have a method "restrictOrder" which alters an order and saves it. But someone can modify order object before passing it. Should I only pass id and new value to be set or am I paranoid?
And how do you do it in your project? I'd like to point that right now we are not using DDD or some other fancy architecture, just the Spring defaults7
I have most of my experience in Java and OOP. Right now I'm writing small program in C.
What are some good practices for procedural programming, something like SOLID for OOP?
And what rules to follow that will help me write and maintain clean code?2
Question about cache (Redis or other distribuated cache).
So I would like to find a solution with “Partioning”. But without code it my self (ofc)
Ok, example :
In the application you have clients, each client has users, each user has role.
So right now it’s in the cache with the keu “User:<userId>” = role
Sometimes, when you change client settings, all entries should be removed.
So what I would love to have :
Client_Id/UsersRoles/UserId as a key
And I would love to be able tp delete “all keys after /” :
Basiclly delete client_id/ would delete everything in cache for this client
Delete client_id/UserRoles will clean up all saved roles.
I’m pretty new working with redis, but it doesn’t seem possible out of the box.
Any reading material I could read ?4