www.davidarodriguez.com

I drink coffee and program. Meh.

Navigation Menu

Evernote saved my career

Posted by on Nov 17, 2014 in Blog, Productivity | 0 comments

Well it saved it for now. I am not the sharpest tool in the shed, however, I am the most hard working tool in the shed. With that said, Evernote, is really a helpful tool. A little background first, at my job, I work with a lot of brilliant individuals, so brilliant, I think they forget they are talking Aramaic to me. When they try to explain things to me, at their intelligence level and experience, sometimes it feels like the 1 Ceres asteroid smashing into my weak feeble body. So much technical lingo, so many variables, scenarios, and systems that interact with one another. In my line of business, I am fairly new to it. I work with remote monitoring, dealing with remote devices receiving and sending packets of data to and from satellites. All this is new to me. Very interesting stuff, yet hard to comprehend. For the past few months, I have been using Evernote to help close my understanding gap. Normally, when things are trying to be explained to me, it takes me a bit of time to process it. I have to sit down, and really think about what is being said. But in this industry, there is no time. Having to deal with scrums on a consistent basis, explaining where we are, what road blocks we encountered (if any), and what we will be working on next, and trying to process what your colleagues are going through is just so much information for one to process.

My memory sucks, it really does. I barely can remember where I put my car keys, nevertheless how our systems interact. I am currently reading a book that I am hoping will help with my memory, “Moonwalking with Einstein: The Art and Science of Remembering Everything” by Joshua Foer. Till I find out new techniques to increase my ability to remember things, I have been using Evernote on my Windows Phone. The one feature I use religiously is the audio recording feature. Every meeting that I attend, I record it. Every bit of detail of that discussion is archived for my use. Typically after meetings, I sit down and listen to what was discussed. This helps further to my comprehension of the topic our meeting was about. As well, it removes all doubt I would have if I didn’t do so. “Now what satellite were we supposed to receive packets from again?…”, “Was that a GSM unit or a Satellite unit?…”. That doubt and confusion is now removed from my mind. Just this past weekend, I was processing some meetings we had about this newer project I am supposed to work on. Man o’ man, what a relief to have this information by my side. Come Monday, I knew the right questions to ask, and my path to the project was made clearer. I highly recommend you use Evernote, or some form of data capture app. It will help you rest easier at night and have concrete info for what is to come with  your current task.

Evernote for Windows Phone: https://evernote.com/evernote/guide/windows_phone/

 




The blockbuster phenomenon that charts an amazing journey of the mind while revolutionizing our concept of memory

An instant bestseller that is poised to become a classic, Moonwalking with Einstein recounts Joshua Foer's yearlong quest to improve his memory under the tutelage of top "mental athletes." He draws on cutting-edge research, a surprising cultural history of remembering, and venerable tricks of the mentalist's trade to transform our understanding of human memory. From the United States Memory Championship to deep within the author's own mind, this is an electrifying work of journalism that reminds us that, in every way that matters, we are the sum of our memories.


List Price: $17.00 USD
New From: $5.95 USD In Stock
Used from: $3.40 USD In Stock

Read More

How to force ‘Get Latest Version (Recursive)’ in your Visual Studio solution

Posted by on Nov 6, 2014 in Blog, Visual Studio 2013 | 0 comments

Quick tip here. I needed to get the latest version, but I needed it to overwrite everything I had in my local solution. The easiest way to go about this is to go to ‘Source Control Explorer’, find the folder that you want to force get, right click it and select Advanced->Get Specific Version…

Force Get Latest Version

Force Get Latest Version

Once you select that, a new dialog will show with the folder you selected. Below that, check both check-marks that are for ‘Overwrite writeable files that are not checked out’ and ‘Overwrite all files even if the local version matches the specified version’. Finally, click ‘Get’ and wahla you have gotten the latest files from your ‘Team Foundation Server.

Force Get Latest Version

Force Get Latest Version

Read More

Using Sql Server Profiler to trace only stored procedures you want, and nothing else

Posted by on Nov 5, 2014 in Blog, SQL | 0 comments

Seems like I am full of blog posts lately. Anyways, I came across this need yesterday when working on our project. I was needing to trace a particular stored procedure, and only this stored procedure with nothing else. Everything else to me was just noise. So, in order to do this fire up SQL Server Profiler, tab over to the ‘Event Selection’ tab for the ‘Trace Properties’, set ‘Security Audit’, ‘TSQL’ events to unchecked, and leave ‘Stored Procedures – RPC:Completed’ to checked.

Trace Properties

Trace Properties

Next thing you would want to do is to customize the column filters. So, click the ‘Column Filters’ button on the lower right side of the ‘Trace Properties’ window. Once the dialog pops up, this is where you can edit any filter you want. For my needs, I needed to adjust the ‘Application Name’, ‘LoginName’, and ‘TextData’ filters. By default, the ‘Application Name’ is set for you.

Filter Application Name

Filter Application Name

