Thursday, November 19, 2015

Visual Studio Live! Last Day Sessions

Today marks the end of the sessions for Visual Studio Live! 2015 Orlando. I must say that it was a great experience. Not having done any tech conferences before I have nothing to compare to, but I feel the sessions were very informative and had good presenters.I would be interested to compare if I come back next year and have another year of coding experience. Will I go to the same sessions? Or, will I select more difficult classes? Would I stick with mostly Visual Studio classes? All questions that I hope that I will be able to answer next year. I think that I picked pretty good sessions for my level of knowledge today.

The first session I attended was Getting Started with ASP.NET 5 with Scott Allen. I actually have taken a few courses on Pluralsight. It was nice to be able to see him and put a face to the name (although Pluralsight has pictures it isn't the same as the real life version). ASP.NET 5 has some really great features. It can be used cross platform! That seems to be a theme we have been hearing this week, Microsoft is helping developers by providing solutions, either their own or through partnerships, that allow cross platform deployment. AWESOME! Microsoft really is trying to reach out to the younger developers/generation that may not be tied to the Microsoft way of life.

We saw another awesome enhancement with ASP.NET (and I believe we saw it working with XAML the other day) and that is that you can make changes to C# code while debugging. No need to stop debugging, make the change, and then start debugging again to see if the code worked. I can't quantify how much time that will save but I know it will be a nice chunk of time. There were a few other changes that were discussed like faster performance, no csproj file needed, and more. I am excited to take a look at everything else that can be done!

Next, User Story Mapping with Philip Japikse. I don' have many notes on this session but there is a reason. Philip actually made us be social and do an activity in groups of six to eight. By group activity I mean that we all had Post It notes to develop a story of getting up in the morning until we left for work all without talking. We did it without talking so that no one person become the Alpha and took control. We had to work through the entire process of making the story and then deciding what we didn't have enough budget for to complete. We create stories at work, but we are usually given the stories and epics that will be completed. It was a fun process and I hope to be more involved as I progress in my coding.

Third was XAML Antipatterns with Ben Dewey. Very informative! Ben showed the "Seven Deadly Sins of XAML." I hope to be able take what I learned and not commit any sins. The seven sins are:

  1. Thou shall not us Incline Formatting. We wouldn't do it on a website, why do it on the XAML?
  2. Thou shall not use hard coded colors. Oh the pain if you decide to change your corporate colors and you need to go find all the places the color was used.
  3. Thou shall not use bitmap icons. Think about scaling and clarity.
  4. Thou shall not set properties manually. Less code and not code behind.
  5. Thou shall not duplicate chunks of XAML. Take code and move it to a user control.
  6. Thou shall not wrap content repeatedly. I will be honest, I didn't fully understand this one. I need to research it more.
  7. Thou shall not use absolute positioning. Think about window resizing and how that will impact the view. You never know how a person will be viewing your app.
Great session!

Then Brian Noyes talked about WPF MVVM in Depth. We use MVVM at work and I went to this session to help gain a better understanding of MVVM and hopefully the why behind using MVVM. I learned that some benefits are it is maintainable, testable, and extensible. I have seen all three benefits at work, but I need to spend more time in the code to fully understand how this is accomplished. Brian told us about the different responsibilities of the Model, View Model, and View. I kind of understood before, but he helped me understand better why we would want to use each. He also talked about View-First and ViewModel-First. I am not sure which one we use at work or not sure exactly how to implement one of them. More reading for me to do.

The LAST session I attended was Readable Code with John Papa. John was a very good presenter full of funny gifs and funny sayings. Beyond the funny, John presented some really gems to take back and use. Some of them we already use, but it is always good for get it reinforced. I like a little piece of wisdom that John gave us. That is essentially that we need to write bad code to make it good. We have a chance to clean it up before the review, but all code starts bad. We then need to ask "Why" to everything. If we can't answer the question of why there is probably something missing or another way to write the code.

Closing remarks were good. There was a panel of the presenters that answered questions anyone might have. It was a nice closing session and good to get more candid answer from the speakers. I hope that I get another great conference experience next year and I hope I have more coding experience when I attend. Thank you Visual Studio Live! I hope to see you next year.

Wednesday, November 18, 2015

Visual Studio Live! Day Two Sessions

Another day down and another day of learning and hopefully I have learned how to hit publish and actually put a blog post out to the interwebs. I picked better sessions today, I didn't feel so overwhelmed and felt like I had a better understanding of what the presenters were discussing. Well, that is except for the dependency injection session I attended, but at least I was not like a deer in headlights like I was the first time I heard about dependency injection.

We started out with a key note by Don Jones and Brian Randell about DevOps. I am seeing a theme, DevOps is an important topic. On Monday I attend the Triple D session where we spent a lot of time talking about DevOps. There are numerous sessions on DevOps and there was today's key note speech on the subject. I agree and it isn't just something we will talk about today and not hear about it anymore. A lot of what they discussed we heard on Monday during the workshop. One new topic was an expansion of the why. There were two main reason: 1. Clients will get the product faster and will be happier (faster bug fixes) and 2. The competition may already be doing this and will have quicker time to market. If they deliver faster, how do you keep up? We have to adopt DevOps to remain competitive.

Next up, let's Write a Windows 10 App: A Basic Introduction to Universal Apps with Billy Hollis. I enjoyed seeing Billy earlier in the week and today did not disappoint. Billy has an entertaining way of presenting and is able to keep  The session was very helpful and although I do not code much in XAML (we have two applications that use it and I only code when we have bugs) I feel that I took away some good bits of information to help when I do code in XAML. Billy showed us some great tricks in XAML and showed some basic examples like how to do some layout. He kept reminding us that XAML does what it is told and each element has one job. A grid won't scroll, you have to had a scrolling control if you want i to do that. He showed how to get a tab like feel in Windows Universal App (after all that is where he was focusing with the XAML examples) and showed us other things such as data binding and data templates.  More things for me to take back and look more into.

I decided to stick with Billy and do his next session called Designing and Building UX for Finding and Visualizing Data in XAML Applications. First thing Billy told us is that he doesn't write too much XAML anymore. He uses tools to help him write the XAML. The tools have come a long way and provide much better XAML without much need to write it on our own. Billy showed us a cool cattle management app with smiley faces to show how the client feels. Better than a score, everyone knows what a frown means! How do you accomplish that? ScaleTransformations (along with layers). Really cool idea and I hope I can take it back and use it in our apps. Fluid movement behaviors when resizing windows, get the code from Blend. He gave us ideas on a lot of cool transformation ideas and tools to help with XAML coding. There are a lot of cools things that we can do to make apps look awesome.

I attended another session about Xamarin. This one was called Stop Creating Forms in Triplicate - Use Xamarin Forms with Matt Milner. I felt Matt spoke much more on my level from the session I went to yesterday. I learned something I hadn't heard about Xamarin, if you don't have a Mac it is hard to develop in iOS but if you have a Mac you can develop for both iOS and Android. Anyway, Matt went through an example of a cool Nerf gun inventory app, probably used to make sure his boys aren't hiding any of the guns. He showed how shared code can work on both Windows and Androids phone (emulator of course). It is pretty sweet how the Xamarin is able to take the same code and make it look like a native app on both platforms. Of course, it isn't 100% and you have to make some changes for the different platforms. He showed us how to do that. It is all a question of if the defaults work, or how to get the appearance you need. With each app you need to ask, which is right for cross platform, Cordova or Xamarin?

Then we go on to the dependency injection session. This was presented by Jeremy Clark and was called DI Why? Getting a Grip on Dependency Injection. Now we had talked about dependency injection at work once. In that discussion I didn't understand a word that was being said. So, I thought take the session with Jeremy and learn some more about it. After all, it was made as an introductory class. I still felt confused, and that is not Jeremy's fault. I walked away and talked through why I was still confused with my coworker, Peter, and started to clear some of my own questions by talking through why I was confused. Jeremy was great and Peter helped clear it up. I think I need to use dependency injection (luckily we already use it at work) to get a better feel for the how and hopefully help me with the why.

We finished the night with a Luau Dessert sponsored by Amazon. It was a fun time. I talked with a few new people and had some dessert. A good way to finish the night. One more day of sessions!

Visual Studio Live! Day One Sessions

Apparently I forgot to publish this yesterday. Major FAIL.

Another day down at Visual Studio Live! It has been another great day, The key note speaker was good this morning and the sessions were good. I may not have selected the best sessions to go to, but that is on me and not the presenters. Hopefully, I will choose the correct sessions tomorrow.

The key note speaker, Jay Schmelzer, started the day off with a speech on The Future of Application Development - Visual Studio 2015 and .Net 2015. Microsoft has added some great features in VS 2015 and .Net 2015. I think one of the biggest moves is the cross platform support and development that is now available. A few different partnerships allow this, Zamarin and Cordova. Another feature I thought interesting is the ability to enforce your own code standards. Pretty cool!

A feature I think will help when deugging issues is the new time elapsed shown in the right in the coding window. Not more finding the stop watch in Google! Oh man, there are more enhancements and awesome enhancements. I can't wait to start using all of them and actually being able to understand them better (I wrote down more enhancements in my notes, but was in so much Aw I didn't write down all the needed details and I don't want to screw up when the changes actually work). I have VS 2015 installed and am excited to use the enhancements.

The first session I went to was A Tour of Azure for Developers with Adam Tuliper. I should have read the description and title a little more but we are exploring options with Azure at work and I thought the session would help. I learned a lot about Azure and that there are a lot of services provided by Azure. The session was pretty much talking about Azure and what you can do with Azure. There is a lot, so I have a lot more reading to figure out how to use Azure and the services that will be useful to use.

Next up, From ASP.NET Site to Mobile App in About an Hour with Jordan Matthiesen. This was one of those great sessions that talked about how to integrate already working HTML/CSS/JS code and use Apache Cordova to migrate it to an app using full screen Webview. The app detects when the user is offline and then decides how this should be handled. There are different options like having a note appear that says, "Sorry you are offline. Try again later", using App Cache, IndexedDB, or WebSQL. Not all options work with all the different platforms (and I am sure I missed some of the options Jordan mentioned). What it comes down to is selecting the correct service that works for the platforms you need.

I then headed to Defensive Coding Techniques in C# with Deborah Kurata. This was a great session!
What is defensive coding? Exception Handling, what not to do, well defined interfaces, expected behaviors, clear intent, best practices, and I am sure the list could go on and on. Deborah mentioned quality, comprehension, and predictability. The short version (I took the most notes at this session):

  • Clean code is easy to read, clear intent, simple, minimal, and thoughtful. 
    • Clear purpose
    • Good Name - Reflects purpose
    • Focused code
    • Short length (only as long as it needs to be)
    • New features in C# 6 help make code clean (or does it?)
  • Automated testing, well...this makes sense. Testing your code is good, and if you can automate it, all the better! Methods need to return something so they can be tested
The last session I went to was Reusing Logic Across Platforms with Kevin Ford. This is the one that I feel was the most difficult for me to understand. I don't understand patterns as well as I should have to attend this session. It is good to have a reference to the patterns so I know what is available and maybe I will have a light bulb come on when I understand this. Kevin was good and discussed cross platform depends on what the user expectations are. He talked about using Zamarin and that we need to look at when it makes sense to share code and went into some patterns to help share code and where they are all different. I will be revisiting the notes to this session soon (I hope).

That was the day! I ended it by eating at CowFish (a sushi burger fusion thing)

Monday, November 16, 2015

Visual Studio Live! Day One

Wow! This is my first conference post college. The conference I am attending is Visual Studio Live! It is exciting to be hear so I can learn about Visual Studio and more! Not only that, this is my first coding conference and so short after starting to actually code. This event is a Live! 360 event and contains information and sessions around SharePoint, SQL Server, Modern Apps, as well as Visual Studio. Most of the sessions I signed up for are Visual Studio related, but I can go to non-VS events and there is so much to learn. Any session will be very beneficial to me.

Today was a workshop day. The session went from 8am-5pm. Seems like a long time but the time flew by and didn't seem long enough! I went to session Triple D: Design, Development, and DevOps presented by Billy Hollis and Brian Randell. Both seemed to be very knowledgeable to talk about the topics.

Brian started by asking what we thought of DevOps and what that meant to us. This was great timing as we have talked about DevOps at work and how we can move towards better and more DevOps along with continuous deployment. To fully achieve DevOps we need to change our vocabulary and make sure our processes fit with the way we deploy. A few things that were mentioned is automating infrastructure, share a vision with ops, and one step building and deployment.

So, how do we achieve that? Brian said, "You do not buy DevOps" and that you have to implement it from the top down. I believe that 100%. Those working in the DevOps must have the correct mindset and willing to work towards the deployment. We are lucky! We already have some testers and developers that know the importance of getting DevOps correct and what it will take to deploy in the end. One top of that, our managers know we need to move towards better DevOps and are willing to take what is needed. Engineering owns features from end to end (although the development team does not own the deployment in most circumstances, but it still stays in Engineering).

I am excited to continue improving DevOps at work and hope we can fully implement the continuous deployment.

Next Billy talked about UX and design! A few posts ago I actually talked a little about design, looks like I think about the correct things sometimes. Billy focused a lot on UX and how the correct amount of time in designing the UX will increase flow and productivity. Not only do we need a good UX we also need to get feedback and data about how the UX is actually being utilized.

"When you start UX design, you'll suck at it." - Billy Hollis. There is a lot that goes into design and UX and every company needs it to keep customers happy with the products that are delivered. Billy discussed some of the theory behind the best designs and I am sure he could teach an entire course on the best and worst designs. We can't just make it pretty by adding makeup. It doesn't matter how much makeup you add a bad design will still have the ugly elements.

There is so much! We then discussed the new builds on TSF. There is a lot to learn on what can be down and how to utilize the new build server.

The key note speaker was Mary Jo Foley. She gave a very candid view of Microsoft and the direction we might see them take. We got a little history, a little speculation, and a lot from a reporters point of view.

It was a great first day. Tomorrow we start the sessions and I say, bring it on!

Thursday, November 12, 2015

Uh...wish me luck?

So, the last game I created wasn't too difficult. Especially since all the code needed was given to me in the chapter. Now I am on a section they are calling a lab. It is a lab of the prior four chapters. I am being told that I should know everything I need to so I can code this "lab."

I am just diving into the coding and there are a few new items, but I don't think I will need any new code. This will challenge my knowledge and make me really think about what the code I am using is actually doing. Hopefully I can code this correct without the hand holding (or answers directly in front of me) of the book.

Let's get to pushing my knowledge and hope this is a good learning experience and I hope to have "A Day at the Races" coded soon and posted on the blog...

Thursday, November 5, 2015

An addendum to My First "Game"

I received a comment on my last post from Edhika stating that there was no way to restart the game. What kind of game makes you close and reopen in order to restart and go back to the beginning? Not a very user friendly game. Now, I could have said, that is what the instructions told me to do.

I decided to take the challenge and try to make it so the game "reset" after the game was over. Actually, I took it a step further and made it so you can restart the game at any time. I am not sure why you would want to start over in the middle, maybe it is getting to fast, or you didn't like how you were doing on that "level." At any rate, you can now start over at any point in the game.

It wasn't as difficult as I thought it was going to be. I ended up adding a message box to give you some stats and how to restart the game. I added an if statement that checks if the key pressed is Enter. Once that key is pressed I put a new function called startOver in my Stats class. The function resets the data, difficulty, and restarts the timer at 0.

Pretty simple, right? It didn't take me very long to figure out what I needed to do, but it got me thinking about another aspect of coding which I have not been involved in much. That is the design sessions to determine what needs to go into a program.

The book gave you directions on how to get a very simple game. I can understand that adding the function to restart the game would have been a couple more pages of code and writing and maybe it didn't fit in at this point in the book. At the same time, I didn't do anything new in order to reset the game. Everything I used and put in addition had been written about in the prior changes. The book really likes to use message boxes so creating one is ingrained in my head.

If this were a software company designing the typing game it never would have been shipped. There would have been meetings with all the smart people that are involved in the creation of the end product. Maybe one person didn't think about adding a "reset button" but another would have thought about it.

I have only been involved in one design meeting at work. I have said that I fix bugs at work, which I do the most of, but this was one of my first new features I added. It was a fun meeting and we came out with a great new feature, a button that reruns SSIS jobs. Well, my enhancement lasted about four weeks before another and more experienced coder ripped out the rerun guts and made it better. I know there was another design discussion because the changes were very significant.

Short story, a nice comment on my last post made me realize how important design discussions are and how they are needed. I know my "game" still isn't perfect, but that is why all software has new versions come out. Here is version 2 of the typing game. There are still the same limitations that I shared in the last post.

I also made the game too easy if K.C. can get 100% on 80 keystrokes! Maybe the next version will be more challenging for you.

Tuesday, November 3, 2015

My First "Game"

Well, my C# book tells me I have learned enough for them to guide me through making my first game. I have done it, and it appears to be working! It is a typing game that progressively gets harder as you type the correct letters that appear on your screen. It is a really simple game, and uses some of the knowledge I learned in the first 4 chapters of the Headfirst C# book.

All of the steps are provided to you, so all you have to really do is follow directions. It took me about an hour to create the simple game, but I like to think about each step to help me remember what I did and why I did it. I will be honest, the game did not work flawlessly once I first debugged the game.

Perfect! I was given all the directions and the game doesn't work! After six correct key strokes I would get an out of range error. Either I missed a step or the book gave me incorrect directions (I would hope editors would find this before printing). Turns out I missed a step. Well, it wasn't a step, but a side window with a note telling me to set the difficultyProgressBar maximum to 701 while the default was only 100. I have a method in the game that after each key stroke would increase the difficulty. Well, after so many key strokes it tried to increase the difficulty above 100 and *bam* the game explodes on you.

Luckily, I was able to track down the error and fix the game relatively quick. After I fixed my error I went back to make sure the book told me to take this step. Right there on page 162 at the bottom right corner was the little box stating to remember to do this maximum update along with two other steps. I did the two other steps so I am not sure how I missed the maximum update.

I am glad I missed the update. It helped reinforce some practices that we do at work. That is, we should be testing our own code before shipping or checking in. Sure, the game worked but only for a few key strokes. It built just fine and I would have been able to ship the product. However, it would have come back and blown up in my face. "Look, Robert can code a game, but he doesn't know how to debug and fix errors before shipping."

Other pieces I noticed in the game:

  • The letters shown are all capital letters, but if you type a capital letter back it counts it as and error. I did not debug or fix this one. Maybe I will try that tomorrow morning.
  • I have linked to a zip file that has setup.exe included. Anyone can run the game and see what an awesome job of following directions I did. This will install into your computer and the program can be removed by uninstalling TypeGameChapter4


Next up in the book is a "lab" which gives me a goal, but does not give directions like the previous game. Let's see how it goes!

Get zip file for typing game here!