
Ask HN: Is there a way I can learn programming within 4 months? - kidos
Hi everyone, I’m steph, I’m a graduate from Cairo university with a degree in business relation. I’d like to ask if it’s possible for me to learn programming from scratch. I begin taking interests in techs particularly software and web development because i believe i can really do well by applying my own business statistics knowledge to create something meaningful and positive to the entire business realm. I’ve started reading some online guides to web development and i can say I’m loving it so far and grabbing one or two things. So i was thinking if it’s really possible for me to do this within a very short period of time.
======
pdpi
If you asked "Can I learn english within 4 months?", I'd have very different
answers for you if you meant "can I learn to read articles on
simple.wikipedia.org?" or "can I learn to write to Shakespearean standards?"

Programming is much the same. Yes, you absolutely can learn programming in 4
months, but you'll still be learning 20 years from now (25 years and counting
for me). An important distinction is that, with a few months of practice,
you'll probably know how the major constructs work as well as I (or anyone
else here) do, but you probably won't have the particular sort of mental
agility that lets you piece those constructs together fluently — that takes
longer. Being able to map from problem to solution will take longer still.

Also, going back to the "learning english" metaphor, knowing english doesn't
mean you know the technical vocabulary around sailing, or around
mountaineering. Each of those is a separate sub-skill that needs its own
practice. Likewise, knowing elementary programming doesn't mean you have the
domain knowledge you need for graphics programming, or web dev, or whatever
else.

~~~
mikaelmello
This is a great analogy that hadn't ever crossed my mind, will certainly use
in the future when giving this sort of advice!

------
ht_th
Just like you might learn to play the guitar in 4 months.

Depending on your goal, in 4 months you can become a novice programmer who
could be hired by a company to grow into a junior position.*

You could spend the same amount of time to solve a problem that is meaningful
to you and in doing so try to learn all the programming you need to know. It
would be helpful to have a mentor of sorts, though. This approach is often
taken by domain experts who have a problem, but are unable to get a solution
due to bureaucracy, lack of funds, or there just is no suitable solution yet.
The resulting programs might not be the best, from a programming point of
view, but the value added is often very high.

* It is actually not quite clear what a junior programmer is or should be able to do. This depends on the expectations of the organization as well as their willingness to train good people. Usually organizations are looking for people who know enough to be productive fast without too much supervision, whereas novice programmers often need more one-on-one attention than organizations are willing to invest. As a result, novices are thrown in the deep end of the pool and those who can swim to the other end of the pool during their probation period are kept, the others are left to drown.

------
fuzz4lyfe
My suspicion is that most people asking questions of this nature will be
unsuccessful. If the answer you receive is "No, it will take a year" and you
would decide not to do it, you probably wont have the desire to push through
the first few big hurdles you will likely encounter.

~~~
e-clinton
I disagree. I think what they’d need is to learn enough programming along with
enough of a given programming context (web dev, game dev, app dev, etc) to be
able to piece something functional together. If they go purchase a book
“Fundamental C++” then you’re right, they’ll likely give up.

------
anogrebattle
Totally possible! I went from zero to being employed as a web developer in
about 6 months (no bootcamp). Over those six months, all I did was code.

Wake up - read about code. At work - find good excuses to do my job with code.
Come home from work - code. After dinner - code. Before bed - code.

And so on. I also got lucky because I found a couple engineers at my company
who were willing to mentor my early projects. What kept me going was finding
projects I thought were interesting and challenging and learning everything I
could to solve them.

As a lot of commenters have said, we're all learning all the time. The
learning never ends! There's never a better time to start than now!

~~~
alecmg
You touched on an important point, mentors.

Someone who can spend 10-30 minutes per day with you, going over what you
coded and giving tips and best practises saves A LOT of time.

------
codingdave
Can you learn the basics, enough to get something running? Yes, absolutely. On
the other hand, I've been doing this for 25 years, and I still look back at my
code from a few months ago and think how much I've learned since then.

