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 readingThis 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 readingWhen 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.
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.
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 readingI 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 readingI’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 readingI 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 readingI 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 readingWhen 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 readingAdam 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.
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.