Ruby 2.1.1 is released and Ruby turns 21 - <AUTHOR> https://www.ruby-lang.org/en/news/2014/02/24/ruby-2-1-1-is-released/

<comment><USER2> I was a bit surprised about the age, and wondering where it fits into the timeline, so I put together the following list (years corresponding to the "appeared" indication taken from Wikipedia). (There will likely be nicer lists elsewhere..)

      1957 (57) Fortran
      1958 (56) Lisp
      1958 (56) ALGOL
      1959 (55) COBOL
      1964 (50) APL
      1970 (44) Pascal
      1970s     Forth
      1972 (42) C
      1972 (42) Prolog
      1972 (42) Smalltalk
      1973 (41) ML
      1975 (39) Scheme
      1978 (36) TeX
      1982 (32) PostScript
      1983 (31) C++
      1983 (31) Objective-C
      1984 (30) Common Lisp
      1986 (28) Erlang
      1987 (27) Perl
      1990 (24) Haskell
      1991 (23) Python
      1993 (21) Ruby (according to article)
      1994 (20) ANSI Common Lisp
      Mid 1990s Dylan
      1995 (19) Java
      1995 (19) Ruby (according to Wikipedia)
      1995 (19) JavaScript
      1996 (18) Ocaml
      2000 (14) C#
      2003 (11) Scala
      2003 (11) Factor
      2005  (9) F#
      2007  (7) Clojure
      2008  (6) Nimrod (according to speedydeletion.wikia.com)
      2009  (5) CoffeeScript
      2009  (5) Go
      2012  (2) Rust
      2012  (2) Julia

(edit: added Clojure, of course) (edit 2: added ObjC, Dylan, Nimrod, Go, Rust, Julia)

<comment><USER3> Ruby was first released in 1995, development started in 1993. So, both numbers are right. "Ruby's birthday" is traditionally the start of development. The most interesting info is: Ruby and Python are both not influenced by Java.

An easy answer to the question: "Why didn't they just steal that from Java?"

<comment><USER4> I'm curious what features of Java would be worth stealing for Python or Ruby?

<comment><USER5> * Threads without GIL (which also requires an explicit memory model) * concurrency libraries * Garbage collectors that scale to hundreds of gigabytes worth heap, are parallel and concurrent * JIT that performs within a small factor of C code * Tooling support, especially profilers and debuggers are lousy and frequently break in my experience * bytecode weaving/AST transforms at runtime. The whole refinements thing could have been done more cleanly with callsite and method entry/exit hooking

Talking about MRI here. I know rubinius and JRuby exist and offer some of those features

<comment><USER6> The creation/creators of Java are not responsible for most of the things you listed. They are attributable to HotSpot, built by the fine folks that brought you the best-of-breed Smalltalk implementation half a decade after Java's release.

HotSpot wasn't released until 1999. Prior to that Java did not have a JIT. Java used to be very slow compared to compiled code and HotSpot was a BIG DEAL when it was released in '99.

GC that scales to hundreds of gb? Do you mean Azul, the proprietary and expensive JVM implementation?

<comment><USER5> G1GC for dozens of GB, Azul (for now) for hundreds and in the future there'll be Shenandoah.

You're right that those features provided by hotspot. But it is the reference implementation for the JVM after all.

The point remains that the java ecosystem - which includes tooling like eclipse/netbeans/yourkit and JVM implementations - provides the things I've listed that I find lacking in ruby.

<comment><USER7> But by the same measure, JRuby is part of the Ruby ecosystem.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> A quote from Ruby's author, Matz:

 _> For me the purpose of life is partly to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, So Ruby is designed to make programmers happy._

Happy hacking!

<comment><USER9> Ruby code always makes us sad, as we have to spend all day deciphering the abusive metamagic DSLs that some devs think are cool to use and abuse. Creative is fine on a canvas, less so when you are having to debug some special turd of an app from a Ruby only developer.

<comment><USER4> DSLs, APIs, design patterns... there are endless metalanguages to learn on top of the programming languages we already know. Just because you can't wrap your head around DSLs as a different kind of API doesn't mean there's "abuse" going on. Ruby is pretty clearly designed to support DSLs, and being able to use a full-fledged programming language within your DSL-based config files is an incredibly powerful tool.

</comment></comment></comment><comment><USER10> Ruby 1.9.3-p545 was also released today with the following:

"This release is dedicated to the memory of our best comrade, Jim Weirich. Thank you, Jim. Rest in peace."

</comment><comment><USER11> The article mentions:

> Ruby 2.1 has many improvements including speedup without severe > incompatibilities. You can use this on Rails and some applications, and get > more comfortable experience.

Since the changelog is very large I'm still interested in what speedups are part of this release. Anyone?

<comment><USER12> There are huge performance improvements in Ruby 2.1.0 as compared to Ruby 2.0.0, I have seen as much as a 2x improvement in real world settings, and they have to with Ruby now having a generational garbage collector:

[http://www.infoq.com/news/2013/12/ruby21](http://www.infoq.com/news/2013/12/ruby21)

I don't think this current patch release itself contains much performance fixes.

<comment><USER11> Ok.. I misread that, and assumed the 2.1.1 came with further perf improvements.

</comment></comment></comment><comment> dj-wonk Speaking from my experience, learning Ruby made programming more fun, elegant, and productive. Thanks Matz! Though sometimes overblown and even cultish at times, the Ruby community transformed expectations about what a language can be. The spill-over benefits have been tremendous to almost everyone. UPDATE: I wanted to thank not just Matz but everyone who made the language easy to learn and the community welcoming.

</comment><comment><USER13> Should have released tomorrow to be 21 and 1 day old. Looking forward to many more years with Ruby as my primary language.

<comment><USER14> > Looking forward to many more years with Ruby as my primary language.

Beware of complacency or you will find yourself unemployable when Ruby will be old news.

I didn't learn any new language since I started C# 4 years ago and I mightily regret it.

<comment><USER15> When was the last time a popular non-"platform" language became "old news"?

<comment><USER14> Do you really think a majority of the web will be powered by Ruby in 20 years from now ?

<comment> grey-area Is it really that hard to switch platforms/languages? Learning a new language should not be so difficult, particularly once you've become familiar with a few.

There are so many factors influencing language and API popularity that it's silly to try to bet it all on one language/platform or vendor at any time in your life. Why not just enjoy the ones you use, and when they are no longer of use (for whatever political, technical or personal reasons), switch to something else?

<comment><USER15> In all fairness, if you don't anticipate a switch many years before you have to make it, you could get caught flat-footed. I personally have taken jobs where I didn't have any primary experience in the platform, but it was for, essentially, pocket change. I would hate to get dependent on a six-figure income predicated on knowing, say, enterprise Java, then suddenly find that nobody's hiring enterprise Java guys anymore and having to take a huge pay cut. Sure I could find a job. That doesn't mean it won't suck.

</comment></comment></comment></comment></comment></comment><comment><USER16> Fantastic. This release has all the fixes I'd been waiting on before going to production; I'll be deploying this week. Great work ruby-core and thank you as always. Twenty-one years, wow, time flies!

<comment><USER17> What are the fixes you were waiting for?

<comment><USER18> I'm guessing these [https://gist.github.com/tmm1/8393897](https://gist.github.com/tmm1/8393897)

<comment><USER16> Yep.

</comment></comment></comment></comment><comment><USER19> This update is important because of the BigDecimal division bug in the bigdecimal gem that ships with 2.1.0 causes incorrect calculations when the denominator is less than 1.

[https://bugs.ruby-lang.org/issues/9316](https://bugs.ruby- lang.org/issues/9316)

</comment><comment><USER20> Happy birthday Ruby - my native tongue. Also one of the most welcoming programming communities out there.

</comment><comment><USER21> Had no idea Ruby was THAT old. Congrats. The one language I need to pickup one day.

<comment><USER4> It's definitely worth really digging into (get the PickAxe book--it's incredible!). Even if you never use it for a real project, you'll learn new ways of approaching problems that can be used in other languages.

</comment></comment><comment><USER22> My first programming language. I haven't written a line of it in years, but it made programming feel fun and made me want to learn more. Shout-out to Chris Pine's "Learn to Program" tutorial.

</comment><comment><USER23> Never fails. One day after I install the latest Ruby, they release the next version.

<comment><USER3> So, put in you calendar: Both February 24th and December 25th usually see Ruby releases. Don't install on the 23rd or the 24th ;).

</comment></comment><comment><USER24> Via Matz on Twitter - The History of Ruby

[https://gist.github.com/unak/3038095](https://gist.github.com/unak/3038095)

</comment><comment><USER25> Reading the changelog at that link made me realize that Ruby's core trunk is still hosted on Subversion!

</comment><comment><USER26> I don't know how get Ruby 2.1.1 in Windows. RubyInstaller/RailsInstaller seems to be less updated

<comment><USER3> RubyInstaller is usually a few days behind, but updated properly nevertheless.

<comment><USER26> I'm afraid that the latest release on RubyInstaller is 2.0.0-p353 (Nov 2013)

<comment><USER3> Yes, see [https://groups.google.com/forum/#!topic/rubyinstaller/8Je3OE...](https://groups.google.com/forum/#!topic/rubyinstaller/8Je3OEbtb3w) for reasons.

</comment></comment></comment></comment><comment><USER27> MINASWAN 4 LYFE :)</comment>


Ask HN: Any Rails devs from Michigan? - <AUTHOR>

I'm a 21 year old guy that loves to create things that other people use. I work primarily in Ruby, Rails, Javascript and Java. Also.. I live in West Michigan. I know the typical thing to do for guys like me is to make an exodus to SF or NYC and get a padded job. But I really like the area of West Michigan, and I'm wondering if there are any like minded people here who wouldn't mind collaborating and creating something great right here in Michigan? This is going out to anyone and anybody who thinks they could use an intelligent and skilled developer with a 'Get things done!' mindset on their team in Michigan.
My email is my username at gmail.
This is sort of an 'I'd like to connect with people' post. So even if you're not from Michigan, but would like to talk or ask questions, that would be awesome too. <comment><USER2> The best place to start is various users' groups and developer meetings. You can find a schedule of them here:

<http://conga-wm.org/>

HN is great, but user meetings is where you meet _local_ like minded developers.</comment>


Why are there 100 Cents In A Dollar? Ask Thomas Jefferson - <AUTHOR> http://www.npr.org/blogs/money/2012/08/06/158197529/why-are-there-100-cents-in-a-dollar-ask-thomas-jefferson

<comment><USER2> If the founding fathers saw it made sense to decimalize your currency, then why are you people still using stupid feet, inches, pounds and ounces?</comment>


Show HN: A Yeoman generator for a front-end dev workflow - <AUTHOR> https://github.com/pollen-digital/generator-static

<comment><AUTHOR> Author here. This is my first attempt at open sourcing code!

Some background: I work at Pollen Digital in Sydney, Australia. We regularly get web-based projects to develop and release. My manager encouraged me to package up my workflow and send it out into the world. So here it is.

The workflow created by this generator utilises the following tools:

Grunt as the task runner

Bower as the package manager for web libraries/frameworks

Jade

CoffeeScript

LESS

I also wrote a little utility that amends css/js/image references in Jade and LESS files with their corresponding md5 checksums (first 8 characters to be specific) as a means for cache busting. This is included in gruntutils/index.coffee under the generated project's root.

<comment><USER2> I've not used Yeoman before, but we use mimosa <http://mimosajs.com> to do our front end building pipeline.

What are your opinions on something like mimosa?

Bower and Grunt seem interesting, I'll go look into them.

<comment><AUTHOR> Hi Torn,

I have not used Mimosa before but it looks quite nice! I have not spent much time with it beyond going through the steps of setting up a new project.

Grunt won't be very interesting if Mimosa is meeting your immediate needs well. The only thing I can say like about it (at this stage) over Mimosa is that you start with nothing under Grunt and build your workflow from scratch. It doesn't pre-install coffeescript/livescript/typescript compilers and so on as its own dependencies - you install their corresponding grunt tasks (e.g. grunt-contrib-coffee) when you decide you need them.

Bower is great to have in a project to manage your front-end package dependencies if you don't already have something similar in your dev environment.

<comment><USER3> Starting with nothing and building everything from scratch is the opposite of what Mimosa is trying to do for you. The idea with Mimosa is you are coding straight away rather than hunting down plugins/modules, or finding generators ;), and then figuring out how to configure them. All those compilers are available, but if you don't need, for instance, TypeScript compiling, then the TypeScript stuff stays out of the way. No harm having those extra things.

Mimosa lacks Bower integration, though. Bower integration is nice for managing those sorts of things.

<comment><AUTHOR> I agree with what you say.

If I failed to do so already, please allow me to state that yeoman and its generators (including my generator) as well as Mimosa may very well be an "expression of opinion" of various developers. The opinion is regarding what makes a productive workflow. This will certainly change over time or, at least, on a project-by-project basis.

In a different comment I made on this submission, I mention that if you are a developer that has worked with Jade, CoffeeScript and LESS - and enjoyed doing so - then my generator _may_ make the process of getting up and running with them a bit faster for your next project.

</comment></comment></comment></comment></comment><comment><USER4> What makes this different from the default yeoman webapp generator?

<comment><AUTHOR> If you like the combination of Jade + CoffeeScript + LESS, then I submit my generator for your consideration (and I would appreciate any insights you may have on its shortcomings or possible improvements). My generator is slightly more barebones than webapp:app. I don't include LiveReload, connect or require.js initially:

\- I did not need LiveReload or connect because I use a combination of `grunt watch` and `http-server -c-1`[1] during development with no issues.

\- require.js has not been an immediate requirement for me across a lot of projects, so I decided to defer the decision to the developer and go with a minimal setup.

The inbuilt webapp generator makes no decisions on which template language to use (some may prefer this over starting with Jade). It also decides to go with SASS/Compass instead of LESS. This is also fine except that it means I now need to have ruby and compass installed which I wanted to avoid[2].

The way I approach asset revving is a bit different in that I pass the developer a function to use in their Jade templates to refer to assets (images/css/etc...). It will resolve the path to an asset and form the url with a revision appended as a request parameter during template compilation (not after). It is kind of similar to the way django_compressor does its job if you are familiar with it (that was my primary inspiration).

Finally, I intend to improve the Gruntfile further by defining concurrent tasks, adding a clean task and so on.

[1] <https://github.com/nodeapps/http-server>

[2] I've written both SCSS and LESS and enjoyed both. Going with LESS really came down to reducing time till first page preview.</comment></comment>


Want more user engagement for your app? - <AUTHOR> http://www.insetlabs.com/admins/sign_up//?

<comment><USER2> Maybe you should link to your products page ([http://www.insetlabs.com/products/automation](http://www.insetlabs.com/products/automation)) instead of homepage? I need to know more about the app before signing up.

</comment><comment><USER3> This sign up page just makes a bold claim with no evidence, supplying so little information. What was expected here? For people to sign up "just because"?

</comment><comment><USER4> If you'd like people to sign up, you should provide information on the actual services you offer, and how they'll help "make your app smarter".</comment>


Sharovipteryx - <AUTHOR> https://en.wikipedia.org/wiki/Sharovipteryx <comment><USER2> The first "restoration" is obviously wrong. The center of lift of a subsonic wing is roughly at the quarter-chord point, which is in front of the beast's hips. The CG of the beast is well forward of that. That restoration is going to cause pitch-down, a nose dive.</comment>


Ruby Metaprogramming Simplified - <AUTHOR> http://cheind.wordpress.com/2009/12/18/ruby-metaprogramming-simplified/ Here is an approach to ease unleashing the power of Ruby's metaprogramming. <comment><USER2> Changing the behavior of an existing class or method isn't really what people mean by metaprogramming, is it?

<comment><USER3> Well no not really. I guess you could use this lib for metaprogramming (code generation etc.), but I don't really see much benefit. This just seems to be an odd wrapper that doesn't make things more apparent (though that may be because I already know a good bit about Ruby and can't see with "n00b eyes").

</comment></comment><comment><USER4> I'm sure someone spent some time on this but I fail to see how things makes things easier or clearer. If anything it just muddies the waters. I know that metaprogramming can be hard to get your mind around sometimes, but you're much better off running through the existing material. If you keep at it eventually everything just clicks into place and you have that "ah-ha" moment. Takes a while but it's worth it.

Check out this link for some great resources (this has been posted on HN in the past): <http://ruby-metaprogramming.heroku.com/>

</comment><comment><USER5> This is nuts. So, instead of learning the correct syntax to add behavior to a class or to an instance, you learn some library syntax instead?</comment>


Having FTP in your IDE is part of a broken model - <AUTHOR> http://tosbourn.com/2012/01/development/having-ftp-in-your-ide-is-part-of-a-broken-model/

<comment><USER2> I couldn't agree more with this. I spent the best part of a day setting up Capistrano and Railsless-Deploy to obviate the need for manual FTP upload. That was only at the start of this week but the flexibility and elegance of it (comparative to opening up an FTP client) has enchanted me. A few shell scripts later on the target server and it's sorted (with a few niggles still to be ironed out).

I've been really disillusioned with FTP since just one flaw in the setup (as much as setting the wrong group on files or someone chmodding them all over the place) can muck your upload up. So you have to ssh in, change it all back, and retry.

If you use a VCS you're probably uploading direct from your checkout, or you're exporting it, if you're not savvy with the system. So you get dotfiles scattered throughout, or an inaccurate export if there was a forgotten commit or update.

Maybe your project has dependencies fetched in through some sort of manager. You change them, fire up the FTP and upload, and forget to log into the server to run an update or install to fetch in the altered dependencies. If you're a PHP dev (who more likely than not doesn't know what PEAR is) coming into a Python, Ruby, or Node environment, for example, this one will sting you every time until you understand that you generally won't commit dependencies to a repo - you'll fetch them in and rebuild when necessary.

How about restarting the server if you need to? Cleanup? Rolling back _quickly_?

Even taking it all into consideration you have at the very least a two step process: upload your files, ssh into the server to run additional setup. If you end up doing this a lot in a short space of time due to carelessness and unexpected bug-fixing __, you'll get frustrated very quickly.

Having suffered these problems ever since I started my job, it feels liberating to keep my copy of FileZilla closed in favour of typing a single command into my console:

        cap [staging|live] deploy

And if it isn't adequate, it's no problem. I can code another task and alter its behaviour for the different environments.

It's liberating.

 __I had a terrible hour the other day wondering why identical code behaved differently on two identical setups. There was much FTP uploading and server restarting. Turned out that file permissions weren't being set the same. It would have been a quick fix without all the manual work.

<comment><USER3> If you don't have a _deployment strategy_ then you probably shouldn't be using FTP in the first place, it's a sign you're doing something wrong.

Capistrano, as you mention, and tools like it, are the only way to go now. You can't just slap a few files on the server and call it a day like you could with some static HTML sites.

<comment><AUTHOR> I very much agree with the need for a deployment strategy. Unfortunately common literature on the subject still seems to point towards using FTP as the corner stone of the release.</comment></comment></comment>


Your C# App on 66 Million Macs: Announcing Xamarin.Mac - <AUTHOR> http://blog.xamarin.com/2012/12/12/your-app-on-66-million-macs-c-sharp-on-mac/ <comment><USER2> Looks nice, but as with MonoTouch the pricing kills it for me.

While I'm sure it pays for itself in overall value if you actually ship a product with it, attaching a price that high to a development tool causes (IMO) all sorts of secondary effects like balkanized user community, inability to realistically use it for writing open source software that anyone will collaborate on, etc.

If the product cost more like $99 it might be able to overcome the inertia a bit better. I know I'd be willing to buy it for that even if I wasn't sure I'd ship a product on it, but $399 is Real Money, so as hypothetically interested as I've been in MonoTouch, etc, I've never really looked at it beyond the press releases.

<comment><USER3> I used MonoTouch at work (where price was not an issue) to convert an existing project to iOS. Aside from some minor complaints about the editor, the experience was amazing. I had previously written a couple of iOS apps using the "native" toolset, and I would not go back if I had the choice. While I understand your pain (I would gladly fork over $100 as a lone developer/hobbyist for personal development, but can't hand over $400), I think the price tag is completely justified.

<comment><USER4> I've been playing with it on my own, and I tend to agree. MonoDevelop is still pretty rough--I'm doing game stuff, so I'm kicking any actual OS X development down the road as far as humanly possible--but once you get your code deploying, it's a very nice setup.

I'd really like a way to build in VS (maybe against dummy assemblies or something) and kick it over to my MBP for real compilation and deployment, though. I respect their desire to funnel users through MonoDevelop, but it doesn't step to VS+R#.

<comment><USER5> I don't think they're trying to funnel users to MonoDevelop, I think they're using it because the iOS SDK is for Mac.

Take a look at Mono for Android, for example. It uses a VS plugin instead of MonoDevelop.

<comment><USER6> I might be in the minority here, but I use MonoDevelop in preference to visual studio.

It's got a couple of irritating issues (the plugin support is rubbish even now, and it's ridiculously complicated to roll your own), but its just so _fast_.

My morning at work is: git pull, go get coffee while VS spazzes out for 5 minutes and resharper reindexes everything.

<comment><USER4> IMO, that sounds like an issue with your hardware. I use a three-year-old desktop with a Nehalem i7 and 16GB of RAM (or my rMBP with Parallels, which may be faster) and VS/R# is pretty happen even with 50+ projects and about 1600 source files.

Older machine? Overactive anti-virus or something causing file I/O pain?

</comment></comment></comment></comment></comment></comment><comment><USER7> My experience with MonoTouch has generally been very positive. Why I love MonoTouch:

\- C# goodness, especially event handlers instead of overly verbose ObjC delegates

\- It's fun to port ObjC loops to oneliners using LINQ and lambdas

\- I prefer somewhat ugly MonoDevelop to pretty-but-very-odd Xcode

\- I can reuse both C# and ObjC code, and ObjC code is straightforward to port, if needed

\- Xamarin support is friendly and helpful

There are some things that annoyed me:

\- Some generic-heavy C# code will crash the device due to AOT limitations—learned it the hard way

\- MonoDevelop hangs for a few seconds after you switch from Xcode, even if you didn't change anything

\- You need to make sure you _understand_ how MonoTouch GC works together with ObjC reference counting, or you'll get memory leaks

\- You'll need to learn to use Instruments to find those memory leaks

\- Debugger often freezes (should've reported this)

\- Binaries can get heavy, but not too heavy

\- Compilation is impossibly slow on Air, barely tolerable on Pro

\- Lack of tooling for binding ObjC code—I wish I could just drop ObjC files and headers into a MonoTouch binding project instead of compiling it to fat binary first

But still, I'm glad we went with MonoTouch.

<comment><USER8>
        - You need to make sure you _understand_ how MonoTouch GC works together with ObjC reference counting, or you'll get memory leaks
        - You'll need to learn to use Instruments to find those memory leaks

Interesting, reading that makes it sound like a C# developer that wants to work with MonoTouch will have to verge off to learning at least some Objective C if they want to have shippable code. The coder side of me is always up for learning a new language but if shipping was my utmost concern I'd want to get right to coding in C# and let MonoTouch take care of the rest. That doesn't appear possible.

How much time do you think a C# developer with several years of experience would need to put into learning the ins and outs of ObjC memory management before their code could be considered close to production level?

<comment><USER7>
        Interesting, reading that makes it sound like a C# developer that wants to work with MonoTouch will have to verge off to learning at least some Objective C if they want to have shippable code.

Yes, you'll definitely need to learn some things about Objective C. This isn't really about learning the language itself though. It's more about understanding iOS and ObjC runtime.

The closest analogy to C# develop would be COM and P/Invoke. C# provides tools to interface with COM and native libraries, but you still need to learn some marshalling fundamentals so you can ensure GC doesn't collect objects while they are being used by native code, you need to implement IDisposable and not forget to free unmanaged resources, etc.

It's similar with MonoTouch: you need to understand that MonoTouch classes "wrap" native objects, that disposing of wrappers doesn't necessarily kill native objects because other native objects may still link to it, and that sometimes GC can't know for sure if an object is eligible for killing, and will never collect it.

In general, this comes down to: don't rely on .NET GC to kill native objects, do it yourself. My life got so much better after I started doing so.

Things that confused me most (and which are all you really need to know about ObjC memory management):

[http://stackoverflow.com/questions/13058521/is-this-a-bug- in...](http://stackoverflow.com/questions/13058521/is-this-a-bug-in-monotouch- gc)

[http://stackoverflow.com/questions/13064669/why-cant- monotou...](http://stackoverflow.com/questions/13064669/why-cant-monotouch-gc- kill-managed-objects-with-refcount-1)

This is a great screencast I wish I saw _before_ I started coding in MonoTouch:

[http://forums.xamarin.com/discussion/33/finding-memory- leaks...](http://forums.xamarin.com/discussion/33/finding-memory-leaks-in- your-apps)

It explains how to find native memory leaks.

How much time does it take to learn this? No more than a week. But it takes more to find memory leaks in existing app so it's better to get some understanding and learn to profile early. For me, "fixing" a two-month-old codebase took about week and a half.

<comment><USER7> If I could give advice to myself when I started writing production code in MonoTouch without any experience with it, it would be: "Don't Guess. Profile."

For example, I spent a lot of time making sure I don't load heavy .NET objects, but most memory crashes went away when I started using JPG instead of PNG pictures in a picture-heavy app.

Then it got a _lot_ better when I took time to learn about best iOS practices such as keeping a pool of about ten reusable views and re-filling them with new content as they go offscreen when the user is scrolling, instead of creating hundreds of views at once. What is really nice, iOS6 UICollectionView class enforces this memory usage pattern by providing a neat API with view pool. Use it instead of rolling out your own collection view.

Another hard lesson was to never block UI thread and do _any_ computational intensive stuff such as parsing JSON in .NET Tasks on another thread. This is obvious in retrospect, but I thought parsing JSON wasn't intensive. It was.

Finally, _if your app crashes randomly, it's most probably your fault_! I really need to stress it because I fell into this trap, thinking MonoTouch is buggy when my app crashed every minute. Turned out, it had insane memory leaks and aggressively allocated large amounts of memory at once—but I didn't bother to learn about "right" techniques until it was too late. Learn to profile early so you don't panic later.

<comment><USER8> Thank you for taking the time to provide these tips and links. Lots of good info here that I'm sure I'll be referring back to in the not too distant future.

<comment><USER7> Sure—if you have any questions feel free to ping me at email@example.com

</comment></comment></comment></comment></comment></comment><comment><USER9> Xamarin's stuff looks really nice, but I really wish they had a non-profit free tier. I can't even make opensource Android apps without paying a lot.

The other problem is the lack of linux support for their SDK. Seems rather odd, considering Mono's roots.

<comment><USER10> It personally pains me not to support Linux, but we get such a tiny fraction of our customer base coming from Linux that it isn't worth it. Not to mention that there is effectively no "Linux" platform and you have to select a subset of distro versions.

<comment><USER9> I'm sure most people would be ok with an Ubuntu version.

Perhaps more of your customers would use Linux for Xamarin stuff if it was available?

</comment></comment></comment><comment><USER11> Where does this leave MonoMac? <http://www.mono-project.com/MonoMac> states that Xamarin.Mac has broader API coverage; does this mean MonoMac will continue to be developed, but just remain as a (free) subset with LGPL portions?

<comment><USER12> The plan is to continue to contribute to MonoMac and it will remain free/open source.

</comment></comment><comment><USER8> Xamarin does some impressive work. They are becoming to C# what PhoneGap is to Javascript/HTML (license fee not withstanding).

</comment><comment><USER13> I'm huge fan of Xamarin but somehow missing how is this different from MonoMac?

For anyone who is thinking to start development of cross-platform GUI app in .NET, I encourage to check Eto project - <https://github.com/picoe/eto>

<comment><USER10> A few diferences:

1\. Xamarin.Mac comes with a commercial license, so you can ship to the Mac App Store (not allowed under MonoMac's LGPL license).

2\. Xamarin.Mac comes with commercial support.

3\. Xamarin.Mac includes bindings for several new APIs, including CoreBluetooth, GameKit, StoreKit, SceneKit, and the new Mountain Lion AppKit classes.

You can see a full list of differences here: <http://docs.xamarin.com/mac/guides>

<comment><USER4> MonoMac appears to be ASL/X11. MacCore too. <https://github.com/mono/monomac>

_The code is licensed under the terms of the open source Apache License version 2 or the MIT X11 license, at your own choice._

Also, the Mono wiki indicates you can already deploy to the App Store (which I've been looking at doing for a project): <http://www.mono- project.com/MonoMacPackager>

_With the new release of the MonoMac add-in for MonoDevelop, you can easily turn your Mono application into a full Mac bundle, and you can also get a Mac installer for your application with all of the Mono dependencies bundled with it as well as creating Mac applications for distribution on the Apple Mac AppStore._

Is there something I'm missing?

<comment><USER14> The MonoMacPackager no longer exists, and has not existed for a few months. We basically granted a license for appstore distribution to anyone that requested the license for AppStore distribution, since we did not originally have plans to build a product.

Now that we are launching a product, we offer the license as part of Xamarin.Mac.

I will update the page accordingly.

<comment><USER4> OK, that makes sense. I mean, for an independent developer, that _sucks_ , because it's honestly not worth $399 to me (I'd be happy to pay for it in a corporate setting like we do for MonoTouch, because of the support stuff, but for personal-project stuff I just can't rationalize it), but I get the reasoning.

Is the licensing for MonoMac/MacCore remaining as-is?

<comment><USER14> Yes, MonoMac/MacCore will continue to be MIT X11.

We will also continue to maintain it, as it shares most of the code for Xamarin.Mac

<comment><USER4> Awesome, so there's an upgrade path. Thanks for the clarification!

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> Interesting that Apple allows this, not just on Macs but on iOS devices. When Adobe wanted to cross-compile Flash for iOS, here is what Steve Jobs wrote:

"We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party development libraries and tools, they can only take advantage of platform enhancements if and when the third party chooses to adopt the new features. We cannot be at the mercy of a third party deciding if and when they will make our enhancements available to our developers.

"This becomes even worse if the third party is supplying a cross platform development tool. The third party may not adopt enhancements from one platform unless they are available on all of their supported platforms. Hence developers only have access to the lowest common denominator set of features. Again, we cannot accept an outcome where developers are blocked from using our innovations and enhancements because they are not available on our competitor's platforms."

<http://www.apple.com/hotnews/thoughts-on-flash/>

FWIW, I've always thought this was an overly broad generalization.

<comment><USER16> You must have missed the part where Apple relented on that:

<http://news.cnet.com/8301-30685_3-20015954-264.html>

[http://www.apple.com/pr/library/2010/09/09Statement-by- Apple...](http://www.apple.com/pr/library/2010/09/09Statement-by-Apple-on-App- Store-Review-Guidelines.html)

"In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code. This should give developers the flexibility they want, while preserving the security we need."

(which is why I see so many Unity games on the App Store these days)

<comment><USER17> There's still no flash on my iPad though.

<comment><USER4> But you can use Flash to build iOS applications, though. (Or, rather, ActionScript; there are a number of different tools that allow this.)

</comment></comment></comment></comment><comment><USER18> This might be the final blow to Java on the desktop.

<comment><USER19> If Java is a terrible language and horribly designed then why do people still use it?

<comment><USER20> 1) Great built-in library

2) great third party libraries,

3) decent documentation and tons of books and instructional material,

4) best-in-class virtual machine, good GC, as speedy as you get with managed code,

5) tons of profilers and development tools

6) several industry leading tools written in it (Hadoop, Lucene/Solr, Hbase, etc) and for it (IDEA, Eclipse),

7) Enterprise support from big companies (Sun, now Oracle) and IBM, and several smaller ones

8) Keeps improving (closures added in current 8 beta for example)

9) A large ecosystem of interoperating JVM languages, from Ruby/Python like (Groovy) to Haskell like (Scala), to Lisps (Clojure)

10) 15 year history, and at some point it fixed a lot of C++ pain points for enterprise programers

