Showing posts with label Learning. Show all posts
Showing posts with label Learning. Show all posts

Tuesday, January 1, 2019

Thinking Differently with SHENZHEN I/O

SHENZHEN I/O is a pretty compelling game. And it's also quite challenging. So what's a game review doing on a programming blog? Because it's helping me look at programming a bit differently.

In short, it's made me come up with new ways (for me) to solve problems due to limitations in the instruction set, lines of code, and memory. In addition, I've had to consider timing issues and hardware capabilities. I know that this will help me in my future programming, even if it's not applied directly.

What is SHENZHEN I/O?
In the game, you get a job working for an electronics company building and programming components. Why would you play a game about being at work? I'm not 100% sure (particularly since it includes things like undocumented instructions -- something that seems a little too real). But you should give it a try.

I'll start by saying that I'm not a hardware person. I haven't fiddled with IoT devices or Arduino, Raspberry Pi, or other electronics. I've always been interested in hardware, but I haven't taken the time to pursue it seriously. (It might be time to get the Snap Circuits back out.) This game let me get a taste of what it's like in that world.

You're given various tasks that consist of inputs and outputs. It's your job to put the stuff in the middle. Here's one of the early scenarios (that I already completed):


This is a simple score keeper. When the "point" input is fired, then you add 1 to the score. When the "foul" input is fired, you subtract 2 from the score (but it can't go below zero).

A Simple Program
You connect things using programmable modules, like this one:


The programming is through a limited set of instructions that is similar to assembly language. I've done a little hobby programming with assembly using the x86 instruction set, so these ideas weren't completely new to me.

To walk through this program...
  • teq 100 p1
    "teq" is "test equal", so this compares the value 100 with the input on p1 (which is connected to the "point" input). This value will be either 100 (button pushed) or 0 (button not pushed).
  • + add 1
    The "+" denotes that this line is only run if the test on the previous line is "true". (You can also have a "-" to run if "false"; this creates if/else structures.) The "add 1" will add one to the accumulator register (the "acc" on the screen). The accumulator will keep track of the current score.
  • teq 100 p0
    Similar to the first line, but this checks to see if the "foul" button is pressed.
  • + sub 2
    If there is a foul, then subtract two from the accumulator
  • tlt acc 0
    "tlt" is "test less than", so this checks to see if the accumulator value is less than 0.
  • + mov 0 acc
    "mov" will "move" the value of 0 into the accumulator. So if the accumulator is less than 0, it gets reset to 0.
  • mov acc x3
    Moves the value in the accumulator to the x3 output. This is hooked up to the LCD and shows the running score.
  • slp 1
    "slp" is "sleep". So this sleeps for 1 cycle. The program starts running over again at the next cycle.
This program is pretty simple. But it is only the beginning of the challenge.

Does It Work?
There is a verification section to check if the program is working:


This shows the inputs (point and foul) and the outputs (display). The inputs show the values changing between 0 and 100, and the display shows the expected output. If the output does not match, then the verification fails.

To help with debugging, there is the "Step" button which will pause after each line of code and the "Advance" button which will pause after the cycle is complete. You can also set breakpoints. This way you can inspect the values of the registers and otherwise see how the program behaves.

More Challenge
There is a certain amount of accomplishment in getting something to work, but there is also a challenge of being efficient. For example, the module above costs ¥5. But there is a simpler module that only costs ¥3 that we can use:


This module has a smaller number of I/O ports (4 instead of 6), but it has the 3 we need for this implementation. In addition, it allows for fewer lines of code (9 instead of 15). But since we have 8 lines of code, it fits fine here.

This is all important because you're also graded on how much things cost and how efficient they are:


This shows the "Production Cost" based on the modules that are used, and it also has "Lines of Code" which is self-explanatory. The "Power Usage" stat is a bit harder to gauge, but the power usage at each step is shown on the module. The white line on the graph shows the stats for this implementation. The outlines on the graph show what other people have done with this scenario. So this shows that my implementation is in line with what most people have achieved. Some people have lower power usage, but potentially at more cost or lines of code.

It's fun to come up with a solution, and then try to optimize it.

Challenges Ramp Up
Things get more complicated very quickly. Here's an example of something that I fought with for several hours just to get something working:


This is an alarm system. There is a "sensor" that gives values between 0 and 100. If it is higher than 20, we potentially want to sound the alarm. But in addition, there are also "on" and "off" times that specify when the alarm should be armed. So you need to get values from the real-time clock ("rtc"), compare it to the set times to see if the alarm should be armed, and also check the value of the sensor.

This was most frustrating for me because I was having trouble getting all of the modules I needed (or thought I needed) to fit along with the connecting circuits. This works (yay!), but the stats do not look good:


The stats show that my cost is ¥13. Most people had a cost of ¥8, and some people got the cost down to ¥6. My lines of code is equally high at 29, where most people could get it down to 11.

Since I had so much trouble getting this to work to start with, I didn't spend much time trying to optimize it. I'm pretty sure that I would need to take a completely different approach to the problem. I might take another shot at this in the future.

Thinking Differently
The thing that I've found most compelling about this game is that it has made me think about problems differently. I'm used to effectively unlimited resources when I write programs. I rarely think about memory usage and never think about clock cycles. The constraints create a completely new challenge.

Limited Instruction Set
The limited instruction set makes me think about the most basic operations. There are ways to do if/else and simple loops, but I often found myself wanting a nested "if" or the ability to compare 2 conditions at the same time. Here I have to break problems down in a different way than I usually do.

Restricted Lines of Code
Each module only allows for a handful of instructions. It's a challenge to write things in 15 lines of code or less, particularly when each line is single simple instruction.

Limited Storage
While there are memory modules that can be used (I haven't gotten to those scenarios yet), temporary values are stored in registers. The simplest module has a single accumulator register, and even the more complex modules only have 2 registers. I'm used to local variables where I can store temporary values. There's none of that here. So again, I have to think about the problem a bit differently.

Register Math
There's no way to simply add two values together. Instead you have to use the registers. For example, to add 2 and 3, first you "move" the 2 into the accumulator. then you "add 3". The "add" and "sub" operators always operate on the value in the accumulator. This wasn't too bad for me since I've encountered this type of math before, but it does force you to approach things a bit differently.

Hardware Constraints
The thing that has been most of a challenge is the hardware part. Each module has I/O ports that operate in different ways. Some of them are state-based (meaning, if you change the value on the port, it stays there). Others are blocking (meaning, a write operation blocks the program until the value has been read at the other end).

Other Things I Will Try
The game also has some "experiment" tasks where you're given an empty space to do whatever you'd like. I'm sure I'll play with this a lot more. Several years ago, I read Code: The Hidden Language of Computer Hardware and Software by Charles Petzold (Amazon link). I found this book very interesting because it shows the basic circuits that make up a CPU and how to build things using simple gates (AND, OR, NOT). This was particularly enlightening for me since I did not take CS courses in college. After reading the book, I wanted to go to the electronics store and get some switches and such to build an 8-bit adder. I never got around to that, but I'll take a shot at it here. This can be an interesting playground where I don't have to worry about ruining real hardware.

Wrap Up
SHENZHEN I/O is a pretty fun game. I've played for 6 hours, so I haven't invested a whole lot of time into it. But I see it as something that I'll keep going back to when I'm looking for a challenge.

It's very easy to get too comfortable in whatever environment you happen to be working in. It's good to shake things up now and again. I've found that even if I don't directly transfer those skills, they still color how I do things. And new solutions to problems come out of that. So try something new, and keep exploring.

Happy Coding!

Tuesday, April 25, 2017

Thank You, Linda Rising

I recently looked back at the impact that Linda Rising has had on my career and life, and I wanted to express my gratitude for that.

I first heard Linda on the Hanselminutes podcast back in 2013: The Agile Mindset with Linda Rising. Listening to her describe the agile mindset compared to the fixed mindset really opened my eyes. I immediately watched a recorded keynote called "The Power of the Agile Mindset" (the link I had to that is sadly no longer working).

The short version: With the fixed mindset, we have a certain potential that we can reach for any particular area. This leads to "I'm good at this; I'm not good at that." With the agile (or growth) mindset, we can get better at whatever we put effort into. This leads to "I can learn to be better at this."

This clarified some of my observations and led to quite a bit of self-reflection. (Here's the long version if you're interested: Fixed vs. Agile Mindset.)

Initial Realizations about Others
When I heard this concept, certain things immediately started to make sense. For example, there was a development team where the managers refused to invest in the developers. Instead, they were constantly looking for the process or tool that would make the team successful. This always frustrated me to watch, but I realized that the management had a fixed mindset toward their team: "Our developers are as good as they are going to be, so we need to look for solutions elsewhere."

I've always had the opposite opinion about developers. And fortunately the team that I joined when I was a brand new developer believed that as well. With the agile mindset, there wasn't anything that we couldn't learn. We were constantly building each other up and making each other better. I know that my situation was fairly unique, but I really wish that all junior developers could have such a productive environment.

And since I'm a speaker, coach, educator, Developer Betterer, I obviously have this mindset toward the developers that I'm teaching. And I don't think of it as teaching most of the time, I think of it as helping people past the hurdles that I had trouble with when I was learning a particular topic.

Initial Realizations about Myself
The real eye-opening moment, though, was when I started to reflect on myself. I found that I had the agile mindset in some areas and the fixed mindset in others. For example, when it came to technology, I was pretty confident that I could learn whatever I put my mind to. But that wasn't true of all areas of my life.

When it came to things like music, I thought of myself as "not a musical person". On reflection, I came to realize that I had never put any real effort into it.

I had a few more realizations that you can read about in my original article: Fixed Mindset vs. Agile Mindset.

Changing My World
I decided to get over my hurdle with music. So, I bought a banjo in January 2015. And I set about to learn to play it. And I made progress.

But more importantly, I was able to use the banjo as an object lesson for others.

Learning Something New
First, I did something I never would have done before: I played a musical instrument badly in front of other people. There was a time in my life when I would never think about playing for others unless I knew the piece perfectly. But now I'm okay with showing that I'm not an expert and that learning takes time: You Aren't Instantly Awesome, and That's Okay.

This has been a great way to talk about learning in our industry. As developers, we're constantly having to learn new things. And it's really easy to feel inadequate when there are so many people who already know this new thing. But we all have to start somewhere, and everyone has to go through that same learning process.

Getting Better
The good news is that I tracked my progress with the banjo. And I did see actual progress: You Aren't Instantly Awesome, But You Can Get Better with Practice.

What this proved to me is that I am a musical person. And I can get better when I put the effort into it.

Getting Help
Another thing I learned is that once I dropped the fear of being imperfect, I was no longer afraid of asking for help from the experts. Again, specifically with the banjo, I was able to get help from a former professional player and from a professional music instructor. (Read more about that here: Don't Be Afraid to Show What You Don't Know.)

In the technical world, I've never been afraid to ask for help. But by going through this experience, it reinforced the idea that there's nothing to be ashamed of when you don't know something. I like to try to figure things out on my own, but I have no trouble asking for help when I get stuck. And this has led to some great learning experiences (particularly from the functional programming community which is so willing to help out).

Unfortunately, our industry has a general fear of showing weakness. I'm trying to promote the fact that no one knows everything, we all have our strengths and weaknesses, and we all have to start somewhere. I would love to see that fear disappear.

Giving Help
The extension of this is that I'm not afraid of giving help when asked. I don't think that I've ever really had this problem personally, but there are some known problems with this in our industry.

So I encourage other people to help the people they can. And there is always someone who knows less than we do, someone who has not had the same experiences that we've had, someone who has not yet struggled through the things we've struggled through. So whatever level we're at, we have something to share. Please, Help Those Behind You.

Thank You, Linda
I can trace a lot of this back to hearing Linda Rising talk about the ability that we all have to learn and improve when we put effort into it.

Thank you, Linda, for opening my eyes to a topic that I've been able to use to better myself and better those around me. I knew that this had an impact on me, but looking back, I see just how much of an impact it has had. Over the course of 3-1/2 years, the idea of learning and getting better at whatever I put my mind and energy into has given me opportunities and helped me make the world a better place.

Monday, March 6, 2017

Rediscovering Fire: Effective Learning?

So I've got a bit of a dilemma. I ran across an article today (thanks to Tomas Petricek (@tomaspetricek) for pointing it out), and after drilling into it a bit, I felt like I've been rediscovering fire while I've been learning functional programming.

So here's the question:
"Does the rediscovery make the learning more effective?"
The Article
The article in question is from Eirik Tsarpalis (@eiriktsarpalis): F# and Purity. This is a great read, particularly if you've been trying to reconcile functional and imperative programming (like I have). Go read it now.

But as I read the article (and started following some of the links), I found quite a few things that looked familiar.

Down the Rabbit Hole
When I started learning functional programming, I tried to be "pure", meaning that I wanted to use functional concepts all the way down. Eirik points to an article about Fibonacci Sequences by Adam Esterline: Fibonacci Sequence in Haskell. If you've tried to write Fibonacci sequences in Haskell, go read this now.

Haskell by it's nature is a "pure" functional language in that it doesn't let you do those imperative things that we have access to in things like F#. But there are still different ways to implement the Fibonacci sequence.

Adam points to the "Slow but Easy" method using recursion. This looked very familiar, because I created something very similar, thinking that recursion was the "right" solution to this problem.

Here's my code (more on this here: A Functional Fibonacci Sequence (as learned by an imperative programmer)):


This code works, but it is *SLOW*. It takes over 20 seconds to calculate the 35th place. And it just gets slower from there.

Adam shows a similar slowness and points to a solution in Haskell using "zipWith". This is a solution that I ran across as well:


This solution is *FAST*. I thought I understood how this worked (and tried to explain it a bit in my article), but Adam points to a better explanation on StackOverflow from someone who understands how Haskell works: Understanding a Recursively Design List. (You should definitely read this as well.)

Granted, Adam's article was published after mine, but the StackOverflow answer was published years before mine. So this information has been around for a while.

So I struggled through this problem (speed of the recursive implementation), and I asked questions from functional devs who have much more experience than I do. This questioning led me to look for other solutions, and it made me understand that I wasn't "doing it wrong" because I didn't use a standard recursive function implementation.

Popping the Stack
So back to Eirik's article. The core of the article talks about how "pure" functional programming is all based on mathematical functions, but our CPUs and environments aren't really set up to deal with these things. Instead, our environments (in my case, Windows and .NET) are really set up to deal with imperative programming.

The result is that if we program only with pure functions, we often run into issues of performance, heap usage, and even stack overflows (which I'm pretty good at generating).

The solution is a compromise: we keep our functions externally "pure", meaning discrete input leads to deterministic output, no mutation or shared state, etc. But we can use imperative code inside of those functions. We just need to make sure the imperative bits don't leak out of our functions.

Again, this sounded really familiar. When I was working on my Digit Recognition application, I was using code from Mathias Brandewinder's book on machine learning. I ran into some performance issues. The functions that he created were great for batch processing, but I was running the functions in a different way, which meant I was running them over and over again.

Here's the original function (you can read more about it here: Exploring the Digit Recognizer with F#):


To me, this seemed like the "right" way of coding this. It was using the functions on the Array object, and it was piping results from one function to another. But this was *SLOW*.

I had a chance to talk to Mathias about this. I showed him my F# code (above) and also the C# code that I had (which used "for" loop). The C# code was significantly faster. So he said that we could do the same thing in the F# code:


This made things significantly faster. I'm really glad that Mathias recommended this because he is a serious functional programmer, and it was like it gave me permission to cheat.

But when I looked at it more closely, it really wasn't cheating -- for the same reasons that Eirik gives in his article. In this case, there is mutable state inside the function, but that mutation never leaks out. It is contained in the function itself. From the outside, this function is "pure" it takes 2 arrays and returns a deterministic result.

(If you're interested in the Digit Recognizer project, here's where you can find all the articles: Machine Learning (sort of)).

Rediscovering Fire
I feel like quite a bit of my learning in programming has been about rediscovering fire. These are just two examples from the functional programming world. And that brings us back to the original question:
Does the rediscovery make the learning more effective?
I know that in my case, going through the pain of finding out that my solution had serious performance issues is what spurred me to look for other solutions.

Pretty much every talk that I do is based on some pain or hurdle that I had in my development career. My goal is to help other developers over those hurdles. I get stuck easily, and I also get easily frustrated. I don't want other folks to get stuck and frustrated.

Finding the Balance
If we are constantly rediscovering fire, then we won't make progress beyond those who came before us. We'll just keep walking the same road over and over again.

If we don't go through the pain ourselves, then we don't fully appreciate the solutions that we are using. I know that when I was a young programmer, I didn't think that I needed to follow "best practices" (okay, so I really hate that term, but I'll use it anyway). When I got myself into trouble too many times, I finally learned that "best practices" are a good place to start, particularly if I'm new to an environment.

There's a balance somewhere here. A place where we can learn from our own pain, but we can also learn from the people who came before us.

I need to keep this balance in mind for myself and also for the developers that I teach on a regular basis.

Happy Coding!

Saturday, December 31, 2016

2016 Year in Review

It's been an interesting year. I've traveled quite a bit, met a lot of great people, made some friends, and learned some new things.

Note: This article is primarily for myself. It's for me to review my year and see what kind of progress I've made compared to previous years. I recommend that you do the same. Compare yourself to yourself last year. Do not compare yourself to me.

Travels
I did quite a bit more traveling this year compared to last year. I was away from home for 95 days (and my cats weren't too happy about me being away that much). But I got to see a lot of new places:

2016 US Travels
2016 European Travels

Fortunately(?) Google has been tracking me all year, so it was pretty easy to get these maps.

I was on lots of airplanes this year (okay, so it was 41 airplanes). A side-effect of that is that I got Silver status on United in April and then Gold status in October. I've also got to know the Denver and Houston airports pretty well.

And even though there are dots on the map for Stockholm and Copenhagen, those were just airport changes (although I did get to learn what a French hot dog was while I was in Copenhagen).

Speaking
I had a really great time speaking this year. I spoke at 35 events - a mix of user groups, corporate events, code camps, regional events, and professional events.

User groups are great because it gives us lots of time with a topic. It's also a bit less formal, so we can dig into questions and have a good conversation. I spoke at 16 user groups, mostly .NET-related since that's where most of my technical talks live. But I also spoke at a couple agile-related groups as well.

I managed to make it to 3 code camps this year. Code Camps are great because they give developers a great chance to get tons of free information all in one place. It's also a great place for developers to get started as speakers. Unfortunately, I didn't get to either of the So Cal Code Camps this year; I had conflicting events. I'm going to try to make it to them in 2017.

My biggest change this year was speaking at regional events. These are great opportunities for developers to get some great information for a lot cheaper than a professional conference. I spoke at 7 regional events (up from 2 last year).

One really cool thing is that I was asked to keynote at AIM/hdc. I had a really great time doing this.

I had the chance to speak at 4 professional events (including 2 outside the US). This was great particularly since I spoke at my first professional conference late last year.

Workshops
I got to expand into something new this year: full-day workshops. This gave me a chance to get into a bit more detail and also engage with folks a lot more. I did 4 workshops, and each was a bit different. The groups ranged in size from 4 to 35. Some people worked together, some were complete strangers. And I got to work with developers with different levels of experience.

I'd like to expand to do more workshops. And I've learned quite a bit from my experience this year. One challenge is that some venues want a majority of lecture and some venues want a majority of labs. I'll have to plan for a lot of flexibility so that I can get the right mix for a particular group.

Note: if you're trying to get the numbers to add up, it doesn't quite match up. That's because there's a bit of overlap for some of the events/workshops. If you're curious, you can check the list of all of the events on my website.

Recognition
I've been meeting more and more people at events who know me through Pluralsight or podcasts or my blog. A big reason why I've been speaking so much (other than I really love to do it) is to help build my brand and get more recognizable.

Here's the best comment that I've received this year (from someone at Music City Code):

"You are a lot taller than you seem on Pluralsight."

Get Your Request In
If you'd like me to come to speak at a particular event, send me a request. There are too many good events to make it to all of them (and I think I traveled just a little too much this year), so I'll have to make some tough choices. If someone puts in a request, it will go to the top of the list.

Consulting
I did a bit less consulting work this year than I did in 2015. I haven't been pushing this much, but it's something that I really love to do.
I don't want to write your code;
I want to make it so your developers can write your code.
I really enjoy helping people in this area. Many times, I'm working with a small team of 2 or 3 developers who don't have an expert in their group. The problem in that scenario is that you don't know what you don't know.

I've had a chance to help out these teams by doing a code review and looking at the pain points that they have. Based on that, I can give guidance on technology and techniques that can help them improve their situation. And if they aren't familiar with those techniques, it gives me a chance to do some teaching.

And that's what I really love to do: make developers better.

I'll be looking to expand this work in 2017.

Streams & Podcasts
I've had several people ask to be part of their streams and podcasts this year. Dave Rael invited me to come back onto the Developer On Fire podcast, Scott Nimrod invited me to have a conversation about programming where we talked about all sorts of stuff, and Steve Bishop invited me to show some of my experience (and problems) with TDD.

I really enjoyed these opportunities because I get to be part of conversation where we can bounce ideas off of each other.

Becoming a Social Developer
There have been some great opportunites for me to share "Becoming a Social Developer" this year. At NDC Oslo, they gave me a full hour to talk about it. It went much better than expected, and I was happy to see the positive response.

"Becoming a Social Developer" at NDC Oslo
I also got the chance to share a bit at Code PaLOUsa in Louisville, KY. A big thanks to them for giving me 10 minutes to share.

Also, a big thanks to David Neal (@reverentgeek) for giving me some time during his keynote at Music City Code in Nashville, TN. That was another great opportunity for me to share (and get some great pictures from the event photographer).

"Becoming a Social Developer" at Music City Code

As already mentioned, Dave Rael invited me back to Developer on Fire to specifically talk about "Becoming a Social Developer". And at AIM/hdc, they requested that I include the topic as part of my keynote presentation.

I'm still amazed at the reaction to "Becoming a Social Developer". It really resonates with quite a few people. I have some opportunities coming up in 2017 to share (including SDD 2017), and I'll be looking for others as well.

Friends
One really great thing about all the travel this year was that I got to meet a lot of great people. In addition, most of the regional events that I spoke at were in the same part of the country. This meant that I got to spend time with the speakers who were making the circuit. At each event, it seems like I got to know one or two people really well. You can read a bit more about it in an article I wrote earlier this year.

I didn't realize how large my circle of friends had grown until I went to the Microsoft MVP Summit in November. I felt like I knew twice as many people as I did the previous year, and this was just from people I had talked to at various events. I spread myself a bit thin at the summit since I wanted to spend at least a little bit of time with everyone that I knew.


And this was just from folks who were at the Microsoft MVP Summit. A lot of the friends I've made were not there. It really made me think about just how big my circle has expanded this year. It's an interesting experience for someone who is not typically a social person.

Videos & Blog
Because of all the traveling, I haven't spent as much time with videos and blogging. (I'm really amazed at how exhausting traveling can be.)

My YouTube channel has been a bit dormant. I published 4 videos this year (compared to 10 last year).

My blog has been a bit down as well. I published 74 articles, including this one (compared to 86 last year). I did have some good series on Euler problems, learning F#, unit testing, and asynchronous programming. In addition, I found myself writing quite a bit about how to help other developers and what we can do to improve the culture of our industry.

Learning
I've learned quite a bit this year. Most of what I've been experimenting with has turned into blog articles, so the list looks pretty similar to what I wrote above: learning F# (using Euler problems), unit testing and TDD, asynchronous programming, and more.

This coming year, I'd like to expand more into machine learning, and I feel like I need to look at containers (like Docker). To go along with the machine learning, both Azure Functions and AWS Lambda look really interesting.

I haven't looked at .NET Core much at this point, primarily because I don't usually do much with pre-release technology. Once it releases (along with the tooling coming with Visual Studio 2017), I'll be looking at it a bit closer.

A great side effect of speaking at so many events is that I'm also attending those events. This has given me a chance to hear great speakers talk about a variety of different technologies. I don't know how many of them will become part of my regular development, but it's important to know what they are good for. Then I can take a closer look when the right problem comes up.

Being Human
A lot of the conversations that I've had with other developers this year have not been about technology. They have been about being human. This is something that is really easy to ignore or suppress in our industry, but it is a very important area. We learn about ourselves, we learn about the people we work with, we learn about the people that we build software for.

I'll be exploring this topic a lot further in the coming year.

Coming in 2017
I'm not quite sure what's coming for me in 2017. I don't have a list of goals for the year. There are times that I feel like I'm living life a bit by accident. But I've also found that the things that I run towards usually don't work out, and that better opportunities come up that I haven't planned. (And for those of you who are curious about my high risk decision, I'll be giving an update in the next couple weeks.)

With that said, I'm heading in a general direction. I don't know exactly which path my journey will take, but I know that it will be an interesting one.

Remember, in the coming year, don't compare yourself to those around you. We all take different paths, and those comparisons are not valid. Compare yourself to yourself in the past. And use that to improve yourself going forward.

Happy Coding!

Tuesday, October 4, 2016

Asking Questions Shows Strength, Not Weakness

Our development culture has an element that I would like to eliminate: a fear of showing weakness. (There are other things I would like to eliminate as well, but this is the one I'm going to talk about today.)
Asking Questions Shows Strength, Not Weakness
There are some environments where people are afraid to ask questions from other members of their team. The reason for this fear is the response. Either the question is treated as a "stupid question", or the response is condescending ("I can't believe you don't know this"), or the person answering the question takes it as an opportunity to show off ("Let me demonstrate how much smarter I am than you").

I was extremely fortunate that the team I "grew up" with was not like this. But I have seen these teams personally, and I have talked to many developers who have been in these environments.

Why Now?
This is a topic that has been on my mind quite a bit. But it really came to the front of my mind this past week. I did several talks, including a user group, a workshop, and 2 code camp sessions. At least two times, when someone asked a question, they prefaced it with "This is probably a stupid question, but..."

The reason to preface a question like this is because we're really saying, "I'm not normally this weak, but..."

Before answering, I always say, "There are no stupid questions." We are trying to learn something new. New things don't always make sense the first time. We often need some clarification to really grasp the topic.

On top of that, we all have different histories, different experiences, different backgrounds. That means that we will have questions that are based on our own experiences. My questions will be different from your questions just because we have different experiences.

You're Not the Only One
Unfortunately, we have a fear of asking questions built in. When we look around, we see a lot of other people who are *not* asking questions. So they all must understand things, and I'm the only who who doesn't get it.

But in reality, we don't know what other people are thinking. We are comparing our insides (what I'm thinking and understanding / not understanding) with everyone else's outsides. We don't actually know if they understand it or not; we're making assumptions based on an invalid comparison. (BTW, This is exactly the same problem that leads to Impostor Syndrome. Scott Hanselman has a good article for devs: I'm a phony. Are you?)

