Given a string, find the length of the longest substring without repeating characters.
What a great example of an interview question; there are a few levels of difficulty making the problem accessible to many, a fairly obvious naive O(n2) approach with an oportunity for optimisation, and the curious will find that you can do it in O(n) as well. If I ever run another tech interview training course I’ll probably break apart and analyse this problem with the class. It is, however, quite easy and not ideal for an actual interview.
In January 2017 I spoke at NDC London about async arrows. The video is below. Enjoy!
‘Tis the season for giphing, so for my F# advent post this year we’re going to get the top trending gif on giphy. Giphy has a nice little api, all we need to do is send a request, then we’ll get a response. Sounds pretty straight forward, huh? In fact, you’ve probably created a function that takes a request and returns an asynchronous result before, à la 'Req -> Async<'Res>. Interestingly, in doing so, you’ve defined the ‘Arrow’.
SignalR allows us to easily push messages back and forth between a client (usually a website) and server using websockets. All of the pain of creating a connection, keeping the connection alive, reconnecting, serialising and deserialising messages, plus lots, lots more is taken care of for you. In this post we’re going to create a SignalR server and push some messages back and forth from a website. You can see the completed source at github.
F# works quite well with Xamarin.Forms. At September’s Sydney F# User Group meeting I gave a talk on how to get started by building a Twitter app that randomly selects a tweet to give a prize to. I plan to write a detailed How To, but for now, enjoy the video! Thanks for watching.
The inaugural Sydney F# User Group meeting was held on 1 July. We had a great turn out and great times were had by all. There were two talks, one by me, the other by the amazing Jorge Fioranelli who runs the user group with me. The videos are available on our YouTube channel. We’ll be making every talk available on there so make sure you subscribe or you risk not living a productive, meaningful life.