2,010 karma · joined Dec 27, 2015 (10y ago) · 785 submissions
comment 10y ago · link · parent
comment 10y ago · link · parent
I'd need the human element - a real person, in an intimate setting - to guide me through the initial pains. A mentor, to the extent that someone would be teaching me their trade - or perhaps even their (our?) ancestors' traditions. Someone who is going to have the humble attitude of: "You will learn this, and it is OKAY for you to be complete garbage for the first year. A music teacher would give up on you after 3 months, but I will not and we will get through the tough beginning together."
Yep, like a helpless dog who keeps peeing on the carpet and just can't figure out why the humans are so agitated - until it finally clicks and the problem permanently vanishes. ;)
comment 10y ago · link · parent
I feel like I'm a musician at heart. If I could delve into music with a purely exploratory and child-like fascination, I think I would enjoy it immensely.
But I can't fathom beginning. Every. single. intro. into. music., is a lecture forcing theory unto you as though "theory" is the very definition of "music". The consensus from experienced musical folks is to shove theory down your throat; you should not be allowed to even touch an instrument until you've drunk the "super serious music cool-aid"! Music is supposed to be one of the most intimate ways we express ourselves, and yet Western culture dictates that there is a singular method to begin exploring it, and it's far too serious and far removed from any kind of natural process.
Had my introduction to programming, starting at the age of 7, been the shoving of books down my throat about Object Oriented programming and how to write 20 different sorting algorithms, I never would have become a software developer. It took me 5 years of accomplishing nothing - and enjoying that exploratory process - just to figure out the basics. Another 5 years to begin digging into the core things that make a developer a developer. And then another 5 years (and counting, a decade later) actually learning how to tie it all together and use the acquired knowledge as a set of skills.
Music in the Western world is taught in such a way that they're trying to cram 10 years of knowledge - that you should be picking up along the way - as pre-requisite knowledge. It is taught as a job aiming to produce immediate ROI rather than skill/talent that accumulates over time.
Sample phrases from the OP that are spreading the all-too-serious cool-aid - the same things you hear from every music professional (italic emphasis mine).
>> A lot of music theory is about limiting which notes to use in your song to a small set that sound good together.
>> not all of them sound good together... Lets listen to some garbage
>> Because not all of the 12 notes sound good together, we must select a set of notes to use in a song.
>> start exploring which chords are safe to use in each Key
Why is it deemed necessary to instruct first-timers about "limiting" the notes we might use (some notes are not "safe" you know!), and telling me what does or does not "sound good". Music should have absolutely no "must"s attached to it. Let alone labelling certain combinations of notes as "garbage" - the use of that term is horrifically off-putting to someone who is looking to explore. This method of teaching completely destroys the discovery process. You tell me that "XYZ" chord is garbage, so I avoid it from day one. What if, left to my own devices, I were to discover that chord - and wind up loving it?
tldr; Teach me to play an instrument without teaching me anything about theory. Don't even teach me how to read sheet music. Just teach me how to play a few songs I enjoy. Once I can actually play with some confidence, then - and only then - bring in the information that ties together with what I have first learned hands-on. Basically, how any 3rd-world child with instruments carved out of wood would learn. No books. No sheet music. Just an instrument and a patient MENTOR, rather than a classroom teacher who's trying to make a classical prodigy out of me in record time.
comment 10y ago · link · parent
Seriously? I'm on a 2013, and the specs of the latest machine are already "nearly similar". I have factory SSD flash storage and 16 GB of RAM. The CPU and GPU upgrades haven't been remotely worth upgrading to.
How can you be on a 2015 MacBook, talking about upgrading to a 2016? Nobody cares whether you own the latest gadget; upgrades should wait at least 2, usually 3-4 years. I'm not talking about the severe case of frugality (use the same laptop for at least 8 years until it dies!). Just basic common sense.
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
People are lonely. The general population is by and large self-centered. There is no sense of community. Daily life involves slaving for someone else doing unfulfilling work that nobody would perform if they had a choice other than "earning a paycheque".
The worst part is that the majority of people who discuss mental illness publicly are not themselves affected by this kind of debilitating sense of there being no meaning to life. And no, having a "family member" or "close friend" who suffers does not make one qualified to talk on their behalf. It's disgusting how self-centered people are, discussing the "mental illness" of their friends or family - the claim is always "because we care" or "we can help them", but the true motivations are entirely selfish.
comment 10y ago · link · parent
"Fuck this guy". No, fuck almost everyone else who works for these kinds of companies, pretending like they're not the scum of society.
Word to the wise: if you work for this kind of company, and do not have the gumption to stand and fight, get the hell out and run for the hills. You might just wind up being the scapegoat; better to get out and let the other willing participants take the fall.
comment 10y ago · link · parent
Their aluminum build is utter Chinese trash, built to the lowest common denominator of pennies per square inch. Yes, the iPhone 4 was smaller and a heavy clunker; but it was a sturdy device compared to their pathetically fragile materials as of late. And it's done to save maybe $10-20 on what could have been a quality build. Apple used to be about good hardware, but they've fallen into the same unapologetic Chinese manufacturing bullshit as everyone else.
comment 10y ago · link · parent
comment 10y ago · link · parent
> if(!ctype_digit($_POST['ID'])) { // throw exception here }
ctype_digit is broken. Try passing integer values. ctype_digit(50) === true, but ctype_digit(100) === false. And "0000001" passes as true, which most people in the majority of scenarios would prefer not to pass. I can't remember what the even-worse-bug is with ctype_digit is, but even if you cast the value to string [ex: ctype_digit((string)$var))], there is some value that still passes for true when it shouldn't - do not use ctype_digit. is_numeric() is also unusable for validation [is_numeric("123e4") === true]. is_int() is a strict type-check so can't solely be used to validate request variables which are always strings (...or arrays, more below).
The only correct ways to verify that a variable contains either a valid numeric string or integer is by comparing type, and then using a regex or a double string-then-int cast.
ex: unsigned database ids: if ((is_int($var) || is_string($var)) && preg_match('/^[1-9]\d*\z/', $var)) { // definitely an int > 0 }
ex: signed integer: if (is_int($var) || (is_string($var) && (string)(int)$var === $var)) { // valid int (including negative values) }
Frankly, developers who don't understand how request variables are handled in PHP have zero chance of properly validating input. Find any site/app written in php, even if built on any of the major frameworks. You can instantly break 30-50% of them by passing an array where a string is expected.
Find an app that takes "?query=hello+world". Instead pass in "?query[]=hello+world". Want an example? Log in to Facebook, then visit this search page[1]. Look at the query string and then what was searched for - and the contents of the search box. Bam, even Facebook gets it wrong! Same thing with Symfony's search[2]. Or Packagist (composer's package manager repository)[3]. More seriously at Yii[4], which exposes an internal error to users as they try to string-trim an array ("Error - trim() expects parameter 1 to be string, array given").
Most developers - including many seniors who have been exclusively coding in php for years - have no clue. You will either cause a 500 Internal Server Error, or your input array will result in an output string of "Array" if they typecast your array to the string they expected. Even the major frameworks, when you pull user-submitted values, simply passthrough the value submitted. Your app expects a string (or a string that contains a numeric value), and instead any user who knows the "[]" syntax can pass in an array.
Really reflect on this fact. Most applications start handling a submitted array value as if it's a string. The bugs this produces are astronomical in some cases.
If you think your framework protects you, think again. The frameworks' request objects also do not have strict type checking. The same goes for their form and model validation classes; if you're using the built-in "integer" or "numeric" validators, you're probably doing things wrong.
It's a nightmare. You could try to blame PHP, but really it's the developers - including the developers of every major well-known framework I've ever touched - that have absolutely no clue.
Related tangent: comparing password and password confirmation fields. Many developers do if ($password == $passwordConfirm) {}. In PHP 5.x, "10" == "0xA" (so type "10" in password field and "0xA" in the confirmation field, and it passes validation). This changed in PHP 7 though. There are only two correct ways to verify that two strings are exact: $password === $passwordConfirm (triple equals), or strcmp($password, $passwordConfirm) === 0.
[1] https://www.facebook.com/search/top/?q[]=hello
[2] https://symfony.com/search?q[]=hello
comment 10y ago · link · parent
> This is out of place and pointless.
The typical HN visitor is going to have, on average, a brain that operates differently than the average citizen. Not necessarily "better", just different. It's not supposed to be an ego boost for us, or an insult to the general population; it's just fact. It is unrealistic to expect that every person is going to be hyper-aware of their surroundings and behaviour at all times.
Ten years ago I thought that "average people" were missing basic common sense, that made them incompetent in their decision processes. With every year that goes by, I've come to realize that these people are completely normal. They are neither unintelligent nor stupid, or careless, or any other derogatory term. If anything I now resent my analytical thought process, and wish I could adopt a different set of mental priorities. Where's the off switch? ;)
comment 10y ago · link · parent
Once the private keys are compromised, all bets are off. No database - whether maintained by Google or anyone else - puts a dent in such a problem. It's one thing to track inauthentic certificates; it's quite another to discover someone silently decrypting traffic with a copy of the private key.
Edit: My response brings up an interesting question I hadn't considered before. With the certificate chain, is it required to have the private keys for the entire chain in order to be able to decrypt the stream? If someone has the certificate authority top-level certificate, can they decrypt a domain's certificate without having its private key as well as any intermediates? If not then it'd be true that the primary concern with a top-level private key being compromised is illegitimate certificates being signed, in which case Google's attempt to combat that with Certificate Transparency isn't half bad.
comment 10y ago · link · parent
How is that exactly? A huge majority of developers in your situation go out and buy a Mac; another hardware purchase in their pocket. This is part of their business strategy: developers are forced to participate, and by and large they do just that.
It hurts you far more than it does Apple by refusing to participate. If you believe you're "hurting Apple" by not developing for their platform, think again. Even if your software is free to download, it's not Apple that suffers - it's your (potential) users; and they will blame you, not Apple, for the lack of support.
Apple wins this battle every time. Welcome to the ecosystem. :)
comment 10y ago · link · parent
Can you please explain this one and hopefully link to an in-depth resource? I imagine you're talking about leap seconds, and/or the possibility that the system time is changed (whether manually or due to an ntpd update that corrects backwards). Are there other sources of this phenomenon?
comment 10y ago · link · parent
comment 10y ago · link · parent
Time and time again on Hacker News, intelligent people can't seem to understand that the average citizen is not a Hacker News visitor. You can try to rationalize that every driver must be capable of being consciously aware of what they are doing every single time they open their car door. You can believe that this behaviour should be testable and that we should revoke licenses from the 20-70% of drivers who would fail such a test. This is simply not the reality. Introducing a - ugh I can't think of a word related to "mnemonic", aka. a brain training exercise - that will hopefully result in more people opening their car doors safely, can only be a benefit to all.
comment 10y ago · link · parent
comment 10y ago · link · parent
Smaller companies never invest the time to set up proper staging and developer environments that operate on purely fictional data. It always starts as a copy of production; and the majority of companies don't even take the most basic step of swapping out sensitive info. The numbers of times I've seen users' plaintext account passwords (another problem entirely) synced to every developer's machine is honestly astounding.
comment 10y ago · link · parent
At a huge number of companies, every junior dev on their first day of work gets full access to production database servers. The reality is that once you make any piece of information available to any web server, assume it can be found in anyone's hands within an hour.
That's the reality. The secret is to not care, and live life not worrying about it.
comment 10y ago · link · parent
I can understand why people who care about this would be a little miffed. Most devs I know - including me - don't put passphrases on their private ssh keys. People who do put passphrases on their keys are going to fall into two camps:
1. They do it out of habit or because they were told it's important, but they don't really care. This issue will not be important to them whatsoever.
2. They do it because they have explicitly chosen to ramp up their security, or are legally required to do so to conform to strict regulations. These people will be absolutely outraged that Apple has made this the default. Any local script or app can now ssh to a remote server and run commands, using a private key that requires a passphrase, without prompting for that passphrase or having explicitly added it to an ssh agent?
I personally don't give a damn. But holy fuck, Apple over-extended on this one. There are some IT employees out there who won't be getting any sleep over the next couple of days while they secure against this issue (and revoke/reissue all their ssh keys).
comment 10y ago · link · parent
If you are not a smooth-talking, 18 year old, ass-kissing fake personality, skip this interview and go to any other company where you will find an interview judging you on merit rather than whether the interviewers want to go to the club with you at midnight on a Friday night.
Source: my own 25+ interviews over the years, with 4 employers over a span of 13 years; in addition to two truly senior developer friends who found themselves in the same situation with them. Shopify is 95th percentile worst interview process for software developers and engineers in Canada.
comment 10y ago · link · parent
They employ over 2000 engineers (just devs, excluding support staff, etc.). They use micro-services designed to the point where teams can't reuse pre-existing services. They are rewriting the same functionality over and over, and over and over again, as separate teams don't even have a clue what has already been written. Pick a piece of functionality you need. There are straight up 20 different APIs that do the exact same thing, but good luck figuring out which one you should be using - oh wait, why bother when you can just write the 21st version of the same thing. They are at the point where they have no clue what their repositories contain. In the video, he can't even provide an accurate number of deployed micro-services. THEY CANNOT EVEN ASSESS WHAT THEY ARE RUNNING IN PRODUCTION. They're literally drowning, and cannot recover.
The point of the article is wrong. It's not about what can be done in one weekend, it's what can be done in 12-24 months by a competent team. Yes, Uber operates internationally which comes with a very crazy set of challenges. 2000 engineers worth of challenge? Not even remotely close. You should need fewer than 100 people who really know what they're doing, and another 300-400 people who can follow the lead of the first 100. If you need more than that for a single product (ie: Google does not apply as they have 100+ full products), you are doing things wrong.
If you're going to provide the anti-thesis, don't use Uber as your example. They don't even understand how their business is managing to remain afloat from a technical perspective.
comment 10y ago · link · parent
The point is you're suffering the same problem. Whether you do it at the application level or the database level, it's a mess.
comment 10y ago · link · parent
Publicly releasing an audit puts the auditor's reputation on the line. As such, the audit will always be performed very seriously, digging into the code and scrutinizing every possible angle - at a level usually not even remotely done for a private audit.
All said: a private audit means squat all.
comment 10y ago · link · parent
There is absolutely no reason to pass arguments to ssh-keygen. If it is actually deemed necessary to do so, then that package's installation is inexcusably broken.