Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

JP JPVenson

🎯
Focusing
  • Freelancer
  • Germany
View GitHub Profile
View gist:8eb2686b2f07d28014d0f4098d0e04c4
//CS Blazor WebAssembly Part:
public static class FileUtil
{
public static IEnumerable<List<T>> Partition<T>(this IList<T> source, Int32 size)
{
for (int i = 0; i < Math.Ceiling(source.Count / (Double) size); i++)
{
yield return new List<T>(source.Skip(size * i).Take(size));
}
}
View the_skills_poor_programmers_lack.md

The Skills Poor Programmers Lack

A friend and I had a discussion about the basic skills that are often lacking in experienced programmers. How can a programmer work for ten or twenty years and never learn to write good code? So often they need close supervision to ensure they go down the right path, and they can never be trusted to take technical leadership on larger tasks. It seems they are just good enough to get by in their job, but they never become effective.

We thought about our experiences and came up with three fundamental skills that we find are most often missing. Note that these are not skills which take a considerable amount of talent or unique insight. Nor are they "trends" or "frameworks" to help you get a new job. They are basic fundamentals which are prerequisites to being a successful programmer.

Understand how the language works

Programmers cannot write good code unless they understand what they are typing. At the most basic level, this means they need to understand the rules of

View Errorinvoke.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JPB.DataAccess.Manager;
using JPB.DataAccess.Tests.TestFramework;
using NUnit.Framework;
using NUnit.Framework.Internal;
View gist:841b9472e016dcd2a19354c7383ad1d3
This file has been truncated, but you can view the full file.
Mon, 08 Jan 2018 06:32:49 GMT
Connecting to host h2602619.stratoserver.net, port 5201
Reverse mode, remote host h2602619.stratoserver.net is sending
[ 5] local 192.168.178.21 port 51933 connected to 81.169.212.86 port 5201
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 8.41 MBytes 70.5 Mbits/sec
[ 5] 1.00-2.00 sec 9.97 MBytes 83.7 Mbits/sec
[ 5] 2.00-3.00 sec 9.89 MBytes 82.9 Mbits/sec
[ 5] 3.00-4.00 sec 9.88 MBytes 82.9 Mbits/sec
View gist:7e367062d13e9ed660eced8ee449b19a
"AppWorkshop"
{
"appid" "289070"
"SizeOnDisk" "406829"
"NeedsUpdate" "0"
"NeedsDownload" "0"
"TimeLastUpdated" "1517698998"
"TimeLastAppRan" "1517698383"
"WorkshopItemsInstalled"
{
View IEnumerableFormatter.cs
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Xunit;
View spchanged Example.cs
public abstract class NotifyPropertyChanged
{
public string GetPropertyName(Expression<Func<object>> propertyExpression)
{
var unaryExpression = propertyExpression.Body as UnaryExpression;
var memberExpression = unaryExpression == null ? (MemberExpression)propertyExpression.Body : (MemberExpression)unaryExpression.Operand;
var propertyName = memberExpression.Member.Name;
return propertyName;
}
}
View jsMin.cs
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace JPB.PersonalWebpage.Helper
{
public class Minify
{
private static Encoding DefaultEncoding(Encoding encoding)
View gist:c3186d4bcf4b4da630aaa96a79f275cc
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-16">
<title>Activity Monitor Log</title>
<style type="text/css">
body{ text-align: left; width: 100%; font-family: Verdana, sans-serif; }
table{ border: none; border-collapse: separate; width: 100%; }
tr.title td{ font-size: 24px; font-weight: bold; }
View Curse Detector.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Speech.Recognition;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace VoiceDetector
You can’t perform that action at this time.