Blowing the Dust Off of an IBM AS/400 Server - <AUTHOR> https://hackaday.com/2019/01/13/blowing-the-dust-off-of-an-ibm-as-400-server/ <comment><USER2> When I grew up, my mom was working on an AS/400 at work. I spent many hours watching her fly through all the screens.

She knew exactly the right combo of Function keys followed by how many TAB she needed to start typing. She could do it without looking at the screen or the keyboard, just the sheet she had to enter/modify in the system.

It was incredibly fast, 99% of the time.

She hated the move to Windows. All the sudden, everything was slow, error prone, fiddly. Keyboard navigation was mostly gone and although employees could start working with less training, she knew the move was generally a big step backwards.

She despised computers with passion from that day on. Today she's retired and uses an iPad only.

I'm a UX designer/developer. There is something to be said for these old terminal systems, when it comes to repetitive daily tasks.

<comment><USER3> I have worked with AS400, and its concept of an input queue is great. Basically, none of your inputs are ignored if the system is busy, they are cached by the terminal and sent one by one when the system responds.

To give you an example, imagine hitting Ctrl-Alt-Del, entering your login and password, hitting Enter, entering FFOX to run Firefox, hitting Enter, hitting F3 to open a tab, entering news.ycombinator.com, hitting Enter, hitting F3 for another tab, entering another URL, hitting Enter and it just works. Your machine can be waiting to show you the login screen, or applying some global policies, or launching Firefox, but it will never lose your input.

<comment><USER4> I do enjoy this aspect about terminals - how you can type a few lines with enters while a long running process is executing.

However, I wish there was a way to ignore (or cache?) this buffered input if the process exits with an error or something else of the sort. Does this exist?

It can quickly get dangerous otherwise!

</comment></comment></comment><comment><USER5> You'd be surprised to think that the IBM AS/400 still keeps the lights on for a number of large business.

Working in professional services a number of our clients still use AS/400 mainframe environments, with data migrations to other environments becoming more and more common.

I worked on a data migration from an AS/400 environment to an SQL DB. I kid you not, the database schema for the AS/400 environment was printed on old A3 scrolls that looked tea stained.

<comment><USER6> Yep, I currently work at one and know of another in town. Both companies have thousands of employees. It will still be a while before we ever get off of it too. We're taking steps but it has been around for a long time and is pretty reliable.

<comment><USER5> Exactly, they are quite often a back end system for many major companies.

For simply that reason, they work and rarely have any issues. The problem is that those with the expertise to manage them and fix them in the event that things do go wrong are diminishing. And that's a big risk for businesses.

</comment></comment></comment><comment><USER7> > If you've never seen an IBM AS/400 machine, don't feel bad. Most people > haven't. Introduced in 1988 as a mid-range server line, it used a unique > object-based operating system and was geared specifically towards business > and enterprise customers. Unless you're a particularly big fan of COBOL you > probably won't have much use for one today, but that doesn't mean they > aren't worth playing around with if the opportunity presents itself

Oh boy, I've seen multiple businesses that utilize AS/400 system(s). I even know a few people who manage them, building out applications, etc... They are still very much used.

You'd also be surprised how many records about you still exist in said system(s). Hell, I was using an AS/400 system only 3 years ago for business purposes (I'm not a COBOL developer, but something had to be fixed).

</comment><comment><USER8> Considering we are buying a new iSeries with the Power 9 this year, I expect to have an AS/400 descendent in our server room for another 10 years. The last one lasted 13 years.

<comment><USER9> Don't be assured of that: the failure modes of silicon increase every time you shrink it due to physics just being a huge problem. That's one of reasons new stuff doesn't last as long. The new systems will run on nodes with more problems developers have to fight. I suspect they systems won't last as long.

