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

Does anything happen other than a black screen when you walk into a building? I get some music if I wait long enough, but otherwise nothing.

comment 10y ago · link · parent

I was working on a version of Tetris (Tetris Worlds) for the Game Boy Advance, and the team that was doing the PS2 version was having problems with performance. For Tetris.

A lot of the PS2's speed came from vector processing; not sure how great the tools were for taking advantage of vector math. Didn't code on one myself. Also possible they were just using too many polygons; it's easy to kill your performance when you push your polygon numbers too high, or if you have too much overdraw and you blow past the pixel fill rate. (The design of the game had various animations happening in the background, which no player could ever see because of course you're paying attention to the Tetris board in the middle...not my idea; I just implemented what they asked for.)

I didn't have performance problems on the Game Boy Advance because even though my CPU was slower, I was in 2d-land. It was funny to me that they eschewed the C++ engine and rewrote their in C because "performance!", while they ended up with performance problems and I didn't, but what can you do...

comment 10y ago · link · parent

You might want to point to point that (if?) the second example does work? (And that the difference is the *)

comment 10y ago · link · parent

>Generally a sign saying you need 4wd in the US really means you need a lot of ground clearance

The Subaru Outback (AWD) has 8.7" of ground clearance. The Ford Explorer ("Intelligent" 4WD) has a ground clearance of 7.8".

If "Intelligent 4WD" means some kind of differential, then it really is just a marketing term at this point, though I learned about the distinction between 4WD and AWD when I bought a Subaru.

comment 10y ago · link · parent

OR maybe killing all the blood-sucking mosquitoes would actually just be a net benefit. [1]

[1] http://blog.chron.com/sciguy/2010/07/scientists-go-ahead-kil...

comment 10y ago · link · parent

I did mention that flexibility to change is a benefit to a Rust rewrite. Especially to changes made by people with <10 years of experience writing hardened code. :)

comment 10y ago · link · parent

Great news! Very cool, thanks for the update.

It's obviously been a while since I've run my own Qmail or DNS server. :)

comment 10y ago · link · parent

Love the idea of reimplementing DNS in Rust. Would love to see more efforts like this so that we have secure-by-design language implementation of core security services.

But BIND isn't just failing because "it's written in C", it's failing because it's written in terrible C. That said, "terrible C" is probably most every C routine written by someone with less than 10 years of solid low level experience, so "writing good C code" is not very scalable. There are active, solid projects with very few security exploits that are written entirely in C. Nginx comes to mind.

The article makes a brief reference to DJBDNS, which is written in C, but has suffered zero security exploits [1], and is extremely performant. And it is being used in production, so presumably if it had any exploits they would have been exposed by now.

But...DJB's code is (usually?) released under a rather unfriendly (though mostly open) license, and DJBDNS hasn't been updated in some time, so a more modern project isn't a bad idea. And Rust developers can probably write solid code with only a few years of programming experience, which makes it easier to extend without adding security holes on a weekly basis (coughBINDcoughOPENSSLcough)...

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

comment 10y ago · link · parent

This is key for me.

I'm already maxed out in how many various messaging services I'm willing to subscribe to.

I buckled and got Slack recently because of a couple of local communities who were using it as their only means of communication. Turns out to be great, and has the wonderful feature of no interrupting notifications unless someone specifically messages me, so I can take part in group conversations with 100+ people involved and only look at them a few times a day.

But installing Slack was effectively the last straw that made me give up on using Pidgin, so I've cut off IM access from friends who only have me on older IM networks.

So what would possibly motivate me to jump to another messenger app that currently none of the people who I know are even on? I'm still resisting installing Facebook Messenger on my phone since I don't want Yet Another Messaging App. At least Facebook Messenger would have people on it I know; Formal would require that I bother people even more by making them install a new app.

comment 10y ago · link · parent

A quick Google finds numbers from 250-280, with record reflexes as low as 110ms. I've done less than 180ms on a "hit the button after the light goes on" game at a science museum (hardware designed for it, so no built-in latency).

300ms is a good lower limit, though, if you take into account complex video processing and standard brain activity when browsing; when hitting a button when you're browsing, your brain isn't wound up and ready to react as quickly as possible. Getting that extra fast reaction really requires short circuiting some of the mental processing you'd normally do. I'm pretty sure I'm remembering 300ms from the cognitive science/UI classes I took in college.

