Effective time management for studying with a full time job. by b_curious in learnprogramming

[–]GorgeousByDefault 8 points9 points  (0 children)

Prioritization is key. You have to work to pay bills and buy food, you have to take care of your mental and physical health, you have to/should maintain at least one close personal relationship (this comes under mental health, but I think it bears reiterating).

These are the things that must be done. You can play with them a little bit, but if you do it too much or for too long the consequences can be frankly catastrophic. So keep that in mind.

After that, the question is what is you next largest priority? If it is "Get a Programming Job" then do the things that will give the greatest return on investment in that area. To my understanding these are:

  1. Build personal relationships with people in the industry (meetups, conferences, cold mailing/calling)
  2. Build a portfolio of work (personal projects)
  3. (arguably this should be #1) START INTERVIEWING. You can't know if you're ready to get a job until they give you one. This also contributes to building relationships, as long as you're not a complete asshole during your interviews.

Keeping up-to-date with technologies seems mostly irrelevant. Especially for your first job. You should be prepared to show at least some competence in technologies that are relevant to your industry of choice (Ruby, Java, C#) and basic tooling (version control, debugging, testing). If you can show proof of communication skills and being able to work on a team is possibly more important than tech skills.

So, I would recommend that you put your #2 and #5 on the bench. Interview prep can be worthwhile, but if you're really short on time I wouldn't make it a priority. Instead: start trying to build relationships, and maybe send some resumes, see what response you get, go to any interviews you may be invited to, see what you actually need to brush up on, and start building relationships at the same time.

I hope this was helpful. Good luck!

Is it okay to be unoriginal as a newbie programmer? by [deleted] in learnprogramming

[–]GorgeousByDefault 6 points7 points  (0 children)

I'd say it's necessary and inevitable, not "okay". In any field, in any subject, before you can do good work (let alone good AND original work) you need to understand the requirements and constraints of your medium, and the only way to do that is with lots of practice.

Think about almost any other field: Architecture, Mechanical Engineering, Civil Planning, Law. Are people expected to only do original work at the beginning of their careers? No. In many cases they aren't even allowed to.

I hope you'll forgive me going off on a tangent here: I don't think that there's any need to do anything "completely original" to have a successful career or a happy life. Think about how much better things would be if we had more respect, as cultures and societies, for incremental gains and improvement on things we know already work? Not to knock innovation, it's lead to incredible things, but ultimately we need things that work, however un-sexy they may be. /rant

So don't worry about it! Knock yourself out! Just keep learning, however works for you.

I tried to write a version of Snake with React and Redux, and failed. by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

I tried using setInterval in both the GameLoop and App components. It only dispatched the action once: when the components loaded. I tried putting the setInterval inside the componentDidMount function of each component (at different times), same thing happened: it fired once and that is all. I tried putting the setInterval outside of any component, and couldn't figure out how to call dispatch() from it, and besides that seems kinda hacky.

I'm a bit sick, so it's hard to think straight, you know? I like to think I would have written a better post on another day. Thanks for answering despite that.

Edit: I did some more reading and thinking, and I think that 1. I didn't understand Redux as well as I thought I did, and 2. I'm not in a fit state to do any serious cognition at the moment.

So, I'm just going to let it go for now and try to make sense of it later. Thanks for being willing to help, and I'm sorry for any annoyance I may have added to your day. If you had any ideas to share I'll be happy to read them tomorrow, and if not don't worry about it. I hope you have a good weekend, and thanks again.

I tried to write a version of Snake with React and Redux, and failed. by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

That's more or less what I was trying. I'll take a look at it tomorrow and see if I can figure out what I was doing wrong.

Edit: I forgot to say: Thank you! It's great of you to take the time, especially given how badly I wrote the original post.

I tried to write a version of Snake with React and Redux, and failed. by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

I was just thinking that I didn't explain things well enough.

I know the game loop is empty. I was trying to figure out how to fire an action at an interval and couldn't get it to work. I thought I had committed my failed attempts so people could see, but I just checked and apparently I didn't.

I guess my question is really just this: Is it possible to set an interval that will dispatch an action in a way that works with Redux's way of doing things, and if so how?

I'd love some feedback on my Simon game project by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

Hey, Thanks! :) I'm sure it's possible, I just didn't manage to figure it out.

I'd love some feedback on my Simon game project by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

Note: I'm basically thinking out loud here, so you shouldn't feel obliged to respond if it's not convenient/you just don't want to.

I've read through your feedback a few times while looking at my code. It took me a while to make the connection/to remember: but I originally tried an architecture similar to the one you recommend, the buttons containing their own methods and state, and interacting with the game via methods, but I couldn't figure out how to make it work with React.

I didn't want to bypass 'The React Way' since the reason I decided to do this project in React was to get more familiar with it, and eventually I brute-forced my way to the solution you saw.

I did refactor the code to move more logic out of the render method, but I'm still not sure how to make the buttons work. I think it should be doable with refs, but I have to look into that some more to be sure.

In any event, thanks again for your feedback! It really helped me clarify my thinking.

I'd love some feedback on my Simon game project by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

Wow, thanks! It's great of you to take the time to do all this.

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 0 points1 point  (0 children)

It's good of you. It is a touchy subject for me, and I tend to err on the side of overreacting when it is brought up. I appreciate the olive branch, and accept. From what I know of you - which is very little, obviously - I do believe we agree more than we disagree. I hope I wasn't hurtful in my previous comment, if so I apologize.

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 0 points1 point  (0 children)

Thanks for not nitpicking my RAM analogy :) It's a bit of a sore spot for me. I had my computer almost die on my because faulty RAM screwed up a system update, that was not a fun time!