<comment><USER21> With all of these pluses, it can't be that terrible right? ;)

Java is not anymore terrible than anything else when you remember to use the right tool for the right job. I have developed in Java, libraries (JDK's and third party) are just _incredibly_ good, you will not find the same variety and quality anywhere else, period. The language is verbose and also /insert favorite Java complaints here/. So what? Get over it and _use the right tool for the right job_. We are programmers, not damsels.

</comment></comment></comment></comment><comment><USER22> I used Xamarin's Stripe library a few weeks ago. Super nice stuff.

<comment><USER10> Cool! We were an early user of stripe, launching with it on our store in July of 2011. Stripe is great.

</comment></comment><comment><USER23> I downloaded the trial and tried to create a Xmarin.Mac.Project and I got an error that I need to buy the software.

Did I choose the wrong option? If so, which one should I be testing? Why can't I test out all features of the tool?

Also, I agree with everyone else that the price point being $399 is way too high for personal development. Would it be possible to get something cheaper for personal development to see if it's actually useful for my needs?

<comment><USER24> What did you try in? MonoDevelop? I downloaded MonoDevelop and the trail for ANDROID this weekend and was able to make an android app with no issues for free. The limit basically being that I could only use the emulator and not test on a real device. I'm not sure how they limit the mac version though. If you want to check it out maybe try out the iOS or android trial which definitely lets you build.

Also you could try MonoMac which is almost the same thing, and is OpenSource. The Xamarin version is supposed to have Wider API coverage and do a bit more (for the cost).

</comment></comment><comment><USER25> So MonoMac is going pro? Glad to see it will be supported.

<http://www.mono-project.com/MonoMac>

      > the result of weekend hacking as our day to day work
      > revolves around Mono's efforts on Linux servers, Linux
      > desktops, Visual Studio integration and our mobile
      > efforts. Luckily, it shares some components with MonoTouch.

</comment><comment><USER26> Does this allow you to develop Windows Apps using a Mac? Or is this mobile app specific?

<comment><USER27> It allows you to build Mac OS X apps using the C# language.

</comment></comment><comment><USER7> By the way, our MonoTouch app just got approved by Apple an hour ago. Sweet.

</comment><comment><USER28> Cool stuff. Now how about running C# apps on the web? :)

<comment><USER29> You can also do javascript with it. I can't speak to it personally but friends have used Script# (<http://scriptsharp.com/>) for client-side javascript with good results. Never heard of anyone attempting node.js with it... yet.

<comment><USER28> There are some C# to JS compilers, script# and JSIL for example, yeah. But none are officially supported by Xamarin. I was just curious why they focus on all possible platforms but the web.

</comment></comment></comment><comment><USER30> C#'s okay and all... But what's wrong with Objective C?

<comment><USER14> Managed languages are designed with a different set of goals than unmanaged languages. C#'s design goals were in general to reduce the number of bugs, help developers write better code, and maintain the code over the long term.

It has evolved over the years to also adopt new programming techniques that have proved to be useful (generics, iterators, functional constructs, delayed- execution frameworks, Async programming features and dynamic features).

But the idea is that you start with a safe environment that is relatively fast, close to C, but where the goal is not maximum speed, but increased productivity, fewer bugs.

Then you try to optimize things to get closer to the performance of a native C compiler. For some things, you can get there, for some others you can not do it.

So it leads to a different style of programming, you spend less time thinking about book-keeping, about making sure that you did not free the same buffer twice, ownership rules and so on, and you can focus more on the problem at hand. In day-to-day life, you spend less time tracking down production bugs.

It is not a silver bullet, and wont fix every problem, and you still need to do careful bookkeeping of other things (like, did you load too many images?) but at least you can ignore the grueling minutiae and focus on what matters most.

It is a little bit like the difference between using raw OpenGL and loading your vertices manually every time or using a toolkit that loads meshes and textures for you.

<comment><USER7> Can't wait to use C# 5 async in MonoTouch. I heard it's coming soon.

<comment><USER14> It is!

We are hard at work in upgrading both MonoTouch and MonoDroid to use Mono 3.0's compilers and class libraries. That is why you have seen a flurry of commits to Mono's master tree.

We are hoping to have a preview in late January.

</comment></comment></comment></comment><comment><USER31> Does this use "native" OS X components?

<comment><USER32> Yeah, they just bind to the existing libraries, so you end up using all of the native tools.

</comment></comment><comment><USER33> How is something like this done?</comment>


Ask HN: How do you manage translations? - <AUTHOR> I have a few hundred English strings to translate. They include both labels and content. I am interested to know how HN gets their project strings translated.<p>- Is there a service that will let me host my strings?<p>- Any experience/opinion on crowd sourcing translations?<p>- Cost: The dedicated companies are quite expensive for a hobby project. Did you ever pay for translations? What is the cost model?<p>Thank you. <comment><USER2> Translation is difficult to get right, and unless you do get it right, your service is likely to be ridiculed. For small amounts, very small amounts, you might be able to get friends to do you a favour, or even random people on platforms like Mastodon, Twitter, or HN.

For labels, services like Google Translate are fraught with pitfalls and dangers, and non-native translators likewise (although better).

In short, balance your costs against your risks, and ask for help in the places you frequent. But if you want good translations, be prepared to pay.

 _Personal opinions only, others will disagree, take a balanced view._</comment>


History of software engineering - <AUTHOR> https://en.wikipedia.org/wiki/History_of_software_engineering <comment><USER2> I would argue there is no such thing as software engineering. To me engineering has to live in the real world, i.e. gravity, wind, temperature, material properties, water, etc. Software exists in a world we create, while it may interact with the real world, and may run on hardware (perhaps several levels down) it is not truly affected by the real world properties.

But being programmers, we will argue all sides.

<comment><USER3> I'd say that information theory is our physics. The worlds we create are still constrained by math.

</comment></comment><comment><USER4> The lack of citation in this article perfectly mirrors the chaos and growth still required in software engineering.

</comment><comment><USER5> "lightweight methodologies" akin to light warfare. bullshit.</comment>


On the implications of the Covid-19 WA2 genome sequence - <AUTHOR> https://twitter.com/trvrb/status/1233975581974228994 <comment><USER2> Very interesting. It feels like the US is way behind on community surveillance, in part due to errors in roll-out of the test kit and low availability of test kits, but also due to the assumption that it's not spreading in the community at large. The patient in Solano County, CA was only tested after having been hospitalized for several days, because he/ she didn't have any travel risk factors.

</comment><comment><USER3> Ok one more element for the theory that the virus is circulating undetected in many places around the world. Seems quite in line with the Italian scientist that also estimated that the virus is circulating largely in northern Italy since mid-January.

<comment><USER4> Perhaps Iran received an early transmission chain and is one or two generations ahead of most other places.

</comment></comment><comment><USER4> So Seattle is Wuhan in the last week of December right now</comment>


Ask HN: What companies use User data for good? - <AUTHOR> With the big events with data breaches from companies such as Facebook / Cambridge Analytica as well as Equifax coming to light, what is the value from a user perspective of the companies harvesting data and are there any companies that can claim the data is being used for good? <comment><USER2> All those which are pledged to take initiatives to ensure full conformity with General Data Protection Regulation (GDPR). If a person doesn't give his or her agreement for operating their personal data by 05/25/2018 each self-respecting service owner or company or even a gambling database like [https://bettingcasinoslots.com/20-free-no-deposit- bonus/](https://bettingcasinoslots.com/20-free-no-deposit-bonus/) should permanently delete all the users' data.

</comment><comment><USER3> Supposedly 23andMe uses their genetic data of their millions of users for good, to help research and identify genetic problems/solutions, etc.</comment>


Show HN: A tool to help determine which passwords to rotate due to cloudbleed - <AUTHOR> https://github.com/fkautz/findcloudflare <comment><USER2> So, how is this any different from using "grep -f known-sites.txt"?</comment>


Haven: Keep Watch - <AUTHOR> https://guardianproject.github.io/haven/ <comment><USER2> This is a really interesting development from the Guardian Project!

I've been looking for a home security system and, for my price range, have only found Chinese-made webcam with disturbing privacy implications. To be able to use old Android phones and some free software that I can run myself for file collection and serving would be an optimal solution for me!

Good luck, team!

</comment><comment><USER3> Ah, alright, so it monitors the sensors and sends a notification either over SMS or Signal. Got that.

What I don't really get is the "event logs and captured media can be remotely accessed through a Tor Onion Service". Whose Tor Onion Service? Wow, my phone runs an Onion service? Did not see that coming.

I'm assuming the phone needs to be charged 24 hours a day because something like this will kill phone batteries within a few hours.

<comment><AUTHOR> > Whose Tor Onion Service? Wow, my phone runs an Onion service?

Seems like it [https://github.com/guardianproject/haven/blob/0fd6f690ef6303...](https://github.com/guardianproject/haven/blob/0fd6f690ef63033587d8ed02e08845b4a3d3a3fe/src/main/java/org/havenapp/main/HavenApp.java#L51)

I guess battery life is less of a concern for the suggested use case (e.g. turning a cheap, extra commodity device into a primarily stationary, plugged- in security system).

<comment><USER4> Maybe more appropriate: "Wow, my phone can _optionally_ run an onion service!"

[https://github.com/guardianproject/haven/blob/0fd6f690ef6303...](https://github.com/guardianproject/haven/blob/0fd6f690ef63033587d8ed02e08845b4a3d3a3fe/src/main/java/org/havenapp/main/HavenApp.java#L35)

</comment></comment></comment><comment><USER5> Too bad Android basically ties my persona to the phone, making it difficult and awkward to use this on more than one device. Is there a RPi version?

<comment><USER6> I don't know of anything that has SMS or signal messaging built-in, but the motion project¹ would probably be a good place to start.

<comment><USER7> Motion + signal-cli[0] has been working well for me.

[0] [https://github.com/AsamK/signal-cli](https://github.com/AsamK/signal-cli)

</comment></comment></comment><comment><USER8> If someone is worried so much about their privacy, why would they be sending any data such as a video of themselves over their phone's service?

<comment><USER9> As long as the traffic goes via the tor network, I don't see any issue with this. All the provider sees is encrypted blurb.

</comment></comment><comment><USER10> Crashes immediately after the tutorial.

</comment><comment><USER11> So it is either trivially defeated by commodity cellphone/wifi jammers, or has a huge risk of false positives.

</comment><comment><USER12> So you want me to install surveillance software on my phone to stop other people from accessing my phone?

</comment><comment><USER13> I really like the Guardian Project[0]. Their stuff is some of the first stuff I install on any new phone; it's part of what makes Android such a great OS for the privacy-conscious. It's also great to see that — contrary to what Wired reported — this is _not_ just a product of Mr. Snowden's team. He's not trustworthy, but the Guardian Project are.

[0] [https://guardianproject.info/](https://guardianproject.info/)</comment>


Dear Miss Disruption  - <AUTHOR> https://medium.com/p/d7e5d14065f1

<comment><USER2> Lots of gems, but this is my personal favorite:

"However… you can lead a horse to water, but you can't get him to drink. Even if the water comes in the form of an endless supply of VitaminWater in the company fridge."

</comment><comment><USER3> I really hope this article is a joke, but author forgot to add /sarcasm.

<comment><USER4> I think it's perfect.

Adding sarcasm tags here would be like adding ketchup to your hotdogs, comic sans to a summons, or promises to node.js core.

<comment><USER5> Comic Sans to a summons. Now THERE's an idea!</comment></comment></comment>


Marijuana use linked to lower insulin resistance, smaller waist circumference - <AUTHOR> http://www.amjmed.com/article/S0002-9343(13)00200-3/abstract

<comment><AUTHOR> See also: _Decreased prevalence of diabetes in marijuana users: cross- sectional data from the National Health and Nutrition Examination Survey (NHANES) III_

<http://bmjopen.bmj.com/content/2/1/e000494.full></comment>


AppLogic - Grid Operating System for Web Applications - <AUTHOR> http://www.3tera.com/AppLogic/

<comment><AUTHOR> Have a look at the AppLogic live demo:

<http://download2.3tera.net/demo/applogic20demo.html>

Amazon AWS competitors are now emerging all over the place (and I found this one is particularly interesting if you are scaling Django and and choosing between EC2 and others).</comment>


Amazon Aurora Backtrack - <AUTHOR> https://aws.amazon.com/blogs/aws/amazon-aurora-backtrack-turn-back-time/ <comment><USER2> "Aurora will try to retain enough log information to support that window of time."

It's good to know that Aurora will try. It's not like it needs to be reliable or anything.

<comment><USER3> > It's good to know that Aurora will try. It's not like it needs to be > reliable or anything.

"Reliable" isn't a binary concept. There's no service that is 100% reliable.

Having a solution that works 99.99% of the time (which is "only" four nines) is probably good enough that people are willing to use it as a last-resort. (From what it seems, it's included for free, so it's not like this costs you anything anyway - at worst, you end up where you would be if they hadn't released this).

<comment><USER4> It's not free, look at "estimated 10$/month".

</comment></comment></comment><comment><USER5> Aurora keeps coming along in leaps and bounds, congratulations to the team, this is a fantastic achievement!

I only wish that every new feature didn't inevitably come with the caveat that it's only for the MySQL flavour of Aurora.

I understand both the engineering and product development reasons for doing so (different stack and MySQL is undoubtedly a much larger customer base), but it always makes these announcements a little underwhelming as an Aurora Postgres user.

<comment><USER6> I have no problem with the fact that the MySQL users get to be my beta- testers.

<comment><USER7> If my beta testers shrug off relational integrity, that makes me the real beta tester.

</comment></comment></comment><comment><USER8> Ok Oracle has had this feature for at least a decade, it's called a "flashback query". Obviously Aurora costs 10% of Oracle, but still, I thought this was going to be a huge feature-add considering the HN comment count.

That being said, I love AWS, am Pro-Certified, and work with it everyday.

I know Oracle is a giant mean bully company, but at least their arrogance was never of the "world-destabilizing" kind like Facebook.

EDIT: changed rollback query to flashback query (flashback query can be used both to view or to actually change the DB)

<comment><USER9> Can you link to any docs about it? All I can find is the ROLLBACK statement in a transaction.

<comment><USER8> Sorry rollback was wrong, the correct term was "flashback".

[https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmfl...](https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmflash.htm#BRADV89737)

<comment><USER9> Thanks!

</comment></comment></comment></comment><comment><USER6> Reading the paper[1] linked from Jeff's post:

> In Aurora, we have chosen a design point of tolerating (a) losing an entire > AZ and one additional node (AZ+1) without losing data, and (b) losing an > entire AZ without impacting the ability to write data. We achieve this by > replicating each data item 6 ways across 3 AZs with 2 copies of each item in > each AZ. We use a quorum model with 6 votes (V = 6), a write quorum of 4/6 > (V w = 4), and a read quorum of 3/6 (V r = 3). With such a model, we can (a) > lose a single AZ and one additional node (a failure of 3 nodes) without > losing read availability, and (b) lose any two nodes, including a single AZ > failure and maintain write availability. Ensuring read quorum enables us to > rebuild write quorum by adding additional replica copies.

There are many 2 AZ regions in AWS, of course. I don't think you can stripe 3 copies per AZ, an AZ failure drops you to potentially 2/6, and if you allow for 2/6 and 3/6 writing you could have a split brain. Any thoughts how they manage that?

[1] [https://www.allthingsdistributed.com/files/p1041-verbitski.p...](https://www.allthingsdistributed.com/files/p1041-verbitski.pdf)

<comment><USER10> I left AWS before Aurora was introduced, but I suspect it's similar to how S3 fulfills a similar promise. From the S3 FAQ[1]:

> Amazon S3 Standard, S3 Standard-Infrequent Access, and Amazon Glacier > storage classes replicate data across a minimum of three AZs to protect > against the loss of one entire AZ. This remains true in Regions where fewer > than three AZs are _publicly_ available.

Italic emphasis is mine.

[1] [https://aws.amazon.com/s3/faqs/](https://aws.amazon.com/s3/faqs/)

</comment></comment><comment><USER11> This is nice but it appears that the entire database instance gets rolled back to that point. It'd be a lot nicer if it could be done at a per-db or per- table granularity.

Realistically I'd never use this feature because of the risk of data loss. I'd restore a new instance from backups and copy the lost data back over manually.

<comment><USER12> > It'd be a lot nicer if it could be done at a per-db or per-table > granularity.

As another commenter pointed out, per-table would be scary for referential- integrity. And per-db _kinda_ makes sense, but if you've got totally different use-cases hosted by the same MySQL you may be using the service incorrectly.

> I'd restore a new instance from backups and copy the lost data back over > manually.

That's always been possible, but even with the best instances and most iops it could take hours to do that. So it's really designed for a different scenario.

<comment><USER11> Regarding referential integrity I don't disagree. It would be a process to be performed by an expert in who understands the data structures and what the effect of rolling them back would be.

I might be wrong but I believe Aurora backups can be restored quite a bit quicker than that, right? We are evaluating Aurora at work, hence my interest.

</comment></comment></comment><comment><USER13> Very interesting. The describe it as a rewind. Does anybody know if it's really a rewind, where each log record is reversible? Or do they do the easier thing of saving snapshots and then replaying the log from snapshot to desired point?

<comment><USER14> Aurora uses a log-structured storage system, so they just point to a previous version that they haven't garbage collected.

<comment><USER15> that's correct.

</comment></comment></comment><comment><USER16> Amazon is the new IBM. Knock yourself out and jump into the AWS ecosystem. In a few years down the line, you'll understand that you've lost the leverage you had to potentially take your public cloud business somewhere else when you have so many dependencies on Amazon tech. Basic principles from my view: don't adopt anything but standard EC2/S3 services and create diversity not only in your teams but in your infrastructure policies.

<comment><USER17> what are some alternative that one can use for rds postgresql and sqs?

<comment><USER18> There probably isn't a lot of fear with using RDS. They just do management for you, it isn't any fundamentally different technology that would cause heartache during a migration. Just stay away from Aurora if you care about this.

SQS: There's AWS MQ, which is based on ActiveMQ and supports AMQP. If you're going with a more CNCF-focused stack and want to use NATS, I'm not aware of any hosted options.

<comment><USER19> You don't even need to stay away from Aurora ince it's MySql/Postgres SQL API compatible.

You would just want to stay away from Aurora specific features like the one in OP.

<comment><USER20> Features like database rewind aren't something that would be bound to your core app structure either. While you could structure business process's around it, it's more of a shit hits the fan restore scenario, not a daily or weekly action.

Replicating it on a different platform could also be fine with a combination of logical and physical backups.

<comment><USER21> Point-in-time database restores are a best practice that is provided by maintaining database write logs for the timeframe that you expect to have point-in-time restoration for. You don't have to use Aurora to get them, Aurora just has the clicky buttons to make it a clicky-button matter. Any serious DBA should know how to do this _without_ Amazon's platform wrapping it up in a GUI.

<comment><USER15> We've had point in time restore for quite some time. Backtrack is different. It moves you to a different point using the same instance. Since we don't do destructive writes to blocks (it is log-structured storage), we can simply mark a portion of the log as "ignored". It is a server feature, not a UI enhancement.

</comment></comment></comment></comment></comment></comment></comment><comment><USER22> TiDB has already supported this (similar) feature about 2 years ago and it has been adopted by the gaming users: [https://www.pingcap.com/blog/2016-11-15-Travelling-Back- in-T...](https://www.pingcap.com/blog/2016-11-15-Travelling-Back-in-Time-and- Reclaiming-the-Lost-Treasures/)

</comment><comment><USER23> I'm slightly confused, is this the same as the existing point-in-time restore that's available for other RDS instances?

Edit: Main difference seems to be new cluster vs. in place.

<comment><USER24> No; look at the screenshots. You can pick _any_ point in time given the window you request.

<comment><USER25> That usually what point in time restores allow, by using snapshots as a base and WAL since then.

</comment></comment></comment><comment><USER26> It's a relatively classic invention, take something that exists and repackage. A snapshot and a log replay accomplishes something pretty similar. AWS slapped a ui and some orchestration around it. The cloud lock stuff makes sense (although if having an easy "undo button" on your db layer is mission critical to your business you might have other interesteting challenges.

<comment><USER15> That's not correct. We made a change to mark portions of our log-structured storage as though they should not have occurred. It is a totally different approach than point-in-time restore.

</comment></comment><comment><USER27> I don't know anything about Aurora and maybe I'm missing something. But why not just wrap everything in a TRANSACTION and then do a ROLLBACK if there's an issue?

<comment><USER6> This would be for deploying a database migration that hoses something. For instance, we had a migration that touched a bunch of tables and, due to a triggered procedure, it blew away all the modification dates.

TBH, I'm not sure how useful it is compared to the normal PITR. My usual guidance on recovering after a database fuck up is "put the app into maintenance mode and the database in read-only, do your investigation, run PITR, port user activity to the backup, do spot checks to determine everything got through, roll the app back to before the change, take the old database down, point the app at the new database, bring the system back online."

I'm sure a manager is thinking, "oh, we can be back online in 5 minutes, amazing!" But just because something broke doesn't mean users stopped hitting your database! You can't just hit Undo and throw all that out!

<comment><USER15> You can also clone the database volume in Aurora and then just backtrack one of the volumes. That should help you ensure you have a version available for forensic analysis.

</comment></comment></comment><comment><USER28> At this time looks like it only applies to MySQL, will be curious to hear if/when it becomes available for PostgreSQL.

</comment><comment><USER29> How is this different than point in time restore already available?

<comment><USER30> PITR on say RDS is going to be a fair bit slower than this, I'd imagine.

<comment> delta-v PITR is a lot slower especially if there are large transactions in the binlog.

</comment></comment></comment><comment><USER31> The seamlessness of this feature is quite amazing. Backups are usually a huge pain to deal with (I've recently been dealing with Postgres/Barman quite a bit). And disaster scenarios aside (for which AWS already does replications across regions), I think a frequent purpose of backups is really to do this "Undo", go back in time and pretend something didn't happen.

All this makes me really really wanna use Aurora. :)

<comment><USER32> What issues did you have with barman? My experience with it was quite pleasant.

<comment><USER31> Various issues with recovery during testing. Missing WALs in the data files that `list-files` command says should be present. Backup failure because of a different number of parallel workers and so on. Combined with the fact that I had to write my own code to push it to S3 (no out of the box support).

I suppose it works fine on its own for small to medium databases, and it's a fantastic product. I just wish it was a bit better. :)

<comment><USER32> About WALs, did you use replication slots? That feature makes WAL logs only removed after all standbys process them.

As for S3, WAL-E is probably what you wanted to use. Barman was more intended for on premises installation.

</comment></comment></comment></comment><comment><USER33> Interesting - but what if your database has constant activity? "Oops, my SQL bad" becomes "Oops, my rewind lost 410 transactions"?

<comment><USER34> This is exactly my concern. There is no production system I have ever worked on which this feature would ever be used.

What if you had an e-commerce site? Other customers were placing orders, right? Credit cards being charged? You didn't catch your mistake instantly. So you have a window of maybe, 5 minutes or a hour in which other things happened. You can't simply forget those other transactions and throw away the data.

<comment><USER35> There have been many well publicized events where a production database was lost, or in some way corrupted. I've lived through one such event myself. When that happens, you usually go to a backup, and typically run into two problems:

1) Point in time back ups can be hours old.

2) More importantly, "backups" are useless, it's the "restores" that are valuable. And very few organizations have a well practiced muscle memory for restoring from a backup.

A turn key restore solution, with a per second granularity can both significantly decrease the loss window, and recovery time. Hope nobody gets to use it, but when you have, it can be a difference between a big and a small outage.

</comment></comment></comment><comment><USER36> How did Aurora begin its life? Was it written from scratch or forked from existing open source database?

<comment><USER11> It's forked from MySQL 5.6 and 5.7. It's not open-source itself however so presumably they signed an agreement with Oracle to do this.

<comment><USER37> MySQL has a GPL license (not AGPL) so I think they can modify and not distribute the source as long as they provide a _service_ and not _binaries_.

</comment></comment></comment><comment><USER38> How is this better than their already existing PITR?

Why would someone want to rollback their own production database instead of PITR to a new database and switching over to it? Surely you would end up losing data because you wouldn't be able to reconcile the new data written to it.

</comment><comment><USER39> CockroachDB also support this. [https://news.ycombinator.com/item?id=11958660](https://news.ycombinator.com/item?id=11958660)

<comment><USER15> That is a different feature (although a cool one). They provide the ability to run a query as of a point in time. We are moving the database backward in time (which matters for running applications)

</comment></comment><comment><USER40> > _We've all been there! You need to make a quick, seemingly simple fix to an > important production database._

Have we though? This could be one of those safety nets that makes me worse not better.

</comment><comment><USER41> Does Amazon release the source for these features? Would love to see these ported to other flavors of mySQL.

<comment><USER42> Nope. And, FWIW, I'd bet Aurora has deviated far from core MySQL at this point, too.

</comment></comment><comment><USER39> If you use Datomic with DynamoDB, this feature is available at Query level.

</comment><comment><USER43> I'm confused, how is this different than an Undo log?

<comment><USER14> This takes advantage of log-structured storage so there isn't any "undoing".

<comment><USER43> In a database Undo, in spite of the name, is the act of applying a transaction log to return to a particular state. I used to work on databases earlier in my career, so selling this as a new invention seems somewhat bizarre to me.

<comment> delta-v That's not what Aurora is doing. What you have described is more like "git revert". It's O(num of transcation in the undo log).

Aurora is a log structured db, they can just reset their DB to a particular LSN. i.e. doing "git reset --hard", which's O(1).

<comment><USER15> that's correct.

</comment></comment></comment></comment></comment><comment><USER44> Amazon rediscovering PITR, nice :P

<comment><USER6> No, they've had that for ages: [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_...](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html)

<comment><USER25> This post is about Aurora, their own custom db. They could've easily called it PITR to match the rest of the industry.

<comment><USER15> This is a different feature than PiTR. We have both. They serve different needs.</comment></comment></comment></comment>


Employee Equity Is Broken: Let's Fix It - <AUTHOR> http://www.brandquarterly.com/employee-equity-is-broken-lets-fix-it <comment><USER2> just a shame the law can't be more flexible so their aren't any legal hoops(risks).</comment>


DotCloud (YCS10) announces sweet new dashboard in beta - <AUTHOR> http://blog.dotcloud.com/public-beta-all-new-user-dashboard

<comment><USER2> This looks very nice, but stepping back for a minute of unsolicited-but- hoping-to-be-helpful advice: "Get a real starter app launched on dotCloud in under five minutes." - 5 minutes is a long time.

More or less, it means I'm going to have to do a lot of _up front_ thinking. And all of the repos on the dotCloud github account are for app-templates, not real 'example' apps (kudos to you guys for providing that, and for providing __so much __other open source goodness).

As a comparison, the instructions for getting Kandan up and running on Heroku are _literally_ "copy and paste this" and it just works, and opens up in your browser when done. You can invite others in and start tweaking from there (<https://github.com/cloudfuji/kandan#heroku>). Far less than 5 minutes - really less than ~8s of your time, unless you watch it.

I'm not sure what your developer-acquisition strategy is, but have you thought about reaching out to some of the big open source projects in the developer communities you want to attract, and working with them to make dotCloud deployments a kind of default? The quality of most open source apps is usually pretty abysmal, but maybe that can be improved over the long term, and most of these projects would love to have a 'standard deploy platform' to target.</comment>


Ask YC: Legal Inquiry Regarding Client Issue - <AUTHOR>

One of the designers on my team had a freelance project that he took on.  We're pretty open about letting the guys work on their own stuff.  Fridays are free days, and they're welcome to use whatever resources we have with the exception of storage and networked devices for their client projects.  We also keep them on a confidentiality lease, they can't talk about internal stuff of our particular company.
Anyway, apparently my boy (Jim) was on a subcontract with this client (Bob).  From what Jim told me, he asked repeatedly for certain resources from Bob to produce the site, which he never got (webhost info, etc) to effectively produce the site, so when the month was up the client emailed him asking for their initial deposit back, and are threatening legal action if they don't get it.  There's no clause in the contract regarding breaches of contract, so our boy should be fine on that front.
This is where it gets interesting, Jim wants to counter-sue for loss of time and energy spent producing the site.  He also watns to counter-sue for lost wages, as he completed the site weeks ahead of schedule, and simply could not deliver it because the client did not give him hosting details.
Does he have a case? <comment><USER2> My advice is before this goes any further down the track of who sues who, Jim and Bob need to have an urgent face-to-face meeting (or telephone call) to try and resolve this amicably rather than wasting their time and money involving lawyers.

Don't worry about what the contract says or doesn't say – legal precedent picks up on what is left unwritten in contracts. Jim needs to work out a reasonable negotiating position (such as getting paid for the hours actually expended in exchange for handing over the work done to date) and not worry about things like consequential income losses, which are very difficult to recover at law.

If after both parties have used their best efforts to resolve the disputes and there is still no agreement; then consult the lawyers.

</comment><comment><USER3> Obviously you need to talk to a real lawyer. We, the random folks in the audience, can't tell who has what case unless we know what the contract says. It could say anything. And it could say different things to a lawyer than it does to you.

If you signed a fixed-price contract, I can't see how you're going to be able to collect more than the total price of the contract, nor can I see how "lost wages/loss of time" comes into it. You're paid based on deliverables. If the site is literally finished except that the client refuses to accept delivery, it's probably fair to bill the client for 100% of the agreed amount, and to sue if they won't pay; otherwise, it's quite likely that the contract says that you're entitled only to the deposit. This is the scenario that deposits are designed for.

Again, though, IANAL and I haven't read your contract.

The moral here is: Work only so long as your client has a pulse. Ping the client regularly, and if you ping the client and nothing comes back... stop working and start sending out reminders/dire warnings instead ("if you do not send X I cannot do any more work") until the client responds.

Contracting is risky work. That's why fixed-price contracts need to be marked up significantly.

</comment><comment><USER4> _i am not a legal professional._

but it sounds to me like the same reason that your client is not entitled to the refund is the same reason why your boy Jim isn't entitled to sue for lost time and wages.

lesson learned. next time, make sure to state that the down payment is considered a retainer for services provided and is non-refundable. tell jim that he's learned a hard lesson and next time to document his contact with clients and to halt work and inform them that they're delaying timelines if they don't have a pulse. include client delay provisions in the contract.

</comment><comment><USER5> He got an education. The suggestion for a face to face discussion is an excellent one, if he can keep his cool. Don't waste any time suing over what appears to be a small amount of lost time: he would be better served to invest his time finding new clients and being more proactive in future about issues that are preventing him from delivering them results.</comment>


Portland to raise taxes on companies where CEO earns 100X what workers do - <AUTHOR> http://www.cbc.ca/news/business/portland-ceo-pay-1.3886955 <comment><USER2> Anyone familiar with the economics behind this? Seems like things tend to go south when the government tries to mess with CEO pay. Public companies required to publish CEO pay, pay rises as CEO's have a baseline for negotiating.

I like the idea. I've always admired Whole Foods' hard limit on CEO pay but I'm not sure what ramifications this has.</comment>


Ask HN:  Review my Startup (Idea) - <AUTHOR>

Hey all-
I'm not sure if this type of post is allowed, but feel free to downvote if not.  Basically, I was hoping to run an idea I have for a startup by the community at large and maybe find a cofounder in the process.
About me:  CS nerd/bad idea generator
So heres the gist:
Create a site that would be a reputation repository (pardon the alliteration).  This repository would be similar to gravatars but deal specifically with establishing "universal" rep as opposed to avatars.  Rep could be used for any type of crowdsourced site, news sites like HN or DIGG, blog stuff and I think much more. Obviously these interactions would have to be fleshed out a little bit, but I think it could certainly be a nice little addition to some sites.
Thats the basic plan.  What do you all think?  Worth a shot?  Feel free to email me if you'd like to talk about it.  daftdg at gmail dot com.
Thanks!
edited to add contact info. <comment><USER2> >> Obviously these interactions would have to be fleshed out a little bit

When I first read your idea I thought "Hmm... This is to reputation what OpenID is to usernames and passwords". And just then a little light bulb appeared above my head: If you tracked this by OpenID, than any site using OpenID could easily switch over to your system - without having to confirm that a certain username was a certain account on YOUR system, yada yada yada.

I think it's a good idea - the only problem is getting this to catch on with at least a couple of well known sites. That's a hard thing to do, but I think it's a good idea. I like universality (though admittedly, I'm not the biggest fan of OpenID itself)

edit: If you're really serious about doing this - I'd be happy to work with you on it - email me at SHP4HN [at] gmail [dot] com

</comment><comment><USER3> It's too meta.

It's also impossible. HN and Digg and Reddit are not going to implement your universal reputation system.

This has been tried before by at least a half dozen companies and you've never heard of them because they all failed.

Lastly, Twitter and Facebook already solve enough of this problem with twitter auth and facebook connect and have hundreds of millions of users so you would have stiff competition.

<comment><AUTHOR> Thanks for your comment. As for your arguments, I am somewhat unconvinced.

1) This is impossible. What exactly is impossible? Getting Digg and Reddit to adopt it? Maybe, but there are a variety of uses that I can think of that have nothing to do with digg reddit or HN.

2) This has been tried before. So what?

3) Twitter and Facebook do this already or something similar. So what? First of all, both facebook and twitter have totally different business models and really have no incentive to include reputation. Further, the mere fact that there exists a large competitor in the market doesn't mean a small venture that may be more simple, targeted, and agile cannot succeed.

Maybe I am being naive, and if so, I fully expect to hear about it. However, I find your arguments unconvincing, and I would be greatful to hear other people's thoughts on them.

Thanks again for the comment.

<comment><USER3> _1) This is impossible. What exactly is impossible?_

Getting anyone to use it. How will you get users?

<comment><USER4> Getting people to use it is FAR from impossible.

Let's look at it a bit of a different way. If I understand it correctly, this could be used to identify trolls and such. Makes me think about the NIN rant of last week.

So, let's say you built your first go of this on top of something like the Disqus API, and convince a few sites to use it.

Maybe create a few simple plug-ins for forum services, etc.

All far from impossible. Don't go the 'boil the ocean' route where you try to grab everything at once. Piggybacking on OpenID is a decent idea (as mentioned already), but personally, i believe that OpenID is far from a success (it isn't mainstream yet). You could potentially create a system that piggybacks on Facebook Connect, Google Friend Connect, etc. and as long as you have a simple enough way for to hook into the service, I think you could get some traction.

</comment></comment></comment></comment><comment><USER5> I think this is a good idea. I've actually thought of something similar myself. Why not have each person's reputation be based on a variety of attributes -- discussion forum insight, financial reliability, technical expertise, etc.

This could eventually replace the credit ratings infrastructure of experian, equifax, etc.

Ideally lots of sites would participate -- e-commmerce sites could rate you as a customer (headache free, not trying to cheat on promotions, etc.), kiva could rate you, etc.

It would also be great if reputation could be tied to biometric data to prevent transfer and fraud.

Such a system would ideally be open, cryptographically sound, and free.

I think that a properly designed system would end up removing lots of the transaction costs associated with more mainstream reputation systems.

<comment><USER6> * This could eventually replace the credit ratings infrastructure of experian, equifax, etc.*

Wow - talk about smoking the kool-aid. We went from "similar to gravatars" to replacing Equifax all in about 1000 characters. That's a bit much for me lol.

<comment><USER5> Well consider that those companies charge $10 per credit rating lookup...

Credibility/trust tracking is huge. Ebay's seller/buyer trust data, if tied to SSN (or better) would be worth Billions.

</comment></comment></comment><comment><USER7> It's an interesting idea. There are a lot of details that you would have to flesh out.

What is reputation? How would you explain it? How does it aggregate?

Draw some pictures - what might it look like, what might it be integrated into a site? Etc.

In my mind, reputation is the summary of a series of transactions. Ebay's user reputation comes directly to mind. How they will interact across sites seems challenging -- I have 1000 points on news.yc and 2000 followers on twitter; how do they interact? How do you present this, etc?

I recommend you cut the idea to the very minimal core to see how small you can make it, and see if you can validate that minimal concept.

<comment><AUTHOR> Joshu - Thanks for the comment. Curious as to what exactly you mean by "cut the idea to the very minimal core to see how small you can make it, and see if you can validate that minimal concept." Are we talking about hashing out some specific feature and then seeing if that, on its own, will be successful? I guess, if you could explain a little about what you mean by "validating a concept," it would make things more clear to me.

Thanks

<comment><USER7> People have a tendency to overcomplicate things.

You are looking to build a system that is a) as small and as simple as possible that yet b) still retains conceptual integrity.

You want the first because it's easier to build and get to market, and the second because it's not done till all the necessary parts are in.

Remember that the vast majority of your understanding of the problem space is not accurate, and will remain so until you encounter customers and users. So do as little work as possible; just enough to get you to those customers and users. Then you listen to them to find out the next parts to build. (The ideal case here is that you are also customer #1, incidentally.)

So no, not just some specific feature; you need the right coverage. But make sure you don't go overboard anywhere in particular, especially if it might not be needed.

<comment><AUTHOR> Awesome. Thanks for the clarification. I wonder if you (or anyone) think it would be more fruitful to take a holistic approach i.e. factor in ebay, twitter, HN and create an overall score, or stick with a simpler, more streamlined karma counter type thing that would be "widgetable". Or does the latter necessarily lead to the former?

<comment><USER7> You're still dealing at levels of abstraction too far away from an actual product. At a distance, all these things are similar, but up close they are quite different.

How would you "factor in" ebay and twitter into one number that made any sense at all?

</comment></comment></comment></comment></comment><comment><USER8> I like the idea, i'd allow something like that on my website.

</comment><comment><USER9> Will you call it whuffie?

<comment><AUTHOR> You can buy the naming rights for 1m whuffie</comment></comment>


Hacker Public Radio - <AUTHOR> http://hackerpublicradio.org/

<comment><USER2> Hi All,

I am one of the admins of HPR and I would like to address some of the points here.

We do not host any malware. If at any time you notice anything coming from our domain email me directly on admin at hacker public radio dot org.

Our comment system was overrun by spammers and scammers so it's possible the bad reputation came from there. When I started admining the site, I manually went through them all and now I approve all comments which has made them go away and has reduced our traffic by half. I think trend micro is scared of the word "hacker". Oddly enough I'm allowed to browse to the website but it's only when I go to the rss page does it give a warning.

As far as the comment from planckscnst goes, I'm not going to give any excuses for the audio quality. We are a podcast network where the members of the community can submit a show on any topic that "are of interest to hackers" <http://en.wikipedia.org/wiki/Hacker_(hobbyist)>. Some of the hosts start off a little rough but get find their feet as time goes on. It's on my list to put up a page of tips but a lot of becoming a podcaster is getting your own workflow sorted. Our focus is on content and we will not reject any show so long as it's audible.

The best way to get topics you like on air is to submit a show. It can be on any topic you like and as long or as short as you like.

Ken.

</comment><comment><USER3> Apparently this domain hosts malware: [http://www.mywot.com/en/scorecard/hackerpublicradio.org/comm...](http://www.mywot.com/en/scorecard/hackerpublicradio.org/comment#comment)

In particular, "251 domains associated with openx malware, zeus, exploits and other nasties you don't want on your network." [ref: <http://www.malwaredomains.com/wordpress/?p=1340>]

This may be incorrect though.

<comment><USER4> Reading the comments, it looks like the "hacker" part is spooking some bean counters. I wouldn't worry about it.

<comment><USER3> No, one comment suggests that's the reason. In fact, the actual reason is that it's hosting open x malware.

<comment><USER4> I didn't say that the comments agreed with me. I said that's what I gathered from the comments, which say that one consumer security tool flagged the site, and one blacklist flagged the site.

</comment></comment></comment></comment><comment><USER5> I've added this to my podcatcher a few times over the years, but it keeps getting removed because the content is highly variable in quality both intellectually and aurally with a very low mean.

<comment><USER6> I do that with the TWiT podcasts because they're twice the length they should be and tiresome love-ins half the time.

</comment></comment><comment><USER7> Great... Listening on my iPad to the podcast on Craps and then I look at comments and see it is serving up malware?

BTW, longest podcast intro music ever and the guy speaking sounds like Seth Rogen

</comment><comment><USER8> Trend Micro (Titanium) says this is a dangerous site.</comment>


With a $10K watch, Apple is preparing for a future of inequality - <AUTHOR> http://fusion.net/story/53028/does-apples-future-depend-on-income-inequality/

<comment><USER2> Apple has arguably been living (and thriving) in a present of inequality for its entire modern existence. It is, after all, a company of 30% unit margins and a persistent unwillingness to price-compete. It's never been "products for everyone," it's always been "products for the top quintile or so (of Americans)."

But the idea that the $10k aWatch is some kind of new strategy of abandoning the middle and selling only at the extreme upper end doesn't take the realities of the consumer electronics world into account.

Apple Watch is going to live and die based on the success of the $350 and $400 models, because only those models can generate enough population for app developers to actually care about the aWatch, and only apps can turn the aWatch from "a really bad traditional watch" to, potentially, "a good smart watch."

If every Edition edition of the aWatch sells immediately, but the $350 edition doesn't sell to expectations, the aWatch will be a failure. If not a single Edition edition sells, but the $350 edition is a hit, then Apple will have another hit product on its hands.

The high-end versions of the watch are, clearly, a reliable way to get people talking about the watch, and perhaps a low-volume, high-margin product that will serve as price-discrimination, but the bread and butter of the aWatch is going to be the Sport edition.

</comment><comment><USER3> Does the $10,000 watch do something that the $350 watch doesn't do?

<comment><USER4> It probably offers increased positive signalling during mating and social rituals, but nothing technical.

I attended Basel World (the luxury watch exhibition) once, where the lowest price watch was like 40k CHF (~40K USD). They didn't really do much more than a normal watch, but attracted plenty of attention anyways.</comment></comment>


Uber's value drops ~18B on private markets as mistakes mount - <AUTHOR> http://about.crunchbase.com/news/morning-report-ubers-value-drops-private-markets-mistakes-mount/ <comment><USER2> So they lost 2.8 billion last year and this years just started and their entire valuation drops by 26%. Ouch</comment>


Encapsulation in Javascript - <AUTHOR> http://www.jonathan-jackson.net/encapsulation-in-javascript Thought that it was interesting and others might enjoy it as well. <comment><USER2> Not to be hyperbolic, but the continual promotion of the "module" pattern in JavaScript is some of the worst advice you can give.

JavaScript has prototypes for a reason -- use them. By using the "module" pattern to build objects, you create a separate copy of every function for every instance of every object you create. If you're just creating a handful of objects, it's no big deal, but if you're creating a large number of objects, it's horribly CPU and memory inefficient.

Modern JS runtimes like Chrome/V8 can create and store a million small objects with prototypes and "new" in a couple seconds, using just a dozen or so megabytes of RAM. Creating the same million small objects with the "module" pattern takes minutes, uses many hundreds of megabytes of memory, and often crashes the browser.

And that's just the pragmatics -- there are deeper semantic reasons to use real prototypes.

<comment><USER3> Yes I suppose that's true. I think it all depends on what your case is and preference, but yes memory is an issue with the module method. Just out of curiosity what are the best tools out there to test memory consumption of javascript snippets? It'd be interesting to see prototype/module/whatever_else memory usage side by side.

<comment><USER2> The browsers are getting better at optimizing memory use for small closures all the time, but there's still a long way to go. Here's a screenshot of the Chrome heap profiler for both cases:

<http://cl.ly/A5NX>

<comment><USER4> I have one question. How to handle private methods in prototype/module pattern? If I declare private function in obj function declaration I can not access it in public functions attached to the prototype of obj. This is also true for module pattern. This problem arises when I need to add extra method later. How to overcome this situation?

</comment></comment></comment></comment><comment><USER5> CoffeeScript FTW. <https://gist.github.com/1214296>

</comment><comment><USER6> "Module's are where it's at"?

Grammar much?

And don't get me started on "login with X, Y, Z". As a verb, it's "log in". YC has it wrong also.

<comment><USER3> Fixed the header "Modules are where its at" Thanks for bringing this up.

<comment><USER6> Argghh. Please correct it again, to

        Modules are where it's at

(it's = it is, and you're saying "Modules are where it is at")

<comment><USER3> I actually fixed it correctly on the website then typed it incorrectly in my reply to you.</comment></comment></comment></comment>


The Speed of Code - <AUTHOR> http://thedailywtf.com/Articles/The-Speed-of-Code.aspx

<comment><USER2> I'm _sure_ some of the stuff on that website is made up. They claim to verify it all, but when you're dealing with programmers the compulsion to game systems in elaborate ways is just too strong.

At the end of the day I have to believe some of it is made up or I would quickly lose the will to live.

<comment><USER3> Even if things are verified there is sure to be a little bit of padding to stories you get from someone who experience an emotional or bizarre situation. However, they also say reality is stranger than fiction.

<comment><USER4> >they also say reality is stranger than fiction.

It has always struck me as suspicious that the first dozen "theys" I heard this from were _all_ science fiction writers.

<comment><USER5> To quote a graffito I first ran into back in the '70s in the loo at _Change of Hobbit_ (a late lamented LA SF bookstore):

"Reality is a crutch for those who can't handle science fiction".

</comment></comment></comment></comment><comment><USER6> There is no Visual Studio 2000.

The story seems fake to me.

<comment><USER7> I think after "Vision Studios", it was pretty clear what is there and the Jaimy's Visual studio 2000 had to be a rhetorical bitter joke ...that was then completed with "better" one like putting the cherry on the top of cake.

</comment></comment><comment><USER8> This made me profoundly sad.

</comment><comment><USER9> I find it hard to believe that someone could go from not knowing anything about coding to creating stuff quickly that works well enough to be used. Isn't that what we're all trying to do? Maybe this Alicia was just lean programming her way to the top?

</comment><comment><USER10> one of the comments made me laugh:

 _I was hired for a job for which I feel vastly underqualified about 9 months ago. I think they were desperate. Having seen the calibre of the developers I've come to realise I could never be a real developer. I'm not that smart. I was shit-hot at all my previous jobs but now I feel like an idiot.

Luckily, I tell everybody that asks me to do something that I can't, I don't have a clue how to, I've no idea what my job is and I don't understand how I got through the interview. They laugh and go and ask someone else. I figure, when the shit eventually comes down and they rumble me, I can point to the fact that I've been completely honest all along._

Maybe some of these companies are like 'fronts' for illegal money laundering or fraudulent hedge funds, so the more clueless the employees are, the better. From an employment angle that's not too far fetched -

me, age 9, after typing in a ZX Spectrum animation/macro:

        I know BASIC.

me, age 22, after writing a few scripts for Office software:

        I'm proficient in Visual Basic.

And in neither case did I really know how wrong I was... You could definitely hire a lot of 'computer users' who have no real understanding of programming abstractions, and have never met a real developer.

<comment><USER11> The comment you refer to isn't that surprising. I have a friend who was hired into a software development job a large corp, barely knowing how to program. She admitted as such during the interview, and again when she was given work. Her manager's reply was "that's OK, you'll learn."

Most of her work entailed struggling to understand a bit of code and making trivial changes to it. She would confide to me over dinner that she would have no idea how to write a program from scratch, but she could generally figure out what others had done and cut & paste until she got something to work. They paid her a ton of money (after her contract agency's cut, she got $45/hour. A lot for someone who made $25k max in previous jobs) for about 6 months until the contract ran out. At no time did she attempt to deceive them about her ability, and neither she nor I could understand how she got the job in the first place, but the money was just too good to pass up!

<comment><USER10> Was she a physics graduate? I've heard the big corps like to fast-track people like that through the interview process and just assume they'll be smart enough to learn what they need (after all, they studied quantum mechanics). In fact I understand those sorts of degrees just require students to learn a bit of programming in their final year to get their assignments done, with no extra help thrown in.

Maybe companies want 'normal, intelligent and proven hard worker' rather than 'uber nerd who can complete all the work while spending most of the day playing Unreal Tournament and despising management.' who knows.

<comment><USER11> No, she had a BA in "Business Administration." I think the company was just having trouble hiring real programmers so any warm body having passing familiarity with their technology had to do.

</comment></comment></comment></comment><comment><USER12> And of _course_ it had to have gender mixed into the story...

<comment><USER13> Is that a criticism? TheDailyWTF is a big site - some stories feature incompetent women, while most have incompetent men. Big whoop.</comment></comment>