And don't forget the hardware lag in your own body. ;) The signal to click the button takes ~10ms to get from your brain to your fingers. When you think about things like sports where the accuracy of, say, releasing a ball when throwing it, needs to be in the 0.1ms range to hit your target, but your brain is actually giving the command 10ms before the ideal release time... Makes my brain hurt just contemplating how it works.

Pro tip: Don't think about this while trying to throw a ball accurately.

comment 10y ago · link · parent

This is a UI sin that should trigger public shame of developers.

It really should be handled at the OS level for apps, or at the browser level for web sites: If I click anything on the screen, it should react as if I clicked on what was there 300ms ago, maybe 400 or 500ms or longer.

The fastest (typical) human reaction is around 300ms. If I'm clicking on something that appeared less than 300ms ago, then I'm NOT intending to click on it. Maybe the delay should be configurable, or maybe it learns the behavior for a particular user? An elderly person surfing the web might have a 1000ms propagation delay between deciding to click and clicking on a button or link. But my reflexes are closer to the 300ms point if not better on a good day.

No matter how fast a human is, if a button is covered by an ad 100-200ms before they click, there's no way to not click on it. And that's bad UI.

Even my (our?) favorite search engine, Duck Duck Go, is guilty of this: I will frequently accidentally click on the "WikiPedia summary" popup which has just replaced the actual top link that I wanted to be clicking on. Bad web duck!

comment 10y ago · link · parent

"A certain age"? I "joined" the club by getting a gig at Amazon at 46. Before that I'd never worked at any of the big tech companies. I also get interest from startups all the time, but from what I can tell they don't want employees above a certain salary, not a certain age.

I don't think it's age but attitude and skills that distinguish people who can get "in the club." If the attitude is "SHOW ME THE MONEY" when Google is well known for paying way above market rates, or if the attitude is "WHY SHOULD I KNOW THESE CS PROBLEMS!?", when it's well known that Google cares about those problems...well, then no, you can't join the club.

At this point I've interviewed at Google but turned them down when they could only offer me what sounded like a glorified accounting programming position (in the Boulder office, which doesn't have as many teams as in Mountain View). I might have fun working at Google on the right team, but I have other options (including Amazon) that also pay well and are very attractive for other reasons, so why not?

comment 10y ago · link · parent

I've written that for Lua files. And I've seen it for XML, to be fair.

comment 10y ago · link · parent

I agree...and I found a Gulp plugin that lets me pre-strip comments from my JSON files as part of the build process.

So I use JSON-with-comments, but the app only sees the stripped files.

comment 10y ago · link · parent

Sounds great in theory. In practice it doesn't seem nearly as carefully implemented, and/or XML is used where it's actually not needed.

XML is designed to be a markup language. The fact that it has all of these other things bolted on doesn't actually make it a good generic data interchange format.

For things like RDF, maybe it's the best option we have, but that's not because XML is great, it's because XML was used in the only standardized option.

Looking at an example of xml:lang:

    <?xml version="1.0" encoding="utf-8" ?>
    <doc xml:lang="en">
     <list title="Titre en français" xml:lang="fr">
      <p>Texte en français.</p>
      <p xml:lang="fr-ca">Texte en québécquois.</p>
      <p xml:lang="en">Second text in English.</p>
     </list>
     <p>Text in English.</p>
    </doc>
...this is a nightmare. If I want to translate a document, the last thing I want to do is embed each translation inline like that. Almost certainly the best response is to "fork" the document at the highest level and include separate language versions of the document; otherwise, if you have 20 translations of the document, you need 20x the text in the document than any one reader will need.

Yes, XML gives you that particular hammer. But using XML results in a lot of sore thumbs.

Schema validation is nice to be sure. I'm using JSON Schema Validation myself [1] to verify incoming JSON, and I'm automatically generating those schemas from the TypeScript data structure specifications [2]. This is particularly good for a JavaScript language target, of course, but I find XML and XPath to be ugly or painfully slow in every language I've used it from, while JSON just has a better impedance match to data storage and interchange.

[1] http://json-schema.org/

[2] https://github.com/YousefED/typescript-json-schema

comment 10y ago · link · parent

It's actually really, really hard to overestimate how amazing having optional specified types is. I used to use C++, then went to Lua, and more recently to JavaScript with the occasional Python. I loved the freedom of getting away from the strict C++ type system, which mostly felt like it was holding me back.

