HNHacker News
TopNewBestAskShowJobs

iam

206 karma · joined January 15, 2011

submissionscomments
iam··on Untangling The Linux Graphics Stack
I actually had a pretty decent idea of the userspace graphics stack going into this, and I still understood very little of this article.. It seems to be more of a bunch of notes rather than anything that's supposed to be helpful to someone.
iam··on After working at a startup, I'll never work at a big company again
I worked at a 100+ person startup that exhibited the same behavior.

So, sorry, but this isn't exclusive to large companies.

iam··on Working Together In "War Rooms" Doubles Teams' Productivity, Researchers Find
Working in a war room scenario also basically forces you to do actual work. You can't exactly be browsing Hacker News since everyone else will see your monitor.
iam··on libtap - Testing library for C, implementing the Test Anything Protocol.
There's already a bazillion C unit testing libraries, how is this any different?
iam··on Cockpit crisis
The quality of these professional pilots is really disturbing. Why would they pull up more when the plane is already in a stall? I'm pretty sure they teach in lesson 2 or 3 of flight school how to recover from stalls by pulling down on the stick.
iam··on Observing demos hurts learning, and confusion is a sign of understanding
Maybe this explains why I was always so confused in school!
iam··on New gaming laptop with innovative UI by Razer
Gaming laptop is for gaming.
iam··on New gaming laptop with innovative UI by Razer
But what will the battery life be? At least when the gaming laptops are big and bulky they also have a huge battery. This thing looks like it'll run out of juice flat in 1 hour.
iam··on Newell calls on Microsoft to open up Xbox Live
Isn't it already opened up? EA games let you login to Origin Online, Ubisoft games let you log into Ubisoft...

I don't think this really does much for customers except make it harder to fully enjoy the game. "Sign into our network for a free exclusive item/map!" - no thanks.

Maybe he's talking about restrictions about releasing free content on Xbox Live (you're supposed to charge for pretty much anything)?

iam··on Pair Programming at a Startup: time sink or saviour?
Emergent peer programming is the best. I've done 2-3 instances of it over the last 3 years and it definitely felt like we truly moved mountains during those couple of hours.

One time we wrote a quite complicated graph-based algorithm (as in, lots of bug potential, but it turned out bug free) and the other two times we fixed bugs that hounded us for weeks in just one session.

I definitely feel like it works best in those situations when both people can complement each other somehow. If it's just a junior/senior person it will probably not be very useful for the senior person (note I mean a true junior here with little programming experience, not just some non-senior engineers).

iam··on Google Buys Motorola For $12.5 Billion
Apple has enough money and more vested interest, they would be more likely to buy ARM than Google (or at least block Google's attempt at a buy out).
iam··on Google Buys Motorola For $12.5 Billion
Later down there's a whole section titled "OPPORTUNITY FOR GOOGLE?"

Would've been nice to see that news a few weeks ago, then today's acquisition wouldn't have been so out of the blue.

iam··on Google Buys Motorola For $12.5 Billion
Motorola spun off into Motorola Mobility and Motorola Solutions. Think of Mobility as the classic consumer oriented Motorola who sells cell phones. Solutions targets enterprise/government.
iam··on Command line tools for web developers
But then the output goes into a black hole after you close your shell
iam··on AeroFS - File Sync Without Servers
That's not the problem, the app being closed source and being able to do whatever it wants with my data is the problem.
iam··on Run old games in DOSBox in the browser
Because it runs userspace code on x86, instead of running kernel-level code on the GPU?
iam··on AeroFS - File Sync Without Servers
The biggest problem I have with centralized servers in the first place is that I don't trust my data with them. If it was decentralized and open source, that's an app I could see myself using.

Closed source = no good for privacy.

iam··on How much money should my company raise?
I don't think a "superstar" engineer would work for the average (CRUD) product to begin with.
iam··on C No Evil
if(rand()>=0.0001 && (x))

that way it will fail extremely rarely and be even harder to detect!

iam··on Why GNU grep is fast
That could explain why using mmap is faster than read in general, but what about skipping bytes? It sounds to me like if the seek distance is less than a page size, the kernel would need to fill the entire page with data.

Then again, hard drives return minimum sized blocks of data anyway, which is sized in kilobytes. So I'm guessing the "skipping" is a performance benefit only as so far as user space goes.

One would really have to grep a long string to be able to skip more than a block/page!

iam··on HTML5 XBOX Controller in Firefox Nightly
1) It's a general joystick api, not just xbox.

2) You can't actually use an xbox controller with a computer (and hence with firefox) anyway without a USB cable. You could use a 360 controller, but not the first Xbox.

iam··on 40% off Pragmatic Programmers books this week
Aye, I love buying from Manning. They've been doing it for ages too, I don't see why all the publishers don't all give away PDF copies when you buy a physical book.
iam··on Why GNU grep is fast
Great article, really makes you think about O(n) substring searching doesn't it?

It would've been nice to drill down why mmap makes a difference in particular, why not use something like lseek to skip characters?

iam··on Finding memory leaks
Unfortunately I'm not sure that anyone will bother fixing their sites until everyone else starts doing it too.

It's too easy for the web developers to just point the memory leak blame to the browser and none of the users will be the wiser.

If some day in the future there's an extremely easy way to figure out which sites are using how much memory (each tab in a process?) then we could start seeing some push back for JS leaks to be fixed.

iam··on Lost skills: What today's coders don't know and why it matters
At most jobs I've been at so far, "optimizing code" involved digging through the entire codebase with profilers and instrumentation for weeks at a time trying to find performance bottlenecks. Then maybe if you were very lucky you got to fix it, but more often than not it was an architectural bottleneck and you'd be SOL, best case is that a domain expert would get to fix it.

Then again this is dealing with system-wide performance. Application-specific performance should be significantly less of a problem to fix.

I think the jobs that are simply "here is this function, make it 10x faster" would be pretty rare, since usually people don't know what part of the code is going slow. A lot of the times they'll guess "X, Y, Z is making it slow" but without a real performance analysis patching stuff all over the place just doesn't pan out.

iam··on Catching Integer Overflows in C

  volatile int b = 23;
  if (a + b < b) overflow;
Tada. That's how you get around the GCC optimization issue in practice. I suppose though this doesn't suite as a proper answer since overflowing as a result of adding two signed integers results in undefined behavior..

The solution is to cast the integers to unsigned and then do the overflow check. The following two standard sections should demonstrate the standards-compliance of the code below.

> ANSI C99 6.2.5 Types #9

> A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type.

> ANSI C99 6.3.1.3 Signed and unsigned integers #2

> Otherwise, if the new type is unsigned, the value is converted by repeatedly adding or subtracting one more than the maximum value that can be represented in the new type until the value is in the range of the new type.

---------

  // shift the MSB to the LSB
  #define signof(x) (!!((x) & INT_MIN))

  int x, y;

  // bits stay the same thanks to 6.3.1.3
  unsigned int a = (unsigned int) x;
  unsigned int b = (unsigned int) y;

  unsigned int sign_a = signof(a);
  unsigned int sign_b = signof(b);

  // a+b should have the same sign as a and b, otherwise an overflow/underflow has occurred
  // note that a+b is well defined for unsigned ints according to 6.2.5 #9
  if (sign_a == sign_b && signof(a+b) != sign_a) overflow;
The code for checking overflow on unsigned ints is trivial:

  unsigned int a, b;
  if (a + b < a) overflow;
iam··on Linus Torvalds dumps Gnome3 for XFCE (G+ discussion)
Haha, I was so confused. I thought Red Hat Linux was dropping Gnome3 in favor of XFCE as the default GUI shell. A few minutes later reading through the whole G+ thread it became apparent that Linus, as an individual, has decided to use XFCE.

Well, good for him I guess? But how is that news?

iam··on Meet Comex, The 19-Year-Old iPhone Uber-Hacker Who Keeps Outsmarting Apple
That might be the best reason to hire him actually.
iam··on What does C++ do better than D?
Seems a bit like apples and oranges, no? If someone's going to use a language with a GC, why not go and use a full blown VM powered language in the Java or .NET ecosystem?

The advantage of C++ is knowing exactly what happens when, and being able to tightly control the memory footprint. If that's not the requirement, I see no reason to spend extra effort on the language's verbosity.

That being said, the only feature D seems to really have that C++ doesn't (besides gc) is compile time reflection aka traits (granted, it's possible to derive some of those like boost traits, but for others like virtual function detection it's impossible without compiler support).

iam··on A note to Google recruiters (and on Google hiring practices)
Knowing the computer science isn't enough, knowing how to engineer software is also a requirement.
← PreviousPage 3 of 5Next →