
Ask HN: Which language(s) should I learn to do one-man projects and earn money? - behnamoh
1) No CS&#x2F;programming background, but interested in <i>functional</i> programming (clojure, Haskell, CL...)<p>2) I don&#x27;t intend to work for other startups&#x2F;companies, just want to build my own projects and monetize them.<p>3) I like iOS&#x2F;android programming, but I&#x27;d need to learn Swift+Java for both, and cross-platform solutions don&#x27;t seem alright.<p>4) I also like web-apps, but I hate JS, and frankly, don&#x27;t like any imperative lang for backend (python, ruby, ...)<p>?) Besides web and mobile dev, is there any other field where I can do solo? (of course, w&#x2F; money)
======
djfm
Personally I use JS extensively for these kind of things. I hate JS the way
most people use it, but JS is actually a crazy powerful functional programming
language in disguise. And you can use it on server or client almost
transparently. I mostly use only a subset of JS myself: I write const fat
arrows that either return functions or immutable objects. No or very little
state. I don't use "this". I use react + redux on the front-end. I maybe use 4
different language constructs total, both on the server and on the client, and
my life as a programmer has become very peaceful, I can focus on delivering
features. The nice thing about JS is, like the language or not, the tooling
and ecosystem are awesome. For one man projects you can really make the
language your own and achieve crazy productivity. YMMV.

Here's an example of what I mean, a Promises/A+ implementation in less than
100 LOC - just for the fun of it:
[https://github.com/djfm/promesse/blob/master/lib/promise.js](https://github.com/djfm/promesse/blob/master/lib/promise.js)

I think it kinda feels like Haskell, yet browsers understand it :)

~~~
namuol
It's hard to compare JS to Haskell without mentioning the JS's complete lack
of a type system...

That said, if you want something more ML-like in your JS, Flow is an
increasingly-viable option: [https://flowtype.org/](https://flowtype.org/)

~~~
djfm
Yeah, I've been experimenting with it for a few days and I find it very
promising. But the lack of types in JS is not such a pain point IMHO. In JS
you can define a monad that works only with numbers, which is sometimes
useful, and which you cannot do in Haskell without black magic. I think Flow's
idea is that most JS programs are actually naturally well typed, and it often
verifies in practice. Just because you don't have a compiler yelling at you
doesn't mean your program is not well typed :)

~~~
tome
> In JS you can define a monad that works only with numbers, which is
> sometimes useful, and which you cannot do in Haskell without black magic.

What does this mysterious assertion mean?

------
WheelsAtLarge
You're making things too difficult.

You are looking for the one right answer. No such thing. Whichever you pick
will have its short comings.

Remember programming languages are tools, they exist because they fill a need.

Also you have a lot of points here. Get started with one, then move on to the
others.

You said you are interested in functional. Pick one. The easy way is to pick
the most popular. Do a google search. Pick the most popular one, at least
you'll be able to ask for help and have someone that's been in a similar
situation.

For mobile, what do you have available? Pick that platform. iOS takes a bit
more money. If you have both pick the one you use the most. I hear iOS brings
in the most money but unless you have a great idea it's hard to standout from
the millions of apps.

For web, look at what's popular so you'll have help when needed. People will
tell you to use this or that but once you get started and have a few projects
you'll understand what's best for you.

You can ask and ask but you will never know until you get going. Define a
project, pick what language you find interesting at random and focus on only
that until you finish a project.

You'll find out what you like and dislike and you'll be able to pick what
language is best for you.

~~~
behnamoh
Those are really good points, thanks!

I'll try to just get going and pick a lang for that. Web-dev intimidates me,
cause I should know HTML/CSS+JS for front-end, and
SQL+{ruby|python|clojure|haskell|php|...} for back-end. That's why I was
thinking about going w/ sth like clojure/ruby, cause that takes care of front-
end as well. But what do I know?

~~~
2AF3
Take a look at hackathon starter kit, you can do javascript in the front and
backend, I haven't used it but I think it looks interesting.
[https://github.com/sahat/hackathon-
starter](https://github.com/sahat/hackathon-starter)

------
cocktailpeanuts
Dude this is basically saying "I want to build something, but I hate
programming".

If you don't want to learn js, then forget about web programming.

If you don't want to learn any of swift or java, then forget about mobile
programming.

If you don't want to learn java/python/ruby, then forget about server
programming.

That leaves you with nothing, maybe learn some MS excel to become an
accountant? That qualifies as one man project that will earn you money.

~~~
mhluongo
Obviously OP is too picky, but there are plenty of server-side and client-side
options that fit the requirements. Eg Clojure / Clojurescript, Haskell, Scala,
Typescript

~~~
behnamoh
>Obviously OP is too picky...

Yes, unfortunately. I know it, but just can't help it. Maybe I'm an idealist,
or maybe just not that familiar w/ the programming world.

~~~
beachstartup
you sound like a fat person who is trying to get in shape but is extremely
picky about which 'routine' he wants to follow. he has a reason to hate each
one so, they're all not good enough for him. he's looking for the perfect
routine, man. one that will _guarantee_ success.

oh and also that annoying bit about eating right, well that sounds like a
pain, so let's not do that, either.

all this, while sitting on the couch, daydreaming of 6-pack abs. in reality,
all you have to do is walk around the damn block and you're 1/4 mile ahead of
where you were before.

~~~
oneloop
Oy, quit stealing my analogy!

------
coralreef
No disrespect, but why are you trying to optimize your choices so severely
before you've even learned anything? You seem to know 'about' programming, but
once you learn the fundamentals of programming, you can learn any language or
platform you want.

I think you should just choose whatever lets you build the project you want to
start today, forget trying to cross platform / future-proof your decision.

~~~
behnamoh
Thank you.

> why are you trying to optimize your choices so severely before you've even
> learned anything?

Maybe because I can't become a full-time developer, so choosing the right
language matters. I actually envy "real" programmers who have time to learn
more than just _one_ lang...

>I think you should just choose whatever lets you build the project you want
to start today...

I like mobile/web apps, but I don't seem to find any other field where I can
do on my own. Do you have any suggestions?

~~~
coralreef
Most developers learn in one major language first, then adding others as they
expand. Since you're looking to make money by selling software, you're
probably going to work on 1) a website or 2) a mobile app or 3) desktop app
(basically similar to a mobile app; compiled software probably distributed
through an app store).

