Ask HN: What universities are good? (Undergrad) - <AUTHOR>

I have been reading an unfortunately large amount of articles here on Hacker News seemingly deterring prospective students like myself from entering a university, especially from the field of Computer Science. They cite large tuition/living costs and "wastes of time" as not worth the potential four year education gained. These articles and blog posts claim that jumping straight into industry is an acceptable and perhaps even favorable alternative. I refuse to buy into this idea as I crave the challenge that I feel a good computer science program can bring as well as want to experience the good ol' college life. Are there still places out there that offer a diverse undergraduate Computer Science program that goes beyond teaching Java and C++ and focuses on the application of these technologies to create things? Are there schools out there that will let undergrads touch research and tackle the problems that current computer scientists face today? Or is this asking too much of a pre-graduate program? <comment><USER2> The assumption behind all the "college is a waste of time" advice is that you're smart enough, and willing enough to teach yourself. I am like that, and I'll assume you are too. Being smart enough isn't enough, you have to expose yourself to a variety of ideas.

I started programming in basic in 3rd grade. I graduated high school in 1996, spent three years in tech support and started programming professionally in 1999. According to my salary I never missed anything by skipping college, but I always felt like I missed out. Two years ago, while working as a telecommuter, I decided to pursue a degree and started taking classes at community college. The math and physics courses opened my mind to ideas that I never really put much thought into. College opened my eyes to ideas that I never would have studied on my own. I quit my job and enrolled at University of Illinois this spring.

While I have not yet pursued research, I know that there are many opportunities for undergraduates to research in computer science. Professors typically want junior or senior undergrads because they have enough coursework in the fundamentals to be useful. Right now there is a huge push from the school to get experienced freshman and sophomores into research. They have a funded mentorship program that pays graduate students to work with one or two undergrads on their research. The problem is that they can't get enough underclassmen to apply to the program.

Many of the people that post on Hacker News that post a low opinion of the college education were educated in college themselves. Only a very small minority of posters have seen both sides of the coin. I have become a completely different person in the last two years since I started college. This experience has been far more costly for me, at 35, than it is for a typical college-age student. If I add my tuition, fees, and expenses to the opportunity cost, due to lost salary, I am paying $140k a year to go to college. I have no regrets; this has been the best experience of my life.

You've probably heard the old saying that youth is wasted on the young. I think college is also wasted on the young. Those that denigrate college were not yet self-aware enough to realize the benefit they gained from that experience.

<comment><AUTHOR> Excellent post. Exactly what I needed to hear. I am a little older than the average university student and have wondered exactly what you posted.

The fact that you have "seen both side" is exceptionally helpful.

</comment></comment><comment><USER3> Pretty much any accredited university that has a CS program should be fine. It's not the school, it's the student. If you want to optimize for value, go to a small state school in your home state (assuming US). Then take the initiative to expand your education beyond what you get from your school, based on your interests. There's TONS of free educational material available online, a zillion dead-tree books out there on every topic imaginable, all sorts of great stuff at Coursera, Udacity, etc. There are all sorts of open source projects to participate in, forums to ask / answer questions in, research papers to read, code to study, etc., etc., etc. You can become as good as you want to be, and you don't need to go to Stanford or Harvard to do it.

Also, if there is a hackerspace near you, find it and join it. Get involved in all the crazy stuff that's probably going on there. I can't speak for any other hackerspace, but at SplatSpace, the range of projects people are working on is mind-boggling. You have a guy doing a system based on Inductive Logic Programming in Prolog, to generate candidate molecules for new drugs, and then reason out the metabolic interactions and try to proactively find compounds that will be useful. You have several people building and operating 3D printers. There's a guy building a coilgun (OK, that's me). You have a guy working with a researcher at UNC doing "forced evolution" research. Another guy is doing something with an interactive fiction platform. Somebody else just built a Raspberry Pi based tabletop form-factor game cabinet. Somebody recently built a Mantis PCB mill. One guy is working to fully automate his home brewing setup. Seriously, the knowledge, the vibe, everything available at a hackerspace can be awe inspiring.

 _Or is this asking too much of a pre-graduate program?_

Don't ask it of the program, ask it of yourself. Of course, talk to your professors and see if they can help. I imagine many (most?) will be VERY happy to help a motivated student who wants to go beyond the standard curriculum and do interesting stuff.

</comment><comment><USER4> Take a look at US World News & Reports and their top 10 list. Any of those would be good choices. There was a syndicated article featured on Yahoo a while back about best value colleges, and Georgia Tech was top value (cost vs avg salary when you get out). I know they are in the top 10 for undergrad CS.

There are undergraduate research opportunities available, where you basically take research as a class. At GT it's called UROP (Undergraduate Research Opportunities Program). I know a few people who did it for CS, and they offer it in their other programs of study as well.

As far as language goes, I think I had 2-3 classes at most in a particular language. Some didn't have a language requirement, it was whatever. In no particular order, I used: C, C++, Cg, Java, Smalltalk, Ruby, Bash, Perl, PHP, HTML/CSS/JS, Matlab, Python, Processing, and SQL (if you count that). I also didn't know how to program before I went to college.

As far as paying for colleges go, you may want to check into reciprocal in- state tuition agreements between states. I think most of the time it's for bordering states if your state doesn't have a good program of study. Otherwise, I'd highly recommend work-study, co-op, or internship programs since you'll earn money and get experience as well.

<comment><AUTHOR> I am tried to avoid looking at college rankings, as I know that doesn't really measure learning...just prestige.

I have looked at GT and heard from friends that it was hard (in a busy work negative way), but well priced. It's on my list of potentials.

<comment><USER4> About the prestige - Why do you think they're considered prestigious? Is it simply word of mouth, or is there something behind it? Not saying you can't find something on the top X list that provides a good learning experience without the prestige.

I never really felt that my classes at GT were at busy work. Definitely difficult, until you look back later and ask yourself why you ever struggled with that, it was so easy compared to what you're doing now.

<comment><AUTHOR> Good to hear that you thought the work was useful. GT just went up a few points! I hate to make generalizations with so little data.

<comment><USER4> Feel free to email me questions or whatever about GT. I graduated not too long ago, still have friends who haven't yet graduated, and I won't necessarily give you the politically correct answers they give in the tour.

</comment></comment></comment></comment></comment><comment><USER5> Remember, there are multiple ways to accomplish things, and some are more suitable for some than others.

1\. Some people learn theory first, and from this discover more advanced theory that helps them eventually apply knowledge.

2\. Some people learn applications first, and learn theory as necessary.

In the software industry, it's very easy to fall into the trap of #2. I mean... it's way more fun to build something that people can use, than read a textbook and hear a professor talk.

However, you should keep in mind that if you choose this path, you are starting at the same starting line as everyone else. Learning the theory behind applications gives u the advantage of having a starting line that is ahead of most people.

Consider this scenario: You are an incandescent lightbulb assembler. When you first started, you did not make them very well. Some of them didn't light up, some of them were dimmer than others. However, as time went on, you made better and better lightbulbs. Soon, you become the world's best incandescent lightbulb assembler. But, someone invented LEDs. You don't know what's wrong with your bulbs, since there is nothing inherently ~wrong~ about incandescent bulbs. But you know nothing about why it works, only how to assemble it.

<comment><USER5> But, to respond to the original question... Carnegie Mellon is pretty cool :)

</comment></comment><comment><USER6> Just about any school of any sort with a CS program is good enough. The point of all this writing on college not being worth it is that the expected value of a $200K education is not much higher than a $50K one, or maybe even $10K.

>"Are there still places out there that offer a diverse undergraduate Computer Science program that goes beyond teaching Java and C++ and focuses on the application of these technologies to create things?"

You won't find much of this taught in the classroom. Seek out schools with strong co-op or intern programs. Many community colleges even have co-op programs. Co-ops are basically forced internships and the college does a lot to get you hired. But it's really not much different than spending your summers interning.

</comment><comment><USER7> There are lots that are good.

MIT, Stanford, Caltech, Berkeley, CMU, Harvard, Princeton, UCLA, UCSD, Cal Poly, and hundreds more.

<comment><AUTHOR> Any recommendation I couldn't read about in every top twenty list?

Or are these really the best for LEARNING (VS JOB POTENTIAL)

</comment></comment><comment><USER8> I think your view has been skewed by a relatively small number of anti- university articles, the reason you don't get pro-university articles is that it's the status quo so people don't feel the need to argue for it.

The majority of successful professional software developers (if you look at say Google or at YC founders) hold degrees.

<comment><AUTHOR> Good point. I just kept reading very vocal people strongly against it. You're right, the others probably just didn't comment.

</comment></comment><comment><USER9> What state? You're not likely to get a good value from an out of state schools considering the cost.

What's your GPA? If it's top of the class, then you don't have a problem. Otherwise, you'll need to look in state again.

And if cost or GPA isn't an object then michaelkscott comments are the most valid.

<comment><AUTHOR> Missouri. I have looked at Truman State , a pretty good LAC, but I expect to relocate. I am thinking Texas or California for the good and hopefully affordable options. I would go to CC and transfer.

Grades a good 3.8 SAT/ACT don't remember (I think I had a 31)

</comment></comment><comment><USER10> I think I now understand why the naivety of a high school student is a good thing. Wish I could go back to those days.</comment>


The tragedy of Ben Bernanke - <AUTHOR> https://www.project-syndicate.org/commentary/bernanke-memoir-monetary-policy-lessons-by-j--bradford-delong-2015-10?utm_source=Project+Syndicate+Newsletter&utm_campaign=ba54bcb110-Brad_DeLong_The_Tragedy_of_Ben_Bernanke10_31_2015&utm_medium=email&utm_term=0_73bad5b7d8-ba54bcb110-93764801 <comment><USER2> Interesting, I didn't realize Bernanke's performance is considered a disappointment. It's interesting to read the phrase "full prosperity" used so casually; I guess there's a specific definition of that. It's pretty eye- opening to learn that the monetary base was expanded 4 times.

