Friday links 111

  1. Documentum Search – Lucene versus FAST | TSG Blog
  2. Microsoft releases Kinect SDK 2.0 and new adapter kit – The Official Microsoft Blog
  3. Custom security filtering in Solr – Lucidworks
  4. Sense – a JSON aware interface to ElasticSearch
  5. ElasticSearch 101 – A getting started tutorial
  6. On the nightmare that is JSON Dates. Plus, JSON.NET and ASP.NET Web API – Scott Hanselman
  7. RabbitMQ – Downloading and Installing RabbitMQ
  8. View samples – Apps for Office sample pack
  9. 7 Company Blogs We’re Seriously Crushin’ On
  10. The One Tool Startups Need to Brainstorm, Test and Win
  11. Priceonomics | Data Crawling, Visualization & Analysis
  12. The Most Expensive Typo in Legislative History
  13. Handling concurrency issues in a CQRS and Event Sourced system – DANIEL WHITTAKER
  14. 6 code smells with your CQRS Events – and how to avoid them – DANIEL WHITTAKER
No Comments

MVC planning poker- implementing cards- part 5

The use case 4 states

Use Case 4: Estimation saved
Moderator enters a round name (?) .
Participants choose a value.

The value is a card – that have a value. Wikipedia states that

<<Several commercially available decks use the sequence: 0, ½, 1, 2, 3, 5, 8, 13, 20, 40, 100, and optionally a ? (unsure) and a coffee cup (I need a break). Some organizations use standard playing cards of Ace, 2, 3, 5, 8 and king. Where king means: "this item is too big or too complicated to estimate". "Throwing a king" ends discussion of the item for the current sprint. >>

It is clear that the value ( as stated incorrectly in the use case ) is a Card – and this will be a class that have a value( decimal / double ) and there will be some cards ( unsure, coffee cup, king) that do not have value.

However, the cards must

  1. be converted from and to the decimal / double value( if possible)
  2. be added and converted to decimal / double

The code for the tests will be the following and it is self explanatory

[TestMethod]
        public void CoffeeCupEqualsCoffeeCup()
        {
            var c1 = Card.CoffeeCup;
            var c2 = Card.CoffeeCup;
            Assert.AreEqual(c1,c2);
        }
        
        [TestMethod]
        public void ConvertValuesEqual()
        {
            var d = 1.2m;
            var c1 = (Card)d;
            var c2 = (Card)d;
            Assert.AreEqual(c1, c2);
        }
        
        [TestMethod]
        public void ValuesEqual()
        {
            var d = 1.2m;
            var c1 = new Card(d);
            var c2 = new Card(d);
            Assert.AreEqual(c1, c2);
        }
        [TestMethod]
        public void AddingValues()
        {
            var d1 = 1.2m;
            var d2 = 1.2m;

            var c1 = new Card(d1);
            var c2 = new Card(d2);
            var c3 = Card.CoffeeCup;
            var d = (decimal) (c1 + c2+c3);
            Assert.AreEqual(d1+d2 ,d);
        }

The code is much more complicated . I am thinking where and how to share it – I want to have CI and build on Azure.

No Comments

Friday links 110

  1. Hierarchical Clustering Tutorial: Numerical example
  2. Quick Start | PhantomJS
  3. Time Series Clustering in R
  4. Small Lucene.NET Demo App – CodeProject
  5. DotLucene: Full-Text Search for Your Intranet or Website using 37 Lines of Code – CodeProject
  6. Full-Text Search in ASP.NET using Lucene.NET
  7. Luke.Net – Home
  8. elasticsearch/elasticsearch-net
  9. Nest – Introduction
  10. Extending ASP.NET MVC Music Store with elasticsearch
  11. Glossary of terms
  12. Elasticsearch.org Overview | Elasticsearch
No Comments

MVP Again

I am renewed MVP for C# for Romania .

The email states that <<The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership." >>

I am happy and proud to be an MVP for 7 years!

4 Comments

MVC planning poker-implementing security-part 4

I figured a way to see how to implement security.  When the Moderator creates a table, the factory does not return a Table – but a combination of Table and ModeratorKey. Now the Moderator must maintain his ModeratorKey .The function that boots a participant requires passing this ModeratorKey – and , if it is correct, it boots the participant. The codes are the following:

 [TestMethod]
        public void UseCase3BootTemporary()
        {
            var td = createdTable();
            td.Table.BootParticipant(td.ModeratorKey, newParticipantName);
            Assert.AreEqual(0,td.Table.Participants.Count);
            td.Table.AddParticipant(newParticipantName);
            Assert.AreEqual(1, td.Table.Participants.Count);
            
        }

        [TestMethod]
        public void UseCase3BootPermanently()
        {
            var td = createdTable();
            td.Table.BootParticipant(td.ModeratorKey, newParticipantName,true);
            Assert.AreEqual(0, td.Table.Participants.Count);
            try
            {
                td.Table.AddParticipant(newParticipantName);
            }
            catch (PPBannedUserException)
            {
                return;//expecting this exception    
            }
            Assert.IsTrue(false,"the add participant should be throwing an error");
        }

Now, as you can see , anyone could boot a participant from the table – with the condition, of course, to know the Moderator key.
Next time we will implement cards.

No Comments

