Programming posts

Programming

Goldilocks and the Three Functions

2017-03-05

How much code is enough code? Does the phrase “less is more” apply here? Some people take pride in condensing their code into “one-liners,” but the reality is that makes for obtuse, unmaintainable code where defects love to hide. Sure, there are some cases where gaining performance or some other type of efficiency justifies writing code that’s a little hard to follow, but as a general rule I avoid this kind of code whenever possible.

Continue reading
Programming

Reading the Event Log with Windows PowerShell

2015-12-03

This post is part of the #PSBlogWeek PowerShell blogging series. #PSBlogWeek is a regular event where anyone interested in writing great content about PowerShell is welcome to volunteer for. The purpose is to pool our collective PowerShell knowledge together over a 5-day period and write about a topic that anyone using PowerShell may benefit from. #PSBlogWeek is a Twitter hashtag so feel free to stay up to date on the topic on Twitter at the #PSBlogWeek hashtag. For more information on #PSBlogWeek or if you’d like to volunteer for future sessions, contact Adam Bertram (@adbertram) on Twitter.

Continue reading
Programming

Internationalization with Import-LocalizedData: Part 2

2015-08-27

When I first sat down to write this post, this one came out instead. If you’re not familiar with the Import-LocalizedData Cmdlet, you might want to start there.

Continue reading
Programming

Internationalization with Import-LocalizedData

2015-08-24

Recently I was working on a PowerShell project that involved internationalization. When researching the best approach, I learned about the Import-LocalizedData Cmdlet and it made it incredibly easy to support internationalization in my scripts.

Continue reading
Programming

Strong Typing Considerations

2013-07-31

You could also call this one “Why I Hate JavaScript,” but there are many popular languages today that do not employ strong typing. JavaScript was just the language I happened to be working in when the following code had me pulling my hair out for nearly twenty minutes:

Continue reading
Programming

A Small but Useful PowerShell Script

2013-04-16

I always keep this little script handy for when I need to search my source code for instances of a particular word or phrase. Most modern IDEs have this kind of functionality built in, but you never know when you'll have to work with a language or tool that isn't quite as robust.

Continue reading
Programming

Ruby Woes - Can't Modify Self

2013-04-11

I’ve always liked to think that anyone can change if they want to badly enough.  After about half an hour of searching, I discovered that Ruby objects, within the context of class methods, cannot.  I was looking to extend the Numeric class (this is something really cool you can do in Ruby) to add a method that would “clamp” the number to be within a certain range, between a minimum and a maximum value.  For example:

Continue reading
Programming

Searching Your Code with Windows PowerShell

2010-08-12

I frequently need to search through source code to find references to variable and object names. When I got a new workstation running Windows 7 x64, I wanted to find a search utility that would take full advantage of all the horsepower I had at my fingertips. Previously, I had used Windows Grep, but There didn’t seem to be an x64 version available. After some searching I found a lot of people pointing towards Windows PowerShell.

Continue reading
Programming

Clean Code: A Handbook of Agile Software Craftmanship

2009-09-15

Author: Robert C. Martin

Continue reading
Programming

Version Control with Subversion

2009-09-11

Authors: Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato

Continue reading
Programming

Mandatory Programming Education

2008-10-06

I recently read this article at InfoWorld which discusses the idea of requiring students at the middle or high school level to learn how to program. The author, Neil McAllister, cites the increasing need for basic computer literacy in our technology-dependent world. While I agree that computer literacy is of critical importance today, I don’t entirely agree that courses on programming are the way to get there, at least not the way programming courses are taught currently.

Continue reading
Programming

Caching Object Data with Time Stamps

2008-09-18

When you build an application backed by a database, one of the things you want to minimize is the amount of data transfer between the application and the database. There are, of course, two types of data transfer: the application retrieving data from the database, and the application sending data to the database. In this post, I want to focus on the former type.

Continue reading
About Adam Platt

Adam Platt is a technologist with more than a decade of experience across the full stack. His passion for technology and penchant for rendering complex technical ideas into simple terms have made him an in-demand speaker. His resume includes BriForum, the PowerShell Summit, teaching engagements and more.

He is one of the 10 types of people who understand binary and he can solve a Rubik’s Cube.

About Adam Platt

Adam Platt is a technologist with more than a decade of experience across the full stack. His passion for technology and penchant for rendering complex technical ideas into simple terms have made him an in-demand speaker. His resume includes BriForum, the PowerShell Summit, teaching engagements and more.

He is one of the 10 types of people who understand binary and he can solve a Rubik’s Cube.