Promises versus Deferred

A very com­mon ques­tion after read­ing promises and deferred in the­ory, that comes to our mind is what is the dif­fer­ence? a promise rep­re­sents a value that is not yet known a deferred rep­re­sents work that is not yet fin­ished Another way to look at this is:  promise is a place­holder for a result which is initially […]

Parallels between .NET C# and JavaScript

Talk­ing about asyn­chrony which is gain­ing more and more atten­tion these days. C# recently added the WhenAll and When con­structs to the library through the TPM. TPM started out as a sep­a­rate open source project which was then merged into the .NET frame­work. JavaScript has a par­al­lel for the When — called the promises. What these […]

String Immutability and password string protection

Strings in .NET are immutable objects. Once they are allo­cated, their mem­ory con­tent can­not be changed. When a string needs to be mod­i­fied, the .NET CLR will send the old string to the garbage col­lec­tor, instan­ti­ate a new string object with the desired value, and update the exist­ing vari­able pointer to point to the new […]

CSS Preprocessors: Things to know LESS and SASS

Some­times we tend to for­get why are we using a tech­nol­ogy or frame­work when we’re in the weeds. Here’s a step back to remind us of the pain points and an intro­duc­tion to go over the basics. The CSS pain points Color prob­lem: The col­ors can­not be vari­ables or defined in place where one change affects […]

Distributed Computing — Dan Garcia

Notes based on lec­ture from Dan Gar­cia at UC Berke­ley. Basics include talk­ing about Mem­ory and Net­work. The dis­trib­uted com­put­ing — themes and chal­lenges. The solu­tion to prob­lem is Map reduce. Mem­ory The mem­ory is divided into lev­els. The lower the level, the closer it is to the proces­sor. Level 1 is clos­est to processor. […]

Guided Tours: Bootstrap tour vs. LinkedIn Hopscotch

Fea­tures Hop­scotch Boot­strap­Tour Notes Effi­ciency Rough IE based quick met­ric** Javascript file size (mini­fied) 21kb 24.97kb CSS file size (mini­fied) 11.2kb 2.32kb Javascript load time 78ms 281ms CSS load time 47ms 141ms Options Per Step Options Per Step Options tar­get ele­ment place­ment place­ment title title con­tent con­tent width x padding x xOff­set x yOff­set x arrowOff­set x […]

TCP vs. UDP

Again, before trash­ing my notes, here’s a quick list. I don’t go into the detail, but on a high level its a good start.   TCP UDP I am depend­able I am fast Connection-oriented Connection-less Ordered Un-ordered Reli­able pack­ets trans­fer Not-so-reliable packet trans­fer Heavy weight (slow) Light weight (fast) Fire and For­get Chilled out receiver pro­cess­ing ACK […]

Applied Network Layer Basics

My acronym to remem­ber the net­work ISOOSI layer is APSTNDP. I’m not into net­work pro­gram­ming, but the basics help in being a good soft­ware pro­gram­mer. Fol­low­ing is the index (and some notes I made along the way). It cap­tures the big pic­ture and a bet­ter ref­er­ence, than just head­ings given in the book, […]

Error: In order to perform this operation a successful bind must be completed on the connection.

Typ­i­cally this error hap­pens with the LDAP queries. I was using the System.DirectoryServices to find one of the Secu­rity Groups mem­bers. For me every­thing worked fine, until I changed the pass­word of the account under which the code was run­ning. If you are an IIS user, then the ser­vice account pass­word change can trig­ger this error. […]

Chrome bug — Error in event handler for undefined IndexSizeError: DOM Exception 1 Error: Index or size was negative, or greater than the allowed value.

  Inter­est­ingly this error was not caught even by my window.onerror — the rea­son why I couldn’t see it in the trace when peo­ple started com­plain­ing about weird click events with chrome. https://code.google.com/p/chromium/issues/detail?id=158989   Workaround: http://stackoverflow.com/questions/13104177/getting-an-error-when-using-jquerys-click-event This will not work if the error is inside a library. Well unless you prototype/inherit the method (if its […]

  • Tag Cloud

  • Categories