Hacker Newsnew | past | comments | ask | show | jobs | submit | mabster's commentslogin

I flew Scoot airlines recently and my 13” MacBook Air was too big to have on my lap even though the seat in front was not reclined.

There's also something about those seats where you get back pain when you try to sleep with your own seat reclined.


Comfort is an up charge.

I'm guessing you're talking about interlacing?

I've never really experienced it because I've always watched PAL which doesn't have that.

But I would have thought it would be perceived as flashing at 60 Hz with a darker image?


PAL had interlacing


For anyone this deep on the thread, check out this video (great presenter!) explaining TV spectrum allocation, NTSC, PAL, and the origin of 29.97 fps.

https://youtu.be/3GJUM6pCpew


TIL NTSC: He explained that NTSC stands for Not The Smartest Choice, but I always assumed it meant Never The Same Color.


Memories shattered. Yeah, you're right and I would have watched interlaced broadcast content.

I saw interlaced NTSC video in the digital days where the combing was much more obvious and always assumed it was only an NTSC thing!


I'm the opposite - I really like checked exceptions in Java because it's very easy to see how developers are handling errors and they also form part of the function signature.

Most functions will just pass on exceptions verbatim so it's better than error return values because with them the entire codebase has to be littered with error handling, compared to fewer try catch blocks.

setjmp, etc. are like unchecked exceptions, so I'm also not a fan, but I use this occasionally in C anyway.


>I really like checked exceptions in Java because it's very easy to see how developers are handling errors and they also form part of the function signature.

Errors as return values also form part of the function signature in many languages.

>Most functions will just pass on exceptions verbatim so it's better than error return values because with them the entire codebase has to be littered with error handling, compared to fewer try catch blocks.

The question is whether you think that calls that might pass an error up the call chain should be marked as such. I think they should be.

I wouldn't call this "littered with error handling" just because a certain language has decided to do this in a way that resembles industrial style fly-tipping rather than just littering.


Why would errors as return values have to propagate any farther in the codebase compared to errors as exceptions? If exceptions can be handled, so can the value based errors.


The criticism as I understand it isn't about where the errors are actually handled but the ceremony needed in an errors-as-values model, most obviously in Go where you've got to write a couple of lines of test and early return explicitly for each such possible error, compared to C++ where you write nothing.

Rust's Try operator is the minimal ceremony, a single question mark acknowledges that we might not succeed and if so we return early - but there was still ceremony for each such early return.

I happen to think exceptions are inherently a bad idea, but for a different reason.


You nailed it - that's my criticism :)

I've worked with a lot of code like this (particularly C libraries and litanies of return codes), and it's fine... But I prefer something like Java-style exceptions. And with Java lambdas or Kotlin the trend is unfortunately away from checked exceptions these days...

I too am interested in your other reasons!


See my other comment for this article: https://news.ycombinator.com/item?id=45864463

I believe that for today's large software which has multiple engineers, possibly not even working in the same group, involved in the final product, the key problem of exceptions (knowing what is or is not an "exceptional" situation for the software) is not soluble in the general case. Exceptions are a clever idea if you're a solo writing a soup to nuts piece of software, say the firmware for a thermostat, but are too flawed for the library author or the app developer.


What reason is that?


I just pictured someone getting a message to check which model was right from an ancestor 20 giga generations ago!


!remindme 20,000,000,000 years


I've written this kind of function so many times it's not funny. I usually want something that is fed from an iterator, removes duplicates, and yields values as soon as possible.


I've added this functionality to `hist-0.1.5` with a benchmark of other tools that do this on the CLI


We had similar thoughts about "premature optimisation" in the games industry. That is it's better to have prematurely optimised things than finding "everything is slow". But I guess in that context there are many many "inner-most loops" to optimise.


> That is it's better to have prematurely optimised things than finding "everything is slow".

or you found that you've optimized a game that is unfun to play and thus doesn't sell, even tho it runs fast...


The best-practice solution would be to write a barely optimized ugly prototype to make sure the core idea is fun, then throw away the prototype and write the "real" game. But of course that's not always how reality works


> not always how reality works

yep. The stakeholder (who is paying the money) asks why the prototype can't just be "fixed up" and be sold for money, instead of paying for more dev time to rewrite. There's no answer that they can be satisfied with.


Or the timeline just doesn't have capacity for experimentation so the expectations are clear right from the start!


In context most of the major optimisation work was on the engine. The game code can be and usually is slow but we do try to tame things in an O() sense.

I worked licensed titles for a while and that area the quality of a title and whether it sells were largely uncorrelated haha!


I can't remember the details because we coded the SPU in C, but the PS3 SPUs had odd and even cycles with different access properties too.


Discussed in the article, should you want a refresher. https://www.copetti.org/writings/consoles/playstation-3#arch...


I worked with a developer that copied and pasted A LOT and would keep his fingers on the old copy and paste buttons (Ctrl-Ins, etc.). I've even seen him copy and paste single letters. He's one of the most productive developers I've ever worked with.


>I've even seen him copy and paste single letters.

Hopefully not C and V..


I find this hilarious and wanted to give it more recognition than just an upvote.


In my setup I use Colemak DH mod which loses the Vim arrows but I added a modifier where the 'a' key (left pinky on home row) when held down switches the right home row to arrow keys. Hasn't been an issue.


We purposefully didn't use shared_ptr and hence weak_ptr. With these, it is all too easy to construct the "bad" version which has the stub reference count and pointer stored far away in memory from the object itself requiring a double dereference to access the object which is bad for cache performance. Instead we derived off a shareable class that has the reference count to make sure it is close in memory.

We were happy to use unique_ptr, however.


With make_shared it's guaranteed to be a single allocation these days so you shouldn't necessarily have cache locality problems. I do think there are benefits to things being intrusively recounted as you save 8 bytes per object. And if you give up a weak count you can save even more.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: