Hacker News new | ask | show | jobs
My girlfriend who's an MD wants to learn how to program. How should she start?
16 points by DrorY 4884 days ago
Hi all,

This is a question for anyone here who started programming at a late age, after coming to it from a different field.

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).

She doesn't have any experience in programming, and little mathematics background.

What would be the best way to learn matlab and other mathematical concepts?

12 comments

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.

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&#3...

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.
If she hasn't done it already or else if she's forgotten it would be a good idea to sit in on a first year linear algebra and or statistics class.

Matlab (and/or numpy / sage / any of the "math" packages) work best performing operations on vectors and matrices of data (long strings of values / grids & cubes (&hyper cubes) of values ).

Expanding on the "little mathematics background" is more important than the "no matlab" issue, one follows from the other.

If she's headed into epidemiology and other such areas then make sure she's read "How To Lie With Statistics" at the very least.

Ah, too bad. Matlab his a steeper learning curve than Python.
yeah, I think it's the major reason for her fearing this field
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.

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...)

to 85 (http://blog.codehs.com/post/37288742720/im-85-and-i-learned-...)

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.

Do you teach Matlab specifically? This can be an excellent B'day gift.
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.

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?

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

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...

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.

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...

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...

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.

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.
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.
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
Get a book. That's how people learn. No exceptions.
Yeah, it's possible, If that's the case can you recommend any top notch books for absolute beginners?
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.
People can learn in other ways too.
The R tutorial on codeschool.com is also really well-done, similar domain to matlab but not quite the same.
codecademy! codecademy! codecademy! codecademy!

http://www.codecademy.com/

Start with web fundamentals

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