This is a long, ever-improving journey. Start whenever you are ready, and know
that there really isn't a finish line.

------
Communitivity
Like most such questions, the answer is both yes and no. You can learn the
rules of Go, and how to play the game, in an hour. However, it can and does
take many years to play it effectively and competently. Programming is the
same way. I have been programming since I was 10 (starting on CBasic and
Common Lisp), 40 years ago, and am amazed at how much there is to learn still.
Start gradually, make a commitment to it over a long haul of years, and do
deliberate practice every day making real things rather than coding problems.
Contribute to Open Source projects, as working on a team will teach you much
more than working by yourself.

------
bongowok
You can learn anything in 4 months but not necessarily to the level where
you're as effective as required.

Programming is 99% defining the problem and designing a solution, and 1%
tapping your keyboard. Perhaps your problem is to learn enough programming to
create a proof of concept of whatever you're wanting to eventually build as a
real product.

Before you set off on your journey, it would be wise to look at your
competition in the same space. I'd say your greatest threat is likely to be
existing business intelligence tools that allow the users to write their own
complex queries that reach into various real-time and batched data sets and
surface them as beautiful widgets and dashboards, which they can then share
internally or externally through security policies. Some even have an element
of artificial intelligence to try and find patterns and correlations that
would be valuable to a business.

------
soneca
My path: studied full-time (36~40 hours/week) for 4 months, then started
applying to frontend development jobs. More 4 months (still studying full-
time) and I got hired.

One year working as software developer until I felt I could build a for-profit
side-project, so I started working on my free time (~10 hours/week). 6 months
after starting I launched a web app SaaS MVP.

So... That would be 2 years and 2 months from starting learning to code to
launch a side-project SaaS functional product. For me.

------
duxup
I switched careers via some self taught work and a bootcamp. Got a job and I'm
happy as is my employer.

It is possible.

The question more about you than anything else. In my bootcamp there was a
former accountant, a bank manager, and a former director of something or other
and they all took to programming quite well.

Others much less so.

It is very hard to know who might be good at programming, and who won't like
it (that is a big part of having the drive it keep going)... until they try it
for a while.

------
tomschwiha
I think its nowadays quite easy to get into but hard to master everything. I
believe especially web development is a lot of trial and error. There are just
too many tools and programs to work with. You should probably start with one
language (maybe PHP or Javascript) and see if it solves your issue. For web
development you will definitely need some CSS and HTML skills to get it
started, but IMO that is probably the easier part.

Good luck!

------
xupybd
Yes, I think you can.

If you think you can produce business value with domain specific knowledge
there is a good chance you can.

That said your code will not be great. There is so much to learn about
production quality code that you're not going to know. But I've seen very
successful systems operate on terrible code.

You do have to understand you will incur a lot of technical debt but
businesses often need to take on debt to get off the ground so it might make
sense.

You may want to think about how you're going to scale if your business takes
off. That's when you'll want to think about paying down that debt if you want
to grow and be able to move fast.

At the growth point you're going to be able to afford experienced developers
to clean things up. Be warned they're not going to be happy working on poorly
architected code and that might be a difficult experience. If you've worked
hard and someone criticizes that work it might hurt. But if you're expecting
it, it doesn't need to.

------
schwurb
Others gave good answers. I just want to emphasize that your progress will
greatly depends on inter talent (which you can't influence), passion and
discipline (which you can influence to a degree) and methodology (which you
can influence even more).

View points on methodology: 1) Read more than you write. There is excellent
code out there. By reading it, you learn to think like an experienced
programmer. 2) Hands on > Books. The best approach is to pick an project and
program away. Problems will arise naturally (How do I print something to the
command line? How can I store data in a list? How can I search an element in a
list? ...), which is the best time to look up the solution. 3) Mentors are
invaluable. If you live in a big city, there will be programming meetups. If
personal contact is not possible, try to see somebody online.