I appreciate the data point on that one. Sounds like it aged well. Which CPU('s) did it have?

<comment><USER8> Well, since IBM generally shows up with replacement parts before I even known there is a problem, I'm not terribly worried about its length of service.

The current one is an IBM 9406-800 which I do believe is the SStar which is the RS64 before the POWER 4.

<comment><USER9> Now that's good service. Far as CPU, I found there are several of them. They are on a range of 180nm-500nm nodes. Most of the older, long-lasting stuff was on those nodes. So, that fits. It was also the ones just before merger of those AS/400 chips and POWER families into POWER4 to become new standard. Interesting stuff.

[https://en.m.wikipedia.org/wiki/IBM_RS64](https://en.m.wikipedia.org/wiki/IBM_RS64)

<comment><USER8> That's pretty much the standard of service with these things. We are going with an S914 running IBM i 7.3 for the next machine.

Interestingly, the old machine has a tape drive that is not supported on the new Power 9 boxes (its a non-LTO QIC drive). I guess the good thing is now I can keep a single stock of LTO-7 tapes. I am a bit odd and have an LTO-7 drive connected to our FreeBSD server for a "last chance" backup.

</comment></comment></comment></comment></comment><comment><USER10> AS/400 is the neatest computer system architecturally that I think has ever been made.

[https://en.wikipedia.org/wiki/IBM_System_i](https://en.wikipedia.org/wiki/IBM_System_i)

<comment><USER11> What in particular do you find really cool? I think the binary translator is really cool, I want to find more details about it.

</comment></comment><comment><USER12> What about the 2200/MCP etc. from Unisys? Does anybody here have experience with them and can shed some light on it?

<comment><USER13> I have passing familiarity. A former client used an MCP-based system (first an A Series, then later a Clearpath system on PC hardware) to run their line-of- business system (a small bank). A friend of mine worked for Unisys right out of college in the early 70's writing ALGOL code for the MCP. She says that it has its roots in the old Burroughs B5000. From what I've read they are odd beasts, and have some really interesting hardware-level security architecture. I never got to play with the system, aside from typing a couple of commands now-and-again into the OS "shell" (called MARC-- Menu Assisted something-or- other), and a little bit of editing in the editor CANDE.

</comment></comment><comment><USER14> Used those in the 80's - 90's, great machines! The most reliable and well secured systems I've been on.

<comment><AUTHOR> It's the invisible machine. They are all still running core systems in a lot of companies.

<comment><USER15> Far from invisible in the Des Moines market. Mainframe is still king of CA systems in the CAP model.

<comment><USER16> Des Moines is roughly the size of Bloomington, MN.

</comment></comment></comment></comment><comment><USER17> Nice to see AS/400 turning up on here.

When I started my first proper "IT" job, back in the late 90s for a big multinational, they were running their payroll system off it. The main node was about a decade old at the time.

The input system for it was a 16 bit VB4 desktop app that wrote text files to a netware share that this picked up.

I am always impressed at how these bits of old tech, sticky tape and string were so unbelievably reliable and scalable across thousands of users. I actually actively miss working on this sort of stuff.

</comment><comment><USER18> We're running our ERP on an AS/400\. That is nowhere near to die in the foreseeable future.

I was actually trying to learn RPG mentioned in the article last week, a blast from the past!

<comment><USER19> Yeah, it seems like the author isn't aware of how common AS/400s still are in business environments. Thankfully, I have so far managed to dodge having to learn how to use it by suggesting that the other members of my team continue to be the point people for it.

</comment></comment><comment><USER20> ha! I used to look after an AS/400 running the company ERP (JD Edwards).

Pretty solid box. never ever _ever_ crashed or got slow or anything. just a mind fuck to do anything with.

</comment><comment><USER21> I'm literally staring into the "black hole" of an AS/400 right now on my second screen.

<comment><USER22> I have 4 BlueZone Mainframe Display windows open right now connected to AS400 servers. I do every single day at work :).

</comment></comment><comment><USER23> Ran the Hercules emulator with a z/OS image last year. It was a fun project and the UI is super-fast.

Currently working on another mainframe os but wish that I can some day find a place with an i-series or z-box (IBM mainframes).

Only in my 20s, but these systems will be around until I retire. The hardware might change, but the cost of educating developers in RPG, COBOL, control languages etc must be far lower than translating the code.

<comment><USER24> In my halcyon enthusiast-learning days I tried to approach Mainframes and the IBM world to learn anything I could about the different platforms, architectures - basically getting into it. IBM's arrogance kept me at an arms length, and I kind of hold a grudge towards them to this day. What in the world did they gain from taking the stance of being enthusiast-unfriendly? For instance they refused to sell me a fast-synch monitor for my RS/6000 workstation purchased from a defunct company. And so on... Good thing that Linux steamrolled most of its Unix/AIX dominance. Like a sweet revenge served cold.

To be fair, one day a few years ago I did get access to my clients' mainframe last year. A Z-something big-iron running on of the frames on AIX which I had shell access to. It was a "whoa man, I'm in. I got access to the mainframe!"-moment. My favourite tools were installed by someone else, so it was quite enjoyable; midnight commander, zshell and bourne again shell were present :).

</comment></comment><comment><USER25> I used DB2 hosted on AS/400 at my previous job 4 years ago. I'm sure it is still in use. (the application is quite important for that company)

</comment><comment><USER22> Heh. I work with AS400, and BlueZone Mainframe Display, every day at work for nearly 13 years now. Hundreds of us do, we do the bulk of our work in it actually.

</comment><comment><USER15> Is there a web framework geared to AS/400 UX that has client side keyboard caching?

</comment><comment><USER26> still have bunch of those at work(large bank)

<comment><USER21> Same here. Large insurance company.

</comment></comment><comment><USER27> PWRDWNSYS *IMMED</comment>


Nonpolitical Images Evoke Neural Predictors of Political Ideology - <AUTHOR> http://www.cell.com/current-biology/fulltext/S0960-9822%2814%2901213-5

<comment><USER2> I had heard of a study similar to this one before. Genetically, I seem to be pre-disposed toward being easily disgusted (except gore, that doesn't bother me at all).

However, my views have become less conservative over time. Well, maybe not for me personally, but at least the way I view everyone else (for example, I would never do drugs myself, but I don't care what everyone else does).

I don't think my "disgust response" has changed however, so I wonder if I have an innate predisposition to being more libertarian that I've moved toward over time.

<comment><USER3> I'm not sure what word you're looking for, but the opposite of conservative is liberal. Libertarianism is a pretty vague and complicated concept, as the Wikipedia page on it will tell you.

</comment></comment><comment><USER4> A single dimension of political ideology is ridiculous.

</comment><comment><USER5> Technical means of proving that social elements to political beliefs. Showing a picture of a SF rainbow parade to a conservative in a farm house in the mid west will elicit the same mental response as showing the rainbow parade participant a picture of the conservative in the farm house. This is purely social.

<comment><USER6> except the pictures aren't anything like your example.. snakes, babies, seagulls, lamp, dog, etc.

Rainbow, parade, and farm house weren't even on the list.</comment></comment>


Mozilla: The internet is unhealthy and urgently needs your help - <AUTHOR> http://www.zdnet.com/article/mozilla-the-internet-is-unhealthy-and-urgently-needs-your-help/ <comment><USER2> Most of the ideas from Mozilla here I kind of like.

Decentralisation is a definite positive, and it is sad to see it being taken away by the ever-obvious tendencies of human nature to dominate and control.

If you have any doubts, remember when Facebook, likely bribed by _a tremmendous_ amount of entities, tried to release a "super special kind of free nice generous internet access" service in 3rd world countries with access to " _arbitarily_ " determined access to certain IP's? That's shocking, and they, like Google, will keep on grinding the stones of law with endless pits of lawyers until it crumbles to sand.</comment>


Replication from Percona Server for MySQL to PostgreSQL Using Pg_chameleon - <AUTHOR> https://www.percona.com/blog/2018/08/17/replication-from-percona-server-for-mysql-to-postgresql-using-pg_chameleon/ <comment><USER2> This is excellent. I didn't even knew this kind of feature exists. Thank you Percona and Avi.

</comment><comment><USER3> Thanks! Same instructions should work for plain MySQL. Not sure if MariaDB is supported

<comment><USER4> Thats correct Peter. Same instructions work for plain MySQL. It is a good point about MariaDB. I would test if MariaDB works good here.

</comment></comment><comment><USER5> Well explained. Nicely written. Thanks for such a great article.

</comment><comment><USER6> It might work with Maria too. Would be interested to see it

</comment><comment><USER4> Thank You Riyaz

<comment><AUTHOR> Thanks Avinash! for the article, would be useful for many.</comment></comment>


Noir - The Clojure web framework - <AUTHOR> http://www.webnoir.org/

<comment><USER2> The examples uses Clojure as the language for defining the HTML. I've also seen Common Lisp examples (such as in Practical Common Lisp, <http://goo.gl/CuUZQ>) that use CL for the same purpose. In frameworks built for other languages, it is most common to have a separate template language for defining the HTML.

It seems much easier to use the same language when using a Lisp dialect compared to for instance Java, which would be a lot more verbose, but it is also done this way to separate logic from presentation, and because it's (supposedly) easier for front-end developers. Coming from non-CL frameworks, it was natural for me to choose a template framework for my small (and now outdated) tutorial on writing a blog in CL (<http://goo.gl/YHCw>).

However, I'm wondering if anyone has any experience developing web applications using a Lisp-dialect for generating the HTML (as Noire and the example in Practical Common Lisp), and if this is scalable to a team where front-end developers might not be used to or familiar with Lisp.

The syntax seems easy on the eyes, so perhaps it's not such a big problem once they get over the unfamiliarity.

<comment><USER3> That will depend very much upon your HTML developers. Some will be able to do it, a large number will not.

Even when using simple template languages I have experienced the I didn't understand those funny bits in the HTML so I have removed them far too many times.

In Clojure, Enlive (<https://github.com/cgrand/enlive>) is a better solution because the HTML remains as HTML.

<comment><USER4> The main advantage of writing HTML using a tool like Hiccup is that you can factor out repeated sections of markup into functions.

For example, one might write a page like:

      (defn user-settings [user]
        (settings-for [user]
          (breadcrumbs (link home) (link settings))
          (text-field :login)
          (text-field :email)))

And the functions used would take care of generating the page, layout, form, fields, error notices, flash messages, CSRF protection and so forth. By the time you've finished with all that, those 4 lines of Clojure will be 50 lines of HTML.

Hiccup tends to lend itself toward user interfaces that are uniform and predictable, with repeatable elements. Think Facebook or Github, for instance.

<comment><USER5> I don't see how this any different from what Enlive provides. Enlive templates/snippets create functions which generate HTML. In anycase, using Hiccup _with_ Enlive seems to combine the best of both worlds.

<comment><USER4> HTML is a markup language, rather than a Turing Complete programming language, so there's a lot of redundancy in a HTML file that could be avoided in a programming language.

You can get around this in Enlive and other HTML-based templating methods by taking a hybrid approach. The layout HTML is written by a designer, but all the tedious repeatable elements are written by programmers in helper functions, or factored out into dozens of smaller templates.

I'm not sure I like this approach, as it (a) glues together several different methods for generating HTML, (b) encourages people to write the HTML around the page design, rather than treating HTML as purely semantic markup.

I admit to being something of a purist when it comes to HTML. I'd prefer to keep the style and design of the page out of my HTML as much as possible; idiomatic HTML should be semantic markup, whilst the design of the page should be defined in CSS.

<comment><USER5> I don't see anything in Enlive which is at odds with your viewpoint.

<comment><USER4> My viewpoint is that HTML shouldn't be written directly, because the language isn't designed to be particularly DRY. Isn't that very much at odds with Enlive?

<comment><USER5> Enlive does exactly what Hiccup does with the additional bonus that it allows designers who are comfortable with HTML to be a part of the process. Enlive is not page centric - that's the whole point of snippets.

<comment><USER4> But if none of your designers are writing HTML, what benefit does Enlive have over Hiccup? Whilst Enlive could probably mimic Hiccup's style through aggressive use of snippets, it seems to me that it would need more code to produce the same result. Enlive seems the wrong tool for the job if you want to use it in the same fashion as Hiccup.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> Looks promising!

One question: form rendering, validation and handling are the most important as well as the most annoying things you have to do while writing a web application. Do you plan to incorporate something for that into the framework?

</comment><comment><USER3> Why would I use Noir instead of compojure or ring + moustache?

<comment><USER7> Zak's characterization is basically correct. Noir isn't really a replacement for those things, more of an abstraction over them. It was born out of seeing how a real web-app evolved and what was missing from the ring/compojure/hiccup stack as I built <http://www.typewire.io>. Also, as I mentioned in one of the other comments, I hope that it will serve as the single "package" to start with web development in Clojure, instead of having to try and cobble it together from the pieces that are out there now. By controlling all of it, I can create a much more cohesive and well defined story for helping people get started. I can also share what I've learned about maintaining websites in Clojure and hopefully encourage patterns that avoid some of the pits I fell into.

<comment><USER4> I'm encouraged that Noir builds on top of existing tools. It indicates that our current set of web libraries is flexible and modular enough to act as a good foundation for more sophisticated frameworks.

It looks like Noir uses a custom "lein run" command to start the server. Have you considered using the lein-ring plugin, instead?

<comment><USER8> I've found that this is a really nice "feature" of Clojure, and maybe other Lisps. Most libraries are very small and tend to all speak in terms of the same de facto standard interfaces (functions, seqs, hash maps, vectors, etc.) so they can be easily composed. Trying to fit together Java or C# libraries like this is basically impossible without some mediating standard base classes or interfaces.

<comment><USER9> Not about Clojure, and has probaby been posted before, but: [http://gbracha.blogspot.com/2011/06/types-are-anti- modular.h...](http://gbracha.blogspot.com/2011/06/types-are-anti-modular.html)

</comment></comment></comment></comment></comment><comment><USER10> I don't know Clojure (not sure how expressive it is), but for a framework isn't the code too less? I have seen other frameworks, but they are quite large (in terms of LOC.) Is it that they contain more functionality?

<comment><USER11> The clojure culture tents to build extremly small librarys that are really composable. Look at this video about simplicity ([http://skillsmatter.com/podcast/java-jee/radical- simplicity/...](http://skillsmatter.com/podcast/java-jee/radical- simplicity/js-2051)) it translates very nicly to the web librarys.

In a nutshell: Make small simple things even if thats ends up beeing a bit more verbose then if you would have built it as one thing. If time shows that a set of librarys works very nicly together then you can write something new that combines these in a nice way.

This is what the Noir does it just pulls together some librarys and delivers them in a nice package.

</comment></comment><comment><USER12> One of the cool things about using a functional language for web development is the potential to use continuation-passing style (CPS) to make http look like a stateful protocol, which makes implementing chains of user interactions a lot simpler.

I know Clojure doesn't support first-class continuations, but does anyone know whether is it possible to use Clojure Noir to program in this style?

<comment><USER7> Can you give me an example of what that would look like? Or a description of the flow you'd want to achieve?

</comment></comment><comment><USER13> Hey I really liked the syntax highlighting color scheme you used in the webpage, is there an emacs theme for that?

<comment><USER7> I use vim ;)

<comment><USER14> Is there a vim theme for that?

</comment></comment></comment><comment><USER15> While making a simple web application in Chicken Scheme, I used SXML transformations. From the code samples, that doesn't appear to be the convention with this web framework. Is there a good reason to use alternatives to SXML? Or is it just preferences?

</comment><comment><USER16> Very nice, I've been wanting to get into Clojure, but not having a functional background I've found it hard to jump into anything. This looks easy enough that I could transition in slowly, I think I'll give it a try.

<comment><USER17> I have been doing mostly OOP for several years. I read just about every Clojure book out there, but the functional thing just wasn't clicking. It's a weird feeling. I knew the language, but didn't know how to design a program in a functional style. Maybe part of it is that most of the Clojure books available don't really cover this. Then I read "Learn You a Haskell for Great Good!" Eureka! I have never written a line of Haskell, but I feel like reading that book made me better using other languages.

<http://learnyouahaskell.com/chapters>

<comment><USER18> I would recommend reading books like "Learn You a Haskell for Great Good!" with an open repl. I find it is too difficult to remember new language features until I type and run code.

I agree that learning Haskell as a prelude to learning Scala and Clojure might not be a bad idea (I blogged about this a few days ago).

</comment></comment></comment><comment><USER19> I'm surprised that there's no large "Fork me on Github!" link at the top right corner of the screen.

Still, looks very interesting.

<comment><USER7> I honestly never really saw the appeal in those... There's a link to the source there though, so that's roughly equivalent :)

</comment></comment><comment><USER20> Here's what I don't get about Clojure fans: I don't see what problems you are solving. A simple Hello World program is made in Clojure and it gets upvoted all day. On the other hand Ruby on Rails folks are solving real problems today, making strides in integrating CoffeeScript and cleaning up javascript directories.

It's like someone showing off a new garbage collection library built in C. The problem's been solved. Show me something new.

<comment><USER21> You clearly weren't around the Rails scene six or seven years ago, when it seemed like everybody was writing blogs, to-do lists and similar basic CRUD apps (since it could be done with little more than a "script/generate scaffold"). When a technology is new and there aren't a lot of commercial projects using it yet, you'll get a low S:N ratio of projects coming from the community as people get their feet wet. As the technology matures, you'll see more "real problems" being solved.

<comment><USER20> I was around before Rails, back when Tapestry, Wicket and Appfuse projects were making my life easier. How does Clojure for Web development make my life easier? is the question that should be asked.

Clojure's been popular in the hacker community for a good 2 years now. That's a weak argument.

<comment><USER21> Tapestry, Wicket and Appfuse? You're making my point for me: The thinking you're using now to praise Rails and attack Clojure would have been just as valid seven years ago to praise Java and attack Ruby. All you're really remarking on is the maturity of the communities in question, but you're presenting it as a commentary on the usefulness of the technology.

And Clojure has been _known_ for a good two years now, but I would not have said Clojure was popular two years ago. It didn't have a lot of regular users, which is what you're observing when you say people aren't solving "real problems" in it. I'm not sure I'd even say Clojure is popular today. I'd say it's still roughly where Ruby was in 2004 — lots of excitement, but still lots of growing to do.

<comment><USER20> I studied Clojure and I hope really cool stuff comes out.

When Rails came out it solved all kinds of new problems. For one, by using metaprogramming a whole bunch of files were eliminated. As soon as Rails came out I was much more productive than I was with Tapestry or Wicket. Not so with Clojure.

<comment><USER22> The metaprogramming capabilities in Clojure greatly exceed those of Ruby, so that's a bit of a weak argument if you're impressed by things of that nature. Also one shouldn't forget about Clojure's concurrency model and functional purity which lend themselves to correctness and scalability.

Just because it doesn't necessarily better solve your class of problems doesn't mean it's unsuitable for other people's.

<comment><USER20> "bit of a weak argument if you're impressed by things"

I'm impressed by results

</comment></comment></comment></comment></comment></comment></comment><comment><USER23> Way to go, webnoir! 502 Bad Gateway screen!

Level of confidence instilled in me because of this: 0% Chance I'll come back later to check it out: 0% Probability I'll go visit Enlive right now: 100%

Can't help but suspect you're choking on your own dog food here. Or crapping out a corn-studded loaf, take your pick.

Well done!</comment>


Ask HN: How did you choose your current career? - <AUTHOR> <comment><USER2> I didn't. I have a B.A. Humanities degree, and a week after graduating I saw a small ad in a local newspaper for a Computer Operator. I've been working in IT and Software Development for over 40 years. Luckily, those things are my hobbies :)</comment>


How can I drink a bubble tea to ensure that I don't finish the tea before bobas? - <AUTHOR> https://medium.com/@kristw/boba-science-how-can-i-drink-a-bubble-tea-to-ensure-that-i-dont-finish-the-tea-before-the-bobas-7fc5fd0e442d <comment><USER2> I am almost certain this is going to be an interview question at one of the FANGs within a week.

</comment><comment><USER3> I never found this to be a problem. My teenage son and I would have blowpipe fights with the straws and left over pearls. The neat thing was you couldn't say "Ha, you missed!" because they would stick to you and you could then pull them off and re-sue them as ammo.

Depending on where you are are drinking your bubble tea this may not be culturally appropriate though.

</comment><comment><USER4> Pro tip: if you're ever drinking slush, drink from the top down (I.e. Always keep the straw at the surface of the slush). This largely avoids the problem of ending up with just a load of ice at the bottom.

</comment><comment><USER5> I can totally relate.

This is a big problem to solve. Let's combine video input with some AI to estimate the boba to tea ratio. Then the app can calculate the precise angle of straw placement to maximize boba intake.

</comment><comment><USER6> I have the opposite problem. I eat all of the bobas and still have tea left!

</comment><comment><USER7> separate the boba and the tea with a sieve. eat boba. drink tea.

</comment><comment><USER8> I have had this experience.

Still don't understand the fascination - maybe I had inferior quality bubble tea.

<comment><USER9> It's a fad. That said, the texture/sweetness of the pearls can vary a lot. (They're pretty finicky to cook correctly), so you are going to get a pretty big range of quality.

That said, I prefer egg custard if I get milk tea.

<comment><USER10> It's a fad? I've had bubble tea for the last ~15 years. There have been and are countless boba stores all over the States.</comment></comment></comment>


Help EFF Find Out How Your Local Police Agency is Using Drones - <AUTHOR> https://www.eff.org/deeplinks/2012/06/help-eff-find-out-how-your-local-police-agency-using-drones <comment><USER2> I don't think we know the implications of drone aircraft used by local police forces. Not knowing should not take it off the table, it should rather require oversight to make sure the populace agrees with their mission, if the mission were to change.

On the one hand, it could save municipalities money by affording a more effective police force. As mentioned earlier, this is an extension of what agencies do now --except that they'd be unpersonned. On the other hand, what are the implications if they were to arm these drones with some kind of lethal force?

I think if they were limited to reconnaissance, search (maybe not rescue), aiding in enforcement of law, I don't see how drones become automatically off- limits.

I'm probably missing something, but those are my thoughts now.

<comment><USER3> Isn't that the same debate as CCTVs surveillance in London ? They were placing surveillance cameras everywhere to say it would be more effective to fight crime, but actually it does not do anything to prevent it. At most, they can get some pictures of what ever happened, but that does not prevent it from happening in the first place.

Having drones is basically a very similar idea, while the camera is moving.

I don't think we need more effective police force. We DO need more effective control over our government and policies that extend powers over our lives.

<comment><USER2> I think there's some merit to being able to solve crimes more effectively after the fact --even if they don't prevent them as much as desired. That police can upload an image of a suspect and see if they have been captured on camera somewhere is of value. They do that in Japan; it aids the police in tracking a known criminal, so long as they're not careful (which is very difficult) -ie take taxis avoid walking in most urban areas, etc.

More effectiveness means fewer people are needed to police a given population, that reduces the cost --which is typically what people are most sensitive about. You may be more sensitive about other aspects, but you might not align with most people in that regard.

There is also Shotspotter technology, it helps in driving police to a firearm discharge, rather than prevent the discharge. Never the less, it helps police manage crime better.

</comment></comment></comment><comment><USER4> Man, I wish I had more time to spend at the local hackerspace, and start learning a bit about aeronautics... I dream of creating a DIY drone that can go up and shoot down these stupid (Gestapo|Stasi|KGB|$WHATEVER) drones that our governments are sending up.

<comment><USER5> "Gestapo drones"

Welp. This thread was godwinned rather quickly. Have any argument that isn't based in hyperbole and other logical fallacies?

<comment><USER6> I'm trying to balance my obeisance to Godwin's Law with my very strong criticism/fear of drones in US airspace.

It's hard. I _really_ think the potential for UAV abuse is high.

But it's a Law of the Internet, I guess. You win this round.

<comment><USER5> >I _really_ think the potential for UAV abuse is high.

I agree, however there's no legal standing to challenge it on. I'd rather spend my energy, instead of trying to fight something that is going to pass, to instead fight the abuses and make sure that the tool can't be misused too badly. Denying the tool outright is just silly, especially with our current understanding of privacy.

</comment></comment></comment></comment><comment><USER7> Ok I get the potential privacy implications, but two things.

1) Aerial surveillance is not new. Ever seen the signs on the highway that say "speed limit enforced by aircraft?" Local jurisdictions have been flying small planes and helicopters for law enforcement for decades.

2) What is electronic about this? I mean, I get that the drones use electronics to gather and store data, but this feels like mission creep at the EFF to me. There are plenty of battles to fight online.

<comment><USER8> They are much much cheaper to operate compared to an actual plane with a pilot. That allows for invisible 24/7 surveillance of large areas. And that's where we get into police state territory.

Its the same reason why you now need a judge to sign off on a GPS tracker. People made the same argument that police are already free to tail people, but don't realize the time and cost associated with doing so.

</comment></comment><comment><USER9> I am glad the EFF is doing this sort of thing. It seems like a good reactionary stance that should help the society at large. Will the data be available anywhere publicly? It doesn't seem like the EFF mention that I am sending them the data under a license. Is that something I have missed, or have they overlooked this? It seems like an important part of the equation.</comment>


How to Succeed with a Startup [video] - <AUTHOR> https://blog.ycombinator.com/sam-altman-how-to-succeed-with-a-startup/ <comment><USER2> I'll counter with some more basic and more broadly applicable advice.

1) Build a product people actually want and need and will pay money for

2) Promote yourself incessantly because others will be promoting themselves even more incessantly.