Do you have an Android or an iPhone? Download the IDE for your respective
platform, get Hello World running on your phone. There, you're now a developer
:D. Next step, follow some tutorials. Don't paralyze yourself with these
decisions that seem important, they're really not.

~~~
behnamoh
Yeah, I think I have made this way too difficult for myself... I just wish I
could have all the good features of different languages altogether, but that's
not gonna happen, welcome to the world of programming.

I like Haskell and LISP for the challenge, but I wish I could do mobile/web
dev in them easily (like RoR).

I really appreciate your answers, I think I should just get going then, and
try to figure out the rest next.

~~~
mcbuilder
GHCJS and Purescript work with react.js and directly with the DOM. So there
are options on the client side as well if you wanted FP. You could also
consider learning clojure, and closurescript. A few backend teams I've met
retooling all their RoR code to Haskell. Sounds like you are on the right
track with your thinking, but with no CS background be sure to read books that
help you understand the pros and cons of different languages.

------
sixhobbits
1) _Some_ background is necessary for building and monetizing projects. Not
necessarily university education, but you're not just going to pick up a book
on CS and start monetizing projects that month. What's your time frame for
this?

2) "Just". This is not a trivial exercise. I recommend reading your way
through patio11's extensive writings on bootstrapping software companies if
you're serious about this

3) OK.

4) You can't really build web apps without JS, at least in some form. Which
part about web apps _do_ you like, if it's not JS or "python/ruby/...". This
is probably the easiest way to monetize software projects these days though,
so maybe reconsider. You can still do some pretty nifty things if you find a
niche market and put up a public facing CRUD application with a few lines of
Django/Ruby boilerplate.

?) I think all that's really left after your exclusions is to try pick up on
the dying markets like Wordpress/CMS development. This can be done through
plugins or managing entire sites for other people, or building your own
ecommerce business. For the latter, look into ready-made stuff like Magento.
This is really how people made money a few decades ago though -- I know a few
people who have tried recently and failed.

Last suggestion is to look at more business oriented stuff. VBA is still
exceptionally powerful in terms of integrating into tools (Excel) that non-
tech people use. A lot of managers etc spend an inordinate amount of time
doing repetitive work on spreadsheets -- you can save them hours every day
with a few lines of VBA dev. Not fun, but might be what you're looking for.

~~~
behnamoh
Good points!