All the best!

~~~
gridlockd
> 1) Read more than you write.

I disagree. You should write as much code as possible, run into as many
problems as possible, and solve them. This is how you actually learn how to
program. Feel free to play with and adapt other people's code along the way
though.

> There is excellent code out there.

Sure, there may be "excellent code" out there by _some_ standard, but nobody
can agree on what "good code" is. Your application of "clean code" and "design
patterns" might be considered overengineered enterprise junk. Your side-
effect-free generalized functional code might be considered obtuse and
academic. Your straight-and-to-the-point procedural code might be considered
inelegant or "not modular enough". People have way too many strong opinions on
this subject and they can't all be taken seriously.

Also, a lot of "excellent code" out there is written in older language
versions, full of workarounds for problems that don't exist anymore. This is
particularly important for Javascript or C++. The difference is is like night
and day.

~~~
schwurb
> You should write as much code as possible, run into as many problems as
> possible, and solve them. This is how you actually learn how to program.
> Feel free to play with and adapt other people's code along the way though.

Agree, but as much as possible should be limited by reading other code. If one
spends 95% living in his own bubble, he will likely progress slower.

> Sure, there may be "excellent code" out there by some standard, but nobody
> can agree on what "good code" is.

The exact semantics of "excellent code" don't matter here. For all practical
purposes, "excellent code" is what a "hey I am a python beginner please tell
me your three favourite codebase to learn from thank you" thread on reddit
yields.

On the other hand, it is stupid to ignore advice by experts. It is also stupid
to not become able to recognize experts. This is a very important step in
becoming good in any field - recognizing people who are better than oneself.

~~~
gridlockd
> If one spends 95% living in his own bubble, he will likely progress slower.

That's not going to happen in the age of Google. My point is, don't just
_read_ code. You have to write your own bad code to actually build
understanding. There are no shortcuts.

> On the other hand, it is stupid to ignore advice by experts.

When it comes to programming, it's stupid _not_ to ignore advice by so-called
experts, because a lot of it is mutually exclusive.

You need to be able to understand where an expert comes from and how to apply
their advice to specific problems. Otherwise, you end up with cargo-cult
programming.

This is not what you want to deal with at the beginner stage. In that stage,
you want to train your brain to be able to program, not to deal with all the
expert mumbojumbo. That's why it's better to start with BASIC (or Python,
these days) than Java.

> It is also stupid to not become able to recognize experts.

No, that's actually the default state of being. In order to tell an expert
from a snake oil salesman, you need to be an expert yourself.

> This is a very important step in becoming good in any field - recognizing
> people who are better than oneself.

 _Everyone_ is better than you at the beginning. That doesn't mean you should
take advice from everyone.

~~~
schwurb
> Building stuff

Oh, absolutely one should build much stuff. Just don't get stuck in the own,
in all likelyhood shitty, bubble.

> Experts

You made it sound fatalistic tho, as there were no use in even trying to
identify experts. If you have difficulties telling experts from wanna-be
experts, that is your problem, not the problem of beginners.

You also don't have to be an expert to recognize an expert. The level of
competence needed is way lower than that. The level of social skills needed to
recognize the different schools and camps is high tho. But this is rather a
social problem than a domain-specific one.

~~~
gridlockd
> You made it sound fatalistic tho, as there were no use in even trying to
> identify experts.

No, that's not what I mean. Identifying experts is one thing. It's pretty easy
to tell if someone is recognized as an expert _by others_.

I'm talking about appropriately evaluating and applying that expert advice.
You need to be an expert yourself to actually do this, and it's not what
beginners should concern themselves with.

> You also don't have to be an expert to recognize an expert.

You have to be an expert to _evaluate_ other experts and their opinions.

