One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com
Using 89% of the same design the blog had in 2001.
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike,
always wear white.
As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.
How do hash tables and similar data structures use GetHashCode?
Consider a "set" abstract data type. Though there are many operations you might want to perform on a set, the two basic ones are insert a new item into the set, and check to see whether a given item is in the set. We would like these operations to be fast even if the set is large.
I'm using SqlDbSharp to store lots of records and want a quicker way to determine if an entry is already in a table than pulling out and comparing strings. I think storing hash codes in the table for the strings I'm worried about is smarter, especially when things get large, though I'm not absolutely sold on the idea.
Regardless, interesting reading, as pretty much always, from Lippert.
EDIT: My idea is bad.
Guideline: the integer returned by GetHashCode should never change
Ideally,
the hash code of a mutable object should be computed from only fields
which cannot mutate, and therefore the hash value of an object is the
same for its entire lifetime.
However, this is only an ideal-situation guideline; the actual rule is:
Rule:
the integer returned by GetHashCode must never change while the object
is contained in a data structure that depends on the hash code remaining
stable
So there's no guarantee the serialized values will be useful going forward. Likely, but not guaranteed. I can, of course, make my own implementation, which I might. It's a good idea in general -- two equal values mean possible equality and different values mean "not same". Saves a lot of time if we really push this into an index.
Or, as Lippert says about putting things into hash dependent data structures...
Now if we have ten thousand items in the set then we are looking
through one of a hundred buckets, each with on average a hundred items;
the Contains operation just got a hundred times cheaper.
According to the filing, Microsoft received a tip from a person who was contacted via Hotmail by the blogger, who wanted to verify that the leaked source code was legitimate. Instead, the tipper went to Steven Sinofsky, then-president of the Windows Division at Microsoft, and told him of the interaction. Sinofsky forwarded the details to Microsoft's Trustworthy Computing Investigations department, which investigates external threats and internal information leaks.
"After confirmation that the data was Microsoft's proprietary trade secret on September 7, 2012, Microsoft's Office of Legal Compliance approved the content pulls of the blogger's Hotmail account," the filing says.
The only encouraging part of this is that the leak was identified by shoeleather sleuthing, not a carnivorous port sniffer.
Why we don't create a form of email like SnapChat, I'm not sure. Oh wait, that was called POP3.
Finally seriously playing with git-tfs. But how do I .gitignore without accidentally checking in the file [not that that'd necessarily be the end of the world]?
Once cloned, I set up my usual set of gitignore rules (to exclude
builds artefacts, test results etc) and placed them in to the
.git/info/exclude file (rather than a .gitignore file) to ensure that
they arenโt checked in to the TFS repository.
Yes, there is a way to delete all your unwanted iPhone/iPad emails from the Mail app in one operation! No more left-swipe:tap Trash for every individual message. No more Edit: tap the single open circle next toevery individual message and finally tapping Trash. And you donโt need to jail break your device.
The fact that this is 1.) desired and 2.) difficult to find is a major Apple Mail.app fail.
I've got over 6 gigs of "Other" on my 16 gig iPhone 5S (never again. I see the folly of my cheapskate ways -- I realize I'm waaaaay overpaying for space by paying $100 per 8 gigs, but it's sooooo worth it in retrospect. Yes, vowels were on sale today). I used to think maybe it was Downcast, but I don't think so after having deleted podcasts like crazy. I think their space is in "Apps". Once, it was Al Gore's Inconvenient Truth app (can't recall if that's the app name), which downloaded crudloads of extra content as you waded through. That's gone.
It has to be Mail.
Someone needs to write a reasonable mail app. Daggum day job sapping all of my programming time. ;^)
While Zuckerberg may have given up on Facebook-the-product owning social, he remains determined that Facebook-the-company do just that.
Emphasis in the original.
It's not that it's shocking when you read the line. It's that you can't unread it. That's exactly what's going on. Brilliance isn't making up something from whole cloth. That's impossible, honestly. It's seeing what everyone else already sees -- often even should see -- and revealing its nature in a way that can't be unseen.
posted by ruffin
at 3/10/2014 10:39:00 AM
My only complaint about git-tfs is that it won't work on Mac OS. If there was a way to make git-tfs cross-platform, then git-tf almost certainly wouldn't exist.
So your answer, kids, is that you use git-tfs. Or at least that I'm going to start working there.
I know Iโll like my cup of coffee. It will fully meet my expectations. For the $4 I spend I donโt expect it to change my life. I donโt expect it to even last beyond its last drop (and a trip to the bathroom later). Itโs an experience I can fully trust will be pretty much the same each time. Thereโs no gamble here. ...
In short, I know what Iโm getting for $4 and Iโm getting that same experience every time I hit the drive thru.
Fact: Your $1 App is a Total Gamble
Now, contrast this with your app, Mr. Developer. I donโt know you from Adam. ... The return Iโm going to get is questionable at best.... Iโm assured of nothing. Last week I bought a game for 99 cents and it was terrible. I played it once, for 15 seconds. I could be shoving $1 straight down the toilet again for all I know. Your app, good sir, is a total gamble.
Note that he doesn't say your app. Okay, okay, that's wrong. He does, very explicitly, say "your app", but the "you" there isn't you, the specific, real, quality app author. It's "you" the composite app developer, that makes lots of unScottish (aka "crap") apps. It's how the concept of "app developer" appears to your audience -- an author-persona, if you will. (See, honestly, how many dev blogs mention Foucaultian terms? No additional cost to you. I know.)
How do you make your $4 app a trustable experience? That's an app developer's -- any app store software developer's -- challenge.
Or, as Jeff Atwood says in App-pocalypse Now (linking to the post above):
Have you ever noticed that the people complaining about apps that cost $3.99 are the same people dropping five bucks on a cup of fancy coffee without batting an eyelash? Me too, and I'm with the coffee people. $3.99 for your app? Outraaageous!
...
Imagine you bought your coffee, only to open the lid and find it was only half full, or that it wasn't coffee at all but lemonade. If only 1 in 5 cups of coffee you bought actually contained coffee, a $3.99 price for that coffee starts to seem unreasonably high. When you buy an app, you don't really know what you're going to get.
Turns out, the precious resource here isn't the money after all. It's your time.
More specifically, it's your attention, but those terms are relatively interchangeable.
There's only so much attention to pass around. Folks set aside time to take a look at new apps, with an expectation in their head of what they'd like to find. It's like rushing to a store to take advantage of a sale. If the item you want isn't there, you've wasted your time, and that, you can never get back. You're not so upset that the item isn't there, but that you traded in your time trying to back it.
If I'm actively looking for an app that does X, I typically can't afford to try out 15 of them. I have $5 set aside to find a great RSS reader. I research. I try out free alternatives. I finally shell out for Unread. I still feel it's not as good as it could be. How many times to I shell out $5 trying to find a good one? How long do I lurk around review sites? When do you settle for what you've got/good enough?
How do you, as an app developer, rise to the top of that process?
Today Jeff Atwood commemorates 10 years of CodingHorror.com. Congratulations Jeff!
But as I read that a thought occurred to me. Haven't I been blogging as long as Jeff, albeit much less successfully?
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity. About Our Author