4,107 karma · joined Feb 17, 2010 (16y ago) · 1,490 submissions
https://coderescue.com
comment 10y ago · link · parent
You might find that most of the Design Patterns and even some of the Refactoring book are focused on working around limitations in Java/C++-style languages.
>Although, I should probably get around to reading Refactoring, and Design Patterns
I'd been programming for 20 years before reading either.
Both were...entirely unsurprising. Design Patterns at least defined a useful vocabulary for talking about different patterns, so I found it useful in that respect, and at least some of the patterns are useful outside of a Java/C++ language. Refactoring had some good wisdom on OO design, but it was pretty much all stuff I'd picked up elsewhere or come up with on my own.
Wouldn't hurt to read through both at least once to see if there are any surprises for you. Might be safe to just check them out of the library, though. I kept Design Patterns around but gave away my Refactoring copy.
comment 10y ago · link · parent
Ended up writing my own mini-routine instead. If I ever need enough of Lodash to care I'll just import the whole thing, which is the only way to get lazy evaluation anyway.
comment 10y ago · link · parent
JavaScript is not objectively bad. I have 30 years experience programming in probably 15 languages and both formal and informal education in language theory to back that assertion up.
It's objectively not perfect, but then most languages have problems. There are a few regretful mistakes in the design, but they can be worked around by using programming style decisions enforced by a linter.
JavaScript has some of the most advanced features of languages available today, including lambdas, closures, and asynchronous coding patterns that make it faster at dealing with IO than naive C implementations.
Most of what sucks about using JavaScript is dealing with the DOM and browser differences in DOM implementations, but that's not JavaScript, that's just dealing with multiple browser platforms. Which you don't have to do in Node or Electron.
>"JavaScript hate is so 2010" is a cheap redirect of actual criticisms
No, it was a cheap comeback at substance-free hate directed at the language. If you want to argue details, read JavaScript, The Good Parts (or watch the YouTube video of the same name), and get back to me with what parts of JavaScript are actually, objectively bad. And in order to meet the "objectively" threshold, be sure to cite studies, because otherwise it's just your opinion.
comment 10y ago · link · parent
In practice this means that you can often find a module that does exactly what you want.
I find that most modules have great test coverage, and I've found it easy to contribute to several high profile projects in the Node ecosystem. The concept of trying to contribute to, say, Boost, makes me cringe. I would just assume that anything I suggested would be killed or mangled in committee discussion, and this despite the fact that I have a friend on the committee. [1]
95% of the modules I'm using are either relatively high profile build tools or they have TypeScript definitions in DefinitelyTyped, which has a much more modest ~1800 modules. Still I've occasionally needed obscure functionality and have been able to find appropriate libraries for it.
[1] Actually, don't know if he still is, but when I was in closer touch with him it seemed like an unapproachable task.
comment 10y ago · link · parent
So you prefer one written in ... C? Because C is secure by design? <rim shot>
Coding a terminal in Rust or even Go would be awesome, I admit...
>Standardised plugins: what standardised plugins? npm modules? Not sure what you mean here.
See the demo animation for a (silly yet awesome) example.
>250k+ Node modules
Point is to use them to do other cool things client-side. It's a Really Big Toolbox. The CSS/HTML part can potentially provide interesting options as well.
>It's not hate when people bring up salient points.
>>>without having to write any JavaScript, which is its own achievement.
The latter quote is from the comment I was replying to. It is not a "salient point," but simple JavaScript hate. His other points were that, in the past, he had written a JavaScript terminal as a school project that he ended up hating, it took him thousands of lines of code, and he'd done it before Node existed to provide the batteries. What salient points do you actually refer to?
I'm not really disagreeing with you about the terminal: Honestly I will keep my lighter terminal with tabs and good UI for most real uses. But I love to see people innovating; providing extendable architecture is the way we get great new features.
Maybe there's no killer feature in this one to justify the extra weight, but neither do I see the need to pile hate on it because JavaScript; even less because they had a bad experience in school writing a JavaScript project that was similar.
comment 10y ago · link · parent
...and that runs on exactly one OS, and doesn't support the 250k+ Node modules, and that doesn't support standardized plugins, and that can't open web pages locally...
JavaScript hate is so 2010.
comment 10y ago · link · parent
His company didn't do regular code reviews, no.
It's a game company. Game companies frequently don't follow the same set of best practices common in other industries. In part because typical game developers are a notch above app/web developers, though in part because it's just a lot more "wild west."
comment 10y ago · link · parent
All I know is that I was a better developer at 15 than most professional developers I encounter today, and I'm much better today than I was at 15.
I had no Internet to search for answers. I had no debugger. After I made a change to the game I was writing, it would take 30 minutes to run it (off of a tape). I had to reinvent the idea of linking because I couldn't edit all of the game in the memory I had available; I'd hand link the (ultimately four) app modules by setting constants. After running my game, it would take me 30 minutes to re-load the editor/assembler app and load up one of the modules of my game, so I learned to take careful notes of where things would fail so that I'd be able to fix them in the next editing cycle, and I learned to read the code and understand exactly what it all did and how it all interacted in my head so that it wouldn't break at runtime.
I found and fixed all the bugs in that assembly language game, and it was quite fun at the end, if not very deep (think Space Invaders crossed with breakout, with moving breakout bricks). It was more responsive and smooth in animation than many games are today, and it had no OS support: I was writing directly to the hardware. Hardware that totally sucked for doing games on, by the way.
I'd say 80% or more of professional developers today would have thrown up their hands at the assembly language manual and the hardware reference guide that I used to develop that game. My prior experience was in writing BASIC.
When I do web development or NodeJS or C++ or Python or Go today, everything is so easy by comparison that I can quickly put together much more sophisticated architecture in a few hours than a typical developer can do in weeks. The bar is much lower; people can accomplish simple tasks without much mental effort, and so many professional developers never learn the advanced design or debugging techniques at all.
There was a time when I hired a highly recommended team in the past few years, and they took easily 5x longer (and therefore cost 5x as much) as they should have based on the complexity of the problem I gave them. Painful lesson.
More importantly, I can design systems that are easy to use and understand for other developers, and I've received many compliments on the design of the most popular game library I wrote. You can see some of the game credits here [1]; there were over a hundred published games based on that library. At least half of those were developed by people who used the engine because it was free and good, not because the company I worked for was requiring it.
So I don't need external proof that 10x developers exist. NOTE I'm not claiming to be uniquely brilliant or a unicorn or a genius: I've also met many others who were easily as good or much better than myself at development, at Amazon and at other companies. But I'm at least in the top 5% if not the top 2% of developers, and at my level I really can do things that most developers just can't, and for the tasks an average developer can take on, a top developer can produce code more quickly and of better quality. Except for CSS. I hate writing CSS and I'm sure a CSS expert could write it more quickly than I can. :)
So I tend to speak out in protest at the idea that 10x developers don't exist. Being egalitarian and denying the skill range is popular because junior and average developers outnumber the experts. But it doesn't reflect the full reality. Just maybe 80% of the reality.
[1] http://www.mobygames.com/developer/sheet/view/developerId,13...
comment 10y ago · link · parent
Mine does. Sometimes all the work done by a new developer ends up needing to be ripped out and redone. I've had that happen to me in the last year (a developer with high credentials and who answered the questions well!), and I just had a friend show me a developer who would copy-and-paste code from StackOverflow into different places until the result was what he wanted -- leaving all of the other references because he didn't really understand WTF he was doing.
>10x difference between great and terrible developers
It's 10x between great and average. The studies were done on actively employed developers at large companies, and also showed the 10x developers produced more easily readable code that was better optimized.
>Citation needed. [1]
[1] https://en.wikipedia.org/wiki/The_Mythical_Man-Month#The_sur...
comment 10y ago · link · parent
The canonical reference is here: https://en.wikipedia.org/wiki/The_Mythical_Man-Month#The_sur...
comment 10y ago · link · parent
I specifically excepted game developers because they're an above-average bunch, but yes, I'm merely relating the facts as I see them. And honestly I think, based on the kind words I've received from many coworkers over the years, that many would actually agree with my appraisal, and would report that I was helpful in teaching them better ways to accomplish things.
>This raises an issue that is just as important as technical prowess: emotional intelligence. I'd personally green light ten or twenty 'inferior' ( by your standards ) developers over 1 technically superior ( again, by your standards ), but arrogant and morale-destroying, primadonna.
I'm assuming for sake of civil discussion that you're not implying that I am the arrogant, morale-destroying prima donna, because that would have been rude and confrontational.
>Sorry, but technical chops aren't everything. Soft skills matter just as much.
Technical chops can get you 10x-100x-infinitely more productivity. I've frequently accomplished things in minutes that other developers have been blocked on for weeks. Extremely poor soft skills can disqualify an otherwise good developer, sure. I'd block the hiring of someone who was excessively arrogant, abrasive, or otherwise a harm to morale.
But many really good developers are actually really polite and helpful in a team setting -- I've worked with multiple developers that fit that description. And good technical chops are much more rare than decent soft skills, so the former is what's grilled most in an interview. The soft skills show through as well, though, and can equally get you disqualified.
It does depend on the domain whether you really need a great developer. Presumably you work in a domain where you can get away with average developers. That's fine, you can get away with paying them less, go for it.
But that attitude is a big part of why most companies' servers seem to get hacked sooner or later. Note that you don't hear about huge security breaches at Amazon revealing tons of private customer data, despite the fact that they likely are the top target for any exploit that could be used against them.
And part of that is, in fact, that they have a higher bar for developers.
comment 10y ago · link · parent
Your analogy is poor: Hiring a bad programmer is an extremely high probability event, even in a broad pool of candidates as would apply to a high-end company like Amazon, not a low priority event. There have been studies dating back to the 70's that show a 10-20x skill difference between average and great developers. If you're going to pay roughly the same for a 1x as a 10x developer, wouldn't you want the 10x? So they tune their hiring process to skew that number as high as possible.
OP above may be an exception who fell through the cracks, not really ragging on them in particular.
I did know at least one person who applied to Amazon and who was rejected -- and rightfully so, in my opinion. His skills were sub-par, and the interview process detected that. Most others that I worked with while I was at Amazon were also above average; people I've encountered at other jobs have been mediocre by comparison, with the exception of a number of game developers I know.
comment 10y ago · link · parent
The difference is key to understanding policy decisions like this.
You absolutely use math with lives when you're making policy. Right down to calculating lives with dollars.
If there is a fixed budget of $100M to apply to saving people's lives, you ideally will divvy the money around in such a way that the most people live. You don't extend one person's life by 1 month using extreme measures that cost $50M and let a hundred die who would could have had their lives extended by years for $50k each.
To some degree the original question is a real-world policy example of the trolley problem: Do we allow companies like Tesla to save thousands of lives, possibly your own, in exchange for indemnifying them against the (ideally) few lives lost (also potentially your own) when the technology fails? That sounds identical to the air bag policy: In both cases the life saved could be yours. You might not even get into an accident if there were enough self-driving cars, so not only would you live where you might have died, you might even avoid an inconvenience.
I'm not talking about seeking out people and killing them. That is committing murder for an alleged "greater good", and the ends don't justify the means. I'm talking about redirecting a trolley that is going to kill five random people and instead making it kill only one random person. And we can talk about focusing on further advances to make sure that one person doesn't die (statistically speaking) either, but I think that throwing the switch, in a policy sense, is always the right first step.
I think the moral argument that flipping the trolley switch is wrong is bankrupt, and that it does map onto the real world and real world policy decisions like requiring mandatory air bags. Flipping the switch isn't murder. Not flipping the switch when you have the opportunity is murder.
comment 10y ago · link · parent
No, obviously I don't advocate that we go around arbitrarily murdering people to potentially improve the lives of others. But there's a huge difference between searching out and selecting specific people and killing them and simply changing the number and identity of people who will be killed by random events.
It's the difference between premeditated murder and a no-fault accident. Policy/law decisions must necessarily make choices like this, flipping the switch from tracks that typically have five or five hundred people standing on them to tracks that typically have one, for the good of the five or five hundred.
Like air bags that kill some people but save thousands more. Or vaccines that kill (a very small number) of kids (typically with allergies) but save millions.
comment 10y ago · link · parent
The short answer is that yes, it's generally agreed to make the active choice to save more people, even if it means different people die.
Air bags kill people sometimes in accidents where they likely wouldn't have died, but we put up with the risk because overall we're more likely to live through a serious accident. Air bags are fired off because a computer reading a sensor decides that they're needed. It's a very close analog situation, and yet the people making the moral argument against them have been downvoted to oblivion, and air bags are now mandatory.
comment 10y ago · link · parent
Which is a controversial position, but not stupid exactly. I would call it misguided, and certainly not a very utilitarian position. And given the options I personally would vote for the utilitarian answer: Save five people even if the one who dies wasn't otherwise threatened.
comment 10y ago · link · parent
Here's my reference: [1] Key Quote:
>One of the largest, longest, and most carefully conducted human trials on multivitamins, the Physicians’ Health Study II, showed that the daily consumption of these supplements over 11 years reduced total cancer incidence by 8%, better than any pharmaceutical drug to date. This could translate into 130,000 fewer cancer cases in the U.S. every year.
[1] http://lpi.oregonstate.edu/feature-story/vitamins-do-not-cau...
comment 10y ago · link · parent
I believe swelling is typically caused by individual cells or tissues (or even pockets in the body) building up fluids of one kind or another. Unfortunately cancer can cause this kind of swelling when your liver and/or kidneys shut down. Source: My mom died of breast cancer, and things were not pleasant near the end.
If OP is talking about systemic inflammation...then there may be a link between the two, but it's certainly not the only cause. [2]
comment 10y ago · link · parent
When I Googled "synthetic vitamin C carcinogenic" I found a bunch of quackery and the Scientific American article. Mostly the sites were screaming "IT'S A CHEMICAL!! CHEMICALS ARE BAD!!!!" as if water and foods aren't also made up of chemicals... :|
[1] http://blogs.scientificamerican.com/guest-blog/natural-vs-sy...
comment 10y ago · link · parent
Really? So if I produce no code at all or just delete code, I'm being the most efficient, even if the goal is to add new features?
If you're going to pick on semantics, you shouldn't do it with a statement that's blatantly false on the face of it.
By "correct code" I mean code that is:
* Properly designed, refactored if necessary
* DRY
* Robust
You can't add features to "correct code" while strictly removing line count. No one is just counting lines of code here; your point is specious.
comment 10y ago · link · parent
Remember, to be efficient, pair programming has to produce more correct code than two developers would have done programming individually. Mob programming would need to produce 5x the correct output of 5 developers. It just seems insanely unlikely that me and another developer pairing could be more than 2x as efficient as me on my own. I just don't miss that many things or get stuck almost ever.
People come to me for design advice, so I don't think having someone there to work with me on the design side would be useful either; I don't spend a lot of time flailing, I just write out really solid code, really quickly. Aside from that: I am fully in support of design meetings to sketch out architecture.
Today in ~6 hours of programming so far I would have saved about 4 minutes tracking down something that I typed wrong and that broke the tests that a second developer might (probably would) have caught. But another senior developer could have written code for 6 hours as well if they hadn't been watching over my shoulder. If we're talking about senior developers, how can you not assume they'd be able to create more code with a keyboard and no interruptions?
It really just doesn't make sense that experienced developers could possibly be more efficient if only one person is typing. Junior developers? Sure, at least that's a reasonable assumption. They have so little idea what they're doing, putting two inexperienced brains together on the problem might mean they produce more than twice as much, because they collectively know enough to work far more efficiently together.
But for experienced senior level developers? I think the burden of proof is on the advocates of pair programming. Extraordinary claims and all.
The main exception is when you have two distinct subject matter experts working together on a problem. Even then I like to have two keyboards, so it's not strictly pair programming, but collaborative/synchronized programming, with expected frequent questions and back-and-forth. I did that once recently when connecting a C/C++ low latency video and audio streaming library to Unity3d and C#; I worked with a Unity expert and while he wired up the Unity side I wired up the C++ side. I laid out what the Unity part needed to look like, and he told me how Unity interfaces to DLLs on Windows. We frequently bounced ideas back and forth but were working on different parts of the code. Worked great; had the integration working in a couple hours, plus or minus.
comment 10y ago · link · parent
Put me with a junior developer to just "pair program" and I'll be doing all the work. I've done this before as a training exercise; I think in about 12-16 sessions, each from 2 to 4 hours, the person I was paired with made one suggestion. And I still wasn't 100% efficient because I stopped a lot to explain what I was doing.
Put me in a mob programming environment with junior developers and it will be spectator programming, or I'll be wasting time "navigating" for a junior developer and cutting my productivity by 80%. I can't help but think that even teaching could be done better than that. (For reference, the person I paired with above insisted that it was extremely helpful and educational, even though it seemed hard for me to believe.)
comment 10y ago · link · parent
Sarcasm much?
If I'm not using it, it's using no resources. When I'm using it, then duh, it uses transient resources in Chrome, but when I close the tab, it's back to zero. If I end up using it once every two months, the amortized resource usage is probably 0.1% of an app that needs to receive push notifications.
>Messenger is not a just another chat ecosystem, it is THE chat ecosystem.
Shill much? I just tried to check to see how many people had even tried to contact me in the last year on Messenger, and it looks like I've received about 5 messages in 12 months. But it's hard to tell, because the web app keeps crashing/locking up. No other chat ecosystem I'm connected to behaves that poorly.
If you're using it with all your friends, have a blast. Just don't expect me to respond quickly if you message me; email on my secondary email account would be faster. When I checked just now I found a message that I hadn't noticed and that had sat, unanswered, for 9 months. Not the best way to get a hold of me.
>What makes you think Google, Microsoft and the Slack teams intentions are more "pure" than Facebook?
Nothing. But Hangouts is on my (Android) phone and in my life anyway. Skype is what business contacts seem to always want to use; I swear it has a 99.9% market penetration for companies that do remote work or hire remote workers. Skype also has awesome Skype-to-phone calling, including 3-way calls, that works great with my high quality microphone and speakers, so I can talk hands free and everyone can understand me well. And Slack is ideal for group and work-team hangouts.
Why would I buy into another ecosystem? Just so that I can install yet another app on my phone and on my desktop? I am very reachable by email. If you know my name, you can likely find a contact email for me within 15 minutes. If someone doesn't have my email address and doesn't care enough to put in 2-15 minutes of "research" to find it, I'm not sure if I care whether they can easily contact me. And if they must use Messenger, well, I'm sure I'll see their message eventually.
>as much as you like to think your special, no one cares what you, yourself do.
I'll just leave these here:
http://www.geek.com/news/facebook-like-button-tracks-you-eve...
http://www.ted.com/talks/alessandro_acquisti_why_privacy_mat...
https://www.teachprivacy.com/10-reasons-privacy-matters/
https://www.ted.com/talks/glenn_greenwald_why_privacy_matter...
Many of these focus on government access to information, but many times companies have just handed over anything the government has asked for without a fight. Facebook absolutely is watching me along with billions of other people. No, no one at Facebook cares, but they're compiling a huge dossier on practically everyone on the planet. So is Google, but I believe that Google at least tries to Do No Harm. And I don't use Gmail as my primary mail service, either -- I also use Duck Duck Go for most of my searches.
I just think it's not healthy for any one company to have too much information about everyone. Makes an oppressive government's job too easy, if one should arise coughTrumpcough.