We Will End Disability by Becoming Cyborgs (2014) - <AUTHOR> http://spectrum.ieee.org/biomedical/bionics/we-will-end-disability-by-becoming-cyborgs <comment><USER2> The wrinkle here is that not all people with disabilities agree that their conditions are actually a bad thing.

Among those who are deaf, for instance, there has been a long-standing debate over whether deafness is actually a medical problem, or just a different kind of human experience. The latter group would argue that a campaign to restore hearing to the deaf would actually be a kind of genocide -- a coordinated campaign to wipe out a distinct culture, with its own languages and traditions, just because it is physically different than the majority.

That may sound wild, but the more you think about it the more troubling questions it raises. Well-meaning people would never consciously try to shame deaf people for being deaf, for instance, but the viewpoint embedded in the idea of ending deafness is that the deaf are broken people who need to be fixed by being made more like the rest of us. Do we actually agree that deaf people are broken, incomplete? If we do, does it follow that deaf people who _refuse_ our cure should be _compelled,_ in some manner, to accept it? How far are we willing to go to eradicate deafness? Is "eradicating deafness" even a morally legitimate thing to aspire to?

I'm not deaf myself, so I won't pretend to have an authoritative perspective on any of these questions. I just raise them to note that the standard tech- centric view of these things (here's a problem, let's create something that solves it!) isn't the lens through which everyone sees the lives they live.

<comment><USER3> > The latter group would argue that a campaign to restore hearing to the deaf > would actually be a kind of genocide.

Only if it's not optional I think, where ethics get really interesting is when deaf parents want a deaf child, that's one that still isn't settled due to cochlear implants which are already a kind of cyborg.

I'm able bodied (apart from a degenerative spinal condition) and I'd _happily_ swap that part out if I could, wouldn't even think about it for more than 5 seconds.

<comment><USER4> What of multiply resistant strains of bacteria and the end of the antibiotics era?

<comment><USER3> Not sure in what context you are asking your question, can you elaborate?

<comment><USER4> Invasive augmentation/implantation could increase the risk of infection. I was thinking that you might want to take that into consideration.

<comment><USER3> Ah right, my spinal condition is called syringomelia, it's a cavity that forms in your spine and progressively damages the nerves, the best case is constant high level neuropathic pain for the rest of my life, the worst is it destroys the nerves and I end up in pain and crippled, mine is thoracic which means I'm a lucky one (cervical it can also destroy the nerves that control your ability to breathe, beat your heart or move your upper body).

At the moment the medication keeps me functional but if it went worst case I'd take a 50/50 chance of dying from a replacement than been in the kind of pain the people I've seen with the worst case.

Also while the medication works it makes me extremely "fuzzy" some days and has trashed my short term memory, neither of which is an enjoyable experience for someone who loves to program/play chess etc.

As an aside though, going through the experience above as well as having loved ones has given me an idea for a project that might benefit a lot of people (and earn some money which is nice), it's something that doesn't exist and it's not something I would have thought of doing if I hadn't got ill/grown up with a disabled mother.

</comment></comment></comment></comment></comment></comment><comment><USER4> Sort of an inversion of Harrison Bergeron, except instead of the natural superman having inert blocks of metal attached to him to bring his abilities down, everyone else will have high tech stuff attached to enhance their abilities.

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

</comment><comment><USER5> I love the idea of having augmentations and neural implants but the potential social ramifications, which the article gets slightly into, scare the living daylights out of me.

From the Deus Ex alternative universe, year 2022:

Antoine Thisdale, an un-augmented oil rig worker sues for the right to have both of his fully functional natural arms amputated and replaced with cybernetic arms in an effort to compete with mechanically augmented workers in his profession. The Supreme Court rules in his favor, clearing the way for elective augmentation. In response to the ruling, William Taggart creates Humanity Front, a political organization that opposes augmentation.

<comment><USER6> I would not worry about that specific case to hard. If you can make an arm, sure you can make an exoskeleton ?

</comment></comment><comment><USER7> Sure, end disability and exacerbate inequality. Additionally, I don't see us all being the same type of cyborg. If anything, becoming cyborgs we'll realize that there is more than one way to become "physically functional" and so stop labeling everyone that is not typically physically functional as disabled.

</comment><comment><USER8> Cybernetics will just change disability insurance into hardware insurance.

</comment><comment><USER9> How can robot augmentations cure, say, depression?

Sounds like a pretty narrow definition of "disability"

<comment><USER10> I'm guessing you didn't read the article and are just responding to the title? From the article:

"One promising experiment targets depression with deep brain stimulation (DBS), in which electrodes implanted in the brain send steady pulses of electricity to certain problematic neural areas."

and

"Neuroscientists discovered years ago that this existential dread can be treated by using electricity to alter the activity of neurons, and they are now putting that knowledge to use. DBS, one of the most exciting experimental treatments for depression, uses an implanted "brain pacemaker" that sends steady pulses of electricity to certain brain regions. It's a technology that was pioneered to stop Parkinson's patients' tremors, but it's now being explored for a dizzying array of neural and psychiatric disorders, including depression, obsessive-compulsive disorder, and PTSD."</comment></comment>


Artificial Forgetting - <AUTHOR> https://medium.com/message/972a44241176

<comment><USER2> He brings up the issue of journalists getting a pass on the stories that they publish and that get archived. How come newspapers get a pass? From a very high level it is all just information archiving.

</comment><comment><USER3> Fascinating concept. I could see the "next big thing" being a social network where this was the default</comment>


Why Startups Are Like Fruit Flies - <AUTHOR> http://www.inc.com/donna-wells/why-start-ups-are-like-fruit-flies.html?utm_source=twitterfeed&utm_medium=twitter&utm_campaign=Feed%3A+inc%2Fchannel%2Fstart-up+%28Inc.com%3A+Start-up%29 <comment><USER2> I visited quite a few startups this past week. What surprised me were how small in number each one was, and I think that worked to their advantage.</comment>


Sean Connery to Steve Jobs: "I'm f*cking JAMES BOND" - <AUTHOR> http://www.exophrine.com/2011/06/sean-connery-to-steve-jobs-im-f-cking.html <comment><USER2> The problem with ripping off contents without attribution is that every once in a while, you get caught with your pants down, regurgitating (as yours) fake news from fake news sites.

It happened with Onion news, too.

[http://scoopertino.com/exposed-the-imac-disaster-that- almost...](http://scoopertino.com/exposed-the-imac-disaster-that-almost-was/) [http://www.telegraph.co.uk/culture/film/jamesbond/8589096/Fa...](http://www.telegraph.co.uk/culture/film/jamesbond/8589096/Fake- Sean-Connery-letter-to-Steve-Jobs-becomes-Twitter-sensation.html)</comment>


Google CEO Eric Schmidt on Renewables vs. Nuclear: "Renewables are cheaper" - <AUTHOR> http://www.treehugger.com/files/2009/01/google-ceo-eric-schmidt-renewable-clean-energy-nukes-nuclear-video.php

<comment><USER2> It's a 3-minute video. Transcript: <http://tinypaste.com/af823>

      Eric Schmidt
      October 1, 2008
      The Commonwealth Club of California
      San Francisco, CA</comment>


Skepiticism of attempted proof of 160-year-old hypothesis - <AUTHOR> https://www.sciencemag.org/news/2018/09/skepticism-surrounds-renowned-mathematician-s-attempted-proof-160-year-old-hypothesis <comment><USER2> Why are mathematicians so scared to look at and validate his proof? I would love to see a good faith effort and have any mistakes found sooner rather than later. Does it have to be so personal? I don't consider myself a mathematician but I would love to understand how this works.

Btw typo: Extra I in skepticism. :) No big deal.</comment>


TheForger's Win32 API Programming Tutorial - <AUTHOR> http://www.winprog.org/tutorial/ <comment><USER2> My first job out of university was in a company that developed a GUI appication based on the Win32 C API. In fact, the product has been on the market for so long, that it's code had been a Win16 application in the past and pre-dated Win 3.1 (It is a product for a niche market, and had been the first Windows program on the market there, with all other software being MS- DOS Applications).

So, I came from university, had written Software during my master thesis with Qt, had some exposure to Gtk on my home PC a few years before, and I faced this obscure Win32 API, which looks ugly, appaling, antiquated and plainly awful.

But: Development was actually quite pleasant, and, while it didn't offer the flexibility of full-blown object oriented libraries like Gtk or Qt, it was amazingly good at getting stuff done. I wouldn't start a new project in it of course and it seems Microsoft has pretty much abandoned the API. But, I have to admit that I can see how it served Microsoft and its developer community well for a few years. In fact, a lot of things in there where quite thoughtful and I can still appreciate the non-bloaty way of doing things, if I see how many processes and memory an electron app uses that doesn't do much more than what a simple Win32 program does.

<comment><USER3> "Microsoft has pretty much abandoned the API"

No they havent. Everything else in Windows land is just built on top of it.

I also made some Win32 development at one point. The programs made using only Win32 have a very snappy and light weight feel to them that is very nice. It is fairly low level and more for the machine than for humans. But I doubt you can have both of these things.

<comment><AUTHOR> _No they havent. Everything else in Windows land is just built on top of it._

There were even some articles recently about that:

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

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

I started with a bit of Win16 and then moved to Win32, and don't really see why it gets a lot of hate; it's not perfect, but it looks like it does exactly what it was meant to do, and does it well. Perhaps it's because all of the tiny and fast applications I've used in the past were pure Win32. You can do a lot with it in only a few KB or tens of KB. In contrast, I don't find all the other multi-megabyte UI frameworks appealing.

<comment><USER4> > I started with a bit of Win16 and then moved to Win32, and don't really see > why it gets a lot of hate; it's not perfect, but it looks like it does > exactly what it was meant to do, and does it well.

From a birds' eye view: Because it's just not productive to write apps without some type of modularity, and the WndProc abstraction encourages enormous monster functions that do everything. There's a reason why all UI frameworks have some kind of modular paradigm, whether it's object-oriented or functional reactive or what have you.