About that VBA thing, I was actually thinking about automation. Bash, Python,
ruby, even JS, are really great for that. But then we have VBA. I guess most
things you can do with VBA in Excel, you can do with python as well.

I agree, I need some background building before jumping into programming. I
just figured maybe a good programming book will cover the necessary CS parts,
too. "Learning Python" is over 1500 pages, and really is intimidating.
"Haskell Programming" is also +1000 pages. Do you think picking up huge books
like these, will help me build the required background?

~~~
sixhobbits
Yes, everything you can do in VBA you can do in another language, and probably
more easily. But then you have to persuade the users to use your app - if
they're already comfortable with spreadsheets, VBA can make it easier to get
them using your product.

If you can work your way through an intro book, it'll be super beneficial!
Everything in either of those books will probably be useful at some point or
another. No way I'd be able to do that in your position though. Personally the
only way I can learn new technology is to have a goal that I find motivating
(often, 'build a system that can solve some pain point in my life') and then
identify the minimum useful step I can take towards that goal, and then mess
around with books, forums, documentation, etc until I've achieved that step.

------
DrNuke
Generally it works the other way round: you have an idea for making money and
need the best (or easiest) tool (or language) for execution. Starting from
nowhere, your best shot is learning to customise e-commerce templates and set
up stores online for you or for prospective clients.

------
tjholowaychuk
If you're just getting into things Elm might be a good bet for front-end.
Maybe you'll get fewer contract gigs but the current state of JS is a mess,
might as well skip it (for now at least).

------
hellwd
If you don't have any experience and programming background you should start
with C/C++ to learn basics, data structures, algorithms etc. Then you may
continue with C++ or move to different language - for example, C# or even F#
if you like functional. With C# you can write mobile apps for both platforms
using Xamarin. Please don't start with JS, actually try to avoid JS as much as
possible because that's not programming language - but that's my opinion.

~~~
tptacek
Yikes. Dis-recommend. I started my career in C, which was my first programming
language, back in the mid-90s. It's been advantageous for me in my particular
field (vulnerability researchers should know C), but I look back and wince
about all the energy and time I wasted shipping code in C and C++.

It's also, for this particular question, the family of programming languages
most hostile to functional programming.

ES5 JS is a clunky language, but people have built amazing things in it. ES6
JS is a credible language on its own terms. I wouldn't be wary of someone
saying "Javascript sucks" (I would mostly agree), but I would be wary of
someone who said "Javascript isn't a programming language".

~~~
hellwd
OK, as I said, that's my opinion but I also appreciate yours :)

------
PaulHoule
It's an awfully hard question to answer without some idea of what you are
trying to do to make money.

For instance you really can make web apps with very little Javascript and, for
many applications, this is the way to go.

For instance, if you take the "path less taken" and not load your site up with
15 MB of Javascript, tracking pixels, third-party scripts, another 100 MB of
junk from a CDN and instead move a minimal amount of data through http/2 you
can make a site that loads like a bullet being shot out of a gun on a
computer, phone, tablet, whatever.

This site

[https://legalentityidentifier.info/lei/get/5493000HEH4YCM7L6...](https://legalentityidentifier.info/lei/get/5493000HEH4YCM7L6N11)

has competitors that take 2 minutes to load the first page because the
developers throw in everything but the kitchen sink so they can pad their
resumes. It's hard to get people to see the difference, however, without
actually sending them to a competitor.

Frankly I think CDNs are a scam like DOIs. DNS lookups are one of the worst
things when it comes to long tail latency and if you hit enough servers the
odds approach 100% that the browser is going to freeze up for 15 sec during
loading because of a DNS hang.

------
RecursivBeeping
It depends a lot on your priorities between mastering a language/programming
and having a successful product/service (ie. making money). In any case you
should figure out first what you want to build as the choice of tools will
depend on it.

Also keep in mind that while functional programming may be fun, it may be
simpler and faster to just slap some php onto some random webhost (even more
so when validating an idea and getting feedback) :)

------
danielhooper
You will not find good answers to poor questions. You must first decide to
build a house, then pick up the hammer.

Build me an iPhone app, written in Swift, that will let me sell my recycling
(cans, bottles) to someone else so I don't have to drive to the recycling
centre to collect the refund.

If you research your market, your audience, and verify your idea through
testing and prototyping, you can get your business started without ever
writing a line of code.

