I agree with jlrdw, For me ( ~18 years PHP, 14 of which at different companies), the "developers mindset" is mostly about different problems to solve, and most of the businesses out there are tackling the same problems, so there's a lot of repetition going on.
But to jump to 3 of your statements:
- I want to advance in, especially JavaScript and PHP.
- All is well if I have to edit someones existing code .... but once I have to start from scratch my mind goes completely blank and I can't think of solutions to create something new
- I'm frustrated and it keeps me awake at night.
First of all, it sounds crap but try not to lose any sleep over this, it only shows you're passionate about this, and that is what makes a person succeed.
After you have learned the basics of any language, most programming is only about problem solving in an efficient way (and ofcourse trying to find out what the client actualy wants).
Expanding these problem solving capabilities however will only happen by repetition and being confronted with a wide degree of problems.
Not knowing what to program for practise can be quite annoying, because the thing is you have to think outside of your own box, or get a client to ask you for something you know nothing about (something you dont have as a beginner).
Since I have no idea about your current level (I'm guessing mid junior - low medior ?), I will start small and work up quickly:
- Start with something really small: a guestbook or categorized blog ( in TDD )
- Include comment functionality, first basic HTML + Bootstrap, than again with Vue, than Angular, than React, find out which one you like and why and really read into it's documentation: life cycle, functionality, pitfalls etc.
- Extend the comments to have infinite reply capabilities
- Extend what you created into a small CMS (add functionality for news / static pages / image galleries).
- Now refactor this into a modular cms, this time according to PSR coding standards
- If you didn't yet, start including Pusher or even better, create a small nodeJS server for handling the websocket connections between your users: give them a chatbox or instant DOM updates on server changes
- Create a set of multiplayer games in your now favorite javascript framework for your users to play
This is basically how I learned it in the beginning (without the new technologies ofcourse) and it kept me busy and entertaind while still feeling like I could solve that next step.
By creating a lot of small 'modules', you will quickly find the repetition, you will have refactored most of what you have once written, rebuild some modules into something more dynamic and kept looking at your own code while you were also learning to improve your problem solving skills.
As far as resources go:
Code kata's are still something I enjoy: I'll tell myself to create a simple new game class: TicTacToe, HangMan, Checkers , Chess or something.
You never know what triggers the next Eureka moment ;)
Eventually the 'creative part' of what to build gets easier and easier, mostly because you've seen it all already.
If you need some different tips about what kind of project to test your skills on, let me know a bit more about your current experience (what type of applications have you worked on, which direction would you like to go with programming etc.) and I'll be more than happy to help.
- Sorry for the long rant all, just really liked this question