See one possible approach to the challenge of making the parser accept requests for data for an entire year instead of for a date range.
- [Instructor] So remember the challenge…was to amend the parser so that the user…could specify a year rather than a date range…so they could say something like StockChartBot LNKD 2015.…so they could say something like StockChartBot LNKD 2015.…And I said you should probably start…by adding a unit test for this.…That's actually super simple.…We just need another case in fact.…We're going to copy this case here.…And we're going to reproduce basically…exactly what I just said.…
With unit testing it's often good…to be quite literal minded.…So yes, we're expecting an A, we're expecting an LNKD,…and the expected date range is…and the expected date range is…from the first of January 2015.…Because of that,…to the 31st of December.…And fairly obviously that is failing.…So now let's go to the parser…and see what we can do about that.…Well we can exploit the fact that this new style of query…is going to have three elements where previously though a four…so again, let's be super literal.…
And make ourselves a new branch on our match…
- Defining values and calling functions in F#
- Defining and identifying discriminated unions
- Working with if-else expressions
- Writing unit test
- Using type providers to access data
- Analyzing data with collection functions
- Plotting data using the R type provider
- Using railway-oriented programming to handle errors
- Integrating with Twitter
- Deploying an F# application to Azure
Skill Level Intermediate
1. Get Started with F#
2. Build a Simple Parser with Unit Testing
3. Use F# CSV Type Provider to Get Data
4. Analyze Data with F# Collection Functions
5. Use RStats Provider and ggplot2 to Plot Data
6. Use BoxKite with Twitter
7. Deploy a Working Bot
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.