Battle-ready Nginx – an optimization guide - <AUTHOR> http://blog.zachorr.com/nginx-setup/ <comment><USER2> What purpose of the article if in the documentation at nginx.org/en/docs/ you can find the same?

And, btw, you are giving bad advices. You are wrong here: "By default, nginx sets our keep-alive timeout to 75s (in this config, we drop it down to 10s), which means, without changing the default, we can handle ~14 connections per second. Our config will allow us to handle ~102 users per second."

No, the keepalive connections doesn't limit nginx anyhow. Nginx closes keepalive connections when it reaches connection limit.

"gzip_comp_level sets the compression level on our data. These levesls can be anywhere from 1-9, 9 being the slowest but most compressed. We'll set it to 6, which is a good middle ground."

No, it's not "middle ground". It kill performance of your server. With 6 you will get 5-10% better compression, but twice slowness.

"use epoll;"

What's the purpose of this? The docs says: "There is normally no need to specify it explicitly, because nginx will by default use the most efficient method."

"multi_accept tells nginx to accept as many connections as possible after getting a notification about a new connection. If worker_connections is set too low, you may end up flooding your worker connections. "

No, you have completely misunderstood this directive. It isn't related to worker_connections at all.

<comment><USER2> And even more:

"send_timeout 2;" Mobile clients from another continent will "thank you" for this setting when they cannot open your site.

"error_log /var/log/nginx/error.log crit;" A way to be unaware when something is wrong with your server. Nginx produces not only "crit" errors, but a bunch of very useful warnings, that need attention.

"limit_conn addr 10;" Chrome and Firefox usually open more than 10 connections. And btw, have you ever heard about NAT?

"Most browsers will open up 2 connections" 15 years ago this was true.

<comment><USER3>
      > Chrome and Firefox usually open more than 10 connections.

According to browserscope.org both browsers open only 6 connections per hostname.

<comment><USER4> For http connections that's true. Websockets have a separate pool though, and a much higher cap (200 in Firefox). Nginx recently added websocket support.

</comment></comment></comment></comment><comment><USER5> For anyone who is interested in nginx tuning, please follow the H5BP nginx repo: [https://github.com/h5bp/server-configs- nginx](https://github.com/h5bp/server-configs-nginx), which is very well documented already and still being maintained.

<comment><USER6> This post was worth it just for me to discover that this exists! Thank you!

<comment><USER7> I have to agree. If only I had known this about this repo back when I when I had a VPS. The comments for each option are explained well. The Nginx help docs are helpful but sometimes its nice to see a more detailed approach and though not every option will be right for "your" circumstances. It is nice to see.

</comment></comment></comment><comment><USER8> Good introduction to nginx. However, the guide states: "Keep in mind that the maximum number of clients is also limited by the number of socket connections available on your sytem (~64k)".

This is incorrect. The system can open ~64k connections per [src ip, dst ip] pair. In the case of a webserver listening on just 1 port, it means you can open 64k connections per remote IP, which is why some people can write about how they handle a million connections on a single server.

<comment><USER9> That's true for incoming connections, but if you're proxying back to something else then the limit does apply to the outgoing ones.

<comment><USER10> Only if you don't use HTTP/1.1 on the proxy side.

        proxy_http_version 1.1;
        proxy_set_header Connection "";

In the proxy definition.

</comment></comment></comment><comment><USER11> Also useful for nginx: adding the pagespeed module [https://github.com/pagespeed/ngx_pagespeed](https://github.com/pagespeed/ngx_pagespeed)

"ngx_pagespeed speeds up your site and reduces page load time by automatically applying web performance best practices to pages and associated assets (CSS, JavaScript, images) without requiring you to modify your existing content or workflow."

<comment><USER12> pagespeed is impressively helpful, great news when nginx support was announced (a tipping point for me), just wish I knew going in that I had to compile for SPDY instead of using apt

</comment></comment><comment><USER13> I'd like to add that using [gzip_static][1] might also be a good idea since nginx doesn't have to gzip your files over and over again and you can gzip the files yourself with the highest compression possible (reducing file size).

[1]: [http://nginx.org/en/docs/http/ngx_http_gzip_static_module.ht...](http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html)

</comment><comment><USER14> "Chances are your OS and nginx can handle more than "ulimit -a" will report, so we'll set this high so nginx will never have an issue with "too many open files""

If the limit is a hard limit it doesn't really matter what nginx decides to do, does it? I had to increase the limit by hand, outside of nginx.

</comment><comment><USER7> I would love to see some before and after in the wild stats using this configuration. Whilst it would be an apples versus oranges comparison, it would at least show that this config works compared to the default. Maybe a Blitz.io rush test?

</comment><comment><USER15> If you set an application to use more file descriptors than ulimit -n returns, then either the application will be smart and fix its configuration by using MAX(configured limit, ulimit -n) or it'll start dropping requests because it's assuming it's allowed to open more file descriptors.

Increasing an application's maximum file descriptors past ulimit -n is bad advice. The proper way is to increase the limit in /etc/security/limits.conf (note that assigning a limit to * applies it to every user but root, so if you really want to assign a limit to every user, you must assign it to both * and root) and then increase the application's max file descriptors. Restarting the application is usually required, although on newer versions of Linux, changing limits for running processes is possible.

</comment><comment><USER16> You can also use "sudo service nginx reload" instead of restarting. Helps if it's in use and you don't want to drop any active users.

</comment><comment><USER17> My favorite comment from this whole blog: "(warning, a neckbeard and an operating systems course might be needed to understand everything)"

Thats actually true with a fair amount of what people fiddle around with. I see a lot of tuning advice based on what I can only assume is guessing. I guess this is as good of a "caveat emptor" as anything.

</comment><comment><USER18> I would love to see optimization guides with actual benchmarking.

It's like saying `for(var i=..` is faster than `.forEach` without given any numbers.

Always test for performance, do not blindy follow guides or copy paste configuration files in your web server.

</comment><comment><USER19> I wish I could find a guide like this for Apache as well. Computing max clients and other options seems like pure guess work and constant failure =/

<comment><USER20> [https://github.com/h5bp/server-configs- apache](https://github.com/h5bp/server-configs-apache)

<comment><USER19> This isn't really 1-to-1 with the article. I meant something like max_clients, max_requests_per_child, etc.

The best I know if is my co-workers' efforts here: > [https://github.com/genesis/wordpress/pull/64](https://github.com/genesis/wordpress/pull/64)

</comment></comment></comment><comment><USER21> Thank you for this write up. Out of sheer curiosity since I love benchmark numbers, how many concurrent users do you think this config can handle?

</comment><comment><USER22> I wish i had read these post before my devnull-as-a-Service was on HN.

</comment><comment><USER23> You explain the "what" but not the "why".

</comment><comment><USER24> breif --> brief</comment>


Ask HN: Any FOSS project looking for a technical writer? - <AUTHOR> <comment><USER2> Yes. Pretty much all of them.

</comment><comment><USER3> MaidSafe is hiring if I remember correctly- promising project...</comment>


The Rise and Fall and Rise of Java [video] - <AUTHOR> https://marakana.com/s/post/1496/the_rise_and_fall_and_rise_of_java <comment><USER2> High level summary / notes :

* The talk mostly deals with Java the language, not so much the JVM

* It's generally a non-technical presentation, looking at the language & adoption trends from the POV of an analyst

* It appears primed to address and/or alleviate concerns about the current and future state of Java's adoption in the workplace and open source community

Rise, Fall, Rise :

* Much of the talk is a bit of a historical overview of the progression and adoption of Java. Several visualizations are shown, typically contrasting Java's adoption and job market against that of other popular languages (C / C++ or Python, Ruby, JavaScript - depending on the time period involved).

* Take home from the above : Java is not in decline (in adoption and job rankings) relative to other major languages.

* A Stack Overflow survey result is presented, showing a weak but statistically significant correlation between Java use and age (slightly older developers being a bit more likely to be familiar with Java)

* Java is still being used in major open source initiatives (Hadoop, Lucene, Cassandra, as well as a number of projects released by Netflix). This is presented as a particularly reassuring sign of Java's role in the development ecosystem. IMO I agree.

Additional points / Java's shortcomings :

* Java kind of sucks at reducing friction of deployment. Illustrated by comparing PostgreSQL's friction of installation to MySQL. The talk refers specifically to things like ease of installation & configuration, but (IMO) the lack of a single, unified, _simple_ package management system is just as lacking in this regard

I'm sure there was more, but I mostly watched the talk in the background. I found it interesting, although it didn't mention anything that I would consider to be earth shattering.

<comment><USER3> I've gotta take beef with the deployment comment, we use Java at my job and the deployment is quite specifically awesome. There is a single package management system, maven repositories, and multiple build options using that management system.

But the reason deployment is awesome is because of the nature of shipping an assembled pile of bytecode. You can build an assembly that statically links in all the code you depend on, and bang: You have one jar (or war) file, can run java -cp myjar.jar MyClassName and all of your dependencies have been packed into the jar for you. It's so easy. No management of which dependencies have been installed where.

<comment><USER2> I think it helps to look at the scope of the analogies being presented. For instance, the friction of installing & configuring Postgres is compared unfavorably to MySQL. Objectively speaking, those are pretty minor differences (i.e. installing Postgres is easy). However, the point that was being made was that even minor increases in "friction" can negatively impact adoption.

No-one is saying Maven / Gradle / Ant are terrible package management systems. However, when compared against tools used in other popular languages (ruby gems, pip, NPM), it's fair to argue that other language's package management systems are more fluid - in that neither of them require prior configuration and work quite well outside of an IDE.

<comment><USER4> Maybe these other systems are more fluid, but their are also a lot weaker in what their platform gives them. What I mean by this is that the Java world never needed the extra rvm, virtualenv, etc.

The complexity of dependency management doesn't come from declaring dependencies, but from managing conflicts over time and being able to create isolated environment.

Even if many call it the "jar nightmare", I don't know other systems that offer better isolation.

<comment><USER2> I think you've misunderstood the point I was making, which makes sense in context of the video in the OP. I'm not arguing NPM > Maven. I'm arguing NPM is conceptually simpler and easier for a newcomer to use than Maven.

Namely, the speaker made reference to "weaker" DB technologies being used due simply to a frictionless barrier to entry. Mongo was cited as one example. The use of MySQL over Postgres was another. This is basically taken verbatim from the presentation in the video.

This isn't about which systems are "better" or "worse", but which are simpler to get up and running with. Mongo _is_ super duper simple to install and configure. So is NPM. Managing complexity is a real and valid concern, but also not what we're talking about here.

<comment><USER4> What I wanted to suggest is that: at the tool level npm, gem, pip are simpler to get started. But I don't think that's the case at the env level where you'll need more tools.

So while I've used some wrong words in my comment, I was still (trying at least) referring to simplicity vs complexity.

PS: I've never been very fond of other complexities introduced by the maven approach, but that's a different (and probably longer) story.

</comment></comment></comment></comment></comment></comment><comment><USER5> I like Java. I am able to be quite productive with it along with Spring and Guava. Hibernate, though somewhat finicky, makes dealing with databases almost trivial. I honestly don't see any reason to learn Scala other that syntactical simplicity. That said, I love Clojure -- it forces me to think differently and I like that.

Some people hate the java ecosystem --Maven, ant, gradle etc. etc. I find Maven to be incredibly useful , though not simple. Cruise Control with Maven and Junits simplify code management greatly.

Then there is Servlet 3.0 specification with standardized async support. My benchmarks on spring async controllers on Tomcat 7.041 show mindboggling improvements for some my particular use cases that involve several Webservice Apis .

I thought I would put it out here. I have witnessed no fall of Java. Only better hype from other language proponents.

<comment><USER6> > I like Java. I am able to be quite productive with it along with Spring and > Guava. Hibernate, though somewhat finicky, makes dealing with databases > almost trivial.

Spring and Hibernate made me abandon Java. I still recall my reaction when I started to learn and program with it: "If this is the way I'm supposed to solve issues and ship software, the tool (Java) is obviously not doing its job."

</comment></comment><comment><USER7> He didn't delve much into the proliferation of JVM-based languages, which is significant, even if Java (the language) doesn't have the same 'excitement'.

What I expected to hear, but didn't in so many words:

The trend of people migrating to higher-level languages will continue. Of course, if performance is important, you'll move to C or C++ at the other pole. Read PG's "Beating the Averages".

Considering the growth of multi-core programming, there will be movement towards the high-level end of the spectrum (Lisp). The languages people will eventually end up at will be something JVM-based (so Clojure, or at least Scala), if Twitter's move from Ruby to JRuby to Scala is any indication of the failings of Python/Ruby to handle multi-threading.

Frameworks like Hadoop, and lightweight servers like Jetty, allow people to program for HPC and web servers in JVM-land while being OS-agnostic. Once the migration to high-level JVM languages takes shape, Java will be the new C -- a "high-level assembly" language.

<comment><USER8> He's saying exactly the opposite - he's saying that Java the language (not JVM - he never actually mentions the JVM at all) is on the rise. Java is very much not turning into a "high-level assembly" language and is not dead or dying.

I'm not sure how a language with garbage collection, lambdas now in Java8 and the kind of DI you get with Guice can possibly be considered anything but a high level language.

<comment><USER9> You really need to learn a functional language.

<comment><USER8> So a functional language is somehow 'higher level'? You need to go look up the definition for 'high level language'.

Also, feel free to check out Nitro, a low level functional programming language.

[http://homepages.inf.ed.ac.uk/stg/workshops/TFP/papers/Clark...](http://homepages.inf.ed.ac.uk/stg/workshops/TFP/papers/ClarkTFP2003.pdf)

</comment></comment></comment></comment><comment><USER10> You have to agree that there is some truth to O'Grady's arguments. There has been a lot of hate about Java in the recent times, but its not just inertia that is keeping Java in the market. There is just no competitor to that language and its ecosystem. The youtube description refers to these new languages "newer, more hyped alternatives". As much as I would love functional constructs, syntactic sugar in Java, such features are not solving the real problems one expects from a programming language in the long run.

<comment><USER11> Exactly. Five years ago Ruby was the savior - now everyone and their mother is out to show how node is the new hotness.

If you've used js on a serious project you know this is just another dead end - which is why the big bucks go to jvm or clr jobs.

<comment><USER12> I've used Node and JavaScript on a lot of serious projects. Its working great. I prefer CoffeeScript though.

I have worked on a large Scala/Java project that was converted to JavaScript/CoffeeScript and the complexity, availability of modules, and especially resource usage is hugely in Node's favor.

</comment></comment></comment><comment><USER13> Slightly off topic, but everytime I use Java I start to get this dull, drained feeling and my brain begins to slow down. And no matter how far and wide I look, applications written in Java frequently end up being slow or need many servers to perform. This is amazing to me. A verbose, mind-numbing, slow language touted as clear, compact, and fast.

I don't know how it happens, but somehow, even though it's compiled into a faster-executed runtime, many Java applications end up slow anyway.

"Powerful" language.

<comment><USER11> I'm not sure if this is complete ignorance or trolling.

<comment><USER14> It may very well be neither of those.

For a long time, software written in Java was often painfully slow. Swing apps were particularly bad. This did leave a very negative impression on all sorts of people, from developers to managers to executives to the end users who had to use these applications written in Java.

Thanks to hardware, JVM and Java class library advances, it isn't as much of a problem as it once was. But there are still many people out there, especially in the corporate and small business world, who are forced to use Java apps on desktops that are a decade old, if not older in some cases. These systems often weren't very powerful to begin with, and due to budgetary constraints they may not be able to upgrade them. It's not a pleasant situation to be in.

So while Java may appear fast enough on a powerful server, or a modern development workstation, this isn't an experience that everyone using Java applications gets to share in. When people suggest that Java is "slow", I don't think it's appropriate to discount what they're saying. It very well could be an accurate description of their situation and experience.

</comment></comment></comment><comment><USER15> Why not just use Scala? I'm not a Java progammer and have no reason to become one, but I've been looking at Scala recently and it looks very interesting. I am a C# progammer and F# is becoming more and more compelling.

<comment><USER16> [http://www.oracle.com/technetwork/articles/java/horstmann-19...](http://www.oracle.com/technetwork/articles/java/horstmann-1958988.html)

Horstmann wrote "Scala for the Impatient" (great book) and presents the issues around the language and tooling pretty fairly

<comment><USER15> The author of Scala also makes a good case. He briefly compares Scala and Clojure, then talks about the benefits of functional programming in regards to multicore processing.

[http://www.youtube.com/watch?v=hiurd7KaSEI](http://www.youtube.com/watch?v=hiurd7KaSEI)

</comment></comment></comment><comment><USER17> I don't know when he asked the Postgres devs but since I've been using Postgres (2007ish I guess?) PG has been part of Debian and could be installed via the package manager in a trivial way and immediately ready to use.

<comment><USER18> Exactly. Installing postgres on any Debian system is a one line "apt-get install".

The only part that might be considered complicated is if you want to open up the server to non-local network traffic as you have to edit both the pg_hba.conf and change the listen address in postgresql.conf.

It's like that so that it is secure by default. Anyone who thinks that's too complicated doesn't understand what that means or why it's important.

</comment></comment><comment><USER19> Can someone summarize the video? I am curious to learn more but I don't have 45 minutes to spend on this... Thanks!

<comment><USER20> If you configure youtube to use the HTML5 player, there's an option to watch videos at 1.5 or 2X speed..

key points I remember:

* Java isn't dead, or dying; it's still among the most popular languages and growing, based on analysis of data from github, stackoverflow, and mailing lists

* It doesn't command the same relative amount of mind / marketshare as it did in its heyday, but that doesn't really matter; the market is bigger, and it's still growing

* there is a significant correlation between programmer age and use of Java

* ease of initial installation is an underappreciated factor determining which technologies get adopted and become popular

<comment><USER21> Is complete transcription available somewhere?

</comment></comment></comment><comment><USER22> It's not rising as much as become a drone assimilated by the Oracle collective -- sorry, I won't use a language who's parent company packages the runtime with crapware toolbars.

Partially joking of course -- however my experience with Oracle has not been pleasant (with the exception of VirtualBox).

</comment><comment><USER23> To the author's point about friction: one of the things that I think has hurt Java is that some of its flagship tooling and frameworks have been overly bloated and complex. It's almost as if the more complex the technology, the more popular it became.

Eclipse must be the world's clunkiest IDE. EJBs were pure evil from the first day. And, the most popular web frameworks have been anything but simple (Struts, then Spring, etc.).

Contrary to what some may say about the language itself, I don't see anything in it that dictates tooling/dev stacks need to be so complex. It seems that it's simply the chosen architecture and/or implementation that's most to blame.

</comment><comment><USER24> After coding in spring, and android (after having coded in other languages before), i pretty much agree that java is a quite good language. But the ecosystem is daunting.

Every single component (think ORM, build management, web stack, web server/container, serialization libs, and even IDEs) have a least 3 different technologies, which have existed for 4 to 5 years at the minimum and are up to version 10.

The Java world needs to officially DROP things. Drop librairies, deprecate frameworks, stop maintaining things. That's completely the opposite of what the enterprise world needs, but i really feel that would be really beneficial to the global perception for that language.

<comment><USER23> I think Java veered wildly off track with EJB. It's legacy lives on (unfortunately), but at, least it's not the de facto standard for enterprise dev that it once was.

So, in some senses, at least the rabid drive toward implementing the full spec has been deprecated, if not the technology itself.

</comment></comment><comment><USER25> IMHO: The greatest strength of Java is back-compatibility; the greatest weakness of Java is back-compatibility. Thus, it will remain viable and frustrating.

It's biggest problem (touched on in the talk) is that innovators are innovating elsewhere (e.g. sinatra). One day, this will cause the long fall of Java.

One would think Java's performance would be less important as CPUs get more powerful, but so far in practice we're seeing smaller devices and GPGPUs. It's possible Java will keep hitting a sweet-spot of usability/performance for generations to come, as C has.

<comment><USER26> re: sinatra, please check JAX-RS :)

<comment><USER25> Thanks. Yes, you can do it in Java (I did my own actually, with annotations), but...

1\. copying is not innovating (sinatra was 2007)

2\. it's hard to get into: [http://www.sinatrarb.com/](http://www.sinatrarb.com/) has code above the fold; after hunting, the best code example I could find for JAX-RS was this [http://www.mkyong.com/webservices/jax-rs/jersey-hello- world-...](http://www.mkyong.com/webservices/jax-rs/jersey-hello-world- example/)

</comment></comment></comment><comment><USER27> I wonder - if Java was born today (instead of the late 90's), what would it look like, and how popular would it be? I feel like Java owes its current following to its entrenched position in a broad array of corporate and government IT departments. Also, in a sea of newer interpreted languages, it's the compiled one (and isn't C/C++). That, by itself, will win it a fair number of adherents.

<comment><USER28> In a world where Python and Ruby have a huge chunk of mindshare, I'm thinking a typed language would probably look more like Go.

</comment></comment><comment><USER29> I think it's telling when two of the larger Java IDE developers have independently created their own languages to fix problems with Java (kotlin and extend).

My own sense of things since Oracle took over is that Java the language is on the way out, but Java the platform is still strong, and I expect lots of people will be gradually moving across to Scala / Clojure / something else.

</comment><comment><USER30> I thought it was a good presentation, the chart on frameworks around time 40:00 shows what I've been thinking, seeing. If I started a site today and I had full say, I wouldn't use Spring due to its complexity (although VMware people do make a fine product - for Enterprise stuff it makes sense); still it would probably be either Grails or Play. The problem I have with Play is that even their tutorial seems to me to try to brainwash you into getting into Scala, the templating system is based on Scala. That's where they lose me. Grails I've used to build a small test site and it was great. There, I made up my mind, I would use Grails.

<comment><USER23> When I last looked at Play, it seemed the tooling wasn't there and not much IDE support. They tout that a simple text editor is plenty, but who wants to go without features like code completion? As I recall, the dynamic code generation made this unworkable in current IDEs.

<comment><USER27> It's funny. To Java devs, code completion is fundamental (me included, to a certain degree). The idea of having to know all of the methods available on an instance and fully type everything out seems draconian. And yet, for the JavaScript and Ruby devs of the world hacking away in TextMate, auto- completion just isn't there (correct me if I'm wrong). But, they still manage to be productive. :)

<comment><USER23> Yeah, that's true. It seems a must when you are accustomed to having it. But code completion is just one example. There's refactoring, debugging, and other support that a text editor can't give you which has real impact on your productivity. Even organizing your various config files and providing a UI for modifying them is a convenience.

I remember some years ago doing a contract for a large company. I insisted that I was cool with just a text editor. But the client's dev lead insisted that I get with the IDE program because they were paying me hourly and wanted max productivity.

In the end, after making the switch, I had to agree.

</comment></comment></comment></comment><comment><USER31> Is there something like "Learn Java in 15 minutes" for programmers knowledgeable in other languages? I'd like to see idioms, keywords, basic data structures described in a condensed form.

<comment><USER32> Closest I could find. [https://docs.google.com/viewer?url=http%3A%2F%2Ffileadmin.cs...](https://docs.google.com/viewer?url=http%3A%2F%2Ffileadmin.cs.lth.se%2Fcs%2FEducation%2FEDA040%2Fcommon%2Fjava21.pdf)

<comment><USER31> Thanks! Everything looks very familiar. Is that's all to know about Java (the language)?

<comment><USER33> Certainly not. To understand what's possible with Java (the language), you should look over the extensive API available for use as well. This is what you get for free with Java.

[http://download.java.net/jdk8/docs/api/](http://download.java.net/jdk8/docs/api/)

<comment><USER31> I added _the language_ because I am not interested in the libraries. I'm interested in the syntax and semantics.

</comment></comment></comment></comment></comment><comment><USER34> Basically it's saying the JVM is awesome.</comment>


Kraft Studios Handmade Notebooks for Creative Minds - <AUTHOR> http://www.indiegogo.com/projects/kraft-studios-handmade-notebooks-for-creative-minds/x/5305086

<comment><USER2> Interesting, except their shipping costs are outrageous!! I mean how much overhead do they have that they charge $75 for shipping costs outside of the uk? Wow!</comment>


$1,000 hikes hit some older Seattle rentals - <AUTHOR> http://www.seattletimes.com/business/free-lunch-is-over-for-tenants-1000-hikes-hit-some-older-seattle-rentals/ <comment><USER2> The comments here are so far not good. The big problem in Seattle, as in many other U.S. coastal cities, is zoning, which prohibits the supply of housing to rise to meet demand. See my post, "Do millennials have a future in Seattle? Do millennials have a future in any superstar cities?" ([https://jakeseliger.com/2015/09/24/do-millennials-have-a- fut...](https://jakeseliger.com/2015/09/24/do-millennials-have-a-future-in- seattle-do-millennials-have-a-future-in-any-superstar-cities/)) or "Zoning's Steep Price" ([http://object.cato.org/sites/cato.org/files/serials/files/re...](http://object.cato.org/sites/cato.org/files/serials/files/regulation/2002/10/v25n3-7.pdf)) for more detail.

<comment><USER3> Yeah, everyone loves to blame zoning, though in practice, developers are only really enthusiastic about building as long as prices are high and rising. When that stops, they walk away. Plus, there's never enough to meet demand: as long as people are moving into the area because there's money to be made there, and money keeps flowing in, there will always be more demand than supply.

And, I would wager that there's a correlation between those who say there should be no limits on building, and those who are unwilling to pay for public infrastructure (schools, roads, transit systems, water and electric supply, etc.) needed to support the increased population.

<comment><USER4> Tokyo has consistently grown faster than any other first world megacity for over 30 years now, feeding off of its status as pretty much the only place in the country that hasn't had stagnated economic growth. And despite this growth (housing units growing at >2% per year every year, compared to 0.3% for Seattle which is one of the fastest growth rates of any city in the US), housing prices have remained flat for 30 years now. Developers don't 'walk away' because prices are low...they are forced to compete to survive and they deal with the low prices.

The problem really is supply, and japanese zoning is objectively better for housing costs. Anybody who thinks that it is impossible for supply to keep up with boom time demand has no idea how much housing that developers are willing to build _if we just fucking let them_.

<comment><USER5> Tokyo also has decent transportation from the suburbs. The area available in the suburbs grows proportionally to the square of the radius. If people can commute to some city from 80 km away as efficiently as people elsewhere travel to another city from 20 km away, that effectively creates sixteen times the available area for the same convenience with regard to work proximity.

</comment></comment></comment></comment><comment><USER6> High-density housing has been going up throughout the area because the population is skyrocketing. It's true that single-family homes are in short supply and sell quickly, but they can't build enough single-family homes to keep pace with the demand; there simply isn't space, _especially_ in the city. Wallingford is a desirable neighborhood and rents are going to increase there. That's just reality. These tenants had been insulated from the last decade of market pressures, but there are plenty of apartments available.

I do sympathize with their situation. Being priced out of your home and having to quickly find a new place and move is incredibly stressful and can be personally devastating if you've grown attached to where you live, your neighbors, etc. And I do think legally limiting the rate of rent increase each year (as a percentage of overall rent) is a reasonable compromise. Unfortunately, with Amazon and other tech companies importing thousands and thousands of young men with six-figure salaries, housing prices in general will only continue to increase.

<comment><USER5> > _Unfortunately, with Amazon and other tech companies importing thousands and > thousands of young men with six-figure salaries, housing prices in general > will only continue to increase._

Indeed.

The only problem is that people with six-figure salaries rely on the services of people who don't have six-figure salaries, and those people also require proximity to their own non-six-figure jobs.

Oh, like teachers for their kids, police officers, supermarket cashiers, you name it.

</comment></comment><comment><USER7> Free lunch! The home hoarding rentier class have been engorging themselves on the biggest free lunch going for a generation. Funded with borrowed into existence free money, and protected from market forces on the downside using money taken from the very people they're pricing out, in the form of state funded intervention and negative real interest rates.

<comment><USER8> "The home hoarding rentier class"?

What about someone who's primary assets are a couple of houses that (s)he rents out? Should (s)he be restricted from getting a market rate income on those houses?

I disagree pretty strongly that the "rentiers" are protected from market forces. If we look at the case of people who really are in the "rentier class", who are heavily leveraged, they are taking a fairly big risk here that the economy and housing prices are going to stay high, and many are risking bankruptcy should we suffer a reversal.

<comment><USER9> I have to side with the parent poster. The state essentially subsidized the "rentiers". I don't see how this is different from former communist countries doling out lucrative enterprises to private individuals. You might say what was done in capitalist countries (i.e. insane regime of low interests/hidden debasement of currency) wasn't corrupt because of free markets. I call BS on this. A poor person does not have access to said markets (downpayments are the hurdle). Take Toronto as an example. Pretty much most people who bought detached houses prior to 2005 are millionaires. The rich people at the time bought a bunch of houses. How is this not a gift from the state? If you happen to be a schmuck who came in later on or have poor parents, well ... sorry ... that's the way it is.

<comment><USER10> No one forces anyone to live anywhere. You don't have to pay the rent. Move somewhere else, buy in an inexpensive area, etc. The mortgage interest tax deduction is a handout but otherwise the government isn't propping up anyone, and there are government programs that help first time home buyers into houses with 0% down (which I think is a big mistake). On the NPR program On Point last week, a guy called in complaining that he couldn't find anything in Nashville for under $400k, and the guest responded that the average home in Nashville was around $200k. People need to realize that you don't get to live in the most desirable places just because you want to. No one has the right to live someplace, you need to pay for it, and if you can't pay then go somewhere else.

<comment><USER11> I disagree. The dirty rich will horde tens and even hundreds of apartments (or acres upon acres of land) in strategic places (with insider knowledge) and then with lobbying of various kinds make these places more and more desirable by bringing developments to these areas only or by concentrating various services in these areas only. So your point that no one forces someone to live in somewhere is wrong.

edit: added point about insider knowledge

<comment><USER10> > The dirty rich

You have no idea what you are talking about and your bias is plain

<comment><USER11> The dirty rich: the people who are avoiding big taxes (in excess of multiples of a year's worth of minimum wage) and/or bending/pressuring the system (through lobbying) to change such that they don't have to pay taxes (with various loopholes set in place).

That's roughly captures the essence of my idea of dirty-rich.

These dirty-rich grab most or all of the strategically important spaces and then make more money off the rents.

I have very good idea of what I am talking and FYI I am not a communist with bias against all rich people. In fact, I am a strong opponent of communism. But I also oppose the dirty-rich in capitalist nations.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> Oh dear, what a headline. What about the 'free lunch' that landlords already enjoy in the form of rent, just by owning property. Or should that be "im- property".

<comment><USER13> I got the impression that the headline was sarcastic, given that it is a direct quote from one of the landlords.

Anyway, there was a better quote in the article where a landlord said he is being vilified by the public for doing the "right thing business-wise". My opinion: he should be. As a former renter in an expensive area, it is really tough to swallow that a rate hike is nothing more than a money-grab. As a former landlord, if the rent covers my mortgage and expenses, it is a _far better_ business decision to keep a steady-paying, no-trouble-causing tenant than it is to price them out of the area and lose that customer loyalty, and to have to spend time and money looking for new tenants. And most importantly, as a human being I just can't do this to people. But then again, I have a heart when it comes to this kind of stuff, and having been burned by a tenant because of my abundant good will, I sold my property and don't rent anymore - I just can't handle being cold and ruthless and "businessy" to people who depend on me for a roof over their head.

<comment><USER14> For a 5 or 10 percent increase, maybe you're right, but an extra $1,000/mo is real money, and probably worth the hassle of finding another tenant.

</comment></comment></comment><comment><USER15> Are the rent increases part of the inflation indexes ? I ask because Fed seems hell bent on stoking up inflation and I don't see why this shouldn't be part of it.

<comment><USER16> The Fed is using the Personal consumption expenditure index done by the Department of Commerce. And yes, rents are in.

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

<comment><USER9> Yes, but home prices are not. If they were, my guess is we'd see a different story (especially regionally). Someone used to do a shadow inflation index .. when energy prices were excluded from the numbers. Forget the details.

<comment><USER17> [http://www.shadowstats.com/alternate_data/inflation- charts](http://www.shadowstats.com/alternate_data/inflation-charts)

</comment></comment></comment></comment><comment><USER18> Housing articles appear on HN quite frequently and the comments are usually quite devisive. The same people that deride owning property as a terribly illiquid investment also complain about instability with regards to rent. Yes a 30 year mortgage may cost you interest expense and yes your down payment is locked up in an illiquid asset buy one of the main things you get is stability in your cost of housing. Your 20 year old self may be fine with moving here or there,telecommuting, etc..buy your 60 year old self on fixed income may be in another boat being forced to move from a community you have been in for 30 years. Buy land...it's the only thing they aren't making more of. Take a RE investment class, learn about valuations, figure out a place where you want to live. As hard as it is to do now...IMAGINE YOUR LIFE AT 60 OR 70. Set yourself up to be in control of your life then and make the immediate gratification sacrifices now.

<comment><USER5> > _Yes a 30 year mortgage may cost you interest expense and yes your down > payment is locked up in an illiquid asset buy one of the main things you get > is stability in your cost of housing._

A $1000 mortgage, even if variable rate, isn't suddenly going to jump to $2000. I suppose it could happen if this is early in the mortgage (most of the payment is interest and the interest rate suddenly doubles). Unlike rent, interest rates don't go monotonically up, though; they go up and down. Unless it's already at zero, interest has room to go down, too. A mortgage gets cheaper when the interest rate goes down. Won't happen with rent, except in some god forsaken town that is shrinking. (The company closes the mine, and everyone leaves or whatever, and the remaining people practically have to be paid to stay.)

That is to say, a mortgage can get cheaper even if you're living in a desirable place where values are appreciating, because the interest rate is linked to national and global finance which isn't related to the real estate dynamics of your particular neck of the woods. Rents will never get cheaper in a place like that.

</comment></comment><comment><USER19> "Their pleas for a smaller, phased-in rent hike were rejected.

"We couldn't believe it. All my friends have just said that it's not right," Haug said. So now, they're getting ready to move out."

Would they have preferred he had raised the rent slowly over the last five years, thereby resulting in more money paid to him overall?

</comment><comment><USER20> I'm not very familiar with the situation, but could these fast rising prices have anything to do with the recent bump in minimum wage in Seattle to $15? It doesn't mention it in the article.

[http://www.forbes.com/sites/timworstall/2016/02/19/seattles-...](http://www.forbes.com/sites/timworstall/2016/02/19/seattles-15-minimum- wage-jobs-down-unemployment-up-this-isnt-working-is-it/)

<comment><USER21> It's mostly tech money and foreign investors.

In addition 15$ hasn't taken full effect yet, it is a steady increase to 15 and will only reach that target in a few years.

<comment><USER2> _It 's mostly tech money and foreign investors._

No: It's mostly about supply not meeting demand. See [http://jakeseliger.com/2015/09/24/do-millennials-have-a- futu...](http://jakeseliger.com/2015/09/24/do-millennials-have-a-future-in- seattle-do-millennials-have-a-future-in-any-superstar-cities/) or [http://www.amazon.com/TheRent-Too-Damn-High-Matters- ebook/dp...](http://www.amazon.com/TheRent-Too-Damn-High-Matters- ebook/dp/B0078XGJXO).

<comment><USER22> Seems like two sides of the same coin. Demand outstripped supply because of the influx of tech workers and foreign investors. If not for that, the city wouldn't need more housing supply.

<comment><USER23> Demand has been outstripping supply in the Puget Sound area for a long time.

</comment></comment></comment></comment></comment><comment><USER24> Since these rent hikes usually occur when a property changes ownership, we should encourage landlords to offer their tenants a first right of refusal to purchase. At least it would prime every tenant's mind that the rental terms might change one day.

I recently told one of my tenants that I'd be selling the property next year and would give her first rights. She now keeps the front yard clean (the city had filed past complaints), she is saving money to prepare, and she has hope. Simply put, she is a better citizen.

People need encouragement to think long term. It is human nature to not consider risks when things haven't been a problem in the past. Nearly everyone now wears a seat belt and a helmet, but a few decades ago even the smartest people didn't bother until they were strongly and repeatedly encouraged to do so.

<comment><USER25> > Simply put, she is a better citizen.

Threats of $1000 rent hikes sound like a good way to keep the citizens in line. Well done, landlord.

<comment><USER24> Well, I have a practice of never raising the rent on a tenant in good standing. By why would anyone give a landlord the benefit of the doubt. A cynical mixed-context response is so much easier than contemplating solutions to a complex problem.

Perhaps many landlords initially want to do the right thing. But after years of hearing "landlord" used as a slur they just say, fuck it, and act indifferently towards their tenant.</comment></comment></comment>


World may not be warming, say scientists - <AUTHOR> http://www.timesonline.co.uk/tol/news/environment/article7026317.ece

<comment><USER2> Regardless of your opinion on climate change, The Times is not a reliable source for such matters: [http://liberalconspiracy.org/2009/12/14/how-the- times-distor...](http://liberalconspiracy.org/2009/12/14/how-the-times- distorted-opinion-on-global-warming-poll/)

The Times, by the way, is owned by News Corp (Rupert Murdoch). Depending on your political affiliation, that might either be a very relevant or a completely irrelevant point :)

<comment><USER3> _Depending on your political affiliation, that might either be a very relevant or a completely irrelevant point_

It shouldn't be relevant to anyone.

Logical fallacy: _ad hominem attack_

"Arguments of this kind focus not on the evidence for a view but on the character of the person advancing it; they seek to discredit positions by discrediting those who hold them. It is always important to attack arguments, rather than arguers, and this is where arguments that commit the ad hominem fallacy fall down." <http://www.logicalfallacies.info/relevance/ad-hominem/>

The article itself does not appear biased to me. In particular, it does caution "His study, which has not been peer reviewed...", and " 'It's not just temperature rises that tell us the world is warming' ", etc.

<comment><USER4> Many logical fallacies are actually good quick-and-dirty heuristics for deciding whether something is worth considering. "The source is biased, therefore the argument is wrong" is clearly incorrect, but "the source is biased, therefore the argument has a high likelihood of being wrong, therefore reading it is not a good use of my time" is not just correct, but also a very useful rule.

<comment><USER3> _"The source is biased, therefore the argument is wrong" is clearly incorrect, but "the source is biased, therefore the argument has a high likelihood of being wrong, therefore reading it is not a good use of my time" is not just correct..._

No, your reformulation is also incorrect. A correct formulation might be "The source is biased; therefore I would be wise to be skeptical and subject any claims to greater scrutiny."

The overarching problem is that _everyone_ with expertise has a bias. It's crazy to claim that those skeptical of AGW may be biased, but those backing the notion -- like the British scientists who found themselves in hot water last year -- are somehow above it all.

Everyone in this game is biased. Why would they have become involved if they didn't have some passion for the subject? Thus, we're left with needing to subject the ideas of _all_ to great scrutiny, _on both sides_.

<comment><USER4> _No, your reformulation is also incorrect. A correct formulation might be "The source is biased; therefore I would be wise to be skeptical and subject any claims to greater scrutiny."_

A nice thought, but naive and impractical in application. Engaging in a proper skeptical analysis for a technical subject requires a thorough knowledge of the subject being discussed and a great deal of time and dedication. In short, it means acquiring personal expertise.

Most people don't have time to become an expert in everything; relying on other people's opinions is the only practical policy, and heuristics for deciding whose opinions are most likely to be trustworthy are valuable--even though said heuristics tend to sound an awful lot like logical fallacies.

 _It's crazy to claim that those skeptical of AGW may be biased, but those backing the notion -- like the British scientists who found themselves in hot water last year -- are somehow above it all._

Did I claim that?

 _Everyone in this game is biased. Why would they have become involved if they didn't have some passion for the subject? Thus, we're left with needing to subject the ideas of all to great scrutiny, on both sides._

Well, I wasn't talking about the one topic specifically. But, generally speaking, everyone in the entire world is biased, crazy, and wrong about most things. So it goes.

Complaining about how every participant in a debate is biased is technically correct but useless, and tends to obfuscate clues about who might actually be worth listening to.

</comment></comment></comment></comment></comment><comment><USER5> I think we need to change the discussion regarding climate change. For every scientist who says the world is warming, you'll can find another who says it isn't.

This just continiously leads to people trying to figure out if this species or that species is in danger, etc, etc.

If instead we focus on the amount of pollution, and reducing that, I think we change the argument. I don't know that scientists or anybody else can argue that pollution is good.

Is there a 'pro-pollution' argument?

<comment><USER6> >"Is there a 'pro-pollution' argument?"

Yes. Cost-benefit analysis. Civilization is built on pollution. Humans have been hurting the environment for their own good since before the days of agriculture. The question wise leaders should ask is "how much pollution is okay given the vast benefit we get from polluting activities?" not "how can we get pollution down to zero?".

<comment><USER7> In some ways, that's even a reasonable argument, but it completely ignores the long-term effects. A large part of the trouble is that we don't ever tend to account for the cost of large-scale environmental damage. For instance, under many climate change forecasts, the coffee growing industry is going to be much, much less profitable ([http://www.usatoday.com/weather/climate/globalwarming/2009-0...](http://www.usatoday.com/weather/climate/globalwarming/2009-02-19-brazil- coffee-climate-change_N.htm)). Beyond just the economic costs, though, we don't tend to evaluate the quality-of-life costs of environmental damage.

Of course, there's also people like me who see environmental conservation as a moral imperative, beyond any economic motives. My only point here is that even from a purely economic standpoint, there are many good reasons to spend immense amounts of money fighting pollution. Even 1% of the Iraq War budget would be hugely beneficial.

<comment><USER6> >"In some ways, that's even a reasonable argument, but it completely ignores the long-term effects."

Not if you do it seriously. The thousands of scholars who study these kind of issues for a living have thought of such simple objections a long time ago.

<comment><USER7> It's not a simple objection at all. Of course there are scholars who do so, but in practice, the costs are largely ignored, just like any externality tends to get ignored by individual agents in an economic system. That leads to an argument that environmental effects must fall under the umbrella of governmental responsibility, since those calculating cost/benefit ratios are rarely those who will pay the brunt of the costs of climate change and other such effects. This is especially evident if one considers the quality-of-life concerns, which are by their very nature cross-cutting, and thus hard to account for at the level of an individual or single corporation.</comment></comment></comment></comment></comment>


BASIC Computer Games - <AUTHOR> http://www.vintage-basic.net/games.html <comment><USER4> Readers in the UK or Commonwealth might be more familiar with the Usborne series of books for 8 bit computers.

The publisher has made them available from their website[0]. Here is a series of modern reviews from a friend of mine[1].

My favorite when I was a kid was the one that taught assembly language to pre- teens. I still think of cartoon robots putting notes into boxes whenever I assign something to a variable.

[0] [https://usborne.com/browse-books/features/computer-and- codin...](https://usborne.com/browse-books/features/computer-and-coding- books/)

[1] [http://www.asciimation.co.nz/bb/category/usborne](http://www.asciimation.co.nz/bb/category/usborne)

<comment><USER5> Thank you for that nostalgia trip!

Computer Battlegames and Computer Spacegames were much loved in my youth. I wish I had seen some of the other books in the programming series from Usborne.

I remember my dad being super frustrated with me when I was very young. He was on such a different level (chip/board designer) that everything was so effortless to him, and he had serious trouble relating to anyone "beneath" him. It only got worse when he left when I was about 9. I always had trouble self-motivating, and it would hurt like hell when he'd show up out of the blue and express disappointment that I wasn't writing assembly yet or building my own circuits.

But the Usborne stuff, and the spectrum/vic20 games I played around that time, are treasured memories. Thank you for reminding me :)

</comment></comment><comment><USER6> Like others have posted, my childhood included a lot of typing in BASIC programs from books and magazines. What I remember most is staying up late one night when I was ten years old to type in the text adventure game from the back of "Basic Fun with Adventure Games" [1] on my TRS-80 MC-10 with 4K RAM. Before I could finish typing it in, I was shocked to get "?OM ERROR" \-- out of memory. My first ever experience with running out of resources. :) I knew I was going to need a better computer...

[1] [https://www.amazon.com/Basic-Adventure-Games-Susan- Lipscomb/...](https://www.amazon.com/Basic-Adventure-Games-Susan- Lipscomb/dp/0380874865)

<comment><USER7> Same book, same game, and same error.

The only difference with my introduction during my childhood was my father had a friend, who was building RAM extension boards (and other things) out of his garage, and he, excited that a kid was into computers, extended our TRS-80 for free. I can't remember the exact number at the moment, but it was something insane like 40Kb of RAM (But it was sometimes... Unstable).

I was the only one of my friends with a computer at the time, and we used to gather round and play BASIC games we either wrote ourselves, or write up the latest magazine game.

</comment></comment><comment><USER8> If you want to type one of these out right now, I recommend JS99er [0]

[0] [http://js99er.net](http://js99er.net)

<comment><USER9> Oh, good on you for posting this. This takes me back to childhood summers spent hacking away at TI Extended BASIC trying to write my own games - <USER2> admittedly humble results. Or the evenings spent reading dot matrix printouts of other games' code trying reverse engineer the text parser. Or memories of playing Scott Adam's text adventures, the flight-sim SPAD, Parsec, Infocom's Witness, etc. Or attending Chicago TI user group meetings with my Dad - <USER3> eventually became the president of such IIRC. Or my Dad dialing up 300 baud modems to a BBS. Those were definitely good times.

</comment></comment><comment><USER10> The interesting podcast "They Create Worlds" recently had an episode on this topic, it's worth a listen: [https://tcwpodcast.podbean.com/e/computer-game- basics/](https://tcwpodcast.podbean.com/e/computer-game-basics/)

Growing up I had a Commodore 64 and for some reason came into possession of another of David Ahl's books ("More Computer Games" I think it was called). It contained Eliza as one of the listings and it was a program that fascinated me so much I ended up creating a ton of clones, in horribly nested BASIC (though, to be fair, is there any other kind?)

<comment><USER11> Horribly nested BASIC is just what you did before you did it better.

<comment><USER12> On the Commodore 64, it was the only option. It had minimal support for a thing it called a "subroutine", but what it really was was a GOTO that pushed the source on to the stack and could be RETURN'd to that source. In particular, no concept of return value, no concept of parameters; everything's global. Modification of global values prior to the "call" is the argument passing, and modification of global values is the "return".

Commodore 64 BASIC, and 8-bit BASIC in general, was fully in the paradigm that Dijkstra was referring to when he wrote Goto Considered Harmful. (Not exclusively, of course.)

<comment><USER13> The 6502 processor itself also has very poor "stack" support, the hardware- supported stack is limited to 256 bytes at a fixed location. It's one of the things that make it hard to compile a modern language like C for the architecture, so even among compiled languages one would prefer something FORTRAN/BASIC-like.

<comment><USER14> To be fair, the 256 byte stack can essentially be used in assembly as 256 registers, which is also one of the features (along with indirect addressing) that make assembly on it awesome.

My relatively poorly researched impression of it is that it's half-way to portable C, with a proto-stack and pointers, essentially.

<comment><USER15> You're thinking of zero page ($0000-$00ff), not the stack $0100-$01FF).

<comment><USER14> Yes I am! Thanks!

</comment></comment></comment></comment></comment></comment></comment><comment><USER16> There was an earlier version of this book -- less slick -- that you could buy from DEC. I had gotten a copy from my uncle.

At my public library we had a teletypewriter, with an attached paper tape punch and reader, and a phone-cradle modem, with which you could connect to the the PDP-8 at the local high school.

Between this book [https://www.amazon.com/Illustrating-Basic-Simple- Programming...](https://www.amazon.com/Illustrating-Basic-Simple-Programming- Language/dp/0521217040) and "BASIC Computer Games" my friend and I taught ourselves BASIC programming.

It was about 42 years ago, but I remember to this day the initial astonishing joy of making the computer do something new that I had thought of.

<comment><USER17> It is a feeling of limitless boundaries.

I recently bought an Osbourne "portable" \-- seeing my children's delight as we booted up that ancient machine (from actual 5.25" floppy discs, no less) reminded me of own own sense of wonder at the same age, 40 years ago. Of course my middle-aged eyes didn't tolerate a 7" amber screen as well as they once did, but we proceeded to create an adventure type game, in MicroSoft Basic. The kids actually squabbled over who would get to play that simple game, very unlike them, such was their enthusiasm. And play they did, for many, many hours!

We had a bug where the player's "hit points/HP" could go negative. I loved watching my children deduce where the problem must lie, and debugging the problem. (comparison of <, rather than a <= )

They had lots of ideas for additions, some of which we implemented (others were very ambitious, bordering on Dwarf Fortress!) And even though what we created was very simple and crude, their pride in ownership was clear.

</comment></comment><comment><USER18> Brings back fond memories. That was the book that got me started programming. I didn't even have a computer at the time but loved reading about the games and trying to understand the code by going through it in my head.

</comment><comment><USER19> The game lunar explains itself:

> the on board computer has crashed (it was made by xerox) so you have to land > your lunar module manually

Back when games could just make jokes about existing companies without getting into trouble.

<comment><USER20> Space is big // space is dark // it's hard to find // a place to park.

Some things stick unnaturally well in the brain.

(Yes, I realise this was a Luna Lander clone on the Amiga desktop, but for me it's roughly equivalent time ago.)

<comment><USER21> Hey, I can still remember most of the copy protection poem from Faery Tale Adventure. Them's some valuable neurons that won't be repurposed any time soon.

</comment></comment></comment><comment><USER22> Here is the 80s Disney book "Disney's Computer Fun" that taught me Basic programming:

[https://jbretro.wordpress.com/2015/02/09/retro-book- disneys-...](https://jbretro.wordpress.com/2015/02/09/retro-book-disneys- computer-fun-now-available-for- download/amp/?fbclid=IwAR3cSq_53emwE5uuXgnmB7MKrtBLc- VmO_Cue8kNtYnjCrL_QT8mRoiME-c)

You did not need even a computer for the first exercises.

Too bad that the kids have to begin with JavaScript today.

<comment><USER23> Do they? I had a childhood with Basic when JS and Python would've been available to me, basically because I didn't know better.

I made silly little programs with a friend, and we had grand plans for a Harry Potter themed MMO. Naturally, we started with a loading screen on a timer, (because that's what comes first, right?!) and got no further.

<comment><USER24> I grew up in the mountains, where everything was at least 20 years behind, and our school was well-stocked with 80s-era BASIC books in the library back in 2003. This was well into the Visual Basic era if we're talking beginners' languages. I still had the experience of typing stuff into Qbasic and I remember that fondly.

</comment></comment></comment><comment><USER25> We had a book or two of Apple II BASIC programs in the school library. They had just enough Apple-specific BASIC in them that only the simpler, text-basd games were usuable at home on my PC with QBASIC.

For some reason nobody ever thought to put those books in the computer lab which was full of various Apple II's.

I wish there would have been more explaination of the code, it was pretty much a couple hundred lines of LET X1=15 IF L2 < 1 GOSUB 12100

</comment><comment><USER26> I remember young me spending hours on a VIC-20 version of animal.bas ("Computer guesses animals and learns new ones from you"). Given enough time and training input the computer could answer any question put to it! It helped open my eyes to the magic of computation and still gives me a bit of a tingle when I think about it.

<comment> cbm-vic-20 Congratulations, that makes you a ML expert! Put that on your resume and rake in that sweet west-coast VC cash! :)

</comment></comment><comment><USER27> My first programming experiences were on a CASIO Graph 65 calculator, with BASIC style language.

My greatest accomplishment was a _Stronghold_ -like simulation/management game, of several hundred lines. Got some success among my pals.

What a time... and what a painful language.

</comment><comment><USER28> Dawww. I had this book when it came out and used to type the programs into my Commodore PET by hand! Boy does this bring back memories.

<comment><USER29> I really think there's something magical about beginners typing in whole projects by hand (instead of the modern copy-paste). It really helped me when I was getting started with programming.

To me, it feels like typing each character manually cements the knowledge in there much deeper than 'oh, I think I understand what I'm copy/pasting.'

Maybe that's a shallow truism by now, but I still see people struggling to learn programming via copy/paste from examples.

<comment><USER28> That's a smart take. Even today when I'm learning something new I try to do as much physical typing as possible from the example because I feel like I learn it better.

<comment><USER30> The other day I had the thought of "all memory is muscle memory" \- it's not _literally_ true, but memorizing in an associated form builds up so many cues that it's worth applying to any study: do warm-ups and repetitions, speak, move, and think in sync.

<comment><USER31> I tend to think of it is holistic memory or whole body memory. The more functions you can involve subsystems in your body the more it hangs together in your brain for longer terms I think.

</comment></comment></comment></comment></comment><comment><USER32> From 2015: [https://news.ycombinator.com/item?id=9026063](https://news.ycombinator.com/item?id=9026063)

</comment><comment><USER33> I've got a related question: I'm looking for a (BASIC) programming book I loved as a kid. I can't quite remember the title, but it was something like "Programming for kids from 8 to 80".

Googling for it doesn't help, all I get are references to the 80s, or the TRS 80, or some such.

Does anyone remember this book, or where I can find it?

</comment><comment><USER34> I have such fond memories of coding in these BASIC games with my dad at our C64 when I was six or so. Honestly the most memorable part was the night I got to stay up late, while he and I spent hours trying to figure out why this one little problem kept appearing. My first late night debugging session.

</comment><comment><USER35> Nice blast from the past.

I taught myself to code by typing these in by hand on my TRS-80. And trying to debug when something wouldn't work.

Back in the day when something didn't work and you had nowhere to turn, you had to bang your head against the code until you figured it out.

</comment><comment><USER36> Also:

[https://archive.org/details/Whattodoafteryouhitreturn/page/n...](https://archive.org/details/Whattodoafteryouhitreturn/page/n15)

With my personal favorite BASIC game: Star Traders

<comment><USER37> The People's Computer Company published _What to do after you hit return_. It was a large format book that collected many of the games published in _PCC Newspaper_ , _People 's Computers_, and _Recreational Computing_. PCC, before the microprocessor, ran storefront computer centers in the Silicon Valley and promoted the personal use of computers worldwide. There is a whole generation of kids who celebrated birthdays by going to PCC to play BASIC games.

Bob Albrecht, the Dragon and fellow PCC founder, has always been passionate about teaching kids BASIC programming and still volunteers in local schools. He has written multiple books on BASIC mostly targeted at newbies.

One thing no one has mentioned are the BASIC functions PEEK() and POKE() which allowed BASIC programs to read and change memory. Many people learned about control registers and machine language experimenting with PEEK and POKE.

PCC also published _The Computer Music Journal_ and _Dr. Dobbs Journal_. _Dr. Dobbs Journal: running light without overbyte_ started when the Altair microcomputer was delivered with almost no memory and no software. PCC curated the development of personal computer software including Tiny Basic. The TRS-80 integer BASIC was a variant of Tiny Basic.

The Dave Ahl books include many games that initially appeared in PCC publications.

</comment></comment><comment> mr-ron Some of these can work pretty well in this browser emulator for people that want to see it demo'd:

[https://www.calormen.com/jsbasic/](https://www.calormen.com/jsbasic/)

</comment><comment><USER38> I learned programming on a Timex Sinclair (2 KiB) with the book Brain games for kids & adults using the Timex/Sinclair 1000, 1500 & 2000 series. There were other editions for other platforms (Apple, Commodore, etc.)

It consisted of 26 games/puzzles, one for each letter of the alphabet. Went looking and found this little treasure trove:

[http://www.gamebase64.com/search.php?a=5&f=3&id=9556&d=42&h=...](http://www.gamebase64.com/search.php?a=5&f=3&id=9556&d=42&h=0)

</comment><comment><USER39> Had great times with this one and the "More Basic Computer Games" book.

My favorites were the Eliza clone, and ICBM, where you are trying to intercept an incoming ICBM with a anti-ballistic missle. My first use of trig functions, which really helped solidify the concepts to me. I also converted the 2-D version to 3-D (with altitude) for even more fun.

I was originally using a TRS-80 Color Computer, with a slightly different dialect of BASIC, so I was usually having to make modifications. Which also helped me learn programming.

Great, great times.

<comment><USER40> Raise your hands everyone who typed in Eliza clones in the mid-80s and thought you would solve general AI using BASIC in the not-too-distant future.

<comment><USER41> Between those, tic-tac-toe learning systems, the various 20-questions things...

Later I played with various "expert system" stuff, then there was David L. Heiserman's "Machine Intelligence" and "Robot Intelligence" books...

I tried to understand early neural network stuff, but I could not get my then teenage head around it; in fact, none of it became clear until I took Andrew Ng's "ML Class" in 2011 as an adult (part of the key was understanding the role of linear algebra and matrix math in the system - among other things - that class was the first that explained it very clearly, and the use of octave was also a revelation).

Since that class, I've continued to play with ML/AI, mainly via a couple of courses thru Udacity (including their "self-driving car engineer nanodegree").

So - one could say I still have hope? Ha!

</comment></comment></comment><comment><USER42> I had an Atari XE when I was 9. I used to write all sorts of games with it, starting with simple which way book type games and then moving on to 2 step animation and movement. I didn't have the optional floppy, so when I shut off the computer, my work was gone. I used to write the code in a notebook and have to type it in again. I used to keep it on and switch the TV back to TV and raise hell if my mom turned off the unit.

Then I moved on to a PC JR with Cartridge Basic and after that QuickBasic on Windows 3.1.

Fun times.

</comment><comment><USER43> Back in the 90s I learned a lot from the Prodigy QBasic community. There were some really cool games that people contributed, they have to be out there on the web somewhere.

<comment><USER41> Heh - you may have ran into some of my old stuff from back then, up thru the late 1990s or so. BASIC still holds a place in my heart (if you haven't played with QB64, you owe it to yourself to look it up).

For that old stuff, "Pete's QB Site" still holds a lot of it:

[http://www.petesqbsite.com/](http://www.petesqbsite.com/)

Also, check out the old ABC Packets - they're still available, and also have a ton of code worth looking into (I was a frequent contributor):

[http://www.phatcode.net/downloads.php?id=204](http://www.phatcode.net/downloads.php?id=204)

</comment></comment><comment><USER44> BASIC was the best. Very simple language that's very accessible. In high school, we programmed Lego robots using BASIC to follow a black line.

</comment><comment><USER45> Are there any books of this kind for modern languages?

<comment><USER46> No, and the only reason why not is because people would want/expect to be able to just download the source code and run it without typing it in.

But there's absolutely zero reason why this couldn't be replicated with pygame, nodejs or even just a modern BASIC interpreter/compiler.

<comment><USER47> Not just that we expect to, we can. Back in the day you could download them as well, but it costs a lot of money: someone had to pay for the computer and phone line and then one computer per phone line was common. It also took a long time to download files at 300 baud, and often you were paying long distance rates to the phone company (which was far more expensive than long distance rates now despite inflation). Most of us were using audio cassettes to store our programs on, dreaming of a floppy disk that held 80k... (we knew hard drives existed, but they were so expensive that we didn't dare dream of them)

While it was possible to buy a multi-user computer, or a connection to the internet, we didn't even know such a thing existed. Not that it mattered, as practically the cost was far our of reach.

<comment><USER48> I'm guessing where you live radio stations / TV shows didn't air the data noise of BASIC code like they sometimes did in the UK?

You could record it straight onto your audio cassette (like you would record any song on the radio) then play that on your BBC Micro.

It was cheap, accessible and effectively the analogue equivolent of downloading.

<comment><USER47> I never heard of that until much latter. There wasn't a dominate computer platform: as a kid I knew people with Apple II, C64, Atari, or TI. They were not compatible in general, so it doesn't really make sense to air such things. Even assuming the recording would work, my memory of cassette systems is they rarely worked. I typically saved everything to 3 different tapes to have a hope of reading back correctly eventually.

<comment><USER48> There wasn't a dominant platform in the UK either. We had multiple machines from Acorn (inc BBC Micro), Sinclair, Dragon and Amstrad plus the Commedores and Atari's you had too.

I don't think Apple really came to Europe until much later.

</comment></comment></comment></comment></comment></comment><comment><USER49> Such nostalgia. That's how I got into programming.

<comment><USER46> Typing in a program from a paper source forces you to think about each line you're entering, it's more than just a 'slow way to distribute a program', it's also a teaching exercise along the same lines as how writing your notes in class are part of the learning exercise that reinforces your mental model of the subject.

<comment><USER47> Most of the lines I typed in where "2050 data 100,98,0,0,45,128,..." up to the maximum line length (256 character?) at which point it was "2060 data...." Nothing to learn there. I suppose I could look up each opcode and figure it out, but even then there were no names to guide me as to what anything means.

<comment><USER41> You were either typing in mostly game code (with a simple BASIC HEX ML loader), or were using a machine with a limited form of BASIC that didn't allow for easy graphics manipulation (the C=64 and VIC-20 were famous in this regard).

While I recall doing the same on my machine (TRS-80 Color Computer) - it was usually to get functionality that was lacking otherwise. I recall having to type a ton of DATA statements for an ML program that would give you simultaneous graphics and text on screen, like it was a native mode. Then there was another program (called "Bells and Whistles") that was essentially a 4-track music editor, similar to 90s era "tracker" programs; you could define simple waveforms as different "instruments", then build your music in a note- by-note "tracker" style - except the tracks ran left-to-right, not top-to- bottom! It would then output the music and show the notes playing (scrolling) - four channel, 6 bit music, with user-defined waveforms and envelopes. Truely amazing at the time!

Especially considering the TRS-80 CoCo did -not- have a sound chip. It was all done by the CPU and a 6-bit DAC (which was also used by the cassette tape interface for storage, as well in a convoluted manner by the joysticks).

<comment><USER47> I was probably typing in a program that was written in assembly language, and then the bytes were output so that I didn't have to type in the assembly code (which would be even more keystrokes with only limited additional ability to understand, not to mention everybody has BASIC, assemblers were rarer).

I was doing this on an Atari 400. There was plenty of power available from BASIC to get at the graphics and sound, but there wasn't the speed. BASIC was an interpreted language and so you had to drop to assembly to get enough speed for a large program to not feel slow.

</comment></comment></comment></comment></comment><comment><USER50> I picked up the book in the title post from my library for 50 cents ~year 2002 or so.

The one I was a fan of before then was 'Computer Spacegames', which you can read here: [https://archive.org/details/Computer_Space_Games/](https://archive.org/details/Computer_Space_Games/)

<comment><USER51> There is a project to port games from that book (among many other Usborne books) to python: [https://yorkshire4.readthedocs.io/en/latest/](https://yorkshire4.readthedocs.io/en/latest/)

</comment></comment><comment><USER52> Wow, I had this exact book and I believe I typed every last program into my Commodore 64. Including the (to me) massive _Super Star Trek_ game, which I did over the course of several evenings. Ended up porting that one to the PC as a way to learn Pascal. What a trip down memory lane.

</comment><comment><USER53> This is how I got into debugging :)

</comment><comment><USER54> No donkey.bas? :)

<comment><USER55> I guess Gorillas and Nibbles didn't come with that book from the article, but with MS-DOS, so to have it with the book would have been a waste of space as they were already present on most systems

<comment><USER56> The book was originally published before there was an MS-DOS or IBM PCs.

<comment><USER41> That book was somewhat "old" when I first encountered it as a kid in the 1980s. Most of the code in it was first created for minicomputers in the 1970s, probably running some form of Dartmouth BASIC.

<comment><USER56> Created maybe but they were published in a sort generic MS BASIC with some tweaking required to get them to run on different machine implementations.

[https://www.atariarchives.org/basicgames/showpage.php?page=i...](https://www.atariarchives.org/basicgames/showpage.php?page=i12)

</comment></comment></comment></comment></comment><comment><USER57> Can I run these using PC-Basic: [https://github.com/robhagemans/pcbasic/](https://github.com/robhagemans/pcbasic/) ?

</comment><comment><USER58> I'm surprised some geek hasn't converted all those programs into Python, Java or JS and put up a website.

I still have my original 1982 TRS-80 Color Computer 2 in the garage. My oldest possession.

</comment><comment> T-A There was a sequel, too:

[https://www.atariarchives.org/morebasicgames/](https://www.atariarchives.org/morebasicgames/)

</comment><comment><USER59> this book brought me so many hours of joy as a child. I typed these programs in and read it over and over again. I remember now parts that I didn't understand (like Nim) and being amazed at some things people could do in BASIC ([https://www.atariarchives.org/basicgames/showpage.php?page=4](https://www.atariarchives.org/basicgames/showpage.php?page=4)).

For fun recently I ported zork to an esp32.

<comment><USER41> > being amazed at some things people could do in BASIC

My first software engineering job out of highschool used a version of BASIC; I was originally hired as an "operator" because I didn't have a degree, and they wouldn't hire programmers without degrees. So they trained me on how to load 9-track tapes on a vacuum-column drive, as well as how to load up greenbar and run reports on the system. It was an IBM RS/6000 running AIX (my first encounter with Unix), and VT-100/Wyse-370 terminals via a serial concentrator - but our main system ran on top of that; it was called UniVERSE, and ran a variant of Pick BASIC:

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

They gave me access to the system, and their sysadmin gave me a copy of a "Learn Pick BASIC" book. The company was a small mom-n-pop shop that created insurance claims management software for small insurance companies administering our state's indigent health care system.

I started writing various pieces of software - an adventure game, playing with the printers (made one of them play music - not a good use of company resources), just having fun while in between actual "jobs" given to me by the real programmers (run this report, or load this tape). Well...someone was monitoring me and my coding.

They started to give me small tasks - fix this problem with this piece of code, or build this kind of report, or can you make the printer do this?

Within six months - after I had graduated a local tech school and got my "degree" \- they hired me (at a pitiful rate that irks me today, but I was a young-n-dumb teenager at the time). I stayed there for a couple of years, learned more Unix, became intimately familiar with terminfo settings, helped to build a text-mode windowing system for their product, got involved with the Amiga scene...

Ultimately, it was my beginning of a career I enjoy and love to this day; but I do have to say I miss the Wyse-370 terminal (it had a Textronix vector graphics mode I played with as well - plus it was just a great terminal overall - they can still be purchased today, but supply vs demand has kept their cost high, so I've never purchased one).

<comment><USER60> I never heard about Pick Basic before. Apparently, Dick Pick (!) was news worthy back in the day...

"If you want the track record of Dick Pick, just hang upside down" [1]

1: [https://secure28.securewebsession.com/jes.com/gfx/people/csn...](https://secure28.securewebsession.com/jes.com/gfx/people/csn_1983_11_28_antigrav_dick_001.jpg)

</comment></comment></comment><comment><USER61> What would be cool is an embedded BASIC interpreter/emulator, so you can play (and perhaps even tweak) them inline.

</comment><comment><USER62> I had this book and typed in several of the games. Horserace was surprisingly fun to play with my friends.

</comment><comment><USER63> I wonder what Mr. Ahl has been up to. Last thing I heard was Small Basic with Microsoft.

<comment><USER64> It's fun to check out [http://www.swapmeetdave.com/Home.htm](http://www.swapmeetdave.com/Home.htm) and [http://www.swapmeetdave.com/Ahl/DHA.htm](http://www.swapmeetdave.com/Ahl/DHA.htm) every once in a while.

</comment></comment><comment><USER65> What, no TYPO2 checksums? :)

</comment><comment><USER66> i had expected that there's a javascript emulator to try the games without having to download one and setup yourself.

</comment><comment><USER67> those were the days!!!

</comment><comment><USER68> all those gotos could cause some serious harm

<comment><USER41> Back then, you didn't have a choice. Most microcomputer BASICs did not have any other kind of "infinite" looping construct beyond a GOTO. FOR-NEXT was about the only other option.

There wasn't a WHILE or a DO-UNTIL construct in those BASICs, with the exception of (IIRC) or the BASIC used in the MSX systems (which didn't see much action outside of Japan) and in BBC BASIC (it was probably the best BASIC out there along with Microsoft's - but again, not as well known outside of the UK).

<comment><USER69> I think he was referencing a famous Dijkstra letter "GOTO Statement Considered Harmful".

<comment><USER70> We had GOSUB for high level structured programming EWD would approve of.

</comment></comment></comment></comment><comment><AUTHOR> Can we fix the title? It should be capitalized as BASIC, the programming language, an acronym for Beginners All purpose Symbolic Instruction Code.

<comment><USER71> Done!</comment></comment>


Using Sitemaps in Web Scraping - <AUTHOR> https://webrobots.io/using-sitemaps-in-web-scraping-robots/ <comment><USER2> Very useful for some big eshops if they list their sitemaps. However not all stores have sitemaps and even robots.txt site...

</comment><comment><USER3> Good article, useful general tips that work for many scraping tools and platforms.</comment>


Interview with Markus Frind, founder and sole-developer of Plentyoffish.com - <AUTHOR> http://www.bizspark.com/Blogs/Microspark-BizSpark-Startup-of-the-Day/Lists/Posts/Post.aspx?ID=8

<comment><USER2> This interview does not reveal much. This is more of a teaser than anything. It would be nice to see more technically-oriented answers beyond just some basic stats and why he uses MS technologies.</comment>


Intel and Vivo join Sony and Amazon withdrawals from MWC due to coronavirus risk - <AUTHOR> https://www.theverge.com/2020/2/10/21131118/mwc-2020-coronavirus-intel-sony-amazon-cancel <comment><AUTHOR> I'm pretty sure the MWC won't happen this year

Packing +100k people from all over the world in a congress with 6% people coming from China would be insane with the coronavirus risk</comment>


Named Parameters in Java - <AUTHOR> http://java.dzone.com/articles/named-parameters-java

<comment><USER2> Wow this would make for some crazy code to try to read thru. I would be über- pissed to trace thru code like this only to find all of these wrapper classes. This is what Javadocs are for, it's much easier and cleaner just to document your code as you write it.

<comment><USER3> This. I'd do my best to make sure the authors contributions stopped. Type safety obviously doesn't protect you the worst possibilities in software.

</comment></comment><comment><USER4> Wouldn't the Builder pattern address this issue? So you can do:

object.setName("Alfred E. Neumann") .setLink("<http://blog.schauderhaft.de>) .setUltimateAnswer(42) .setTempFile("c:\\\temp\\\x.txt") .setZip(23);

<comment><USER5> I think this way is better:

      o.doSomething({
        name : "Alfred E. Neumann",
        link : "http://blog.schauderhaft.de,
        ultimateAnswer: 42,
        tempFile: "c:\\temp\\x.txt",
        zip : 23});

<comment><AUTHOR> another example of Builder pattern <http://goo.gl/NkAhE>

</comment></comment></comment><comment><USER6> Whoever wrote the original code is missing a major point in OOP: you should (almost) never be passing in simple types. Create an object that holds the data (class IDObject, for instance), and pass an instance of this class in for the parameter. Then, the parameters are _de facto_ named in the data object.

This importance of this method is that it allows the you to update the information passed in via the data object (when ID needs change, and they will over the course of a project) without breaking the interface. And that's the _point_ of it all.

<comment><USER7> Never passing in simple types?

I don't know about you, but one of the reasons I like languages such as Python and JavaScript is I don't have to create a wrapper object for every type I'm using. The fact I had to, for instance, create URL and IP Address and such objects in C# drove me crazy.

<comment><USER8> Named tuples are nice in Python.

I wonder how easy it is, though, to modify a namedtuple constructor to do argument validation and to allow for default field values.

<comment><USER7> If you see how namedtuple is implemented, you'd realise it's extremely easy.

namedtuple uses eval(). It really shouldn't, since there are far better ways to do what it does, but it does.

</comment></comment></comment></comment><comment><USER9> Interesting. But it looks like it is solving a problem with another problem. The receiving class would then look like this:

        public void doSomething(Name name, Link link, UltimateAnswer ultimateAnswer, TempFile tempFile, Zip zip) {
            String name = name.name;
            String link = link.link;
            int ultimateAnswer = ultimateAnswer.ultimateAnswer;
            String tempFile = tempFile.tempFile;
            int zip = zip.zip;
        }

If the problem is "I don't like these SAME values being used all over the place" then use DEFAULTS.

        o.doSomething1(); //defaults to "Alfred","c:\\temp",42,"shadurhaft.de",23

That or pass in an object. o.doSomething1(mySomethingObject);

If the values are genuinely different then the only way to solve this problem is to validate the options (paths should be a valid file location and not a website, websites should be a valid website etc) and then (possibly) pass in an object instead of primitives.

I don't see encapsulation doing anything really, aside from increasing the number of "junk" classed by about a hundred fold.

Why throw standard convention out the window?

<comment><USER10> I'm not sure I see the "another problem" you're referring to. Can you describe the problem with the new implementation of doSomething()?

Also, I don't think the original problem was the same values being used all over the place. The problem is how to be clear about which parameters you're providing, and accepting static types and giving the type a simple way of constructing it solves that.

<comment><USER11> The other problem is that

      int zip = zip.zip;

is just silly, even by Java's standards.

</comment></comment></comment><comment><USER12> Since long parameter list is considered a code smell, people should be discouraged from writing this kind of code anyways. Namely, this example from the article is in fact a bad practice:

> o.doSomething1("Alfred E. Neumann", "<http://blog.schauderhaft.de>, 42, > "c:\\\temp\\\x.txt", 23);

As other commenters have pointed out, I think the builder pattern is one of the two solutions I would use. The other solution is to simply create an object that represents the values to be passed in to the method. Consider:

      User user = new User("Alfred E. Neumann");
      user.setLink("http://blog.schauderhaft.de);
      user.setUltimateAnswer(42);
      user.setTempFile("c:\\temp\\x.txt");
      user.setZip(23);
      o.doSomething(user);

Even with named parameters, I would say the latter approach is still superior than having a long parameter list.

<comment><USER13> Named parameters would result in more readable, compact, and efficient code compared to the latter approach.

But yes, long parameter lists (whether represented as argument structs or not) generally indicate a problem.

</comment></comment><comment><USER14> Although the solution produces too many problems, I agree that named parameters are highly desirable for readability and the prevention of bugs. Have there been any proposals for Java 8 to included named parameters?

Edit:

* <http://openjdk.java.net/jeps/118> proposes run-time storing of parameter names -- not what is desired, but in the same ballpark.

* <http://web.archiveorange.com/archive/v/bobySzLnuDWgr47zqwU9> proposes named arguments for making clean code.

<comment><USER15> The problem with named parameters is that suddenly method parameters become part of your exposed API.

The other problem is that the compiler currently discards the parameter names, so older binaries are not going to be compatible.

</comment></comment><comment><USER16> It might be crazy but I like this kind of DSLization of Java a lot

<comment><USER17> I think it would really shine with IDE support. It probably wouldn't even be that hard to do (famous last words). I think I'll take a stab at it.

I like it as well, and have done similar things by creating input/output classes to use as "structs" when the list of parameters gets unweildy or when I want multiple returns.

<comment><USER18> When "the list of parameters gets unweildy" and "I want multiple returns" are to major indicators that you got some anti-patterns going on. I think the refactoring that you need might a new class with a single responsibility.

<comment><USER19> Or they are indicators that you have experience in languages that allow such designs, and would like java to introduce them. My biggest problem with java is that it tried to be a single paradigm langues: object oriented. While it was doing that, people worked on developing other methods. Concepts from these other systems are beggining to creep into java. For example, generics are a functional concept, as are lambdas which will be introduced in the next version.

</comment></comment></comment></comment><comment><USER20> I would not use a separate class per parameter though that is a clever solution. It might hurt performance and it just feels a bit heavy.

For performance, clarity and reusability I would simply create a class that holds the values needed. Add an @Entity tag and now it can be used as a Hibernate persistence class too.

</comment><comment><USER21> Coming back to Java after learning Objective-C made realize how named parameters are awesome

<comment><USER22> Objective-C doesn't have named parameters (that is, Lisp-like "keyword" parameters). It has a hack which allows a method to be so named that it has to be used in a named way. Named parameters can be in any order and may or may not exist in the function call. Obj-C can't do this because its "names" are actually just part of the method signature. It's fake.

<comment><USER23> It may be "fake", but it still has the property that this article was looking for, in that it is obvious to the reader what each of the arguments being passed to the method are for.

</comment></comment></comment><comment><USER24> I use named parameters in csharp, and they are nice, but they're not worth all that extra effort. The code is now much more confusing.

</comment><comment><USER25> or you know, use an IDE!

<comment><USER20> This is a good observation, people who seem to like named parameters strike me as people who might code in plain text editors a lot. Nothing wrong with that but an IDE makes things so much easier and faster.

<comment><USER26> I think there's a kernel of truth to that but it's not entirely right. I use Pycharm for my python coding and still like named parameters because it makes clear at a glance what each parameter is in the function call. Otherwise, I'd need to click through to each function definition or use the "show doc" command to figure it out. It's much better to be able to scan through the code and understand it without intervention from IDE features.

<comment><USER20> I guess I could see that but it might take me a few thousand lines for it to sink in. Makes sense stated the way you did. If you have to add a parameter though then you have to locate all of the locations and update them. With an object you just add the new field and its accessors if you want and then only the new section of code interested in that new field would be changed; but it's new so.</comment></comment></comment></comment>


37signals Signal vs. Noise (Blog) Redesign - <AUTHOR> http://37signals.com/svn

<comment><USER2> This is the best they could come up with? Am I the only one who does not like this "redesign"?

<comment><USER3> I think it looks gorgeous. There's better navigation and better readability. What don't you like?

</comment></comment><comment><USER4> Psyche!</comment>