HNHacker News
TopNewBestAskShowJobs

electrograv

2,952 karma · joined May 3, 2012

submissionscomments
electrograv··on Do we live in a computer simulation? UW researchers say idea can be tested
The scientific paper deals with "the hypothesis that the observed universe is a numerical simulation performed on a cubic space-time lattice or grid".

Just because the universe may operate with computer-like regularity and grid-like data structures does not mean "the universe is a computer simulation." At best it means the fundamental laws of physics are "computer-like".

Whether "resembles a computer simulation" equals "is a computer simulation" is a metaphysical/philosophical question.

Finding uncanny resemblance between our own reasoning concepts and the universe is not new - and this uncanny mirroring between abstract mathematical concepts and the laws of physics has been known for quite some time. It's a mystery, not an answer. See: "The Unreasonable Effectiveness of Mathematics in the Natural Sciences" by Eugene Wigner:

http://www.dartmouth.edu/~matc/MathDrama/reading/Wigner.html

electrograv··on Go at Google: Language Design in the Service of Software Engineering
It's been a while since I've used Java too, but I don't remember it requiring try..catch around ALL code. If you don't catch immediately, it defers the error to somewhere up the stack. This is what I meant by "ignoring" exceptions being the default behavior.
electrograv··on Go at Google: Language Design in the Service of Software Engineering
I think the criticism with exception handling is that it's a bad idea to silently pass errors up the stack by default. This encourages deferring your problems to outer scopes, at which point you often aren't sure precisely what the error means (or you may not have known to expect it at all).

With Go, although you can pass error codes up the stack if you want, you have to do it explicitly. This forces you to think twice before doing so.

This is a key difference: exception handling subtly encourages ignoring errors and letting outer scopes handle them, while error codes force you to deal with your problems within the immediate scope, and then decide what to do from there explicitly.

electrograv··on China prepares to grow vegetables on Mars
I actually think that it's quite fair to criticize a "leading" achievement that falls apart or otherwise fails soon after.

For an achievement to "count", I'd make the bold claim that it has to actually work.

* However, I do agree that often to make progress you absolutely have to push your engineering "comfort zone" and try dangerous things, in order to learn from your mistakes. But this does not change my definition of "success", it just acknowledges realities of R&D.

electrograv··on Linus Torvalds: Make 2560x1600 the new standard laptop resolution
It's fine if you're okay with gigantic fonts that are usually seen on laptops. A lot of us prefer much smaller fonts to fit more code on the screen.

For example the equivalent of 9pt on a 900p display allows actually reasonably split-screen editing. On an actual 900p display though, it's much too blocky to be easily read without straining the eyes. At 1600p though, it's crystal clear.

electrograv··on C++ and Beyond 2011: Herb Sutter - Why C++? (video)
> "Foo foo = new Foo()" is not something you see in C.

    In C++: "Foo *foo = new Foo()" 
    In C: "Foo *foo; foo = malloc(sizeof(*foo));"
C stutters even more, unless you want to use macros to 'patch' the stutter, but that applies to both languages equally.

You're right that there's no need for flamewars. I agree with most C programmers in style, as I am a C programmer at heart. I program C++ code that looks like simpler, cleaner C code.

Why does it look simpler and cleaner? Because I don't have to typedef my structs or stutter "struct" everywhere. Because I have templates to reduce that "necessary code duplication" where it matters for performance. I have constructors and destructors for the cases where I need compiler-enforced init/destroy function calls within a {} scope. I have references so I can almost entirely eliminate the worry of null pointer values in my code.

The point is that C is not the subset that most people want. Being a smaller subset of C++, it has a lot of appeal to me. But ultimately, there are genuinely useful C++ syntax features that can make your life much easier in producing reliable, clean code.

Absolutely C++ can be abused (i.e. inheritance for anything but interfaces), and absolutely C++ has some annoying quirks. That doesn't bother me too much, because at the end of the day C++ leads to cleaner code and higher productivity for me due to these relatively "syntactic sugar" features that I use.

electrograv··on The Measurement That Would Reveal The Universe As A Computer Simulation
It looks like for a long time we've suspected this strange relationship between our own mathematical inventions (a computer simulation is just a machine that applies a discrete mathematical model), and the universe itself:

http://en.wikipedia.org/wiki/The_Unreasonable_Effectiveness_...

It certainly is a mystery. I persnally believe this mystery is logically equivalent to the question "what is existence?" Whether this question is answerable or not, I can't say.

electrograv··on Coursera's Functional Programming - Cheating Discovered
Here's another possible solution.

Use an algorithm to cross-check homework submissions, checking for structural copying. If a high correlation is found, as with human intervention, you suspect cheating but cannot prove it.

So, only for the potential cheating students, issue an extra quiz at some scheduled time, and discard the homework score. These quizzes should be all issued in parallel batches and last an hour or so, so solutions can't possibly be copied among cheaters. Make sure the quiz is actually harder than the homework, conceptually.

In other words, rather than trying to punish potential cheaters, just keep testing them until you're sure they're not cheating. This is better IMO than producing a 10x size problem set and selecting random subsets, because the number of suspected cheaters will probably be a small-ish percentage. Therefore, rather than having to write a ton of etra test material for everyone, you only have to write a few extra quizzes for a subset of the class.

electrograv··on Controversial programming opinions
I actually think #17 is the odd one out here, in that it directly conflicts with #1. "Programming is just a job", yet "Code in your spare time"? I think you're right that #17 conflicts with silicone valley mentality, but while this mentality isn't for everyone, I think it's absurd to claim it's wrong.

Ask yourself the following questions, keeping in mind that different people will answer differently and that's okay: Do you have a passionate desire to do what you do (whether your motivation be to build a better future, change the world, or create cool technology, etc.)? Or is programming really just a way to make money (i.e. "just a job") to afford the things you really enjoy? (Or some balance in between the two, usually.)

IMO for those who are truly passionate about their work, their work is NEVER "just a job". Thus while #17 is true for a great many people, it's not true for the few who tend to accomplish the most - at least judging empirically from historical results.

For these people, it's much more than "just a job". For every highly successful person who made a huge impact on the world, it's never "just a job." Just ask Elon Musk, or countless others, if they consider their career "just a job."

electrograv··on Thoughts on being a programmer
Be it as it may, magic number or not, that line should not need a comment. My principle above still holds: needing comments tends to hint that your design could be better and/or your code could be cleaner.

Maybe your library is flawed. Maybe JS is fundamentally flawed. I'm not making any comments one way or another about what's flawed in this picture or how to fix it, just that seeing this comment indicates room for improvement.

Imagine the ideal design/architecture for a given application on all levels. Does it involve the users of this code or API explaining everything in lengthy comments? Or does it involve a clean, beautiful, and elegant set of interactions that is both transparent and intuitive as to what is going on? The latter, I argue, needs no comments. The former, I argue, is indicative of design flaws or inadequate function names.

So why do we see necessary comments in real life, then? Because real life system designs are rarely ideal. I still like to try to get as close as I can, though.

electrograv··on Thoughts on being a programmer
The "//just pseudocode of course" meant that that wasn't actually how you'd do it. Instead, you'd come up with an overall better design in how you handle resizing pages. If anything this proves the point that self-documenting code forces you to re-think your design often when something is fishy to begin with. In this case, setting "$.resize.delay = 16;" probably is an effect of deeper design issues. Not being able to fix it by just moving it into a function simply means that striving for self-documenting code forces you to fix the issues rather than patch them with half-hearted (or worse - a highly detailed) comment.

If there was ever 'code smell', it's when you see "x = y; // verbose way of saying sets x to y". And this is exactly your example - a verbose description of "$.resize.delay = 16;" If renaming variables and functions in this case doesn't make you feel better, I don't see why a comment would.

