Skip to content

Instantly share code, notes, and snippets.

View tamizhvendan's full-sized avatar
🙋‍♂️
The code is not the goal. Solving the problem is!

Tamizhvendan S tamizhvendan

🙋‍♂️
The code is not the goal. Solving the problem is!
View GitHub Profile
@tamizhvendan
tamizhvendan / Errata.md
Last active July 17, 2016 15:16
F# Applied Book Errata
@tamizhvendan
tamizhvendan / redux.js
Created April 22, 2016 13:24
Redux sample implementation
const statusMessagesReducer = (state = [], action) => {
if (action.type === "ADD_STATUS") {
return state.concat(action.statusMessage);
}
return state;
};
const notificationsReducer = (state = [], action) => {
if (action.type === "ADD_NOTIFICATION") {
return state.concat(action.notification);
@tamizhvendan
tamizhvendan / Snippets.cson
Created March 9, 2016 07:43
My Atom Code Snippets
'.source.fsharp':
'F# NUnit Test':
'prefix': 'test'
'body': """
[<Test>]
let ``$1`` () =
$2
"""
@tamizhvendan
tamizhvendan / Program.cs
Last active August 29, 2015 14:06
Verbs - Buried abstraction in OO World
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>();
// Populate Students List here
Student[] studentsSortedByName = students.ToArray();
@tamizhvendan
tamizhvendan / CallingHasFever.fs
Created September 26, 2014 05:33
if-your-fsharp-code-compiles-it-usually-works
hasFever (Celsius 10.5)
hasFever (Fahrenheit 22.5)
@tamizhvendan
tamizhvendan / PersonalDetail.cs
Created August 1, 2014 12:02
Using Ajax.BeginForm – ASP.NET MVC3 Ajax – Part III
using System.ComponentModel.DataAnnotations;
namespace UsingAjaxForms.Models
{
public class PersonalDetail
{
[Required]
public string Name { get; set; }
[Required]
public string Email { get; set; }
@tamizhvendan
tamizhvendan / EvilSubscriber.cs
Last active August 29, 2015 14:04
Observer Pattern using Delegates V/s Observer Pattern using Events and Delegates
namespace DelegatesAndEvents
{
class EvilSubscriber
{
WeatherStation weatherStation;
public void EvilMessage(int temperature)
{
Console.WriteLine("The temperature is " + (temperature * 100));
}
@tamizhvendan
tamizhvendan / HomeController.cs
Last active August 29, 2015 14:04
ASP.NET MVC3 Ajax Part II - Adding Animation to Action Link
public string GreetMe()
{
System.Threading.Thread.Sleep(2000);
return "Hello ASP.NET MVC3 Ajax !!";
}
@tamizhvendan
tamizhvendan / HomeController.cs
Last active August 29, 2015 14:04
ASP.NET MVC 3 Ajax - Part I
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
@tamizhvendan
tamizhvendan / AttackHandler.cs
Last active August 29, 2015 14:04
Dynamic Polymorphism
private void btnAttack_Click(object sender, EventArgs e)
{
weapon.Attack();
}