3) Spend your money wisely - focus on people, product, and marketing. Don't waste your money on office trappings and stuff that makes you feel good. Save your lunch money.

4) Ignore Venture Capital. If you are actually selling something people want, you can grow on revenues. If it takes a lot of money to create what your customers want or if your growth is greater than revenue, then the VCs will want to talk to you anyways. Because a) you're growing and b) customers actually want what you have. But don't start by focusing on what VCs want. Focus on what your customers want instead.

5) Always be selling. To your customers. To the press. To your employees. To anyone who matters. Never stop talking about your company.

6) Always be listening. To your customers. To your employees. The easiest and best ideas come from others.

7) Re-invest. Plow your earnings back into the company and promotion.

8) It's ok not to have a competitive advantage. What? Ok maybe you need to have some advantage but it doesn't have to be nearly as significant as is stated in this video. You need to have some reason for your customers to buy your product or service instead of competitors', so there's always some advantage. It could be price. Features. better service. But it could also be just a better connection with your prospects. Or perhaps you manage to place yourself in the right place at the right time. Or maybe you're just spending a lot on marketing. If you want to be successful, you need to identify at least one FAIR competitive advantage that your customers care about. And if you want to be super successful, identify one UNFAIR competitive advantage that locks out the competition. That could be an exclusive partnership, some intellectual property advantage, or connections with your customers that your competitors can't easily obtain.

This applies no matter if you're running a silicon valley style startup or a cybersecurity enterprise-focused government client startup -- both can make you millions or billions.

<comment><USER3> To simplify further:

1\. Be good at product management

2\. Do marketing a lot

3\. Be smart financially

4\. Be smart financially

5\. Do marketing a lot

6\. Be good at product management

7\. Be smart financially

8\. Be good at product management

<comment><USER4> don't forget product must pass toothbrush test, be simple enough for people to understand, and be the greatest thing since sliced gluten free bread

</comment></comment></comment><comment><USER5> \- "Product so good that people wanna tell others about it" doesn't mean this is an excuse to hide in a corner and keep building the product. Product can't be "good" if it's not based on frequent and lots of conversations / interactions with users.

\- The point about "exponential growth in market" is very important if your startup wants to raise money from VCs and has similar goals. Otherwise, focusing on creating value even in mature markets can be a good choice too. Same point applies to the "Huge if it works" point too.

\- His point about real trend vs fake trend is also a good point for your own product's real usage vs fake usage. Are people "really" engaged and using your product or are they just thinking that it's cool but not really using it?

\- I have nothing to add to what he said about the team, but team is so important that I wanted to mention it as well.

\- His point about optimism is another point where team (or advisors or well- wishers) help. A startup is a roller-coaster. You will have days of negativity and doubts. At that moment, a team member (or someone similar) who pushes you and encourages you is very important!

\- Love the points about "We'll figure it out" and "I've got it"

\- "Bias towards action" doesn't mean being busy for the sake of being busy. In my career, I've seen so many months wasted because action wasn't based on well-thought-out logic. So, certainly keep bias towards action, but don't use it as no excuse to not think. A good way to not move fast is to move fast in unnecessary directions.

\- The "Never lose momentum" point is so difficult in real world (unless you're lucky). But, good to be reminded about.

\- The point about "Distribution startegy" is another great point. Every distribution strategy we are thinking of is going to turn out to be harder than we thought. Still, finding new / unexplored distribution sources compared to your competition can be a great win!

\- I am sure this wasn't intentional, but I'll say that the talk didn't focus enough on users / customers. In the end, it's all about creating genuine value for the customers / users.

<comment><USER6> > Product can't be "good" if it's not based on frequent and lots of > conversations / interactions with users.

It also can't be good if you're not implementing the ideas being surfaced in those interactions, and implementing takes longer than talking with people. If you have a conversation with someone and end up building something they ask for that takes six weeks of full time work, then does it really make sense to delay the timeline on shipping that feature so that you can keep talking with more potential users who will likely have the same objections anyway? I'm not trying to justify not talking with users, but at the same time once you've gotten the message, it may be time to hang up the phone.

<comment><USER7> Don't change your product based on one conversation.

</comment></comment></comment><comment><USER8> I find Sam Altman's advice on startup completely and utterly useless. They're akin to the "How to become a millionaire" books. I've said this in the past [1] that providing generic advice doesn't work for startups. Every company is unique and they have unique challenges. Instead, Sam should be focusing on bringing stories of various startups in light, interview their founders and have a focused discourse on what worked and what didn't for that __particular__ startup.

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

<comment><USER9> I sort of disagree in one important sense: all generic advice is pretty useless.

How to succeed in sports? practice, focus, take care of your diet and health

How to succeed in a large company? keep your boss happy, work hard, focus

etc

This is not Altman's fault. I don't think the videos can -- or are supposed to -- replace actual detailed daily advice on struggles which, presumably, you get if you join Ycombinator.

I don't think that "focusing on bringing stories of various startups to light" is all that different from what he is doing. The same criticism applies: it is their story not yours.

And the same caveat applies: it is a sample of the kind of advice you will get.

<comment><USER8> I think you're right - all generic advice, __by definition__ is not going to be specific and its utility is questionable.

The problem doesn't just lie in the answer, but the question itself. When you ask a question such as "How can I do well in life?", that lends itself to generic bullshit advice.

My problem with Sam Altman is that he keeps perpetuating these kinds of questions as if he is going to help people. I am disagreeing with both what he is trying to appoint as a question, i.e. "How to success with a startup?" and his generic answers to his generic questions.

It helps nobody. Stop asking these questions.

<comment><USER9> Do you read any kinds of books on how to get better?

I am addicted to them. As a kid I used to read books on judo, karate, the guitar, programming, and how to be a spy.

I now read books on startups, investing, programming and writing.

The actual improvement comes from the practice, but I still feel the books and advice play a critical role. They can do the following:

1\. They pump me up to go and practice.

2\. They actually demonstrate particular exercises or thought experiments.

3\. They just get me thinking about the particular item

4\. They make me fell less alone because others are thinking about it

5\. They make the activity seem important in the life affirming sense of it is worth my time

I think all we can ask of "startup advice" is that it fill a similar niche.

<comment><USER10> I agree.

Even if "generic advice" isn't worth anything else, the psychological benefits of keeping a subject at the front of your mind, being reminded something is possible, and building excitement are valuable.

</comment></comment></comment></comment></comment><comment><USER11> Terrific intro to Startup School v2.0!

In a similar vein to the question "Why do startups win?", which besides having a rich history of rigorous academic inquiry and to my thinking has never been adequately resolved.

One can ask, "Why does Startup School work?" And a chief factor is the imposition of an external hard deadline (Demo Day). As well as the tracking of performance metrics by a team outside the locus of founders.

To that end, a "Milestone Tracker" interface that is both public and designed with accountability in mind could be a key component in making things "real" for participants.

It also occurs to me that in a class of 15K startups, you are going to receive a lot of "offers" to try products and services from your fellow classmates. Just in the past hour I got $250 in credits from a cloud analytics startup, and a discount coupon from a crowdfunding platform for foodies ;)

Manageable for a cohort size in the low hundreds. But perhaps an issue at scale that may result in missed opportunities.

It may be a good idea to have a centralized site at startupschool.org/offers with a canonical list of "startup-to-startup" (S2S) deals.

Of course it would be differentiated from third-party credits by the likes of GCloud, AWS, Stripe, etc

</comment><comment><USER12> So has Ycombinator abandoned any hope for VR since he calls it a fake trend in the first five minutes?

Just curious because I swear saw a blog where they want VR startups to apply awhile ago but can't find it now.

<comment><USER13> He is dead wrong if he thinks VR isn't huge in the long-term.

<comment><USER14> People have been saying that for decades. After spending 10 years in the 3D graphics and VR industries, I just don't see it happening any time soon. The technology, including Oculus, is certainly getting better but it still sucks. It still makes too many people sick. At this point, I am in the "I'll believe it when I see it" crowd.

<comment><USER15> For me, the motion sickness problem only happens in games where you're moving around freely on the ground like an FPS. If a teleporter is used to move, I'm fine, and for some reason flight sims don't bother me either. It seems like an inherent problem with the tech due to the disagreement between your inner ear and visual cues. Anyone have insight?

<comment><USER16> Yeah, motion sickness is a non issue at this point for headsets with good 6 DoF tracking as long as you are only doing 1:1 mapped movement (your VR movements match your real world movements). Teleporting is mostly fine but rapid frequent teleporting can still cause some issues. Other forms of locomotion tend to have more issues but some tricks have been developed and best practices figured out to make it viable for many people for reasonably long sessions. Virtual "blinkers" to reduce optical flow in peripheral vision have proved quite effective and are widely used. Pulling yourself through the virtual environment with your hands also seems to work quite well for many people (see Lone Echo for example).

</comment></comment></comment></comment></comment><comment><USER17> I like his idea of choosing a startup idea that is in an industry poised for growth and "riding the elevator."

<comment><USER18> If I thought I could pick an industry poised for growth I wouldn't be mucking about with index funds.

<comment><USER19> The trouble often isn't picking the industry but figuring how to make money out of it. Like AI and self driving cars are obviously poised for growth but Google/Alphabet and other large companies are likely to dominate. And a lot of that is already priced into the stocks.

I remember Altman saying an AI for X startup would be a good idea though. I guess Cruise Automation played things well.

<comment><USER18> Actually neither of those things are obvious to me, AI seems over hyped and the head of Waymo has stated that ubiquitous self driving cars are 30 years away. Although perhaps I'm just getting a bit cynical in my old age.

<comment><USER19> Any source on the 30 year thing? They already have test cars driving around with no one in the front seat ([https://www.youtube.com/watch?v=jPfC9Yfsjd8&t=2m40s](https://www.youtube.com/watch?v=jPfC9Yfsjd8&t=2m40s)) and it seems there will be both intense competition to grab market share and also a push from regulators to reduce the present 1.25 million road deaths per year.

<comment><USER18> [https://spectrum.ieee.org/cars-that- think/transportation/sel...](https://spectrum.ieee.org/cars-that- think/transportation/self-driving/google-selfdriving-car-will-be-ready-soon- for-some-in-decades-for-others)

<comment><USER19> Ta for the link though that talk was over two years ago and things have moved on. Personally I'd be surprised if it took that long.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> \- Be raised rich and or be surrounded by the rich/powerful(Elizabeth Holmes, Evan Speigel, etc...)

\- Have rich & powerful friends directly or indirectly

\- Impress & become friendly with the rich & powerful either through clear data that shows your worth an investment(your startup data shows traction) or lie your butt off; aka fake it before you make it. I always strive(d) for the former as darn my parents and the morality they instilled.

<comment><USER21> The tone of your comment is off, but the underlying point has at least some merit.

<comment><USER20> Pardon if it comes off jaded, but what I note is very true. I'm in no way trying to impress Sam Altman like i gather some others may be.

No idea his background... yet did he not go to an Ivy League school?

<comment><USER22> No, he didn't go to an Ivy League school.

<comment><USER23> From wikipedia: "studied computer science at Stanford University". Stanford isn't Ivy league? Or is wikipedia wrong?

<comment><USER22> Stanford is not Ivy League.

<comment><USER20> Umm in 2015/2016 Stanford's tuition was $46k while Harvard was $45k.

If it's not Ivy League why am I paying more to go there then the hallmark ivy league school?

<comment><USER24> Ivy League is a specific name for north eastern universities in a 'sports league'

I would consider stanford a top tier school... but ivy league appears to have a specific definition.

[https://en.wikipedia.org/wiki/Ivy_League#Members](https://en.wikipedia.org/wiki/Ivy_League#Members)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> This talk is worth more than 2 Millions Medium Articles.</comment>


Show HN: Choose Photo. Make Ascii - <AUTHOR> http://dchang.mit.edu/artwork/

<comment><AUTHOR> My friend just learned how to code last week and was already able to make this. I'm impressed by the quality of codecademy

<comment><USER2> That's actually quite interesting. I wonder, what is the underlying algorithm? That's amazing for a first-week coder.

<comment><USER3> There's probably a lot of complicated ways of doing this, but to keep it simple you could probably just downscale the image, convert to black and white, and have an array which maps lightness ranges to ascii characters

<comment><USER4> Looking at the source, looks like he piped it through <http://secret- wildwood-1014.herokuapp.com/>, which looks like it does basic image to ascii conversions when you give it a url. Not sure if he spun that up, but it's cool in that now the app can be made all in js

<comment><USER5> what would really be cool is if someone creates a service that can turn videos into 'ascii art' videos....that would look beautiful...

<comment><USER6> Try `mplayer -vo aa <video_file>`

<comment><USER7>
      -vo caca <video_file>

to have it in color. :)

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> <http://freecode.com/projects/jp2a> < I use this in the console sometimes. Nice just to check the orientation of a photo or something, then e.g. rotate w/convert.

<comment><USER9> A friendly note: The official homepage is at <http://csl.sublevel3.org/jp2a/>

</comment></comment><comment><USER10> Oooh, this reminds me of something similar I made when I was 14 or 15. I made a program to do just this, but only with bitmaps. No Twitter Bootstrap or filepicker.io, though ;)

Web interface: <http://minipenguin.com/bta/>

Standalone source code: <http://minipenguin.com/bta/bta.c>

</comment><comment><USER11> Cool web-app, if you like this you should try out libcaca[1] it has even been integrated with mplayer[2].

1 - <http://caca.zoy.org/wiki/libcaca>

2 - <http://www.youtube.com/watch?v=VP5KvaWz6Dg>

<comment><USER12> Or aalib <[https://en.wikipedia.org/wiki/AAlib>](https://en.wikipedia.org/wiki/AAlib>), which I my opinion gives better results than libcaca for monochrome images. You might also enjoy their demo program bb (sudo apt-get install bb).

</comment></comment><comment><USER13> Perl module for such: [http://search.cpan.org/~asavige/Acme- EyeDrops-1.60/lib/Acme/...](http://search.cpan.org/~asavige/Acme- EyeDrops-1.60/lib/Acme/EyeDrops.pm)

</comment><comment><USER14> A bit of oneupmanship: ASCII projektor, which was an app from a few years ago that allowed you to create ASCII from video.

<http://earthlingsoft.net/ASCII%20Projektor/>

</comment><comment><USER15> Put MIT in URL. Get clicks.

</comment><comment><USER2> Pretty cool. I finally saw a practical use of filepicker.io!

</comment><comment><USER16> [http://labs.phurix.net/posts/converting-your-logo-to- ascii-a...](http://labs.phurix.net/posts/converting-your-logo-to-ascii-art)

</comment><comment><USER17> <http://www.floodgap.com/software/ppmascii/ppmascii.txt>

</comment><comment><USER18> This is fun. I made one of my '88 911:

<http://kindel.com/porsche/Ascii>

</comment><comment><USER19> I remember making a python script in high school that did this same thing. If only FilePicker had existed then!

</comment><comment><USER20> Mplayer has ASCII art output for videos, -vo aa . Can be fun :-)

</comment><comment><USER21> Really fun! Nice implementation of photo to ascii.

</comment><comment><USER22> Does it have an API?</comment>


The Rise of the Weaponized AI Propaganda Machine - <AUTHOR> https://medium.com/join-scout/the-rise-of-the-weaponized-ai-propaganda-machine-86dac61668b#.jri4xgke1 <comment><USER2> Posted 4 days ago with over 120 comments:

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

<comment><USER3> Note that if you try to read this off the original scout.ai site (on Chrome), it _clicktraps you from navigating back out_ , so do it in a tab whose context you don't care about.

That alone is enough for me to choose not read the author at all.

<comment><USER4> Hello, masonic! I just started as a new developer for Scout and can assure you that this behavior is 100% unintentional. From the looks of it, the "clicktrap" seems caused by an unnecessary redirection. I've taken a note to address this in the near future. Thank you for the feedback.

</comment></comment></comment><comment><AUTHOR> Anyone with a better grasp than myself on the AI domain care to comment on this piece?

<comment><USER5> To actually address your question. Text generation is a thing. They can actually caption images, although I dont know how good the grammar is. Simple markov chains go a long ways, though they dont create text with meaning.

Dont worry though, I'm sure both sides will use it. So it will be fair :P</comment></comment>


Flux is the new WndProc - <AUTHOR> http://bitquabit.com/post/the-more-things-change/ <comment><USER2> I've also observed this similarity. The msg is like the actionType, the wParam and/or lParam are like the polymorphic objects that you pass with your action.

The dispatcher is also not the most efficient model, where every store is registered to listen to every event. This is a bit like multiple windows on an event loop. The difference is that in Windows, messages are almost always targeted to a particular window's handle (hwnd). This doesn't make sense in Flux, since it's more of an observer pattern. The logic of interpreting the meaning of an action is left to each store, which is really just a cache.

The biggest problem I have with Flux relates to this polymophism. I use TypeScript where possible and this is the one place where it always breaks down. I understand the appeal of JS objects but the only way to ensure your Flux based system is stable is to have lots of unit tests around your actions and stores.

Redux is a more straightforward take on caching. I can also use type annotations on the reducers and associated store structure, so this helps ensure structural consistency. It also solves the isomorphism problem of server side rendering because each request can get its own state. There is no out of the box solution for this with Flux, since stores are singletons by default.

Minor nit: stores are just caches with observers. I'm not sure why they weren't just called caches.

<comment><USER3> I like how Redux is a pretty simple distillation of some flux concepts... In the end, I think it comes down to application scale. The "new" way of mutating models based on OO classes that tend to contain any given amount of logic tends to be much harder to reason with as you add features. More features means a linear to exponential growth in complexity and risk of side effects.

With one-way workflows combined with immutable state, and idempotent components, it's much easier to log/replay/test any given scenario.

</comment></comment><comment><USER4> The big idea from old school windows that is shared with Flux is the idea of little views that render themselves and manage their own state. In Windows we called those Controls or Window Classes. It is a good idea, and one worthy of preserving.

<comment><USER5> I haven't used a single GUI framework that _doesn 't_ have the concept of User Controls. It's not a big idea, it's the obvious thing to do.

<comment><USER4> If you've ever created a user interface in HTML, you've used something that does not have the concept of user controls. Let's say that I want to make a numeric entry user control for entering numbers on a touch screen. This control will be made up of a collection of built-in UI controls that will work together to do what I need: let's say a text field, a couple of up and down buttons, an always-visible keypad, and a little slider that lets us move between min and max.

In most HTML-based systems, it's not a built-in or natural thing to have such a self-contained "User Control" that I can just plop in to my user interface in 25 different places and have it manage itself, and the interaction between its own sub-components. Django, for example, completely lacks such a concept (although TurboGears does have it). This is a first class concept in classic Windows programming, and also in Flux-- although it's missing from most web- based systems.

<comment><USER5> Hehe, i was suspected someone would bring up HTML. Plain HTML is a markup language designed for documents, not a GUI framework. It hardly even has the concept of any interaction at all in the first place, how can it then have the concept of reusable and encapsulated interaction? (jquery is not a GUI framework either btw, its a DOM manipulation tool). I would say HTML is too low level to be called GUI framework. There are other low level graphic frameworks that also lack this, OpenGL for example which is designed for graphics only, if you want widgets you will have to build that yourself on top of the low level framework or find someone else who already did.

But yes, you are right that it's quite lacking in this area on it's own. Although it's easy to find frameworks on top of html that adds this feature. Google for "HTML datepicker" and i bet you will find thousands of results. Other frameworks on top of html that does have this concept baked in are asp.net and anuglar.

</comment></comment></comment></comment><comment><USER6> A couple of corrections:

1) Mac OS X does not store a bitmap for every widget, that's iOS's architecture. It stores a bitmap for every window. Having a layer (GPU-stored bitmap) was only introduced once CoreAnimation was ported to OS X. It was and is optional.

2) OS X Views also have a -drawRect: method that works the same way.

3) In fact that's how MVC works. See [http://blog.metaobject.com/2015/04/model-widget- controller-m...](http://blog.metaobject.com/2015/04/model-widget-controller- mwc-aka-apple.html)

And react and frameworks like it just duplicated this, see [http://blog.metaobject.com/2015/04/reactnative- isn.html](http://blog.metaobject.com/2015/04/reactnative-isn.html) In fact, when I first read about react (non-native), my first thought was "hey, finally they came up with a good equivalent of NSView + drawRect:

<comment><USER7> Isn't drawRect: working at a different level of abstraction than React? In React, the view function constructs a virtual DOM tree, which can contain links, buttons, form fields, tables, etc. The equivalent on OS X would construct NSControls or NSCells, or objects that ultimately got translated into those, rather than just drawing on a canvas.

<comment><USER6> I saw this as react choosing the obvious way to implement drawRect: inside a browser: painting with HTML.

You could easily have a "graphics context" that accepts high-level objects, or a variant of drawRect: that creates subviews and then tells those subviews to draw themselves.

I don't see this as being fundamentally/structurally different, though there is a slight difference in the implementation.

</comment></comment></comment><comment><USER8> As someone who has written several things with Flux and Flux-esque architecture, I see it as a step in the middle, rather than where things are ending. It's not a large step from Flux (Stores update themselves in response to actions) to Redux (Model the entire application as reducers on a sequence of Actions) to RxJS Observables.

What's shared in there is the idea that unidirectional data flow is a whole lot easier to reason about, model, and simulate than 2-way data flow. Everything else is semantics.

<comment><USER9> > What's shared in there is the idea that unidirectional data flow is a whole > lot easier to reason about

It makes _some_ things a whole lot "easier to reason about" (so sick of that phrase), but other things not so "easy to reason about", like, for instance, error handling. Getting my head wrapped around the fact that asynchronous errors had to live in their own stores and be handled in the same way as all other data passed to the view was certainly not "easy" to reason about and still doesn't sit right with me to this day. You make concessions with every pattern and there is no silver bullet.

<comment><USER8> I'm not saying easy to reason about in the sense of "easy to learn because it isn't a change from how we used to do things", but rather, in that it allows one to easily answer:

\- What is the current state of things? \- How did we arrive at the current state of things? \- What should the UI look like given the current state of things?

It means that we can say: "Thing A happened, then Thing B happened, then Thing C happened". And then conceptualize "what should things look like after that chain of events". I've found this to make errors a whole lot easier about, because I don't need to piece together the state when an error happens -- just fire an action that says "An Error happened", then the stores figure out how to act accordingly. It's just another action.

</comment></comment></comment><comment><USER10> There are some great things going on in React / Flux, but the part that needs to be emphasized about Flux, that Facebook doesn't address explicitly anywhere, and that most people eager to always be on the cutting edge will never admit, is that this stuff was designed to solve problems for _very_ complex applications. Complexity is relative, and the solutions that reduce complexity and friction in the development process for Facebook may increase it for another organization. That is to say, Flux / React et al is by no means simple. Not even a little bit. But it probably simplified __a lot __of things for the Facebook team. However, YMMV for your 6 person startup engineering team.

<comment><USER11> I'm convinced the complexity comes from the language,

Flux/React are actually quite simple and I can put the core architecture together in under 50 loc of Elm.

<comment><USER9> The complexity comes from stitching everything together. You choose your router, your flux library, your build tools, whether or not to use JSX, whether or not to write your CSS with Javascript, which fancy new React specific testing and mocking library you need to use, how to organize your project, what best practices you should follow, what gotchas you will encounter because of Reacts relative young age as an OOP library, etc.

You will always have to deal with complexity, it just depends on what kind of complexity you are willing to stomach. Some people prefer to deal with the complexity of stitching things together, other people prefer to have things stitched together for them and deal with the complexity of many abstractions. Both are fine choices, and we will debate endlessly with each other over which approach is the best approach. (hint: neither are).

</comment></comment></comment><comment><USER12> ...and so for those of us who aren't Windows developers, what learnings can we apply to flux to make it better?

<comment><AUTHOR> Well, first, I'd note that React and Flux are already learning from the past. For example, I absolutely think there are tons of similarities between WM_PAINT and React's DOM diffing, but there are also major, major differences. A really key one being that React effectively handles the rendering tree directly, and can therefore do high-level manipulation and performance work on it, whereas Windows paint messages forced the windows themselves to handle all of their state diffing and painting issues. This makes the React part of Flux a lot closer to things like WPF, or retained-mode 3D graphics. (In fact, it wouldn't shock me if that were the actual inspiration for React's DOM work, and that the rest of this is more covergent evolution.)

I'd also note that we know that this style of design scales amazingly well. You can build and maintain applications as complex as Word, Myst, Netscape, and so on indefinitely. So we definitely know that this design has some historical precedent of working really well, and we're probably not way off track.

That in turn means I think we can answer the "what learning can we apply" by looking at what worked well historically.

For example, one of the things you have to do is to hide the low-level event loop. That's what frameworks like OWL and MFC did very early on, and I think what frameworks like Reflux are trying to do now. You even have some of that in the form of observers and so on in Flux itself. But I think that getting those types of things standardized, and a bit higher-level, will help a lot. I suspect, although I don't know, that ES5 was a bit of a blocker on getting that in Flux earlier, and suspect that Babel's pervasiveness will let that situation start changing, but that's entirely a guess.

We also know that, for the overwhelming majority of apps that are actually written, having a GUI designer building on the underlying framework (e.g. Interface Builder, VisualAge's form designer, etc.) can both decrease development time and reduce bugs, and we know that such tools work best with certain patterns in how callbacks work in the underlying framework. Specifically, you want one-to-many observers, strongly typed events that can be exposed and described via reflection, etc. So I'd hope that implementing that kind of thing in Flux can be done in a forward-looking way from the beginning, rather than getting bolted on later. More generically, designing the framework with an eye towards making it tooling-friendly is probably a really good way to future-proof things from the beginning.

I guess we'll see as we move forward. Each situation is a little different, so while there are parallels, it's hardly a slam-dunk that things will go exactly the same. But I do think that keeping an eye towards tooling is a really logical way to look forward and learn from the past.

<comment><USER12> OK cool. It's not all bad news then.

I think once we see react components converge across web + native we'll start to see more cross-platform tooling and designers springing up. I think things are looking pretty bright. Arguably the key insight the react team had was to treat the browser as a dumb output... and then realise that the DOM could just be one of many outputs.

I did just wonder whether in the GUI world there was a major pattern that people were using today that Flux should be using instead. But apparently not.

</comment></comment></comment><comment><USER13> This was an awesome read. We use React and Flux daily at work so I'm going to share this with coworkers. I'm a little confused on what the author's concern is though.

> I've just felt…well, weird. Something seemed off

Is there anything substantively wrong with the flux pattern or drawbacks?

<comment><AUTHOR> _EDIT: I changed that paragraph; thanks for pointing out it no longer fit with the rest of the post._

 _Original comment_ :

The weakness of typing in the switch blocks. I'll alter that sentence a bit; it's a leftover from an earlier version of that article where I was going to focus very narrowly on how uMsg/wParam/lParam, like the way actions are usually done in Flux apps, are decoupled to the point where it's very easy to make typing errors. Then I described why I thought they were similar to begin with, and then axed most of the original post when the entire thing switched to showing how Flux is an old pattern we've done before. I'll see if I can tweak that sentence in a way that keeps the flow going.

<comment><USER14> Using TypeScript's user defined type guards instead of a switch looks promising here, inside the 'if' the actions are type checked.

<comment><USER15> Or better, use Elm (or something similar) and tagged unions. That way you get type-checking and exhaustive-checking of your message types. You still have a big match (~switch/case) but now the compiler yells at you if you've forgotten to handle a message tag or if you're not unpacking the right types from it.

</comment></comment></comment></comment><comment><USER16> So what is Angular then? Angular seems to me to be more like an ORM for the view where there's dirty checking of the model and then update events are dispatched to the external system which is the DOM instead of the DB. Is there something similar in the GUI toolkit world?

<comment><USER17> Angular is very similar to the MVVM style of GUI programming that's popular in Microsoft's XAML-based libraries (e.g. WPF, Silverlight, WinRT and now UWP). Which I think is interesting because that's where they ended up. Modern windows programming doesn't involve writing WndProc functions anymore.

</comment></comment><comment><USER18> Stemmed from this comment chain:

[https://news.ycombinator.com/item?id=10379199&goto=item%3Fid...](https://news.ycombinator.com/item?id=10379199&goto=item%3Fid%3D10378684)

</comment><comment><USER19> See I think Flux is too low-level. I think it's too hard to reason about from the top level. Not that the architecture is inherently bad—people are using it a ton–but that things get out of hand way to fast. Regardless I can't wait to see web development in a year!

<comment><USER20> Let's try to predict what it will look like?

My guess: Borland Delphi.

<comment><USER21> I really hope so.

<comment><USER22> Our product, Elevate Web Builder, is essentially that: Delphi for web development.

[http://www.elevatesoft.com/products?category=ewb&type=web](http://www.elevatesoft.com/products?category=ewb&type=web)

</comment></comment></comment></comment><comment><USER23> I share the author's feeling of déjà vu. I feel like I've seen this article already. It was a comment posted on HN earlier today. It's kind of fascinating how someone's comment can get promoted to someone else's blog post in a few hours.

<comment><USER24> Just to note, it is the original commenter's blog, not stolen. @gecko wrote "And the comment is now a blog post with more context for those who were lucky enough never to write raw Windows code"

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

</comment></comment><comment><USER25> And Node is essentially the Windows message loop [0].

[0] [https://en.wikipedia.org/wiki/Message_loop_in_Microsoft_Wind...](https://en.wikipedia.org/wiki/Message_loop_in_Microsoft_Windows)

<comment><USER26> Yes, phrased differently, asynchronous programming is like non-preemptive (cooperative) multitasking from the Windows 3.1 era.

</comment></comment><comment><USER27> I love the correlation between modern in-browser development and programming early personal computers. It's akin to how digital logic abstracts away the tyranny of E&M physics, but several layers higher, and this time just between instruction sets/runtimes.

ChromeOS is _kind_ of making this leap, but I really wonder when web browser ASICs (or equivalent) will start popping up.

</comment><comment><USER28> The author does not understand React :(

> React by itself doesn't actually solve how to propagate changes

It does actually - you update the state, then React propogates the changes for you through it's props mechanism. Flux is an extra layer of indirection over state changes _if you need it_ : [https://twitter.com/floydophone/status/649786438330945536](https://twitter.com/floydophone/status/649786438330945536) (edit: I regret my tone here, there is clearly ongoing work in this area and no widely accepted best practice yet)

Flux is not message passing, React components do not redraw themselves, React components do not pass messages to each other, Flux only superficially looks like winapi because of the switch statement in that particular example.

React provides the view as a function of state. winapi is nothing like that.

React is a giant step towards functional programming. winapi is _definitely_ nothing like that.

edit: Windows -> winapi

<comment><USER29> > React is a giant step towards functional programming. Windows is definitely > nothing like that.

Err, that's not entirely true for MVVM apps, where views are just declarative markup that are rendered (retained mode) based on logical state provided by data bindings. It's been like that ever since XAML was introduced in 2006.

<comment><USER28> MVVM makes ubiquitous use of mutable state which means model change listeners, callbacks calling callbacks etc, FP/React is about using immutable state to dodge all these problems by design.

[http://www.dustingetz.com/2013/09/12/comparison-knockout- ang...](http://www.dustingetz.com/2013/09/12/comparison-knockout-angular- react.html)

<comment><USER29> The point is that in both React and XAML apps, you (usually) don't write code to mutate the View. In your code, the View is just a declarative construct.

There's nothing stopping you from making immutable ViewModels in MVVM, other than bad perf (which React would presumably also suffer from on larger apps).

<comment><USER3> Facebook doesn't seem to perform so badly in terms of a larger app. More varied components on a page than most applications in general. Most of the quirkiness I see in FB tends to come from how they deal with eventual consistency with their backend in order to scale to millions of simultaneous users.

Most applications don't have the latter problem.

<comment><USER29> I bet they do a lot of shouldComponentUpdate, which kills the functional purity.

XAML control properties do the equivalent of shouldComponentUpdate by default. Same ideas, just doing diffs in different places.

<comment><USER28> > I bet they do a lot of shouldComponentUpdate, which kills the functional > purity.

functional purity _enables_ shouldComponentUpdate

</comment></comment></comment></comment></comment></comment></comment><comment><USER19> Does anyone know of a good place to learn about these different approaches. I find this so fascinating.

</comment><comment><USER26> Stated more simply, React is just like "rebooting" your computer after you have changed the config files. It is, in this respect, quite ancient technology, except that the framework hits the "reset" button for you.

</comment><comment><USER30> I've never liked the comparison of Flux to functional reactive programming. It's really just good ol' object-oriented design. Actions are akin to the Command pattern and the Dispatcher feels like a Mediator. Passing callbacks instead of objects and making a mostly directed graph does not yield FRP.

In my latest project, I used React with rx-react ([https://github.com/fdecampredon/rx- react](https://github.com/fdecampredon/rx-react)) and RxJS. That combination definitely made for some FRP fun.

</comment><comment><USER31> The big dispatcher switch in Flux is eerily reminiscent of how we used to program AWT widgets back in Java 1.0 days. This architecture was improved greatly in Java 1.1 with a delegation model. If the history is to repeat itself, as the OP so eloquent argues for, then, if you want to see where flux will be going in the next couple of years, start using knockout.js now and for once stay ahead of the curve.

</comment><comment><USER32> What a great article. I was asking in my previous thread, what framework should I use React/Angular : [https://news.ycombinator.com/item?id=10359497](https://news.ycombinator.com/item?id=10359497)

Clearly from what I have heard from HN and from this blog post is React with Flux is just the old of doing web development today! Thats great!

</comment><comment><USER33> Which is the best model to date for complex UI ?

Cocoa + Interface Builder or XAML/WPF ?

Have used Cocoa + Interface Builder and its quite a joy compared to web dev.

EDIT :

Has some thoughts on this : [http://stackoverflow.com/questions/2442340/how- does-cocoa-co...](http://stackoverflow.com/questions/2442340/how-does-cocoa- compare-to-microsoft-qt)

<comment><AUTHOR> I mean, both of those get things right. XAML/WPF tries to make the interface cleanly human editable in code, but is incredibly verbose, and the "can be human editable" constraint ends up being "is only human editable" pretty quickly. Interface Builder is a lot more intuitive and powerful, but it's more of an all-or-nothing affair, in my opinion.

Beyond that, though, they have way more in common than they do different. I'm not sure it makes sense to talk of one of them as a better _model_ than the other, versus maybe a better _implementation_ of the same workflow.

<comment><USER33> According to

[http://stackoverflow.com/questions/2442340/how-does-cocoa- co...](http://stackoverflow.com/questions/2442340/how-does-cocoa-compare-to- microsoft-qt)

WPF is better.

<comment><USER34> Well, as there's no Cocoa on Windows and no WPF on OS X it doesn't really matter.

Also that SO post reads a lot like "I can't stand Interface Builder" (which is understandable if you aren't prepare to embrace it).

I find the Cocoa model of not having to do anything with XML far better for my sanity. But then again I guess there are people who prefer XML artistry to drawRect overriding. :)

</comment></comment></comment></comment><comment><USER20> In this line of reinventing the wheel of UI programming in web dev, I am waiting for Borland Delphi reincarnation.

</comment><comment><USER35> I've only looked into iOS programming a little, but is this not similar to how views are handled there too?

</comment><comment><USER36> Also, Ruby on Rails is Flux.

</comment><comment><USER37> The writer really likes the word "idempotent".

<comment><USER38> And uses it incorrectly. Idempotence is when f(f(x)) == f(x). React views take some props and/or state and return a component, so applying the view to its output would just give an error.

I think the word he's looking for is "pure".

EDIT: I was wrong - apparently "idempotent" can also describe a consistent relationship between the input and some state. In that sense, it's actually a very good description of how the input to a React view affects the DOM.

<comment><USER39> Well, even in Wikipedia, the definition is quoted as being different for CS vs the unary operation you describe.

"In computer science, the term idempotent is used more comprehensively to describe an operation that will produce the same results if executed once or multiple times."

Which is more that f(x) == f(x) == f(x) for the state affected by f.

<comment><USER38> Thank you for pointing this out, I was not aware that the word could be used this way. They are really quite different concepts.

<comment><USER40> I'm not sure that they are. You just need to model the concept of state as the function's input/output, as functional programmers are eager to do :)

If we start in state x, then apply operation f, the resulting state is f(x). If we apply operation f again, we'll be in state f(f(x)). If f is idempotent, then state f(x) and state f(f(x)) are identical.

</comment></comment></comment></comment></comment><comment><USER41> WndProc is how the windows manager communicates with Windows UI code. Flux is how the UI communicates actions back to the data layer of the application. They're completely different.</comment>


European Tech Startups Succeed: An Inside Look - <AUTHOR> European startups emerge on world tech scene everyday, but too many of them fail. Among others, roots for this goes to the very startups founders' spirit. According to The State of European Tech Report , in Europe, startup founders are from one quarter to half an immigrant, three-quarters of them have a bachelor's or master's degree, with 7% at PhD level.
Only 21% of founders are female, although there are more and more women founding startups and taking C-suite and board level positions. Despite significant progress with diversity initiatives, 84% of founders are White\Caucasian.
Most founders are fairly young, with 40% aged between 26-30 years old, 7% are over 40. But in France only, as many as 20% are over 40. Across Europe, despite the prevalence of younger founders, those with more experience often raise more money.
Interestingly, typical startup founders often have experience with U.S. companies: Microsoft, Google, and BCG seed the top ten companies founders. Among the European companies, Nokia is the highest-ranked and Rocket Internet is the only Europe grown company that makes the Top 15 globally.
Starting Capital Investments: how is funding raised?
50% of first-time founders set-up and launch companies with less than $25,000. However, serial successful founders tend to invest much more substantial amounts: 32% of experienced founders are ready to raise and spend more than $500,000 to support a new startup.
Women are braver and for the first time, are ready to start, either without any money or less than $25,000. According to the ethnic self-identifying data, 60% of Black/African/Caribbean started their business with no starting capital or with less than $25,000. If we are looking at the financial sources, we can see that the overwhelming majority of founders use their own savings to launch company. <comment><USER2> > Despite significant progress with diversity initiatives, 84% of founders are > White\Caucasian.

Europe is much less diverse (if you just count the French and Germans as European) than America is, so I wonder how well represented minorities are given this number?</comment>


Doctors are tweeting about coronavirus to make facts go viral - <AUTHOR> https://www.wsj.com/articles/doctors-are-tweeting-about-coronavirus-to-make-facts-go-viral-11589558880 <comment><USER2> How about tweeting these,

1\. The virus mostly spreads through BREATHING/TALKING/COUGHING.

2\. 80% of infections come from FRIENDS/FAMILY. Stop going to meet them unnecessarily and spending hours together indoors.

3\. Masks mostly don't help you, they help the people AROUND you.

I'd say the average person would be much better prepared against the virus with these three facts.

<comment><USER3> Yeah, unfortunately point #3 makes people think they shouldn't wear masks.

I was joking to a friend that the correct "American" response to COVID-19 is legal liability for getting others sick, but alas, that requires effective contact tracing.

<comment><USER4> Even more American would be to fine/arrest people caught without a mask.

<comment><USER5> That's the East Asian response. A law like that would probably get dragged through the courts in America with the rest of the media circus before being struck down as government overreach. As the original poster said, legal liability between private individuals with lots of court fees is very American.

<comment><USER6> There's lots of news about people getting manhandled by police because they don't have a mask on.

Of course, in wealthier areas, there are stories about the police handing out masks to people that aren't wearing them.

So I think we are handling it in a very US way.

</comment></comment></comment></comment></comment><comment><USER7> How sad... I just realized my initial gut reaction to seeing any news headline with the word "Fact" in it has become to assume it has a political angle.

More often than not, "Fact" is just a synonym for some political opinion.

How far have we fallen? Our news outlets are more often than not just Panic Porn and Political Hit Jobs... anything except actual unvarnished, unspun, unpoliticized raw news.

<comment><USER8> In fairness to the news media, it's effectively mandatory to process the data, the facts, for presentation, so everything is "spun" to some degree.

<comment><USER7> Process and make more easily consumable? Sure, I don't have all day to catch up on happenings and events.

But to selectively edit videos, leave out details deliberately, loaded word choices ("blasts", "destroys", "slaps back"), deliberate misuse of words to instill a sense of credibility ("fact", "expert", "scientist"), and so much more?

That's more than just processing the data... that's deliberate manipulation.

In entertainment news media, Fact now means opinion, Expert now means political shill, and Scientist means random person with an opinion.

<comment><USER9> I often wonder how much entertainment news impacts politician's decision making. I have to assume that they consider what the major news entertainment companies will say about bills they author and support or don't. in some ways, they are not just reporting, but likely influencing.

</comment></comment></comment></comment><comment><USER10> Med twitter is a big thing. It's mostly doctors talking to doctors. It's almost replacing conferences and journals, and the primary way info about sars-cov-2 has been spread, and excellent for critical review of all the preprints that have also gained "virality." Would be nice if it weren't on twitter though. An old style forum would be much better, or even something like reddit, though I suspect one day these people posting "tweetorials" will regret putting all this info onto someone else's platform rather than blog posts etc.

<comment><USER11> Doctors created this platform for emergency medicine knowledge sharing, [https://rebelem.com/about-us/](https://rebelem.com/about-us/)

</comment></comment><comment><USER12> It can't be done, because that's not how viral memes work.

Facts are boring and require nuance. Things go viral because they're outrageous, surprising, or (my favorite) wrong enough that people make responses, which in turn are wrong enough...et voila: Viral.

<comment> y-c-o-m-b Then maybe we start them off with "now listen here you fucking idiots!"? The response rate seems to go up when there's anger involved.

Unfortunately that's a lot of characters for twitter.

</comment></comment><comment><USER13> [https://archive.md/AUyku](https://archive.md/AUyku)

</comment><comment><USER14> Doctors try to make facts publicly available. The Wall Street Journal puts them behind a paywall.

<comment><USER15> > _Doctors try to make facts publicly available. The Wall Street Journal puts > them behind a paywall._

Doctors try to get paid for their work. The Wall Street Journal (and its contributors) try/tries to get paid for their work.

<comment><USER16> That's good and all, but this site is for people to discuss articles after reading them. You don't need to link to the article if the discussion is about the title.

</comment></comment></comment><comment><USER17> Facts by themselves aren't political or have an agenda.

The decision to present certain facts, the other facts you compare those to, and the manner in which they are presented, however, invokes agendas and politics.

No matter how much people claim otherwise, doctors presenting facts have agendas. This includes Dr Fauci.

<comment><USER18> Is trying to protect as many people as possible an agenda? How about wanting to do one's best in researching medicine? Or are agendas always sinister?

What's your area of expertise? If someone asked you to give a talk about your area of expertise, what are some agendas you would choose from?

Or are you making the point that no human is 100% emotionally detached from their work?

<comment><USER17> If you ask Dr Fauci he'll say let's save as many lives as we can. Taken alone no one can argue with that.

His agenda is to save lives. Obvious.

So he will make as strong a case as he can to support the measures to save lives.

If you pay attention to him and only him it makes sense to lockdown until there is a cure or vaccine.

Now tell me, does that make sense for every single person? From age 10 to 100, rich, poor, healthy, sick, for several months or even a year+?

There are costs to Fauci's agenda which he ignores because that's not his job but also it doesn't make sense for him to talk about the costs.

You think of an agenda as a bad thing but it's not it's just the thing someone wants to get done.</comment></comment></comment>