But yes... of course comments are important and needed in some cases, which I admit. However when they do, as other posters here have mentioned, it's usually annotating why, not how/what. I can't think of many reasons why it's not a bad sign if you find yourself explaining how something works - the only one that comes to mind is with hand-optimized code.

electrograv··on Thoughts on being a programmer
> Having a comment like: '// Configures jquery resize to fire the resize event approx 60 frames per second' Would have made the code a bit easier to understand.

I'd argue that the following line is a better solution in every way than adding a comment as you suggest:

    setResizeEventFireRate(60); //just pseudocode of course
Self-commenting code is always better: less duplication, less maintenance, greater refactoring agility, and most of all, it encourages you to design a cleaner system in the first place.

Granted, in real-world scenarios, there will always be many cases where you are forced to add comments, sometimes extensively (hand-optimized code, inherently complex systems, etc).If anything though, this only confirms how important it is to aim for self-documenting code.

Real-world production code is rarely a pretty thing, and the fact that you have to start adding comments everywhere is a reflection of this. You'd be surprised how clean and elegant code becomes when your only goal is to make it as self-descriptive as possible.

electrograv··on AMD takes the video card war to an appalling new low
> I'm pleased to say that I have no idea how fast my CPU or GPU are. They work. I'll buy a new one in a few years. Relax and do something useful with your computer.

Then you're entirely missing the point of this article and of the product it writes about.

This class of video card (Radeon 7970, or Geforce GTX 680) cost $500-$600 each. They cater to those who want the absolute best GPU performance they can get -- and are willing to pay heavily for it.

Your quoted comment characterizes how you don't at all understand the target market of these cards. "I'm pleased to say that I have no idea how fast my CPU or GPU are" is the last thing you'd ever hear from an owner of this class of video card.

electrograv··on Rare Are GC Talks
Honestly, this article is really bad and probably harmful to new programmers. I recommend against taking anything in it to be accurate, much less complete.

The author misses vitally key issues (like the inherent dangers of circular references in reference counting "GC"). I wouldn't even call myself slightly knowledgeable in GC, yet blatant holes in the clumsy analogies of this article are obvious to me. As someone who is not even slightly knowledgable in GC, it scares me that people are learning from someone who has massive information holes in the explanation -- holes in topics that every programmer on earth should know.

On top of all that, the only "Cons" that are mentioned of RC are absurd: "It's annoying if you forget to release your references." Wow. Profound stuff there - bugs and incorrect code is annoying. This isn't even a problem if your language supports RAII, in which it's impossible to "forget" in the first place.

electrograv··on Why Crunch Mode Doesn't Work
For me the magic factor to maximize productivity is sleep.

I have worked consistent 70 hour weeks, where most of those hours are in sprint high-productivity coding mode, AND without getting burnt out or tired. The secret is simple: I was getting 9-10 hours of solid sleep every night.

Sadly it's far too easy to stay up late at night browsing the web, losing sleep for no good reason in particular.

electrograv··on Why You Won’t See Hard AR Anytime Soon
My TLDR of this article is: Due to the additive blending, the "augmented reality" of the immediate future then is restricted more towards 2D HUD-like overlays and ghost-like 3D overlays.

True. Although, if you think about it, that's still pretty cool "sci-fi" tech, and opens up a lot of exciting futuristic possibilities. For example, you can still have a 2D HUD giving all the context-sensitive information you need, and you can still have ghost-like 3D images overlaying the real world to help you out.

In fact, I have no problem waiting for nonadditive AR glasses for everything except video-games, because in real-world use I want to be able to discern reality from augmented data.

electrograv··on How I accidentally got into someone else’s gmail account
It still makes absolutely no sense to me why security questions are used. They're effectively a second alternative password to access your account -- a "password" that's really really easy to guess (especially if you know who the account belongs to).

You might as well just replace "username and password" with "enter your username and what's your favorite food?" or "enter your username and where'd you grow up as a child?"

Pretty secure, huh?

electrograv··on Vim Creep
Languages don't just fall into two black and white categories of whether or not it requires an IDE that understands the language. It's a spectrum, which means that all languages should benefit from an IDE that understands the language. If not, then you've just found the perfect holy grail of computer languages. Until then, face the fact that language integration is nice.

Unless I'm missing something, specialized non-VIM IDEs tend to be much better at auto completion (especially in C++), jump-to-definition, refactoring, etc. IDE users (who typically are ignorant to VIM) can use these features with extreme productivity. On the other hand, VIM users tend to be rather ignorant of how incredibly productive you can be and how nice it feels to have these powerful context-sensitive tools at your fingertips (and sorry, but CTAGS is useless). Regardless of what IDE you use, nobody can deny IMO that having an editor look up APIs and function lists for you in a context-relevant manner is productivity-boosting versus the alternate of scanning headers manually.

So in this sense I think both VIM/EMACS and IDE users are ignorant to other editor paradigms. What I don't like is how each party tries to claim that their method is the best, without having truly tried both.

I've used both extensively (used VIM for years) and I prefer IDEs by far, but that's just my personal preference.

electrograv··on Windows Phone 8 vs. iOS vs. Android: One giant leap for Microsoft
Well you could also say that the iPhone home screen looks like a bin of shiny colored glass children's toys were spilled onto the screen.

This type of criticism doesn't really help, because the vast majority of people seem to think both (metro, and iOS) look fine, if not great. What matters is how usable these phones/OS'es will turn out to be once people start trying them.

electrograv··on Quantum Cryptography Outperformed By Classical Technique
I didn't read the whole paper and I'm no electrical engineer, but I'm also quite skeptical that this works. I'd probably believe it if current propagated infinitely fast, but obviously it doesn't.

My first attempt to tap into a channel with this system would be to tap into two points at some distance apart, then measure then changes in current at each point. Since the receiving resistor is flipped randomly and the sending resistor is flipped with the data, it seems to me intuitively that all you need to do to crack this is use a bit of basic electromagnetic physics to derive a formula to extract the data from propagation delays of the effective resistance experienced by the circuit measured at two distant points. I could be wrong though.

electrograv··on MIT Researchers Produce Micro-Light that Outputs More Power Than Applied
I don't understand. Why can't it cool down more than ambient air? You put in X amount of power, and you get out 2X amount of power as light -- therefore additional energy is being taken in as heat and converted to light. Say you direct that light AWAY from the area through mirrors or something so it doesn't heat anything nearby up. Then, by simple energy thermodynamics, you can show that X amount of energy IS being taken away from this local system and deposited elsewhere as light.

Unless you claim that the LED stops producing the >100% efficiency levels at room temperature, I don't see why you're claiming it can't cool anything down.

electrograv··on New Linux Laptops from ZaReason
I'm glad I'm not the only one perplexed by the utterly astoundingly bad trackpad drivers on literally every platform but OSX. I just don't get it. How can so many people working on trackpad software produce such sub-par junk, while Apple's is literally competitive to (if not better than in some cases) a desktop mouse.
electrograv··on MacBook Pro gets Retina Display; MacBook Air updated with Ivy Bridge
It's funny that the people who make bets like this (that Macs are unreliable) are the ones who don't actually own them.

My Thinkpad is only a few years old, and the cooling system is acting up, I'm also having keyboard issues (even after replacing it) and just isn't worth bothering with. My old Macbook Pro on the other hand still practically runs like new, and never had to be repaired for anything.

I wish people wouldn't make claims based on speculation.

electrograv··on MacBook Pro gets Retina Display; MacBook Air updated with Ivy Bridge
This may be a bit off-topic, but I have to wonder why I see laptop screens with much higher resolution than desktop monitors. It just seems so backwards (in terms of practical use) that as screen size increases, the screen resolution seems to decrease. So now in many ways most desktop rigs are inferior to a 15" laptop as far as productivity goes.

