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 - "way to code"
-
We were learning to create a login system in mysql and php when one of my classmates showed me and the teacher his code.
He did a select all on the users table and looped through everything with a foreach.
We both tried to explain him why that wasn't the best method but he just refused to accept that.
He turned out a designer.
By the way, please never do it his way 😬18 -
Just saw this comment in our code:
// TODO: think of a better way to do this
Committed June 12, 201215 -
On a serious note, most developers really don’t code complex algorithms all the time. The bar for interviews is way too high— to the point that most people get discouraged from pursuing a career in IT.17
-
After finishing up 70% of a feature,
Brain: "there's a better way to do it"
Me: "ok ill just change a bit of code here and there.."
-- 2 hours later --
swimming in spaghetti code..7 -
I have decided to never write commits.
I will never write documentation.
I will write my code in the most confusing way possible.
I will include useless code.
I will always git commit with the message "asdfghjkl" or "HAHA LOLZ I DONT NOW WAT I WOROTEEE"
I will work at Apple.
I am xenophobic.
I will leave the company right before we push to production.
I will make so many friends.11 -
My coworker complained about an way to big Angular build (20 MB in prod!).
We looked over his code.
... Well deleting that 200 unused base64 encoded images shrinked it down to 500kB
DELETE the Code you replace14 -
I had a coworker used to write PHP pages in this way:
<?php
echo "<html>";
echo "<head>";
// 2000+ lines of un-indented nightmares
I tried suggesting him to keep the HTML outside php tags as much as possible and I stressed out that adding some indentation to the code would have improved readability. I also sent him an example of my code created using an IDE with auto-indent functionality.
His creepy answer was: «Readability is subjective. Anyway I'll try to get used to the sinusoidal trend of your code.»11 -
Wtf Microsoft...
Found out the hard way that copying a line of code from Teams chat will sometimes convert the spaces into unrecognized ASCII char.
Spent a few hours yesterday to fix the bad chars.
🤡👍16 -
!rant
Girlfriend decided she wants to learn to code, and I am honestly both excited to teach her, but also nervous; Teaching something is a good way to find out just how much you don’t know.7 -
“Our code is our documentation - it’s produced in such a way as to be explanatory, logical and clear, and annotated if/where needed”
Really?? That's the reply you give me when I asking API documentation for handover ?5 -
When the code is not working:
I have failed my parents, my job and everyone. I shouldn't have taken Software Engineering as my profession. All I'm doing is giving pain and frustration to everyone. *thinks about a clean way of suicide*
Then after a while the code works:
I am probably the best engineer to live on these planet.3 -
The worst feeling is writing so many lines of code knowing you could do it in a more concise way if you just had time to think about it but you don't.1
-
Does anyone else get so self conscious about writing neat, clean and efficient code that you get demotivated because you always think "there's a better way to do this".
The cleanest code is no code at all. 😂8 -
I usually start going through the code and as I do I draw (connected) shapes for every part of the code, as I do I add "features" to the shapes (little spikes, give them stripes etc) that way I'm able to "see" what is missing and how the shapes should interact
this might be a bit weird to explain but it helped me a lot to understand what the code is doing and get it rolling again16 -
Me: Yes! I'm finally ready to upload my first Android app to PlayStore, im so excited!!
Google: Make sure to remove all the Log calls from your code.
Me: *Finds out that there's no way Android studio can make it for you*
FUUUUUUUU**10 -
The way most of us devs are spending time on devRant, it seems @dfox might need to introduce a feature named "Reminder" in the app to let devs know that they need to get back to code.1
-
That awkward moment when you alter your code to see if it work this new way, and doesn't, and undo does not work. *Weapons grade facepalm*14
-
Goes to first job interview. Great interview but, can you send some code?
-Sure-
Sends requested js, css html files.
Great code, we want to speak to you again!
Goes to second interview, waits 15m, meets the sales department. Sales? Wtf?
Great interview but, can you send more code?
Errr?
We need some native JS to really make sure you can write code.
You could've emailed this request before the interview b*tch. That way id save time hurrying in rain and traffic jams!4 -
How to be a great developer - 101
1. Write Code
2. scrap it
3. Rewrite in a better way..
Repeat! 😂1 -
When you rewrite some sloppy idiot's code to be way clearer and straightforward. Then you fix a bug you introduced... and another... until the code ends up looking more or less the same as when you started...2
-
My friend at my office tell me what he did everyday
6.00 am wakeup
6.10 am code while showering (using phone)
8.00 am make a coffee
8.05 am start code
12.00 pm eating lunch
12.10 pm start code
5.00 pm go to home
5.30 pm pickup a phone and do a some socmed
6.00 pm eating
6.10 pm code in pc
11.00 pm sleep
He did that everyday. Im shocked he can code like that. Then i ask him why. He tell me that he loves code so much, everytime he found an error he find a way to solve it and he said it was fun so he cant stop code
I think my boss has brainwashed him :/11 -
ever got a task to modify legacy code and when you looked at it you were like... burning it with fire is the only way!1
-
Learning to code at the University was quite annoying in the beginning. We had to write code on paper.
Might be the usual way, yet it was really inconvenient.25 -
When you have literally no idea how to make your homework project so you try to Google/StackOverflow it piece by piece to make a Frankenstein's monster code.
And then you still have no idea how to cobble it all together in a way that makes sense.4 -
For God's sake! Coding standards should be a subject in university, where the students are thought the right way to name variables, indenting the code properly and many more things!8
-
Holy shit I never realised how frustrating it is to code for a client the way they want it... I mean I just want to go back to coding for fun4
-
I wrote code yesterday, that functions the way it is supposed to.
I do not understand my code today.7 -
My code is always a battle between best practices and what I assume would be the most efficient way to do things4
-
Spend quite a while at work trying to get two divs inside a centered div next to each other and especially get them the same height as the parent div.
Got it working after numerous tries, was going to take the code home to continue.
Forgot to take the code home, have to start over again and I hardly understand CSS 😥
Fuck me. (Writing a new service thingy by the way)12 -
I really hate it when people asks for help on forums and mailing lists by taking a screen capture of code instead of pasting the text or using a gist or pastebin or any other USEFUL way to share code.2
-
She : What is this crap you have opened ..umm... In Android Studio?
That was the day i learnt i need to write code in proper way. And i started improving it.
😂😂😂😂 -
The best way to write maintainable code is to imagine the next person who has to debug your code. Then imagine that they have your phone number, personal address, and your daily schedule.8
-
Be extremely active on GitHub! It’s a nice way to backup your code, as well as show off your skills to potential employers.2
-
Just two wishes!
#1 : Way to download images rather than having to screenshot
#2 : Code with syntax hilighting
#3 : I know I'm of by one, but a coding font maybe?4 -
I think Clean Code: A Handbook of Agile Software Craftsmanship by Robert Martin should be a must to read.
In school no teacher puts emphasis on code quality.
They should learn how to name variables and functions the right way at an early stage in order to better perfect their craft :)3 -
So some programmers (specially C programmers, it seems) have this terrible habit of writing very short-named variables. Then in order to understand the code, you need to decipher the meaning of each variable. Example:
```
unsigned int i, n, h, mw, my, ty;
```
This is from one of the "Suckless" projects by the way. They pride themselves in having small number of code lines so this is probably why.24 -
In an unexpected turn of events, it appears as if years of choosing fancy bullshit over code maintainability will cause said fancy bullshit to eventually break and no obvious way to fix it. There's no way anyone would have seen this one coming.3
-
So, my boss is pretty cool. Two of my colleagues made a review of my code (me being new, also on job training). We three were sitting in front of my code, me explaining enthusiastically my code, one of my colleagues looked a bit confused. My boss listening to the whole conversation, he said: "Her code works perfectly". But the way he said it, priceless! I swear, he had a very 'bitchy' voice and also waved while saying that. He looked proud, and we started to laugh.4
-
Writing a game from scratch is a good way to see how awful you are as a programmer, specially if you come from webdev.
Amazing how fast your code looks like shit when you're writing a game, even the simplest one.14 -
So I was finally done with the project, every feature was implemented the way I wanted it be, every piece of code optimized and well written, I was completely satisfied with my code and didn't feel the urge to add a "last little feature/optimization"...
.
.
.
Then I woke up 😭😭😭2 -
I used to prefer, think, and code in loops rather recursion.
Now though somehow it's the other way around...
And I have to assure myself why a piece of code I wrote won't cause a Stack overflow... and that if I really had to I could convert it back to a loop.
Haven't done it though for a awhile tho...7 -
Hey Designer/Developers, I got a question for you. Yeah, you 👇🏽
When working on a project codebase that is expected to grow and evolve heavily. How do you usually split up your CSS (SASS, LESS etc) in a good way to take into account all the different device sizes?
I am not asking how it is done but more about the design of the code. This would be for a production codebase to be released.
Do you use large blocks broken down by media...
(Media width) {
~site code
}
(Other media) {
~same site code with diff sizes
}
Or do you do individual media queries inside css classes...
.className {
(Media size) {
}
(Other media) {
}
}
Or a mixture of both?
If it is a mixture of both then how do you decide which way to go about structuring the code.
I have been endeavouring to greatly improve my CSS and have done so. But this question has been bugging me. Both sides seem to be a bit sloppy and my programmer side is fighting the repeatitipve code.
Note: all code examples are gibberish and only intended for visualization.17 -
Found this in a code review today.
Technically, I guess, that is one way to fix a divide by zero error.14 -
Languages like python and R are some-what high level languages, with an easy syntax and very readable code. This useful essentially to make it easier for non-programmers to use it. For me as a software developer with +4 years of professional programming. I started with Assembly, Quick-Basic to C++, Java then C#, I found Python super convenient, and at times way too convenient.
At first it felt like I was cheating, and would not consider myself actually writing code, more like pseudo-coding.
After a year or so, I got used to it and it became my default, but it still does not feel right .. is anyone else feeling the same?
I do believe that coding the hard way is not always the right way, but I am just wired that way.17 -
What do you do when another dev overwrites/changes your working code without telling you, only because s/he cannot understand how your code works?
And your code was working fine, mind you, no bugs or anything, and is following recommended guidelines/standards. It's just that this other dev has a different coding style and prefers to rewrite everything his/her way even if it means breaking up otherwise sound logic.7 -
I love reviewing code. I learned a better way to write something. That feeling of "hum, that's a lot better than what I have been doing" is great.1
-
I came to notice something funny.
In many languages, programmers will go out of their way to use to newest, most shiny features, even if there isn't any need to.
Only in C, programmers will go out of their way to avoid new features and make their code compatible even with the oldest ANSI standards.4 -
Today a tester asked me to make a modal smaller. I read the code and saw modal size was explicitly set to "large". So I was about to set its size to default but I asked myself "what if I enter a random string there?" and I set it to "not-so-big". UI framework handled it well and actually set its size to default. I'm keeping the code that way for future laughters.8
-
1 - Writing a 20 lines Python module in 15 minutes approx.
2 - Accidentally deleting this module.
3 - Taking 1 hour finding a way to generating source code from the compiled PYC Python file.1 -
I feel so unimportant today. I'm feeling like an
else {
continue;
}
in a loop. (I wrote some code for 2 days and then I found out a way to do it better in 10 mins)2 -
"The only way to make the deadline - the only way to go fast - is to keep the code as clean as possible at all times."
Uncle Bob
Spread the word.1 -
I (don't) like how some people say "If your code needs comments, your code is probably ugly and should be rewritten".
Well, asshats. You have never considered complex calculations/functions or "temporary" workarounds, right?
Sometimes, you have to do it in a not-very-readable way for efficiency. There is no way around that in that case, and comments that either explain the code below or provide alternative, slower code that's commented really help others understand your code.
If I ever work with you and you don't bother commenting your code at all (or rather use slow code because more efficient code doesn't appeal to your "muh code dun need comments" approach), I will hate you.6 -
HELL WEEK is coming!! they are going to make us code IN PAPER again.... no compilers, no way to check for errors, time to die again4
-
2022 Dev Goal: Find a way to retire early so I never have to build another website or write another line of code again. It’s been over 25 years and I’m just done and over it.11
-
I once reviewed some code that parsed HTML using regex (red flag #1), and it turns out that it had to be done that way because the company's HTML was so malformed that no actual parser would accept it without erroring1
-
Code comments #1: A way to document bad code that wasn't reduced to it's essentials and thus unreadable. Bad.
Code comments #2: A way to explain for non-programmers how the code works. Wrong place.
Code comments #3: Company policy. No one really knows why, but others do that, so we better do it to. The management sucks.
Code comments #4: Because some hip methodology/guru describes how to document code. After a few years, when the methodology has been (unofficially) forgotten, everyone still comments the code the same way. The old management sucked.
Code comments 5#: For insecure programmers who want to convince them self they understand the code they've written. Maybe apply at McDo?
Code comments #6: Some programmers are apparently paid by lines of code. Possibly understandable.
// Comments, anyone?8 -
Today I was writing Selenium tests and was struggling to find a good way to test a text editor. We did a weekly code review and my team lead rewrote the test ij 10 lines to generically handle all cases.
Hopefully I'll be a good dev someday. 😔4 -
"I dont like the way that you splitted your code into multiple small files. Simply put every logic into one controller." - so called "frontend architect" after reviewing a team's Angular code. I dont know what to think.2
-
Is it only me or does Unity really force people to write ugly code?
Sometimes I think to my self : " just go and write your god damn own fuckin engine"
But then I sit back and realize that I'd never finish a game that way.
Love & Hate Unity !3 -
Inherited some rather odd code this morning. The previous developer has religiously added comments throughout stating how many hours he's spend to get to a certain point.
E.g. I'm half way through a service class and he's added
// Total hours to get here: 9
It's seriously weird1 -
Why can't software development just be software development? I hate when laws and politics, etc., get in the way
Look at this, for example: https://arstechnica.com/information...
Apple added some code to make the Chinese government happy, which resulted in a bug, which is stupid!4 -
Am I the only one who still look deep in the Code, try to find a better way of solving a problem after it's already been perfectly solved 🤔12
-
A programmer can code.
A developer is a jack of all trades jumping into any stack and mastering the basics in a weekend.
So why the fuck can't I grasp humans. Their code is spaghetti....
Debugging gives way to many problems...
Atleast my personal code has a feature creep and for once it's a good thing!3 -
Do you ever just think of a feature you want to implement in your program, thinking it's going to be a challenge and then you realize "oh, my program is set up in such a way that makes adding this feature literally one additional line and one modified line of code, without making the code messy"?5
-
Half fact: Code reviews help to maintain clean codebases.
Full fact: Code reviews are a way to find out who secretly wants you fired.4 -
because writing over 500 lines of java code using swing framework on a piece of paper with a pen is a perfectly good and healthy way to learn how to write code2
-
Don't focus too much on learning one specific language. After some coding getting to know a new one is going to be no problem. Focus more on paradigms and maintainable code.
Oh, and don't forget, comments are sometimes way more useful than the actual code. -
!Rant
I'm going to be teaching my roommate how to "code" soon. Or rather, I'll be teaching her how to use Scratch, so she can have a leg up when she applies to work at a children's code academy that uses a Scratch-like environment. Should be fun!
I love that Scratch exists. Such an accessible way to teach basic concepts like loops, conditional statements, etc, with results that are way more fun than "oh look I output the fibinacci sequence"1 -
Write a piece of code that works just fine and it's fairly extensible in 20 minutes.
Then proceed to spend the rest of your night rethinking and replacing said piece of code numerous times, with slightly more elegant code.
7 hours later and I'm still not done. Although a fine way to improve your skills, I seriously need to stop doing that for every single thing I write and start managing my time better. Got lots of other stuff I need to be working on...
Surely I can't be the only one doing this4 -
It's so fucking hot today, just seriously fucking rediculous. Thinking of taking the laptop to code at the beer garden - will be the only way to get any productivity done.
Thoughts?5 -
!rant
I figured out a way to make your code readable!
The main idea: make everything into a function. Each function should be small and you should gradually use past functions to build future functions.
Depending on the language and the size of your code you should make your functions with different sizes, but always keep them small.
This function splitting allows for debugging small parts of your code, avoids repetition and abstracts your code, each making it more readable.13 -
Need to rant. I am doing programming 2 at university with java and the assessment is to make a card game. The subject is shit and is basically going over loops, variables, conditionals ect which we learned in introduction to programming and programming 1.
This leaves little time for oop principles, design patterns inherentance and all other useful stuff.
I am dedicated to making a career in programming and want to do my assessment the correct oop way. Although the lecturer doesn't care and is instructing the class to do it procedurally and shit.
I could do the program really quickly the shit procedural way and still get full marks but I feel dirty as hell coding like a scrub. So I'm 60 hours in on this assessment and there are so many classes and even more because of unit testing (we don't have to unit test) and I am spending way too much time.
My code is beautiful, my classes are tiny and maintainable, easy to modify and I'm learning so much about how to code oop the correct way with the help of a mentor and someone I look up to. But god does it take forever to code this way. And soo many iterations and redesigns because I'm still learning.
It's almost done but now I have another programming assessment for another class I'll have to do the dirty way because of time restraints and other assessments.
Sorry for wall of text but this is stressing me out 😛4 -
We receive an email from Splunk when errors go above a certain threshold, and a particular service has been especially problematic this week (throwing hundreds of exceptions). Email response from the team mgr responsible for the service.
"We are working to address these errors. We don’t currently have a way to prevent a user who’s account is locked from logging into the service and performing work."
The exception? NullReferenceException: Object reference not set to an instance of an object.
The code? (paraphrasing)
var user = GetUser(request.Login);
if (user.CanPerformWork) ...
<facepalm>
I'm doing my best not to reply .."Really? No way? You do realize we can read code, right?"4 -
Random question that apparently screwed up even Google...
how does an IDE evaluate (and format) code and errors so quickly?
Was thinking maybe building a compiler/programming language would be the best way to learn/practice algorithm... Is it?19 -
when reviewing each other's code and sql queries is the most romantic way you can think of to spend the evening1
-
I was mentoring a group of students and helping them with their graduation project. I taught them NodeJS, MongoDB & few other things.
One time, one of them came to show me her code, and it has the weirdest and most bizarre structure ever!
I asked her, “who told you to structure your code like that? This is wrong! I didn’t teach you this way!”.
She replies: “<<a local shitty tech startup name>>’s CTO”
When I searched about him, he’s a civil engineer who founded a startup and assigned himself as CTO with no technical background or knowledge whatsoever! FFS students believe that he’s a real CTO and started learning from him 😑 His code was so bad in every way that a fresh would write a better code!5 -
Do you know what a meat proxy is? It's when you work as a consultant for a company, and the company doesn't give you credentials to deploy, debug, or interact in any way with your code. You then have to work through the sysadmin, while telling him how to go through every single step, every git pull, every line of code to edit. Kill me10
-
One developer got a code and had to add new feature so he writes new function in similar way that arleady written one. Pass the code to next guy.
Next guy: why did u write this function like that?
First guy: Coz one was arleady written that way
N: but it was written wrong
F: ...so now 2 are written wrong (no he will not fix it 😂😂)1 -
Saturdays I like to code and have some beers.
Learned the hard way to wait until the next day to push my changes... 😂 -
Looking to update the way I write my code to follow:
- Coding Convention
- Standard Work
- Coding Standards
- Whatever other name they call it
And found this...13 -
You get home from work and one half of your brain goes, "Let's just code a little to catch up on the backlog", and the other half of your brain goes, "No way you psycho, we're off from work and we're not getting paid for this. I'm not helping!"
And that's why you're code sucks when you're not at work! -
(PSA: serious replies to this kind of wk tag might be best suited under Random)
"The way you've done this seems much less complicated that what I would've come up with."
"You've been reading Clean Code?"
"I didn't think that was possible, nice."
And finally, the most extreme one:
"Can you print this code for me so I can hang it on my wall of good code?"3 -
I need a project. I am on holidays, I don't have a computer at hand and can only code small things on my phone, mainly in python... Sad thing is I don't have any idea what to code.
Give me your challenges (please), so I can keep mental health!
P.S: if anyone has a working way to use Node.js on Android, I'd be glad to take it :)13 -
Show 10 lines of code to a dev.
Dev: It could be improved here and there, it can be optimized way better etc.
Show 5000 lines of code to dev.
Dev: Looks good!5 -
Are there more people here who prefer codual over visual?
UML diagrams are fun and all, but I personally prefer to have a code example over an uml diagram when it comes to a few classes that work together. Not exactly sure why I prefer it that way, in my head I translate uml to code in order to understand it better and if you show me a piece of code I don't have to do that translation.
I wonder what you guys' thoughts are 🤔5 -
From a few years of programming experience, I come to know that "we cannot write perfect code."
What I mean by this is no matter how perfectly you write code, but if you have a peek on that code after about 3 months, you will be like, "I could have done a lot of things in a better way." Provided the code is atleast of 100 lines. -
Should have kept a copy of my best code off of my work computer. That way it wouldn't have been confiscated along with the computer during the layoffs. [sniff] I had some beautiful Stored Procedures I can't satisfactorily remember how to reproduce. 😅4
-
The way I was told to write unit tests was particularly terrible.
No mocking of objects or dependencies so the tests ran the actual code in full including updating databases and files. Then at the end of each test there was code to restore all changes back to before the test.
Each test ended up being over 100 lines. Madness.1 -
Why people are saying Python is an easy language? I mean yes, if you write c/java code with python it may seem easy, but writing proper python code, in a pythonic way is not so easy.
SO DON'T TELL PEOPLE THAT'S IT EASY LANGUAGE because new commers later they come with absurd code and ask people to fix it.7 -
code code and code. There's no better way to learn other than practicing the material learned from docs.1
-
Needing to teach myself M$ InfoPath because of legacy business code. What better way to learn than getting the feet a little wet first!
-
First !rant. I'm working on a 2d game using Game Maker at school and I just wounder if putting constants up this way makes you cringe. Is there a better way? This code is only run when switching to a weapon and he values can be put into the shooting script itself. I just want to know how you put in mass constants in general coding or even at all.6
-
I find it way easier to read code than ordinary text.
Am I the only one? Do I have a problem?
After the first sentence my I eyes can't focus to keep reading text. This also happens to my native language except from English.6 -
Anyone have a go-to way of getting your motivation up? I've kind of hit a snag where I want to code but never really get down to doing it.9
-
When you spend more than 1 hour trying to find a solution to your code project and then the solution was way to simple to work and it works at first try 😨 (feeling stupid right now 😢)1
-
LLMs as compilers and optimizers. Oh hey look it's hallucinated some assembly... Fucking what? Who thought that was a good idea...
https://venturebeat.com/ai/...4 -
Coding was and is the thing that currently feeds me the most efficient way. But it's also what caused to cringe and to hate people the most because of legacy code and immensely narrowminded dimwits aka clients.
But yeah: Coding is love, coding is life. ❤️ -
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 -
We had this new guy working and we assigned him some work to do. We gave him some time to find the way into the code and figure things out on his own.
Instead of doing that, he wrote a paper of 20 pages why WPF would be way better than what we are doing now. There were many flaws in his document as well. Also on day 2 he used resharper to format some code file. Bye bye annotate! His argument was that resharper knew better. But, our code also uses some reflection, so that got broken. He didn't knew what reflection was and assumed resharper "fixed" it.
He doesn't work here anymore now, he felt he wasn't taken seriously. This is just one of many examples of him though 😂1 -
This is very long along. Senior Developer was doing my code and telling the best way to write jQuery and PHP codes.
The funny part is that he doesn't know anything about PHP and whatever jQuery code he told me to correct was very shitty and difficult to maintain.
That's when I knew. This world is fucked up!3 -
I really loving coding but i cant stand people that take coding for granted, theres no single way to code there are a lot of ways to make a single function work and you can code it in different ways, i hate it when people dont use their imagination, in coding you dictate what you want to do, thats the power of coding1
-
Me: Who wrote this fu$$in mess of code? Never mind, we will get the dirty hacker.
*Runs git blame*
*Silence*
Me: What a innovative way to solve the problem! I'm a genius! -
Been working on a back-end server for one of my apps. Then I discovered Firebase. The way I code apps will change forever now. I've deleted all my back-end code and migrated to Firebase.
Firebase is like the new Parse.io, I love it3 -
I get really angry when my friend (has only ever taken a web design class in high school that taught only basic html) tries to preach to me that you shouldn't have to worry about writing readable code along with documenting it so long as it works the way you want it to.1
-
tabs vs spaces
i hate it when i cant find where i used spaces instead of tabs. just a simple mistake and it doesnt work
me: *codes makefile in codenvy*
terminal: *** missing separator. Stop.
me: *rewrites code exactly the same way in Notepad++*
me: *copy paste code to codenvy*
terminal: *compiles whole project*
wow. just wow.6 -
I'm writing c# code, does not work, wrote the same code in python just to see if I'm thinking the wrong way, nope, it worked in python then fixed the c# code...
I might be a c# racist or I don't know.2 -
I know that this isn't the place to ask questions like this. Anyway, is there a easier way to do this? This code updates my age on my birthday. Also, first attempt to make anything in JS :)8
-
The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code.
~Paul Graham -
So after a few struggles on my current uni assignment I’ve come to the realisation I need to change the way I write code, or at least the way I think about the code before I start.
I have a tendency to rush into coding something before I’ve planned it out properly, and over the last couple of days stupid mistakes on my part caused hours of stressing.
Are there any good methods for sitting down and planning stuff like this out, or is it just a case of getting some paper and a pen and writing out the logic etc in whatever way makes sense to you (me)?7 -
If the codebase quality drops below levels measurable by way of "WTFs per minute", determine further negative code quality by counting the amount of times per hour you wonder if you're in Hell and what exactly you did to deserve this torment
-
Learning to code is like learning to write when you were younger. It can be sloppy or clean but if you keep at it it'll probably become clean. But, with these sites like code academy that accept only one solution to the problems they present it's as though you're being told that everything you're doing is wrong eventhough you get a solution to the problem in the end. It bugs me that these sites want people to code the exact same way.
-
I hate it when framework doesn't behave the way it should (or I didn't code it the way it's meant to), though in example it works the way it should.1
-
What is the best way to do a code review for a colleague's code, without coming out as a complete ass?16
-
> uses two workstations
> Forgets to commit code on one before moving to the other
> Works on the other and pushes
> Brain does what it's great at and forgets how to reset to HEAD
> Brain convinces me the only way to handle the issue was to commit my half-working code and then pull
It was only 5 o'clock. What the fuck. -
I'm on the way to building my own B2B SAAS business. I code all day, sleep for 3 hours, have no money, and sometimes do a couple of freelancing projects to survive.
My friends are in jobs, earning way more than me. I feel a bit jealous, doubting my abilities.
Am I doing right? Or I'm just a nerd with a potato computer struggling like a dog? Am I even walking on the correct path?6 -
Don’t write documentation for other people, write it for yourself! It may all seem obvious today, but six weeks from now you’re not going to remember what you were thinking or why you wrote the code the way you did.1
-
I am the unit test guy now, please send all of your untested and poorly thought out code my way to be tested4
-
Redux and ngrx look like a good way to do what you already do in a more verbose way and with a lot of boilerplate.
I love the idea of keeping the state of the whole app and the single source of truth, but... why so verbose? It's almost more the time spent to write boilerplate code than the time spent writing "productive" code1 -
i like to code because:
- it's challenging
- it's very personal, it's my way to solve the problem
- in the end i might have something cool that i did myself and that's priceless -
I don't know if I should call this a rant or not. I spent most of X-mas hacking away my code I haven't touched over a year and released the library to NuGet. Woot!
This has to be the way devs should spent holidays -
when you are so used to Unreal Engine crashing while trying to debug your code that you're actually suprised when it doesn't x'D
ya I'm pretty sure I'm not debugging it in the most efficient way, but oh well. Progress I guess. -
Why some people think it's fine to hire unexperienced people to do stuff, when there is no one in a company who could check if their code is fine?
Learning through active coding is fine. Until after two months later all you do is patching your code because you found out on stack that this is not a good way of doing it. -
Instead of ranting I thought it would be nicer to ask for opinions/solutions: How to cope with a collegue that keeps producing trainwrecks of code which you have to first refactor to make it work in a more logical/structured way? Yes, his initial solution works (in a way), but it's just not how 99% of the other developers would solve it. And yes, we've shown him quite a few times how it should/could be (in a positive and constructing manner)5
-
for one split second I thought I had discovered a way to manage multiple states with one reducer function in react,
turns out it was a bug in my code,
I had already gone to brag about it on my react group chat, until I went back to my code and as I was cleaning up and closing brackets and all that stuff, my new feature stopped working.
I need to find that bug3 -
When there is no way to test the code you have written.... I cannot help but stress my arse off...4
-
Have you ever gotten a task where you have to modify some existing code, and to get it to work the way it needs to you have to write some ugly ass code?
And I'm talking FUGLY ass code. The kind where every brain cell you have screams to refactor it all so that your code won't be so ugly and you can live with yourself. But you only wrote it that way because some numbnuts who was fired a year ago designed it that way, and left zero commentary or documentation on his reasoning ("sELf-dOcUmeNtiNg cOde, bRuH!").
It doesn't pose any sort of risk with regards to security or resource management or efficiency, or really even faulty logic. It just looks fucking awful, my brain can instantly see better ways to design it and I don't want history to tie my name to it.
But also the system is being gutted and retired within a matter of months, so maintenance won't even be a concern; and you know that you have a lot of other large tasks that need your attention too, and to refactor will ultimately prove to be a time sink.
I mean ultimately, I know what I need to do, but I guess it's a pride thing. Just makes me feel icky. -
The only way to fix some error in the code after two hours of headache is by closing the console window.
Yaaayyy. The error is gone. XD4 -
One of our developer told that my code is ugly to our project manager. And my response was 'I know right! By the way your code also sucks. Fair enough.'1
-
Switched to Visual Studio Code as my main editor when not using an IDE and really enjoy it way more than I thought5
-
Me: I should divide my project in small parts. It will be a piece of cake.
Also me: (on last day of submission) 76 commits in 34 minutes.
*Face Palm* 🤦♂️1 -
Spent 2h debugging code until I realize that code is good, but written in a .coffee file... Instead of ._coffee. Yes,it changes the way code is executed. Wtf happened to this world.
-
So now they don't need it... So basically 2-3wks of work gone out the window...
Well at least I get paid either way and now I don't have to worry about releasing code that will might blow up in PROD... -
I don't think this question is formal enough to ask on SO. So I'll just ask it on here.
I'm pretty sure I've committed several development felonies in this code, but is there an easier way to manage multiple textviews that are similar to each other in this code? https://github.com/BaconatorNoVeg/... -
When I started doing frontend development, I was quite shocked with how people managed to cowboy code their way into building fully functional products with a decent paying client base.
I am talking about fully function SaaS with payment gateway and all, but no version control beyond full backup copies, and spaghetti code everywhere you can literally bring the website down trying to change the homepage design.
... and the startups that managed to do better, some of them forgot the .git on production exposing their entire source code *facepalm* -
Sometimes I hate JS. It makes people think that this kind of crap is a good idea...
What the actual fuck. :/
By the way, is there a way to format code posts on devRant that I'm missing?3 -
Yesterday a colleague was debugging some piece of typescript code for memory leaks as chrome and firefox were hanging at a certain page.
Her real brainfuck was that everything seemed to be working fine with edge. Microsoft, somehow, finds a way to fuck with developers. -
Is it ok to hate your old code?
I always say to myself "WTF is this? There's a better way of doing this" when I have to make some changes to some older project.
But, I see it as a good thing, it means that I've improved a bit since then.3 -
The whole class is approaching me to solve the assignment coding problems, in addition to it our professor is changing the way we code as i insisted him. I don't know if this is the result of my past sleepless nights.
-
!rant
The new end to the idiotic code snippet head scratchers interviews (awkward for both parties but nobody is willing to admit it)?
Hometasks.
Infinite internet access, use whatever tools you want, do as much as you can in 2-3 hours.
The best non-toxic way to see how someone works as a dev.
This is the way I expect you to work, so this is the way I will interview you.
Sorry silicon valley, we don't need people who can write up a binary search algo from rote memory.3 -
I dont like programming languages where "there is more than one way to do it".
There should be one way to do things, it makes it easy for developers to understand code others have written, it makes it easier to start working in new teams etc etc.23 -
the Death Valley of PR approval
I have almost 3 years of work experience in programming professionally. Currently this is my second company. Previous company I worked for was very loose regarding clean code, code readability, tests etc. It was their way of doing things fast, making working changes quickly was the most important thing due to its business. Now I work in company where I spend a lot of time in some limbo when my code works and my code is merged. It sucks, I make all kinds of mistakes which would be tolerable in my previous workplace, but now it keeps me from releasing code. I now the way I do things now is the right way and it will result in me growing as a specialist, but it is very frustrating and damages my self esteem. I hope it will pass one day.7 -
React native is such a pain to get started with! I feel like Ive wasted way too much time just trying to set up a functioning example. I'm too stubborn to give in. I'm about to rage code right now lol6
-
For middle and high school:
1. Let people teach who actually know what they are doing
2. Learning by doing is in my opinion the only good way to "teach" someone how to code.
(And well theory is just like math. So teach it like math.)5 -
Apple fucked me, their latest iOS version broke my app 🙄 10.1.2
Then my phone gap plugins decided to update to .. they also don't work 🙄
Absolute mess only way I knew was rolling code back to a version that once worked... Thanks github!3 -
Reading documentation for 3rd party software... come across a code snippet which references a class. The class is spelt correctly in the comment but wrong in the code!
What??? Surely if you're going to get it wrong it would be the other way round :/ -
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 -
Found this coding bootcamp advertisement while I was scrolling through Reddit:
“... we provide a better way to learn, free of tuition AND TEACHERS...”
- I learn my code in da streets, yo3 -
do you guys also dream about code or is that just my brain? i swear to god, if i see something awful at work i dream of a way to fix it7
-
I'll never use code hacked by another dev for work.
I got code that only solves one single fucking use case but there are way more to consider ...
The way the problem is solved ... not dev friendly to use, clean code is non existend and did I mention that it doesn't solve many other important use cases?
All has to be refactored and rethinked and everybody complains about why it takes so much time and the code should not be a technical masterpiece.
I'm sick of these bullshit devs, not taking their role as professionals serious.
Devs should not only learn how to code but also to work as a professional. Soft skills shouldn't be optional and the way how IT is seen has to be reshaped.
There are reasons why in these days the developed software has a lot of bugs and is not flexible. Everything has to be done now, changes come so often that they conflict with previous ideas and nobody knows the complete customer specification so the conflict shows in dev phase up.
Most devs work like they are in a hackerspace. Stop doing this.
You can do this in your freetime but stop doing this when you work in a professional environment.2 -
almost end of working day... jobless...
me : *running `uptime` on a server*
*for no reason* : runs `uptime --pretty`
interesting output... ( that I have seen so many times on my personal machine because I have `uptime` aliased to `uptime --pretty` )
*thinks to self* : didn't we create that program that computed a similar output? Wonder if the code is similar...
*brain gets excited about the source code of `uptime`*
goes hunting for the source code of `uptime`... finds it... ( wasn't too hard anyway )
now here I am comparing my code with the source code of `uptime`
what a way to end the day... 🤦 FML!1 -
Can't even find a proper way to learn android app development.. Some tutorials are way too basic and others way too advanced.. Even books arent of much help to me... I know the basics... How do i learn further :/ How do i code without having to look at some example every time ://9
-
Helping to fix legacy code on a staging server. No version control (at least not that I am aware of). Besides rare code comments, no way to see the author, time, or even purpose of customizations that have been made. No fun!1
-
Don't look too closely at the code for tools you use.
Its 50/50 great or garbage. Great way to accumulate side projects...3 -
If I just try another way to do the same thing my broken code tries to do, either the new version makes my mistake obvious or everything just works.
Is this debugging? It's just rewriting. It seems faster than debugging. -
I should try to put ascii arts of pepe memes instead of meaningful error handling messages in my code, this way I would know for sure if people are actually not just patching fucking try catch silence everywhere instead of doing proper code.
I should probably do the same with documentation as well while being at it. -
purity might just be the most important thing when refactoring code you didn't write.
for real, if you purify everything in that code, future refactorings will go way smoother and reasoning even more so.
But it's no easy feat, sometimes you face cockroach code. cockroach code is code written nuke style. The fire and forget code that you shouldn't forget.
cockroach code's easy to spot. you can't know what cockroach code does without reading it's comments. roach code is fat, roach code retro feeds from different spots of macaroni. it does IO and everything else all bundled together.
roach code isn't easy to scratch out its async version. in fact, thats a property of roach code. If you can't make it async without a rewrite, you've got roach code.12 -
The hotly debated topic that anybody can learn to code is always seems to devolve into a definitional or even epistemological argument to the point of being valueless. But I like to think about it like this:
Anybody can learn to code in the same way anybody can learn to drive. The most rudimentary of searches for 'dash cam fails' should provide some valuable context for the practical implications of this.7 -
Approaching the end of my first week as a junior web dev.
Spent the week writing automatic web suite tasks for an entire e-commerce platform.
Arguable the best way I could have been introduced to the code base 10/10 would recommend. -
Working with others is always a great way to improve, no matter their skill.
If -
They're better than you, you get to learn new things
They're worse than you, you get to learn how to be a better leader.
Rest assured, folks.
<!-- Was too lazy to write this in code. --> -
Always double check the code you're sending to the teacher after finishing a school project.
I once sent them an old version of the code that had useless comments and debug messages everywhere. Some of them "politely" pointed out the fact that I really hated the subject, that it was pointless and that the assignment was way overcomplicated for first year students.1 -
Is there any fun ways to learn code? I'm talking about smth like CodeCombat but it is so childish...4
-
Talking to my architect:
- hey, we have a lot of code smell and data is structured usually in a chaotic way, also its hard to understand what is going on with all these code duplications, maybe we can think about refactoring, better structure, maybe even we can extract some domains and make life less painful?
- what is domain?
- *facepalm*4 -
Just found a file where they had needed to write in a way to assign a discount to an order based on a code redeem. They did it by manually checking “if SESSION.DISCOUNT_CODE is set, discount = hardcoded_integer”…. Over 100 times.1
-
One of my colleagues from work:
- Looks through the code and finds a chunk of code that looks fishy (to her)
- Sais that she never understood why it was implemented that way
- Deletes the chunk of code
- Starts rewriting it
- Remembers why it was done that way
- Reverts it back and moves on to something else
Just why? It would have taken her 1 min to read the code ... -
When you write an efficient piece of code and because the legacy database is too slow to return the data, you have to find a way to delay your processing instead of finding a way to speed up the database web service.1
-
“20” twenty static code if conditions...
if() {} else if(){} else if(....
with static code contains the different names of some users... and he still thinking that it the best way to do it!!!! -
For F^^k sake Microsoft give us some way to protect .net code from easy reflection / decompilation ..... Obfuscation just doesn't cut it.1
-
Always comment your code.
Write comments that explain the reason for this piece of code existing, and why it's written the way it is.
Don't write comments that explain what your code does (unless it's a comment which is going to be parsed as documentation for an API). If your code needs comments to explain what it's doing, you need to write clearer code. -
today our senior dev said that (part of my code) is crap...I asked him how to do this the wright way...he did'nt answer.... :/5
-
How to relieve the boredom when stuck at home and too tired to code?
I'm working my way through every episode of Father Ted (again)
https://channel4.com/programmes/...4 -
I want to start with Web development and for that I want to code a dashboard for finances with a connection to an Restful API.
I know HTML, CSS, TS and some JS. But I don't know which framework to use.
The framework should:
- have an easy way to separate HTML from JS or TS code.
- easy way to break down a single page into different html files.
- not have to use npm or Node.JS. Preffered is a CDN solution.
- HTML Templating
Maybe also tutorials on how to setup the coding enviroment.8 -
When I get stuck or don't understand why something is not working the way I think it should, I like to walk my self through the code and explain it out loud to myself.1
-
Silent errors in web-y tech like html, jsp, javascript , etc can fuck right off. I wish they'd silently kill me instead and end my fucking misery.
On the other hand maybe I just need to git God and just write perfect code the 1st time the way an old prof of mine recommended as the best way. Just draw 2 circles and then the fucking owl right? -
Google Japanese Input's Installation failed with code 1402 ( MSI killed the installation)
So I unpacked this .msi file using 7z and copied them to a directory, started all .exe programs, it worked....
A weird way to install software..5 -
When you love to code so much that you get chronic lower back pain 😞 What do you guys and gals do when you get back pain? What is the best way you have found to avoid it?11
-
Started work on a language interpreter and all is going well, until I realise I still need to implement a way of reading and executing code blocks and work out if statements... Ah fuck...11
-
When you saw the code of the whole product, and the best way to describe is the best example of a bad coding practices.
-
I'm wondering if there is a way to use Machine Learning algorithm to optimize games like Screeps.com, which is a game that you control your game by writing JS code. Letting the algorithm write human readable code might be too challenging, but optimizing some aspect of the game should be possible, like the best scale up route optimization using re-enforced learning.3
-
Do you teach your kids to code? Do they enjoy it? I think it'd be a great way to help Give them the tools to be successful early on. :)3
-
I am fairly new to "enterprise" programming, but have some experience with self-study and open source. I'm getting more frustrated by the day because the code quality of our software is appallingly bad: functionality that should be centralised isn't, assumptions about internal structures and functionality of objects are made throughout the code, concerns are not separated, and so on. In my current team, we explicitly disabled SonarQube because "someone would have to fix it and our software wouldn't pass even after a month of work".
While I understand the concerns that companies would rather see new features than "quality improvements", so what? Every time we want to add something, we either have to restructure half the source code or add it in a really horrible way (and get pressured to do it that way).
Is it normal that code quality in companies is so bad?10 -
I asked this on Twitter, but I get the feeling that I might get more responses here and I'm really curious to know what people's answers are.
No judgement question: As a developer, when you’re working on a project that involves something you’ve done previously, how often do you check if the way you previously did it is still the recommended way before referring to your old code to accomplish the task?7 -
I currently work on a project where every teammate is trying to write as complicated code as they can. I suppose the idea is that way the client could never understand the codebase and we'll be developing and maintaining forever. Now I have to develop a functionality for resizing and rotating SVGs and they probably expect me to write obfuscated code to.2
-
Project I’m working on is required to be in React-Native...I’m a Swift/Obj-C developer. I wrote two lines of React code and then I have spent the last 3 hours trying to get dependencies for a single library installed to run the project again...
Tell me how React Native is a better and faster way to develop apps over native code???
This seems like a waste.11 -
Is there any way I can preview an app before completion. For example I have just written a code for border and I want to preview it, is there any way I can do that? I am using Java and Android ide
Thanks.14 -
Boss/prof (does not understand code): "I like it more this way. Come on don't make that face thanks to OOP it won't be that much of a deal to make a change right"
He wants to change a fundamental data structure of our software 😉😉😉1 -
When you write 20 lines of code, that you don't understand, then you can be absolutely sure, that there is a way to solve your problem in 2 lines of code.
-
Today I have no jeans that fit me.. on my way to town in joggers to buy some jeans.. I'm gonna be late babey!! Oh and fucking code man, am I right?!1
-
As if I fucking care if you have to add another parameter to my function call. Just because you think it's easier, does not mean its more usefull.
It's inconsistent as F U C K
You code IS spaghetti code. Your logic is closer a maze on a fucking one way street and I don't fucking care if it works. It's a pain1 -
implementing "standards" and "code review" the way "managers" want by reading stuff from a book and forcing us to apply it in real world.... their reply when we have questions that they cant answer... "the book says so"
-
Best way to measure code quality is by using wtfps method. Less "what the fu#*s per second" you get, better the code is.
-
So my code works, but it's not the best way to do because there is a specific object made as a helper to do what I want to do.
Thing is, it is written nowhere. We agreed with my fellow co-workers, it's written nowhere in the developer guide provided to give the best ways to code.
Just
Fucking
Update
Your
Documentation -
Our manager is in tons of meetings all the time. He sees himself as our architect, and he has read and approved code reviews. Yet when he does get time to code and submits his own massive weekend coding binge pull requests, they're often entirely different from everything we've written to this point.
Instead of trying to be consistent with the work we've currently done, he continually argues any comments we make in the code review. I want to be like, "If you wanted it this way you should have designed it this way instead of giving us a bunch of empty class files an interfaces with terrible names." -
That moment when you need to add a functionality to your program (coded months ago), and go "Why does my head work this way...", after seeing the complex code that needs to be sorted & fit with the new function.
-
We're using a setup with c# dotnet backend and js (React) front end... and do one in VS and the other in VS code. Any way to get one IDE to handle both properly? It's a huge pain but my manager told me that's just how they do it4
-
Hi there, i'm new to AWS. i've running my python code in Lambda. Basically it's calling an http-request and processing the responding JSON to a CSV file. Now, what is the easiest way to transfer that CSV file to a 3rd party FTP Server?7
-
What do you think about my solution to two sum?
https://leetcode.com/problems/...
It took me about 10 seconds to realize it can be solved this way, and then FUCKING HALF AN HOUR until i finally wrote the actual code in a way that worked as it should...
...i really should sleep more. and get examined for brain decomposition or something.8 -
By making badly optimized code that takes forever to run, I have a good reason to do nothing but feel like I'm achieving something by glancing at the progress bar every so often. "Still rolling, way to go my little rock with lightnings. You can do it!"
-
Once I wanted to be part of a prpduct development team, until I got to see its code. Layers and layers of code like baklawa, even worse maybe. Every dev using that layer in his own way! A nightmare!
-
Sometimes i feel really messy in my code and unorganized.
after a while i regret what i did and in order to fix this mess i re write the class all over again or i end in an endless errors which is time consuming.
So what's the best way to write a clean code in your opinion other than commenting and identation1 -
1) For me code is a way of expressing my thoughts akin to rap. It's just that your thoughts has to be precise if you want to write "good" code.
2) Creating anything out of a thin air has certain charm to it.
3) I love problem solving and even if I don't love it, if I've got a certain problem I'll have to solve it anyway and most of the computer related problem can be solved via code. -
DEVIANTS!! NEED ADVICE...
I have been focusing on learning and implementing data structures and algorithms through participating in competitive programming sites...
Whenever I face an issue and struggle to find an answer (which is more often than not), I ask the forum about the fundamental principles involved in the question...
I avoid looking at the solution, as much as possible.. And, when I do look at them, I still question the author of the code about the reasoning behind a particular section of code which I don't understand...
I don't wish to copy and paste code, but sometimes, I wait for days on end, but I don't use the code until I receive an answer...
Is this the right way or are there any other way which I could implement to strengthen my algorithmic thinking??10 -
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
-
Nobody thought about the scenario, where you received your vax certificate via pdf on your phone and wanted to register the qr code that was inside it? Like using a screenshot of the code or the pdf itself? The covid app on my phone demands to scan a qr code using my phone's camera. Understandable, if you receive the code on a piece of paper. But what about doing it this way too?7
-
Newb Dev: I've gotten to the point where I can explain the code and non-Dev co-workers give me blank stares. I sit down and realize there's probably a better way to do it, and then go tell the same co-workers and get more blank stares.
-
!rant I own 3 invites to join Enki. Use the below code to register.
IVANN246
This app provides daily workouts based on your skills and knowledgment. These workouts are splendid, seriously, and they don't take more than 10 minutes.
And no, I'm not related to them in any way.1 -
Coworker asks me for help with some code.
Sure I guess, I'm new at this company, I should be nice, help people and all that.
The guy then proceeds to send me a photo of his greasy laptop screen.
Way to go...1 -
StringUtils.isNumeric(String s)
From Apache commons-lang library will return TRUE for empty string. I learned that today the hard way...you don't need to make the same mistake... :)
Just update it to lang3 if you are working on legacy code and everyone will be happy... -
Praised be the developer/customer! 6 hours listening to him how HIS WAY is the ONLY way to write clean and reusable code! And teaching us how to write HIS way!
No matter how it ignores normal conventions, his way will ALWAYS be the better one! And to everybody who codes otherwise... we call them WRONG!!!!!
Anything you would like to change? NO! We will write it the way "WE thought it before" (I think he meant "HE thought" and impose into us... but... well, I guess I'll have to endure...)
It is the first meeting for this project, and I already want to jump off of a bridge :)2 -
There's a right way, and a wrong way...
Correct:
if (version <= OLD_VERSION) {
... do_something_old ...
}
else { ... something new ... }
The wrong way:
if (version = NEW_VERSION) {
... do something new ...
} else { ... do something old ... }
What my standup report is today:
I'm modifying thousands of lines of SQL code because the script was hard-coded to only work on SQL Server 2008 R2, and we're using SQL 2017 in our test environment. All of those lines now fail because we don't match your "new version" number.4 -
Why is it so annoying to create a way to quickly translate text in my html for users who speak other languages!!
Oh wait, literally as I was typing that I just realised I could have different folders that have the same code but use a different language when doing UI stuff…
Still it should be easy to allow the browser to do it for you via code instead of right click and translate!!2 -
After the American mass layoffs, Silicon Valley software is getting worse in a worse way than it used to, maybe also due to AI generated code and content, especially Google product quality keeps dropping continuously. I am afraid I will have to switch to Apple eventually2
-
Why do PMs always think that comments/commit messages > the actual code?
If I need to know why it's coded that way, I need to check the code.
I get you want to know what's going on, but seriously, don't make me rewrite the code in English. You already know the ticket it's for and have the summary as the PR message (especially for code that the character changes can be counted on 1 hand)14 -
doing documentation in word and having meetings about it, code reviews where people say great code quality with all good practices but... we would like to do it differently, reasons? less lines of code but real reason is not understanding design patterns, also 6 levels of hierarchy and wasted effort to prove that approach is good and considered as good practice just to be changed by someone who doesn't write code anymore. Decisions that other approach is better because they did it that way 10 years ago on last project where they were developers on totally different tech stack. dear friends, welcome to corporation!1
-
To those who have worked in mad RAD solo environments, with next to no testing...
...and those who have worked full Agile, with high code coverage, code review amongst hoards of T-shaped developers...
...how much difference does it make to wellbeing and upskilling in the two?
Bonus points if you have done both and can compare in an n=1 way.2 -
Stuck between should I finish this repetitive code now or should I spend time to make it more DRY. Either way, it consumes time.1
-
Made big change got the way some code worked. Fixed one error in my code that always causes an exception, and expected to spend another hour working on the code until it works, then having it compile and run without problems after fixing that issue. I was shocked it actually worked the way it should.
-
I want to code this application idea that I have but want it to be cross-platform in the end. Is javascript html css the way to go?9
-
I have forgotten how to sleep anymore. Idk if it's a good thing or a bad one. Either way, I get extra hours to code. xD6
-
I'm super bored, but I think I found a good way to spend my time.
https://theitsloth.github.io/contex...
https://theitsloth.github.io/editor...
https://theitsloth.github.io/tabbed...
p.s. Code quality varies between meh and awful. -
That would be lambdas in C++11, nice way to implement callbacks and make them quite generic while keeping code readable :-)
-
Or when I'm working on some legacy mess of php code and changing nothing and then reverting even that causes the whole code to act in some nonsensical way with three buttons hooked to the same code doing three completely different things and none of them having any remote connection to what is in the code. Sometimes I get it to get its act somehow together by fucking rebooting my computer (???). What the fuck is wrong with php and wordpress in particular? Could it be any more of a mess?
I literally commented out my whole fucking code, rebooted the server. Is there some cache I'm not aware of involved? It all feels like some fucked up nightmare.6 -
class post
{
public string type = "question";
public string info =
"I made a Notification Drawer for pc. It checks a file every 0.01 second. If that file contains a specific line of code, the notification drawer shows a notification. This way I can make other programs to be able to send notifications.";
public string question = "Is there an easier / better way to make 2 or more programs communicate?"
}8 -
Is there a way to let a user write some python code on the browser and then run it and show the result? I want to make a coding challenges website using django but I don't know where to start8
-
For an app, to be available in IOS and Android, i need to code it in both languages (Swift and Java)? or there is another way to do it?7
-
Which way you prefer to write code?
1.
server.addHandler(...)
server.addSerializer(...)
server.addCompressor(...)
...
2.
server.add("handler",...)
server.add("serializer",...)
server.add("compressor",...)
...
3. Both. (as per mood) :p15 -
So I'm relatively new to Python. I've started doing the practicepython.org challenges. What do you guys think to my code layout, is there any way I can improve.
https://github.com/Rotho98/...5 -
This is sucking major rooster right now. I can’t post a freaking mean to this site.
I was in such a good mood until I faced buggy fudging code. Ive worked way too hard today to have to deal with other ppl problems2 -
Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..
Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode3 -
Working with ring circus master project manager who don't know how to code (she is an non techy). By the way she is good at yelling. :(
-
I'm gonna enter in school tomorrow, in the presentation, they told us that during the "piscine" (a test phase to put everyone on the same level), we have to make code with functions with less than 5 lines of code inside it to validate the exercise. Do you think it's the good way to make a program?
-
Hey, can someone point me to a sample project (if it exists) on the best way(s) to stucture code for Serverless architecture that includes GraphQL and unit testing?
Preferably in NodeJS. I'm more interested in the code structure than anything else. -
Paper and pencil. It's always helpful to draw little sketches and write short notes that help you to understand a problem you are trying to solve. I think mostly because you stop staring at your code and you start thinking about the problem in a different way.
-
I have spent a month to find a way create and modify ".mobi" files by code. none of useful information hit it. Can you give me a thought?3
-
In the way of learning java if you learn new concepts but not able to apply to you code how you deal with this type of new concepts7
-
The best way to learn is to clone it, install it and get stuck in. Read the documentation, see the example code, then get an idea for a project and start building with it.
-
I learned to program at university. I remember my favourite practice exam was in AI where I used Lisp on a unix server to code a "find your way from the labirynth" problem. Everyone else used Pascal on PC-s. I don't know why 😃
-
Best way to learn to code? More specifically, best way to avoid distractions whilst learning? I find myself easily tempted to play video games or watch YouTube videos instead that has nothing to do with coding...
Did anyone else suffer from this? Is this just a phase and once I break past it, I'll be really into programming & forget about everything else?3 -
Tried out the node.js code demo in this book.
🤦♂️
Terrible format, use tab for indentation, very very long function, redundant code (eg: new Buffer vulnerability)...
The major issue is none of the total.js nosql code works. Eg:
db.clear()
db.insert({...data})
Without any asynchronous call, how do you expect this to work?!
Just fixed the code and updated npm modules for demos in Chapter 3 btw... Took way longer than expected.3 -
Hello, chat, i have this annoying and frustrating problem that is making people angry around me, and i dont want to get into details, but basically its about whether a child class should contain the driver class for its parent class in java. Could somebody please tell me which way is the better way to write decent code and why.7
-
As an Elixir developer , would like to code in Rails , but the setup for rails is really painful.
Well at least in elixir phoenix are much more simple.
Is there a better way for the installation of rails?3 -
I have a habit to comment every single line of code, this helps comprehension but this dirty the code and everyone complain. Is it any way to do such task.6
-
Any way to run some python code in android without losing my mind !? It is just a code which queries a simple api once a minute and logs it into a sqlite db. I want to use my phone as a substitute for a server instance, cos i dont have the monies to buy one..😬.. SL4A aint working.. P4A webview isnt working for some reason.14
-
I am watching The Karate Kid and it made me wonder if there is a way to teach someone to code without them realizing they have been coding the whole time.
-
Whatever it costs to improve myself and my coding skills, to be honest.
So guys suggest your favorite way to improve and enhance your code quality.4 -
Hello, I'm kinda stuck in this problem: Lets say, I want to give each of my users a dedicated IP address. How do I do it? & what's the best way to do it with python?
No need to share code, just some instructions/guideline would perfect. Thanks in advance.19 -
Is there a way to comment out another team? Not their code, the actual team members. Is there a node module for that?4
-
Random idea for the day.
An IDE plugin that allows intentionally mixing syntax from different programming languages in invalid ways within the same file.
BUT corrects code blocks to the right way by checking each code block detected as invalid say every thirty seconds. Generating code that is equivalent in output to the incorrectly specified code.
Any takers?2 -
The VCS I love is Git with GitLab.
The way client code reviews is via email pointing outline number for explanation and expects to send the zip file of the entire project via Google Drive.
why the fuck git exists?? -
Hey guys,
What books had the biggedt impact on how you live your life, conduct your business, the way you code or make decisions?
I'm reading "Zero to One" for the second time now and love reading it all over again.10 -
As an art guy trying to learn how to code , I’m blown away on how antiquated the entire process is. Not knowing anything about code I can expertly say that there should be a better way to program. It hasn’t changed much since I used BASIC. Is this the best you can do? Typing line after line of rubbish lingo that only code bros know. Why not invent a smart version of scratch? What a waste.
-
For some reason nothing i've been working on has been satisfactory lately (failed code reviews requiring me to re do the code).
The better way to do things seem so obvious after I speak to my seniors and I don't understand why the solutions never occurred to me.
Anyone ever feel like they're getting worse at programming?3 -
testing a form and having to fill in the info every single time I change the code - gross
Does anyone know of a way to refresh a form (ctrl+F5 in chrome) while keeping the data?6 -
Why devrant should have an inbuilt code editor
1. it can be easier to read than just reading code someone wrote in their rant
2. it would be way easier and indented plus added syntax highlighting should be good
please add a code editor to dev rant it would erase having the need to decipher everything in a chat xD15 -
My coding style is mostly influenced by good old personal preference, but also because of a certain internship where there was a lot of gain to be had by making everything as reusable and testable as possible.
I guess you could say my motto is usability, readability and flexibility:
I like tidy, reusable code with an emphasis on keeping code readable. I've always liked modular things I guess...
And I despise two things: curly brackets on the next line and spaces for indentation... But way worse is having no brackets at all (looking at you Python): it's clearer to have lower-level code inside some sort of "container" markers i.e. brackets (also gives more IDE functionality like color-coding hierarchically).
Indentation should always be tabs so anyone can have their own width of indentation set through their IDE, making it way more accessible to fellow colleagues!
And I also like having parameterized code over hard-coded functions: way more flexible. -
Aren't we all, just pieces of pseudo softwares, reverse engineering our way to find our source code....🤔1
-
The way we keep running the code, when we mess around with the code and try to find a solution, has so much in common with machine learning1
-
What's the best way to learn how to develop android code as I would like to but have no idea where to start?1
-
Any one with a shorter way to code a deck of cards shuffling and never let the deck of cards be shuffled in a way it is similar to a certain period it was shuffled? Python. :-)1
-
is there an easy way to start angular 2.0 project because I see I need to get ton of setup for each project b4 I can even touch the code (noob here)4
-
That no one can agree to write code the same way, use the same framework, or use the same tooling. Thank you js fatigue.
-
To whose of you who contributed code to Moodle LMS in the past: what do you think of this LMS and the way they ( core developers ) treat non-core developers?1
-
I need recommendation for site/community to improve my (clean) code style?
And, in more general, what are your ways to improve code style and programming way of thinking - more oriented towards bigger picture of application/systems (patterns, architecture, etc.)?3 -
I swear some people code too much because they dont want to write some bash nor bother with the posix way of piping everything together.4