Live data from Hacker News

Ask HN: What's the hardest problem you've ever solved?

news.ycombinator.com

51–60 of 124 posts

Re: Ask HN: What's the hardest problem you've ever solved?

#51
I'm reading various I made company/site/device x able do y, which seems like it would be 100x cooler if it was free for everyone to reuse and learn from. Could y benefit science, government, medicine, or diverse software which doesn't lock users into a platform, respects their privacy and self-determination? If hacker news was free software, what other communities might have sprung up and made the world better?

Re: Ask HN: What's the hardest problem you've ever solved?

#52
One of my first professional challenges was porting a CAD viewer to flash. The hardest part was figuring out how to convert ellipse sections and AutoCAD bulge arcs (line + bulge factor) to quadratic bezier curves. That one took three weeks of figuring out the math (starting from near zero because i hadn't paid much attention during school). I only completed the task through sheer stubbornness, because there were whole days where I made no progress at all.

Re: Ask HN: What's the hardest problem you've ever solved?

#53
post #21

I remember a defining struggle in the late 90's, while I was in high school and teaching myself how to make webpages. My problem was a lack of javascript logic firing and the answer was to wait for document load. Simple, I know, but I had nobody around me (physically) that could help me and explaining the problem to people in forums seemed impossibly abstract, primarily because I did not understand what the problem w…

Limited access to informational resources can greatly hinder solution time. Some of my hardest challenges were implementing content for a MUD with a sparsely documented custom scripting language. Even with input from other devs there was a lot of trial and error and hacky workarounds.

Nowadays most of the problems I face have been solved by someone else in a slightly different context and searching for/implementing existing solutions is almost trivial.

Re: Ask HN: What's the hardest problem you've ever solved?

#54
All the problems I've solved seem about equally hard, since I put my full effort into solving them :) I tend to go into new subfields where I don't have a background, so the hardness is probably just proportional to the length of time I spent on the project.

The problems I failed to solve seem are the ones that seem the hardest, of course. I tried to write a cluster manager / distributed OS by myself, starting almost from scratch, and that was too much. I spent upwards of 4 years on it, and had some success, but I'm starting to move on.

In particular, I learned that having a reasonable amount of security with reasonable amount of development effort in a distributed system is still an unsolved problem. It's basically a bottomless pit of work.

Re: Ask HN: What's the hardest problem you've ever solved?

#55
Depending on which kind of "hard" you mean. Some problems are straightforward but very involved to fix, while others are incredibly difficult to investigate but easy to fix once found.

My first significant contribution to FOSS was to port OpenOffice.org to work without the then-proprietary Java, so that it could go into Debian main (and other distros with similar requirements). At the time, OO.o took 8 hours to build, or 3 hours with the wonders of ccache, and I was hacking on the build system itself, so incremental builds were often broken. (And the first thing OO.o built was its own implementation of make.) So over the course of a month or so, I would hack on it, rebuild to see it get a bit further, and repeat until it finally built without error. The net result was dozens of patches submitted and merged into Debian and ooo-build, and the 1.1.0-2 changelog entry listed here, which made it all worth it: http://metadata.ftp-master.debian.org/changelogs/main/libr/l... ('The "Wohoo-we-are-going-to-main" release')

The most challenging problems were two different mysterious crashes in BITS (biosbits.org), a Python environment running at the firmware level. Because of the environment, a crash means a sudden unexplained reboot, with no diagnostic information.

First, I was trying to debug a crash in the initial CPU bringup code, which brought the CPU from 16-bit real mode to 32-bit mode. After extensive investigation, including assembly output of characters to the serial port to indicate how far the code got, and hand-comparison of disassembled code with the original, it finally turned out to be a bug in the GNU assembler, mis-assembling an expression with a forward-referenced symbol when in .intel_syntax mode. The forward reference ended up becoming an unresolved relocation (with a 0 placeholder) instead of the intended compile-time constant, resulting in a wild pointer. It was one of the rare instances where the bug really was in the toolchain, combined with an environment that makes debugging a challenge.

The other such bug, in the 64-bit version of the same environment, involved GCC compiling struct assignments into SSE instructions that assume aligned addresses, and GRUB not actually aligning its stack for SSE because it never actually used SSE itself and didn't happen to use struct assignments. Debugging that one involved a quick hack of a general-protection-fault handler that hex-dumped the bytes of code around the instruction pointer, searching for those bytes in the compiled code, and matching that back up with the disassembly and source code.

Most recently, I debugged a race condition in a build system, where disk image manipulation (done by syslinux and mtools) was failing to obtain an flock file lock. The kernel doesn't actually have any way to find out who holds the lock, so I ended up instrumenting the flock syscall to print the conflicting lock holder. Turns out that udev took a file lock on the loopback device as soon as it showed up.

Re: Ask HN: What's the hardest problem you've ever solved?

#57
post #46
post #24

Turning myself from a data driven nerd into an emphatic person who understands social interactions. Finally, I bring home girls :)

You can be emphatic and remain empirical. It's the difference between thinking nobody is wrong vs knowing someone is wrong but it not mattering under certain contexts.

Yes, that is part of it. I pretty much abandoned the thought of someone being wrong and someone being right. We all have this bias, that we are more intelligent then others. While on average, we are just average.

Re: Ask HN: What's the hardest problem you've ever solved?

#58
Debugging can be hard sometimes, too. Here is a Quora topic about it:

http://www.quora.com/Whats-the-hardest-bug-youve-debugged

My favourite answers:

Crash Bandicoot: http://www.quora.com/Whats-the-hardest-bug-youve-debugged/an...

Flash Player: http://www.quora.com/Whats-the-hardest-bug-youve-debugged/an...

500-miles email: http://www.ibiblio.org/harris/500milemail.html

Re: Ask HN: What's the hardest problem you've ever solved?

#59
post #52

One of my first professional challenges was porting a CAD viewer to flash. The hardest part was figuring out how to convert ellipse sections and AutoCAD bulge arcs (line + bulge factor) to quadratic bezier curves. That one took three weeks of figuring out the math (starting from near zero because i hadn't paid much attention during school). I only completed the task through sheer stubbornness, because there were whol…

Genuinly curious: I thought you can't represent ellipses with bezier curves, at least accurately... What did you do?

Re: Ask HN: What's the hardest problem you've ever solved?

#60
post #11

Built the head tracker for the Amazon Fire phone.

Was that challenging from a technical perspective, or from a "I can't quite believe I'm doing this" perspective?

It was challenging in every way imaginable. There was no existing algorithm that could deliver the accuracy and robustness we required. It had to run within the limited power budget of a phone. And it had to be done quickly before the hardware became uncompetitive.

At the time it was given to me it was a rough demo with no clear path forward to shipping. We had no metrics to tell how good it was, how good it had to be, or whether we were even making progress. We had no team of computer vision experts to work on core algorithms. We had no idea if the problem was solvable at any amount of power consumption. There were more than a few people within the company who thought it couldn't be done.

I want to be very clear about credit. I put this as the hardest thing I have ever done but I was only the manager in charge of the project. While I built the team and owned the problem, I did not write the code or design the algorithms. I had incredible people who did outstanding engineering work and researchers who advanced the boundaries of computer vision. It was a privilege to work with them and I am proud of them.

Post reply on HN