My intuition for the cause, is that the more surface area of the screen, the harder it is to consistently manufacture the panels without defects. But I'm not convinced because I'd imagine such incredibly high resolutions on laptop panels must be pretty demanding technology as well.

I just want 2880x1880 30" monitors for my office :)

electrograv··on Apple’s hardware “dilemma”
> vs. competitors' "no, really, it's good enough" specifications of "5 hour battery life if you're careful, 6 pounds and hope there's enough space in your briefcase, USB/Firewire/Ethernet/PS2/Centronix/RS-232/eSATA/XYZPDQ/OMGWTFBBQ ports, don't forget to put double quotes around the file path, 90 second startup..."

Not to mention the PC MacBook Air clones, which in addition to questionable battery life, screen resolution, etc., ALL fail to have an actually usable trackpad. They've tried to emulate various multitouch gestures, but it all feels absurdly clunky and impossible to actually use. I tried one in a store and every time I tried to scroll with two fingers, it would intermittently zoom in like crazy. When it did actually scroll, it was laggy and choppy.

I know this is a bit off topic, but seriously, does anybody know what is up with PC track pad drivers? Why are they so laughably bad. Actually, it's not even laughable it's so pathetic... I'd cry (if I was a PC manufacturer).

Seriously though, I'm genuinely worried/curious about this. I am still looking for a Windows laptop that rivals the MacBook Air, because I do programming both on Windows and Mac (I by no means have an emotional attachment to any OS or HW vendor, so I'm pretty unbiased when it comes to these things). I'm still confused as to why this does not exist in any usable sense.

electrograv··on Apple’s hardware “dilemma”
I agree. This article comes off as confused and unguided. First it mentions the "inability of analysts (or anyone) to understand Apple" (unpredictable). Then, it says Apple's hit-driven business results in their product refreshes being incremental/expected (predictable).

The self-contradictory ramble continues. He mentions how Apple knows how to design a user experience, rather than being design-blind and spec-obsessed, then goes on say that Apple has hardware spec issues, and that's a "dilemma". What...?

To top it all off, Apple is actually leading as far as hardware specs go (unless by "good specs" you mean "cram every feature you possibly can into the chasis without regard for user experience whatsoever"). The retina display is one obvious example. I wouldn't even consider a tablet without one at this point. The iPad 3's GPU is yet another example of Apple's hardware advantage. The fact that they bested NVIDIA, a company dedicated to designing the best GPUs, is extremely impressive.

Imagine you're a consumer walking into a store to buy a laptop/tablet/phone. From your perspective, who is leading the pack in every way that actually matters to you? I don't see a dilemma here for apple.

electrograv··on Self-driving Volvos cover 200km of busy Spanish motorway
Self driving? Only if such a word can be applied to a laser beacon and wireless based follow-the-leader link. What happens if your radio link encounters interference? What happens if another car cuts in front of a robot car?

Obviously, all these self driven car stories are still ages behind google's AI car tech. I suppose it's unfair that google's car has spoiled the relative excitement of all these other stories, because they seem extraordinarily boring in comparison.

electrograv··on Windows 8 tablet PC makers: We can't compete with the iPad's price
It only used the word "free" for Amazon's use of Android, which is factually accurate. It said that Apple gives iOS away, which again is an accurate statement. It doesn't seem disingenuous to me; in fact the wording implies that Apple is indeed "giving away" real value.
electrograv··on Experimental 3D page layout inspired by Flipboard
Very nice (as mentioned, very natural experience on the iPad). Constructive criticism: I really don't like how the back button works at all. Flipping pages here intuitively feels like scrolling, not page navigations. I really don't want to mash my back button 50 times to go back to the previous site when I'm done reading an article.
← PreviousPage 13 of 13