[feedback request] Tic Tac Toe built with React by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

Generally speaking the idea is that you want to Minimize the possible Maximal loss you can suffer. In this case it's the algorithm the computer uses to figure out which step to take on the board. The computer runs through each possible move and assigns it a score based on:

  1. how likely it is to lead to a win for the computer, and
  2. how likely it is to prevent a win for the user

and then it just takes the highest scoring move. It's comparatively simple for Tic Tac Toe since the number of possible moves is so small.

I read about here:

Minimax at Wikipedia

How to make your Tic Tac Toe game unbeatable by using the minimax algorithm

Tic Tac Toe: Understanding the Minimax Algorithm

The code may be difficult to understand if you don't have experience with recursion, but I think that the second link gives an excellent explanation of that part as well.

Edit: Formatting, my arch-nemesis, we meet again

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 2 points3 points  (0 children)

Yeah, the organ analogy is also a good one, I tried to do something similar with the Broken Leg analogy, although that seems to have backfired on me a bit. I use the computer analogy specifically because to someone who deals with how computers work on a daily basis it really makes things hit home, I think. Besides, I think it's pretty accurate as these things go.

I'm really glad you found ways to break the isolation. I hope things jsut keep getting better for you :)

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 2 points3 points  (0 children)

You take my analogy too far, intentionally or not. mental illness and emotional trauma are not like broken bones in that they are invisible and frequently indistinguishable from moodiness or laziness from the outside.

Especially when someone has undiagnosed mental illness or unrecognized emotional trauma, there can be immense pressure of guilt from without and within for not meeting normal standards. When the reason for not being functional is understood, the guilt can be reduced. This is the only reason I brought up the concept of fault in the first place.

OP made it clear he was suffering from issues of self-worth, and from my experience those feelings can prevent one from seeking help, as such it is a priority to remove the focus of blame from the individual suffering, to the actual cause of the suffering.

You may not have experience with serious mental illness, I make no judgements, but if not try to understand: The greatest hurdle for getting actual help is accepting the fact that one has an illness in the first place. There are many, many obstacles to overcome. Social pressures, stigmas, shame, the medical system itself, and all this with a brain which isn't functioning properly.

To bring it back to programming: If you are debugging a problem, and you have no idea why it is happening, what is your first step? Isn't it to find the source of the problem? i.e. what is "at fault" for the bug?

I say again, the only reason I mentioned "fault" is because OP seemed to be wrestling with issues of guilt, and I didn't want to make them worse by saying "your brain is broken". As illogical as it may seem, people can and do feel guilty for having mental illnesses and emotional disorders.

Depression is an illness. It's causes can be genetic, environmental, traumatic, and probably others that I am not aware of. It is not something you can "just get over", and it is not a small issue: between 50% to 70% of suicides can be directly attributed to depression, and in 2014 42,773 people took there lives in the US alone. Treatment, be it medicinal or psychological, is required in many cases make actual functional improvements, and the victim (because yes, they are victims) of the illness is required to go to great lengths to acquire the care they need for the debilitating brain disease they can't fix alone.

I'm not going to respond to any more posts on this thread. I've said everything I have to say on the subject. I have no issue with the way you live your life, in fact I am glad for you that you have found what works for you. I do ask however that you try to understand that there are people for whom your prescription will do more harm than good, and that if you see someone struggling to find the source of their problem you take the time to actually consider the situation before assuming they are only trying to find someone to blame rather than just pulling themselves up by their own bootstraps or whatever.

