Programming languages online tutorials

C++ (x) (x) (x)

Assembly (x) (x) (x)

C (x) (x)

Java (x) (x)

Matlab (x) (x)

Haskell (x) (x)

Others programming languages (x)

Online compilers (x)

Computer science/engineering online courses

MIT courses (for electrical engineering and computer science)

Harvard courses

Standford courses


Other courses


A Gentle Introduction to Algorithm Complexity Analysis

anonymous asked:

Do you have any suggestions for people that are just starting out in the world of coding?

Well, I haven’t been doing this for very long - I’m still starting out myself. But I’ll do my best:

  • Language doesn’t matter. Just pick one and start learning. If you don’t like it after a while, pick a new one! Different languages have more similarities than you’d think, so you won’t be wasting your time. However:
  • If you’re interested in programming for the sake of writing elegant programs, then I’d recommend starting with Python, or Haskell. These both have strong communities, so you should be able to get help/tutorials just by googling. If you want to make graphics, I recommend Processing, and for audio you could try SuperCollider. But don’t limit yourself. If you see an interesting tutorial for a language you don’t know, skim read it anyway. Chances are the concepts will be pretty familiar.
  • Everything you need to know is on the internet. Try googling ‘learn programming python’. Open all the links on the first page, close the ones that look boring, then read the rest. Some pages even have interactive tutorials, which are fantastic. (codecademy.com and learnpython.org are great places to start.)
  • Try to write code every day, especially when you’re starting out. It’s often tricky to know what to write, so until you’re inspired, read through online tutorials and work through the exercises. This is pretty daunting, and at first nothing will make sense - which is fine. Often you’ll be reading for hours and you’ll feel like nothing’s sticking, but then it’ll just click. But the only way it can click is if you persevere with the initial reading. The interactive pages help a lot with this, and they’re more interesting than just reading lots of dry technical stuff.
  • There’s a difference between giving up and taking a break. If you’re getting frustrated, go and do something else. Your brain is processing what you’ve learnt, even when you’re not reading, coding, or even consciously thinking.
  • If you have any friends who are also interested in programming, talk to them (or learn alongside them!). Talking about concepts will help you to solidify ideas.
  • Actually writing code consists of two things: thinking and typing. Don’t undervalue either. Learn how your brain works, how you learn best, when you’re most awake and productive. Also consider learning to touch-type. And find a nice text editor! I recommend Sublime Text 2 - it’s got lots of things like syntax highlighting, line numbers, tabbed editing, and code completion that make coding much faster. Also it looks super rad.

Translating into swedish with Haskell.


So I have a new function that’s leaking space:

data C3 a = C3 a a a

c3_0 (C3 x _ _) = x
c3_1 (C3 _ x _) = x
c3_2 (C3 _ _ x) = x

splitBands :: IOArray Int (C3 Double) -> IO (C3 (IOArray Int Double))
splitBands vc = do
b0 <- mapArray c3_0 vc
b1 <- mapArray c3_1 vc
b2 <- mapArray c3_2 vc
return $ C3 b0 b1 b2

I know there are probably more concise ways of writing this, but this is the simplest version of the function that exhibits the problem. It takes a mutable array of containers of three doubles, and converts it into a single container of three mutable arrays of doubles. And it leaks. Apparently.

I’m super lost. Like, pretty much the only bits that do anything are the mapArrays, and they’re library functions so they probably shouldn’t leak, right?