Night Walk in Marseille [video] - <AUTHOR> https://nightwalk.withgoogle.com/en <comment><USER3> This was great.

I didn't care much for the narration, but perhaps that's because when I travel I prefer to explore things on my own. The captions and videos were helpful though.

I was pleasantly surprised to discover that you didn't have to follow the green track (though you miss out on the pictures and videos). I discovered it by accident, actually. At some point in time I found out that I had become disoriented and had been going backwards for some time. Rather than go through the entire track again, I wanted to see if I could take a shortcut. It works.

You know what would be cool? Incorporating some sort of "Choose Your Own Adventure" elements into something like this. Kind of like Myst, but in real- world settings.

</comment><comment><USER4> I wonder if someday we can get to the point where StreetView is a continuous flow... like instead of tapping the arrow and waiting for the next slide to load, you would just smoothly walk forward or backwards along a track using up/down arrow.

I guess it would be technically possible already, but Google would have to snap their images with much smaller distances, and make them load in much faster... space requirements would be huge lol.

<comment><USER5> Microsoft's PhotoSynth has an impressive demo of this. Check out: [http://photosynth.net/preview/view/31e5927d-af4b-4678-8bba-c...](http://photosynth.net/preview/view/31e5927d-af4b-4678-8bba-c693983b8f2e)

<comment><USER6> It seems like all you can do is play the sequence forward or backward - <USER2> a simple video is much better than this?

</comment></comment></comment><comment><USER7> Most immersive experience I've had on the internet so far, the added videos & interviews absolutely made it.

<comment><USER8> Honestly. This reminds me of the old educational software disks my folks would check out for me at the library back in the late 90's. And I mean that the best way possible!

<comment><USER9> Oh yes, nice memories! Microsoft Encarta had a few of those "walks" and I used it extensively until it was slowly replaced by Wikipedia.