But the thing that bothered me the most about JavaScript/Python was the fact that the tooling just doesn't have a clue, most of the time, what types things are. Misremember what has a member of what, exactly, or the spelling of a member, and you've got a bug.

TypeScript eliminates that kind of stupid bug and overall speeds up development by 2-3x. Yes, some of those bugs can be found in tests. But having to go back and fix them at all, tracking down exactly what the object structure is by hand (either in a debugger or digging through docs) versus "let the editor tell you exactly what members this class/object has, and what members its children have, so I can get it right the first time"?

And what about refactoring? TypeScript knows what everything in your code is. You decide to rename a member? Done! Just because there are twenty "init" methods, if you decide this particular call should become "init2", it will rename exactly the right members throughout your project.

Finally, the fact that it just has your back when assigning types prevents another entire class of bug.

No question; (optional!) strong types are a huge win, and as I said above, should be a required practice for any nontrivial app. You get the best of both worlds: Type safety without the manacles of having to specify everything.

Transpiling won't be obsolete until TypeScript is standard in browsers (where it could help improve JIT optimizations!), and probably not even then: We're looking at ES2017 before async/await is ready, which probably won't be in most browsers until 2018 at the earliest, and there will likely be more killer features on the horizon in the future that many people will want to use.

comment 10y ago · link · parent

>we couldn't buy stuff for an hour or two

To be clear I'm not saying a two hour shut-down would be bad. Just that vote-by-mail would be better because it would allow anyone, on any schedule, to vote, and it wouldn't require hourly employees to lose money in order to vote.

Not everyone works within an hour of their voting location, so a two hour shut-down wouldn't help them at all -- and as you point out, bad lines can mean two hours isn't enough, period.

>I doubt people who decry "voter fraud" would trust mail-in ballots.

Well, I agree, but only because they don't really give a crap about voter fraud; the difference in NC was only that they ended up being proven to be changing the rules to limit black voters. I just heard today that reports of actual voter fraud are not even as common as reports of alien abduction; no one in government actually believes these rules are about fraud, or they're idiots. Some are just better at hiding their racist and anti-Democratic-voter motivations.

In any event, Colorado is one of (at least) three states sending mail-in ballots to all registered voters, so it's something that can be done.

comment 10y ago · link · parent

>well regarded in the enterprise

I think this alone should be enough to cast doubt on it, based on my (albeit limited) interactions with "enterprise" software.

>I think it's bad reputation comes from anyone not using an enterprise language because the support just isn't there.

What, like JavaScript? I've had to read and write XML packets from a Node app to work with (surprise!) an enterprise app. I had probably 20 choices of libraries with varying levels of features, and the one I chose worked fine.

