RSS

Category Archives: Coding

Roslyn – The .NET Compiler platform

Roslyn is the .NET Compiler Platform which provides open-source C# and Visual Basic compilers with rich code analysis APIs. Roslyn exposes modules for syntactic analysis of code, semantic analysis, dynamic compilation to CIL, and code emission

I heard about Roslyn during one of the Hackathon events but didn’t get a chance to explore it till couple of days back. As part of the recent Hackathon, I got a chance to work on a project which needed Roslyn help to make my work quick and easy. I was amazed at the easy at which we can use the compiler service. This tutorial helped me to quickly get on track, thanks to the author – Learn Roslyn Now. The same author have a FAQ section which gave me a path to many of my requirements for the project like given a particular piece of code in a workspace how do I find all the references across the solution etc etc.

This Hackathon was a great learning and a great fun. The most memorable part being demoing this project to one of our CVPs :). I should be very thankful to one of my team mate for the idea!

Do read about Roslyn and get amazed 🙂

 
2 Comments

Posted by on July 31, 2015 in Coding, Microsoft

 

Getting started with TypeScript

I have been working on TypeScript for the last few months and would like to share a list of getting started pointers to quickly get a hang of the language.

If you are wondering what is TypeScript:

“TypeScript lets you write JavaScript the way you really want to.
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Any browser. Any host. Any OS. Open Source.”

Start:

1. Introduction to TypeScript by Anders Hejlsberg, the man who developed this language. You should definitely read about his earlier works, pretty impressive 🙂

2. There is no better place to start than from the official TypeScript language page – TypeScriptLang (Yes the above definition is from this link)

– You have a nice playground to play around TypeScript right inside the browser under the Play tab

– Language spec, samples, Handbook, tutorials etc.

3. Recently I have noticed a good course on edx.org and found it good – Edx Introduction to TypeScript

– This has introductory talk from Anders Hejlsberg

– Exercises to work on.

4. The rise of TypeScript – Interesting reading

5. Channel9 do have many videos on TypeScript.

Hopefully the above reading should help you understand why should you use TypeScript when building heavy applications for web.

For those who are interested in exploring further – I found some real good discussion on Pros and Cons of using TypeScript which gives you a good food for thought. Do search on web and read those as well

As always please do share any interesting articles on TypeScript for other readers.

 
Leave a comment

Posted by on June 18, 2015 in Coding

 

Tags: , ,

Write a URL shortner.

Write a URL shortner (like tinyurl) . Take a URL as input & return a shortened URL. If you use any kind of storage or persistence, please use the appropriate API’s of the language. Another requirement is that we want to make our URLs as different as possible, so that successive calls return very different URIs
This is to ensure that small typo errors do not lead to users getting to a valid URL, but rather throwing up an error page.

Let start with the design 🙂 and then come up with an implementation probably in Java/C etc.

The interviewer asked me to implement it in Java.

Small Note: Googling for this can give you a code written in PHP right away as your first link :-), please dont start with it. Come up with your own logic.

 
Leave a comment

Posted by on December 8, 2009 in Coding

 

Tags: ,