Better HN
topnewbestaskshowjobs
Log inSign up

SomeCallMeTim

4,107 karma · joined Feb 17, 2010 (16y ago) · 1,490 submissions

I'm a consulting software architect and freelance CTO. I come in and rescue small businesses from code disasters, and occasionally am given the chance to prevent the disasters to begin with. I also used to develop video games, and have pivoted that skill to gamification consulting.

https://coderescue.com

Submissions

comment 10y ago · link · parent

Tell that to my last client.

I tried to put together a workable MVP as quickly as possible. The designs that I thought were aspirational designs for a finished product that would be completed eventually, but no, the CEO really wanted all of the fancy transparency, the exact button spacing, the exact imagery and fonts (despite the fact that they used fonts that weren't licensed for app usage...sigh...).

So we spent tons of time that was supposed to be MVP instead making a polished final product.

And then the CEO threw a new set of art to us and asked for a third redesign (ours was apparently the second, after the initial developer resisted making major design changes). And then a FOURTH redesign.

It amazes me that this guy (continues!) to get funding. But he's managed it. :|

comment 10y ago · link · parent

>proof that nobody can write secure C.

No, it just takes a good developer to write secure C.

See: Qmail [1], which in 20 years only four bugs have been found, and only one of those was a potential security bug. Or djbdns [2]; similar lack of security holes despite being faster and safer than Bind.

It's far easier to write code in C than it is to write good code in C. It's a downside of the security of open source projects that the contributors are those who care enough to volunteer who can contribute code, rather than restricting the team, or at least those who can approve code going into the core, to vetted experts.

I'm a good developer, but far from the best, and glancing through the OpenSSL code that I've seen, I would never have approved most of it in code review. There needs to be someone at least as good as I am reviewing every last line of code submitted to OpenSSL. Even better if it were someone much better than I.

[1] https://en.wikipedia.org/wiki/Qmail

[2] http://cr.yp.to/djbdns/guarantee.html

comment 10y ago · link · parent

I've been using the Babel transpiler to get async/await, and the code is so nice. Showed it to a JavaScript-hater and he gushed over it for 10 minutes -- then repeated the same comments to his boss (my client), which was awesome. :)

But I'm hearing that both the Babel and TypeScript implementations leave a lot to be desired with performance. Not so bad that it gave my use case a problem, but I use NodeJS, in part, for performance.

I'm also targeting browsers (and hybrid apps) with some code, and I've recently jumped from Babel/ES6 to TypeScript, so I can get the support via generators, but again I'm hearing of performance issues.

Getting first class optimized browser support is where I'll feel it's truly awesome.

comment 10y ago · link · parent

THAT is truly disappointing. Of all the new features, async/await is possibly the most critical for improving readability of code.

It's even more of a step forward than Promises was.

comment 10y ago · link · parent

Instead of Babel, you might want to look at Rollup.js for ES6 module support. [1]

You can have Rollup spit out CommonJS require commands for things that aren't part of your project, or you can use rollup-plugin-commonjs to wrap your entire app into one big bundle, including the CommonJS includes.

And as much faster as Node 6 has gotten with module importing, it almost can't be as fast as Rollup's module loader, which is more optimal than Browserify and WebPack, in that ES6 modules don't even get wrapped in "requires", but instead included inline. It just parses the code to ensure no variable names collide.

[1] http://rollupjs.org

comment 10y ago · link · parent

So the problem is that, e.g., DNS isn't also queried over a VPN, so the sites you're looking at will still be 100% visible to anyone watching your network stream?

Or is the problem just that they're using the wrong terminology?

comment 10y ago · link · parent

The "point" of Chrome Custom Tabs seems to be performance and better integration with the system browser.

I see that it's done via Intent, so it could potentially be swapped out, so you're right.

So then WebView is more of what I'm talking about, for when you want tight integration, or creating something like a Cordova app (though you can bundle a Cordova app with Crosswalk to sidestep WebView differences entirely); looks like Chrome Custom Tabs is more for when you want a good web experience, not a good embedded app experience.

comment 10y ago · link · parent

No, actually. Thanks for letting me know about that.

Regardless, my point stands: If I'm writing an app and I use a WebView or a Chrome Custom Tab, I'm going to want to know, for certain, that someone isn't switching out the underlying rendering engine.

comment 10y ago · link · parent

>On mobile devices you can rarely switch browsers without losing access to major parts of the OS

You mean "on iOS", not on mobile devices in general. On Android at least all such integration is done with Intents, a broadcast message from the OS or one app to another, and those Intents can be remapped to target whatever app a user wants, meaning a third-party browser can be as integrated into the OS as Chrome. You can even replace the launcher (the home screen) by having your app accept the "Home" Intent.

Whether a particular browser respects the Intent linkage correctly is another story. But it's absolutely possible. Chrome is doing nothing secret and magic on Android.

The exception is WebViews embedded in apps, which are rendered using the Chrome engine (on recent Android versions). But as an app developer, let me tell you that having random third-parties replace the WebView in my app is a profoundly bad idea. It's hard enough to target all the Android versions without having to also target every random browser rendering engine.

comment 10y ago · link · parent

>I have had reservations about the Echo line because of the whole "always listening" thing

I've spoken with other people about feeling this way. I think that the difference here is actually 100% psychological, and that always-listening devices like the Echo are exactly as trustworthy as the company that makes them.

I am currently standing next to at least 4 different devices with microphones and internet connections that are on or in "sleep" mode. Just because they aren't "listening" to me in a way that is obvious (e.g., they respond to a command) doesn't mean that they're not recording every sound I make. There are in fact trojans designed to do exactly that.

Either you trust the manufacturer of these devices or you don't. The fact that there's a secondary processor on the Echo that does low-power constant voice recognition for the word "Alexa" (and similarly for some phones which can be activated with "OK Google") doesn't make it suddenly more likely to be storing all of your audio, all the time.

The only salient difference is just that it makes it obvious that it was in fact listening, whereas any internet-connected device around you could be listening to you right now and simply never let on.

I'm keeping my Echo plugged in. :)

comment 10y ago · link · parent

We've had an Echo since before they were available to the public (ex-Amazon employee here), and it does occasionally beep when it thinks it hears "Alexa."

But it's very rare that it goes beyond that; usually we hear the beep and one of us will yell "never mind!", and then the Echo will go silent. Sometimes it will cancel itself, too. I think that the always-listening part is less discriminating than the active voice recognition, and that it can re-parse the last couple of seconds and decide, in retrospect, that you didn't say "Alexa."

That said, I just recently said to my wife, "I wonder if Alexa knows 'sudo make me a sandwich'". The timing was such that it parsed "sudo make me a sandwich" and answered, "Well, if you ask like that, how can I refuse?" :)

