practice with watercolor

blake kathryn
Not today Justin

titsay
No title available

#extradirty
Keni

Discoholic 🪩
Cosimo Galluzzi
Game of Thrones Daily

roma★
$LAYYYTER
cherry valley forever

⁂
No title available
DEAR READER
we're not kids anymore.

祝日 / Permanent Vacation
Xuebing Du
h

No title available

seen from United States

seen from United Kingdom

seen from United States

seen from Türkiye

seen from Canada
seen from Latvia
seen from Germany
seen from Germany
seen from Iraq

seen from Indonesia
seen from United Kingdom
seen from Poland
seen from United States

seen from United States

seen from Trinidad & Tobago
seen from Argentina

seen from Canada
seen from Chile
seen from Vietnam
seen from Tunisia
@kappadotb-blog
practice with watercolor
10 features in C# that you really should learn (and use!)
If you start exploring C# or decide to expand your knowledge, you should learn these useful language features, which will help you to simplify the code, avoid errors and save a lot of time.
1) async / await
Use the async / await-pattern to allow unblocking of the UI / current thread when execution blocking operations. The async / await-pattern works by letting the code continue executing even if something is blocking the execution (like a web request).
Read more about the async / await-pattern here: https://msdn.microsoft.com/en-us/library/hh191443.aspx
2) Object / array / collection initializers
Create instances of classes, arrays and collections easily by using the object, array and collection initializers:
//Just some demo class public class Employee { public string Name {get; set;} public DateTime StartDate {get; set;} } //Create an employlee by using the initializer Employee emp = new Employee {Name="John Smith", StartDate=DateTime.Now()};
The above example can be really useful in unit testing but should be avoided in other contexts as instances of classes should be created using a constructor.
Read more about initializers here: https://msdn.microsoft.com/en-us/library/bb384062.aspx
3) Lambdas, predicates, delegates and closures
These features are practically a necessity in many cases (e.g. when using Linq), make sure to actually learn when and how to use them.
Read more about Lambdas, predicates, delegates and closure here: http://www.codeaddiction.net/articles/13/lambda-expressions-delegates-predicates-and-closures-in-c
4) ?? (Null coalescing operator)
The ??-operator returns the left side as long as it’s not null, in that case the right side will be returned:
//May be null var someValue = service.GetValue(); var defaultValue = 23 //result will be 23 if someValue is null var result = someValue ?? defaultValue;
The ??-operator can be chained:
string anybody = parm1 ?? localDefault ?? globalDefault;
And it can be used to convert nullable types to non nullable:
var totalPurchased = PurchaseQuantities.Sum(kvp => kvp.Value ?? 0);
Read more about the ??-operator here: https://msdn.microsoft.com/en-us/library/ms173224.aspx
5) $”{x}” (String Interpolation) – C# 6
A new feature of C# 6 that lets you assemble strings in an efficient and elegant way:
//Old way var someString = String.Format("Some data: {0}, some more data: {1}", someVariable, someOtherVariable); //NewWay var someString = $"Some data: {someVariable}, some more data: {someOtherVariable}";
You can put C# expressions in between the braces, which makes this very powerful.
6) ?. (Null-conditional operator) – C# 6
The null-conditional operator works like this:
//Null if customer or customer.profile or customer.profile.age is null var currentAge = customer?.profile?.age;
No more NullReferenceExceptions!
Read more about the ?.-operator here: https://msdn.microsoft.com/en-us/library/dn986595.aspx
7) nameof Expression – C# 6
So the new nameof-expression might not seem important, but it really has it value. When using automatic re-factoring tools (like ReSharper) you sometime need to refer to a method argument by it’s name:
public void PrintUserName(User currentUser) { //The refactoring tool might miss the textual reference to current user below if we're renaming it if(currentUser == null) _logger.Error("Argument currentUser is not provided"); //... }
This is how you should use it…
public void PrintUserName(User currentUser) { //The refactoring tool will not miss this... if(currentUser == null) _logger.Error($"Argument {nameof(currentUser)} is not provided"); //... }
Read more about the nameof-expression here: https://msdn.microsoft.com/en-us/library/dn986596.aspx
8) Property Initializers – C# 6
Property initializers lets you declare an initial value for a property:
public class User { public Guid Id { get; } = Guid.NewGuid(); // ... }
A benefit of using property initializers is that you can not declare a set:er, thus making the property immutable. Property initializers works great together with C# 6 primary constructor syntax.
9) as and is-operators
The is-operator is used to control if an instance is of a specific type, e.g. if you want to see if a cast is possible:
if (Person is Adult) { //do stuff }
Use the as-operator to try to cast an instance to a class. It will return null if cast was not possible:
SomeType y = x as SomeType; if (y != null) { //do stuff }
10) yield-keyword
The yield-keyword lets you feed an an IEnumerable-interface with items. The following example will return each powers of 2 up to the exponent of 8 (e.g. 2, 4, 8, 16, 32, 64, 128 ,256):
public static IEnumerable Power(int number, int exponent) { int result = 1; for (int i = 0; i < exponent; i++) { result = result * number; yield return result; } }
yield return can be very powerful if it’s used in the correct way. It enables you to lazily generate a sequence of objects, ie. the system does not have to enumerate the whole collection – it can be done on demand.
Source: https://www.codeaddiction.net/articles/15/10-features-in-c-that-you-really-should-learn-and-use
the 2016 watercolour sketchbook
🎵 - olmos - sweet love
textures & details
dear smile girl : )
Heavenly French breakfast sandwich with Gruyère, egg and prosciutto [2048 × 2048]
Welp now I know what I'm making for lunch
mood
Inktober originals and the Spooky Lookbook are back in stock!
http://koyamori.tictail.com/
(via https://www.youtube.com/watch?v=vbMQfaG6lo8)
Amazing!
Masterful Trailer
Ghibli Art 1
He still wants to keep it.
Friday Picture, Enjoy your Weekend Freedom.
40 Youtube channels for programmers
Youtube is not just a popular channel for everyone to broadcast their own images but also a rich source to provide a huge quantity of tutorials beneficial for everyone. Here is a collection of 40 channels that can be equally useful for a beginner and for an adnvanced coder.
For learning anything and everything of programming:
The Newboston
Mycodeschool,
Programming Tutorials,
Computerphile,
LearnCode.academy,
The Net Ninja
UCBerkeley
C++ for beginners, algebra tutorials, algorythms:
Xoaxdotnet
For learning basics and advanced skills in C++:
Bo Qian
For learning Linux terminal basics:
DougRumbaugh
For datastructures and algorithms:
Data Structures and Algorithms. Dr. Naveen Garg, saurabhschool , Paul Programming
Web development: Java, JavaScript, Python, Android, iOS, Swift:
SlideNerd
LearnWebCode
UI/UX design:
Mike Locke
Programming and fun:
Funfunfunction
Other good miscellaneous resources:
ProgrammingKnowledge
Google Developers
Derek Banas
Brad Hussey
O’Reilly
MIT OpenCourseWare
Simple Programmer
Computerphile
CSS-Tricks
Coder’s Guide
Easy Learn Tutorial
Adam Khoury
Programming Tutorials
Patrick WashingtonDC
Coder’s Guide – Neil Rowe
CodeGeek
JREAM
LevelUpTuts
Treehouse
Codecourse (formerly PHPacademy)
Programming tutorial
Easydevtuts
Add your favorite Youtube channels in the comments!
Source - https://hownot2code.com/2016/11/18/40-youtube-channels-for-programmers/
💻🙀#programminghumor #code #cat #programmingfun #cpp #dotnet
pollination
I Interrupt these comments to bring you this seductive banana. - Oporo