1,490 karma · joined Feb 18, 2014 (12y ago) · 369 submissions
181.
John Oliver's Interview of Edward Snowden(youtube.com ↗)
67 points · by nmjohn · 11y ago · 8 comments
comment 11y ago · link · parent
var b = io.connect();
setInterval(function() {"00001001".split('').forEach(function(n) { b.emit('input',n); });},10)
I found it interesting to see how hard I had to hit the server to a.) get all my requests in before another person's request gets in the middle - and b.) have my 8 bits (or however many I was sending, didn't have much luck past 40 bits) occur at the start of on ascii character - as opposed to having it be off by n bits that previously were on the stack.Thankfully websockets/socket.io ensures ordering so I didn't have to worry about them becoming unordered like I would if it was using basic http requests.
comment 11y ago · link · parent
> While all instance types need to be updated, we have developed the capability to live-update instances running on newer hardware. The vast majority of the EC2 fleet will be live-updated, but a portion of instances (less than 10% of customer EC2 instances) running on older hardware will require a reboot to complete the update process.
comment 11y ago · link · parent
In text-based communication, deciding what is important is 100% on the reader - and while to you someone may be responding to irrelevant parts of your questions - to them, it is what they found interesting and thus important.
In face to face communication, the onus of importance is far more shifted to the speaker, because based on tone and facial expression - combined with societal norms - the listener has a much easier time seeing what you find important and a much harder time being able to only latch on to the irrelevant tidbits.
> where I put big disclaimers in my questions to steer users away from those useless (to me) responses.
I have found myself doing a very similar thing - essentially trying to convey the information that gets lost of text to insure the reader can understand what I want to convey is important.
comment 11y ago · link · parent
Peter is an incredible writer and even in places where we have differing views on the world, it still was a joy to read his perspective because of the way it was articulated.
I recommend reading a post or two, highly worth the time. I actually went and ordered his book because I liked his writing so much, something I've never even remotely considered before.
comment 11y ago · link · parent
At this time, you will always be paying up for cloud services. That being said, you are paying for something, not just fluff, that many people - myself included - find quite valuable.
Dedicated hardware is great, I can get a xeon 12 core E5v2 with 32 gb of ram and a guaranteed 300 mbps bandwidth for ~$100 / month - which the bandwidth alone would cost many multiples of that on AWS. However, what if a hard drive goes bad? Or a PSU blows? Or something else which knocks that server offline? How quickly can you get another one up and running?
With AWS/azure/google infrastructure, you'll have built your application to be fault tolerant of the underlying hardware and a new instance can be automatically spun up. You also can scale instantly - with dedicated hardware it'll be a minimum of hours (if your lucky) to days to get more servers online. If you get an expected wave of traffic - from a favorable blog post for example - on any of the mentioned cloud providers your app can automatically scale and provision servers without you clicking a button.
The other important cost to consider is time - what is your developers time worth? Instead of fiddling with the database server, you can pay amazon a premium and just use RDS. Instead of setting up a distributed queue so different components of your app can communicate, you can just use SQS.
However at the end of the day the answers to all these questions are going to be unique for everyone and different situations call for different solutions. If you needs lots of compute power and need it to be as cheap as possible - using dedicated hardware will be your best bet, unless you can architect a solution with spot instances.
As far as AWS vs. azure vs. google is concerned, I've used all three and AWS provides the best service at the most competitive price. Azure is probably better if you're using windows servers. Google's cloud offering offering is underwhelming - and is quite expensive for what you get.
If you are still very small - digital ocean is a fantastic option and can save you a lot of money until you need the reliability from a higher quality provider.
comment 11y ago · link · parent
Step(
function() {
getURL1(this.parallel());
getURL2(this.parallel());
getURL3(this.parallel());
},
function(err, res1, res2, res3) {
}
);
[0] https://github.com/creationix/stepcomment 11y ago · link · parent
I have a handful of VPS's. Every once in a while I find a fantastic deal on one and add it to my "collection."
Instead of trying to manage which VPS has what running on it - I use docker. Or rather I am migrating to it, still not 100% complete.
It is quite powerful in this regard, allowing me to write small separate applications that run completely agnostic from their underlying hardware/virtualization.
If I cancel a VPS, I just move the container over with a couple simple commands.
So how is this useful? This morning I decided I wanted to have access to a HTTP-DNS tunnel. I launched iodine in a docker container and pushed it to one of my servers - if I need to move it to a different one, it's just a couple commands away from happening without having to reset or rebuild anything.
I have a handful of web scrapers, RSS monitors, an IRC bouncer, etc running in docker containers that make management much easier than my previous solutions.
Now as for a more "professional" use? I'm not as sold on it. If your server has room for multiple "things" running on it - you a.) need multiple smaller servers or b.) your application isn't large enough to even need docker to begin with. But of course this isn't applicable to everything and docker definitely has other benefits that depending on your software may or may not be useful.
comment 11y ago · link · parent
I think what it really is, is some people just like to complain about "web guys" every opportunity they get. And while your criticism may have been perfectly valid, it is entirely irrelevant to this article.
comment 11y ago · link · parent
comment 11y ago · link · parent
I think this is a worthy application of the phrase It's a feature, not a bug.
Closed source necessitates that the software hasn't been reviewed by independent programmers, only the authors.
Open source, while it doesn't necessitate that the software has been reviewed, it at least provides the potential for it.
comment 11y ago · link · parent
comment 11y ago · link · parent
This way you don't have to expend any extra energy on the cognitive overhead of switching between languages when you switch from writing something in the client side app and then something on the server side. To be fair to the other languages, I don't think this is a huge issue in day-to-day development, but from my experience is was an enormous issue when I was trying to learn a new language and I actually had to think about the syntax I was writing.
My biggest suggestion though is not to do it in java and instead expand your horizons - if I plotted my strength of a developer against time on a graph there would be long flat sections interspersed with sharp upward inclines. Those inclines? For the most part, short periods of time when I started working on learning to program in a new language.
comment 11y ago · link · parent
However for work, it saves a stupid amount of time. grunt watch - that's enough of an argument alone for me to use it. Then add it in with a less compiler and live reload, and less now is magically being compiled to css and appearing in my browser a fraction of a second after I save a file.
Sure, you could write a script to do that, but by the time you've got it working, you essentially wrote a grunt plugin, albeit one that isn't extensible and doesn't have a community of thousands of developers writing plugins and documentation for it.
comment 11y ago · link · parent
I don't disagree, like all languages javascript has its quirks (more than some, fewer than others, all depending on a given developers perspective) but I fail to see this conclusion being supported by the article itself.
Basically every quirk in it was a result of 'use strict' preventing a developer from leaking variables (and thus `this`) in ways they shouldn't be doing - which results in slightly different behavior when strict mode is enabled. The only real quirk I see here is the fact that strict mode isn't enabled by default (or better yet not even an option to turn off) but that is because it would kill backwards compatibility.
'this' in actuality is pretty straightforward - unless you make it complex. (Which javascript does make it very easy for you to do, which means bad code will be written doing just that. But bad code is bad code regardless.)
When you define a new function, the contents will have a different scope and 'this' will be different. If you want to access the parent this in a nested function, you either call the function with the 'this' bound, or you do `var self=this;` in the parent scope, and use 'self' in lieu of 'this'.
That is pretty much it - I can see how it is a bit tricky at first, but after spending a bit of time working on javascript it really isn't something you have to consciously think about too often.
I don't think it is inherently bad, just different. Back when I was writing Java I would have told you I like their approach better, but now after writing almost exclusively javascript for the last year or so, I would say I like the javascript 'this' better. At the end of the day they are just different and a developer needs to learn the intricacies of whichever language they are developing in. (Since criticizing javascript is trendy on hn these days, if you want something to be critical of javascript about that can objectively be explained, go with the lack of static typing or the related quirky type coercion in equality checking resulting in (2 == [2]) => true.)
comment 11y ago · link · parent
PHP wasn't the first language I learned, but it absolutely was the language that got me hooked on programming by giving me the power to create things, visual things, interactive things, and more importantly, let me do so without following a step by step tutorial (I had basic html knowledge prior).
> And what makes them bad is they permit, induce or even explicitly teach bad habits.
Very true, I had some bad habits from php that took me a while to kick, but for me it was a small price to pay.
> The reality is almost any language allows you to create a single file and run it and see a web page these days. That's not something unique to PHP at all.
These days that may be the case, but many commenters here are referencing when they were learning to program, and a decade ago it was something incredibly unique to PHP.
comment 11y ago · link · parent
When I was 10 or so I convinced my parents to let me put the ibm 286, which previously was sitting in their closet, in my bedroom. (At the time we had a newer computer with windows 98, this would have been just before XP would be released iirc)
GW basic on that 286 was where I taught myself the basics of programming. That takes me back.
comment 11y ago · link · parent
Depending on where you're coming from, moving a family out here may be a challenge. If it's just you I absolutely would recommend it, if not I still would recommend it, but there just are far more considerations to think about.
How many hours you'd work tends to have a wide range. All the current responses suggest insane hours are guaranteed. I probably work between 40-50 hours a week. The week before our last big feature release it was probably 60 or so, but that is the exception not the rule. This is going to depend entirely on the stage of the company you work for and the company itself.
As for salary, I make about 60-70% more than I would have if I stayed in the midwest. I also would be making 30% more if I was working for a big company as opposed to a startup, though with substantially less equity. That being said, I pay 2-2.5x for my apartment than I would have paid back home. However I can walk to work and have my groceries delivered - thus don't have a car payment, car insurance, etc, so it is somewhat evened out. At the end of the day, I make enough to have plenty to live on.
The biggest thing for me though is the atmosphere, not just where I work, but in general - tech is the norm and walking down the street (at least in soma) I frequently hear people talking about database performance, or whether AWS is worth the price, or about a new library being released that makes doing X easier. I love it - for the first time in my life I'm surrounded by people who are as passionate (and often even more so) about the same things I am, it's something I don't think you can really get anywhere else. And is absolutely worth whatever the difference between what my net income after expenses is here as opposed to the midwest.
comment 11y ago · link · parent
I really question whether that exists or not. The kind of developer you are referring to by and large knows how good they are and has no problem finding a job with a tech stack they are already familiar with. Additionally, this kind of person wouldn't move to a new language without trying it out first and likely comparing its features to a handful of other languages before making a calculated decision to switch. And by this point in time they probably have enough experience with the language to be able to make it through an interview because most interview questions tend to be more algorithmic in nature than language specific.
I completely agree that the kind of person you speak of in the long term could be a much better hire, but in the real world I don't think it's applicable. Let's say this kind of person is 1/100 applications where the applicant doesn't have experience on the desired tech stack. For most companies it is not even remotely feasible to interview 100 people with little to no chance of getting the job to find the diamond in the rough.
comment 11y ago · link · parent
If you're a python developer, it wouldn't make sense for you to apply for a ruby job, a nodejs job, a C++ job, and a java job - thus requiring 4 books.
Instead, you should apply to 4 companies looking for python developers, then you need one book at most, unless you've already master the language in which case you don't need any books.
===
Coming from the companies perspective, if I have 10 applicants for a job, the first round of people to get cut will be those who don't have experience with our tech stack. If I have other applicants who already are familiar with it, it wouldn't make sense to hire someone who would need to learn a new language first.
> Why can't you, the employer, be arsed to make that small investment in your new employee?
If there is only one person applying for the job that would be the case. But that never happens. So it's your choice to have that opinion, but understand that not being familiar with the languages the company you are applying to uses will get you ranked last among all the applicants - the most qualified candidates will be interviewed first, and only if no one else panned out would it make sense to hire the candidate needing to learn a new programming language before they can actually start.
comment 11y ago · link · parent
If the answer is more than 0, I feel you have gotten lucky in the candidates you interview or are far more selective on who you actually interview.
If the answer is 0, then you would be incredibly surprised. It isn't quite as simple as this dialog is making it sound, but essentially, yes, a not-insignificant number of candidates cannot solve problems with a fizzbuzz level of difficulty.
It is something that surprised the hell out of me as well. From what I have seen, there are many people with CS degrees who have written virtually no code outside of class and never have come up with an original program on their own. It is incredibly clear that programming is just not something they are passionate about.
comment 11y ago · link · parent
The other common practice is to use a "prerender" server which uses a tool like phantomjs to render the HTML of the page. When googlebot or any other robot hits your http server, you check the useragent, and if it matches known robots you forward the request to prerender instead of your app server.