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 11y ago · link · parent

My history is with CPUs that don't have a separate system stack, so my first thought was that interrupts could stomp on the stack. But not so on Intel.

comment 11y ago · link · parent

You and your family live in the rest of the world. It's not just altruistic, it's also rational for your own self interests. It's not mutually exclusive: That's a false dichotomy.

If you can't care about your community enough to donate something, then I think your values may need reexamining. Even if that something is donation of old clothes and used items instead of throwing everything away.

And finally, it's not about how many people donate and how many don't. It's the right thing to do, and asking if you're "the norm" is just looking for a justification. Do the right thing. Don't just be narrowly selfish.

comment 11y ago · link · parent

Look at almost every top game on iOS and Android for examples of write-once-run-everywhere.

It's more true that GUI-heavy apps can be harder to get right, cross-platform. But it's a no-brainer for game development.

comment 11y ago · link · parent

I object to the underlying assumption that it's OK to need to rewrite my app for every platform it runs on.

I want write-once-run-everywhere.

comment 11y ago · link · parent

>However, I was wrong - the Java/Dalvik as a first class is actually better, Google got the possibility to be CPU-architecture independent.

Just about anything would have been better than Java. I'm not a big fan of C#, but CLR would have been better. Even JavaScript would have been better. But an intermediate VM language (like the LLVM intermediate representation) would have been the best option, if CPU architecture targeting were the concern.

I do games, primarily. And writing games in Java (which is what Google tells you to do -- though they finally gave in to pressure and added the NDK) just sucks, because you have to ship the JDK when shipping on every other platform -- or you need to write your game twice.

So pretty much every major game uses C/C++ despite it being the ugly stepchild of Android. Google set up the dev environment so that you can add as many target architectures as you want, making your APK "fat", or alternately shipping various APKs with different architectures in them and letting the store pick the appropriate version. Which works, but is ugly.

C and C++ have been CPU-architecture-independent for a long time, and if they DIDN'T want to force the multi-binary approach, using LLVM to build to an intermediate language and compiling for each platform would have been an even better fix.

Intel and MIPS are not first-class citizens, by the way, because the NDK exists, and many developers still only ship ARM binaries. And while other platforms ship with ARM emulators, they're buggy: An app I'm currently working on just fails on MIPS, and there are few enough people with MIPS devices that the client decided to just not support MIPS (our build process uses libraries that aren't build using the Android.mk system, so I can't just add "mips" to the platform list).

comment 11y ago · link · parent

I'm sure Java was chosen because it was the dominant smartphone programming language at a time.

And not for any actual good reasons.

And we (Android developers) still need to suffer through their poor initial choice of platform; things would be so much better if they exposed a C API as a first-class citizen of the OS, rather than making Java the only first-class way to access Android.

comment 11y ago · link · parent

As others have mentioned, I wasn't complaining on behalf of my own situation, which is exceptional.

Practices like "stack ranking" hurt all of us when they result in good people being fired or reprimanded, though.

comment 11y ago · link · parent

In a blog entry by Micheal O. Church [1], he argues that in the companies that most need unionization, the downsides like wage normalization and seniority rules are already in place, and adding unionization to the mix almost can't make things worse.

He also provides examples of unionized industries where "star performers" have no wage limits -- that the only limit is in the minimum pay for a position. And he points out the many ways a union could support programmer rights (for instance, the right to own personal projects), and kill damaging practices like stack ranking.

We need something. That much is clear. Whether it's a professional guild or a union, I'm not sure. But the status quo is awful for most of us. [2]

[1] https://michaelochurch.wordpress.com/2014/10/13/it-might-be-...

[2] I'm actually one of the "1%" who is quite well compensated, but I think more of us should be compensated based on our abilities. And I do want to get rid of the "we own your free time projects" rules everywhere; I consider those to be morally reprehensible.

Edit: Added "unionized" to the second paragraph to make it clear what I meant.

comment 11y ago · link · parent

I'm really believing we need a professional association or guild. With merit-based professional rankings.

