Ask HN: What projects are perfect for learning a new language?
I get that the best way of learning is to try to build something but is there a list of projects that accentuate a language's purpose/paradigm in a way that building said project has the best time to learning ratio?
59 comments
[ 2.7 ms ] story [ 122 ms ] threadhttps://github.com/karan/Projects
https://docs.google.com/document/d/1TyqD2_oDtiQIh_Y55J5RfeA9...
https://github.com/karan/Projects
http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-...
Almost everything I have picked up by myself over past few years has been this way. Golang (frustration with concurrency in Python), JavaScript/React/Redux (frustration with "native" GUI frameworks), Android SDK (Speed, sensors pre-html5-webview), GraphViz (frustration with "project management") etc.
http://vikaslalwani.com/projects/
All the source is available on GitHub and I am sure you will have lot of fun creating these :) Feel free to contact me if you need any help.
It's always nice to see visuals appear (in a file or on screen). It's like a compliment for the work done.
And you will learn a lot of basic stuff like loops, scope, types, and so on.
What projects are perfect for learning Erlang (which might involve both the functional and concurrent aspects of the language)?
Whats truly great is that you are forced to solve the problem on your own, and then you can see how others did it, both in your chosen language(assuming it's a somewhat common language), but also a myriad of other languages.
1. hello world (simply getting something on the screen)
2. todo list (display a simple data-set and interact with it)
3. blog (display a relational data-set and interact with it, maybe some auth stuff)
But I would like to know how these steps would look for embedded stuff.
1. Make a LED blink - the Hello World of embedded.
2. Output a PWM signal from a pin to control a motor or to a speaker output.
3. Read an analog signal using the onboard ADC. A temperature or luminosity sensor is a good start.
4. Write a light OS that can execute multiple tasks simultaneously - take user input, read analog sensor values, perform a calculation, keep track of time, etc. This will need all of the above + interrupt handling.
I already imagined that the hello world of embedded is a blinking LED , haha.
So these things (PWM, ADC) are "standard" to all embedded systems?
Not really. PWM is more common (and "can" be done in SW or using other tricks if needed)
This[1] is a great place to start. I keep on meaning to write a 'hardware for CS guys' guide, that'll suffice for now.
[1] http://umassamherstm5.org/tech-tutorials/pic32-tutorials/pic...
AVR for controlling and PIC for computing.
At some point you will put these behind you, use pre-written libraries and graduate to an application.
As a personally embarrassing example, I once returned to Python after three years of heavy Scheme usage. I spent a week porting an almost trivial application and it felt like Python was fighting me every step of the way. Had I not had past pleasant practice with Python, I would have abandoned the language as useless.
Finally, at the end of the week. I realised that I was trying to write Scheme in Python, which work about as well as writing Python in Scheme. Python has for loop and I should be using them.
About twenty minutes later, the app was ported. It wasn't my finest hour.
· Lisp interpreter
· Lexer generator
· Knuth's Pac-Land
· Linear Algebra library
· Workflow engine
· m-ary tree
· Now Do This app
· Project Scaffolding generator
· Gap buffer
Are you saying to compile the source of the compiler, or write a compiler for that language (in that language)
This way you'll quickly understand the semantics of the language and will get an early exposure to its dark corners.
That and glancing at the AST if the language is open source.