My first main language was Java.  However, over the years I've dropped Java in favor for Python, JavaScript, bash, etc.  I still have advanced reading knowledge of Java, but since I haven't coded in it for so long, my writing knowledge is intermediate at most.  The other day, while looking at some old code written in Java, I got inspiration to re-write it as a learning experience to reacquaint myself.It was at that point that I stopped to think that if I wrote this in Java, it would be nice, but when the renewed inspiration had hit me, I wanted to implement it as a web app (it was a game), so other people could play it.So now here's the dilemma: Do I re-write (and heavily refactor) the code I've previously written in Java, and then in JavaScript (for the web version), or do I just forget about Java altogether and re-write it in JavaScript?EDIT: I have no problem writing in Java first and then JavaScript, but I'm more likely than not going to need Java anymore for a long while.  What I'm trying to ask is whether or not I should rewrite the old code in Java first, to practice a skill I may not need in the future.  The actual languages are less important than that question.
When you won't need a language anymore, should you still use it?
programming languages;design;education
Consider your end result - an online game, written in JavaScript.As such, by all means, take inspiration from your old codebase and plan ahead.The way I would approach this would be to figure out what refactoring I would do and use both the old codebase and the refactoring plan as a blueprint for a new codebase using JavaScript.My point is that if you are going to refactor to Java, then directly port to JavaScript, you will hit problems when porting from Java to JavaScript (idioms, how the different environmentw work, assumptions not relevant to Java etc...). Ditching the intermediary step you know that the JavaScript will not be a direct port and will be already ahead in regards to issues with a direct port.Since this is a personal project designed for your enjoyment, you should aim for that - you don't have to refactor the whole codebase. If you start and feel that it is not constructive to your goals (rekindling the fun in programming), stop and go ahead with the re-write in JavaScript, without having done a whole lot of work that you find tedious.