------
namuol
If you want to build things with interfaces that users use, I implore you to
reconsider JavaScript. First of all, it's a powerful functional language
([https://www.youtube.com/watch?v=ya4UHuXNygM](https://www.youtube.com/watch?v=ya4UHuXNygM)).

React and Redux are heavily inspired by functional languages, and the two can
be used on the server-side as well (which, if you're serious about web
development, is going to be important).

With React Native ([https://facebook.github.io/react-
native/](https://facebook.github.io/react-native/)), sharing code becomes even
easier for mobile development without really sacrificing the quality of the
end-result (no more WebViews).

If you want JS to have a type-system, consider TypeScript
([https://www.typescriptlang.org/](https://www.typescriptlang.org/)), or if
you want a more powerful ML-like type-system consider using Flow
([https://flowtype.org/](https://flowtype.org/)).

------
dhruvkar
I can completely relate to this mindset.

I was once similarly minded in that I had read enough about programming to
know what was out there and what it was used for.

I then formed impressions about what was 'hard' and what was 'easy' and what I
would like. It took me ~2.5 years from the start of my desire to learn, to
actually write my first line of code. Picking a language, then picking a
learning methodology took me that long.

Then, 2 years of learning/programming on the side, I got my first paying gig
for writing code (I'm was never a full time software engineer, just learning
on the side, like you). This was 2 weeks ago.

Perhaps this is a common path, or we're a special breed. What helped me stay
motivated was trying to solve my own problems with code. First project was a
script that took data from a google spreadsheet and texted it to me at
relevant times. Took me 3-4 months to complete. Could write it in 3-4 hours
now.

Find a (small) problem, write code to solve it. Monetization will come, but
probably slower than you expect. Good luck.

~~~
behnamoh
Man, this is so like me!

I guess my concern is that I want to do quality work (with well-designed
languages) AND earn money for it. I'm beginning to realize that (sadly) it's
not really how things are done in the programming world. As long as you can
deliver a fancy web-app in short time, nobody cares if you have used JS or
ClojureScript.

~~~
dhruvkar
It's true no one cares for the most part. But clients do want maintainability,
so a more mainstream language makes your skill-set more attractive. Of course
I speak as a freelancer, not from a product perspective.

I picked Python, because:

1\. I thought I would give up if the language was too hard.

2\. I didn't know what I want to build eventually, and Python seemed to be
used everywhere.

Getting into the mindset of spotting problems, defining it's scope and writing
code to solve that SPECIFIC scope has been highly useful. It's also something
to continually improve at. Good places to start are complaints from
friends/family about commonly used software.

------
carapace
Elm. [http://elm-lang.org/](http://elm-lang.org/)

------
_nalply
Have a look at Meteor ([https://www.meteor.com/](https://www.meteor.com/)).

\- JavaScript is basically a functional programming language, too.

\- Meteor has Cordova integration for mobile development. However I never
tried out Cordova, so I can't say whether it's good or not.

\- Meteor _is_ JavaScript, but as others have pointed out, your list of
conditions doesn't make sense, so I ignored your fourth point. Or perhaps
program in CoffeeScript, TypeScript or a different language which Meteor can
compile to JavaScript.

\- For the last point, there's a lot you could do. Depends on your experience
of life. One example is emigrating to a country with low living costs and
provide your knowledge from there remotely. This way you can sell for a lower
price.

~~~
behnamoh
Hadn't heard of it before. Sure, will have a look at it. Thanks!

------
shepbook
Given you'd like to focus on functional languages and you'd also like to be
productive enough to build and monetize apps as an individual, you might like
and want to look into Elixir and Elm.

Elm is a nice functional frontend language that compiles to JS, which you'll
need for web apps.

Elixir is a very good and solid functional backend language that is good for
general purpose programming, as well as web app programming (via Phoenix) and
embedded (via Nerves).

Both of those languages are functional and focused on developer productivity
and have some very good tooling around them.

~~~
behnamoh
Thanks. I had just heard their names before, but now I'm thinking maybe the
combination of Elm+Elixir would suit my needs. Some other people have also
suggested Elm here, didn't know why.

------
jdonaldson
I use Haxe for a lot of side projects. [http://haxe.org/](http://haxe.org/)
It's a cross-compiling language, so it can output javascript, java, python,
c#, c++, php, and lua. It covers every platform I'm currently interested in
working with.

There's communities within Haxe that focus on things like game development for
iOs/Android, or react-style web programming.

You can't expect Haxe to completely smooth out all of a given target's
problems and quirks, so expect to sort out some target specific quirks if
you're really trying to push performance (e.g. mobile gaming). However, having
most of the core business logic in one language is incredibly gratifying. And,
unless you're using Scala or Haskell, I bet Haxe ends up being the most
expressive and powerful language that you use day to day.

------
Scarbutt
Even if you hate it, the most pragmatic choice would be Javascript, it covers
the browser, the server and mobile apps but you should spend at least one
semester doing an introductory programming course, there are great courses
online.

------
cylinder
How are you planning to make money? Making money building things on your own
has very little to do with which language you use. It sounds like you're just
stalling.

~~~
behnamoh
I think language of choice decides how I can earn money, see:

Swift -> iOS

Java -> android

JS HTML CSS -> Front-end

RoR SQL -> Back-end

C# -> Desktop software

...

------
highCs
Personally I pick clojure by default. Clojure is a wonderful LISP that runs on
the JVM which means there is all the libraries you need.

If I can't pick clojure, I gonna pick C because C works everywhere too and has
all the libraries you need too. C is not functional but it is imperative and
pretty damn simple.

------
simonpure
I'd start with what you already know. Depending on the project, different
languages will be a better fit.

If you are just starting out and are focusing on web development, I'd
recommend JavaScript since all you need to get going is a browser and a text
editor.

~~~
behnamoh
I hear all this hype about clojure/haskell being a better fit for web apps.
Esp. ClojureScript which compiles to JS.

Is it _sane_ to ditch JS (and node.js, angular.js, bootstrap.js, ...) and go
with clojure? (maybe even ruby?)

~~~
kudokatz
If you want webapps, it's good to understand Javascript. I __love __clojure to
death so much I write it in my spare time as a developer working on other
stuff. But the reality is that its surrounding community is tiny, and that
makes the hurdles faced when starting much, much larger.

Clojure/clojurescript will get you a single language on front-end and back-
end, but I think that from a monetization standpoint you __really __want a
Javascript front-end and Java or Ruby back-end.

Keep in mind that if you use "more standard" technologies, you'll also have a
more likely chance of cashing out on whatever you build if you decide to sell
because the buyer will be able to hire people to fix it. If you choose
something obscure without a developed community, any price offered to you will
be much, much lower or even just never come.

I'd personally skip the node.js hype for now.

~~~
Scarbutt
Agree with everything you said about Clojure[script], but isn't nodejs past
the hype already? sure, articles are written for it everyday but is a
technology that is used heavily in the industry, that has a large community
and library ecosystem.

~~~
kudokatz
It's true I haven't used NodeJS for actual projects, but writing entire apps
in Javascript where other languages are available does not appeal to my
personal aesthetics or technical sense on many levels. Simple namespacing in
JS is a burden. A lot (not all) of what I hear about NodeJS being a great tool
is from people that both accept callback hell as a way-of-life, and who
decline to understand anything past the headlines of great performance.

Guess how that great performance comes about - C++ and non-blocking I/O!
There's also the aspect of the community that makes packages for single
functions and can't develop a useable package manager (last time I checked).
I'm not against it as pure infrastructure for running clojurescript, though
=P.

------
carsongross
Ruby, rails and intercoolerjs is the best combo for what you are looking for.

It will still be a logic work.

------
reitanqild
What is your previous programming experience?

~~~
behnamoh
Just a couple of courses on C++ in college. Although I did work with MATLAB
for my projects, if that counts.

~~~
reitanqild
Brutally honest: Well if you need money and hope to earn them by programming:
go for something with low barrier of entry and high demand.

That used to be PHP + Javascript. You should still be prepared to put in some
work in personal projects etc to convice people that you know what you claim.

If you have all time in the world and want to be perfectly positioned for some
perfect future opportunity, I don't know, I have no idea.

Personally however, if I am the one to hire in the future I'll try to go with
people who get stuff done.

------
bikamonki
How can you hate JS if you have zero programming experience? Try it first.

~~~
djfm
Maybe the OP saw some code samples involving jQuery

------
parasitid
then scheme is made for you. learn racket-lang.org and give a try to
"lambdanative.org" to build native mobile apps.

------
Learn2win
Elm, JavaScript Swift, Java Python

------
alexcweiner
Do it in APL

------
softwarerero
English?

