- 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?
- Method arguments" Make sure arguments to methods make sense and are validated. Mentally test boundary conditions and edge cases.
- 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.
- 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.
- Disposables: Make sure disposable things are disposed. Look for usages of resources that should be disposed but are not.
- Security: There is a whole threat and mitigation review process that falls under this bucket. In simple terms, ask yourself how this code could be exploited. The [STRIDE Threat Mo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sete Atitudes para Hackear a Indústria de Software | |
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo =============================================================================================================== | |
set TOP=%1 | |
if not "%TOP%"=="" goto scanning | |
set TOP=1.5 | |
:scanning | |
echo Checking for java classes with versions higher than %TOP% in all .jar files in the current directory | |
del jarcheck.log | |
FOR %%j IN (*.jar) DO java.exe -ea -jar %~d0%~p0\jarcheck.jar %%~fj 1.1 %TOP% 2>> jarcheck.log > null | |
echo =============================================================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---- MIT LICENSE ---- | |
Copyright (c) 2011 John Gietzen | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Person { | |
public Person(string name, int age) { | |
_name = name; | |
_age = age; | |
} | |
private readonly string _name; | |
private readonly int _age; | |
/// Full name | |
public string Name { get _name; } | |
/// Age in years |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs b/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
index ce0a903..b34b498 100644 | |
--- a/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
+++ b/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
@@ -379,6 +379,20 @@ namespace Microsoft.CodeAnalysis.CSharp | |
return new PointerTypeSymbol(elementType); | |
} | |
+ case SyntaxKind.EnumerableType: | |
+ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var person="David"; | |
Console.WriteLine($_"Hello {person}"); | |
// Prints "Alô David" in pt-BR | |
Console.WriteLine($"Hello {person}"); | |
// Prints "Hello David" in pt-BR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class RingBufferStream : Stream | |
{ | |
private const int BufferSize = 1024; | |
private volatile int _totalLen = 0; | |
private volatile int _readPosition = -1; | |
private volatile int _writePosition = -1; | |
private readonly ManualResetEventSlim _locker = new ManualResetEventSlim(false); | |
private readonly byte[] _buffer; |
Here is a list of things to make sure to remember before publishing your Visual Studio extension.
Add the Microsoft.VisualStudio.SDK.Analyzers NuGet package to your VSIX project, which will help you discover and fix common violations of best practices regarding threading.
All extensions should have an icon associated with it. Make sure the icon is a high-quality .png file with the size 90x90 pixels in 96 DPI or more. After adding the icon to your VSIX project, register it in the .vsixmanifest file as both the Icon and Preview image.
OlderNewer