We had a good laugh. Funny thing was, looking at the app later, it was actually parsed as "Pseudo make me a sandwich." I bet Google Now would have corrected it to sudo. :)

comment 10y ago · link · parent

I've seen the performance improvements in PHP 7, which look awesome, and it's good to know that there are modern frameworks available now, so it's entirely possible the PHP universe has improved markedly since I was there last.

But what kills PHP for me (and Rails and Django, for that matter) is the lack of native support for asynchronous operation and poll/epoll.

If you're stuck with one thread per user, then you can't scale beyond a couple thousand concurrent users on one system without latency getting terrible.

You can just do so much more on one server with Node it's not even funny. 70k queries per second with low latency are not uncommon; add in some work and that goes down, of course, but a well written app can have 20k+ queries per second of throughput.

Even PHP 7 with WordPress in cached mode only brags of ~5k queries per second. You could likely do 4x that in Node without trying -- and possibly even without caching.

comment 10y ago · link · parent

I've written a few thousand lines of PHP code, and can confirm that, on the whole, it's developer-unfriendly.

It's junior-developer-friendly, but if you want to do something serious, there are better options.

comment 10y ago · link · parent

> but I can't think of an application that wouldn't be well suited to React.

A truly complex app where speed is crucial. [0] Like Atom. [1]

[0] https://aerotwist.com/blog/react-plus-performance-equals-wha...

[1] https://github.com/atom/atom/pull/5624

comment 10y ago · link · parent

The other reply [1] nails the real point: No one at Oracle is complaining. If they were, then one could care about their POV.

You also ignore the binary kernel object point: Nvidia's drivers are completely proprietary and closed source. How is that in any way less of a violation?

[1] https://news.ycombinator.com/item?id=11177128

comment 10y ago · link · parent

There's evidence there was no intent:

* https://news.ycombinator.com/item?id=11176361

* https://news.ycombinator.com/item?id=11176339

comment 10y ago · link · parent

In the case of Linux, Linus has a public position [1] that:

* A kernel module is run by the kernel, not incorporated in it,

* A kernel module only uses LGPL interfaces, so full GPL compliance shouldn't be necessary,