The biggest issue I have is that they're spending so much money, but everyone refuses to actually just give some of it to people in the form of a universal basic income. How hard would that be? And yet the benefits are huge for so many.</comment>


Hello, JIT World: The Joy of Simple JITs - <AUTHOR> http://blog.reverberate.org/2012/12/hello-jit-world-joy-of-simple-jits.html

<comment><USER2> This is a great post and I probably wouldn't have read up on DynASM without it. But the comparison between DynASM syntax and the BPF JIT is a bit unfair; the Linux kernel is not pervasively JIT'd, and the BPF language hasn't changed in decades, so there was little incentive to create a flexible dynamic code generation system for it.

You could probably very easily clean up the syntax for a C->x64 JIT without requiring (yech) a preprocessor.

<comment><USER3> I'm not faulting the BPF authors for not inventing DynASM, I'm just illustrating what DynASM buys you over the more traditional approach.

Without a preprocessor you'll always be dealing in encoded instructions instead of symbolic ones. It's manual work that is surely nicer to avoid if you can. I'm surprised that you're put off by the preprocessor aspect of it, given the benefits of this approach.

<comment><USER2> There's something to be said for instructions encoded into structs instead of raw assembly; those structures are parameterized, so it's easy to interrogate them or bind new values to them; without structures, you end up having to invent new assembly language features for dynamic labels and things like that.

<comment><USER3> > There's something to be said for instructions encoded into structs instead > of raw assembly

I'm confused, what is this in response to? Are we still talking about BPF's JIT vs DynASM?

By "instructions encoded into structs" are you referring to BPF's byte-code? I'm certainly not arguing against a byte-code approach at all -- byte-code obviously has numerous advantages, including (as you mention) ease of inspection. Even LuaJIT (the project that DynASM was built for) uses byte-code pervasively.

The question is: at the point that you decide you want to generate machine code from your byte-code, what's the easiest way to do it?

The BPF JIT's code is functionally identical to a DynASM-based code generator; the _only_ difference is that the BPF JIT requires a human to put the machine encoding of every instruction directly in the source file. DynASM saves the human from performing this step by using a preprocessor.

<comment><USER2> No, I'm saying, rather than have the representation of assembly code in your C program be textual --- raw assembly code interpolated into C code and expanded into structs by a preprocessor --- there is something to be said for having the representation of your instructions be "native", expressed without a preprocessor. In particular, it makes it easier to modify the assembly code in C code later on in the runtime of the program; and, if you look closely at things like DynASM, it's not "really" assembly _qua_ assembly, because they've added features to the language to handle the dynamic things anyways.

I'm definitely not saying bytecode is better than assembly code! I'm talking strictly about the mechanism by which you generate opcodes from "assembly language".

A library that can generate opcodes without exposing all the fiddly mod/rm stuff is probably just as good as the preprocessor tool.

I am, like everyone else, appropriately reverential of LuaJIT. :)

<comment><USER3> > A library that can generate opcodes without exposing all the fiddly mod/rm > stuff is probably just as good as the preprocessor tool.

I'm skeptical that such a library could have a very simple or clean interface -- the "mov" instruction alone has almost 40 variants, all encoded in different ways -- but if you ever create such a thing I promise to check it out and give it a fair opinion. :)

<comment><USER2> Most of the x64 instruction set shares a common set of addressing mode variants all encoded the same way.

I've done this from C (messily) and from Ruby (very cleanly) and while the x64 ISA is definitely a pain to work with directly, it's not so painful that I think it defies the abstractions C provides natively. :)

</comment></comment></comment></comment></comment></comment></comment><comment><USER4> This is a beautiful introduction to DynASM, the code generation library from the amazing LuaJIT. Josh, I hope you keep writing more pieces like it.

<comment><USER3> Thanks! It took a while to write, but I was motivated by the positive feedback I'd gotten on HN previously about writing an introduction to DynASM.

Some feedback I got from Mike suggested very simple optimizations for the BF JIT that will let me catch (and exceed) the performance of bf2c. That might be the next article in the series.

</comment></comment><comment><USER5> For a nice little JIT, see also maru –

<http://www.piumarta.com/software/maru/>

</comment><comment><USER6> TL;DR DynASM is a toned down JIT compiler which directly generates target assembly instead of a more abstract IL. Retargeting and optimizations will be hard.

I'm looking forward the next installment, where (hopefully!) one generates target independent code via LLVM, then uses one of the LLVM backends to generate the final assembly code.

<comment><USER3> > Retargeting and optimizations will be hard.

What evidence do you have for this? I have evidence to the contrary: LuaJIT is a one-man effort and yet is one of the fastest and most portable JITs around (x86, x86-64, ARM, PowerPC, MIPS).

> I'm looking forward the next installment, where (hopefully!) one generates > target independent code via LLVM, then uses one of the LLVM backends to > generate the final assembly code.

LLVM is very cool, but it is an absolute mistake to think of it as obsoleting all other JITs. LLVM uses an IR that is well-suited to some things but not others. If LLVM fits your problem, great. But many problems it does not fit as well -- just look at Unladen Swallow, and notice that none of the mainstream JavaScript JITs use LLVM (not V8, not IonMonkey, not Nitro).

LLVM's design tightly couples an IR with a machine code generator. If you use DynASM, you can write your own machine code generator that accepts whatever IR is best suited to your problem.

<comment><USER6> I'm assuming that emitting "movzx edi, byte [PTR]" is using x86 as the target, thus retargeting for ARM will likely require a complete rewrite of the brainf#ck jit. In that sense retargeting is hard. But I may be wrong! I am looking for a further article that shows how the brainf#ck jit can be retargeted to ARM without a full rewrite of the jit code.

From the jit code that generates assembly tied to a specific architecture and register allocation, plus the code generation process encoded as a preprocessor step instead of a library I can only deduce that optimizations aren't the focus of this work. But I may be wrong! Perhaps the preprocessor is syntactic sugar over a library that build the code representation as a data structure and there are ways to programmatically manipulate this data structure to implement optimizations. Looking forward for a further article with more details!

I'm not suggesting you necessarily use LLVM, but LLVM is the closest to a assembly generator library I am aware of. To the best of my knowledge, you'd have a harder time extracting the code generator of, for example, v8 as a standalone library.

<comment><USER3> It is true that this approach requires a separate code generator for every architecture. That is not the same as saying that "retargeting will be hard" (which makes it sound like DynASM somehow gets in your way).

Yes, as I said before, if you have a problem that maps cleanly onto LLVM and you don't mind the weight that LLVM brings along, by all means use it! But you shouldn't think of LLVM as an "assembly generator library." That implies that it is far more general-purpose than it actually is. DynASM is _actually_ an assembly generator library. LLVM is an IR, a set of optimization passes for that IR, and a set of target-specific code generators for that IR. The key point is "for that IR."

DynASM is a tool that you can count on when no existing IR's like LLVM, .NET, etc. fit your needs. It's a lower-level tool -- LLVM could conceivably use DynASM to perform its own target-specific instruction encoding. DynASM is a small, focused tool that does one thing and does it well. LLVM is more of a toolbox that tries to get the 99% case right for its target audience. As a result, it represents a lot more compromises and changes in more fundamental ways over time (for example, it recently completely rewrote its register allocator).

> Perhaps the preprocessor is syntactic sugar over a library that build the > code representation as a data structure and there are ways to > programmatically manipulate this data structure to implement optimizations.

No, definitely not. The idea is that you perform optimizations _before_ the code generation step. I didn't do this in the article because these were just simple "Hello, World" examples, but maybe I should write a follow-up article that illustrates how optimization fits into this framework.</comment></comment></comment></comment>


App Press: iOS Apps Without Code Via Web CMS - <AUTHOR> http://www.myappress.com/

<comment><USER2> Looking at the reviews for the signature app (Chili Chef), I'm not entirely impressed, unless you're creating the app version of a brochure: [http://itunes.apple.com/us/app/the-chili- chef/id403523952?mt...](http://itunes.apple.com/us/app/the-chili- chef/id403523952?mt=8)

Specifically, no way to print, and requires internet each time you view the content.

</comment><comment><USER3> So, this is like a PDF reader for a single PDF, converted into an "app"?</comment>


Google Hangouts/GTalk glitch sends chats to wrong recipients - <AUTHOR> http://www.zdnet.com/google-hangoutsgtalk-glitch-sends-chats-to-wrong-recipients-7000021195/ <comment><USER2> Besides the fact that this is a pretty serious bug, I'm rather underwhelmed by the care Google has been taking of their hangouts product after releasing it last May.

And I'm not even talking about things like online-status 'missing' (it's a design decision on their end), but more the general experience of using hangouts.

As far as I can tell you're still not able to mute the new message sound, without turning off notifications all together (hangouts in Gmail). Chatter picking up in a hangout and you want to mute it for a while? Again, not possible. Turn off all notifications for that hangout and chances are you'll completely forget you were ever part of that conversation (snoozing notifications hangouts-wide makes sure you miss all other personal messages sent to you as well).

Uploading a photo on a slow network is a pretty terrible experience: it'll start telling you the upload has failed and it's retrying (no progress to be seen anywhere). If you delete the message and try again, you'll probably end up with two of the same messages in your conversation, because often it doesn't appear to correctly 'receive' your deletion request either.

When you've received a photo that you need to save to your gallery (maybe you want to zoom-in a little, or share it with someone else?), be prepared to hit that save button for a while until you finally get a confirmation that the photo has actually been saved.

Stuff like this is not a problem when it's your first release, but 4 months on you'd expect a company like Google to be able to iron out quirks like these. But no, we get extra emoji as one of the few updates to the hangouts platform.

[edit: spelling]

<comment><USER3> Also synchronization sucks. I often use it from my desktop only to get "new message" notification on my phone somewhere around 10 minutes in the conversation with some messages from the beginning. It also loses message regularly so I am now used to ask for copy pasting if it's obvious something got lost. Blatant disregard of things like sorting via status (or displaying that at all) or introducing more of them is another thing. It looks like some crazy manager designed his evil plan and convinced all his bosses that it's the way to go. The app sucks, everyone I know hates it, they forced feeded it to users with Android update with no way to go back to gtalk.