I think a big contributor to the problem of programmers being underpaid is that there's no distinction between the clinic assistant and the brain surgeon. We're all just "programmers" or at best "software engineers". If there were an official distinction, then it might be easier to demand higher salaries for the higher skilled positions.

comment 11y ago · link · parent

I'm not OP, but it feels like you're arguing semantics. YES, that's the technical definition of "average," no argument, but I don't think he/she meant mathematically average.

If you substitute with these terms:

- 5% toxic

- 25% subtractors

- 60% competent

- 9% exceptional

- 1% brilliant

...then there's no reason to apply (or defend!) the mathematical definition of "average." And I think those numbers actually seem somewhat reasonable, based on my own exposure to working developers in various industries. What this doesn't count is the the "FizzBuzz effect," where ~95% of the people who are interviewing at any one time (in a tight market) tend to be from the bottom end of the spectrum.

Even within the broader pool of programmers, the line between subtractors and competent is very project-dependent, in my opinion. For some levels of project complexity, the line might actually invert to 60% subtractors and 25% competent, while for far less complex projects, it might be 5% subtractors to 80% competent.

In the former case I'd want an exceptional developer, while in the latter the exceptional developer probably wouldn't even apply, or would quit out of boredom.

comment 11y ago · link · parent

Actually, it never worked in Windows GUIs either. [1] It's just a broken concept.

Separation of concerns and DRY are both good. MVC doesn't succeed at either, except in idealized corner cases.

[1] A lot of widgets in Windows, for instance text fields, encapsulate the view (it's where the text is displayed), the model (which keeps the text in the control), and the controller (the widget handles the UI for entering text, catches and handles the mouse, etc.).

comment 11y ago · link · parent

She was already on board with the "no blood diamonds" angle. We ended up with a "Hearts on Fire"[1] diamond, which claimed at least to have a paper trail proving that it did not come from a war zone.

It also had the advantage of a shallower cut that made it look larger than a normal cut on a stone of that carat weight, which also reduced the total cost.

I do like your idea, though. It's a bit late to be useful for me, though. ;)

[1] http://www.heartsonfire.com/

comment 11y ago · link · parent

Yeah, I'd read that. So had she. This is why we were somewhat surprised, after the fact, that we went through with it anyway.

Cultural expectations can be a strong force, even if they were manufactured.

comment 11y ago · link · parent

Wow. $2. Wow. I thought a carat of CZ was more than $2.

I guess the raw materials just don't cost that much. :)

comment 11y ago · link · parent

My wife recently asked me "Why did we decide to get a diamond at all, when we both knew it was a scam?"

And I didn't really have a good answer. It just seemed like the thing to do at the time. We were both involved in picking out the rings, too; it's not like I went out and bought them for her without her input.

Thankfully I didn't spend a completely insane amount of money on the rings (not compared to what I was earning -- less than a couple weeks' wages -- which is still too much, really but not the crazy amount some people spend). But neither of us were really ready to step that far away from what was "expected" of us, I guess.

comment 11y ago · link · parent

Actually, the main reason I was feeling like I might want to switch from Grunt to Gulp was the extreme and measurable time difference between running the two. Honestly the "it's easier to set up!" arguments fall somewhat flat; it's not HARD to set up Grunt, and you don't need to do it often, so that stinks of "premature optimization." Broccoli seems to entirely be about how clean and tiny the configuration files are; not interesting, because that means it's actually harder to understand how to change them to do something the designers didn't expect. If it's even possible.

It does feel like each group has their own little fiefdom and they want you to use THEIR tool rather than a competitor. The Grunt main page says "THE JAVASCRIPT TASK RUNNER", as if there are no other options. As a new JavaScript developer, it made me think that was just the only option.

I am much more impressed with the integrity of open source projects that actively advertise the options -- especially when they cite advantages and disadvantages of the options. Actively misdirecting you to believe that there no options is pretty much the opposite of that philosophy.

comment 11y ago · link · parent

As soon as we have a full port of OpenSSL in Rust, this will be interesting. Talk is cheap; who's going to step up and do the hard work?

