Friday, April 28, 2017

Microsoft 70-487: Query and manipulate data by using Data Provider for Entity Framework

Exam Objectives

Query and manipulate data by using Connection, DataReader, and Command from the System.Data.EntityClient namespace; perform synchronous and asynchronous operations; manage transactions (API); programmatically configure a Data Provider


Quick Overview of Training Materials

Tuesday, April 25, 2017

MIT 6.005 - Software Construction (edX)

The resources for MIT's "Software Construction" class are distributed between several disparate sources.  There is an entry for 6.005 on the MIT Open Courseware page, where it is called "Elements of Software Construction", and there are two classes on edX: 6.005.1x "Software Construction in Java" and 6.005.2x "Advanced Software Construction in Java".

I'm hoping that working through this class will sharpen my understanding of general software engineering concepts.  The emphasis of the class is writing bug free code that is easy to understand and easy to change, which is certainly something you can never be too good at, am I right?

Monday, April 24, 2017

Microsoft 70-487: Create an Entity Framework data model

Exam Objectives

Structure the data model using table per type, table per class, table per hierarchy; choose and implement an approach to manage a data model (code first vs. model first vs. database first); implement POCO objects; describe a data model by using conceptual schema definitions, storage schema definition, mapping language (CSDL, SSDL, MSL), and Custom Code First Conventions

Thursday, April 20, 2017

Instantiating an object in Java without calling a constructor

The Scenario


This isn't a cliche...


I was working on a Java project that talks to a web service with a custom "Client" class that was written internally.  In my project, the client is pulled in from a hosted maven repo as a dependency, so I didn't have access to the source (at least not from this project).  I'm trying to be better about writing characterization tests for existing code before I go in and change anything (if nothing else it's a good way to feel out the code). But I had a problem...

The Client has a single constructor, which takes an endpoint, a username, and a password. Calling this constructor tries to connect to the endpoint (and crashes if it fails).  Because this was the only defined constructor, subclassing wasn't going to help me.  It doesn't implement an interface, so that avenue was also closed down.

So there was no obvious way for me to create a test double to pass in to the code I was actually interested in testing.  How in the hell was I going to get around this???

Wednesday, April 19, 2017

Proxy Windows Authentication with a WCF Relay Service

Motivation

The problem I'm going to address here is pretty specific, and the solution I came up with isn't terribly intuitive, but it works.  I ran into a situation where we were trying to integrate web services with a vendor product.  This is a .NET app running on IIS, and we wanted to authenticate using Active Directory by passing in a username and password to a "UserLogin" soap action (this action returns a security token that is used to make other calls).  While initially we thought this worked, it turned out that it wasn't behaving the way we thought it should.  Any request was getting a security token, even if the username and password were garbage.

Yeah... not what we were going for...

Sunday, April 16, 2017

MIT 6.046 - Design and Analysis of Algorithms

6.046 is described by Eric Demaine as the final undergraduate algorithms class, with more advanced and more specialized algorithms classes being at the graduate level.  I've had my eye on the advanced data structures and advanced algorithms classes for a while, and this class is a fundamental prerequisite for those.  Now, being that it's my MO to totally overdo it, naturally I had to find overlapping classes from some of my other favorite providers and watch everything.  Had I limited this to one overlapping class it probably wouldn't have been that bad... but I found three other classes: Berkeley CS170, Georgia Tech CS6505, and Stanford CS261.  All four classes are what I would call "intermediate" level algorithms courses, with significant overlap in concepts covered:


I probably would have been done a month ago if I hadn't gone so crazy with watching everyone's lectures...