OdeToCode

odetocode.com · Personal blog · on HN since 2008

OdeToCode is Scott Allen's blog on C#, .NET, and JavaScript, with posts on language features and programming practice.

What HN saysHN links it for explanations of C# and ES6 features, a 2004 post on blackouts and race conditions, and an old HP printer PJL article.
29HN people shared it
8linked it in comments
36stories submitted
185story points
7 years agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Fun With C# and HP Laserjets
    2 people · 34 points · first shared 2010 · 9 comments on HN
  2. 2
    Where Is .Net Headed?
    1 people · 67 points · first shared 2013 · 105 comments on HN
  3. 3
    Great Engineering Quotes
    1 people · 13 points · first shared 2011 · 4 comments on HN
  4. 4
    Your Abomination Is My Clever Hack
    1 people · 13 points · first shared 2009 · 17 comments on HN
  5. 5
    Clojure and the CLR
    1 people · 6 points · first shared 2011 · discussion on HN
  6. 6
    Plain Old JavaScript
    1 people · 5 points · first shared 2012 · 2 comments on HN
  7. 7
  8. 8
    The Law of the JSON
    1 people · 3 points · first shared 2019 · discussion on HN
  9. 9
    Visual Designers Don’t Scale
    1 people · 3 points · first shared 2008 · discussion on HN
  10. 10
    Programming Windows 8: The Sublime To The Strange
    1 people · 3 points · first shared 2011 · discussion on HN
  11. 11
    Don’t Let Your Code Marry An Axe Murderer
    1 people · 3 points · first shared 2010 · discussion on HN
  12. 12
    The Troubles with JavaScript Classes
    1 people · 2 points · first shared 2016 · discussion on HN
  13. 13
    Keeping a Clean Startup.cs in Asp.Net Core
    1 people · 2 points · first shared 2016 · discussion on HN
  14. 14
    Canceling $http Requests in AngularJS
    1 people · 2 points · first shared 2014 · discussion on HN
  15. 15
    Building Better Models For AngularJS
    1 people · 2 points · first shared 2014 · discussion on HN

What HN people wrote when they linked it

bobthepanda · 2019-08-09
It's a bit pre-emptive to start witch-hunting, though. The 2003 Northeast US/Canada blackout was caused by a race condition: https://odetocode.com/blogs/scott/archive/2004/04/11/blackouts-and-rac…
yawgmoth · 2016-08-29
(Too long to edit my other reply) Also used was object destructuring: http://odetocode.com/blogs/scott/archive/2014/09/11/features-of-es6-pa…
AndrewDucker · 2015-06-22
Thank you - that's clear. Seems similar to C# with its "Primary Constructor": http://odetocode.com/blogs/scott/archive/2014/08/14/c-6-0-features-par…
lusr · 2012-03-24
Binding between a request and a controller method is entirely customisable. The framework uses a completely customisable number of parameter sources (query string parameters, POST parameters, session variables, you can customise this to e.g. query LDAP if you want) and binds those to the parameters of your method in a completely customisable way. See, for example http://odetocode.com/blogs/scott/archive/2009/04/27/6-tips-for-asp-net… . That being said there is definitely a deficiency in strong typing in ASP.NET MVC as-is. That's why I use T4MVC (http://mvccontrib.codeplex.com/wikipage?title=T4MVC_doc&referringT… I'm not too sure how the MVC team have done things much differently, though, without overcomplicating the framework... you'll note the T4MVC approach is based on code generation that inspects your source tree.
nbpoole · 2011-04-11
This is a very old technique. I came across it six or so years ago: the article where I found the code, http://odetocode.com/humor/68.aspx, is from 2003. It's a lot of fun though. And PJL can be very interesting to work with: I built a tool that used it to query printers for status information (although the amount of information I could extract seemed very dependent on the printer).
ionfish · 2010-07-08
Only implicitly: no threading model is documented in the ECMAScript Language Specification [1], and no widely-used interpreter implements threading. The new Web Workers specification adds something like threading to JavaScript in the context of the browser [2], and Node intends to add support for this on the server as well [3]. Have a look at [4] for a nice article on threading in JavaScript. [1] http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.… [2] http://www.whatwg.org/specs/web-workers/current-work/ [3] http://nodejs.org/ [4] http://odetocode.com/blogs/scott/archive/2007/01/08/javascript-and-thr…
johns · 2009-12-30
1. <p if="condition">Foo</p> 2. HTML encoded by default 3. <li each="var foo in bar">${foo.Name}</li> 4. Client-side rendering: http://odetocode.com/blogs/scott/archive/2009/03/12/client-rendering-v… 5. conditional attributes (kludgy syntax, but better than Webforms VE) 6. Content "spooling". You can create a partial that registers a script tag/script specific to the partial, but only if it hasn't been registered already. Partials can also spool content to any other content area. 6a. <script once="jquery" src="..."> The video quality of this is a little rough, but here's a good overview by the guy that started Spark, Louis Dejardin: http://whereslou.com/2009/06/24/spark-releas-and-presentation-for-mpls…
jcranmer · 2019-08-09
> The 2003 Northeast US/Canada blackout was caused by a race condition: https://odetocode.com/blogs/scott/archive/2004/04/11/blackou... No, it wasn't. The race condition caused First Energy to not notice that their energy grid was one more line trip away from catastrophic failure. But there were four line trips that day caused by power lines hitting trees and shorting, the last of which triggered the dynamic instability that caused the blackout. First Energy had a whole host of issues that together caused the blackout, and the race condition in the alarm monitoring system was but one of them. The full report is actually an interesting read. Essentially, the key problem that caused the massive cascade was that the line trips meant that large loads of power had to reroute long distances to get to the Cleveland demand area, and the non-infinitesimal amount of time it takes for the power to establish that route caused several lines to trip, to the point that the demand was cut off from the network before the supply surge reached it.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close