More specifically: A lot of the core APIs are just bad. RegisterWindowEx has a struct with a dozen random fields, and CreateWindowEx has a ton of confusing random parameters. For example, why do you have to specify a menu when you're creating a button? Why is dwExStyle the first parameter and dwStyle is the fourth? Why do you have to specify a cursor explicitly instead of just having a function that sets it if you want a non-default one? It's possible to make a low-level C API that's actually reasonably pleasant to use, as in GTK+. Win32 is just a mess.

<comment><USER5> I have worked with both and i find Gtk+'s C API to be very bad actually, much worse than Win32. Sure, it looks more consistent but that doesn't help when what you want to do is done in a hair-pulling way. It is also much more verbose, though it hides that because it is overall a higher level API than Win32.

The issues you mentioned do exist but they are just minor nitpicks - at the end of the day it doesn't matter at all if the dwExStyle parameter is at the first, fourth or at the last (my guess was that is first to allow for a quick textual search and replace in code to "upgrade" from "CreateWindow(..." to "CreateWindowEx(0, ..."). This is the sort of stuff that will never cause any sort of issue in practice.

Also there are no confusing random parameters in CreateWindow if you actually read the documentation. The menu parameter for a button isn't used for a menu but for an identifier that allows you to distinguish that button from other controls in the window.

Finally your winproc's switch can actually call dedicated functions. You can even write a couple of macros that do that for you so you do something like

        static LRESULT HandlePaint(HWND hWnd, WPARAM wParam, LPARAM lParam);
        static LRESULT HandleSize(HWND hWnd, WPARAM wParam, LPARAM lParam);

        BEGIN_WINPROC(MyWinProc)
        ON_WINPROC_MESSAGE(WM_PAINT, HandlePaint)
        ON_WINPROC_MESSAGE(WM_SIZE, HandleSize)
        END_WINPROC()

which is pretty much the same as what you'd do in other toolkits with setting up event handles such as

        gtk_signal_connect(GTK_OBJECT(widget), "expose_event", (GtkSignalFunc)handle_expose, NULL);
        gtk_signal_connect(GTK_OBJECT(widget), "configure_event", (GtkSignalFunc)handle_configure, NULL);

