4,107 karma · joined Feb 17, 2010 (16y ago) · 1,490 submissions
https://coderescue.com
comment 12y ago · link · parent
std::string is missing a lot of functionality one tends to need when dealing with strings (such as iterating over UTF-8 characters or fast conversion to UTF-16, but also things like search-and-replace). And it makes me sad that I can't use that string library any more (legally) because of the license PlayFirst insisted on using (no redistribution).
As far as I'm concerned, though, there IS no good string library available for use anywhere. I've looked at all of the ones I could find, and they're all broken in some fundamental way. I guess solving the "string problem" isn't sexy enough for someone to release a library that actually hits all the pain points.
comment 12y ago · link · parent
And the best part was the encryption on ALL the games' data files was based on a key derived from the binary executable (the .so file), so if anyone were to hack that executable, the game wouldn't run at all. I should have thrown up a screen that let people know that it was a cracked version, and where to get the real thing. And I DEFINITELY should have changed the Flurry code; my "paid game" analytics were completely shot after the cracks were released. Duh.
A serious hack attempt would have broken it, no question; there's no unbreakable DRM, after all, and I wasn't even using serious encryption (I decided it didn't matter: A typical attacker is not going to attack the encryption mathematically, they're going to decompile the binary to get the key AND algorithm, so as long as it can stand up to trivial attacks, it's strong enough -- connecting to a known encryption algorithm might actually make it EASIER for them, since then they'd have known function names and parameters). I just wanted to raise the bar.
comment 12y ago · link · parent
And that user then promptly refunded the game within the (then-new) 15 minute window.
And (surprise!) someone ended up uploading a "cracked" [1] version of my game to warez sites shortly thereafter. Talk about adding insult to injury.
[1] I used a sneaky way to detect "cracks" in my game that involved, in part, letting the hacker think they'd cracked it: The game would query Google to see if they'd paid for it, and if not, it would throw a "Sorry, you don't own this game" dialog up. There were scripts around that would remove the standard Google DRM, though; instead of fighting that, I LET them "hack" it, and afterwards it wouldn't bring up that dialog any more. But then the behavior reverted to being identical to the free demo (first 30 levels free, then you had to buy the real game). It was "hacked" almost a dozen times, and never once did anyone figure out how to get past the second layer of protection.
comment 12y ago · link · parent
Many books, movies, photos, and other IP instances out there are difficult to track down solid ownership info for. Sometimes the contracts surrounding the IP are so complex as to make it impossible for even a trained IP lawyer to determine who owns what. In some cases even IP claimed by a particular company may not be valid [1].
If there were a national registry that listed who owned what rights to a particular property, and you had to pay to be included (maybe the initial copyright registration pays for the first X years, but after that you have to continue to pay to continue your protection), it could not only clarify who "owns" what, it could list those people who had specific sub-licenses to the property in question, and what the details of their licenses are.
To help combat orphan works, you can throw in one other important requirement: Even if we give them X years (30 or otherwise) for the initial registration requirement, they would also need to keep their contact information current at all times, on pain of losing their registration. If you try the forms of contact and get wrong numbers and returned letters, then you report that fact to the copyright registry, and if THEY can't contact the owners within, say, 60 days, then ALL the copyrights owned by that entity get released.
I know of some properties (old games in particular) that have such confused licensing surrounding them (with companies buying "rights" in large packages and then ignoring them, or the companies closing down with no clear record of who ended up purchasing those particular rights...) that they are languishing in limbo. No one can make a sequel, no one can republish them on new platforms... With a registry, you could look to see WHO is currently paying the upkeep fee, and with the "keep your contact info public" requirement, at least you'd be guaranteed that you'd be able to contact the current rights holder.
[1] http://www.nytimes.com/2013/06/14/nyregion/lawsuit-aims-to-s...
comment 12y ago · link · parent
And it looks like a reserved G2 instance is 0.65/hour (though can be lower on the spot market and in the reserved instance marketplace). So if there's a 120x speed improvement over the "single core 2.2GHz AMD Opteron" (and that's assuming each core is as fast as the Xeon core above), for only 11x the cost...well, it gets a lot cheaper.
In fact, it ends up, if I haven't done my math wrong, at about $94,900 of full instance time (less if you get spot or reserved instances). [2] To win the $200k prize. Hmm....
[1] http://archive.benchmarkreviews.com/index.php?option=com_con...
[2] "the equivalent of almost 2000 years of computing on a single core 2.2GHz AMD Opteron": That's 17,520,000 hours. If the G2 instance gets you 120x performance improvement, that's 146,000 hours. At 0.65/hour, that's $94,900.
comment 12y ago · link · parent
My own personal favorite language -- Lua -- is also really easy to write readable code.
It also happens to run 3-100x faster than the equivalent Python, and has real coroutines. And easier C bindings.
There are other goals in programming language design than "make it pretty."
comment 12y ago · link · parent
Hmm...if you're writing in Perl or PHP, maybe. Though even then a good developer can write clean code even in those languages.
I'm very much NOT a fan of Python, but one advantage of Python is it's easier to write readable code.
As to the Illiterate: It's absolutely essential to be able to read other peoples' code if you're programming on a team. It would be nice if most developers documented their code better, but since 99% of them don't document well, it's critical to be able to dive in and figure out what the other developers have done.
comment 12y ago · link · parent
I'm not sure how they compare in practice, but it might be worth calculating how many hours an Amazon G2 instance would take, using their high-end graphics cards as CUDA processors. I think the cost per performance ratio is much lower, and that could change the equation in the other direction.
comment 12y ago · link · parent
It's hard to measure the results of networking. My first awesome gig here in Colorado came as a result of networking with no clear goal: Made a friend in the local scene, and ran into him as we were leaving a conference, where he introduced me to someone else. Ended up with a nice high paying gig from that, as well as a great item on my resume.
At this point I've done enough networking that the jobs are finding me. But people only know that I create value because I've talked with them and told them. Doesn't mean the networking was useless since I don't do it as much any more.
comment 12y ago · link · parent
It came to a head at one point, and the result was a reorg so that he was no longer my direct supervisor; I threatened to walk if the situation continued. The manager I reported to next wasn't particularly higher "rank", by your f(), since I had at least equivalent talent and more experience, but he was comfortable with the relationship(instead of acting like he felt threatened by it), and as such made a much better manager.
comment 12y ago · link · parent
When he realized he'd started at a younger age, and had maybe a year on me, he decided it WAS OK, that he did have "more experience."
He's a smart guy, but I've always wondered at that -- wouldn't it be BETTER to hire people smarter than you, rather than the alternative?
comment 13y ago · link · parent
Welfare also scales payments based on the number of kids you have. This is a common (and almost certainly apocryphal) accusation against people currently on welfare; if it's ever true, it's an exception and not the rule. (which is why it would be news)
What is true is that the vast majority of people want to feel useful -- and (at least when the women in question are even moderately educated) they don't want to have extra children just to have a higher stipend.
comment 13y ago · link · parent
It can be worse that this.
At least in some states, every dollar you earn is deducted (at least in part) from your welfare checks. This was at least the case a while ago; I couldn't vouch for its truth today after welfare has been "reformed" several times. It was definitely true at one time, though.
When this was true, at the very least, it was a severe disincentive to working, since until you were able to make more than your welfare check, you would be at best be making pennies on the dollar by taking a job.
comment 13y ago · link · parent
How many of the people who say they prefer a physical book have read a complete book using a modern e-reader? How many of them have learned about a book, gone to their e-reader, bought it, and started reading, all within 5 minutes, while sitting in their pajamas, at 11pm? How many have purchased enough e-books that they feel they are carrying a small library in their bag, even though it still only weighs less than a pound.
There are compelling reasons to like an e-reader even if you still really prefer a physical book.
comment 13y ago · link · parent
Tax law all too frequently shapes behavior, and this is one of those cases.
comment 13y ago · link · parent
Of course it was. It's always about bugs.
But code that has never been executed can have orders of magnitude more categories of bug than code that works at least once. And I'm good enough that 99% of the time I don't miss the corner cases -- it's the more blatant problems that tend to bite me, and those are eliminated by making sure all the code gets executed at least once. Once my code is wired up right, it tends to work. But I won't know if it's wired up right until it's been executed once.
>Lack of complete test environments for your mandatory 3rd party APIs suck!
Try writing code for systems without the ability to debug. Or where something is going wrong and there's no way to figure out why based on logging or debugging. Or without complete (or correct!) documentation. Or for projects where, once you ship, there is no option to patch your app, so it needs to be as close as possible to bug free. Thankfully modern platforms (mostly!) avoid the last pitfall, but I've been there, along with the other situations. And I win these battles.
>I suspect we have a fundamental disagreement of opinion as to what constitutes "overkill".
No, I'm just not communicating effectively. And it's no longer worth it for me to try any harder.
FWIW, I'm not talking about complete test coverage. The apps I usually write (games) are almost entirely pointless to write tests for. Ever. Sure you can for some specific libraries you're using, but for the actual game itself? Hardly ever worth it.
I've shipped games with zero chance for patching, some pretty popular -- and I didn't hear of any bugs worth mentioning after release. And there were no tests involved in the development process (other than the kind where QA tests the game and tells me what doesn't work). I know that concept is a bit alien on HN, but it's rare to find a game (or even a game engine) with a nontrivial test suite.
Most game bugs wouldn't be prevented with unit tests anyway -- probably only one in a hundred at best. They almost always result from emergent complexity, not from a single function returning a bad value.
comment 13y ago · link · parent
Spent time (and money) on your own initiative to develop an app that's been published in the Android and iOS stores.
I spent my own time developing a game that's in the Android and iOS app stores.
> How likely is it that you'd successfully handle all execution of your app even with real testing?
My point wasn't about bugs. My point was about execution path coverage: If code has never been hit, then it may contain hidden bugs.
And if I'm doing things right, 100% of the code would be executed in testing. There are techniques to specifically track code coverage, so you don't need to wonder whether a code path has been triggered, but in general I don't write code and then never execute it.
> But I still think you're continuing to overstate the difficulty of minimizing the combinatorial effects and general difficulty of handling missing permissions.
It's your right to believe as you will.
comment 13y ago · link · parent
Catching the error isn't even half the battle, either. If you want the app to "work," you need to explicitly test the full set of permissions any particular block of code might need prior to enabling aspects of your UI that require them, or your app is going to behave badly.
At best, your proposed solution would prevent the app from crashing, though it could still get into a bad state -- a non-modal dialog waiting for a particular result could never be closed, for example, because of an unexpected throw that skipped over the proper cleanup code. Yes, that code SHOULD be in a finally{} clause, but what if you missed something? I'm an awesome developer in a lot of ways, probably even a 10x+ developer, but I don't consider myself perfect. Do you?
Have you developed apps for Android as an indie developer? Or for iOS? How much extra time would you want to spend to cover corner cases like this, instead of adding features that might actually improve your revenues or ratings?
How likely is it that you'd successfully handle all 255 extra permutations with no real testing? And don't think unit tests would solve the problem: You'd really need full functional and UI tests, probably with a human to really be sure that you're covered. Some apps really don't work without certain permissions (say an Internet chat app with no INTERNET permission), so be sure you have reasonable error messages that explain to the user that the app can't work if you don't give it the right permission. And word the message so that your average non-techie will understand it, or be prepared for lots of negative ratings with "app doesn't work! uninstalled!" comments.
No, making it easy for people to kill permissions on an app is the wrong answer. Giving developers the ability to optionally query sets of permissions reduces the complexity from exponential to constant, and allows for optional features to exist in an app.
comment 13y ago · link · parent
If the OS handles it transparently, then sure, it could work. But as I understand things, that's why the CyanogenMod "feature" of selective permission disabling fails: If I ask whether the Internet has a valid signal, and it unexpectedly throws an error, then my app will either crash or behave in an untested way (depending on whether I'm catching top-level errors and continuing to run anyway). I don't know how the 4.3 feature handles it.
I don't want users to have the ability to disable Internet, though; not if I'm writing an ad-supported app. I don't want to kill the app on devices that simply never connect to the Internet either, so I'd prefer if the OS guaranteed that, IF there's an Internet connection, it will give me full access to it.
comment 13y ago · link · parent
You're right in that it would be possible to have the OS report "0 contacts" instead of throwing an error, and THAT case should be handled.
In fact, I'd love to have the ability to block reading of contacts from all apps except ones I explicitly allow. It's the more basic "INTERNET" permission that is core to monetizing apps that I take umbrage with blocking; if someone is using my contacts somehow to monetize their app, that's not cool, and I absolutely wouldn't want to use an app that did that.
comment 13y ago · link · parent
As an app developer, I sympathize, but if you've got a reasonably complex app that requires 8 permissions, that's 255 permutations of code paths that you need to test (that you don't need to test right now) to make sure your app performs correctly. And that's not a reasonable request to make of an app developer.
Aside from that, some apps rely on, e.g., INTERNET permission to do their monetization. Aside: It's majorly not cool to "block ads" just because you don't like ads; pay for the ad-free version if you don't want to see ads. It's cheap in almost all cases. It's HARD to make money as an app developer; it may not be technically stealing to block ads, but it's ethically indistinguishable.
That said, as an app developer I would love to have the ability to request OPTIONAL permissions, or even better, request them at runtime (basically, let the OS bring up a "Do you want to let this app have PERMISSION_A, PERMISSION_B, and PERMISSION_C, to enable the following feature: FEATURE DESCRIPTION"). Again, though, I'd want to request a SUITE of permissions at once, so I don't have to worry about testing with random user-configured permutations of permissions.
There are some features I'd love to add, but they wouldn't be needed by everyone -- and I wouldn't want to scare people away from downloading my app, so I don't add them at all.
But I absolutely would still want guaranteed permissions: If my app needs Internet to make money, then I don't want someone to be able to use it if they're blocking Internet for the app, or otherwise blocking ads on the phone. You don't want the ads? You're free to use another app, or pay to turn the ads off.
comment 13y ago · link · parent
Depends on where you shop. Some stores (particularly big box stores -- Best Buy comes to mind) always ask to see the card and ID. If they do, it's a showstopper for it to not be real. There's NO WAY a store with that policy would let you buy something with an anonymous black "card".
Not only does this scream "FRAUD!", it almost certainly WILL be used for fraud, almost immediately on release. Think of how easy it would be to allow a server at a restaurant to "steal" someone's card -- photo and a swipe, and POOF, you can use their card the next time you go somewhere that doesn't look at the card. How long will it be before stores that DIDN'T ask to see it before start asking, and specifically disallowing the use of these fraud-enabling devices?
Regardless, there's no way I'd risk getting to the point of purchase somewhere and finding out at that point they won't accept my card. And I AM part of their target market: I probably have 8 cards in my wallet, maybe 10. It's complicated, but they all have a unique need that makes me carry them.
I'd love to have something like this that "just worked," but I doubt this would be it without orders of magnitude more education and many layers of security protection to prevent fraud -- probably enough layers to be an impediment to people actually signing up to use it (receiving physical mail being required to register a new card comes to mind).
comment 13y ago · link · parent
And GMail won't update to 3.0 in any meaningful way, no matter what, since they want to be able to mine the data in your email, so they will still be storing it on their servers "in the clear." Which means the next time NSA hacks their servers, they'll still be able to read all the email.
Best case is that email 3.0 will interoperate with 1.0, or GMail at least accepts 3.0, if only to unencrypt it on their servers. Short of that, it would take a compelling use case to convince people to leave GMail, so we'd be right back to where we are with email 2.0: No critical mass of adoption, meaning 98% of the email you receive and write is unencrypted.
comment 13y ago · link · parent
Beyond Compare (linked above) lets you set patterns to ignore, which has been incredibly useful for when an autogenerated time/date stamp is changed in 1000+ files; I can say "ignore that change; tell me what changed that DOESN'T match the pattern".
You can do the same thing with grep on the command line of course. But then you lose out on all the GUI awesomeness.
I've used Araxis, and it's Even More Awesome, but 5x the cost (last I checked) as Beyond Compare, and I didn't think it was 5x as awesome. BC has gotten much cooler since then too (with comparison plug-ins, and bitmap compare -- let's see diff compare two bitmaps and tell me which pixels have changed! -- and DOC file compare, and normalized XML file compare, and so on ;).
comment 13y ago · link · parent
I hop back and forth between GUI-based editors and the command line. Some things are just better in a GUI, and diff is one of those things--especially any nontrivial diff.
[1] http://www.scootersoftware.com/
[2] I'm sure you can do this in vi and/or emacs as well. I leave how to do that as an exercise to the reader.