Friday links 109

  1. SharePoint 2013 Search Query Tool – Home
  2. The World Doesn’t Know Its Own Numbers « PowerPivotPro
  3. How Google Works
  4. How much do coders make? Check out this data from around the country — Tech News and Analysis
  5. Creating Help Pages for ASP.NET Web API | The ASP.NET Site
  6. When You Start To Do These 20 Things Today, Your Life Will Be Greatly Improved
  7. URI Conventions | Open Data Protocol
  8. Error Handling in ASP.NET WebAPI – Youssef M’s Blog – Site Home – MSDN Blogs
  9. Release Material Design Icons · google/material-design-icons
  10. QR Code Generator WiFi Access
  11. Twerking – Wikipedia, the free encyclopedia
  12. ASP.NET WEB API Validation (A One More Better Approach) | TypeCasted
  13. Daily UX Crash Course: 1 of 31 | The Hipper Element

No Comments

Friday Links 108

 

  1. How a Web Design Goes Straight to Hell – The Oatmeal
  2. scriptcs – Write C# scripts in your favorite text editor
  3. How to import and export information in OneNote
  4. Enhancing online file sharing and storage with OneDrive for Business | The Garage Series for Office 365 | Channel 9
  5. Coding4Fun Blog | Channel 9
  6. Hosting your own Visual Studio Gallery with the Inmeta Visual Studio Gallery | Coding4Fun Blog | Channel 9
  7. 8 ways to improve ASP.NET Web API performance – RadenkoZec blog
  8. Creating Help Pages for ASP.NET Web API | The ASP.NET Site
  9. ASP.NET Web API – Automatically generate API documentation – Stack Overflow
  10. ASP.NET Web API: Introducing IApiExplorer/ApiExplorer – Yao’s blog – Site Home – MSDN Blogs
  11. Creating Help Pages for ASP.NET Web API | The ASP.NET Site
  12. Elasticsearch.org Open Source Distributed Real Time Search & Analytics | Elasticsearch
  13. Elasticsearch – Wikipedia, the free encyclopedia
No Comments

Friday links 107

  1. Should my database calls be Asynchronous? – RickAndMSFT on Azure & MVC – Site Home – MSDN Blogs
  2. Cutting Edge – Source Code Readability Tips
  3. SweetAlert 
  4. SVG vs canvas: how to choose (Windows)
  5. Microsoft/Win2D
  6. The Emotional Boundaries You Need at Work – Greg McKeown – Harvard Business Review
  7. hxgf/smoke.js
  8. Measuring and Managing Performance in Organizations: Robert D. Austin: 9780932633361: Amazon.com: Books
  9. My Philosophy on Alerting – Google Docs
  10. The Twelve-Factor App
  11. The Netflix Tech Blog: Fault Tolerance in a High Volume, Distributed System
  12. A Conversation with Werner Vogels – ACM Queue
  13. Microservices
No Comments

MVC planning poker – First vertical – security – part 3

Let’s read the Use Case 3, Boot from table:

Use Case 3: Moderator can boot from the table
Moderator can boot from the table( permanently of just for this session ) any participant.
If permanently, the participant with this name can not join anymore

 

The following code is written , for adding a participant to be booted from table

public void UseCase3RightPath()
        {
            var ModeratorName = "ignat andrei";
            string newParticipantName = "new participant";
            var roundName = "UseCase2 - Join Table";
            var table = TableFactory.CreateTable(ModeratorName);
            table.AddParticipant(newParticipantName);
            table.BootParticipant(table.ModeratorName, newParticipantName);

        }

And after that? How do I recognize that is a Moderator from a participant?

I must have a layer that recognize that, either from name, either from an ID (because I said that the software is to be put on AD/LDAP , then the name will be unique). However, if I wrote code like that:

 

 table.BootParticipant(ModeratorName, newParticipantName);

Then any part of the software that can find the moderator name could boot any participant – even in the participant the code can be written like this:

table.BootParticipant(table.ModeratorName, newParticipantName);

I need to create a security layer to recognize moderator from participant and , when first adding a moderator, unique identify this moderator over the whole table.

So on the moderator the code will be:

moderator.BootParticipant(table.id, newParticipantName);

So I need now a User class –and a Moderator class – with a function that says: BootParticipant.

The problem is that a regular user is promoted as Moderator in this instruction

var table = TableFactory.CreateTable(ModeratorName);

How this is translated into code ? I am thinking and I will come with a solution next time.

No Comments

Friday links 106

 

  1. SOA Bits and Ramblings: Error handling considerations and best practices
  2. Best Practices for building JSON REST Web Services | Building Feedly
  3. cdn.oreillystatic.com/en/assets/1/event/80/Get Some Rest_ Best RESTful API Practices Presentation.pdf
  4. 10 Best Practices for Better RESTful API | Thinking Mobile
  5. Best Practices for Designing a Pragmatic RESTful API | Vinay Sahni
  6. Stripe API Reference
  7. Validating your model with Web API | Ducas’ World
  8. Pablo M. Cibraro (aka Cibrax) – Validating your models in ASP.NET Web API
  9. ASP.NET MVC 4 public beta including ASP.NET Web API
  10. Search thousands of developer, IT courses – Pluralsight Training
  11. Simple AOP with Fody – Simon Cropp’s Blog
  12. So, JSONP or CORS? – Stack Overflow
  13. JSONP Vs. CORS
  14. c# – REST Hypermedia URI Changes Based On Context in Web API (HATEOAS) – Stack Overflow
  15. ASP.NET – Building Hypermedia Web APIs with ASP.NET Web API

No Comments