It's amazing how they completely ignore what people want in the name of some lucid vision of how web talk should be done. Worse yet, they first lured people in by releasing an awesome app (gtalk) killing most of the competition and then changed it to "Google way of doing web" without asking anybody and with competition already (almost) dead. /rant

<comment><USER4> Killing the competition? There is lots of healthy competition in the messaging/chat space:

Facebook Chat, WhatsApp, iMessage, SnapChat, Instagram, Skype, etc.

If anything gChat is a struggling platform that didn't make the transition to the mobile era -- that's the _entire reason Hangouts exists_.

Edited: to use more polite tone.

<comment><USER5> It's amazing that on a place like HN it seems like most people just don't get this.

The vast majority of communication happens on products that: 1\. Don't even have a desktop component 2\. Have no "status" indication (oh noes!!!) 3\. Are completely closed ecosystems

And yet you never see posts about how WhatsApp, iMessage, SnapChat, etc are horrible because of the above reasons.

<comment><USER6> >It's amazing that on a place like HN it seems like most people just don't get this.

Communication in general, business communication still is very much dominated by desktop software (e.g. [http://office.microsoft.com/en-us/microsoft-lync- video-confe...](http://office.microsoft.com/en-us/microsoft-lync-video- conferencing-and-instant-messaging-FX102004552.aspx))

</comment></comment></comment></comment></comment><comment><USER7> > _At this time Google Talk is not functioning correctly and we are continuing > to work to restore full functionality._

This is where you _turn it off_ until you fix it. This isn't a service disruption, this is a service malfunction with far more serious potential consequences than delayed emails, or inability to download an app, or duplicate credit card charges, and you can't fix those consequences after the fact, not even by applying vast amounts of money.

<comment><USER8> I think they turned off Hangouts and reverted to old talk. I noticed that messages I've tried to send with Hangouts from G+ web page were not delivered and chats from gtalk dekstop client are saved in gmail as "chat" not "hangout"

</comment></comment><comment><USER9> Tut, always so negative. I told an old friend this morning that I was going to charge the anal probe, of course I meant that remark to my co-founder.

Haven't talked to him in ages, we had a good chat and we're going to meet for a drink at the weekend (sans probe). Cheers Google!

<comment><USER10> This is irrelevant. Just because you had a positive experience from it doesn't make this bug less serious.

<comment><USER11> Sheldon? Is that you?

</comment></comment></comment><comment><USER12> Was about to create a thread on /r/netsec and ask what was going on, or if i had gone crazy, after a former colleague of me got everything i wrote to my fiancee.

Pretty horrible bug.

A Norwegian example/proof: [https://dl.dropboxusercontent.com/u/83758451/Screenshot_2013...](https://dl.dropboxusercontent.com/u/83758451/Screenshot_2013-09-26-10-40-51.png)

</comment><comment><USER13> Someone's continuous deployment process is about to get mirred in bureaucracy and paperwork

<comment><USER14> :-)

Releasing is hard to scale up like google have to. How many apps are they releasing to daily...!

It's not technical building blocks (they can all be automated), not even busy work, just complex intertwined dependencies from completely different, often non-electronic, domains.

Hypothetical release co-ordinator speaking: "Did app A release this morning into EMEA prod? Ok that means app B can go but only once the security review team drop their veto. Has release candidate 2 been promoted to the canary environment yet? Remember B's new deployment process is in scope this release, and do not release to the 5 servers in the BCP datacentre today..."

Could you imagine managing the constant evolution of a rules engine to replace a good quality release co-ordinator? I don't think i'd be able to sleep!

As far as i can see, continous deployment doesn't have the general applicability that continuous delivery enjoys.

<comment><USER15> No, releasing is easy, until your established process get fucked up by an Indian PM asking you to "integrate" features into G+

<comment><USER16> > No, releasing is easy, until your established process get fucked up by an > Indian PM asking you to "integrate" features into G+

Was it his/her race that fucked it up? Would it have been better if Google hired only the finest corn-fed Mid Western white American?

<comment><USER17> Perhaps there is confusion in this thread regarding "PM". PM to a programmer may mean "Program Manager", but in most countries with parliamentary government, "PM" may mean "Prime Minister".

<comment><USER18> He's almost certainly referring to Vic Gundotra, the PM for G+.

<comment><USER19> senior vice president

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> We deserve a public and highly detailed post-mortem.

<comment><USER21> Do we?

<comment><USER22> Yes, we do. Especially all those business users who have paid for GApps and have trusted Google with their comms.

In general, we deserve to have more decentralised services that are built on the principle of 'privacy by design', rather than 'trust by design'. Maybe, screw-ups like this can help spur more efforts in that regard.

<comment><USER23> I agree that paid GApps customers absolutely do, and maybe even a slight refund for the outage they should be taking. But free customers don't. With no payment also comes no expectation of service (outside the Terms of Service, which probably says that this kind of stuff will happen from time to time).

<comment><USER22> > _" But free customers don't."_

I respectfully (and strongly) disagree. You're essentially saying that free customers can be completely screwed over and have basically no rights at all (and you seem to be implying that this ok). Legally speaking, maybe Google has absolutely no obligation to say anything (even to it's paying customers), but this isn't about meeting the minimum legal requirements.

On a related note, how many people really have the ability to comprehend the ToS they click on? The reading level of many of those is surprisingly high given the demographics that use the services, so the concept of 'informed consent' is already quite strained imho. Therefore, people fall back on trust and it's probably in the providers interest that they do this (as they can make a ToS that's great for their own needs, while legally providing very little to the user).

</comment></comment></comment></comment></comment><comment><USER24> I just opened the chat tab and i was shocked to see the conversation i had with my co-founder sent to my college friend. Two more lines from the same conversation was sent to my friend's brother. This is serious.

</comment><comment><USER25> I'm starting to seriously consider moving my teams away from Google; especially for chat.

Hangouts has been a debacle. I'm furious that the upgrade was shoved down our throats (on Android) for a next-gen tool that was as feature incomplete as the first EA Sports' Madden game on a new gaming system.

</comment><comment><USER26> Here's the status link - [http://www.google.com/appsstatus#hl=en&v=issue&ts=1380220199...](http://www.google.com/appsstatus#hl=en&v=issue&ts=1380220199000&sid=3&iid=2115900d3a8ac9a969139e5db5f60052)

</comment><comment><AUTHOR> This just happened to me. I recieved messages (in gmail) from a contact that ware meant for his wife.

Be careful! I guess the best course of action is not to use gmail chat until google announces they have fixed the issue.

<comment><USER27> No, trust has been broken.

You can't tell me you have confidence that this randomly won't happen again in the future? It's shattered mine.

<comment><USER28> Your search for perfect, flawless permanent security will be long, lonely and ultimately fruitless.

Already you've cut yourself off from flying, riding on trains and driving. Nobody can guarantee that deadly accidents will never happen, and indeed they do happen.

Presumably you only eat food your grow yourself. There are regular instances of contamination in the industrial food sector. Not that any guarantees can really be made, but at least contamination will be mostly your own fault.

See where I'm going with this?

<comment><USER29> I generally agree with this reasoning but this is not "flying", this is "flying with x airlines which dropped a plane once".

There are alternatives and one could choose a statistically safer one. There is obviously no guarantee. However, gtalk now has the highest likelihood of sending your messages to random people. That's a reason to avoid it.

<comment><USER28> When considering "passenger miles flown per incident", GTalk (and Google in general) has a security record completely on par with the best airlines.

<comment><USER30> What about the best chat services? In something like 18 years of chatting on the internet from IRC to ICQ, AIM, Skype, even Facebook messages, I have _never_ seen a message go out to an incorrect recipient that wasn't the fault of my own negligence.

<comment><USER28> Well, they're also good[1]? British Airways didn't become a better airline when the Air France plane crashed, just like Air France didn't become a worse one.

1: Except, of course, IRC which is a protocol, not a service, and it was never designed to be private, but that's pedantry.

<comment><USER31> I think the overall point here is that the _ability_ for a message addressed to one person to end up on someone else's screen carries some rather unfortunate implications for the internals of the service. Compare with IRC private messages, email, heck even XMPP.

<comment><USER28> Both IRC and XMPP cheerfully supports group messages?

<comment><USER31> I know XMPP does because I use that particular function at work daily, and IRC supports person to person PMs.

What I meant though is that the fact that whatever kind of shenanigans they're doing internally has a failure condition that can misroute messages is a bit scary.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER32> Just happening to me, I thought I was going mad.

It happens on regular accounts, not just Business, I've seen it this morning when I got messages intended for somebody else.

I would refrain to send any sensitive information over Google Talk right now.

<comment><USER22> > "I would refrain to send any sensitive information over Google Talk right > now."

Why only "right now"? Why ever send _sensitive_ information over a 3rd party's server. While I believe that Google will find and fix the problem, they probably make little to no claims about the level of security they offer. So using them at all should be a calculated risk.

<comment><USER26> So how else do you send them?

<comment><USER28> The exclusion of third party servers is meaningless. Any communication over the internet will pass through _at least_ several third party routers, which are by all intents and purposes servers.

What you shouldn't do is transmitting sensitive information without controlling the end-to-end encryption chain. If you do that, you can involve as many third party servers as is convenient.

<comment><USER22> > _" What you shouldn't do is transmitting sensitive information without > controlling the end-to-end encryption chain."_

Actually, this is what I meant and I should have been clearer. Thanks for pointing it out.

</comment></comment></comment></comment></comment><comment><USER33> This also just happened to me. Some messages that I send (using the browser) to a friend were received by someone else. A messages intended for my girlfriend was received by a coworker. My Hangouts app (Android) actually showed these messages in the "wrong" conversation.