(or your favorite toolkit's equivalent)

<comment><USER6> Exactly this. As a Windows API/GDI developer, I used to loathe the WndProc way, but after looking at how Qt and Gtk do things, I really really miss it; specially considering the aforementioned libraries requires megabytes of space while a simple winapi program might take a couple dozen kilobytes.

What I dislike about Qt is that it's a C++ only library with no proper way to use it in C. And Gtk imposes a convoluted object oriented C library you should learn and the usual tried & tested RAD point & click to get forms done is way more complicated than it should be, vis a vis the MSVC form builder, the way .NET does it or hell, even VB6. In hindsight, Windows API/GDI was great.

<comment><USER7> FWIW Windows - or at least the HWND parts - is also an object oriented API, it is just closer to something like Smalltalk (which i guess was more popular at the time) than C++. You still define a class with a message handler on it, create instances of this class and can create subclasses. Windows are really supposed to communicate with the outside world via messages and some Win32 calls are really just wrappers for SendMessage.

GUIs tend to fit perfectly with object oriented systems, so it makes sense for a GUI library for a non-OOP language to need to "invent" one. I think one failing of the Windows API was that they made this only for visual windows instead of creating a more generic "HOBJ" object system with message passing that the GUI bits would be implemented on and other system and user APIs would also be able to use.

Though on the other hand Windows event-driven message passing was already a culture shock to most programmers at the time and this could make things even harder :-P

<comment><USER6> What I like about Windows API when compared to GTK is exactly that: the OO/class system is kept at a minimum and is limited to the handling of the widget tree.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> This is strictly about the win32 GUI API.

There are other win32 APIs that are quite interesting:

* the networking API (native proactor servers, something that Linux doesn't have yet AFAIK)

* the security and process API, which I had the pleasure to explore recently, in order to contribute to an open source server that launches a single user server for a connected user, under the user's profile. The CreateProcessAsUser function and its interactions with user authorization tokens is quite something.

<comment><USER9> Also, there aren't many books about those (compared to e.g. books about the *nix API). I only know of Hart's Windows System Programming.

<comment><USER10> You don't need many books on it. There's Petzold.

<comment><USER11> Programming Windows 5th Edition by Charles Petzold, still commands a price on eBay for its Win32-centric program development strategy. IIRC 6th edition used C# .NET and 7th and 8th went all in on UWP.

<comment><USER12> Just noticed that the 5th Edition is still available on Kindle (at least on Amazon Australia) and is a lot cheaper than I expected it to be. The hardcover edition is still very expensive there though.

</comment></comment></comment></comment></comment><comment><USER13> I cut my teeth on making the jump from turbo pascal programs to GUI via the Win32 API. Its "rawness" felt fun, i.e. slinging around "long" pointers to stuff and big event handling switch statement state machines. As long as you didn't misbehave in the message loop, you could just kinda tinker endlessly. As both the UI evolved to many more complicated controls and the toolset was getting more abstract, I'd always find myself asking "dangit! i wish i could just get the UUID for the control that does the fizzywizzybizbang control that i see in Excel here!" Maybe that mindset is akin to a modern UI developer buried in quirksmode.org and their browser console debugger.

</comment><comment><USER14> I wrote an emulator for an old 8080 microcomputer in 1999 or so using the Win32 API. First I bought the Petzold book, but as my program grew there were still a lot of API issues that Petzold simply couldn't fit into a book of that already impressive size. Then I got a "Win32 API Bible" type of book, then another from a different author, then I collected the multi-volume official win32 api books from microsoft, ..., and ended up with more than two linear feet of books.

And yet development was still painful. Sometimes I would want to add a feature and I'd be amazed that in 30 minutes it was done, but far more often there would be something that didn't work and I'd literally spend two weeks of free time changing the order of state setting calls, or setting state that the books didn't say needed to be set but I had seen other source code do it, reading other program source, searching online, asking in forums...

The last release was in 2005. I'd like to work on it more, but there is no way I'm ever going back to that codebase.

</comment><comment><USER15> Ah, WinProg. The chatroom that built the world. [0] Good times, huhu.

[0] [https://www.wired.com/2005/11/chat-room-that-built-the- world...](https://www.wired.com/2005/11/chat-room-that-built-the-world/)

<comment><USER16> Is it still active? Actually I followed the link to winprog so I guess it's still active.

<comment><USER17> The irc channel is dead. But most of us mentioned in that article are still in another irc channel together and talk very frequently.

<comment><USER16> Oh I see, thanks, no wonder I couldn't find anything on Winprog. Is it private? Can I join?

<comment><USER15> Just #winprog on EFnet. Not sure how active it still is nowadays.

<comment><USER16> Oh thanks will give it a try.

</comment></comment></comment></comment></comment></comment><comment><USER18> Aaaaah the memory of making the an efficient self extracting archive. What is brilliant about the idea is that even to this very day many "new ideas" live around same event loop idea.

<comment><USER19> hahahah. React? :)

<comment><USER20> Funny you mention that, but one of the better pieces of MFC related advice I read was to have a single central location for computing UI element states. It did feel a lot like React does these days (albeit with less sophistication in the underlying 'DOM model' back then, and nothing like React's differencing stuff.)

[http://www.flounder.com/controls.htm](http://www.flounder.com/controls.htm)

To me at least, if you change the terms in that article, it looks a lot like the arguments in favor of moving away from ad hoc jQuery spaghetti and to React's single global rendering pass.

</comment></comment></comment><comment><USER21> Nice! I learned programming using "Iczelion's Win32ASM tutorials" (archived here: [http://www.interq.or.jp/chubu/r6/masm32/masm006.html](http://www.interq.or.jp/chubu/r6/masm32/masm006.html) ). Same API, but in assembler. The terminology and variable names look _very_ familiar

</comment><comment><USER22> Ah, the classic approach from WinProc() upwards. While I think it might be useful to work through this once, since then you understand what a message loop is and how it dispatches to controls, but for almost all practical purposes if you want to build a classic app it's easier to do it in C++ with MFC/ATL. Or even C#/Winforms.

I note this version uses LPSTR rather than LPTSTR; perhaps it predates the UNICODE fiasco and the brief window where UCS-2 seemed like a good idea.

<comment><USER7> Note that if you decide to use MFC you still _need_ to know Win32. A common misconception and source of frustration about MFC is that it is a layer over Win32 or that it somehow replaces it, which is not the case and if you (royal you here) expect that you'll be disappointed. MFC is a helper framework build with Win32 and C++ to ease some bits of making a Windows application, but even for the most basic stuff you are still dealing with Win32. It isn't a "Win32" or "MFC" situation, it is a "just Win32" or "Win32 and MFC" situation. If you don't like Win32 or feel it is too hard, chances are MFC wont change your opinion either (though you can like Win32 and dislike MFC - after all it has been left to rot).

</comment></comment><comment><USER23> Ah the Win32 API. Oddly, I learned quite a lot of object oriented fundamentals doing C++ Win32 programming indirectly using Paul DiLascia's excellent book "Windows++"[1]. One of the few 90s era programming books I still have.

[1][https://web.archive.org/web/20090606220454/http://www.dilasc...](https://web.archive.org/web/20090606220454/http://www.dilascia.com/wpp.htm)

</comment><comment><USER24> I'm not much of a windows user so sorry if it's a dumb question, but don't newer UI libraries like UWP and WinUI just act as wrappers around Win32 functions?

Like if I wrote a UWP/WinUI/etc program and disassembled it, wouldn't it just call Win32 functions in some system dll to do things like create windows, receive messages etc?

<comment><USER25> Not sure about others, but e.g. WinForms is a wrapper for Win32 controls. WPF has its own rendering.

</comment></comment><comment><USER26> Win32 was complicated. Lots of cleanup work. No forced structure. Combine that with having to use C, and the amount of low-skilled porogrammers out there, you could really see why there was so much terrible Windows software out there.

Learning Windows programming gave me so much insight to programs crashing and all the graphical bugs, beause I had caused them all in my own porograms before.

</comment><comment><USER27> My favorite Win32 tutorial is by Bartosz Milewski, I found it as a series of posts on his CodeCoop website ([https://web.archive.org/web/20110129015721/http://www.codeco...](https://web.archive.org/web/20110129015721/http://www.codecoop.com/) ), that were later incorporated into his book "C++ in Action" (also findable online).

He uses C++ to wrap every resource acquisition in a constructor and every release of a resource in the corresponding destructor, so that by allocating new objects on the stack you avoid a whole swath of memory management errors. This was my first encounter with RAII (not sure if he calls it that), and it seems a particularly elegant way to write C++ and to make the raw Win32 C API a lot less scary.

<comment><USER28> Windows development team now has an internal C++ library used inside Windows source code to do similar things, which was recently made public and open source on GitHub: [https://github.com/Microsoft/wil/wiki](https://github.com/Microsoft/wil/wiki)

</comment></comment><comment><USER29> Win32, especially when it comes to GUI programming, is one of the worst APIs out there.

MFC is also quite bad because of huge abstraction leakages; it fills like Win32 with bolted on classes.

It seems like Win32 happened a bit by accident, a bit by overengineering and a bit by Microsoft's attempt to lock everyone to their 'special' development environments, which did not include C as a conscious choice by Microsoft.

<comment><USER30> The design of Win32 is incredibly close to the design of Win16 and since Win16 dates back to early 90's you need to comparing it to GUI programming layers of that same era.

So the question is, back then was there any better GUI programming layers?

And the answer is yes, there was actually an API that was better and it was called OS/2.

At that time Microsoft was in a partnership with IBM to develop OS/2.

However, when the partnership fell apart, Microsoft just took big chunks of that OS/2 API and created a sub par version and called it the Windows API.

<comment><USER7> I'm pretty sure it is the other way around, the OS/2 GUI (Presentation Manager) API is a cleaned up version of the Windows 2.x API.

<comment><USER20> Sort of. IBM really wanted to ensure that OS/2 had an imaging model that was compatible with what it used in some of its larger computers. This resulted in a bunch of differences between OS/2's imaging model and GDI. (Different window origin coordinates, etc.)

In a more Microsoft-centric world, I'm pretty sure the OS/2 API would've been exactly as you describe it and almost strictly in parallel with Windows. In fact, Microsoft did exactly this with Win32s (and Windows 95) In their relationship with Windows NT (which was once known as OS/2 NT or OS/2 3.0).

The same compiled binary could run on both the 'entry level' OS and the 'server level' OS, with a bit of care taken in the way the API was used.

<comment><USER31> Once Microsoft agreed to the graphics api change, it was open season to redesign the window manager api because backward compat was moot at that point. The OS/2 window manager api was designed by the same team who designed the win16 window manager apis. There were improvements and a bunch of api change but at the 10K foot level the model was the same - input loop, window messages, and window procs.

<comment><USER20> > at the 10K foot level the model was the same - input loop, window messages, > and window procs.

That's a fairly broad description, isn't it? At least I have a hard time coming up with windowing API models that don't fundamentally work that way at the lower levels. (About the only exception think of is a text-based library that shipped with Microsoft BASIC 7.0, and that was mainly because the language didn't support any of the abstractions needed for callbacks.)

<comment><USER31> That's a fair point, I'll restate: the level of abstraction that developers were exposed to was 95% the same. Exposed message loops, window classes, window messages, unpacking window params, post and send message semantics, painting, single cooperative input queue (window app hanging would hang all apps), and other equivalences.

</comment></comment></comment></comment></comment></comment></comment><comment><USER32> Why on earth would anyone want to learn Win32 in 2019? It's horribly unproductive.

I've been doing Win32 (also called "Petzold-style") since 1995, and am pleased to say I'm converting to Qt for multi-platform capability.

When I look at the dreck necessary to create a dialog box in Win32, and compare to more modern frameworks, it's like milking a cow vs. buying milk at the store. Sure, you're "into the fundamentals", but is that really how you want to spend your time?

<comment><USER33> > Why on earth would anyone want to learn Win32 in 2019?

Because it's the native API on the most common desktop OS?

<comment><USER34> The Win32 API is on life-support. Microsoft will maintain backwards compatibility for legacy apps of course, but learning Win32 for new development doesn't seem like a good investment (unless, of course, you want to get a job maintaining a legacy Win32 app).

<comment><USER5> Anything that runs on the Windows desktop uses Win32 at some point in its stack. If you work on anything that is close to Win32 then you may also need to work with Win32 itself.

For example if you work on a game engine or toolset then you must know Win32 - especially if you work on the tools, even if you are using a wrapper like wxWidgets or Qt.

The only time where you can avoid Win32 is if you're using something that completely abstracts away the entire system, like Java Swing or a web browser.

<comment><USER34> It's a little bit more complicated. Sure, if you're doing low-level programming I imagine you might run into the Win32 API, but if you're just building typical desktop applications (particularly for newer devices like the Surface Pro X or Surface Neo), you'll most likely want to use UWP. Usage of Win32 for app development is only going to decrease overtime for typical consumer applications. I'm sure businesses will continue building LOB apps in WPF and WinForms until the heat-death of the universe, but there's also businesses building apps in VB6 and you don't see many people recommending to learn that.</comment></comment></comment></comment></comment>


Ask HN: Why are we more accepting towards accidents caused by humans vs. by AI? - forgot-my-pw In 2018, road traffic deaths is at 37k in America.
If a company invented a self driving car that kills 1,000 people a year, it will never gets allowed on the street. Even 100 a year seems high. But it will actually save tens of thousands.
Why are we a lot stricter on self-driving car technology than on humans? Why can't we simply choose the option that saves more life? <comment><AUTHOR> I guess It's about liability and reproducibility.

When someone does harm with his/her car, holds the civil (and sometimes penal) responsability of his own acts and _usually_ cannot do harm more than once in a very small timeframe.

In the case of autonomous IA, the company making/coding the vehicle software will be liable, and the problem is very likely to show again in a short time period.

That makes this kind of companies technically on the verge of bankrupcy because they are a good target for class-action lawsuits.

</comment><comment><USER2> Same reason as we're afraid of flying, I guess.

Part of the reason is probably because we're still given captchas asking us to identify lights, buses and zebra crossings.

It could also be that it's killing people from a specific bug. A car might be blind to say, someone wearing a black and white shirt, or maybe a green car and 95% ory deaths could be from that.

</comment><comment><USER3> You cannot tell whether a self-driving car kills less people than human drivers because to get the same statistical significance we have on human driving you'd need 84 billion hours of data from real autonomous driving within a year, and unbiased across all of the roads of the US.

<comment><USER4> Americans drive ~70 billion hours each year. You don't need autonomous cars to drive that anywhere near that volume to determine whether it is safer than humans. To prove with 95% probability (arbitrary but widely agreed upon standard) that autonomous cars are safer than humans could be done with much less driving hours. This is how clinical trials work. We don't need to give a new drug to every patient with heart disease to conclusively determine it's effective.

> to get the same statistical significance we have on human driving

I don't know what this phrase means.</comment></comment>


Test all IE version from linux - <AUTHOR> http://shapeshed.com/journal/testing_with_ie6_ie7_and_ie8_on_virtualbox/

<comment><USER2> Or if you have a Windows XP virtual machine on your computer, install IETester (<http://www.my-debugbar.com/wiki/IETester/HomePage>). It'll give you access to 5.5 through 8.

<comment><USER3> IETester is useful, but I've found it gives different results than a clean installation of the relevant IE version.

For example (dimly remembered so details may be off), I had a site with one of the standard PNG transparency fixes for IE6. In "real" IE6, as expected, the PNGs rendered opaque, then turned transparent. In IETester's IE6, the PNGs rendered opaque, then... disappeared completely.

</comment></comment><comment><USER4> I'm thinking the minimal set is a virtual machine with IE8 (which has a IE7 mode) and IE6 running on IEsforLinux ( <http://www.tatanka.com.br/ies4linux/page/Main_Page> ). Since that way you only have one virtual machine running and that saves memory.</comment>


Solus 1.0 Released - <AUTHOR> https://solus-project.com/2015/12/27/solus-1-0-released/ <comment><USER2> Definitely looks beautiful. But most of the time I see another Linux distro, I feel like the greater linux community is just spreading it's resources thinner and thinner and wasting time on porting/recreating the file manager and other various operating system components and major applications to the new system just to justify cosmetic differences. I feel like there is so much redundant work being done, especially in the packaging category. I feel like with the new popularity of containers, the design of new operating systems should focus on a plug-in system where package managers are obsolete and everyone only has to make applications for architectures, not distros. That way all that energy can be shared on common code that gets used exactly the same way. Only then, can visual elements and gui things be layered on top. In other words, push the all the forking away from the OS and onto the GUI or X11 layer.

<comment><USER3> I feel like your suggestion is extremely naive and wasteful of both hard drive space, transfer, and ram.

Please explain how you can put an entire system together that way in a non stupid way.

<comment><USER4> > hard drive space, transfer, and ram

are all incredibly cheap when compared to human effort in dependency management with dynamic libs. And most Linux packages managers don't elegantly support installation of multiple versions of libs (libfoo and libfoo123 isn't elegant). The way you'd fix that is similar to what the OP is proposing.

Of course, there's many other concerns: but it's not entirely unreasonable.

<comment><USER3> Its entirely possible for an individual app to have its deps included without forcing every app to work the same and I'm far from convinced that is a real benefit. It would be far better to work towards standardization to make producing a package for multiple distros easier.

</comment></comment></comment></comment><comment><USER5> I'm not convinced that much of the interesting work still to be done is on the desktop side of things. Gnome is pretty competent. I am sympathetic to the "I hate change" crowd who were upset by the 2->3 evolution, but I was able to adapt to Gnome 3 almost immediately, and never had an urge to go back...in many ways it is superior, and while it was annoying having so much of the flexibility of Gnome 2 disappear, I've found that in Fedora 23, most of the stuff that annoyed me with its absence is now available. There remains an active Cinnamon branch which keeps the old start menu and task bar ideas from earlier Gnome versions. Solus and Budgie appear to be sticking with the old paradigm, with a couple of custom add-ons (which almost certainly could have been simply Gnome add-ons for any distro), so nothing revolutionary there. And, that's OK, we probably don't need more desktop revolutions at this juncture.

But, it's just not a compelling story, IMHO. It's a Linux distro, with a slightly different Gnome desktop. What could possibly compel me to get excited about that?

It has a new package manager that I haven't heard of, but it seems to be a very rudimentary thing that does roughly what every other major package manager does, only without the decades of experience and bugfixing that have gone into RPM/dnf or dpkg/apt. If it were based on nix or guix, or similarly provided reproduce-able builds or some other novel concept, _that_ would be interesting. I can't find any docs about the package manager to clarify if maybe it actually does do something novel. The description on the website makes me assume it is not merely simple but simplistic.

I guess I sound kinda harsh, and I don't really mean people shouldn't work on stuff that they find fun. I just can't see from the description why it is exciting or novel. I may just be jaded from having seen literally hundreds of distros come and go in my 20 years of Linux usage.

<comment><USER6> I've been using Linux for about that long (both in recreational and professional capacities), along with everything from IRIX 6.5 to back when Solaris was SunOS.

On the desktop side of things this does offer something that XFCE, E, GNOME 2||3, or KDE has -- something pretty enough to ship to an end-user. This isn't objective analysis, I'm not a UI expert, and I don't have metrics to back this up. It looks pretty, in the same way that OS X looks pretty. I'm going to bet I've tried as many distros as you, as many DE's, as many WM's. I bet you remember RPM-hell after buying Red Hat at CompUSA too. This 'slightly different' UI is _finally_ aesthetically pleasing enough where I'd feel comfortable giving this to grandma, my niece, or use in a business environment (lack of proper AD/GPO tooling that MS has is sorta problematic as YP/NIS and mounting NFS doesn't seem like the right solution, but that's easy enough to fix - the 'user adoption for those who don't know what GNU or what apt-get is' issue is what I'm addressing here).

You're right, it's 'slightly different'. A Lexus ES300 is on the same chassis, the same engine, and shares the same drive train with the higher end Toyota Camry's. But those 'slight differences' (trim, maybe upgraded suspension for a softer ride and less ambient cabin noise) are enough to get the consumer to use it.

As happenstance, this would occur as Win10 advances into what I argue is a really reliable, granularly secure, more-open-than-ever platform.

<comment><USER5> That's a confusing assertion, to me. This is no more beautiful than recent Fedora versions with Gnome 3.

The two are _extremely_ similar in appearance. Very simple, very clean, nice little calendar, nice sidebar thingy. They are different in functionality (sidebars on Gnome 3 are for apps...available shortcuts on the left, and running apps and desktops on the right, and calendar is in the center and pops out of the top bar), but they look so similar that I could easily mistake one for the other, when the calendar and such is not open. The status bar and start menu at the bottom is the only notable difference, and that's certainly not the difference between "beautiful" and not.

I agree that this desktop looks nice. But, it looks nice in ways that current Gnome on Fedora looks nice. Clean, unobtrusive menus and status info, etc. And, I think both are (finally) nicer than Mac OS X. I find Mac OS X (and Windows) too busy, in comparison. They both look a bit like Android, actually, which I also like.

Edit: Screenshots of my current, stock, F23+Gnome 3 desktop, so we can be on the same page about what I'm talking about. [http://imgur.com/a/j2uRT](http://imgur.com/a/j2uRT)

<comment><USER6> Ah, I guess my reference point was old. There the discrepancy lay. I hadn't tried Gnome since 3.1(?) (early 2014? does that sound right?) at which point it wasn't nearly as clean as your DE (which is super pretty, I'll readily admit). I think we're really on the same page for the most part.

How much tweaking went into that? Do you have a write-up with what sort of steps you took to integrate that sort of functionality (added fonts/behavioral changes/dbus integration type components, etc)?

I'm with you on the "beating OS X" threshold re: UI. Between the whole Atom/Electron/LightTable type WebKit environments, you can develop on any machine. Likewise IntelliJ(Cursive for Clojure), emacs and vim all work as well if not better on Linux. Unless you are tied into Xcode, the development experience for an engineer is finally desktop-ready as the (very challenging) OSX-interface parity threshold has been broken.

<comment><USER5> _" How much tweaking went into that?"_

Literally none. This is the default desktop. I installed Fedora 23 yesterday (and it looks very similar to Fedora 21, which I had before, which I think looks like default Gnome 3). The theme, background image, fonts, color scheme, calendar settings, everything is from the standard Fedora Workstation install. I'm lazy and rarely spend much time tweaking things (my terminal and my vim have some customization, but even that's minimal), particularly now that it's all very nice looking right out of the box.

</comment></comment></comment></comment></comment><comment><USER7> It looks like they have developed their own desktop environment based on GNOME technologies.

[https://solus-project.com/budgie/](https://solus-project.com/budgie/)

</comment><comment><USER8> Softpedia has a good article about the history of Solus - [http://webcache.googleusercontent.com/search?q=cache:qXMSxgM...](http://webcache.googleusercontent.com/search?q=cache:qXMSxgMeo7IJ:news.softpedia.com/news/Let- s-Talk-Solus-the-Linux-Distribution-that-Wants-to-Change-the- Game-482307.shtml+&cd=8&hl=en&ct=clnk&gl=us) (since Softpedia seems to be down at the moment.)

<comment><USER9> Thanks, I knew the old SolusOS and was confused about the relationship.

In short: SolusOS became EvolveOS became Solus.

</comment></comment><comment><USER10> Ok so what is Solus? Yes it's an OS as I can see from the home page but what's the ancestry? Is it too much work to mention 'Linux distro' or 'Linux-based' on the home page (or any other page of the site for that matter)?

<comment><USER11> Well, in the blog post that is linked, it does state that

      Solus is a Linux-based operating system built from scratch for the modern desktop and targeting the x86_64 architecture.

Yeah, it should probably should say on the home page, but the site seems to be partially unfinished in other aspects as well. (The "Why Solus?" and "Budgie" pages even state that they aren't complete)

</comment></comment><comment><USER12> I really like the design.

To be honest, a pleasant UI (by _my_ tastes) is what has kept me away from a Linux desktop. I'll have to give it a shot sometime this week.

Though, one thought, maybe someone will use: I do wish people would do more of these sorts projects based on a BSD variant than Linux.</comment>


Ask HN: Why Gmail '50 invites left' feature still exists? - <AUTHOR>

Totally useless when it's open for all, why that box still present there? <comment><USER2> My guess: it would be more work to take it out than to do nothing.

<comment><USER3> But why do they not hide the interface directly?

<comment><USER4> because it's not _hurting_ their user acquisition by giving users the option to directly invite people, even if it's open for all.

</comment></comment></comment><comment><USER5> From my experience, and I may be incorrect, if you invite someone from Gmail they do not need to verify the account via an SMS message.

</comment><comment><USER6> My guess: for those cases when you want to invite someone. You could either tell them "just click yourself through mail.google.com" or send them a ready- made link in one go. Some people may prefer the latter.

<comment><USER3> I think this is reasonable.

My guess: Gmail wants you to invite somebody in your contact list directly. And they are reluctant to reset the cap of invitation because there are so many users in the system.

</comment></comment><comment><AUTHOR> why not just remove the line '50 invites left' and substitute it wit something better like 'invite someone'

<comment><USER7> Probably to stop spammers taking advantage of it. Invitees don't need to verify their accounts, so a spammer could make 1 legitimate account, and then invite themselves a few hundred times for instant new verification-free spam accounts.

Just a guess.

</comment></comment><comment><USER8> The illusion of limited supply makes Gmail accounts appear more valuable even if you're smart enough to realize that's not the case.</comment>


Show HN:CSDN Geek, a Chinese Version Hacker News - <AUTHOR> http://geek.csdn.net/ <comment><AUTHOR> Language is still a barrier for developers in China to understand and discuss the technical world, so we developed this application. The daily page view of this website is about 25k, and we add a few features we think important but HN is missing:

\- Markdown support, even pictures could be added in comment

\- Sub-forums, so one could follow (or ignore) particular topics

\- Read comments without living the homepage

\- Optimization for mobile device

\- Social features, e.g. AT or FOLLOW particular ID

\- New submissions will randomly appear in homepage, so we don't need to count on up-votes immediately after submit

<comment><USER2> In addition to the above mentioned, we developed this application also want to dig much more excellent tech articles, views and open source projects by Chinese developers with community.

In this application, we also use some popular frameworks, such as [Bootstrap](1), [CodeIgniter](2) and so on.

Although, CSDN Geek may have a long way to improve and proceed. Rencently, I have created an [GitHub organization](3) for CSDN Geek. APIs will be open for community in the next step.

1): [http://getbootstrap.com/](http://getbootstrap.com/) 2): [http://www.codeigniter.com/](http://www.codeigniter.com/) 3): [https://github.com/CSDN-Geek](https://github.com/CSDN-Geek)

</comment></comment><comment><USER3> 经常看的一个站,不错</comment>


You Only Wish MongoDB Wasn't Relational - <AUTHOR> http://seanhess.github.com/2012/02/01/mongodb_relational.html

<comment><USER2> " _Denormalization might be important_ "

Denormalization _is_ still important. Taking that comment example a bit further, if you need user records tied to the comments, you're going to want to include all the user information that you need for displaying the comment in the comment record itself. Mongodb doesn't have joins. So if you have 200 comments on a post by different people, you're going to have to grab those users from mongo in a separate call, and if you're sloppy about it, 200 separate calls.

If your users really need to change their user names, you might run a job that updates the comments async.

<comment><USER3> True and untrue.

I use MongoDB for my startup (yabblr.com) and have quite a relationship data stored in my entities.

For example, my user entites have an array of commentId's stored inside of them.

Whenever I fetch 1 or 1000 users from the database, a framework that i designed will look at the entire list of users and build a single list of commentIds based on that list.

Then I do one more lookup on the database to find all comments in my new list of comments.

Then a final pass over the users looks up the commentId associations and inserts the actual comment object into the user object.

Finally the list is passed back to the consumer. Its 2 database calls. It does require that there are 2 iterations over the first call (one to gather up comment Ids and one to associate comments with users) but since its being done in the application layer, its much easier to scale.

</comment></comment><comment><USER4> Just a quick note: There is a feature planned called "virtual collections" for querying the embedded collection as if it were a standalone collection.

That way you could easily do db.posts.$comments.find({"name": username})

to retrieve all posts by a user, or

db.posts.$comments.find().sort({date:-1}).limit(10)

to retrieve the latest 10 comments on the blog.

Link to the feature in MongoDB's issue tracker: <https://jira.mongodb.org/browse/SERVER-142>

</comment><comment><USER5> We were actually considering MongoDB for our system, given its scalable, high- performance, and open source qualities. However, since we are building a payments platform (specifically, a third party payments aggregator), we soon learned that our case is the exception where MongoDB--or any other pure NoSQL DB for that matter--is not an ideal solution (and is specifically noted as a less well suited use case on the MongoDB site), because NoSQL DBs are not transactional.

Any possible work-around proved to be complicated and tedious--likely requiring heavy application-side logic--if not inadequate. Going hybrid was an option (RDBMS for critical parts, and NoSQL for other non-critical parts), but that may not have been a prudent way to start building this thing, since it would be difficult to predict the portions that might be correlated or codependent in the future (where a JOIN between the RDBMS and the NoSQL DB would be inefficient, if not impossible).

As a payments platform, we cannot afford to lose any transactions, and every penny must be accounted for, so a transactional and ACID-compliant data storage is a must. Thus, we decided to go with a traditional RDBMS. With that said, and looking towards the future, I am considering the use of an ultra- high throughput RDBMS such as VoltDB for our system... A VoltDB vs. MongoDB (or any other NoSQL DB) would be interesting.

<comment><USER6> You do realize the entire banking system is not built with the idea of ACID/transactional databases in mind? You only really need durability guarantees to implement banking properly. Bank accounts are eventually consistent logs of immutable transaction data which are reconciled in batch.

<comment><USER7> You might not need ACID during the recording of each charging transaction; however, without ACID, you won't be able to correctly apply each transaction against your account balance during the reconciliation batch processing. Marking each charging record as charged and updating your account balance must be in one transaction, whether relying on the database transaction support or building your own transactional log.

So at the end of the day (yes end of the day processing), ACID is needed.

<comment><USER6> The account balance is calculated as a function of adding all the debits and credits together. Bank accounts are not stored as some kind of balance value that gets mutated over time. The balance is simply the result of some operation that is cached. It's quite simple. No ACID required. Most of these systems at large banks were built in IMS long before relational databases even existed.

</comment></comment></comment></comment><comment><USER8> Was there a movement of "let's not design databases" and thus this article is needed to rebut it?

Design your database (or organically grow its needs), and you'll wind up breaking things apart appropriately.

<comment><USER9> Well, "schemaless" is one of the NoSQL buzzwords, sometimes glossed as "no data model required", which can verge on "don't design your database, just put stuff in it", though nobody actually advocates anything quite _that_ strong.

</comment></comment><comment><USER10> One possible solution - put your userDB in a real DB (they are your crown jewels, and deserve a bit of special care), cache user data in a fast cache (local Mongo, Redis over a memory socket, Memcached, whatever - you do have a cache, right?), and let cache invalidation update comment names in due course.

I'm pretending there's two types of data - the "nexis" of the star (comments), which needs a fast DB, and the leaves (users), which are small enough to be cached.

<comment><USER11> This is exactly how we do it at my company.

<comment><USER10> Well, that makes me feel less crazy for doing it.

</comment></comment></comment><comment><USER12> On a related note, Mike Dirolf, former MongoDB engineer, has a nice post on MongoDB data modeling on his new venture's (fiesta.cc) blog, which I found very helpful:

[http://blog.fiesta.cc/post/11319522700/walkthrough- mongodb-d...](http://blog.fiesta.cc/post/11319522700/walkthrough-mongodb-data- modeling)

</comment><comment><USER13> From the examples you mentioned, it seems sql is a better option for you.

sql databases scale pretty well too.

</comment><comment><USER14> I understand that you can use MongoDB in a relational fashion, but I don't get how this is showing why. The mongo docs have examples showing what this blog says can't be done.

[http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+F...](http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields)

> t.find({}, {'x.y':1}) { "_id" : ObjectId("4c23f0486dad1c3 a68457d20"), "x" : > { "y" : 1 } }

And the mongo docs even have an example pretty detailing what this page wants (paging of comments)

db.posts.find({}, {comments:{$slice: -5}}) // last 5 comments

So, what am I missing?

<comment><AUTHOR> I should have addressed $slice. Yes, it lets you get a subset of comments, but it doesn't let you get the subset matched by your query. For example with this document:

{ "_id" : "one", "comments" : [ { "name" : "a", "asdf" : "1" }, { "name" : "b", "asdf" : "2" } ] }

The following query returns the comment "a", not "b"

> db.posts.find({"comments.name":"b"}, {comments: {$slice: 1}})

So, you're right, for paging, $slice works fine. For more advanced queries (ranges, the comments by user example), you're stuck. It sounds like 10gen is working to correct this though.

<comment><USER14> Yeah, I think the comments by user, I had done using Foursquare's Rogue, so thought it was part of mongo natively.

At least they have tickets open for it.

</comment></comment></comment><comment><USER15> I build most of my apps this way. The main idea is that any time users can add content, it goes into its own collection. This way, records don't grow indefinitely (and hit the 4mb limit) but it also gives you a lot more querying power.

You sometimes want to just get the blog post object too, not all the comments. It's worth it to have to do two queries and get the extra selection power vs one round trip to the DB, but you have to potentially sift through a lot of data to get what you want (or get back a lot of data you don't need).

This is, in my opinion, the perfect mix of the relational/document schemes. You can nest things when they don't grow continuously, but you still get most of the querying power of a relational database.

<comment><USER16> > You sometimes want to just get the blog post object too, not all the > comments.

I feel this should be clarified a bit (since you most likely have a more complicated scenario in mind) but it is entirely possible to only select certain fields to be returned from a query. So if a 'comments' document was inlined within a 'post' document, we could easily opt to only have the latter returned by mongod. Such a query might look like this:

        db.posts.findOne( {'_id' : <...>}, { comments:0} );

This would definitely cut down on the amount of data transferred over the wire, but I am not sure if there is any performance hit within mongod.

</comment></comment><comment><USER17> I might be missing something from the post (which I skimmed), but when the author states that "there's no way to get only the matched comment back" in the "When Nested Documents Become a Problem" section, isn't that exactly what the $elemMatch operator was designed for?

[http://www.mongodb.org/display/DOCS/Advanced+Queries#Advance...](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24elemMatch)

The syntax is a bit wonky, but I believe it does exactly what the author says is impossible.

<comment><USER14> It's less the match, and more what is returned by Mongo. If he matches comments.name, he wants the comments.text to go with it, not the entire document.

It becomes an issue when you have extremely large arrays in the document (e.g. thousands of comments).

<comment><AUTHOR> Exactly, I just updated the post with examples of why slice and elemMatch don't work.

</comment></comment></comment><comment><USER18> Or use postgres. Whichever.

<comment><USER19> Heresy! PostgreSQL is not WebScale - the bear told me so.

</comment></comment><comment><USER20> Making collections is cheap. Having one or two extra collections and joining data manually when needed isn't too bad. Then business requirements change and management makes you add new features, so you add more collections. One morning you show up to work and realize you're doing all of your joins and aggregates manually. You start devising a plan to switch back to a relational database...

</comment><comment><USER21> When I see the first example -- comments as a collection of the post document -- the first thing I think of is that editing a comment requires one to retrieve the document, edit it, then save it back.

Is there some sort of repair process in mongo that prevents destructive updates in the case of 2 concurrent writes?

<comment><USER22> Mongo is single-master, so last-write-wins is how writes are resolved.

However, they do support partial updating. So you only need to write the specific part of the document that you are actually changing.

</comment></comment><comment><USER23> This is fine if your site is small and don't have a lot of users, but adding fields or data to existing documents is extremely expensive in mongoDB. Just don't design your product around this.

</comment><comment><USER24> This seems like a relatively simple indexing problem to me. Why not just use another data structure to store the association for fast querying?

<comment><USER25> What would the advantages over the former approach?

</comment></comment><comment> johnx123-up Why not "events_users" collection for attendees map? What's the benefit of embedding attendees inside events collection?

<comment> johnx123-up Anybody?

</comment></comment><comment><USER26> what about cascading deletions?

<comment><AUTHOR> Just run 2 removes. Delete the post, then delete all comments with that post id.

<comment><USER27> And hope that you don't have a crash, restart or connection failure in between the two operations...

</comment></comment></comment><comment><USER28> >> This works nicely with the key/value idea that you should denormalize your data.

I wonder if the NoSQL crowd is affiliated with the REST crowd. :)

</comment><comment><USER29> Does MongoDB have _any_ advantages over using de-normalized tables within PostreSQL?

<comment><USER30> Mongo is specifically designed for horizontal scaling, so it makes it easy to establish replica sets and shards, and it includes an auto-balancer that will distribute your data between the shards. Pg (the database, not the guy!) can do much of this, but it's not quite as built-in.

Which isn't to say there aren't things that Pg is better for. Full text search comes to mind.</comment></comment>


Ask HN: How accurate are Alexa/Compete/Quantcast for your website(s)? - <AUTHOR> I feel that many people's tendency to take those estimates too seriously is a bad thing.
This post was inspired by a Reddit admin's comment showing that Quantcast was far off: http://www.reddit.com/r/reddit.com/comments/cahpw/digg_is_dead/c0r9904
Please post numbers for months that are fully shown at all those sites already, so not from this month. You don't have to post your domains for privacy reasons, but if you would, please do. <comment><USER3> I've got some sites that are 'quantified' with Quantcast (have the tracking code) and the numbers agree within a few percent with other analytics: that's for sites that get anywhere between 50 visits a month to 500k.

If you're not quantified, Quantcast is a joke and the other sites are always a joke, no matter what. There was a long time when Alexa thought the top 20 sites in the world were all in Korea because, I guess, everybody in Korea had the Alexa toolbar. One day they changed their formula to prevent this because people were pointing out that their stats make no sense.

Compete, in particular, has a free service that's designed to annoy you into paying for the service, but everything I see on their free service and on their blog convinces me that the paid service is worthless... For instance, they had nothing to blog about one day, so they blogged that "Girls Gone Wild" gets 30% of its traffic from women... Everybody knows that systems like that use 50-50 gender statistics as a bayesian prior, so they always claim that sites have more balanced audiences than they really do.

</comment><comment><USER4> Wikispaces.com does 9M uniques and 75M pageviews a month per Google Analytics. Quantcast says 1.4M uniques, Compete says 900K. Neither trend in the right direction.

Alexa is comically low on pageviews and maybe 6x low on reach when we compare those stats to other sites who make their numbers public. However, Alexa tends to head in the right direction.

I looked at Comscore data on us a few years ago and it was less wrong than Quantcast and Compete, but still well off the mark.

</comment><comment><USER5> My experience is that they're all easily gamed if you want to.

As an example, I once spent a year browsing with the Alexa toolbar, and it boosted every one of my sites up into the top 100k just from my own traffic. After ditching the toolbar, they all dropped back down.

As to accuracy, Compete isn't even on the right order of magnitude for any of my sites. It's way over for one, way under for another. Just no correlation to reality.

</comment><comment><USER6> CodeAnthem.com has been up a few months, so only full month avail was April on Compete:

Google Analytics (unique visits): 77K

Compete: 20K

Quantcast: No Data

I really have no idea how to find comparable stats on Alexa (since it uses percentages) but you can check it to see.

Compete's referral data and search analytics were also way off. I might think this is due to the site being pretty new ... but I'd rather they said nothing (like Quantcast) than be way off.

Based on how wrong they are for my site, I would not put much stock in them for other people's...

</comment><comment><USER7> If you're "quantified" on Quantcast, it should be pretty spot on to Google Analytics since it's direct measurement. If you're not, then it's definitely going to be off like Compete.

I use Compete stats as relative measurements against other websites (assuming everyone's off by a similar ratio). I use Quantcast stats to look at the demo info.

</comment><comment><USER8> Somewhat random fact: comment solutions like IntenseDebate and Disqus incorporate Quantcast into their js, so you are indirectly getting counted by such services if you use IntenseDebate, etc. I searched for an out-clause, but found none.

<comment><USER9> Could you please expand upon the implications of this? It is unclear to me whether this is positive or negative aspect for the different entities involved: the commenting apps, Quantcast and the website they are embedded on.

<comment><USER8> I checked my quantcast stats a few weeks back after taking off their js months ago. I noticed that they still had a good picture of views/etc and wondered why. It appears that they were getting info from Intense Debate.

I originally took the Quantcast code off my site b/c it slowed things down and despite having fairly accurate counts, it had skewed demographics. I didn't want to encourage them, so I took off the script. However, my use of IntenseDebate meant that I was still using it.

I don't think IntenseDebate is doing anything wrong, but I would like an opt- out.

</comment></comment></comment><comment><USER10> I would urge people to include Comscore as well. None of these sites track accurately. Here's a site I used to work on.

Site: Gameriot.com Month: May '10 (May 1 - May 31) Google Analytics: 307,000 "Visitors/Month" (Unique Visits) Alexa: 25,856 Traffic Rank (has been as high as 2,000) Compete: 72k "Unique Visitors" Quantcast: 201.5k 'Worldwide Visitors' Comscore: 144k "US Visitors" (we have to pay more than $30k/yr for global access)

</comment><comment><USER11> Site that's been around for years:

Google Analytics: ~1,000,000 visits/month

Compete: 110,000 visits/month

Alexa: 9,548 traffic rank?

Quantcast: 5,000 visits/month

They all seem to be very low and very all over the road.

</comment><comment><USER12> A theme I've noticed is that techie sites have their traffic grossly underestimated. If the figures are being estimated through traffic going through a handful of points, this makes sense to me as the visitors to, say, a Python documentation site are likely to be less diverse than those to a Flash games site or Facebook.

</comment><comment><USER13> <http://onlineslangdictionary.com/>

\-----Uniques (March)

Google Analytics - 470k uniques

Compete - <USER2>

Quantcast - 156k (not "quantified")

\-----Rank (at present)

Alexa - 19,730 in the US

Compete - 16,735 (US?)

Quantcast - 12,957 in the US

</comment><comment><USER9> As a corollary to this, how would people rate Google Analytics versus their own traffic logs?

</comment><comment><AUTHOR> Here are my small niche sites:

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

 _Site #1_ (classic gaming related)

April 2010 - Unique Visitors:

My server logs: 16000

Compete: 700

Quantcast: -

Alexa: -

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

 _Site #2_ (music related and random things)

April 2010 - Unique Visitors:

My server logs: 5000

Compete: 2326

Quantcast: -

Alexa: -

<comment><USER14> how do you find the uniques through server logs? I know software like webalizer and awstats overexxagerate quite a bit if left alone (count too many bots, extra uniques where they shouldn't be, etc).

Compete.com is US only traffic so it is pretty spot on for your second site. However it's weird that your first site with 500+ uniques/day avg. doesn't have a quantcast estimate.

</comment></comment><comment><USER15> One thing to keep in mind is that cookies are not people. People clear their cookies, so any reliance on that as a measure of unique visitors has the potential to vary widely.

</comment><comment><USER16> In my experience, <http://www.google.com/adplanner> has been far more accurate than Alexa, Compete, and Quantcast.

</comment><comment><USER17> Compete measures iframes and js includes, meaning any company with a moderately successful non-flash widget is drastically overestimated.

</comment><comment><USER18> Off by an order of magnitude for many of my sites.</comment>


Bugs in your programs - <AUTHOR> http://blog.bloc.io/bugs-in-your-programs

<comment><USER2> > As we learn to code, one of the most frustrating experiences we can have is > finding bugs in our code.

Bug hunting can be a really fun thing to do. It's a challenge to (often) see beyond your own blind spot and use logic and reasoning to find the error.

TDD (and its kissing cousins) aren't a panacea, but I suspect OP's testing strategy is a little too thin or absent. Chances are if there is a test suite, it's not properly testing the entire code base.

<comment><USER3> Depending on the bug and the stress level, it can certainly be a riveting experience to search for an error deep in your own code. I find it's also an important source of refactoring for me, I take notes about what v2 will _not_ be doing. Unit testing is great but it doesn't teach me to innovate or come across solutions I hadn't thought of before like genuine dirty bugfixing can do.

</comment></comment><comment><USER4> this post explains... that there may be bugs in our code and third party libraries and that if you fix them you'll improve as a coder.

I'm curious, who learned something from this post?

<comment><USER3> New coders may not really know the value of bug hunting. In a mentoring situation I would stress the bug hunting/fixing should be considered a challenge, not a chore.

</comment></comment><comment><USER5> For me I see coding as:

A) R&D/Learning - Code/hack out new ideas and learn. B) Production - Use known methods + what was learned in A to write production code.

For A, it seems that we can R&D/Learn all we like without TDD/BDD etc. Hack away. Get a proof of concept out. But please don't put that code into production.

For B, use something like TDD to assure robustness. I would also argue using BDD to assure coverage of system behavior.

I feel a majority of bugs in code is because developers stick stuff created in A into production.</comment>


Ask German HN: Are Cases in the German Language Similar to Typing in a Language? - <AUTHOR> I'm starting to learn German cases, the dative and accusative in particular. In one video explanation, the woman says "the is always the" in English. While in German, we need to switch the word depending on whether the object is direct or indirect.<p>I started wondering: the in English sounds like weak typing. The 'the' doesn't tell you anything about the object itself, kind of like weak typing in programming doesn't tell you the data type of the variable. Using Der vs. Dem, on the other hand, gives the reader/speaker a clue that that word is the indirect object. Sounds a lot like strong typing. <comment><USER2> Well that is an odd analogy. ;-) But I know this strange desire of drawing parallels between natural languages and programming languages (or IT/CS) while learning. I wouldn't call it strong typing though since that would mean we only have 12 classes/types (4 cases 3 genders), not even considering some of these combinations map to the same article.

I think a better analogy would be error correction. It adds some redundancy to the information so it's easier to recover the message when transferred over a noisy channel, since at least for simple sentences you could even omit all articles in either language and still understand. For German that leads to trouble as soon as you make use of its rather flexible grammar (i.e. SVO vs OVS).

Speaking of weird CS analogies: you could say that tonal languages like Chinese use QAM for higher information density while we only use FM. :-)

<comment><AUTHOR> thx for the response.

</comment></comment><comment><USER3> One point of view that might help is considering cases as being an alternative to prepositions. English has three cases - nominative, indicating the subject of a sentence; accusative, indicating the direct object; and genitive, indicating possession. Rather than using the genitive, we can also use a preposition: David's book, or the book of David.

German has a fourth case for the indirect object. Where English has to use a preposition (e.g. I gave the book to him), German uses the dative case (Ich gab ihm das Buch).

Finnish takes the concept much further - it has fifteen cases, which can be used where English would use a preposition. For example, the abessive case is used where English would use "without", the comitative for "together" or "with".

So cases are not types, they are relations, indicating the role of the noun in the sentence.

<comment><USER4> How about 'I gave him the book'? (no preposition)

<comment><USER5> there is an implied preposition in that sentence, in the sense that that sentence is equivalent to "i gave the book to him". the direct object comes first (the book) which would be the equivalent to the accusative case in German, and the indirect object comes second (him) which would be the dative case in German

thus: ich gab ihm das Buch, or ich habe ihm das Buch gegeben, the former being the Imperfekt form and the latter the Perfekt.

edit: oh i didn't notice that the parent post actually went into that second bit already. sorry, i don't pay attention</comment></comment></comment>


Review my startup (background job monitoring as a service)  - <AUTHOR> https://snooze.io

<comment><USER3> Why do I have to be an EU Citizen to use snooze? I tried to sign up for a trial account, but was blockaded. :(

Value Prop: Your value prop is clean and simple and I think you do a good job of explaining it. For improvements, you might try telling a story to build an emotional connection with the reader. I think your sales pitch is kind of feature driven, when you really want benefits. Your video might be more effective if you show how Snooze can save your ass in a story driven way.

Layout Suggestions: The class "text-3" explination bits are too tiny compared to the headline on the front page. Text is also too small to read on the Tour page.

Video Suggestions the video's placement on the homepage is jarring. especially at the start of the presentation. can you make the background of the video's splash page blend in more with the existing HTML/CSS? It currently feels kind of Picture in Picture. IMO Vimeo does a better job of removing the player's chrome (play pause stop buttons) and getting out of the way of your content.

CLI Suggestions

Read from/manipulate the crontab itself from inside your cli. Even people who love cron hate writing crontab entries. If you could turn some of that into plain english, many people would be more excited about using your service. I think many of the parsing issues here are handled in other rubygems like whenever.

example:

snooze cron - would list all of the crontabs snooze cron monitored - <USER2> list all of the crontabs that are already monitored

etc.

Good luck!

<comment><AUTHOR> This is currently because of insurance reasons. After I get some customers, I'll get that sorted out ASAP.

</comment></comment><comment><USER4> I like the overall design of the app, but I don't think the stock images fit well in there. It's just generic people, nothing I can relate to your app.

A little bit more text to explain what your product does would have helped me. I had to watch half of the video to really get it. I still don't know how your product is better than traditional monitoring, though. Unfortunately the tour does not really help me here (but I am a devops-noob): For example, what does this mean: "Snooze tries to fill the gap between cron mailing you and setting up and Icinga stack to monitor all the scheduled tasks in your network." I had to google "Icinga" to even understand what you mean. And the scenario you use before is very technical - Might be hard to read for a non-programmer.

If you did not know it yet, have a look at this post (and the linked info graphic): [http://copyhackers.com/2013/04/long- copy/](http://copyhackers.com/2013/04/long-copy/) \- I would take this route for adding more text to the home page, if I were you.

Don't get me wrong, overall I like what you did here. I think this product would be useful for me if I ran a SAAS application. But you have not totally convinced me yet...

<comment><AUTHOR> Thank you for the feedback. The choice for stock-photos is one of budget. I'm currently bootstrapping myself and thought this was a good tradeoff.

<comment><USER5> Don't worry about the stock photos. If you weren't asking for specific feedback, nobody would have mentioned it.

<comment><USER4> Yes, the stock photos are a really minor issue. But, if you can draw a little diagram that explains your service on a white board, I would prefer that to the lady who has nothing to do with your startup...

<comment><AUTHOR> I'd like that, but drawing a diagram for this is hard :)

</comment></comment></comment></comment></comment><comment><AUTHOR> Hi, I'm particularly looking for feedback about how to explain the product better (aka creating a better sales pitch). Somehow I find it very hard to explain a simple product :).</comment>


Programming and Programming Languages - <AUTHOR> http://papl.cs.brown.edu/2014/ <comment><USER2> His other book was PLAI which was pretty cool: [http://cs.brown.edu/courses/cs173/2012/book/](http://cs.brown.edu/courses/cs173/2012/book/)

I worked through it for a class, and I distinctly remember a moment where I thought "what the fuck - did I just write a working type inferencer?". It has a great way of simplifying things to the point where adding a complex new language feature isn't a distant theoretical proposition, it seems like a simple and straightforward next step. Of course, it helped that I had a great instructor.

I can't speak for this new book, but it seems like an interesting combo of intro to programming and programming languages. And it's in pyret, which is like the bastard child of python and plt-scheme: [http://www.pyret.org/](http://www.pyret.org/)

<comment><USER3> PLAI is almost completely subsumed into PAPL. With each revision, though, the PLAI material gets reorganized and distributed across PAPL, so at some point it will no longer be an identifiable subset. The idea is that programming inspires new programming languages, while programming languages help us make sense of programs. Therefore, the two should be tightly intertwined. The first edition of PLAI tried one way to achieve this synthesis (but didn't really succeed as much as I'd have liked); PAPL is a fresh attempt at getting there.

<comment><USER4> Shriram, thank you for the PLAI and I'm looking forward to take a look on PAPL as well. But one thing I don't like - types (static typing) for the implementation language is an afterthought in your books. This happened to PLAI, and later it switched to "plai-typed" language (which was a good move). Now we have PAPL, but again using a dynamic language. Although, as I can see, static typing is a planned feature for Pyret. So I suppose PAPL will switch to static typing in the future, but I think it would be better (for readers/learners, novice programmers) to _start_ with (static) types in the first place.

EDIT: just skimmed through the text, you seem to be using "type-like annotations" mentioned in Pyret docs.

Another thing to note - Pyret is _much_ more readable/enjoyable (and I guess writable :)) than the previous lisp languages you've used. Thanks!

<comment><USER3> Thanks for your comments; criticism is always welcome! And for your kind words about Pyret, though I actually find parenthetical syntax a bit easier to write. It's still taking me some effort to get used to the irregularities of non-parenthetical syntax.

I don't know why you say types are an afterthought. HtDP teaches a profoundly _typed_ discipline of programming. The datatype mechanism in PLAI continues this with more enforcement. And plai-typed is anything _but_ an "afterthought", right?

PAPL is written as if types work. We have an internal type-checker that I've been using off-and-on this semester (but it's still in development). As soon as it's ready, all programs in the book will pass through it and the book will be almost completely typed.

I'm not going to get into an argument here about whether it is better to start with static types. Though I somewhat share @noelwelsh's viewpoint, I think the full situation is far more complex and demands actual research — HCI research — as opposed to just matters of opinion (including mine).

<comment><USER4> > And plai-typed is anything _but_ an "afterthought", right?

No, no, plai-typed is great. I meant that PLAI book initially used a dynamically typed language (and I guess it is preserved in the printed edition), but you switched to plai-typed _afterwards_ , and I believe you'll switch to full static typed Pyret for this book as well, when it becomes ready :)

("shameless plug": Actually, it was me who notified you about the plai-typed effort and you further developed it, during your online PLAI class at Brown ;))

Agree about a typed discipline, but I meant specifically static typing for the implementation (host) language.

As for preferences, yes, actually Noel has a point - learning debugging type errors in a dynamic languages is a skill useful in a "real world" (unfortunately :))

<comment><USER3> Aaah, YOU are responsible! Well, then I should publicly thank you for notifying me about that. It was a great addition.

</comment></comment></comment></comment></comment></comment><comment> Anthony-G I read the introduction and I really liked the following excerpt from _The Structure of This Book_ :

      We will often build up programs incrementally, just as a pair of programmers
      would. We will include mistakes, not because I don't know the answer, but
      because *this is the best way for you to learn*. Including mistakes makes it
      impossible for you to read passively: you must instead engage with the
      material, because you can never be sure of the veracity of what you're
      reading.

I really like this idea as any techniques that help the learner to _actively think_ about what they're reading work better than books which don't employ such technique. It's for the same reasons that I recommend the Head First series – even though for some books, the pace can be too slow for my liking.

I'd also agree with the author that a good book for readers to learn from does not make a good reference book (and vice-versa).

</comment><comment><USER5> At first glance this book appears in many ways to be a spiritual successor to SICP... does this hold up for anyone who has read it more throughly?

<comment><USER6> More like a spiritual successor to HtDP, which is somewhat opposed to the SICP philosophy, even though both use Scheme variants:

[http://cs.brown.edu/~sk/Publications/Papers/Published/fffk-h...](http://cs.brown.edu/~sk/Publications/Papers/Published/fffk- htdp-vs-sicp-journal/)

<comment><USER7> How is HtDP opposed to the SICP philosophy? From my reading both come off as espousing the more or less same ideas for building programs.

<comment><USER8> One is that SICP had a fair amount of math (I believe caused by Electrical Engineer authors), so while you're trying to grok recursive logic, you also have to deal with arithmetic invariants (convergence with reals). HtDP had much less. Based on [https://www.coursera.org/course/programdesign](https://www.coursera.org/course/programdesign) (which is inspired by HtDP) you only deal with simple data and logic but focus on regular and precise analysis of ad-hoc types (at first) to derive solid program structures. I felt anyone could follow the ideas in it.

<comment><USER3> SICP and HtDP are two very different books that have the unfortunate feature of using somewhat similar languages (which are syntactically very similar, hence causing the confusion).

I was recently re-reading SICP, and was amazed by how cleverly structured it is. It somehow goes for an entire fifth of a book without any data structure at all. It retrospect, I consider it something of a virtuoso achievement to have pulled that off while writing a book that is utterly compelling on every page. However, the only way it can achieve that is by focusing _entirely_ on what we call "domain knowledge". As the kind of person who has always loved the play of numbers, I was immersed fully and barely noticed what was happening when I read it as a student. To most students, however, this material is both uninteresting and difficult, and difficult material that isn't even relevant to the domain is especially uncompellling.

Of course, diving into data early means you need a lot more help structuring your programs. HtDP focuses precisely on that problem, _using_ the data to drive the structure (inspired by earlier efforts such as The Little Lisper). And this highlights exactly how very different the two books are. It is much like the comment about the US and UK: "two countries separated by a common language". The coincidence of using (almost) the same language in both books has, sadly, created a great deal of confusion on this point.

<comment><USER8> Wasn't HtDP written to address issues in SICP ? completely or partially ? I always felt that HtDP was sharing more than a language to express programs in.

> It somehow goes for an entire fifth of a book without any data structure at > all

Funny, in the MOOC I linked, from what I remember, they spent a lot of time writing programs without compound data types too. Only by having naive conventions (item0, item1,...) to let us recognize the logic behind complex type in the problem data and let it sink in our minds. I don't know how close to the book this was though so I don't wanna give off conclusions.

<comment><USER3> > Wasn't HtDP written to address issues in SICP ? completely or partially ?

Absolutely. (Though that wording suggests a stronger causal link than was really present. It was written to address a need, a need that happened to not be addressed by SICP.)

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> @shriramkmurthi may I know what license PLAI and PAPL are released under? I couldn't find it on the linked page.

<comment><USER3> PLAI's license is CC BY-NC-SA (3.0 US). I have not yet decided for sure with PAPL.

At any rate, I'm committed to having a full copy of the book available for free to all, as is also true of HtDP (we were one of the pioneers in this space) and PLAI (which has even more free/commercial options than HtDP).

You may assume at least a CC BY-NC-ND, which lets typical users have at it right away.

<comment><USER10> I have my own odd way of rewarding CC-licensed content:

If it has no DRM but is 'all rights reserved', and I really want a copy, I wait for a chance to buy it at a deep discount.

If it is released under a CC 'non-commercial' license, I buy a copy at full price.

If it is released under a CC license which allows commercial use, I pay extra for a copy (at sites like www.leanpub.com) or buy 2 copies.

At any rate, I would gladly pay for a copy (or two) of PAPL if the option were available and a CC license declared.

BTW, thanks for this resource!

<comment><USER3> With PLAI 1/e, I did something much simpler. I made a pay version of the PDF available, making clear it was also available for free, so people would only be buying it to reward the author. I'm pleased to say some number of people have done so with regularity. Search for "Electronic Version" on [http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04...](http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/).

</comment></comment></comment></comment><comment><USER11> I like their definition of an object:

"The simplest notion of an object—pretty much the only thing everyone who talks about objects agrees about—is that an object is:

a value, that

maps names to

stuff: either other values or "methods"."

(I don't want to start a debate or anything, just thought it was a practical, minimal definition)

<comment><USER12> Minimal definition: "behaviour and state".

<comment><USER13> It's surprising to me how few developers, even hardcore OO developers, are able to just give this minimal definition. It's the core of the entire paradigm, that an object is state and behaviour on that state, and yet everybody always gives some convoluted, hardly understandable-to-a-beginner definition. If you're going to be teaching people, "behaviour and state" should be your starting point, not "a value that maps names to stuff". Seeing how the latter maps to an OO language is not trivial, something it should absolutely be.

<comment><USER3> You should read the chapter. Apparently even Alan Kay doesn't quite agree with your view. Also please note that I did not offer this as a _definition_. What I wrote, quite carefully, was: "pretty much the only thing everyone who talks about objects agrees about". I stand by that, because there are people who don't agree with what you say.

<comment><USER13> Alan Kay disagrees that objects exist to 'encapsulate state'. I agree with him. They also encapulsate behaviour. While it's difficult to get a precise overview of Kay's definition (he never gave them explicitly), this page does a good job of collecting the various bits: [http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented](http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented)

Notable for the "behaviour and state":

       3. Objects have their own memory (in terms of objects).
       4. Every object is an instance of a class (which must be an object).
       5. The class holds the shared behavior for its instances (in the form of objects in a program list)

But my point is that I don't agree that an object is "a value that maps names to stuff". I bet even Alan Kay would disagree, seeing as he was a proponent of the Actor model style of working, where objects exchange messages instead of method calls or values. In that case, there are no names to map, there is incoming data that matches a protocol. The object itself determines what behaviour to enact on its own state. Seeing an object as just values and methods is too simplistic, and at the same time too vague to mean anything.

And more importantly, as a first sentence to explain what an object is, it's misleading and will raise a lot more questions later.

<comment><USER3> Diving into the middle of a large and complex document and extrapolating from that is always a dangerous venture. The style of the book is to gradually reveal things as it goes along, often even starting with incorrect statements, because we learn best when we see missteps, not only from perfect solutions. Therefore, there's nothing wrong with "starting from" a statement that may not be where we end up. It's meant to be a pedagogic instrument, not a dictionary or other book of definitions. Every chapter is written in this style.

<comment><USER13> I agree, my gripes are not with the entire document, or even with the chapter in question. I also don't have a problem with starting from a statement that may be wrong in an informative way, it's a valid approach to learn a subject.

My problem is that it's not presented as a starting point or even implied that the definition might be wrong. It categorically states "The simplest notion of an object—pretty much the only thing everyone who talks about objects agrees about— is". If it had said "One notion of an object -one that many people who talk about objects agree on- is", all would be dandy. When you're stating things as fact in a document dedicated to learning, they should be solid.

My other gripe is that I've heard too many vague, biased or incomplete answers to the question "what is an object". These are structures people use every second of every day, but they've never learned a proper definition for it?

<comment><USER14> > My other gripe is that I've heard too many vague, biased or incomplete > answers to the question

Well, "behaviour and state" is also incomplete, because it fails to mention anything about _how_ you refer to parts of state and particular behaviours.

"a mapping of names to values and functions" on the other hand mentions both _state_ ("values") and _behaviour_ (functions) and also tells you that they have names.

> they've never learned a proper definition for it?

Well, there are many different _valid_ definitions for objects, and even more for OO. There are people who don't know any of them for sure, but I strongly suspect that you've dismissed many good definitions as "vague, biased, incomplete" on the grounds of them not being your preferred one. You did it at least once just now, when you failed to realize that "a mapping of names to values and functions" is the same thing as "[named] behaviour and state".

<comment><USER13> How you refer to state or behaviour is not strictly relevant to the definition of an object, because it depends on how you implement it. It might fit in the language it was used in, but it doesn't in others. Behaviour might be reactive on state changes, it might be perpetual in a nameless loop, it doesn't matter. In the same vein, referring to state as values and behaviour as functions is too narrow. The lifecycle of the object is part of its state too, an object's construction and destruction is part of its behaviour. That may sound like hair-splitting, but it can seriously trip you up and give you a wrong idea of what an object is in non-conventional settings. An object is more than a map of 'name' to 'value or function'.

It's possible that my dismissal of many definitions is partly because they're not my preferred one. I'm human, so it's most likely the case. I like to think my preferred one at least came about through some investigation, and it's the only one that I've seen fit a wide enough variety of cases. For me, at least part of the validation comes from the fact that I was frustrated at the definitions people gave me long before I found one I liked. Too many conversations with college teachers, mentors and colleagues that went

      "So how would you define/describe an object?"
      -"..."
      "OK, but what about [language/edge case/model]?"
      -"Oh yeah..."

I'll gladly have this conversation again, and again, and again, and I hope somebody can poke holes in the definition I prefer, and put me on the other side of it.

<comment><USER3> The difference between you and me is that I've seen enough different notions of object (and defined some of my own) that I don't believe there is any such definition. In class I discuss why, but it's difficult to transcribe such an interactive discussion; but it is essentially the other side of "this conversation again, and again, and again".

I don't find your definition particularly useful, either: it's too encompassing to really be of much use _to me_. By this definition just about all computation is an "object", which doesn't really tell me anything interesting.

Also, as a general pedagogic principle, I'm opposed to definitions that are too vague to say much to a middle-of-the-pack undergraduate. I'd definitely put your definition of objects in that space. It sounds like good stuff—it's certainly "quotable"—but the typical student would be hard-pressed to actually explain it or put it to use.

<comment><USER13> It's definitely possible that there is no one good definition, but it's a good discussion to have. I applaud that you treat this with your class.

The usefulness is debatable. To me, it's been useful because it helped me see that, for example, a process can also be an object, and you can apply object oriented rules to interacting processes. The Actor model is an extension of that. Modelling a set of Microservices as an object model has also proven valuable.

How you communicate it to students is a not an easy matter. I'm opposed to giving definitions as an absolute truth if they aren't, even if you're doing to prove a point. If you want to teach with different definitions, that is of course perfectly fine, but at least a mention of the debate could solve some later problems. People tend to adhere to the 'laws' they learn for a long time, and if you teach them a definition that is incorrect in some cases, they'll have trouble with those cases.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> I'd like to learn from this book.

> If you ask Pyret for the value of this program, it will unsurprisingly tell > you that it's 3.

I am not sure how to do that. In [this tutorial]([http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28par...](http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28part._.Testing_and_.Assertions%29)) everything is a test. Is the program 3 supposed to be run as a test as well? Just running 3 in the editor does nothing. Where can I read up on Pyret syntax so i can follow this book?

<comment><USER3> Sorry about the confusion. Looks like you've already found [https://code.pyret.org/editor](https://code.pyret.org/editor) (but the link is here for the information of others). You can run programs by typing them in the interactions area (a.k.a. REPL), which is the area on the right. To wit:

> 3 3 > 1 + 2 3

<comment><USER15> I see. I was typing my code on the left half of the window and expecting the result show up on the right half. It works now. Thank you.

</comment></comment></comment><comment><USER16> I know the answer to the following question is probably scattered in the comments below but, to get a concise/precise version of it in one place, I am going to ask it anyway - How does PAPL compare to SICP, HtDP, PLAI & EOPL considering there is quite some commonality amongst them? What does each book offer, what is the intended audience for each book, where do they overlap, which would be a good idea to read first for a novice?

Thanks in advance. :-)

</comment><comment><USER17> This is great. I'm building a interpreter in F# and the clear explanation of things have solved several of small-questions I have before.</comment>


Twitter Accounts Every Startup Investor Should Follow - <AUTHOR> http://mashable.com/2011/10/18/twitter-startup-investors/

<comment><USER2> ... presented in a slow, ugly slideshow. This is a better link:

[http://mashable.com/2011/10/18/twitter-startup- investors/#vi...](http://mashable.com/2011/10/18/twitter-startup- investors/#view_as_one_page-gallery_box2737)</comment>


Apple Has $51 Billion and a Shopping List. Is Facebook On It? - <AUTHOR> http://mediamemo.allthingsd.com/20101018/live-apple-earnings-call-2/?mod=ATD_rss <comment><USER2> Duplicate of <http://news.ycombinator.com/item?id=1805839></comment>


Restructuring Kapital (Historical Fiction) - <AUTHOR> https://restructuringkapital.com <comment><AUTHOR> I set up a Hugo website to link to a book I finally finished while unemployed.</comment>


Elm Architecture in Haskell with concurrent effects - <AUTHOR> https://github.com/lazamar/elm-architecture-haskell <comment><USER2> If it meets the guidelines, this might make a good 'Show HN'. Show HN guidelines: [https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html)</comment>


Appl Still Hasn't Fixd Its MacBook Kyboad Problm - <AUTHOR> https://daringfireball.net/linked/2019/03/27/strn-kyboard <comment><USER2> Actual article: [https://www.wsj.com/graphics/apple-still-hasnt-fixed-its- mac...](https://www.wsj.com/graphics/apple-still-hasnt-fixed-its-macbook- keyboard-problem/)

</comment><comment><USER3> I totally agree. I am still suffering the keyboard, and all I got from the genius bar is: "blow it with compress air".

</comment><comment><USER4> What current laptops have good keyboards?

<comment><USER5> Alienware laptops have a luxurious key travel distance, unfortunately they are also huge. Thinkpads, even the most basic have great keyboards (usually), see also high-end HP. Xiaomi has some macbook pro clones that are very good as well as some of their own designs.

If you want to try them out, I'd recommend a Microsoft store if you have one around. Lots of high-end laptop keyboards are represented there.</comment></comment>