I was lucky, compared to some of the others on this page: The "RPC"-style XML commands and responses I had to parse and generate were all well standardized, so I just wrote a wrapper that extracted the completely opaque tree of XML into a flatter JavaScript object/hash that was really easy to deal with, and similarly made a wrapper that would trivially generate the monstrous XML required to send commands and responses back to the server. My JSON-equivalent objects were easier to manipulate (and would also have been easier to deal with in Java or, in this case, C#), equally rich in the information they carried, but could have been serialized with 1/3 the number of bytes per message. Totally a win-win-win.

What I don't understand is why anyone thought using XML that way was a good idea, and why it still is popular in the enterprise. Bad habits are hard to break, I guess.

comment 10y ago · link · parent

>In those cases, I would rather have XML config files than undocumented binary blobs as config files.

False dichotomy.

Better than XML and binary blobs:

* JSON (assuming everyone knows what this is)

* YAML [0]

* Lua tables (if you're already using Lua as a scripting language; Lua started out as a configuration language after all)

* INF format [1] (not my favorite, but pretty easy to parse and much better for humans to read than XML)

* Any of the above compressed with a gzip compatible compression (if size matters, though it rarely does these days)

Even Protocol Buffers [2] are better than XML, though at that point it becomes a "documented binary blob". But as long as the spec is shared, the format can easily be read by just about any programming language.

[0] https://en.wikipedia.org/wiki/YAML

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

[2] https://en.wikipedia.org/wiki/Protocol_Buffers

comment 10y ago · link · parent

>voting days mandatory time off.

Think about that for a minute. If it were a full mandatory day off, then basically no retail could possibly be open. And people who are paid hourly are often those who can't afford to take a day off at all. Maybe a mandatory paid two hours?

Making it trivial to vote by mail, on the other hand, means that people can vote whenever. Like they do in Colorado: Universal vote-by-mail packages are sent to every registered voter. [1]

[1] http://www.huffingtonpost.com/2014/10/23/colorado-all-mail-e...

comment 10y ago · link · parent

TypeScript is, in fact, awesome. 2.0 adds still more awesomeness, and 2.1 has async/await compiled down to ES3/ES5, which I will be very happy to see.

The only thing that I don't understand is why TypeScript isn't just considered a required client (or Node) Best Practice at this point.

There are other languages that I prefer for specific domains, of course. But if you're writing code that needs to run on a web client and/or that needs to run in Node, TypeScript is the only way to go.

comment 10y ago · link · parent

If it stopped the car from going under @ 74MPH, odds are the passenger would still have died. I doubt they're build to withstand that much energy, though.

comment 10y ago · link · parent

I find myself constitutionally unable to build anything that isn't an engine at this point.

When I was young and inexperienced I could crank out Crap That Works(TM) in seemingly no time at all. At this point I know how to write good code and crap code is just too painful to look at ever.

So I write good code, and I don't attend 48 hour hackathons.

comment 10y ago · link · parent

>trade protectionism

Seems like that is the kind of thing that gets you into trade wars. Not to mention that people would be Really Really Unhappy if iPhones suddenly doubled in price because of tariffs designed to protect American manufacturing.

But...I'm not an expert, so I don't know with any degree of confidence what the consequences would be. Problem is Trump's fans are so far down in the "not an expert" direction that Dunning-Kruger probably makes them think it really IS that easy...sigh...

comment 10y ago · link · parent

Clearly not. But that, ironically, is the only way to make the country "great again," defined as "full living wage employment."

comment 10y ago · link · parent

Exactly, but Trump has made no proposal that would actually accomplish that kind of "great again." He (and Thiel) are actually examples of the ultra-rich who are taking extreme profits at the expense of workers, so why would putting him in charge of the country make it any better?

Also see my sibling comment here [1].

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

comment 10y ago · link · parent

Problem is that the extreme rich (like Thiel) are the ones who are benefiting from the current situation, and deregulation/reduced taxation will just amplify the problem.

The core cause being that individual humans are much more productive now. We just don't need as many people working.

>They want the dignity of meaningful reasonably-paying work, not income redistribution.

About the only way to accomplish reasonably-paying work is to legislate it. WalMart employees make so little a substantial fraction (possibly 15% in one state) are on food stamps. [1] Minimum wage needs to be livable.

But as you push up minimum wage a lot of employers will cut back on how many people they hire. They certainly won't rehire the 5M+ people who have lost manufacturing jobs due to outsourcing and automation: Even the manufacturing jobs that are returning to the US are only hiring 1/10 or fewer the number of workers, and those need to be experts and managing robots. So if you have people who want jobs (and not, for instance, a guaranteed income), the government is going to need to be the employer of last resort. And I don't see Trump creating a New Deal.

The laughable situation is that Trump is known most for cheating companies and workers for his own benefit. He's in this for his ego and for selfish gains. Looking at the evidence, at best one can hope that Trump will break the country so badly that something better will rise from the ashes. And it's immoral to push for such a disaster for someone like Thiel who isn't likely to be one of the ones who suffer from the disaster. The ends don't justify the means.

[1] http://www.slate.com/articles/business/moneybox/2014/04/walm...

[2] http://www.theatlantic.com/magazine/archive/2015/07/world-wi...

comment 10y ago · link · parent

Boulder, Colorado, "America's Start-up Capital". [1]

Denver and Austin. [2]

[1] http://www.inc.com/magazine/201312/boulder-colorado-fast-gro...

[2] http://www.forbes.com/sites/tompost/2014/03/13/the-best-plac...

comment 10y ago · link · parent

Crap. I've already banished Babel from my toolchain -- the Babel ES6 shim throws a warning in Firefox about modifying the prototype of an object, and from what I can tell that will kill or limit both V8 and SpiderMonkey optimizations from that point on.

Back to plan A: Don't use Lodash in client code unless I'm willing to use the whole thing (so that I can get the chaining optimizations, which cherry picking doesn't support anyway).

comment 10y ago · link · parent

I've been using Rollup for bundle size optimizations, and I believe it will work with the lodash internal packages.
1
151617
50