How Redux Works: A Counter-Example - <AUTHOR> https://daveceddia.com/how-does-redux-work/ <comment><USER2> There is a certain paradox with teaching something like Redux, in that it's designed to make complex systems easy to understand and manageable. Yet when trying to demonstrate with a simple example, it appears hugely over complex and unnecessary.

I think a pre-requisite to learning something like Redux (or any micro- architecture) is to first try building something without it. Once you understand the pains of undisciplined, organically designed, spaghetti applications, the cynicism is replaced by excitement over how this will improve your job/life/application.

<comment><USER3> I think there's a fair criticism of Redux in here - most well designed tools can accomodate a learning curve, and scale up the complexity when needed. I can be productive in Express without knowing about middleware, or git without knowing how to rebase.

Redux, on the other hand, expects you to dive into the deep end head first the first time you use it. I teach javascript development, and I'm noticing there's a pretty big gap where you're feeling the pain of React, but Redux is still too large a complexity tax (To be fair, even to an experienced programmer it often is - for every complex state change that warrants Redux there's 50 straightforward "change this field" or "toggle this boolean" actions.)

Maybe this isn't the responsibility of Redux, and something should be built on top of it, but there needs to be some amount of consensus on what the best solution is.

<comment><USER4> The Redux learning curve is tough, especially for folks who don't already have a strong grasp of functional programming ideas. Immutability is weird. Breaking everything up into multiple places (dispatch, actions, reducers) is weird. Like you say, it's unfortunate that one must basically learn _all of it_ to get started using Redux. It does do a nice job of solving difficult problems though.

> there needs to be some amount of consensus on what the best solution is.

The thing is, there _is_ consensus: it's Redux. I'm not saying that's good or bad, but it's king of the state management hill right now.

What's really interesting to me is that the JS community is largely allergic to anything that isn't the "best solution". Nobody wants to use a little library with 53 stars on Github, even if it's easier, or seems like a better fit than Redux. The thinking seems to be "It's not any good unless it's the most popular choice." Those sorts of libraries might be ok for proof-of- concept work, but not for the real world. Not for production.

What drives this line of thinking? I think it's complex, but I believe fear plays a big role.

\- Fear of choosing the wrong library (what if it becomes unpopular!)

\- Fear in one's own abilities to evaluate a library ("it seems fine to _me_ , but I'm no authority, I can't make that call")

\- Fear of looking bad to the boss ("Nobody ever got fired for buying IBM", right? React + Redux has that spot right now)

There's also the self-reinforcing nature of a popular thing: companies using Redux => job listings require Redux => people want to learn Redux => people make Redux courses/books/blogs => people don't teach the alternatives.

<comment><USER3> There's consensus on Redux - that's not what I'm talking about. There seems to be a fair amount of desire for something that simplifies "straightforward" state management. The Redux maintainers don't seem to be interested in this, preferring it to be something created by the community. As far as I can see though, no one is filling that gap.

<comment><USER5> I'm a Redux maintainer, and I'm _absolutely_ interested in making it easier for people to get started with Redux. I opened up an issue thread earlier this year to get community feedback and ideas on how we can do that: [https://github.com/reactjs/redux/issues/2295](https://github.com/reactjs/redux/issues/2295) .

We don't plan to modify the Redux core itself, but I would _love_ to be able to list some tools as "approved" or "blessed" ways to get started easier.

Sadly, I just don't have enough free time to go build much of anything like that myself, but I will happily work with anyone in the community who's interested in doing so.

I also hope to revamp the Redux docs "Ecosystem" page to more specifically point to certain tools as recommended solutions to specific problems, but again haven't had time to do so yet.

</comment></comment></comment></comment></comment><comment><USER6> Nice thing about this architecture is that it really is agnostic to your stack and as long as you have some way to build "values" you are good to go.

I have recently been working on a Redux for C++ experimental library with time-travel and all. As an example I built a mini-emacs text-editor with it. Should post about it here whenever I flesh out the README and all (or the MeetingCpp talk about it gets published). In the meantime you might want to check these links:

The library: [https://github.com/arximboldi/lager](https://github.com/arximboldi/lager)

The Counter-Example: [https://github.com/arximboldi/lager/tree/master/example/coun...](https://github.com/arximboldi/lager/tree/master/example/counter)

The text editor: [https://travis-ci.org/arximboldi/ewig](https://travis- ci.org/arximboldi/ewig)

Show-case of a time-travelling debugger: [https://twitter.com/sinusoidalen/status/926382341433577472](https://twitter.com/sinusoidalen/status/926382341433577472)

</comment><comment><USER7> Switched our entire native app stack to a redux backend (Swift and Kotlin), never been happier. Sure there is more code in the end, but the decoupling and simplicity to use is just too good. Especially on iOS when you know how complex it is to maintain a controller hierarchy with a (now dead) dependency chain.

<comment><USER8> Did you use ReSwift and ReKotlin, or something else?

<comment><USER7> Both :)

</comment></comment></comment><comment><USER9> It is interesting how people have the idea that react === Redux/flux. Where in fact Redux is unopinionated and works with other libraries/frameworks just fine.

<comment><USER10> How often do you see redux used with anything other than react? Or are you just talking about redux working with react alternatives like preact/inferno, etc?

You're not wrong, but practically 99% of people pair it with react.

<comment><USER5> Redux is actually used noticeably outside of the React community.

Redux can be used with any UI layer, and there's bindings for many frameworks and UI layers besides React [0].

Redux has picked up popularity within the Angular community, both in its original form and the NgRx reimplementation. The ember-redux bindings are also starting to gain a bit of a following. Vue's VueX lib is inspired by Redux, and there's Vue-specific bindings for Redux itself.

[0] [https://github.com/markerikson/redux-ecosystem- links/blob/ma...](https://github.com/markerikson/redux-ecosystem- links/blob/master/library-integration.md)

</comment></comment></comment><comment><USER11> I appreciate the author's work to explain this, and I like starting without Redux as a demonstration - definitely a good idea to figure out what React does on its own first.

That said, I found the reverse approach to Redux to be more confusing than the actual Redux documentation and the tutorials that Dan Abramov has already put together around Redux which explains things quite lucidly.

Example: [https://egghead.io/lessons/react-redux-the-single- immutable-...](https://egghead.io/lessons/react-redux-the-single-immutable- state-tree)

<comment><USER5> Dan's teaching style is very much "from first principles". You can see that in his Egghead videos, as well as the "Middleware" page in the Redux docs [0].

I've seen feedback that Dan's teaching style is the greatest thing ever, and feedback that it requires a giant leap of faith that "we write thing A, and thing B, and thing C, and magically they all work together at the end". Clearly, different people have different learning styles. Dan and Andrew _did_ try to write the docs in a way that would be accessible for people with varying backgrounds, but it's tough to write docs in a way that works for everyone.

If you or anyone else has suggestions for improving the docs, please let me know! I'm always open to ideas for improvements. Please ping me on Twitter at @acemarke, or file an issue / PR in the repo.

[0] [https://redux.js.org/docs/advanced/Middleware.html](https://redux.js.org/docs/advanced/Middleware.html)

[1] [https://github.com/reactjs/redux/pull/140#issuecomment-11371...](https://github.com/reactjs/redux/pull/140#issuecomment-113716381)

[2] [https://twitter.com/dan_abramov/status/622568094939090944](https://twitter.com/dan_abramov/status/622568094939090944)

<comment><USER11> Yeah - I can see that. "It's all functions so it all works" haha. I think the context setter that helped for me was to see "hey here's what I see with state, and here's how I think about it and did the thing" at React EU: [https://www.youtube.com/watch?v=xsSnOQynTHs](https://www.youtube.com/watch?v=xsSnOQynTHs)

</comment></comment></comment><comment><USER12> Like the explanation a lot. Even when you've understood redux, and want to use, the amount of upfront boilerplate can be a turn off. I liked this approach of parsing out the boilerplate piece by piece.

</comment><comment><USER5> I'm a Redux maintainer, and this is a great introduction to Redux. I love Dave's ability to break things down into easily understandable pieces, and his clear writing style.

I also saw a similar "React and Redux: An Introduction" tutorial published just within the last couple days [0].

For anyone who's looking to learn more about Redux, I'd encourage you to check out my React/Redux links list [1], which has sections pointing to more Redux tutorials [2], Redux architecture and best practices [3], and much more.

If you've picked up the basics of Redux and want to see how it works at a larger scale, I recommend the "Building a Simple CRUD App with React and Redux" series [4], and my own "Practical Redux" tutorial series [5].

Also, my "Idiomatic Redux" blog series [6] looks at things like the history and intent behind Redux, common usage patterns and why they exist, and why I consider certain patterns to be the "right" way to use Redux.

Finally, I am always happy to answer questions about learning and using React and Redux! Please feel free to ping me on Twitter at @acemarke. Also, come by the Reactiflux chat channels on Discord [7]. There's always plenty of people around who can answer questions. I'm usually on there evenings US time.

[0] [http://jakesidsmith.com/blog/post/2017-11-18-redux-and- react...](http://jakesidsmith.com/blog/post/2017-11-18-redux-and-react-an- introduction/)

[1] [https://github.com/markerikson/react-redux- links](https://github.com/markerikson/react-redux-links)

[2] [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/redux-tutorials.md)

[3] [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/redux-architecture.md)

[4] [http://www.thegreatcodeadventure.com/building-a-simple- crud-...](http://www.thegreatcodeadventure.com/building-a-simple-crud-app- with-react-redux-part-1/)

[5] [http://blog.isquaredsoftware.com/series/practical- redux/](http://blog.isquaredsoftware.com/series/practical-redux/)

[6] [http://blog.isquaredsoftware.com/series/idiomatic- redux/](http://blog.isquaredsoftware.com/series/idiomatic-redux/)

[7] [https://www.reactiflux.com](https://www.reactiflux.com)

<comment><USER13> Is there is a similar repo of links for redux, specifically as it works with Angular? Thanks!

<comment><USER5> My links list does have a "Using Redux Without React" category page, which points to some articles on using it with Angular, Ember, etc: [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/redux-without-react.md) .

That said, I'm already very busy just trying to keep up with the React+Redux community, and don't have time to keep tabs on everything that's going on in the Angular world as well. If you do find any kind of similar collection that's more focused on Angular+Redux, please let me know!

</comment></comment></comment><comment><USER14> What language is that in the examples? Yes, I've dropped out of the Javascript train.

<comment><USER15> It's ES6 JavaScript, it's great, and most modern browsers support it out of the box. You can also use Babel to transpire it into something that's supported everywhere.

</comment></comment><comment><USER16> this is a relatively terrible explanation of redux when compared to this: [https://code-cartoons.com/a-cartoon-intro-to- redux-3afb77550...](https://code-cartoons.com/a-cartoon-intro-to- redux-3afb775501a6)

<comment><USER5> Lin Clark's cartoons are always excellent, but these articles serve different purposes. "A Cartoon Intro to Redux" is more about the conceptual aspects, while Dave's post is both concepts and actual code usage.

<comment><USER16> Dave's post is targeted at 'demystifying'. For this context, Lin's cartoon explanation excels.

If Dave's post was scoped to optimizing redux implementation, detailed code samples would be appropriate.</comment></comment></comment>


Bill Gates envisions fighting hurricanes by manipulating the sea - <AUTHOR> http://www.nola.com/news/index.ssf/2009/07/bill_gates_of_microsoft_envisi.html

<comment><USER2> This seems hare-brained on a number of levels.

Firstly, a hurricane involves an absolutely phenomenal amount of energy and area. The typical hurricane is 300 miles wide, covering an area of 280,000 square miles. Even the core (100 miles wide) is 30,000 square miles. How big are these tubs? How much of that area are you going to cover? How many of these things do you need to do that?

The idea goes even further off the rails when they start discussing non- hurricane uses, in two paragraphs saying the tubs "could stir up nutrient-rich sediment on ocean floors to promote plant and animal growth in environmentally-degraded areas" but then also "moving nutrients and other material from the ocean floor to the surface to promote growth of algae to trap carbon as a tool in fighting global warming."

Stirring up muck from the bottom is either going to feed fish (unlikely) or promote huge algal blooms (much more likely). But not both -- algal blooms pull oxygen from the water, killing fish.

It seems more like a crazy scheme drunken students would come up with at 3am than a real invention.

</comment><comment><USER3> I think it's unwise to screw with something you don't understand.

This reminds of the changing attitude towards forest fires. Since the 1900s through the 1980s a lot of time and effort was spent putting out forest fires as quickly as possible. In the 1980s scientists were coming to the realization that forest fires are a critical part of the forest ecosystem. Fire clears out the dead trees and undergrowth allowing new vegetation to grow.

I think hurricanes play a similar roll, even if we don't know what exactly that is.

<comment><USER4> I'm not sure people didn't know that forest fires did that. For hundreds of years aboriginal people used fires to manage the land.

The idea that we can "control nature" (born of the scientific advances of the Victorians) convinced people that we could build near/in forests that would traditionally get swept by fire every 30 years or so. It's quite arrogant that we still build there!

While this does fall into the mad category I'm all up for a little mad thinking if it generates new ideas.

The oceans are a great resource that we barely understand.</comment></comment>


Samsung core confirmed inside iPhone 4S - <AUTHOR> http://news.cnet.com/8301-13924_3-20122324-64/samsung-core-confirmed-inside-iphone-4s/ <comment><USER2> It's an ARM core on a chip manufactured by Samsung (i.e. not a Samsung core).

Also, if the "A5 is SoC including RAM", then the RAM is on the same piece of silicon as the ARM core (for it to be SoC). Not sure how it's possible for Samsung to make part of the silicon (for the core) and someone else to make the RAM. Perhaps the RAM isn't on the A5 after all ;-)

There's no risk in Apple switching manufacturers (e.g. Samsung Nexus uses a TI OMAP SoC CPU, instead of a Samsung Exynos for the Galaxy S II). Switching to Intel is the massive risk, since they don't use ARM cores at all, so the O/S would require a rewrite.

Finally, the Ivy Bridge microarchitecture isn't aimed at lower power computing (Intel Atom chips are based on the Bonnell microarchitecture), so there's unlikely be 3D transistor technology...

Apple's real move would be to drop the A6 entirely and focus on the same CPU's used by Android, since the both Android and Apple are using ARM V7 instruction sets with Cortex A9 cores.

<comment><USER3> > Switching to Intel is the massive risk, since they don't use ARM cores at > all, so the O/S would require a rewrite

I think the idea behind the Intel rumour is that Intel would 'just' be a fab in this scenario. They would license the ARM tech and fab the A6, so the story goes...

<comment><USER2> That's an even bigger story, as it would mean Intel is no longer able to design CPU's LOL

</comment></comment></comment><comment><USER4> It would be interesting to know what the politics inside Samsung are vis-a-vis the dispute with Apple. It's hard to believe that the silicon people were thrilled with the mobile division kicking sand in their biggest customer's face. If Samsung's mobile division gets a little bit bigger and their components business gets a little bit smaller, is this a net-win for them?

<comment><USER5> I wonder what Samsung's long-extant mobile division thought of Samsung's silicon division getting in bed with a competitor?

<comment><USER6> "Business as usual."

</comment></comment></comment><comment><USER7> If they're still dependent on Samsung for their main processor it kinda makes you wonder how well they're doing finding another processor for the iPhone 5.

I know the 4S just came out but traditionally iPhones have come out over the summer so we _might_ see the iPhone 5 as soon as 7 months from now.

</comment><comment><USER8> There's not much of a story here. Where chips are fabbed doesn't matter than much. When the A5 came out in the iPad 2, it was manufactured by Samsung (that decision was probably made around two years ago) and nothing has changed since then.

</comment><comment><USER9> How long does a contract to supply silicon usually last?

<comment><USER10> Varies pretty heavily and could be many years. Check all the wrangling when Apple bought P.A. Semi. The DoD contracts can go on for more than a decade.

</comment></comment><comment><USER11> i remember reading that apple tended to financially help companies set up new fabs/equipment/whatever in exchange for fairly long term contracts. For example, when they do a die-shrink, apple might pay 30% of the cost to upgrade the fab, in exchange for preferred (in terms of quality and price) chips for X years. No source, too lazy.

</comment><comment><USER12> Corporations as large as both of them really do not care.

Greed for profits overrides any "pride". Happens all the time.

Google is still paying Mozilla millions for home page links right?</comment>


A User-Centred Approach to Functions in Excel (2003) - <AUTHOR> https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/excel.pdf <comment><USER2> So, this is from 2003. What became of this research? Did it make it into subsequent versions of Excel?

<comment><USER3> You can define functions in VBA but this nice integrated purely functional approach isn't in excel as far as I'm aware.</comment></comment>


Three dumb ideas I came up with that would make my life a lot easier - <AUTHOR> 2 ideas for GPS (eg Google Maps), 1 idea for web browsers
I'd really appreciate it if you guys gave me some feedback on these ideas because I curious to see if I'm the only one who thinks they're good or if they're legitimately good ideas.
For GPS:
1. Allow users to control the speed that the GPS voice gives directions at. EX: Give directions X miles out from turn.
Sometimes the GPS will give directions to turn right, but I'm in the left lane and it's just too far away. I end up having to either make a U-turn or have the GPS recalculate my route.
Literally everyone I've mentioned this to thinks this is a great idea. I'm not too sure about the other two.
2. Also, let the user change the frequency that directions are given (EX: at least every X minutes.) This would be helpful on long stretches of highway when the GPS isn't saying anything anymore and you're not sure if you're going the right way anymore. (I mean, you probably are, but the fact that the GPS is no longer giving you directions is just a little bit anxiety-inducing sometimes.)
For web browsers:
3. Give users better control of deleting tabs. Right now on Chrome I have two options: close other tabs, or close tabs to the right. These are both pretty terrible in my opinion because if I want to save more than one tab it assumes that all the tabs I want to keep are grouped together. A better option would be to allow users to mark the tabs that they want to save so that when you say "close other tabs," it just closes the tabs that aren't marked. After closing the other tabs, the saved tabs automatically become unmarked. <comment><USER2> The problem with the first two is how would you communicate that to the user? You could make it a configurable option in a settings menu somewhere, but most people don't bother with those. Even those that do bother with the settings probably only think of changing it when they're actively getting directions, not after they've reached their destination, and so the setting never gets changed. That leaves making it an option while you're trying to follow the directions, which is also a bad idea since you're busy trying to drive.

I do agree that GPS apps should be more user friendly. Maybe an app with voice commands so you can ask questions? Like "Am I still going the right way?" or "When's the next turn?" or "Update me every mile"

As for the last one: there are dozens of tab management extensions for chrome. I'm sure you can find one that does what you're looking for.

</comment><comment><USER3> This might make a better story if it were written up as a blog post and submitted as a link.

Good luck.</comment>


GCHQ makes brazen attempt to undermine the independence of its new regulator - <AUTHOR> https://medium.com/@privacyint/press-release-gchq-makes-brazen-attempt-to-undermine-the-independence-of-its-new-regulator-36e56150987d <comment><USER2> Genuinely very worrying.</comment>


Unix Command Lines and Relations - <AUTHOR> http://merrigrove.blogspot.com/2013/12/the-occultation-of-relations-and-logic_22.html

<comment><USER2> Just for the record the initial proposed solution is not really an optimal way to do it, specially if log files are huge. Using cat will push the whole log file to stdout first and it's not really needed because `grep GET /var/log/nginx-access.log` will do exactly the same, but way faster.

</comment><comment><USER3> Interesting to see him describe everything in terms a database. I sometimes think I am too stuck in a relational mindset to understand the reasons for things like MongoDB. Then other times I think NoSql movement is a huge step backwards, and > 90% of people are using it for the wrong reasons.

</comment><comment><USER4> A similar article about relational 'thinking' with bash scripts [http://matt.might.net/articles/sql-in-the- shell/](http://matt.might.net/articles/sql-in-the-shell/)

Like when people shed a "new" light on seemingly simple tools.

</comment><comment><USER5> As much as I'd like to read this article, Blogspot's themes are so aggressively reader-hostile that I simply cannot.

Please, people, if you're using Blogspot, stop. Or at the very least, avoid the craptacular "dynamic" themes like the pox they are.

<comment><USER6> The broken back button behaviour is a nice touch, too.

</comment></comment><comment><USER7> I'm working on a set of tools to do functional programming in Bash (using JSON). I have a pretty good idea of how it's going to be, just need to implement it. Unix pipes are the function application. Json is data structures. And I'll have message passing concurrency like Erlang.

If only I didn't have exams! (Been working on it 50% of the time though.)

<comment><USER8> Have you seen jq? It's supposed to be like sed for JSON. [http://stedolan.github.io/jq/](http://stedolan.github.io/jq/)

<comment><USER7> I have. I got the idea in the first place because I was trying out jq. Small, powerful tool that.

</comment></comment></comment><comment><USER9> TFA should be nominated for a Useless Use of Cat Award [0], particularly since the dissected command apparently "showed the power of true Unix mastery".

[0] [http://partmaps.org/era/unix/award.html](http://partmaps.org/era/unix/award.html)

<comment><USER10> I agree, but I think it was intended to provide each piped command performing a single relational operation.

<comment><USER9> The shell command

      cat file | grep 'expression'

is the shell analogue of the SQL query

      select * from (select * from table) as q where column like '%expression%'

...except that a decent query optimizer will collapse the extraneous inner query. Bash doesn't know how to do that.

It's also more expensive:

      # wc -l /var/log/secure
      97845 /var/log/secure
      # time cat /var/log/secure | grep root > /dev/null

      real    0m1.600s
      user    0m1.517s
      sys     0m0.294s
      # time grep root /var/log/secure > /dev/null

      real    0m1.275s
      user    0m1.237s
      sys     0m0.036s

That's an extra .3-and-change seconds, or _over 25% longer_ , on a 98k line file. Scale that up to a multi-million line ngnix log file, and I'd actually say it's a _worse than useless_ use of cat.

<comment><USER11> wc -l is faster however it only works on an uncompressed file. The pipeline in the article was doing much more complicated work on the stream of output. I will often separate my pipeline logic from my "read this data and feed it into the pipeline" logic, since the logic around what to read in and where to write it can often change even when using the same logical pipeline.

As a simple example: cat somefiles.txt | pipeline_script > stored_output.txt

Other times I'm reading gzipped files or remote log files, I don't want that data mixed in with the pipeline logic. If I want to move the output files to a different directory on one set of servers, that may not impact my generalized pipeline.

I work with trillions of lines of log files and there are many ways to scale up pipelines. I wouldn't start optimizing the difference between 1.6s and 1.275s unless it made an economic impact on the problem. How often is it run? Can you process more lines in an economic unit of time with the faster version? If this is a job that runs once an hour or even once a minute how many lines are collected during that time?

Intermixing the grep or wc -l logic into the pipeline logic can have adverse support and maintenance costs and many times saves machine time while spending programmer time. Which one dominates in this scenario?

It's like the old saying...there is more than one way to skin a "cat". :)</comment></comment></comment></comment>


Show HN: Whilelse – a programming platform that represents code as a web - <AUTHOR> http://whilelse.com/ <comment><USER2> The screen cast videos did not work for me. Pressing play just made the video load, but would play for only a fraction of a second.

Anyway, I think I about understand the concept. Basically, rather than organise software into files, you store your source code as a database.

This has several advantages. Firstly you can easily attach metadata to your source code components (be they, modules, methods, functions, datatypes, classes, etc.). You can then selectively choose to view/edit the metadata attached to source code components. The traditional way of attaching metadata is to have semantic comments, which quickly tend to get a bit ugly.

Once you have such metadata you can choose which parts of your source code to view on screen. Rather than open a _file_ which may also represent a module or class, you can open a filter, which filters code objects. A bit like labels in email organisation are better than directories, since an email can belong to more than one. To put this another way, deciding how to modularise your program is tough, using a database to store your code objects you could make it a bit less tough by making it more flexible.

In general when you change the format that source code is stored in, you face the the problem that you're mostly stuck with re-implementing all of the software tools that support a language. Okay, so maybe you don't quite have to re-implement all of these tools so much as re-target them, but still, it's a chore. A particularly challenging tool is source code control.

In addition, you have the problem that typically, a project will have to either choose to store its source code in traditional text-based format, or whatever the newly proposed format is. Usually the proposal to get around this is to translate between the two, so that code is _actually_ stored in the original text-based format, but when you open it up with your fancy new format-aware IDE, it does an on-the-fly translation and you get all the benefits thereof.

This might work to an extent to allow users to use existing tools, although you still need to do a bit of touch up, for example, coverage analysis will report on the translated text-based format rather than your database format. So you have to translate the results of coverage analysis, but you can at least get to a point where it is usable in this fashion.

It does not work so well for collaborating with others that are still using the text-based format. Mostly because your database format when output as a traditional text-based format, either loses all the metadata, or stores it as comments, or in a separate meta-data file. These all have the obvious problems when collaborating with someone who either ignores it, or wants to.

Source code control is a problem in both kinds of scenarios. Even if all developers are using your database format, what happens if there is a merge- conflict? Either they have to modify directly the translated text-based format, or you have to implement merge-conflict resolution in your IDE.

None of these problems are insurmountable. They are just challenging.

In summary, I think the reason source-code-as-database has not already been a success, is mostly because it is difficult to introduce incrementally. But I hope you succeed.</comment>


Mark Zuckerberg: Success like mine only happens with luck - <AUTHOR> http://www.cnbc.com/2017/07/24/billionaire-mark-zuckerberg-success-like-mine-only-happens-with-luck.html <comment><USER2> The important piece to note, which Zuckerberg may or may not understand, is that the UBI should be accompanied by the elimination of the rest of the welfare state (yes, all of it, including minimum wage). Combined with requiring people to be US citizens for 18 years before qualifying should eliminate most of the qualms critics have with the idea. Overall, I don't think the tax burden is significant for a minimalist UBI, because the savings from eliminating our current welfare state full of mal-incentives will increase productivity.

<comment><USER3> Lol what? UBI doesn't make up for medicaid, medicare and minimum wage for example. We should probably keep foodstamps as well. It's an advancement of the welfare state, that's the whole point Zuckerberg is making. Our current welfare state is inadequate which is why lots of kids don't get a fair shot. Zuckerberg's fix for this is to use more welfare to create a more even field for all kids to compete on.

<comment><USER4> You're right about medical, but the whole point of UBI is to provide a floor upon which anyone can live without the expensive bureaucracy of qualifying them. It's supposed to replace the welfare state with something more efficient. That's not a regression, with UBI you don't need foodstamps or any other kind of assistance (not counting healthcare which is a separate thing).

<comment><USER3> No, that's the point of UBI _in your mind_. This is actually what I think is harmful about our current obsession with UBI, all the politicians are slowly coming around to it and when they do that you know some people are about to get screwed. UBI isn't here to reduce welfare spending or to reduce welfare spending on the poor. Inequality has a direct effect on social mobility. Thus programs which exacerbate inequality are antithetical to the idea of a meritocracy. We need more, direct redistribution to the poor to fix America's problems with social mobility. Abolishing the minimum wage because of UBI? Come on.

<comment><USER4> That's the point of UBI in most people's minds, it's a better way to redistribute wealth and once in place should be the only way needed. Of what purpose is a food stamp program when we can simply make sure the UBI is enough to live on? UBI is about dealing with a world where we don't don't have enough jobs for everyone, that already covers the poor. Want more redistribution, raise the UBI. It's one program that can replace the entire welfare state. UBI would be a better and more efficient use of the existing welfare money as well as new funds so it can be given to everyone. It makes no sense to have UBI and a welfare state at the same time. And yes, you don't need a minimum wage when you have UBI, UBI is a minimum wage.

<comment><USER5> Minimum wages will have to stay, particularly if job market is heavily skewed towards employer, to stop competition driving it to bottom.

<comment><USER6> How is the job market going to be skewed towards the employer? That statement needs some clarification.

The way it seems to me, it would make sense that actually jobs would shift away from menial tasks (which will be replaced by automation eventually anyway) in favor of things that people actually consider a valuable use of time. You can't get people to do jobs they don't want to do _if they don 't have to do them_. At least, not at a scale that leads to the situation you seem to be implying.

If you had $2000 in your pocket every month why would you waste your time on a job that pays $9/hr? Maybe you'll find some people who take 5- or 10-hr/wk contracts so they have a little extra beer money, but it definitely would eliminate the need to submit yourself to the job market woes that currently plague the poor. People value their time with a money analogue, since this is a moneyed system we're living in, so you won't find many who will choose to earn less than what they can see themselves paying on a daily basis.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> I don't understand how people so smart can be fooled by the idea that automation will permanently take jobs away from the economy.

Jobs will shift, but thinking we need cash handouts for people to live on (because all the jobs will just POOF, disappear!) is just naive. Just as farmers & bowling-pin-setters found new jobs in the past, taxi-drivers will find new jobs in the future.

Zuckerberg is right that people should be more entrepreneurial, but I see no reason why the labor transformation we're undergoing now will reduce overall jobs in the market. It never has.

<comment><USER8> > Just as farmers & bowling-pin-setters found new jobs in the past, taxi- > drivers will find new jobs in the future.

this seems like something of a religious view, and seems to downplay the nature and scope of technological advancement.

mechanization obviated a lot of physical labor. this made human expansion into mental labor and services more practical. however technology is fast approaching a point where substantial amounts of mental labor and services will be subject to automation.

most 'new jobs' won't necessarily go to humans, as they'll be ripe for automation from the start.

<comment><USER9> What on earth does it have to do with religion?

<comment><USER8> 'religious view' was an epistemic reference.

</comment></comment></comment></comment><comment><USER10> If he wants to give his own money away, cool. But there are a lot of problems with the idea of a UBI that are not solved by rich people admitting "I wouldn't have gotten here without first having a basic level of privilege."

It isn't just "luck" that got him there. It was education, connections, hard work and many other things. I have alimony in about the amount that many people suggest for UBI. Yes, that has been a good thing, but it hasn't gotten me insider connections, magically taught me to code or solved many other problems that need to be solved in order for me to become rich.

There is just so much more going on that people like Mark Zuckerberg apparently fail to see. It isn't just the money they had that helped them leapfrog to the position they currently occupy. Simply throwing money at this problem will not make poor people the next multi-billionaires.

<comment><USER11> Yes, having a UBI does not automatically grant you connections.

There are a lot of questions about people who will fall through the cracks. I raise those questions all the time.

However, I support a UBI, not because it is a silver bullet to everything but because it is a step forward. It is a real shame that we can't provide nutrition for everyone in these United States (much less the whole world). There is no reason other than greed why our economy can't feed and house each and every one of us.

I fear the real positive outcomes might take generations to manifest and might get wiped out by one major economic depression.

</comment></comment><comment><USER12> I'll say this: I was in the emergency room at San Francisco General Hospital last week, and while his namesake wing was very nicely appointed, the Xray tech was complaining about the software performance and monitor resolution.

</comment><comment><USER13> Can someone who supports UBI talk about how it would impact immigration policy?

That feels like one of the biggest problems with it.

<comment><USER14> I suppose UBI would only be provided to citizens and not immigrants (until they become citizens)

</comment></comment><comment><USER15> How would he know?

</comment><comment><USER16> Stealing and generally lacking a moral compass helps, too.

</comment><comment><USER17> What a great fluff piece. I'm guessing the blogger here will get an inside scoop when Zuck runs for office.

It's interesting how Zuck seems so generous when it comes to politics yet doesn't apply that same mentality to his cafeteria workers.

</comment><comment><USER18> thank you for fucking the country. I'm sure you feel very smug now that a few evil fucks are trying to take basic healthcare protection away from a bunch of poor people.

<comment><USER19> Personal attacks and political flamewar will both get you banned on HN, so please don't post like this again.

More generally, would you please only post civil and substantive comments here? You've done that a fair bit but you've also done the opposite some. In order for HN to have a hope of being slightly better than the nasty internet median, we all need to pitch in with the effort.

We detached this subthread from [https://news.ycombinator.com/item?id=14842404](https://news.ycombinator.com/item?id=14842404) and marked it off-topic.

</comment></comment><comment><USER20> Likely an unpopular opinion but the idea of him winning in 2020 isn't as far fetched as some liberals think.

<comment><USER7> I don't like Facebook, and I don't particularly like Zuckerberg, but I highly respect the guy. He's clearly a very smart person.

But I think the leader of a country needs to live life a bit more before leading a country. If he does want to be president someday, I think 2020 is way too early.

<comment><USER21> I actually disagree here. I think someone young, energetic, and highly intelligent & analytic is exactly what we need to break out of the rut we're in. And so far the tone of his tour across the US seems to indicate that he wants to be fairly centrist and bipartisan, but without necessarily sticking to political norms.

<comment><USER22> >young, energetic, and highly intelligent & analytic

That isn't what works in politics...

What works in politics is knowing which levers to pull, and having the money or influence (in the right paces) to do pull them.

<comment><USER23> I think he has all that stuff as well? He's certainly got the money and he's got a big lever named "facebook" which gets his message infront of a substantial portion of the US voting public.

<comment><USER24> I am (anxiously) waiting for the "have you voted yet?" reminders Facebook has been using to get people to the polls in recent elections to turn into "have you voted for the Zuck yet?".

<comment><USER14> Can't do that. Zuck can't use FB resources or any form of support from FB (other than employees who volunteer outside work hours) for a political campaign. If he does he'll have to reimburse the fair value of services received from campaign funds.

<comment><USER21> But what if it were done on behalf of a super PAC that just happened to be in favor of his campaign?

<comment><USER14> It would be legal as long as there is no coordination with the campaign but I can imagine enterprise ending class actions against FB by minority shareholders if the Board violated their fiduciary duty to shareholders by involving FB in the campaign.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> Success like Facebook's cafeteria workers' only happens with bad luck?

<comment><USER26> It's not like said contractors get paid more anywhere else? While the situation those folks from the article in is horrible, Facebook isn't a charity.

</comment></comment><comment><USER14> In the pursuit of success like Zuck's sometimes being 'unlucky' can also mean getting lucky.

Being raised in a family that struggles to make ends meet might give one the grit and character one needs to succeed. Not being popular, athletic or good with people might push you into more intellectual pursuits.

<comment><USER27> > Being raised in a family that struggles to make ends meet might give one the > grit and character one needs to succeed.

Or it stacks the odds against you, and you'll struggle the same way those before you in your family/social group did.

<comment><USER14> It definitely stacks the odds against you if you are aiming to be part of the top one percent. But if you aiming to be one of the few dozen people as successful as Zuckerberg, then I think your odds are better if you had a tough life vs. a privileged one.</comment></comment></comment>


Bitcoin Community Raises Over $15,000 In 5 Hours For Dorian Nakamoto - <AUTHOR> http://www.bitcoinlayman.com/bitcoin-community-raises-15000-5-hours-dorian-nakamoto/

<comment><USER2> This, despite his identity still not confirmed. Is this taking us to crowd funding frenzy, giving way to raise for anything and everything?

<comment><USER3> His identity as Dorian Nakamoto has been confirmed. The money is largely being donated as an apology by people who do not believe he is Satoshi and don't like seeing a random person harassed by the media.</comment></comment>


Ask HN: Should I learn PHP? - <AUTHOR>

I'm a designer + WordPress developer looking to up skill into making web applications.<p>I'm getting to grips with Ruby in anticipation for using Rails but I'm wondering whether it's worth learning PHP too? <comment><USER2> If you're a WordPress developer, shouldn't you already know some PHP?

Since the backend for WordPress runs on PHP, it would make sense to learn at least a little about the language.

I'm also of the opinion that you should learn as much as you can, especially if you're curious.

<comment><AUTHOR> I know enough to output dynamic content. I'd probably say that's the current extent of my PHP skills but that seems like a fairly limited scope.

Learning as much as I can sounds good to me! It's just a concern that I keep seeing PHP getting bad press.

<comment><USER3> It all depends on the types of web apps you want to build. How about watching some videos to get a feel of the different solid frameworks and pick the closest to your needs?

<comment><AUTHOR> Thanks that's a good idea, I'll be sure to do that.</comment></comment></comment></comment>


distellamap  - <AUTHOR> http://benfry.com/distellamap/ <comment><USER2> These are great. They'd be in the 98th percentile (at least) of what you could see in a day of walking around galleries in NYC.

<comment><USER3> The prints are incredibly reasonable also: [http://www.imagekind.com/GalleryProfile.aspx?GID=3b76f798-e4...](http://www.imagekind.com/GalleryProfile.aspx?GID=3b76f798-e4ca-450c-990a-f9881d704eaf&P=1)</comment></comment>


Ask HN: Anybody working on opensource web app - <AUTHOR>

Hi, Is anybody here working on any Open Source Web Application?
I would like to join.
Or if anybody is willing to start a new project, I am fine.
I am currently working as a UX/UI engineer for a Bay Area company.
I rate myself 8/10 in CSS, Javascript and jQuery. <comment><USER2> I have 2 Rails apps you might be interested in.

Big Help is our company's help ticket system. I'd like to get it up to Rails 3 and prettied up. Also would like to implement macros/canned responses and allow them to be inserted via jQuery. <http://github.com/bigfolio/big-help>

Subby is a starting point for a subscription based web-app that uses subdomain-based accounts and Chargify for billing. It could use some layout/CSS love.

<http://github.com/bigfolio/Subby>

</comment><comment><USER3> I could really use some help with <http://freeciv.net>, if you want to participate in an open source web game. Please get in touch if you are interested!

</comment><comment><USER4> This is my crazy dream: [http://docs.google.com/Doc?docid=0AcmB_WI1jRkCZG41c2d4cl80OT...](http://docs.google.com/Doc?docid=0AcmB_WI1jRkCZG41c2d4cl80OTJmOGpjNmNocw)

<comment><USER5> That actually looks pretty cool, but you might want to add a summary of what it is in your comment. Not everyone is willing to click through and read your entire manifesto.

</comment></comment><comment><USER6> Mezzanine is a CMS platform built with Django, BSD licensed:

<http://mezzanine.jupo.org>

A few days ago I blogged about all the different roles it's lacking in, UX is one:

<http://blog.jupo.org/post/845040660/an-open-source-brief>

</comment><comment><USER7> Mifos is web-based banking software for microloans - we're a Grameen Foundation project working to end world poverty.

We can use help making our user interface better!

<http://www.mifos.org/>

And to volunteer:

<http://www.mifos.org/developers>

</comment><comment><USER8> Yes please! I'm building a social learning tool based on Drupal called Eduglu. See <http://eduglu.com> for general background/download + <http://island.byu.edu> for a working version.

I'd love to hear your thoughts (and anyone else's) on the existing UX/UI plus feedback on some planned additions. A friend who's pretty decent at UX designed most of what's there but he's left for a "real" job so I'd love to have someone else helping who can give expert advice on UI/UX questions.

You can email me directly at firstname.lastname@example.com or post issues at <http://drupal.org/project/eduglu>.

</comment><comment><USER9> Hey man, I'm working on an open-source project that could absolutely use some help from the UX/UI perspective. I'm more of a "back end" programmer, so all the UI stuff right now is very, erm, spartan and mechanical (at best).

If you'd like to see more,

see <http://code.google.com/p/neddick>

or the demo site is at

<http://spdemo.fogbeam.org:8080/neddick1/>

If you'd like to help out, join the mailing list (Google Group) or feel free to shoot me an email directly. My email is in my profile.

</comment><comment><USER10> I will suggest to join <http://www.openwebanalytics.com/> , it's a great project and it's very useful for startups.

<comment><USER11> That's pretty awesome actually, for several reasons!

</comment></comment><comment><USER12> I'm working on an open source html5 web interface to mongodb <http://github.com/ryanfitz/pergola> It uses padrino (ruby web framework), jquery, haml, and compass. I'm planning on turning the data viewer/editor into a jquery plugin that could work with any json datastore. I could use some help with that and would definitely love UI improvements.

</comment><comment><USER13> I just (soft) released my .net open source project/task tracking system. not much to look at but if you want you can grab it and pick it up. i'm unsure of the future of the project mainly because the field is so crowded. demo here: <http://scrumbly.mobomobo.com> (u: test p: test) -- source soon to be put up on codeplex.

</comment><comment><USER14> Redmine is really in need of people for the UX Team: <http://redmine.org>

</comment><comment><USER15> See if <http://codenode.org> (<http://github.com/codenode/codenode> ) interests you. It's BSD license, and a very cool project imho. Someone good at JavaScript / jQuery is needed.

</comment><comment><USER16> <https://launchpad.net/launchpad-project/> always needs help and is a great project to work on.

<comment><USER17> Yes, _please_. No offense, but launchpad really needs some extra UI/UX help. :-)</comment></comment>


Show HN: CSS Pokemon – created with clip-path and CSS variables - <AUTHOR> https://projects.lukehaas.me/css-pokemon/ <comment><USER2> Should be called CSS pikachu unless you can somehow swap them. Good job though, better than I could do!

</comment><comment><USER3> Edit: Major correction: it appears Firefox only supports clip-path behind a flag. Enabling this flag makes the experiment appear in Firefox.

\---

It's Webkit/Blink-only - no support for other browsers. It says it uses clip- path and variables, both supported in Firefox, so I see no compelling reason for this.

Also viewing it in Chrome, I don't see anything that would actually require the use of clip-path or variables - arbitrary triangles have been possible in CSS since the beginning, and much more impressive drawings have been created[0][1] than this. The added animation doesn't add much.

Why is this currently #6 on the HN front page?

[0] [http://www.subcide.com/experiments/fail- whale/](http://www.subcide.com/experiments/fail-whale/)

[1] [https://pattle.github.io/simpsons-in- css/](https://pattle.github.io/simpsons-in-css/)

<comment><USER4> It seems to me that nowadays Webkit/Blink has replaced IE for developers not caring about interoperability – with some even going so far as to claim "IE? but nobody uses that!".

<comment><USER5> FWIW clip-path is specced and in CR stage right now. I think it's okay to implement it provided that there is an understanding that any further changes are reflected even if it breaks existing code using the new property.

All browsers do this. Firefox implements around 88 properties (30 of these are "logical properties", which aren't exactly new properties) that Chrome doesn't[1] and Chrome implements around 68 properties that Firefox doesn't[2].

The numbers are a bit skewed here. My method of collecting the list of "properties that Firefox implements" included preffed-off properties, but the same is not true for Chrome, so for example the `grid` property shows up as implemented in Firefox but not Chrome even though both have it behind a pref/flag.

However, there are some properties implemented in Firefox without being behind a pref (ruby-align, scroll-snap-foo, image-orientation are examples).

\</comment></comment></comment><comment></comment><comment></comment><comment>-

I do feel that in general Blink does push a lot of nonstandard (or not on the standards path) features into the web at times. But I don't have anything to back that assertion up.

Blink is being interoperable in _this particular case_.

[1]: [https://manishearth.github.io/css-properties- list/?stylo=sho...](https://manishearth.github.io/css-properties- list/?stylo=show&servo=show&firefox=only&chrome=hide&mdn=false&alexa=false)

[2]: [https://manishearth.github.io/css-properties- list/?stylo=sho...](https://manishearth.github.io/css-properties- list/?stylo=show&servo=show&firefox=only&chrome=hide&mdn=false&alexa=false)

<comment><USER4> Clarification: My comment was not primarily about browser developers, it was about web developers that do not care about interoperability – and either do not test in non-Webkit/Blink browsers or declare that for some reason (e.g. marketshare, "it is just an experiment"), other browsers are irrelevant in their specific case.

<comment><USER5> Ah, fair point. Yeah, this irks me a lot.

<comment><AUTHOR> It's important for web developers to experiment with new browser features. Browser vendors encourage this as it can help them with crushing bugs early and refining their specs.

<comment><USER5> Yes, which is why experimenting with features on the standards track is okay. At a certain stage it becomes less likely that the feature will change behavior.

The problem arises when the experimentation is done with entirely new features that the browser wants to push (features which haven't been discussed and somewhat settled on with other browsers). If they aren't behind a flag, sites start using it, and then you have to support the legacy syntax forever.

clip-path is on the standards track. It's not going to change much. So browser vendors exposing it by default is fine.

(However, if you're building an experiment using these, at least test in other browsers and put up a warning that it won't work in some browsers. A lot of the interior issues today are because folks only bother to test in chrome. Ultimately this means that all browsers have to copy Chrome bugs to make things work.)

</comment></comment></comment></comment></comment><comment><USER6> Damn cool, I just love polygon cuts! CSS has become quite powerful in the last few years. Guess we're not so far from being able to replace images/icons/logos with "design code" written in CSS in the coming ten years.

Here's a book on ABCs for babies done entirely in CSS:

[https://bubbl.in/book/abcd-animal-book-by-judith- neumann/1](https://bubbl.in/book/abcd-animal-book-by-judith-neumann/1)

<comment><USER7> We can sorta already do that by inlining SVGs inside CSS (but perhaps it's cheating)

</comment></comment><comment><USER8> I am not sure what I am looking at. I see a big yellow rectangle. Should I be looking at the code only? Should I press a button?

<comment><USER9> View it in Chrome. It appears as a Pikachu made out of shapes, like in the screenshot I took here:

[https://dl.dropboxusercontent.com/u/67216205/csspokemon.png](https://dl.dropboxusercontent.com/u/67216205/csspokemon.png)

In Firefox or other browsers, it just appears as a yellow square.

<comment><USER8> Thanks for the screenshot.

</comment></comment></comment><comment><USER10> I made another pokemon in CSS (view from behind): [https://jsfiddle.net/t2mngvwn/show/](https://jsfiddle.net/t2mngvwn/show/)

</comment><comment><USER11> I found this very cool and surprisingly beautiful!

I'd love to understand the techniques and processes @lukehaas used to create it.

</comment><comment><USER12> Anyone notice how a website meant to showcase some CSS messed up the code display and gave it double scroll bars? Haha.

The Pikachu looks great though ;)

</comment><comment><USER13> Awesome!

</comment><comment><USER14> I never realized they introduced a yellow rectangle as a Pokémon.

Galaxy S7

</comment><comment> gm-conspiracy Meh.

This works in Firefox:

[http://pattle.github.io/simpsons-in-css/](http://pattle.github.io/simpsons- in-css/)</comment>


Xerox develops breakthrough in printable circuits - <AUTHOR> http://digital.venturebeat.com/2009/10/26/xerox-developers-a-silver-ink-that-can-be-used-to-wearable-or-throwaway-electronics/#at

<comment><USER2> The article is all gushy and starry eyed about the "printed circuits" and how durable they might be. The metal ink used to print them melts at 140˚F. Your car in the summer can reach 200˚F.

So they're all great and durable until you leave them in your car. Or too close to your oven. Or on top of the coffee maker.

<comment><USER3> The article quoted Celsius scale temperatures.

140˚C is 284˚F. At that temperature, the fact that the ink is melting would be the least of my concern if this is intended for wearable electronics.</comment></comment>


Persistence, Decisions, Disruption and Exits - <AUTHOR> http://thresholdimpact.com/2013/05/05/a-conversation-on-entrepreneurship-part-four/

<comment><AUTHOR> Very insightful post about entrepreneurship by Canadian entrepreneur Dr. Ray Muzyka (BioWare founder).

Among the many interesting points:

"For the first five years of BioWare, myself and my co-founder Dr. Greg Zeschuk didn't pay ourselves a salary, but we kept at it even though it was painful at times for us as founders. We believed that we and our team were building something valuable and this kept us going."</comment>