HNHacker News
TopNewBestAskShowJobs

umaar

667 karma · joined July 23, 2011

Front end web developer.

Mailing list: https://umaar.com/dev-tips/

Video course on Chrome DevTools: https://moderndevtools.com/

[ my public key: https://keybase.io/umaar; my proof: https://keybase.io/umaar/sigs/V4cWz1hm8-M9l5D8L0k47IsOZSJQBDsVThwzMTlqGZk ]

submissionscomments
umaar··on Click
There does seem to be a fingerprinting angle on it, but I wrote about using CPU, Battery, Memory etc. to be consideration over how much JavaScript you load for your users: https://umaar.com/dev-tips/242-considerate-javascript/#load-...
umaar··on FFMPEG from Zero to Hero
I battled with this a lot with https://github.com/umaar/video-everyday and still haven't found a better solution.

What I don't understand is, how can professional video editing tools trim accurately (and very quickly)? What are they doing differently to ffmpeg?

If do things the "fast way" with ffmpeg, the exported video has random black frames which I think is related to the keyframe issue you mention. If I do things the "slow way" (e.g. accurately) with ffmpeg, it takes a huge amount of time (at least with large 4k videos). But I don't understand how I can drop that same 4k video into Screenflow, trim 1 second out of it and export it in a matter of seconds.

umaar··on FFMPEG from Zero to Hero
Fun little project I made, trying to automate the creation of those "1 second everyday" style videos and used FFmpeg to achieve this: https://github.com/umaar/video-everyday
umaar··on My stack is HTML+CSS
Same, I get ~500 tweets displayed with:

- No JavaScript necessary

- All profile images turned into one massive sprite

- Minimal payload size

Here are what the tweets look like when rendered: https://umaar.com/dev-tips/feedback

Here's the code to achieve that: https://github.com/umaar/better-twitter-embed

umaar··on How We Built the GitHub Globe
Related: WebGL globe showing live Wikipedia edits https://umaar.com/globe/

I've also tried to visualise worldwide COVID data on that globe, however performance degrades making it completely unusable.

umaar··on Hotwire: HTML over the Wire
Two points on client-side JS have been a constant for me for many years:

- Noticed excessive JavaScript contributes to poor web performance - Things cause JS to break, which breaks other interactivity, often I end up using incognito

During lockdown, I struggled ordering groceries because 20 seconds of JavaScript execution on the main thread made my "delivery slot" expire!

Similar to heydonworks.com stating "Please disable JavaScript to view this site", I'm glad Hotwire is encouraging folks to think about things a little differently.

umaar··on Conditional JavaScript: Only download when it is appropriate
A more optimistic viewpoint: because of the popularity of Chromium based browsers (for better or worse), caniuse.com suggests some of these features have ~70% global browser support - not terrible in my opinion.

Also because of the nature of these features (depending on use case), you can use them in a progressively enhanced manner.

umaar··on Conditional JavaScript: Only download when it is appropriate
OP here, yeah the amount of website variations this could lead to (and don't get me started with CSS media features!).

I don't see this strategy being adopted by most websites, but I reckon it's a technique worth knowing about. I've worked on WebGL visualisations where the device RAM played a big role on performance for example.

umaar··on If-then-else had to be invented
Recognised that GitHub username straight away. That author also made "datamaps": https://github.com/ericfischer/datamaps

I remember over 5 years ago, they helped me me visualise 1 billion "Shazam's" (where I was working at the time) onto map tiles. Glad to see they are still supporting developers!

umaar··on Ask HN: Was 20% time a good policy for Google's working culture?
Not at Google, but rather Shazam.

I've always been a big proponent of 20% time. Shazam is the first place I worked at which taught me about them and I've written about it here:

https://umaar.com/blog/lessons-learned-from-working-at-shaza...

It was the way in which I learnt what I'm passionate about.

umaar··on Imgdiff: Faster than the fastest pixel-by-pixel image difference tool
Visual regression testing is a common example, especially with websites.

I've put a few simple examples in Node.js here: https://github.com/umaar/learn-browser-testing/tree/master/3... (just as learning material)

umaar··on Self-host your fonts for better performance
Something similar I did a few days ago:

Before: https://www.webpagetest.org/result/201129_Di8J_c734f3b630a33...

After: https://www.webpagetest.org/result/201201_DiG4_230670b40ea6e...

While I'm still using Google Fonts, I inlined all the @font-face declarations into my own CSS files, and was then able to remove the <link> tag (a blocking resource) in the head of the document. Lazy loading images also helped, and using webm for video.

umaar··on Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO
I've put browser automation code examples in ava, cypress, jest, playwright, puppeteer, testcafe and webdriver here: https://github.com/umaar/learn-browser-testing/tree/master/1..., if ever you wish to compare them with each other.
umaar··on The NoJS Club
I automated going through the 100 most popular websites, disabling JavaScript, and taking a screenshot to see what they look like

https://github.com/umaar/offline-website-scripts/tree/master...

- Lots of Google products don't work

- Wikipedia looks the same

- GitHub works pretty well, including lots of functionality I thought was JS only

- Amazon seems to work just fine

umaar··on What a great technical resume can do for you
I've put lots of little coding solutions, links to my videos and articles on my website [1], and have sent this to potential employers in the past for web dev jobs. It definitely helped accelerate things, and on 3 occasions I didn't have to do their take home test since my GitHub was enough. I don't have an up to date CV and my LinkedIn is empty.

I've also heard of potential colleagues giving positive sentiment to the hiring manager/boss: "oh that guy, I'm subscribed to his mailing list, he's good".

I've received a good number of offers, and one thing I've started to wonder: are interviewers thinking I'm a great dev because all these little side projects supposedly make me a better web developer? Or are they hoping I'll increase exposure to their brand since I already do talks and write articles?

I hope it's not the former, all the time I spend writing, doing talks etc. it's taking time away (with the exception of software-based side projects) from me learning about the art of software engineering.

[1] https://umaar.com

umaar··on Open-source photo gallery with cloud backup and end-to-end encryption
Would this Google Archive storage class be a good place to backup photos/videos to? it costs $1.23 per TB per month!

https://cloud.google.com/blog/products/storage-data-transfer...

umaar··on Lessons from six months at Shopify
Similarly, I've written 28 lessons from working at Shazam as a web developer for 5 years, where I discuss how I made the most of my career there (hackdays, 1:1's, code reviews, drinking culture, deadlines, meetings, open source etc.).

https://umaar.com/blog/lessons-learned-from-working-at-shaza...

umaar··on How Discord Won
I've always struggled to log into Discord.

1. Try to log onto a channel, but get presented with a "We've detected something out of the ordinary going on. To continue using Discord" where my only option is to verify by phone, which I don't want to do.

2. Occasionally, I'll figure it's worth a try in incognito. I get a step further, only to read "New login location detected, please check your e-mail.". Go back to non-incognito, check email, open the verify link in an incognito window.

3. Instead of finally signing me in, it says "IP address authorized" and "If you followed this link after trying to login on the desktop or mobile app, please go back and try again.".

4. Fair enough, time to log in, again. Submit credentials, get presented with the bizzarely slow fade-in recaptchas. Fail twice, succeed on the third time. Horray! I can see the channel!

5. Finally try those other organisations invite links (in the form of discord.com/invite/org), but get "This invite may be expired, or you might not have permission to join.".

umaar··on Facebook News
Was making me dizzy looking at it!

Yes non web devs, or web devs in a rush because of a poorly managed project + deadline I reckon.

umaar··on Facebook News
Yeah it was stuttering, which is why I was inspecting it. I assumed it was a CSS transition, but without hardware acceleration.

Outside agency makes a lot of sense to me.

When you say get out of tech, you wouldn't happen to mean on a ranch would you? Been seeing more and more references to tech folk wanting to escape to such places ha!

umaar··on Facebook News
Wow that landing page has an animated marquee sort of banner (a bunch of company logos sliding across horizontally), and instead of using CSS transforms, they've done it with a 23mb gif.

Really curious as to why.

umaar··on Advice to my young self: forget side projects and focus on your job
Thanks for the compliment :)