* Binary modules should be legal (though he doesn't like them), and

* Projects (like filesystems developed for other platforms) with their own life outside of Linux shouldn't be required to re-license if they clearly weren't based on Linux.

I know Linus doesn't represent all kernel developers, but his opinion should carry a lot of weight.

The SFConservancy is just practicing GPL overreach here, and is rattling a saber in hopes that Oracle blinks. Ubuntu has been distributing NVidia binary kernel modules for years and this hasn't resulted in a lawsuit, so it seems like an empty threat.

[1] http://linuxmafia.com/faq/Kernel/proprietary-kernel-modules....

comment 10y ago · link · parent

Security and usability are always going to be on a spectrum.

Even in the San Bernadino case, if the FBI hadn't changed the user's iCloud password, just bringing the phone to a trusted WiFi network would have caused it to automatically back itself up to the cloud. Even assuming the phone were completely 100% locked down perfectly, as long as you're sending backups to Apple that aren't encrypted, you're putting the data one subpoena away from the FBI (or from a hacker who breaks into Apple).

So say you don't use iCloud, or Apple starts a service where the backup is encrypted by your password. Your password needs to be really strong for this to work, and Apple needs to use something like bcrypt or better to hash it, but say they do that as well, and you have an long random password.

Then you can put a chip on the phone that refuses to ever be updated, and that implements the password lockout logic (try 10 bad PINs and it wipes the key). What they're asking Apple to do now would simple be impossible.

But you're allowing iOS itself to be updated, right? So if, for instance, you're discovered to be a terrorist, Apple could push a patch to the main OS that simply grabs the key after you've unlocked the phone and sends it to them. No more need for the secure chip; just decrypt the flash directly.

Or easier, the patched OS could just slowly upload all the data on the phone to a backup server whether or not the user opted in to such a backup plan.

If there's a lot of data (tons of photographs, for instance), they could even have the phone wait until it detects a known wireless access point to trigger the backup. The FBI could then arrange for that access point to be active near you and your device, and it could connect and upload to a server sitting in the FBI van nearby.

Also keep in mind that just about every release of iOS was designed to be impossible to jailbreak. And it seems that iOS 9 can still be jailbroken. This is typically done using an OS vulnerability that's exploited; the FBI/NSA could easily use those approaches to hack your phone (though all would require an already unlocked device, so they'd probably need to get you to run something via social engineering, but some of the hacks only require you to click on a specially crafted link on a web site...).

Finally, remember what I said about security and usability? Yeah, now if you forget your password and need it to be reset, you no only lose the data on your phone, but all of your backups. Oops. All of that and you're still not protected from a coordinated attack.

It's great for Apple to do whatever they can to resist giving the government the keys to everyone's privacy, because that can be abused. But it's safest to consider anything you typed into a computer or phone to be something that might get posted publicly.

comment 10y ago · link · parent

They changed the 2FA to use a microservice, so whatever the vulnerability was before, if the 2FA is now on an isolated server, that vulnerability shouldn't have access to the new 2FA key.

comment 10y ago · link · parent

It's not hard to encrypt the messages if you use an existing, secure library to do the work.

What's hard is making it impossible for someone other than the intended recipient to decrypt the message. How do you get the key to the recipient? Using something like a secure chat? Oops, that's what you're trying to create.

Maybe DH key exchange? [1] It's not rocket science to implement, but mistakes are possible. Also, unless you're sure that you're talking directly to the person you think you are, a MITM could be performing the key exchange with each end, and again you have someone overhearing you. So in addition to a proper DH implementation you need some way for the people to verify that the tokens exchanged match.

tl;dr: Yes, it's really that hard.

[1] https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...

comment 10y ago · link · parent

Fair points. I'm personally not a Dell fan, though I used one for a year that was purchased by my employer, and yes, it didn't completely suck. Just wasn't my first choice.

It did fail as a laptop, though. Something about how it tended to bend on a laptop would cause the physical trackpad "button" to get stuck when it was sitting on a lap in some positions until you picked up the laptop by the sides. :| It was also a lot heavier than my Toshiba.

But as a portable computer, it actually did a fine job.

comment 10y ago · link · parent

>Personally I prefer using the caps-lock key as control, which can be set in the system preferences on a mac.

Actually that can be set on Windows as well. But my fingers know the bottom-left corner, and Ctrl-ZXCV would be much worse from the caps-lock location. It also messes up the symmetry; I use right-ctrl a lot as well, usually with arrow keys.

Which is another thing the Mac keyboard control gets wrong without plugins. Sigh.

comment 10y ago · link · parent