I like to filter to only my application’s username. Since, we have numerous apps running hitting the same database instance I have to filter by username. If not, I’d get even more noise when running the profiler. So, I filtered by ‘LoginName’ as so.

Filter Login Name

Filter Login Name

And lastly, the granddaddy of them all, we finally filter by the stored procedures name. In this case we use the ‘TextData’ filter. I use SQL like query using the percent % wild card notation. It works like normal T-SQL. I am filtering anything before and after my filter for a match. I ran a few queries to see if it match each time, and to no surprise it did.

Filter Text Data

Filter Text Data

Here is the result list of the trace by SQL Server Profiler.

SQL Server Profiler Results Set

SQL Server Profiler Results Set

For the record, I hate SQL. So, anything I can learn to ease my use of SQL is great. What is your favorite debugging feature?

 

 

 

 

Read More

View data in table variables using SQL Server Management Studio’s debugger

Posted by on Nov 4, 2014 in Blog, SQL, XML | 0 comments

While working on this current project’s stored procedure, it did a lot of inserts into a table variable called @results. While running the debugger on the stored procedure, I notice when inserts were performed on the table variable I could not look at the data that was inserted into the variable. I tried looking through the Locals window, but the only thing that was shown was the variable name, its value, and type. Yet, the value that it was displaying was not what I was looking for. I was wanting an actual dataset. It only showed the value as (table)

Local window in SQL Server Management Studio

Local window in SQL Server Management Studio

There was no way to view the value. As you can see from above, the other variables had an inspector to view their values. However, in regards to this table variable it did not. I then tried using the Immediate window to run a SELECT * command. Nope, that did not work either. The result was that the SELECT * command cannot be evaluated. SQL debugger is so pointless at times.

Immediate window in SQL Server Management Studio

Immediate window in SQL Server Management Studio

After mucking around, trying to figure this out. I came across a StackOverflow post and saw someone else had this same issue. To view a table’s data set you would SELECT * everything while converting it to an XML document. You can then store the results into an XML data type, which then allows you to use SQL’s inspector to view its dataset.

Sorry about all the blurring of the result set. I cannot show that for business purposes, but you get the idea. Have a good one.

 

 

Read More

ClaimsPrincipalPermission and unit testing

Posted by on Oct 22, 2014 in Blog, Unit Testing | 0 comments

Recently, I was trying to take a stab at unit testing using NUnit and FakeItEasy. My first unit test started with the following code:

 

All I really wanted to do was to see if the method does return a instance of ActionResult. Upon executing the unit test, I came across this error:

A first chance exception of type ‘System.InvalidOperationException’ occurred in System.IdentityModel.dll

Additional information: ID7027: Could not load the identity configuration because no <system.identityModel> configuration section was found.

The error specifically pointed out that this was occurring at the ClaimsPrincipalPermission attribute.

 

ClaimsPrincipalPermission InvalidOperationException occurred.

ClaimsPrincipalPermission InvalidOperationException occurred.

After some research, I came across that the reason that this was occurring was that ClaimsPrincipalPermission becomes invoked at the CLR level, which in turn it affects unit testing.

This approach typically gets in your way, e.g. ClaimsPrincipalPermission gets invoked directly by the CLR, which means it will also run in unit tests, and unhandled exceptions short-circuit your processing pipeline. http://leastprivilege.com/2012/10/26/using-claims-based-authorization-in-mvc-and-web-api/

Looking at StackOverflow, Dominick suggested you should create a custom ClaimsAuthorizationManager to get around this. You would have your custom ClaimsAuthorizationManager to always return true.

Use a custom ClaimsAuthorizationManager that always returns true for the unit tests.

PrincipalPermissions in general are not very unit testing friendly. http://stackoverflow.com/questions/15429811/claimsprincipalpermission-and-unit-testing/15436366#15436366

So, I did as he suggested. In my AuthorizationManager class, with my current production AuthorizationManager, I created a unit testing version as so:

Lastly, within my unit testing project I added the following to the app.config file:

When all this was setup, I was able to run my unit test successfully.

Hope this helps you.

Read More

Remove unused Using statements in your C#’s code behind

Posted by on Sep 26, 2014 in Visual Studio 2013 | 0 comments

I came across something pretty useful while learning some in and outs of ReSharper. I do not believe this is ReSharper specific, but built into Visual Studio itself. Code can get messy, especially the Using statements in your code behind. I thought ReSharper had some tool to clear this up for me, however, at first glance I did not see anything (maybe you know where it is?). As I right clicked my code behind’s page, the contextual menu popped up as normal, then I noticed “Organize Usings“. Oh, now this is interesting. Could this possibly be what I was looking for? As you can see, it provides the following:

  • Remove Unused Usings
  • Sort Usings
  • Remove and Sort

Yep, “Remove and Sort” is just the thing I was looking for. Take a look at the following screenshot.

Organizing Using Directives

Organizing Using Directives

Read More
Page 1 of 1612345...10...Last »