In this episode from October 2016: Learning the open/closed principle; new version control features in Visual Studio 2015; Clinical depression in developers; why programming is hard; password security; I Used to be a Human Being; and a video called “For loops considered harmful”.
Sharpen the Saw is a somewhat delayed repost of a semi-regular newsletter of information I publish for the professional development of software developers. While targeted primarily at developers working with the Microsoft technology stack, content will cover a wider range of topics.
To subscribe, send me an email and I’ll put you on the list. Membership is moderated.
Techniques
Always a way to improve the code you write every day.
An Example of the Open/Closed Principle in Action
The so-called S.O.L.I.D. principles are one good place to start learning about how to structure flexible and robust software. (Though, they’re not sufficient in themselves, so don’t stop learning once you know them.)
The Open/Closed principle is simple in principle but it can sometimes be difficult to see how to apply it. Jeremy Miller has a very interesting post detailing his use of the principle in the Marten project, cleaning up some old code and making it easier to add new features.
https://jeremydmiller.com/2016/03/08/an-example-of-the-openclosed-principle-in-action/
Former colleagues of mine who recognize ITimeSeriesCompiler
might want to check out the relevant codebase and look at how the Open/Closed principle allowed the introduction of pervasive caching (look for CachingTimeSeriesCompiler
) without making changes to any of the existing production hardened code.
Software and Updates
A new or upgraded tool can be a beautiful thing.
Improved Productivity with new Version Control Features in Visual Studio 2015
The second Update for Visual Studio 2015 makes some changes to the version control features, exposing more of the power of git. It’s a bit of a change from the prior version, I know it caught me out when I first updated. Of particular use are the additions to the status bar at the bottom of the window, making it easier to ensure your changes are pushed to the server.
(Aside: if you don’t already have Update 2 installed, skip straight to the latest version - Update 3. All Visual Studio 2015 updates are cumulative - keep an eye on Tools | Extensions and Updates
within Visual Studio to stay on top of updates.)
Being Professional
A great developer does more than just write great code.
The Programmer’s Great Clinical Depression
Over on the Simple Programmer Blog an interesting post by Jason Lowenthal talks about depression, what developers do that makes them vulnerable, and how to counter that to stay healthy.
As a bonus tip, consider the people you’re working with day to day. All too often we spend more time with people at work than we do with our friends and families. If you’re working with smart people who challenge you to do your best then you’re able to build up resilience to deal with the occasional negative event, or even to tolerate a toxic colleague.
https://simpleprogrammer.com/2016/10/07/programmers-great-clinical-depression/
Programming is Hard
Here’s one of the bigger dualities of being a software developer.
On the one hand, we want to convince our users that computers are simple, that using them is a good way to get their own goals achieved - we need to do this to be successful selling enough of our software that we can pay our own bills.
On the other hand, every good developer knows a simple truth - that writing good software is inherently difficult.
Communicating both of these truths to end users can be difficult because they are sometimes seen as contradictory. In his blog post, Remy Porter talks about this fundamental truth: “Programming is hard. And that’s ok.”
http://thedailywtf.com/articles/programming-is-hard
Bonus cartoon: http://www.commitstrip.com/en/2016/08/25/a-very-comprehensive-and-precise-spec/
Staying Secure
Staying safe online and writing secure systems are both harder than we think.
Password security is a very real challenge in today’s online world. We all know that password reuse is a bad idea, but the alternative of having a distinct password for every site seems like such a tremendous hassle.
(Aside: Good password security involves passwords that are hard to guess. This is why using family names, childhood schools, birthdates and phone numbers are poor choices for your passwords. This is also why incrementing the number at the end of your password each time it expires is a bad idea.)
It turns out that longer passwords can be just as secure as shorter ones, as long as you avoid phrases that might already be in the dictionary used by a potential hacker (unfortunately, this rules out lyrics of popular songs and lines from well-known poetry).
But if you can invent your own phrase, or put your own unique twist on things, you can have a passphrase that’s both memorable and secure.
Interestingly, NIST special publication 800-63 (still in draft) suggests that regular password expiry reduces operational security because users choose easier to remember passwords, being unwilling to invest the time to memorize a complex passphrase that won’t be needed for more than a short time.
Wildcard
Sometimes the answer is random.
I Used to Be a Human Being
It’s interesting to observe how thoroughly the smartphone has become entrenched into daily life for most people, especially since the start of the smartphone era is commonly measured from the introduction of the first Apple iPhone in June 2007, less than a decade ago.
We’re becoming ever more connected to those around us, able to respond in minutes when needed by our family, friends, colleagues, managers, facebook friends, twitter followers, etc etc.
But is this a good thing? Are we really taking the time to see the view in front of us when we spend our time fussing over a camera app and Facebook in order to “share” that we’re seeing the view?
Quoting this article from New York magazine:
A small but detailed 2015 study of young adults found that participants were using their phones five hours a day, at 85 separate times.
http://nymag.com/selectall/2016/09/andrew-sullivan-technology-almost-killed-me.html
Video of the Week
Take some time to feed your mind.
For Loops Considered Harmful
From the recent NDC Sydney conference, the thought provoking talk For Loops Considered Harmful talks about how you can use some simple functional concepts to make your day to day C# code easier to read, write and understand. The presenter, John Azariah, is one of my colleagues and he’s definitely a smart cookie.
Comments
blog comments powered by Disqus