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 - "code formatting"
-
What the fuck student. Why in fuck would you submit a python assignment in word. So that all the formatting you know the stuff that tells python how to run the code all fucks up. How the fuck can I mark this.28
-
I was hired as a senior software engineer. During handover I found out I'm actually replacing the CTO.
I queried why he was leaving and got a simple "just want a break from working" which I found odd.
Fast forward and now I also just want a break from work, permanently. This place has followed every bad practise and big no-no out there. Every bit of software is a built in house knockoff janky piece of crap that doesn't work and makes people's jobs 5000 times harder.
The UI looks worse than Windows 3.1, absolutely horrendous code formatting, worst database structure I've ever seen.
The mere mention of using a team communication tool results in being yelled at from the CEO whom communicates purely via email, who then gets annoyed when you don't reply because they sent the email to a client instead of you.
We get handed printed out "tickets" to work instead of the so called "amazing in house ticket system" built using PHP 5 and is literally crammed into an 800x600 IFrame. Yes a F$*#ing IFRAME!
It's not like we have an outdated TFS server that has work items we can use...
Why not push for changes you say. I have, many times, tried to suggest better tools. The only approval I've gotten is using PhpStorm. Everything else is shutdown immediately and you get the silent treatment.
The CEO hired me to do a job, then micromanages like crazy. I can't make UI changes, I can't make database changes, why? They insists they know best, but has admitted multiple times to not knowing SQL and literally uses a drag and drop database table builder.
Every page in the webapps we make are crammed into 800x600 iframes with more iframes inside iframes. And every time it's pointed out we need to do something, be it from internal staff or client suggestions, the CEO goes off about how the UI is industry leading and follows standards.. what in the actual f....
Literally holding on by a thread here. Why hire a CTO under the guise of being a senior developer but then reduce the work that can be done down to the level of a junior?
Sure the paycheck is really nice but no job is worth the stress, harassment and incompetent leadership from the CEO.
They've verbally abused people to the point they resign, best part is that was simply because the CEO made serious legal mistakes, was told about it by the employee then blamed it on others.21 -
Simple 1 day task. This idiot takes two weeks and after 7 days of hounding finally opens a pull request.
I go in to review the code. Should be a simple 10-15 line patch.
13,000 lines of code changed.
THIRTEEN THOUSAND!
"I fixed a bunch of formatting mistakes and replaced all instances of single quotes to double. Consistency is important you know."20 -
@dfox Can we have the option to include code blocks in rants and comments? So that they're formatted as monospace text? I mean we can get around it with pictures, but it would be a nice option to include code with an appropriate font. =)12
-
We recently got a new trainee (Not sure if its correct germans correct me i mean "Praktikant"). This guy studied computer Engineering and canceld his studies to work as a developer. So this guy is working on a typo 3 Page for a Client and asks me for help because He got a follding error. Im in the last year of My studies btw. He sends me very Bad formatted HTML template file. I quickly correct the formatting and fix the 3 open Tags That He forogt to Close. send it back to him and walk to his workplace to See him integrate it to his own code again. He Double clicks the HTML file an Google Chrome opens. He then looks at me and says and Where is the code. I say to him That he just opened the HTML file with his Browser. And He responds with yes but i wanted to See the code Not this.
Im done for today 😑😑11 -
Focus on algorithms first and syntax last. Solve problems, then code.
If it uses power, has an I/O interface, and stores code, you can do stuff.
Dont get caught up in the little shit like specific code formatting and who's right or wrong between tabs or spaces. (It should be TABS anyway.)
Don't take shit from anyone.
Be confident not cocky.
Learn GIT as much as you can.
Don't burn out.
Get up and stretch.
Don't argue with your Operating Systems professor about why you shouldn't have to learn Linux.
Don't fall into the "I want to be a game developer" trap. Make your own games on your own time. You won't learn shit at school about it.
9/10 of the real world workforce is who you know, so don't be a dick. Those people might be the difference between Ramen noodles and steak dinner for you.
Charge market competitive rates and set an hourly rate that defines the clientele you deal with.
Don't ever, EVER, do trade or spec work. Free work don't pay the bills. Always start the clock when you're not sleeping, eating, or shitting. If you're emailing, calling, texting, or otherwise interacting with or on behalf of a client, bill them. Don't be a bitch when they decide they don't want to pay you. Get yours. Watch "Fuck You. Pay Me." at least once a month on YouTube.9 -
Telling someone you don't like the way they format their code is like... Telling them their girlfriend is ugly.4
-
Warning: the following image may cause severe eye damage and temporary autism. Viewer discretion is advised!9
-
Screaming at a coworker?
The INTJ in me has prevented that pretty well in almost every critical devSituation.
BUT one time in the past, I was really close to a level 9001 scream:
This fucker, despite having been told about code formatting guidelines and DRY/KISS multiple times, had the balls to commit such utterly crappy and unreadable code that I almost bursted.
He quickly realized his mistake after I reset the repo to before his push, disabled his Gitlab account and wrote him a simple email containing the text:
"IF YOU EVER COMMIT SUCH SHIT AGAIN, THERE WILL BE UNFORESEEN CONSEQUENCES. GFYS."
After a peaceful coffee and a croissant I decided to re-enable his account. He did good after that.2 -
Oh my dear DevRant, please add code-formatting standards & check-style validation on submitted code snippets, because the wrong indentations of code snippet posts on DevRant is driving me crazy, check-style ftw!2
-
Actual formatting in my high school textbook. (also fstream.h). And the code my teacher writes isn't much better.28
-
CR: "Add x here (to y) so it fits our code standards"
> No other Y has an X. None.
CR: "Don't ever use .html_safe"
> ... Can't render html without it. Also, it's already been sanitized, literally by sanitize(), written by the security team.
CR: "Haven't seen the code yet; does X change when resetting the password?"
> The feature doesn't have or reference passwords. It doesn't touch anything even tangentially related to passwords.
> Also: GO READ THE CODE! THAT'S YOUR BLOODY JOB!
CR: "Add an 'expired?' method that returns '!active'?"
> Inactive doesn't mean expired. Yellow doesn't mean sour. There's already an 'is_expired?' method.
CR: "For logging, always use json so we can parse it. Doesn't matter if we can't read it; tools can."
CR: "For logging, never link log entries to user-readable code references; it's a security concern."
CR: "Make sure logging is human-readable and text-searchable and points back to the code."
> Confused asian guy, his hands raised.
CR: "Move this data formatting from the view into the model."
> No. Views are for formatting.
CR: "Use .html() here since you're working with html"
> .html() does not support html. It converts arrays into html.
NONE OF THIS IS USEFUL! WHY ARE YOU WASTING MY TIME IF YOU HAVEN'T EVEN READ MY CODE!?
dfjasklfagjklewrjakfljasdf5 -
1. talked to a dev and found out he never used git
2. saw a guy formatting the code in eclipse line by line, even when eclipse provides automatic formatting.2 -
Who the fuck came up with the idea of using SharePoint? What it even is?! Is it a website, wiki, document repo...?
Our version seems to be a broken wiki with no info content, old links, illogical navigation. And somehow word documents are integrated into it. Sometimes you see some weird calendar and timelines (from old projects). You can navigate into a folder, but you cannot get back. There's no ".." button?? You can map it like OneDrive to yourself, but Windows doesn't support any document version control. Where's the check in/out option from explorer menu??? I sure as shit have those for SVN, GIT etc. Is there a new version created everytime I press ctrl-s or only when I close the document?
Well, I could open the document in "online" mode. Ok, the formatting goes weird and everything is super slow. But at least I can fuck up someone elses document by accidentaly copy/pasting stuff, deleting lines, hitting my face into keyboard etc. There's automatically new version added!
Somehow you can enable the forced check in/out for documents. Obviously only the library admin can do that. And since he's just a program manager, he has no clue what the fuck is version control or document management. So he has this thing on his "things to do" list. For him, document management means sending various spec versions as email attachments. And the developers can figure out together who has the most recent one.
How did M$ push shit piece of shit to corporations? They even use this crap for the intranet making it slower than creation of galaxies. Though it's ok, since you cannot find anything from the intranet. It's all just head honchos blogs, seasonal greetings and stock market statuses. Nowhere is seen the downstairs cafeteria menu for the day. Or where to report for broken toilet. You know, stuff that 99% of people would like to see.
I complained to M$ about the SharePoint, but apparently there's no problem. You can code it yourself? Yeiii! So, instead of just updating some line in design spec, I have to take a 3 month class and get a MS sertificate, code some class-based-web-shit for 6 months and maybe, maybe then I can make the page/document look normal?
I am thinking, that I will just start writing my specs on paper. I will put them on the shelf and if you want to read it, you will check it out manually. And if someone else tries to edit it while you are editing it, you just cover the paper with your hands. There might be a requirement to make the document look more like MS Word, but that's easy to do. Just go to WC with the paper and wipe with it a couple of times.9 -
I've been working towards a degree in CS recently after being out of school nearly 10 years. I've been trying really hard to keep an open mind and not complain about the professors, but I have to let this out.
My one class we have to write all of our code in their specified editor which I hate, but I understand the need for standardization, but then once it is error free we have to copy and paste the code into ms word and turn it in!! Really?! In 2018 I can't just submit my source files and you open them to run and grade? I seriously have to copy my code into ms word for you to grade it? I don't even understand how you would grade that because it kills the formatting and readability, not to mention the quotes get changed to their curly counterpart which isn't valid syntax.7 -
Code comment rant of the day... fcking excel just cost me over half an hour to fix the fking formatting...1
-
```
Greetings @dfox @trogus, et al,
Here is some feedback with aspirations for the backlog.
I think it would be a good addition in the devRant UI if we could paste in code snippets and have that code display with proper fonts and syntax formatting, and even ideally with highlighting by language.
Currently, if we paste in any code or text for that matter it is translated into a sans-serif font (14px Helvetica Regular on webapp) which is fine for the poetic prose from our fine and noble devRant colleagues, but not ideal for shared monospace snippets of lesser and grand design.
Here are two websites that provide conversion of code snippets into formatted syntax, and HTML. http://hilite.me/ and http://markup.su/highlighter/
Both of these sites provide an API so highlighters can be used as a service.
Mockup attached.
Thank you @jaaku for your post, and welcome.
Cheers
devRant for the win
```13 -
Common Lisp's format function.
Because it supports some crazy convenient formatting directives, such as: writing numbers as words, writing numbers as Roman numerals, correctly writing plurals, etc
The code in the image will print:
one cat
two cats
three cats
...
seven cats3 -
The feeling when random dudes downvote a question, because a guy who finally earned some points on SO dared to format the code with `<code>`<br> He pasted code, log, even explained a little bit and ~500 point guy even flags it like _unclear_ although there's clearly visible import error.
I mean... as an answerer or moderator, I'd be damn ashamed for such behavior! I have absolutely no problem kick a person with words + explanation in my answer or comment, so that (s)he remembers to ask better questions and feels bad about that, because nooby questions are already answered so many times there.
But to downvote because of formatting even if you have a permission to edit and a flag for low quality or because you can't read ~40 lines of log makes you just a retard and hurt the whole remaining community of guys like me who find time to sit there and answer questions to help another people.7 -
I hate time.
Yes, that dimension which unidirectionally rushes by and makes us miss deadlines.
Also yes, that object in most programming languages which chokes to death on formatting conversions, timezones, DST transitions and leap seconds.
But above all, I hate doing chronological things from the point of view of code, because it always involves scheduling and polling of some kind, through cron jobs and queues with workers.
When the web of actions dependent on predicted future and passed past events becomes complicated, the queries become heavy... and with slow queries, queues might lock or get delayed just a little bit...
So you start caching things in faster places, figure out ways to predict worker/thread priorities and improve scheduling algorithms.
But then you start worrying about cache warming and cascading, about hashing results and flushing data, about keeping all those truths in sync...
I had a nightmare last night.
I was a watchmaker, and I had to fix a giant ticking watch, forced to run like a mouse while poking at gears.
I fucking need a break. But time ticks on...2 -
When u send ur code for review and instead of getting comments for logic u put in, u get 10+ comments regarding variable names , extra lines and formatting.
LMF7 -
Hello everyone!
This is a kinda follow up to my previous rant:
https://devrant.com/rants/1442655/...
So, it’s been a week since I started the internship. I am kinda lost to be honest.
The first day was awesome, but I have been going downhill since then. I make so stupid mistakes and it seems like I always think different than my mentor/employer (me making mistakes). Then he corrects me and I have to rewrite the code which I had to spend hours to think and get working. 😕😕
As @RantSomeWhere said, the guy is actually nice and still appreciates me and helps me all the time. I am really thankful for that. 🙂
As @plant99 said, I do have to be working a lot to try and meet the tasks that I am given. The employer does tell me to not over work but I still do if I have to, to get the thing done. I don’t feel nice if I don’t finish the work. So I do spend up to 12 hours (not continuously) on it at times. 😅
The code base… oh my god!! It is so bad (to me). Don’t get me wrong, we use the linting and auto formatting tools, but I can’t get over the 2 space tabs in C++ code. It makes me feel like I am not looking at code but at paragraphs of mumbo jumbo stuff. 😭😭
Oh and yes, it is confirmed. I HATE FRONTEND WORK! Especially when languages like JS and C++ are used in combination and interact with each other. 😨😨😱😱
Don’t get me wrong, I don’t hate JS or frontend, but I hate doing it myself. So not my cup of tea. Kudos to those who actually do it! 😎👏🏻🎊
Overall, I guess, it is going decently. I feel so scared at times, consumed by the fear, that my code will be wrong and he’ll be disappointed in me. Yea I know that I shouldn’t be upset with how others feel. But it does make me sad when I disappoint my mentor (who is still rooting for me). 🙁
I am hoping to get better over time. This is definitely a great experience for me because my code has never been judged before. I have always been the “king of code” in my college/social circle. 🤭🤭
Honestly, this is actually humbling. I guess I definitely needed this 😅😅. And as they say, you don’t improve by being the top. You improve by leaping forward, ending up at the bottom of the heap of the next level, and growing up from there. 😅
Oh and I also realized - remunerative benefits are DEFINITELY motivating 😂😂😂😂
And the 5 days work also definitely makes me MUCH more excited for the weekends 😆😆😂😂
Thanks everyone for cheering, motivating, and giving me advise.
@oudalally I definitely found your advise quite helpful 😁😁😊😊
PS: ooh this my biggest rant/story yet! Yiiipppeeeeeee 😁😁😊😊7 -
The legacy codebase, episode 94385948:
How to neatly organize your code in the age pre-docblocks.
Bonus: could this function be renamed to colectomy? Or maybe de-punctuation?
(yep, probably a bad joke with a "typo", sorry)
Bonus 2: seriously? A function for that?13 -
I tried LSD yesterday!
Backstory: I have a weird combo of bipolar type 1 and autism. During the day, my brain works inconsistently. Here how my day usually goes:
09:00. I wake up. Uninterested, cold, masculine. No thoughts in the background. No OCD.
12:00. Brain warms up. Thought process begins. Thoughts are short in their length
14:00. Thoughts start to get longer. Stress starts to accumulate. Background thoughts start, now typically 2–3 at a time.
16:00. Twitching begins. Thought chains are now 5–6 concepts long, one following the other. Perception level rises quickly. I start to feel more feminine. It is in this state that I start to spot imperfections and mistakes looking at code or text without reading it. I see it like a painting, and mistakes appear as “visually wrong” parts. This does not depend on formatting.
17:00. OCD becomes more severe. I HAVE to touch all the surfaces around me, evenly, as if my hands were text highlighters, and I had to paint everything evenly, without overlaps or spots that are brighter or darker than the others. Some surface textures become irritating, and feel quite unpleasant to the touch. If I go for a run now, like 3 km or so, I feel somewhat relieved.
18:00. Things are getting serious. Creativity levels through the roof. I speak in long, never-ending, profound sentences. Background and foreground thoughts almost become one. I appear visually drunk and happy, despite never drinking alcohol. Femininity rises even further. Sometimes, when I speak to a small group of people, especially if I go with friends to meet new people, and we go to some bar, new people ask to record my voice or to write down whatever I’m saying. To be honest, this reason alone is a huge boost to how I see yourself.
19:00. OCD is crazy now. Surfaces have soul.
21:00 <— Gotta take my meds and go to sleep here to prevent what comes at 22:00
22:00. All thoughts, both foreground and background, fully became one. Now my brain officially disobeys me and thinks on its own, and I can ride it like a surfer at best. Twitching becomes concerning. I develop a 1000-yard stare. I am officially a female. Physical strength is somewhat enhanced. Pain tolerance lowered significantly.
23:00. Derealization begins. The world around me appears two-dimensional and flat, like a picture. It is hard to get home on foot, even in close (less than one km) proximity. Brain is fully numb. All that thought monstrosity that was building up is just noise now. Zero “flops” available to think about something I want to think about, like how much money I have on me or what time it is.
I go to sleep. I see nightmares. I wake up, and the cycle repeats.
Contrary to a popular opinion, I never take any “brain-boosting” meds like antidepressants, and I think now you can see why. I consume neither alcohol nor caffeine. Neither me, nor my doctors want my brain to explode. I only take lamotrigine that helps to “lower down” mania, and quetiapine, a neuroleptic, that slows down my brain, like a neuroleptic. Both are there to slow down my brain, to kinda “throttle” my brain like a CPU to cool it down.
That said, 100ug of LSD just… brought me my usual 18:00 state, but in the morning?
All that small-dose recreational ordeal? The thing that helps people feel more energetic and creative?
People pay money… for that? To feel the way I feel every evening?10 -
Welp, just found the first horrifying innacuracy in Silicon Valley... Richard prefers tabs over spaces. That cant possibly be a thing, right? Right!!?9
-
Once had a teammate who added
// @formatter:off (eclipse)
at the beginning of nearly each class, to make sure my auto-format on save does not ruin his nice formatting
as i usually let eclipse take care of this, i commited unformatted code by mistake
so he formatted my code by hand1 -
Sorry, need to vent.
In my current project I'm using two main libraries [slack client and k8s client], both official. And they both suck!
Okay, okay, their code doesn't really suck [apart from k8s severely violating Liskov's principle!]. The sucky part is not really their fault. It's the commonly used 3rd-party library that's fucked up.
Okhttp3
yeah yeah, here come all the booos. Let them all out.
1. In websockets it hard-caps frame size to 16mb w/o an ability to change it. So.. Forget about unchunked file transfers there... What's even worse - they close the websocket if the frame size exceeds that limit. Yep, instead of failing to send it kills the conn.
2. In websockets they are writing data completely async. Without any control handles.. No clue when the write starts, completes or fails. No callbacks, no promises, no nothing other feedback
3. In http requests they are splitting my request into multiple buffers. This fucks up the slack cluent, as I cannot post messages over 4050 chars in size . Thanks to the okhttp these long texts get split into multiple messages. Which effectively fucks up formatting [bold, italic, codeblocks, links,...], as the formatted blocks get torn apart. [didn't investigate this deeper: it's friday evening and it's kotlin, not java, so I saved myself from the trouble of parsing yet unknown syntax]
yes, okhttp is probably a good library for the most of it. Yes, people like it, but hell, these corner cases and weird design decisions drive me mad!
And it's not like I could swap it with anynother lib.. I don't depend on it -- other libs I need do! -
Keep this in mind: I don't like WordPress and PHP at all!!!
So a couple of days ago my boss asked me if I could extend a custom made WordPress plugin made by our intern. First thought: sure why not? Boss says: it has to be done in less than 100 hours of work (an estimate done by my boss and the intern). Me: I can't tell you that before I have seen the code and what functionality has to be in the extension. Boss: Cool, look it over this weekend and tell me if you want to do it or not.
I looked it through and my answer will probably be: NO WHERE IN HELL am I gonna are this in less that 100 hours! 1. no tests has been performed so I have absolutely no clue if his code works.
2. variable names are mostly: $string_query (whatever that means?), $result, $string_temp and so on.
3. Methods and functions are more than 250 lines long, with shitty formatting, and more comments than code. WTF?
4. The estimate has been made by an intern and my boss (doesn't know much about programming). I haven't been consulted about it....
5. No version control. No branches, no commits other than initial commit. Great.
6. Most comments in the code just tells me what I can read from the code. What it returns and what it takes as params. Can I please know wtf your method call named $booking->run () does? I still haven't found this method in the code after 1 hour of intensively looking for it...
FFS man... Not gonna do this, even though I thought it would have been an interesting project initially.
Sorry for the long rant... I just wish the intern would have consulted me about all this shit, since he obviously have bad practices. *sigh*6 -
I just finished designing an entire asset management pipeline and christ on a fucking pogo stick, if it isn't convoluted.
Theres a lot of game engines out there, but all of them do it a little different. They all tackle a slightly different problem, without even realizing it.
1. asset management
2. asset change management
3. behavior change management
4. data management
5. combinatorial design management.
6. Combinatorial Behavior management
7. Feature completion
ASSET MANAGEMENT is exactly what it says on the tin.
ASSET CHANGE management can be thought of handling the import, export, formatting, platform specific packing, and versioning (including forking) of an asset.
BEHAVIORAL CHANGE management is a subset of asset management, because code is a subset of assets (depending on how you define 'assets'). The oldest known example of this is commenting and uncommenting code.
Or worse, printf debugging.
This can be file versioning, basic undo services, graph management of forks and mergers, toggles for features or modules, etc.
DATA management is about anything that doesn't fall into the other categories, everything from mission text to npc dialogues, quests, location names, item stats, the works. Anything you'd be tempted to put in a database, falls under this category. Haven't yet seen many engines offer this as an explicit built in tool as of yet, because the other problems are non-trivial as is, so this is a bit of low hanging fruit that gets handled by external tools, or loaded from formats as simple as json.
COMBINATORIAL DESIGN management is the idea of prefabbing, blueprints of broader object design using nested prototypes of existing game objects, to create more complex, reusable set pieces. Unity did this well. GM does this in part.
COMBINATORIAL BEHAVIOR management is entity-component systems, plus tooling to make it easy to add, remove, and configure components and their values on entity blueprints, also not uncommon. Both stencyl and unity do this. GM has a precursor to this in the form of configurable fields, but these fields are not based on component scripts attached to objects.
FEATURE COMPLETION is that set of gameplay mechanics or styles of design that an engine naturally makes easier to include or build in a game.
I don't think I'm aiming for all that, but I think at minimum a good engine has to do asset management, behavioral change management, prefabs, and entity-component systems with management tools for that. And ideally, asset change management.8 -
I once made an oopsie in an API for a logistics provider (one of the biggest in Germany...).
To understand the oopsie...
Based on input data a string must be created containing several hex / string / formatted values.
Think of ...
$return .= sprintf("%02X", ...)
I think there were around 15 to 20 lines, although more complicated.
The bug happened because I had a brainfart.
What was previously one line with... Many many many many variables, I had to split into multiple lines since internal stuff changed and it was impossible to change this oneliner of hell with >50 formatting codes.
Of course we didn't test everything.
XD
What we didn't test was - funnily enough - wether the casting was correct in all cases.
I misplaced a formatting code.
And we had a major brainfart because we tested integer, but not double / float values....
We sent for a long time packages much cheaper than allowed (took thw logistics provider nearly 3-4 months to realize this :) ).
Spot the difference:
@highlight
print sprintf("%01.2s", $money).PHP_EOL;
print sprintf("%01.2f", $money).PHP_EOL;1 -
My eyes hurt everytime our backend guy gives me a new REST API to implement in our app and always the formatting of the json is something like this. Like why can't you just fucking format it properly so I won't have to look at my code and feel disappointed for writing such ugly code. All because your lazy ass didn't care to understand the fundamentals of how json objects and arrays work !!! It's been a month since I've joined this company and I'm tired of explaining why we should use the status code for failure checking and not this stupid pass/fail status flag. I don't even remember how many times I've brought it up but everytime I get reasons like "Dude, you know what our server is never going to go down or fail so it doesn't even matter". And at that point I feel like I shouldn't even argue with him anymore.3
-
Because, definitely, size shouldn't matter.
Code description for the blind: if the size of this query is loved, then close the database and die.8 -
Already using PhpStorm for 2 years now. Just discovered there was an auto-formatting tool for your code. Could have saved me hours of work. Why is life so hard with me2
-
If a client changes the formatting of their data without telling me, and it breaks the code that I wrote for them, could they own up to their lack of communication, and not give me shit for it?
This problem was caused entirely by you. Can you fuck right off? Would you kindly? -
what the fuck is up with devs who always send screenshots of code and/or log files? In Slack, which has great functionality for formatting text snippets in a variety of languages and data types?! screenshots of code are really a pet peeve lately. You can't copy the text or click on any urls or do *anything* with a fucking screenshot. so dumb.6
-
Recently installed SonarQube and its been amazing to see the level of code quality (or lack thereof)
Some projects have 30 to 60 days of technical debt and I found a few files with a cyclomatic complexity over 100. I’m still learning what the “good” numbers should be.
Yesterday, couple of devs were very proud they were going to start reducing the numbers, they started with one of my solutions that had 5 minutes of technical debt. Yes, 5 minutes.
DevA: “OMG…look at this…it has a cyclomatic complexity of 11…that’s terrible. I thought we were supposed to be professional developers.”
DevB: “And take a look at this, he used the double-slash instead of a triple slash for comments. How does any of code even compile?!”
Me: “Maybe we should tweak some of those SonarQube rules so they make more sense to our code base. We’re never going to use unicode, so all those string culture warnings should go away and code comment formatting? Who cares? Be happy we have comments. I think we should also focus on the bigger fish in that pond. The CRM project is one of the biggest and has a lot of improvement opportunities.”
DevB: “There you go again, don’t bring me problems, bring me solutions..ha ha”
DevA: “Yea, no kidding …hey…did you see the logger? OMG…the whole class is over 25 lines…we gotta split that up into smaller projects so it’s more manageable.”
It’s a good thing our revenue stream isn’t dependent on people getting work done.3 -
Did you know that Alt+f4 and Ctrl+w does not format your code in VS code?
Yes? Our college didn't and we had a good laugh 😂
After that we tried Alt+space+c but he did not trust us anymore.2 -
Is there some way to format code on devrant or say, surround a section of text with (at minimum) italics?
I mean we *are* on a site dedicated to developers.22 -
I swear this mofo runs all of my code through pylint, he comments about every PEP8 inconsistency and every formatting decision he doesn't like.
Same guy also got in a small debate with one of our converts from the older project where they used C#, because he still writes everything in Windows-style CamelCase. After that, when we needed to decide on a password for a shared thing, I came up with "camel_case".1 -
Just opened a project that I'll be working on for work, first thing I notice is C++ like code formatting, which hurts my eyes (keep in mind this is Java)
But then decompiled Hybris classes came at me with not only that, but three newlines between methods.
I fear what I have yet to see...4 -
I've been working for two days (after work) on my blog idea...
Man I forgot how fun it is to work on your own projects, and the stuff I learn at the moment... It is insane!
I am currently a very happy developer, hopefully I can keep this up.
I still have to look into automated unit testing and code formatting checks with github though, cant wait! -
I'm considering quitting a job I started a few weeks ago. I'll probably try to find other work first I suppose.
I'm UK based and this is the 6th programming/DevOps role I've had and I've never seen a team that is so utterly opposed to change. This is the largest company I've worked for in a full time capacity so someone please tell me if I'm going to see the same things at other companies of similar sizes (1000 employees). Or even tell me if I'm just being too opinionated and that I simply have different priorities than others I'm working with. The only upside so far is that at least 90% of the people I've been speaking to are very friendly and aren't outwardly toxic.
My first week, I explained during the daily stand up how I had been updating the readmes of a couple of code bases as I set them up locally, updated docker files to fix a few issues, made missing env files, and I didn't mention that I had also started a soon to be very long list of major problems in the code bases. 30 minutes later I get a call from the team lead saying he'd had complaints from another dev about the changes I'd spoke about making to their work. I was told to stash my changes for a few weeks at least and not to bother committing them.
Since then I've found out that even if I had wanted to, I wouldn't have been allowed to merge in my changes. Sprints are 2 weeks long, and are planned several sprints ahead. Trying to get any tickets planned in so far has been a brick wall, and it's clear management only cares about features.
Weirdly enough but not unsurprisingly I've heard loads of complaints about the slow turn around of the dev team to get out anything, be it bug fixes or features. It's weird because when I pointed out that there's currently no centralised logging or an error management platform like bugsnag, there was zero interest. I wrote a 4 page report on the benefits and how it would help the dev team to get away from fire fighting and these hidden issues they keep running into. But I was told that it would have to be planned for next year's work, as this year everything is already planned and there's no space in the budget for the roughly $20 a month a standard bugsnag plan would take.
The reason I even had time to write up such a report is because I get given work that takes 30 minutes and I'm seemingly expected to take several days to do it. I tried asking for more work at the start but I could tell the lead was busy and was frankly just annoyed that he was having to find me work within the narrow confines of what's planned for the sprint.
So I tried to keep busy with a load of code reviews and writing reports on road mapping out how we could improve various things. It's still not much to do though. And hey when I brought up actually implementing psr12 coding standards, there currently aren't any standards and the code bases even use a mix of spaces and tab indentation in the same file, I seemingly got a positive impression at the only senior developer meeting I've been to so far. However when I wrote up a confluence doc on setting up psr12 code sniffing in the various IDEs everyone uses, and mentioned it in a daily stand up, I once again got kickback and a talking to.
It's pretty clear that they'd like me to sit down, do my assigned work, and otherwise try to look busy. While continuing with their terrible practices.
After today I think I'll have to stop trying to do code reviews too as it's clear they don't actually want code to be reviewed. A junior dev who only started writing code last year had written probably the single worst pull request I've ever seen. However it's still a perfectly reasonable thing, they're junior and that's what code reviews are for. So I went through file by file and gently suggested a cleaner or safer way to achieve things, or in a couple of the worst cases I suggested that they bring up a refactor ticket to be made as the code base was trapping them in shocking practices. I'm talking html in strings being concatenated in a class. Database migrations that use hard coded IDs from production data. Database queries that again quote arbitrary production IDs. A mix of tabs and spaces in the same file. Indentation being way off. Etc, the list goes on.
Well of course I get massive kickback from that too, not just from the team lead who they complained to but the junior was incredibly rude and basically told me to shut up because this was how it was done in this code base. For the last 2 days it's been a bit of a back and forth of me at least trying to get the guy to fix the formatting issues, and my lead has messaged me multiple times asking if it can go through code review to QA yet. I don't know why they even bother with code reviews at this point.18 -
Feature request: Being able to copy text from rants/comments on mobile. Also some sort of code formatting would be nice!2
-
I took a job with a software company to manage their product, which was a SaaS property maintenance system for real estate, social housing, etc.
There was no charge to real estate agents to use it but maintenance contractors had to use credits to take a job, which they pre-purchased. They recharged their credit costs back to the real estate agent on their invoice).
Whether this pricing model is good or not, that's what it was. So, in I came, and one of the first things management wanted me to deal with was a long-standing problem where nobody in the company ever considered a contractor's credits could go into the negative. That is, they bought some credits once, then kept taking jobs (and getting the real estate agent to pay for the credits), and went into negative credits, never paying another cent to this software company.
So, I worked with product and sales and finance and the developers to create a series of stories to help get contractors' back into positive credits with some incentives, and most certainly preventing anyone getting negative again.
The code was all tested, all was good, and this was the whole sprint. We released it ...
... and then suddenly real estate agents were complaining reminders to inspect properties were being missed and all sorts of other date-related events were screwed up.
I couldn't understand how this happened. I spoke with the software manager and he said he added a couple of other pieces of code into the release.
In particular, the year prior someone complained a date on a report was too squished and suggested a two-digit year be used. Some atrocious software developer worked on it who, quite seriously, didn't simply change the formatting of that one report. No, he modified the code everywhere to literally store two-digit years in the database. This code sat unreleased for a year and then .... for no perceivable reason, the moron software manager decided he'd throw it into this sprint without telling me or anybody else, or without it being tested.
I told him to rollback but he said he'd already had developers fixing the problems as they came up. He seemed to be confident they'd sort it out soon.
Yet, as the day went on more and more issues arose. I spoke to him with the rest of the management team and said we need to revert the code but he said they couldn't because they hadn't been making pull requests that were exclusive to specific tickets but instead contained lots of work all in one. He didn't think they could detangle it and said the only way to fix was "play whack-a-mole" when issues came up.
I only stayed in that company for three months; there was simply way too much shit to fix and to this day I still have no idea the reasoning that went on in the head of anyone involved with that piece of code.2 -
This should put an end to those code formatting rants. Now everyone can be on the same page.
https://prettier.io/2 -
Why is there always one asshole!
New job just a month in, had a meeting where we could bring up improvements and put them on cards.
I brought up the idea of using slack so we could collaborate better or maybe a collab space. We all have our own offices or share with high walls.
The guy running the meeting has the same title as me said we never had that before, are you unhappy with yiur onboarding?
Slack or a messaging app is industry standard for even none tech companies. I was polite and said it was just a suggestion and it might make it easier to get help for the new people if there is a group chat.
Also brought up using a formatting standard so code reviews are spent commenting on spacing. I said we could you prettier to implement that and just pick a standard.
He said that was an issue because people were not paying attention before they pushed the code.
I am sorry I am new so I am rewriting and rewriting code all the time. I was to format on save and not spend time fucking formatting!
I could use a package before since it I formatted it would look like a bunch of fucking changes in git.
Why make things harder? Part of the meeting was how to get code done and PR’ed faster so it gets to the testers. Autoformatting shit would help.6 -
When you are creating a tool for a direct client that has no idea about development. She asks you to develop a tool to open a log file and format in a specific way inside Excel.
Ok, this is simple. In about 4 hours I can do that. After delivery and the client has tested, they answer: "Oh, it's working fine. You just forgot to include Y".
Of course Y were not in the initial scope. They supposed it was as it would makes sense to them, but at first they just asked a tool open a log. Ok, not a problem, I will implement it.
Weeks after implementation they answered it was not working with another specific file format (from a not industry default tool), but they have this client and my code should work with it too.
Ok, let's implement that. I had to change some functions and with some extra hours I could make it work. Once more, after delivery, they said the tool has to use a specific formatting for this file extension, that was not only different to the others, but I had to rewrite the entire code to make it work.
At least they paid me some extra hours...4 -
Well, I am not sure whether this is supposed to be about worst experience as a reviewER or a reviewEE so I'ma do both. First as a reviewer.
So, on my first project in this company, I introduced automated build scripting (read: suggested, was "volunteered" to do it, then had to bust my ads to get it done). Prior to this, our process was run the thing in Visual Studio a bunch of times (don't ask) and package the resulting files. Well, new requirements made this not sustainable.
So after many many meetings in which I assured my co-workers that the script wouldn't cock up and go sideways and format our server (HOW???) and showed them how to work it AND added all the features they requested. I finally send the script out for code review. Oh the joy. Questions like: "why did you implement this?" Came from the guy who told me to implement it. "Can you change the formatting?" I checked and no. "Why isn't this to the code standard?" Because the code standard doesn't include scripting languages.
And here is the piece that takes the whole piss soaked shitsicle pie "I don't understand why we're doing this in the first place. We have a build process already, why do we need a new one?" FUCKING REALLY?!?!? YOU WERE IN THE GODS DAMNED MEETING WHERE WE DECIDED TO DO THIS!!! SET OUT THE REQUIREMENTS!!! LITERALLY EVERYTHING TO DO WITH THIS SCRIPT YOU WERE THERE AND YOU'RE ASKING WHY WE'RE DOING IT NOW!?!?! Fucking hell. I forced it through anyway because I had the higher ups all signed off on it, but seriously. Just because we're doing something new that slightly inconveniences you, doesn't mean it doesn't need to be done. Stop being afraid of change.
Side note: these people actually would regularly hold up process and product improvement because change is scary.2 -
Automatically clean up code, removing redundant and duplicate bits, splitting large functions, and formatting it nicely. Especially useful when trying to understand some garbage code someone else wrote which you need to rewrite.2
-
I've yet to see a developer use visual studio code in one of my projects instead of webstorm/intellij and not fuck up the code formatting in their first commits. Ffs use the damn editorconfig file people.
Also please use an ide that shows you warnings and unused imports I'm tired of cleaning this crap up5 -
I'm a C++/Obj-C programmer finding it ludicrously hard to switch to Swift.
I find that the constant ability (leading to very poor programmer code) to reduce syntax and add tokens reduces readability and nowhere is this more apparent that with closures.
I'm working through (to my shame) Ray Wenderlich's Swift course and the closure chapter has this:
PS I loathe K&R as much as I do Swift so it's all in Allman formatting for clarity.
let multiply: (Int, Int) -> Int =
{
(a: Int, b: Int) -> Int in
// do Something else
return a * b
}
Why oh why isn't this more simply and elegantly written as:
let multiply = (a: Int, b: Int) -> Int
{
// do Something else
return a * b
}
The equals sign shows clearly that it's a closure definition assignment, as does the starting 'let'. But this way all of the stupid excesses, like the 'in' keyword, the repetition of the params / return type only this time with useful labels and additional tokens are removed and it looks and reads much more like a regular function and certainly a lot more clearly.
Now I know that with the stupid ability of Swift you can reduce all this down to return $0 * $1, but the point I'm making is that a) that's not as clear and more importantly b) if this closure does something more than just one line of code, then all that complicated stuff - hinted to by the comment '// do Something else' means you can't reduce it to stupid tokens.
So, when you have a clousure that has a lot of stuff going on and you can't reduce it to stupid minimalism, then why isn't is formatted and syntactically better like the suggestion above?
I've mentioned this on the Swift.org (and got banned for criticising Swift) but the suggestions they came up with were 'use type inference' to remove the first set of params / return type and token.
But that still means the param list and return type are NOT on the same line as the declaration and you still need the stupid 'in' keyword!5 -
/me joining a new front-end project with enforced prettier rules to complete the build pipeline.
No double-quotes ! Single-quotes all the way !
- weird flex, but OK. I'll comply
No CRLF ! LF only !
- Ok, now you're starting to annoy me. With git autocrlf I can have my precious CR locally bu check in only LF and YOU CAN GIVE THE FUCK ABOUT WHAT LINE ENDINGS I USE LOCALLY WHEN EVERYTHING WILL BE CORRECT WHEN PUSHING COMMITS!
No semi-colons !
- Now I hate you18 -
I wrote a tech book several years ago for O'Reilly, which itself was a dream come true. I'm still amazed I got that deal done, and the fact that my name was on a title with a unique animal on the cover is SUPER cool.
Back then, their publishing system was based on Git with their own markup language, and it was sort of a chore to use. Easy and straightforward, but laborious. I spent 3 entire days just (re)formatting my drafts to their code. They've upgraded it since, I see, based on the same fundamental versioning idea and still using Git. Neat!
I've also done tech writing for .NET Magazine, which used Word's change tracking, and penned articles for other publications using Google Docs, or even drafts in WordPress.
Have all of you run into interesting systems used by publishers to manage content?2 -
Wrapping up a project, I am cleaning code to give the customer the source code. The project had lasted over a year. I joined the team a few months back and it frustrated me how messy the code was. In my previous teams, any new resource was told to stick with the rules, and eventually they became embedded in them. The case seemed opposite here. Developers who wrote clean code became lax (they made me even more pissed).
Now I have the job of getting rid of warnings, formatting issues etc and I do not say this lightly, but, there was no fear of god in anyone who worked on this codebase. The code formatting I have seen makes me wanna...5 -
When I only want to code, but university LaTeX bullshit burns my time 😭 they dont even have clear rules.
Not to mention that their formatting rules make my work look like shit I would never read myself.5 -
Why are you trying to multithreaded c++ file i/o? If you can't write c++ code that's faster than your hard drive, please just don't write c++.
Literally no complex calculations, just some insane string formatting.10 -
Python ecosystem drives me nuts!
Not the language tho, i kinda like it, and some features are damn straight awesome.
But ecosystem... man!
The way ppl write code in it, the lack of documentation (or in quality of it)...
I recently wanted to check how library does one thing (debug purposes), and not only i had to track some method up 3 classes, the other method i hunted only by signature and still i have no idea how it ends up being accessible where it should...
"Explicit is better than implicit" my ass...
Also dev managed to make the code very unreadable. In Python. Language with such strong opinions about code formatting. HOW ?!!
And the worst part is, it wasn't that big of a library and didn't really need the full freaking Enterprise OOP treatment with layers over layers of generally named classes and fucked up architecture.
FUCK THAT LIB, FUCK THAT DEV, FUCK IT ALL !!!
PS.
Project seems to be abandoned for a year or two, so there is hardly an option to fix things with the author sadly :(3 -
Sharing a first look at a prototype Web Components library I am working on for "fun"
TL;DR left side is pivot (grouped) table, right side is declarative code for it (Everything except the custom formatting is done declaratively, but has the option to be imperative as well).
====
TL;DR (Too long, did read):
I'm challenging myself to be creative with the cool new things that browsers offer us. Lani so far has a focus on extreme extensibility, abstraction from dependencies, and optional declarative style.
It's also going to be a micro CSS framework, but that's taking the back-seat.
I wanted to highlight my design here with this table, and the code that is written to produce this result.
First, you can see that the <lani-table> element is reading template, data, and layout information from its child elements. Besides the custom highlighting code (Yellow background in the "Tags" column, and green gradient in the "Score" column), everything can be done without opening even a single script tag.
The <lani-data-source> element is rather special. It's an abstraction of any data source, and you, as a developer can add custom data sources and hook up the handlers to your whim (the element itself uses the "type" attribute to choose a handler. In this case, the handler is "download" which simply sends a fetch request to the server once and downloads the result to memory).
Templates are stored in an html file, not string literals (Which I think really fucks the code) and loaded async, then cached into an object (so that the network tab doesn't get crowded, even if we can count on the HTTP cache). This also has the benefit of allowing me to parse the HTML templates once and then caching the parsed result in memory, so templates are never re-parsed from string no matter how many custom elements are created.
Everything is "compiled" into a single, minified .js file that you include on your page.
I know it's nothing extraordinary, but for something that doesn't need to be compiled, transpiled, packaged, shipped, and kissed goodnight, I think it's a really nice design and I hope to continue work on it and improve it over time1 -
dev: ugh we need to set and implement coding standards
same dev: no I don't need to follow what you just said, it's already clean and readable (it's not) -
Flask people
so I was given this old flask project, around 3k lines written in py2, the code is simply old and not refactored. So, it's pile of shit. Migrations completely botched as the original author created reference to live data in models.
Very strict line formatting resulting in backslashed ternary conditions.
Even saw manually formatted json responses... _line by line_.
My job is to clean this mess and eventually do as much as possible to freshen the whole project.
Currently just refucktoring the code as it's the only easy thing to do out of everything that could be done (it's still slow process).
Any tricks and tips? currently considering to try upgrading it to py3 but it feels like throwing gunpowder into already burning house.3 -
I don't think there is anything more painful than seeing some programmers writing badly formatted code.
I mean how can anyone use a single space or completely inconsistent spaces and tabs.
What is more painful is that you cannot scream at them because you don't wanna be an A-Hole trying to force your methods to others. -
In SublimeText, I noticed that my markdowns formatting was not showing up correctly— I decided to download the new markdown package altogether hoping for some kind of update/fix. Turns out the package comes with a super ugly color theme which overrides the default theme of SublimeText. After some googling and experimenting, I found way to override this through the package settings. I always use git through my terminal but I thought let’s try to use git through my code editor and see how it works. I downloaded the git package but then I notice that git tool shows status and all correctly but doesn’t push files to GitHub (it says fatal: unable to read current working directory). Then I download another application called SublimeMerge. It works correctly on its own (pushes files to GitHub) but SublimeText is still not doing the same. Then I tinker around with my SSH keys hoping for a fix, but nothing works. I even go to stackoverflow and search for a solution but I find nothing (I even wrote a post asking for a solution but no replies till now). Fuck it! I now open the file with VSCode. Open terminal within VSCode and add/push/commit through it and everything works perfectly. So goodbye SublimeText I guess 👋🏾11
-
Things that piss me the fuck off about user programs(in this case text editors):
No fucking documentation or signs of it available, a promise from like 3 years ago to post: tutorials/actual docs and yet unfulfilled shit. Yet the author sells the editor, you can get a free version of it, but the extension api is only given in the paid version. It's like $12 bucks, which depending on where you are from is really the cost of a meal.
The editor in question is 4coder, seems like a good stack for building C/C++ based applications with a lot of cool utilities underneath, I see dudes using it to create a lot of cool shit online, but things like moving input, stopping the thing from formatting pasted code etc etc. Shit, even reaching the documentation is fucky, you get the names of the commands......ok...awesome...wtf do I do with these? Why do i need to watch a 20+ minute tutorial from the developer instead of being able to read a retarded ass tutorial regarding how to do the most basic shit? For an editor that is set to replace Emacs and Vim for developers inside of a windows platform....it sure is lacking AF in that regards.
I really want to work with this thing because it seems to be made with a lot of heart, just can't stand the fact that the documentation is lacking like a motherfucker4 -
public class TodaysRant extends YesterdaysRant implements Rant {
public string getRantContent() {
StringBuilder sb = new StringBuilder();
sb.Append(super.getRantContent());
sb.Append("Going on my rant from yesterday, should you be required to provide your own laptop/desktop/equipment, or should it be the responsibility of the company?");
return sb.ToString();
}
}1 -
Not an angry rant, and not strictly related to code, but I think it's important, nonetheless.
If you've ever considered or been approached by Amazon, please read this short real-life story first and judge for yourself: https://dev.to/voodooattack/...
P.S: I didn't post this here because I needed markdown for formatting. Sorry. :(6 -
In code reviews they are whining about formatting with spaces and newlines and naming.
The fact that they are too bored to write unit tests and code coverage cannot reach 20%? Isn't it just sad?6 -
So one thing that kinda bugs me about php embedding is the white space formatting it creates when you break your project into templates or includes.
It has no affect on the front end at all but if you look at the source code, usually the top tag in a php template is spaced way off, unless you move your entire php code block all the way to the left. Then somehow it looks right on the frontend but now your php source code looks messy xD Could just be my code editor (ST3) but idk. Anybody else?2 -
My boss writes code like this:
def someFunction (someArg: String) = ...
Who does that?! A space? Da fuck?! And it's all over the code base. Whenever another dev touches any of his stuff, we correct it:
def someFunction(someArg: String) = ...
The way god intended it!8 -
We have 4k Monitors and SSDs with more than 120 GB, why there are still new projects that use a formatting style that doesn't have a clear relation of the opening { and corresponding closing }. i.e. put them either on the same line or column?
Please don't write code where the imaginary line between the { and } goes diagonally over other parts of the code. It makes it unreadable and my brain hurts from looking at it. Its better to have readable code and "waste" some lines and bytes for code that is easier to read.10 -
As we are all aware, no two programmers are identical with regard to personal preferences, pet peeves, coding style, indenting with spaces or tabs, etc.
Confession:
I have a somewhat strong fascination with SVG files/elements. Particularly icons, logos, illustrations, animations, etc. The main points of intrigue for me are the most obvious: lossless quality when scaling and usage versatility, however, it goes beyond simply appreciating the format and using it frequently. I will sit at my PC for a few hours sometimes, just "harvesting" SVG elements from websites that are rich with vector icons, et al. There is just something about SVG that gets my blood and creativity flowing. I have thousands of various SVG files from all over the web and I thoroughly enjoy using Figma to inspect and/or modify them, and to create my own designs, icons, mockups, etc.
Unrelated to SVG, but I also find myself formatting code by hand every now and then. Not like massive, obfuscated WordPress bundle/chunk files and whatnot, but just a smaller HTML page I'm working on, JSON export data, etc. I only do it until it becomes more consciously tedious, but up to that point, I find it quite therapeutic.
Question:
So, I'm just curious if there are others out there who have any similar interests, fascinations or urges, behaviours, etc.
*** NOTE: I am not a professional programmer/developer, as I do not do it for a living, but because it is my primary hobby and I am very passionate about it. So, for those who may be speculating on just what kind of a shitty abomination of a coworker I must be, fret not. Haha.
Also, if anyone happens to have knowledge of more "bare-bones" methods of scraping SVG elements from web pages, apps, etc. and feels inclined to share said knowledge, I would love to hear your thoughts about it. Thank you! :)2 -
Thank You StackOverflow.
After looking for 4 hours on internet and stackoverflow, searching whole documentation and blog pages, i didn't find a solution to an error I was getting in my Android app.
So I began and started writing the question on StackOverflow, phrasing it properly, to the point (so as to not get downvoted), providing all my files and code (so not to get closed or duplicate), formatting them properly, and explaining why my error was unique. On the last XML file I see something trying to call a function which wasn't declared.
So yeah, there you go.
But it's not over yet.
I saw it and got excited, corrected it and ran the code again. But accidentally ran it on the emulator and forgot my device wasn't connected anymore, and the emulator wasn't already loaded either. And my machine is old.
I don't know what to say anymore.1 -
Context:
I recently joined a team and we are working on a fairly large mobile app using RN, they started a month ago. And I noticed, they don't have any fucking tests and static typings like Typescript.
I have this pretentious team leader that acts like he's the BeSt dEveLopEr in ThE woRld, and act like he always know what he's doing. But in reality, he code like crap, the formatting is shit because the ESLint config is not working, he's not even aware of it until I've fixed it. He's using every BAD Practice available, unused variables and imports are scattered everywhere, etc. And the directory structure is crap and no consistency.
How can I convince this ignorant mofo to use tests and typescript? He believes that adding those will take us longer and cost more money to the client, based on my experience, this is not the case, it's only slow on the first 2 weeks and it is worth it in the long run.13 -
I am just student looking for job, and got this pre interview test:
Develop an Android or iOS app with login and password input field, download button, place for image we prvided.
... reading further:
What we are looking for in the code ?
internal quality:
-consistent formatting of the source code
-clean, robust code without smells
-consistent abstractions and logical overall structure
-no cyclic dependencies
-code organized in meaningful layers
-low coupling and high cohesion
-descriptive and intention-revealing names of packages, classes, methods etc.
-single small functions that do one thing
-truly object-oriented design with proper encapsulation, sticking to DRY and SOLID principles, without procedural anti-patterns
-lots of bonus points for advanced techniques like design patterns, dependency injection, design by contract and especially unit (or even functional or integration) tests
external quality:
-the app should be fully functional, with every state, user input, boundary condition etc. taken care of (although this app is indeed very small, treat it as a part of big production-ready project)
-the app should correctly handle screen orientation changes, device resources and permissions, incoming calls, network connection issues, being pushed to the background, signing deal with the devil :D and other platform intricacies and should recover from these events gracefully
-lowest API level is not defined - use what you think is reasonable in these days
-bonus points if the app interacts with the user in an informative and helpful way
-bonus points for nice looks - use a clean, simple yet effective layout and design
... I mean really ? and they give me like 2 days ?4 -
Im ranting in progress of the issue so i dont get the urge to do any of the things not seem as acceptable to fix this issue.
Issue: yesterday i activated a device i havent had any (even prepaid) service on in years, and had a 'new'(to me) number assigned...
Today, after being sick so muting nuisances immediately for rest, i check, 3missed calls from the same, less spammy looking number. I havent use this number for even a txt code verification at all... aside from 1 call to comcast (for the blissful irony of seeing if its an option (they need to survey physically) since im suing my current isp who didnt take my VERY NICE and explictly required in their business t&c, refund for the issue's duration.. after months of tryjng to directly get a message (not using my not technically hacking expertise like just scrubbing for email formatting and popped up in their inbox (calling them is more frowned upon)...
Their conclusion as to "why" (they nvr solved the issue... dhcpv6 was in aggressive lease mode(no response per lease(NOT batches) of about 60 for about 20 devices which i ofc use my /28 static ipv4 block... not ipv6 (they also claimed there was no logs til i dug and found verbose, long history high/med high debug level logs in their prop. dev's gui... which they forced me to use, has 2 separate cores/stacks which is done for 1 reason only... constant simultaneous ipv4 and ipv6 (so ofc was auto enabled)...
Basically it was spamming do to a config issue with their scripts, and their WAN6 dev/script's config. Have found a single person who knows what ipv6 (or v4) or wan6 device actually means... their conclusion from multiple "specialist departments " ..."we dont support ipv6 so if u had issues caused by using something we dont support it's your fault... sooooo ludacris.
.... ok back to main point.
callback options
1 schedule a call back for "later"
2 dont schedule and hang up/try some other time
3. cancel callback and join the end of the cue(from previous message it told me a callback in 6-10m or lose your place in line and go to the end... hours later no call and they definitely have the number as it reiterated -.-
...
answer to wait in line>
experiencing extremely high wait time
>your current wait time 31-60m
2.5sec later.. let me connect you to a rep ...etc (identical as in callback options intro)
> your current wait time is 30sec
waiting nearly 25min whilst typing this.(i did make sweet potato stuff, propagated a rose, fed JSON some of his new, in closure buffet of things he previously never encounted and bought a literal ton of rubber mulch)40min to a rep 5more to solve (last guy at same position didnt know this option exited, despite me decribing it verbosely to him.
Everything the automated syst asks is about account numer... there is none ive never even had a burner that was at&t brand.
Wzf.3 -
Some interesting keyboard shortcuts that are lesser-known but can be quite useful:
1.Windows Key + . (Period): In Windows 10 and later versions, this shortcut opens the emoji panel, allowing you to quickly insert emojis into your text.
2.Ctrl + Shift + T: This shortcut reopens the last closed tab in most web browsers (Chrome, Firefox, Edge). It's handy if you accidentally close a tab and want to retrieve it quickly.
3.Ctrl + Backtick (`): In some text editors and IDEs (like Visual Studio Code), this shortcut toggles the integrated terminal window, allowing you to quickly switch between editing and running commands.
4.Ctrl + Shift + Esc: This directly opens the Task Manager in Windows, skipping the intermediary step of opening Ctrl + Alt + Delete and selecting Task Manager.
5.Alt + Drag: In many graphics and design applications (like Photoshop), holding down the Alt key while dragging an object duplicates it. This can save time compared to copying and pasting.
6.Ctrl + Alt + D: This shortcut shows the desktop on Windows, minimizing all open windows to quickly access icons and shortcuts on your desktop.
7.Ctrl + Shift + N: In most web browsers, this shortcut opens a new incognito or private browsing window, useful for browsing without saving history or cookies.
8.Alt + Enter: In Excel, this shortcut opens the Format Cells dialog box for the selected cell or range, allowing quick formatting changes without navigating through menus.
9.Shift + F10: This shortcut performs a right-click action on the selected item or text, useful when you can't or don't want to use the mouse.
10.Ctrl + Shift + V: In many applications, including Google Chrome and Microsoft Word, this shortcut pastes text without formatting (paste as plain text). It's useful when copying text from websites or other documents.
++ if you like this6 -
I still don't get it why we don't have code snippet paste ability, like slack or .MD file? Can we have some little formatting please?
Pasting screenshots is not always the best.3 -
How to deal with "Code Nazis" ?
Don't know how you call this guys that see each and every PR as a possibility to annoy everyone else
Team of 4 Devs, all with lots of experience
But there is a special one, that spams each PR with an incredible amount of comments
Most of them are non-sense like "formatting of comments" or "inlining things makes everything unreadable" or "call this variable this and that" although a reasonable name was their
Rest of team including myself is pretty pissed of by him
How to get over that?5 -
Java developers not correctly formatting their code. Like, guys, seriously...your IDEs do that for you and it saves me from having to look at checkstyle complaining for a million lines....1
-
To my vigilant code review overlords, yes, I appreciate the scrutiny, but must we nitpick every variable name? I've been told my camelCase is more like llamaCase.
Let's focus on real bugs, not whether my indentation is an affront to nature.
Remember, the perfect code doesn't exist – unless you're coding on a cloud XD4 -
We have decent linting on our codebase which covers off code quality and style.
We also have a developer who insists on making code reviews about formatting and spacing rather than functionality even tho we've tried in multiple ways to say:
- our linting covers it, if that's happy we should be (and the rest of the team is)
- it's a waste of time doing it
- it wastes the time of the team reading it
- the noise it generates makes it hard to see any legit comments
I swear to god if I see another comment saying "new line" i will scream. -
I hate it when I am looking online at someone else's code where they thought they could just paste 50+ lines of code with no formatting! Or even worse, the sites desktop app has formatting, but on mobile, the app just smashes everything together. Does anyone else have this problem?
-
They are using a interesting code formatting style
Star Citizen: Bugsmashers! - Spectator Mode Crash - YouTube https://youtube.com/watch/...2 -
That feeling when you type out a hilarious response to someone's rant on DevRant, written with meticulous code styling, and then you realise formatting is ignored!
-
Arg, Visual Studio 2015, stop trying to fix my comment indentation!
It's a comment and. It is NOT part of the code. Leave my formatting alone!!!3 -
When I code in Qt Creator, and a function get to be more than 950 lines of code, autocomplete/autoformatting stops working.
I feel like Qt Creator is judging me...2 -
Unpopular opinion:
No one should ever argue over ANY coding style unless they're just starting out and thus have to come up with their organization's coding standards for the first time.
Once the standards are set, everyone should just comply with it irrespective of their personal preference. Or alternatively, include back-and-forth code formatting into the development workflow.
The only thing that's important is that by the time code is pushed into the codebase, it is formatted according to the defined standards so that the whole thing looks consistently written, which is basically the point of setting a coding standard.2 -
I know, it is unprofessional. I know, it is lacking comments and proper formatting. [...]
I was going through two old codebases of mine.
Here are two code snippets of them.
I find the frustruated comments amusing.
I guess that counts as self-sadistic behavior lol -
I wish I could start my web based Brainfuck IDE with single stepping and breakpoints, as well as code formatting. I wrote it as a Java desktop application 2 years ago with no comments and I've never touched it since.
-
Why the fuck why are tslint and prettier are always sucking their dicks and fuck each others asses.
Do you know this moment when you think:.... 🤔 They have millions of downloads, why do I bother formatting my code so much. Mabye all this people are smarter and saving so much time.
Then you set up eslint and prettier adjusting 10000k rules just to find eslint and prettier five minutes later in one file fucking their asses again how to indent on save😠😱7 -
I saw another rant about formatting. Now I want to complain too.
I fucking hate black formatting. Go screw yourself, it all hyped up and fucked up my code. Don't worry, everything still works, except my eyes. They got blinded everytime I see a black formatting commit. Screw you... Fire in the hole!!!!!!10 -
!rant
Can we bring into discussion inline monospaced code snippets again?
Basic markdown text formatting. Like bold, italics, lists.
https://devrant.com/rants/333316/...question dfox functionality request feature inline code code snippet trogus markdown feature request3 -
Open question:
Do you and your dev team openly embrace using a formatter for your projects, or do you not? And why?
My senior dev is trying to argue that it creates too much noise for commits, especially on older files and it's driving me nuts because I religiously use it (default TS formatter in VSCode btw, nothing crazy or super opinionated!)14 -
Is there a way to stop all these code formatting arguments ince for all? For example, a github /ide plugin reformats your code to your preference when you work on/review but in the end, it is stored in some specific format.7
-
Am I the only one who thinks to rewrite whole thing when the code have weird formatting and so complex to understand and annoying bunch of functions which can be just ternary or an if?
-
So I needed to go through a documentation of a program that was obviously developed by Chinese people, and went through some kind of Google translate to be in English.
This is an utter disaster: sentences that barely make sense, code blocks without a matching ending that cause the rest of the paragraph to be in the code block as well, code outside code blocks and without formatting, sentences unrelated to the section they're in, etc.
The program itself is great, but the shitty documentation makes me wanna kill whoever wrote it2 -
What's up with people being super cutthroat about best coding practices? In my experience it's not very well focused on in schools or especially for self taught devs, so what's with the critical attitude towards bad formatting or indenting, or perhaps less than par code organization? I get it's suboptimal but if someone doesn't know that it's wrong then what's with the fire and brimstone response? Not personal, just something I picked up on.3
-
I am the only front end developer in my team, used to be 2, and there is 4 java backend dev. We are all Seniors, so you'd expect to be experienced. I like my code to be "nice" and I am using linting tools, rules, formatting etc... (I do JS mainly).
During a scrum review some of the java guys showed some code on the screen and that thing was a monstrosity for me! I could not look at some code like that, if I had to work with that I'd probably hang myself. Nothing was aligned, no consistency. So my question: you guys aren't using any guidelines to have cleaner code ? How do you make sure you all code the same ?
...
What are you taking about ? We use Eclipse, with default options, no tools no guidelines...1 -
I tried to make some SP using the syntax and formatting that visual studio outputs when making a SSRS report. I thought it was nice.
It formats the code in a standard way and transforms stuff like "join" to "INNER JOIN" and "left join" to "LEFT OUTER JOIN ".
When the team reviewed the code they were like WTF?! This syntax is horrible, it can't be understood. You did this?
*Me with my red face*...
I just said. You know what? I am going to go back to the old school syntax if you prefer. I just thought it was better.
Yeah... You really should go back to old school syntax.
---
Keep in mind that the old school syntax is annoying to me... No formatting at all and basic instructions are not in larger upper case.
Anyway, I thought it was nice tbh. I still think it is. And it is definitely better to me in some way.
What bothers me most is that they want to improve their coding. They say they want to be more standard and it seems every time you want to make a change it's not a good idea because "everything is already written that way". And when you don't make a change, "you should have change it"... Well sorry I was just copying the old style.
Anyways , it's not that important. I do get their point. Sometimes.1 -
Constantly changing conventions for everything, like naming and code formatting conventions.
And the worst part is, I do this several times during one project.
Either I have a project with different conventions or I have to redo a lot.
Most of the time I try to do the last and this costs so much time -.-' -
Just received code review from interview technical task. 50 percent of it was because of encapsulation (that 5-8 variables could have been private instead of public). 20 percent was about shit that was expected but missing (error validation, dependency injection). It was missing because it was not specified in app requirements and also noone said that I have to build a production level application for a simple interview here. 10 percent was nitpicking about formatting(I used default intellij formatter) and one ide error that appeared because of project importing. And only 20 percent of feedback was actually constructive and useful. Cool. Also developer said that he was shocked that I made loading animation but didnt call it in my app. However I made it, but if you have fast internet connection it doesnt show up. I mean if you run my app on a phone with gprs connection u will see that damn animation. What Im supposed to do slow down the app so u could see it? But we are building production level app here no? Shit. It feels like he applied double standards to me or something. Half of review nitpicking about useless details and another half about shit that is expected to be in the app but was not even communicated. Also I did not get developers contact so I could ask him what the fck he wanted from me.1
-
Formatting code on stack overflow is a fuckin pain. One thing is off and the website is like WAIT WAIT WAIT WAIT. And then after all that time spending formatting it, to get your question closed for not being specific enough.2
-
You work in a team, for a team to move forward successfully the team should work in sync. A team always has a goal and a plan to get to it. There are times when the team needs to take a different direction therefore the set path should always be available for change because our environments dictate it.
We all have different styles of working and different opinions on how things should work. Sometimes one is wrong and the other is right, and sometimes both are wrong, or actually sometimes both are right. However, at the end of it all, the next step is a decision for the team, not an individual, and moving forward means doing it together. #KickAssTeam
The end result can not come in at the beginning but only at the end of an implementation and sometimes if you’re lucky, during implementation you can smell the shit before it hits the fan. So as humans, we will make mistakes at times by using the wrong decisions and when this happens, a strong team will pull things in the right direction quickly and together. #KickAssTeam
Having a team of different opinions does not mean not being able to work together. It actually means a strong team! #kickAssTeam However the challenging part means it can be a challenge. This calls for having processes in place that will allow the team members to be heard and for new knowledge to take lead. This space requires discipline in listening and interrogating opinions without attachment to ideas and always knowing that YOUR opinion is a suggestion, not a solution. Until it is taken on by the team. #KickAssTeam We all love our own thinking. However, learning to re-learn or change opinions when faced with new information should become as easy to take in and use.
Now, I am no expert at this however through my years of development I find this strategy to work in a team of developers. It’s a few questions you ask yourself before every commit, When faced with working in a new team and possibly as a suggestion when trying to align other team members with the team.
The point of this article, the questions to self!
Am I following the formatting standard set?
Is what I have written in line with official documentation?
Is what I am committing a technical conversion of the business requirement?
Have I duplicated functionality the framework already offers?
I have introduced a methodology, library, heavily reusable component to the system, have you had a discussion with the team before implementing?
Are your methods and functions truly responsible for 1 thing?
Will someone you will never get to talk to or your future self have documentation of your work?
Either via point number 2, domain-specific, or business requirements documentation.
Are you future thinking too much in your solution?
Will future proof have a great chance of complicating the current use case?
Remember, you can never write perfect code that cures every future problem, but what you can do perfectly is serve the current business problem you are facing and after doing that for decades, you would have had a perfect line of development success.1 -
I've always was curious why people debating about mostly two code formatting types
for(;;)
{
//somestuff
}
or
for(;;){
//somestuff
}
while almost no one uses pretty decent IMO type like
for(;;){
//somestuff
//somemorestuff} (with tabs ofc)
It might be easier to forget some }s, but other than that it seems pretty nice to me13 -
Me: 'here we go, code working completely as intended, tested and without bugs.'
Senior after reviewing code: 'apart from the formatting errors, I'd also do this piece of coding in a different manners'
*Comments exchange in pull request*
Me: 'well this seems more like a change the whole logic request rather than a small improvement, I'll keep it like this and resolve it like suggested on a future opportunity'
Still in prod. -
Please give us Markdown in Slack already. How can that be much more "difficult" compared to Slack's own formatting?
At least give me the possibility to temporarily disable formatting, e.g. to not make bold when using asterisks. No, using inline code formatting is not a viable option. I simply want to have asterisks shown as normal text. I'm fine with escaping with e.g. backslashes. That's kinda normal.4 -
Nothing quite so frustrating as intellij resetting your code styles. You put them back as best you can and they get put back to default again.
So you log in to every computer you use, disable settings sync, and do it AGAIN only to find some of your code styles settings aren't even available anymore. So now you have to be extra careful formatting a document doesn't change things you've had just the way you wanted for years.
But realistically, what other option does a person have?6