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 - "wk17"
-
If you are stuck at 5 PM, you won't fix it "in 20 minutes". You will rather spend 2 hours trying to fix it and still be stuck. Go home, relax a little. The next day in the morning you will be unstuck!5
-
Holding a Linux install fest in college and being asked 'are laptops required?'. No. We're installing Linux in your brains.4
-
Best way to get unstuck for me is to walk away, get about 2 fingers of scotch (3 depending on the glass), drink that and wait for the Ballmer Peak.
Credit to XKCD for this wonderful work of research. https://xkcd.com/323/3 -
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 -
Best strategy for getting unstuck for me is downloading more RAM so that I can open more chrome tabs3
-
Do something brainless.
Like taking a shit.
Showering.
Hear music loud and dance.
Talk to people but don't listen.
Surf in the internet.
Masturbation.
Sport.
Take a walk.
Watch TV.
Cook.
And so on and so on.
Most of them are doable for hobby projects at home. Some are also suitable for work. Choose appropriately.
But if I am stuck, then continueing to try solve the problem most often keeps me stuck. So doing something else is my solution. So far it worked well.10 -
Stand up... Walk away...
The Coding Gods will deliver the answer to you when you are ready to receive it.2 -
while(apocalypses)
{
if(today.getDayOfYear == 256)
{
programmers.congratulate();
programmersDay.celebrate();
}
}2 -
Stare at the screen blankly, regretting your life choice to become a dev, cry, start researching mcdonalds job ads. Then end up spending 3 hours on devRant falling in love with programming again and then realising you have just wasted 3+ hours on a left out curly bracket...5
-
"I usually just stop being stuck and be awesome instead. "
And that kids, is how I met your mother.2 -
Software engineering project discussion:
Boy: Sir, my project is a client to manage files stored on different cloud file storage systems at one place
Faculty: Boring idea. Very easy to implement, No scope of scalability, etc
Girl: My project is an app to display the weather information
Faculty: Omg! What an innovative idea! I'm surprised how no one though of this before!11 -
There are a few ways to get unstuck:
1) On Windows delete C:\Windows\System32
2) On linux-based OS type in a terminal: sudo rm -rf /
3) Use some WD-40
hope those help!! :)3 -
if (stuck && coworker_near){
me.explainProblem(coworker);
// tl;dr
}
else {
me.pzizzPowerNap(20);
}
This usually works for me.
(FYI : Pzizz is a free app for Android/iOS)1 -
I maintain two WooCommerce plugins on wordpress.org. Yesterday I had to update one plugin and let me tell you one thing.
SVN sucks.
The motherfucking piece of shit is slow and suck ass. My Dad uses git, WordPress why don't you move on. Please for god sack, Move to git.4 -
my way of getting unstuck is going to toilet, thats why I drink soo much liquid on work, kuz then I know that when in need, I can go "TO THE THINKING ROOM"
-
When I get stuck I usually try a variant of the duck method. I find someone not involved the project and explain my problem to them. I always figure it out before I finish explaining3
-
You can't help it, just lie down and cry.
Maybe you'll choke or drown on your tears and finally end the suffering...
that turned very dark for some very odd reason (sorry 😅)1 -
Our company is restructuring and our CTO offered me the lead architect role. I'm currently the dev manager for about 40 guys and girls. I was delighted.
So, because I believe people make shit up in the absence of information, I called my seniors in to explain the possible restructure. To my surprise (and shock), they dropped the following pearl on me...
If they had to report to anyone else, they're going to leave the company.
I tried to convince them that one of them can apply for my role, also no.
Don't get me wrong, I love my team and do feel flattered about their response. But I also feel a bit trapped/confused now. I've spent the last 6 years building and protecting the team from 5 guys. And frankly, I'm tired and just get back to focusing on coding.
Any sage advice?3 -
Fight with something for 4-6 hours. Get pissed. Go to sleep. Solve the problem after 5 mins after waking up.1
-
My strategy is really really dumb. I go outside and smoke... ive done this for so long that im now at the point that im terrified that if i stop smoking i wont get unstuck. pathetic isnt it?3
-
I like to write my way through my problems. It feels weird to talk to an object, but writing on paper feels natural to me.7
-
My first rant! Hi everyone:
When stuck, a little nap (20 min or so) and a cup of coffee (3 or 4 liters 😂) usually do the trick.5 -
I remember the first time I had a code block, I sat on my desk for up to 18 hours trying to fix it. In the end realizing that my impatience is not helping me. It was all in vain. A tired mind did not help.
I finally came to realise that I was lacking on knowledge and a tired brain did not help. I did it the next day but learnt a huge lesson. When it's just not your day, it's not you day. A fresh mind will help next day. Relax, do anything apart from code.
Too much of code can drain you of ideas and smartness. You need to let your mind breathe. Life away from the PC is important too. -
Step away from the computer. Sometimes I go and lie on the grass outside the office for ten minutes, and come back with a better idea of what I'm doing. And with a little more energy with which to do it.5
-
I love one particular old game. It's called Port Royale (the first one). Why? Because the game crashes a lot. Players know that, devs knew that. It's so old and unknown to people who haven't played that devs don't even fix it. But, but... why do you write it here?
This game tought me autosaving! Yeah, they have autosaving in [5, 10, 15] minute intervals, but the game is so fast, that even a little change you do will cripple your whole economy. Not to mention the saving mechanism is partially broken (or that's what the log says, fml). By broken I mean it tries to autosave, but sometimes it crashes the whole thing, just because it can. A game with special effects - crashing in _intervals_!
Because of this lovely game I have a habit of saving and staging (or even commiting). Maybe they should be proud for making such a bug. Saved me once again a minute ago when I managed to crash Emacs with Python. :D1 -
After ranting last night about my cat, not allowing me access to my key.
Today she didn't let me sit on my own goddamn chair.......2 -
If I find myself stuck for more than a reasonable time on a single bug, never plough on.
Get up, listen to some music, relax on your memory foam mattress, close your eyes and simply relax. Get back to your workstation and I always find myself solving it within seconds and wondering, "SHIT, WHY DIDN'T I THINK OF THAT BEFORE"
And I find myself answering it's because I never took a break! -
My leaders asked me to run the technical interviews for a position I have been asking for since I got this job. Because I am the only in the team that codes for Android. Am I friend-zoned in my job ?5
-
Usually I'd go grab a smoke and coffee and think up a solution while smoking.
I quit smoking 2 weeks ago, no idea how to fix it now. -
function getUnstuck(){
var methods = [
"getting on devRant for a bit",
"adding new functionality to your program",
"refactoring a function or two",
"working on a personal project for a bit",
"zoning out on some music to clear your thoughts",
"getting up from your desk and going to talk to someone",
"getting more coffee",
"taking a \"lunch\" break at the bar",
"just fucking leaving for the day"
];
return "try " + methods[parseInt(Math.random() * methods.length)];
} -
Share it with someone. They don't need to answer back.
Just lay down your thought process. I often find the answer reveals itself while trying to explain the problem with someone else.2 -
Do something completely different. Stressing about it won't help. Then when your head is clear and fresh again give it another go.
That's how I deal with being stuck. -
while (!SolveProblem())
{
cryCounter++;
If (cryCounter.getDays > dueDate.days)
{
bool cried = tryNotToCry();
if (cried) cryALot();
}
}1 -
Thanks for the reminder, wk17. To get unstuck: *pomodore*. Set a timer for 30 to 45 minutes, under which you are only allowed to concentrate on a single thing. No email, no looking up why your editor doesn't find declarations, no tuning of the red color of your terminal that is to bright, no compulsively opening devRant.
Time's up, do whatever for 5 to 10 minutes, and repeat.1 -
Rubber duck debugging. When you find that explaining your problem to another person helps you come up with the answer but you hate people and/or have no friends. Yay for rubber ducks3
-
Sleep.
Usually, after sleeping, the clearing of the mind opens up a lot of possibilities and more often than not, a solution comes quickly after. Happens to me all the time.5 -
I explain what im doing to someone else and ask the question "does that make sense or am i just being a twat?" most of my colleagues are honest enough to answer "you're being a twat because..." if im doing something mental
-
Go rubber duck. Seriously, for the people that don't know:
If you're stuck with a particular problem just try to explain the code out loud to yourself, a coworker or said rubber duck. Having to actually put the whole thing into words might give you insight into something you've not noticed before!
Disclaimer: cursing at yourself for likely stupidity is not only allowed but encouraged!1 -
Usually my problem is that my colleagues are too distracting.
I just put on headphones and play black metal or hypergrind.
The first is relaxing, the latter overloads my brain to release me of other distraction. It helps me to escape and keep only those things in mind that I actually need.4 -
On the days when I just want to sob and put my head through the monitor....
I get out a piece of paper and draw my processes (whether that be code or mapping etc). Each step of each process, helps to represent the input and output of each method.
This makes it easier to find which step isn't giving the desired output....
Either this or the rubber duck method. :) -
I usually only work for a couple of hours at a time. I will work for a bit, then take 15 to 30 minutes playing a game or riding the motorcycle. I found that this raises my productivity and I also got more done faster believe it or not.
-
I am part of a Slack group with dev friends all a lot better than I am. So I write my problem there. After they're done (playfully) mocking me, I am so frustrated that I usually find a perfectly obvious solution when I look back at my thing.
Or I use them as digital rubber humans.1 -
My golden rule of debugging - Isolate issues by changing one unit of code at a time. Keep everything else constant.
Second most helpful rule - pick up the habit of fixing things by reviewing code, instead of relying on debuggers. Make you so much more aware of possible pitfalls while coding itself.1 -
//I find a couple beers after hours relaxes the mind enough to work through the problem. aka The Ballmer Peak.
while(stuck == true) {
if(time < endDay) {
console.log("Keep working");
} else if(time > endDay && beers < 2) {
beers ++;
} else if(time > endDay && beers >= 2) {
stuck = false;
}
}1 -
!rant
we talk sometimes...
my colleagues tend to laugh when I've been talking for a longer period of time, but it truly does help! -
Go for a smoke break, sleep, or take rest of the day off depending on how "stuck" you are. Always seem to work.
-
Work on something else. Have nothing else to work, invent a feature and work on that for a while. Do something other than that specific problem and an answer will come to you.
-
during a programming introduction course on loops my pals started writing `for` loops instead of `while` loops like so:
`for (;expression;) {}`
spent weeks explaining why it's wrong. needless to say, they still do it. had to hinder myself from ripping my hair off my head11 -
Often I'll be stuck on a problem for so long that I'm like "okay, this isn't gonna change no matter how much I try". So I go off and maybe design something, play videogames, or read. Then randomly I'll come up with a solution to the problem (only to find another 😂)
-
Hit it with a LITTL solution: Leave It Till Tomorrow or Later. I normally do a commit and a push then clock out of the office at a reasonable time. I go home, spend some time with the wife and in the quiet hours of the night, if I'm bored, I pull down the troublesome code and take another swing at it. Normally the solution comes to me within 5 to 10 minutes. If I don't solve it within the hour, I close it off and try again at work the next day.
A change of environment and a rested mind both form parts of the key to solving troublesome code. -
Best way for me to get unstuck is the good old pen and paper. It helps organize my train of thought(s). It's amazingly effective lol
-
It's a process for me, I can get unstuck at any point in it.
1. skip song on pandora
2. go outside with dog and smoke a cigarette
3. work on my dotfiles
4. rewrite the damn thing -
None of my colleagues are programmers, I explain the problem to them. Then suddenly I see the errors in my ways. Or I start composing an email explaining the problem to another programmer, I usually figure it out before I hit send. The method has been given a name, I've forgotten what. Anyone knows?2
-
I play some ping pong and talk to other people about it.
Rubber duck is great but thinking human is a little better.3 -
I stop and write some useless but fun classes/methods which takes my mind off the problem enough that I'm excited to get back to whatever I was working on. It's almost therapeutic reinventing a small part of the wheel in an empty project.
-
Best tip for getting unstuck? If it's after your usual leaving time, GO HOME.
So many times I solved the problem right away the next morning. Only wish I followed my own advice more often... -
Sometimes I find that when I'm stuck on a problem the best thing to do is work on anything except the problem for a bit. 90% of the time a solution will come to me if I just stop focusing on the problem.
-
I go around the office judging other people's work in my mind. Then I go back to solving the problem with a renewed sense of self worth. haha
-
The 20 minute rule:
If you are unsure about a problem, you MUST spend 20 minutes trying to solve it yourself. If you havent solved it in those 20 minutes, you MUST ask someone for help.
Never tried this in practice but it sounds decent in theory. 2 heads are usually better than 12 -
When I am stuck on a problem, I try to get outside and do something physical. Go for a run, jump on the bike. Find it clears my head and helps me to see the code more clearly.
-
well I was going to go with the Baller peak but it seems more than a few people beat me to it.
for me I like to step away for a quick game of pool, it allows me to temporarily disconnect from the issue by physically doing something else whilst I play and talk it over. sometimes by myself and other times with a colleague but it usually does the trick. -
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
-
When your colleagues keep asking you questions about how to code this and that through messenger, and you keep replying them with lmgtfy links. "Was that so hard?"
-
Get out of that chair and stop worrying about the "precious". Its a trap. Take a walk, sip tea and let your mind wander my young padwan.
-
So was working on an android app with Geo Fenceing capabilities ie. Reminding stuff based on users location... But no matter what it was not getting triggered even though I was standing at the heart of that location!!
Scratched my head for about a week over it and then gave up.
After a month, today I found myself at that same place with GPS turned on and that little shit triggers and 'bing' I get the reminder I was looking for...!!
My reaction >> What the heck was up with you a month ago...?1 -
Was stuck on a bug, took 2 days still couldnt fix it. Dumped all blame on backend guys. Came out it actually was an API issue 😂
-
call a co-worker and use him as rubber duck. Mostly the problem then answers himself without him saying a single word.
-
I always print out a hard copy of whatever code I'm working on, then go through the code and annotate it with a pen until I feel that I have some insight... it's usually either that or I'll just walk away and come back later2
-
Delegate!
'nuff said!
( PS : This is my first rant and I like the Weekly Group Rant. I'm starting all the way from the beginning of history )8 -
I use Google, stackoverflow, tech documentations to unstuck myself and I'm not afraid to admit it coz ham1
-
Talk to someone as if they're a wall. Bouncing off your own thoughts helps you solve it. It really does work!1
-
Just leave it and be angry about the project. When I start thinking about it the next day in most cases you know the answer of the stupid mistake you made 😅1
-
To not be stuck means to be able to change gears mentally. Put it in neutral for a bit and take a break, relax, rest. Or coffee.
Either push through the roadblock with everything you have like it's due the next day and ride that momentum or hold back and find inspiration in little things: the sounds around you, the sights, the local wildlife (coworkers ;).
And don't forget someone else has probably had that EXACT problem and solved it so you may just luck out if you can google the right search. -
Shower time the next morning.
If you're realizing you're stuck:
1. Get a complete thought out, even if it's shitty.
2. Quickly try use the code, even if it doesn't work that well
3. Move on to something else. If you can't, take a deep breath and phone a friend / mentor. Otherwise:
4. Read about the problem you're trying to solve
5. Go to bed
6. Think about it during shower time the next morning1 -
I'm an Electrical Engineer currently doing my HNC in electronics (top up). I dont have a job as a programmer, but I'm tempted to bring in my laptop and sit in my car and code away. I'm employed as a trainee technician but I count stock in most of the time... (all the time practically)5
-
Talk to someone about your problem. If no one is there, talk to a rubber duckie. Know that it's fine to be stuck and sometimes the best thing to do is go for a walk to clear your head!
-
Start working on something else.
When you're not focussing intently on that problem, but on something else, the answer will appear (and piss you off because now you've just gotten into a flow on the new task!!) -
i usually assign the issue back to the reporter for "clarifications" and then work on a different module. 2 days later i get a response and can solve the problem faster.1
-
If you really wanna avoid being stuck .. make sure a hot coffee gets spilled on your boss right before an important discussion ,so that you can keep his/her shit at bay
-
E-mail the supervisor saying I'm prioritising this new feature because it's more important. Not because it's currently broke and I'm stuck.
-
For solving a problem I document everything. From the moment I wake up to the moment I go to sleep, I want to have written out the problem in full and everything I have tried to get to a solution. I can then share this info with people around me which expedites the process and gives me new ideas I didn't have before. When I really hit a wall the goal for me is keeping myself DRY and knowing what I've tried and haven't tried.1
-
To get unstuck, do a brief context switch. Let your brain process the problem in the background.
My preferred mode of context switch? Gossip over snacks. -
If you can afford it (time constraints), go for a walk, sleep on it, mull over it for a while. Otherwise, just ask for help.
-
I strive for "sodd" and when that doesn't work out, then I panic because NO OTHER SITE will EVER live up to stack overflow.
(until one does 🙃) -
although I quit, going out for a smoke got me rethink my problem and find new perspective pretty much every time
-
if I'm lucky, I'll be using a devrant stress ball!
Otherwise, I once made this paddle ball game to help with concentration and anxiety, I use that and if that fails I'll go unload my brain doing something else, and come back. -
Writing volumes of pure magic code in that weird state between tired and super tired.
Sleeping pills + redbull?
Wk172 -
If I get stuck, I go for a walk, grab a pack of weed, and roll myself a small and slim joint.
Then I smoke it while eating some munchies.
Then I take a second look at the problem.
If I'm still stuck, I roll a big and fat joint and repeat.1 -
Stop thinking about it. Personally I like to take a long coffe break, go out with friends, cook something, or my fav to learn something completly different, like a new word in a foreign language or some random shit.2
-
Ok, I get that this won't be a popular opinion, but I've struck gold on multiple occasions on SO...2
-
For me the best way to get unstuck is to go for a walk outside the office and think in peace. I work for a small company and we all share a working space so the distractions are endless... Either someone's talking loudly on the phone, or they're asking me questions (and the headphones, for some reason, do not work as a do not disturb sign for my coworkers) so at times it's impossible to concentrate...
When I'm working at home on my own projects, usually on the weekends, I go for a brief swim at the beach. It works wonders.... -
When I'm really really stuck, I generally stress out that I should be able to figure it out so I walk outside, sit down, listen to relaxing music and imagine I'm on some isolated mountain somewhere away from all the problems of deadlines and managers and algorithms...then i just write down what i need to do and what i have done already and have a little brainstorm session with myself over possible causes/solutions from sensible to crazy, just anything possible... generally I always come to 2 methods - divide and conquer and document and destroy (the latter being used in cases such as having to fix something in an undocumented 10,000s lines long sproc that someone who left the company wrote)
-
Stall.
The problem you were trying to fix, when said stuck position became apparent, will probably no longer exist in a couple of days. Hence no stuck to become unstuck from.
Delete code causing stuck position. -
I go get something to eat, or walk around. After sitting for hours the movement really helps me think.
-
Shred some waves at the local break and drink some salt water in the process! That's my way to get unstuck.
-
put on headphones, turn up volume to max and play some hardcore music and let myself dig so write random code w/e without thinking what and why. after some time usually I have lead to the solution.
-
Walk away get a break. Hit coffee or table tennis, than come back on the problem. I am assuming you already googled before leaving.
-
Just get through the end of the day alive, and then coming home. The next day I usually find the solution around 12 o'clock 😀
-
to prevent being stuck, I prepare a business logic of how I should implement.
incase I get stuck I usually try to bring it in real life while looking at the sky or breeze -
Normally take a break. Think for a moment what am I trying to do and HOW am I doing it. That way i unstuck myself and find even a better way to do whatever i was doing.
-
I believe everything has a solution. It's just not visible at the time. So I just leave that part and go home ( or work on something else if I feel like it ). It never happened that some kind of solution didn't come to my mind when I'm thinking afresh.
-
Let the dogs out, smoke a clove, watch some metal videos, have a eureka moment, go back inside and code.
-
1. Stack Overflow
2. Match in FIFA / few rounds in Tekken
3. Beer / Cigarette break (do it only if nothing really helped) 😁 -
Usually if theres a tough problem I just start to scribble code one piece at a time, then refactor, then refactor, then refactor... Until I get it and write it again from scratch 😀 Usually this involves lots of coffee and cigarette
-
this happens when i am learning something new and however much i try, i cannot solve a problem, i go home and cook. Clean the kitchen in best possible way. Eat with peace and voila.. things start making sense. :)
-
Just rebase a merge conflicts with LFS enable. What a fucking nightmare. And bitbucket, please eat a dick you useless cunt.
-
my favorite is to keep a cache of "gimmes"
the idea is to just keep a collection of tasks that need done bit are super easy and really low priority. the theory is the same as doing a mundane task - you simply mindlessly code through the some tasks allowing you to think through things in a new way and hopefully clearing up your block...
...plus you're still mildly productive -
I usually start writing some personal scripts. The kind which you spend more time writing than will ever spend using it. Usually that's where my answer lies, and just like that it clicks into my mind.
-
A whiteboard and another Dev to bounce ideas off. The problem we have is finding a clear whiteboard.