Skip to content

Instantly share code, notes, and snippets.

/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@PeterStegnar
PeterStegnar / gist:98a742e1cb18320f8269
Created November 26, 2014 05:05
HTML + JS Traverse
traversion
erer_erer, ererer_eerre, ererer_ererer,
@PeterStegnar
PeterStegnar / CreatePingPongSchema
Last active August 29, 2015 14:10
Creating a Ping Pong data schema for MS SQL
-- Create schema
CREATE TABLE Player
(
Id int IDENTITY(1,1),
FirstName nvarchar(max) NOT NULL,
LastName nvarchar(max) NULL,
PRIMARY KEY([Id])
)

General

  1. Unit tests: Review unit tests first. Unit tests are a fantastic way to grasp how code is meant to be used by others and to learn what the expected behavior is. Are there any test gaps that should be there?
  2. Method arguments" Make sure arguments to methods make sense and are validated.
  3. Null References" (Yah yah, we know. Use F# and this goes away. We get it already.) Null references are a bitch and it’s worth looking out for them specifically.
  4. Conventions Consistency" Make sure naming, formatting, etc. follow our conventions and are consistent. I like a codebase that’s fairly consistent so you know what to expect.
  5. Disposables: Make sure disposable things are disposed. Look for usages of resources that should be disposed but are not.
  6. Security: There is a whole threat and mitigation review process that falls under this bucket.

WPF + ReactiveUI

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SO.15318438
{
class Program
{
AJAX ToolKit Navodila za VS.NET: http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-47-cs.aspx
///by Peter Stegnar
///SnippetID: 56dd1bc8-f917-440d-876b-ce4fa816f788
///Fell free to use - with this header
using System;
using System.Collections.Generic;
using System.Linq;
public class MyClass
{