If you do have an emergency fund: don't ask on Hacker News, they'll tell you to do crazy stuff like buy Bitcoin. Head over to http://bogleheads.org/, or just read the extensive wiki.
What rings out for me, is why do you only have 1k to invest? There could be a lot of reasons ranging from living in a low income country to having been recently divorced.
How old are you? What is the ultimate purpose of the money? Is it for retirement in 40 years time, or to buy a car next year?
Are you likely to have more $1k's in the future to invest. Is it cash in the bank or coming from your salary this year.
What country do you live in. What is your tax bracket?
Can developing your skills earn you more money?
Do you have debt? Is is tax deductible? High interest?
Do you like to gamble on a long term payout (maybe a cryptocurrency would be good) or would you really HATE losing that money at any cost (perhaps a savings account).
Etc.
As a general recommendation, if you don't know what to do with $1k - keep it in a savings account (or offset your mortgage if you have one) until you know what to do.
Use that money to buy hosting, domains, etc. for side projects. Try to build something that makes money, but don’t worry too much about that. Just having the administrative structure ready will make it much easier for you to find productive ways to spend free time. That could mean freelancing or building side projects. The important thing is that once you’ve got the LLC you can just focus on code, and you have a legal umbrella under which you can release any new projects you decide to build.
I wouldn't spend on an LLC or domains before he has to.
I do agree investing on trying to build something, but there are a lot of free resources before having to spend money.
Once you evaluate your current situation, which some of these questions others have asked or alluded too, the general strategy for how to optimize savings is pretty easy. Everything else is just how much risk you're willing to incur for potentially greater returns.
If you don't have a emergency savings account I fully agree with itamarst below and invest in a emergency savings account.
If you already have a emergency savings account I personally would use it to either:
1) Invest in myself (e.g. materials for self study, like a Pluralsight account)
2) Invest in goods which improve my quality of life (e.g. a new development box, kitchen peripherals, whatever), or:
3) Invest in bricks (e.g. my house)
So you might as well put it into a high risk investment.
1) Buy books about programming / machine learning / etc and read them. Add some online courses to get some practical knowledge.
2) Flight ticket & hotel to go to some interesting tech conference and do some networking (this can lead to opportunities later).
3) You could also buy some new hardware for development, if your current gear is getting old and clunky. This also is good long term investment.
Easily one of the best investments you can make in your technical education and continuous learning.
It will also help you with leveling up so you can make one of those products/services other commenters have mentioned.
IMO that money is far better spent in a way that allows you to develop skills in areas you're passionate about while making money.
That, right there, is just one problem with Bitcoin, and it's a big one.
https://www.bloomberg.com/news/articles/2017-12-08/the-bitco...
https://www.theguardian.com/global-development/2017/jan/16/w...