A long time ago I would've agreed. But now I think we live in a world where you can land a job with the right sort of Instagram post which goes viral. Side projects can broaden your horizons, increase your network size, put you in touch with that random CEO who wants to interview you because you used their API in your side project.

I agree with you, most hirees still don't care. However the people I've enjoyed working with most in my career had fascinating quirks to them, maybe they do carpentry or maybe they're building a compiler for fun.

Work can drain people, so having a bit of naive optimism that your side projects could help people/make money/land you a job/or whatever, is not a bad idea IMO. Like with anything, one should manage their own expectations though!

umaar··on Advice to my young self: forget side projects and focus on your job
I've been putting more and more effort into my side projects recently (all on GitHub). It's kept me sharp, passionate, always gives me something to optionally think about (e.g. when exercising), provides conversation pieces (with the right crowd of course), has taught me a whole bunch of new techniques and has kept me relevant in this fast moving industry.

My side projects include:

- An Air Quality Monitoring Dashboard

- A leaderboard app built with redis

- A WebGL globe to show live wikipedia edits

- A web service to scrape any number of GitHub stars from any number of people

- A node.js app which extracts 1 second of footage from your media library, and combines it into a '1 second everyday'-style video

- An audio reactive image slideshow from instagram selfies

- A visualisation dashboard to show stats about your blood from some diabetes bluetooth thingymajig