------
daveslash
You indicated that you have a particular interest in web development. That's
great! I would encourage you to keep your questions focused on that. I see
that you're getting a lot of answers that say _" yes, you can learn in 4
months"_. Some answers might mention non-web related programming languages. My
guess is that that's probably not what you meant to ask. May I suggest
rephrasing your question as _" Can anyone provide recommendations on learning
Web Programming within 4 months?"_ I think that might evoke answers more
relevant to your interests.

Glad to see someone taking an interest in programming. As others have said:
although you can learn quite a bit in 4 months, programming is a life-long
journey of learning. Happy programming!

------
brutus1213
I remember how I learned C programming. It was a summer class .. first week,
the prof said read the first half of King's C programming book. The second
week, he said read the other half now. It was pretty awesome. We did have a 1
year foundation in a toy programming language (called Turing) at that point.

C is a small language and this was possible to do. More modern languages seem
so bloated that this is not possible anymore I think (with the exception of
Go).

So yeah ... you can learn to code reasonably well in 4 dedicated months. But
be clear about your goals. If you want to learn web dev, you might want to
learn Javascript but that is a larger language than say Go. Python is another
great choice ... easy to get into and quite deep.

------
javaIsGreat
I think if you study the right materials and build projects for your resume
its possible in 4 months.

Finding your first job will be tough, as you are competing with other
developers who already have professional experience most likely, so just keep
learning new technologies and building projects to improve your marketable
skills.

I would reccomend reaching out to developers in your area to start
conversations and ask for advice on what/where to learn.

That being said a year to become is a more realistic timeline.

------
bsg75
Learn to program in 4 months, to a degree yes.

Become employable as a programmer in 4 months? No. That is not enough time to
learn the fundamentals, and become fluent in any programming language. When I
hire I want to know what a candidate has done and can do on day 1. New
university graduates have spent at least 2 years coding, and have difficulty
demonstrating experience.

But the same is true for _any_ professional endeavor. Skill takes time to
develop, as does a portfolio of accomplishments.

------
moonsly
Seems like you just need to invent a time machine, learn several years and
then go back and replace young self.

