

My girlfriend who's an MD wants to learn how to program. How should she start? - DrorY

Hi all,<p>This is a question for anyone here who started programming at a late age, after coming to it from a different field.<p>My girlfriend (who's 25 +-) has finished her doctorat in medicine and is now starting her PHD. As part of her research she needs to learn how to program in Matlab as well as quite extensive mathematics (as she needs to perform a lot of analytics on research she conducts).<p>She doesn't have any experience in programming, and little mathematics background.<p>What would be the best way to learn matlab and other mathematical concepts?
======
eaurouge
MATLAB isn't too hard to get started on. It is, after all, a high-level
language; and I rank it as providing a higher level of abstraction than Ruby
and Python. To get started, ask her to read a MATLAB primer[1][2]. That's all
she'll need to get started.

Her time is better spent learning to make the most of whichever MATLAB
toolboxes she needs for her research. A course on basic linear algebra, and/or
other math topics, is also more relevant than learning how to program.

1\. <http://www.stanford.edu/class/ee278b/matlab_primer.pdf>

2\. <http://faculty.olin.edu/bstorey/Notes/matlab.pdf>

Edit: I just want to reiterate that one can use MATLAB without knowing how to
program. I see other comments suggesting a full on programming course but she
doesn't need this at all. In many engineering courses, first year undergrads
can be expected to learn all they need to start "programming" with MATLAB over
the course of a weekend.

------
lutusp
Because for her, programming will be a means to an end, and that end is data
analysis and statistics, I recommend that she learn Python and its scientific
and analytical libraries like numpy and scipy.

Python is relatively easy to learn, it's free, and it can produce useful
results with little effort.

Python: <http://www.python.org/>

Scipy: <http://scipy.org/>

Examples of scipy's output:
[https://www.google.com/search?q=scipy&hl=en&tbo=d...](https://www.google.com/search?q=scipy&hl=en&tbo=d&source=lnms&tbm=isch&sa=X&ei=wKsUUZ_lO-
WUjALzt4GABw&sqi=2&ved=0CAcQ_AUoAA&biw=1213&bih=906)

~~~
DrorY
While this is true, it seems as though Matlab is the tool used for her work at
her laboratory, she needs to join an already going project.

~~~
lutusp
Ah, too bad. Matlab his a steeper learning curve than Python.

~~~
DrorY
yeah, I think it's the major reason for her fearing this field

~~~
lutusp
For what it's worth, if she takes the time to learn how to use these math
tools -- and learns the math itself -- she will place herself in a powerful
position with respect to future research work, just because so few people
bother to acquire a solid grounding in analysis.

I would offer her every encouragement to take the time and absorb the basics
of both programming and math. At the moment, a grounding in these topics is
essential, and in the future, it will be even more of a necessity than it is
now.

------
zachgalant
She needs to check out <http://codehs.com> (disclosure: I'm a cofounder).

We make it really easy and accessible for people to get started even without
having a background.

We've had students aged 9 ([http://blog.codehs.com/post/39684965497/9-years-
old-and-codi...](http://blog.codehs.com/post/39684965497/9-years-old-and-
coding-with-codehs))

to 85 ([http://blog.codehs.com/post/37288742720/im-85-and-i-
learned-...](http://blog.codehs.com/post/37288742720/im-85-and-i-learned-to-
code-you-should-too))

We focus on teaching the fundamentals of thinking like a programmer, so even
though the site is based in JavaScript, she'll be able to apply her knowledge
towards matlab.

Also, it's really fun, and if she continues, she will learn to make a mobile
game or two along the way.

You can email me at zach@codehs.com if you or she have any questions. Or just
sign up for the free trial to check it out.

We give personal feedback to all of our students on all the code they submit,
so they're sure to improve and not only write functional code, but code with
good style.

~~~
DrorY
Do you teach Matlab specifically? This can be an excellent B'day gift.

~~~
zachgalant
no, we don't teach matlab. maybe we'll add that in the future.

for now, I think she'd just get a lot out of learning some of the fundamentals
of programming rather than diving straight into matlab.

having a grasp of some of the basics will only help her understanding of
matlab, and I'd even recommend trying to work on it concurrently.

If she gets started on CodeHS, I guarantee she'll learn a lot and have fun in
the process.

