-
As soon as I started learning Ruby, a few years ago, I got immediately hooked on its Range class. I could not believe I had been programming in .NET without them for so long. I like to think of range objects as the specification for a for loop, packaged in an object that can be passed around. That's...
-
This post is part of a series called the Guided Tours . In this second installment we are still looking inside the jQuery code. Trust me, even if it's hard to digest, you can still learn enough if you focus on a little bit at a time. The code we are interested in today is the following. //from jQuery...
-
This post is part of a series called the Guided Tours . I'm sure I'm not alone when I say that one of the best ways to improve our coding skills is by reading code written by someone else. Sometimes we don't realize how lucky we are to have so much source code at our fingertips, namely Open...
-
This post is part of a series called JavaScript Demystified . This particular chapter is further divided in two parts. Read Part 1 . Build your own hierarchy Let's pretend we are building some scripts that deal with musical instruments. We could define our own Guitar class type like this: //The constructor...
-
This post is part of a series called JavaScript Demystified . This particular chapter is further divided in two parts. Read Part 2 . In a previous installment in this series we saw how we could create constructor functions in JavaScript. Back then I just mentioned that we don't have classes in JavaScript...
-
This post is part of a series called JavaScript Demystified . I'm pretty sure by now you have heard at least once that eval is evil . Some nuggets from Eric Lippert's post: if you are considering using eval then there is probably a better way People, eval starts a compiler. I'm also pretty...
-
This post is part of a series called JavaScript Demystified . In our last installment in this short JavaScript series we took a look at closures. In some of the examples, we saw functions being declared (and returned) inside other functions. The capability of declaring a function inside another one is...
-
This post is part of a series called JavaScript Demystified . When I wrote about functions in JavaScript I mentioned that functions are more than just a block of code: Function is a standard data type in JavaScript, an object indeed; you can pass them around and copy them. Let's take a look at this...
-
This post is part of a series called JavaScript Demystified . Time after time I find JavaScript code that has bugs caused by lack of proper understanding of how functions work in JavaScript (a lot of that code has been written by me, by the way.) JavaScript has functional programming characteristics...
-
Language Envy: This post is part of a series where I wish C# had a particular feature I came to like when working with other programming languages. Every time I have to produce a string in C# the little groaning chimp that lives inside my head pulls his hair out. It's about time we had a better way...
-
Language Envy: This post is part of a series where I wish C# had a particular feature I came to like when working with other programming languages. It's easy to let a small language feature go unnoticed. The more I spend time writing JavaScript and Ruby, the more one little detail shows itself loud...
-
Although C# is the language that I can call myself proficient enough to make a living these days, there are other languages that I have to use for specific tasks (like JavaScript, SQL, XSLT.) I also like using other general purpose languages for pure exploration or pet projects. I'd include Ruby...
-
Turning the table So here I am, the guy often in charge of assisting new developers get up to speed with my designs and code, facing the diametrically opposite situation. Like many other developers, I have changed jobs more times than I'd like to. I love the chance to learn from a new industry or...
-
Right after I mildly complained about the lack of thoughtful orientation on a new job, I was pleasantly surpirsed with this lovely schedule for my first week at the new place. Just wanted to share that with you. There's hope for our world.
-
Nothing like a long 3-day weekend to help forgetting about the old problems from your previous job. This should help making room for the upcoming avalanche of new information and ramping up on the new gig. Show me where the North is I'm also taking this short interval to revisit my previous experiences...