Replacing Throwing Exceptions with Notification in Validations - <AUTHOR> http://martinfowler.com/articles/replaceThrowWithNotification.html

<comment><USER2> > Firstly I'm not happy with using exceptions for something like this. > Exceptions signal something outside the expected bounds of behavior of the > code in question.

I've been hearing this line since the '90s. I've never heard a justification for it, or a rigorous explanation of what "expected" means.

Exceptions are a language construct, like variables, classes, and for loops. As with those other constructs, use them when it results in a program which makes sense. But that's a judgment you can only make on the program, not on the construct.

<comment><USER3> The following will sound cynical, but I'm serious. The "justification" is nothing more and nothing less that the original creators of the exception intended it to be used that way. It's the same reason people still quote Alan Kay as if his opinions about "object orientation" apply to everything that happens to wear that label 40 years later, and as if his opinion is some sort of controlling vote over whether something is "truly" OO or worse, _good_ OO.

While I am all about respecting our predecessors and their good work (probably more so than most HN folk, though my respect rarely shows on HN itself; much of it is on topics not HN-related), I dislike that sort of fealty to their opinions. It shuts down thought and conversation. Whether exceptions should be "exceptional" should be something discussed carefully, not simply true by definition. Personally I'd observe that due to immense variances in exception semantics and performance in all the various runtimes and languages of the world there isn't a blanket statement you can make about whether that is true; for instance, C++ and Python have radically different criteria for what an "exception" should be, written into their nature, and just dogmatically repeating "exceptions should be exceptional" won't help you understand anything about the details of either language, or how they differ.

</comment></comment><comment><USER4> The advantage of exceptions is that if the caller ignores the error, it gets detected anyway. The Go crowd argues that code should handle errors as normal events, but that leads to code with this repeated over and over:

       result, err := fn1()
       if err != nil {
          return err
       }

Or worse, the return is replaced with a "goto".

As for the original article, JSON is machine to machine communication. Why do you need to report more than the first error? One of the programs talking is broken. What next, parser error recovery for bad JSON?

<comment><USER5> > JSON is machine to machine communication. Why do you need to report more > than the first error? One of the programs talking is broken. What next, > parser error recovery for bad JSON?

JSON is a data serialization format; it might be used for machine-generated data, but it can also be used to serialize raw user input and transport it to another node for validation. For the latter use case, multiple errors can be important.

</comment></comment><comment><USER6> What a strange coincidence -- I was working on this exact same problem with a small validation library for a project, when I took a break to read Hacker News.

I feel so smart right now because Martin Fowler validated (no pun intended!) my own thinking on this issue.

Both conceptually (a form validation error is not exceptional -- it is expected behavior that you want to handle within the flow of your program), and practically (throwing exceptions makes it harder to display multiple errors for the same field, so the user winds up playing "whack-a-mole" when there are a lot of different rules... e.g. "password must be at least 6 characters", "password must contain a letter and a number", etc.)

</comment><comment><USER7> >>if a failure is expected behavior, then you shouldn't be using exceptions

How would this pattern translate to Python, where exceptions are the norm and expected behavior?

</comment><comment><USER8> Tip for the author: Validations that only contain human readable text is a nicer pattern to follow than their exception counter parts, but its not complete. You will find yourself wanting to know, programmatically, which JSON key that error message was for.

        note.addError("numberOfSeats", "number of seats must be positive");

</comment><comment><USER9> Interesting. In my validator [1], I take an entirely different approach. Everything throws an exception... which is caught and rethrown at every level, which you can then "interrogate."

I did it this way because if someone calls the validation function and wants the method to fail immediately if something is wrong, it will. No need to check, it just _does._ But if you'd like to _try_ validating and see if something messes up, you can!

