|
Today a follow-up to my 2010 article about the meaning of the is operator. Presented as a dialog, as is my wont! I've noticed that the is operator is inconsistent in C#.... What's up with that? I did not have NULL relations with that variable.
|
|
|
|
|
He doesn't seem to get it.
"
The is operator is used to check whether the run-time type of an object is compatible with a given type
"
"
An is expression evaluates to true if both of the following conditions are met:
•expression is not null.
•expression can be cast to type.
"
|
|
|
|
|
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|
|
meh
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
|
Terrence Dorsey wrote: I did not have NULL relations with that variable.
Very cute, Terrence.
However, he's confusing the value type vs. the declaring type. The "is" operator tests the value, not the declared type. As has been noted on StackOverflow, if you want to test the declared type, use something like this:
static public Type GetDeclaredType(TSelf self)
{
return typeof(TSelf);
}
What surprises me is the number of people that have commented that appear not to have understood this crucial distinction.
Marc
|
|
|
|
|
Joe Armstrong (of Erlang) while reviewing Elixir (Ruby like language that compiles to Erlang Virtual Machine) states his Three Laws of Programming Language Design. What you get right nobody mentions. What you get wrong, people bitch about. What is difficult to understand you have to explain to people over and over again. An OS may not injure data or, through inaction, allow data to come to harm.
|
|
|
|
|
Terrence Dorsey wrote: An OS may not injure data or, through inaction, allow data to come to harm.
Why did nobody explain this to Microsoft back in the eighties?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
whaaa whaaa whaaa
crybaby
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
You should've linked to Joe's post directly; this is just too epic not to share:
Quote: If a version3 Erlang compiler is given a file that starts:
-version(5,0).
Then it should say
** auuuuugggghhhhhh **
Oh bother and blast, I am mere version 3 compiler
and cannot see into the future.
You have given me a version 5 program. This means
my time on earth has come.
You will have to kill me. You will uninstall me,
and install a version five compiler. I will be
no more. I will cease to exist.
Goodbye old friend.
I have a headache. I'm going to have a rest...
**
All compilers need to implement something like this instead of the lameness they currently use:
The selected file is a solution file, but was created by a newer version of this application and cannot be opened.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Every day, many thousands of open source contributions are made on GitHub by developers around the world. This data is publicly available through the API and—even more conveniently—on the GitHub Archive.... The one graph that is especially awesome in all sorts of surprising ways is the contributions heat map on every user's profile page.... This ends up being extremely motivating because it lets the developer see their progress in real time. With this in mind, it seemed like a good idea to provide a more complete set of global statistics summarizing the hacker personality of any GitHub user. So that's what I did. How much of an open source hacker are you? Github knows.
|
|
|
|
|
On my site is a pointer to an interesting page by Jukka Korpela of Finland, called "Character histories: Notes on some ASCII code positions". It tells how various interesting characters (then new to many computer character sets of the time) came into membership in the ASCII set. Such research is difficult now, in an 8-bit byte, ASCII code, and soft-copy screen world, where typewriters, codes of different length, and computer word lengths have been pretty much forgotten. And their documentation is mostly in hardcopy libraries; not on the Web. This vignette came about because I started to wonder: If the curly braces exist in ASCII because of my efforts and examples, and/or If I had been first to put curly braces, via IBM's Stretch, into the internal character set of any computer. Bob Bemer is responsible for placing 11 different characters into ASCII. This is their story.
|
|
|
|
|
In this series of posts I’ll explain why Haskell’s data types are called algebraic - without mentioning category theory or advanced math. The algebra you learned in high school starts with numbers (e.g. 1, 2, 3 …) and operators (e.g. addition and multiplication). The operators give you a way to combine numbers and make new numbers from them.... When you get a little older you are introduced to variables (e.g. x, y, z …) which can stand for numbers. Further still, and you learn about the laws that algebra obeys. Laws like 0+x=x [and] 1⋅x=x which hold for all values of x. There are other laws as well, which define properties of numbers or of operations. When mathematicans talk about algebra, they mean something more general than this. In the algebra of Haskell types, the objects are types.
|
|
|
|
|
Camino, the OS X browser that famously does things "the Mac way," has been discontinued after ten years of development.... Recent Mac converts—even not-so-recent converts like me—have it easy when it comes to picking a Web browser. OS X comes preloaded with Safari, a perfectly fine modern browser, and Chrome, Firefox, and even Opera are a couple clicks away. All of the browsers are reasonably quick, well-supported, and look and act like Mac applications are supposed to look at act, but things weren't always this way; ten years ago, the Mac browser landscape was pretty bleak. You outlasted IE on the Mac, and for that we are thankful.
|
|
|
|
|
We believe in one editor, the editor almighty, macros binding heaven and earth, of all functions, seen and unseen. We believe in one editor, which is emacs the only son of Richard Stallman eternally begotten from the Gnu... It is the Meta+< and the Meta+>.
|
|
|
|
|
lol.
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|
|
Nothing exists in a vacuum, certainly not any of the products we review. The context of our subjects has a lot to do with what’s expressed in our reviews, even in the stark light of data. Scores alone are never enough, we juxtapose the latest widget to hit our bench against its most likely competition, against its predecessors, and against anything else that might make sense.... That’s no different here, but we could almost imagine foregoing the Pixel’s context and telling its tale absent its past, so disparate it seems from the Chromebooks that came before. But then we’d miss some of the most interesting bits. For developers, it's not yet a post-PC world. But is the Pixel the PC of the future?
|
|
|
|
|
Continuous integration can be awesome. It can significantly improve quality on projects. But incorporating it into daily life for the entire team can be hard. It ultimately only works if everyone on a team is both aware of the state of the build, and is actively engaged in fixing it when it breaks. We built My CI to help team leads achieve both ends: generate awareness, while encouraging everyone to fix broken builds; hopefully while making things a little more fun along the way. What Is It? My CI is a service that you turn on from our desktop software to... turn a smart phone or tablet into a mini Siren of Shame. Did you break the build? Your phone will alert you (and everyone else).
|
|
|
|
|
I believe screen reading software stands at a crossroads right now. At Google I/O 2013, Google showed some of the possibilities of the ChromeVox API. What they demonstrated showed some fundamental changes in the ways screen reader software interacts with Web browsers. In this post I will discuss how I see this as a fundamental shift. I’ll discuss both the risks and rewards that I see with this model. ChromeVox and a fundamental shift in the way screen reading web pages works.
|
|
|
|
|
Currently I am working on the iLang LMS (Language Management System) as a web developer. This project is one of those that became stable, but was never really completed. Our customers are large educational companies, among them Kroton, which is the largest educational company in the world, and DeVry University, ranked 5th. In that scenario, the business requirements are always changing, so our project is an ever-evolving organism that never gets completed. A titan of an author who has written 35 articles and won 19 competitions on CodeProject.
|
|
|
|
|
Perhaps you’ve read posts like Falsehoods Programmers Believe About Names and Falsehoods programmers believe about time. Maybe you’ve also read Falsehoods programmers believe about geography. Addressing is a fertile ground for incorrect assumptions, because everyone’s used to dealing with addresses and 99% of the time they seem so simple. Below are some incorrect assumptions I’ve seen made, or made myself. Behind The Hot Water Pipes, Third Washroom Along, Victoria Station.
|
|
|
|
|
|
I actually have three recent experiences with trying to deal with funky addresses.
For one, I went to Coachella, which is located at 81-800 Avenue 51, Indio, CA. My GPS did not allow me to enter a dash in the number.
I live on a street with three different names. To add insult to injury, the section of the street I live on has the same name as another street in my town. I have tried to place orders online, but they think I'm not in range because their system only knows about the other street by the same name. And most food delivery drivers have some sort of trouble finding me (one guy who delivered from a place less than a mile away took over an hour to deliver once).
Also, I have a private mailbox. Not a PO Box, but a PMB. This causes a bit of confusion (to be fair, the first I had heard of a PMB was when I got one). It's especially confusing, since my PMB resides at a business which also has a suite number.
Addresses can be a real PITA sometimes.
|
|
|
|
|
AspDotNetDev wrote: (to be fair, the first I had heard of a PMB was when I got one)
So, one morning you got out of bed, had coffee, heard a knock on the door, and there stood a PMB claiming" Hi! I'm yours!" ?
|
|
|
|
|
I was at a shop that helps you send packages. I noticed they had mailboxes and I needed one (assuming they were PO Boxes), and when I signed up the PMB concept was explained to me.
|
|
|
|
|