</comment><comment><USER34> What if this happened with Gmail ? My bank details and other data getting displayed on someone's Inbox !

EDIT - I don't use gtalk for sending confidential info, so this doesn't affect me, but this could also happen with Gmail that I trust lot of data with (bank, school, government etc)..

<comment><USER35> This is probably a good reminder that you should never send anything in unencrypted e-mail that you wouldn't be willing to write on a postcard and send via USPS.

</comment></comment><comment><USER36> I have experienced this bug for years: everything I send over GTalk goes to the NSA.

</comment><comment><USER37> Wow, I've always fully trusted gtalk. Even sent over my SSN and credit card details. Never again.

<comment><USER28> Well, you shouldn't do that, ever.

That said, the perfect is the enemy of the good.

<comment><USER38> > perfect is the enemy of the good

While I agree with that statement in general, I couldn't quite make out what you meant by it in this context.

Are you saying "good" = " _most_ of the times your Google messages will go to the intended recipients" and "perfect" = " _all_ of the times your messages will go to the intended recipients"?

<comment><USER28> Good means that GTalk is really, really good. Perfect means that it will never have a bug.

Nobody is talking about that this is some acceptable status quo. It's a bug and it will be fixed. If past performance is considered, it will be fixed _fast_.

<comment><USER38> Sorry, but I disagree with your choice of adjectives.

You are reducing what happened today to a mere "bug", which is the way Google (or developers) would look at it. Instead, approach it from the user's POV. Having your financial, personal, professional, secret or illegal (yes, I'm sure there will be that too) communications sent to multiple random people is more than just a bug.

I agree GTalk is "really, really good" like you say, but then what happened today also should "never, ever happen".

<comment><USER39> Consider that statistically it can happen to any other messaging service provider. And switching to other instant messaging service won't offer you additional protection due to that the core problem (it is impossible to guarantee zero bugs without huge overheads) is the same for all services.

</comment></comment></comment></comment></comment></comment><comment> c-a Wouldn't a problem like this call for pulling the service off while it's being investigated/fixed?

</comment><comment> k-mcgrady Suddenly I'm very glad Talk has never been available in my country. After this I doubt they would have any hope of getting it past EU privacy laws anyway.

Edit:

As the people below have pointed out Voice isn't available to me - Talk is.

<comment><USER40> Wait, Talk is country restricted?

<comment><USER41> Talk is everywhere, OP probably means Voice, which isn't.

</comment></comment></comment><comment><USER42> Contrary to the articles suggestion that this is recent (past day or two), this actually happened to me for the first time back on the 20th of the month. It happened between two non-apps (regular Gmail) accounts.

I mean, I watch what I say online anyway, but I sure wasn't expecting Google to force me to open a dialogue with an ex.

</comment><comment><USER43> In situations like this I would actually prefer it if the service went offline until fixed.

</comment><comment><USER44> Well, now I'm glad I convinced most of my friends to install OTR. I do wish there were an XMPP-supporting instant messaging service with a good mobile app, though. Google Talk has gone to hell after it got turned into Hangouts...

<comment><USER45> Use straight jabber/xmpp ? Sign up for a jabber.org account (or hell run your own ejabberd). I think there are some decent mobile clients.

<comment><USER44> Unfortunately, there just cannot be a good mobile client unless it supports push notifications, which requires server support, which XMPP doesn't have. The existing clients need to keep a connection open and take too much battery, sadly...

</comment></comment></comment><comment><USER46> Sounds like chat roulette on a grand scale!

</comment><comment><USER47> For some time I've pretended that anything I write that should be private (IM, mail, etc.) is actually public. Nowadays it has become so easy for your recipient to transfer a mail to the wrong person. Once I've also been victim of my phone sending texts to the wrong people.

So from now on, just write things you can assume in front of the whole world. Don't write shit about people you don't like. Keep that for face-to-face talk with your friends. Things _written_ last so much longer than things _said_.

</comment><comment><USER48> I'm sending random messages to random people just to see them freaking out. "Oh, this might be the bug they were talking about this morning"

<comment><USER49> I hope you inform them you were joking. I think it's pretty irresponsible to misrepresent a problem this potentially serious.

<comment><USER48> Of course, just a good excuse to talk to people I haven't chat for a while. :)

</comment></comment></comment><comment><USER50> I've had this happen with facebook chat once maybe two years ago. I wonder if there have been other places where something like this has happened...

</comment><comment><USER51> Happened to me this morning. I listened in for a while to my friends chat to his client about a bug, while interfering several times with messages of "wtf" and "what ok?" before realizing the situation and horrified at the prospect of the client receiving my invaluable inputs. Called the guy up in a jiffy and told him about it. It seems that I was just a passive receiver.

</comment><comment><USER52> Time for some Russian roulette: Send offensive messages to random people on your GTalk and see who receives them!

</comment><comment><USER53> Good thing I've gotten most of the friends I chat with regularly to switch to OTR-enabled chat clients.

<comment><USER54> Yeah, can we get OTR in Hangouts already, Google? (no, not that "we're not archiving it - promise!" OTR)

<comment><USER55> What would be a correct OTR implementation for you? For in-browser chat you'll have to trust them at some point anyway...

<comment><USER56> Why not with a Browser plugin? Pidgin already Supports OTR via gtalk. And on Android you can use Gitterbot. Google should really implement OTR in a Javascript library in the Client Browser. Would that be possible?

<comment><USER55> Sure, but I like the convenience of web-based no-install gtalk. I think as far as google is concerned convenience beats security.

They "read" your mails, know what you search for and who your friends are. It would seem strange for them to go out of their way to provide truly OTR gtalk. And I'm totally fine with that, there are plenty of alternatives if I ever need encrypted chat.

</comment></comment></comment></comment></comment><comment><USER57> I don't trust hangouts ever since I discovered, by accident, that if you get somebody else's invite you can set their status and messages for the invite in calendar as you want. I reported that to google to which they said it's by design if you're sending out invites to non-google accounts or if invite is received in a non-gmail client. While I understand you can't do it any differently if you want that functionality, but this was on a business account. I'd rather see limited functionality then where you can set status for the invite only in gmail/calendar and if you're non-google account or 3rd party email client you get to only view the invite.

</comment><comment><USER58> I suppose this is a good time as any to ask fellow HN readers for alternatives. Preferably the ones with extra crypto features added in the wake of the PRISM revelations. What alternative chat clients do you use besides/instead of GTalk?

