4,107 karma · joined Feb 17, 2010 (16y ago) · 1,490 submissions
https://coderescue.com
comment 11y ago · link · parent
I was based in Seattle, though I worked from remote. I was told I could have made Principal within a year if I were willing to move to Seattle. Which I wasn't.
comment 11y ago · link · parent
I was treated well, and everyone who I had contact with over my 18 months was similarly treated well (with the exception of forcing client developers to go "on call" for server issues that our team knew NOTHING about...that was cruel and unusual, but even that didn't require 80 hour weeks, just the occasional 2am pager beep).
Our branch of the org chart was happier (according to internal surveys) than Amazon at large, but those internal surveys absolutely didn't paint a picture of tons of unhappy people.
That said, I'm sure there are bad managers at Amazon, just as I had an awesome manager. There are just too many people there for them all to be perfect. But the picture from where I stood was honestly as positive as I described.
So don't throw around aspersions of my character when you don't know my situation, or what I observed.
ASIDE from the fact that I DID leave Amazon and sold all of my stock, so it's more like "the hand that fed me for a while."
comment 11y ago · link · parent
I just spent a year and a half working for Amazon, and the recent reports about working conditions were, as far as I could tell, either fabrications, or things that hadn't happened for years.
Working there was great. Yes, I was in the AWS tree, but I also had contact with people in the Retail tree, and didn't perceive any differences there.
Low-wage jobs like fulfillment...I don't know. I'm a developer.
Oh, and did I mention the pay was great? Hard to complain, really.
comment 11y ago · link · parent
Studies of whether someone would steal a bagel/donut from a box, where payment for the pastry is on the honor system ("Take a donut for a dollar!"), show that if you paste up a pair of cartoony eyes above the food, theft rates are reduced.
So it's not just about whether people feel like the Internet can be fooled. Just the fact that the Internet feels like it's watching could be enough to cause (most) people to behave ethically.
comment 11y ago · link · parent
Ideally they'd have social services and/or psychiatric care, and some of them, after sufficient care might then be able to work. But some are just going to be chronically unemployable.
comment 11y ago · link · parent
Micro-apartments at ~200sq.ft., with really basic (read: mostly plastic/easy to wash, plus maybe a cot) furniture, could go for ~$800/month and still be a good deal for a developer. That's $9600/year. Throw in inexpensive food at another $800/month, and it would be $19,200/year, or a savings of $14,800 per year. Partner with a developer, guarantee the rents, and let the private sector fork over the capital for the building of WAY more than 500 units.
A lot of the cost is actually far more than $34k/person, by the way. There are charities that leverage this fact by finding chronic emergency-room users and getting them a home, food, and sometimes a companion animal. [1] When a homeless person checked into a hospital can cost $9000. An emergency room visit can cost $3700. [2] When someone has serious health issues, they can visit the emergency room multiple times a month; some end up costing the taxpayer $44,400 per year.
Apparently 90% of the homeless at any one time are just going through a bad spot in their lives. And giving someone a place to live can break the cycle of homelessness: You need to have an address to get a job, typically. You also need to be able to shower. Let them keep living in the cheap apartment if they want, but if their income passes a threshold then they need to start contributing to the room & board.
Or don't force them to pay; food and shelter really should be human rights anyway. Why not start in San Francisco? Everyone else would benefit by there being fewer people peeing on walls or sleeping on sidewalks, and by the (relatively) cheaper labor pool that would be available.
[1] http://www.npr.org/templates/story/story.php?storyId=1015075...
comment 11y ago · link · parent
An atomic increment/decrement takes so little time as to make this irrelevant. If you're in such a tight loop that you care about a single increment when calling a function (to pass a parameter in), you should have inlined that function and preallocated the memory you're dealing with.
I'm talking about general use of smart pointers, which means that there's a function call involved with the smart pointer value copy, and throwing an increment in is trivial by comparison.
>whichever module happens to drop the last reference to an object which is the last gateway to a large graph of objects
When writing games, I don't think I ever had a "large graph of objects" get dropped at some random time. Typically when you drop a "large graph" it's because you're clearing an entire game level, for instance. Glitches aren't as important when the user is just watching a progress bar.
And you can still apply "ownership semantics" on graphs like that, so that the world graph logically "owns" the objects, and when the world graph releases the object, it does so by placing it on the "to be cleared" list instead of just nulling the reference.
Then in the rare case where something is holding a reference to the object, it won't just crash when it tries to do something with it. In this rare case a release could trigger a surprise extra deallocation chain, as you've suggested.
If that's ever determined to be an issue (via profiling!) you can ensure other objects hold weak references to each other (which is safer anyway), in which case only the main graph is ever in danger of releasing objects -- and it can queue up the releases and time-box how many it does per frame.
Honestly having objects reference each other isn't typically the best answer anyway; having object listeners and broadcast channels and similar is much better, in which case you define the semantics of a "listener" to always use a weak reference, and every time you broadcast on that channel you cull any dead listeners.
Aside from all of that, if you're using object pools, you'd need to deallocate thousands, maybe tens of thousands, of objects in order for it to take enough time to glitch a frame. Meaning that in typical game usage you pretty much never see that. A huge streaming world might hit those thresholds, but a huge streaming world has a whole lot of interesting challenges to be overcome -- and would likely thrash a GC-based system pretty badly.
comment 11y ago · link · parent
Critical sections are really designed to wrap only a few lines of code. Basically nothing nontrivial should be done within a critical section, IMO.
If you're dealing with multithreading, the only safe thing to do with references is to put them in a list of "things to release later." And then do that from the main thread.
GC does make this easier, sure. But creating a "release list" is not hard. Making a GC not stall the program at awkward times is actually a lot harder.
comment 11y ago · link · parent
In C++ you can also replace the allocator to pull items from a pool, so that the "allocation" is "grab the first item from the pool linked list" and "deallocation" is "link this item back into the pool." The first case costs two pointer reads and one write, the second case costs two pointer writes and one read.
This lets you use objects as if they're dynamically allocated while still keeping very costs in allocation/deallocation.
comment 11y ago · link · parent
Reference counting is better than mark-and-sweep GC for several use cases:
* Real time code where you don't ever want a GC to steal cycles. I know that a lot of research has been done to decrease the amount of time stolen, but it's always non-zero.
* Immediate, deterministic clean-up of resources as soon as they are no longer referenced: If you have a limited number of file handles, for instance, you want them closed ASAP, and not when some GC decides it's time.
* No performance penalty for having weak references. I use this in asset management: A map of asset handles to weak references to currently loaded assets. If an asset is no longer used, it's deallocated immediately. Having weak references in a GC system can increase processing complexity.
comment 11y ago · link · parent
At a practical level, though, I'm really, really sick of people creating Yet Another Framework. NIH is not something that needs encouragement.
And this "manifesto" will be used to justify NIH. It may not be the point of the authors, but people will absolutely point to it when they want to create something that's been done well already.
I totally agree that the right idea is to use exactly the tools for the job. Don't throw every new framework into your app and expect it to be fast enough. "Minimal and thin" is the right answer.
I've been doing a lot of JavaScript work recently, for example, and I often visit MicroJS [1] when I need something. Instead of the 100k+ of jQuery & plugins I can often find one library that's 4k and another that's 6k that together do all I need. If you need most of jQuery, ZeptoJS [2] is often a good answer.
That said, sometimes ecosystems are powerful. When you need nontrivial functionality, and the best options have a dependency on jQuery, it might still make sense to include jQuery. Development time still counts: Spending an extra 30 hours to reinvent a component is great if you're spending your own time on it, but when you're billing by the hour, it's a lot harder to justify if that component is available off the shelf and Just Works in about 5 minutes.
It's all about compromises. I do think that it's common to see developers throw in a component if it's even slightly useful, leading to the web of today where a single page might download and initialize 40-60 different libraries. It would be healthy if the pendulum would swing back in the other direction. But we really don't need 300 ways to do every single thing in JavaScript.
comment 11y ago · link · parent
I left the Bay Area a decade ago because, in order to buy a four bedroom house (2 kids+home office) in a good school district, the cheapest, crappiest house would have set me back $1M. A nice house started at $1.2M or so. In the suburbs. And I just didn't want to be tied to one of those high-paying jobs. I wanted to be able to quit and do my own thing. So I left that market behind.
For Bay Area prices in general, those are typical. Period. The fact that I see a few ~$700k prices on that map means to me that yes, there are some bargains to be had in that area.
The only exception is if you have a high tolerance for run-down areas and/or poor schools; lots of cheaper houses in Oakland, for instance, even near Bart stations. THAT's where the people who can't afford San Francisco, but who work there, should be (and are!) looking. I did a San Francisco commute on Bart for nearly four years, and it's not bad. Or live in Alameda and commute on the ferry; that is an awesome commute. Did that for a year as well.
But I have a house near Boulder/Denver, Colorado now. Cost: ~$360k. Coming from the Bay Area, I had enough equity to pay cash. Transit: Short walk to two busses that could take me to different parts of Boulder or Longmont (though traffic is low here and I typically drive my Volt, charged with the solar panels on my house). Neighborhood: Short walk to a library, grocery store, about ten restaurants, and two cafes (not counting the Starbucks embedded in the grocery store). Eighteen minute drive to Boulder or Longmont or the north part of Denver.
All that and no mortgage. The recruiters who email me face an uphill battle trying to convince me that I want to live in the Bay Area again. I miss my Bay Area friends, for sure. But it would take something really compelling to make me want to return.
comment 11y ago · link · parent
And while they likely have convinced a few companies (they like to showcase a half dozen or so), it's not like it even was a measurable blip on the growth of game companies in Silicon Valley.
comment 11y ago · link · parent
It's easy, by comparison, to get to the 80% point with a game -- especially if you have a sample to start from that's somewhat close to what you want to create. What's hard is making every little bit work correctly; creating a finished product that doesn't have glitches, that works on all devices/in all browsers, and that has a good "feel" throughout. That last bit of polish, that last "20%", probably takes well over 80% of the time; I'd estimate it at about 95% of the time. And if you start with an "80%" engine that hasn't gone through that polish phase at least once, then you're doing all that work yourself.
This isn't precisely what you asked: You asked for success stories. A casual browsing of the site doesn't find any published game lists, though. The creators of Phaser.io do have a list of games THEY'VE published with it:
http://www.photonstorm.com/games
Look at the "HTML5" options; they used to make games in Flash.
I looked at Phaser a while back, and decided against using it. None of those games actually look much more complicated than a proof-of-concept, 80%-at-most demo.
On the other hand, Cocos2d-X has been used in dozens of hit games, and they are up to v3.0 of Cocos2d-js, which looks awesome, has an amazing free toolchain you can use, works in a browser, AND can be embedded in a custom wrapper on mobile (something like PhoneGap/Cordova, only tuned and optimized for game development -- it includes SpiderMonkey directly, for instance, so you don't have to worry about what browser it's running in).
The choice wasn't that hard.
comment 11y ago · link · parent
In fact, though, I would think that an 8051 vector would need to be profoundly simpler than a supercomputer vector; not just differently sized. When you're dealing with 1-16k of RAM and not much more ROM, a full "vector package" isn't what you need, but rather a really, really limited vector package that only does exactly what you need and no more.
In fact, you probably want a version with an 8-bit "length" value -- or even a 7-bit length with some other relevant flag stored in the final top bit, for space optimization reasons.
Source: I was the lead developer on an original Game Boy game, which ran on a CPU that, IIRC, was roughly an 8053 (it had instructions somewhat related to an 8080 or Z-80, lacking all the 16-bit instructions, but adding an 8-bit fast-memory operator reminiscent of the 6502). Back in those days you didn't have "packages." You had code snippets (in assembly language, of course) that you shaved bytes off of to make them fit. And then you shaved more bytes off.
[edit: clarity, and note that it's the Game Boy I was talking about; originally said Game Boy Advance, which was an ARM CPU. Also did a game on that device, but it was the Game Boy I meant to describe.]
comment 11y ago · link · parent
It seems to me that porting apps that rely on default types like int, where the int size/behavior changes between platforms, have about 1000x more chance of compatibility issues when trying to get the same code to run on new platforms. Sure there could be a performance hit on, e.g., a system that is optimized for 32 bit and you specify 16 bits. That's what types like fast_int16_t are for in C/C++. But porting the code is just easier when the types can't change out from under you.
Early versions of C couldn't even decide whether char was signed or unsigned; how is specifying uint8 or sint8 not strictly better than a char that you couldn't be sure whether it was signed or not? How is specifying uint16/32/64 or sint16/32/64 not strictly better than saying "[unsigned] int"?
comment 11y ago · link · parent
Will help to crash your code when you use printf, which (in game development in particular) is 99% for debugging statements.
No, having the C library explode violently at any opportunity does not always help detect bugs, and can be 100% harmful. You're overgeneralizing your own bug circumstances and development environment.
That said, if it matters that much to you, wrap printf with a modified version that asserts on NULL-ish pointer dereferences. Don't attempt to roll back the clock on library development for everyone.
comment 11y ago · link · parent
Sorry, but I agree with all the folks who say printf (and similar) is categorically more useful when it prints "(null)". I've had many obscure crashes on systems that were precisely because a logging printf in a seldom-tested piece of code had a parameter that sometimes was correctly null would crash it out. If the debugger isn't attached and we just have a crash dump we can't read (happens even on platforms where you're SUPPOSED to be able to read them), then we have to attach the debugger and hope that we can reproduce the obscure state that caused the crash.
Anything that makes debugging statements more robust and less crash-prone is a good thing. End of story. As others have said, if you want something to verify that a pointer is non-null, use an assert().
comment 11y ago · link · parent
* I've known people who bonded with lifelong friends during their first year in the dorms together. When you've all been separated from your family for the first time and as a group are thrown together, often even sharing rooms, there's a very strong psychological bond that can form. I'm still in touch with my first UCSD roommate; we both were transferring in as juniors and they matched us up. But if they hadn't matched the two of us, I might not have bonded with anyone as well; I've long lost touch with rest of my first year "roommates" (we shared an apartment).
* When you transfer in, you often need to take the special unique prerequisite classes for the new school. There were several classes I took as a junior with a lot of freshmen.
* If you are talking about the option to get into a prestigious school, the people you meet there are potential connections that can accelerate your career at various points. The longer you go to the same university, the more of those connections you'll meet. I went to a UC, and it does rank in the top 20 (I think it even hit #7 recently in some report?), and so it's a great school, but it's not a prestigious school, so I don't know that it counts. I had the option to transfer to Berkeley instead (I was accepted), and in retrospect I probably should have, if only for the prestige.
That said, I'm honestly not clear that university is an absolute requirement for success today, at least in software development. I'm not quite ready to tell people they shouldn't go, but neither would I tell them they should.
comment 11y ago · link · parent
LLVM is supported on Windows. [1]
Talking to Windows APIs requires UTF-16, but UTF-8 can (and should!) be used in all languages on all platforms internally. It's trivial to add a UTF-8-to-16 conversion step when calling a Windows API (and the other direction on receiving such strings from Windows).
comment 11y ago · link · parent
But...the fact that it's been bootstrapped means that getting it up and running on Windows will be a bit more of a challenge than if it were written in something that can just be built on Windows (C? Go?). I did find this:
https://github.com/manastech/crystal/issues/26
...but the effort seems to have stalled.
Cross-compilation would fix the bootstrapping problem, and is also important for its own sake; for building code that runs on ARM, for instance (for Android, iOS, etc.).
Looks like neither Windows support or cross-compilation have any advocates on the core team, which is sad.
comment 11y ago · link · parent
In my case, I went to a state university (which was a UC, so not too shabby) and no one ever questioned "graduated 19xx from UC San Diego" on my resume.
No one cares where you went for the first two years (possible exception: Graduate school? No idea).
Though honestly people don't care at this point whether I went to college at all -- but I can't say for sure whether I would be where I am today without the degree.
comment 11y ago · link · parent
They're not a non-profit. They don't always have the best price/performance ratio, but they do offer scaling options that few competitors can match.
Disclaimer: I am a former Amazon employee, though I sold my stock. Regretting it now, but what can you do.
comment 11y ago · link · parent
It is true that I think of myself as particularly good. For reference, I was working for one of those companies I listed above, and I put in less than 30 hours in a typical week, and still got heaps of praise for how quickly I got things done (in calendar time). I kept asking for more to do, but never really got enough to keep me busy full time. Ultimately I ended up helping with related projects, or company-wide tooling, just because I enjoyed helping and had the time.
I didn't feel the need to prove anything, exactly, but sometimes things would go south and I'd put in more hours because I felt like something should have taken less time, yes. That's not "prove to me you're 10x!", but my work ethic coming out and keeping me on task until my expected workload was actually complete.
But even then I don't think I went beyond 45 hours in a week in my time there as an employee. And I didn't work on a weekend even once. If something really hadn't gotten done in what I felt like was a reasonable work week, I would have let it slide. That may have happened once, but only once. Making the proprietary company build system do things it wasn't precisely designed to do ... well, I just can't talk about it, since I don't swear in public posts. ;)