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 - "refractoring"
-
My first rant. Woohoo!
Honestly I do the whole shebang ussualy depending on what the needs are from network to servers to coding because for some reason nobody has any technical experience where I work.
I just started app development for a gamedev startup and I am in sheer awe of the amount of transpiling/compiling etc that needs to be done for an multiplatform app for iOS and android with js(x)/typescript, html, css.
I remember when I could just write some spaghetti code to make it working by following a couple of tutorials. Then refractoring and testing it for a couple of hours and be done with it. push it into production.
Now I am lost having to learn OOP, functional programming, reactjs, react native, express, webpack, mongodb, babel, and the list goes on and on...
Why not just make a new backend that does all of that in another language which supports all of that.
I have no formal education in programming/coding and the last time I learned JS it was just some if else, switches and simple dom manipulation.
I just want to get to coding a freakin' game but I have to learn JSX for the front and typescript on the backend.
I am this close to going back to ye ol' lamp stack and quitting this job. 😥5 -
Don't refractor for fun!
An anecdote from my previous company. A developer had written a shitty java console app for fetching stock prices. About 3000 LOC. just one java GOD class. So, when me and my friend looked at it, we were amazed how that code works with all that if conditions spanning 100LOC. so. My dear friend underestimated the complexity. Since it just fetches stock price and puts in database right. I can write it in few days and much better one. So, he started writing code in an OO way. Three days later I see he still working on it. Having a glimpse at code. The app is now Object oriented shitty and ugly.
Guess what new code never goes in prod too.
Learning
Don't underestimate complexity of app.
Be empathic about fellow developer. Don't think he has written a shitty code. Think why he had to do so.
Don't work on refractors if there is no one to guide you.3 -
Spaghetti codes makes a person feel frustrated, non-productive even slightly depressed, and even do refractoring takes time of production and slows things down in the short term there's nothing like that "new feeling " after you successfully re-organize and re-structure a project.
The skies seem more blue the motivation re-appears and new ideas make the project feel worth it of your time again -
When they say 'Write comments!' and you are like:
// Do necessary operations
I have been refractoring a project with a SHITTONE of comments like this and a FUCKLOAD of nested if statements. And then this commes along:
$user2 = User.find($user->id);
WHO WRITES THIS STUFF? I am never working on a cheap project from India again.3 -
I just want to say make sure you build app to be scalable from the begining I spent around 5 hours remaking my Vue app to use eventbus and vuex because at first I thought it was going to be a much smaller project but it looks like I'm going to expand on it.
Btw it's still not 100% function like it did before the refractoring so ya.2 -
Need to add funcionality into badly written code. Moral problem: I don't want to even look on that code, but I don't have time enough to rewrite that part.2