My first attempt at porting code from C# to Swift
A long lime ago, I bought an app for the iPad that let me create outlines. Not a spectacular app, not a complicated app, but an app that did almost everything I wanted.
Only thing it didn't do that I desperately wanted was print. So I wrote a Windows application to print the outline. Since I was writing a Windows application, I thought I might as well add support for Markdown. The iPad app wouldn't support it, but it was primarily for formatting output to print or web, so it felt like a right addition.
That's where I found MakrdownDeep and added it to my project. It's been a wonderful addition and gave me all the Markdown functionality I needed.
Then I started down the lines of creating a Mac version and the world fell apart as I discovered several Markdown libraries, but none as comprehensive as MarkdownDeep. What is a bloke to do in these circumstances, but convert the C# code in GitHub to SWIFT.
It took me two months, but I ended up with a working copy of MarkdownDeep written entirely in SWIFT. It was a real eye opener of a project, but I got there and ended up with many hundreds of passing tests.
What it looks like
And the end result is...
The premise is simple; take some markdown:
Run it through the converter:
Get HTML out the other end:
Most markdown processors I have seen use very complex Regex statements to transform the markdown to HTML. I tend to find complex Regex rather hard to comprehend, especially when I've not looked at them for a while. This conversion appealed because it does it old school with string handling. It is, undoubtedly, slower but a lot simpler to maintain and a lot more predictable in it's output.
No secrets here
If anyone wants to take a look at the code, it's up on GitHub in my Markdown Deep Swift repo.
I have a performance issue to deal with at some point, but that is me being picky rather than a show stopper. It only affects really large document conversions and is probably down to my clumsy string handling conversions. It's mostly a case of finding the time to look at it.
I expect that, as my comfort and experience with Swift increase, I will revisit this code and do the tweaks it deserves.
Am I really any good?
Don't take my word for my abilities, take a look at other peoples opinions about me.
One very quickly runs out of superlatives with Steve. He is the cleverest person I know. He is highly innovative, passionate regarding the proper maintenance of agreed standards and protocols and establishes excellent relationships with our clients.
Steve is a rare developer resource who is able to provide a good breakdown of technical solutions for all audiences to understand... Steve understands the importance of project deliverable's both from a client and business perspective and shows a personal pride in ensuring the delivery schedules are met.
I have worked closely with Steve for his time with us and long before we formed our company. His technical ability far out-performs anyone I have known or met in companies we have worked with like IBM/EDS/Cap Gemini
Steven showed a great deal of commitment and skill when he worked with me. His attention to detail, comprehensive documentation and well thought out code, using very impressive technical standards meant that it was always possible to rely on the solutions provided being top notch. Steven is an asset to any company, at any level - if I were able to, I'd love to work with him again.
I have had the pleasure of working with Steven for several years in my role as CTO. He his one to the most multi-disciplined technically skilled developers I have known but what sets him apart is his eye for, and attention to detail, particularly when considering the user experience. I would absolutely not hesitate in recommending Steven.