On the Lambda

Programming, Technology, and Systems Administration

On the Lambda

Entries Tagged as 'development'

Indexing a CSV file with .Net

November 28th, 2018 · No Comments · .net, stackoverflow

I recently answered Stack Overflow question, where I supplied what I believe may be a useful tool for indexing simple CSV data where you might not want to hold the entire data set in memory. I wanted to list it here, because I added the solution that supports CSV as an afterthought; the question does […]

[Read more →]

Tags:

PowerShell ExpandProperty vs Property

October 2nd, 2017 · No Comments · development, Powershell

I’m only an occasional PowerShell user, and therefore it’s taking some time to develop a deeper understanding of the language. I’m gonna share something that recently clicked for me that I think isn’t well explained elsewhere: using ExpandProperty, especially in combination with understand putting values vs Objects on the pipeline. ExpandProperty is part of the […]

[Read more →]

Tags:

The Missing DHCP snap-in for Windows 10 Remote Server Administration Tools

November 6th, 2015 · 4 Comments · .net, c#, development, networking, Powershell, servers

If you’re used to managing Windows Servers, you’re likely familiar with the Windows Server Remote Administration Tools. These tools are packaged as a download for each client (not server) version of Windows. They provide the same set of MMC snap-ins you’ll find on a server, such as Active Directory Users and Computers, DNS, or Group […]

[Read more →]

Tags:

There are worse things than Exceptions

October 21st, 2014 · No Comments · .net, c#, development, stackoverflow

A piece of advise I’ve given on Stack Overflow more than once is to avoid the File.Exists() method, and others like it. Instead, I’ll tell people to just use a try/catch block, and put their time into writing a good exception handler. I won’t re-hash the reasoning here, as I’ve already covered it before. One of those […]

[Read more →]

Tags:

Can we stop using AddWithValue() already?

May 12th, 2014 · 13 Comments · .net, c#, sql

I see code examples posted online all the time that look like this: cmd.Parameters.AddWithValue(“@Parameter”, txtTextBox1.Text); This needs to stop. There is a problem with the AddWithValue() function: it has to infer the database type for your query parameter. Here’s the thing: sometimes it gets it wrong. This especially happens with database layers that deal in Object arrays […]

[Read more →]

Tags:

The N Word

May 9th, 2014 · No Comments · sql, Sql Server

No, not that N word. I’m talking about N string literal prefixes in T-SQL. Like this: SELECT * FROM Foo WHERE Bar = N’Baz’ If you don’t know what that N is for, it tells Sql Server that your string literal is an nvarchar, rather than a varchar… that is, that the string literal may […]

[Read more →]

Tags:

The single most broken thing in CSS

April 16th, 2014 · No Comments · development, web

Like most web people, I have tasted the Kool-aid, and it was good. I believe in the use of CSS for layout over tables (except, of course, for tabular data, which happens more than people realize). However, CSS is also known for being quirky and difficult to master, largely because of weak browser implementations. If […]

[Read more →]

Tags:

Four basic security lessons for undergrad CS Students

February 17th, 2014 · 2 Comments · development

Security is a huge problem in the IT industry. It seems like we hear almost weekly about a new systems breach resulting in the leak of millions of user accounts. The recent breaches at Target and Kickstarter come to mind, and those are just the ones that made news. Often this is actually more of […]

[Read more →]

Tags:

Coding for Branch Prediction

June 27th, 2013 · 2 Comments · .net, c#, development

Modern CPUs don’t work the way most programmers think. We’re taught this model that a processor has an instruction pointer that increments through our code, jumping to the right place when we call a function or use a loop or conditional, and a line executes when the instruction pointer reaches that line. That used to […]

[Read more →]

Tags:

Simulated Dice Rolls with C# and Linq

March 22nd, 2013 · No Comments · c#, development

A common feature of certain table top role playing games is to have players roll dice for their character’s starting ability scores. Typically a score is the result of rolling three six-sided dice and ranges from 3 to 18. Quick: what is the expected outcome of a such a role? The answer here is fairly […]

[Read more →]

Tags: