Ask HN: Relational Databases and Concepts - <AUTHOR> Hi,
I have never really dived into databases a lot, apart from some contact to SQL (wrote some select statements to extract some data, etc.) but I never fundamentally got into theory or on a conceptual level, i.e. an SQL database to me was just a set of tables that were kind of unhandy to work with.
Until recently, when I touched Databases again (using Python SQLAlchemy's query language [not the ORM]). For the first time I was really exposed to the foreign-key concepts etc. and I think I saw quite some parallels to declarative languages such as Prolog, etc.
All of the sudden I am eager to learn some more on the relational database concepts and I wonder where to find good material on that. Unluckily a lot of stuff I found on the web is in-the-trenches tutorials or get-yourself-started-with-php-mysql.
I am especially interested in
- design of good database schemas - refactoring of database schemas - best practices - conceptional treatment of database operations and their relation to logical/declarative programming languages such as prolog.
I would very much appreaciate any input on this. <comment><USER2> First, I'll say this, Relational databases are super powerful and extremely valuable in today's world and while no-sql is really awesome too relational won't go anywhere so it is a very valuable skill set to have.

As for learning relational databases. First, research some books on Amazon and look at the reviews, because there just are so many good books on them. In general, remember that even within relational databases there are different design guidelines for OLTP (transaction systems think ecommerce) and OLAP (reporting, analytics) etc. IMO, for now, stick with OLTP (transactions based) books and systems.

Outside of reading some books, also checkout stack overflow and other sites to get examples of good schema's and bad schema's. And review as many schema's as possible so you get a feel for what works and what doesn't. I look at a ton of schema's in consulting and can tell people problems they are having before they have even told me anything about their issues because it is obvious from their data schema. It doesn't necessarily mean their schema is a bad design, just that all of them have tradeoffs and the best way to learn is to see real schema's and datasets.

Also, search for "relational database schema examples" in google image (without the quotes of course), and look at some of the image samples that come up. This will also give you a better feel for how the ER notation or UML notations work. You'll figure them out they aren't that hard.

It really is a huge subject, so hunt around for some online training and then ask people for recommendations after you see a few to see if anyone can give you specific feedback on them.

</comment><comment><USER3> I strongly recommend the book "Seven Databases in Seven Weeks" if you want to understand a bit of "theory" around databases. The first chapter focuses on a relational database, PostgreSQL, but by learning about the other types (columnar, document-store, graph, etc) you also learn more about relational databases by learning what choices they make and how they could have gone otherwise.

<comment><USER4> I recommend this, too.

</comment></comment><comment><USER5> I am currently enjoying the First Edition of _Database Systems: the Complete Book_. I picked up a very good copy from Amazon for $6.99 [ $3.00 plus $3.99 shipping ].

[http://www.amazon.com/s/ref=nb_sb_noss?url=search- alias%3Dap...](http://www.amazon.com/s/ref=nb_sb_noss?url=search- alias%3Daps&field- keywords=ullman+database+complete&rh=i%3Aaps%2Ck%3Aullman+database+complete)

I've become a fan of Ullman...Bell Labs plus academia is a pretty comprehensive range of experience.

Also Widom's _Introduction to Databases_ is available as a self-paced course from Coursera. It was among the initial batch of Stanford courses that rolled over into Coursera.

[https://www.coursera.org/course/db](https://www.coursera.org/course/db)

Anyway, my take is that the Computer Science of database systems is important enough in the modern world that I should be familiar with it as Computer Science and not so much as a set of copy and paste code from the internet.

</comment><comment><USER6> Any of the books by Chris Date are a good place to start, although some find him a bit strident.

A lot of people rip on SQL, but knowing it well is _extremely_ helpful. With all the NoSQL hype it's easy to overlook the stuff RDBMSs are very, very good at--but they're not good at _everything_.

(With the caveat that PG's JSON stuff brings NoSQL into the SQL world.)

</comment><comment><USER7> There is a good introductory course at Coursera, taught by Professor Jennifer Widom. I liked it, not only because of the contents and the format (which are good, and work for me), but because of how intensely enthusiastic the Dr Widom was. A++, would take a course taught by her again.</comment>


Coding is not the new literacy - <AUTHOR> http://www.chris-granger.com/2015/01/26/coding-is-not-the-new-literacy/ <comment><USER3> In Zen and the Art of Motorcycle Maintenance, the author talks about the importance of being able to carve up ideas in different ways to understand it more thoroughly. I'd say knowing how to code, as in going through the process of understand how to think through a logical sequence of steps, is a highly effective means of handing someone a proverbial scalpel.

In my experience, most people cannot break things down logically nor do they appreciate what it takes to provide clear instructions. There is an emphasis in the world on communication which is a fine start, but being able to convey an idea clearly really only becomes helpful once you understand the idea clearly.

Besides programmers and mathematicians, the only people I've met with the faculties to properly break things down are lawyers*. Law school trains you in the ability to approach an idea from different angles in order to identify attack vectors. As such, lawyers tend to be highly capable of feats of logic but are equipped in such a way that they are almost entirely adversarial and deconstructive.

So while I completely agree with Chris's point and understanding that this is a banner he raises constantly, I'm a little disappointed to see him attack this initiative to get more people into coding. I'm all for better modeling tools and better teaching practices but I think teaching people to code is a wonderful solution in the interim. Framing an argument like this will only stir controversy in an otherwise worthy cause.

edit: I've met plenty of people who aren't programmers, mathematicians, or lawyers that are logically capable. But as a general rule of thumb, those are the only three professions I've interacted with personally that have consistently shown that aptitude. Either way, please don't let this personal anecdote distract from the overall message, I only left that comment in there because I wanted to emphasize how rare the ability is across most disciplines.

<comment><USER4> > I'm a little disappointed to see him attack this initiative to get more > people into coding.

That's because I'd rather people have the freedom to be mathematicians, nurses, lawyers, physicists, writers, and accountants while still being able to leverage computers. Instead of forcing people to become professional programmers to get the computer to model things for you, we should focus on teaching people how to model in general and build more tools like Excel that let people do that.

Hell, I'd stand behind a movement to just teach people Excel. With Excel, we don't have to spend the next several years worrying about what flavor of MVC we have to use. Instead, we can focus on doing actually important things like curing cancer.

> Besides programmers and mathematicians, the only people I've met with the > faculties to properly break things down are lawyers.

My point is we should fix that, instead of focusing on teaching people Python.

<comment><USER5> So much this...

The goal should be for programmers to provide tools with interfaces that one can use without actual knowledge of "the machine".

Imagine driving a car would require you to have intimate knowledge of combustion engines, mechanics and the electronic systems therein vs just pedals + wheel.

<comment><USER6> > Imagine driving a car would require you to have intimate knowledge of > combustion engines, mechanics and the electronic systems

So, for this analogy to be fair, we'd need to have computers which you can't operate unless you know how to use transistors to build logic gates, how to build your CPU out of those, how this CPU executes instructions and so on. Of course, that's "vs just keyboard and mouse".

Of course there's room for improvement, but current computers _are not_ orders of magnitude harder to use than cars. I'd say that they never were, but right now they're not for sure: 3 years old kid won't drive a car, but he can have some meaningful and fun time with a tablet.

Learning programming is secondary issue in my opinion. A "new literacy" is something else: it's ability to stop and think about how the pieces fall together, how they work, how you can make them do what you want. Programming is certainly a way of learning this ability, but it's also full of pointless ritual and irrelevant things and operates on completely wrong - for the normal user - level of abstraction. I don't know what is the most efficient way of teaching this to people, but I strongly believe that we _need_ to teach them this. If we have no better way, then let it even be via programming, it's still better than nothing.

<comment><USER5> Ofc there is some amount of hyperbole in the analogy.

Computers ARE orders of magnitude harder to use than cars. A car has (at the simplified level) a single wheel that goes either left or right and 3 pedals. The hardest concept relating to hardware is what a gear is and why you need to shift it (among a few others).

It is correct though that software CAN be more simple than that in their use. Those pieces of software tend not to solve complex or any problems in our real world though.

When it comes to 'coding as literacy' this has not much to do with using a highly simplified UI. It has to do with the fact that if I want to use most of the features of the machine we call PC, you HAVE to be able to program.

Sticking with the car analogy my kid can have great fun if I show her how to use the horn in the car. It will not allow her to do anything meaningful with the car (getting from A to B). All she can do is use the car as a toy.

I agree with you on the core problem though. Things are abstraced away from everyone in our daily lives in such a way, that people sometimes are unable to be 'precise'. By that i mean the ability to fully describe a problem and formulate an executable solution. I personally don't think programming is the solution to that. Personally I learned that concept in school in philosophy class.

</comment></comment></comment></comment></comment><comment><USER7> This is completely pedantic. If you want to argue that coding is different from modeling, true, but there's a great deal of modeling implied in coding. I don't think anyone would refer to someone who could only write if statements and for loops that didn't model anything as a coder.

And if we're going to be this pedantic: when you're saying "we don't need to teach coding, we need to teach modeling," you're saying the equivalent of "we don't need to teach reading and writing, we need to teach offloading data storage." How exactly do you plan to teach modeling in the void? There are other ways to model, but coding is by far the most expressive and widely applicable. The way you learn to offload data storage is by learning to read and write. The way you learn to model is by learning to code.

<comment><USER8> This is the essay of a man trying to sell a 'visual coding' tool.

<comment><USER9> Yeah, because marketing explains everything.

I, for one agree 100%, and I'm NOT selling a visual coding tool.

<comment><USER8> My comment was a statement of fact. Maybe he was inspired to sell the visual coding tool BECAUSE of his beliefs, not the other way around.

</comment></comment></comment></comment><comment><USER10> What Chris Granger is explaining is pedantry. It's a difference without a distinction.

I used to teach AP Computer Science. On the first day of class, I'd hand out paper and have the class make paper airplanes. I'd then ask them to write out the instructions they used and would play "human parser" as they turned them in to me, building lopsided airplanes by interpreting their instructions too literally. Sure, modeling will teach them the necessary skills as well as any programming language. I would argue that my students were coding. The difference between coding and algorithms is important, but it's mere semantics as far as this discussion is concerned.

Yes, coding isn't literally "the new literacy," but his point destructs the discussion in the way pedantry usually does in political spheres. In politics, being right often gets the wrong result. Coding is an awesome, interactive way to explore algorithms and how technology works.

<comment><USER4> The simplest possible distinction: coding is writing code in a programming language[1][2][3], modeling is breaking down systems without regard for computer or programming language and is not specific to any domain.

When we say "coding" the accepted definition has to do with giving instructions in a programming language to a computer. I'm saying that the fundamental skill for people has nothing to do with Python or computers at all.

[1]: [https://www.google.com/webhp?sourceid=chrome- instant&ion=1&e...](https://www.google.com/webhp?sourceid=chrome- instant&ion=1&espv=2&ie=UTF-8#q=define%3A%20coding) \- "write code for (a computer program)."

[2]: [http://en.wikipedia.org/wiki/Computer_programming](http://en.wikipedia.org/wiki/Computer_programming) \- "commonly referred to as coding"

[3]: [https://www.google.com/webhp?sourceid=chrome- instant&ion=1&e...](https://www.google.com/webhp?sourceid=chrome- instant&ion=1&espv=2&ie=UTF-8#safe=off&q=coding) \- everything on the first page is talking about writing code as instructions to a computer.

<comment><USER11> Well then, by those definitions coding is to programming what typing is to writing a novel. Mostly uninteresting and barely taught at all in my UW CSE courses.

<comment><USER11> Just to be superclear, my problem isn't Chris's thesis, but that somehow learning programming is "learning how to code", which, given any decent computer science education, is definitely not the case (maybe a few weeks in an intro CS class, that's it).

So with that in mind, I don't get how they are going to shortcut 2 or 3 years of intensive specialized training with this realization, given that we already base our education on this anyways?

He also brings up something like Sherry Turkle's* software bricolage argument, which I also totally agree with. HCI was also founded on these premises (starting as a fork of the PL community focusing on VPLs). Obviously there is not much new under the sun, it's all in the execution, and I hope they succeed with that.

* not surprising since...MIT

</comment></comment></comment></comment><comment><USER12> > We build mental models of everything - from how to tie our shoes to the way > macro-economic systems work. With these, we make decisions, predictions, and > understand our experiences. If we want computers to be able to compute for > us, then we have to accurately extract these models from our heads and > record them. Writing Python isn't the fundamental skill we need to teach > people. Modeling systems is.

I think he's missing something. Modeling is only a small part of what people learn when they learn to program. The real lesson of programming is to be able to to create models that stand up against the cold asphalt of reality.

They, first of all, have to be consistent enough to execute and secondly, they have to be tested with data.

The hurdle everyone goes through when they learn to program is the unforgiving nature of the machine - it's not what you think you are saying that counts, it's what you are actually saying. And, that's an important lesson.

<comment><USER13> > The hurdle everyone goes through when they learn to program is the > unforgiving nature of the machine - it's not what you think you are saying > that counts, it's what you are actually saying. And, that's an important > lesson.

Spot on, it's also a lesson everyone would benefit from as it makes you learn to think and communicate clearly.

<comment><USER14> It's a good lesson, but it also goes against the grain of how humans operate. A humane computer system will tolerate ambiguity and imprecision better than any modern day programming environment currently does. The trick is giving the human an environment to explore and learn, which can _evolve_ into one that is robust and precise. The act of creation is a back-and-forth, but we are using tools whose roots lie in a model where if you literally sit down and type out the solution into a terminal, that is the idealized model of creation.

Imagine a way to create models that is context sensitive to the capabilities and knowledge of the user, both in general and specifically in light of the problem being modelled. Modern day programming is one-size-fits all and forces you to overspecify too many details correctly before you get a working program. (some languages and paradigms more than others)

<comment><USER13> > It's a good lesson, but it also goes against the grain of how humans > operate.

Which is why they need to learn to think better.

> A humane computer system will tolerate ambiguity and imprecision better than > any modern day programming environment currently does.

I have no interest in such a thing, it's a fantasy.

</comment></comment></comment></comment><comment><USER15> I've been running a weekend programming club for grades 3-5 using Scratch (scratch.mit.edu) and notice some of Chris' points first-hand. For those unfamiliar, Scratch provides a LEGO-like programming environment--it's roots go back to LOGO.

After much initial enthusiasm, the club is down to a core group of dedicated students. The drop-off started when I switched from directed instruction to self-guided projects. Although Scratch contains a relatively small set of core programming blocks, the amount detail involved in building moderately-complex programs (multi-level games, scrolling, interaction) is a lot to overcome for someone without experience. I think some of it relates to the "fundamental disconnect" discussed: A student might be thinking "I want the background to follow the goblin," but needs to translate that into code blocks not part of his/her everyday language. It takes practice and experience to learn the computer's vocabulary for describing a process.

<comment><USER16> practice, experience AND intelligence

<comment><USER17> I would venture to say that what you focus on in your comment runs explicitly counter to what the GP was trying to emphasize in their post. For the people who teach kids of grades 3-5/ages 8-10, I doubt that they are in the business of dissuading children who are apparently "not intelligent" by whatever metric you imply. Kids at that age deserve every open door that can be given to them, and implicitly shutting them out of a computer science club because they can't immediately grok how to do the described task is doing the entire community a disservice. The lesson to be learned isn't that some kids can't (or won't ever) cut it, it's that the learned elders need to formulate better ways of passing along programming knowledge to the younger generation.

<comment><USER15> Great points. It's very important not to classify at such a young age. Kids in the club are encouraged to try new things, experiment, make mistakes and have fun without worrying about assessments or grades. There are no success rubrics and the computer, in this situation, is just a tool for creative expression-- like LEGO or clay. Scratch works well since it's very approachable and is a fun introduction to computer programming as creative tool.

The drop-off effect is normal, just as some people choose to stop art and music classes after an initial introduction. For some, there is a "fundamental disconnect" when expressing themselves creatively with music or art and they will naturally gravitate away from those areas. However, a child should not be excluded from art class for not being able to draw a perfect portrait.

My hope is that being introduced to programming concepts in this club forms mental models that can be referenced later on when learning other subjects and, perhaps, motivate some students to further explore computer science. Either outcome is a success.

</comment></comment></comment></comment><comment><USER18> Object permanence for children is interesting but not the best example. Far more interesting is the fact that children fundamentally don't understand geography at a young age because they can't see it and have to imagine it, and geography breaks something down into types (city, village, country etc.) and there's a hierarchy. Understanding geography is close to the sorts of abstract thinking required of programming.

Small children have a great deal of problems with "Paris is in France. We are in Paris." They also have almost no concept of distance as related to geography because they have no internal map of the world. So when you drive out of Paris you are still in France, but if you drive over the border into Belgium you are in another country.

So, teach kids geography.

I experienced this while teaching LOGO to small children (yes, this was years ago). Given a LOGO turtle and a set of instructions it's fascinating to watch them work out how to draw a square.

PS You might think showing small children a map or satellite view would help, but it doesn't help (much) because they have no internal way of breaking down the data presented into what they experience.

<comment><USER19> > _geography breaks something down into types (city, village, country etc.) > and there 's a hierarchy. Understanding geography is close to the sorts of > abstract thinking required of programming_

It's one of the tools, but - probably because being heavily promoted by books and articles on Object Oriented Programming - it seems to be abused to the point of making some programmers dumber than they were before.

What one really needs to grok here is that categories are arbitrary and rated only by their utility. With your example - yes, we divide countries into cities and villages, etc. but not only there are tons of exceptions breaking the perfect tree-like structure - the whole hierarchy exists only on the map, not in the territory.

So yes, I'm all for teaching people hiearchies - followed by explaining that they're totally arbitrary, that real world is fuzzy, and that best ways to categorize do not always yield tree-like structures.

(and maybe then people will stop listening to stories like "European Commision believes snails are fish" and then assigning stupidity to the authorities instead of themselves)

<comment><USER18> I never mentioned OOP and never would.

</comment></comment></comment><comment><USER20> To paraphrase William S. Burroughs from his 1978 lectures, "Creative Reading,"

 _In teaching creative writing there is the implicit assumption that the student can write; that is put words to paper._

He instead eschews the traditional method of teaching a student to write well and instead focuses on teaching them how to _read_ well on a hunch that it will help the student to recognize good writing and why they appreciate it.

An idea I've been revisiting (as other luminaries such as Donald Knuth and Peter Siebel have gone before) is why code is hardly ever read _creatively_. Is it something about the procedural epistemology of certain languages? Are inductive or deductive styles easier to comprehend? Why is the artifact of our labor so divorced from its realization (source vs. execution)?

Siebel says we should approach the reading of code as the Natural Philosophers of their time approached a new specimen. Knuth, as far as I know, still advocates literate programming but admitted in _Coders at Work_ that he doesn't read that much code.

And a new idea being popularized is data-oriented programming which suggests that the design of the program should be divorced from its implementation which should model the data flow as closely to the hardware as possible -- implying that readability is a secondary concern; further divorcing source code from intent and purpose.

Literacy when it comes to code... appears to me at this point to be an oxymoron.

It's not a novel idea to teach kids to code. I rode the tail end of a hysteric push to teach kids to code in the 80s. A difficulty for me is that the languages we have today are far more complicated. But we also have some better tools... scratch has worked well when one curious niece and nephew asked what I was doing.

Programming need not be this intense mental task with textual interfaces and machine-oriented semantics. It's a useful skill to have: abstracting ideas to symbols and applying transformations to them. A skill worth picking up, some cynical types postulate, if you want to have a job in the next 10 years.

</comment><comment><USER21> Thank you. Seriously, it'd be so much better (and easier) for people to master Excel than Python. Excel is interactive, undo-able, documented, shareable, graphical, etc. It's a much better tool for modeling. We don't need people to master mechanical engineering to drive a car.

<comment><USER22> Managing a spreadsheet does not equal programming by a long shot, and given large enough complexity, you'll run head first into VBA macros and abominable one-liners with so much different branch points that it only makes sense to its author, who could have written a program that seperated the code from the presentation instead of munging up the two.

Sure, it'd get the job done, but the successor would have to rewrite it, as it can hardly be documented, plus, from personal experience, people who are versed in Excel trying to tackle data problems at companies have come up with rather brow-raising solutions. (What's this MySQL you speak of? Does it work with Excel, too?)

Programming is not just hammering away in [language], it's deconstructing a problem into smaller, less complicated problems, to generify and abstract away common properties to allow for repetition in similar contexts. It stimulates efficiency, speeds up rote administration tasks, and allows the programmer to learn something new each time he tackles a new problem.

More so, the writing of code should enlighten a person to write readable functionality, as code is read, compiled code is executed. Using clear and descriptive terms to state the moving parts in his solution, using verbs in function names, not abbreviating unless absolutely necessary, are all tasks that should allow for a person to better state his problem domain and its intended solution.

<comment><USER21> > Programming is not just hammering away in [language], it's deconstructing a > problem into smaller, less complicated problems, to generify and abstract > away common properties to allow for repetition in similar contexts.

This is exactly what you learn in Excel. How to take some data, transform it slowly (column by column), check your work, save intermediate results, etc.

In minutes you can go from your idea to some crude version of it. Then you refine it.

Look, Excel is like LogoWriter. We're not asking people to design rockets with it. But it's a hell of a lot better than sitting them in front of a terminal and asking them to learn about variables, loops, print statements, etc. Excel is type and go.

</comment></comment></comment><comment><USER23> The problem with calling coding "Literacy" is that it implies it's necessary for everything else in life. It's not. Even 50 years from now, technology will evolve to empower those who can't program. (One can argue that the advance in technology has come from it being easier to use, not harder.)

That said, programming is a form of screening for IQ and rigor than perhaps a Philosophy degree was in the past. People who can program are used to dealing with Right and Wrong answers, difficult problems, and working around rules that might seem wrong. It's a great skillset, but by no means mandatory. (Neither is modeling) This is one reason why CS majors are in demand for a lot of non-CS jobs.

</comment><comment><USER24> I've thought about this just the other day. Most people here would probably agree that teaching kids to code in school would be pretty cool (never mind the usefulness of that for a second). I think one mistake we all make is imagine a world in which everybody can and enjoys writing code as a result of that. That makes no sense at all. A lot of people would probably hate it, and even more obvious, most people would just forget. I've learned latin in school ( _don 't_ do that). Equus means horse, that's what I remember.

\---

BTW: We need higher-level languages on top of maths (that are not general purpose programming languages) so that people can talk about complex processes and what not.

<comment><USER25> > I think one mistake we all make is imagine a world in which everybody can > and enjoys writing code as a result of that. That makes no sense at all. A > lot of people would probably hate it, and even more obvious, most people > would just forget.

I thought the idea of teaching kids to code is to show them that it can be immensely rewarding and fun, thus encouraging those that "click" with it to explore it further on their own.

As a guy who gets bored often, I consider myself to be extremely lucky to have discovered a "passion" for computer-y things early on. I'm pretty sure I'd have been bored out of my mind if I had pursued any other discipline.

Coding/Computing/... is the best game there is: we play "Simon^H^H^H^H^H Coder Says" with machines all day long. We'll never completely win it, but the mini- bosses along the way make it totally worth it. I feel like a lot of my classmates would probably get it as well if they were guided into it, but instead "computing class" was basically an MS Word tutorial. Something like Logo (or Sketch, nowadays) would have been much more effective and fun.

If I had to teach high schoolers to code, I'd absolutely approach and present it as a game ("Imagine if you were the benevolent dictator of the universe..."). Because it is. It'll stick with some, it won't with others, and as always - the delivery method will affect the outcome more than the actual message (ever had a $SUBJECT_YOU_DISLIKED teacher that was so awesome that he actually made you perform well in $SUBJECT that year?)

EDIT: forgot this:

> BTW: We need higher-level languages on top of maths (that are not general > purpose programming languages) so that people can talk about complex > processes and what not.

If it isn't evaluated/compiled, then we'll classify it under the "Maths" nebula anyway. See mathematical logic/boolean algebra, etc.

<comment><USER24> I agree with every single paragraph.

Showing kids that coding is very rewarding and fun is great, as long as we don't waste the other kids time for no real reason (that's a means-end question and we're clearly biased, which is why I think this is so important to consider).

2D games are a great way to learn about trigonometry and these kind of things, no question about it.

It has to be a interpreted/compiled language, of course, otherwise it wouldn't be useful at all. But that doesn't mean it needs to be Python. I wonder what a modern-day Scheme would look like. Or maybe visual (think node-based) programming would be more suitable.

<comment><USER25> > Showing kids that coding is very rewarding and fun is great, as long as we > don't waste the other kids time for no real reason (that's a means-end > question and we're clearly biased, which is why I think this is so important > to consider).

But a major percentage of any educational process will waste time for every student. Not the same parts for each student, but invariably there will be some subjects that offer _you_ nothing, while they will trigger something in other kids, e.g. Art. Coding class would hardly be the first to do this, nor do I see any way around it in general.

</comment></comment></comment></comment><comment><USER26> Reading/writing and comprehension/composition are the same thing. The author is just attributing specific meanings to those terms to draw superficial semantic differences. Reading is just another word for comprehension.

Only a narrow view of reading would be limited to the physical act of moving ones eyes across a page.

Similarly, the word coding is often used to describe a plethora beyond typing if statements and for loops.

The author does have some good points despite this problem, but the entire hypothesis is based on a weak argument of semantics.

</comment><comment><USER27> Chris is correct that being able to model is a prerequisite for effectively doing a lot of things, coding is one of them. Sort of like saying that schools need to teach 'critical thinking.'

BTW, I especially like the section starting with the Alan Kay quote. I have recently started (yet one more time) hacking in Pharo Smalltalk which is one of the better programming environments for exploring code and understanding it. I am sure that Chris was strongly inspired by Smalltalk when he created Light Table.

</comment><comment><USER28> I have a BA and a MA in English (don't get your pitchforks out yet) and I'm learning how to code.

I'm not doing this because I want to get a job as a coder. I do well enough for myself with my existing business.

I'm learning to code because I see all these wonderful apps and products and games and experiences, and I feel left out. I have tons of ideas. I just want to see them come alive.

Whatever business potential these ideas have is just added bonus.

At the same time, even though I have been around computers since I was 10 and know enough of math, logic and basic programming to pick up coding at a competitive level, I do recognize that this isn't something "everyone should do"

You _need_ to learn how to write and read because otherwise you can't write a check or read a contract.

I doubt we'll come to a point where you will need to look at the source code to run Word on your computer.

So no, coding really is not the 'new literacy'.

Coding is hard work, and 30 hours of Python will equip you to build nothing, do nothing of note beyond looking at a Github repository and wondering "gee, what kind of modules are those? And what's that fancy trick with objects?"

If you are going to do this, you'll have to buckle in and do the time. 3 months of intensive, 40 hours/week is the bare minimum dosage to build a decent web app.

Multiply that by 10x to actually become an engineer and not just a programmer

</comment><comment><USER29> There are all sorts of analogies we could use to explore this problem space, but I'd say music is an ideal one. In music, the "material" for consumption is sound and the tools for creation vary wildly, from the intuitive to the complex, but the act of creation and consumption of music is open to us at every level.

One detail that perhaps is overlooked with the popularity of Excel is that it is visual. Not just by using a GUI to control its logic, but that the results of changes are always made apparent. As an Excel beginner you might not know why something is broken, but you can figure out that something you did was wrong (logic errors can creep in, but can be minimised through breaking down concepts to contain fewer points where assumptions are encoded). Knowledge is then shared with other users in order to get Excel to perform as desired.

I'm rambling a little bit here, as I'm thinking out loud, but wouldn't an ideal starting point for a better Excel be Excel with cell types? If you think about it, a type system for Excel cells solves so many of the problems you get from trying to use Excel at scale. I could elaborate if the potential improvements are not obvious.

</comment><comment><USER30> I've been teaching programming to non-CS students at Stanford for the past month...they're all clearly smarter than me. But what they lack, as does virtually every non-programmer I've worked with, is the ability to (initially) understand a for-loop.

It's not that they don't get that there is such a thing as a "loop", or that a task can be broken up into iterations...they just don't know what it means to design something that can iterate across a collection and, for each member of that collection, perform a task on it. It's not merely not understanding the syntax, or the overall result...it's not comprehending that you can design and control such a thing.

I've worked with non-programming professionals in which I've taken a repetitive task, such as extracting a bit of text from each page of thousands of pages of documents, and boiled it down to a program that saves them days of work. The effect of such a program is greatly appreciated...but time and time again, these non-programmers are delighted/astounded when I perform the same task in another scenario...what bothers me is all the times when I'm not there to recognize how such a problem can be abstracted, and they dive in head first into a meaningless, repetitive chore.

The abstraction of a task, so that it can be performed in a loop...it's so fundamental that once you've done it, it's hard _not_ to think in those terms. And I wish it were the case that very intelligent people could just _get_ it, in the same way that those who've never played an instrument can at least appreciate Mozart. But I just haven't seen it...we programmers take for granted the ability to think in this profound way, and even though it's fairly basic, as far as ComSci education goes, it really is a gamechanger in all areas of life and work. This is why I think programming deserves consideration as a kind of literacy.

Edit: To focus on something from the OP:

> _We don 't want a generation of people forced to care about Unicode and UI > toolkits. We want a generation of writers, biologists, and accountants that > can leverage computers._

Well, sure, if you boil coding down to "Unicode" and front-end web development, then yes, it's not "literacy". In the same way that if I boiled down traditional literacy to iambic pentameter and the debate between prescriptive and descriptive linguistics, I could make a compelling case for not learning to read and write.

Edit 2: I'm willing to consider programming as _not_ a new literacy, but "just" a branch of math...but math practiced in a pragmatic, visceral way, not in the tepid, abstract way that it is forced upon us in primary school. I do think that programming is math, but with programming, you are actively building and testing something using the principles of math. If there's a way to teach that kind of math without programming, I'm game for it.

<comment><USER31> Perl as a language has "unless" as a keyword and a lot of people, who are not inexperienced with programming, have trouble using it at first. Some even rebel against its use and claim they hate it

So it is interesting that even similar seeming things can still require some time to internalise and comprehend

<comment><USER32> Am I missing something about this `unless` keyword? From what it looks like, it's just syntactic sugar for `if not`, and it makes much more sense…

        (unless (string= a b)
          (fail))
        ;; much more readable than
        (when (string/= a b)
          (fail))

</comment></comment></comment><comment><USER33> While the overall tone was a bit antagonistic for me, I tend to agree with the premise of the title of this article. As someone who runs coding training programs for adults, I don't think you can teach someone coding in a matter of weeks, anymore than you can teach them Spanish in a matter of weeks. However, if you're going to make coding your career, a course that covers the basics and puts you on a good footing, especially if linked with work experience, is the best way to embark on the learning and exploration that the author discusses.

Nevertheless, I don't see why we could put say HTML in the same category as Excel- why shouldn't everyone in the world be able to make a webpage? We teach reading + writing, not to make everyone a journalist or a novelist, but so that we can express our thoughts and communicate our ideas. HTML (and even CSS) are basic enough for any professional to pick-up and are empowering skills to learn; without relying on third-party means to publish your own information on-line.

One last thing - in the UK, Excel is one of the skills listed under I.T. apprenticeships, if you can find a company who offers that.

</comment><comment><USER34> This article is deeply wrong. Literacy and universal schooling got masses of people out of poverty because they were able to get more "advanced" jobs. Most of them didn't have composition skills etc, yet at one point we had rows of typists in every office of better part of 20th century (remember this job requires just very basic skills centred around literacy).

Writing was art for a long part of human history but it's not anymore. Same is going to be true for programming.

Nowadays programmers like to think about themselves as special, but in reality the ability to write simple programs to process input and give output will be just as a normal skill in the future as writing a report is now.

Programmers will only be as special as book writers are nowadays - just a little better in putting words-code together so their work has bigger impact.

<comment><USER35> Programming and literacy are fundamentally different.

Programming is about building machines. It doesn't have to include modelling, although some of the most useful machines do. (How much modelling was needed for the HN code?)

Reading and writing are about sharing experiences, learning from them, making moral judgements about them, and persuading, or being persuading by, fellow humans.

Only people who don't understand either believe they're equivalent.

At best, programming makes sense if you teach it as a practical add-on to math and strict logic. It has its uses there, although I'm sure that by the time one of today's five year olds is enough to entire the job market, knowing school-level Python and jQuery is going to be as useful as knowing BASIC.

Programming teaches you nothing about verbal or written comprehension, allusion, metaphor, political and social history, or relationships of all kinds.

Learning to read and write is the only way to start exploring that world. (Video-making and photography give a taste of it, but they're still distanced from it.)

Programming - which is carpentry and architecture for binary machines - <USER2> somewhere else entirely.

</comment></comment><comment><USER36> Besides the title being pedantic, I feel this article is alienated from the average person I know who is always modeling and dealing with symbols and representations in the world, but less often takes a step back to realize the practice of their modeling and to judge its efficacy.

To me, modeling seems equivalent to consciousness. To me cave paintings of animals seem significant because they illustrate 41k yo humans creating representations of their world (for mental practice, entertainment, ceremony, who knows...), whether they realized their practice is another question.

But today, there are many people who model and recognize it, think of manipulative salespeople/lawyers/cads, great fiction writers, constipated philosophers and art/film/lit critics, scientists, artists/architects/designers...

You don't __need__ any technology built after 1980 (or whatever) to explore the world... Even thought experiments can shake an academic field (Maxwell's demon, Schrodinger's cat, EPR paradox...)

I agree that there may be better tools to convince people to contemplate environments and unpack/model/break down confusing things into collections of simple theories than to send them to a liberal arts college (where this and goofing off is really all there is to do in my experience)...

But programming is still the new literacy IMO. I feel like all the white collar underpaid people I know could work 2-4 hours a day of their 10 hour/day jobs if they wrote the most limited, banal, imperative script that abstracts no concepts and in completely un-generalized (and therefore fails at modelling). And I feel just this fact, that there would be a great liberation of 1st world mankind's time if every non-programmer who uses a computer for their job up and wrote a severely shitty program that automated some aspect of their responsibilities, is enough to say that a coding is the new literacy.

Think of what kind of intellectual shift a machine-literate public that just cut their work week in half would result in...

</comment><comment><USER37> For modelling to work generally (in most/all domains), you need some underlying paradigm all these models can be translated into.

For excel, it's grid based dataflow, (for example, you can call it differently).

I saw you tried dataflow already but stepped back from it.

So what paradigm are you trying to use for EVE?

</comment><comment><USER38> Let's assume reading and writing is to literacy as is suggested at the start of the article. I think that's not too contentious. Given that, there's an odd assertion in this article around Excel.

To quote the article: "We create models by crafting them out of material. Sometimes our material is wood, metal, or plastic. Other times it's data or information from our senses. Either way, we start our models with a medium that we mold."

With literacy, that material is words.

When we start "modelling" with the written word, we first have to be able to understand a vocabulary, sentence structure, and ultimately a paragraph and narrative structure (beginning, middle, end). Normally this happens in the spoken word way before we need to express this through writing. We are also exposed to many, many, examples of paragraph and sentence construction in the written word before we are expected to write anything more than simple sentences. We first start writing by learning to express our vocabulary (spelling), with simple grammar, then putting our ideas together into sentences, paragraphs, and with narratives, and refine this modelling skill over a lifetime.

With programming, that material is a programming language. When teaching, ideas of programming should ideally be discussed - loops, conditions, functions, variables, etc. Then move on to reading code - functions at a time, long before a line of code is written. Something like Scratch seems to be highly valuable for this, much in the same way that children have always had games where they are expected to put the words into a sentence in the correct order, usually before they are expected to be able to write the sentence themselves.

For me the real disconnect, is that the material of modelling, the medium, for programming, is a programming language and code. Excel is NOT the medium of modelling for programming. Excel is a medium for modelling Excel. The constraints in Excel help people understand... Excel. It won't really help you understand data modelling, because the modelling you do is free-form. The constraints of Excel are unique to Excel.

</comment><comment><USER39> You could call this article UML editor vs text editor. What it may point out would be the lack of a modeling tools. UML is old fashioned, java/entreprisy, and new ones like omnigraffle aren't specifically targeted towards modeling domains. Whereas text-editors are evolved, bright and shiny.

On a another level I agree that what's truly fascinating with programming is not mastering the quirks of a specific language but translating an external model to the shape of rules expressed in a language which has it's own internal logic. Not just to have a static interpretation like painting or literature would provide but a dynamic one which evolves with user and data interaction.

This is really unique in human history

</comment><comment><USER40> My advice has always been if you're not willing to commit 3 years full time to coding don't do it. It just takes that long to be useful on a team. Instead, focus on whatever area you want to excel at and leave the engineering to the engineers.

</comment><comment><USER41> In the late 1970s and early 1980s, domain-specific programming languages sprung up. Languages for simulating economic systems, for a company's financials, for modeling biological systems, and many more.

Now, in the twenty-teens, functional programming is gaining new traction as developers learn that, at their core, they start with defining a domain- specific language.

The tools for creating domain-specific models are orders-of-magnitude too abstruse, complex, arcane, and difficult. If Eve can make creating and playing with models even one-order-of-magnitude more accessible, it will help shift much of programming up a layer of abstraction.

</comment><comment><USER42> I seem to remember some project (I think it might be a Microsoft Research project led by someone famous) which has been going on for 10 years or something like that which has the ambitious goal of doing something similar to what I understand Granger to be doing, namely some kind of non-scripting programming. Taking blocks of knowledge or computation or whatever and arranging them in way intuitive to non-programmers. Anyone know the project I'm talking about? FWIW, I think it's been mocked at various times for being vaporware after even 10 years or whatever.

</comment><comment> why-el Good points from Chris, but of course this depends on where one is. Growing up in a country that has shocking levels of illiteracy, I assure you that being literate, even in its most basic form, is already a tremendous step forward.

If you see it in this light, the goal of the movement is clearer. The movement is seeking that crucial, qualitative initial step and the rest is depending on the person, the social env, and so on.

</comment><comment><USER43> The author spends a considerable portion of the piece attacking a straw man. As he mentions in the article, people who stress the importance of reading and writing skills aren't merely advocating for the ability to transcribe speech to paper and pronounce written text; they are also advocating for the communication skills that are taught as part of a good literacy education. Similarly, people who stress the importance of programming are not merely advocating that people gain the ability to transcribe a perfectly detailed spec into executable code, they're also advocating for the modeling skills that give you the skills to write the spec.

His real point is that he believes teaching people modeling and computing skills using Excel would be more useful than teaching them modeling and computing skills using python.

Depending on the audience and the amount of time they have to dedicate to the topic, I might agree with him. Many undergrad business programs, for instance, require a course in Excel/VBA, which seems sensible. However, I think many people who say things like "computing is the new literacy" think that computing and modeling might be important enough skills that most people should dedicate more than the equivalent of 1 semester in college to them. They might instead suggest 3 semesters, or maybe even that high school students take a computing course every year. And if he wants to replace all THAT with Excel, I think I would argue that you've got enough time to add in some python too.

</comment><comment><USER44> Programming should be seen as a medium in which one can solve a problem. I agree that people have been approaching the idea of "teaching code" wrongly. At the end of the day, aren't the professionals trying to model their problems and then apply their knowledge to make sense these immensely difficult problems?

</comment><comment><USER45> Granger makes a strawman of the coding-as-literacy concept by focusing on mechanical coding (as in "coding technician": someone who receives the requirements for a subroutine and implements it without any imagination).

Someone exploring topics in computing in an interactive environment isn't doing that.

<comment><USER4> I actually mention the magic of LISP and Smalltalk environments - they do greatly add in the exploratory creation process. But my "coding as literacy" strawman is born out by the industry: [http://code.org/](http://code.org/) and [http://www.codecademy.com/](http://www.codecademy.com/) are great examples. By saying you can learn to code by following through some online lessons that teach you how to write some Javascript, we're doing people a great disservice.

Moreover, my real argument is that I don't think coding _should_ be literacy. From the fundamental disconnect section:

> We don't want a generation of people forced to care about Unicode and UI > toolkits. We want a generation of writers, biologists, and accountants that > can leverage computers.

I don't think people should _have_ to worry about exactly what the computer is doing if their problem isn't related to it. Specifically teaching general purpose programming as we think of it now is largely teaching people to build apps or command line tools. Instead of a generation that thinks of that as computing, we need a generation of people curing cancer with it.

<comment><USER46> Chris, as someone who respects you and your work, I'm interested to know how you would describe the "movement" aspect of coding-as-literacy. That's where I began to smell a strawman (even if not intentional).

Follow the money: what is coding-as-literacy but a government-supported effort to bring down the price of software developers, disguised as a public service campaign? That in itself is a strawman, yet I suspect that in talking about a "movement" we've taken for granted that leaders _within_ the field (such as Alan Kay), and not just celebrities are advocating for this. Do you know of any?

<comment><USER47> There is a strong 'movement' towards pushing this concept for sure. See code.org pushed by Zuckerberg, and even used and promoted by the President: [http://www.whitehouse.gov/blog/2014/12/10/president-obama- fi...](http://www.whitehouse.gov/blog/2014/12/10/president-obama-first- president-write-line-code)

</comment></comment></comment></comment><comment><USER48> Coding is not the new literacy, it is the new masonry and we will all need a place to live eventually

</comment><comment><USER49> Being able to read and write are the minimum skill you have to have to be called literate. I think that the ability to write and read code is a minimum skill for you to truly benefit from our new information society.

</comment><comment><USER50> What are some good resources ie) books to read on software modeling?

</comment><comment><USER51> I really hope this isn't going to devolve into an argument between top-down and bottom-up methods

<comment><USER25> No, Vim is the best.

</comment></comment><comment><USER16> most people are not smart enough to be even mediocre coders</comment>


Make the World a Better Place – KDE End of Year 2016 Fundraising - <AUTHOR> https://www.kde.org/fundraisers/yearend2016/ <comment><USER2> I gave, because KDE makes the world a better place. <3</comment>


No one-click unsubscribe? It's spam. - <AUTHOR> Your marking emails might not have a one-click unsubscribe link but Gmail certainly has a one click spam button.
Two ways you can keep me as a subscriber:
1. Remind me what the hell it is your company does/sells in the first sentence. Between my signup and now, chances are about 95% that I forgot what I even signed up for.
2. Make it easy to unsubscribe. That means a very visible one-click link. Unsubscribing doesn't mean I'm no longer interested in your product. But making it difficult to unsubscribe says a lot about how I will be treated as your customer.
<extra> Go easy on the HTML / CSS / Images. </credit> <comment><USER2> Linked-In has the spammiest email protocol out of any service I have ever used. _Even after signing-in_ there is no one-click-to-unsubscribe button (they split it into about 12 scattered categories), and they create new categories periodically and opt you in to them. This is downright deceitful. _Pro tip_ : change your email to one that you never use. It literally came down to doing this or deleting my Linked-in account--unfathomable to me. Also: no more f@#$!ng emails at 4 in the morning. This seems like a jackpot CAN-SPAM class action suit.

@easternmonk: _That's the thing_ \-- I did mark them as spam in GMail. I assumed it would block future emails from Linked-in but not the case. ... Somehow they continued to come in.

@sehugg: That too! I complained about their this on Facebook and I had friends ( _yes, plural_ ) who had deleted their account because of the spam and yet were still receiving it. Unbelievable

<comment><USER3> Not only that, but they send you emails even after you have deleted your account.

<comment><USER4> They repeatedly send you emails even if you don't have an account.

</comment></comment></comment><comment><USER5> It's in violation of the CAN-SPAM Act

        You can't charge a fee, require the recipient to give you any personally identifying information beyond an email address, or make the recipient take any step other than sending a reply email or visiting a single page on an Internet website as a condition for honoring an opt-out request.

[http://business.ftc.gov/documents/bus61-can-spam-act- complia...](http://business.ftc.gov/documents/bus61-can-spam-act-compliance- guide-business)

<comment><USER6> So, that means I shouldn't have to login to my account to unsubscribe, correct? I find this annoying as I tend to click on the unsubscribe link from my phone, and not have the login details with me. I've seen several prominent companies that do this, including Mint earlier today.

<comment><USER7> Yes that is not permitted - they need to use encoded links in the email to identify you automatically upon click.

<comment><USER8> The links do not need to be encoded -- they are allowed to ask for your email address -- but they can't ask for much else. And definitely not a username/password.

</comment></comment></comment></comment><comment><USER9> Companies that make me sign in to unsubscribe, stop doing this.

<comment><USER10> If I click an unsubscribe link and the company wants me to sign in, I mark it as spam in gmail.

<comment><USER11> If I didn't explicitly opt in (checking an unchecked checkbox, emailing someone and saying "please subscribe me to your ads", etc.), I mark it as spam.

</comment></comment></comment><comment><USER12> As a developer, I like to follow the rule of thumb that requests that have a persistent effect (such as changing your subscription options) should be HTTP POST rather than HTTP GET. This is in order to avoid mistakes generated by automated tools or systems which pre-fetch/cache/scan/analyze content. As such, my unsubscribe links lead to a page containing a one sentence summary of what you are about to do, and a form submit button.

This does not apply to the link passed in the SMTP header List-Unsubscribe, which needs to take direct action.

<comment><USER13> It's slightly less fast, but I don't mind this. Provided you don't make me remember which email address you're sending to and just autofill it, I'll happily click all the one-button forms you like.

</comment></comment><comment><USER14> Having run a mailing list I can pretty much tell you that despite your best efforts to put the right headers in so Google can do their own unsub links, unsub at top and bottom, etc, that despite all this and being fully CAN-SPAM complaint that people will still write emails to your ISP claiming that your sending SPAM.

I'm not sure why but usually it's academics who send these. Maybe people sign them up for mailing lists b/c they are jerks or something. They all seem to be sure that they've never ever signed up for a mailing list.

ISP sends me email about the compliance issue, I put the email address into a form that blocks it from ever being associated with any of the lists on that server, and it spits back an email detailing when they signed up, confirmed, etc, that they've been blacklisted, and then attaches a jpeg image of the headers / footers with unsub links circled in red so the ISP can close the case.

<comment><USER15> > Maybe people sign them up for mailing lists b/c they are jerks or something

Not possible if you have a confirm step. And you should have a confirm step.

<comment><USER16> You would be surprised. I've run several mailing lists for both technical and non-technical people.

Always, without fail, you will get someone that signs up, confirms and then mashes the spam button two emails later while sending you irate "HOW DID YOU GET MY EMAIL ADDRESS UNSUBSCRIBE ME OHGODWHATHAVEYOUDONE?!" emails.

It's remarkable, really.

<comment><USER15> Well yes, forgetting that you signed up is still possible if there's a confirm step. Being signed up (maliciously or accidentally) by someone else, however, is the situation I was referring to and confirm steps exist specifically to prevent that.

</comment></comment></comment></comment><comment><USER17> Tangentially related: you can create a filter to search for emails with the word "unsubscribe" in them. Generally speaking I don't want to read anything with "unsubscribe" in it, and when I do, I have a nice folder for it.

</comment><comment><USER18> My pet peeve, companies that don't unsubscribe immediately. Apple for example says they'll unsubscribe you in 10 days. Given all the other things a company's systems can do immediately this one strikes me as spammy

<comment><USER8> Many companies say 10 days as a legal CYA (10 days is the limit imposed by CAN-SPAM Act). In practice, despite what they say, it's usually instant.

</comment></comment><comment><USER19> FYI: most SPAM feedback systems reduce your account weight ('trust score') if you tag your non-SPAM emails as SPAM.

Although I agree with one-click-unsubscribe sentiment, clicking SPAM on an e-mail you subscribed for is not very productive.

</comment><comment><USER20> I have one-click no-login unsubscribe button at the bottom of all my emails. To even get an email you have to explicitly subscribe to something. (This is not a mailing list but notification system.) Yet I still get about 1 spam report a day.

I am tempted to just deactivate anyone's account that reports as spam. Is there something else I'm missing?

<comment><USER21> I'd be interested in what the current best practice is for sending emails.

For your case, do the emails start with an idiot proof line such as "This is the notification that you signed up for at example.com" ?

<comment><USER20> From is the username they subscribed to. Subject has the website url along with the the exact type of notification it is.

Content is very short and sweet.

</comment></comment></comment><comment><USER22> Even if you make it easy to unsubscribe (one click, no sign-in, prominent link), sending an email to any large number of people will still result in "mark as spam" being used on a surprisingly large percent of messages.

Where I work, we send mail through Amazon SES, so we get digests of all the messages that have been marked as spam (stripped of identifying email headers). We see it used on (marketing) newsletters of course, but also on welcome messages; transactional messages (both the "action required to receive money" and "you owe us money" type, though the latter get marked as spam much more frequently); password reset messages; and pretty much anything else we've sent out more than some middling-to-large number of times.

To help deal with this, we include a token in each message and process the digests so marking a message as spam will unsubscribe you (or disable the notification). It's not ideal from our point of view - because we are presumably getting dinged by the mail provider when someone marks a message as spam - but hopefully it helps in the long run since we don't send more messages that will likely just get marked as spam.

When I mark something as spam, I'm doing it to penalize the sender. Whether they made it hard for me to unsubscribe, bought my email from someone else to spam me (hooray for "+blah" gmail aliases), or whatever else - I see it as a different action than unsubscribing. I'm not sure, however, that this difference is commonly perceived. It seems like there are a lot of people out there that use it much less judiciously.

Occasionally I will mark a message as spam in Gmail and get a dialog asking if I want to unsubscribe instead of mark as spam; though I only recall this happening with messages from Google properties. It would be nice (though possibly ripe for abuse) if there was some way to let Gmail know where the unsubscribe link is in the message, so third parties could take advantage of this feature. That way the user could be a little clearer about whether they are punishing the sender, or just want the message to go away.

<comment><USER16> Unfortunately, I'm pretty sure you are correct. Most people don't realize that mashing the spam button not only moves the message to the Spam label, but also alerts the ISP and ESP which causes negative repercussions for everyone.

I'm fine with people hitting spam because something is legitimately spam. But hitting it because you are too lazy to click the Unsubscribe link is crappy. Or, more likely, because everyone thinks it's the same as the unsubscribe link.

I'll only spam something if A) there is no unsubscribe link or B) I keep getting emails after I unsubscribe.

</comment></comment><comment><USER23> This happened to me with TripIt. A colleague invited me and they started sending me spam without any action from myself, and it was to my corporate account without an easy spam button like yahoo mail or gmail. I couldn't unsubscribe without creating an account first. I ended up emailing their corporate address notifying them they were violating CAN-SPAM and they manually removed me, and a PR contact apologised. I advised them they should give non-users a way to unsubscribe. I'm not sure if they ended up following my advice. My colleagues are loyal users, but just because your users love you doesn't mean your non-users want your email.

<comment><AUTHOR> TripIt is one of the offenders for certain. The network updates are obnoxious.

</comment></comment><comment><USER24> I got stuck with marketing emails for my start-up and I take a bit of an issue with point one.

How is it the sender's fault if you can't remember why you signed up for an email?

As a matter of best practices, I do remind subscribers. However, it is also quite irritating to be marked as spam, when it was the user who signed up for my messages. By all means unsubscribe, but marking me as spam, especially because I use the highly spam averse Mailchimp is a mean thing to do. Its particularly mean if its just because you forgot what you signed up for.

<comment><USER25> Just because your boss asked you to do something that many people HATE, doesn't make it better.

People handing over their email address in exchange for user registration or to gain access to a trial version of your product are not interested in receiving sporadic advertising for the next N years.

People are inundated by unwanted email every day, from companies that claim, like Dracula, "but you said I could come inside." Some people don't mind, but some of your target customers will already have very negative reactions to ANY marketing email, so it is incredibly important that you go out of your way to make it clear that you are trying to communicate something that will benefit the recipient, not just a sales pitch you can justify legally sending them.

<comment><USER26> This. I'm so sick of receiving marketing emails from companies to whom I sent a one-time informational query, not to mention the marketing emails sent to addresses gleaned from public directories like Jigsaw (of which I am _not_ a member).

</comment></comment></comment><comment><USER27> My Gmail won't block linkedin spam no mater how much I click on "report spam".

<comment><USER28> Create a filter for linkedin and send it to your spam folder.

<comment><USER29> Better yet, create a filter for linkedin and have the filter first forward the mail to email@example.com with a header explaining why and then throw it in the trash.

</comment></comment></comment><comment><USER30> I agree.

The other day I had to unsubscribe out of two Yahoo! Japan newsletters that suddenly started to arrive (for two different accounts I've apparently made years before).

To unsubscribe I had to login to both. And for one I didn't even remember the password. Overall it took me half an hour to unsubscribe.

Also if I can't unsubscribe it goes to spam.

<comment><USER25> Japan tangent: I am amazed on a weekly basis by the mountain of spam newsletters flooding my email inbox by some of Japan's leading internet services. Total lack of respect for the customer. Physical mail today is pretty much 99% spam and 1% bills, and it looks like it might take a miracle to stop email ending up the same way.

</comment></comment><comment><USER31> Ironically enough I have more issues with getting spam text messages on my cell phone than spam email messages. It's a shame that either the CAN-SPAM act isn't enforced or doesn't apply to text messages. I'm on the national do not call list as well, and that has had seemingly no affect.

</comment><comment><USER32> One other thing that massively annoys me - one of my email accounts is a gmail account with a fairly generic username, and people are constantly using it to sign up for things - and I'm getting some that have no way to unsubscribe (like BestBuy trying to get me to activate the antivirus subscription I never bought, or asking me to renew - I don't even live in the same country).

So, if you're sending emails, please, _please_ , put a 'I didn't sign up for this account' so I don't have to try and go to the site and reset their passwords and try to get the account deactivated.

Please just have a link to immediately disassociate my email (like Gmail does).

<comment><USER33> This happens to me all the time as well. As a "quick to anger" person this is the WORST thing you can do (un)intentionally!

</comment></comment><comment><USER34> But aren't the mails which contain one-click unsubscribe links also spam because they use it to identify which email accounts are active and sell that information to other marketers?

</comment><comment><USER35> 1) No email address to be shared beyond a domain. (I can see that some sites partner together and if I register for some newsletter on one site, another site (domain) should not add me in their list, even if both the sites are run by the same company. 2) Email address to which emails are subscribed 3) A single click opt-out 4) Instant Opt-out (many sites say will opt out in XX hours and finally I forget that I unsubscribe, and again I try to unsubscribe.

</comment><comment><USER36> Also a good reason to test your emails in different systems - Gmail often snips emails I receive, meaning the Unsubscribe link at the bottom is cut off. I'll bet that leads to increased spam reports.

Aweber had an article last week suggesting you put an Unsub link at the top of your emails as well. I haven't had the guts to do that for my template (EveryDayDreamHoliday) but as a consumer I like the idea.

<comment><USER37> > Gmail often snips emails I receive, meaning the Unsubscribe link at the > bottom is cut off.

It also makes these emails 100% unreadable on a mobile device, because they don't include the link to the full message on phones for some reason, even though they do on their web interface.

</comment></comment><comment><USER38> Ah, if you can unsubscribe with one click, maybe even without logging in. What stops evil Bert over there from unsubscribing you? Sure, there might be some (session) token involved, but that could have been sniffed or brute-forced.

Actually mailing lists do it right, have the subscriber confirm his action by clicking a link in a confirmation mail or such. I think that's called double confirmation.

<comment> X-Istence Generally when I unsubscribe from a newsletter they send me a message saying they are sorry to see me go, with a 1 click link to subscribe again ...

</comment></comment><comment><USER39> The whole point is, if you make it harder to unsubscribe, people will mark you as spam, think you're even more annoying than other not-wanted mailings and even more unlikely to do business with. Compare it with a store attendee who pulls you in and doesn't let you out anymore.. You will NEVER shop there anymore even if they have stuff you like.

</comment><comment><USER40> Disqus has started spamming me. I signed up to it using my Google account. When it spams, it says that I can turn off notifications ... But, guess what: you can't sign in with your Google account credentials. So, I can't change the notification, and there's no way to unsubscribe when getting email.

</comment><comment><USER41> Anyone who doesn't offer a one-click-unsubscribe gets in my blocklist. This means that to every newsletter you send, you get an automatic response that I didn't care enough. I don't even see you sent the message at all.

It's too bad that they're usually sent from no-reply, yes, but it's more satisfactory at least.

</comment><comment><USER42> I found it was actually easier to edit my profile then unsubscribe from SPAM crap I get from Linked in. So I changed my profile to reflect this but I still get spam everyday :(

<http://nz.linkedin.com/pub/matt-gascoigne/17/a25/9b6>

</comment><comment><USER43> Dropbox did this recently with an email titled "Never email big files again! Share with a Dropbox link"

</comment><comment><USER44> Udemy is one of the spammiest services I have ever come across. Despite, hitting unsubscribe and going through the motions over 10 times, emailing them half a dozen times and finally deleting my account - I still get spammed.

Udemy is the bottom of the barrel when it comes to Spam for me.

<comment> X-Istence That's an issue i've been having with NaNoWriMo, I unsubscribed and yet I continue to receive emails. Now I have simply marked them as spam.

</comment></comment><comment><USER45> I wrote a announce list manager over here [https://github.com/kaihendry/sg- hackandtell/blob/master/list...](https://github.com/kaihendry/sg- hackandtell/blob/master/list.cgi) that's inspired by this. Be great to get a code review.

</comment><comment><USER46> Meetup.com and as a result the New York Tech Meetup are egregious offenders of not providing 1-click unsubscribe. They take it another step further and make it extremely difficult to unsubscribe on the website too.

<comment><USER47> Meetup.com also send out "A waitlist is available for [event]" e-mails - perhaps the most unhelpful e-mail possible, and as far as I can tell the only way to turn them off is to turn off everything.

Makes me thankful for gmail's filtering.

</comment></comment><comment><USER48> Tell that to the New England Journal of Medicine, please. I have unsuccessfully tried to unsubscribe from them several times and they do not use this simple pattern.

<comment><USER49> The ACM is also really horrible. Subscription options are located in two or three hard-to-find places on the website. They kept on sending me emails somehow, and I eventually had to file a support ticket to get my account deleted.

</comment></comment><comment><USER50> posted 691 days ago: but i said two clicks: <http://news.ycombinator.com/item?id=2139617>

</comment><comment><USER51> How do you implement one-click when your customers forward your emails around and anybody could click on unsubscribe?

</comment><comment><USER52> e-how's unsubscribe link doesn't work. i've been getting spam from them for a while now, just because I wanted to post some backlinks on their articles :)

</comment><comment><AUTHOR> Err. _marketing_ not marking.

3\. Check for spelling and grammar...

</comment><comment><USER53> Bonus Points: If I haven't logged into your site in over 2 weeks and/or opened an email, consider me unsubscribed and stop sending me emails.

<comment><USER8> Two weeks is ridiculous. You might as well not send a newsletter. Depending on your service, pretty much everyone on your list will, at one point or another, go two weeks without a trackable interaction.

I've personally seen (opt-in) newsletter subscribers go many months without loading images or clicking a link... but send them a notice that their subscription is being turned off as a courtesy and sure enough a sizable percentage click the "keep me subscribed" button.

</comment></comment><comment><USER54> I'd like to add:

3\. I shouldn't have to sign in to unsubscribe.

4\. Don't auto-subscribe me to new notification types. (We're ALL looking at YOU LinkedIn.)

<comment><USER55> Twitter has been doing #4 aggressively as well, which is a bit disappointing, since somehow I assumed they were better about netiquette than LinkedIn is.</comment></comment>


ESPN Strives to Eject Clutter From Its Site - <AUTHOR> http://www.nytimes.com/2008/12/16/business/media/16adco.html?em

<comment><USER2> As one of their semi-competitors, albeit an insignificant one, all I can say is "damn". I like the way looking at their site gives you a migraine.

<comment><USER3> Here's a link to the new beta: <http://beta.espn.go.com>

By far the most annoying part of ESPN is the auto playing videos. I've found myself going to Yahoo Sports/Deadspin/thebiglead much more frequently because of it.

<comment><USER4> Yeah, the new site makes it easier to navigate, and emphasizes the top stories much more (which seems to be the goal of most news sites).

(btw, clear your cookies if you want to get out of the beta -- it's "sticky" in that once you visit the beta site you're in the beta)

</comment></comment></comment><comment><USER5> I think the new design is a vast improvement -- also, it serves a legitimate business purpose by letting them serve more than twice as many ads as before on highly trafficked pages.

I actually wrote a blog post on the top 5 improvements of the new design: [http://www.newmediacampaigns.com/page/top-5-improvements- of-...](http://www.newmediacampaigns.com/page/top-5-improvements-of-espncom- redesign)

</comment><comment><USER6> As one of their competitors, I can say I went into the business in the first place because of ESPN, Yahoo, CBS's, etc. inability to create a usable interface for fans to navigate.</comment>


Mapreduce Bash Script - <AUTHOR> http://blog.last.fm/2009/04/06/mapreduce-bash-script <comment><USER2> I guess that Hadoop should rethink it's "user interface" to the programmer if a bash script can be more handy sometimes. A lot of great code lacks so much taste in the interface that I simply refuse to use it. I want not say it's the case of Hadoop but the "interface with the programmer", and "it should be simple to do simple things" is somewhat not in the culture of many project leaders.

</comment><comment><USER3> One thing I've always wondered about MapReduce...is what it's used for? I mean what kind of data do you put in, and what do you aim to get out?

<comment><USER4> You put lists, and you take lists :p

Imagine a key-value store/database. Each key is a word, the value is a list of keys from webpages, these keys are the webpage contents.

Get every value for the word "hacker", get every value for the word "news", intersect these values (distributing the computation, or DTC), get the webpages for this intersection. Now you have webpages that contain the term "hacker news".

Key -> Value (word, webpage ids)

hacker -> page_1,page_255,page_600,page_5041

news -> page_5,page_600,page_1001,page_5041

(so, intersect == page_600,page_5041)

Key -> Value (webpage ids, contents)

page_600 -> "hacker news new threads comments leaders"

page_5041 -> "where I can find news for hackers"

Now let's sort these webpages. Take the relevancy algorithm, apply to your list of webpages (DTC), so now you have another list. Now take the list of urls that the user has "banned" (think Google results wiki), and remove them from the list (DTC). Now take the content from the webpages, and select a snippet where the words "hacker" and "news" appears, and wrap them around bold tags (you guessed... DTC).

The thing with the so called MapReduce is that this distribution is somewhat made easier. You map your data, and you reduce, ad-infinitum-or-how-much-you- want, each time distributing the computation. I think I read somewhere in the past that a single query on Google can use up to 100 machines.</comment></comment>


Show HN: Calc, a simple command-line calulator in C - <AUTHOR> https://github.com/vivekannan/calc

<comment><USER2> Very cool. But let me warn you: Your method of code organization won't scale to anything whose #include graph doesn't form a tree. You should learn how to put your declarations into include-guarded header files and your implementations into C files.

Also, abs has signature int abs(int x). I think you want to use fabs.

Edit: Also, it is quite peculiar to have the program print out null characters. The output for ./calc '2' is four characters: {'2', '\0', '\0', '\n'}. In places where you're using %c and printing '\0', you could use %s and print "" instead.

<comment><USER3> Regarding code organization ... Any learning sources where some approaches are being explained ? I am sysadmin and sometimes I find it hard to understand how source files I just downloaded connected to each other. Thx

<comment><USER2> Any book on C. The early chapters of an online C tutorial.

<comment><USER4> I just checked the first 5 C tutorials the showed up in Google and non of them talked about code organization in anything but the most superficial sense.

<comment><USER5> Try [http://www.tutorialspoint.com/cprogramming/c_header_files.ht...](http://www.tutorialspoint.com/cprogramming/c_header_files.htm)

</comment></comment></comment></comment></comment><comment><USER6> How is this different from the existing command-line calculator 'bc'?

        echo "3+4" | bc
        7

Other than not needing equations to be piped to it?

Note also that bc allows defining functions (among other features), and is also arbitrary precision (factorial of 200 below):

        $ echo "define f (x) { if (x <= 1) return (1); return (f(x-1) * x); }; f(200)"| bc
        78865786736479050355236321393218506229513597768717326329474253324435\
        94499634033429203042840119846239041772121389196388302576427902426371\
        05061926624952829931113462857270763317237396988943922445621451664240\
        25403329186413122742829485327752424240757390324032125740557956866022\
        60319041703240623517008587961789222227896237038973747200000000000000\
        00000000000000000000000000000000000

<comment><AUTHOR> Obviously, bc is much more capable than calc. However, calc was not created to replace or even compete with bc or any other awesome command-line calculators. calc is my way of learning a bunch of stuffs (shunting yard).

<comment><USER7> First learning tip:

.h files are not the place for definitions.

<comment><AUTHOR> duly noted. will change it ASAP.

</comment></comment></comment></comment><comment><USER8> It's weird that most of the code is in the header files.. also do you check for divide by zero?

Try to rewrite the whole thing as a single recursive function with two arguments (rest of input string, precedence of left side). You could use longjmp/setjmp to abort when there are errors.

<comment><AUTHOR> I checked division by zero initially, but then realised that 1/0 causes double to represent inf. Thought that this could be useful(?) in some situations. For example, atan(1/0) --> 1.57... instead of error.

<comment><USER8> I was thinking to catch errors which could crash the program. Actually you should install a signal handler for SIGFPE to take care of this.

</comment></comment></comment><comment><USER9> So being barely able to write C is now Hacker News-worthy?

</comment><comment><USER10> I assume you posted this looking for feedback, so here is my advices:

\- A 16-line main.c with a single function that does almost nothing is annoying to say the least; this application is simple enough that I think it really shouldn't be more than a single file.

\- You really don't need to use dynamic allocation for this. Try a simpler algorithm like recursive-descent/precedence climbing, and tokenise+evaluate as you go.

\- isSymbol()/getSymbol() should be merged into one function - you are doing duplicate work here since once you know that it is one of those special identifiers, you should be able to return the value immediately instead of doing another set of comparisons.

This is an almost-complete C interpreter in roughly the same number of lines of code as your calculator, but its structure is actually much simpler. It's probably a bit far toward the side of terseness, but good to study in any case:

[https://github.com/rswier/c4/blob/master/c4.c](https://github.com/rswier/c4/blob/master/c4.c)

For understanding precedence climbing/recursive descent, this is a good article:

[https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm](https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm)

One thing I see with a lot of beginners is a tendency to overcomplicate solutions, writing far more code than necessary. It takes practice to avoid this, but giving them some _extremely_ minimal implementations to study can help them to better understand the essence of the problem and its solution; to a beginner, it is often simpler than they seem to be at first glance.

</comment><comment><USER11> I've been using a perl-based calc for a number of years now. It started as a one liner eval-ing expressions on the command line. My favorite feature is that if symlinked as "hex", "oct", or "bin", it prints the output in hexadecimal, octal, or binary. And, because the evaluation is done by perl, hexadecimal, octal, and binary numbers can be entered using "0x", "0", and "0b" prefixes. A minor improvement was the substitution of commas with underscores, which perl allows in numbers for easier readability. Entering "1,000,000" is much nicer on the eyes than carefully counting the number of trailing zeros.

Two weeks ago, after becoming fed up with having to copy and paste results from one line to the next, I wrapped it in a repl and added bc(1)-like support for "." expanding to the last value. Rather embarrassingly, I started to implement bc(1)-style variables, but then realized this was incredibly silly as you can simply use perl variables directly. :-)

[https://github.com/mct/junkdrawer/commits/master/bin/calc](https://github.com/mct/junkdrawer/commits/master/bin/calc)

I fully support writing other calc implementations, especially in languages such as C! It's a great exercise, and can become very complex very quickly. bc(1) supports arbitrary precision (try: echo "scale=500; 4 _a(1)_ 42" | bc -l), which is super awesome. In C, I've only implemented RPN calculators, never infix, which would be fun to try.

<comment><USER8> Actually strtod will convert 0x to hex.. It would be nice if it had an option to ignore commas.

</comment></comment><comment><USER12> Several months ago, I was looking for something like this. Then I started using bc but wasn't enough for me then I thought why not Python? It has tons of math and statistics libraries/functions and easier than shell script with bc.

So I started using Python by simply typing Python and do my stuff. It is fast enough and super productive.

<comment><USER13> FWIW, I use awk, which is POSIX standard

        $ awk 'BEGIN{print sqrt(2)+4;}';
        5.41421

bc is also standard but for some arbitrary reason I don't like it.

</comment></comment><comment><USER14> Suggestion: Move your business logic into .c files. Headers is there for other reasons.

Take a look at, [http://embeddedgurus.com/barr-code/2010/11/what-belongs- in-a...](http://embeddedgurus.com/barr-code/2010/11/what-belongs-in-a-c-h- header-file/)

</comment><comment><USER15> Nice. Mucked about with Boost Spirit's examples once to do something similar in one grammar-driven file: [http://agentzlerich.blogspot.com/2011/06/using- boost-spirit-...](http://agentzlerich.blogspot.com/2011/06/using-boost- spirit-21-to-evaluate.html)

Final production version with better error reporting is under "expr*" files at [https://github.com/RhysU/suzerain/tree/master/suzerain](https://github.com/RhysU/suzerain/tree/master/suzerain)

</comment><comment><USER16> Someone did a nice calculator hack a little while back, based upon an old reddit comment of mine:

[http://tlrobinson.net/blog/2007/12/presenting-gccalc-a- horri...](http://tlrobinson.net/blog/2007/12/presenting-gccalc-a-horribly- awesome-abuse-of-gcc/)

[http://www.reddit.com/r/programming/comments/62v70/first_cla...](http://www.reddit.com/r/programming/comments/62v70/first_class_functions_in_c/c02nqcu)

</comment><comment><USER17> Nice!

Suggestion: you could probably use `asprintf` to malloc the input expression string and use the Stopif variadic macro to return an error if the input takes up more than the available memory. Unless of course your target platform doesn't have the GNU libraries in which case you could write a test macro and insert your own implementation using `vsnprintf`. :)

You might also want to check your input lengths for reasonable size before allocating memory for them.

My first stop learning a new language is usually a project like this or a guess-the-number game. I hope it's been helpful to you.

</comment><comment><USER18> Interesting, this is basically a very simple interpreter with a REPL. You should look into interpreters if this is something you enjoyed creating, there are many efficient and simple algorithms you could use to make this program a lot simpler and even more advanced too. For instance, recursive descent parsing, and the shunting yard algorithm.

</comment><comment><USER19> Your value of pi is incorrect in the code, comments and readme. pi is 3.1415926... (and not 3.14151926...).

<comment><AUTHOR> changed it. thanks.

</comment></comment><comment><USER8> For your amusement: a calculator written in BASIC:

[https://github.com/jhallen/joes- sandbox/blob/master/snippets...](https://github.com/jhallen/joes- sandbox/blob/master/snippets/parse.bas)

</comment><comment><USER20> FYI, a Go version was announced not too long ago also: [https://github.com/alfredxing/calc](https://github.com/alfredxing/calc)

</comment><comment><USER21> I prefer explicit parenthesis for functions. That way you won't bump into much trouble if you want to implement functions with multiple arguments.

</comment><comment><USER22> Please don't put the functions themselves in .h files, only the prototypes

</comment><comment><USER23> Been done, a long time ago.

[http://www.isthe.com/chongo/tech/comp/calc/index.html](http://www.isthe.com/chongo/tech/comp/calc/index.html)</comment>


BASSCSS – Next level css tooltip - <AUTHOR> http://jxnblk.github.io/basscss/

<comment><USER2> This looks nice and seems to be a decent solution to setting a consistent vertical rhythm, but doesn't seem to really use any Sass features, and the old OOCSS-style layout helpers leave a bad taste in my mouth. Seems easier to extend placeholders rather than use those classes all over the place in your markup. Sure, you CAN do something like this:

.oh

but do you really want to?</comment>