[https://www.reddit.com/r/ProgrammerHumor/comments/7eyrbx/how...](https://www.reddit.com/r/ProgrammerHumor/comments/7eyrbx/how_to_learn_programming_in_21_days/)

Basically 4 months is too short term to learn some really useful things in
programming from scratch.

------
hootbootscoot
programming what?

web development has complexities related to legacy code and features as well
as social and political factors.

The actual platform of "the web" is essentially an asynchronous remote-
directory-listing-service. We were originally supposed to use this to browse
linked pages. This use case is trivially easy to learn about how to program.
(HTML)

We have since gone and made it complicated, as people expect to load new
content and have the page alter itself to fit the new content, all without
loading the entire page from the server again. (against the way the web itself
worked)

Additionally, trends and the need to waste cash in the form of "busy work" has
led to people preferring to code in a pretend version of Javascript (ES6) that
basically lies to you about what Javascript actually is and behaves like and
this has led to perversions like front-end-build toolchains etc.

Getting a job in web development may require you to pay homage to such
nonsense and pretend that you love over-complicating things in manners that
bring more side-effects and pain than solutions.

If ones goal is employment in the sphere of web development, can one
successfully suppress ones common sense and actual practical instincts
sufficiently to ride along with this lemming-horde headed for the precipice?
Then WOW HEY! Front end "engineering" is for you!

If, on the other hand, political perversions of justice and decency make you
sick, then you might wish to try anything else.

There are other ways to develop for the web, of course, but I'm speaking
largely about the mainstream SV technologies and the mentalities behind them.

------
joker3
Four months is the length of an academic semester, which is the length of a
typical introductory programming class. Millions of engineering students
around the world succeed at that every year, so there's no reason why you
can't.

Of course, having finished a first course doesn't mean you know everything, or
even that you have a good idea what you don't know. There's more to do after
that.

------
facorreia
With your knowledge of business statistics, you might ramp up faster if you
learn how to write simple programs for data analysis.

The programming aspect is simpler, in general, and the hard part is knowing
how to make sense of data.

E.g. [https://www.udemy.com/course/data-analysis-with-
pandas/](https://www.udemy.com/course/data-analysis-with-pandas/)

------
onion2k
People learn to code in bootcamps in 3 months, so sure.

------
ElijahLynn
I would say if you focus every waking hour then you could maybe get 1 year of
knowledge crammed into 4 months, because of the compounding effects, even
though the actual time spent would only be about 8 months (16 hour days vs 8
hour days).

Programming comes down to a ton of practice, which turns knowledge (books,
videos) into a skill.

------
Kailou
To learn the fundamentals sure. But it completely depends on how you learn,
your dedication. What's your end goal? When do you think you will have
"learned" programming?

It's a constant learning experience and if you ever stop learning in this
subject, i think you're doing something wrong.

------
karmakaze
If you make good simple choices your area and framework I think you could get
far. I would suggest sticking to front-end and maybe using Vue.js and api-
based backends like Firebase(Firestore?) since you want to relate it to end
user value.

------
nickmose
4 month is not enough, this is a roadmap to be a programmer in long term.
[https://www.coderscat.com/to-be-a-programmer](https://www.coderscat.com/to-
be-a-programmer)

------
arbhassan
The goal learning programming doesn't tell you when you are done.

First define what you're trying to accomplish e.g. Web App, Mobile App. And
then learn the prerequisites for it.

------
kleer001
The faster one tries to learn something the slower it goes.

------
segmondy
Yes. Read 4 programming books front to cover, do all the exercises, write code
everyday. Find someone you can ask a question if you really get stuck.

------
tmaly
It is possible. I would recommend you learn by doing. Write as much code as
possible. Learn the tools along the way.

------
factorialboy
15 years and I'm still learning. Something's I can do very well. In others I'm
still a novice or less.

------
jhapzOng
even a day, you can learn how to code 'HELLO WORLD' using html programming. 4
months is more than enough to know the basic skills to manipulate any
programming language. The most important is the desire to learn.

------
zmix
For absolute beginners I always recommend:

If you don't have a Mac and are not on BSD or Linux:

    
    
      * set up a Linux machine (this can be a computer running Linux or a virtual machine)
      * install (usually it comes pre-installed) GNU AWK aka: 'gawk'.
      * head over to https://www.gnu.org/software/gawk/manual/html_node/index.html and start with https://www.gnu.org/software/gawk/manual/html_node/Getting-Started.html#Getting-Started
      * also make sure to read https://www.gnu.org/software/gawk/manual/html_node/Basic-Concepts.html#Basic-Concepts either early on, or when you switch from 'declarative' to 'imperative' (see below)
    

Why 'awk'?

It is one of _the_ standard, classical UNIX utilities. Learning how to use it
will teach you how to use all command line utilities, including 'man awk'.
Since you use the GNU implementation, you will also learn both short and long
options/arguments.

You will also gain basic knowledge of the terminal (navigating paths, etc.)

You will also learn the concept of StdIn, StdOut and StdErr.

You will learn what a 'stream of data' is, on a basic level.

It has been co-authored by Brian Kernighan. He also co-authored C. The 'awk'
language is a C-family language, which means, that, once understood, you will
be able to read the control flow of C, C++, ObjectiveC, C#, PHP, Go, Swift,
Javascript, Java, R, D and many others:
[https://en.wikipedia.org/wiki/List_of_C-
family_programming_l...](https://en.wikipedia.org/wiki/List_of_C-
family_programming_languages). The familiarity to Javascript is exceptionally
striking: by just changing a few little things one can run some basic 'awk'
scripts on a Javascript interpreter. Here is an example from [Rosetta Code
(100
Doors)]([http://rosettacode.org/wiki/100_doors#AWK](http://rosettacode.org/wiki/100_doors#AWK)):

    
    
      BEGIN {
        for(i=1; i <= 100; i++)
        {
          doors[i] = 0 # close the doors
        }
        for(i=1; i <= 100; i++)
        {
          for(j=i; j <= 100; j += i)
          {
            doors[j] = (doors[j]+1) % 2
          }
        }
        for(i=1; i <= 100; i++)
        {
          print i, doors[i] ? "open" : "close"
        }
      }
    

Now remove the 'BEGIN {}' part, replace the '#' with '//' (or remove the
comment altogether), change 'print i' into 'console.log(i)' and put a 'var
doors=[]' at the beginning of the script. It should look now like this:

    
    
      var doors=[]
    
      for(i=1; i <= 100; i++)
      {
        doors[i] = 0 // close the doors
      }
      for(i=1; i <= 100; i++)
      {
        for(j=i; j <= 100; j += i)
        {
          doors[j] = (doors[j]+1) % 2
        }
      }
      for(i=1; i <= 100; i++)
      {
        console.log(i, doors[i] ? "open" : "close")
      }
    
    

save it as '100doors.js' and execute it with NodeJS.

'AWK' is more than just a programming language. It is a processor, that has a
programming language 'built-in'. For a novice this means, that the learning
curve is very shallow: before you start programming, you will learn some more
basics:

    
    
      * what patterns and pattern rules are
      * how to use pattern substitution
    

All this happens on the plainest data format, which exists: human readable
text! As you have understood these two concepts, and how 'awk' handles them,
you have gained knowledge, that you immediately can use in your everyday's
computing extravaganza. Much better than learning examples for 'factorial',
'fibonacci', etc.

You should have understood these things in your first few days, if you are
totally new to working with a computer on this level, if you already have some
primitive knowledge, it is just a few hours.

Congratulations, you now are able to do 'declarative' template programming!
Declarative means, that you tell the computer, _what_ _you_ _want_ , _not_
_how_ _to_ _do_ _it_. It also means, that you do not need to care for file-
handling, parsing and string tokenization, etc. yourself.

Once you got this, stuff becomes more serious. You now will learn 'imperative'
programming, which means to tell the computer _how_ to do it!

'AWK' is a very good first language, because it has dynamic typing (which
means, that you do not need to care for variable declarations and, especially,
typing, which can become a whole topic on its own, so better to leave that for
a time, when you are more secure) and only knows about three different types:

    
    
      * string
      * number
      * array
    

The function catalog is also very basic. And these functions will reappear,
the one way or the other, in all other languages, later on.

'awk' is 'domain specific'. The 'domain' being 'line based text streams',
which means, that 'awk' sees the input as a stream of text lines, processes
one by one, calling them 'records' and separating all the words within a line
into 'fields'. Very square, very simple to understand. And you always can load
the text into your editor or into a reading program. Or simply dump it to the
terminal...

We have chose the GNU AWK implementation. This one comes even with a step-by-
step debugger built in. This will help you a lot in understanding what went
wrong in your program, should that be the case.

All in all, you should be able to learn basic programming within 10 hours,
plus those hours, that you need to exercise. I would recommend:

One hour a day, reading the docs, with half an hour of practice after that and
half an hour to an hour of exercise before you go to bed. After about two
weeks you should be already quite competent. Just make sure, that you do not
start learning the imperative part (that is, the 'AWK' language itself) before
you did not understand 'awk' as a processor, which means, the declarative
part.

Of course, you could go directly to Javascript. However, today's Javascript is
a complex beast, bearing so many concepts and paradigms, that the learning
curve is steep. If you know AWK, you already have flattened the Javascript
learning curve a lot.

It's funny, that this topic came up yesterday, because it was just a few days
ago, that I realized, how valuable of a didactic vessel GNU AWK (and its
_excellent_ documentation!) is for a newbie. As an experiment, I even started
to port the AWK functions into a Javascript shim, so porting of pure AWK code
becomes even easier!

------
ak39
YES!

