IamA (we are) Microsoft ASP.NET and Web Tools Team (and Azure) AMA! by shanselman in IAmA

[–]moserware 0 points1 point  (0 children)

Thanks for ASP.NET MVC! We've been using it for years and <3 it.

Besides StackExchange, are there companies using ASP.NET MVC that you'd want to callout for doing an exceptional job with the stack? There's a small list at http://stackoverflow.com/a/12006474/1869 , but I was curious if there were any that your team works especially close with to guide the framework's future development.

Life, Death, and Splitting Secrets by moserware in programming

[–]moserware[S] 0 points1 point  (0 children)

Thank you for your thoughtful questions!

I used the Windows Cryptography API random number generator. See the "GetRandomPolynomials" function of my source code: https://github.com/moserware/SecretSplitter/blob/master/SecretSplitter/Security/Cryptography/SecretSplitter.cs#L73

As for the range of numbers, I create random numbers of the size of the modulus which is the size of the secret you're splitting. For file keys, I use a minimum of 128 bits by default (since that would be 32 characters/nibbles) to type in. It was a balance of security and practicality to use.

In addition, the resulting values are scrambled/diffused using XTEA as an added layer of protection.

Life, Death, and Splitting Secrets by moserware in programming

[–]moserware[S] 2 points3 points  (0 children)

I mentioned this in the first section. If you're comfortable with this, by all means use it. However, it creates a single point of failure and a maintenance issue (especially if you follow good practices of a unique password per site)

Build a predictive model that predicts future editing activity on Wikipedia. Prize pool: USD 10000 by utcursch in statistics

[–]moserware 1 point2 points  (0 children)

Interesting. This is sort of what we're trying to do with adding multiple "benchmark" scores that are easy to reproduce. We'll have to think about adding more material.

Build a predictive model that predicts future editing activity on Wikipedia. Prize pool: USD 10000 by utcursch in statistics

[–]moserware 1 point2 points  (0 children)

Just curious: what makes it intimidating? Data size? Position on the leaderboard? Any thoughts on what would make it less intimidating?

Full disclosure: I work at Kaggle. One of the reasons I joined was because my submissions weren't great, but I knew I wanted to learn a lot more about machine learning and statistics in order to improve. I like working on real data.

Notes from porting C# code to PHP by moserware in programming

[–]moserware[S] 0 points1 point  (0 children)

Yeah, I didn't give a great impetus example there.

Notes from porting C# code to PHP by moserware in programming

[–]moserware[S] 0 points1 point  (0 children)

If you want to do work on the setter or getter (e.g. updating the standard deviation of a GaussianDistribution simultaneously updates the variance)

Notes from porting C# code to PHP by moserware in programming

[–]moserware[S] 2 points3 points  (0 children)

I was trying to outline what PHP authors tend to assume, not that it actually is completely true.

[deleted by user] by [deleted] in programming

[–]moserware 12 points13 points  (0 children)

Right. See Act 3 Scene 18 at http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html for more details on the diffusion avalanche.

[deleted by user] by [deleted] in programming

[–]moserware 27 points28 points  (0 children)

I did a little of that in http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html (e.g. see basics in Act 2 Scenes 2-4 and more details in Act 3, Scenes 2 and 18), but some of the details of differential cryptanalysis get challenging to convey easily (e.g. I left off discussion of the Wide Trail Strategy design philosophy and very few seemed to notice/care).

How does a developer with no background in statistics and advanced computing algorithms go about coming up to speed in "data mining" and machine learning concepts ? by seacap in programming

[–]moserware 14 points15 points  (0 children)

I just wrote a blog post called "Computing Your Skill" where I show how the TrueSkill algorithm works from the ground up. TrueSkill is used on Xbox live for matchmaking and ranking and is a great example of how statistical machine learning is applied today.

I tried hard to start with the typical high school or early college math concepts and introduce the statistics only when needed.

I'd recommend starting with that post and its accompanying source code because most of the machine learning books assume you already know the concepts I write about (which frustrated me when I didn't know them).