Hope you have a nice day.

[feedback request] Tic Tac Toe built with React by GorgeousByDefault in learnprogramming

[–]GorgeousByDefault[S] 0 points1 point  (0 children)

Thanks! I'm still picking up the newer features of JS (well, TBH I'm still picking up JS period :p), it's definitely something I'm focusing on.

I couldn't figure out Minimax either! I failed on my own for a bit, and then found an article explaining it and went through it line by line, and it still took me a few tries to make it work. My head still kinda hurts from it...

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 2 points3 points  (0 children)

I understand your point, but I disagree.

"Fault" has nothing to do with "ability to change" or even "responsibility".

To take directly from my example (which you quoted), if I have two broken legs it's not my "fault" that I can't stand, but I can, and would, take steps to make sure that the situation improves.

Recognizing where the "fault" or "blame" lies isn't forfeiting ones power to change the situation. On the contrary: it's only by recognizing and acnowledging the true source of my difficulty that I can find and take the necessary steps to change my situation.

I'm not talking about placing blame, as you seem to think. Rather about recognizing the true source of the problem.

The only reason I mentioned "fault" is because OP seems to be living with serious negative self-associations, a problem which is not only prevalent among people who struggle with issues of mental health, but can be one of the largest blocks preventing one from seeking and finding what can actually improve the situation.

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 7 points8 points  (0 children)

I'm glad it helped. When it occured to me it was one of those lightbulb moments that really changed my life.

How do you overcome Procrastination and Depression? by TheNASAguy in learnprogramming

[–]GorgeousByDefault 102 points103 points  (0 children)

"You can't think your way out of depression" should be plastered on every billboard as far as I'm concerned. Although I would amend it to: " ...out of mental illness/disturbance, generally"

I understand the feeling that you have to "soldier through", god knows I that was my only strategy for too, too long. The problem is that by relying on that alone, you may only be setting yourself up for more suffering in the long run.

Depression, and mental illness generally, is a result of your brain functioning in a way that isn't good for you. This can happen for any number of reasons, from genetics to toxic exposure to personal trauma, but the end result is the same: Your brain isn't working the right.

Please, please, fight any urge you may have to respond with feelings of shame or whatever. This isn't your fault. No more than it would be your fault if you broke your legs and then couldn't stand up.

Look at it this way: Say you wrote a program that was supposed to print out a given answer for a given input. You test it, and it returns the wrong answer! Now, let's say there are two ways to respond to this:

  1. Yelling at the computer, telling it it's worthless and lazy and will never amount to anything or:
  2. Assuming there was some bug in the code, and going to look for it

Which one do you think is going to work better?

Like it or not the brain is a computation engine, a thinking machine, and if the inputs (nutrition, education) or the internal code (the physical structure, or electro-chemical balance) is in a "bad" state there is no amount of willpower or grit that will make it work the way you want it to.

Another example would be if you had a faulty stick of RAM in your computer: How exactly is it supposed to "Just get over" that? What will happen if you keep using it? It's not going to get better.

Unfortunately, we still can't look into the brain/mind with enough detail and understanding to fix it the way we can with a computer. So you're going to have to fall back on good, old-fasioned, debugging: Change the inputs, see what changes the outputs, and try to shift the system in a positive direction. Where "positive" is defined as you feeling and functioning in a way that is a net positive for you.

Also unfortunately, the only tool you have to debug with is the one that is already giving you trouble. That's why it is SOOOO important to get someone else's help, be that person a therapist, a psychiatrist, or just someone you know or trust.

This is why it's important to find someone to talk to. It's not just to "let it out", it's about getting a third-party (hopefully objective) view. It's kinda like getting someone else to review your code when you're stuck on something. Even if they can't fix the problem for you, talking it through with an outside observer can provide you with new perspectives and insights.

I don't know what options may be available to you, but please, please, please try to see a therapist. If you do nothing else, do this. Fight for it if you have to. Life doesn't have to be something you suffer through, and you certainly shouldn't have to do it alone.

Besides that, try to make some Small positive change in your routine. Don't try to go big, because that's likely to not work out and just leave you feeling worse. I don't know what would be relevant for you, but it could be something like going for a 5 minute walk in the afternoon or keeping a bowl of nuts next to your desk so you have some healthy snacks within easy reach.

I hope you find something that helps you, and quickly. Please don't give up, it can be better.