HN user

jwarren

998 karma
Posts5
Comments209
View on HN

It won't override global scope, it's just a hint the layout engine that your container's paint and/or size won't change, and thus it can optimise it's performance.

Wholly agree with your second point, it's something I see from a lot of junior devs. They just reach straight for flex/grid, and tbh I don't blame them. They are more predictable layout algorithms that are largely unshackled from legacy layout decisions.

The "Cheap" Web 3 years ago

Depends - do you want screen readers to hear something? If so, add a `aria-label="heart"` or similar. If not, add `role="presentation"` to remove it from the accessibility tree altogether.

You might also want to change the element from a `header` to something else, like a `div` or a `span` or even a `figure` instead. Then put "potato.cheap is home of the... The "Cheap" Web" inside the `header` instead.

That's absolutely not the case for the most part, depending on the bar and the time. Go out to a city centre on an evening, especially Friday or Saturday. Most bars and pubs will be busy, noisy, and definitely playing music.

There are absolutely quieter pubs available, but you need to know where to go.

"stole a kiss" wtf is this minimising bullshit? According to the article, he forced himself on someone, grabbing them by the throat. They feared for their life.

According to the article, he also literally had sex with his partner while she was under the influence, without her consent.

Please don't minimise victims trauma.

This has been my go-to placeholder site for the best part of a decade. Not because it necessarily works the best, but just because I always remember it.

I think this is really nice and smart. I would suggest left-aligning the text in the edit/view mode for a few reasons:

1) It's a bit easier to read for longer text sources 2) It makes writing/reading JSON/YAML/other data sources much easier 3) lists are much easier to parse

Elm is lovely, and I'd definitely encourage people to take a look at it from an education point of view at the least. However, I think that's a disingenous comparison.

TypeScript is a superset of JavaScript, which means any JS dev already knows most of TypeScript. They're effectively just learning the type system and best practices on implementing it.

The syntax of Elm is extremely different, which would effectively require developers to learn an entirely new language. It's also a completely different proposition. It's a whole framework, which means complete buy-in on a project. I know there are some interop packages, but you would normally use it instead of React/Vue/Angular etc. This means it's only suitable for new projects.

It's a very nice framework (imo) but it's not a true comparison.

I can only assume that you're trying to run before you can walk. Remember that you're just defining a set of layout rules. You're not giving the browser specific instructions to follow. It seems that there's the temptation to assume that CSS is easy and simple, because it's for the web and isn't a proper programming language.

That is clearly not true. CSS describes a complex set of interactions which evolved over many years. You'll have to refer to MDN, experiment in your browser dev tools, etc.

Start in small and isolated chunks. Open a codepen with just a couple of divs and work out how their layout interacts.

I firmly believe that you can write beautiful CSS. Your list of languages shows that you are clearly interested in learning, and in expressing your needs in varied ways.

As an aside, I would recommend having a design on paper/on screen to implement before starting to write your CSS. Until you become relatively fluent with it, I think CSS relatively counter-productive as a design tool. Thinking about the target result as a separate step from implementing that result is going to be a much better approach.

This Londoner definitely agrees. Their special exhibitions are usually of a very high quality too, worth making the effort in my experience.

FlatList was absolutely the way to go here. In fact, we initially built the list in question when ListView was the only option. During development, FlatList was made available as an experimental component. It made a huge difference switching over to it. The optimisation we needed to do was to use onViewableItemsChanged to toggle the visibility of images. We found that otherwise it wasn't properly emptying the memory of Android devices, and it was easy to crash older devices. After implementing that, we got silky smooth 60fps everywhere.

The only issue was there was a bug in RN core. We submitted a PR which was finally accepted about 6 months later: https://github.com/facebook/react-native/issues/16612#event-...

RN isn't a wrapped HTML renderer like Phonegap. It uses bridge code to render native UI powered by JS business logic. You still write in JSX, which makes layout pretty straightforward. With some careful optimisation, I had pretty solid 60fps scrolling performance on 1000 item/image lists on old Android devices.

I had a pretty similar experience. It's still a challenging environment - getting performance and memory management nailed across platforms and devices took some very careful engineering.

Based on my limited experience with native iOS app development, RN actually requires an almost completely different way of working.

They have! I use a Jetbrains editor daily and I'd never be able to work without it.

Look under Edit > Column Selection Mode. I think it's bound to Cmd+Shift+8 by default.

If you have a set of lines selected, it will transform them into multiple individual selections too.

Tbh not really, I often stop to investigate stuff anyway. I personally prefer to have it at my pace and under my control than listen through someone laboriously explain something I know in great detail.

But this is the great thing about the internet - there's so much information on how to make more of it, you'll definitely be able to find videos which are more to your taste.

I recently watched Andrew Van Slaars series on the Maybe type: https://egghead.io/courses/safer-javascript-with-the-maybe-t... - that was much more traditional and slower paced, and still very good. Maybe give that a shot if you found the Frisby stuff too frenetic.

I completely understand that it could be more difficult for non-native speakers to understand. It's been sped up to match the cartoon style characters that he uses, and presumably for information density. I personally really enjoyed it, even if I did have to frequently pause the videos to recap something he had just said.

The Hasselblad sensor shift is amazing for photographing art or still life (i.e. cars etc) - I'm sure you can imagine how excellent this is for commercial photography.

CSS Gridish 8 years ago

I think you'd be best placed to at least familiarise yourself with the concepts of CSS Grid first.

I had a bunch of my colleagues work through http://cssgridgarden.com/, which seemed to be a good first start for them. There are tons of other resources out there, so it depends what you're after.

I was appalled when I first started reading this.

But in reality, it feels quite true to HTML. The HTML author is declaring to the browser the purpose of this asset. This one is to be viewed as an image. This other asset is to be viewed as a video.

The encoding format shouldn't dictate the tag, the content and intent should.

We've been okay with animated GIFs being images for long enough now that we've kind of opted into animated images being okay in general.