When someone asks a question, I know that they aren't the only one with that question. How do I know? Because I do the exact same talks over and over again. And I will get the same questions over and over again. (As a side note, I'll add material to my talks to try to clarify and eliminate these questions where I can, but sometimes it's difficult.)

When someone asks me a question during a talk (or later in an email), it will often turn into a blog article. First because I don't always have time (or the knowledge) to go into detail during the talk. And second because I know that there are other people who have the same question.

Eliminating Fear
It's important that we eliminate this fear in our environment. Developers should be free to ask questions about things they don't know. It does not show weakness, it shows strength.
Without Questions, No Learning Takes Place
Our biggest assets in a team environment are the other team members. If the team members are afraid to ask questions, then no knowledge gets shared. This leads to a stagnant team. And in that situation, no one wins.

I have seen teams where the team members were afraid. Developers were afraid to ask questions because they didn't want to look weak. Developers were afraid to give answers because if they shared what they knew, they would be less vital to the team. These teams never succeeded. The team members were frustrated, discontent, and without hope. I really wish that I could have done something to change their environment, but it was built in to their entire political culture at the management level.

Breaking the Cycle
There are two things we can do to break this cycle.

1. Ask questions when you need help.
I would suggest doing some due diligence first. I spend some time researching the topic to see what I can find in documentation or forums. But I'll eventually get to the point where I can't get the answer on my own. At that point, I ask a question.