- 3D renders of popular logos, like the GitHub logo

- An Alfred workflow app to trim X seconds from the currently playing video from VLC

- A script which downloads the top 250 websites to your drive, so you can then run other scripts upon them, as often as you want, without getting blocked

- An augmented reality music website (where you can use the webcam to control audio)

I'm really grateful I'm able to do such things and have no intention of stopping.

umaar··on Show HN: Live map of “good morning/night” tweets
Related: WebGL globe showing live Wikipedia edits https://umaar.com/globe/
umaar··on Google Interview Questions Deconstructed: The Knight’s Dialer
On the subject of Google Interview challenges and keypads, I wrote about a Google keypad challenge here: https://umaar.com/blog/my-code-exercise-submissions-part-1/ - it's all about outputting keypad directions such as "right, right, ⏎" based on the desired input.
umaar··on No script is too simple
I've been moving most of my projects over to Makefiles, instead of npm scripts [1]. Unless I am missing something obvious, it's nicer to run:

make vs. npm start make thing vs. npm run thing

But also more importantly, the Makefile itself feels much cleaner, rather than stuffing scripts in package.json files. The thing I'm confused about, why do npm scripts seem to dominate? I don't see many people using Makefiles.

[1] https://github.com/umaar/video-everyday/blob/master/Makefile

umaar··on Playwright CLI – Open/inspect/emulate pages, generate screenshots, record users
Playwright has been growing on me and it'll feature heavily in a video course I'm making for browser automation.

I'm keeping the codebase open on GitHub: https://github.com/umaar/learn-browser-testing/ so anyone who wants to follow along can do so for free.

umaar··on How we learnt to stop worrying and love web scraping
I've put an example here, for doing it in Node.js: https://github.com/umaar/learn-browser-testing/tree/master/2...
umaar··on How we learnt to stop worrying and love web scraping
I'm working on a video course for all things browser automation, whether it's testing, scraping, auditing, deploying etc.

I'm keeping the codebase open on GitHub: https://github.com/umaar/learn-browser-testing/ so anyone who wants to follow along can do so for free.

In the 2-scraping folder, there's a bunch of scraping examples such as bypassing captchas, building an Amazon price checker, blocking CSS and JavaScript resources during scraping to make the process much quicker, and a few others. Hope it's useful.

umaar··on Pieter Levels Makes $600k a Year from Nomad List and Remote OK
Hey this is really helpful thanks, very interesting to know you would've built your own platform.

Fortunately I already have my own platform for my first course, so maybe reusing that would be best rather than assuming the grass is greener, with things like gumroad/teachable.

← PreviousPage 2 of 4Next →