The symbiotic growth of the automobile industry and law enforcement - <AUTHOR> https://www.laphamsquarterly.org/roundtable/need-speed-limits <comment><USER2> This is kind of an incomplete analysis and I find two big flaws with it.

Lots of other things were happening in this time period that greatly increased the amount of regulation the average person had to contend with when going about their life, I'm not sure the automobile is remarkable except as an example of the general trend.

Laws in a democratic society are an exercise in group consensus. You can't just dictate how fast people can drive or what plants people can smoke or what liquids they can drink and expect people to comply at scale without the kind of law enforcement that is incompatible with a free society.

</comment><comment><USER3> >"In the old days there was no such thing as a jaywalker," he recalled, because one "could cross the street wherever you pleased, subject to your liability for negligence."

This is largely still the case in East coast cities.

<comment><USER4> I can attest seattle does in fact ticket you for jaywalking... my brother has two tickets for it. :x

</comment></comment><comment><USER5> I live in Ann Arbor, Michigan. It's a very pedestrian friendly city, and frankly it's a pain to drive because of how freely people just wander into the street and cross with almost no regard. The law is pretty clear that pedestrians have the right of way and I see people stopped for not yielding to pedestrians ALL THE TIME. It's nice, especially between classes when hundreds of people may be trying to cross a street, that we are able to get to class on time and the one person in the car isn't going to mow us all over. At bigger intersections there are walk lights, and people obey them for the most part, but the majority of campus and the city has crosswalks with stop signs or "yield to pedestrian" signs.

</comment><comment><USER6> Actual title rather than subtitle would make a lot more sense: "The Need for Speed Limits"

There is almost no discussion of the symbiotic growth of the two.</comment>


Maryland appeals court rules police need warrant to use Stingray phone tracker - <AUTHOR> https://twitter.com/NateWessler/status/715294141530378240 <comment><AUTHOR> _" We conclude that people have a reasonable expectation that their cell phones will not be used as real-time tracking devices by law enforcement, and—recognizing that the Fourth Amendment protects people and not simply areas—that people have an objectively reasonable expectation of privacy in real-time cell phone location information. Thus, we hold that the use of a cell site simulator requires a valid search warrant, or an order satisfying the constitutional requisites of a warrant, unless an established exception to the warrant requirement applies."_ [http://www.mdcourts.gov/opinions/cosa/2016/1496s15.pdf](http://www.mdcourts.gov/opinions/cosa/2016/1496s15.pdf)</comment>


Facebook labels declaration of independence as 'hate speech' - <AUTHOR> https://www.theguardian.com/world/2018/jul/05/facebook-declaration-of-independence-hate-speech <comment><USER2> > _What must have seemed like a benign social media strategy managed to fall > foul of Facebook's algorithmic censors, which labeled sections of the > declaration hate speech and removed the posts._

Do we know that this was the action of an "algorithmic censor"? I mean, one of the _automated_ censors? My impression was that Facebook still has many human censors [0] in its employ, many of them outsourced in non-U.S. countries. It's possible that a human user flagged this Declaration of Independence post, and a human censor approved the flagging/censoring of it.

Yes, I know that "algorithm", broadly defined, could include a process in which a human user flags something for a human censor, but that's not how "algorithmic censors" is typically used in this context.

[0] [http://www.latimes.com/business/technology/la-fi-tn- facebook...](http://www.latimes.com/business/technology/la-fi-tn-facebook- guidelines-20180424-story.html)

<comment><USER3> Does it matter? There was a problem, they apologized and corrected it.

FB has been under intense scrutiny for providing a platform for hate speech, so why should we be surprised that they use automated means to decrease the lead time between posting and removal?

That phrase _is_ hate speech, it just happens to be contained within one of the founding documents of the US. While it is a worthwhile goal for the algorithm to understand the context of it - I don't think we're quite there yet, and I would rather have a few false positives than the avalanche of shit that would exist without it.

As to whether a human removed it, I suspect that from the perspective of the person doing it, it's better to err on the side of caution than lose your job; especially a non-US citizen.

<comment><USER2> Yes, it matters. People need to have a better understanding of how these processes work, and not just to think everything related to big-tech is solved by machine learning.

<comment><USER4> > not just to think everything related to big-tech is solved by machine > learning.

In fairness, I think most people realize that a significant number of problems are actually solved by blockchain instead.

<comment><USER5> I always assume someone doesn't know anything about blockchains when they call it "blockchain". It's just a data structure

</comment></comment></comment></comment></comment><comment><USER6> Basically a case study in why automated/preemptive content filtering is a bad idea. Let users report bad content, investigate it once it reaches a certain number of reports.

</comment><comment><USER4> Facebook correctly labels hateful sections of the declaration of independence as hateful.

not as catchy a title I guess.

<comment><USER7> Censoring historical documents is now considered "correct."

Wow.

<comment><USER8> Time to learn Chinese</comment></comment></comment>


Scripting Nginx with Lua (2012) - <AUTHOR> http://www.londonlua.org/scripting_nginx_with_lua/slides.html

<comment><USER2> I tend to always use OpenResty for a certain set of tasks these days. Notably, when it is mostly about lightweight data processing. I.e. an API that reads from a DB, transforms some fields and returns json, or a simple proxy server that slightly modifies the data (or just returns it). Or, performing simple calculations based on a few inputs.

All this usually just requires a few lines of code and due to the nature of OpenResty, it scales really well and is very lightweight in terms of CPU consumption and memory.

I haven't really used it for anything bigger yet, mostly because then I'd rather prefer Django or Clojure (depending on the tasks) as they have much more functionality / packages for web development.

Particularly the nonblocking IO for db/file/networking operations (out of the box) is neat. Another interesting aspect is that, once you've set up the system, development feels a lot like PHP development, where every lua file can be one page and changing the file results in a direct change on the frontend (if you turn the lua code cache off).

On the other hand, there're some pitfalls, the project is young, it still lacks packages for many, many things (notably, if you want to do crypto, you have to FFI right into the C library, for now. There's a new sha/hmac module, but it's not part of the current OpenResty distribution yet). Also, sometimes it is difficult to find solutions to problems, as it is not widely used as Django or Rails. If you're interested in using it, take some time to read up on LuaJIT as there're several important optimization techniques to really get the best out of it (see below).

All in all, for smaller projects, I love the stack as it is simple, lightweight, and easy to install.

Here're some useful links:

Lua(Jit) Profiler: [https://github.com/jgrahamc/lulip/](https://github.com/jgrahamc/lulip/)

IDE With Debugger for OpenResty (Pretty cool, you can debug while your browser requests): [http://notebook.kulchenko.com/zerobrane/debugging- openresty-...](http://notebook.kulchenko.com/zerobrane/debugging-openresty- nginx-lua-scripts-with-zerobrane-studio)

LuaJIT Performance Guide: [http://wiki.luajit.org/Numerical-Computing- Performance-Guide](http://wiki.luajit.org/Numerical-Computing-Performance- Guide)

Lua Performance Guide: [http://www.lua.org/gems/sample.pdf](http://www.lua.org/gems/sample.pdf)

<comment><USER3> The whole debug while requesting a page sounds great, that's a feature I adore from Xdebug.

</comment></comment><comment><USER4> If you are interested in working on or with OpenResty then CloudFlare is hiring people in London and San Francisco. We employ agentzh and he works on OpenResty at CloudFlare. We use it _extensively_ throughout the CloudFlare stack.

And also we really, really need more people with experience of OpenResty, NGINX, Lua and LuaJIT.

[https://www.cloudflare.com/join-our-team](https://www.cloudflare.com/join- our-team)

<comment><USER5> One of the concerns I have about openresty is that so much of it relies on agentzh. He does amazing work at an insane rate - a rate that I'm a bit concerned (as someone who uses openresty & luajit extensively) can't be sustained in the long term, and is in serious jeopardy if he gets a better offer.

<comment><USER6> Yeah, the pace at which he pumps out code is absolutely incredible.

However, I imagine he wouldn't want to work for another company unless they also allowed him to spend a lot of time on the project.

</comment></comment></comment><comment><USER7> If you'd like to go a bit higher level without sacrificing performance, I suggest Lapis, a Lua/Moonscript framework built on top of OpenResty: [http://leafo.net/lapis/](http://leafo.net/lapis/)

(not the author, just a fan!)

<comment><USER8> Thanks for sharing. Lapis looks really cool. For anyone curious about performance see ChikkaChiChi's comment[1].

[1] [https://news.ycombinator.com/item?id=8021069](https://news.ycombinator.com/item?id=8021069)

<comment><USER7> Looking at this table, I should've said "without sacrificing _too much_ performance". Impressive results, though!

</comment></comment></comment><comment><USER9> At Lonely Planet we've had a good experience using OpenResty directly behind our CDN. We use it to perform rewrites, route requests to the appropriate applications, manage splits for a/b testing, block malicious traffic, gather metrics, and more!

We touch on our use of it a little bit towards the end of [http://velocityconf.com/velocityeu2012/public/schedule/detai...](http://velocityconf.com/velocityeu2012/public/schedule/detail/26634). The last slide is still true- we're hiring! Ruby (remote possible), javascript, devops, and more. See [http://www.lonelyplanet.com/jobs/](http://www.lonelyplanet.com/jobs/)

</comment><comment><USER10> I already posted this some time ago, but let me insist on this one:

Openresty (nginx+lua) is probably one of the most underrated technologies we have available nowadays. In my experience, every webapp can offload a ton of work(1) to openresty. The lua code is usually simpler and a lot faster that the equivalent code in the app.

(1) think caching, auth/acl, security filters, stats, logging

</comment><comment><USER11> We've recently switched from a file based URL rewrite system to nginx/lua/redis. Before we'd literally include() the rewrites into our configuration files which made -s reload a pain. All in all the implementation was relatively painless, decreased our server reponse time quite a bit and scales way better than our previous naive approach.

</comment><comment><USER12> If, like me, you didn't understand the difference between tengine and OpenResty, see here:

[https://github.com/openresty/ngx_openresty/issues/54](https://github.com/openresty/ngx_openresty/issues/54)

</comment><comment><USER13> We've just done this at our API focused startup and been really impressed with the performance. OpenResty makes interfacing the server with your business logic and external services a breeze. Nginx and Lua/LuaJIT have been battle tested for years and they are extremely fast and reliable.

Open Source on GitHub: [https://github.com/Mashape/mashape- agent](https://github.com/Mashape/mashape-agent)

</comment><comment><USER14> The video for the talk is here [https://skillsmatter.com/skillscasts/3362-scripting-nginx- wi...](https://skillsmatter.com/skillscasts/3362-scripting-nginx-with-lua)

</comment><comment><USER15> OpenResty caught my attention in the most recent TechEmpower Benchmarks. It definitely deserves your attention if you need something that can handle concurrent requests at a large scale:

[http://www.techempower.com/benchmarks/#section=data-r9](http://www.techempower.com/benchmarks/#section=data-r9)

</comment><comment><USER16> A great project built on top of openresty: [http://coronium.io/](http://coronium.io/)

</comment><comment><USER17> Off topic, but does anyone know what software was used to make/generate the slides webpage?

<comment><USER14> It is Shower [http://shwr.me/](http://shwr.me/)

<comment><USER18> Shower is really great. It also defines sensible print styles which work well for "print to pdf".

<comment><USER14> Yes, I discovered that when I needed to produce a pdf for a talk that was potentially offline, worked really well.</comment></comment></comment></comment>


Ask HN: How do I learn C and C++ when I love high-level languages? - <AUTHOR> I've been developing using languages like Python, Java and the like with automatic memory management for the past few years. The way I learned these languages was - read their language definition from learnxinyminutes.com, think of personal projects I wanted to make/port, google the API and done.
C/C++ is different, I'm afraid of pointers. I can't think of anything that I will like to make in C/C++ since it is so low-level. What I can do in one line in Ruby will take dozens.
I will really appreciate any pointers on how do I learn them. (no pun intended) <comment><USER2> First, just to clear things up, C and C++ are two different languages. Yes, C++ is backwards compatible, but you'll do yourself a favor if you start perceiving them as two completely separate laguages now.

Before you start, you need to answer yourself why you're doing it. Unless you really have some inherent interest in the language, learning it just for the sake of learning will be tough because there is no instant gratification.

A good book to start learning C++ is Stanley Lippman's "C++ primer". Make sure you have the latest edition because it reflects the recent big changes in the language.

The best thing you can do when dealing with lower-level languages like C and C++ is understand that things like lists, strings, integers, floating point numbers, objects, etc. do not actually exist. They are simply abstractions. There are only the CPU and memory. You can think of the memory as a very very long array of bytes.Pointers are simply indices for that byte array. Roughly speaking, all that happens in a computer is the CPU fetches some bytes from memory which contain instructions and then modifies the bytes in some other region of the memory according to given instructions.

Once I realized the above things, a lot of other things immediately started making sense to me, so I hope this helps you or others.

</comment><comment><USER3> Stop being scared of pointers, they aren't magic and you've _been using them all along_. In most high level languages you are using a pointer for any variable that's not a number. Which is why when you assign one variable to another and modify one it modifies it from the perspective of the other. Because they _point_ to the same object.

Fundamentally, though, they're a value just like any other, just a number that's an index into the giant array called memory. The language provides convenient syntactic sugar to 'dereference' them, which just means evaluate the address and index to it.

Basically:

        *blah

is equivalent to:

        all_of_memory[blah]

which, incidentally, is equivalent to:

        0[blah]

and back around again:

        blah[0]

<comment><USER4> In all my years, I've never seen anyone describe it like this. Nice one.

</comment></comment><comment><USER5> I think to _learn_ C/C++ it's helpful to have a mindset of wanting to understand the machine rather than build code. It's of course great fun to use Python's built in maps etc (and C++ has equivalents) but what you can do in C/C++ that you can't in Python is create the raw data structures down to the exact memory locations where they'll be used. One of the ways to learn C++ is make a relatively complex data structure (red-black tree, or bloom filter) and then throw as much data as you can inside it, see when you cross a threshold of memory usage -- then see if you can improve on that.

Having said that, C++ has come a long way, despite what haters say. I program primarily in C++ and very rarely have to use pointers. C++11/14 has excellent features (lambdas, initialization lists etc) which can make programming almost seem like writing a Python or Ruby script.

You may also have some luck with Bjarne's smallish "Tour of C++" book -- [http://www.stroustrup.com/Tour.html](http://www.stroustrup.com/Tour.html)

</comment><comment><USER6> Good C++ isn't that far from high-level languages. Look at the bullet points here:

[http://msdn.microsoft.com/en- us/library/hh279654.aspx](http://msdn.microsoft.com/en- us/library/hh279654.aspx)

If you primarily use value and reference semantics, RAII, smart pointers, STL containers and algorithms, etc, C++ looks a lot like a really powerful high- level language, because that's what it is. Things only start to get ugly and/or low-level when you are trying to heavily optimize things.

Stroustrop (mentioned in other comments) is a great way to get started, and Effective C++ ([http://www.amazon.com/Effective-Specific-Improve-Programs- De...](http://www.amazon.com/Effective-Specific-Improve-Programs- Designs/dp/0321334876)) and its cousins will help you not shoot yourself in the foot.

C is a whole different beast. If you've coded in Java, you have a basic idea of how to do encapsulation in C++. Encapsulation in C is nearly impossible to guarantee. Really, a lot of C programming relies heavily on negotiated conventions and design by contract. Learning the C language is pretty easy (read K&R some weekend), but learning to program well in C is a completely different thing.

</comment><comment><USER7> Take a job where you'll have access to senior C++ programmers who'll mentor you. One good way to do this is to get a frontend/webdev job at a company that also does some hardcore C++ backend development, then once you're in the company, offer to start fixing bugs in the core product as long as you get some mentoring/code reviews for them. Most devs don't turn down an offer to help.

You really want to work with people who have done C++ before, because there are a number of tricks (RAII, ownership conventions, using const references and references to signal ownership conventions, smart pointers, unique_ptr, etc.) that are common industry practice but aren't all that well-documented on the web. C++ differs from Java or Python in that often the hard part isn't figuring out how to do something, but figuring out _what not to do_.

</comment><comment><USER8> Go to a code practice site like hackerrank or oj.leetcode (personal favorite but I suggest using an external compiler for it) and solve problems. Start from the simplest ones and make your way up. Once you solve a problem, go back the following day or week and without using a reference solve it from scratch. After solving a problem look at the solutions provided in the forums. A lot of the time they will be a lot more elegant and contain things you haven't considered or seen before.

This is only half of it. The second half is to choose a mid size project, write yourself something that resembles a spec, and code it up from scratch. It could be some sys util or perhaps a video game (this will require you to learn library linking).

The third half is to read online articles and tutorials while you do the two things above.

The fourth and final half is to get yourself a book once you have a grasp on the language(s) and learn some of their more complicated idioms and pitfalls.

Also as a side note, at this point in time I don't think the "C/C++" conglomerate make much sense any more as modern C++ looks very different from C. Unless you explicitly need C, I would suggest learning C++ first as it's higher level (and also much larger). Though, idk, maybe learning C first is better as it's the foundation for C++... I guess either is fine, just not both simultaneously.

<comment><USER9> four halves, huh?

<comment><USER8> What can I say, C++ isn't easy to learn :)

</comment></comment></comment><comment><USER10> Look into more recent language features:

[https://stackoverflow.com/questions/3016107/what-is- tagged-s...](https://stackoverflow.com/questions/3016107/what-is-tagged- structure-initialization-syntax)

[http://www.stroustrup.com/C++11FAQ.html](http://www.stroustrup.com/C++11FAQ.html)

Also, the Boost library is worth a look. C++ is fairly expressive if you wield it properly, and it offers several ways to minimize the pain of memory management. I would hesitate to call C++ "low-level". (C is another story.)

Other than that - C/C++ are used to solve different problems from Python, Ruby, etc. It is a common problem that people used to a particular toolset have difficulty identifying tasks that are suited to other tools. The suggestions to write C extensions or ports of command line tools are good ones - these will give you a taste for where C/C++ shine on a much more gradual learning curve than trying to write device drivers or kernel extensions.

Another example of practical C++ usage: in the past, I've often prototyped algorithms in Python, then rewritten them in C++ once the major bugs are ironed out. YMMV, but I found this to be faster than writing directly in C++.

</comment><comment><USER11> I don't think that C/C++ is different, this is exactly how I learned those as well. Be aware though, that C++ and C are very different languages and you should choose one. If you want to do kernel-level stuff or embedded code, C is probably a better choice than C++, whereas if you want to go into gaming or complex desktop applications (think Photoshop), C++ might be the one to choose.

Pointers may be scary but they are just a concept that you need to grasp, like recursion. You first read about it and kind of get it, then you apply it over and over until suddenly you realize that you have developed a true understanding that allows you to build new abstractions on top.

You will hear people telling you to start with C first because C++ is a superset of C, but I always advice against this. Memory management is "manual" in both, but the idioms you apply are very different between the two. Unless you are looking to truly spend years perfecting both, pick one and go with it.

<comment><USER12> C++ is also very applicable in kernel programming. See: Haiku, Darwin, Windows. I would not write a C kernel now; Linux and *BSD only maintain relative security and dearth of bugs through years of maintenance and rigorous code guidelines. C++ (even as only a thin layer over the C code) can provide ridiculous modularity and safety that C alone cannot—think RAII and parametric allocators. From a software engineering perspective alone, I think C++ is the win.

C is much better as glue code between languages than anything else.

</comment></comment><comment><USER13> Work your way through "A Book on C"? That's how I did it...

Actually, I think the best approach would be to pick a project for which you can construct a believable (by you) reason why it _should_ be in C. Some possible reasons:

1) You need precise control of hardware

2) You're running in an environment where higher level languages are not available

3) You need precise control of latencies

4) You need the absolute maximum possible performance

There are various projects with these requirements of various difficulties. I would say that it might be hard to simultaneously convince yourself that a project needs the maximum possible performance and also that it is tractable for you as a newbie C developer.

A simple kernel module might not be a bad thing, if you can do your development in a VM to recover from the inevitable crashes. The reason for C will be quite clear, but tooling will suffer.

Targeting microcontrollers will be similarly well motivated at a higher degree of awkwardness.

</comment><comment><USER14> C/C++ didn't truly click for me until I had learned assembler. (Helped my understanding of every other language too.)

<comment><USER8> Assembly didn't really click for me until I learned computer architecture :p

You can always go one level down, but I would hardly say you need assembly for c or c++.

<comment><USER14> Haha :) True, so I propose adding computer architecture to the things to learn about. Not because I think it is NEEDED but because It was a great benefit in my experience. Just a little goes a long way.

</comment></comment></comment><comment><USER15> Find a slow part of your Python/Ruby/Lua application that could use some speeding up and then write an extension for it in C.

Some useful reading:

[http://www.swig.org/](http://www.swig.org/)

[http://dan.iel.fm/posts/python-c-extensions/](http://dan.iel.fm/posts/python- c-extensions/)

[https://blog.jcoglan.com/2012/07/29/your-first-ruby- native-e...](https://blog.jcoglan.com/2012/07/29/your-first-ruby-native- extension-c/)

<comment><USER16> I agree with @hackerboos, definitely write a c-extension. It will not only enhance your knowledge of python but you will also learn C/C++ during the development. I did something similar wrote a ruby c-extension [https://github.com/chaitanyav/fibonacci](https://github.com/chaitanyav/fibonacci) for fun. Also, checkout the CS107 videos on youtube which are C based (look for cs107 stanford).

you can also try writing the core utils using your newly learned C/C++ skills.([https://github.com/chaitanyav/cprograms](https://github.com/chaitanyav/cprograms))

</comment></comment><comment><USER17> Some advice I can offer, be very very careful of the quality of resources you use to learn C and C++. In particular look at the year the book/tutorial/etc. was written and try to get stuff that was written or updated recently. Both languages have been around for many years and evolved quite a bit. Advice about how to use C++ in 1990 is vastly different than how to use it in 2014 with modern C++ versions.

Also read some reviews of the book before you spend any time reading it. The mid 90's were a really bad time for C++ in my opinion since it was kind of a new language and being pushed heavily as the default 'learn computer programming' language (which Java later usurped). This means there are tons of very badly written and confusing resources that do more harm trying to teach C++ than actual good. Stuff like Deitel's C++ How To Program, etc.

For C++ in particular I can recommend:

Thinking in C++ ([http://mindview.net/Books/TICPP/ThinkingInCPP2e.html](http://mindview.net/Books/TICPP/ThinkingInCPP2e.html)) Although it's getting a little old, I think this is a great resource for someone just picking up the language.

A Tour of C++ ([http://www.stroustrup.com/Tour.html](http://www.stroustrup.com/Tour.html)) Great small intro to modern C++ programming, by the creator of the language.

<comment><USER18> +1 on A Tour of C++. ~200 pages that do a fantastic job of introducing the language.

</comment></comment><comment><USER19> I researched this same question back in 2011. One of the most recommended books is "Memory as a Programming Concept in C and C++":

[http://www.amazon.com/Memory-Programming-Concept- Frantisek-F...](http://www.amazon.com/Memory-Programming-Concept-Frantisek- Franek/dp/0521520436)

A rather expensive book but stellar reviews. I borrowed it from the library. It's very concise too.

For C++ a lot of people still recommend "Accelerated C++":

[http://www.amazon.com/Accelerated-C-Practical-Programming- Ex...](http://www.amazon.com/Accelerated-C-Practical-Programming- Example/dp/020170353X/ref=sr_1_1)

because it teaches you "canonical" C++ instead teaching you "C with classes," which seems to be a common complaint among veteran C++ programmers. It's very readable too.

I'm going to pick up "Writing Great Code":

[http://www.amazon.com/Write-Great-Code-Understanding- Machine...](http://www.amazon.com/Write-Great-Code-Understanding-Machine- ebook/dp/B0096FEJGQ/ref=sr_1_1)

because it explains computer architecture. Once you start programming in C/C++ you are much closer to the metal and having an understanding of the architecture will lead to better choices.

</comment><comment><USER20> I would usually think of myself as a high-level langauge developer. I've recently been working my way through [http://buildyourownlisp.com/](http://buildyourownlisp.com/) \- Which I'm seriously enjoying.

It's doing a great job of teaching me C, while also reminding me how great high level languages actually are!

</comment><comment><USER21> Don't be too afraid of pointers - you're already using them if you're using Python when you work with mutable structures.

        >>> a = {'foo': 0}
        >>> b = a
        >>> b['foo'] = 1
        >>> a['foo']
        1
        >>> id(a)
        140428021358832
        >>> id(b)
        140428021358832

`a` and `b` are just pointers to the underlying structure. The only difference is that Python is taking care of the dereferencing for you, whereas in C you would have to explicitly dereference the pointer.

That's all there is to them. It's a reference to another location in memory, which, when dereferenced, refers to that other location. In pseudocode:

        >>> b = 1
        >>> a = &b
        >>> b = 2
        >>> a*
        2
        >>> a* = 3
        >>> b
        3

</comment><comment><USER22> Get yourself an Arduino or some other similar cheap hardware dev kit and build some project for fun? It's a start.

<comment><USER23> That's what I was going to say - you can really appreciate when pointers are useful if you manipulate registers or memory-mapped I/O.

</comment></comment><comment><USER24> Take a look at Nim. It is extremely efficient (since it compiles to C) and clean, and will allow you to incredibly easily interface with C or go down to the low level.

[http://nim-lang.org/](http://nim-lang.org/)

Also, take a look at DCPU-16 stuff. Assembly might be more fun to play around with. [http://www.dcpu-ide.com/](http://www.dcpu-ide.com/) Also x86 assembly. Its exciting because you can get incredible performance and get insight into how things work at the lowest levels. Google x86 assembly tutorial. Also the DCPU-16 has awesome peripherals like the display and even a 3d vector display.

Then when you can come at it from the lowest level pointers are less of a big deal. You can think about making your own OS, (look for a tutorial) and then it will be a more natural progression to C (with pointers).

</comment><comment><USER25> _I can 't think of anything that I will like to make in C/C++_

Let me address the motivation issue.

C/C++ strength is speed. Write a simple piece of computation in your favorite language (Ruby for instance). Write the same in C and measure the time it takes.

Once you see how slow Ruby is, you may get excited by C enough to continue exploring it.

<comment><USER26> C/C++ can also produce data structures that are more compact than any managed language could allow. For example, one of the oldest tricks in raytracing is to stuff a few bits of information into the lower bits of a float, so that you don't have to waste a whole byte encoding the metadata for a kd-tree node. But even this is ultimately related to speed. It allows the programmer to squeeze a whole lot into a cache line.

<comment><USER27> There's also the advantage of sequential memory access, it's generally not idiomatic in higher level languages to use contiguous arrays.

</comment></comment></comment><comment><USER28> The other answers sound like they're from people who aren't new to the idea of pointers...

Try simple data structures first. Having linked list nodes that actually uses minimal memory (pointer to next node, a data field) is actually pretty exciting. Implement all the operations (get index i, remove index i, etc) because that's where a lot of the insight will come from. Then you can move onto binary search trees and other more complex stuff.

One of the most useful insights I've read was from "Effective C++", which said (paraphrasing) "C++ is a federation / family of languages which work together". Learn the C subset of it first so you're not overwhelmed with available features, and then you can get back to using templates / STL / the other languages later.

</comment><comment><USER29> Why do you want to learn C or C++ if you can't think of something you'd like to use them for? I've written a fair bit of assembler and occasionally still do tiny projects in C or C++, but my language of choice (by far) is the highest level general purpose one I've come across.

IMO you don't _need_ to know either C or asm to be a great programmer. Read a book on operating systems instead and you'll know all you need to about hardware. Add a thorough coverage of algorithms and data structures, and you're in a better position to write effective software than many I've worked with.

<comment><AUTHOR> Because I don't want to get that feeling when I'm reading some C/C++ and have absolutely no idea what's going on.

</comment></comment><comment><USER30> If you need an interesting project to motivate you, you could try to build something with Arduino. It requires purchasing some hardware, of course, but it's cheap enough to play around with.

</comment><comment><USER31> I'd say you just get the book "C Programming: A Modern Approach" by K.N. King. At the end of every chapter there are some exercises & challenges.

It's an excellent book (see the ratings on Amazon) and also fun to read through.

C should be much easier to learn than C++. The language is much more basic feature-wise and the standard C library is very small indeed.

[0]: [http://www.amazon.com/Programming-Modern-Approach-2nd- Editio...](http://www.amazon.com/Programming-Modern-Approach-2nd- Edition/dp/0393979504)

</comment><comment><USER32> I have many timed tried to embark on this very journey and always gave up when I realized I had none of the conveniences available to me as I do with the Java platform.

I thought of all the conveniences of Spring injection, a bazillion java libraries nicely managed by maven etc. The ecosystem available to me in Java is what always made me give up. I guess I never needed to learn C/C++ badly enough to justify the time investment.

</comment><comment><USER33> Telling us what type of personal projects you liked doing in the past would be very helpful.

Pick something fun to write (to you) that is normally written in a lower level language.

For me C and C++ were fun to learn by writing graphics applications (ray tracers are great for this) and physics simulations (a solar system simulation maybe). Optimizing these to be as fast as possible is a great way to learn about pointers and manual memory management.

</comment><comment><USER18> You could try doing a cross-platform (iOS/Android) game with a C++ framework like Cocos2d-x. I read through Cocos2d-x By Example ([http://www.amazon.com/Cocos2d-X-Example-Beginners-Guide- Enge...](http://www.amazon.com/Cocos2d-X-Example-Beginners-Guide- Engelbert/dp/178216734X)) last year and it was pretty good. Didn't assume a prior knowledge of C++

</comment><comment><USER34> You don't necessarily have to do low level stuff with C/C++. Sure you'll still be dealing with pointers etc, but my point is it doesn't have to be very low level just because it's C/C++. Depending on what you want to implement it might be a good idea to use a framework such as Qt. [http://qt- project.org/](http://qt-project.org/)

</comment><comment><USER35> You need to understand how machines work if you want to be a good C/C++ programmer. I suggest Berkeley's CS 61C video lectures: [https://www.youtube.com/playlist?list=PL58D76972AD4CB040](https://www.youtube.com/playlist?list=PL58D76972AD4CB040).

</comment><comment><USER36> Head First C is an excellent book. It introduces some concepts such as variadic functions and function pointers too early. You might need some supplements on them. I suggest reading through the head first c book and watching youtube videos on topics, you don't quite get at the first time.

</comment><comment><USER37> I'd say just find a good tutorial type book. I got an adequate understanding of pointers from reading _C++ for Dummies_. Anyway, don't be afraid. Pointers require care to avoid various issues, but they're fundamentally a simple concept. You'll be fine.

</comment><comment><USER38> I think you just need an incentive. Try to work on problem where performance really matters such as physics engine or scientific simulator if you are not into OS stuff. You will learn to hate automatic memory management soon enough ;)

</comment><comment><USER39> Read the part on pointers in the "The C Programming Language" book. Or go to your favorite coffee shop with a C-buddy, buy him some drinks and let him explain ;)

</comment><comment><USER40> Do you really need to learn a another language, when you don't like its features? All general-purpose programming languages can solve the same problem.

<comment><USER13> _" All general-purpose programming languages can solve the same problem."_

That's not really true, in general. They can all compute the same things. Some problems have constraints beyond "what is computed".

<comment><USER40> I don't get it. What do you mean?

<comment><AUTHOR> Performance reasons

<comment><USER13> That's much of it. Another reason might be "no one has written a XYZ interpreter for the target architecture", which may be due to performance or just obscurity. Another problem constraint might be pedagogical - if the problem you are trying to solve is "show how to do X in language Y" then of course language Z can't be used - though that example could reasonably be dismissed as trivially true. I'm sure we can come up with some more if we try.

</comment></comment></comment></comment></comment><comment><USER41> Build some system utilities. If you are on Linux/OSX try to program a subset of the features of one of your favorite command line tools.

</comment><comment><USER42> Perhaps use GO or RUST?

Also, I think pascal is great (I use it professionally/Delphi) and the way how pointer and raw code is used is not scary.

<comment><USER43> (Btw neither Go nor Rust have all-caps names.)

</comment></comment><comment><USER44> Have you tried Go? Might make the transition a little easier. UDP hole punching is always fun with C/C++.

<comment><AUTHOR> Yes, I did. Absolutely HATE the syntax. Not gonna use it anytime soon.

</comment></comment><comment><USER45> Download a Commodore 64 emulator and learn ROM BASIC. Write a game in it. After that, try learning C again. You'll be infinitely thankful for such high- level constructs as functions and structs. And you'll understand what they do a bit better, probably.

Edit: I'm sorry if this sounds condescending, but I really mean it. Basic is about one step above assembler - you get variables and nice access to some basic IO, but it's much closer to the metal than C. It really doesn't even have functions, you have to do GOSUB/RET yourself. It's also an extremely simple language. But it will give you an idea on how computers work at a basic level. After that you should have a much easier time grokking C.</comment>


'TSB gave me access to someone's £35,000' - <AUTHOR> http://www.bbc.co.uk/news/uk-43860449 <comment><AUTHOR> This appears to be an IT failure comparable to the 2012 and 2015 IT failures at the Royal Bank of Scotland. These involved multi-day / multi-week full/partial outages, and multi-million pound fines.

FT: [https://www.ft.com/content/9178ef60-46d9-11e8-8ee8-cae73aab7...](https://www.ft.com/content/9178ef60-46d9-11e8-8ee8-cae73aab7ccb)

Background: TSB is a UK bank. They had a planned 50-hour maintenance window over the weekend (Fri 16:00 - Sun 18:00), to move away from Lloyds's systems (following the "un-merger" in 2013-2014). This went wrong, in what is likely to become a textbook example of an IT failure.

</comment><comment><USER2> It must be asked, has any bank ever made changes to their IT systems and got it right first time?

It just seems like whenever they even glance at their business-critical systems, they wind up in a truly bizarre state like this.</comment>


Oracle NoSQL Database - <AUTHOR> http://www.oracle.com/technetwork/database/nosqldb/overview/index.html

<comment><USER2> Disclaimer: I'm the competition.

It's basically BerkeleyDB Java edition, probably BDB High Availability (HA) Edition with some layers on top.

They're doing pre-sharding with ranges mapped onto replica groups, which are probably BDB HA instances. Since BDB supports transactions, they claim transaction support. But it only works if your keys fall in the same replica group (see other comment in thread). (Nothing wrong with that.)

There's no mention of shard migration, so they probably don't support it right now. (Shard migration is hard to get right.)

It's Java only.

BDB HA uses something which is said to be like Paxos, so they're claiming that (although they only mention it for master election), but they also have other consistency modes, which is interesting.

Looking at the plots:

Running on 32 replica groups (96 nodes) they were able to get 350K insert/sec, which is ~10K/s per replica group, with 1K values that is 10M/s per replica group. That means the local BDB instances just wrote everything to the log files, good luck with that. That's assuming they were running BDB in transactional mode, which is the only mode that actually keeps your database intact in case of a crash.

According to the 10M/s figure, it should have taken them 1.8 hours to load the data. According to the latency number, it should have taken 91 hours, so one of them is wrong. Probably the latency numbers, they were probably batching ~100 inserts and that's what the latency numbers are for.

In my NoSQL startup, our first product used BDB as the disk backend. In our second product iteration, getting rid of BDB was one of the major driving forces. I wouldn't touch it with a ten foot pole.

<comment><USER3> This might be too business sensitive to answer, but what did you replace BDB with as your disk backend? Build your own, LevelDB, or other...?

BDB certainly has its problems, but I still haven't found a better alternative.

<comment><USER4> Our in-house solution uses InnoDB (via MySQL even, not directly) and find it to be much more stable and performant than BDB for a number of key/value workloads.

</comment></comment></comment><comment><USER5> Download page is a perfect trollwork:

       Oracle NoSQL Database, Community Edition

       The Community Edition is licensed under an open source
       license. Please see the license file in the downloaded
       release for details.

Okay, I can read the license agreement once I download it. Let's download...

       Oracle NoSQL Database, Enterprise Edition

       You must accept the OTN License Agreement to download this
       software.
       ( ) Accept License Agreement |  ( ) Decline License Agreement

To download the license I have to agree to it without reading.

       Download files to be available soon. Please check back in mid-
       October.

Oh, so I can't even download it.

</comment><comment><USER6> I find this kind of amusing 1\. May 2011 Oracle writes a white paper on why NoSQL is not reliable and future proof for serious business [1] 2\. Removes the original the document [2] 3\. Releases their own own NoSQL db

[1] [https://docs.google.com/viewer?a=v&q=cache:G4pI4ZOkzWYJ:...](https://docs.google.com/viewer?a=v&q=cache:G4pI4ZOkzWYJ:www.oracle.com/technetwork/database/debunking- nosql- twp-399992.pdf+oracle+debunking+nosql&hl=en&gl=uk&pid=bl&srcid=ADGEESiaUPuEdyJ9cnDc_GzgsfsNq6UytDZeO5f0pgDJyUeo7x-xfe2W091nseq4s1cIl9lZ79jmGT0TRpE5PF8svROWbJSjcbrm6TXb2AWfM2TaAa6Z80dEupN3oSFzZG6y9mWBsgTd&sig=AHIEtbSXOrH6n87xP4yC4bqqMaLHSMBBNg)

[2] [http://www.oracle.com/technetwork/database/debunking- nosql-t...](http://www.oracle.com/technetwork/database/debunking-nosql- twp-399992.pdf)

<comment><USER7> "Do you really want to be contributing to an open source effort?" dropped my jaw when I read it.

The paper is basically "You should pay us lots of $$$ because you're dumb."

</comment></comment><comment><USER8> Calling your key-value store "NoSQL Database" is like calling your high-speed train "Non-Car Transportation." (It could also describe boats, planes, zeppelins, buses depending on whether you think they count as cars or not...) This post, as well as that other post about why you _shouldn't_ use a NoSQL database, suggests that Oracle as a whole is completely missing the point of NoSQL.

<comment><USER2> I don't really understand why calling a key-value database a "NoSQL database" is incorrect in your opinion. It's one of the many data models (or lack of) that falls under this umbrella term in 2011.

<comment><USER9> The name "NoSQL" doesn't give much technical insight into the product, so why name it so?

Marketing, I'd say. It's a very buzz-y term.

<comment><USER2> It's not supposed to. It's supposed to position the product in the market.

</comment></comment></comment></comment><comment><USER10> "Oracle NoSQL Database, the one you don't need"

</comment><comment><USER11> I'm guessing that this post is in response to this one:

<http://news.ycombinator.com/item?id=3066022>

Well played.

<comment><USER12> "Download files to be available soon. Please check back in mid-October. "

just as i wanted to ask whether anybody knows was it developed by Oracle or bought from outside. I guess the correct answer - they will buy it as soon as somebody develops a scalable transactional key-value store with replication, failover and transparent partitioning support. Btw, how about making some good money by hacking such a store in the next 2 weeks :)

</comment></comment><comment><USER13> Interesting that it has transaction support... I don't believe many of the mainstream NoSQL options support transactions.

Having had the joy of installing an Oracle database in the past I nearly spilt my tea when I read "Easy Administration"

<comment><USER2> "Oracle NoSQL Database supports the ability to bundle a collection of operations together using the execute method, providing transactional semantics across multiple updates on records with the same Major Key Path."

In other words, ot supports transactions as long as the key-values are on the same replica group (as they call it). That's easy for them, since they just run a BerkeleyDB HA instance per replica group, and that supports transactions.

</comment></comment><comment><USER14> Random sidenote: I haven't downloaded but if this is a community version of Oracle Coherence (nee Tangasol) it might be reasonably badass. As an ex-oracle employee, I've heard the insider view from friends that unlike most oracle in- house or acquired software, Coherence is the real deal, scales as advertised, and except for the $100k per enterprise box price-tag, should have taken the storage world by storm.

</comment><comment><USER15> I half expected this to be an Oracle database that only allowed you to create tables with two columns.

</comment><comment><USER16> Is this the successor to BerkeleyDB? Sure sounds like it.

<comment><USER5> Correct,

      "Oracle NoSQL Database  is build upon the proven Oracle
       Berkeley DB Java Edition high-availability storage engine"

[http://www.oracle.com/technetwork/database/nosqldb/learnmore...](http://www.oracle.com/technetwork/database/nosqldb/learnmore/nosql- database-data-sheet-498054.pdf)</comment></comment>


Ask HN: Do you want your website reviewed? - <AUTHOR>

Hi HN!
I'm a Web Product Designer, and I'm looking for something fun to do. So why not review peoples' websites? I have a few years of experience in building websites (SaaS, community, blog, etc.)
I can give design/UI/UX/features/pricing/SEO feedback for free. In exchange I might make the review public on my blog.
Interested? Simply fill in this quick google doc form: http://goo.gl/VdQY9V
Feel free to share the link to non-HN members.
Thanks! <comment><AUTHOR> Clickable: [http://goo.gl/VdQY9V](http://goo.gl/VdQY9V)</comment>


Ask HN: What are books/hacks/actions for becoming an influencer at my workplace? - <AUTHOR> All ideas are welcome, personal experience is preferred. Shoot. <comment><USER2> Whatever specialized skills you excel at -- (1) hone them in at an A-list company. Then, (2) jump ship for a B-list company. It's important in (1) that you surround yourself with people with greater skill than you; these people will provide mentorship. In (2), You'll be the smartest person in the room. With less competition, it'll be easier for you to rise.

<comment><AUTHOR> That sounds like an interesting idea, I assume the move from (1) to (2) involve decrease in salary/prestige and that's also something to consider.

<comment><USER2> Prestige, perhaps. Salary, you'd be surprised. There's many companies that are near-FANGs (but aren't literally FANGs) and will compete on total compensation. It should be noted that (2) can be done without sacrificing compensation.

</comment></comment></comment><comment><USER3> "How to Win Friends & Influence People" still stands as one of the most prolific books on this topic for decades...

Also, my company has weekly Lunch-N-Learns, I give 1-2 a year on various topics related to writing, testing and deploying software just like I would at a meetup group.

<comment><AUTHOR> Actually heard about it long time ago, and I definetely search for soft skills books. Will read for sure, thx.

</comment></comment><comment><USER4> What is your end goal?</comment>


The new boomtowns: Why more people are relocating to 'secondary' cities - <AUTHOR> https://www.washingtonpost.com/realestate/the-new-boomtowns-why-more-people-are-relocating-to-secondary-cities/2018/11/07/f55f96f4-d618-11e8-aeb7-ddcad4a0a54e_story.html <comment><USER2> I tend to think that a lot of migration trends are obscured by currency-based accounting rather than looking at numbers of people and their preferences.

I don't know a lot about the US, but here in the UK, in a city like London I don't think it's useful, for example, to say people are being 'priced out'.

What's actually happening is that those that own property as of N years ago are permanent residents, and will never really sell their properties, so it's just full. You have suburbs full of families that will never move out, and if they do move out, will just rent the building out rather than selling.

The indirect effect of that is that prices go up, but you're really just seeing that the commuter belt of semi-detached homes is full and that's that.

It's common to talk about knocking down homes or building more homes or whatever. The thing is that for the most part, only non-residents actually want that (because for them the choice is between high density or not living there). If you own a decently sized family home with a garden you're just not going to give it up and move into a block of flats. It's a strict downgrade in every sense of the word, even if the square footage is the same.

No-one wants to live in a block of flats unless they're too poor to afford a house.

So yeah, the answer is to go elsewhere. Go to a city that actually welcomes newcomers. Places like London are no longer income-based, they're wealth- based. Starting from scratch here you're at an enormous disadvantage.

<comment><USER3> Having lived in a home and in high density high rises I couldn't disagree more about the perspective that it's a downgrade.

24/7 doorman means someone to sign for packages.

A community of people who presumably are in your socioeconomic class will be living with you. These are folks you can interact with and depending on your stage in life you may potentially do business with, befriend, start children's play groups with, or even date/marry.

Big communities tend to have nice amenities that you'd only find in a country club all inclusive.

Maintenance of the high rise unit is often included in the fees or rent.

These communities tend to get better access to interconnect technologies like fiber.

There will tend to be more options for healthy foods, increased opportunities for walkable restaurants and other forms of entertainment as the population density of the area increases.

And more...

Basically, my preference 10/10 times would be to live in a high density tall building over a single family home in a neighborhood.

<comment><USER2> Repeating my post from below:

I'm obviously simplifying. Luxury apartments downtown are different to the sort of monstrosities you see in suburbs.

Moving from a family home in a suburb into the city =/= moving from a family home into a block of flats on the same street. The latter is what I am calling a 'strict downgrade'.

<comment><USER4> I think you're getting downvoted here or at least misunderstood because in America, suburban apartments are usually very nice in their own regard. So people don't see them as downgrades unless you actually need the space of a full house (eg. For raising a family)

<comment><USER2> Possibly.

I think the misunderstanding comes from making a comparison that I obviously haven't attempted to, and that no reasonable person would (basically, a strawman).

I can't see how a suburban apartment can be as nice as a suburban house unless you're making a cost argument.

Yes, perhaps an apartment at price X is better than a house at price X. (Perhaps at price X a house doesn't even exist).

The point is that someone who already owns a decent home doesn't have to make that decision, and that describes huge swathes of the city. The financial decision is for newcomers who are attempting to push these people out (or push them in to inferior conditions).

If you have a 4 bedroom semi in Zone 4 London then I cannot see an equivalent apartment. It doesn't even make sense to me. No apartment block on the same street could be nicer.

Only if you compared it with, say, some skyscraper in the City does it make sense to even talk about it, and that's a complete lifestyle change.

<comment><USER5> Saying it's suburban housing, or detached homes is a pure straw man argument as people can move from a suburban home to an apartment in the city very easily.

If you can sell a house, move to an apartment and net X00,000 $ that's very attractive. So price difference are really part of the equation.

Also, people might prefer a detached home for ~30 years when having kids, but their is a constant stream of people exiting that life stage. How and where to downsize is a real question people deal with daily.

</comment></comment></comment></comment></comment></comment><comment><USER6> I see this going one of two ways. Either tech decentralizes and spreads out into places like Atlanta, Austin, and Nashville, or these jobs continue to further concentrate in SF/NYC/Seattle and the other cities fall way behind.

In the first case, I think it's likely that inequality will continue to increase across the U.S. and the median American will be worse off for it; i.e., there will be a positive feedback loop where winner cities take all.

In the second case, I think inequality will decrease, and the tech industry (and similar "big city" industries) can play to each region's cultural strengths. I think this inter-city competition would be a positive effect and lead to accelerating innovation across a variety of different fields. Judging by recent Amazon/Google news though, I fear the first case is more likely to happen.

<comment><USER7> I agree, I'll also note that it seems with all of the modern communication tools that satellite offices in secondary and tertiary markets wouldn't be as big of a deal now as it would have been 20 years ago.

<comment><USER8> It's also no longer necessary for satellite offices to duplicate headquarters functions. The work done at HQ is infinitely reusable. HQ has near-perfect visibility into the goings-on at each office, so they no longer need independent decision making capability. And the economics have changed to favor quality over quantity: 100 top engineers are better than 1,000 cheap ones. Where are you find the highest concentrations of top talent?

</comment></comment></comment><comment><USER9> For how long, I wonder. Many of those cities are intensely adverse to new taxes and public works that make larger cities livable. If they keep growing, they'll end up in a similar if not worse situation as the coastal cities. A big reason the coastal cities (LA, SF etc) are unlivable is due to a lack of investment in mass transit and housing.

<comment> chroem- >new taxes and public works that make larger cities livable

I thought people are moving specifically because large cities are _un_ liveable. The article actually cites a more lax regulatory and tax environment as one of the reasons for why people and businesses are moving.

<comment><USER9> Sure, and then the realization that cities need to pay for things like infrastructure and transit to support their growing (and increasingly dense) population, and either way a a possibly unlivable situation develops. High taxes/high rents, or low taxes but zero infrastructure or support. No US city has managed to figure out the formula. That low tax situation has only lasted because there was previously no need for real serious spending.

<comment><USER10> Wouldn't the cost of infrastructure scale with the increased tax revenue from the increased population? I would also assume that infrastructure is actually cheaper per capita if population density increases, which would imply lower tax rates.

<comment><USER9> It depends on how the infrastructure is funded. In some states, that budget is based on property taxes. In some states, income and state taxes. It's not really a one size fits all problem. In some cases, the money is there but the voter will is not because there's a real "tax is theft" movement in many states.

</comment></comment></comment></comment></comment><comment><USER11> I do not know nearly nothing about USA real estate market however in most part of Europe the number of people think cities as a workplace or an interim location for students, young workers or people who can't afford anything better is skyrocketing, in few EU countries there is already a reasonably developed "distributed economy" but in others (like Germany, Italy, Spain) there isn't so many choose small towns because being distributed means also have far less services and "urban comfort" nearby.

I suspect that this situation start to be common in any western/developed world. Perhaps the USA are a bit late since their cities are generally "newer" than EU so they are probably "less compressed"/with a lower mean density that allow more green spaces and generally a little bit better mean life quality (something like you do not need 10' to go from A to B + 20' to find a park place around B or it does not take 40' for 15Km trip in peek hours).

</comment><comment><USER12> People have been moving out of high-cost urban centers to cheaper areas since at least the 50s. And the "secondary" cities the author mentions are quite massive cities. Second, the authors narrative that people are moving "from coastal cities to "secondary" cities" is not factually accurate in the narrowest sense: LA, NYC, and San Francisco (which was a secondary city not that long ago) continue to have population growth. People are still moving to these cities, except NYC which has leveled off a bit. And most of the secondary cities the author mentions are also coastal cities, they're just different coastal cities. The only phenomenon is one that's as old as the industrial revolution: increased urbanization.

<comment><USER13> In fact Phoenix is on the list of "secondary cities" and is the 5th largest city in the US.

<comment><USER14> "Secondary" is not a matter of size but about socioeconomic influence

</comment></comment></comment><comment><USER15> The conversation here is interesting to contrast with [https://news.ycombinator.com/item?id=18403497](https://news.ycombinator.com/item?id=18403497).

</comment><comment><USER16> In the US, a lot of these secondary cities are in states run by conservatives. As someone who cares about reproductive rights, that concerns me. I have a friend who had her amniotic sac rupture while in Arizona, and had to wait 72 hours before she could have the no-longer-viable fetus removed. I wouldn't wish that on anyone, and I worry about what laws I would be subject to in states like that, even if the city or neighborhood I lived in was populated with people who valued those rights in the same way I do.

<comment><USER17> There are plenty of people who feel the same way about the laws in New York and California. Having strong talent pools, and economies, in cities with different political climates means more people can live somewhere they're politically aligned and still have decent jobs.

</comment></comment><comment><USER14> $1500 for a 1 bedroom in LA seems like a good deal?

<comment><USER18> The point is people are getting more for less elsewhere. For people working normal jobs, California wages don't even begin to cover California costs.

<comment><USER14> I guess it depends on what you value. I pay more than $1500 in SF for half a house, but I don't have a car and my commute downtown is very easy on public transit. I don't have a lot of stuff so don't need a big, new place either. If I saved 25% on rent by moving to a city with non-existent poor public transit (like Atlanta) I'd just end up paying close to what I pay now by upgrading my living situation (new construction apt and no roommate) and factoring in a car and commute time.

<comment><USER18> It also very much depends on your situation. If you're a single young tech worker, SF is great. If you've got kids or you're not working in tech, SF is the kind of place most people will actively avoid.

<comment><USER19> Yeah, very much situation dependent. I started working remotely while in the US and then decided I would just move out of the country. 2br apt for 750$ per month. I paid that much for a room in Boston in a Apt that I had to share with 2 other people that was old and had no amenties… yeah not going back to that. My working motto now is "make my money in/from the US, spend it elsewhere".

</comment></comment></comment></comment></comment><comment><USER20> Outline: [https://outline.com/KzcRSa](https://outline.com/KzcRSa)</comment>


Google Announces Pixel 4 - <AUTHOR> https://store.google.com/product/pixel_4 <comment><USER2> > 3 years of security and OS updates will keep your phone performing at its > best.

I'm still using an iPhone 6s which has gotten its last major iOS update after owning the device for 5 years. It will continue getting security fixes for another year until iOS 14 is released.

iPhones last twice as long as Pixel devices, which is a big plus when you must have a secure phone.

<comment><USER3> I'm using Google/Motorola's Nexus 6 with LineageOS, which was released a year before your iPhone 6s and it still gets the latest updates.

Meanwhile, my mid-2011 Mac Mini was cut off from getting macOS updates after High Sierra last year. But because it allows the installation of other operating systems it still can dual-boot the latest Windows 10 and the latest Debian Bullseye just fine.

The only way for any general computing device to last is if it gives the user freedom to control the software that runs on the device. All iPhones suppress this freedom which means game over for longevity.

<comment><USER4> with checkm8 theoretically we will see greater longevity, against apple's will that is

</comment></comment></comment><comment><USER5> Seems like Motion Sense is not working in some countries, specifically, Japan:

"²Not functional in Japan and may not be functional in other Pixel countries. Motion Sense is functional in the US, Canada, Singapore, Taiwan and most European countries."

"Check that you're in a country where Motion Sense is approved. Currently, Motion Sense will work in the US, Canada, Singapore, Australia, Taiwan, and most European countries. If you travel to a country where it's not approved, it won't work."

What's up with that? Is there any regulation against moving your hands in front of the phone?

The only thing I can think of is the "kind of" mandatory shutter noise when using the camera on Japanese phones, to avoid up-skirt photos and the like. An I say "kind of", because depending on who I've talked to, some say it's a mandatory law, some others say it's a good faith agreement between manufacturers.

Anyway, maybe, if the hand waving stuff is detected using the camera, might be problematic on some countries as in Japan.

<comment><USER6> It uses a radar device in the phone, so it's probably due to airwave regulations.

<comment><USER7> It is quite near 5g frequencies in some countries.

</comment></comment></comment><comment><USER8> The star tracking feature of the astrophotography mode definitely has me interested. I'm disappointed to see the continued lack of battery capacity on the smaller phone though. While I'd love a larger battery, I'm one of the unfortunate ones whose small hands can already barely reach across my Pixel 2's phone screen -- much less the top section.

I'm also incredibly excited about the face unlocking feature -- I owned a Pixel Xs for about a week before returning it, and face unlock was my absolute favorite feature. It's very seamless especially compared to fingerprint unlock.

As an aside, Marc Levoy, who spoke at the Google event today is a Professor Emeritus at Stanford, and has a great series titled "Lectures on Digital Photography" available for free on Youtube: [https://www.youtube.com/watch?v=y7HrM- fk_Rc](https://www.youtube.com/watch?v=y7HrM-fk_Rc)

</comment><comment><USER9> Fingerprint sensors are so convenient that they have become must-have features on my phones. Removing it from the Pixel 4 is an unfortunate step backward in terms of everyday usability.

<comment><USER10> How is the removal of a fingerprint sensor a step back in usability? The facial unlock is less intrusive and requires the user to do less to interface securely (minus any privacy concerns) with the phone.

<comment><USER11> Fingerprint sensors work in the dark. Facial unlock doesn't.

Edit: looks like I'm probably wrong on this one

<comment><USER10> Facial Unlock does work in the dark because it uses IR, and not just a camera.

<comment><USER12> Which tells you it can be tricked with just the IR picture.

<comment><USER10> Mind explaining what an IR picture is?

Facial Unlocking isn't just using image recognition. Face ID, specifically, using point mapping across a face, creating a 3D map of the face and reference points to unlock the device. I don't think a flat 2D image, even with IR photography, could trick a system like this.

A Hollywood grade prop mask of someone's face might be able to trick it, but that seems like a huge outlier.

<comment><USER13> Even a hollywood mask wouldn't trick it unless it had some way to simulate the temperatures across the face. IR determines the points and the relative temperature to make sure the face is live.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> I loved Marc Levoy's presentation. I wonder why no video improvements though - dynamic range is so important in a camera, why limit it to just photos? 10bit h265 would be nice, perhaps with some of that hdr+ tonemapping.

Would have been nice to see a wide angle lens too. The radar thing feels gimmicky.

<comment><USER15> The photo improvements are a result of taking multiple pictures and processing them into one image which you can't do with video.

<comment><USER14> You can, Red Epic does it with what they call HDRx, Magic Lantern does it with Dual ISO, zcam E2 do it with WDR - all more or less the same things - you take two exposures for every frame. Doesn't always work for fast action, but for some shots it really helps. This is a really good blog post on the topic - [https://medium.com/@jasonzhang_22759/wdr- of-e2-369a12d39a7f](https://medium.com/@jasonzhang_22759/wdr- of-e2-369a12d39a7f)

Also, if your image bit depth is high enough, you can create "virtual" multiple exposures from a single image and do exposure fusion. Google already do this with HDR+ on stills.

The bit depth stored from the sensor could be a lot higher than the current 8bits most mobile phones use for video, if you have full control of the ISP. Cinema cameras can process and store 12-16bit video (Red, Blackmagic, Arri).

Even Apple does this to some degree with their "extended dynamic range" video on newer iPhones, though the saved files are still 8bit.

</comment></comment></comment><comment><USER16> Not impressed at all this iteration. I may have to wait for Pixel 5, or I'm tempted to return to the iPhone solely so I can take advantage of the Apple Watch. I had hoped for better specs, better phone design, and most importantly - I'd have liked the fingerprint reader to have remained. I really don't want to be a voluntary part of facial recognition.

<comment><USER17> I'm currently also tempted to switch over to the iPhone for the first time since 2012. Even though there's a pretty large number of Android phones, I'm not sure if I'd want to buy anything other than a Google or a Nokia phone. And unfortunately, neither of those has any offerings that I find appealing. With other Android manufacturers I just can't trust them to deliver software updates on time or for a prolonged period of time.

<comment><USER18> I've been on Android since the G1 (G1, Nexus One, Nexus Galaxy, Nexus 5, Nexus 6p, Moto Z2 Force) and recently made the switch to the iphone 11. It's been a little difficult making the transition, but nothing compared to the hell that I've experienced with the last couple of devices I've owned. The Lenovo and Huawei were just disasters. 6p's hardware was utterly unreliable, and Google couldn't care less. Motorola just gave up supporting the device, eventually canceling the planned upgrade to 8.1. Zero security updates for 8 months.

Looking back on this Android journey I have to say that in addition the usual diatribe about what's wrong with Android, I've grown concerned about the disposable nature of Android devices. You effectively get 2 years of use out of an Android if you're lucky. And once their time is up, it's off to the landfill. That doesn't take into consideration all of the replacement devices (3 Nexus 6P's) they sent you due to the quality issues abound.

I see family and friends still using their iphone 5s!!! And even if you upgrade your iphone sooner, rest assured that that phone will end up the used phone market or overseas. When I bought the iphone 11, they offered me $23 for my Motorola. (btw, I was thinking oh well i'll just keep it and use it with my Amazon Alexa moto-mod, but it refuses to work without a SIM card in the phone. More E-waste!!!)

I honestly feel a little better owning an iphone, not just because it's around a better phone, but because my e-waste footprint will be a little less.

(sorry about the rant)

<comment><USER19> Related, my girlfriend just bought a refurbished iPhone SE for $125. It works flawlessly, I think they were released 3 years ago now?

You can also sell (or trade) your iPhone after 3 years for 30-50% of the original MSRP, while android phones you can probably get zero.

</comment></comment></comment></comment><comment><USER20> Pixel 4

2800 mAh

Ughh... why can't they make a phone with bigger battery?

XL model has a decent size battery but it is way to cumbersome to use as mobile device and 2800 mAh is barely enough to last day (not to mention degradation over time).

Is it that i am in a filter bobble? But most of my friends and family complains about low battery or agrees with me that they would love a phone that last more then a day.

<comment><USER12> Moto G7 Power is great -- 5000mAh, and many features which consume less power and happen to be cheaper (lower res, slower clock). Not the latest and greatest but if you're away from power for a long time it's a good compromise.

<comment><USER20> Thanks for recommendation, I am actually looking for a replacement (or at least a reason to get newer phone :D ).

</comment></comment></comment><comment><USER21> The motion tracking / hand gestures / radar thing seems cool, but it also screams "3D Touch" to me. It'll be really interesting to see if apps successfully leverage it, or if it will fade away and disappear by the time Pixel 5 comes around.

<comment><USER22> Frankly I'm shocked at how anemic the radar chip demonstration and marketing materials are compared to what they demoed about the chip a few years ago.

Google had video showing how they could differentiate individual finger motion and motions like rolling 2 fingers together to adjust volume up and down.

What they're shipping with Pixel 4 seems to have exactly one gesture: swiping a few inches above the screen to skip songs back and forth or silence alarms and calls.

You know what else had this feature? The 2013 Moto X. And it didn't use a radar sensor, just a group of 4 light sensors, one at each corner of the face of the phone.

Granted, if what they demoed a while back is accurate, the radar chip is much more capable than a few light sensors, but what they're shipping and marketing is not that. Either they were not able to make the proof of concept work in a shipping device, or the final product is not as capable as it seemed.

</comment></comment><comment><USER23> I bought the original Nexus S and the Galaxy Nexus when they were released, and I was excited about the device and Android. Since Snowden, the ever increasing reliance on Google of many people and institutions via its cloud services, and the encroachment into our private lives via constant listening devices like Googles Nest, I want to get Google as far from my life as possible.

In the German version of this announcement, the first thing written under the title is that you if you order soon enough, you'll get a free Google Nest Hub with the phone. Well, uhm, no, please don't.

Further down, Google praises itself with "Stets an deiner Seite: Google Assistant ...", which means "Always at your side: Google Assistant ...". This is just creepy to me now.

I'm astounded by how much my perspective of Google has changed since a couple of years ago. Their marketing is off-putting to me now.

<comment><USER24> Thanks to Soli now it can track your moves even if you cover the screen and camera.

</comment></comment><comment><USER25> I was so ready to jump into a Pixel (long time iPhone user). I thought on- board voice recognition would be a game changer. This had to be the most lacklustre event I've seen:

      - Nothing on video.

      - No details on the processor (or most hardware specs).

      - Nothing on the forward-facing camera.

      - Nothing on battery life.

It honestly felt like Google watched Apple's presentation and then cut 2/3 of what they had planned.

Moreover, and this is purely a marketing-spin thing, the event had no energy. There were some super cool demos, and they were received with pure silence from the crowd. It was very weird.

<comment><USER13> Let's be realistic, though... the type of thing that would be a game-changer _and_ make a big buzz at an event like this just doesn't exist right now. Phones have gotten so advanced that the "next big thing" needs to be paradigm- shifting and completely redefining in order to get a sizable reaction.

Everything else right now is just iterative.

<comment><USER25> I really thought on-board voice would be a game changer. Not having to do the round-trip to the cloud to determine intent, and providing a conversational interface (i.e. "now send this to Pam") I thought would generate that buzz. It sure seemed to when Google announced that they had reduced this ML model to ~500mb so it could run locally.

In contrast, Apple's A13 chip's contribution to extend battery power is incredibly impressive to me.

</comment></comment></comment><comment><USER6> The radar chip is especially interesting. I remember being intrigued when it was presented by the ATAP team years ago: [https://www.youtube.com/watch?v=0QNiZfSsPc0](https://www.youtube.com/watch?v=0QNiZfSsPc0)

The team showed an impressive amount of cool stuff back then, it's nice to see one of these projects shipping on a flagship product. There's more info here on how it's used: [https://www.blog.google/products/pixel/new-features- pixel4/](https://www.blog.google/products/pixel/new-features-pixel4/)

EDIT: found the original presentation: [https://www.youtube.com/watch?v=mpbWQbkl8_g](https://www.youtube.com/watch?v=mpbWQbkl8_g) . I think the touch sensitive cloth project also made it into a few products.

<comment><USER26> It is project Soli that graduated from ATAP!

</comment></comment><comment><USER27> I'm not from the US, the store page redirects me to my region

Appending a locale parameter to the url works well [1]

[1] [https://store.google.com/us/product/pixel_4?hl=en- US](https://store.google.com/us/product/pixel_4?hl=en-US)

</comment><comment><USER28> I want a decent 5" screen phone again. I have the pixel 3, and I swear I'm getting hand cramps because it's too big to use with one-hand. Miss the old Nexus 5.

<comment><USER29> I also have a pixel 3 and find I work it pretty well one handed. The pixel 2 though was a little wide.

<comment><USER28> How big are your hands? Do you have a special technique? I've got the one-hand keyboard setting enabled and I still can't type with one hand. My hands aren't big enough to hold it between my palm and finger tips with any sort of stability while using my thumb. It works better if I stretch out my pinky and rest the phone on top of it (not even touching the palm so the thumb has more reach and mobility), but it still falls a lot like that so I end up always reverting to two-hand use. And that's just for typing, I can't do light browsing or anything else with one hand like I did on the Nexus 5

To give a hand size comparison, the length from the very bottom of my palm to the top of my index finger is nearly equal to the height of the pixel 3. My index finger is maybe .25" longer. I'm an average height adult woman (5'5"), with hands proportional to that. I can play a standard size guitar just fine (ok, some bar chords are hard), but I haven't been able to buy an ergonomically comfortable flagship Android device in years now.

<comment><USER29> Ah, I'm a 5'10" male with average hands for that height and I can see that would make a big difference. Some way of moving the screen inside the phone's physical perimeter might be helpful, anyone got an app for that?

</comment></comment></comment></comment><comment><USER30> Another maintenance release from another manufacturer. Are we just in a stagnation cycle until 5g comes around?

<comment><USER31> 5g is already here. They are behind.

<comment><USER17> Here where? Because where I live, you can use 5G in two places: around the Nokia campus and around a university. In one city, I saw 5G cover about six blocks in the city center.

I'd say 5G is not already here.

</comment></comment></comment><comment><USER32> What are the odds that the camera block would look like the iPhone 11 pro!

Edit: a lot of sarcastic answers down there :D

<comment><USER33> What are the odds that all phones are a black rectangle?

Seriously, though, some problems just have one solution.

<comment><USER13> What a weird thing to say considering that the whole "rounded corners" thing became so overblown that it's a meme at this point...

Look at Android phones prior to the iPhone and then post-iPhone. There are definitely more solutions to phone designs than just a black rectangle.

</comment></comment></comment><comment><USER34> That page will not show you the Pixel 4 if it's not available in your country (I'm in Mexico, for example), but if you're still curious here's the blogpost: [https://blog.google/products/pixel/pixel-4/](https://blog.google/products/pixel/pixel-4/)

</comment><comment><USER35> We have some contradictions in our lives.

For example, think about computer releases. As someone who likes to build a PC and install my own operating system, I love how these two things are somewhat decoupled (albeit imperfectly.) So I was excited about individual component releases, of course the CPU and GPU in particular, not to mention the rapid advancement of storage technology! And I was happy to try out a whole new version of Windows. (I particularly like 2000 and 7.)

Computers, on the other hand - well I've all but ignored desktops and announcements about them my whole life. Laptops were more interesting, because I was excited when they started to have decent internal components, nice screens and usable battery life. (I've been less impressed with increasingly closed systems with fewer options for upgrades.)

So back to the point at hand? I'd like to think that new phones should be focused on performance, and in my dream world, decoupling from software. I don't want "new gadgets" to be a thing on a phone. If I want to use it a certain way, i.e. hand waving away my song tracks, I have to now rely on a specific manufacturer running a specific operating system on at least the minimum version. No real options there, though.

I'm still not sure "modular" can work for phones, or maybe it can but we're not there yet, or there hasn't been enough market success to push manufacturers to go that way. But even that feels mostly unnecessary. I haven't had any complaints about my phone hardware, except for batteries wearing out, and being difficult to replace. Cameras have been "good enough" for my needs for several years now. Storage and computing performance has been fine, too. (Of course, new features are compute-intensive and will require hardware to keep up.)

If I have a point, it's that this is a boring phone release to me, but I kind of wish all phone releases were boring at this point. I'm sure some of the imaginative features coming out will become important, but right now, I feel like I don't need them. What I would prefer would be an improvement in decoupling between phone hardware and software.

</comment><comment><USER36> The better processor is appreciated, but I would prefer that it had 5G and Gorilla Glass 6

</comment><comment><USER37> I miss my Moto X (2gen) with the infrared sensors to detect your hand and other stuff. It seems pretty similar to the hand gestures. Moreover I could personalize the external materials.

</comment><comment><USER38> And the best device that Google has remains the Pixel 3a XL. They continue to remove features that people actually use and add things that nobody wants.

</comment><comment><USER39> I'm pretty sure I'm going to end up with my first iphone when my op6 kicks the bucket (no sign of that anywhere in sight). I've just been so underwhelmed with every Android phone release that now the main thing that matters to me is the years of updates that the iphones get. I never thought I'd care about that but it looks great now.

</comment><comment><USER40> I'm going back to iPhone soon for privacy support and better features. I had all Pixel/Google phones until Pixel 2 and they all died within a year and half (Google returned me the money).

</comment><comment><USER26> Looks like the lovechild of Galaxy S9 and iPhone 11. It's good to see project Soli graduating out of Google ATAP!

</comment><comment><USER41> iOS has UX so well executed compared to Android in my opinion. Android may have better specs and features on paper but falls far short when it comes to a satisfying user journey where everything "Just Works".

</comment><comment><USER42> Love to see more devices using higher refresh rate.

</comment><comment><USER43> > Quick Gestures uses radar to sense motion

WTF. I don't want more EMR coming from a phone. I just want a phone. All this extra technology literally noone asked for adding to the price of a phone, same with fingerprint readers, same with face scan.

Ultra-privacy intruding phones.</comment>