Some teams have a rule: If you spend more than 15 minutes trying to figure something out, you *must* ask for help. (There's usually a corollary that you must spend 15 minutes trying to figure something out for yourself *before* you ask for help. This is to encourage people to be an active part of learning rather than simply letting someone else do the work for them.)

2. Answer questions, and be supportive when you do.
When someone comes to you with a question, answer it. If you don't know the answer, help them find it or refer them to someone who might know. During this process, be supportive. Never act like the question is a stupid question. Don't take the opportunity to show off how smart you are. Make sure you answer the question in such a way that the person would be comfortable asking again in the future.

You Don't Know Everything
Here's a reminder: You don't know everything. And here's another reminder: No one else does, either.

It's okay to ask for help. It's okay to ask when you don't understand something. It's okay to ask for other resources that you can look at. This doesn't show weakness; it shows strength.
When we ask a question...
We are saying that we are interested in learning something new.
We are saying that we are not content with what we already know.
We are saying that we want to move forward.
Change the Culture
I'd really like to see a change of culture in our industry. I would love it if no one was afraid to ask for help. I'm not quite sure what needs to be done to change that. I'm going to encourage people to ask for help when they need it (Don't Be Afraid to Show What You Don't Know) and to help people who do ask for help (Help Those Behind You).

If you're stuck in an environment that doesn't encourage this, you have two options: Change your job or change your job.

If you can change the culture where you work, that's awesome. And all of your other team members will benefit from that. But if you can't change the culture, you need to make sure that you take care of yourself. In those instances, it might be best to leave and find a more productive environment.

Above all else, move forward. When we ask questions, we have the opportunity to learn something new. We can't control the response. But we can find the people who are happy to help us. There are lots of them out there.

Happy Coding!

Monday, May 2, 2016

Don't Be Afraid to Show What You Don't Know

For some reason, there's a fear of showing weakness in our industry. But the truth is that we can't know everything - there's just too much technology out there.

I've been using my banjo as a learning tool (and a teaching tool). That really wasn't the plan when I first got it, but that's how things have turned out.


I've had my banjo for over a year now, so I really can't use the excuse of it being "new" anymore. I am getting a lot better (close to competent). And the continuous improvement is really what I'm looking for.
I've found more and more opportunities for me to learn something new by showing what I *don't* know.
Showing What I Don't Know
A couple weeks ago, I was at the Utah Code Camp, and I ended up having lunch with Joe Dean (LinkedIn). We had a great conversation. Joe has a background in music, and he's just getting started with a career producing video games.

I had my banjo with me, and Joe asked if I would play for him. This is a first; I think he's been the only one brave enough to actually ask me to play. I showed him a few things that I had learned, including the progression from my first banjo book: Bluegrass Banjo for the Complete Ignoramus by Wayne Erbsen (Amazon link).

I also played some of the songs that I was working on (a couple that I'm pretty good at and a couple that I'm still learning).

Joe is a guitar instructor, and he gave me some affirmation and some advice (this is always a great combination). First he commented on the way that I held the instrument -- he said that I wouldn't cause myself injury by the way I held it. That was great to know since I don't have an instructor and I've just been learning on my own through various sources.

Next he gave me some great advice on learning to play faster (which is something that I'd like to do). He recommended that I get a metronome app and slowly ramp up the speed. He said to start somewhere comfortable (like 120 beats per minute). Then to get faster, up it by 6 bpm and get comfortable with that. By going step by step it will make the progress easier. He said that people who try to speed up too quickly often just get frustrated. (And I can understand that.)

It was really great to talk to Joe (and this was just another unexpected conversation from a developer event that turned into something awesome). And I'm very thankful that he was so willing to share.

A Found Opportunity
So this opportunity to learn from someone who was well-versed in a particular field came up because I wasn't afraid to show what I *don't* know.

When starting something new (whether music or the latest JavaScript framework), we aren't instantly awesome, and that's okay. Don't be afraid to show what you don't know. That will give you the opportunity to learn from someone who is farther along the path.
And be sure to help out those that are on the path behind you.
It's great to be able to help someone over a problem that you have struggled with yourself. This is how we all get better together.

Still Making Progress
And in case you're wondering, I am still making progress. Here's a recording from the Central California .NET User Group in Fresno from a couple weeks ago.


If you'd like to see the rest of the presentation, you can watch it on YouTube: JeremyBytes Live.
Keep moving forward.
Don't be afraid to show what you don't know.
Don't be afraid to ask questions.
Help those who are on the path behind you.
Happy Coding!

Thursday, December 31, 2015

2015 Year in Review

It's time to see how things went this year. That's how we make sure the next year is even better. I feel like I was really busy this year, and I also feel like I didn't accomplish all that much. So let's take a look.

Speaking
Of course, speaking is at the top of my list. This is something I love to do. It makes me feel really good to watch people learn and to hear about how I was able to give someone new ideas or help them over a technical hurdle.

And I was busy. I spoke at 28 events and did 47 presentations. I did a bit more traveling further from home this year, which means I was on 21 airplanes. (I know that's not a lot to some people, but it was to me.) New states on my speaking list include Florida, Nebraska, Colorado, Michigan, and Wisconsin. You can see a full list of my activities here: JeremyBytes - Demos.

Needless to say, I really enjoyed the events that I went to this year. I met a ton of great people. And speaking of meeting new people...

Becoming a Social Developer
I've had a great adventure breaking out of my shyness at developer events to talk to new people. This year, I formalized things a bit with a website and newsletter: http://www.becomingasocialdeveloper.com/



I've had a chance to share this on the .NET Rocks podcast as well as at the LIVE! 360 conference in Orlando.

As more and more of us talk to each other, we learn from each other's experiences, we get perspectives other than our own, and we become stronger as a developer community.

Milestones
I hit 2 really big milestones this year (and a few smaller ones).

.NET Rocks!
The first was being a guest on the .NET Rocks! podcast. This is a podcast that I listened to when I was a corporate developer. And 6 years ago, this podcast inspired me to go out and speak publicly for the first time.

I always had a "dream" that someday I would be a guest on the show. It wasn't very a very serious dream when I first had it (back when I was a not-at-all-notable developer). But as my circle grew bigger and bigger, I started to interact more with people who had been guests on the show. And I had a few chances to interact with the hosts (Carl and Richard) as well.

So, when I was hanging out with some folks in Detroit earlier this year, and Carl said to me, "We'd love to have you on the show sometime," I was totally excited. Fortunately, I had a topic to pitch, and we recorded a couple weeks later.

I had a lot of fun on the show, and it was great to share something that I'm passionate about with a huge audience. And I'm honored and proud to be among the list of people who have been on the show.

LIVE! 360
The other big milestone for me this year was speaking at the LIVE! 360 conference. This was my first chance to speak at a professional conference, and it was a great experience. LIVE! 360 is a co-located conference with one of the conferences being Visual Studio LIVE!

Visual Studio LIVE! was one of the conferences that I attended several times back when I was a corporate developer. It was one of the conferences I really liked attending because the quality of the speakers was good and the topics were relevant to what I was doing.

So it was quite an experience to speak at this event in particular. Some of the people I used to go see speak years ago are now people I'm speaking at the same event with. My world has changed quite a bit.

If you want to read a bit more, I put down some thoughts and reactions in the previous article.

Corporate Events
Another smaller milestone is that I spoke at several corporate events. It's really great when someone invites you to come and speak... and they want to give you money to do it.

The majority of my speaking has been at community events (i.e. free). I've spoken at a few regional events that have covered hotel or partial travel (and INETA was also great at helping defer some travel expenses). But ultimately when I speak, I end up at a financial loss. (That goes to show how much I love doing it.)

So it was really great to have a couple of events that covered my expenses plus additional funds. I think the biggest thing for me is that it validates that what I'm doing has value.

Guest Appearances
This year I made several guest appearances on various programs. This included a screencast with Dustin Davis on //c0deporn where we had a good conversation about lambda expressions and delegates. Dustin is someone I know from the So Cal developer community, and I'm glad I had a chance to be on his channel.

I also had a chat with Dave Rael on the Developer on Fire podcast. I had a chance to share a bit about my history, some of my successes and failures, and a bit about what I love to do. I met Dave earlier this year at Denver Dev Day, and it was great to talk to him.

I already mentioned that I was on the .NET Rocks! podcast. I think I've already said how excited I was about that.

Finally, this fall I had a chance to be on Coding 101 on the TWiT network. This was a panel discussion with several Microsoft MVPs. It was an unexpected opportunity that came up at the Microsoft MVP Summit from my friend Sarah Dutkiewicz (@sadukie). I met Sarah at the Microsoft MVP Summit last year, and it's been great to interact with her online and at events. I'll look forward to seeing her again at CodeMash next week.

Blog and YouTube
I haven't been blogging as much as I think I should. I did publish 86 articles this year (including this one). And several of my technical articles have been pretty popular (for me, pretty popular is over 1,000 views -- everything is relative).

The traffic has been increasing, and I'm now getting 16,000 hits per month compared to 8,000 last year. It's really great to see that so many people are reading my articles, and I hope that most of them find them useful.

I also would have liked to publish more videos on my YouTube channel. I did publish 10 videos this year, including a series on Lambdas & LINQ and a series on Task and Await. My viewership on YouTube has been increasing as well. I picked up 1,000 new subscribers this year (for a total of 1,500), and I've had 55,000 views of my videos this year.

Banjo!
Of course, no review of the year would be complete without mentioning my banjo. Back in January, I got a banjo from Amazon. I've been slowly learning to play it. I really should practice more than I do, but I have improved quite a bit. I use the banjo when I'm speaking locally to show people that it's okay to not be perfect at something. We are all new to things at some point (and in our industry, we're new to lots of things a lot of times). It takes practice to get good at something, and we shouldn't be embarrassed if it takes us some time.

To see my progress, take a look at You Aren't Instantly Awesome, and That's Okay and the follow-up article: You Aren't Instantly Awesome, but You Can Get Better With Practice.

And I'll just leave this here:



What's Next
So, 2015 was a productive year. I went to a lot of places and talked to a lot of people. I got to share my experience with new audiences. And I hit a couple of big milestones. There is always room for improvement, and I've got some things on my list to work on for the coming year, including more articles, more videos, and more learning.

2016 is going to start out pretty exciting. Next week I'm headed to CodeMash in Ohio. I'm really looking forward to seeing some people I haven't seen for a while and meeting tons of new people. And the following week, I'm headed to NDC in London. That will be my first international speaking engagement and yet another professional conference under my belt.

Happy Coding!
And Have a Wonderful 2016!

P.S.
Sue!


Wednesday, October 14, 2015

You Aren't Instantly Awesome, But You Can Get Better with Practice

Back in June, we looked at having realistic expectations when we try something new: You Aren't Instantly Awesome, and That's Okay. To get this point across, I play my banjo at my speaking events (when possible).

When we walk up to something new, we aren't immediate proficient. There is a learning process. And if we spend time with it, we will keep getting better.

It's time to see if I've been getting better at banjo. Here are a few recordings that I've done at some speaking events.

June 29, 2015
Here's the recording that I posted earlier from So Cal Code Camp in San Diego, CA:


August 27, 2015
About 2 months later, I was at South Bay .NET in Mountain View, CA. This is when I was just learning to play with finger picks:




September 24, 2015
A month later, I was at the NWVDNUG and SEVDNUG user groups in the Phoenix, AZ area:


Here's a photo of me playing the night before at Northwest Valley .NET User Group:



October 3, 2015
And a few weeks ago, I was at Silicon Valley Code Camp in San Jose, CA:


On Sunday, I was on the big stage, and they recorded my pre-show:


If you're curious about the "Duck Typing" picture that's mentioned at the end of the video, here it is:


The rest of the presentation is available to watch here: Silicon Valley Code Camp - Learn the Lingo: Design Patterns.

Keep Practicing, Keep Improving
I'm getting better one step at a time. Every so often, we need to take a look back to review our progress. This is how we can see if we're making improvement. And if we're not improving, then we can re-evaluate what we're doing to see how we can get better.

Learning is a process. And it's a process that never ends. Keep learning, keep practing, and keep improving.

Happy Coding!

Monday, June 29, 2015

You Aren't Instantly Awesome, and That's Okay

Learning is a process. When we're new at something, we have a tendency to be embarrassed about our lack of skill. But we shouldn't be. We should be proud to show that we're learning and progressing.

For those of you who missed the news, I got a banjo back in January:


Five months later, I've found that this is something I enjoy. And I've been taking it to developer events as an object lesson.
We aren't instantly awesome at new things.

It takes time to get proficient.

When we're learning, we need to expect this.
And just to show how much I believe this, I will play my banjo badly in public. It's not to show off my musical skills but to show that I'm not embarrassed to show people that I'm still in the learning process.

I ended up with an audio recording of that at the So Cal Code Camp this past weekend. Here's a chance for you to enjoy that:

Keep learning, keep exploring, and don't be afraid to suck when you pick up something new.

[Update 10/15/2015: I have been getting better. Check out You Aren't Instantly Awesome, But You Can Get Better with Practice to hear the latest.]

Happy Coding!

Wednesday, December 31, 2014

2014 in Review

It's the end of another year -- time to check my progress. I've done a lot of things this year, expanded some into some new areas, learned a lot of things, and got some surprises along the way. I kind of hate doing this article because I don't want to sound like I'm bragging. But it's important to reflect back and make sure that I'm productive and headed in the right direction. This is more for me than anyone else, so I won't be offended if you skip the rest. (Just look at the bold items for the short version.)

Doing Lots of Stuff
Speaking
I was really busy with speaking this year. I managed to do 40 presentations at 26 events. And I really love doing this. Whether it's speaking in front of 5 people or 125 people, I try to have a lot of fun and share my excitement about particular technologies with other people.

Central California .NET User Group
I try to find new places to talk each year. This year, I expanded north in California, speaking at user groups in Berkeley, San Francisco, Mountain View, and Fresno. In addition, I made it out to speak in Glendale AZ for the first time.

I also had a chance to speak at Code Camps in Salt Lake City UT, Chandler AZ, San Diego CA, Los Altos Hills CA, and Los Angeles CA. Code Camps are always a lot of fun. I love meeting new people, seeing old friends, and spending the day with folks who are interested in learning and improving their programming skills.

As something new, I also teamed up with some of my friends from the speaking community to put on 2 full day workshops. In May, Theo Jungeblut and I presented an Education Day in San Francisco (and big thanks for Mathias Brandewinder for coordinating things). And in September, Nuri Halperin and I presented "Leveling Up: The Professional Coder Workshop" in Hollywood (with big thanks to Hattan Shobokshi for handling all the event details).

It's really cool to look back at all the amazing chances I've had to speak this year. (And there's a full listing on my website: http://www.jeremybytes.com/Demos.aspx.)

Going Places
In addition to going places to speak, I've had a chance to go places just to participate. This included the Pluralsight Author Summit where I got to spend a weekend with some really great people who love to teach. It was inspiring to hear from the Pluralsight folks first hand about how passionate they are about finding the most effective way to spread knowledge.

I also went to Agile Open So Cal. This was an open spaces conference that focused on agile methodologies. I met some really great people there, and I had a chance to interact with analysts and coaches. I came away with some interesting ideas, and it made me look at some of my career experiences in a new light.
In Newport OR

And I had a chance to go to the Microsoft MVP Summit. It was great to see some of my old friends (well, I think of them as old friends even though we've only known each other for a few years), and it was great to make a bunch of new friends.

And completely unrelated to technology, I got to take a 3 week road trip all the way up to Vancouver BC. I drove up through the redwoods in Northern California, along the Oregon Coast, and up to Cascades National Park in Washington (with a day trip to the Greater Vancouver Zoo in Canada). It was a lot of fun, 4,000 miles of driving, completely exhausting, and totally worth it.

Pluralsight
I released 2 courses on Pluralsight this year. The first was way back in January: Introduction to Localization and Globalization in .NET. I'm not sure I should include this in this year's accomplishments because I did all the work for it in 2013 (the course was published on January 2nd).

In October, Pluralsight released Abstract Art: Getting Things "Just Right". This course was a lot of fun to do. I got to share my experiences and observations regarding developer behavior, under-abstraction, and over-abstraction. And my hope is that the course will help developers see the danger signs before it's too late.

YouTube
Last year I said that I wanted to expand my YouTube channel. This year I managed to release 9 videos, including a series on C# Generics and another series on C# Delegates. It takes me a full day to produce a 20-minute video. I may be able to speed up the process, but I'm very happy with the quality of the results with my current workflow.

I'd like to expand things further, and I've been a bit torn when I have a topic to share. Should share it in video form or in written form? I try to pick the best medium for the topic, but I know that different people learn in different ways. For the folks who learn better with video, I may end up duplicating my written material in video form. We'll see what the future holds.

Blogging
I've been trying to blog more. I managed to write 81 articles this year (if you include this one). Looking through them, I've found that I've been writing on all sorts of things. I've done quite a few technical articles that describe a keyword, operation, or technique. But I've also written a bit on development process and mindset. This included things like exploring software that grows organically, creating partnerships between developers and the business areas they write code for, and figuring out where to go next in your career.

One thing I find surprising is that I never know which articles will become popular. Sometimes I write a quick answer to someone's question, and it turns out into something that gets a lot of traffic. Here are the most popular articles that I wrote this year:
In addition, I've been writing exploratory articles where I'm documenting things as I learn them. We all learn new things all the time (that's the nature of the development profession). And I'm not afraid to say, "Yeah, I know this isn't new technology, but it's new to me." It's bound to be new to someone else, too. And that person can learn along with me.

New to Me
And speaking of things that I've learned, I feel like I've dipped into a lot of different topics this year.

Realizations
I must be getting old because I seem to be reflecting back on my experiences and career more and more often (and I'm only a half grey-beard right now). The good thing is that I've been recording these realizations. The biggest realization has to do with the idea of No Estimates and software by subscription. This started as a conversation with Woody Zuill at the Agile Open conference and turned into several blog articles (which have the "Agile" tag). It was interesting to look at my experiences in a new light -- not changing my opinions of what works, but refining them a lot more.

Explorations
I've been circling around functional programming for a while (check for the "Functional Programming" tag). This year I've been doing some more explorations. I've discovered that I've been using functional techniques in my code without realizing it (including my use of lambda expressions, LINQ, and delegates). And I've been working on ways to use these techniques more intentionally. Based on how things are going, I expect that I'll take the plunge into the world of functional programming very soon.

I also did an experiment to see what it really means to come up with a minimum viable product (MVP) (articles: Rewriting a Legacy Application). I'm sure that the application I used doesn't interest anyone -- especially since it's based on hardware that you can't get anymore. But this was a way for me to document my process of figuring out the MVP and the surprise of finding out just how "minimum" the MVP could be and still be useful.

And I've also been working with Git recently (look for the "Git" tag). I really feel like I'm late to the game with this one. But we can never get to everything. I'm really glad that I've started using Git, and I know that I have a lot more to learn.

Pre-Release Products
Something that is brand new to me is dealing with pre-release versions of products. I am not a trail-blazer when it comes to technology. But I ended up working with some preview stuff this year.

First is Roslyn (or the ".NET Compiler Platform"). This is another thing where I feel a little late to the game. But that's probably just because I have a circle of friends who have been working with this for several years now. I need to remind myself that this won't be officially released until next year. I built a diagnostic analyzer and then put together a video to show how to do it (Building a Diagnostic Analyzer with Code Fix in Visual Studio 2015). And I also came up with some optimizations later on that I shared in an article. This is still new to me, so I don't expect to get it right the first time.

Next, I took a look at Smart Unit Tests. This is something that is available in the Visual Studio 2015 preview. I looked at how it worked by running against some code that I had, explored some of its capabilities, and then tried it with some code that was a little more difficult to test. The technology really interests me, and even though I may not use it in my own workflow, I'm looking forward to seeing what's in the final release.

Jeremy and JSON at Silicon Valley Code Camp
A Great Year
Overall, it's been a really great year. I got 5 minutes of fame on the .NET Rocks! podcast. I was renewed as a Microsoft MVP for another year. I got to speak at a lot of events.

And my blog has been gaining in popularity. I've had several of my articles picked up by link aggregators (Thanks Alvin Ashcraft and Chris Alcock). That has driven quite a bit of traffic to my site and encouraged people to add my blog to their news readers.

So last year, I was happy to see 3,000 hits per month. To see how much things have changed, for the last 3 months I've been getting over 8,000 hits per month (and this month is over 11,000).

But one of the most rewarding thing is when I get a comment like this:
Jeremy has the unique ability to simplify complex subjects and to show the listener why they should care about learning about the subject he's teaching. In his live presentations, he uses humor and compassion to help make software development less dry and more fun.
And this (from a recent presentation on Dependency Injection):
After attending this presentation, I finally understood what DI is. The source code is fairly easy to follow, and I'm not a .Net developer. I'm so glad it finally clicked. Thanks Jeremy!
I really love to help people learn.

Looking Forward
I still have a lot of things to learn. I have a lot of things I want to do. And I have a lot of things I want to teach. I didn't get to everything I had planned this year. But I've also found that even though things don't go as I planned them, I often end up somewhere even better.

I'll keep moving forward and keep stretching myself. I'm excited about what the next year will bring.

Happy Coding!