Druid: fast column-oriented distributed data store - <AUTHOR> http://druid.io/ <comment><USER2> Druid is quickly becoming the leading open source solution for building highly scalable analytics. We evaluated it for getstream.io. Unfortunately the setup and maintenance is still very labour intensive. For startups that's a concern. Many larger companies we spoke to were extremely happy about running Druid in production though.

<comment><USER3> Druid isn't even close to being the leading solution. The overwhelming majority of places doing big data analytics will be Hadoop/Spark using core HDFS.

Then most places will augment this with a range of database solutions depending on how structured/clean the data is and the various workloads. Cassandra, HBase, MongoDB, Teradata, Oracle, ElasticSearch, Greenplum are all pretty common place in most enterprises.

And of course the ridiculous array of SQL engines on top of HDFS/S3/whatever else e.g. Hive, Spark SQL, Presto, Drill, SAP etc.

<comment><USER4> Druid's main value add to the data infrastructure space is around power user- facing data applications at scale. The queries it is best at are OLAP/business intelligence style queries. It isn't really designed to be a general processing tool such as Hadoop or Spark. The open source data space is very complex, and there are many different solutions targeted towards many different use cases. Druid is better than other solutions at some of these use cases, and worse than other solutions at others.

I wrote my interpretation of the current open source data landscape here for anyone interested: [http://imply.io/post/2015/11/04/big-data- zoo.html](http://imply.io/post/2015/11/04/big-data-zoo.html)

<comment><USER5> As someone who hasn't yet had the opportunity to use many of these systems, this was a great high-level overview of how the various systems fit together. Thanks for writing it!

</comment></comment></comment></comment><comment><USER6> The realtime ingestion is interesting especially if I can still batch import. When processing machine data, I've found that a quantity of sources come in chunks (logfiles written out every 24 hours for exmaple) but the eventual aim is to migrate to realtime (i.e.: a data point every n seconds/minutes/etc. where you instantly consume that data point) streaming.

If this transition is easy without reworking infrastructure, the solution is far more attractive.

</comment><comment><USER7> Every open source column database I've seen is very poor: text, no decent array oriented ability (give me the prevoius row), slow, json output, etc. When will somebody get it right?

<comment><USER8> This is simply false. PostgreSQL + cstore_ftw, Presto, Impala, etc. all support "array oriented ability" via window functions.

<comment><USER7> I mean like give me the preceding row from the current. Very useful for calculating anything from a simple rate of change to a properly doing a temporal database. Arrays as a column type doesn't get you that.

<comment><USER9> No, but window functions do, unless I'm not understanding what your goal is.

[http://www.postgresql.org/docs/current/static/functions- wind...](http://www.postgresql.org/docs/current/static/functions-window.html)

<comment><USER7> I actually was using that yesterday. So so so so very very very very slow.

</comment></comment></comment></comment></comment><comment><USER10> A friend of mine who interned with me at eBay used Druid and Angular to great success to build a tool for analysts to look at trends in our data. Druid is some seriously cool stuff.

</comment><comment><USER11> Our 2-man team set up Druid........ i took 5+ months and was excruciating to configure and get running smoothly (things were slightly more complicated because we decided to use docker). It also took ~30 servers to make a truly fault-tolerant setup.

With that said, it works very well, but it definitely came at the cost of a good dose of sanity.

<comment><USER4> FWIW, Imply repackaged Druid in such a way that should make it much much easier to set up and evaluate. We've been porting our docs over to Druid for 0.9.0: [http://imply.io/docs/latest/quickstart](http://imply.io/docs/latest/quickstart)

There's also a production-ready docker distribution: [https://hub.docker.com/r/imply/imply/](https://hub.docker.com/r/imply/imply/)

</comment></comment><comment><USER12> Has anyone done a meaningful private benchmark comparison with [http://www.scylladb.com/](http://www.scylladb.com/) ? I didn't find one online.

<comment><USER13> It is a 100% different type of database. Druid is olap while scylladb is oltp. They have nothing in common (except for the "columnar" name)

<comment><USER12> Yes, but that doesn't mean you can't benchmark them anyway. And I think you could probably find some meaningful comparison. Certainly it would be more useful than the Druid whitepaper's benchmarks against _MySQL_. (I used to work on a DB project, we too had a benchmark against MySQL even though our DB was OLAP-focused.)

<comment><USER13> No they can't because scylladb can't do the stuff druid can (and vice-versa). While mysql can (even though it's a completely different way).

</comment></comment></comment></comment><comment><USER14> What's the advantage of a "column-oriented" data store/database?

<comment><USER15> Analytics like sum(column) are much faster if data is saved column-oriented. Also every time you don't do select *, but select a, b, it's much easier on disk because you're not even touching some columns.

</comment></comment><comment><USER16> How does it compare to Vertica?

</comment><comment><USER17> Great, just what we need, a Druish database.

<comment><USER18> Funny, it doesn't look druish...

<comment><USER19> It takes only what it needs to survive...

<comment><USER19> We're down voting Spaceballs references? Who are you monsters!?

<comment><USER20> people who come here for serious discussions. Reddit is more the place for memes, references and stuff like that, not HN

</comment></comment></comment></comment></comment><comment><USER21> Yeah, more database solutions that's what we need.

[https://xkcd.com/927/](https://xkcd.com/927/)

<comment><USER11> It actually is needed. It's a great enterprise-level timeseries-centric database.</comment></comment>


Nike+ FuelBand SE BLE Protocol Reversed - <AUTHOR> http://www.evilsocket.net/2015/01/29/nike-fuelband-se-ble-protocol-reversed/ <comment><USER2> It's interesting that somehow, because this is reverse engineered now and I can do funny things with it and hack around with it, I actually consider to buy this thing.

I would wish that more companies would allow for modifications / hacks right from the start and actually support that. That would attract the hacker community and might result in many more interesting use cases.

<comment><USER3> I got one as a present and oh, how I hate Nike for not even caring about android users, much less of using this kind of sensitive data without uploading to their cloud. The device itself is usable as a quite ok step counter requiring Windows only software to even do _anything_ with it. As it measures mainly walking, I cannot even recommend it for the intended purpose.

</comment></comment><comment><USER4> This might be helpful for anyone wanting to play with low level BT traffic: [http://ubertooth.sourceforge.net/](http://ubertooth.sourceforge.net/)

<comment><USER5> I'm seriously thinking about buying/building one of those

<comment><USER6> FYI, I've recently worked on a similar project, and I tried both the ubertooth and this TI development kit device [1]. The TI device and software was much more reliable and is pretty much plug in and go. Did you do all of this through an Android phone? Very cool.

[1] [http://www.ti.com/tool/cc2540emk-usb](http://www.ti.com/tool/cc2540emk- usb)

<comment><USER5> yep, android phone ( nexus 5 ) and some hci bluetooth sniffing on a nexus 4 ( you can enabled it on 4.4.4 under dev settings panel )

</comment></comment></comment></comment><comment><USER7> So I'm confused.. was author just not able to follow thru code path to find that the auth token was just spamming 1's? or was it a bit more cryptic than that?

the real code in the APK for computing the auth_token was probably some developers some pride and joy, worked weeks on it.. but when it came time to ship, damn thing wouldnt work with the shipped hardware.. so they buried a small assignment which overwrote the original computed auth token just to make the thing work? where is THAT code, i'd like to see it! If so, that is one of those great snippets where you can visually see the developer gave up. We should have a name for that sort of thing (I'm guilty of the same.. in my.. older works).

<comment><USER5> author here ... it's not THAT easy, that specific piece of code was highly obfuscated by proguard ( you know the a.class, b.class, c.class thing? XD ) and everything made me think about the "correct" algorithm, still I can't find where that 0xFF... is being set :P

<comment><USER8> In other words, obsfuscation was used instead of just applying good practice, and good practice is seemingly harder to debug for development than obsfuscation.

<comment><USER5> EXACTLY :D

</comment></comment></comment></comment><comment><USER9> Here is a related, quite detailed teardown of the FuelBand: [http://www.youtube.com/watch?v=7xdajSS_cOU](http://www.youtube.com/watch?v=7xdajSS_cOU)

<comment><USER10> This is great video and thanks for the link, but just to be clear to others it is not a teardown of the current BLE capable model that the OP has reverse engineered.

</comment></comment><comment><USER11> Fun stuff. I would also recommend using some kind of packet sniffer to collect sample data which can make your static analysis easier. To do this, buy the CC2541 development kit with packet sniffer for about $25. Alternatively, you can write a BLE proxy (using two Bluetooth adapters). To Apple's credit, the CoreBluetooth API on iOS does not let the app know the MAC address of the peripheral, so the app will never know that it is talking to your proxy vs the actual device.

<comment><USER5> yeah I thought about physical sniffing and wanted to buy/build a bt sniffer myself ... but you know, some Android versions have a builtin bt sniffing feature ;)

</comment></comment><comment><USER4> Imagine how much fun you could have with sending messages to runner's bands at Nike branded half and full marathons! :) Not that I would do that.

<comment><USER12> Or you could use Cmd_UploadGraphic and upload some filthy splash screen to their bands... Not that I would do that.

</comment></comment><comment><USER13> Hardware reverse engineering has gotten so much easier since everyone is obligated to deliver some useless Android (preferred) or iPhone app with their consumer junk. No one seems to bother with obfuscation.

</comment><comment><USER14> Very interesting, I've not yet ventured in to the BLE protocol world yet. I'd love to see what the Fitbit protocol looks like, they require a special USB dongle just to connect to Macs that already have BLE built-in, yet iOS hardware works on its own. Strange.

My first opportunity to reverse engineer undocumented hardware was Ubiquiti Networks Airview2 900MHz/2.4GHz spectrum analyzer USB sticks, the cheap $39 ones that hit the market back when Wi-Spy sticks were really the only comparable hardware and were quite a bit more expensive. They have an undocumented serial protocol for controlling the device and getting RF power level readings (and the proper info to parse it).

Once I got the basic command set figured out I wrote up documentation and a Python library[1]. Without reverse engineering the device firmware or the original software it was basically blind guessing (and later automated guessing). Finding a new command and being able to put more and more of the puzzle pieces together to see the big picture is really fun :)

[1] [http://infincia.github.io/pyairview/](http://infincia.github.io/pyairview/)

</comment><comment><USER15> I'm baffled by the _intended_ authentication path not using the entire 4 bytes of the CRC after bothering with such a big random number.

<comment><USER16> I'm baffled by everything about the intended authentication path?! TFA has like 6 paragraphs which reduce to;

      CRC32(MD5(Pin)||Nonce)[0:1]

My eyes! Is something wrong with HMAC?

</comment></comment><comment><USER17> This is awesome!

For what it's worth, I spent a little time playing with their Fuel API when the first band was released: [http://fredkelly.net/articles/2012/12/21/nike_fuel.html](http://fredkelly.net/articles/2012/12/21/nike_fuel.html)

</comment><comment><USER18> Thanks for writing this. I think I'll try reversing Fitbit beyond Galileo. Also, for those who don't know, Wireshark can sniff the Fitbit dongle using usbmon module incase you don't have a BTLE enabled device. MITMProxy is also great for making dumps to be studied.

</comment><comment><USER19> on a related note, is the act of decompiling jars legal if the software was obtained legally, ie bought?

<comment><USER5> [http://reverseengineering.stackexchange.com/questions/60/is-...](http://reverseengineering.stackexchange.com/questions/60/is- reverse-engineering-and-using-parts-of-a-closed-source-application-legal)

</comment></comment><comment><USER20> Extremely impressive, have been watching this technology and have seen a number of folks attempt this.

</comment><comment><USER21> FF FF FF FF FF FF

maybe Nike hired Sony random number guy(return 4)?</comment>


Scratch 3.0 - <AUTHOR> https://scratch.mit.edu/discuss/topic/326861/ <comment><USER2> I teach kids to code on a volunteer basis. Although Scratch is very good, the kids usually gets lost. Even when we print out the solution for them to follow. When they don't get lost, it seems they are not having as much fun.

My experience is that it is literally 10 times more fun for the kids to learn to code Python with [http://www.codecombat.com](http://www.codecombat.com) . The classes gets filled with excitement when I put on the 10 hour version of "Diablo Town Music" and tell them to log into Codecombat. Very rewarding actually :). I register free accounts and bring these to my classes on a printed sheet, that works great. As such I don't need to pay for the classroom edition. I have actually let Cidecbat know about this pricing flaw, but no new models have been introduced that fit my use case has been made available. This is Codecombat does not have a pricing tier that fits my volunteering classes with random participants well.

<comment><USER3> Scratch is a tool with the freedom of creating whatever comes to a kid's mind. The block based programming style in Scratch relieve the kids from fighting the keyboard and it prevents syntax errors so they can focus on programming. You can use Scratch to build own games, stories, movies, music applications and you can connect it easily with hardware like MakeyMakey or even Lego. It's about producing not consuming and Scratch is the perfect tool to do so.

I don't know the platform you mention but it looks like the advanced (because Python) version of games you find on code.org. So I expect a linear progress, where you tackle task after task. This can be fun and also creative but in a limited fashion. You should not withhold Scratch from the kids so they can experience the freedom of building their very own things. Be critical and ask yourself why the kids don't have so much fun and why they get lost.

Maybe you can start with easier exercises, try out other tasks and challenges you never used and let the kids be creative already in the beginning: Teach one or two new blocks, give some rough ideas and let them do whatever they want. No blueprint or solution sheet required in this case. Coding kids have so many ideas - they will make it fun by themselves.

I think there are many ways to do it. I just wanted to point out the difference between Scratch and game based learning platforms. I also teach kids in my spare time and I think we are doing something very important for every single child. So thank you!

<comment><USER4> My daughter and I play Factorio together. There are a lot of emergent properties in Factorio that are relevant to programming.

</comment></comment></comment><comment><USER5> Scratch is pretty great, and at least 3 of my kids constantly ask if they can play Scratch. Unfortunately, for 2 of them it usually means just putting characters on a stage and adding code to change their costumes when you click the green button.

But if you have kids who want to step up their game from Scratch, check out PICO-8 (submitted it earlier today, check my history). It's genuinely amazing, and my oldest absolutely loves using it. He's made some awesome 2d games so far over winter break and he's using legitimate programming concepts and techniques like they're nothing, it's really amazing to watch.

<comment><USER6> And if you cannot afford PICO-8, there is a free TIC-80 alternative.

<comment><USER7> Very nice, I've been volunteering in a group, we've been teaching Scratch to kids from 7 to 12. Can't wait until I show them this

Is there any significant difference between TIC-80 and PICO-8? both looks awesome to me

</comment></comment></comment><comment><USER8> I just discovered this amazing classic demo by Margaret Minsky from Atari Cambridge Research Labs, demonstrating a gestural programming system with a button box for programming with a pressure sensitive touch screen, developed by Margaret Minsky, Danny Hillis, Daniel Huttenlocher, David Wallace (Gumby), and Radia Perlman at the MIT-AI Lab.

[https://www.youtube.com/watch?v=-Wq6SQTVM9M](https://www.youtube.com/watch?v=-Wq6SQTVM9M)

This is one of many amazing videos from Cynthia Solomon's treasure trove of youtube uploads.

[https://www.youtube.com/user/cynthiaso/videos](https://www.youtube.com/user/cynthiaso/videos)

If you act now, you can be the 32nd person to watch this video of Seymour Papert demonstrate the Logo Turtle! ;)

[https://www.youtube.com/watch?v=lDyym_9-E-g](https://www.youtube.com/watch?v=lDyym_9-E-g)

Or be the 39th person to watch this video of Seymour Papert explaining how giraffes sleep:

[https://www.youtube.com/watch?v=ha8sTgtUejM](https://www.youtube.com/watch?v=ha8sTgtUejM)

<comment><USER9> John Carmack has mentioned that he uses a visual Lisp environment on iPad. Scheme-based, iirc.

It's somewhere in here, I think (but alas I'm not up to listening again through half an hour of the old lady voice): [https://youtube.com/watch?v=1PhArSujR_A](https://youtube.com/watch?v=1PhArSujR_A)

I feel like marrying Lisp's meta-programmable DSLs to an easy visual environment is the ultimate cosmic dream of 'domain-centered' programming and customization for non-coders―but it also seems to me that Lisp is rather text- based, trading a readymade set of operations picked in the interface for infinite extendability through text. So I'm not sure if a visual Lisp is any convenient to use.

Also, for me the immediate downside of the Lisp environment in question is that it's only available for iPad.

<comment><USER8> I'd say Lisp is S-Expression based, and it's easier to make both text and graphical interface to S-Expressions than to the syntax of typical text based languages.

By Apple's decree and app store policy, any programming language on the iPad that isn't purely based on the JavaScript interpreter in the web browser isn't allowed to download and run executable code, much to the frustration of Alan Kay, who is weary of people comparing the iPad to the Dynabook without acknowledging that Apple left out and prohibited his most important idea on purpose: user programmability.

If Carmack's visual Lisp is implemented as an iOS app with locally running native code, and not purely in JavaScript running in the web browser, then he has to build it himself in XCode on his own Mac for his own use with his own Apple developer certificates, and he isn't allowed to distribute it on the app store.

If you can implement your language purely in JavaScript, like Snap! or the web version of Scratch 3.0, then it'll run everywhere, and isn't an iPad app, just a web app, so it's not bound by the restrictions of Apple's app store. That's the way to go if you can.

[https://snap.berkeley.edu/](https://snap.berkeley.edu/)

</comment></comment></comment><comment><USER10> > Scratch Desktop on Linux is currently not supported. We are working with > partners and the open-source community to determine if there is a way we can > support Linux in the future. Stay tuned!

Apparently from version 3.0 Scratch is proprietary and doesn't run offline on free operating systems[0]. That's just sad. There are some good ideas in Scratch, but I think _Snap!_ [1] is the better one to use: It's free, and you can create your own (recursive) blocks[2].

[0]: [https://scratch.mit.edu/download](https://scratch.mit.edu/download)

[1]: [https://snap.berkeley.edu/](https://snap.berkeley.edu/)

[2]: [https://www.youtube.com/watch?v=rXN81Hsj_A4](https://www.youtube.com/watch?v=rXN81Hsj_A4)

<comment><USER11> Where do you get the information from that it is proprietary? As far as I see it it's licensed under BSD3-Clause [0] which is a OSS license, despite being more permissive.

[0]: [https://github.com/LLK/scratch-gui](https://github.com/LLK/scratch-gui)

<comment><USER10> On the Scratch download site, which I quoted, I could only see binary downloads and the information that "Scratch Desktop on Linux is currently not supported."

That made me assume that it was proprietary, but I'm very happy to be proven wrong about this. Furthermore it looks like unlike 2.0, Scratch no longer depends on the proprietary Adobe Air component, so if that is the case, it's a big improvement!

It would be less confusing if they'd replace "Linux is currently not supported" with a link to their repository on Github. I might contact them about that.

Can't wait to try it out!

Does anyone know whether Scratch 3 supports recursion like Snap! does?

</comment></comment></comment><comment><USER12> I started programming with Scratch 1.2 back in 2007. I'm now a computer science major in college, so I'm glad to see the Scratch team at MIT continuing to make great progress. Scratch (and similar programming environments) is a very successful way to introduce children to programming and I hope that it continues to do so.

<comment><USER13> Now that you're a computer science major... is there anyway you could think of making a better environment for learning? I personally really struggled with "connector-set" style programming thing like Scratch. It always felt too limiting, or, I don't know... forced? It's very obvious how the blocks match to code - so it feels (to me) like it's "begging the question": to know how to connect the blocks you need to know how to construct the code. It's like it's missing a layer of abstraction after you figure out the very basics.

Lately I've been wondering if there is a better way that doesn't match 1-to-1 with coding constructs - something visual, but something that isn't just "a for-loop represented as a physical block". Not sure what that would be though!

<comment> vez- I've been wondering the same thing. I feel like there could be a more exclusively visual programming paradigm.

I wish there was a better way to program on mobile, because typing just doesn't feel good. Maybe a visual way to program could bridge that gap.

I also feel that kids would love to be able to create their own install-able apps with something like Scratch. Maybe could be done with something like PWAs?

<comment><USER14> Quick plug for my node red port to android (and can do ios) [https://github.com/alexisread/noreml](https://github.com/alexisread/noreml)

It's missing a table component really for UI programming, but can support visually programming apps on mobile devices :)

</comment></comment></comment></comment><comment><USER15> It would be cool if something evolved from Scratch to become a modern Visual Basic, something not just for learning and play; that went mainstream for the masses. imo the biggest problem with most programming languages is user uncertainty of constraints. It has parallels with GUIs vs command lines. Command lines have no visual constraints with what you could type. i.e. the user doesn't know what they can and can't type. The GUI on the other hand shows everything that a user can do visually. It has constraints. There are only so many buttons and menu items. It helps limit fear and confusion. While IDEs do help bridge this gap, they only go so far for people who aren't as motivated as programmers. It would be nice to have a programming language with this feature (I know they already exist) to go mainstream.

<comment><USER16> It's interesting because Apple, once upon a time, had the exact opposite hypothesis: their language AppleScript barely had a documented syntax, and it aimed to allow any natural language (e.g., and I likely misremember, "tell the first application whose visibility is visible to set its visibility to hidden"). In theory, this could let anyone script their system, even non- programmers. In practice, it was impossible for even a seasoned programmer to know if a program would compile. Their later Automator GUI was much more successful, bringing visible constraints and prompts, but far less flexible. There is so, so much space to experiment and research good interaction methods in this space.

</comment></comment><comment><USER17> I taught kids programming in an after school program for 4 years. Scratch was the tool that explained a lot of concepts best (and allowed those students who had trouble, still feel like they achieved something meaningful in the course)

I took a look around and saw some nice improvements to areas where Scratch always seemed crufty! Plus it loaded fine in every browser I tried!

That's a great update and I can't wait to see what the extensions are like

</comment><comment><USER3> I teach kids from 6 to 12 years with Scratch (and other tools) in my spare time. If you are a developer you should try it out. It's amazing how creative kids are with a tool like Scratch. My programming career started with Flash 4 and allowed me to work with sound, audio and animations together with the possibility to program and to easily distribute it (there was a single swf file).

Scratch is like the distilled version of it optimized for kids. I would have loved it as a kid and I see how natural children can work with it. Mitchel Resnick and his team did a great job with Scratch and it's amazing to finally see it working in HTML5 - after being a Flash based application.

Teaching coding to kids is important and as a developer it's easy to say so. Some day I made the decision to think about the why to better explain people why I do the teaching. The end product was a 25min talk I gave at the JSConf EU 2018 in Berlin. Maybe that's of interest for parents reading here about Scratch and of course fellow developers interested in teaching coding to kids.

[https://youtu.be/t0m5rrKKMOA](https://youtu.be/t0m5rrKKMOA) ( _About Coding Kids and Screaming Carrots — JSConf EU 2018_ )

Here the slides and all information I mentioned in the talk: [https://github.com/georgiee/coding-for- kids](https://github.com/georgiee/coding-for-kids)

My summary why a kid should learn coding:

      > It's about teaching kids to be producer instead of a consumer
      > so they can build their own games, tell their own stories
      > and create their own music.

<comment><USER18> Flash? Scratch was written in Smalltalk.

<comment><USER3> That's Scratch 1. Scratch 2 (2013) is based on Flash so it can be distributed in the browser (via Flash Plugin) and as a desktop application (Adobe Air).

<comment><USER19> Note that Scratch 1 could also be distributed in the browser using the Squeak VM plugin. Except school IT people wouldn't allow students and teachers to install that as too dangerous (meaning, they hadn't heard of it) but they would allow the Flash Plugin to be installed. So the rewrite was to solve a political issue rather than a technical one. Sadly, this happened right when some key people decided that Flash was evil, so a second rewrite became necessary.

</comment></comment></comment></comment><comment><USER20> If you are looking for the "next step" after scratch for teaching kids how to code, I recommend:

[https://www.robomindacademy.com/](https://www.robomindacademy.com/)

It's a text based language, but you program a graphical robot to do various tasks. I've found that it's a great combination of fun and actual coding that helps kids transition from something like scratch to more advanced languages and concepts. I'd say it's good for kids around 12 years old.

<comment><USER21> Thanks for that recommendation. My kid started with Scratch and then did several of the Code.org courses and Hour of Code activities. Been wanting to move him on to learning "real" programming. Was trying to find an easy, online, self-paced Python course but have not found what I want. We've been working through "Invent Your Own Computer Games with Python" book. The programming concepts are not too advanced for him but there is a lot of reading between each step so I have to sit with him and read through it together or boredom and attention span become an issue.

</comment></comment><comment><USER22> Scratch also has a friendly, supportive community. Kids engaging in civil discussions, and building off other's ideas.

Lots of idea sharing, because you can click to see the "code" inside anyone's project.

Scratch 3 is a major re-write, to eliminate Adobe Flash. It also has extensions (the example given is to integrate with Google translate and Lego Mindstorms).

<comment><USER23> > Scratch also has a friendly, supportive community. Kids engaging in civil > discussions, and building off other's ideas.

This makes me happy. There's hope for humanity yet.

</comment></comment><comment><USER24> I've been playing around with the beta for a while, it is really impressive, and my 8 year old loves it. I also got a microbit which you can bridge into the scratch environment with their official plugin

just for peoples interest, their github is [https://github.com/LLK/](https://github.com/LLK/)

The new 3.0 GUI is done with react.

</comment><comment><USER25> I'll always prefer Snap because it has so many features that allow teaching best practice, but Scratch sets the benchmark so I'm pleased to see its evolution continue — and hopefully some of it will make its way into Snap and other Scratch clones.

<comment><USER26> I also like the fact that snap is Free software - I'm still not able to find out from the scratch 3.0 website if scratch can be easily self-hosted, modified etc?

Snap is on github: [https://github.com/jmoenig/Snap](https://github.com/jmoenig/Snap)

It also is based around js, and can import scratch 2.0 sketches (not sure how well that works in practice) - I wonder if there's any collaboration with MIT scratch moving off of flash to js - or if they did everything from, well, scratch ?

</comment></comment><comment><USER27> I have been teaching my 5 year old daughter Scratch 3 since it was in beta. I am slowly writing some tutorials for other parents as I have been asked how they could teach their kids how to program. I am looking forward to some of the new features that should come with this official release

</comment><comment><USER28> If you like Scratch you will love Alice 3D: [https://www.alice.org](https://www.alice.org)

And for younger kids Scratch Jr. is great [https://www.scratchjr.org](https://www.scratchjr.org)

<comment><USER29> Everyone I have ever known that was exposed to Alice hated it into their very bones.

</comment></comment><comment><USER30> I started my son on Scratch when he was 6. He is now 9 and runs a lunchtime coding club at his school teaching other kids to use Scratch. I have looked around for the next step for him to improve his skills and found that Lua Löve to be the best one.

</comment><comment><USER31> Hopefully this solves some core problems like being able to use it smoothy on multiple platforms outside the browser.

I've found previous version of Scratch to be frustratingly limited unfortunately.

I don't mind, and expect, kids software to be limited but Scratch makes it really hard to do certain things. It's a pity because it holds the number one place in market positioning for free software for educating kids on how to program.

<comment><USER32> Can you provide any examples of something that you think is difficult to do? I'm doing research on similar languages and would like to understand barriers people have.

<comment><USER31> I wanted to make a simple game where using arrow keyws you move around a top down map display and kill monsters and shoot arrows and find treasure, with trees scattered about.

I didn't find this easy at all and it seems like something that shouldn't be hard.

Also it is/was based on Adobe Flash and none of my systems or browsers have Flash.

<comment><USER12> The Adobe Flash issue is actually the main thing that Scratch 3.0 solved - it's now all Javascript.

Your example project should be relatively simple in Scratch. Certainly many users have done similar things. Perhaps you're trying to do it in ways that work in common programming languages while it requires using different idioms in Scratch?

</comment></comment></comment></comment><comment><USER33> Funny, I started out impressed to find, unlike in so many announcements of its kind, a prominent "What is Scratch 3.0?" heading, I guessed for those of us who have not been tracking Scratch from its inception.

What I found there was, basically, "This is version 3 of Scratch", i.e. completely uninformative to anyone wondering what in blinkered hell Scratch is, who it's for, what it's for, or why I should care that there are now three of it. "Scratch" is a traditional epithet of Satan. So, guessing a Satan animation for kids?

I guess they will have a chance to do better if they last to 4.0.

</comment><comment><USER34> I can't stop wondering if Scratch's visual block approach could be extended/modified to fit real-world programming tasks efficiently. This can be especially valuable to let people code on smartphones.

<comment><USER35> We build Construct 3, another web-based block programming editor, using a different approach which we think is more powerful and can make more sophisticated games. You can check it out at [https://www.construct.net](https://www.construct.net)

<comment><USER36> Construct is targeted at professional game development market. It's not comparable with Scratch which targets the creative programming education. Construct is a full closed source proprietary premium payed ecosystem for professional game developers. Nothing to do with the open source, completely free and joyful nature of Scratch which delights the young creative minds of tommorrow (and today!). On top of that Scratch has an absolutely caring, loving and vibrant community.

</comment></comment></comment><comment><USER37> I can't open the link, but from the main scratch site there is an example sketch celebrating the new version, and I see a lot of complaints in the comments about this breaking existing projects:

[https://scratch.mit.edu/projects/276660763/](https://scratch.mit.edu/projects/276660763/)

I hope that that is just due to a misunderstanding by the users (trying to load a 2.0 sketch in 3.0 or something), and not a sign of badly handling the upgrade?

<comment><USER38> There are also a lot of comments that say that scratch 3 is worse than scratch 2 in general. Doesn't surprise me because scratch 3 seems ambitious, and kind of reminds me of WordPress's Gutenberg.

Whether the big problem is that scratch 2 is arguably better or it that it breaks scratch 2 projects, it would have been nice if they continued to fully support scratch 2, rather than just the "offline editor". I understand if they didn't have the resources to support it though.

<comment> em-bee flash is dead. that makes any application built on it unsupportable. that's not a question of not having resources, but one of not wasting them.

<comment><USER38> They could have attached a disclaimer that said it only works on desktops, is no longer actively maintained, yada yada yada, but kept hosting Scratch 2 projects. And depending on how the servers were set up, it might not have been that expensive.

</comment></comment></comment></comment><comment><USER39> Web archive link (because the site seems to have been slashdotted): [http://web.archive.org/web/20190102213301/https://scratch.mi...](http://web.archive.org/web/20190102213301/https://scratch.mit.edu/discuss/topic/326861/)

</comment><comment><USER40> It took me too long to figure out how to run my scratch. A run button would be nice for us old people.

<comment><USER12> For reference for other people, it's the green flag button near the upper right hand corner. There's also a tutorial that runs if you go to [https://scratch.mit.edu/projects/editor/?tutorial=getStarted](https://scratch.mit.edu/projects/editor/?tutorial=getStarted) that shows it.

</comment></comment><comment><USER41> If you are encountering a server error, you can check out the wiki: [https://en.scratch-wiki.info/wiki/Scratch_3.0](https://en.scratch- wiki.info/wiki/Scratch_3.0)

</comment><comment><USER42> Going to that link, AntiMalwarebytes reports it blocked 2 urls because "spyware" and "trojan" respectively.

both from a site called "cubeupload"

</comment><comment><USER43> Can scratch be run offline?

<comment><USER12> Yes! [https://scratch.mit.edu/download](https://scratch.mit.edu/download)

</comment></comment><comment><USER44> Any recommendations on tutorials suitable for 6yo for Scratch?

<comment><USER45> [https://codeclubprojects.org/](https://codeclubprojects.org/)

</comment></comment><comment><USER46> its arbitrarily blocking opera :(</comment>


Tip your Uber driver - <AUTHOR> http://techcrunch.com/2016/04/22/tip-your-uber-driver/ <comment><USER2> Tipping in general annoys me when it is expected for normal service. If someone like an uber driver does a great job and tells me about the city or something then I like to be able to tip to show my appreciation. But I don't like any sort of industries where a 20% tip is always expected. Why should I tip a bartender for handing me a beer? Just raise the prices.

</comment><comment><USER3> Nope. I will never tip my Uber driver. One of the main selling points for taking Uber is because I don't have to tip.

People seem to forget (or don't know) that platforms like Uber and Lyft give additional money to drivers for hitting certain numbers, like $X for 100 rides in a week, etc. It's not just straight fares that pay the drivers. One driver was explaining to me how it works, and many drivers will only drive during surge times, so I don't really feel too sorry for them, especially when they're making 2X or more on a surge fare (which I've paid many times, because even then it's cheaper than taxi).

</comment><comment><USER4> I tip. Drivers frequently seem a little surprised, but smile and take it.

However, while we are on the subject of tipping...

I'm pretty put off by tipping for counter service. You order at the register, when your food is ready, you pick it up at the register.

But these Square and similar systems provide the business with the ability to but tip options on the menu: 10%, 15%, 20%, ... A particular ice cream shop in Palo Alto, and a particular Middle Eastern eatery in Fremont come to mind. Yes, you can skip the tip, but I worry about my next visit...

There are also 1/2 service businesses where you order at the register and they bring the food out. You still get the big buttons with several tip options, and that's a little easier because at least they are doing something to earn it, but 20% to bring me my food? 25%?

What do you folks think about this? Do we tip them because, hey, they can't possibly survive in Silicon Valley without 25% on a scoop of ice cream?

<comment><USER5> Personally, I almost never tip for pick-up orders unless for some reason they go above and beyond. When you order at the register and they bring the food out, for some reason I feel like that crosses the tip threshold, but only for 10%. As a data point, I always tip at least 20% at a restaurant

</comment></comment><comment><USER6> As a former Lyft driver, I really wouldn't want this to become expected. If tipping happens in cash, This will reclass the driver according to IRS tax standards and cause the drivers to enter a different class with a more onerous system, and compounding problems when you don't get tipped.

<comment><USER7> What IRS distinction are you referring to that hinges on cash vs electronic tips?

</comment></comment><comment><USER8> NOOO! This ruins the whole experience. Right now Uber is a convenient alternative to Taxis in (large) part because there is no tipping necessary. Once tipping is required you have to go through all those mental gymnastics all the time: how good a job did this person do, will I ever want them as a driver again, if I leave too low a tip will I get lower rating?

Tipping will take Uber from a nice no-personality no-thought experience to an annoying "do I want to deal with all that" mental decision each and every time.

</comment><comment><USER9> An European's perspective on tipping is nicely covered here: [https://www.youtube.com/watch?v=vBTfj2lN6sQ](https://www.youtube.com/watch?v=vBTfj2lN6sQ)

Basically, "The bill came to $20 therefore you asked me for $20 and as per your exact request I gave you $20. Just like you asked. And I'm somehow an asshole for that."

Yes, he also covers "waiters are underpaid", etc.

</comment><comment><USER10> Uber, because of all the data it's able to collect, operates on a fine tipped point between supply and demand. You see this all the time with Uber coming into a new city with initially high rates to rapidly bootstrap their driver pool and then a slow ratcheting down over time.

Widespread tipping wouldn't result in drivers being better compensated, except in the short term. In the long term, it will simply result in Uber lowering its rates to compensate and the drivers making exactly the same amount.

</comment><comment><USER11> Never. I use Uber because I don't have to tip, and I report drivers that ask for tips.

<comment><USER12> I've never Uber'd, what's the grounds for reporting?

</comment></comment><comment><USER13> I don't want to rip my uber driver. Part of what makes Uber is that it's all taken care of. I don't want Uber to behave MORE like taxis. I also don't want my driver making assumptions about me and gauging level of service based on expected tip.

</comment><comment><USER14> I like Uber because I don't need to think about tipping. I get out of the ride and am on my way.

</comment><comment><USER15> The whole point of Uber is the smooth cashless transaction. Put a button on the app maybe but cash, it's retrograde.

</comment><comment><USER16> I stopped tipping a while ago. The whole model is broken.</comment>


Life got bigger in two, million-fold leaps, scientists say - <AUTHOR> http://www.physorg.com/news149188848.html <comment><AUTHOR> actual paper is here: [http://www.pnas.org/content/early/2008/12/23/0806314106.full...](http://www.pnas.org/content/early/2008/12/23/0806314106.full.pdf+html)</comment>


Ask HN: Take founding-CTO job offer with no equity? - <AUTHOR> tl;dr: I am asked to take the role as CTO in a to-be-found company without equity in Germany. Shall I do it?
Longer story: A year ago, a friend of mine and I started wandering around in Germany to get funding for a startup. Fast forward today, we figured out we are not the "classical founders" a startup would need (no/low salary, big risk etc.). Nevertheless we were able to get an interesting offer anyway: to found a subsidiary of an existing company to cannibalize their own business. He would serve as CEO and I would serve as CTO, including all rights one would have as Managing Directors but without equity. The investor would sit on the advisory board and owns 100% of the company. In exchange, we would get a very high salary (way higher than market standard) from day 1 incl. bonus agreements. This would be also true for all of our employees. We would get all decision making power, an external office just to be completely separated from the parent company.
What would you do? Do you have additional advice?
Some more detailed background information: I currently have a very good job/salary at $BigCo in Germany, so no pressure on that side. My dream was always to own a company which I can influence in a way impossible at $BigCo. I like leading people, strategical thinking and working together with my own team. I know in this case I wouldn't own the company technically speaking, but I nevertheless would be able to create a meaningful working culture. I'm mid 20s, no kids, no real estate and "only" bound to my SO. My biggest fear is to get dropped out of business by the owner after $X years/months when the company makes well because of the high salary (why should he pay $high to me when he can pay $less to somebody else in the future?). I inerhited the need for social and job safety from my parents and therefore I'm naturally motivated by job safety and a high salary (to buy real estate ASAP).
Thank you! <comment><USER2> How much do you trust the investor? This sounds like an obvious "nooope" to me. If your dream is to own a company, this will be unsatisfying.

<comment><AUTHOR> I don't trust anyone who is willing to give away money "for free", that's why I'm feared they turn bad once the company is up and running.

<comment><USER3> Have a chat and see if you can get a commmon understanding or gentlemen's agreement. You are right the incentives do look like once the company is up and running it doesn't make sense to keep a high salary CTO, perhaps you can raise this concern with them? Or perhaps you both might have some agreement e.g. minimum 3 years as long as you're doing a good job.</comment></comment></comment>


Chasing the Harvest: 'If You Want to Die, Stay at the Ranch' - <AUTHOR> https://longreads.com/2017/05/17/chasing-the-harvest-heraclio-astete/ <comment><USER2> "It is also the poorest paid job in the country, with some sheepherders still earning around $750 a month; with their long hours of work, that amounts to about a dollar an hour."

How many Americans are willing to work for this type of wage in these conditions? My guess would be zero.

<comment><USER3> What is the purpose of this comment? Do you honestly think Americans should feel bad that we won't exploit ourselves even further?

If anything the average American should be demanding more, not accepting less.

There is no morality in sacrificing for your masters. If anything it is immoral to allow the market to swing so low by accepting a job with such a low wage. Let the masters herd sheep, the current herders would serve society better by not accepting such low paid work and choosing to die if better work could not be found.

<comment><USER2> You seriously think people will choose to die? Have you ever met other people?

<comment><USER3> Of course I don't think they would do that. I'm just saying people that would choose that are likely on the moral high ground compared to those that choose to take jobs that don't even pay a living wage.

</comment></comment></comment></comment><comment><USER4> I wonder if many of the issues described aren't specific to the treatment of immigrant workers, but something inherent to modern ranching in the American West. "Sweetgrass" is a phenomenal 2009 documentary about American sheepherding culture in Montana:

 _An unsentimental elegy to the American West, "Sweetgrass" follows the last modern-day cowboys to lead their flocks of sheep up into Montana's breathtaking and often dangerous Absaroka-Beartooth mountains for summer pasture. This astonishingly beautiful yet unsparing film reveals a world in which nature and culture, animals and humans, vulnerability and violence are all intimately meshed._

[http://sweetgrassthemovie.com](http://sweetgrassthemovie.com)

It's an unflinching movie that captures the beauty of the landscape, the desperation of the herders, and a sense of place and belonging. It also includes the most heartfelt swearing scene I've ever seen: [https://www.youtube.com/watch?v=YCbV58dzmBc](https://www.youtube.com/watch?v=YCbV58dzmBc). It's probably best to start with the official trailer, though, to give some context: [https://www.youtube.com/watch?v=AV9iah71iPQ](https://www.youtube.com/watch?v=AV9iah71iPQ).

</comment><comment><USER5> Would one of the people who've read this kindly share a summary?

<comment><USER6> People coming from (e.g.) Peru on H-2A visas were treated poorly in the 1980's and the 1990's. Legislation was passed in 2001, which lead to some increases in living conditions, and pay, but it's not really enforced by the Dept. of Labour, so some ranches still have workers living in the same conditions as in the 1980's and 1990's. Specific points:

* The company he worked for didn't want to pay him worker's comp. when he contracted Valley Fever, which is a direct result of his job / working conditions.

* They also wanted to just pay him a lump sum of $2k, and send him home rather than continue to pay his medical bills. They failed to mention to him that doctors in Peru don't know how to deal with Valley Fever since it's really something limited to the US. He only found this out from other Peruvians that he got in contact with.

* Companies liked to sign people up for H-2A visas as "sheepherders," but then have them do different jobs once they were here (and conveniently pocket the difference in pay between the jobs).

* The people living as sheepherders were basically modern-day "slaves." They were paid $750/month (flat fee) for a job that basically required their every waking hour (and or more) to complete. They were isolated from anyone except for their boss. Their boss would flip out and grill them if there were so much as "unknown" tire tracks in the vicinity. They weren't even allow to have a _magazine_ let alone a radio or television, because apparently that would mean that they were slacking off and not working.

<comment><USER7> >The company he worked for didn't want to pay him worker's comp. when he contracted Valley Fever, which is a direct result of his job / working conditions.

That part is debateable. People in parts of central California and Arizona sometimes come down with Valley Fever. You don't have to be a shepherd or even have an outside job. Or have a job at all.

You can make the argument that he wouldn't have been in California and therefore his employer should have covered the cost of his medical care, but you can make that argument about _any_ illness he suffered after coming to California.</comment></comment></comment>


A Single Java Code Base For Cross Platform Mobile - <AUTHOR> http://www.drdobbs.com/jvm/a-single-java-code-base-for-cross-platfo/240004250

<comment><USER2> "By drawing all components from scratch rather than utilizing native widgets, Codename One sets out to enable developers to avoid fragmentation. It additionally allows accurate desktop simulation of mobile apps."

Avoid fragmentation while looking awkward and not native everywhere.</comment>


GPS systems (PDAs software and applications)  - <AUTHOR> http://dev.emcelettronica.com/gps-systems-pdas-software-and-applications <comment><AUTHOR> GPS tracking systems are well known GPS based applications in daily life. Some applications can run independently, such as navigation, geo-tagging and passive track logger.</comment>


A Health Care Algorithm Offered Less Care to Black Patients - <AUTHOR> https://www.wired.com/story/how-algorithm-favored-whites-over-blacks-health-care <comment><USER2> Already posted there - [https://news.ycombinator.com/item?id=21359450](https://news.ycombinator.com/item?id=21359450)</comment>


Do we understand the math behind the PPP calculations? - <AUTHOR> http://blog.mpettis.com/2014/05/do-we-understand-the-math-behind-the-ppp-calculations/ <comment><USER3> tl;dr: Comparing the size of two or more economies, e.g., China and the US, is fraught with peril. Traditional comparison tools, such as the Gross Domestic Product (GDP) are neither precise nor accurate and involve considerable nuance. More recent tools such as PPP (Purchasing Power Parity) give the appearance of validity and reliability since they appear to have greater precision - but no one, perhaps least of all the economists using them - <USER2> make advance sufficiently meaningful claims as to their accuracy. In other words, PPP may be just as flawed and just as nuanced as GDP. Or it may not. No one really knows.

So take with a grain of salt any claims that the Chinese economy is set to overtake the US economy. It may be about to do so. It may not. It may have already done so. It might never do so.

Whether or not it does, did, or never will cannot be reliably established with GDP or PPP or any other tools yet known to economists.

On a personal note, I'd assert that just as currency strength is a measure of faith in an economy, so goes the importance of whether one economy is perceived as larger than another, with the same vicious/virtuous circle implications: If the Chinese economy is perceived as larger the US and likely to yet larger get, then speculators will put their money in China and remove it from the US, with virtuous and vicious implications for the two economies. Alternatively, if China and the US are perceived as being of a size, then both will for a time rise and fall with the perception of whether or not their being of a size is a good thing or not. In other words, why isn't China growing, let's put our money in the US, both are growing, both are fair picks, both are stagnating, Europe looks good, etc.

</comment><comment><USER4> PPP certainly isn't perfect to evaluate the "size" of an economy, but it's definitely better than USD GDP in the case of China.

[http://www.cepr.net/index.php/blogs/beat-the- press/serious-a...](http://www.cepr.net/index.php/blogs/beat-the- press/serious-arithmetic-problems-at-the-nyt)

</comment><comment><USER5> >> _The US is on the brink of losing its status as the world's largest economy_

Ahem, the EU has been the world's largest economy for a while: [http://en.wikipedia.org/wiki/List_of_countries_by_GDP_%28nom...](http://en.wikipedia.org/wiki/List_of_countries_by_GDP_%28nominal%29#Lists)

<comment><USER6> Why does the EU count as an economy? It's not a nation state.

<comment><USER7> The important thing is that it's not a state. The US and China are arguably not nation states either. Wikipedia says: _nation_ can refer to "a people, race, or tribe; those having the same descent, language, and history." A nation state is where the nation and state coincide. For example, Japan is a nation state: it is a state comprised almost entirely of a single nation (the Japanese people), and almost all of the members of that nation live in the state. South Korea is not, because the Korean people are split between two states; the United States is not, because it is comprised of multiple nations/peoples/tribes.

</comment></comment></comment><comment><USER8> Given the tech focus of this site, you might want provide better context, since it doesn't look like the article is talking about the Point-to-Point Protocol.</comment>


Google's Privacy Moves Are a Big Deal - <AUTHOR> https://thetoolsweneed.com/googles-privacy-moves-are-a-big-deal/ <comment> m-p-3 The "Machine Learning at the Edge" part is really interesting, and I hope we'll see more of that online when using some collaborative tools with deep learning.</comment>


Trying to see if this Saas management idea makes sense. - <AUTHOR>

In other words is this a problem / does a formal solution aside from an ad hoc one exist?
Let's say a company (SMB or even enterprise) has at any time users signed up for several diverse SaaS solutions, all expiring at different times often not being used but still auto renewed (or being used but by less users than initially thought).  Would it be useful to have a subscription management system which would:
1. Manage expiry and renewals 2. Contain relevant info on price, contract details, terms etc.. 3. list specific users 4. track usage by outgoing server logs.  Granted it would not be all encompassing but just to check for non use.
5.  If #4 shows non use then poll the users listed on that service 6.  Track price changes and other bundles offered by the Saas including competing ones as well.
As a vendor I notice that like gym memberships these services are under used and Saas companies benefit from auto renewals etc...
Yes, this can be done in-house, but I was thinking if building a dedicated solution to offer would be worthwhile (and would managers, accountants pay for this).
I would appreciate any comments, experiences, further ideas... or if this even makes sense.
Thanks in advance. Jack <comment><USER2> I am a product development manager at an enterprise company. This is just an opinion based on what I see.

I don't have this issue exactly, but maintenance schedules of non-saas software is much harder to manage, budget, purchase, etc. It's not hair-on- fire for me -- I have a spreadsheet. Saas is actually easier, and we do all of the user management actively -- it's not a big deal (for our big Saas usage, it's tied to hiring/termination basically automatically)

There are some things that are used across all dev departments, like MSDN subscriptions, that are challenging to manage. We use a shared spreadsheet in sharepoint -- works fine -- I doubt anyone thinks this is a huge issue for us.

If you were thinking of doing this -- I think the way to go is to take the whole job -- not just give me what is basically a shared spreadsheet on the web, but perhaps tie into the Saas and see how it's being used and offer savings ideas (20% of your users don't use featureX). Try to find one really hard to manage product and align yourself as being perfect for managing that (Salesforce, Dynamics, MSDN?, -- things that an entire department uses across a whole company)

</comment><comment><AUTHOR> Thanks for your feedback. Good points about tackling the hard to manage aspects. I wonder how feasible it is to track usage based on logs. I guess you would just need to flag non usage then follow up. Obviously usage info is not something that saas companies would share. Although I've been asked once or twice (by purchasing depts) to check if anyone of their users where using it. Thanks again

</comment><comment><USER3> does this solve the problem incidentally?

[https://www.meldium.com/integrations](https://www.meldium.com/integrations)</comment>


Kickstarter project: Desktop CNC Machine - <AUTHOR> http://www.kickstarter.com/projects/421256045/diy-desktop-cnc-machine

<comment><USER2> Having participated in a few different DIY CNC/3D printer projects with various groups of people, I've concluded that the limiting factor at the moment is _software_. The machines are out there, but the tools for designing objects and generating g-code are all hacked together, poorly maintained, and don't exploit the full potential of the machine.

I think it's a cultural thing. Hardware people are not conscious about UX the way software people are and at the intersection, the hardware approach presently dominates. Legacy baggage is also a problem. CNC still uses data formats that pre-date _computers_.

Of course, maybe the best way to encourage more software is to get more machines out there, but my personal efforts are already going entirely into code.</comment>


How to Start Web Development on Android - <AUTHOR> https://palash.tk/Webdev-On-Android <comment><USER2> for €200, buy a normal deadly cheap laptop and do it on a bigger screen. Don't burn your eyes on a small monitor</comment>


Official Statement on EFail by the GnuPG and Gpg4Win Teams - <AUTHOR> https://lists.gnupg.org/pipermail/gnupg-users/2018-May/060334.html <comment><USER2> At a minimum, it is a testament to the difficulty of using the gnupg commandline interface (and/or its API; does it have a C API?) properly.

For instance, you might ask why the default is to print any of the plaintext of a message that fails the integrity check. If the interface/API of gnupg had operated differently, then maybe even "buggy" users of gnupg would have been protected.

Computer security must make it easy to do safe things; if unsafe things can't be (or mustn't be) made impossible, they should be made difficult.</comment>


Show HN: A Sorted Array in Rust with O(√N) Inserts/Deletes - <AUTHOR> https://github.com/senderista/sorted-vec <comment><AUTHOR> This is my first real Rust project, so feedback is welcome!

Although this data structure was first published in 1979[0], I've not been able to find any implementations online. I've also published a drop-in replacement for Vec using the same data structure: [https://github.com/senderista/rotated- vec](https://github.com/senderista/rotated-vec). I haven't published these crates yet since I want to get feedback from the Rust community first.

[0] [https://www.sciencedirect.com/science/article/pii/0022000080...](https://www.sciencedirect.com/science/article/pii/0022000080900379)

PS: I'm looking for a job, preferably writing Rust!</comment>


Ants Are Practically Immune to Traffic Jams - <AUTHOR> https://www.sciencealert.com/ant-roads-are-practically-immune-to-traffic-jams-even-when-it-gets-crowded <comment><USER2> A major oversight here is rate of acceleration. Every organism and vehicle on earth has the same gravity and similar coefficients of friction to work with, so rates of acceleration have roughly the same cap, but the speeds change by orders of magnitude.

So an ant can go from full speed, to stopped, to full speed in a fraction of a second. A car on the highway will take several seconds to stop, and much longer to smoothly accelerate, leading to standing wave type effects on highways. This is much less likely with people walking, and even less likely with ants.

The dynamics of cars on the highway is governed by the difficulty of changing speed and direction. For ants, this constraint is negligible. So these things don't really compare.

<comment><USER3> I also really loved the throwaway about ants not caring about collision.

I can "solve" a lot of traffic problems too, if nobody involved is worried about collisions.

<comment><USER4> I think that's part of the promise of self-driving cars -- they'll ostensibly be safer, so can drive closer together, and can cooperate at intersections to increase throughput, no one needs to stop, just adjust speed to allow a gap.

Though based on my car's adaptive cruise control ability, we've got a long way to go before we can have cars that drive within a few feet of each other at highway speeds, and even longer before we could have intersections without signals (or stops).

<comment><USER5> I don't know if this promise will ever be real in that extent. Even if you assume perfect drivers(automatic or not) with instant reaction speed there can be situations where a road can become impassable quickly due to external influences, and this alone makes short distances between cars unsafe.

All it takes is one rock dropping onto the road heavy enough to immediately stop a car in its tracks, and what would follow would be a series of collisions affecting a large number of cars.

Then you need to leave gaps for new arrivals from a different road, and in the end I don't think the efficiency would be that much higher.

<comment><USER6> Presumably autonamous cars would maintain proper separation - I try to maintain a three to five second gap between myself and the next card, but drivers in my area tend to be quite aggresive and will force their way into the gap - I have nearly been hit or run off the road multiple times.

I think the benefits are more that the car strictly obeys road rules, as opposed to humans being unaware, ignoring, or straight up willfully breaking (e.g. speeding) the rules.

<rant>

On my path to and from work there is a "trouble nexus" \- you have a few main roads intersecting, a relatively short stretch of road with a couple of entrance/exits towards a public transit hub (trains, buses, and a large carpark converging - so there's a lot of road traffic), then a bridge, then another major intersection and exits onto a highway.

People are always slowing down to create a gap in the traffic flow and let vehicles from the transit hub onto the road leading up to the bridge, in an effort to be kind towards other drivers, but this has disastrous effects on the traffic behind it - interrupting the traffic flow of the major roads.

If people did not make space for vehicles from the side roads, the main flow of traffic would pass fairly quickly and then the sideroad traffic would be able to get on noramlly.

</rant>

The point I am trying to make is that autonamous cars would let traffic planners adjust e.g. road speeds, traffic light timings, etc. closer to a global optimum without having to account for human selfishness.

</comment></comment></comment></comment></comment><comment><USER7> > Whereas, when a trail is overcrowded, the ants restrained themselves and > avoided joining until things thinned out.

This sounds a lot like how traffic waves [1] occur. When there's a traffic jam ahead, you can often help clear it out just by slowing down to the average speed it's moving. Going a steady 10mph is much better than going 30mph for 1/3 of the time and then being stopped for 2/3 of the time. If everyone can start going smoothly at 10mph it will eventually speed up.

Traffic jams occur because cars are arriving at some point on the road faster than they can leave that point. If the cars coming towards it just _slow down_ to allow the cars there time to leave, the jam will clear.

[1] [http://trafficwaves.org/](http://trafficwaves.org/)

<comment><USER8> I use this method to an extent, but the unfortunate result often becomes people zipping in in front of you when you inevitably have a bit of extra space compared to those around you. This seems to leave you with two problems which are hard to solve simultaneously. The first is the one you mention where you want to keep a mostly constant speed compared to the whole group. The second is the effective need to locally keep up with the cars around you. Solving both problems simultaneously seems essentially impossible. I guess removing self-interest is the only real way (which appears to be what the ants do).

<comment><USER9> The slow-n-steady method really only works with a critical mass of participation. Unfortunately most people either don't know that it helps or don't care and are happy to just keep stomping the gas and breaks repeatedly.

<comment><USER10> Slow and steady only works up to a certain vehicle density. Once that has been exceeded, slow and steady simply serves to cause congestion further back in the road than necessary.

There is no way around stop and go traffic once the maximum capacity of flowing cars has been exceeded. After this, leaving extra space is just waste, which is why in more densely populated areas, people "cut" into the space in front, because the only optimization left is to use as much road as possible.

<comment><USER11> There are other benefits, enjoyment and reducing wear and tear. Increasing delay by a few % in a huge jam is not material.

<comment><USER10> If everyone did it, it would be material. But everywhere I've seen, other people usually slip into whatever space there is. Which technically does maximize the rate of vehicles passing through a point in the road, as you can take advantage of the various rates of acceleration.

Whether or not the time saved is worth the wear and tear, environmental damage, increased risk of collision, I can't say. I'd say probably not, but it's going to happen anyway.

<comment><USER11> Not really, as mentioned in a sibling thread. If you're in a big hurry, simply leave two minutes earlier you'll be ahead of all the folks you're worried about.

There is an efficiency gained through having space to change lanes as well, which is ine cause of the slowdown.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> Looking at that video, a lot of the ants were walking into each other. Maybe their advantage is just that collisions have low cost so they can afford to use strategies that even among humans on foot would lead to a painful crash.

<comment><USER13> They walk over each other too. We can't do that without causing minor or major injuries

<comment><USER14> Because ants are small... And lightweight, I can't remember right now the term for volume vs mass when compared, but you can throw an ant from the Empire State Building, and it will land like dropped from 2 inch height.

<comment><USER15> Taken from the Wikipedia page on terminal velocity, and quoted from the biologist J. B. S. Haldane:

 _" To the mouse and any smaller animal [gravity] presents practically no dangers. You can drop a mouse down a thousand-yard mine shaft; and, on arriving at the bottom, it gets a slight shock and walks away. A rat is killed, a man is broken, a horse splashes. For the resistance presented to movement by the air is proportional to the surface of the moving object."_

<comment><USER14> Thx, that was the quote i was looking for.

</comment></comment></comment></comment></comment><comment><USER16> I live and work in downtown Austin. I frequently walk (about a mile each way) to/from my office, so I spend a lot of time interacting with and observing traffic patterns in a very automobile-congested area. One of the biggest issues I've witnessed is how frequently drivers will proceed into an intersection even though there isn't enough space ahead of them to clear the intersection. Then, the signal changes, and they are left blocking one or more travel lanes perpendicular to their vehicle, thereby spoiling the precious open road for the unfortunate motorists who are left to deal with their selfishness or inattentiveness.

I see this happen almost daily, so I can only imagine how often it actually occurs when I'm not around to witness it. I wonder how much this slows the whole system down just so that a few folks can hopefully get where they're going one traffic light-cycle sooner. I'd be mortified to be sitting in one of these cars getting honked and glared at for my complete and utter lack of consideration towards others, but I guess selfishness is a powerful enough force to keep people driving like assholes regardless.

<comment><USER17> I also live and work in downtown Austin, and see this all the time too. It's... less than ideal, for sure. At least when people block the pedestrian crossing, (which is also something I encounter daily) it just makes it awkward, rather than gumming up traffic too.

<comment><USER16> Rad, didn't know you'd moved to Austin. We are using Rust for a couple projects at my startup now: bractlet.com

<comment><USER17> Oh cool!

If you ever want to grab a coffee or something, let me know :) we're also doing rust lunches every other week downtown.

</comment></comment></comment></comment><comment><USER18> Because they're not ant roads, they're ant sidewalks? How can someone have such a blind spot of basic facts. Check out any street fair or large public outdoor event. People are going everywhere, despite a high density of people. It works because people are not driving.

<comment><USER19> It's kind of amazing how selfish people become once they are driving a car. If people drove in a way that focused on keeping traffic flowing it would work, but cars are just big ego bubbles.

<comment><USER20> This is commonly believed but untrue. A certain volume of vehicles will drastically slow a road, regardless of how well people drive. Unless by "drove in a way that focused on keeping traffic flowing" you mean "wait in the on- ramp merge lane until rush hour ends".

A corollary of the above fact is that autonomous cars won't save us. They might make traffic better by about 20%, but induced demand allows us to predict that speeds during rush hour won't actually get better. [https://en.wikipedia.org/wiki/Induced_demand](https://en.wikipedia.org/wiki/Induced_demand)

<comment><USER21> Cars are truly one of the mistakes the human civilization latched on to. With fossil fuels going out of fashion, cars need to go too. We do not need car not even battery powered car. Maybe one car per 100 people is what should be okay for emergency purposes.

<comment><USER22> Thankfully this extremist position is going to remain an unimportant minority for the rest of my lifetime.

<comment><USER23> That kind of extremist minorities are far too often found working in journalism, so-called science (rather academic activism), politics etc. ... So I'm not too optimistic about these trends.

</comment></comment></comment></comment></comment></comment><comment><USER24> Basis of the article is questionable. Humans slow down on traffic to avoid accidents. Ants don't have that constraint. Neither will ants cause a stampede and can suffocate to death.

<comment><USER25> The article frustrated me because it contradicts itself several times.

>When it's moderately busy, for instance, the authors found the ants actually speed up, accelerating until a maximum flow or capacity is reached.

Then from the next paragraph:

>Plus, at high density times like this, the ants were found to change their behaviour and slow down to avoid more time-wasting collisions.

Did I miss something here or does this legitimately make no sense?

<comment><USER26> At low density, ants move at a speed that maximizes efficiency. At medium density, they move a bit more briskly, sacrificing some energy to keep from blocking traffic. At high density, they move more deliberately, avoiding situations like we see on highways where a single vehicle advances rapidly but slows down many others as they brake to avoid it and cause a traffic wave.

</comment></comment></comment><comment><USER27> I would consider the Ant Death Spiral to be a pretty bad traffic jam:

[https://www.youtube.com/watch?v=N0HoqjxfvJ4](https://www.youtube.com/watch?v=N0HoqjxfvJ4)

<comment><USER13> That's not a traffic jam. It's basically mass suicide after getting lost

<comment><USER28> According to the description, they didn't die, they somehow dispersed again after 30 minutes.

<comment><USER13> They were probably "found" by another "foraging party" of their own colony. Even if one of them regains active pheromone trail, all of them can safely return.

</comment></comment></comment></comment><comment><USER29> > In fact, compared to humans, these ants could load up the bridge with twice > the capacity without slowing down.

Then, on the next paragraph:

> And they do this through self-imposed speed regulation. When it's moderately > busy, for instance, the authors found the ants actually speed up, > accelerating until a maximum flow or capacity is reached.

Doesn't this mean that they do slow down?

<comment><USER30> I'm speculating that "slow down" in your first quote means "the flow doesn't plummet towards zero when it's busy" and in the second quote it means "reduce their average velocity". So in that sense they don't slow down (i.e. the colony doesn't grind to a halt) because they slow down (i.e. literally slowing down)

Again, I'm speculating about the meaning but if I'm right then it's a poor choice of words from the author.

</comment></comment><comment><USER31> "Traffic jams are ubiquitous in human society where individuals are pursuing their own personal objective,"

Perhaps humans don't have the option of walking / driving through wherever they please, and instead they have to use fixed roads / sidewalk? I'm pretty sure if we had the option of driving on dirt we would easily avoid traffic jams, as we'd just drive wherever we want.

<comment><USER32> Valid point, but the article does mention that ants are at least somewhat constrained to the narrow paths laid out by their colony's pheromones.

</comment></comment><comment><USER33> Ants can create new paths on demand. Ants on a trail typically have the same destination. Ants aren't going to park on the already tiny trail unlike humans. Bumps, potholes slow down cars and limit ability to increase speed unlike ants.

We'll be finally able to traffic jam free when flying cars become the norm.

<comment><USER34> That's not what the article is saying. They have tested ant flow on narrow bridges where additional lanes aren't possible.

From the article:

"they do this through self-imposed speed regulation. When it's moderately busy, for instance, the authors found the ants actually speed up, accelerating until a maximum flow or capacity is reached.

Whereas, when a trail is overcrowded, the ants restrained themselves and avoided joining until things thinned out. Plus, at high density times like this, the ants were found to change their behaviour and slow down to avoid more time-wasting collisions."

We'll be finally able to traffic jam free when autopilot will make us slow appropriately in high density conditions, avoiding accordion-like brake/accelerate/brake cycles

<comment><USER35> Congestion dependent speed limits have been in use for a long time on German highways.

<comment><USER36> The principle is sound, but the ants actually obey the rules whereas (in the UK at least) a small contingent of human drivers will ignore the limits, speeding up and slowing down between enforcement cameras. This concertina effect from just a small number of drivers is enough to slow the entire flow of traffic.

<comment><USER10> It would have happened anyway after a certain density of vehicles is exceeded, since each car and truck had different accel/decel rates. Especially if there is an incline anywhere.

</comment></comment></comment></comment></comment><comment><USER23> Perhaps our traffic jams are due to too many rules? Classic video that demonstrates an alternative way of doing things: [https://www.youtube.com/watch?v=UEIn8GJIg0E](https://www.youtube.com/watch?v=UEIn8GJIg0E)

<comment><USER37> You might want to read about Hans Monderman.

> Monderman's work _demonstrated that city and village streets become safer > when they are stripped of traffic controls_ so that drivers must take cues > from observing people rather than signs. Though it sounds chaotic, the > results of Shared Space have shown to be just the opposite: traffic moves > slower and the rate of major accidents declines drastically.

> His design approach is the concept of "shared space", an urban design > approach that seeks to minimise demarcations between vehicle traffic and > pedestrians, often by removing features such as kerbs, road surface > markings, traffic signs, and regulations. Monderman found that the traffic > efficiency and safety improved when the street and surrounding public space > was redesigned to encourage each person to negotiate their movement directly > with others.

[https://www.pps.org/article/hans-monderman](https://www.pps.org/article/hans- monderman)

[https://www.pps.org/article/shared-space](https://www.pps.org/article/shared- space)

[https://www.maharam.com/stories/rawsthorn_hans-mondermans- na...](https://www.maharam.com/stories/rawsthorn_hans-mondermans-naked- streets)

For the record:

> First implemented in his native Netherlands, Monderman's designs have since > spread throughout Europe, South Africa, Australia, Japan, and Brazil, and > Canada. They are also making an appearance in often car-dominated U.S. > cities such as Pittsburgh, Seattle, Portland, San Francisco, and Chicago.

> "It's a moving away from regulated, legislated traffic toward space which, > by the way it's designed and configured, makes it clear what sort of > behavior is anticipated," said Ben Hamilton-Baillie, an English urban > designer who coined the phrase Shared Space after trying out Monderman's > controversial ideas in his hometown of Bristol. Hamilton-Baillie now > promotes Shared Space projects in Germany, Belgium, and Denmark as part of > an ongoing project of the European Union.

<comment><USER23> This line of thought has become very popular among city planners here in Austria, but I've seen it implemented in 2 different ways:

\- in Vienna, they give priority to pedestrians in such shared zones, cars have to go very slowly and often struggle with large numbers of people in areas frequented by tourists. There is also a lot of confusion around the question where cars are actually allowed to go and when

\- in some tourist areas in Italy, where lower traffic roads have no sidewalks and cars go 30 Km/h, pedestrians walk on the edge of the street. This seems just as safe and less frustrating for drivers.

</comment></comment></comment><comment><USER38> My summary of this article: Ants knew TCP flow-control long before Van Jacobson.

</comment><comment><USER39> If there are hundreds of ants all carrying food home it's not important that one individual comes home quick.

If I want to get home I don't have much to gain from 10 other people coming home first.

</comment><comment><USER40> I think this article implies we operate like an ant colony with a single goal. I may be mistaken but we humans dont't have a single goal so our priorities are different.

</comment><comment><USER41> What has always puzzled me is that how is it possible that for example in the army a unit of thousand men can move as a single unit. Yet 5 cars stopped at the traffic lights can't do this but exhibit a latency accumulating between every single vehicle. If everyone just started moving when the light turns everyone could take off at the same time!

<comment><USER42> It is a matter of trust.

In army you trust others to move with you.

In car, you know that others won't move anyway so you wait and react to their behaviour.

Army also moves in cohesive manner - unit is going towards known place.

Car drivers do not know where others want to drive.

Even the purpose of turn signals evade most drivers - they exist so you can signal your intention BEFORE manoeuvrer - most drivers turn them just before they need to, or even during the manoeuvrer.

<comment><USER41> Yes it was a rethoric question but anyway you said it and there's basically the answer to the question posed by the scientist. Trust and communication.

In the army some chief gives the instructions. Everyone obeys the instructions (regardless of whether you trust or don't trust your adjacent soldiers to move as well).

Seems the problem really is just the lack of co-operation and individualism that produces a negative externality for the society as a whole.

</comment></comment></comment><comment><USER43> Watching someone improve traffic of game cities on Youtube I realized that traffic jams have more to do with how streets are laid out than with the behavior of drivers. If a city or more broadly speaking the street network was properly designed traffic jams would only happen in case of accidents or other unforeseeable traffic loads.

<comment><USER44> You're working on the assumption that game traffic is a perfect representation of actual traffic. In reality, that's not the case though. In games, traffic on a straight road behaves perfectly. In real life, people cut others off, forget to check their blind spots, play on their phones, etc.

This type of behavior often causes the 'out of nowhere' traffic jams. Someone brakes excessively because of one of the reasons above and people behind them brake even harder. Eventually some people will come to a stop and this will accordion for a while.

You can play with this here: [https://traffic-simulation.de/](https://traffic- simulation.de/)

Especially try just disturbing an otherwise nice traffic flow.

<comment><USER43> No, not in that game. People would cut into each others line all the time and generally behave stupidly. Also, if you have a traffic line where the behavior of the car in the front affects the cars behind it you already have bad traffic, which wouldn't happen with properly designed roads.

</comment></comment></comment><comment><USER45> Actually really interesting to think about how self driving cars would be impacted. In a world where 100% of cars are self-driving, but algorithms are manufacturer-specific, how much more efficient would driving really be? It would seem like if all cars were operated by the same algorithm then you'd be able to build something that was more "ant colony" like that would similarly improve driving efficiency?

<comment><USER46> Even without higher-level coordination, independent autonomous agents on the road could still do a lot better than human drivers in at least two ways: a) the jam-busting behaviour described elsewhere on this thread could be built in, avoiding the counterproductive and unnecessary stop-and-go pattern that most human drivers seem to fall into, and b) even when traffic unavoidably comes to a standstill, a self-driving car could have near-instant reaction time on stopping and starting, meaning that the wave propagation would be much faster.

This second point is basically saying that if there's a pileup, yes the whole roadway will stop while it's cleared, but the moment a lane opens up, autonomous cars will be able to more efficiently and immediately use it to get the whole jam moving forward.

</comment></comment><comment><USER47> I used to study ants;Diacamma sp. in India (not the pheromone laying one). These ants transport individuals through a method called tandem running.

There is also traffic-jam in this species if we narrow the path. Here, also there is no change in dynamics in the way these ants relocate even when there is traffic jam (to be published). Interesting to see similar methods adopted by ants even though the transport method is different.

</comment><comment><USER48> I feel like a significant portion of human traffic jams are caused by bottlenecks but as far as I can tell this was not addressed in the study. Would be interested to see how much more efficient ants are in the case where the width of the path is variable.

</comment><comment><USER49> Nice and well thought out write up about the ant. Ants are always busy and preoccupied fulfilling one task or the other. Despite this, there is great team work and selflessness among the ants, which humanity can learn from and have a better society.

<comment><USER50> Well, anthropomorphism aside, ants kill and eat their peers if they detect damage or aberrant behavior. They behave as they do, because it is beneficial to the queen, whose future is the only one that matters.

</comment></comment><comment><USER51> I read ant as aunt and was very confused, then realized what happened once opening the link.

</comment><comment><USER52> Because ants are genetically adapted to act selflessly, given they are a colony.

Humans need externally imposed incentives to act cooperatively, which is where government and private property comes in.

<comment><USER53> Do we, though?

</comment></comment><comment><USER54> I wonder what the effect would be if they measured ants from different colonies on the same trail?

<comment><USER55> I imagine the breakout of total war would cause moderate to severe traffic congestion.

</comment></comment><comment><USER56> Motorbikes are practically immune to traffic jams, especially if they drive on the sidewalk.

<comment><USER57> Basically everything that is not a car is immune to traffic jams outside of extraordinary situations like events with narrow exits.

</comment></comment><comment><USER58> it makes sense to up the speed limit during rush hour instead of the typical case for humans where we reduce it

</comment><comment><USER59> This is because they don't drive.</comment>