</comment></comment></comment><comment><USER10> Did my own graffiti spotting during this walk: [http://i.imgur.com/JX9uJLn.png](http://i.imgur.com/JX9uJLn.png)

Same guy disappearing into the wall in two different places, I wonder if there is more of him?

<comment><USER11> Someone's thinking with P _0_ rtals. ;).

<comment><USER10> There he goes again: [http://i.imgur.com/VyWbMrR.png](http://i.imgur.com/VyWbMrR.png)

</comment></comment></comment><comment><USER12> A few weeks ago I purchased a Leap Motion Controller: one of those devices that tracks your finger movements and translates them into actions on your laptop screen. I was pretty impressed with the device's accuracy, but I ended up returning it because I didn't see how it had practical applications for my own work. After the initial excitement of moving windows with your hands (pretending you're in a sci-fi movie) fades off, the old-fashioned method of clicking is simply easier and more convenient.

Viewing this "Night Walk" demonstration, I felt an inkling of regret about returning Leap Motion. As others have noted, the experience is very immersive and exciting. The only thing holding it back, in my opinion, is the medium of mouse and keyboard. I wanted to move fluidly through Marseille instead of incrementally, through clicking and jerky motions of the mouse. If this kind of 3D / WebGL / geospatial content becomes more prevalent on the web, I can see a stronger practical use case for everyone owning Leap, or something like it.

<comment><USER13> I think for this use case the Oculus with it's head tracking would be a better fit, because when you walk in a city you don't really use your hands like you do with the LeapMotion.

</comment></comment><comment><USER14> > Ah snap. The Night Walk experience is not optimised for your device or > operating system.

Great. Please don't tell me what's wrong with my browser or os.

<comment><USER15> it's probably over a year old .... or not running webGL

<comment><USER14> Sorry but I don't want to play the guessing game with random commenter any more than I want to with Google.

(The browser is latest firefox/iceweasel on Debian testing)

</comment></comment></comment><comment><USER16> A camera taking lurching steps through the Marseilles nightlife? Meh, it's been done. ;) [https://www.youtube.com/watch?v=vuOecH5NoXs](https://www.youtube.com/watch?v=vuOecH5NoXs)

<comment><USER17> More like [https://www.youtube.com/watch?v=guM99-MqLtI](https://www.youtube.com/watch?v=guM99-MqLtI) am I right. And that's immersive as well.

<comment><USER18> It's true that Belsunce is at 5 minutes of walk from the Cours Julien and La Plaine where the night walk takes place.

This track is amazing. Not lyrics wise: neither the text nor rhymes nor the flow are especially good. Considering that it is a rap song these could be severe drawbacks. But the instrumental is so effective the track is globally awesome.

 _D 'où j'sors ? D'une ronde. Belsunce breakdown._

</comment></comment></comment><comment><USER19> Sweet, it's great to see his hometown in a post on HN :)

<comment><USER18> Héhé same here! Aïoli !

</comment></comment><comment><USER20> I think it is broken in Chrome on Linux.. unless it is supposed to be a series of stretched out looking pictures taking up a small portion of the screen that spin around on their central axis and flip upside-down when you drag your mouse, and you can only navigate with keyboard arrows..

<comment><USER21> I'm using in in Chrome version 33.0.1750.152 on Ubuntu 14.04 Linux with no apparent problems.

</comment></comment><comment><USER22> Does anyone know what team(s) are responsible for these kinds of projects at Google?

<comment><AUTHOR> Would love to know this as well!

</comment></comment><comment><USER23> Page seems non-functional, wants me to plug in headphones? Chromium Version 33.0.1750.152, linux box.

Edit: reloading made it work.

<comment><USER24> That seems to be the "loading indicator". I was confused for a second, then it just faded away. I don't think there's a browser API to actually know wether the user has headphones plugged in or not.

</comment></comment><comment><USER25> Anyone know what this is and why it's blurred out? [http://imgur.com/yi0sCEC](http://imgur.com/yi0sCEC)

Also, videos are not playing right for me on firefox (audio only).

<comment><USER26> Maybe it was recognized by Google's algorithms as numbers, or something.

House street numbers and car plates are blurred on Street View in France, and often some small squares with text are also blurred by error.

</comment></comment><comment><USER27> Cool! Very immersive and this is coming from an oculus rift owner.

I was thinking the next step up from this would be to setup 360 degree cameras every 10 or so feet along this path and have them all record for say an hour. Then you could 'walk' from point to point and see/hear/track the city.

But I actually think this curated approach is much better as it helps you cut out the noise and tell a better story.

</comment><comment><USER18> This is awesome even if you know the place pretty well, and the sounds and music totally enhance the experience! Thanks for sharing.

</comment><comment><USER28> This is pretty cool.

Neal Stephenson's "Command Line" comes to mind, where he talks about how experiences are distilled and summarized for an end user. I have a vague negative feeling toward this, but I can present no argument.

<comment><USER29> This is the Web version of walking around a museum with an audio guide around your neck.

</comment></comment><comment><USER30> Totally engrossing.

<comment><USER31> Agreed. The audio alone was enough to immerse me. Right now it is in a background tab and I change the location every few minutes to change the sound!

</comment></comment><comment><USER32> Please hook this (and Street View) up to [https://github.com/richtr/threeVR](https://github.com/richtr/threeVR).

How it works: [http://dev.opera.com/articles/view/w3c-device-orientation- us...](http://dev.opera.com/articles/view/w3c-device-orientation-usage/)

Live demo: [http://richtr.github.io/threeVR/examples/vr_basic.html](http://richtr.github.io/threeVR/examples/vr_basic.html)

</comment><comment><USER33> "Ah snap. The Night Walk experience is not optimised for your device or operating system."

No night walk if you're not in the googleverse.

<comment><USER34> Works in Firefox.

<comment><USER33> Not on mine. 24.4.0 @ Linux x86_64

</comment></comment></comment><comment><USER16> "Your headphones will give you the best experience." I'm wearing my headphones, thanks Google. Can I watch this now?

<comment><USER35> Happened to me at first too. Refreshing the page worked. Not sure if that's an intentional pause or not.

<comment><USER34> I think it's loading. My wifi LED was flashing furiously while that message appeared.

</comment></comment></comment><comment><USER36> This is a taste of augmented reality. I like it. I'm left a bit unsatisfied though. I want to experience the real thing now.

</comment><comment><USER37> Anybody can point to anything else "interesting" in the presentation than the "graffiti" and the technical side of making a lot of 360 deg night-shot panoramas with sound?

And is there a possibility to make the link to some particular spot?

(I can't imagine graffiti interesting to those who aren't themselves doing them. It's subjective, I know, and I respect that others have other views, I've heard about Banksy etc).

</comment><comment><USER38> Nice implementation.

Marseille has a severe graffiti problem, doesn't it? Mais c'est dégueulasse!

<comment><USER18> Why would this be a problem? This district of Marseille is really nice, and graffitis contribute to the overall atmosphere.

</comment></comment><comment><USER39> can anyone give me ideas\links on what HW & SW I would need to make something like this? Would love to make an adventure game with this concept! Cheers!

</comment><comment><USER40> This is the type of thing that Google Glass was made for.

</comment><comment><USER41> Would love to try this out in VR!

</comment><comment><USER42> loved this, hope for more

</comment><comment><USER29> Very engrossing.</comment>


VICAR (Video Image Communication and Retrieval) Open Source - <AUTHOR> http://www-mipl.jpl.nasa.gov/vicar_open.html <comment><USER2> This is the system developed by JPL for what later became known as image processing, and is still used for many planetary missions.

"We believe, but cannot prove, that this makes VICAR the oldest continuously used image processing system in the world."</comment>


Amazon tech workers file complaints to Washington state over lack of restrooms - <AUTHOR> http://www.geekwire.com/2015/amazon-employees-biggest-complaint-not-enough-mens-bathrooms-for-all-the-dudes/ <comment> enahs-sf This can be a pretty serious problem. I used to work at a company that had 2 bathroom stalls for men and approximately 100 male employees all who went to lunch around the same time and drank copious amounts of coffee. Let's just say there were a lot of issues with "bandwidth" when it came to using a toilet. People were going to other floors, using the subway bathroom, all sorts of wild things.

</comment><comment><USER2> Does Jeff have a restroom in his office suite?</comment>


Apple in bidding war to acquire Toshiba's storage business - <AUTHOR> https://9to5mac.com/2017/04/02/apple-toshiba-nand/ <comment><USER2> First news that Apple is developing its own GPU, now they're trying to buy a NAND memory business. At least they're investing some of that huge cash hoard.

What's missing? The biggest thing seems to be displays.</comment>


Parallel In-Place Merge Sort - <AUTHOR> http://www.drdobbs.com/parallel/parallel-in-place-merge-sort/240169094 <comment><USER2> It's really silly that they depend on the STL implementations, because I don't believe STL implementations actually implement in-place merges in-place. The actual problem of stable in-place merge is extremely hard, so I was really surprised it would show up in a Dr. Dobbs article.

<comment><USER3> A stable in-place merge sort is actually reasonably easy to implement if you happen to be using a linked list - [http://www.chiark.greenend.org.uk/~sgtatham/algorithms/lists...](http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html)

I think it's interesting how choice of data structure affects algorithm characteristics.

<comment><USER4> Using a linked list is effectively equivalent to doing things not in place. Except that the memory locality is worse and for word-sized data like integers and floats, the overhead is permanent 3x instead of just temporary 2x. But yes, for linked lists, merge sort is a great choice since it doesn't depend on O(1) indexing.

<comment><USER2> Yeah, exactly. For those who didn't catch it: linked lists already have O(log n) overhead, because distinguishing between n items requires log n bits for the pointer. They're fundamentally not in-place.

<comment><USER3> Hmm, I was thinking 'in-place' in the context of 'no extra memory needed'. Is this not correct?

For sure, if it doesn't make sense to use a linked list in the first place then linked list merge sort definitely doesn't make sense...

<comment><USER2> It's not that it's incorrect, it's that it's pointless. The entire point of a linked list is that you don't move around the data, you just re-link nodes. So any sane algorithm that works on linked lists is already "in-place" by default; an out-of-place merge on a linked list would be pure madness. So saying that an in-place merge can be performed on a data structure that already has some overhead and which _already_ performs everything in place is not a very insightful or useful observation.

<comment><USER3> > an out-of-place merge on a linked list would be pure madness

Absolutely. I'm not even sure how you would do such a thing.

I personally have found it interesting when considering the difference between an array of pointers and a linked list, simply because they both have the same overhead but one doesn't require allocating any more memory for a merge sort.

I basically agree with what you say (maybe bar it not being useful knowledge) but I don't think it's worth continuing trying to clarify my initial statement.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> Anyone have any quick comparisons of this to Batcher's sorting method? Quickly consulting wikipedia, I see that those have gained traction in the GPGU community. I was curious if/when those techniques would start to get use.

</comment><comment><USER6> While the approximately 10x increase of the parallel in-place merge sort over the non-parallel version shown on the benchmarks may be meaningful, it also shows that parallelism reduces constant factors, not exponents.

<comment><USER7> It is impossible to get anything better than a constant improvement, if you divide you work by a constant factor.

<comment><USER6> Not discussing that is a weakness of the article. The algorithm addresses performance issues caused by the IO bottleneck, not an algorithmic deficiency with common merge-sort implementations.

The merits and deficits of trading-off O(n)[Memory] growth for 0(log n)^2[Time] growth are worthy of discussion if it is anticipated that people will implement the algorithm in production code. There's a case for looking at it, certainly, on constrained systems, but such systems may not have processors with the execution pipeline sophistication of an Intel i7 quad- core.

Which of course is just a round about way of saying, the article doesn't indicate domains in which the algorithm may be relevant and not relevant.

</comment></comment></comment><comment><USER8> similar to java8 feature, fork and join</comment>


Ask HN: Outsourcing credit card data storage? - <AUTHOR>

I'm currently developing a complex recurring payment system. Our payment gateway does not offer a "secure vault" service, and we will need to charge customers a variable amount each month. Therefore we will need to store customers' credit card details.
However, ideally I would like to avoid having to be compliant with PCI level D, so I'd like to find a company which:
* Will allow us to securely store customers' credit card details on their PCI-compliant servers.
* Allow us to retrieve one or all of the stored card details via their API at any time, so we can submit new payments using them.
I'm pretty new in the world of payment processing. Is there a company offering this kind of service?
(NB: I'm not looking for a full billing service like Spreedly or Chargify. I just want secure storage for credit card details, nothing more.) <comment><USER2> If it isn't too late to select a payment gateway that supports a secure vault, perhaps Recurly.com would fit your needs? Personally, I don't know of any services that provide only the vault without the gateway or billing logic attached.

Plus, if a service had an API to transmit customer credit card data to your server so you could forward it to the payment gateway for processing, I don't see how that adds much security over encrypting and storing them on your own server (yes, I know this is a bad idea). A malicious individual with access to your server could still compromise your customer data.</comment>


College freshmen create Song Drop – an easy and free way to discover new music - <AUTHOR> http://songdrop.me

<comment><USER2> I find it interesting that to get music they are looking for "DJ or Producer". Whatever happened to musician?

</comment><comment><USER3> This website is so easy to use and it's free, legal music... I see it going places

<comment><USER4> No need to create new accounts to praise yourself. (both accounts created 8 hours ago, I doubt it's a coincidence)

<comment><USER3> I'm actually the kid's friend so how about doing something with your time other than looking for something to bitch about on the Internet

<comment><USER4> You're right. I did a minute research and see you're just doing your friend a favor. I should have checked before I posted my comment. I don't seem to be able to delete that comment. Sorry about that I should have kept my (virtual) mouth shut.</comment></comment></comment></comment>


Joist lays off 60 employees as company relocates to San Francisco - <AUTHOR> http://betakit.com/joist-lays-off-60-employees-as-company-relocates-to-san-francisco/ <comment><USER2> Yeah there were actually closer to 80 layed off. As well the quote about 95 of their customers are in the US is false. A very small percentage of the joist market place actually is in US. The initial expansion into san jose was closed down recently because there were not enough leads.</comment>


Ask HN: Basic income and digital currencies ? - <AUTHOR>

Bitcoin is a scarcity-based currency, it's kind of a deflationary spiral, people save and don't spend their bitcoins...
So, why not a digital currency implementing this trending idea of a basic income for all ? For example, registered users could receive a monthly income they could spend on the network.
http://en.wikipedia.org/wiki/Basic_income
I don't know if it's a bad idea (I guess so), but I just wanted to share/ask. <comment><USER2> This is an excellent idea. This could instantly create the kind of huge network effects that would surpass a lot of other mediums of exchange.

Something similar is being done by Auroracoin ([http://www.auroracoin.org/](http://www.auroracoin.org/)) in Iceland:

"Auroracoin is a cryptocurrency for Iceland. It is based on litecoin and is 50% premined. The premined coins will be distributed to the entire population of Iceland, commencing on midnight 25th of March 2014."

Adding a recurring revenue stream built into the protocol would be interesting.</comment>


Chinese app aims to translate what your cat is trying to tell you - <AUTHOR> http://getmaoapp.cn/en/

<comment><USER3> Step 1: Create landing page with call to action to measure interest

Step 2: Post on hacker news

<comment><USER4> To be fair, if I had to guess, I think the measurement of interest is for American translation of said app already in development (or developed) by some Chinese devs. If anything I'm kinda impressed at the production quality; can't seem to find anything about the developers though.

As a person with some experience with mocap data analysis, the ad copy is mildly furiating (<http://getmaoapp.cn/en/how-it-works/>). But I suppose they do what they gotta do to impress the clientele.

</comment></comment><comment><USER5> I swear my cat gets frustrated sometimes when she's repeatedly trying to tell me something and I keep guessing the wrong thing (or worse, ignoring her) - <USER2> much so that she sometimes hits me... However, I believe that any human will probably effortlessly outperform a mobile app at cat translation for the foreseeable future.

<comment> T-hawk Maybe, maybe not. A computer could pick up subtle shifts in body positions or vocal tone and pace that a human can't. Like the work to visualize a heartbeat and other bodily functions, by magnifying deltas that are too small for the human eye to detect. <http://people.csail.mit.edu/mrub/vidmag/> Something like that could certainly conceivably work for cat body language and voices.

<comment><USER5> It would indeed be interesting to see some info on systems trying to accomplish this. I would argue that the cat owner gets better data in the first place because they are physically present, while a mobile app has to reconstruct a lot from video input.

Then there is the problem of interpreting the intent of the cat itself. I would say there are a few different modes of communication with varying degrees of obviousness.

First, the app would probably be good to determine basic mood, such as fear or joy. But then again, any human could do that just as well. More nuanced communications of mood and intent can vary from cat to cat, giving the owner- human the edge here as well. I don't need an app to tell me that my cat feels 57% optimistic about her day, 32% playful, and wants more social contact with a 75% probability. As a family member, I can also use other heuristics that an app can't, for example I can factor in what happened yesterday, or other specific data that is hard to generalize programmatically.

The other category would be purposeful coordination with the human. In this, the cat explicitly addresses a human with the intent to communicate. This is probably where the most misunderstandings happen, and hence the best opportunity for the app to shine. As a lifelong "cat observer" I'm pretty good at reading a lot of the cues instinctively, but these too vary a lot from cat to cat. Usually the cat also tries to _show_ what the problem is. For example, she literally walks me over to the door, or to the place where food is stored, or to where a toy is kept, or to a dirty litter box if I forgot to clean it. My cat also regularly points out other things that are clearly my fault, such as rain or the wrong food flavor. Once again, this is not hard to recognize.

In general I think this is a fascinating area, not because it's about cats, but because of the implications of communicating with minds that are not human.

</comment></comment></comment><comment><USER6> I'll put it alongside the dolphin translator so they can have a chat: <https://news.ycombinator.com/item?id=2665653>

</comment><comment><USER7> Although the style of this website is sufficiently 'Western' that these people are probably trustworthy, I would recommend some caution when it comes to signing up for their mailing list. My experience is that Chinese companies—even the ones you might think are respectable—don't know the meaning of the word 'unsubscribe'.

</comment><comment><USER8> echo "feed me"

Done

<comment> D-Coder Oh come on. Cats are _far_ more complicated than that.

"Feed me."

"Feed me NOW DAMMIT."

"Pet me."

"Clean the fricken sandbox."

"Make a lap for me."

"Go the hell away."

See?

</comment></comment><comment><USER9> Good. Now I can finally decode what the fuss about the shoebox is all about.

</comment><comment><USER10> There seems to be no "Contact Us" link but if the creators of the site read this, there is no such language as "Hindu". I think you mean "Hindi".

</comment><comment><USER11> I can't wait to try this out on my cats. It really is something I need.

</comment><comment><USER12> I wish somebody made something like that but for dogs ...

</comment><comment><USER13> If Google couldn't do it, Chinese developers will :)

</comment><comment><USER14> This is absolutely bonkers! 1 Million dollars!

</comment><comment><USER15> Can't wait for the dog version.

</comment><comment><USER16> Timmy fell in the well? :/

</comment><comment><USER17> i can already predict loads of Vine cat movies ;)

</comment><comment><USER18> Very nice!

</comment><comment><USER19> Brillant

</comment><comment><USER20> I can has cheazeburgers?

</comment><comment><USER21> lol, this is funny, I like it =)</comment>


The New iTunes Mini Player - <AUTHOR> http://chasingperfection.co.uk/post/2013/5/21/the-new-itunes-mini-player

<comment><USER2> Excellent catch, as I've given up on using the mini player and would have gone a long time without seeing the change had it not been pointed out.

</comment><comment><USER3> I wouldn't have known it could look like that if I hadn't read this post.

It reminds me a bit of Muine[1], which was my favorite player on Linux for a while.

[1] <http://en.wikipedia.org/wiki/Muine>

</comment><comment><USER4> I'm just glad they brought back volume control on the mini player. I use the mini player all the time at work, and the inability to set iTunes volume independently of other sound generators on my computer was really annoying. The album art thing I didn't notice because only about 20% of my music had album art.</comment>


Google's Discontinued Services - <AUTHOR> http://googlesystem.blogspot.com/2006/12/googles-discontinued-services.html

<comment><USER2> This is an obsolete article.

Google voice search is available on the iPhone.

Google keyboard shortcuts are available through google labs after signing in.</comment>


BugLab builds incentivized white-hat-hacker/pentester community on Ethereum - <AUTHOR> https://blog.buglab.io/protect-your-small-to-medium-sized-business-with-help-from-buglab-d65d64b8666 <comment><USER2> Really interesting concept! I like the idea of hosting a challenging contest for cybersecurity researchers, seems like the best way to actually ensure you won't get hacked!

</comment><comment><USER3> it's a very innovative concept that will take IT security to another level</comment>


Null Pointer Dereferencing Causes Undefined Behavior - <AUTHOR> https://software.intel.com/en-us/blogs/2015/04/20/null-pointer-dereferencing-causes-undefined-behavior

<comment><USER3> The standard offsetof macro is sometimes defined as:

        #define offsetof(st, m) ((size_t)(&((st *)0)->m))

That expression has undefined behavior, since it dereferences a null pointer. That doesn't mean it's an invalid definition of offsetof _for a given implementation_.

Saying that it has "undefined behavior" means that the C language standard says nothing about how it behaves. If its behavior _for the current compiler_ happens to satisfy the language requirements for offsetof, then it's a legitimate implementation. Code that implements the standard library is free to do whatever it likes, as long as the resulting behavior is correct.

Part of the problem, I think, is the way the question is phrased. Quoting the linked article:

> The programmers' community divided into two camps. The first claimed with > confidence that it wasn't legal while the others were as sure saying that it > was.

The word "legal" doesn't even occur in the C standard. Some program constructs violate constraints or syntax rules; any such violation requires a compile- time diagnostic (which may be a non-fatal error). Other constructs have "undefined behavior"; the standard places _no_ restrictions on what compilers can do for such constructs. Only a `#error` directive actually requires a program to be rejected.

<comment><USER4> > the standard places _no_ restrictions on what compilers can do for such > constructs.

But it does list some suggestions on what could happen, one of which is "behaving during translation or program execution in a documented manner characteristic of the environment", which is what most C programmers expect of the language. Violating this implicit assumption is what makes compilers user- hostile; choosing the worst possible behaviour, just because the standard does not define it, is never the right thing to do.

Related reading:

[http://blog.metaobject.com/2014/04/cc- osmartass.html](http://blog.metaobject.com/2014/04/cc-osmartass.html)

[http://thetrendythings.com/read/7057](http://thetrendythings.com/read/7057)

[http://blog.regehr.org/archives/1180](http://blog.regehr.org/archives/1180)

<comment><USER3> That suggestion is pretty vague; the only way a compiler could violate it is by not documenting its behavior. The behavior itself can still be completely arbitrary.

<comment><USER5> Well, before the first ANSI standard, ALL behavior was "undefined", and yet we got many working compilers and tons of working code.

<comment><USER3> Before the first ANSI standard, we had the C Reference Manual in the back of K&R1. The definition was merely less rigorous (and that lack of rigor often led to complex nests of "#ifdef"s). If a compiler generated code that evaluated 2 + 2 and yielded a result of 5, we could confidently say that compiler had a bug.

</comment></comment></comment></comment></comment><comment><USER6> This is ridiculous. The C standard was apparently written in order to allow compilers to introduce subtle security holes into previously-working code, all in the name of a fraction of a percent of performance increase. It's totally irrational, especially in an epoch where C is no longer the language you'd use to get maximum bit-twiddling performance anyway — because it won't run on your GPU!

See [http://blog.regehr.org/archives/761](http://blog.regehr.org/archives/761) for a sarcastic take on the problem, [http://blog.regehr.org/archives/880](http://blog.regehr.org/archives/880) for a more serious description of the problem, and [http://blog.regehr.org/archives/1180](http://blog.regehr.org/archives/1180) for the "Proposal for a Friendly Dialect of C" that proposes to actually solve it.

<comment><USER7> > The C standard was apparently written in order to allow compilers to > introduce subtle security holes into previously-working code, all in the > name of a fraction of a percent of performance increase.

Yes it was. Or at least, that's the constituency C currently has - <USER2> understandably C continues to serve it. There needs to be a language for that kind of people, and that language is C.

If you don't want that, _stop using C_. It's not hard.

<comment><USER5> I've been using C since before there even was a standard. Why should I ditch the language because <deleted> have hijacked the language spec?

<comment><USER7> Because they're the ones who the language is valuable to. You have plenty of other options; they don't.

<comment><USER5> For the sorts of semantics they are looking for, FORTRAN seems to be a good option. Or keep the crazy in C++ land?

What are my options if I want a simple, easy to understand language that is close to the execution model of current machines?

</comment></comment></comment></comment></comment><comment><USER8> This article highlights yet more "gotcha" optimizations that, IMHO, do more harm than good. There is no reason that any compiler _must_ miscompile &x->y, where x == NULL. What's undefined in C can be well-defined in POSIX or in the documentation of a specific build environment. It would behoove higher-level standards to make this construct well-defined even if C itself doesn't.

<comment><USER9> Being able to assume that a pointer is not null opens up some really interesting optimizations. For example, if you know that a pointer is dereferenceable, then you can speculatively hoist loads of it out of a loop as long as there are no possibly-aliasable pointer stores in between. That's why it's helpful for C compilers to be able to aggressively infer that pointers are not null.

<comment><USER10> Just wondering: how much do these particular optimizations end up being worth in the end? Is it something noticeable or is it like array bounds checking where its almost always OK to leave the checks in the end?

<comment><USER11> It's impossible to give a general answer. You could have a tight loop in a performance critical part of your code, where optimising out the NULL check removes (say) 25% of the loop code. Or, the check might be negligible. It depends upon the code.

That's why IMO people saying that the compiler shouldn't bother with these 'excessive' optimisations are wrong. It might be worthless for them and their programs, but might be valuable for others. Don't force your priorities upon other people.

<comment><USER9> Yes. I'd also add that loop optimizations tend to magnify in importance when you consider that the loop might be vectorized. Especially since the state of scatter/gather SIMD intrinsics is so poor at the moment...

</comment></comment></comment></comment></comment><comment><USER12> I'm sure he's right, but I'm not so sure he actually proved it. The real question is what happens when you deference a null pointer with '->'. He doesn't show us what the spec says on that, meaning there's a gap in his logic, leaving the quoted sentence in bold unsupported. I don't know but would bet that bolded sentence isn't even necessary. The undefinedness probably comes from the silence of the spec on what happens when you dereference a null pointer with '->'.

As he showed, a null pointer cannot point to any object, and since a lvalue that does not designate an object gives undefined behavior, saying '* podhd' would clearly give undefined behavior when 'podhd' is a null pointer.

However, instead of '* podhd' evaluating to a non-existant object, we have 'podhd->line6' asking for the object some particular offset from a non- existant object. It's entirely possible that a sufficiently insane spec might actually define such an operation.

What the spec says on that point is the key. That's where the undefinedness must come from, but he doesn't talk about it or quote from the spec on '->'. He just assumes it, which leaves his original point unproven, even if it is correct.

So why would anybody want to define legal behavior for dereferencing a null pointer with '->'? Well, some people start college funds for children who have yet to be conceived. If non-existant people can have account balances, why can't non-existant objects have properties? It's crazy, but it's not crazy like Intecal, where syntax errors are legal statements that you actually use for productive purposes. [http://catb.org/~esr/intercal/ick.htm#Syntax- Error](http://catb.org/~esr/intercal/ick.htm#Syntax-Error) See also the statement "COME FROM".

<comment><USER13> > As he showed, a null pointer cannot point to any object

From my reading, he didn't even show that:

>> _If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function._

So a null pointer could point to an object, it just wouldn't compare equal to any pointer, even itself.

<comment><USER14> Null pointers comparing equal to null pointers is kind of important though.

</comment></comment></comment><comment><USER15> The problem comes from the assumption that NULL is the same as zero. Even the author makes that assumption, when he gives an example that explicitly uses zero and then talks about it as if it had used NULL. In fact, the two have never been the same. I've worked on machines that represented NULL with a different value/bitpattern, and yes, it smoked out a lot of these bad assumptions. NULL can never point to valid memory, by language definition. An explicit zero can, from a language standpoint, even if the runtime/OS might disagree. ;) Thus, uses like that in offsetof are quite valid.

<comment><USER9> But NULL must, broadly speaking, be the same as zero.

C standard 184.108.40.206: "An integral constant expression with the value 0, or such an expression cast to type void * , is called a null pointer constant."

C standard 4.1.5: "The macros are... NULL, which expands to an implementation- defined null pointer constant."

See [1] for more info.

[1]: [http://stackoverflow.com/questions/2599207/can-a- conforming-...](http://stackoverflow.com/questions/2599207/can-a-conforming-c- implementation-define-null-to-be-something-wacky)

<comment><USER15> Casting zero to a pointer yields a null pointer. That doesn't preclude other- valued null pointers, or ensure that a cast the other way will yield zero. That's where the "undefined" part comes from.

<comment><USER3> Casting a _constant_ zero to a pointer type yields a null pointer. The conversion is done at compile time, so the compiler knows that a null pointer is the required result.

There is no requirement for an integer-to-pointer conversion to retain the bit pattern of the integer value, any more than an integer-to-floating-point conversion is required to do so.

In most modern implementations, conversions among integer and pointer types of the same size are trivial, simply reinterpreting the bits as a value of a different type.

A conforming C or C++ compiler can use, for example, the bit pattern 0xFFFFFFFF to represent a null pointer. Converting a constant 0 to a pointer type would yield a pointer with the representation 0xFFFFFFFF. Converting a non-constant 0 to a pointer type does not necessarily yield a null pointer; the result is implementation-defined, and may be indeterminate garbage.

</comment></comment></comment></comment><comment><USER16> I find this entire debate absurd. Pragmatic approach would be to refrain from using construct that are known to be controversial. By controversial I mean "there are reasons to believe that under certain conditions this may be dangerous, even though most people agree on what reasonable behavior is in this case". Don't write code that can bite you. The "struct foo *bar = &baz->qux;" is not your child. Kill it by refactoring it into something that's known to be obviously correct.

<comment><USER17> Refactoring for the sake of C pedantry rather than legitimate portability concerns is not a _pragmatic_ approach.

If this code were a part of some abstract "spherical horse in vacuum" project that may potentially build on esoteric platforms using random C compilers, then, yes, it might be worth re-factoring. In the context of Linux kernel project given the toolchain used the code is perfectly fine as is.

The debate is silly though, can't argue with that.

<comment><USER16> Linux kernel has official support for over 20 different ISAs. Some of the cores supported are pretty esoteric: BlackFin, SuperH, Etrax. Most of the problems with optimizing compilers - around UBs and others - come from architecture-specific optimizations. Problem discussed here is not abstract - people writing kernel code encounter these issues from time to time. I did, my friends did, we will be bitten by UBs in the future.

Code my team is working on at the moment was written for a completely different architecture than it is run on right now. Sudden platform shifts happen, like when tsunami affected Renesas' ability to manufacture chips used in automotive. It IS pragmatic to avoid code that can potentially introduce problems in the future. Perhaps not for every piece of software, but low level one? Definitely.

</comment></comment></comment><comment><USER18> If you want to read more than can handle about undefined behavior in C, check out John Regehr's blog ([http://blog.regehr.org/](http://blog.regehr.org/)) and academic papers ([http://www.cs.utah.edu/~regehr/papers/](http://www.cs.utah.edu/~regehr/papers/)). He also posts here on HN.

</comment><comment><USER19> Ah, the wonders of C, where the obvious solution to "we can't guarantee <x> because it may cause problems on weird hardware" is "let's cause problems on mainstream hardware instead".

</comment><comment><USER20> Of course it's undefined behavior. It's also a famous issue with GCC optimization.

This is another reason I look forward to the day when C is a legacy language.

<comment><USER21> As it stands now, C might outlive most, if not everyone in this thread. :-)

Although, I don't mind C. I work in it every day and I've comfortable with it. A colleague of mine (who works primarily in Python) teased me it's because I have developed a Stockholm syndrome.

</comment></comment><comment><USER22> The author may be correct, which is of course the best kind of correct. Yet I have written code for more than 25 years that depends on the behavior exemplified in the `offsetof()` macro referenced there. When writing low-level code it's really handy to know the offset of a member in a struct.

<comment><USER23> Your compiler probably has a built-in method to achieve the equivalent of offsetof without invoking undefined behavior.

GCC has __builtin_offsetof: [https://gcc.gnu.org/onlinedocs/gcc/Offsetof.html](https://gcc.gnu.org/onlinedocs/gcc/Offsetof.html)

<comment><USER24> offsetof is part of C89 stddef.h, why would you call the underlying GCC- specific __builtin_offsetof? Just call offsetof that's what it's here for, __builtin_offsetof is the GCC implementation detail.

</comment></comment></comment><comment><USER25> I don't get it, there is no actual dereferencing going on here, It is just basic addition arithmetic between two values, one of them happens to be 0. Why It is illegal or "The program running well is pure luck"?

<comment><USER26> The C standard does not specify the representation of null pointers, nor does it allow arithmetics with invalid pointers.

Eg the conversion (void *)0 might result in a value with all bits set and member access will overflow.

Another example would be hardware that raises a signal when encountering an invalid value during address calculations.

In practice, the address calculation will work as expected (ie I'm unaware of machines where it doesn't). However, an aggressively optimizing compiler migh treat an expression like foo->bar as assert(foo != NULL), which might lead to unintended consequences in worst-case scenarios.

<comment><USER24> > However, an aggressively optimizing compiler migh treat an expression like > foo->bar as assert(foo != NULL)

In fact most modern optimising compilers do exactly that, and the article does refer to such a behaviour having had security implications in the past.

</comment></comment></comment><comment><USER27> This is to be taken with a grain of salt.

      sizeof(&P->m_foo)

does NOT return the size of `m_foo` but the size of a pointer to an `m_foo` on the target architecture.

</comment><comment><USER28> The post hinges on the faulty assumption that calculating the address of an lvalue "evaluates" that lvalue. This is not so.

Any compiler that generates anything other than an add instruction (or lea or similar) is broken, for rather unsubtle reasons.

Or to put it another way: dereferencing a null pointer may be undefined, but arithmetic on any pointer (including null) is well defined, and the code in question is arithmetic, not dereference.

And, yet another broken blog post will make the rounds on the internet every three years and confuse even more people. It's sad.

<comment><USER9> The post cites the spec. The C standard clearly seems to state that & must reference "an object", and NULL does not reference an object. A "pointer to any object" is distinguished from a null pointer.

Do you have links stating otherwise?

<comment><USER29> An of course plain C does not have 'objects' and a _lot_ of architectures have stuff mapped at address 0x0

<comment><USER30> You may be mistaking C for a fancy macro assembler.

It's not-- It's a high level language, even though a fairly low level looking one. The obligation of the language is to behave as the spec says, and there may not be a close mapping between your program and what runs on the machine, though there often is.

An "Object" is a concept defined and used extensively in the language specification; "a region of data storage in the execution environment,".

</comment></comment></comment></comment><comment><USER31> When you have a bunch of experts arguing on the interpretation of the language spec to know if a construction in the most fundamental piece of software on the computer is valid like a herd of clerics around a vulgate deciding if dead newborns can go to heaven, you know you have a cultural problem.

<comment><USER28> Are those who argue experts, or are they "experts" ? I know of no expert who would age with the interpretation of the post.

<comment><USER31> they are strawmen, you get to pick

</comment></comment></comment><comment><USER32> That's why you should be passing input params by reference and not as a pointer. The compiler should be be used to check that inputs are valid references so you don't have to null check everything.

</comment><comment><USER33> How does Rust deal with this type of situation?

<comment><USER7> By not having null pointers. If you want to have a pointer that might not point to anything valid, you do that explicitly with an option type. Of course if you really need to use a possibly-invalid pointer for performance you can drop into unsafe mode.

(At least, the above is what I'd expect from a language like Rust)

<comment><USER34> But when you do need unsafe code (e.g. for defining a structure that interacts with a C API), is behavior undefined? I'm just looking at a bit of my own offsetof calculation and hoping it won't break once I turn optimizations on.

        unsafe extern "stdcall" fn callback(arg0: *const IUnknown) {
            let myself: &MyStruct = &*(arg0.offset(-(&((*std::ptr::null::<MyStruct>()).as_event_handler) as isize)) as *const MyStruct);
        }

<comment><USER35> Yes, it generally is. Rust has similar (but not the same) undefined behaviours to C/C++, the compiler just ensures that they can't happen in safe code.</comment></comment></comment></comment>


SaaS vs. Open Core: Advantages and Disadvantages from the Customer Perspective - <AUTHOR> https://gravitational.com/blog/open-core-vs-saas-customer-perspective/ <comment><USER2> First time I've seen COSS coming from someone besides JJ. Good to see this idea / model garnering attention

[https://coss.media](https://coss.media)

</comment><comment><AUTHOR> Title slightly shortened since it didn't fit in 80 characters.</comment>


GitHub: Over 80% of repository contributions come from outside the U.S. - sahin-boydas https://venturebeat.com/2019/11/06/github-over-80-of-repository-contributions-come-from-outside-united-states/GitHub <comment><AUTHOR> I think the link points to a photo in the article right now. This is the correct link: [https://venturebeat.com/2019/11/06/github-over-80-of- reposit...](https://venturebeat.com/2019/11/06/github-over-80-of-repository- contributions-come-from-outside-united-states/)

Also, looking at the original report, the headline is not true. 80% of users are from outside the US, not 80% of contributions.

[https://github.blog/2019-11-06-the-state-of-the- octoverse-20...](https://github.blog/2019-11-06-the-state-of-the- octoverse-2019/)

From the graph here ([https://octoverse.github.com/](https://octoverse.github.com/)), it looks like there were ~2.5M open source contributions, with just under 1M from the US, so over 60% of open source contributions come from outside the US.</comment>


How to Land a Killer Job at a Tech Startup Out of College - <AUTHOR> http://www.jasonshen.com/2010/get-a-startup-job-out-of-college/

<comment><USER2> I'm going to add to that:

If you haven't started programming before you finish college, you've waited too long. The people that work well at startups are self-motivated and want to get things done. That means they spent at least some of their free time making something cool and (at least to themselves) useful. Or fun. Or both.

<comment><USER3> Totally - though I'd say it doesn't have to be hard core coding. It could be design stuff, blogging, video work, etc. You've got to be a builder, not an "extractor".

</comment></comment><comment><USER4> In my experience, it's easier to land a startup job straight out of college than a BigCo job. BigCo's look for X years experience, formal certifications, references etc. Startups look for enthusiasm, ability and a personal connection -- something you should have plenty of coming out of college.

</comment><comment><USER5> I think #8 (BE YOURSELF) should really be the first thing on the list. As someone who is now working at a startup straight out of [a really random, lesser well-known, liberal-arts focused] college, the single most important thing is to see how well you connect with the team.

People are really the most important part of any startup in my opinion. Don't try to be someone else. If there isn't a fit, you shouldn't try to force one.</comment>


How Netflix Reinvented HR - <AUTHOR> http://hbr.org/2014/01/how-netflix-reinvented-hr/ar/pr

<comment><USER2> > Most companies spend endless time and money writing and enforcing HR > policies to deal with problems the other 3% might cause

I would emphasize the word _might_ in this quote. The small mountain of HR policy poured on us slowly grows each year. To my knowledge, none of it is in response to any problems ever actually encountered. It's as if there is a certain legal mindset that every potential problem must be anticipated with a formal statement the receipt of which must be acknowledged by all employees. We have to acknowledge receipt, but I doubt anyone reads the nearly 100 pages (spread across a dozen documents) that have to be acknowledged each year.

I bet this is just the default activity of any corporate lawyer, and that if senior management just said "write the policy that's necessary, but try to keep the burden on our employees to a minimum", the lawyers would do just that.</comment>


Immune boost against the coronavirus: Vaccine being tested in Germany - <AUTHOR> https://translate.google.de/translate?hl=&sl=de&tl=en&u=https%3A%2F%2Fwww.mpg.de%2F11982088%2Ftuberkulose-impfstoff-wirksamkeitsstudie <comment><USER2> That appears to be discussing a tuberculosis vaccination. I couldnt find any corona reference in the German text.

<comment><AUTHOR> Seems like I copy pasted the wrong link... here's the right one:

[https://www.mpg.de/14608782/corona-virus- studie](https://www.mpg.de/14608782/corona-virus-studie)

<comment><USER3> Post the correct link in another submission, and add a link here, so the mods may mark this as a dupe.

If you think this post is also interesting, change the title to the correct one.</comment></comment></comment>


The 1975 HP 1607 Logic State Analyzer, one of the first logic analyzers [video] - <AUTHOR> https://www.youtube.com/watch?v=SiBozvGl5_I <comment><USER2> Video demonstrates a 8-channel 1st gen Saleae Logic clone and claims that it's a _modern_ equivalent...not quite. The Saleae clone--just as the original--is a sampling logic analyzer, whereas a true logic analyzer is driven by state transition.

To be sure, the Saleae clone depicted is reasonably useful to just under 12 MHz (at 24 MHz sampling rate), although forcing it to alias is easy and it's pretty useless for troubleshooting glitches.

<comment><USER3> The Saleae logic analyzers are really terrific value and utility and I really encourage everyone not to buy clones but instead support the team by buying the real deal. Through the last years I've bought >5 units (at various places) and can't really see myself working without one.

I'm glad seeing them hiking the prices, since the previous one was really a steal, too good to be true really.

<comment><USER2> I personally own a orignal 1st gen 8-channel unit, and despite newer gens being hardware-wise more capable, I still find this legacy device useful, in particular, for deep probing JTAG TAPs.

The price hike was painful though, and definitely not justifiable by hardware despite being well manufactured. They also make some fairly bold claims by stating that it directly " _Works_ with RS-232, 422/3, 485", although I'd be willing to bet none of their units would survive anything close to full admissible voltage range per respective TIA spec let alone properly handle termination, which is a real trap for the occasional hobbyist. Hardware aside, I think the real value is in software UX, which they've executed quite well.</comment></comment></comment>


The gig economy won't last because it's being sued to death - <AUTHOR> http://fastcompany.com/3042248/the-gig-economy-wont-last-because-its-being-sued-to-death

<comment><USER2> This appears to be a complaint that "business can't compete if it has to pay its employees properly." What the "gig economy" offers used to be called "day labour", and it was always just that one step from starvation. There are _reasons_ people want stable conditions, and are learning to fear the word "disruption" and consider it an attack on them and theirs.</comment>


What I saw in Syria - <AUTHOR> http://www.nytimes.com/interactive/2016/06/10/world/middleeast/syria-road-trip.html?smid=fb-nytimes&smtyp=cur <comment><USER2> I love this format. Just a photographer and a few brief observations is so much more in touch with the truth than multi-thousand word editorials weaving anonymous sources, personal opinions, outside influences and straight up lies.

</comment><comment><USER3> I hope piece comes to these people and their country.

In this day of the Internet, Science and Discovery, conflict seems so pointless.</comment>


How to get paid for your voice. - <AUTHOR> http://www.noiiz.com

<comment><USER2> love this, good luck guys</comment>


Calibre and Project Gutenberg: Liberate Your eReader. - <AUTHOR> http://www.thepowerbase.com/2012/01/calibre-and-project-gutenberg-liberate-your-ereader/ <comment><USER2> How does this help "end DRM"? The book was already in the public domain, so the only thing you did was to take a non-DRM'd copy and convert it into a proprietary format. Just because you can take a text file and convert it into .doc doesn't mean that you've "liberated" MS Word.

If you could take an e-book purchased at B&N and freely transfer it to your Kindle or vice versa, that would be the _real_ end of DRM.

Here's an interesting question. Suppose you bought a book by a long-dead author in an e-book store, just for the sake of convenience, or maybe because Project Gutenberg doesn't have it yet. Then you decide that you want to read it on a different vendor's e-book reader, and it happens that some software can break your e-book's DRM. If you use this software, are you violating the DMCA even though the DRM is not protecting any copyrighted material?

<comment><USER3> Yes, because you're circumventing a copyright protection mechanism. Even though the mechanism isn't, in that case, being used to protect copyrights.

IANAL and welcome corrections.

</comment></comment><comment><USER3> Calibre is awful.

Anyone who forks Calibre and gives it a useful GUI; or creates what people actually need (X-to-Y format shifting tools) without all the weird cruft that Calibre has (original article fails to mention that "add books" creates a bunch of folders in odd places) would be very popular.

<comment><USER4> Not only is the Calibre UI awful, but the HTML it generates internally (e.g, when converting to ePub) is seriously nasty. I wouldn't be surprised if it significantly slowed down book opening / display on some devices.

Part of the problem, though, is simply that there's no really good common "interchange format" for ebooks. All of the currently available formats (ePub, MOBI, HTML, PDF, FB2...) are effectively meant for direct consumption by some sort of device or another, so converting them to other formats is a messy process. I'm currently working on a simple new format for authoring (fiction) books in, as well as tools for converting this to all the other formats that matter; anyone interested in helping? :)

<comment><USER5> Would one of the markdown or similar formats serve as the middle format?

<comment><USER4> Sorry for the late response --

The format I'm planning to use as the intermediate is basically just a restricted subset of HTML. I'm primarily targeting fiction texts with this format, so advanced formatting isn't generally necessary.

</comment></comment></comment></comment><comment><USER6> While the Calibre project has good intent, the current implementation is far from becoming a killer app. It's too slow. Took me hours to convert files. It runs out of memory frequently, randomly; can't tell which document causes the OOM. It's just not ready for prime time.

</comment><comment><USER7> I'll be the one to say the Calibre is a phenomenal piece of work. Its ability to scrape hundreds of sites into epubs for my phone, tablets and ereader have been very helpful, especially given that I can tweak the code for a given site to get exactly what I want. I have it set up to mail my Nook Color the news every morning so I have it to read on the train on the way to work. Its ability to fire up a content server and serve up all my books eliminates my need to ever manually sync any of my readers that support fbreader on Android. It has excellent metadata editing features, and immediately made my Gutenberg collection much more attractive by going to out the web and collecting covers and metadata for them. It is very actively maintained, and has supported every reader I've thrown at it: my old Sony Pocket Reader, the new Simple Nook, the original Nook, a rooted Nook Color, the Nexus One and an Asus Tablet.

Given that it calls lots of helper utilities to do conversion between formats, it would be easy for someone that had a problem with the conversion utilities to write new ones and have those used instead.

As for Qt dependencies, Calibre is one of the few programs I _don't_ pull from package management, since it is updated far too frequently. Instead, I have a cron job that checks for and installs new versions twice a week, and the executables live in /opt.

</comment><comment><USER8> Can someone give me a good Sate of ePub speech and its device + environment support (iTunes, Kindle App, others)?

Observations:

      * The Calibre UI needs love (the OP arrows are a clue the UI doesn't have affordances)
      * ePub or "Gutenberg" support is not a current marketable term
      * What formats do publishers use beyond ePub?

Thanks.

</comment><comment><USER9> I almost hate to be that guy, but

mount /mnt/book && cd /mnt/book && wget ...

work just fine for me with the Sony PRS-300. I imagine things might be a bit different with a more closed system, but this has been doing the trick for a few years.

</comment><comment><USER10> Amazons kindle can import the .pub versions of the books from Gutenberg more or less directly (I don't have a kindle, but it works on the kindle app for Ipad).

<comment><USER11> Not .epub, but .mobi which Gutenberg provides for all its books and is the native Kindle format. (.AZW is .MOBI + encryption)

</comment></comment><comment><USER12> Calibre could really do with better pdf handling, especially for documents with columns.</comment>


Should I be concerned about putting my code on a 3rd party server? - <AUTHOR>

<comment><USER2> No. There are basically two parts to your code that you want to protect: the algorithms and the copyright. If your hosting provider's terms of service are anything resembling sane, then keeping your code on their site isn't doing anything to compromise the copyright, and anyone willing to steal your code outright in manner that violates the copyright isn't your competition.

Most applications don't use or require any algorithms sufficiently innovative to be worth protecting. If you're in the minority, then you should be a lot more concerned about your former employees than your hosting provider. It might be worth getting a patent, but really the odds of having your ideas stolen by your hosting provider and then sold to competition and having this result in a meaningful loss to your company are probably orders of magnitude smaller than your odds of getting struck by lightning.

</comment><comment><USER3> Encrypt it. There are lots of open source programs that can do that for you. Even if they get a hold of the files they will be meaningless without your private key.

<comment><USER4> If he's talking about interpreted server-side code that's not very realistic. The third party has total physical access to the machine. It's pretty hard to have the code run and remain encrypted at all times -- impossible in most cases. The closest real thing you can do is obfuscate your code, which can make things painful for you as well.

If you're a US company and the third party is as well I'd just rely on copyright law for protection. If they're a foreign company it's more difficult.

</comment></comment><comment><USER5> Concerned why? Are you concerned about someone stealing your proprietary code?

Or are you worried because you have made unreleased proprietary modifications to GPLed code and you are worried that running your modified version on another parties servers might be considered "distribution," and give the host the option of distributing it to other parties?

</comment><comment><USER6> Don't worry, they probably couldn't understand the code anyway even if their ethics lapsed.

</comment><comment><USER7> Make sure to obfuscate your Javascript/CSS files.</comment>


Client-Side Frameworks Suck - <AUTHOR> http://www.quirkey.com/blog/2012/09/04/client-side-frameworks-suck/

<comment><USER2> I'm not sure what to make of this article.

I think we can all get behind the idea that the ongoing "which framework is better" debate is often pretty ridiculous. Different frameworks are clearly better suited for different tasks.

But I can't really get behind the author's stance that it is wrong for people to have preferences (even strong ones) about which javascript frameworks they like to use.

For one, while every framework likely has different strengths, that isn't the same thing as all frameworks actually being good. It is very possible that an intelligent person with great intentions could write a framework that simply falls short of other frameworks in so many important regards that you can't really consider it "good". It is also possible that a framework will have such a niche use that most people would not benefit from using it.

Additionally, while not every project has the same sorts of requirements that could be satisfied with a single javascript framework, most are. Most apps that are being built in the startup community these days are basically little more than user interfaces to some REST api. Some may take it a step further and go "realtime" by using web sockets, but the application doesn't differ significantly from a REST based equivalent. If multiple frameworks set out to solve _common_ problems, then I don't think it is ridiculous at all to compare them and maintain a preference.

One way or another, I think we can all agree that the title "Client-Side Frameworks Suck" is total link-bait that does not adequately describe the article itself. To be fair though, I did not watch his talk, so it is very possible that this title better describes the contents of the talk itself.

<comment><USER3> _But I can't really get behind the author's stance that it is wrong for people to have preferences (even strong ones) about which javascript frameworks they like to use._

Exactly. As a developer, I can appreciate that every framework has different strengths and that you should use the tool appropriate for the task, but the fact of the matter is that I have work that needs to get done _now_ and if I spend all my time choosing the perfect tool, I won't ship anything. I have a toolbelt stocked with the tools I like best. I wouldn't want to stifle the discussions on which one's "best," though, because they can be really informative for those looking to add a new tool to their stack.

</comment></comment><comment> why-el > No one was actually shipping

Is this a serious statement? The amount of _X.js_ I see here is just crazy.

<comment><USER4> Yeah, I definitely agree. I frequently comment on MVC js discussions on HN to talk about my experiences with different frameworks. I also know that where I work, we're doing way more work, much faster, with better testing, and having a lot more fun, since we moved to using frameworks.

There was a brief period where different frameworks' Todo list examples got play on HN. Today, you can go to the Backbone homepage and scroll through too many awesome production apps to count, most of them going way beyond simple CRUD and demonstrating some very immersive UIs that would have been very difficult to build before.

</comment></comment><comment><USER5> Incoherent venting. Flagged.

</comment><comment><USER6> His approach to dealing with "Why is X better than Y?" conversations is spot on. I spent some time as a "open-source MVC framework evangelist" (heh), and always made a point to ignore the trolls and focus on delivering the benefits (and costs) of using the framework.

It is genuinely hard to ignore the trolls. If a thing is useful, lets talk about that.

</comment><comment><USER7> Backbone really doesn't suck though if you add enough stuff on top of it. It only sucks if you're forced to use it raw.

<comment><USER8> For the life of me I can't tell if this is satire or not.

On the assumption it's not (and apologies otherwise): The universally acknowledged downside of "frameworks" (vs. "toolboxes") is the "weight" of unused software that they bring along for the ride. So to argue that a framework is good only if you add enough junk _on top_ (!) of it just seems like a joke.

<comment><USER7> I wouldn't recommend a heavy framework that tries to magicfy everything for you, that kind of framework is really not to my taste. ie emberjs. But backbone itself is very light, you can probably read the entire source in under 30 minutes. Nobody is telling you to pack some huge framework on top of backbone, but depending on the complexity of your application Backbone might just not do enough.

Something like <https://github.com/marionettejs/backbone.marionette> is just another toolbox where you can pick and choose the tools you need.

This is why I really like backbone, because you have the option of going big or small on the libraries you're using depending on your needs, and each individual component is small and easy to understand.

</comment></comment></comment><comment><USER9> Yes, the title is link bait.

However, it was written by the author of a popular JS framework. It should really be titled "There is no Best client-side framework".

It's a good point he made, and one that anyone new to the client-side framework market should learn sooner, rather than later.

</comment><comment><USER10> So client side frameworks suck because he's sick of the false battles portrayed in the development community? I don't follow.</comment>


Did Draw Something by Omgpop really cost $140,000? - <AUTHOR> http://pricetaghq.com/blog/correct-price-draw-something-140000

<comment><USER2> I like these series of product breakdowns that you do! It's sort of like the teardowns that some sites do to show the total cost of the product like when a new iPhone comes out and they see that it has like $200 worth of parts or something.

Really interesting. I do feel there are a lot more intangible costs that are not taken into account. It is more like the cost to recreate an existing product. Building a product is like looking for gold in the woods. It will require a lot of blind walking until finding the gold. And then others can just take shortcuts to follow. The original cost is much higher.

So I guess the question is that since Zynga could've recreated Draw Something for about $140,000, should they have just done that instead of buying OMGPOP. :-)

</comment><comment><USER3> Hey Andres - really dug the graphic. As far as the value of Draw Something, I think it's important to note the difference between cost of production and the value of the app.

Namely, cost of production /= value.

Social graph, brand, talent, assets, parternships. There's a huge list of intangibles, the details of which the public isn't necessarily privy to, that Zynga acquired along with OMGPOP. To simplify it down to just cost of production is an easy way to make any acquisition seem foolish (ie Instagram), but isn't fair justice to the deal.

There's more at play than code and design.

</comment><comment><USER4> It is possible that they overpaid based on the success of Draw Something, but they could release another star app with the Omgpop team, or even improve their existing apps! I guess we'll find out later...

<comment><USER2> They definitely did NOT overpay. Zynga bought them for $200 MILLION US Dollars.

The cost of building that game are also the lessons they learned along the way. Also, for a team of developers, server administrators, project managers, I'd imagine their salaries for their services alone not including office space , computers and services would've cost way more than that.

I think this is a great article. OMGPOP didn't have the advantage of hindsight in building their product. I really doubt they knew what they were doing. Their advantage was being agile and adjusting their game and business model to how the crowd was playing the game.

</comment></comment><comment><USER5> Interesting, other deal that seems to be overpay, furthermore with that much downloads I am wonder that is the key to make a product of $140.000 be sold at $180 millions

<comment><USER2> The amount Zynga bought them for is not so much for the game, but for their users and also to eliminate a competitor. It is possible that OMGPOP could've grown and become the eventual company that would overtake Zynga. It's good defense by Zynga!</comment></comment>


Farewell to Microsoft - <AUTHOR> http://www.go2linux.org/linux/2011/06/farewell-microsoft-1098.html#.TgpKtxmBxbI.hackernews <comment><USER2> I'm amused that the author felt that he needed to put a disclaimer at the start of the article, that the article constitutes his views and experiences, and your views might vary.

Would he have felt the same about coming out of the closet as a full-time Windows user, kissing his Linux partition goodbye?</comment>


Afl-fuzz: crash exploration mode - <AUTHOR> http://lcamtuf.blogspot.com/2014/11/afl-fuzz-crash-exploration-mode.html

<comment><USER2> afl is great - it is hands-down the most easy to use fuzzer I've ever played with and it managed to find a couple of (non-exploitable) crashes in OpenSSH that intensive human review and my own fuzzer missed.

I can't recommend it highly enough - if you care about robustness, and especially if you write software that has to cope with untrusted input then please give it a try.

<comment><USER3> It is very good indeed. And just today we got it through the Fedora review process so within a few hours you should be able to do 'dnf install american- fuzzy-lop'.

[https://admin.fedoraproject.org/pkgdb/package/american- fuzzy...](https://admin.fedoraproject.org/pkgdb/package/american-fuzzy-lop/)

</comment></comment><comment><USER4> It's quite scary how even well reviewed open source software keeps falling to fuzzing. What are the chances of standing up against advanced state-sponsored trojans and malware? Seemingly zero.

Is it time to throw out everything and start from scratch in a safer language?

<comment><USER3> Yes, use safe languages when you can.

On the other hand, we have all this software written in unsafe languages, but until afl came out we didn't have really effective, easy to use fuzzers.

<comment><USER4> Actually zzuf [http://caca.zoy.org/wiki/zzuf](http://caca.zoy.org/wiki/zzuf) has been around for like 7 years - and it's still pretty easy to find exploits with it.

<comment><USER5> CERT's BFF is also based on zzuf, and valgrind, very useful.

[http://www.cert.org/vulnerability- analysis/tools/bff.cfm](http://www.cert.org/vulnerability- analysis/tools/bff.cfm) [http://www.cert.org/blogs/certcc/post.cfm?EntryID=53](http://www.cert.org/blogs/certcc/post.cfm?EntryID=53)</comment></comment></comment></comment>


Indiegogo: Greek Bailout Fund - <AUTHOR> https://www.indiegogo.com/projects/greek-bailout-fund/x/2086816#/story

<comment><USER2> You can't give them the fish, you have to teach them fishing.</comment>


Ruby Gem Configuration Patterns - <AUTHOR> http://brandonhilkert.com/blog/ruby-gem-configuration-patterns/?utm_source=hn&utm_medium=social&utm_campaign=gem-config

<comment><USER2> This is actually a very complicated way of achieving the goal. It works, but it's not good from an economic point of view as it is more expensive in computational terms than a simpler OO alternative, which is to pass the size when you instantiate the MegaLotto::Drawing object.

For example, compare the proposed solution:

        MegaLotto.configure do |config|
          config.drawing_count = 10
        end

        MegaLotto::Drawing.new.draw

With the alternative:

        MegaLotto::Drawing.new(10).draw

If you want to make it extensible, you can use keyword arguments:

        MegaLotto::Drawing.new(size: 10).draw

The interface and the implementation are simpler, but also the performance is better because there are less method calls. If you look at the code of both implementations, you will find the simpler one easier to understand. As a side effect, you will also get simpler stack traces if anything goes wrong.

<comment><USER3> Right...but even in this trivial gem, there may be the need to configure more than one parameter. And by having Configuration be it's own object, you can encode some validation logic at the configuration stage.

I do agree that the constructor should have the option of passing in a Hash, which is then passed directly to the Configuration option.

<comment><USER2> Another problem with the approach from the blog post is locality. If you need to draw 10 numbers in all places, then configuring that value in the module will work. But localy, when you look at the code, it won't tell you how many numbers you are drawing.

If you have this in many different places:

        MegaLotto::Drawing.new.draw

You don't have the information of how many numbers you are getting back. That's not a big deal, but adds to the cognitive load (or requires some comments). Also, if you need to draw different numbers in several different places, you will have to change the configuration many times:

        # First use, we need 10 numbers
        MegaLotto.configure do |config|
          config.drawing_count = 10
        end

        MegaLotto::Drawing.new.draw

        # Second use, we need 6 numbers
        MegaLotto.configure do |config|
          config.drawing_count = 6
        end

        MegaLotto::Drawing.new.draw

And as soon as you do that, you may need to take multi-threading into account, because you are mutating the class.

Extrapolating, it is like defining the size of an array:

        Array.new(4)

If instead you configure Array.new to have a given size for all instantiations, you also lose locality and you may run into thread safety issues.

In the case of MegaLotto::Drawing.new needing multiple configuration options, you can use keyword arguments. If you need too many arguments, maybe the abstraction is wrong. Even if you want to move forward with too many arguments, you can add getters/setters to the newly created instance:

       # Another approach which modifies the instance
       drawing = MegaLotto::Drawing.new
       drawing.size = 10
       drawing.draw #=> returns ten numbers

But this is not optimal design given the elements we have.

<comment><USER3> Ah yes, mutating the class is most definitely a concern...which is why I give you an additional +1 for advocating for a Hash to be passed into the constructor.

This seems to be what the Twitter gem did too, in its newest versions. AFAIK, the Twitter configuration was a mutation to the class via config object, and now it's been revised to be thread safe:

[https://github.com/sferik/twitter#configuration](https://github.com/sferik/twitter#configuration)

        client = Twitter::REST::Client.new do |config|
          config.consumer_key        = "YOUR_CONSUMER_KEY"
          config.consumer_secret     = "YOUR_CONSUMER_SECRET"
          config.access_token        = "YOUR_ACCESS_TOKEN"
          config.access_token_secret = "YOUR_ACCESS_SECRET"
        end

</comment></comment></comment></comment><comment><USER4> I wish people would stop doing this.

It generally means down the road I find myself wanting to use two different configurations and everything explodes in my face because the author of the gem thought there would always be exactly one configuration.

What is wrong with

         MegaLotto.new do |lotto|
           lotto.drawing_count = 10
         end

and just wrapping it in a "default_megalotto" factory method?

</comment><comment><USER5> This is a great approach for setting config variables. I also like to enable the user to add custom functionality to the gem by accepting a block that is called with any relevant variables for the user to access.

For example, in Exceptionally[1], the user can add an initializer that looks like:

        Exceptionally::Handler.before_render do |message, status, error, params|
          # put any code here
        end

In the gem, this translates to:

        def self.before_render(&block)
          &&callback = Proc.new(&block)
        end

The gem can then call the user's block and give it access to the same variables the rest of the gem does. This approach is a lot simpler than setting up an entire Middleware stack, as suggested in the blog, and makes more sense for simpler gems.

1: [https://github.com/neilgupta/exceptionally](https://github.com/neilgupta/exceptionally)

</comment><comment><USER6> This is a good overview of a config pattern. I'd personally have preferred it without the TDD stuff, seems to get in the way of the explanation.

</comment><comment><USER7> Check out my configuration gem.

[https://github.com/GeorgeErickson/bonfig/](https://github.com/GeorgeErickson/bonfig/)</comment>


Voice control engine that runs fully in the browser using WebAssembly - <AUTHOR> https://picovoice.ai/ <comment> yjftsjthsd-h Looks like this is source for the wake word engine: [https://github.com/Picovoice/Porcupine](https://github.com/Picovoice/Porcupine)

But their site says to email for licensing, which bodes poorly.

EDIT: License for "Porcupine" is Apache but with this:

THIS LICENSE APPLIES TO ASSETS IN THIS REPOSITORY INCLUDING DOCUMENTATION, SOURCE CODE, BINARIES, AND RESOURCE FILES EXCEPT FOR THE OPTIMIZER TOOL, ITS ASSOCIATED RESOURCE FILES, AND KEYWORD FILES GENERATED USING IT COLLECTIVELY LOCATED UNDER Porcupine/tools/optimizer. THE OPTIMIZER TOOL AND KEYWORDS FILES GENERATED USING IT ARE NOT GOVERNED BY THIS LICENSE. SPECIFICALLY THEIR USE IN COMMERCIAL PRODUCTS WITHOUT ACQUIRING A LICENSING AGREEMENT FROM PICOVOICE IS STRICTLY PROHIBITED.

</comment><comment><USER2> Coincidentally I tried the python client just earlier today and was blown away. I never even had to record my voice, I just typed two words for the wake word and it was 95% accurate in picking them up even with heavy background noise.

I am definitely going to integrate the wake word functionality into my Chrome extension that lets users control the browser via voice ([https://www.lipsurf.com](https://www.lipsurf.com)) so they can turn on the extension without even hitting the button.

I thought I would need to look into compiling into web assembly myself, super impressed that this too has already been done.

<comment><AUTHOR> Sounds like a great idea. Let us know if you face any problems integrating it. Happy to help. Cheers!

</comment></comment><comment><USER3> Just to add my experience, the demo worked perfectly straight away (Chrome 70 on macOS). Really cool to see this tech, hope it's easy to integrate.

<comment><AUTHOR> thanks a lot for the feedback :)

Take a look at this standalone demo if you like [https://github.com/Picovoice/Porcupine/tree/master/demo/js](https://github.com/Picovoice/Porcupine/tree/master/demo/js)

it should be a matter of tweaking a few parameters.

<comment><USER4> Web demo on your main page worked great for me at first, but stopped working after about half a dozen commands.

<comment><AUTHOR> That's odd. If there are errors in the console. Please open an issue in the GitHub repo is possible: [https://github.com/Picovoice/Porcupine](https://github.com/Picovoice/Porcupine)

Otherwise, I am thinking it could be something related to the microphone?

</comment></comment></comment></comment><comment><USER5> Each of the >30 times I've hit F5 on this site in Chromium it causes a 100% reproducible, complete tab crash.

The tab fully loads and appears properly for about... 100ms or so beforehand, so I'm pretty sure it's to do with some kind of wasm interaction. I have my microphone set to "ask before accessing" so I don't think the crash is to do with audio.

FWIW, I've been experiencing periodic tab crashes for the past few weeks, and need to do a package upgrade to move up from 68.0, so this may not be interesting to anybody.

But in case someone sees this and wants to chase it down, let me know; debugging Chromium can be fun. Unfortunately Arch doesn't provide debug symbols for their builds :'( so that's a bit of a setback, but yeah.

<comment> yjftsjthsd-h Why are you not up to date? Chrom/ium has a stable extension API; it's not like it should break anything, and you're missing security and bug fixes.

<comment><USER5> Insufficient diskspace, to be honest (avg. 50-100MB free on /). Which is due to expensive medical issues that make it tricky for me to work.

Been a problem for a while - worked with just under 8MB free for two years on the 486 I used between 2003 and 2005.

The reason I'm doing my best to sit still until I can fix things properly is that buying small HDDs a) multiplies single points of failure beyond the many, many disks I have boxed up and hope still work, and b) increases the total capacity I'll need to _re-purchase_ when I can finally assemble a ZFS pool. Right now, I have enough 400MB and 4GB, 10GB, 60GB, etc HDDs that I need about 10TB (!!!!) of temporary capacity to sanely deduplicate everything.

I'll figure out a solution eventually.

</comment></comment></comment><comment><USER6> Proprietary? No thanks, I'll just use Mozilla Deepspeech.

<comment><USER7> Serious question, how is that working so far?

I'd love to have Alexa/Google hone functionality but I'm not comfortable having a device made by those companies always listening in my home.

Really looking forward to when a product using Mozilla's tech is available.

<comment><USER2> You should look into MyCroft AI - it's an open source, privacy-conscious smart speaker company. You can buy one of their smart speakers or go the DIY route and install it on your own Raspberry Pi.

</comment></comment></comment><comment><USER8> Interesting tech, but on a very restricted demo it was wrong a huge number of times for me.

I'd recommend adding a note that the lamp itself will go red in response to "ok lamp", at least I think that's why it was doing that - it was a bit confusing and to see the first thing happen after saying "ok lamp, blue" having the picture of a lamp go red was not hugely encouraging initially. Perhaps add "listening for colour" or something.

<comment><USER9> Weird... I just tried it and it worked perfectly for me, even when whispering away from my phone's microphone. And I have a strong accent.

</comment></comment><comment><USER10> Oddly, all site text invisible in Chrome 55 (UC Browser) and FF 57. (text exists, but must be same as bg color, including all buttons)

<comment><USER11> It's ok with FF 62 on Android, but it'sshouldbeok with older versions. Being on a tablet I can't check if they're using something new.

</comment></comment><comment><USER12> The web demo doesn't work for me on Android.

<comment><USER13> Works for me on Android using Firefox.

<comment><USER12> Ah, it does for me too, though not reliably.</comment></comment></comment>


Design Patterns for Managing Up - <AUTHOR> https://queue.acm.org/detail.cfm?id=3308563 <comment><USER2> Concise articulation, and valuable. My comment is that this is happy-path advice.

Corporate culture has changed to where instead of handling conflict according to principle (e.g. Harvard negotiation project, getting to yes, principled negotiations etc), today people are trained to out-passive each other, and marshal political campaigns to isolate opposition. (salience, political survival, working the ref, etc.)

The moment you acknowledge that the person you are dealing with is being disingenuous and manipulative is the moment you have lost. That you can see the mechanism critically signals you do not have power, and that you cannot be trusted to "keep the ball in the air."

The typical response to this is, "that's black and white thinking, people have different perspectives and views, which are valuable and legitimate." While that is generally true, different perspectives aren't the problem, nor are they new. It's a minority of people who exploit the agreeableness and civility of others with a small toolkit of negative plays, and who cluster in high- status organizations because they are motivated by proximity to power, but without responsibility itself.

The OP articulates valuable patterns for navigating flat organizations in calm seas. A set of patterns that describe when the knives are out would be a helpful follow up.

<comment><USER3> Sometimes when the "knives are out" you can't win or why would you want to?

<comment><USER4> Well you at least don't want to bring a pillow to a knife fight.

<comment><USER5> Actually, wouldn't a pillow be a reasonably effective way to deflect a knife?

<comment><USER4> I usually think of the metaphor in terms of bringing a knife to a pillow fight as a play on "that's like bringing a knife to a gun fight" in which case my formulation is about having an innocent bit of fun and then someone going way overboard and doing something absolutely inappropriate. I sort of picture it in my head like everyone is having fun and then someone whips out a knife and then everyone starts to get very terrified.

I never really considered how a pillow would actually hold up against a knife in a fight. My money would still be on the knife, but I take your point.

</comment></comment></comment></comment></comment><comment><USER6> My favorite managing up pattern is the Feynman estimation technique. During the Manhattan project he and others were asked to report on what they would be discovering in the next quarter. Since they were doing groundbreaking work nobody had a clue how to answer and this caused the researchers a great deal of stress. Then they realized they could just hold back 3 months worth of results and "estimate" the discoveries they had just made. The end result was that management was very happy with the predictable progress and the scientists were free to do their work unimpeded.

Applying this in contemporary corporate America is left as an exercise for the reader.

<comment><USER7> Strikes me as a method that would work very well in a world before business analytics audits and KPIs.

<comment><USER6> Just need a management consultant to give it a clever name like "superscalar project management" and some powerpoint slides and you're good to go.

</comment></comment></comment><comment><USER8> I disagree with #4, your manager giving negative feedback.

Asking a manager to clarify the feedback shouldn't put that manager on the defensive. If the manager hasn't gone to the trouble of getting those details then they need to be educated on how to deliver negative feedback.

Instead of simply saying "I hear you. I will be more mindful of that in the future.", a more productive response would be:

"Based on what you've shared it's not clear to me exactly what I did wrong or how I might do things differently in a similar situation in the future. Are there additional details you can share? <if they answer no:> Can you get those details so that I can make this a part of my learning plan?" <if they waffle:> What advice do you have for me for how to better handle this situation in the future?"

You've now educated the manager as to what level of detail you need when it comes to feedback. They should know that they can't just toss incoming feedback over the transom. They need to dig into the details and do what it takes to help you grow.

</comment><comment><USER9> I believe the better approach to #1 is to:

\- say that you're not sure

\- articulate an hypothesis of what it might be to the best of your knowledge (it's likely you're going to be 80% right)

\- propose to launch an effort / work stream / project to figure it out

In many cases managers are just happy with an 80% answer and will reject to waste efforts to dive deeper. Managers can deal with uncertainty and with situations where the 80% answer is wrong. What they typically don't like is being stalled

<comment><USER10> > articulate an hypothesis of what it might be to the best of your knowledge > (it's likely you're going to be 80% right)

Please don't do this. Many managers and clients have a far better bullshit detector than you give them credit for. They might never say it directly to you, but you just lost their respect by trying to guess instead of being honest. When programmers I interview try to bullshit their way through an answer they clearly don't know, it's almost always the end of the interview. Especially because I make it super clear at the beginning that I prefer "I don't know". A solid "I don't know but I do know I can get you an answer or an update in a couple of hours" is the approach that earns my respect every time. And likely you'll be right 100% of the time with that answer.

<comment><USER9> This is absolutely _not_ about bullshitting your way out of it. Far from it. It is about articulating an hypothesis (based on your experience) of what the answer is most likely to be. It is saying: "We're not yet sure why the server crashed, but from my experience it is most of the times the A/C system, for which I would suggest checking the logs now". It is honest, articulates a way forward, and might in many meetings just be sufficient to keep the discussion moving forwards. Again, it is the job of a manager to deal with controlled uncertainty.

<comment><USER10> That's not the situation described in the article. The situation described in the article is pretty specific: Someone asks you something _you don 't know_. It's right in the title. And it goes on to describe a situation in which you _may end up making up something on the spot, trying to be as vague as possible so you can 't be wrong_.

So yes, if your hypothesis is _just something you made up_ only so you can have an answer, then please don't do that. I don't care how solid the guess is. It's still a guess just to have an answer.

In the situation you described, you _do know something_ and you're sharing that knowledge. I have no problem with people sharing that knowledge. It's not a hypothesis. It's the opposite of "you don't know". It's knowledge about the history of the situation.

</comment></comment></comment></comment><comment><USER11> Not sure if they cover...

A typical scenario is that you are in a corporate culture where, for whatever reason your manager does not "manage down", like at all. Meaning that they are not giving you direction and nor are they listening to any needs, direction from you (ok, maybe once per quarter?). Your interactions with them (if you are letting them set the schedule) are very limited. Now that can be great or bad.

Typically though these people (by essence of being someone you report to) control more corporate power than you do. They can perhaps authorize work, hire 10s of additional resources, approve muilti million dollar projects, set a budget for next year, etc. So it becomes imperative for you to 'manage up' if you want to achieve more than what you are being fed.

Just how to do that, maybe this book covers. Hope so.

<comment><USER12> _A typical scenario is that you are in a corporate culture where, for whatever reason your manager does not "manage down", like at all._

Indeed, there's a whole range of dysfunctional (and sometimes simply toxic) managerial behaviors that seem to occur very frequently int the workplace, and for which it'd be nice to see some advice as to how to deal with them.

But overall the advice in this particular article seems very superficial.

</comment></comment><comment><USER13> Is there any similar themed advice for managing same-seniority coworkers handballing their responsibilities?

Person A owns task

Person A: I don't know much about task, but person B seems like an expert. Person B, please take over task

Person B is no more or less qualified at task than person A

<comment><USER14> Perhaps you shouldn't allow handover of such responsibility or tasks. Force Person A to own task but allow Person B to assist Person A. Surely Person A won't mind help Frontera on B.

</comment></comment><comment><USER15> The best thing you can do is work for a good manager. If you have a crappy manager find a way out to get under another manager or otherwise just outlast them.

</comment><comment><USER16> Good article! I agree with most of it.

However,

'As a leader, you don't want to tell your team that the reason things are changing is "because _ made me do it." That makes it seem like you have no power, as though you do things just because you are told to. It certainly won't inspire confidence in your team or make them any more likely to embrace the decision.'

Are you sure?

Do you really want to tell your team "We are painting the building purple because fairies love the color purple and will bring us good luck"? Especially when your team already knows you personally don't believe in fairies?

It seems to me "Look, the CEO is firmly committed to the belief in fairies, and has made the policy decision that we are going to paint the building purple. It's up to us to implement that decision," is the least bad thing to say in that situation.

</comment><comment><USER12> _So, when a decision is made that doesn 't make sense to you, here are the steps:_

 _2\. Don 't disagree;_

This sounds like a recipe for a toxic work culture where everyone is walking on eggshells and fearful not only of stating their opinions - but in many cases, making simple statements about objective reality.

<comment><USER17> Great job taking the comment entirely out of context.

The next part of that sentence is "ask about the context and reasons for the change", immediately followed by, "Start with your manager or the main decision maker if you have a prior relationship, and then escalate up the chain of command together (rather than just emailing your thoughts to the CEO)."

> making simple statements about objective reality.

It is extremely rare that decisions are "objectively" bad -- that was the main point of that section. In fact, the article explicitly says: "Remember there is someone in the chain who thinks this is a good idea; that is why it is being implemented. So, it is worth your time to try to understand the "why" behind this idea"

<comment><USER12> _Great job taking the comment entirely out of context._

I read and understood the full context. I was keeping it short for the sake of simplicity.

The basic message they're conveying is, after all: "If you have disagreements, don't express them."

 _It is extremely rare that decisions are "objectively" bad -- that was the main point of that section._

I was referring not to the _decisions_ , but to the _assertions about reality_ that are used to justify them.

<comment><USER18> I read the advice vastly more as "don't immediately express your counter- argument; instead, first _ask_ questions and seek to understand how the decision was reached; after that, you're in a more informed position to discuss intelligently the decision and how that intersects with the way you see things".

See also Chesterton's Fence: [https://www.chesterton.org/taking-a-fence- down/](https://www.chesterton.org/taking-a-fence-down/)

</comment></comment></comment></comment><comment><USER19> Question for the crowd: how to manage up a politically savvy skip manager that routinely trivializes engineering effort? They couch it in sarcasm, something like "oh you can build that in like 2 minutes, it's just an SQL query and 3 lines of python, right?"

<comment><USER20> I think you would find negotiation practices helpful, e.g. check out the book "Never split the difference" to learn some negotiation techniques and "Elephant in the brain" to understand that this behavior is likely not about technology.

<comment><USER19> It's not a negotiation in good faith because they are "just joking man!"

<comment><USER20> As someone who actually builds things you have more leverage than you think in this or any other conversation with your manager, you need to learn how to use it better.

</comment></comment></comment></comment><comment><USER21> I've found "Extreme Ownership" by Jocko Willink good for getting into the mindset of managing up without a nagging / second guessing touch.

</comment><comment><USER22> Amazon LPs:

1) Customer Obsession

2) Ownership

3) Disagree and Commit

4) Vocally Self-Critical / Earns Trust / Learn and be Curious

</comment><comment><USER23> Or instead acting like personal PR is your only contribution to the species, you can just say reasonable things that make sense including things like "I don't know" on a circumstantial basis using your human brain and social instincts.

</comment><comment><USER24> I think the abstract pattern here is: own it.

<comment><USER25> It is slightly different: lower anxiety.

You do that by being reliable, honest, receptive, taking ownership, mitigating risk.

But the human dimension is emotional. Your counterparts feel it as anxiety. They will ultimate adjust their internal feelings to you based on how anxious you make them.

</comment></comment><comment><USER26> Thank you. Good read.

</comment><comment><USER27> This is good advice</comment>


The 5 Mystical Practices of Great Engineers - <AUTHOR> http://dojo4.com/blog/the-5-mystical-practices-of-great-engineers

<comment><USER2> "Great engineers do everything I do."</comment>