# Becoming better

Page 1 of 1

## 13 Replies - 1529 Views - Last Post: 25 March 2019 - 02:18 AM

### #1 [email protected]

Reputation: 2
• Posts: 146
• Joined: 24-February 15

# Becoming better

Posted 17 March 2019 - 03:38 PM

I tried to rotate a cube towards my mouse, I couldn't come up with the solution. I searched it up and found an code , I copy paste it and it worked the way I wanted.

I looked at the code and it made sens.
- store object
- store direction of mouse
- calculate angle
- use the variables to rotate object

And I'm thinking why didn't I came up with this?

My question is, what do I miss to make my programming better?
From an previous post months ago, I got answers on my problem solving question. Chuck down the bigger problem into smaller ones and solve that. I try to write pseuedo code first but then when I need to write down the code I feel stuck.

Do I miss syntax, logical thinking?

Is This A Good Question/Topic? 0

## Replies To: Becoming better

### #2 Skydiver

• Code herder

Reputation: 6817
• Posts: 23,194
• Joined: 05-May 12

## Re: Becoming better

Posted 17 March 2019 - 04:51 PM

POPULAR

Very likely you were missing the mathematical background to be able to make the mental leap from "if I know the position of the mouse and position of the object, I can compute the angular distance, and then perform the slerp operation to rotate the object across that angular distance". I have the same issue as well since I pretty much stopped at high school geometry and only taught myself the basics of 3D world space to 2D screen transforms without any formal education or guided learning plan. College calculus classes didn't really make much sense to me. It was doing a certificate program for Game Development which put what I had taught myself into the right perspective.

Anyway, if you are learning on your own I wish I could recommend a good book. One of the early editions of "Mathematics and Physics for Programmers" was a good enough book for me to learn from later in my life. I wish I had it when I was teaching myself originally. But if you look at the current reviews for that book, it looks like current editions are middling at best.

### #3 jon.kiparsky

• Beginner

Reputation: 11450
• Posts: 19,521
• Joined: 19-March 11

## Re: Becoming better

Posted 17 March 2019 - 05:52 PM

Definitely worth drilling down into the math if you're interested in implementing stuff like image rotation. Frankly, I would struggle a bit with this myself.

On the other hand, if what you're interested in is becoming a better programmer and a better software engineer, I might suggest you start with problems that would be more accessible to you. I've been amused by the problems on adventofcode.com - they're presented as a Christmas-themed problem set, but the problems are good all year 'round. You can go back to the first problems if you like: https://adventofcode.com/2015/day/1 and work your way forward until you feel like you're getting stuck. Then maybe jump forward to 2016 and do the same, and so forth up to 2018. That should give you plenty of practice with this sort of problem. Once you're stuck you'll probably have some good topics to drill into here.

### #4 MentalFloss

• .

Reputation: 619
• Posts: 1,590
• Joined: 02-September 09

## Re: Becoming better

Posted 17 March 2019 - 08:43 PM

You might want to spend a week (or more) on this material:

https://webglfundame...d-matrices.html
http://www.opengl-tu...ial-3-matrices/

You will, of course, want to delve into the computations as well.

### #5 [email protected]

Reputation: 2
• Posts: 146
• Joined: 24-February 15

## Re: Becoming better

Posted 18 March 2019 - 03:34 AM

I guess it's either learning this or be a copy-paste programmer forever. What do you guys think about learning math through udemy?

### #6 jon.kiparsky

• Beginner

Reputation: 11450
• Posts: 19,521
• Joined: 19-March 11

## Re: Becoming better

Posted 18 March 2019 - 06:49 AM

If udemy works for you, go for it. There were at one point some good courses on coursera, MIT has made some useful content available through OpenCourseware - there's lots of options. My inclination would be to look for courses that are based on actual university classes, preferably taught by actual professors, but that's just me.

You might also consider taking math classes through your local community college or state college. You can usually figure out a way to sneak in and steal the education you need, if you don't care too much about getting credits for it (and if you're talking about udemy, you don't care about getting credits). Hell, you might even pay a few bones to be an actual student, and get the benefit of someone reading your work and correcting it.

### #7 Martyr2

• Programming Theoretician

Reputation: 5369
• Posts: 14,283
• Joined: 18-April 07

## Re: Becoming better

Posted 18 March 2019 - 09:48 AM

One thing that goes often overlooked in computer programming is that you can't just be a computer programmer. You have to know a bit of other disciplines too. Sometimes it is math, as in your case for this project, but it may be another science field, social work, humanities or something completely different. Programmers are in the business of solving problems. Those problems are usually in another domain. I have worked as a programmer in the travel industry, communications and now in a software company doing physics work.

Ultimately you get better by learning, experimenting and building experience. Just know that no matter how experienced you are you are going to always need to learn something new, not just about our field but also about other's fields if you wish to be a good well rounded programmer.

I thought I would mention this for anyone in the future who stumbles across such a post. There are a lot of people, including myself a few times, always looking for that singular answer of how to be the best programmer in the world. It just doesn't exist. Instead you have great programmers in all sorts of disciplines.

