Posts

Showing posts from June, 2018

My Take Aways from Beer City Code Event

Image
I had a really great weekend at @BeerCityCode in Grand Rapids. I wasn't able to make it to Friday's event, but I heard really good things about the deep dives they did. Saturday's event was really cool. It was held at Calvin College and the space was really well suited for the event. The keynote speaker talked in the main auditorium where about 500 coders gathered. After the keynote, there were a half-dozen or so breakout sessions each hour for the next seven hours. The one downside of the event was that there were so many interesting sessions that it was hard to choose which one to go to. Besides attending sessions, a really nice lunch was provided at the college cafeteria, and there was an optional VIP party for organizers, speakers, and guests who paid for the ticket. I got a ticket for myself and Kat, so we attended the party.  Before the keynote address, a couple of the sponsors came on stage to give brief motivational talks. The first sponsor ca...

Machine Learning with Nexosis

Image
Last night I attended the Ann Arbor .Net Users Group and the topic was "Machine Learning for Fun, Finding Bigfoot". The speaker, Guy Royse, did a really good job presenting the subject. The subject matter made it really entertaining and went beyond just Bigfoot data. There were also discussions of UFO's. It was hard not to laugh as Guy was describing how he obtained the data for the discussion, and how the classification system works. The takeaway from the talk was that this was a fun, lighthearted way to play around with machine learning.  The Nexosis tool looked really cool. It starts out free, and gives you full functionality until your volume gets to the point where you have to pay for it. It takes quite a bit of volume to get to the paid level, so you can do a lot of development and learning for free. There is a web UI, REST API, and a number of language specific libraries that you can use to access Nexosis. Guy presented several examples using the web UI and...

Ann Arbor, Michigan Tech Talk / Tech Trek

Image
Last Friday in Ann Arbor, Michigan, there were two events that took place for Tech. The Tech Talk was hosted at the Michigan Theater, and it consisted of a number of speakers giving 6 minute talks mostly focused on entrepreneurship with a tech focus. I found most of the talks really interesting. The two that stood out the most was the talk from Ford Labs and Dominos Pizza. The Ford Labs talk was interesting because it was about there division being created to work and act like a startup using lean methodologies. The Dominos talk was interesting because of the scale of technologies Dominos is using and developing. In one of the slides the speaker described how the company used to be a pizza company that used technology, but now it is a technology company that sells pizza. According to the presenter, Dominos is the third largest e-commerce platform right behind Amazon and Apple. Besides the big corporate players, there were a number of true startups that described how their passion ...

A Good Coding Day

Image
Trying to explain to non-programmers what it is like to write code is really difficult. When I am struggling with a problem, I often describe it as having writers' block, but that really isn't a good description. Often I am doing a lot of writing, it just isn't working the way I want it too. When things aren't working the way you expect, it can be really frustrating, and I could end up writing whole features that I end up throwing away. There are also times when I just can't get the logic I want to be settled in my mind. At these times, I would imagine it is more similar to writers' block. Usually getting away from the code for a little while will allow me to approach it from a different angle, and come up with the logic that I like.   For the past few weeks, I have been working on setting up a new application that will be using Asp.Net Core. This will be my groups' first Core application, and I am in charge of setting up the project and building th...

Questionable Thinking

Image
No, this post isn't about weird thoughts in the deep dark crevices of your mind. When I talk about questionable thinking, I am referring to the thought process where you work out questions when being presented information. This is something I really need to work on because I am horrible at it.  When I am in a large group where there is a presentation like a college course, company meeting, or user group presentation, I rarely ever ask any questions. I will either write the question down and look it up later or wait until there is an opportunity to ask the presenter in a smaller groups setting. I am not much of a public speaker to begin with, and I get intimidated in larger groups. The problem is that this takes away from the value of the group.  Last month I really noticed how effective questionable thinking can be. I was in a user group meeting and there was a presenter at the front giving what they called a lightening talk. This is a short talk designed to give p...

ASP.NET Core 2.1 Windows Authentication with DB Roles for Authorization Part 2

If you haven't read Part 1 of this post, here is a link:  Part 1 I was really stuck on this issue, and I posted the previous section on my blog as well as a post on stack overflow, but in the end, I came up with a working solution. When using windows authentication, the ClaimIdentity had a RoleClaimType of groupsid which meant it could take a SID or String that was associated with an AD group and convert it back and forth, but since I was injecting roles from the database, there was no SID associated with them, and I needed the RoleClaimType to be role instead of groupsid.  The ClaimIdentity had a RoleClaimType of " http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid " and it needed to be a RoleClaimType of " http://schemas.microsoft.com/ws/2008/06/identity/claims/role " Since this is a read-only property, I changed the TransformAsync method to create a new ClaimsPrincipal instead of trying to add database roles to the existing cl...

ASP.NET Core 2.1 Windows Authentication with DB Roles for Authorization Part 1

I call this part 1 because I haven't figured it all out yet, so if you have a solution to how I can use the Authorize Attribute in a controller, please let me know in the comments. EDIT See part 2 for the solution I came up with:  Part 2 In this project I am injecting database user roles as claims into the windows authentication security principal claims. The role provider that existed in the full .net environment no longer exists, and the new approach is to use claims. Claims can include roles, but they can also be policy based. For example, lets say you have a section of your site that someone needs to be a certain age to view, you can create a claim that verifies the users birth date before authorizing this area. This gives you a lot more flexibility than regular roles do. The problem with using windows authentication is that by default the claims list are groups populated by AD. The procedure below adds application roles to that list of claims. The AD roles are still ther...