[1]: [https://github.com/callmeStriking/affirm- json](https://github.com/callmeStriking/affirm-json) (see src/validator.js or, heck, just run lib/valitest.js)

</comment><comment><USER10> User input validation benefits from using notifications, internal logic checks (input coming from another part of the code) should raise exceptions.

Expected behavior --> notifications. Unexpected behavior --> exceptions. Simple.

<comment><USER11> Exactly. This article doesn't address the fact that for most programs you ideally want to have a separate UI validation where you're dynamically validating the user input before it gets submitted, and an internal validation where you validate the data before it gets saved, but also possibly even after it gets saved, relative to pre-existing data (where you could throw an exception and abort the transaction if it didn't validate).

If you want to use some of the same validation code for user input validation and internal validation, I suppose you could modify the notation pattern to conditionally throw an exception when adding a new error depending on whether it's on the client or the server.

<comment><USER5> > If you want to use some of the same validation code for user input > validation and internal validation, I suppose you could modify the notation > pattern to conditionally throw an exception when adding a new error > depending on whether it's on the client or the server.

Or you reuse the validation code itself, but called from a wrapper that turns notifications into exceptions, rather than adding branches.

</comment></comment></comment><comment><USER12> This pattern is totally embedded into the non-monadic applicative Either sometimes called Validation

        data Validation e a
          = Collect e
          | Value a
          deriving Functor

        instance Monoid e => Applicative (Validation e) where
          pure a = Value a
          Collect le <*> Collect re = Collect (le <> re)
          Collect e  <*> _          = Collect e
          _          <*> Collect e  = Collect e
          Value f    <*> Value a    = Value (f a)

There is no monad instance for this which lets us scoot forward through a computation and and all of the errors at once.

<comment><USER13> This is worth understanding, and works out a lot better in practice than having to pass in ad-hoc collection builders as equally ignorable "out-params" or exceptions.

</comment></comment><comment><USER14> This came up recently on a Python project at work. I think the approach in the article is nice but most Python libraries seem to make use of exceptions for these kinds of scenarios. Working against that trend in Python doesn't seem worth it.

In other languages I would probably prefer to follow the approach in the article.

</comment><comment><USER15> In Ruby, I prefer exceptions for most errors because they make the error handling more visible and explicitly defined, but if performance is an issue, returning a value (or setting an error on an ActiveRecord model) is much faster than raising an exception.

</comment><comment><USER16> I like this pattern a lot. On a recent project, I used it almost exactly, but with a richer model of 'error'. Even though it was just basic form validation, I thought it led to very clean code.

<comment><USER5> "Unexpected" is an ill-defined term; you've clearly anticipated, on some level, an event occurring if you have written code to throw an exception.

One criterion you could apply is that exceptions should only be thrown for violations of the code's _published_ expectations that can not be statically prevented. Whether a validation failure would be "unexpected" then depends on whether the code is expressly validation code that expects unvalidated data (in which case validation failures would not be unanticipated) or processing code which "expects" good data and does something with good data, but throws an exception on bad data -- note that in the same workflow, at different levels, both models could be used, with different levels creating or swallowing exceptions depending on the expectations of the particular function.

</comment></comment><comment><USER17> > if a failure is expected behavior, then you shouldn't be using exceptions > Just from the abstract view - isn't 'exception' defined as unexpected event? > Or am i missing something?

<comment><USER18> Exceptions are not for unexpected behavior, but for state that is inconsistent with your model. Unexpected behavior is generally called an "error" or a bug. You can't code around the unexpected.</comment></comment>


The Great Tree-List Recursion Problem (2000) - happy-go-lucky http://cslibrary.stanford.edu/109/TreeListRecursion.html <comment><AUTHOR> Isn't this just in-order traversal...

        class Linked:
            def __init__(self, data, left=None, right=None):
                self.data = data
                self.left = left
                self.right = right

            def tree_to_list(self):
                if self.left is not None:
                    first, left = self.left.tree_to_list()
                    left.right = self
                    self.left = left
                else:
                    first = self

                if self.right is not None:
                    right, last = self.right.tree_to_list()
                    right.left = self
                    self.right = right
                else:
                    last = self

                first.left = last
                last.right = first

                return first, last

</comment><comment><USER2> This is one of the problems in 'Elements of Programming Interviews' book.

-

Convert a sorted doubly linked list into a BST

C++: [http://elementsofprogramminginterviews.com/solutions/cpp/sor...](http://elementsofprogramminginterviews.com/solutions/cpp/sorted_list_to_bst.cc)

Java: [http://elementsofprogramminginterviews.com/solutions/java/So...](http://elementsofprogramminginterviews.com/solutions/java/SortedListToBST.java)

Python: [http://elementsofprogramminginterviews.com/solutions/python/...](http://elementsofprogramminginterviews.com/solutions/python/sorted_list_to_bst.py)

-

Convert a BST to a sorted doubly linked list

C++: [http://elementsofprogramminginterviews.com/solutions/cpp/bst...](http://elementsofprogramminginterviews.com/solutions/cpp/bst_to_sorted_doubly_list.cc)

Java: [http://elementsofprogramminginterviews.com/solutions/java/BS...](http://elementsofprogramminginterviews.com/solutions/java/BSTToSortedDoublyList.java)

Python: [http://elementsofprogramminginterviews.com/solutions/python/...](http://elementsofprogramminginterviews.com/solutions/python/bst_to_sorted_doubly_list.py)

</comment><comment><USER3> The reversed problem is more interesting: given a doubly-linked sorted list (and its length), convert it to a balanced binary search tree.

<comment><AUTHOR> That's the DSW algorithm.

[https://en.wikipedia.org/wiki/Day-Stout- Warren_algorithm](https://en.wikipedia.org/wiki/Day-Stout-Warren_algorithm)

<comment><USER4> Pretty trivial, since you can easily find the middle of a doubly-linked list _and step back_. Then you simply do "find middle, use it as root, recursively build two subtrees".

With a singly-linked list, it's much harder; I don't know (without googling) if a more efficient than "build and rebalance as you go" algorithm exists.

<comment><USER5> You could convert a singly-linked list to a doubly-linked list in O(n), and then apply your favorite doubly-linked solution.

You could even do this in place without increasing the size of each node at the cost of doubling the size of variables that point to nodes and slightly lowing down stepping through the list. You do this by storing the next and previous pointers for each node in the same location, xor'ed together.

That doubles the size of variables that point to nodes and slows down stepping because you have to turn them into structs that store both a pointer to the node and a pointer to an adjacent node and update both of these pointers as you move through the list.

<comment><USER6> If you're willing to burn O(n) memory on it you could just create an array of pointers to the nodes in the list and then use that to build the balanced tree. It's probably faster than iterating over the sublist every time to find the center.

This assumes of course that the list is sorted. If not, you should probably sort the list first to avoid driving yourself insane.

If memory is too tight to make temporary storage and the list is too big to sort and you want a perfectly balanced tree then you've got an interesting problem on your hands.

<comment><USER3> You can sort a linked list in O(nlog(n)) time with O(log(n)) space, and then convert it to a balanced binary tree in O(nlog(n)) time and O(log(n)) space.

EDIT: demonstration:

      sortList [] = []
      sortList [x] = [x]
      sortList xs = merge (sortList as) (sortList bs)
        where
          (as, bs) = split xs

      split [] = ([], [])
      split [x] = ([x], [])
      split (x:y:rest) = let (xs, ys) = split rest in (x:xs, y:ys)

      merge xs [] = xs
      merge [] ys = ys
      merge (x:xs') ys@(y:_) | x <= y = x : merge xs' ys
      merge xs (y:ys) = y : merge xs ys

      data Tree a = Empty | Node a (Tree a) (Tree a) deriving(Show)

      balancedTree xs = mktree (length xs) xs
        where
          mktree 0 [] = Empty
          mktree n xs = Node x (mktree n' less) (mktree (n - 1 - n') more)
            where
              n' = (n - 1) `div` 2
              (less, (x:more)) = splitAt n' xs

      listToBalancedTree :: Ord a => [a] -> Tree a
      listToBalancedTree = balancedTree . sortList

</comment></comment></comment></comment></comment></comment><comment><USER7> Here is a C library I wrote in 1999 which can convert, in-place, a container between Red-Black, AVL and linked list:

[http://www.kylheku.com/~kaz/austin.html](http://www.kylheku.com/~kaz/austin.html)

</comment><comment><USER8> The declarative programming language Prolog is very suitable for reasoning about trees, lists and recursive structures in general.

For example, here is a Prolog definition of the _tree_ from the article:

        tree(node(4,
                  node(2,
                       node(1,nil,nil),
                       node(3,nil,nil)),
                  node(5,nil,nil))).

I am using terms of the form nil/0 and node/3 to represent the tree.

Let us start by converting the tree to a _list_. As requested, we shall consider the _in-order_ traversal of the tree elements, described as a list. For such situations, Prolog DCG notation is very convenient, since it easily allows us to describe a _list_ in relation to other terms (in this case, a tree):

        tree_to_list(nil) --> [].
        tree_to_list(node(E,Left,Right)) -->
                tree_to_list(Left),
                [E],
                tree_to_list(Right).

Here is a sample query and its result:

        ?- tree(T), phrase(tree_to_list(T), Ls).
        T = node(4, ...),
        Ls = [1, 2, 3, 4, 5].

OK, so we now have the in-order traversal. Of course, lists are already implicitly "linked" in Prolog in one direction: Given a list, we can readily reason about the first element and the remaining elements. The task requires us to do more, i.e., reason about the reverse direction as well.

One way to express this is to use _rational trees_ , also known as _cyclic terms_ in Prolog. For example, here is a case of cyclic term:

        ?- append([a,b,c], Ls, Ls).
        Ls = [a, b, c|Ls].

Here, Ls represents the circular list [a,b,c,a,b,c,a,...].

We can use this feature to our advantage as follows:

        list_with_backlinks([], []).
        list_with_backlinks([L|Ls0], [L-Prev|Ls]) :-
                append([L|Ls], Cs, Cs),
                foldl(with_backlink, Ls0, Ls, Cs, Prev).

        with_backlink(E, E-Cs0, Cs0, Cs) :- Cs0 = [_|Cs].

Sample query and answer:

        ?- list_with_backlinks([a,b,c], Cs).
        Cs = [a-[_S2|_S1], b-_S1, _S2], % where
            _S1 = [a, b-_S1, _S2|_S1],
            _S2 = c-[b-_S1, _S2|_S1] .

Thus, as desired, we can generate a doubly-linked list from the original tree:

        ?- tree(T), phrase(tree_to_list(T), Ls0),
           list_with_backlinks(Ls0, Ls).
        T = node(4, ...),
        Ls0 = [1, 2, 3, 4, 5],
        Ls = [1-[_S4|_S1], 2-_S1, _S2, _S3, _S4], % where
            _S1 = [1, 2-_S1, _S2, _S3, _S4|_S1],
            _S2 = 3-[2-_S1, _S2, _S3, _S4|_S1],
            _S3 = 4-[_S2, _S3, _S4|_S1],
            _S4 = 5-[_S3, _S4|_S1] .

Of course, this does not completely solve the task, which requires in-place modifications of the original tree. Pure Prolog lacks destructive modifications, so we cannot fully translate the code to Prolog. On the plus side, _no pointers at all_ were necessary, and the recursions are pretty straight-forward.

</comment><comment><USER9> Neat!

Also the C answer is missing a brace at the end of treeToList and that makes me a little crazy

</comment><comment><USER10> Not really a useful problem, considering that it will be impossible to solve if the tree would be properly balanced.

<comment><USER11> I don't agree. The tree being balanced of not has not bearing on the solvability of the problem.

Even a naive approach would work balanced or unbalanced and that would be simply to pop the lowest value in the tree and construct your list until you run out of nodes.

The trick is to do it in O(n) time and use recursion.

</comment></comment><comment><USER12> In a time where we're finally realizing the benefits of functional programming (i.e. no side effects), a problem like this really seems like a callback to a more barbaric era. Like writing a state machine using gotos.

EDIT: Never expected this to devolve into an argument about the merits of gotos! I thought we were all past that, but apparently not.

<comment><USER13> Asking honestly because I would like to know: What is wrong with writing a state machine using gotos? Assuming that one is solving a problem that definitely needs a state machine for some reason.

<comment><USER12> Gotos are generally considered a bad idea in high-level programming.

[http://www.u.arizona.edu/~rubinson/copyright_violations/Go_T...](http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html)

<comment><USER14> This is lazy thinking, the gotos described in that essay can jump anywhere in the program while modern gotos are limited to the function scope and have various warnings about initialization order and whatnot.

All the arguments it makes no longer apply but people still quote the snappy headline.

That essay does make an excellent argument against programming with many tiny functions though, as those do cause the execution cursor to jump all over the source code document.</comment></comment></comment></comment>


Why does Google think Infogami will harm my computer? - <AUTHOR> http://www.google.com.au/search?hl=en&q=infogami&btnG=Search&meta= <comment><AUTHOR> You can't actually click through Google's warning either <http://www.google.com/interstitial?url=http://infogami.com/> that's going to hurt traffic.

</comment><comment><USER2> Infogami's, unfortunately, full of spam. That probably has something to do with that.

</comment><comment><AUTHOR> Apparently Google is now detecting potential malware when it indexes pages, and then warning users. Is there really malware on Infogami?

<comment><USER3> Infogami let's any random person put stuff on their domain, so there's a lot of spam and crap there. Google detected it and now the whole domain is considered unsafe.

I'm guessing some page contains an IE exploit or links to spyware. Links to "credit_card_numbers_generator.exe" here: <http://creditcardgenerator.infogami.com>

<comment><AUTHOR> Makes sense.

<comment><USER4> It's sort of like what happens when you leave a house abandoned.

<comment><AUTHOR> I wonder why Aaron did that? If it was me I would have kept Google Adsense on Infogami and tried to make a living out of maintaining and improving it.

<comment><USER5> Infogami was sold along with Reddit to Conde Nast, and Aaron doesn't work there any more.

</comment></comment></comment></comment></comment></comment><comment><USER6> Oddly enough, this was enough publicity for me to set up an Infogami site. Probably not the best publicity for the general molasses though.

This might totally be a mistake, but Google is looking more and more like a big obnoxious uncaring hollow shell of its former self if there ever was one every day. This doesn't exactly help bolster my impression of Google.

<comment><USER7> I wonder if it negatively affects your page rank if such a page links to you? Meaning will Google just ignore the link, or will it have a negative weight? I hope they just ignore it, otherwise it would be too easy to harm the competition.

</comment></comment><comment> kal-el google knows all</comment>


Building smarter, more robust API clients - <AUTHOR> http://blog.apiary.io/2015/02/17/Utilising-API-Blueprint-in-API-Clients

<comment><USER2> Similar to this 'dynamic' query generation from .apib format, we're starting to build API clients using Apimatic's service. I really like the concept but wish they had a direct Apiary integration. Testing against .apib using Dredd has already proven very useful.

The better we can build these tools, then API integrations can be more a matter of service discovery and less manual mapping. I see a future where semi-automatic connections are made between microservices ("MicroSaaS") based on emerging standards in data practices. This would also help ditch REST where it becomes inefficient in favor of websockets/protobuf/etc.

Smart discovery of API versioning also crosses my mind, Stripe's API makes assumptions based on the user account age and inbound API call data, but clients could be smarter too.

Thanks for sharing! We do not use Swift but the overall concepts here should be discussed more often.</comment>


Ways to get feedback from customers - <AUTHOR> http://www.danmartell.com/feedback-the-secret-weapon-for-startups/

<comment><USER2> _Thomas Edison once said "Genius is 1% inspiration and 99% perspiration". If that's true, then out of the 99%, 45% of that time should be spent talking and listening to your customers._

I smell a maths fail.

Other than that, this article provides a decent list, though all of these tools should be familiar to everyone here.</comment>


OpenSSL: prevent handshake with unseeded PRNG - <AUTHOR> https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=e1b568dd2462f7cacf98f3d117936c34e2849a6b

<comment><AUTHOR> This _may_ relate to CVE-2015-0285, the high severity vulnerability preannounced earlier this week. [http://www.openwall.com/lists/oss- security/2015/03/18/5](http://www.openwall.com/lists/oss- security/2015/03/18/5)</comment>


iCarus – Raspberry Pi-Powered Head Unit for Cars - <AUTHOR> http://i-carus.com

<comment><USER2> I might be mistaken but this will end up being a huge pain. Imagine the SD card started that frequently as car. This will end up corrupting your card at least once a month. You'll need to end up re installing the OS all the time and until you do, you'll have a dead radio !

</comment><comment><USER3> What about fitting it into different cars? You would probably need a new mask or bezel if the opening isn't the right shape.

</comment><comment><USER4> Curious that bluetooth is not included. That's pretty essential for most car- audio setups these days, no?

</comment><comment><USER5> I like it, I wouldn't mind a dummy unit that will just run CarPlay for me.

</comment><comment><USER6> I'd purchase this if this ships from amazon</comment>


Judge Questions Fairness of Silicon Valley Wage Settlement - <AUTHOR> http://blogs.wsj.com/digits/2014/06/27/judge-questions-fairness-of-silicon-valley-wage-settlement/

<comment><USER2> $324 million divided among 64,000 people is only about $5000. Once "legal overhead" has taken place I wouldn't be surprised if that number was more like $2000.

I think the judge has some grounds for questioning the lowness of that number. On the other hand, I agree that convincing a jury of laypeople that all 64,000 workers have suffered more than that in depressed wages might be difficult.

<comment><USER3> That "legal overhead" is very real; without those lawyers fronting the money to pursue the case, we wouldn't be having this discussion in the first place.

That the settlement is low is obviously a calculation by those lawyers of the risk of taking it to trial, losing and being highly in the red.

</comment></comment><comment><USER4> Is there any legal dataset that would show the average settlement reward per person in the entire US legal history?</comment>


Securely destroying your old hard disk with thermit - <AUTHOR> http://frank.geekheim.de/?p=2423

<comment><AUTHOR> More pictures: [https://secure.flickr.com/photos/75613313@N00/sets/721576443...](https://secure.flickr.com/photos/75613313@N00/sets/72157644303942987)</comment>


Shotcut: Free, open source, cross-platform video editor - <AUTHOR> https://www.shotcutapp.com/ <comment><USER2> Shotcut (on Linux at least) just doesn't work.

I've used pretty much all amateur video-making software for Windows and some for Mac, Screenflow, FinalCut Pro, etc.

The best by far is FinalCut Pro (Mac-only), because it automatically creates proxy files and allows you to edit everything in real time with no lag, even when adding complicated effects.

The situation on Linux is dismal. The only good one is [https://kdenlive.org/](https://kdenlive.org/). It's actually I'd say at par to FinalCut in terms of performance, although the UI could use some clean up. It's the one I use because the other ones would either keep crashing, or be impossibly slow.

<comment><USER3> Blender is the best free software video editor across GNU/Linux, Windows and Mac. I've used it to edit a feature length movie. It's not perfect at all, but doesn't crash and doesn't crap out when you give it a slightly unusual formatted file.

<comment><USER4> Looking at the documentation, I was under the impression that all it could do was basic cutting and simple things like cropping. Can it do simple effects, like video overlays?

<comment><USER5> Yea, there are lots of effects and tools hidden in there! I've been able to implement every effect I've ever needed without much effort. I actually have been using blender since I was a kid so I know my way around better than most. I'll edit this comment later with some quick tips or examples.

<comment><USER5> Sorry for the shortness of this, but I know everybody strapped for time and might find this handy.

Things Blender capable of for video:

* Advanced graphical node based compositing

* "Effects Strips": Essentially generates a strip in the sequence editor that you can layer above the target media strip. Like using a Photoshop layer for one specific effect.

* Decent audio mixing capabilities

* Fantastic motion tracking (advantage of being built into your creation suite)

Pro Tip: Make sure your output frame rate is the same as the videos you are going to import. Otherwise the audio gets out of sync.

</comment></comment></comment></comment></comment><comment><USER6> I used it recently to edit large video files around around 1h 1080p; Shotcut is rather slow and freezes often when editing big files. But nonetheless its a great project and I hope it will improve in the future.

<comment><USER7> As long as it doesn't crash constantly. Openshot, Pitivi, Cinelerra and many of the others I've tried are totally unusable because they crash. All the time. Constantly. (Granted I haven't tried any of these in over a year, so hopefully they've gotten better).

The only tool in Linux that's really decent at editing video isn't even a video editing tool. It's Blender.

For the past few years I've just used Resolve in Windows. I'd be excited to try Shortcut and see if it handled better.

Video editing is a though medium though, even if you're just calling ffmpeg a lot. It's worth watching the Vimeo talk and video encoding and how a lot of cameras and cellphone encoders are so crappy they can change framerates on every frame.

</comment></comment><comment><USER8> How does it compare directly to Camtasia in a real world comparison?

For example with Camtasia, you can click 1 button and have your desktop + audio + optional webcam all being recorded to your video project, and then you can hop in and edit it with a bunch of great tools and presets. This includes complex animations and tooltips with doing nothing more than dragging around a few sliders.

Basically you can get up and going with an excellent work flow as 1 single person who isn't a video editing god.

Where does Shotcut stand compared to that?

At this point price isn't an issue for people in a position to create videos. It's all about how fast it is to go from an empty folder to a high production quality video.

Camtasia is one of the only reasons why I run Windows so if your project can solve all of those problems, that would be an incredible feat since Camtasia seems to have no intent on supporting anything but Mac / Windows.

Also if it helps gauge the comparison I have tried kdenlive about 6 months ago and compared to Camtasia I would rate kdenlive a 0.001 and Camtasia a 9.5 on the sole task of "quickly create a nice looking screencast".

<comment><USER9> > At this point price isn't an issue for people in a position to create videos

There's an awful lot of people who want to break into Youtube with no money.

There's also a small but well-represented on HN market of people who want to have an OSS/Free Software only workflow.

<comment><USER8> I'm all for OSS too but when it comes down to it, if you're serious about video editing, this isn't really a tool you can make compromises on (and trust me, I spent a lot of time trying before pulling the trigger on buying Camtasia).

This is after having recorded about 50 hours of real-time video over a few years. There's just so many things you absolutely need to be happy and productive when recording -- especially if you plan to do this for a living.

Using a bad video editor (and I'm not saying Shotcut is bad because I haven't installed it yet) is just a really draining and time wasting experience.

It takes me around 70 minutes of real life time to produce 10 minutes of video after years of work flow optimizations and using what I think is one of the best tools available to make screencasts. Almost all of that time is spent editing in Camtasia (stopping and starting the recording, correcting mistakes, adding post-production effects, etc.).

I would love to switch to an open source tool (for many reasons) but the reality of the situation is, I wouldn't switch unless it was remarkable because it's such an important tool if you're livelihood depends on making videos.

</comment></comment></comment><comment><USER10> Does anyone know how this compares to Openshot? Which is also cross platform and open source.

<comment><USER11> Ive tried both and OpenShot was 100 times better for me. Shotcut was slower for me and I didnt like the UI as much.

</comment></comment><comment> rwx</comment><comment> For short video editing it is perfect. For large projects I prefer Blender.

<comment> alok-g Interesting. I had not realized Blender could be used for video editing too.

<comment><USER12> For a decade or so the situation seemed to be that there were dozens of FOSS editors, all of which claimed to work perfectly but none of which was usable in reality. Blender was the first thing I found that actually worked properly. Having found something that works I'm a bit reluctant to return to the historically infuriating task of evaluating FOSS video editors, but maybe it's time to check out some of the other options again.

<comment><USER13> Same here, except I gave up on video editing all together because all of the FOSS video editors I tried were trash (I don't use that word lightly but they really were -- completely unusable). Never tried video editing with Blender, have only used it for 3D modeling and rendering.

</comment></comment></comment></comment><comment><USER9> I'll have to try this. There's a big gap for the "I just want to make a few cuts to this 10 minute video and fix the audio levels" tool. Until now I've been using avidemux which isn't really ideal.

</comment><comment><USER14> Being a hobby blender user i have used many Video editing softwares but i keep coming back to blender as my one stop shop for everything. Effects, Video Editing, Sound sync.. Other editors i use are KDenlive, Pitivi, Openshot and lesser known VLMC from the creators of VLC player.

<comment><USER15> Did you ever try cinelerra[1]?

[1] [http://cinelerra.org/](http://cinelerra.org/)

<comment><USER14> Ohh yes cinelerra too long time back, it is very nice. But as i said Blender i just the stuff for me. Shortcuts and everything.

</comment></comment></comment><comment><USER16> Making cross-platform video editor is no easy task, kudos. I'll definitively check it out.

May I suggest working on your logo and loosing the AdSense ads on your page? Unfortunately, AdSense ads are borderline malware these days. I got one for MacKeeper and another for a fishy VPN.

</comment><comment><USER17> I've used Shotcut, and it was easy to use, and its simplicity reminded me of iMovie, which I also recommend for beginners. KDENlive was also good enough for most projects. As stated by others, the biggest weakness is that these editors are based on MLT framework. But if you cut videos once in a while, these are fine.

As for me, I edit a lot more videos, and I spend a quite of time on doing it. I've tried to work with a lot of different FOSS video editors, except Blender, and my conclusion was always the same -- it's usable, but a little rough on the edge, and has just enough minor bugs or quirks to be irritating and sometimes frustrating. I'm not talking about just crashes, since that happens on all video editors even on Premiere Pro.

Video editing is somewhat similar to coding, as it requires a lot of concentration, intensity, and creativity... There's nothing more frustrating than having the software/tools that gets in your way and block your flow and progress. Also time is money in video production house, often with tight deadlines. Some wedding videographers are offering same-day edits, which sounds insane to me, since video editing takes a lot of time. As for me, it takes about 7 hours to edit 1 hour video.

Currently I'm using Davinci Resolve 14 (on both Mac and Windows but haven't used on Linux yet). So far, it has worked surprisingly well. I really like the built-in audio editing and coloring tools. All this is free, with exception of some features for pro/studio version.

Some have complained the lack of h264/265 import on Linux version of Davinci Resolve, but you can always transcode to "pseudo-lossless" codec such as DNxHR/DNxHD (or ProRes if on Mac) using ffmpeg first. This step is usually automated using script to convert raw footage. Most pro workflow also involves this extra step, because editing on h264 source is really painfully slow and inefficient.

As a side note, the last time I checked, in LA/Hollywood, Avid was still the king of editor, but it may be changing. Anywhere except Hollywood, Premiere Pro CC is definitely the most popular editor, especially when it's used in conjunction with After Effects. However, I didn't need AE and I didn't like subscription-based payment model. Avid Composer First is free version of Avid, but it can't output 4k, and Avid UI is horrible.

<comment><USER12> > Some have complained the lack of h264/265 import on Linux version of

> Davinci Resolve, but you can always transcode to "pseudo-lossless"

> codec such as DNxHR/DNxHD (or ProRes if on Mac) using ffmpeg first. This

> step is usually automated using script to convert raw footage. Most pro

> workflow also involves this extra step, because editing on h264 source is

> really painfully slow and inefficient.

The preferred workflow would be import h264, edit using proxies, then render the result from the original files. A pro workflow _shouldn 't_ involve a gratuitous transcoding step. Mind you a _real_ pro workflow wouldn't involve ingesting h264 files at all.

But it might be true that I should just get over myself and transcode the files before editing.

</comment></comment><comment><USER18> Used to use this beautiful piece of sw, i only wished it worked on slower pc's and that it was more easily scriptable. Had to drop it for a cli handmade solution[0]

[0] [https://github.com/tomcooks/giulioandreotti666](https://github.com/tomcooks/giulioandreotti666)

</comment><comment><USER19> I've used this on the Mac and it is good enough for me - putting titles on videos before uploading to YouTube (I sometimes do a video of playing an instrument).

It is better than iMovie in this regard because it doesn't require copying the giant file into some "project" directory like iMovie seems to.

<comment><USER20> > It is better than iMovie in this regard because it doesn't require copying > the giant file into some "project" directory like iMovie seems to.

This is my biggest gripe with iMovie. You need to have double the space just to start editing.

I guess their idea was to allow users to move their video files around and delete them at will without being able to mess up the iMovie project.

However, iMovie has great screen transitions. Is there any other free or open source program that compares in that regard?

</comment></comment><comment><USER21> After evaluating various OSS video editors, I settled on Shotcut, and have been using it to make daily videos.

Its simple, functional, and does exactly what I need to do: cut, arrange, and splice clips and audio and export video.

I'm not going to say its the best, I'd really like to have the ability to dub in app instead of running audacity in the background, and I find its ability to put titles and text kinda wonky.

But its a simple tool that does exactly what I need to do and is Open Source.

</comment><comment><USER22> Please could you make the Linux version easier to consume? Either a deb/rpm package and perhaps a docker image? :)

At the moment, it is pretty unclear of the exact install process!

<comment><USER23> There is a snap package, does that not work for you?

<comment><USER22> From the description, that is just the app.. not the dependencies... So the snap doesn't really add anything (other than confinement) compared to the tar.

<comment><USER23> Thanks, I see. Unfortunately I don't have my Linux machine with. I'll try it later and report my experience.

</comment></comment></comment></comment><comment><USER24> GitHub repo: [https://github.com/mltframework/shotcut](https://github.com/mltframework/shotcut)

</comment><comment><USER25> Does this have proxy editing? This is an absolute must in the age of UHD resolution and up. I believe Kdenlive has proxy editing.

<comment><USER26> Kdenlive definitely has proxy editing.

</comment></comment><comment><USER27> I'm currently doing all my editing in iMovie and I'm not very happy with it since it has a few glitches I frequently run into.

Anybody got a link to a comparison between this and iMovie? "Shortcut" seems to be quite ungoogleable.

<comment><USER28> The name is 'shotcut' but I definitely read it as 'shortcut' the first time too

</comment></comment><comment><USER29> It uses both GTK and Qt, someone knows why? And what different purpose they solve?

<comment><USER30> I could be wrong, but it looks like it is an optional dependency that adds additional image format support to MLT, which is a dependency of Shotcut. Also, some Qt builds require at least glib for event loop integration and some even require GTK as dependency to enable GTK styling in Qt apps. The build script for Shotcut appears to have an option to disable this dependency.

</comment></comment><comment><USER31> I wish this was good but it isn't, unfortunately I have to run a windows partition just for vegas, seems like a complete waste when everything else that I use runs in linux.

</comment><comment><USER32> How cut video and save it's fragment without full rencoding?

<comment><USER33> You can use ffmpeg for this, using "copy" for audio and video, but setting "-ss <hh:mm:ss.0>" for the start time and "-t <seconds>" for the length of your cut beginning from the start timestamp given with -ss.

</comment></comment><comment><USER34> I'm looking forward for the Pitivi 1.0 release because it feels quite natual to work with (and uses GStreamer) and I expect some minor bugs to be solved until 1.0

</comment><comment><USER35> Interesting name. I worked on an app called "ShotPut Pro" as an intern years ago that did the opposite (snatch video from big cameras).

</comment><comment><USER36> The speaker configuration on the front page is not correct. Those are M-Audio AV-40's and only one of them should have the volume knob, aux input, and headphone output.

</comment><comment><USER15> Oh dear, another MLT-based video editor. MLT is seriously bad. They can't even do scale properly.

</comment><comment><USER37> I would like to have a simple free video editor that can cut and append files together _without_ re-encoding. It's doable with avidemux, but it is just pain to manage.

<comment> yjftsjthsd-h I'm surprised that that's technically possible, actually. Does it just shove the streams into a container format that allows both?

<comment><USER38> If you cut at I-frames, you don't need to reencode:

[https://en.wikipedia.org/wiki/Video_compression_picture_type...](https://en.wikipedia.org/wiki/Video_compression_picture_types#Intra- coded_\(I\)_frames/slices_\(key_frames\))

If you need more resolution, you can apply more tricks, recompose i-frames from the same data, etc.

</comment></comment></comment><comment><USER39> On the free, closs-platform video editor side of things (-open source) Da Vinci is worth a look or two as well.

Kdenlive is another foss editor based on MLT, like Shotcut.

<comment><USER40> Da Vinci just crashes for me, over and over. Its been one of the least stable apps I've ever encountered .. so, ymmv.

<comment> alok-g Most of the video editing programs I have used (Sony, Corel, Cyberlink, Panasonic) crash often. On this HN, it looks the same for FOSS also. Is there some specific reason behind this?

<comment><USER41> I do some video editing contract work from time to time. I never know what I will have to use so I have pretty much used all of them. They are unstable because they require huge amount of resources, especially if your looking for 4k source material.

You must have a very powerful machine. I don't have many crashes when working on high end custom built machines, but they do happen.

From most stable to least stable for me have been:

1) Lightworks (2010 announced they were moving to Open Sourcing the code, still hasn't really happened) It has been used for decades now to make Oscar winning films. If you understand the analog way of editing video this makes a lot more sense. Its basically free but has a HUGE learning curve

2) DaVinci Resolve (Most people use it only for color correction but they have added editing recently) My preferred and the one I recommend to everyone when asked what to use.

3) Sony now Magix Vegas Pro - My previously recommended and preferred video editor does a great job on keeping the work flow the work flow and not getting in your way (Lightworks actually does this best but man it is hard to get through the learning curve)

4) Adobe Premier - This thing is a BEAST but it is the defacto standard. Moderate learning curve but it is cross compatible and has every tool available. Great eco-system.

105) Final Cut Pro - I cringe when I have to use it. Only reason this thing has such a following is it is so hard to learn another video editor. Premier was the standard and somehow Final Cut Pro took over around 2008. Boy I really never liked it, but I was always in the minority till the Final Cut X came out. I have lost hours of work and I have also lost hours of work because case sensitivity is optional on OS X and MacOS.

<comment><USER42> > Adobe Premier - This thing is a BEAST but it is the defacto standard.

I must admit, I've not really heard of Adobe being used in professional editing contexts. With a little research I've found some articles suggesting the BBC was standardising on Adobe Premiere[1]. Article is from 2010, but I can't confirm that happened though. I left that organisation in 2011 and at that time, I was managing a number of Mac based editing suites with Final Cut Pro (FCP).

I then ran a post-production company in London. We had suites full of Avid Media Composer and one solitary FCP, because some people refused to use anything else. (Also had a Baselight grading suite and Avid ProTools in the audio suites). We never considered Adobe Premiere and I can't, off the top of my head, recall any other post- house using it either.

[1] [http://www.tvtechnology.com/news/0002/bbc-adopts-adobe- premi...](http://www.tvtechnology.com/news/0002/bbc-adopts-adobe-premiere-as- nle-of-choice/206911)

<comment><USER43> Just one data point and my usage may not be "pro" the way broadcast or film would be (I've done mainly in-house educational videos for a couple of universities).

We went from Avid in the early/mid 2000's to Final Cut Pro on Mac Pros (in the cheese grater days) to Premiere Pro on Windows workstations which I still use today. First we switched away from FCP when Mac Pros languished and FCPX tossed out a lot of the features we needed. I understand that a lot of those were later replaced but at the time it was a dealbreaker.

With Premiere, we can edit on either MacOS or Windows workstations, performance is good on a properly equipped machine, and it integrates well with the other tools in the suite like Audition, After Effects, and their still-image stuff like Photoshop and Illustrator when needed.

It's not going to work for everyone and I'm still not a fan of the subscription model (much prefer the old way where I'd spend $600 or whatever every few years and be done with it). That said, it doesn't surprise me to see it getting professional use, just as it doesn't surprise me that other production houses find FCPX to be a better fit for their equipment and workflow.

</comment></comment></comment></comment></comment></comment><comment><USER44> Video editing is not my thing, but thumbs up for doing it as native app across all three major desktop OSes.

</comment><comment><USER45> Not really on-topic. But the same folks who have an interest in the subject might know.

I'm looking for a timeline editor in javascript which allows me to build an object to pass to ffmpeg to inject content at certain intervals.

Much like what gifs.com [0] does.

I have found this [1]: but it's not really what I am looking for.

If anyone has come across something similar, let me know. Thanks

[0]: [https://i.imgur.com/G1MyBOG.png](https://i.imgur.com/G1MyBOG.png)

[1]: [http://marcinignac.com/blog/timeline- js/](http://marcinignac.com/blog/timeline-js/)

</comment><comment><USER46> When I saw their front page features a screenshot with only a sliver of the screen devoted to the sequencer, I knew they aren't serious about video editing.</comment>


Ask HN: How do you organise your codebase on your private machine? - <AUTHOR> <comment><USER2> ~/Projects/$MyCoName/{Clients/$ClientName,Internal}/$ProjectName

Edit: for anyone who doesn't quite read shell expansion, it looks like this:

        ~
        + Projects
          + My Company Name
            + Clients
              + Client 1
                + Project Foo
              + Client 2
                + Project Bar
            + Internal
              + Project Baz

<comment><USER3> Yea I do something similar. I like the {$ClientName, Internal} though. I had issues with that before.

<comment><USER2> What issues did you have?

FYI the {} is shell expansion braces (which split on the comma), I've edited my comment with a literal tree of how it looks

Edit dos: and I see that you probably knew that!

<comment><USER3> My bad, I didn't mean I had issues with the expansion or the idea, but it solves the organization issues I had.

</comment></comment></comment></comment><comment><USER3> On my two computers I have ~/Code/$Project and ~/Code/{$username, $company, tmp, github}/$Project

</comment><comment><USER4> What do you mean? I have a _code_ folder with _hack_ and _work_ subfolders.</comment>


Why Does macOS Catalina Use Zsh Instead of Bash? Licensing - valiant-comma https://thenextweb.com/dd/2019/06/04/why-does-macos-catalina-use-zsh-instead-of-bash-licensing/ <comment><AUTHOR> > Given that macOS developers have been using a shell that's older than a > decent bottle of Scotch, this is obviously a huge selling point.

Wouldn't most macOS developers install their preferred shell as a part of setting up a new Mac? I am not a macOS developer but I feel you'd run into the limits of Bash 3.2 pretty quickly when standing up a new environment.

<comment><USER2> Maybe if you are a Pro Bash user ... personally I would not notice any difference.

</comment></comment><comment><USER2> It is also a better shell :-)</comment>


Qt may use Google's V8 JavaScript engine - <AUTHOR> http://labs.qt.nokia.com/2011/02/24/qt-people-our-javascript-platform-is-burning-rubber/

<comment><USER2> And Vista Phone 7 apps will contend with the IE machinery?</comment>


Why Subways in the Northeast Are So Troubled - <AUTHOR> http://www.nytimes.com/2016/05/27/nyregion/no-silver-bullet-as-subways-in-the-northeast-show-their-age.html <comment><USER2> I know that this article is talking just about subways, but they brought up the issue of infrastructure spending being far too low. In many cases, however, it's more about the spending being incredibly poorly directed. I was talking to someone who used to sit on the commission of a Virginia city. He told me that VDOT pays for 95% of road construction and maintenance if it conforms to VDOT urban code. This is incredibly foolish for two reasons:

1\. Urban code requires a minimum 28 foot road width. Understanding that "urban" here best means "where there might be some people" rather than significant density, this is a horrendous plan because it encourages huge roads designed for ~45mph. these roads optimize traffic throughput in places that should be optimized for livability, resulting in unnecessarily high spending and, more importantly, dangerous car-paths that discourage crossing the street, or even using it at all without a car.

2\. More relevant to infrastructure spending, this imbalanced gravy train means that a town can easily add the tax base of large retailers at the edges of town, and the only cost to them is 5% of the huge roads involved in getting people out to those relatively unproductive stores. The result is a land-use problem where people have no inclination to build near one another, and the resulting dysfunctional road system that tries to move people and foster economic activity with the same infrastructure, and does both quite poorly. It's the futon of roads. And sure it's nice (if you live in one of these places) to be able to drive to the huge grocery store and pick from 8 different kinds of mustard, but if you're buying the specialty versions, you should probably just be ordering it online.

Granted, that's just the Virginia system, but it seems reasonable to expect that it would be similar in other states. In my travels, I haven't noticed many (U.S.) places that didn't fall into similar patterns.

<comment><USER3> > And sure it's nice (if you live in one of these places) to be able to drive > to the huge grocery store and pick from 8 different kinds of mustard

It's not. It's a disaster. It takes you 30 minutes just to grab some toothpaste if you run out. The NOVA suburbs are utterly dysfunctional and traffic is near a breaking point. It's often faster to drive to DC from Annapolis than from Great Falls or Reston (despite the latter being half the distance).

<comment><USER2> There's a name for this sort of misunderstanding on the internet, but it escapes me.

To be clear, what I meant is "All other factors ignored, it can be mildly convenient to have access to this abundance of choice." Although, I actually hate having this much choice, as it makes it impossible to shop in a grocery store you don't know, and while I'm at it, I love the size of Trader Joe's parking lots. I was trying to address one (of many, many) complaints that people bring when you suggest something taming the infrastructure demon. Also frequently heard: "If you shrink the lane width and slow the roads down to 25, it'll take forever to get across town!" First of all, if you stop building dumb stroads (street-road hybrids, the aforementioned futon of traffic engineering), the towns will be much smaller, so you'll only have to go half the distance. Hell, you might even be able walk or ride your bike!

I feel for you if you're living and commuting around DC. I did a month-long internship that had me commuting between Fort Meade and Annapolis, and it made me swear off commuting by car. I also spent years making frequent trips between Annapolis and Charlottesville, so I got to watch the expansion down the 95 corridor. You haven't experienced the madness of crowds until you've seen people buying expensive homes as far South as Stafford so that they can spend the next decade hating themselves as they spend 10% of their existence hating themselves as they idle on 95. The DC beltway is the epitome of poor land use.

</comment></comment></comment><comment><USER4> DC's metro system is in another league of dysfunction from the other systems which suffer from the typical, chronic burden of heavy use.

The article lumps it all together; "hey, we should do a transit article today".

</comment><comment><USER5> Raising federal gasoline taxes to pay for infrastructure? Since when does that make sense? Let the people that use the subway, pay for the subway's maintenance-- that way, the larger the amount of people that use it, the more money that gets allocated to maintaining it.

Keeping this kind of thing within the cities that are affected by the issues ensures that the amount of funding scales with the population of the cities, and ensures that a the infrastructure being maintained doesn't depend on the (often unreliable) federal government to give them money.

<comment><USER6> If we assume that these systems are in dire need of repair (which many of them are), and that they are unreliable (which they frequently are), then it can be a hard sell to ask riders to pay more. Pay more for what? Improvements years from now, when what I really need is reliable transportation to and from my job NOW?

Also, if we can continue with the assumptions about these systems, they're not in a position to sustain increased ridership or increased trips, which makes it very hard to capture that revenue in the way you propose.

</comment></comment><comment><USER7> Worth considering when reading that article... [http://theweek.com/articles/449646/why-expensive-build- bridg...](http://theweek.com/articles/449646/why-expensive-build-bridge- america)

<comment><USER8> The new eastern span of the SF Bay Bridge is about 6x over budget because politicians wanted it to look pretty. There's no need for a suspension bridge there; the water isn't deep and it's not a major navigation channel. It could have been a set of short spans, like the old one, and much cheaper.

<comment><USER9> And we still can't ride a bicycle all the way to SF from the east bay (well, without going via San Jose at least)

</comment></comment></comment><comment><USER10> I just want to leave this here - [http://narrowstreetssf.com/](http://narrowstreetssf.com/) one can dream.... America with narrow streets

<comment><USER11> That kind of dream is called a nightmare.

We block out the Sun. We replace the nice smooth concrete sidewalks with cobblestones... causing more noise from wheels (carts and strollers and bikes too, not just cars) and causing people in high heels to sprain their ankles. Oh, and cobblestone is crazy expensive. I guess we'll be needing mass transit, but we just made the street to narrow for it. We make it really tough to transport a family. We made the area inhospitable for people (often women and elderly) who feel unsafe out of their cars.

I know it's cute. It's not actually livable, unless maybe you are an athletic single male who telecommutes. Oh, and the weather is at least as nice as SF.

</comment></comment><comment><USER12> Replace subway with road or airport and you get the same article for the rest of the major cities in the US.

The 2 hours a day I sit in my car to drive 10 miles to work and back cost me more in lost time (translated to money) than the property taxes I pay.

You can't tax cut your way to prosperity.

</comment><comment><USER13> Because to the New York Times only the Northeast exists. San Francisco Bay Area BART is having troubles- but I doubt we will be seeing federal dollars routed our way. But by all means lets all worry about DC and NY.

<comment><USER14> > The Federal Transit Administration found that public transit systems have a > backlog of $86 billion in critical maintenance nationwide.

I wonder how that backlog is allocated: e.g., how BART's _backlog_ compares to NYC, Boston, and DC.

DC and BART are about the same age (1972 vs. 1976), but DC has 68% more riders[1] and an operating budget that's almost double[2]. (So, yes, WMATA also spends more per rider.)

Everyone's hurting for investment in general.

[1] Weekday Daily Ridership from Wikipedia: 423,120 (BART) vs. 712,843 (WMATA). [2] FY16 Annual Operating Budgets: $900k (BART) vs. $1.8B (WMATA)

<comment><USER15> But is that an apple to apple comparison? Operating budget means only so much -- it ignores major costs like pension and benefit obligations and debt service (BART is among the worst at both).

<comment><USER14> It's just a data point. I have no idea how they really compare, or which one is in "worse" shape. As a DC resident, I know the impending metro shutdown is going to be a disaster.</comment></comment></comment></comment>


Putin Blames Outside Forces for Economic Woes - <AUTHOR> http://www.nytimes.com/2014/12/19/world/europe/vladimir-putin-annual-press-conference.html

<comment><USER2> The sanctions (because of the Ukraine liberation/invasion/annexation -- depends on your perspective) are part of the issue, so he isn't wrong.

It is sort of nice to see economic sanctions being effective (even if that is only part of the story.) They also seemed to have a real effect on Iran in getting them to change their behavior. I think that Israel may be next on the list (although primarily from Europe, US is likely to sit out that fight), the wind is sure blowing in that direction.

<comment><USER3> For those Russians trying to go about their daily lives, the sanctions are economic terrorism. How is this nice at all?

Let's turn this around ~ what if the world put similar sanctions on the US after the Iraq/Afghanistan blunders?

<comment><USER2> > what if the world put similar sanctions on the US after the Iraq/Afghanistan > blunders?

Actually it probably would have been a good idea to use the threat of economic sanctions to stop the US invasion of Iraq based on false pretenses (remember it was about WMD) -- it was a mess all around, hugely costly in terms of Iraqi life (aren't the estimates in the +100,000 range these days?) and US money (2 trillion if I remember correctly) and US credibility.

I doubt you could have gotten wide support for sanctions regarding stopping the larger multinational force in Afghanistan.

Ironically, it is likely because of the Iraq debacle that the US is in favor of economic sanctions.

</comment></comment></comment><comment><USER4> To be honest Putin is correct, it are outside factors that are contributing to the decline. For example the US has drastically increased oil production the last few years[1] in order to drop oil prices. Around the end of 2011 oil production really went up, and tensions began to form between the countries. My guess is the US saw the approaching re-election[2] of Putin as a bad move and decided to take action.

Of course I'm not pointing fingers or blaming any side, it's just strange to see history is repeating itself all over again. The news about the NASA budget increase was no surprise for me anyway...

[1] [http://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=MC...](http://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=MCRFPUS1&f=M) [2] [http://en.wikipedia.org/wiki/Russia–United_States_relations#...](http://en.wikipedia.org/wiki/Russia–United_States_relations#Putin.27s_third_term)

<comment><USER5> I don't think the US increased oil production to decrease oil prices. It has had a very successful increase in shale gas production due to new technologies. This has affected the oil prices, and Saudi Arabia in turn isn't liking the competition, so it has massively increased its oil production as a matter of policy. This will eliminate a lot of new, marginally profitable energy producers, across the globe, including Russia. Once they've collapsed, expect the taps to close again. I think the current situation is more of a happy accident for US Foreign Policy. A lot of American producers will be burnt by the current price of oil as well.

<comment><USER4> Your theory sounds logical, and that action by OPEC would also seem logical.

... but the numbers suggest otherwise. The last few years there is no increase in production by OPEC countries: [http://www.eia.gov/cfapps/ipdbproject/iedindex3.cfm?tid=5&pi...](http://www.eia.gov/cfapps/ipdbproject/iedindex3.cfm?tid=5&pid=53&aid=1&cid=r1,CG9,&syid=2010&eyid=2013&unit=TBPD)

<comment><USER6> Saudi Arabia hasn't increased production, but they also haven't decreased production. Within OPEC, the Saudis are supposed to be the swing producer, adjusting their output up and down to maintain price targets. That arrangement has largely broken down as it relied on the other members to respect their quotas. OPEC has found (many times) that when prices drop too far, their members ignore the quotas and feud for marketshare instead.

The Saudis used to keep to their role as swing producer but this time they're letting the rest of OPEC sweat. They've got currency reserves to weather this storm but most of the other OPEC members do not (save for the rich Gulf emirates). The Saudis are trying to teach the rest of OPEC a lesson and bring them back in line.

Couple that with the phenomenal increase in American oil and gas output due to fracking and horizontal drilling and you've got a situation in which two major producers, the US and Saudi Arabia, are flooding the market. Since there's no central authority over American producers, they'll drill whenever the market price will sustain their project. America is unique in that mineral resources are privately held rather than owned by the state, giving private enterprise the incentive to drill as much as possible until the price renders a given well uneconomical.

The end result is that the Saudis have abdicated their role (not for the first time, but this may be the last) and the Americans have picked up.

America is now the world's swing producer. No one saw that coming.

</comment></comment></comment></comment><comment><USER7> Breaking news: Politician blames external factors for problems, assumes no responsibility.

</comment><comment><USER8> I'm just curious why does everyone (a lot of westerners) not like Russia?

<comment><USER2> I don't find that Westerners don't like Russia in general -- at least not the circles I run in. But the Ukraine invasion/liberation/annexation was perceived widely in the West as an aggressive and unnecessary move. So I think it is mostly Russia's recent actions that have caused the negative perception.

Here is some polling numbers that show that Russia has gained a lot of negative perception:

[http://downloads.bbc.co.uk/mediacentre/country-rating- poll.p...](http://downloads.bbc.co.uk/mediacentre/country-rating-poll.pdf)

EDIT: I do think that Russia is viewed as having a corruption/mobster issue in the West, even before the Ukraine issue.

<comment><USER9> _was perceived widely in the West_

Because of our propaganda. We heard all kinds of things about Russian military mobilization, conspiracy theories about who shot down the airliner, how much Putin hates gays, how horrible living conditions were at the Sochi olympic village, how "rigged" the Crimean referendum was, etc.

But we have heard _nothing_ about NATO breaking its post-wall promise, of the enormous rise of nazism on Russia's borders( actual nazism, not the soft nationalism you see in France ), the outrageous corruption and duplicity of the players responsible for the ouster of Yanukovych, the ethnic and political divisions between the Crimea and Ukraine proper, etc.

I continue to be astounded that HN is so virulently anti-russia, mainly because I thought this group would be the most immune to propaganda and most likely to question the official narrative.

<comment><USER2> > Russian military mobilization

The military mobilization on Ukraine's borders did happen.

> conspiracy theories about who shot down the airliner

It was likely the rebels with Russian technology.

> how much Putin hates gays

He did that to himself.

> how horrible living conditions were at the Sochi olympic village

I don't think that is a major factor.

> nazism on Russia's borders

Please explain.

> outrageous corruption and duplicity of the players responsible for the > ouster of Yanukovych

Please explain.

> the ethnic and political divisions between the Crimea and Ukraine proper

I am aware of that. But doing an invasion first and then asking for permission or doing a referendum is not usually how these things are done in the modern era. That was an aggressive move. Usually there is an independence movement and votes are held and permission is sought, it is a long process but a doable one if it is peaceful.

</comment></comment></comment></comment><comment><USER10> Before Crimea did he blame outside forces for economic joy?

</comment><comment><USER11> So, that Rosneft $40bn affair [1] is not a big deal then?

[1] [http://www.ft.com/intl/cms/s/0/15eb42e6-852e-11e4-ab4e-00144...](http://www.ft.com/intl/cms/s/0/15eb42e6-852e-11e4-ab4e-00144feabdc0.html)

</comment><comment><USER12> Really? If the country's economy is solely affected by outsiders, then you really have a bigger problem and should only blame yourself.

</comment><comment><USER13> Outside forces are responsible for economic woes, but Putin is responsible for economic successes.

</comment><comment><USER14> Is anyone surprised?</comment>


Is it ethical for parents to guide their children towards a life as employees? - <AUTHOR>

One could argue that starting a company is so much more rewarding than working as an employee that discouraging people from doing so should be considered unethical. <comment><USER2> That's a stretch.

One could also argue that starting a company is so stressful, so full of risk, and so time-consuming, that encouraging people to do so should be considered unethical.

That said, I don't think parents could encourage or discourage effectively without providing an example. My parents and grandparents on both sides owned their own businesses (grandmother owned a beauty shop and then a thrift store, grandfather on the other side owned a body shop, dad owned an electronics business but later became an engineer working for others, mom owned an antiques and collectibles business); I don't think there's any other way my sister and I could have ended up (sister owns a medical billing company, and I started my first company right after college, which paid the bills but ultimately failed, and now I'm onto a winner).

My parents didn't encourage me to start my own company. In fact, they encouraged me to go the safe path: Get a good education in a marketable field. And, while I was still in college my dad clipped out and gave me the want ad that I replied to that got me my first regular job other than working for my mom in her store or loading furniture for her at garage sales and flea markets. They encouraged me to accept the full-time position offer from that same employer. I opted to quit instead and start my own tech business with the money I'd made in the stock market.

I don't know for sure that the environment I was raised in made a difference, but I do know that when I talk about the risks and expenses and other concerns of starting a business with some folks, they look like I'm speaking a foreign language. And, I also know that parental examples are how kids learn about just about everything, early in life.

So, if parents don't believe in being an entrepreneur themselves, how can that possibly encourage it in their children effectively? That's not to say they shouldn't try. A little entrepreneurial spirit goes a long way when the economy gets weird and jobs are no longer reliable.

</comment><comment><USER3> Encouragement in either direction is ethical so long as the parent is taking the child's wellbeing into account. Past that, it's a judgment call on the part of the parent, and a lot of that is informed by their own life experience. I know my parents never tried to instill any entrepreneurial values in me, but instead encouraged me to do well in school and go to college so I could get a decent job. Hardly what I'd call unethical - they were simply valuing my safety and stability over my independence and creative fulfillment. Since they came from less privileged backgrounds, that was likely a reflection of their own aspirations. You grow up wondering if your family will be able to put food on the table, around families who sometimes can't, and you might place a higher value on stability for yourself and your children.

</comment><comment><USER4> It's certainly normal. Many, many people do not have a single entrepreneurial bone in their body- they really do wish to be told what the task is, and sometimes how to do it, when they arrive at work. And they want to punch out at 5pm, turn on the television and forget about work.

If that's what they want from work, then pushing them to start their own company, or take over the family business, can only end in disaster. Have you ever seen a company driven into the ground by the 2nd or 3rd generation owners, who don't have the passion for sand & gravel that Granpa Kerzyk did?

</comment><comment><USER5> Yes, it's perfectly ethical. To take an extreme example, some people find murder to be rewarding, but that doesn't mean that there's anything wrong with encouraging people to not murder. Most people would find that the cons of starting a company vastly outway the pros.</comment>


MIT junior dropping out to work on education startup he founded 5 years ago - <AUTHOR> http://quizlet.com/blog/leaving-mit-to-make-quizlet-even-better/

<comment><USER2> I can't fathom dropping out of MIT with only a year left. Maybe he won't ever need the piece of paper, but surely MIT doesn't cram American History and Introduction to Communications in the senior year.

<comment><USER3> Many top schools have a policy which allows students who drop out to come back and finish up their degree if they want. So it is not a risky decision.

<comment><USER4> As an MIT student, I can confirm this. I know someone who came back after 5 years to finish his last semester, and one of my TAs this term joined the military and came back after 10 years.

<comment><USER5> The reason they do this is because dropouts hurt their ranking, while indefinite leaves of absence don't.

</comment></comment></comment></comment><comment><USER6> Quizlet's awesome. I take my hat off to Andrew Sutherland for making it all happen while working as a full-time high school and university student. It's not easy.

<comment><USER7> Heck. From what I hear, being a full time student at MIT can be pretty challenging on its own. I only know a couple people at MIT, but they've all talked about how challenging it is (in an enjoyable way).

</comment></comment><comment><USER8> Congratulations on your success. However, I think you should finish your degree. Online flash cards are not the Future of the World.

<comment><USER9> Arash Ferdowsi left MIT as a junior to cofound Dropbox w/Drew Houston. Turned our pretty well it seems :)

<comment><USER10> Success stories are cheap to rattle off. We don't hear about the countless failures though, precisely because they were failures.

<comment><USER11> But Quizlet already has tons of traction. It's not some shot in the dark.

</comment></comment></comment></comment><comment><USER12> :( not even one more year? What about 6.172 this fall?

</comment><comment><USER13> I remember him announcing Quizlet on the short-lived TechCrunch Forums. I was impressed then and I am impressed now.

</comment><comment><USER14> Technology is driving huge changes in the education industry. First the price of the technical information that comprises "an education" going to zero. The information that used to exist only in textbooks is now mostly available for free, or almost free. I have a relative in medical school who tells me that when med students need the details of a disease or medication or other medical topic, they just look it up on Wikipedia or another free site.

Second, the price of the learning technology is dropping. Quizlet is an example. It is getting easier to actually learn the material and verify that learning has taken place.

What hasn't happened yet, but what seems to be the logical next step is cheaper or free credentialing: a trusted organization vouching for a person's mastery of a body of knowledge.

<comment><USER15> In accordance with signalling theory, for cheaper or free credentials to get any traction, obtaining them will require a very significant investment of time and effort.

Kind of like a degree.

<comment><USER14> Traditionally, if you wanted to become competent, you went to trusted school, worked hard at the course of study provided by the school, and if you completed the course requirements, you got a degree in which the school declares you competent. This was expensive because it was expensive for the school to provide a course of study that made students competent. The school needed to pay for great teachers as well as materials (books) and facilities (libraries, labs). Great teachers, materials, and facilities could not be found except at the expensive schools. The school also tested students but testing made up an insignificant part of the total expense.

Now the costs of providing the education is going to zero. Instead of highly paid teachers lecturing tens of students at a time, Sal Khan is making video lessons that are viewed by tens of thousands. Instead of expensive textbooks, Wikipedia provides better information for free. Instead of recitation hours in a classroom, students are tutoring each other online or testing themselves with flashcards.

Traditional educational institutions are being left with a shrinking value proposition. They screen students (admission). They verify that students are doing the work and learning (testing). They graduate students (certifying). These functions are not what traditionally justified their high cost.

Of course becoming competent requires significant time and effort _on the part of the student_. But this doesn't mean that the means used by the student need be expensive. One can become very physically fit without joining an health club and hiring a personal trainer.

</comment></comment></comment><comment><USER16> While I wish him the best of luck, I'm not sure of the timing of his decision. After all, it's not as if people won't need help learning new things next year. Plus, he's got great traction so it's unlikely he'll be friendstered before he graduates.

</comment><comment><USER17> How do you make money? If you don't mind me asking..:)

<comment><USER7> There's some advertising on Quizlet and a premium version called Quizlet Plus, but I'm not sure (from a user's perspective) if that's bringing in a ton of revenue.

<comment><USER17> yea, freemium plus ads is a classic rev model but usually doesn't work for niche markets. Licensing their engine to third parties is an option they could explore too...

<comment><USER7> Also, I think the free offering is extremely robust to the point where the paid version is mostly a purchase to help support the company rather than for actual features.

<comment><USER17> Yea, but that is a good enough explanation if it's a hobby, but if its a business they need to have a viable financial model.

</comment></comment></comment></comment></comment><comment><USER18> How is this different from what the Khan Academy is doing?</comment>


Ask HN: How do you shed your digital skin? - <AUTHOR> This weekend I have decided to clear and delete a lot of my old accounts and emails and start afresh.
I have done the following

  - backed up necessary files and important stuff
  - installed debian on my personal machine
  - removed and deleted old email accounts
  - deleted old social media accounts
  - cleared ad preferences from facebook and disabled account
  - searched for personal information or emails to find leaks

 Interested to know what things I can do to minimise my digital footprint going forward?
Any other tips to see what personal information is publicly available? <comment><USER2> Use DuckDuckGo, not Google.

Use an ad blocker in your browser. Always use private mode tabs, or clear your cookies frequently.

Set up a cheap VPS, and tunnel all your traffic through it over a VPN. Configure it with your own DNS server. Use a firewall to block all traffic to known tracking services.

Set up your phone to use this VPN too.

Don't use social media.

Don't use GMail, GCal, GContacts, etc.

Use '+' extensions on your email to create single purpose addresses that you can track and blackhole.

Don't disclose your real name, birthdate, phone number, etc, for the online services that you have to use. You can get dedicated phone numbers from eg Twilio for 2FA.

Don't use loyalty programs.

How far you go here is really just a matter of how much you care. And how much you're prepared to sacrifice some aspects of modern life.

</comment><comment><USER3> If you want to avoid being tracked across services or leaving your email out there in the future, use something like [https://idbloc.co](https://idbloc.co) to keep you email secure

</comment><comment><USER4> What's the point?

I reckon some years down the road, everything on the internet today will fit on a thumb-drive. Fit in your pocket, and also be available to whole world, including terabytes upon terabytes of leaked private data from Gmail, Facebook etc. Including private data, and instantly searchable using some kind of technology that blows 2019 Google out of the water. And probably anyone you encounter will have AR glasses hooked up to that data. AR glasses with facial recognition; instantly display your life story, your college transcripts, spy- cam footage of you from a public rest room, your doctor's records, your baby photos, etc.

Maybe the answer is a yearly visit to a cosmetic surgeon, and a yearly legal name change.</comment>


Tiffany Moved 114,000 Gems Without Getting Robbed - <AUTHOR> https://www.nytimes.com/2020/01/13/nyregion/tiffanys-store-closing.html <comment><USER2> If you think this is impressive, consider the Tuscon Gem Shows that happen every year bringing in almost unimaginable quantities of precious and semi- precious gems from around the world. Big retailers make deals worth millions there.</comment>


Ask HN: Why there's no Who's hiring post for jan 2019? - <AUTHOR> <comment><USER2> It will be posted any minute now. It was posted accidentally yesterday and then taken down again ([https://news.ycombinator.com/item?id=18800645](https://news.ycombinator.com/item?id=18800645))</comment>


Python - How to sort my paws? - <AUTHOR> http://stackoverflow.com/questions/4502656/how-to-sort-my-paws <comment><USER2> Following the rabbit trail of that thread (all the paw questions) is a fascinating look at how really good questions tend to get really excellent answers. Of course, it doesn't hurt that it's an intriguing problem but the fact that the question asker adds a ton of pictures and information has to be the key in getting a very thorough and informative answer.

Even more interesting to me from a psychological perspective is the amount of time people are willing to spend on other people's problems when those problems are challenging and/or framed well. Interesting stuff.

<comment><USER3> I was kinda disappointed he's using special veterinary equipment. I was hoping to find out the sensor so I could make a UI for my dog.

<comment><USER4> Pounce Pounce Revolution?

<comment><USER3> I'm pretty convinced I could get the dog to use an iPad. I wonder if there is a simple iPad soundboard app.

<comment><USER4> For what it's worth, I had a golden retriever who liked to toot the horn of a little Fisher-Price train, so I bet a sound board would work. He always used his nose, which I think would be more likely to work on an iPad screen than paws.

<comment><USER3> I wonder if resistive touch screens are good enough for a dog nose, or I have to go with a full capacitative screen.

(Our puppy will nose, poke, paw, and bite things that I point at in order to get treats. Should be pretty easy to train...)

</comment></comment></comment></comment></comment></comment><comment><USER5> This is what makes SO a great site: an exhaustive answer and the thinking being it, neatly explained. Fascinating.</comment>


Bruce Schneier awarded fellowship at Harvard's Berkman Center - <AUTHOR> https://www.schneier.com/blog/archives/2013/07/my_fellowship_a.html

<comment><USER2> Given the academic setting, perhaps it is a great chance and timing for Schneier to work on the computing equivalent of Popper's Open Society [1] and Literature's narrative with an Unreliable Narrator? [2].

This would amount to something like "computing on top of an untrustable technical, social and political stack", in relation to Kernighan's "You can't trust code that you did not totally create yourself" [3].

[1] [http://en.wikipedia.org/wiki/Open_society](http://en.wikipedia.org/wiki/Open_society)

[2] [http://en.wikipedia.org/wiki/Unreliable_narrator](http://en.wikipedia.org/wiki/Unreliable_narrator)

[3] [http://cm.bell-labs.com/who/ken/trust.html](http://cm.bell- labs.com/who/ken/trust.html)

<comment><USER3> Is this something he has indicated that he wants to work on? Or are you just hoping he will decide to work on these three concepts that you find interesting?

<comment><USER2> It's a refinement of the fellowship's description: _explore the intersection of security, technology, and people -- with a particular emphasis on power_ [https://cyber.law.harvard.edu/newsroom/2013_2014_community](https://cyber.law.harvard.edu/newsroom/2013_2014_community)

<comment><USER3> You meant your interpretation not refinement?

<comment><USER2> It's not an interpretation, it's a suggestion of a more specific (which is what I meant with "refined") idea. Both the article and the linked fellowship description only mention a very broad topic.

A bit like when I tell you that I'm making a salad, and you suggest that I try quinoa.

<comment><USER3> If you were already making a salad why would I suggest you try a different salad?

<comment><USER2> Schneier's post only mentions that he is going to work on security, power and technology as research topics. That's quite broad, so I suggested something that may be interesting within that.

<comment><USER3> So you could have just responded _" Yes, I am hoping he will decide to work on these three concepts that I find interesting"_ to my original question.

<comment><USER2> Yes, I could, and I meant that when I said that it was a suggestion. I take from this that there is something (unintentionally) ambiguous or misleading in my original post, I'll check that.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER4> It would be awesome if he could do an informal talk at the Boston Security Meetup. We'd all love to hear him! [http://www.meetup.com/boston-security- meetup/](http://www.meetup.com/boston-security-meetup/)

</comment><comment><USER5> Damn, just when I leave Harvard, Schneier comes to town. Would have loved to do some work with him on security theater.</comment>