Personally, I use far too much mainstream software to be able to run Linux as my only OS, and I hate dual-booting. Sometimes I'll run Linux in a VM for convenience, but Linux is so broken with respect to so much hardware, I'm not interested in running it as the main OS.

And running Apple's OS as the top level OS would drive me insane. So unless you're suggesting I try to run Windows 10 on Apple hardware, I agree with the article that the world needs a better hardware options.

Until then I'll stick with my Toshiba. I'm pretty happy with it, all told. I don't see it as "better" in an engineering sense than Apple, but I get an i7 with 16Gb of RAM and a 1Tb SSD for about 1/2 the cost of the equivalent Apple hardware.

And the control key is in the right place (the bottom left corner of the keyboard) ergonomically. That alone kills all Apple hardware for me.

comment 10y ago · link · parent

I'm really happy with my Toshiba Tecra Z series. The article totally missed Toshiba, which is still a decent manufacturer.

I get 5-6 hours of battery life with real usage, close to 10 hours in "green" mode, I've got a 15.6" screen, a keypad, 16Gb of RAM, an i7 processor, and a 1Tb SSD. And it's just over 4 pounds and pretty thin. I have NVIDIA graphics. The Tecra Z has an available 3K touch display, and its HDMI port can power a 4K monitor at 60Hz (even while its internal monitor is still going, and its USB3 port is powering a third monitor; that's my office development setup).

I've had it over a year and a half already, and it's still going strong.

comment 10y ago · link · parent

No, when you acquire a lock, you are allowed to write to currlock immediately. It's AFTER you've done whatever processing you need to do that you do a compare-and-set transactional write that verifies no one else has written to currlock between your acquisition and the completion of your task.

comment 10y ago · link · parent

Foo. Too late to edit.

Thanks for the clarification.

comment 10y ago · link · parent

I used to use Drupal. At this point I never, ever recommend people use it.

Pregenerating most of your pages a-la Jeckyll is just so much better that I don't know why anyone ever thought generating all of their pages with PHP was a good idea.

I remember thinking it was a good idea, to be honest. But at this point I look back and see how mistaken I was.

comment 10y ago · link · parent

> Insurance does not typically cover the cost of killing or seriously injuring someone.

Umm... That's pretty much exactly what liability insurance covers. Even with maximums, insurance companies frequently have to pay the whole amount regardless of what the policy says.

Anyone who is collectible (i.e, who can't just declare bankruptcy in the case of a multi-million dollar settlement) should carry umbrella coverage, though, because the insurance company may try to come back to you to collect.

It's cheap compared to car insurance, and it can cover into the millions.

>and a whole category of single-vehicle accidents than now result in lawsuits.

If you're talking about single-vehicle accidents where the human is at fault, then I wouldn't be surprised if those dropped to almost zero for self-driving cars. The place where self-driving cars have the most trouble is in complex situations involving multiple moving objects; most situations where the car just runs into something, harming its occupants, would rightfully be considered a defect.

And as others have mentioned, manufacturers already factor in the cost of defects into the total cost of producing a car.

comment 10y ago · link · parent

1. Air bags sometimes kill people who would otherwise have survived in an accident, but on balance they save lives.

2. Making air bags mandatory hasn't caused manufacturers of cars or of air bags to go bankrupt.

3. If self-driving cars cause deaths, but on balance save lives, the situation is directly analogous.

4. There will be a way to make self-driving cars work. Q.E.D.

I seem to remember that laws exist to grant immunity to manufacturers of airbags, at least if they were functioning properly. A quick Google finds lots of ambulance-chasers who talk about "defective airbags," so manufacturers aren't immune to liability if they screwed up.

Similarly, you could imagine that No Fault laws could be passed for self-driving cars that were operating within reasonable parameters. A gross error on the part of a self-driving car could still leave manufacturers liable, but as history has shown, car companies are willing to write off even gross negligence claims rather than voluntarily add safety devices to cars, calculating cost-to-fix vs cost-to-pay-off-family tradeoffs. [1]

In fact, I'd go as far as to say that, any company that doesn't offer self-driving cars in the next 15 years may as well plan to shut down or be acquired. This is going to be a must-have feature. They will figure out how to make it work for manufacturers.

The liability question will be solved. They wouldn't even let car companies go bankrupt when they (arguably) deserved to; they certainly won't let them get into a situation that kills them, and as others have rightfully pointed out, the numbers aren't even that prohibitive if they needed to self-insure.

[1] http://content.time.com/time/specials/2007/article/0,28804,1...

1
181920
50