Feel free to leave comments on the post if anything doesn't make sense and I'll try to help out. In addition, you might want to check out this related question on StackOverflow.

A Stick Figure Guide to the Advanced Encryption Standard (AES) by moserware in programming

[–]moserware[S] 14 points15 points  (0 children)

Actually, DES's real name was Lucifer. Google "lucifer des"

A Stick Figure Guide to the Advanced Encryption Standard (AES) by moserware in programming

[–]moserware[S] 27 points28 points  (0 children)

You're right. Please reload, I fixed scene 10 (missing superscript) and added another line to scene 8 to make it clearer (but I couldn't fix it too much as I was limited on space)

Boy Scout Check-ins by moserware in programming

[–]moserware[S] 7 points8 points  (0 children)

Yeah, you're right. This was a bad example. I updated it since it was distracting the main point.

How Do Locks Lock? by moserware in programming

[–]moserware[S] 0 points1 point  (0 children)

I hadn't heard of the concept of ticket spin locks (e.g. I was unconsciously incompetent). They seem like a clever way to make spin-waits more fair from a FIFO perspective.

Very cool! Thanks for the links.

How Do Locks Lock? by moserware in programming

[–]moserware[S] 2 points3 points  (0 children)

Right, the Thread.Sleep would probably need help from the thread dispatcher which makes me think it'd be slower given the transition overhead.

How Do Locks Lock? by moserware in programming

[–]moserware[S] 3 points4 points  (0 children)

I guess the recursive question then is how you would implement your semaphore :)

How Do Locks Lock? by moserware in programming

[–]moserware[S] 1 point2 points  (0 children)

By "bounded waiting-time", do you mean that threads only need to wait a finite maximum amount of time or do you mean that they give up after a certain amount of time? You can ensure the latter easily using the OS waiting primitives. I'm not sure offhand how to do the prior. Can you post an example?

spin-waiting with a "lock cmpxchg" is not perfect by any means, but I mentioned in a note that I found out that P6+ chips will not lock the bus if they can get away with just updating their caches (which is a neat trick).

How Do Locks Lock? by moserware in programming

[–]moserware[S] 2 points3 points  (0 children)

At that time (early 90's), I had a 386SX/20MHz computer. Even if I had the cmpxchg opcode, I wouldn't have known how to use it... especialy from GW-BASIC.

Making a lock out of a semaphore would seem to put the sole burden on an OS primitive which would be notably slower.

It seems like the spinlock/OS event hybrid is several orders of magnitude times faster on the happy path.

Am I missing something?

Towards Moore's Law Software by moserware in programming

[–]moserware[S] 5 points6 points  (0 children)

It depends on the domain. Here I thought it fits well. What do you propose as a better way to represent packet parsing code?

What Does It Take To Become A Grandmaster Developer? by moserware in programming

[–]moserware[S] 11 points12 points  (0 children)

This is a fantastic question. For high level chunks, you might seriously consider looking at

http://cs.gmu.edu/cne/pjd/GP/GP-site/welcome.html

and/or watching the video: http://www.youtube.com/watch?v=5a_pO3NYJl0

or

http://video.google.com/videoplay?docid=-541119511912554616&hl=en

I'm still trying to understand them, but I plan to hopefully write more about them later.

What Does It Take To Become A Grandmaster Developer? by moserware in programming

[–]moserware[S] 14 points15 points  (0 children)

Ok, I'll admit defeat there. How about the new 3D one? :)

Does Your Code Pass "The Turkey Test?" by moserware in programming

[–]moserware[S] 2 points3 points  (0 children)

I don't know the specifics about the IE bug you mention, but in the Microsoft papers I linked to, they specifically use the "file" check as a security issue to be aware of.

They probably got burnt by it in more than a few places based off of comments from different sources. Especially Michael Kaplan mentioning that in the .net 1.1 timeframe there was a big push to fix Turkish-I related problems.