</comment><comment><USER59> Deja vu anyone? [http://techcrunch.com/2011/01/05/google-android-sms- bug/](http://techcrunch.com/2011/01/05/google-android-sms-bug/)

Good going Google.

</comment><comment><USER60> Google has already fixed it within hours [http://www.google.com/appsstatus#hl=en&v=issue&ts=1380265199...](http://www.google.com/appsstatus#hl=en&v=issue&ts=1380265199000&sid=3&iid=2115900d3a8ac9a969139e5db5f60052)

<comment><USER48> well, look again.

</comment></comment><comment><USER61> Any idea if this is happening over Jabber clients as well?

</comment><comment><USER62> Just happend to me today. A coworker was writing to someone else and everything was coming to me as well.

</comment><comment><USER63> For those who don't see why they should route their communication through a company known to partner with the NSA, try one of the server- less/decentralized/encrypted communication platforms like [http://retroshare.sourceforge.net/](http://retroshare.sourceforge.net/)

</comment><comment><USER27> I am amazed that this hasn't received more attention.

</comment><comment><USER64> Google Talk glitch sends chats to wrong recipients..

</comment><comment><USER65> Same here...</comment>


Rumours that first dark matter particle found - <AUTHOR> http://www.newscientist.com/blogs/shortsharpscience/2009/12/rumours-that-first-dark-matter.html

<comment><USER2> Already apparently debunked (see the "important update"):

[http://resonaances.blogspot.com/2009/12/dark-matter- discover...](http://resonaances.blogspot.com/2009/12/dark-matter- discovered.html)

 _I was alerted to your blog of yesterday (you certainly don't make contacting you easy). Your "fact" #1, that Nature is about to publish a CDMS paper on dark matter, is completely false. This would be instantly obvious to the most casual observer because the purported date of publication is a Friday, and Nature is published on Thursdays. Your "fact" therefore contains as much truth as the average Fox News story, and I would be grateful if you would correct it immediately._

 _[...]_

 _Dr Leslie Sage

Senior editor, physical sciences

Nature_

<comment><USER3> Dr. Sage is certainly cordial, eh?

edit: actually he apologizes for his tone in a comment on the blog, so credit there.

</comment></comment><comment><USER4> I bet it was in the last place they looked.</comment>


Medium-hard SQL interview questions - <AUTHOR> https://quip.com/2gwZArKuWk7W <comment><USER3> SQL interview questions are an interesting counterpoint to stereotypical programming interviews: while typical algo questions in SWE interviews tend to test what's taught in academic contexts but have little real-world application; the questions in SQL interviews are more practical outside the whiteboard.

A weakness of these types of SQL questions however is that it's near impossible for the interviewer to provide help/guidance; the questions are often know-it-or-don't questions (especially involving window functions w/ uncommon syntax). A data science interviewer years ago mocked me during a whiteboard test for not knowing the BETWEEN ROW syntax for a window function.

That said, as an IRL data scientist, the amount of times I've had to do a SQL self-join in the past few years can be counted on one hand. And the BETWEEN ROW syntax for a window function.

<comment><USER4> I've been using SQL for 24 years and don't think I've ever used BETWEEN ROW before. Did read up on it now, though.

<comment><USER5> I wrote sql for years for a forex platform used by some of the top dogs (literal). Pretty hardcore sql and had to be very fast, never used BETWEEN ROW.

<comment><USER6> What breeds of dogs use forex platforms?

<comment><USER7> Fiat Retrievers

</comment></comment></comment></comment></comment><comment><USER8> This is idiotic. Why in the world would testing for rote memorization of something anyone can look up easily be a reasonable filter for talent and experience in a programming role?

A friend of mine did numerous interviews at a large company, hours out of his time and those of the interviewers, only to be caught up by some inane SQL question asked by a know-nothing after the entire process of interviews had been completed.

Why not ask about obscure regex expressions? Better yet, how about baseball scores? Hair bands from the 80s?

It's time for the valley to get real about how to judge the merit of applicants. The present state of affairs in tech recruiting is a joke.

<comment><USER9> "Idiotic" is a strong word. The question is: if candidate A answers these successfully, and candidate B does not, is there a reason to believe that candidate A is a better fit for your SQL data analyst position?

You may say no, that any competent person can read the book and learn this stuff. But in my hiring experience there are sadly oceans of coders who, say, reach for 100 lines of buggy slow Java code to solve something that could be done in 3 lines of SQL. Once you've hired that person they do not magically turn into an efficient or self-aware programmer.

<comment><USER10> > there are sadly oceans of coders who, say, reach for 100 lines of buggy slow > Java code to solve something that could be done in 3 lines of SQL

Such questions don't test for that, they test for rote memorization. I don't learn things by heart I only use rarely, and certainly not to help you with a problem I'm not causing and that such memorization doesn't fix.

</comment></comment></comment><comment><USER11> Checked just the first two answers:

1\. MoM Percent Change

It's better to use windowing functions, I believe it should be faster than self-join.

2\. It seems that the first solution is wrong -- it returns whether "a"-s parent is Root/Inner/Leaf, not "a" itself.

I'd instead add a "has_children" column to the table, and then it would be clear.

Second solution works, but without optimization it's 1 query per row due to nested query -- slow, but not mentioned.

<comment><USER11> Answer 4 is very very bad, you're doing O(N^2) JOIN. It's not just slow, it will fail on bigger data.

The question just screams for windowing functions, and cumsum is a canonical example for them.

Sorry post author, you'd fail my interview :)

<comment><AUTHOR> Thanks for the feedback! The first section is intentionally about self-joins since they get asked about in interviews, but other people have brought up that window functions are more efficient, so I'll add in those solutions as well.

Sorry you feel that way! Thankfully my employer felt differently :)

<comment><USER12> If it runs fast fast enough or the business can wait long enough, slow and ugly is acceptable.

<comment><USER11> That's exactly what I look against on interviews. Slow SQL queries tend to work fine for some time, and as data grows, they start failing.

I'd want to hire a professional, who knows the perfect way of doing that, so for them it would be as easy to make it right, as to make it ugly.

</comment></comment></comment></comment></comment><comment><USER13> I think for a lot of people, SQL is a skill that doesn't stick.

You learn enough to do the queries you need for your project, they work then you forget about them as you work on the rest of your project. These skills are perishable. Left outer join? Yeah, I knew what that was some time ago, but not anymore

The days of dedicated SQL programers are mostly gone.

<comment><USER14> I disagree. I've been programming for over 20 years, and SQL has been one of the only constants used at every job. I'm surprised how many other programmers I run into who are don't know or are even scared of learning SQL. Which is a shame because data will almost always outlive the program(s).

</comment></comment><comment><USER15> I think these are great. But I think there should be some representation around locking / concurrency / deadlock topics. Those tend to be the hardest because you can't clearly recreate the right/wrong answer in a local test environment. Speaking as a person who waited far too long in his career to fully appreciate these topics, I wish I had been pushed to learn them much earlier.

<comment><USER16> I suspect more SQL is written to support analytics than online systems. Locking and concurrency are used in a specific type of application, namely oltp.

I learned how much when I joined a big tech company. The devs don't write sql unless processing logs in the warehouse. But everyone from PM to support to data science and marketing all write sql.

<comment><AUTHOR> To your point, I personally write SQL for analytics and product/business purposes, not system monitoring

</comment></comment></comment><comment><AUTHOR> Hey, HN! Since I couldn't find a good resource online for the self-join and window function SQL questions I've encountered over the years in interviews, I made my own study guide which I'm now sharing publicly as a Quip doc. Would love your feedback or thoughts!

<comment><USER12> For cumulative averages why not use window functions?

<comment><AUTHOR> Good catch -- I can add that in as an alternate solution. Thanks!

<comment><USER12> Of course!

Now the thing to do is for me to recreate your list on github.

<comment><AUTHOR> Yes -- making this a proper webpage with an embedded SQL editor like selectstarsql.com does would be a good next step

<comment><USER12> Are there any good ways to embed SQL in markdown? Like JupyterLab notebooks?

<comment><USER17> Yes, Azure Data Studio allows you to embed SQL in notebooks right out of the box: [https://docs.microsoft.com/en-us/sql/azure-data- studio/noteb...](https://docs.microsoft.com/en-us/sql/azure-data- studio/notebooks-guidance?view=sql-server-ver15)

<comment><USER12> Thanks! I'll have to check that out.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER18> I think SQL is a language to be known by every programmer. With the right query, you may solve a problem that may take 100 lines in other languages.

It is so usefull, reliable and does not change every year.

<comment><USER19> With the extreme popularity of pandas, I think a lot of Python programmers would be amazed how clean and easy-to-read SQL queries look like, compared to the (downright) mess that's being written to query pandas dataframes.

<comment><USER20> Depends on the transformation. Dropping a couple of columns in a wide dataset is extraordinarily ugly in sql vs anything else, for example.

<comment><USER21> ...how is it ugly in SQL? Don't SELECT those columns. Or, if you need to do multiple things with the dataset sans those columns, use a CTE of a query that doesn't SELECT those columns. Or a view.

It seems like SQL is only uglier if you're used to "SELECT *"ing, which is asking for trouble--in SQL or when doing the equivalent with other row/column data manipulation tools.

<comment><USER20> I don't see what the issue is with using something like spark's drop over using select.

</comment></comment></comment></comment></comment><comment><USER22> For the second one, it seems most natural to reach for _exists_ , or something (I have not tried this code..)

      select
        node
        , (case when parent is null then 'Root'
                when exists (
                  select * from tree c
                  where c.parent = node
                ) then 'Inner'
                else 'Leaf'
          end) "label"
      from tree

EDIT: also, in the fourth, it seems like you'd want to _partition_ the window function, who cares about order. Something like

      sum(cash_flow) over (partition by date) "cumulative_cf"

<comment><USER23> A subquery in the from-clause is usually lighter than the select-clause. I just so happen to have a table with this structure and hundreds of thousands of rows. This way runs in half the time. It is surprising, in fact, that the difference isn't wider, because Postgres's explain-command says it costs 1/100 as much.

      select
          t.node,
          case
              when t.parent is null then 'Root'
              when p.parent is null then 'Leaf'
              else 'Inner'
          end as label
      from tree t
          left join (select distinct parent from tree) p on t.node = p.parent

</comment></comment><comment><USER24> Great article. I can't help but feel like SQL is a poor choice for some of this stuff, though. More often than not, I find it much easier to pull the raw data into memory, and use a higher level language to do these sorts of queries. I am all for knowing the intricacies of SQL, as the cost for not can be very high, but I'm curious for your opinion here.

<comment><USER25> For small datasets, pretty much any approach will work. Once you hit hundreds of millions of records (which isn't even that big of a dataset), SQL still performs well on pretty modest hardware.

<comment><USER26> What do you mean by SQL?

In my experience, once you're hitting hundreds of millions of records, implementation details of your database engine will start to matter. A database designed for transactional workloads like Postgres will start to choke on aggregate and window functions, often taking minutes to run instead of milliseconds. A columnar database like Redshift (which exposes a SQL interface) will breeze through it without a sweat.

<comment><USER25> Of course - I was comparing SQL to loading all the data in memory and then using one's programming language of choice to do the hard work. Even a poor schema in a row-based database will outperform what I described after a certain number of records.

</comment></comment></comment></comment><comment><USER27> No questions/examples featuring recursive CTE's? They tend to come up in anything involving queries over trees or graphs. They're also a relatively new feature where having some examples to show how they work may be quite helpful.

<comment><USER28> Took me some time to wrap my head around writing a recursive query. Also had to study the docs a while to get "merge into" to work right, for doing combined insert/update.

</comment></comment><comment><USER29> I flip back and forth between deep diving in (my case) SQL Server skills and .NET Manipulation. In the world I live, it makes the most sense to do set based manipulation in SQL and logical entity based logic in C#. I work in a unique enterprise niche that has about 4 options based one either java or .net. Sql knowledge definitely gives you a leg up for complex reporting, and there are cases where I love being able to debug super quickly when comparing inputs to outputs. However, when I run into a SQL script that is 5000+ lines long and have to debug it, I much prefer the .NET side of the fence. Should someone ever come up with a bridge that gives you .NET level of visibility into the active datasets in a SQL query I would pay them 4 figures without question...

<comment><USER12> 5000 + line SQL scripts????

What would one of these do?

<comment><USER29> Legacy code from Powerbuilder days. But it does things like calculate month over month inventory, Mark to Market value, Risk, or things related to Energy and commodities trading.

</comment></comment></comment><comment><USER30> Very interesting. I never really "got" declarative languages, I remember a very long time ago I was working with Oracle and you could see the "execution plan" for your SQL queries. I kept wondering "why can't I build my queries directly with this?" \- it seems so much simpler to my brain than SQL itself.

<comment><USER31> You can't write query plans directly because you would have to manually take into account a number of factors that the query planner considers for you automatically, such as size of the table, statistics on the distribution of values, whether there are indexes that could be used to speed the query, and so on. Some SQL dialects (like Microsoft's T-SQL) do give you some ability to influence the decisions the query planner makes, though, like forcing it to use specific indexes, or forcing it to use scans or seeks.

<comment><USER32> And then comes Oracle and insists on applying equality filters first, because, duh, they are fast, and never take any of those other details into consideration.

Honestly, Postgres does it right - you can enforce your query plan to any level of detail you want.

<comment><USER33> Does PostgreSQL have plan hints now? I thought they were opposed to them for fear they become unmaintainable and hard to read.

<comment><USER34> If you really want to, the pg_hint_plan extension can be used for this - though I would use it very sparingly, if at all:

[https://pghintplan.osdn.jp/pg_hint_plan.html](https://pghintplan.osdn.jp/pg_hint_plan.html)

(available on some cloud providers as well)

</comment></comment></comment></comment></comment><comment><USER35> I always thought that I suck in SQL but if these are medium to hard then I am not that bad actually.

<comment><USER36> SQL for Smarties is the book that has proven, without a doubt, I am bad at SQL. [https://www.amazon.com/Joe-Celkos-SQL-Smarties- Programming/d...](https://www.amazon.com/Joe-Celkos-SQL-Smarties- Programming/dp/0128007613)

If you want to get undeniably good with SQL, this is the book.

</comment></comment><comment><USER37> One problem with this article is the number of times the solution involves COUNT(DISTINCT).

One of the best SQL interview questions is "Explain what is wrong with DISTINCT and how to work around it".

<comment><USER38> What is wrong with DISTINCT?

<comment><USER39> DISTINCT generally requires the results to be sorted which has O(n^2) worst performance so it can have a big performance hit on a query. It is best to make your database structure such that queries only return distinct data. E.g. by disallowing duplicates

<comment><USER40> If your sorting algorithm degrades to anywhere near O(n^2) in pathological cases, you're doing something wrong. And even if it's just a kind of timeout/operations-limit to detect pathological cases and just run an in-place mergesort instead. Tail latency/containing pathological data is quite important if there's any interactivity.

</comment></comment></comment></comment><comment><USER41> The first few answers are unidiomatic where I work. Analytical functions would be vastly preferable to self joins, especially in the case of the join with an inequality that is proposed to compute running totals, which I assume would have horrible performance on large datasets

</comment><comment><USER42> RDBMS platforms without function indexes means that some of these queries will force a row-by-row execution over your entire table. Enjoy running SELECT ... FROM a INNER JOIN b WHERE DATEPART(a.date, month) = b.whatever on a table with 500 million rows in it.

<comment><USER33> Thankfully even MySQL has them, at least as of version 8

<comment><USER42> Yeah, I'm jealous of all the postgresql and MySQL people. SQL Server doesn't have them and this kind of query would cause pain.

<comment><USER14> As someone who used to use MSSQL extensively and is now forced into MySQL, trust me, do not be jealous of the MySQL people. 5.7 fixed some of the most egregious issues and 8.0 is adding some features, but the smoldering embers of the dumpster fire are still around.

</comment></comment></comment></comment><comment><USER43> I think I'd be able to do all of these in my daily work, probably not as efficiently, with minor references to syntax guides (I don't use window functions often enough).

In an interview, presumably my logic would, hopefully, shine through minor issues of syntax.

Where would that put me? Maybe "okay to decent" when dealing with "medium- hard" questions?

I would fail utterly at DBA management SQL and stored procedures, my responsibilities skew towards data analysis.

<comment><USER44> Yeah, I'd be something similar and also wouldn't consider myself a database expert. I think this question list is tilted towards "can you express this complicated abstract transformation in legal SQL" than the practical day to day considerations of building and working with databases.

</comment></comment><comment><USER45> For me the hardest part of the first question is understanding the acronyms. I think MoM is month on month. But MAU, no idea.

<comment><USER46> I agree, it almost seems they were put there to add artificial noise to the problem. It doesn't seem like you're selecting for the right skills here.

<comment><AUTHOR> Sorry about that -- in real life you would just ask the interviewer what MAU meant if they didn't spell it out.

The purpose was to make the questions more realistic, since at least in my experience in data analyst interviews the questions are asked in the context of actual business or product situations ... like company leaders, PMs, or others wanting to understand trends in MAU.

<comment><USER46> Totally understandable, I think the frustration is more towards companies that try to make the questions a bit more obscure, definitely not your fault.

Thanks for sharing, I found it very insightful.

</comment></comment></comment></comment><comment><USER47> SQL is better than 99% of the nosql alternatives out there.

But one thing it falls apart are these time series data processing tasks.

It's because of its model of unordered sets (or multisets to be more precise, but still undordered). When you look at majority of those queries and other real life queries they always involve the dimension of time. Well - then that means we have a natural order of the data - why not use an array data structure instead of this unordered bag and throw the sort order out of the window.

SQL realized this and bolted window functions on top of the original relational model. But you still feel its inadequacy when trying to do simple things such as (x join x on x.t=x.t-1) or even the infamous asof joins where you do (x join y on x.t <= y.t).

In array databases with implicit time order both examples are a trivial linear zip operation on the the sorted tables.

In traditional set oriented SQL it results in horrible O(n^2) cross join with a filter or in the better case od equijoin in sort merge join which still has to do two expensive sorts on my massive time series tables and then perform the same trivival linear zip that the array processor would do. Which is also completely useless on unbounded streams.

Also many stackoverflow answers suggest to use binary blobs for time series data and process them locally in your favorite programming language - <USER2> points at wrong conceptual model of SQL engines.

Is SQL really so inadequate for real life data problems or have I been living under a rock and Kdb is no longer the only option to do these trivial time oriented tasks?

<comment><USER48> Have you seen TimescaleDB? [https://www.timescale.com/](https://www.timescale.com/)

<comment><USER47> I've seen it.

Most of these 'time series databases' are for processing of structured logs and metrics to be plugged into you favorite system for monitoring site latency.

Asof join is still an open issue in their issue tracker so it is not usable as a time series database.

[https://github.com/timescale/timescaledb/issues/271](https://github.com/timescale/timescaledb/issues/271)

<comment><USER49> If AS OF is a dealbreaker for you, so be it, but I think TimescaleDB is trying hard to be more than a "simple timeseries" aggregator like so many competitors. We're using it to store hundreds of millions of complex IIOT data packets, where a fully normalized packet adds dozens of rows across ~4 tables.

Having it be mostly plain-ol-postgres has been huge for designing and evolving the data model in a way that I'd hate to do without "real" SQL.

<comment><USER47> I'm sure your product is great for many customers in their domains.

The asof and other time based joins are a necessity for just slightly more complicated data processing than just a trivial aggregation at the tail of the stream which is majority of use cases in IOT and real time monitoring.

Without that I can pipe my data to /dev/null giving me even better write performance while also not being able to solve this common financial industry use case.

<comment><USER49> Sorry, didn't mean to imply I work there, I don't; my employer uses Timescale and I designed our schema.

Timescale has been quite performant for us fetching arbitrary past time windows, but I'll stop the cheerleading there as I think mfreed covered the details far better.

I'd certainly still like to see AS OF support!

</comment></comment></comment></comment></comment></comment><comment><USER50> >After an interview in 2017 went poorly — mostly due to me floundering at the more difficult SQL questions they asked me

Could be you dodged a bullet. A company with advanced interview questions may have some ugly SQL code. For jobs that lean heavily on SQL, I expect candidates to know things like windowing & dynamic variables, in SQL & an ORM library. For SWE's, I feel basic SQL is fine.

<comment><USER51> I agree. Using advanced SQL as a hiring signal would be silly in that it just discards a lot of programming candidates for little benefit.

I'd be happy if they knew what EXPLAIN was, since that impacts production on a daily basis.

Also, the OP is basically "fighting the last battle" again. Most interviews don't filter out candidates based on SQL.

Source: DBA.

</comment></comment><comment><USER52> This is neat, but it would be really helpful if these examples included some kind of sample output of what was expected.

<comment><AUTHOR> Some of them have sample output but yes, it would be helpful to extend this to all examples. Good feedback!

</comment></comment><comment><USER53> The problem with hard SQL problems is that they are often one of two camps:

1\. use some underlying implementation detail of the particular RDBMS or proprietary extension to the standard

2\. are essentially tricks, like the typical ridiculous interview problem designed to "make you think outside the box". Yes, you can do almost anything in SQL but often you should not.

I get the perspective here is data analysis where you probably need to know more SQL than the standard developer, but I still feel you should be testing for solid understanding of basics, understanding of the relational algebra concepts being used and awareness of some typical gotchas or bad smells. That's it. They'll be able to google the precise syntax for that tricky by date query when you're not guaranteed to have data for every month or whatever on-demand.

</comment><comment><USER54> A bit off-topic, but this is another one of those sites that show nothing without JS, and looking at the source reveals something a little more amusing than usual: content that's full of nullness.

<comment><USER55> At least they do it with a bit of flair though: the thin blue "loading" bar works without JS!

</comment></comment><comment><USER56> I'd ding the over-use of CTEs, when subselects are often more appropriate and better-performing. Kind of a "every problem a nail" thing going on here.

<comment><USER23> Do you mean subselects in the SELECT clause or in the FROM? Usually subselects in the SELECT clause have been the source of dogslowness. Reorganizing them into the FROM clause sped up queries 1,000 times. And I thought CTEs were just a way of moving subselects from the midst of the FROM clause to the top of the statement, where they're easier to understand.

<comment><USER56> In the FROM clause -- although I understand future versions of pgsql will address this, the "WITH foo AS ... " approach can be horribly wasteful, materializing all the results, whereas "SELECT * FROM ( SELECT f(x) AS a FROM baz ) qq limit 1" lets the optimizer do its thing.

</comment></comment></comment><comment><USER57> Out of curiosity: what is the use case for SQL window functions in application programming? Unlike most SQL, it doesn't seem to reduce the order of the data coming back from the server, nor do anything especially faster than can be done on the client - and has the disadvantage of extra load on the database (which is harder to scale).

Is it only useful for ad hoc/analytical queries, or am I missing something?

<comment><USER58> Why do you think it's not "especially faster" than doing it on the client?

The data is already sorted, partitioned, in memory .. adding a moving average calc or max value per category is certainly faster than fetching the set to disk, recreating it in an intermediate structure and then calculating the new value with all that partitioning, sorting, etc. to be redone client side.

You can certainly use them in app dev for things like:

* figuring out how many things are ahead of you in a queue * snapshotting (what's changed since the last time you were here) * comparing something to some other sample for outliers or inconsistencies

These may be quasi analytical still, but ultimately they can manifest as properties of an object model like any other property to be developed against.

<comment><USER57> I suppose it depends on the language. Normally I'm writing in either Java, C#, Rust or C - and in those I've never found that having the DB run a moving average to be any faster, provided the result comes back in the right order. Indeed, if I need to use another column in the result set, the deserialisation overhead means it's normally slower. For reference I normally write financial time series processing code which is where window functions ostensibly could be quite useful.

However certainly if your app is written in Python or Ruby I can see there being a big difference.

The reason I mention analytics is more to do with the ease of scaling out the DB than the nature of the queries. In busy OLTP databases usually one wants to keep the work off the database because they're difficult and expensive to scale.

</comment></comment></comment><comment><USER59> Off topic but... anyone knows what they used for the rich text editor?

It uses React but I imagine there is some other library like ProseMirror here.

<comment><USER60> It's likely all/mostly custom. Quip is saleforce's Word/Docs competitor. (It's pretty good, tbh.)

<comment><USER59> It rendered that doc pretty fast although editing is not enabled.

I've never used Office online but Google docs is terrible performance wise.

</comment></comment></comment><comment><USER61> This is more like "we want to make sure you can use recursive CTE" questions. To add some variety to medium-"hard" SQL questions you could add some lateral joins, window functions (especially lag if you want to get creative) and compound logic statements in where clauses.

</comment><comment><USER12> For creating a table of dates, what are our thoughts on:

select * from (select adddate('1970-01-01',t4.i _10000 + t3.i_ 1000 + t2.i _100 + t1.i_ 10 + t0.i) selected_date from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4) v where selected_date between '2016-01-01' and now()

This works in MySQL / MariaDB.

<comment><USER62> Oh yeah that's super readable

</comment></comment><comment><USER63> Worth noting that this isn't all ANSI-SQL... e.g. I'm pretty sure WITH is a Postgres thing?

<comment><USER23> The WITH clause, otherwise known as Common Table Expressions, is in ANSI SQL99. Common table expressions are supported by all of the major databases: PostgreSQL, Microsoft, Oracle, MySQL, MariaDB, and SQLite. They are also in certain minor ones, like Teradata, DB2, Firebird, and HyperSQL. Recursive WITH clauses are especially useful.

<comment><USER14> Worth noting that MySQL only got CTE's in 8.0 while something like MSSQL has had them since ~2005. The reason this is important is that something like AWS Aurora only supports up to MySQL 5.7, and thus no CTEs. :/

</comment></comment></comment><comment><USER64> Yup those questions are a stretch for me too! Love that though.

Where are the pivot and unpivot questions?

<comment><AUTHOR> Hmm, haven't seen those a ton at work / in interviews! Would love to see some examples though if you have any.

Mode's SQL tutorial uses SUM(CASE ...) and CROSS JOIN to mimic pivots: [https://mode.com/sql-tutorial/sql-pivot-table/](https://mode.com/sql- tutorial/sql-pivot-table/)

<comment><USER65> I think they're specific to Oracle and SQL Server. It's a pity because they can be very useful.

PostgreSQL can do it via the tablefunc extension and there's `\crosstabview` which is built into psql.

[https://www.postgresql.org/docs/current/tablefunc.html](https://www.postgresql.org/docs/current/tablefunc.html)

[https://www.postgresql.org/docs/12/app-psql.html#APP-PSQL- ME...](https://www.postgresql.org/docs/12/app-psql.html#APP-PSQL-META- COMMANDS-CROSSTABVIEW)

</comment></comment></comment><comment><USER66> some of the problems with SQL, is it was written to solve problems when hardware was expensive. BCF, n all the normal forms etc. when doing analytics you want a flat table that's it. & when working with a flat table for analytics they're other tools better for analysis than sql e.g pandas. or sql like language used by column databases. once you've a flat table, you no longer have to do joins etc.

</comment><comment><USER67> I've done my fair share of complex sql queries and complex data migrations, asking about JOIN during a random interview is unfair unless documentation.

</comment><comment><USER68> It would be helpful to show output result for each.

<comment><AUTHOR> Yep, Ollien made a similar point. Currently some of the questions have expected output but not all.

</comment></comment><comment><USER69> The first solution for MAU has the wrong sign for the percentage change column:

Previous MAU 1000 Current MAU 2000 Percent Change -100

<comment><AUTHOR> Thanks, anonfunction! I've corrected it

</comment></comment><comment><USER70> Every time I see an article such as this it reminds me how much I deeply abhor SQL. It is an ugly language, closer in feel to COBOL than something that can at times approach elegance, like Ruby or Scala. With languages like those, you can loo at your work after you are done and be proud of it beyond its purely functional aspect. SQL never elicits a response beyond "the task is finished and it does what I want", typically with a "finally" in there somewhere.

<comment><USER71> SQL is an abstraction and I wish there was something on top of it supporting loops but that's why we have proper programming languages...

<comment><USER72> Recursive ctl's in Postgres?

<comment><USER73> Recursive CTEs are great for expressing very poorly performing queries. They might give the right answer, but after you've given up waiting.

If you've got tree or graph structures, you're better off denormalizing paths or transitive closures, to reduce the amount of indirection required to answer questions.

</comment></comment></comment></comment><comment><USER74> goood one

</comment><comment><USER75> We've changed the URL from [https://gstudent.quip.com/2gwZArKuWk7W](https://gstudent.quip.com/2gwZArKuWk7W) to what that redirects to.</comment>


Ask HN: RailsRumble, NodeKnockout, What else? - <AUTHOR>

What other recurring 48hr/hackathon style competitions are there out? <comment><USER2> Django Dash is one: <http://djangodash.com/>

and Ludum Dare for Games: <http://www.ludumdare.com/></comment>


Day 1: Where to begin with trading cryptocurrency - <AUTHOR> https://medium.com/@startingwithcrypto/day-1-where-to-begin-with-trading-cryptocurrency-b59117f3f53c <comment><USER2> I think the easiest (and safest!) way to start for a beginner would be to get on Coinbase and just buy some bitcoin. Until you know what you're doing, don't mess with altcoins and exchanges.

<comment><USER3> Step 0) don't invest in things you cannot hope to grasp the fundamentals on based on hype.

<comment><USER4> Is buying a guitar in hopes of learning how to play it an investment? What exactly are the fundamentals? Do I need to understand vibration and frequency? Or just basic music theory?

I agree with your sentiment. But there is a difference between experimentation and investment.

<comment><USER5> You might get better at playing guitar. You are unlikely to get better at currency speculation.

</comment></comment></comment></comment><comment><USER6> Are you experimenting with trading or experimenting with cryptocurrencies - different things.

<comment><AUTHOR> Both I guess, with my limited view on the matter I think cryptocurrencies are at this moment not much without trading.</comment></comment>


A Hacker Has Wiped a Spyware Company's Servers - <AUTHOR> https://motherboard.vice.com/en_us/article/3k7a5k/hacker-wipes-spyware-retina-x-flexispy <comment><USER2> This is one of those cases where I probably should feel bad for the company being repeatedly hacked to the point of being ripe for being shut down, but I just can't muster the will right now.

If you are in the business of collecting data without users' explicit permission, and can't protect that data from being accessed or deleted, you shoudln't be in business.

<comment><USER3> I wish they had done one more thing: notified everyone on whose devices this software was installed. If someone put this on my phone without my knowledge, I would want to know. (I would also almost certainly sue.)

<comment><USER4> Yes. I want to see that happen also. But I want to separate the part of me who wants to see fireworks from the "right thing to do" I think we need to think through the technicalities of notifying the hacked people, would they even know what to do with your email? Would they consider it spam or phishing and just delete it l? Assuming you're successful, what societal fallout could result? I don't know the answers to these questions. Ultimately it's similar to emailing the partners of the users of Ashley Madison and sending the user profiles to them. What's the intended outcome?

<comment><USER2> > What's the intended outcome?

Punitive action against the company who collected the data and lost control of it.

Punitive penalties are typically just a monetary fine above and beyond damages, but exposing just how badly they screwed up to the public at large should provide a good financial penalty in addition to doing a public good (a reminder of how much "private" data is not actually private).

</comment></comment></comment></comment><comment><USER5> They stored the master key to their entire data store in a publicly distributed app?

> ...we have been taking steps to enhance our data security measures. Sharing > details of security measures could only serve to potentially compromise > those efforts.

Maybe they used ROT13 on the API key _twice_ this time!

<comment><USER6> This is a common issue, and many apps do this mistake.

Another common mistake is having /.git/ available on the domain itself, often with PHP sites or backend-less SPAs this is common, giving full access to the source, including those API keys. Even major sites do this – The Hill until recently had their git repo, including API tokens and access keys for everything, publicly available.

<comment><USER7> It should be mentioned that none of that should ever make its way into a Git repo in the first place. If a secret is committed to Git, it's compromised, period. Suck it up and generate a new secret.

<comment><USER8> Agreed ... use a pre-commit hook to scan your repository for high-entropy strings before they are forever enshrined in your history ([https://github.com/dxa4481/truffleHog](https://github.com/dxa4481/truffleHog)).

<comment><USER9> To be fair, though, history can be rewritten, albeit sometimes with some difficulty.

<comment><USER10> If a secret has _ever_ been in Git then you probably can't know where it's been copied to and should treat it as likely to have been leaked.

</comment></comment></comment></comment></comment></comment><comment><USER11> How is this even possible that a 3rd party application can intercept all text messages, call history, and photos and still get published to the Android Play Store? Ins't Google supposed to be reviewing the apps?

<comment><USER12> As a regular Android user, I'll say that Android's permission model is simply awful.

There's no way (in stock) to return blank data, so apps will simply shut down or silently malfunction if you refuse permissions.

The grouping of permissions lumps "can portscan your network" and "run hidden in the background when your phone boots" under "Other", which you can't disable.

J2ME had a more refined security model back in 2006.

<comment><USER8> There are so many applications I'd love to install but ... why do they insist on asking for permissions that they simply don't need for their stated functionality. <sarcasm>Of course you want your SSH terminal to have ties to the social networks</sarcasm>.

<comment><USER9> "I just logged into my server! <Share on FB><Tweet this>"

Yeah, that's frustrating. Mobile app permissions are a gross nightmare.

</comment></comment></comment></comment><comment><USER13> > " Friday morning, after the hacker told us he had deleted much of Retina-X's > data, the company again said it had not been hacked. "

I have to admit that, despite all the seriousness of the actual SPYware this obviously terrible company sells, that one sentence brightened up my normal depressing morning experience of reading the weekday morning news on the Internet. That's just funny.

<comment><USER14> I think this is a great example of the saying "There are two types of companies: those who have been hacked, and those who know they've been hacked"

<comment><USER15> And those who will lie about it no matter what happens.

</comment></comment></comment><comment><USER16> I'm always amazed that people feel the need to utilize these products. People are aware that trust is the bedrock layer of relationships right? The minute someone installs this product, their relationship with the person they are monitoring is already over, they just don't know it yet.

<comment><USER17> I get what you are saying, but there can be legal/financial concerns attached to these things.

<comment><USER16> Monitoring usage of a corporate issue piece of equipment is very different than using it against a private individual without their knowledge

<comment><USER17> My point is that if they can catch a significant other cheating, the divorce settlement equation can change significantly.

</comment></comment></comment></comment><comment><USER18> This is a good case of vigilante justice, but vigilantism is problematic in general. We should probably be formally outlawing the sort of practices these companies have and also putting in place far stronger real privacy measures for _all_ data-collecting companies. Until (if ever) the law catches up, vigilantism will be better than nothing.

<comment><USER19> We already have such laws in the US. Two-party consent wiretapping laws at the state level and the Computer Fraud and Abuse Act at the Federal Level.

<comment><USER18> I don't know exactly the legal details, but over the past several years "privacy policies" have evolved into some sort of "data use policies" (with no privacy to speak of) and the norm is to use terms on apps to basically give companies access to the most invasive and abusive stuff, and we don't see the legal system doing anything to stop this, as long as it isn't directly in medical or legal contexts…

<comment><USER19> Agreeing to surrender your privacy, even when through a clickwrap agreement that is subject to change without notice is very different from installing spyware on someone else's phone.

</comment></comment></comment></comment><comment><USER20> It seems there's an attempt to quell customer discussion via locking such a thread on their forum[0]. A particularly upset customer's remarks[1].

[0] [https://forums.flightsimlabs.com/index.php?/topic/16236-furt...](https://forums.flightsimlabs.com/index.php?/topic/16236-further- information-request-please/)

[1] [https://forums.flightsimlabs.com/index.php?/topic/16236-furt...](https://forums.flightsimlabs.com/index.php?/topic/16236-further- information-request-please/&tab=comments#comment-123979)

<comment><USER21> FYI, you posted your comment on the wrong thread.

<comment><USER20> Oh man, you're absolutely right. Doesn't look like I can delete it, either.

Very sorry, everyone! I had one too many tabs open it seems.

</comment></comment></comment><comment><USER3> Does anyone maintain a list of such software vendors? Not much we can do if they're overseas. But I'm curious about exploring the limits of their liability if they're based in the United States or Europe.

</comment><comment><USER22> I'm torn by a lot of things here. The validity of the claims in the article, the correctness of the hacker to simply delete data, but also the "stalkerware" as described by the article. Surely there's got to be a better way of dealing with this atrocious software? How can it be legal in the first place?

<comment><USER23> The software may not be illegal, but particular uses of the software are. I think[0] I prefer it that way less we go down a slippery slope of deciding what software should be legal vs illegal.

[0] And do please try and convince me if I should think differently about this.

<comment><USER3> > _The software may not be illegal, but particular uses of the software are_

If you profit from selling software that is predominantly used for illegal purposes, or in the course of illegal activities, and you know it; you should be liable. Not put in jail. Not shut down. Just commercially liable.

This is a conservative test (commercial sale, predominantly illegal use, and wilfulness) and a conservative solution. In the long run, however, it balances commercial incentives with broader social ones.

<comment><USER24> We put thieves into prison because if theft were common it would increase distrust, society as a whole has an interest to fight theft, _and_ we permit victims to sue the for restitution. In the same way society has a reason to put strict limits on surveillance.

There's the other problem: what damages can someone with a spy app on their phone ask for? There is no monetery value, they can at most ask for relief, that's not much of an incentive to stop.

<comment><USER3> > _We put thieves in prison...In the same way society has a reason to put > strict limits on surveillance_

On one hand, we have a stylised burglar. On the other, a stylised lockpicking tool maker. The former is illegal; the latter is more complicated.

I am conservative about expanding the scope of the law. You criminalise surveillance apps in one decade and in the next, a security researcher disclosing a bug gets bitten.

> _what damages can someone with a spy app on their phone ask for?_

If someone snooped on my phone without my permission, they would see a lot of confidential client information. They may also see my and my loved ones' protected health information. Finally, they will have sought and procured illicit access to my device, which is itself illegal. Lots of potential monetary damage in there, if only in legal time to ensure everyone who needs to be notified gets notified.

<comment><USER24> We've decided that privacy and freedom from surveillance is highly valued and deserving protection.

The target audience of that company is teenagers of helicopter parents. Whatever they have on their phones isn't privileged or valuable information, so the civil damages approach doesn't work too well. Some may have (against all advice) nudes on them, but I'd rather not wait until those are available to the public, and even then only those whose nudies escaped can sue.

The law needs to project the notion that privacy is valued, because it is highly valued. The only idea that I can come up with is to restrict availability of spyware. Others may have better suggestions.

<comment><USER25> My suggestion is to require spyware like this to put up an obvious indication on the screen of the device that spyware is active on it.

That still allows parents and employees, the supposed target audience, to use the software for its alleged intended purpose, but renders it useless for the illegal use cases.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> > "Retina-X Studios is committed to protecting the privacy of its users..."

That's rich. The 'users' in this case are not necessarily the people with this appalling software installed on their device.

</comment><comment><USER27> Damn PB way to be a thug about it; now this is hacking, not that bs marketing term.

</comment><comment><USER28> Not all heroes wear capes.

</comment><comment><USER29> Righteous

</comment><comment><USER30> I see no reason to praise the hacker. He destroyed a legitimate company's private data for no purpose other than his flawed moral reasoning. The company provides a way for parents to monitor their children and other legitimate business practices. Obviously, the software can be used for nefarious purposes but so can almost any other software. U.S. representatives and senators try to ban encryption using the same exact flawed reasoning.

<comment><USER24> I see a legitimate business opportunity, a phone walking service. You collect the children's phones and take them to the mall, the library or wherever teenagers go these days, and meanwhile the kids can enjoy life without parental surveillance.

You do wonder what the 24-hour panopticon does to adolescents' mental health and to the health of the parent-child relationship.

<comment><USER31> Of course the walkers would have to check the facebook status every 5 minutes and post cupcake pictures to instagram at least once to maintain a credible profile.</comment></comment></comment>


Ask HN: Is it ok to submit your own stuff to HN? - <AUTHOR>

I can't quite work out if it's ok to submit your own stuff to HN or not. I have been submitting my own stuff, but I'm just wondering if this is frowned upon?
For example I was about to post this:
http://justinvincent.com/page/743/dont-confuse-self-worth-with-entrepreneurial-success
But then I wondered is that what got my other jv2222 account banned from the system?
And if it's not ok to submit your own stuff, would it be ok for say... Derek Sivers to submit his own stuff?
All thoughts and advice welcome! <comment><USER2> From the FAQ on "What to Submit":

 _On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity._

Link: <http://ycombinator.com/newsguidelines.html>

\</comment><comment>---

Whenever I spend time and write a blog post that I think is interesting, I'll share it with the community. Sometimes, people think it's a good article and sometimes they don't. Votes decide that.

So, if you think it's an article that is interesting, go ahead and submit it :)

<comment><AUTHOR> Thanks for the clarification :)

</comment></comment><comment><USER3> For me, self submissions are a large part of the reason why Hacker News is interesting. A lot of smart people come here to share their thoughts. Without that we would only have the Times blogs which aren't hard to find in the first place.

I am by no means representative of the Hacker News community, but I would guess that other people would say something similar.

<comment><USER4> Plus when you submit something, you get the feedback of the hivemind, which is usually quite thoughtful.

</comment></comment><comment><USER5> I don't make the rules, but my feeling is that content should be judged based on value, not who posted it.

The last thing I would want to see is a Digg-like divide between content super-sharers and content creators, trying to get their content seen.

I think it's awesome that we have smart people on HN creating good content, and we should embrace that, not mute it by frowning on self-posting.

</comment><comment><USER6> personally i'd prefer the original author posted about it than a 3rd person so it's relevance can be discussed in the comment thread right here.

</comment><comment><USER7> Quite a number of links are self-submitted, and it seems to be well accepted. What isn't accepted is self-submission of link-bait / pointless / off-topic articles, especially when your submission history shows that those types of links are all you submit. That frequently gets called out in the comments, and I'd imagine could lead to banning if it continues.

</comment><comment><AUTHOR> Thanks everyone. That makes me feel much better. I like to think that most of what I write is relevant to HN, and I'm happy for people to judge it on a post by post basis.

Most of what I write doesn't get promoted and I'm happy with that.

As Calacanis says, Jordan missed over 50% of his shots for his entire career!

</comment><comment><USER8> I self submit on occasion, as long as it's relevant and you're not overdoing it, I doubt anyone will really complain.

</comment><comment><USER9> I say submit away. Banning is arbitrary and opaque, I've never heard anyone answer the "why was this killed?" sumissions, so just roll the dice and hope that the censors are in a good mood.</comment>