~~~
DrorY
What would be the closet thing to Matlab she could learn in codehs? (Similar
syntax similar core concepts)

Do you have any plans of adding Matlab anytime soon?

~~~
zachgalant
No plans for matlab just yet, but it's on our longer term todo list.

She'd learn these topics:

* Function decomposition

* programming style

* good problem decomposition

* parameters and return values

* control structures (for, while, if)

* Variables and scoping

* boolean logic

* data structures: arrays, maps, grids, dictionaries

------
jamessb
Cleve Moler, one of the founders of MathWorks, has written two free books. The
first, Experiments with MATLAB, might be a good starting point:
<http://www.mathworks.com/moler/exm/index.html>. It teaches some maths as well
as Matlab.

The official Getting Started Guide is good, and focuses on Matlab itself:
[http://www.mathworks.com/help/matlab/getting-started-with-
ma...](http://www.mathworks.com/help/matlab/getting-started-with-matlab.html)

MathWorks also has a relatively new set of online problems that she can work
through: <http://www.mathworks.co.uk/matlabcentral/cody/problems>. In
particular, the Cody Challenge problems start out very easy, but cover a range
of language features. After doing some problems, she can see other people's
solutions, and hence pick up on more idiomatic ways to do things in Matlab.

------
sitong
You might want to start with some lecture notes from universities. A quick
google search led me to these:

Stanford: <http://white.stanford.edu/~knk/Psych216A/> MIT:
[http://ocw.mit.edu/courses/electrical-engineering-and-
comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-094-introduction-to-matlab-january-iap-2010/index.htm)

If she needs both stats and matlab help, your best bet is probably to search
something like "statistics and matlab tutorial" on google:
[https://www.google.com/search?q=statistics+and+matlab+tutori...](https://www.google.com/search?q=statistics+and+matlab+tutorial&oq=statistics+and+matlab+tutorial&aqs=chrome.0.57j0l2.4315&sourceid=chrome&ie=UTF-8)

------
S4M
I never used Matlab, but I am very familiar with R which I think is quite
similar. So I'd advise your girlfriend to just play with the Matlab repl
(enter 1+1 and see that it returns 2, plot a function, assign a variable,
etc.), and then write some function on a text editor and load them into
Matlab.

You can also help her to load some data (from a text file, a csv file, or
maybe a database connection, depending on what's used at her lab), and then do
some basic operations on them (calculate some basic statistics and do some
easy plots).

When she can do all of that (and I don't think it should take her much time to
learn), she'll be able to work with Matlab autonomously.

------
drallison
She should start by learning the mathematics and statistics that she will need
to do the theory and the analytics necessary for her research. Then she can
learn how the mathematical and statistical ideas can be applied using tools
such as Matlab. Programming is seductive, because of the instant feedback it
provides, but it does not provide much insight; math and statistics provides
insight but connections may be obscured by a sea of data. What's needed is the
combination of the two.

------
dgunn
Doing statistical analysis in MATLAB won't require your girlfriend to learn
how to program. She'll most likely use a MATLAB toolbox that provides a
graphical interface. The most she'll probably need to know is how to create
data structures the toolboxes can use.

------
haukur
I don't know Matlab myself so I don't know of any Matlab-specific tutorials
but check out Project Euler: <http://projecteuler.net/problems>

------
dragonbonheur
Get a book. That's how people learn. No exceptions.

~~~
dragonbonheur
Or just use Google:
[http://www.google.com/search?q=matlab+programming+filetype:p...](http://www.google.com/search?q=matlab+programming+filetype:pdf)

~~~
DrorY
Yeah, it's possible, If that's the case can you recommend any top notch books
for absolute beginners?

~~~
dragonbonheur
From what I can see, Matlab looks simple enough that she might be able to
understand it from the various tutorials that the above google search results
lead to. Even easier than Python. In fact it looks just like a dialect of
BASIC or LUA, only with semicolons. No biggie for a beginner.

------
cedrichurst
The R tutorial on codeschool.com is also really well-done, similar domain to
matlab but not quite the same.

------
slosh
codecademy! codecademy! codecademy! codecademy!

<http://www.codecademy.com/>

Start with web fundamentals

~~~
Donito
Please don't do this, web fundamentals will barely help for matlab.

