Ruby Koans. Best way to learn Ruby. - <AUTHOR> http://rubykoans.com/

<comment><USER2> I just finished this. It took me about 5 hours in all. A good way to spend a Sunday afternoon I suppose.

I have a good knowledge of Python and have worked with Ruby in the past on a little Rails project of my own. I had forgotten anything I knew though. Yesterday, I don't think I would've been able to write a foobaz in ruby without looking for help online. This proved to be a welcome refresher. It's also a great way to compare and contrast Python and Ruby. I really like Python's philosophy and maybe solving all these ruby koans has made me appreciate Python's simplicity and predictability a bit more.

I wouldn't recommend this to a beginner however. While I think I now have a pretty good idea of what the language can do, there were no whys or recommendations about all these features. Maybe it would be a good starting point for someone coming from a similar language (like Python), before moving on to a good Ruby book.

</comment><comment><USER3> There are also functional koans. Same idea for some other languages.

<http://github.com/relevance/functional-koans>

Each of the following languages has its own branch: Clojure, FSharp, Haskell, and Scala.

</comment><comment><USER4> Going through these would be useful for any Rubyist, not just those learning. I have been using Ruby for a while now and I didn't know there was a difference between string << 'foo' and string += 'foo' until now.

<comment><USER5> I learned that difference while doing some genetic programming. The difference is quite visible when you do it a few million times.

</comment></comment><comment><USER6>
      def test_changing_hashes
        hash = { :one => "uno", :two => "dos" }
        hash[:one] = "eins"

        expected = { :one => "eins", :two => "dos" }
        assert_equal expected, hash

        # Bonus Question: Why was "expected" broken out into a variable
        # rather than used as a literal?
      end

Can anyone help with the bonus question? From searching Google, I read that the reason:

        assert_equal { :one => "eins", :two => "dos" }, hash

gives an error is that Ruby believes this to be a block. But then why doesn't it consider the hash to be a block below:

        expected = { :one => "eins", :two => "dos" }

?

Edit: thanks jashkenas for the explanation! Edit2: for anybody else trying these, I think the version in github is more up-to-date, with some corrections:

<http://github.com/edgecase/ruby_koans>

<comment><USER7> This is one of those gotchas with Ruby's syntax for blocks clashing with Ruby's syntax for hash literals. I'm not familiar with the details of precisely why Ruby's parser handles some cases, and not others, but I bet there's a special case for assignment -- you can't ever assign a block literal, so it has to be a hash...

Here are some of the variants:

        method({ ... })  # hash

        method { ... }   # block, even though a hash would be possible.

        method = { ... } # hash

        method a, b, :c => d  # implicit hash

        method a, b { ... } # SyntaxError

        method(a, b) { ... } # block

Only #2 in that list is really a problem, because there are situations where you'd legitimately like to use both.

<comment><USER8> This is one reason why I always use parens on my method calls. Some rubyists find it cluttering, yeah, but I think it makes reading code easier.

The other one to watch out for is precedence of {} vs do; end. Example:

      > x = [1,2].map do |i| i*2; end
       => [2, 4]
      > puts [1,2].map do |i| i*2; end
      1
      2
       => nil
      > puts [1,2].map { |i| i*2}
      2
      4
       => nil

<comment><USER7> Agreed. It's why we've tried to be careful with lambda/hash/call syntax in CoffeeScript, especially where some of it is optional, and can be left out. For example:

        x = [1, 2].map (i) -> i * 2

... is without optional parens.

        x = [1, 2].map((i) -> i * 2)

... is with them.

        configure start: 10, end: 25

... is the syntax for calling a method and passing an implicit hash -- and with the optional braces and parens added, it's closer to JavaScript...

        configure({start: 10, end: 25})

</comment></comment></comment></comment><comment><USER9> There is also a python port available @ <http://wiki.github.com/gregmalcolm/python_koans/>

</comment><comment><USER10> Already posted <http://news.ycombinator.com/item?id=1622245>

</comment><comment><USER11> Periods. Not a cure for sentence fragments.

</comment><comment><USER12> I used Koans when I first started out. Loved it. Still use it occasionally for reference.

</comment><comment><USER13> Love it, just what my mind needed to learn better :)

</comment><comment><USER14> Pretentious

<comment><USER6> Possibly, although I guess it's trying to play off Ruby's Japanese connotations and the actual examples inside (slicing arrays containing peanut butter and jelly) are not particularly pretentious.

Edit: thanks zem: <http://en.wikipedia.org/wiki/Hacker_koan> Edit2: and thanks angrycoder, I didn't spot that, although the point still stands that peanut butter is not overly pretentious

<comment><USER15> I think you are trying too hard. The most obvious influence is "The Little Schemer", right down to the peanut butter and jelly references. It is even listed as an inspiration on website.</comment></comment></comment>


µg: Open-source replacements of Google Apps and API on Android - <AUTHOR> https://github.com/microg

<comment><USER2> Great project. The importance of something like this is increasingly growing, as Android ecosystem is getting more and more dependent on Google's proprietary software. For the next steps, it would be nice to have some onboarding document for this project, as otherwise it will probably look to complex and unwelcoming. I see that most of the replacements are in a very early phase (and one of them is empty), so I hope that this project manages to survive this early state to grow into something we can actually rely on.

<comment><USER3> > as Android ecosystem is getting more and more dependent on Google's > proprietary software

This is untrue when you're talking about app development, which this is about. It can be demonstrated by simply pointing out that Microsoft's, Amazon's and Baidu's Android derivatives are fully functioning commercially even though the Google Play Services are not available on these devices. The Amazon App Store even has 240,000+ apps.

There's an increasing amount of propietary Google software running on Android phones, but that has no consequences for other apps. No functionality of AOSP is being absorbed into Play Services at all.

<comment><USER2> Google is frequently pushing new Google Play Services that developers can use for their apps. Those services have the massive advantage over AOSP APIs of having OTA updates for all, not having to rely on carriers and manufacturers for full OS upgrades. In addition, those services offer new and useful functionality that is not always present in AOSP. Therefore, it is only natural that, on a general basis, developers start using more and more of Google's proprietary APIs.

This is not to say that pure AOSP is broken, or that it is impossible to have products like Kindle Fire and Nokia X. But it is a growing problem, and the fact that Amazon has to spend so much time replicating Play Services' APIs to have a decent app store (that is still considerable smaller than Google Play Store) is concerning.

<comment><USER3> That is true. Although AOSP in itself is a complete operating system, most apps require the need for the "extras" that are provided by some cloud service. Although you can manage without, apps assume an "ecosystem" with additional cloud services rather than an OS to be present.

It would be wrong to have AOSP depend on Google cloud APIs, and seperating those cloud APIs in Google Play Services also has problems. There's really no winning here for an open platform.

<comment><USER4> I think a good solution would be to abstract the Google Play Services behind some 'cloud-api service' that others, such as Amazon, could re-implement and drop in. The Google play store would be the canonical implementation.

Google controls the API but Amazon is free to expand the functionality on their devices.

This way, the developer can simply call Context.getSystemService(CLOUD_SERVICE) and have access to whatever cloud service the user as installed.

Every other part of android, from keyboards to cameras, works this way and these services could as well.

<comment><USER3> That would be difficult, I think. "Cloud service" does not really define any capabilities present or absent in the library. Even if you split it up in things like "mapping service" and "cast service" then a lot of details will differ between otherwise equivalent providers. It's not something you can easily generalize. And if you generalize it, you're stuck with this generic API until your phone gets updated.

This project and some of Amazon's libraries basically take a subset of Google's Play Services API as canonical and reimplement those. That's not an ideal solution either, but at least it provides minimal pain for app developers.

<comment><USER4> >And if you generalize it, you're stuck with this generic API until your phone gets updated.

The cloud service version and the client library code would not be coupled to OS version and updated with APKs just like how Google Play Services does. Its not any harder than exactly what Google is currently doing with play services.

I'm not proposing anything that isn't already being done besides some standardized calls and some extra service discovery.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> This needs more docs or pointers to docs. I understand what's trying to do on a high level, but I have no idea of how to use it, or its state (like, is it still in initial dev, or has it reached alpha?)

<comment><USER6> This forum post looks like it gives an overview:

[http://forum.xda-developers.com/showthread.php?t=1715375](http://forum.xda- developers.com/showthread.php?t=1715375)

</comment></comment><comment><USER7> Interesting. Do they have a public road map so one can see how far they've come with this project?

</comment><comment><USER8> Great start. So will I be able to run a server where I can gradually switch out Google's implementation of services with these as they mature?

<comment><USER9> Not that easy. I'm trying that right now on a second phone. I've rolled my own ROM which I'll update this weekend with all the cool new stuff (especially the mock play services / maps v2): [http://forum.xda-developers.com/galaxy- nexus/development/rom...](http://forum.xda-developers.com/galaxy- nexus/development/rom-source-software-t2701580)

mar-v-in and his µg are corner stones to build a nice free android. As for a server side I'd suggest ownCloud at the moment. I'm running one on ipv6 at home. Works great.

<comment><USER10> I commend your efforts, but a small rant: One thing that really puts me off xda is that the posts say "open source" but there is no link to anything like how to build the distribution yourself. Just a frickin' binary zip download. And that's served over http from a random site, with no checksums and unsigned.

Only Replicant seem to be doing things the right way, but they are going so slow, and are so unwilling to use proprietary blobs anywhere that there's a space for something like you have here - blobs for hardware features only, no proprietary apps, strongly anti-Google, including F-droid by default - but it needs a bit of proper open source-style organization.

Sigh. The whole ROM scene is a big mess :(

<comment><USER9> Huh, I have everything on github if you are interesting. [https://github.com/gfreed](https://github.com/gfreed)

I am still using the blobs, but I was thinking about gradually replacing parts once replicant reaches a good-enough (e.g. samsung rild, have to try it though).

Btw, if you are interested in building the ROM add me on jabber (firstname.lastname@example.com). I want to build the next version this weekend anyway and I may as well guide you through building roms, too. Plus I would appreciate help on porting to new devices :-P

[EDIT] I'm unhappy with the ROM scene, too. That's why I started my own ROM in the first place.

</comment></comment></comment></comment><comment><USER11> just when lwn talks about Google free Android [https://news.ycombinator.com/item?id=7952550](https://news.ycombinator.com/item?id=7952550)

timing is fun

<comment><USER12> My guess is someone posted this link after seeing the LWN piece linked on HN.

</comment></comment><comment><USER13> Mu-G! If it's anywhere near as good as Muji...

<comment><USER14> Man, I'm suffering from a major case of Baader-Meinhof Phenomenon today. I heard of Muji for the first time from three independent, unrelated sources today.

To be fair, it is awesome. Just got back from the store near my apartment.

</comment></comment><comment><USER15> Google Apps =/= GAPPS.

</comment><comment><USER16> I know open source folks don't consider branding important, to the point they intentionally give their projects stupid names for the "irony" and so on, but I don't even have this key on my keyboard, and I don't even know how to say this. Mewjee? Mewg? Ug? Come on, folks, you can do better.

Whether you know it or not, this has an actual effect on the ability of the project to spread by word of mouth (online or otherwise), therefore its success and number of contributors it'll get.

<comment><USER17> "microG"?

The Greek letter Mu is the SI prefix for "micro".

μTorrent seems to do fine with the Mu, even though most people write it as "uTorrent" and spell it as such.

<comment><USER18> _μTorrent seems to do fine with the Mu, even though most people write it as "uTorrent" and spell it as such._

You've said it yourself there; μTorrent was rebranded by the majority of users to uTorrent, and "uTorrent" is a distinct, mostly spelt-how-it-sounds and easily-Googleable name.

I doubt that an involuntary rebranding of μg to "ug" would be quite as successful, nor likely to happen.

<comment><USER19> The funny thing is that in Modern Greek the letter μ is pronounced "me", so the name of the software could be pronounced "meTorrent". Spelling it with a u makes the name of the software sound like "youTorrent".

</comment></comment></comment></comment><comment><USER20> I'n sorry bit even insinuating that something like this could remotely stand in for Google Apps is completely insulting to everyone's intelligence.</comment>


Who Thought Cat Cafes Were a Good Idea? - <AUTHOR> https://www.wsj.com/articles/todays-catty-question-who-thought-cat-cafes-were-a-good-idea-1515513369?mod=e2fb <comment><USER2> Cats are amazing as long as you know what to expect and how to be around them. People expecting smaller versions of dogs are in for some disappointment.

<comment><USER3> What's amazing about them, then?

<comment><USER4> The attraction of cats is that you have a very slightly domesticated wild animal. There is really something magical about interacting with an animal that has a bit more agency than dogs who have been bred for millenia to be servants to humanity.

<comment><USER5> Exactly, and despite not being the most mentally capable cats exhibit very intelligent tendencies. They can have endless curiosity and playfulness, but also somehow still very lazy.

<comment><USER6> We had to cat sit a few times over the last six months, and Cat World isn't an easy place to understand.

Cats don't appear to have a good serial memory, so they can remember places and times up to a point, but not quite well enough to integrate them into a conceptual whole.

One cat was cute and sweet tempered, but also timid and really rather slow. We eventually worked out that she couldn't make the connection between the corridor that led to the kitchen in daylight, and the same corridor after dark.

She acted as if they were two completely different and unrelated spaces. So she had to timidly re-explore both every day, which caused non-trivial confusion because some of the things in the corridor already had her scent on them.

<comment><USER5> Every cat is different. Some can be downright neurotic, just like us. They also get senile in old age. I had the pleasure of growing into adulthood alongside a cat. He died 2 months shy of 20. He taught me a lot.

</comment></comment></comment></comment></comment></comment><comment><USER7> I helped to found kitTea (kitteasf.com) here in SF. So... obvs I love the idea. If anyone has any questions about cat cafes etc... AMA

One thing I will say from an entrepreneurial standpoint, is that is was soon OBVIOUS that people loved the the idea and there was (some) demand.

I generally doubt that products market themselves & am skeptical of organic growth stories. But this was a case that showed me there can be big positive demand signals.

</comment><comment><USER8> "Who Thought Cat Cafes Were a Good Idea?" me ;) I remember I went nuts when I found out there's this tea time place with loads of cats in London, it's amazing.

Anyway if animals are used in therapy why that wouldn't work in other environment.

<comment><USER9> Yes, I'll have a medium toxoplasmosis latte, please?

<comment><USER10> if they do not go outside they would be clean from toxo

<comment><USER9> ok, thanks for the assurances; I'll forward all insurance claims to you

</comment></comment></comment></comment><comment><USER11> Around Istanbul cats everywhere are a common sight. There's the Kedi documentary that was recently showing internationally that talks about them at lenght. I can't read the article because of the paywall (and no I won't subscribe for reading one single article, why these sites do not have the option to buy access to one article only?---even though I'm not really that interested in this particular one), but can kind of guess what it is about. Cats in public spaces adapt very nicely and usually do not make any trouble. They also attract many people, giving the cafe an image of a nice, cozy place. If I was running a cafe, I'd definitely have a couple of them.

</comment><comment><USER12> Can't read the article because paywall, but the cat cafe I went to in Tokyo was amazingly relaxing.

<comment><USER13> You aren't missing much, it's a totally useless fluff piece that is mostly a list of things the writer could imagine going wrong with cat cafes, topped off with some cat themed puns.

<comment><USER14> > fluff

Thank you for your summary and likely inadvertent cat themed pun. ;-)</comment></comment></comment>


Ask HN: What has been your experience with InfluxDB in production? - <AUTHOR> I am looking for a timeseries DB for IoT data and InfluxDB seems to have a lot of chatter. However, when I did deeper I see that the OSS version is not distributed. So, I am looking for experiences from people how are you scaling Influx clusters and your experience in production. <comment><USER2> The OSS version is limited in what you can use it for even if you can find it. The paid version is very expensive. Thus, I would never use it for anything where my ethical concerns come into play.

However, once you have it running it does appear to work. I've seen production setups that ingest a fair amount of data per day and they don't need a lot of maintenance, which is always nice.

</comment><comment><USER3> Not the answer you're looking for, but I found it too busy, unintuitive, and the lack of non-distribution for the OSS version finished off my test run. I use Graphite, have done for years, and am quite happy with it.

On a further note, I attended Grafanacon and saw a few keynotes given by the CEO of InfluxDB and have never been more turned off of using a product by a single person.

</comment><comment><USER4> You pay for it. I've not enjoyed using the Influx "API" either, or some of their bizarre API practices such as returning HTTP 200 OK with a failure message.

Federated prometheus or timescaledb maybe?

</comment><comment><USER5> There was lot of memory leak when used as the storage for prometheus for our kubernetes cluster. we ditched it after trying various versions.</comment>


Ask HN: USD Drones on Amazon are they any good? - <AUTHOR> I am contemplating purchasing one of the relatively cheap 5G GPS drones that are sold on Amazon. My specific application is to take aerial photos/video of my forested acreage to use for development planning. I have read several positive reviews on Amazon but from past experience I know you can't really trust Amazon reviews due to them requiring approval and mediation before allowing negative comments. <comment><AUTHOR> The drone I am particularly interested in is the""Holy Stone HS165 GPS Drone FPV Drones with Camera for Adults ""</comment>


Silicon Valley Startups Awash in Dollars, Again (2007) - <AUTHOR> https://www.nytimes.com/2007/10/17/business/media/17bubble.html <comment><USER2> I think some interesting takeaways from reading this article in 2019 are:

\- One "black swan" doesn't happen twice. Though Taleb would disagree, i.e. he'd say that neither the dot-com bubble nor the 2008 crash were black swan events, but for most investors, entrepreneurs and traders they were. In any case, we are somehow immune to big random negative-impact events repeating themselves. We are not that stupid. The Bubble 2.0 didn't happen though something else, unrelated, did.

\- The predictions of the time assumed that Internet was there forever. Very soon a dramatic landscape shift happened with the release of the iPhone. We are not living in a purely Internet era anymore, and all the surviving Internet megacorps have managed to embrace the shift (Google, even Facebook with its Messenger), and those who haven't are dead (Yahoo, and probably more to come).

\- What we think will happen next is probably wrong. We can't even say whether there will be another technological shift or both the Internet and the mobile are here virtually forever. Something that has already failed can make a come back. In 2007 Taleb mocked e-scooters, for example, now look at their impressive comeback. He also thought in 2007 that Google will be replaced with something else just as quickly and abruptly as Google replaced Alta Vista. Bottom line: don't try to make arbitrary unsubstantiated assumptions even if your name is Nassim Nicholas Taleb. We suck at predictions.

\- I think one key difference between entrepreneurs and investors is that the former don't try to make predictions much, while the latter depend on predictions. One corollary being that entrepreneurs should probably ignore the buzz or what the most funded tech is at any given point in time (something- dot-com, IoT, blockchain, AR, AI, ...) and just do their thing: bring their dreams into life regardless of what everyone else is saying.

<comment><USER3> >both the Internet and the mobile

So... the internet on a big screen and the internet on a small screen?

<comment><USER2> Not quite. One is Internet on your desk and the other is Internet in your pocket. It makes certain things possible that would previously make little sense. You would not tweet a video from a protest rally; you would not message or listen to podcasts or read something or do trading while commuting; online banking wouldn't be that safe and secure; you wouldn't have an interactive map in your palm while in a new city; and a thousand more things that today exist only on mobile - thanks to the compact touch interfaces and the Internet of course.

<comment><USER4> You could SMS and MMS from a protest, you could do banking with a phone call.

It's all progressive improvements. Networks converged to internet and TCP/IP while devices converged to computers everywhere with colored screens of various sizes.

<comment><USER2> > you could do banking with a phone call

Try to do what e.g. Revolut, N26 and similar apps are offering over the phone. It would take ages. This is a really bad comparison.

Sometimes progressive improvements become a breakthrough, though I wouldn't call the invention of touch UIs a progressive improvement. It was a massive one. We take it for granted today but before the release of the first iPhone very very few people would have imagined it, let alone that it could change the world (which it did).

<comment><USER5> IDK, we had Palm devices and the Treo before iPhone. Dropping the keyboard and stylus for a finger was probably inevitable.

</comment></comment></comment></comment></comment></comment><comment><USER6> I saw an NYT piece about profits mattering again in Silicon Valley: [https://www.nytimes.com/2019/10/08/technology/silicon- valley...](https://www.nytimes.com/2019/10/08/technology/silicon-valley- startup-profit.html)

I don't quite agree that this is actually what the issue is lately. I think there have been two types of bubbles in the general startup ecosystem over the past few years that are not related to whether early stage startups are profitable:

1) One has been the under-estimating of unit economics in companies that interact with the real world (unlike pure software companies), which caused a lot of 'Uber-for-X' startups to go under, not to mention Uber itself struggling to maintain its hoped-for valuation.

2) The second aspect has been the influx of late-stage money into companies like Uber and WeWork, delaying IPOs, which has definitely caused some irrational exuberance in the sector.

<comment><USER7> Check out Scott Galloway on Twitter ([https://twitter.com/profgalloway](https://twitter.com/profgalloway)) and his website (linked from his Twitter bio). He's been calling out Uber and We for awhile. He has also had some heated exchanges with SV VCs on Twitter.

In the case of We I think you are being too generous thinking the IPO is only delayed. The S1 pulled the covers back, and I'm not sure it will ever IPO and may end up out of business.

Uber is not in a much better position, as their financials only work by significantly raising prices and/or driverless self-driving coming to market. I think the later is much farther away than people assume.

<comment><USER8> His blog seems really interesting, thank you for mentioning it!

</comment></comment></comment><comment><USER9> I love these cherry picked legacy articles from 'the paper of record'.

So I will cherry pick what I think are the two best parts:

> Consider Facebook, the popular but financially unproven social network, > which is reportedly being valued by investors at up to $15 billion. That is > nearly half the value of Yahoo, a company with 38 times the number of > employees and, based on estimates of Facebook's income, 32 times the > revenue.

Facebook has a market value now of $525 billion and obviously and $30 billion in EBITDA.

...and...

> Twitter, a company in San Francisco that lets users alert friends to what > they are doing at any given moment over their mobile phones, recently raised > an undisclosed amount of financing

In particular 'lets users alert friends to what they are doing'. I remember when twitter came out people were tweeting what they ate for lunch.

</comment><comment><USER10> The article is from oct 2007(*fixed), around the same time of the video: "Here comes another bubble"

[https://m.youtube.com/watch?v=I6IQ_FOCE6I](https://m.youtube.com/watch?v=I6IQ_FOCE6I)

<comment><USER11> I wouldn't say that 2007 was a bubble though, at least not in the tech world. Social media wasn't properly realized at the time so for example Facebook being valued at 15 billion or Linkedin at 1 billion made sense. There could have been ten similar sized competitors to both of them and the valuation would still have made sense since one of them would win.

<comment><USER12> That's what makes reading this piece 12 years later so interesting - there was definitely fear of a bubble in 2007 (probably partly due to the trauma of the 2000 dotcom bust) even though in retrospect there definitely wasn't. It's funny how it described Facebook's $15 billion valuation as a sign there might be a bubble, when FB now is valued at $525 billion.

</comment></comment></comment><comment><USER13> This piece made me very nostalgic for the days when there was no clear connection between a massive, non-paying userbase and income generation.

<comment><USER14> I did not see the connection, but I think private market investors did. They saw that if you could sell web ads (Google) or sell mobile ads (Facebook) at zero marginal cost to each additional advertiser, you'd have a company worth 10x revenue. Investors made that bet and for the most part have all been paid very well.

<comment><USER13> In my mind the web has always had ads although maybe for a brief period this wasn't true.

The real turnaround that happened around this time and I guess before is that the platforms started realising how valuable user data was and the relative value of "smart" data-driven advertising as compared to "dumb" content- based ads.

Now when I see that a platform has amassed x million users I'm very cynical about their motives for doing so.

</comment></comment></comment><comment><USER15> I don't think the right question is: are we reliving 2000 or 2007 in startup investing.

I think the right question is are we looking at a Google or a Webvan _.

_ yes, I know Webvan may have been a "good idea"

<comment><USER16> We had this debate in 2007 on hacker news (I had a different account)..

Webvan today is Instacart. FB is very valuable. Hindsight is 20:20. I think companies stay private longer to ride out the market not being ready for them long term. But maybe Uber waited too long.

"Consider Facebook, the popular but financially unproven social network, which is reportedly being valued by investors at up to $15 billion. That is nearly half the value of Yahoo, a company with 38 times the number of employees and, based on estimates of Facebook's income, 32 times the revenue."

</comment></comment><comment><USER17> Non-paywalled version: [http://archive.is/INi6u](http://archive.is/INi6u)</comment>


Replacing JQuery with Vue.js: No Build Step Necessary - <AUTHOR> https://www.smashingmagazine.com/2018/02/jquery-vue-javascript/ <comment> ix-hispana Sometimes framework peeps can get caught on complex stuff because it's more interesting. While talking about static analysis, HOCs, immutable thunks and so on is cool, I'm glad Sarah went down to planet Earth to speak to the mortals. There's a lot of market potential for Vue in legacy sites.

</comment><comment><AUTHOR> I understand that this is probably not the ideal way to use Vue.js, but I love the clear examples and the guide to baby steps into Vue.js. I've got a lot of legacy sites that I work on, where a full build system and conversion isn't tenable, but something as shown here, totaly is.</comment>


The Time Needed to Write "Effective Modern C++" - <AUTHOR> http://scottmeyers.blogspot.com/2015/04/the-time-needed-to-write-effective.html <comment><USER2> Is this guy actually writing C++ programs in the wild? He often presents himself as an apostle in the C++ church, but, I am always surprised that he does not seem to apply his guidelines into any practical project of his.

As a programmer, I'm suspicious when people have opinions and give advice but never showed me more than snippets of code. Like a master tailor that wouldn't sew. How come he gets that much recognition and respect?

I would be much more inclined into accepting advice from someone like, say, Carmack, that has successful projects in C++ under his belt. (Many people consider Doom 3's code beautiful C++, yet, the choices made there are very controversial, and far from "modern".)

I also put Bjarne Stroustrup in the same category.

What do you think?

<comment><USER3> His webpage: [http://www.aristeia.com/](http://www.aristeia.com/) indicates that he has been a programmer since 1972. Even if he has been doing training/consulting for a couple of decades, that leaves a lot of time to get the basics down. I've never met him, though I have browsed one of his books once.

My own personal feeling is that books like these can be invaluable for people starting out in the industry. It gives you a reference point to relate to. If he can explain things well and people can understand his writing, then it can be useful even if the person isn't the best living coder on earth.

At some point in your development, you need to branch out from what people are saying in books and start to form your own opinions. You have to start questioning what the "experts" are saying and try to experiment with other techniques. It is frustrating when people hang on to certain ideas just because a famous author said it. Sometimes it holds us back. It doesn't make their contribution any less valuable, though, because at least newbies are getting to a certain level due to the well written books.

<comment><USER4> I largely agree with you, BUT, this version of Effective C++ was less opinion and style oriented and more a guide to avoiding easy to make mistakes with some of the new C++11 and C++14 features. Not following many of the guidelines will result in incorrect and broken code.

My recollection of the older books is that they covered "best practices," and ignoring them may have been bad style, but the code would still be technically correct. Quite a few are still style issues, but it's important to recognize the difference before deciding to ignore them :-)

</comment></comment></comment><comment><USER5> I write C++ for a living and I like it, but it bothers me that we need a book that's essentially a list of "you can easily fuck this up by accident, watch out!"

for now, it seems that C is insufficiently expressive and everything else is too slow. but the complexity of C++ is troubling.

<comment><USER6> Everything else _isn 't_ too slow, though, especially if you hit any meaningful IO.

<comment><USER7> Or if you use clever algorithms. I don't have benchmarks at hand, but I suspect that an FFT in Python is faster than a naive Fourier transform in C.

<comment><USER8> Err, why?

<comment><USER9> Because the FFT in python is almost certainly implemented in C, and probably more cleverly done than a naive FFT that I/you/someone would whip up as part of a C program.

<comment><USER8> Is this a joke? Something written with the same algorithm in c will be faster than python. Why not use someone elses non naive FFT impl in c then as well?

<comment><USER10> I think the argument isn't that Python code out performs C code, it's that code written by mediocre Python programmers often outperforms code written by mediocre C programmers. C code is fast enough the mediocre programmers get used to letting the language bail them out. Python programmers know that their language is slow and that they have to work around it.

I've encountered this several times in my own career. A co-worker who writes in C will be implementing a process in parallel with my Python implementation. A week later, my O(N) Python code is outperforming my colleagues O(N^3) C code, since I chose a more complex algorithm which is trickier to get right. The C programmer then re-implements my method in C, which would completely trounce my own code, except I've spent that time leaning on BLAS and LAPACK, speeding up my operations again. The C programmer then starts using fast libraries instead of her own code, again beating my old source, only to find that I've now pushed a good chunk of the processing onto the GPU.

Eventually, I will run out of tricks. The final draft of the C code will trounce the final draft of my Python code. However, during most of the creation process, my Python usually out performs their C. Also, a truly talented C programmer would write my colleague's final draft as her first draft, negating every advantage that I had in the process. However, that's not a situation that I'm likely to run into, because places hiring truly talented programmers aren't likely to be hiring me.

<comment><USER8> Makes literally no sense. The c developer would simply use the same c/fortran library the python implementation is based on. You are creating a false dichotomy for the sake of it.

<comment><USER10> The c developer _should_ use the same c/fortran library that the python implementation is based on. A _good_ C developer _would_ use that library. In my experience, mediocre C developers will _not_ use that library and will implement their own, naive version.

<comment><USER8> This has not been my experience.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> All of his books are great - especially the one on STL. Herb Sutter wrote some great C++ books also. On a side note, based on that picture of him sitting at this desk, he is still using iPod V1

<comment><USER12> Sutter's written that we should use "async" everywhere (even though conventional threads have numerous advantages) and that we should use "auto" everywhere (even to the point of writing "auto x = int{5}" instead of "int x = 5" and "auto foo() -> void" instead of "void foo()"). I'd take his advise with a grain of salt.

</comment></comment><comment><USER13> I wonder how long it took Kernighan and Ritchie to write 'The C Programming Language'? Amazon says the 2nd edition (1988) is 272 pages long but looking back, it felt like it was 80 pages :) Going by the OP's math (of the language creator being twice as productive) prolly 4 months?

<comment><USER14> Remember that that's inluding like 60 pages of what are basically printed man pages.

<comment><USER15> When K&R was written, it's not a given that the man pages for C functions already existed, is it?

<comment><USER16> They were, albeit potentially more terse than is available now. System III's functions section was pretty full by 1983 even [1].

[1] [http://minnie.tuhs.org/cgi- bin/utree.pl?file=pdp11v/usr/man/...](http://minnie.tuhs.org/cgi- bin/utree.pl?file=pdp11v/usr/man/u_man/man3)

<comment><USER17> _System III 's functions section was pretty full by 1983_

K&R was published in 1978

</comment></comment></comment></comment></comment><comment><USER18> This is interesting, but the hours are vastly overestimated, at least compared to similar metrics (e.g. from the deliberate practice and expertise literature):

 _If we figure a 40-hour work week... it wasn 't my only activity. Let's knock that number down by 20% to account for my occasionally having to spend time on other things._

There's no way anyone spends 40 or even 30 hours a week _writing_. Most authors spend something like 3-4 hours a day writing - and that's a good day!

See for example the chapter on writers in Cambridge Expertise Performance Handbook ([http://www.amazon.com/Cambridge-Expertise-Performance- Handbo...](http://www.amazon.com/Cambridge-Expertise-Performance-Handbooks- Psychology/dp/0521600812)).

In general this type of reasoning (40h work week => time for 40h of writing) makes time estimates troublesome in my opinion. Another example is people who claim to write code for 40, 60 or even 80 hours a week. A look at actual RescueTime data gives a sober picture: [https://news.ycombinator.com/item?id=209195](https://news.ycombinator.com/item?id=209195)

Of course, you could claim a lot of the work happens in breaks, and I would agree. But then the actual weekly number for our most beloved artists, programmers, and scientists is more like 24*7, literally. In that case, it makes more sense to talk about it in on the timescale of days, weeks, months or years.

<comment><USER19> I find the hours amazing. My understanding is that a typical tech publishing cycle is three months for a first draft, with an SD of around 1.5 months, and a page count of 300-600. Not infrequently the book will be a side project and not the author's main gig.

E.g. When iPhone OS (as it was) first appeared, in-depth guides like Erica Sadun's were on the shelves almost as soon as it was released.

Even if some of those authors had limited distribution beta versions, they still worked their way through all the new features of the OS, wrote and tested sample code, and wrote all the content in a couple of months.

I understand Meyers wants to make sure the content represents industry practice, and that takes longer than just cranking out some code and making sure it works.

But even so - that's still a surprisingly long time for a tech book.

</comment></comment><comment><USER20> When I track my time scrupulously, the results are significantly different than what I thought they would be and also quite different from what, several weeks removed, I remembered re the project.

So, when I read an article that does back of the envelope calculations on time spent, based on rough estimates (20% on other projects, etc.), I find myself suspicious of the computed results.

</comment><comment><USER21> With the amount of time invested into writing the book it would be interesting to see what type of financial return he was able to get for it. Certainly I would hope he was able to make as much as if he were working in private industry for the same amount of time. (though somehow I doubt this is the case)

<comment><USER22> To within a disturbingly accurate margin of error I can tell you right now his financial return for this book: zero dollars.

There isn't enough money in tech books for writers to rely on it as a day job. At best it'll get you noticed and make other jobs or speaking engagements easier to get.

<comment><USER23> I am inclined to disbelieve you.

I could agree that tech writing in general doesn't pay well, but this is an author who has sold over 150,000 physical copies, in addition to whatever virtual sales (like mine) he's had. Even if his take is 10% for a $30 book, that's still respectable income.

<comment><USER22> I had no idea where you came up with the "150,000 copies" figure but then I ended up seeing the same thing listed on a page about "More Effective C++", which has been in print for 2 decades. Even if he received $3-4 per copy sold for all those books, that's over a 20 year timespan, that only works out to $20k or so a year, although he does have other books. It's possible that Scott Meyers might be a sufficiently popular author to be able to support himself just on book income at a level comparable to having a decent day job, but at best it's a very close thing and even so he would be one of the extremely rare few who could do so.

</comment></comment></comment></comment><comment><USER3> Very interesting to reflect on the amount of time needed to write a technical book on a programming language. If I compare that to amount of time taken to write code (and forgive me for the horrible KLOC metric), I think one could easily average about 300 lines of good C++ code (including tests) per day on a new project -- probably more if you are working alone, but let's keep it conservative. So about 37.5 lines per hour * 1350 hours = ~50KLOC. Say half of it is tests, so that's a medium sized app.

I don't know why, but writing a book seems waaay more effort than churning out ~25 KLOC of tested C++. I guess it is what you are used to...

* 300 lines per day is what I averaged over a multi-year period when I was a C++ programmer. But that was more than a decade ago, so I'm guessing it would take less lines of code with "Effective Modern C++" ;-) (and yes, I measured it for interest sake...)

<comment><USER24> > I don't know why, but writing a book seems waaay more effort than churning > out ~25 KLOC of tested C++.

It is. I wrote a programming book, and the code for each chapter was always a breeze compared to writing the prose.

I rationalize it by thinking of English as a programming language. It has a fantastically complex syntax and semantics, tons of undefined behavior, and a few billion interpreters out there, each with a large number of quirks and bugs.

Writing a program in English that does the more or less correct thing on all of those interpreters ain't easy.

<comment><USER25> I'm actually finding it hard because I feel like I need to re-write all the old chapters each time I write a new one.

The problem is as I go from A to B to C when I get to D I realize I really want the code to be in a different shape. But to do that I either need to make a C' where I take a timeout to explain why I'm refactoring the code before I move on to D. Or, I need to go re-write A, B, and C so they fit directly into D.

Making C` sucks because it's irrelevant to whatever the topic is. But re- writing is also a ton of work.

You could argue I should start at Z and work backward but I'm writing as I go so I don't know what Z is yet.

</comment></comment></comment><comment><USER26> Could somebody redpill me on why something like D ([http://dlang.org/](http://dlang.org/)) is not a better alternative to C++. Is that the library support or what exactly makes C++ still a better option in 2015? I am not sure what is the best alternative to C++.

<comment><USER27> When you develop something you consider not only the features of the language itself, but also the availability of libraries in this particular language. There is a large amount of high-quality C++ libraries and C++ can consume C libraries seamlessly. In most other languages you need to write often unsafe bindings to connect to C.

D simply doesn't have enough libraries to make it a viable choice except maybe for some niche area. For example, there are only 6k D repos on GitHub ([https://github.com/search?utf8=%E2%9C%93&q=language%3AD&type...](https://github.com/search?utf8=%E2%9C%93&q=language%3AD&type=Repositories&ref=searchresults)) compared with 340k C++ repos. Also any high-performance code (at least in the area I'm working) is written in C++ or, sometimes, in C.

<comment><USER26> Thanks for the answer this is exactly what I was looking for. It seems that C++ is in a sweet spot and it is going to be hard to challenge its position.

</comment></comment></comment><comment><USER28> I actually finished this book today. It's a great resource on the various pitfalls and good practices that are present in C++11/C++14, and they are presented in a very readable format that really lends itself to referencing later on. I highly recommend it.

</comment><comment><USER29> I've read couple of Effective C++ series books by him and I've found Effective STL to be the most useful book for my day-to-day C++ programming at work.

</comment><comment><USER30> It's a must have book.

</comment><comment><USER31> Love the book!</comment>


Gamow's cyclist: a new look at relativistic measurements for binocular observer - <AUTHOR> https://royalsocietypublishing.org/doi/10.1098/rspa.2019.0703 <comment><USER2> What a lovely paper! I loved Mr Tompkins and spent a lot ot time in high thinking about how various things would look. Nothing this sophisticated of course so this was such a pleasure!

</comment><comment><USER3> If you like the article, here are some videos I made a while ago, showing what might be seen by the traveler in the twin "paradox" as she leaves and returns to base (click "show more" to see the terse descriptive text): [https://www.youtube.com/playlist?list=PLvGnzGhIWTGR-O332xj0s...](https://www.youtube.com/playlist?list=PLvGnzGhIWTGR-O332xj0sToA0Yk1X7IuI)

One of them is a 3D "Tompkins" view : [https://www.youtube.com/watch?v=4lZXFXWN37M&list=PLvGnzGhIWT...](https://www.youtube.com/watch?v=4lZXFXWN37M&list=PLvGnzGhIWTGR-O332xj0sToA0Yk1X7IuI&index=7&t=0s)

View in 1080 rez to see the clocks etc.

<comment><USER4> That video make me feel unhinged.

And reminds me of [http://www.memo.tv/works/fight/](http://www.memo.tv/works/fight/)

> FIGHT! is a Virtual Reality artwork where the viewer's two eyes are > presented with radically different images, resulting in a phenomenon known > as binocular rivalry. The conscious mind does not 'see' both images, but > unpredictably alternates between them with unstable, patchy transitions > depending on the viewer's physiology.</comment></comment>


Small Features  - <AUTHOR> http://www.instigatorblog.com/small-features/2011/11/24/

<comment><USER2> How do successful dev teams control "appendage" features? Consensus is time consuming to build.

<comment><USER3> I want to know as well.

My guess is one or two people take charge of the product direction, be they developers, or business development, or whatever.

(I've been on a few teams where one person has taken this Product Manager- esque role, and made sure we don't run off the path and into the Brambles of Indecision.)</comment></comment>


Lifestyles of the Rich, Young and Homeless - <AUTHOR> https://medium.com/better-humans/6620882dde89

<comment><USER2> It gets harder to do the older you get though.

<comment><USER3> yep.</comment></comment>


Quit your fucking Job – Why we need to rethink German Company Culture - <AUTHOR> http://9elements.com/io/index.php/quit-your-fucking-job-why-we-need-to-rethink-german-company-culture/ <comment><USER2> It's much worse over here in the US. Employers in the US have most people over a barrel. Most employees put the shackles on themselves by running up too much debt due to advertising and a materialistic culture.

A lot of people don't realise how powerful a position of strength is when dealing with unreasonable employers. If your skills are in demand you are in a position to quit (i.e. you have F.U. money), you can create a better work environment by letting the employer know ahead of time that there are certain things you won't tolerate. If they choose to sever the relationship because of this (Shitty American employment-at-will practise), you can find a job elsewhere, and they are stuck having to recruit a new person for the job.</comment>


Ask HN: Negotiating with Several Offers? - <AUTHOR>

Dear HN,
I'd like your advice on something.
I'm working in software and recently decided to switch jobs. Last week I finished interviewing and now have four offers from four smallish companies. They're all exceptional places to work: very talented engineers, very friendly employees, driven and knowledgeable founders, very interesting work, and so on. I would be happy working at any of these companies, although I have put together a ranking of which companies I prefer to work on.
So my question is: Given that I have four good offers, how can I negotiate a better offer?
It feels unprofessional to ask for a certain compensation, and then, if given that compensation, reject the offer anyways. But on the other hand, if all the companies were willing to offer 15% more compensation, perhaps the company I want to work for most would be willing to offer it as well, so it seems like I should try to negotiate with several offers at once.
What would you do in this situation (if negotiating a higher compensation were important to you)? What is a professional and tactful way to, roughly speaking, discern what a company is actually willing to give to hire me?
Thanks! - Dave <comment><USER2> Dave,

Figure out where you want to work the most. Don't be a fence-sitter in this regard. Follow your gut.

Next, let that company know that you have another offer that is better than theirs. Explain that you really want to work with them and ask if they would be willing to match the offer. Negotiate for more vacation time as well, but do it all at once.

If they don't match the offer then see what the best they can do actually is and take it. A few dollars here or there aren't going to change your life in the long run. Go and be happy.

<comment><USER3> Can't upvote enough. Many people I know, including myself, made the mistake of going for the highest salary / best benefit package, disregarding other factors. Big mistake!

Taking an extra $5000 on your salary, while you might think is good, doesn't necessary translate to a better work environment. I see this problem a lot, where people go for the highest monetary offer. Some places have more to offer than a few extra bucks. They can offer a long career plan, smarter/better colleagues, and ideally a place where you will continue to learn even 3-5 years in.

I highly encourage you to take partisan's advice.

Waking up every morning and being excited to go to work is much more important than making some extra $$ and having low morale.

<comment><USER4> Can't stress this enough. I took a 30% pay cut from my previous employer to work at my current job, and I could not be happier. Work from home, interesting/hard problems, flexible hours, and most importantly, I could not find team members as smart or kind as I currently work with.

You spend a third of your hours alive working (roughly speaking); enjoy them.

</comment></comment></comment><comment><USER5> [http://www.kalzumeus.com/2012/01/23/salary- negotiation/](http://www.kalzumeus.com/2012/01/23/salary-negotiation/) has some good advice.

<comment><AUTHOR> Wow, that's an awesome resource. I think I read this earlier, actually, and it helped me get over my initial aversion to negotiations, but it doesn't mention trying to use several competing offers as a negotiation point.

That said it is also coming from a slightly different perspective; perhaps trying to "play" companies off each other is really a little sleazy, I don't know... It certainly sounds worse when I put it that way.

<comment><USER6> And what do you _think_ it's their basis for salary? What other people are willing to work for, so "sleazily" playing other people against you. For example, for some reason e.g. google in europe pays a lot less than they pay in the states. It's not because people in Europe provide far less value, but because they can. Salaries are market-based and that works both ways, the better market you find yourself in, better for you (companies are not going to look twice).

</comment></comment></comment><comment><USER7> It wouldn't hurt to ask them if they could pay "market value". After all, those other offers are proof of your _actual_ market value - not some abstract idea of what you are worth.

I wouldn't mention your other offers unless they press you to justify how you arrived at your "market value" number. No one wants to be in a bidding war. If they give you the "We think we are offering matches the market." then ask them if it would change their minds if you could show them what the actual market it.

"I've considered everything and if you raise the offer to market value and add bit more vacation I can start on Monday."

"I'm looking forward to working with you. Make it $N and X weeks vacation and we have a deal."

Let's face it though, some places just do not value engineers. If they are cheap at the start, they will never, _ever_ "make it up to you".

</comment><comment><USER8> just be careful when asking online! [http://www.quora.com/What-is-the-best- way-to-start-my-career...](http://www.quora.com/What-is-the-best-way-to-start- my-career-Uber-or-Zenefits)

<comment><USER9> There seems to be more backlash against the CEO for revoking the offer than the asker.

</comment></comment><comment><USER10> > how can I negotiate a better offer?

Which company most believes you can add real value, create the biggest positive impact, & help generate revenue? Understanding others perceptions is essential to successful negotiation.

Suggest reading Stuart Diamonds brilliant book, Getting More. Here's his presentation @ Google > [https://www.youtube.com/watch?v=ZOZo6Lx70ok](https://www.youtube.com/watch?v=ZOZo6Lx70ok)</comment>


LulzSec Redirects 'The Sun' Homepage To Fake Murdoch Death Story - <AUTHOR> http://techcrunch.com/2011/07/18/lulzsec-hacks-the-sun-redirects-homepage-to-fake-murdoch-death-story/ <comment><USER5> News International (NWSA) lost about 5% of its stock value today, and with a special session of the UK Parliament on Wednesday all bets are off - <USER2> Cameron is badly damaged enough, the Lib Dems could pull out of the government on principle leading to a snap election, although I would give that only a 20% chance of happening.

Murdoch is probably doomed; unless he pulls a rabbit out of a hat at the Parliamentary committee meeting tomorrow morning, his stockholders seem almost certain to revolt. I'm kind of surprised that his board hasn't cut him loose yet. This Lulzsec joke is in poor taste, but right on the money as a piece of satire. Curiously reminiscent of a 19th century Thomas Nast cartoon jesting about the funeral of NY Tribune publisher (and neckbeard _extraordinaire_ ) Horace Greeley.

EDIT: [http://www.bloomberg.com/news/2011-07-18/news-corp-said- to-c...](http://www.bloomberg.com/news/2011-07-18/news-corp-said-to-consider- naming-chase-carey-as-ceo-suceeding-murdoch.html) suggests NWSA is indeed planning to give Murdoch the boot. Oh, how the mighty are fallen.

EDIT II: A more illuminating story from the trades [http://www.adweek.com/news/television/if-rupert-goes- chase-c...](http://www.adweek.com/news/television/if-rupert-goes-chase-carey- next-news-corp-ceo-133321)

Edit III: I can't help noticing that Mr Carey looks an awful lot like the Lulzsec mascot with those curly mustachios. Coincidence? I think not!

 _I'll show myself out_

<comment><USER6> Murdoch would have done better if he continued to make up news instead of trying to hack phones and report the truth.

<comment><USER7> To be sure, he is ultimately responsible, but I highly doubt he himself sanctioned or approved of those actions.

<comment><USER8> From what I've read, in the WSJ editorial today perhaps foremost, he sanctions those activities implicitly if not explicitly. Don't forget in the midst of all this the NY Post front page story alleging DSK accuser not only of being hooker but pimped by her union! If it is the end of Murdoch, good riddance.

</comment></comment></comment></comment><comment><USER9> From the fake article:

One detective elaborates. "Officers on the scene report a broken glass, a box of vintage wine, and what seems to be a family album strewn across the floor, containing images from days gone by; some containing handpainted portraits of Murdoch in his early days, donning a top hat and monocle."

I've got to give it to them, that's hilarious.

<comment><USER10> A box of vintage wine?

I thought these were boxes of wine: [http://www.instructables.com/image/FO6BCL6F8DOSUHR/FINISH- OF...](http://www.instructables.com/image/FO6BCL6F8DOSUHR/FINISH-OFF-THE-BOX- OF-WINE.jpg)

<comment><USER11> That's the joke.

</comment></comment></comment><comment><USER12> According to sabu they're going to release the sun's email dump tomorrow.

<http://twitter.com/#!/anonymouSabu/status/93062692327264256>

</comment><comment><USER13> I thought lulzsec said they were done after their 50 day mission? Guess they had to come back for this.

<comment><USER14> Anybody can claim they are from lulzec.

<comment><USER15> False. Only those involved in LulzSec can post to the Twitter page.

Edit: Though, looking at the screenshots of the tweets on the TechCrunch page, they don't actually explicitly say it was them.

Edit 2: They did claim responsibility for it (just not in the tweets TechCrunch took a screenshot of).

<comment><USER16> You're making the mistake of thinking the twitter account is somehow "official." It is, again, just an "anybody" claiming to be in LulzSec

<comment><USER17> "Anybody" who has the password to the Lulzsec Twitter account. Or who, very unlikely, hacked Twitter.

</comment></comment></comment></comment></comment><comment><USER18> Seems that the websites of all of NI's newspapers are down:

<http://www.thetimes.co.uk/> <http://www.thesundaytimes.co.uk/> <http://www.thesun.co.uk/> <http://www.newsoftheworld.co.uk/>

</comment><comment> mike-cardwell The LulzSec twitter feed is pretty active right now: <https://twitter.com/#!/LulzSec>

<comment><USER19> The LulzSec twitter feed now appears to be empty.

<comment><USER20> All twitter.com pages come up empty for me for the past 30-40 minutes.

<comment><USER21> They're all erroring out now. If the traffic from the redirect was enough to take one of News Corp's sites offline, I imagine that it's throwing Twitter to a loop too.

</comment></comment></comment></comment><comment><USER22> So much attention, so little value to society

<comment><USER23> Newscorp or LulzSec?

<comment><USER24> Both. But in that order.

<comment><USER25> Satire is an important form of political commentary.

</comment></comment></comment></comment><comment><USER26> A Javascript redirect has been added to <http://extras.thesun.co.uk/sol/breakingnewspage.html>.

<http://pastebin.com/pWQtngDc> (Line 8).

</comment><comment> mike-cardwell Firefox + RequestPolicy users are unaffected, thanks to RequestPolicy's defences against cross origin requests and redirects.

</comment><comment><USER27> we'll show those jerks that hacking people's voicemail is unacceptable... by hacking their CMS.

<comment><USER28> Not to excuse Lulzsec's actions, but don't you think that we should hold an international news organization to a higher standard?

<comment><USER29> We should... they are sufficiently compensated for their position as an international news organisation, that they should operate at a higher standard.

But the internet has leveled the playing field. We should hold _ourselves_ to a similar standard. Rather than lulzing as it burns. We should step up.

<comment><USER30> That's sort of like telling insurgents that they should engage in an infantry battle instead of roadside bombs. You can disagree with the cause but it's pretty obvious, given their capabilities, that they have to play by different rules.

Lulzsec don't have a half dozen global media organizations to push their point of view -- they have funny website redirects and email dumps. So that's what they're doing.

EDIT: Hey downmodder, read, I gave you permission to disagree with the cause if you want. Comment is about tactics.

<comment><USER29> If we're torturing analogies, that's like a child saying "but he started it!"

There seems to be a momentum developing based on adults who have been maintaining pressure on this story through legal investigative journalism... setting fire to a paper bag filled with shit on their doorstep and ringing the bell doesn't help.

(edit: didn't downvote you btw... that's for the drive-by kids)

</comment></comment></comment></comment></comment><comment><USER31> From Twitter:

"@thecoldgun It's like having a psycho mercenary on your side in a fight - <USER3> worry what they'll do when they're not."

</comment><comment><USER32> The Sun is now "dead".

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

<comment><USER33> www. works for me, * . doesn't.

*.newsinternational.co.uk has that error uniformly.

<comment><USER32> Internal Server Error - <USER4>

The server encountered an internal error or misconfiguration and was unable to complete your request. Reference #3.1fc38f18.1311029956.4e5f0fc

</comment></comment></comment><comment><USER34> This is the first time I've seen them "call their shots" - that is, this isn't just whoever they could bust into.

<comment><USER35> This is untrue. Hacks against the Arizona cops and (secondary) attacks on Sony were 'called' as well.

</comment></comment><comment><USER36> I wonder what Murdoch's response will be.

<comment><USER21> 410 Gone?

</comment></comment><comment><USER37> view-source:<http://extras.thesun.co.uk/sol/breakingnewspage.html>

edit: here's the right pastebin <http://pastebin.com/ksu585vM>

<comment><USER38> I read through the pastebin (the source is currently down) and I'm still not quite sure I get how Lulzsec did this. Could you (or someone) explain?

<comment><USER37> Heh, not sure how the pastebin got mixed up but I updated the post above. It was setting parent.location.href to the twitter account.

<comment><USER38> Thanks for updating! I've opened the new pastebin but still am not sure how it all worked together with the sun website to get it to redirect.

<comment><USER38> Do you happen to know how it got there? Though the pastebin does not show it.

</comment></comment></comment></comment></comment><comment><USER39> It would have been a little more convincing if they'd bothered to use an apostrophe: Media Mogul's Body Discovered. Not to nitpick, but you want a media prank to work, you need to think like media people. They wouldn't forget punctuation.

<comment><USER40> The grauniad would.

From wikipedia:

"The nickname The Grauniad for the paper originated with the satirical magazine Private Eye.[109] This anagram played on The Guardian's reputation for frequent typographical errors, such as misspelling its own name as The Gaurdian."

<comment><USER39> Who would know (outside the UK)? Thanks for that. (Maybe the lack of apostrophe was on purpose!)</comment></comment></comment>


Berkeley High May Cut Out Science Labs - <AUTHOR> http://www.eastbayexpress.com/ebx/berkeley-high-may-cut-out-science-labs/Content?oid=1536705

<comment><USER2> I live in Berkeley and have tried to puzzle out this particular issue a bit. Here are some things I've learned:

* The title is misleading. Science labs will still be offered at BHS only they will take up more hours of regular class room time (they same way they do in every other high school in California). What is slated to be cut here are science labs during "extra periods" outside of the usual schedule. Overall, this would mean less hours for teaching science (labs and classroom) but the hours available are still in line with what is available at other, fine performing California high schools.

* BHS has the highest "achievement gap" in the state, along racial and economic class lines. Roughly speaking, the Hispanic kids perform (on average) at about the achievement level goals. The White and Asian kids (on average) above the goals. African American kids and poor kids (on average) fall below the goals. This is the basic inequity that the principal is attempting to address.

* The racial and class divides at BHS mirror the city as a whole. Berkeley is comprised of extremes: quite a few quite poor and quite a few quite rich people. Many people probably think of themselves as being in "the middle" of that but, really, it's a very polarized economy. The economic class divide coincides heavily with racial lines (e.g., odds are a poor person is Black and a rich person White). The high achieving kids tend to be, well, very high achieving: lots of AP classes and other fancy attachments to their HS diploma. They tend to be college bound. A lot of them come from rich families. This is one source of the polarized politics around the proposed changes at BHS.

* Faculty at BHS are antagonistically factionalized. BHS is divided into semi-autonomous "sub-schools" (called "small schools"). Students opt-in to one of these. Each small school has its own curriculum and policies and teaching philosophy. Part of the politicization of this issue with the science labs _appears to me_ to be some infighting among factions of faculty.

* Underperforming students do indeed appear to be under-served. One goal of redirecting funds here is to be able to afford to ensure that every single student at BHS has an academic advisor who monitors their performance and helps them become good students. Currently, students can coast through, achieving little, without anyone paying much attention.

* Money doesn't grow on trees. The opponents of this plan haven't suggested where else to find budget besides cutting the extra period science labs. BHS' per-student funding level is higher than state average but so are expenses around here - BHS ain't exactly flush, afaict.

* Its unclear any students will be harmed. One parent did tell me her struggling student benefited from these extra labs but I'm not so sure he would have benefited less given an academic adviser instead. Another parent complained to me that without the labs, it would be hard for his child to complete the requirements of several AP courses plus receive a "baccalaureate in international studies" which is offered by one of the small schools as a supplemental degree. (I found the latter parent's concerns understandable but hard to sympathize with.) Meanwhile, high achieving students can find plenty of opportunity at nearby University of California, several other colleges, Lawrence Berkeley Lab, etc.

* The principal might be an idiot in this matter. Several parents offered an argument against the plan that I thought was pretty good: The principal's proposal for how to spend the reclaimed budget is (as stated) too vague and lacks persuasive rationale. I won't be too surprised if not only does this plan go down in flames (labs not canceled after all) but, additionally, the guy loses his job. He pulled a few political parliamentary maneuvers to get the plan as far as he's gotten it and there is a lot of backlash now. (My take is that this is a shame because the impulse should be to refine and complete his plan rather than just lash out against it.)

* Opponents of the plan are playing pretty dirty with their rhetoric. One letter that went out to parents was saying (I paraphrase cynically here): "hey, you know global warming and swine flu? well, if we cancel these science labs there's nothing we can do about those things!"

* Metrics are not in sight. A comment by "riffer" in this thread offers the stereotypical "conservative" (I would say "common sense" in this case) complaint that teacher performance is off the table. It's even worse than that. The public debate around this issue utterly lacks any measured data about the performance of the courses slated for cancellation or the expected performance of the alternatives. In that sense, the entire question seems quite random - there's no good answer.

<comment><USER3> You have done a great job of laying out all the facts and points. I completely agree that the title is a little sensationalist. It doesn't seem like they are removing science from the curriculum completely, and indeed that would make no sense.

</comment></comment><comment><USER4> Firing teachers for poor performance: not allowed

Firing teachers who offer the most to high potential students: politically correct

I grew up in a town right next to Berkeley, and I'm not surprised. Just disappointed.

<comment><USER5> Actually firing the teachers of high-potential students isn't just politically correct, it's economically advisable.

NCLB dictates that funding will be awarded based upon standardized testing performance. Because schools are rated not just on the score, but also on their ability to _improve_ (regardless of their position), it's always advantageous for the administration to maximize test scores.

In this scenario, you have a small group of top performance students who are going to breeze through the state's dumbed-down tests, regardless of whether or not they participate in more advanced classes. So any money spent developing these students will not net you any additional NCLB score.

Whereas spending the money on struggling students provides the real possibility of raising your average score, thus guaranteeing more money- assuming you grow faster than other school's you're competing with.

Isn't competition great?

<comment><USER2> Public schools are, by design, redistributive. For that matter, the very bestest of the private schools are, by design (these days) redistributive. So, I don't think you can pin this one on misaligned government incentives to public schools - it's a deeply entrenched cultural value.

Personally, I think it's the right thing: rich or poor, the high-achieving students who breeze through are cheap and easy to educate. If the classroom isn't keeping them busy, it tends to be easy to find them extra-curricular opportunity. Meanwhile, many initially struggling students can be turned around and turned into huge cultural assets, education-wise. It's a good investment to try (in smart ways).

That said, the tenure system and lack of measurement of teacher performance is a huge problem. That's also true of both public and the best private schools.

<comment><USER6> "Personally, I think it's the right thing: rich or poor, the high-achieving students who breeze through are cheap and easy to educate. If the classroom isn't keeping them busy, it tends to be easy to find them extra-curricular opportunity. Meanwhile, many initially struggling students can be turned around and turned into huge cultural assets, education-wise. It's a good investment to try (in smart ways)."

You can't use cheap and extra-curricular activities together to form any reasonable conclusion. When the budget hammer falls the first thing thrown out are extra-curricular activities and the district will then point out how expensive they are to maintain. You toss out extracurricular like it has no structure or purpose. As if throwing some dice in the room is good enough activity. All of the leaques I participated in were highly structured, well- organized, and well-funded. And the teachers running these things were deeply invested.

The most brilliant and the most lacking are the most expensive students a school can have. I know this from a long time because my school was pushing for more gifted students, anyone that had a modicum of a functioning brain was tested. The state and fed kicked in extra money that was then diverted to other purposes: security, struggling students, ESOL.

"the tenure system and lack of measurement of teacher performance is a huge problem"

Tenure has been around for hundreds of years and no one has been able to explain why it's a bad idea. At the university level it makes sense. You devote yourself to years of work with no immediate payoff and you don't want that ruined by some bean counter. Unpopular ideas have to be protected the same as popular ones.

Tenure in highschool doesn't exist unless you can point to one that explicitly has it. This is not to confuse it with unions. There has been quantitative data of teacher performance available for years. The teacher knows it, the school knows it, hell the principal and vps also have access to it. The problem is these teachers have to be replaced. It's much cheaper to put pressure on a problematic teacher who knows the game after 10 years then train a fresh college grad who might stick it out for 1 year.

I've had 5 friends go into teaching after college. Only 1 is still doing it and she's only recently hit her stride (classroom control, curriculum, certification) after 4 years.

</comment></comment></comment></comment><comment><AUTHOR> "Paul Gibson, an alternate parent representative on the School Governance Council, said that information presented at council meetings suggests that the science labs were largely classes for white students. He said the decision to consider cutting the labs in order to redirect resources to underperforming students was virtually unanimous."

</comment><comment><USER7> What would be cool would be if all the high performing kids had to tutor the low performing kids. The nice thing about that solution is that it is both a) cheap and b) helps both parties, unlike this policy.

Unfortunately, the low performing kids might find that humiliating :/

</comment><comment><USER8> Before we (OK, "they") go making changes, I'd like the school to ask the underperforming students what the school can do to help them improve. While I suspect a long list of wisecrack responses, it's still remotely possible the troubled students have a vague idea what really needs to be done.</comment>


Show HN: Cenchat – Civilized commenting service - <AUTHOR> https://cenchat.com <comment><USER2> For a demo like this, it might be worth opening the platform without requiring a signup. This makes it easier for the HN community to check Cenchat out and play with it. Simply put, I am not certain that Cenchat is worth the effort of typing in my email, checking my email, opening a link, and completing whatever might come next. Basically, the landing page asks for "payment" before showing me what I am "buying."

Often when a website wants my email immediately, what I wind up buying is just spam about product updates for a product that isn't for me...which statistically Cenchat is, no matter how good it might be for other people. From the perspective of Cenchat as a organization, collecting my email up front doesn't distinguish between people who provide an email just to check it out and people who check it out and find enough value to sign up...those are the people who matter.

For people like me who are going to judge a website by its landing page the email signup is a wasted opportunity. It might be useful to look at how HN's signup process works.

Good luck.

<comment><AUTHOR> Interesting. Would you mind explaining more what you mean by opening the platform without requiring a signup? It sounds really literal but I'm at lost on how this would work. I mean, someone needs to have an account in order to do something.

<comment><USER3> They can look at other people's comments and in that way see how the platform works, without typing their email. Like here at HN, you can look at this topic and read other people's comments, also before you've created an account (typed your email) yourself.

... Aha, now I see you've added a demo :- )

</comment></comment></comment><comment><USER3> Interesting project. Would be interesting with a demo, or demo video or screenshots of how it looks like. There's the chicken and egg problem, right? Because:

 _" You can only send text comments to website owners and your followers. To everyone else, only stickers and GIFs"_

This means text comments to no one (except for the blog post author), usually — since it's unlikely that one's Facebook connections have stumbled upon the same blog post. I'm thinking this means, that in its current shape, Chenchat will be restricted to stickers and GIFS, hmm.

(Any thoughts about open source or not?)

<comment><AUTHOR> Valid feedback.

Agree that it's unlikely for your Facebook connections to stumble upon the same blog post. The chances could well improve though for your closest friends (and maybe co-workers) as there's a better chance of viewing the same websites due to similar likes and interests.

Although to make Cenchat really work to its full potential, you need to establish your followers/followings. When you do, you'll now be able to tag people into bringing them to the website (and comments section) or randomly stumble upon their comments as you're surfing the web. From there you could continue the conversations if any. This is usually what's happening in Facebook right now with viral contents.

For other cases, having conversations with the author is enough for them.

</comment></comment><comment><AUTHOR> Founder here. Also check out my blog post: [https://rmmmp.github.io/2018/06/30/alternative-to- disqus.htm...](https://rmmmp.github.io/2018/06/30/alternative-to-disqus.html) to see the idea behind Cenchat.

<comment><USER4> Would you say your proposal contributes to shutting off valid criticism and further reinforces echo chambers?

<comment><AUTHOR> I wouldn't say so. Although the reply is only directed to the author or your friends, it's still public and can go viral and influence a lot of people.

Thinking about it in a different way. In real life, you mostly just eavesdrop into someone else's conversations then keep your criticisms to yourself or discuss it among your friends rather than confronting the other group. If you truly need to speak up, there are other platforms well suited for that.

<comment><USER4> Interesting distinction. I approach comments on the internet more like comments on TV, which you broadcast to the entire world and can reasonably expect everyone to hear and comment on.

Perhaps this is not how most people approach conversations.

<comment><AUTHOR> With the current state of comments, I agree with what you've said.

However, if you think about it, there's a reason why comment policies contains stuff like "Before commenting, ask yourself if you'd say the same thing to that person in real life".

There's demand to approach comments as you'd approach them in real life. Not just saying everything you feel out loud without responsibility. It's just not happening though because people can hide behind the keyboard.

This is something we want to fix with the stickers and gifs restrictions which you could think of as the reaction of the person eavesdropping in your conversation if you happen to see it. Plus, stickers and gifs can usually sum up a persons thoughts and emotions as well. We could already see chat apps having minimal conversation by just using them.</comment></comment></comment></comment></comment>


Shnake: classic snake game in Bash - <AUTHOR> https://github.com/cesarbs/shnake

<comment><USER2> Great work. For those on OSX, replace "seq" with "jot -" and it works. (perhaps you could check for seq at the start and use "jot -" instead.)

The "wasd" keys get me each time. I've not lasted more than 10 seconds! Any chance of using arrow keys or hjkl instead?

<comment><AUTHOR> Thanks! I didn't know about jot on OSX, I'm gonna fix that. I'm thinking of making the keys configurable via command-line parameters (as well as some other things in the game). I picked the "wasd" keys from FPS games :)</comment></comment>


BA jihadist relied on Jesus-era encryption - <AUTHOR> http://www.theregister.co.uk/2011/03/22/ba_jihadist_trial_sentencing/

<comment><USER2> The fact that there's really nothing in between "Jesus-era" crypto and the 1970s that actually protects anything makes this article a bit hyperbolic. If he had used "Napoleonic" cryptography, or even WWII crypto, he'd have been no better off.

By modern standards, his data was simply "not" encrypted. That's not very interesting. An interesting story would have been, this guy didn't believe AES was safe, so he took a generic block cipher design and customized it, and _that_ got broken. Of course, that would never in a million years happen; had he simply taken DES and added a few rounds to it, nobody ever would have broken his cryptography.

</comment><comment><USER3> I think there's a much more important angle to this story than "lol the guy doesn't know crypto basics". The angle you're looking for is "White, Jewish kaffirs can't make anything as pure and effective as our Muslim bretheren".

I did a quick search on "islam cryptography" and came up with this:

Cryptography in Islamic Civilization [http://en.islamstory.com/cryptography- islamic-civilization.h...](http://en.islamstory.com/cryptography-islamic- civilization.html)

There's a series of howlers in this allegedly academic text:

"For transposition to be effective and secure, letters rather than words need to be rearranged, this effectively scrambles the message and produces an "Anagram". Transposition could be done for example by writing the order of letters in a word backwards, so that word becomes drow. It is more effective to rearrange the letters in whole sentences or the whole message rather than single words.

If transposition was not limited to words or a certain order the number of different possibilities for rearranging a thirty five letter message rises to 50,000,000,000,000,000,000,000,000,000,000 different distinct rearrangements making the task of working out the correct rearrangement impossible even if all the people on earth were to check a single rearrangement every minute."

...notice the careful attention paid to frequency distribution analysis, which the author later claims is another output of Islamic civilisation. Additionally, if you preserve word boundaries cryptanalysis can include word length, which makes breaking the cipher all the more easier.

"Substitution is the other method by the meaning of a message may be concealed...Working with the plain English alphabet, allowing the algorithm to be any arrangement of the different letter, it is possible to generate more 400,000,000,000,000,000,000,000,000 different distinct rearrangements of letters and so the same number of different ciphers, thus producing a high level of security, baring in mind that the recipient need only to keep the key safe."

Besides mis-spelling bearing, how, exactly, were you planning on distributing the key again? Is the distribution channel more secure than your allegedly secure cipher? What happens when you re-use the key? For the love of God...you'd have thought they didn't bother reading "Cryptanalysis" by Helen Gaines, if they even wanted to pretend to make an effective cipher.

No evidence for this, but I bet you the BA plotter was drinking the koolaid a bit too much and thought too highly of the 1400s.

</comment><comment><USER4> This person's lack of cryptography knowledge is pretty pathetic - but if even committed terrorists still think security by obscurity is the way to go, what chance do we have with the general public?

<comment><USER5> The articles mentioned that they knew about AES, PGP, etc but did not trust it because "non-believers" used/developed these protocols.

Instead, they developed their own encoding mechanism in the hopes that it would evade detection or decryption by possible backdoors in existing algorithms.

In many cases, security by obscurity is a viable tactic, especially in combination with other tactics.

<comment><USER2> For whatever it's worth to you, most of the pre-DES-era encryption techniques betray themselves to basic statistical analysis. It's hard to hide that you're using puzzle book crypto, even if it produces what appears at first glance to be binary gibberish.

Like I said, there is a security-by-obscurity game to be played with this stuff: tamper with a known algorithm (even if you don't trust it, it's not like you can tell the difference between AES and TEA just by looking at ciphertexts).

<comment><USER5> And that's assuming the traffic is being subjected to the statistical analysis required for detection.

Timing also plays a big role. Many times a piece of intelligence is only useful for a duration of x.

Narus boxes are not magic, they can only do so much ;).

<comment><USER2> I wrote this comment only to make it clear that the stats required to figure out if something is "really" encrypted are trivial. They take significantly less than a second for a Ruby program to perform. You'd just always run them.

Sorry I wasn't more explicit (or if you already realized that).

</comment></comment></comment></comment></comment><comment><USER6> "There were two kinds of codes in cryptography, codes that stopped your little brother from reading your message and codes that stopped major governments from reading your message, and this was the first kind of code..."

(from HPMOR: [http://www.fanfiction.net/s/5782108/62/Harry_Potter_and_the_...](http://www.fanfiction.net/s/5782108/62/Harry_Potter_and_the_Methods_of_Rationality))

<comment><USER7> That quote is derived from one that originally appeared in "Applied Cryptography" by Bruce Schneier:

"There are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files."

<comment><USER6> Awesome, thanks! I haven't read enough Schneier to have picked up on that (really just Secrets and Lies).

</comment></comment></comment><comment><USER8> A Caesar cypher, specifically.

Wow.

</comment><comment><USER9> I wonder what this idiot's actual job was.</comment>


Seattle Kraken announced as name for city's NHL team - <AUTHOR> https://www.kiro7.com/news/local/seattle-kraken-announced-name-citys-nhl-team/Y2MTOXIGBRDNTA7UNH3PEXRQ6I/ <comment><USER2> Seattle Times story:

[https://www.seattletimes.com/sports/hockey/release-the- krake...](https://www.seattletimes.com/sports/hockey/release-the-kraken-nhl- seattle-picks-fictitious-sea-creature-for-its-long-awaited-team-name/)

Yep, hockey is finally arriving in Seattle. Now let's bring back the curling club.</comment>


Tell HN: Ask Golang is my vacation project - <AUTHOR> http://askgolang.com/thread/59

<comment><USER2> Can anyone recommend some high-level/architecture/design patterns books/materials about Go? (e.g. similar to SICP or Art of Prolog, or maybe GoF).

<comment><USER3> <http://golang.org/doc/effective_go.html>

(aside: how is GoF "high-level/architecture/design"? it is just a collection of tricks for overcoming language inexpressiveness)

<comment><USER4> GoF is, in my opinion, about establishing a language to talk about commonly used constructs in languages - especially given it's providence in Christopher Alexander's A Pattern Language.

Referring to it as 'a set of tricks' would suggest to me that you've only given it a cursory glance and assumed that it's just about copying out example blocks of code, or that you've not worked in a wide enough set of languages to realize that every language has commonly used patterns for doing particular things, no matter how expressive the language is. Having a way to discuss the architecture of a piece of software without having to explain every implementation detail because there's already a shorthand refer to various parts of it is invaluable when working on larger projects. Being able to call a block of code as a flywheel is no more a trick than being able to refer to an options pricing equation as a 'modified black-scholes' - the important part is that other person knows from that what you're talking about and so you can get to the important part of the conversation.

<comment><USER5> > GoF is, in my opinion, about establishing a language to talk about commonly > used constructs in languages

I think it philosphically comes in part from that place, but the particular choice of constructs it addresses are a a commonly needed set that a particular language family's lack of expressiveness in certain dimensions required to be reimplemented using basically boilerplate code each time they were used, so it spends a lot of time documenting the set of tricks necessary to implement those constructs in that language family.

> you've not worked in a wide enough set of languages to realize that every > language has commonly used patterns for doing particular things, no matter > how expressive the language is

The more expressive a language is, the more the "commonly used patterns" can be turned into libraries rather than templates you have to apply with substitution each time you want to use them, and the less need there is for a book documenting the justification with _sample_ code, as you just need the actual _implementing_ code with documentation as to its _interface_.

OTOH, presentationally, its possible to document constructs is a pattern language for software without as much attention to implementation in a particular language as GoF provides. GoF particular choice of constructs and its choice of how to present them, I think, are very much shaped by desire to serve as an implementation cookbook -- a set of tricks -- for a particularly industrially-popular programming language family _as well as_ providing a common pattern language for software constructs that transcends particular programming language choices (and its success and popularity are in no small part due to its utility as a set of tricks.)

</comment></comment></comment></comment><comment><USER6> Vacations are for relaxing! this is how people get burned out....I like the idea though :D I've been wanting to learn go for a bit.

<comment><AUTHOR> > Vacations are for relaxing!

Maybe it wasn't exactly relaxing, but it has been fun!

> this is how people get burned out...

This is how I re-energize when taking a break from medicine :-)

</comment></comment><comment><USER7> Margins, please.

</comment><comment><USER8> Quick question about golang. In your code, go.user / user.go You have a Boolean function Guest(). Is this a common practice in Golang vs. writing it as IsGuest() ?

Thanks for sharing, BTW!

<comment><AUTHOR> I'm not sure if this is wholly idiomatic. I based it on the following from "Effective Go" [1]:

> _There's nothing wrong with providing getters and setters yourself, and it's > often appropriate to do so, but it's neither idiomatic nor necessary to put > Get into the getter's name._

Since I view "is/has" as derivatives of "get", I opted to omit the "is" from Guest(). But I'm open to hearing other opinions.

There is probably plenty that is un-idiomatic all over this code and one of the reasons I put it out there is to get feedback.

1 = <http://golang.org/doc/effective_go.html#Getters>

<comment><USER9> "GetX" is not idiomatic, but "IsX" seems to be idiomatic: <http://golang.org/pkg/net/#IP.IsGlobalUnicast>

</comment></comment></comment><comment><USER10> Where do you host askgolang? I have been working on a go server with websockets too. It seems like websockets cause trouble with Heroku, Google App Engine, and AWS (if you use the ELB).

<comment><AUTHOR> This is on an instance of the smallest linode available (1024MB). It sits there with all of my other side projects.

Load average is negligible despite the HN load:

        Load average: 0.04 0.06 0.06

I'm using Postgres on the backend and am not using any caching. This is being reverse proxied by nginx (so that I can host multiple golang projects on the same server over port 80).

</comment></comment><comment><USER11> It looks like the links are rendering backwards. e.g. src = text and text = src

<comment><AUTHOR> Thanks for the heads up! I created my markdown links backwards; fixed.

</comment></comment><comment><USER12> fun idea, thanks for sharing.

can you please try some variations in type size and weight? this would go a _long_ way for legibility between questions, answers, comments, meta info like "submitted at", etc.</comment>


Show HN: From Web Developer to Highscool Hacker - <AUTHOR> https://medium.com/@devlucky/from-web-developer-to-highscool-hacker-f2e0dd270d9c <comment><USER2> PicoCTF definitely looks nice but I was completely unable to subscribe.

Every time I tried, I got a "Invalid captcha" error while not blocking anything and not seeing any captcha field.</comment>


Goodbye JSON, Hello TOML - <AUTHOR> https://buckaroo.pm/posts/goodbye-json-hello-toml <comment><USER2> I don't understand, why not go with yaml then?</comment>