### #8 [email protected]

Reputation: 2
• Posts: 146
• Joined: 24-February 15

## Re: Becoming better

Posted 18 March 2019 - 10:30 AM

I wanted to follow this math course on udemy: https://www.udemy.co...es_mathematics/

It is specialiest in helping you understand math for computer games better. I can bet you can bring this knowledge with you in other fields to.
I just notice that making a complete game is a little spicy as an beginner specially with zero math understanding.

That's why I will work on my html, css, javascript in freecodecamp so I can atleast take some projects from companies to earn something and take making games at something aside.

I could go to college but I just have a bad feeling about it, dropouts, debt, alot of your time and finally you hear, if you want to be good in programming you need to code at home, well that's what I'm trying now.

This post has been edited by [email protected]: 18 March 2019 - 10:31 AM

### #9 ge∅

• D.I.C Lover

Reputation: 194
• Posts: 1,194
• Joined: 21-November 13

## Re: Becoming better

Posted 20 March 2019 - 06:43 AM

I found this book extremely helpful (have a look at the table of contents, it's awesome). I am far from having digested everything and there may be better alternatives but it has been a tremendous help. It is clearly targeted at beginners. I find that some chapters are more obscure / rushed than others, but it could be because I haven't read it all yet and I didn't read everything in the right order. The book is expensive but you can find the PDF online for free (be sure to look for the second edition). I personally like to have both.

I'll check what you guys have shared. I am not fit for classroom learning, I easily get stuck on things, even when they are not relevant to the topic, and am easily left behind as a result, so I value this kind of material immensely.

### #10 endoffice

Reputation: 0
• Posts: 12
• Joined: 10-March 19

## Re: Becoming better

Posted 20 March 2019 - 07:38 AM

Definitely running through practice problems and lectures online will give you a solid foundation on which to develop the more nuanced elements of programming. In your case you definitely should pick up a book on mathematics and programming in your preferred language. From what you are describing it seems like multivariate calculus would be a good aim but to get a good grasp of that you must do the equivalent of Calc I as taught in universities (Calc II would be useful but not absolutely necessary). For learning mathematical principles it would probably be best to learn the concepts in specifically a mathematics textbook that will probably have better explanations. For calculus I used Briggs/Cochran/Gillett. If you want to find books use libgen.io careful of malware...

### #11 jon.kiparsky

• Beginner

Reputation: 11450
• Posts: 19,521
• Joined: 19-March 11

## Re: Becoming better

Posted 20 March 2019 - 07:54 AM

The most important thing about learning math is that you have to do math. It's like programming - you can read books and listen to lectures and watch videos all day, but until you put it to work and get your little grey cells rubbing together none of that means anything.

### #12 Sheepings

• Senior Programmer

Reputation: 209
• Posts: 1,182
• Joined: 05-December 13

## Re: Becoming better

Posted 24 March 2019 - 03:49 PM

[email protected], on 17 March 2019 - 10:38 PM, said:

My question is, what do I miss to make my programming better?
From an previous post months ago, I got answers on my problem solving question. Chuck down the bigger problem into smaller ones and solve that. I try to write pseuedo code first but then when I need to write down the code I feel stuck.

Only with time will you gain experience, and only with experience will you perceive the logic and knowledge you lacked before. (It kinda comes naturally to you.) Yet, the whole thing actually is a learning curve...

I also think you need to find a language that affects the way you think about writing code. Kinda like what ~ Alan J. Perlis says in my signature. I personally think the language you write code in; needs to intrigue you, condition your thought patterns logically, creatively and if they don't, you're writing code in a language that doesn't fascinate you enough to flare your creative side.

I think the language you are writing in; has a lot to do with whether your creativity will expand or not. Next time you find yourself in that same predicament. Try to perform the same challenge in a different language, and I am sure you will think up a pattern, construct it, and write it effortlessly.

### #13 Skydiver

• Code herder

Reputation: 6817
• Posts: 23,194
• Joined: 05-May 12

## Re: Becoming better

Posted 24 March 2019 - 06:48 PM

Good recommendation about language choices. I agree that our minds tend to pick certain languages that are the most expressive for us. Use that language while you are "doodling" to try to explore your ideas or verify things. Then, if needed, translate to your specific language where you actually need the final implementation to be in. Also be aware that sometimes you end up straddling two or three languages. For example, I tend to do analysis and breaking down of problems in C#, but when I'm trying to explore efficiency (or need to see fine grained steps that C# would have obscured or taken care of for me), I would use C++. I have a co-worker who tends to think naturally in VB. Once she has worked out all the details, she'll translate to PowerShell which (for better or worse) is the lingua franca of my team because of the primary type of work our team does.

### #14 [email protected]

Reputation: 2
• Posts: 146
• Joined: 24-February 15

## Re: Becoming better

Posted 25 March 2019 - 02:18 AM

I think I will continue with python, finished this 4-hour crash course. Python made by a Dutchman made to be easy to understand and write.