I do believe that the right developers, using the right practices, could make a more-secure OpenSSL. But it would be expensive in terms of developer time. Maybe a group with the right experience could crowdfund it?

comment 11y ago · link · parent

Sigh. I had just about decided on using Browserify in my current projects (instead of Require.JS), and now I have to find out there's ANOTHER option... (Though looking at one comparison [1], I guess I'm sticking with Browserify moving forward.)

It does feel like information like this is siloed: Everyone talks about their own favorite solution, and few actually make intelligent comparisons. I didn't know about gulp until after I'd already set up grunt, for instance, and I don't really want to tell the team "now we're using gulp" after having selected grunt only two months ago. I hadn't even heard of Broccoli until just now, either. I obviously need a better JavaScript news feed.

That said, I don't feel a need to slam gulp or say grunt is great. But something that the article misses is that the kind of loud, rude argument that it describes is a basic, well-known psychological reaction to insecurity: The less self-confidence you have, the more you feel the need to be loud about your opinions. And I think a lot of JavaScript developers are insecure, based on the evidence.

[1] http://mattdesl.svbtle.com/browserify-vs-webpack

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

comment 11y ago · link · parent

Like a slow-speed random orbit sander? :) [1] Some of the dead areas looked too big for even that to help, and it would mean the maximum plate size would be smaller. Hmm...

OK, I'm going to say that the right answer is to move the microwave source linearly (or change how it's aimed? Or otherwise change its focus) at a frequency that would maximize even coverage of the heating area based on the rotation speed of the turntable.

Another (more limited) possibility is a way to mount a fixed spoon that could stir soup or other appropriate liquids while the bowl turned.

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

comment 11y ago · link · parent

As mentioned in the article, while the engineering ethics code doesn't have force of law, "state boards of registration do consider it when conducting disciplinary investigations."

If we had, in addition to an ethics code, a state body that could take people to task for violating it, then it could have teeth.

Of course then the unethical programmers would all move to Nevada (or whatever state had the most lax oversight). One step at a time, though. :)

comment 11y ago · link · parent

I love the idea of Ruby. I was using Ruby before Rails, and it was my favorite language for a time.

But I write code in LuaJIT that's typically as clean as or cleaner than the equivalent Ruby code, as well as already approaching the speed of C, so I don't even need to rewrite it to be performant later.

But by all means, if the tool works for you, use it.

comment 11y ago · link · parent

> I think that's the premature in premature optimization, when you spend time optimizing something you aren't sure will even survive a later point in the design stage.

That's true enough, though it doesn't seem to be the original point, since the context refers to optimizing parts of the code that aren't taking most of the time.

Which is a danger, but I think the danger is in wasting time on such optimizations, either up front or through increased complexity.

comment 11y ago · link · parent

I think optimizing while designing is totally appropriate. In fact you can make some of the most powerful optimizations at the design stage, with almost no additional effort required.

Should you go down a rabbit hole, spending hours optimizing something because you think it might help? No, of course not. To my reading, that is what the warning is about.

But when you're designing a system, especially one that you know needs to be fast, should your design be optimized from the ground up? Yes, in some cases at least. [1]

When I code, I choose to use languages (C++, Go, LuaJIT, JavaScript/Node) that allow me to write code that ends up faster. Some people will cite "premature optimization" based solely on that decision, and they'll write their code in Python, or PHP, or Perl, or Ruby. [2] Since my servers will handle 3000 user interactions per second with no caching, I still contend that this is an appropriate stage for optimization.

I've seen projects fail because the server requirements were too high: 100 concurrent users per Python-based server on a free-to-play game meant that if the app took off, it would be losing money because of the costs of running hundreds of servers. You can't just "optimize" the app if the problem is you need to rewrite it in a completely different language. Computer time in the cloud may seem cheaper than programmer time, but in practice if you pay the programmers up front to do it right, you can cut ongoing operating costs indefinitely. And sometimes that can mean the difference between a project that succeeds and one that fails.

[1] http://gamesfromwithin.com/data-oriented-design

[2] It looks like at least Ruby has a server that uses a similar strategy to Node or Nginx+LuaJIT: http://www.akitaonrails.com/2014/10/19/the-new-kid-on-the-bl... -- but Ruby and Rails are ugly for a million other reasons, in addition to being slow, so I still would shun it.

comment 11y ago · link · parent

It's the extreme that people take that quote to that causes the problem. He explicitly mentions library development as a place that you always want to optimize, because libraries are often used in inner loops.

When developers totally ignore optimal code practices, bad things can happen. Things like 25000 (!) string allocations for each character typed in the Chrome "omnibox". [1] That's not likely one small bit of code with a few std::string's being allocated, but probably dozens or hundreds of (albeit minor) fixes spread throughout the code.

It is absolutely worthwhile to code optimally as a habit, when the optimal coding practice isn't significantly harder to implement or understand than the suboptimal practice. (In the above case, having a "pass all strings as const references" would have likely prevented most of the allocations.)

Similarly, the way you architect a product can strongly influence how easily it can be optimized. I've cut processing time down from 10's of minutes to under a second on some tasks, just by improving how the code was written -- and that approach means that when I write servers, I can handle all the likely traffic I'll ever see on a handful of servers instead of having to create additional layers of complexity to handle dozens of servers working in parallel.

So I disagree that "premature" optimization is a bad thing, by the typical definition of "premature."

[1] https://groups.google.com/a/chromium.org/forum/#!msg/chromiu...

comment 11y ago · link · parent

"apologize from problem / bug" should be "apologize for..."

Otherwise, very cool.

comment 11y ago · link · parent

I challenge you to spend 80 hours finishing something due "the next day." Days are only 24 hours, after all.

80 hours means they've been death marching for at least five days (assuming the devs still sleep) and more likely a full week (if you allow for commute time and eating not at your desk).

And I do stick around until late when something is due the next day. But that typically means I put in less time later, so my net time spent is still about 30 hours/week. Putting in extra time means I need more free time to balance things out, and I think anyone who doesn't do that isn't acting in their own interests -- or their employer's.

comment 11y ago · link · parent

I disagree with your premise (that 80 hours a week is appropriate for a start-up).

As an experienced developer (25+ years now), I'd put money on my code being more capable of pivoting quickly to a new product road map than the code of a less experienced developer.

I've had clients/employers be amazed by how fast I could change fundamental behaviors of software I've worked on, and not because I put in 80 hours, but because the design starts out flexible, and I can adapt the work to the new requirements with minimal effort.

Sure if you're ask your dev to make changes on a Saturday, the 80-hour employee will be there, but if he/she is still working on that major pivot by Monday, and I can make the changes in a few hours, and my code is more stable, then I still win. ;)

comment 11y ago · link · parent

Granted. I'm sticking with the short week for as long as someone will pay me for it. That really is the argument you need to make: Can you get enough done in a week to be worth your salary and benefits?

If so, then an employer should be willing to pay you appropriately for that amount of time.

comment 11y ago · link · parent

Well, I can't say that it's true for EVERYONE, but my typical work-week includes about 30 hours of work, and I work on teams with others who work 40+ hours, and I consistently get more done per week than many other team members.

Maybe I'm just faster; my own experience is that I can push to 50 hours in a week, maybe 60, but then the following week I get about 20 hours of productivity in before burning out, so 60 isn't sustainable, at least for me. And those last 20 hours in a 60 hour week are really only good for brainless tasks.

God forbid I do any truly complex code in that time, or my net productivity will actually go negative, as I'll need to spend more time later fixing what I did as a zombie.

comment 11y ago · link · parent

That was the same gist I got.

"We needed people who would be with us at 2 a.m. committing code so that we could have it in front of AT&T the next day."

That's not about good employees, that's about employees with no lives outside of work. Of course the ones whose job becomes their life will stay longer. It's far more traumatic to leave if you don't know anyone outside of work.

I'll take the four-day workweek start-ups any time over the death march start-ups. And I'll put my own short-week productivity up against anyone's 80-hour week.

1
252627
50